mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-15 07:05:37 +01:00
5cf8452ae9
- Adds a local environment based on docker - Adds the e2e tests setup - Adds a "Hello World" e2e test to serve as a template Props gziolo, herregroen, mcsf. Fixes #45165. Built from https://develop.svn.wordpress.org/trunk@45570 git-svn-id: http://core.svn.wordpress.org/trunk@45381 1a063a9b-81f0-0310-95a4-ce76da25c4cd
1 line
13 KiB
JavaScript
1 line
13 KiB
JavaScript
this.wp=this.wp||{},this.wp.url=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=340)}({195:function(e,t,r){"use strict";var n=Object.prototype.hasOwnProperty,o=Array.isArray,i=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),a=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r};e.exports={arrayToObject:a,assign:function(e,t){return Object.keys(t).reduce(function(e,r){return e[r]=t[r],e},e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var i=t[n],a=i.obj[i.prop],c=Object.keys(a),u=0;u<c.length;++u){var l=c[u],s=a[l];"object"==typeof s&&null!==s&&-1===r.indexOf(s)&&(t.push({obj:a,prop:l}),r.push(s))}return function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(o(r)){for(var n=[],i=0;i<r.length;++i)void 0!==r[i]&&n.push(r[i]);t.obj[t.prop]=n}}}(t),e},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function(e,t,r){if(0===e.length)return e;var n="string"==typeof e?e:String(e);if("iso-8859-1"===r)return escape(n).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});for(var o="",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?o+=n.charAt(a):c<128?o+=i[c]:c<2048?o+=i[192|c>>6]+i[128|63&c]:c<55296||c>=57344?o+=i[224|c>>12]+i[128|c>>6&63]+i[128|63&c]:(a+=1,c=65536+((1023&c)<<10|1023&n.charCodeAt(a)),o+=i[240|c>>18]+i[128|c>>12&63]+i[128|c>>6&63]+i[128|63&c])}return o},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},merge:function e(t,r,i){if(!r)return t;if("object"!=typeof r){if(o(t))t.push(r);else{if(!t||"object"!=typeof t)return[t,r];(i&&(i.plainObjects||i.allowPrototypes)||!n.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(r);var c=t;return o(t)&&!o(r)&&(c=a(t,i)),o(t)&&o(r)?(r.forEach(function(r,o){if(n.call(t,o)){var a=t[o];a&&"object"==typeof a&&r&&"object"==typeof r?t[o]=e(a,r,i):t.push(r)}else t[o]=r}),t):Object.keys(r).reduce(function(t,o){var a=r[o];return n.call(t,o)?t[o]=e(t[o],a,i):t[o]=a,t},c)}}},196:function(e,t,r){"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"}},340:function(e,t,r){"use strict";r.r(t),r.d(t,"isURL",function(){return c}),r.d(t,"getProtocol",function(){return u}),r.d(t,"isValidProtocol",function(){return l}),r.d(t,"getAuthority",function(){return s}),r.d(t,"isValidAuthority",function(){return f}),r.d(t,"getPath",function(){return p}),r.d(t,"isValidPath",function(){return d}),r.d(t,"getQueryString",function(){return y}),r.d(t,"isValidQueryString",function(){return h}),r.d(t,"getFragment",function(){return m}),r.d(t,"isValidFragment",function(){return b}),r.d(t,"addQueryArgs",function(){return g}),r.d(t,"getQueryArg",function(){return v}),r.d(t,"hasQueryArg",function(){return O}),r.d(t,"removeQueryArgs",function(){return j}),r.d(t,"prependHTTP",function(){return w}),r.d(t,"safeDecodeURI",function(){return x}),r.d(t,"filterURLForDisplay",function(){return S}),r.d(t,"safeDecodeURIComponent",function(){return P});var n=r(85),o=/^(?:https?:)?\/\/\S+$/i,i=/^(mailto:)?[a-z0-9._%+-]+@[a-z0-9][a-z0-9.-]*\.[a-z]{2,63}$/i,a=/^(?:[a-z]+:|#|\?|\.|\/)/i;function c(e){return o.test(e)}function u(e){var t=/^([^\s:]+:)/.exec(e);if(t)return t[1]}function l(e){return!!e&&/^[a-z\-.\+]+[0-9]*:$/i.test(e)}function s(e){var t=/^[^\/\s:]+:(?:\/\/)?\/?([^\/\s#?]+)[\/#?]{0,1}\S*$/.exec(e);if(t)return t[1]}function f(e){return!!e&&/^[^\s#?]+$/.test(e)}function p(e){var t=/^[^\/\s:]+:(?:\/\/)?[^\/\s#?]+[\/]([^\s#?]+)[#?]{0,1}\S*$/.exec(e);if(t)return t[1]}function d(e){return!!e&&/^[^\s#?]+$/.test(e)}function y(e){var t=/^\S+?\?([^\s#]+)/.exec(e);if(t)return t[1]}function h(e){return!!e&&/^[^\s#?\/]+$/.test(e)}function m(e){var t=/^\S+?(#[^\s\?]*)/.exec(e);if(t)return t[1]}function b(e){return!!e&&/^#[^\s#?\/]*$/.test(e)}function g(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;if(!t||!Object.keys(t).length)return e;var r=e,o=e.indexOf("?");return-1!==o&&(t=Object.assign(Object(n.parse)(e.substr(o+1)),t),r=r.substr(0,o)),r+"?"+Object(n.stringify)(t)}function v(e,t){var r=e.indexOf("?");return(-1!==r?Object(n.parse)(e.substr(r+1)):{})[t]}function O(e,t){return void 0!==v(e,t)}function j(e){for(var t=e.indexOf("?"),r=-1!==t?Object(n.parse)(e.substr(t+1)):{},o=-1!==t?e.substr(0,t):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 r[e]}),o+"?"+Object(n.stringify)(r)}function w(e){return a.test(e)||i.test(e)?e:"http://"+e}function x(e){try{return decodeURI(e)}catch(t){return e}}function S(e){var t=e.replace(/^(?:https?:)\/\/(?:www\.)?/,"");return t.match(/^[^\/]+\/$/)?t.replace("/",""):t}function P(e){try{return decodeURIComponent(e)}catch(t){return e}}},341:function(e,t,r){"use strict";var n=r(195),o=r(196),i=Object.prototype.hasOwnProperty,a={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},c=Array.isArray,u=Array.prototype.push,l=function(e,t){u.apply(e,c(t)?t:[t])},s=Date.prototype.toISOString,f={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:n.encode,encodeValuesOnly:!1,formatter:o.formatters[o.default],indices:!1,serializeDate:function(e){return s.call(e)},skipNulls:!1,strictNullHandling:!1},p=function e(t,r,o,i,a,u,s,p,d,y,h,m,b){var g=t;if("function"==typeof s?g=s(r,g):g instanceof Date?g=y(g):"comma"===o&&c(g)&&(g=g.join(",")),null===g){if(i)return u&&!m?u(r,f.encoder,b):r;g=""}if("string"==typeof g||"number"==typeof g||"boolean"==typeof g||n.isBuffer(g))return u?[h(m?r:u(r,f.encoder,b))+"="+h(u(g,f.encoder,b))]:[h(r)+"="+h(String(g))];var v,O=[];if(void 0===g)return O;if(c(s))v=s;else{var j=Object.keys(g);v=p?j.sort(p):j}for(var w=0;w<v.length;++w){var x=v[w];a&&null===g[x]||(c(g)?l(O,e(g[x],"function"==typeof o?o(r,x):r,o,i,a,u,s,p,d,y,h,m,b)):l(O,e(g[x],r+(d?"."+x:"["+x+"]"),o,i,a,u,s,p,d,y,h,m,b)))}return O};e.exports=function(e,t){var r,n=e,u=function(e){if(!e)return f;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||f.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=o.default;if(void 0!==e.format){if(!i.call(o.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var n=o.formatters[r],a=f.filter;return("function"==typeof e.filter||c(e.filter))&&(a=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:f.addQueryPrefix,allowDots:void 0===e.allowDots?f.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:f.charsetSentinel,delimiter:void 0===e.delimiter?f.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:f.encode,encoder:"function"==typeof e.encoder?e.encoder:f.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:f.encodeValuesOnly,filter:a,formatter:n,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:f.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:f.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:f.strictNullHandling}}(t);"function"==typeof u.filter?n=(0,u.filter)("",n):c(u.filter)&&(r=u.filter);var s,d=[];if("object"!=typeof n||null===n)return"";s=t&&t.arrayFormat in a?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var y=a[s];r||(r=Object.keys(n)),u.sort&&r.sort(u.sort);for(var h=0;h<r.length;++h){var m=r[h];u.skipNulls&&null===n[m]||l(d,p(n[m],m,y,u.strictNullHandling,u.skipNulls,u.encode?u.encoder:null,u.filter,u.sort,u.allowDots,u.serializeDate,u.formatter,u.encodeValuesOnly,u.charset))}var b=d.join(u.delimiter),g=!0===u.addQueryPrefix?"?":"";return u.charsetSentinel&&("iso-8859-1"===u.charset?g+="utf8=%26%2310003%3B&":g+="utf8=%E2%9C%93&"),b.length>0?g+b:""}},342:function(e,t,r){"use strict";var n=r(195),o=Object.prototype.hasOwnProperty,i={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!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,t){return String.fromCharCode(parseInt(t,10))})},c=function(e,t,r){if(e){var n=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,i=/(\[[^[\]]*])/g,a=/(\[[^[\]]*])/.exec(n),c=a?n.slice(0,a.index):n,u=[];if(c){if(!r.plainObjects&&o.call(Object.prototype,c)&&!r.allowPrototypes)return;u.push(c)}for(var l=0;null!==(a=i.exec(n))&&l<r.depth;){if(l+=1,!r.plainObjects&&o.call(Object.prototype,a[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(a[1])}return a&&u.push("["+n.slice(a.index)+"]"),function(e,t,r){for(var n=t,o=e.length-1;o>=0;--o){var i,a=e[o];if("[]"===a&&r.parseArrays)i=[].concat(n);else{i=r.plainObjects?Object.create(null):{};var c="["===a.charAt(0)&&"]"===a.charAt(a.length-1)?a.slice(1,-1):a,u=parseInt(c,10);r.parseArrays||""!==c?!isNaN(u)&&a!==c&&String(u)===c&&u>=0&&r.parseArrays&&u<=r.arrayLimit?(i=[])[u]=n:i[c]=n:i={0:n}}n=i}return n}(u,t,r)}};e.exports=function(e,t){var r=function(e){if(!e)return i;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new Error("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?i.charset:e.charset;return{allowDots:void 0===e.allowDots?i.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:i.allowPrototypes,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:i.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:i.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:i.comma,decoder:"function"==typeof e.decoder?e.decoder:i.decoder,delimiter:"string"==typeof e.delimiter||n.isRegExp(e.delimiter)?e.delimiter:i.delimiter,depth:"number"==typeof e.depth?e.depth:i.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:i.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:i.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:i.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:i.strictNullHandling}}(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var u="string"==typeof e?function(e,t){var r,c={},u=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,l=t.parameterLimit===1/0?void 0:t.parameterLimit,s=u.split(t.delimiter,l),f=-1,p=t.charset;if(t.charsetSentinel)for(r=0;r<s.length;++r)0===s[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===s[r]?p="utf-8":"utf8=%26%2310003%3B"===s[r]&&(p="iso-8859-1"),f=r,r=s.length);for(r=0;r<s.length;++r)if(r!==f){var d,y,h=s[r],m=h.indexOf("]="),b=-1===m?h.indexOf("="):m+1;-1===b?(d=t.decoder(h,i.decoder,p),y=t.strictNullHandling?null:""):(d=t.decoder(h.slice(0,b),i.decoder,p),y=t.decoder(h.slice(b+1),i.decoder,p)),y&&t.interpretNumericEntities&&"iso-8859-1"===p&&(y=a(y)),y&&t.comma&&y.indexOf(",")>-1&&(y=y.split(",")),o.call(c,d)?c[d]=n.combine(c[d],y):c[d]=y}return c}(e,r):e,l=r.plainObjects?Object.create(null):{},s=Object.keys(u),f=0;f<s.length;++f){var p=s[f],d=c(p,u[p],r);l=n.merge(l,d,r)}return n.compact(l)}},85:function(e,t,r){"use strict";var n=r(341),o=r(342),i=r(196);e.exports={formats:i,parse:o,stringify:n}}}); |