WordPress/wp-includes/js/dist/url.min.js
atimmer a603510b73 Build Tools: Upgrade @wordpress packages to the latest version.
This also includes the new @wordpress/format-library and @wordpress/notices packages.

package-lock.json has been completely regenerated in this commit.

Props pento.
Merges [43840] to trunk.
See #45145.

Built from https://develop.svn.wordpress.org/trunk@44177


git-svn-id: http://core.svn.wordpress.org/trunk@44007 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 10:55:01 +00:00

1 line
11 KiB
JavaScript

this.wp=this.wp||{},this.wp.url=function(e){var r={};function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var o in e)t.d(n,o,function(r){return e[r]}.bind(null,o));return n},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=300)}({15:function(e,r,t){"use strict";function n(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}t.d(r,"a",function(){return n})},176:function(e,r,t){"use strict";var n=Object.prototype.hasOwnProperty,o=function(){for(var e=[],r=0;r<256;++r)e.push("%"+((r<16?"0":"")+r.toString(16)).toUpperCase());return e}(),i=function(e,r){for(var t=r&&r.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(t[n]=e[n]);return t};e.exports={arrayToObject:i,assign:function(e,r){return Object.keys(r).reduce(function(e,t){return e[t]=r[t],e},e)},combine:function(e,r){return[].concat(e,r)},compact:function(e){for(var r=[{obj:{o:e},prop:"o"}],t=[],n=0;n<r.length;++n)for(var o=r[n],i=o.obj[o.prop],a=Object.keys(i),c=0;c<a.length;++c){var u=a[c],l=i[u];"object"==typeof l&&null!==l&&-1===t.indexOf(l)&&(r.push({obj:i,prop:u}),t.push(l))}return function(e){for(;e.length>1;){var r=e.pop(),t=r.obj[r.prop];if(Array.isArray(t)){for(var n=[],o=0;o<t.length;++o)void 0!==t[o]&&n.push(t[o]);r.obj[r.prop]=n}}}(r),e},decode:function(e,r,t){var n=e.replace(/\+/g," ");if("iso-8859-1"===t)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function(e,r,t){if(0===e.length)return e;var n="string"==typeof e?e:String(e);if("iso-8859-1"===t)return escape(n).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});for(var i="",a=0;a<n.length;++a){var c=n.charCodeAt(a);45===c||46===c||95===c||126===c||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122?i+=n.charAt(a):c<128?i+=o[c]:c<2048?i+=o[192|c>>6]+o[128|63&c]:c<55296||c>=57344?i+=o[224|c>>12]+o[128|c>>6&63]+o[128|63&c]:(a+=1,c=65536+((1023&c)<<10|1023&n.charCodeAt(a)),i+=o[240|c>>18]+o[128|c>>12&63]+o[128|c>>6&63]+o[128|63&c])}return i},isBuffer:function(e){return null!=e&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},merge:function e(r,t,o){if(!t)return r;if("object"!=typeof t){if(Array.isArray(r))r.push(t);else{if("object"!=typeof r)return[r,t];(o&&(o.plainObjects||o.allowPrototypes)||!n.call(Object.prototype,t))&&(r[t]=!0)}return r}if("object"!=typeof r)return[r].concat(t);var a=r;return Array.isArray(r)&&!Array.isArray(t)&&(a=i(r,o)),Array.isArray(r)&&Array.isArray(t)?(t.forEach(function(t,i){n.call(r,i)?r[i]&&"object"==typeof r[i]?r[i]=e(r[i],t,o):r.push(t):r[i]=t}),r):Object.keys(t).reduce(function(r,i){var a=t[i];return n.call(r,i)?r[i]=e(r[i],a,o):r[i]=a,r},a)}}},177:function(e,r,t){"use strict";var n=String.prototype.replace,o=/%20/g;e.exports={default:"RFC3986",formatters:{RFC1738:function(e){return n.call(e,o,"+")},RFC3986:function(e){return e}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},300:function(e,r,t){"use strict";t.r(r),t.d(r,"isURL",function(){return u}),t.d(r,"addQueryArgs",function(){return l}),t.d(r,"getQueryArg",function(){return s}),t.d(r,"hasQueryArg",function(){return f}),t.d(r,"removeQueryArgs",function(){return p}),t.d(r,"prependHTTP",function(){return d}),t.d(r,"safeDecodeURI",function(){return y}),t.d(r,"filterURLForDisplay",function(){return b});var n=t(8),o=t(76),i=/^(?:https?:)?\/\/\S+$/i,a=/^(mailto:)?[a-z0-9._%+-]+@[a-z0-9][a-z0-9.-]*\.[a-z]{2,63}$/i,c=/^(?:[a-z]+:|#|\?|\.|\/)/i;function u(e){return i.test(e)}function l(e,r){var t=e.indexOf("?"),i=-1!==t?Object(o.parse)(e.substr(t+1)):{};return(-1!==t?e.substr(0,t):e)+"?"+Object(o.stringify)(Object(n.a)({},i,r))}function s(e,r){var t=e.indexOf("?");return(-1!==t?Object(o.parse)(e.substr(t+1)):{})[r]}function f(e,r){return void 0!==s(e,r)}function p(e){for(var r=e.indexOf("?"),t=-1!==r?Object(o.parse)(e.substr(r+1)):{},n=-1!==r?e.substr(0,r):e,i=arguments.length,a=new Array(i>1?i-1:0),c=1;c<i;c++)a[c-1]=arguments[c];return a.forEach(function(e){return delete t[e]}),n+"?"+Object(o.stringify)(t)}function d(e){return c.test(e)||a.test(e)?e:"http://"+e}function y(e){try{return decodeURI(e)}catch(r){return e}}function b(e){var r=e.replace(/^(?:https?:)\/\/(?:www\.)?/,"");return r.match(/^[^\/]+\/$/)?r.replace("/",""):r}},301:function(e,r,t){"use strict";var n=t(176),o=t(177),i={brackets:function(e){return e+"[]"},indices:function(e,r){return e+"["+r+"]"},repeat:function(e){return e}},a=Array.isArray,c=Array.prototype.push,u=function(e,r){c.apply(e,a(r)?r:[r])},l=Date.prototype.toISOString,s={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:n.encode,encodeValuesOnly:!1,indices:!1,serializeDate:function(e){return l.call(e)},skipNulls:!1,strictNullHandling:!1},f=function e(r,t,o,i,a,c,l,f,p,d,y,b,h){var g=r;if("function"==typeof l?g=l(t,g):g instanceof Date&&(g=d(g)),null===g){if(i)return c&&!b?c(t,s.encoder,h):t;g=""}if("string"==typeof g||"number"==typeof g||"boolean"==typeof g||n.isBuffer(g))return c?[y(b?t:c(t,s.encoder,h))+"="+y(c(g,s.encoder,h))]:[y(t)+"="+y(String(g))];var v,m=[];if(void 0===g)return m;if(Array.isArray(l))v=l;else{var O=Object.keys(g);v=f?O.sort(f):O}for(var j=0;j<v.length;++j){var w=v[j];a&&null===g[w]||(Array.isArray(g)?u(m,e(g[w],o(t,w),o,i,a,c,l,f,p,d,y,b,h)):u(m,e(g[w],t+(p?"."+w:"["+w+"]"),o,i,a,c,l,f,p,d,y,b,h)))}return m};e.exports=function(e,r){var t=e,a=r?n.assign({},r):{};if(null!==a.encoder&&void 0!==a.encoder&&"function"!=typeof a.encoder)throw new TypeError("Encoder has to be a function.");var c=void 0===a.delimiter?s.delimiter:a.delimiter,l="boolean"==typeof a.strictNullHandling?a.strictNullHandling:s.strictNullHandling,p="boolean"==typeof a.skipNulls?a.skipNulls:s.skipNulls,d="boolean"==typeof a.encode?a.encode:s.encode,y="function"==typeof a.encoder?a.encoder:s.encoder,b="function"==typeof a.sort?a.sort:null,h=void 0===a.allowDots?s.allowDots:!!a.allowDots,g="function"==typeof a.serializeDate?a.serializeDate:s.serializeDate,v="boolean"==typeof a.encodeValuesOnly?a.encodeValuesOnly:s.encodeValuesOnly,m=a.charset||s.charset;if(void 0!==a.charset&&"utf-8"!==a.charset&&"iso-8859-1"!==a.charset)throw new Error("The charset option must be either utf-8, iso-8859-1, or undefined");if(void 0===a.format)a.format=o.default;else if(!Object.prototype.hasOwnProperty.call(o.formatters,a.format))throw new TypeError("Unknown format option provided.");var O,j,w=o.formatters[a.format];"function"==typeof a.filter?t=(j=a.filter)("",t):Array.isArray(a.filter)&&(O=j=a.filter);var A,x=[];if("object"!=typeof t||null===t)return"";A=a.arrayFormat in i?a.arrayFormat:"indices"in a?a.indices?"indices":"repeat":"indices";var P=i[A];O||(O=Object.keys(t)),b&&O.sort(b);for(var S=0;S<O.length;++S){var D=O[S];p&&null===t[D]||u(x,f(t[D],D,P,l,p,d?y:null,j,b,h,g,w,v,m))}var N=x.join(c),E=!0===a.addQueryPrefix?"?":"";return a.charsetSentinel&&(E+="iso-8859-1"===m?"utf8=%26%2310003%3B&":"utf8=%E2%9C%93&"),N.length>0?E+N:""}},302:function(e,r,t){"use strict";var n=t(176),o=Object.prototype.hasOwnProperty,i={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},a=function(e){return e.replace(/&#(\d+);/g,function(e,r){return String.fromCharCode(parseInt(r,10))})},c=function(e,r,t){if(e){var n=t.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,i=/(\[[^[\]]*])/g,a=/(\[[^[\]]*])/.exec(n),c=a?n.slice(0,a.index):n,u=[];if(c){if(!t.plainObjects&&o.call(Object.prototype,c)&&!t.allowPrototypes)return;u.push(c)}for(var l=0;null!==(a=i.exec(n))&&l<t.depth;){if(l+=1,!t.plainObjects&&o.call(Object.prototype,a[1].slice(1,-1))&&!t.allowPrototypes)return;u.push(a[1])}return a&&u.push("["+n.slice(a.index)+"]"),function(e,r,t){for(var n=r,o=e.length-1;o>=0;--o){var i,a=e[o];if("[]"===a&&t.parseArrays)i=[].concat(n);else{i=t.plainObjects?Object.create(null):{};var c="["===a.charAt(0)&&"]"===a.charAt(a.length-1)?a.slice(1,-1):a,u=parseInt(c,10);t.parseArrays||""!==c?!isNaN(u)&&a!==c&&String(u)===c&&u>=0&&t.parseArrays&&u<=t.arrayLimit?(i=[])[u]=n:i[c]=n:i={0:n}}n=i}return n}(u,r,t)}};e.exports=function(e,r){var t=r?n.assign({},r):{};if(null!==t.decoder&&void 0!==t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(t.ignoreQueryPrefix=!0===t.ignoreQueryPrefix,t.delimiter="string"==typeof t.delimiter||n.isRegExp(t.delimiter)?t.delimiter:i.delimiter,t.depth="number"==typeof t.depth?t.depth:i.depth,t.arrayLimit="number"==typeof t.arrayLimit?t.arrayLimit:i.arrayLimit,t.parseArrays=!1!==t.parseArrays,t.decoder="function"==typeof t.decoder?t.decoder:i.decoder,t.allowDots=void 0===t.allowDots?i.allowDots:!!t.allowDots,t.plainObjects="boolean"==typeof t.plainObjects?t.plainObjects:i.plainObjects,t.allowPrototypes="boolean"==typeof t.allowPrototypes?t.allowPrototypes:i.allowPrototypes,t.parameterLimit="number"==typeof t.parameterLimit?t.parameterLimit:i.parameterLimit,t.strictNullHandling="boolean"==typeof t.strictNullHandling?t.strictNullHandling:i.strictNullHandling,void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new Error("The charset option must be either utf-8, iso-8859-1, or undefined");if(void 0===t.charset&&(t.charset=i.charset),""===e||null==e)return t.plainObjects?Object.create(null):{};for(var u="string"==typeof e?function(e,r){var t,c={},u=r.ignoreQueryPrefix?e.replace(/^\?/,""):e,l=r.parameterLimit===1/0?void 0:r.parameterLimit,s=u.split(r.delimiter,l),f=-1,p=r.charset;if(r.charsetSentinel)for(t=0;t<s.length;++t)0===s[t].indexOf("utf8=")&&("utf8=%E2%9C%93"===s[t]?p="utf-8":"utf8=%26%2310003%3B"===s[t]&&(p="iso-8859-1"),f=t,t=s.length);for(t=0;t<s.length;++t)if(t!==f){var d,y,b=s[t],h=b.indexOf("]="),g=-1===h?b.indexOf("="):h+1;-1===g?(d=r.decoder(b,i.decoder,p),y=r.strictNullHandling?null:""):(d=r.decoder(b.slice(0,g),i.decoder,p),y=r.decoder(b.slice(g+1),i.decoder,p)),y&&r.interpretNumericEntities&&"iso-8859-1"===p&&(y=a(y)),o.call(c,d)?c[d]=n.combine(c[d],y):c[d]=y}return c}(e,t):e,l=t.plainObjects?Object.create(null):{},s=Object.keys(u),f=0;f<s.length;++f){var p=s[f],d=c(p,u[p],t);l=n.merge(l,d,t)}return n.compact(l)}},76:function(e,r,t){"use strict";var n=t(301),o=t(302),i=t(177);e.exports={formats:i,parse:o,stringify:n}},8:function(e,r,t){"use strict";t.d(r,"a",function(){return o});var n=t(15);function o(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},o=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.forEach(function(r){Object(n.a)(e,r,t[r])})}return e}}});