mirror of
https://github.com/silverstripe/silverstripe-tagfield
synced 2024-10-22 11:05:32 +02:00
New bundle
This commit is contained in:
parent
9e4801809d
commit
e709436693
2
client/dist/js/bundle.js
vendored
2
client/dist/js/bundle.js
vendored
@ -1 +1 @@
|
||||
!function(t){function e(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:o})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s="./client/src/bundles/bundle.js")}({"./client/src/boot/index.js":function(t,e,n){"use strict";var o=n("./client/src/boot/registerComponents.js"),r=function(t){return t&&t.__esModule?t:{default:t}}(o);window.document.addEventListener("DOMContentLoaded",function(){(0,r.default)()})},"./client/src/boot/registerComponents.js":function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),s=o(r),i=n("./client/src/components/TagField.js"),a=o(i);e.default=function(){s.default.component.registerMany({TagField:a.default})}},"./client/src/bundles/bundle.js":function(t,e,n){"use strict";n("./client/src/legacy/entwine/TagField.js"),n("./client/src/boot/index.js")},"./client/src/components/TagField.js":function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){var n={};for(var o in t)e.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}function s(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function u(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var h=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},l=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),c=n(1),p=o(c),f=n(4),d=o(f),m=n(2),v=o(m),y=n("./node_modules/url/url.js"),b=o(y),g=n("./node_modules/debounce-promise/dist/index.js"),j=o(g),O=function(t){function e(t){i(this,e);var n=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.state={value:t.value},n.onChange=n.onChange.bind(n),n.getOptions=n.getOptions.bind(n),n.fetchOptions=(0,j.default)(n.fetchOptions,500),n}return u(e,t),l(e,[{key:"onChange",value:function(t){this.setState({value:t}),"function"==typeof this.props.onChange&&this.props.onChange(t)}},{key:"getOptions",value:function(t){var e=this.props,n=e.lazyLoad,o=e.options;return n?t?this.fetchOptions(t):Promise.resolve({options:[]}):Promise.resolve({options:o})}},{key:"fetchOptions",value:function(t){var e=this.props,n=e.optionUrl,o=e.labelKey,r=e.valueKey,i=b.default.parse(n,!0);return i.query.term=t,(0,v.default)(b.default.format(i),{credentials:"same-origin"}).then(function(t){return t.json()}).then(function(t){return{options:t.items.map(function(t){var e;return e={},s(e,o,t.id),s(e,r,t.text),e})}})}},{key:"render",value:function(){var t=this.props,e=t.lazyLoad,n=t.options,o=t.creatable,s=r(t,["lazyLoad","options","creatable"]),i=e?{loadOptions:this.getOptions}:{options:n},a=d.default;return e&&o?a=d.default.AsyncCreatable:e?a=d.default.Async:o&&(a=d.default.Creatable),s.value=this.state.value,p.default.createElement(a,h({},s,{onChange:this.onChange,inputProps:{className:"no-change-track"}},i))}}]),e}(c.Component);O.propTypes={name:c.PropTypes.string.isRequired,labelKey:c.PropTypes.string.isRequired,valueKey:c.PropTypes.string.isRequired,lazyLoad:c.PropTypes.bool.isRequired,creatable:c.PropTypes.bool.isRequired,multi:c.PropTypes.bool.isRequired,disabled:c.PropTypes.bool,options:c.PropTypes.arrayOf(c.PropTypes.object),optionUrl:c.PropTypes.string,value:c.PropTypes.any,onChange:c.PropTypes.func,onBlur:c.PropTypes.func},O.defaultProps={labelKey:"Title",valueKey:"Value",disabled:!1},e.default=O},"./client/src/legacy/entwine/TagField.js":function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}var r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},s=n(1),i=o(s),a=n(3),u=o(a),h=n(0);window.jQuery.entwine("ss",function(t){t(".js-injector-boot .ss-tag-field").entwine({onmatch:function(){var t=this,e=this.closest(".cms-content").attr("id"),n=e?{context:e}:{},o=(0,h.loadComponent)("TagField",n),s=r({},this.data("schema"),{onBlur:function(){t.parents(".cms-edit-form:first").trigger("change")}});u.default.render(i.default.createElement(o,s),this[0])},onunmatch:function(){u.default.unmountComponentAtNode(this[0])}})})},"./node_modules/debounce-promise/dist/index.js":function(t,e,n){"use strict";function o(t){return"function"==typeof t?t():t}function r(){var t={};return t.promise=new Promise(function(e,n){t.resolve=e,t.reject=n}),t}var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=function(t){function e(){var e=u;clearTimeout(h),Promise.resolve(i.accumulate?t.call(this,l):t.apply(this,l[l.length-1])).then(e.resolve,e.reject),l=[],u=null}var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=void 0,u=void 0,h=void 0,l=[];return function(){var c=o(n),p=(new Date).getTime(),f=!a||p-a>c;a=p;for(var d=arguments.length,m=Array(d),v=0;v<d;v++)m[v]=arguments[v];if(f&&i.leading)return i.accumulate?Promise.resolve(t.call(this,[m])).then(function(t){return t[0]}):Promise.resolve(t.call.apply(t,[this].concat(m)));if(u?clearTimeout(h):u=r(),l.push(m),h=setTimeout(e.bind(this),c),i.accumulate){var y=function(){var t=l.length-1;return{v:u.promise.then(function(e){return e[t]})}}();if("object"===(void 0===y?"undefined":s(y)))return y.v}return u.promise}}},"./node_modules/punycode/punycode.js":function(t,e,n){(function(t,o){var r;!function(o){function s(t){throw new RangeError(I[t])}function i(t,e){for(var n=t.length,o=[];n--;)o[n]=e(t[n]);return o}function a(t,e){var n=t.split("@"),o="";return n.length>1&&(o=n[0]+"@",t=n[1]),t=t.replace(A,"."),o+i(t.split("."),e).join(".")}function u(t){for(var e,n,o=[],r=0,s=t.length;r<s;)e=t.charCodeAt(r++),e>=55296&&e<=56319&&r<s?(n=t.charCodeAt(r++),56320==(64512&n)?o.push(((1023&e)<<10)+(1023&n)+65536):(o.push(e),r--)):o.push(e);return o}function h(t){return i(t,function(t){var e="";return t>65535&&(t-=65536,e+=S(t>>>10&1023|55296),t=56320|1023&t),e+=S(t)}).join("")}function l(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:g}function c(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function p(t,e,n){var o=0;for(t=n?k(t/x):t>>1,t+=k(t/e);t>R*O>>1;o+=g)t=k(t/R);return k(o+(R+1)*t/(t+w))}function f(t){var e,n,o,r,i,a,u,c,f,d,m=[],v=t.length,y=0,w=C,x=_;for(n=t.lastIndexOf(P),n<0&&(n=0),o=0;o<n;++o)t.charCodeAt(o)>=128&&s("not-basic"),m.push(t.charCodeAt(o));for(r=n>0?n+1:0;r<v;){for(i=y,a=1,u=g;r>=v&&s("invalid-input"),c=l(t.charCodeAt(r++)),(c>=g||c>k((b-y)/a))&&s("overflow"),y+=c*a,f=u<=x?j:u>=x+O?O:u-x,!(c<f);u+=g)d=g-f,a>k(b/d)&&s("overflow"),a*=d;e=m.length+1,x=p(y-i,e,0==i),k(y/e)>b-w&&s("overflow"),w+=k(y/e),y%=e,m.splice(y++,0,w)}return h(m)}function d(t){var e,n,o,r,i,a,h,l,f,d,m,v,y,w,x,q=[];for(t=u(t),v=t.length,e=C,n=0,i=_,a=0;a<v;++a)(m=t[a])<128&&q.push(S(m));for(o=r=q.length,r&&q.push(P);o<v;){for(h=b,a=0;a<v;++a)(m=t[a])>=e&&m<h&&(h=m);for(y=o+1,h-e>k((b-n)/y)&&s("overflow"),n+=(h-e)*y,e=h,a=0;a<v;++a)if(m=t[a],m<e&&++n>b&&s("overflow"),m==e){for(l=n,f=g;d=f<=i?j:f>=i+O?O:f-i,!(l<d);f+=g)x=l-d,w=g-d,q.push(S(c(d+x%w,0))),l=k(x/w);q.push(S(c(l,0))),i=p(n,y,o==r),n=0,++o}++n,++e}return q.join("")}function m(t){return a(t,function(t){return q.test(t)?f(t.slice(4).toLowerCase()):t})}function v(t){return a(t,function(t){return T.test(t)?"xn--"+d(t):t})}var y,b=("object"==typeof e&&e&&e.nodeType,"object"==typeof t&&t&&t.nodeType,2147483647),g=36,j=1,O=26,w=38,x=700,_=72,C=128,P="-",q=/^xn--/,T=/[^\x20-\x7E]/,A=/[\x2E\u3002\uFF0E\uFF61]/g,I={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},R=g-j,k=Math.floor,S=String.fromCharCode;y={version:"1.4.1",ucs2:{decode:u,encode:h},decode:f,encode:d,toASCII:v,toUnicode:m},void 0!==(r=function(){return y}.call(e,n,e,t))&&(t.exports=r)}()}).call(e,n("./node_modules/webpack/buildin/module.js")(t),n("./node_modules/webpack/buildin/global.js"))},"./node_modules/querystring-es3/decode.js":function(t,e,n){"use strict";function o(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,e,n,s){e=e||"&",n=n||"=";var i={};if("string"!=typeof t||0===t.length)return i;var a=/\+/g;t=t.split(e);var u=1e3;s&&"number"==typeof s.maxKeys&&(u=s.maxKeys);var h=t.length;u>0&&h>u&&(h=u);for(var l=0;l<h;++l){var c,p,f,d,m=t[l].replace(a,"%20"),v=m.indexOf(n);v>=0?(c=m.substr(0,v),p=m.substr(v+1)):(c=m,p=""),f=decodeURIComponent(c),d=decodeURIComponent(p),o(i,f)?r(i[f])?i[f].push(d):i[f]=[i[f],d]:i[f]=d}return i};var r=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},"./node_modules/querystring-es3/encode.js":function(t,e,n){"use strict";function o(t,e){if(t.map)return t.map(e);for(var n=[],o=0;o<t.length;o++)n.push(e(t[o],o));return n}var r=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,e,n,a){return e=e||"&",n=n||"=",null===t&&(t=void 0),"object"==typeof t?o(i(t),function(i){var a=encodeURIComponent(r(i))+n;return s(t[i])?o(t[i],function(t){return a+encodeURIComponent(r(t))}).join(e):a+encodeURIComponent(r(t[i]))}).join(e):a?encodeURIComponent(r(a))+n+encodeURIComponent(r(t)):""};var s=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},i=Object.keys||function(t){var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.push(n);return e}},"./node_modules/querystring-es3/index.js":function(t,e,n){"use strict";e.decode=e.parse=n("./node_modules/querystring-es3/decode.js"),e.encode=e.stringify=n("./node_modules/querystring-es3/encode.js")},"./node_modules/url/url.js":function(t,e,n){"use strict";function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function r(t,e,n){if(t&&h.isObject(t)&&t instanceof o)return t;var r=new o;return r.parse(t,e,n),r}function s(t){return h.isString(t)&&(t=r(t)),t instanceof o?t.format():o.prototype.format.call(t)}function i(t,e){return r(t,!1,!0).resolve(e)}function a(t,e){return t?r(t,!1,!0).resolveObject(e):e}var u=n("./node_modules/punycode/punycode.js"),h=n("./node_modules/url/util.js");e.parse=r,e.resolve=i,e.resolveObject=a,e.format=s,e.Url=o;var l=/^([a-z0-9.+-]+:)/i,c=/:[0-9]*$/,p=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,f=["<",">",'"',"`"," ","\r","\n","\t"],d=["{","}","|","\\","^","`"].concat(f),m=["'"].concat(d),v=["%","/","?",";","#"].concat(m),y=["/","?","#"],b=/^[+a-z0-9A-Z_-]{0,63}$/,g=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,j={javascript:!0,"javascript:":!0},O={javascript:!0,"javascript:":!0},w={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},x=n("./node_modules/querystring-es3/index.js");o.prototype.parse=function(t,e,n){if(!h.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var o=t.indexOf("?"),r=-1!==o&&o<t.indexOf("#")?"?":"#",s=t.split(r),i=/\\/g;s[0]=s[0].replace(i,"/"),t=s.join(r);var a=t;if(a=a.trim(),!n&&1===t.split("#").length){var c=p.exec(a);if(c)return this.path=a,this.href=a,this.pathname=c[1],c[2]?(this.search=c[2],this.query=e?x.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var f=l.exec(a);if(f){f=f[0];var d=f.toLowerCase();this.protocol=d,a=a.substr(f.length)}if(n||f||a.match(/^\/\/[^@\/]+@[^@\/]+/)){var _="//"===a.substr(0,2);!_||f&&O[f]||(a=a.substr(2),this.slashes=!0)}if(!O[f]&&(_||f&&!w[f])){for(var C=-1,P=0;P<y.length;P++){var q=a.indexOf(y[P]);-1!==q&&(-1===C||q<C)&&(C=q)}var T,A;A=-1===C?a.lastIndexOf("@"):a.lastIndexOf("@",C),-1!==A&&(T=a.slice(0,A),a=a.slice(A+1),this.auth=decodeURIComponent(T)),C=-1;for(var P=0;P<v.length;P++){var q=a.indexOf(v[P]);-1!==q&&(-1===C||q<C)&&(C=q)}-1===C&&(C=a.length),this.host=a.slice(0,C),a=a.slice(C),this.parseHost(),this.hostname=this.hostname||"";var I="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!I)for(var R=this.hostname.split(/\./),P=0,k=R.length;P<k;P++){var S=R[P];if(S&&!S.match(b)){for(var U="",F=0,E=S.length;F<E;F++)S.charCodeAt(F)>127?U+="x":U+=S[F];if(!U.match(b)){var M=R.slice(0,P),L=R.slice(P+1),N=S.match(g);N&&(M.push(N[1]),L.unshift(N[2])),L.length&&(a="/"+L.join(".")+a),this.hostname=M.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),I||(this.hostname=u.toASCII(this.hostname));var K=this.port?":"+this.port:"",z=this.hostname||"";this.host=z+K,this.href+=this.host,I&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==a[0]&&(a="/"+a))}if(!j[d])for(var P=0,k=m.length;P<k;P++){var $=m[P];if(-1!==a.indexOf($)){var D=encodeURIComponent($);D===$&&(D=escape($)),a=a.split($).join(D)}}var B=a.indexOf("#");-1!==B&&(this.hash=a.substr(B),a=a.slice(0,B));var H=a.indexOf("?");if(-1!==H?(this.search=a.substr(H),this.query=a.substr(H+1),e&&(this.query=x.parse(this.query)),a=a.slice(0,H)):e&&(this.search="",this.query={}),a&&(this.pathname=a),w[d]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var K=this.pathname||"",Z=this.search||"";this.path=K+Z}return this.href=this.format(),this},o.prototype.format=function(){var t=this.auth||"";t&&(t=encodeURIComponent(t),t=t.replace(/%3A/i,":"),t+="@");var e=this.protocol||"",n=this.pathname||"",o=this.hash||"",r=!1,s="";this.host?r=t+this.host:this.hostname&&(r=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(r+=":"+this.port)),this.query&&h.isObject(this.query)&&Object.keys(this.query).length&&(s=x.stringify(this.query));var i=this.search||s&&"?"+s||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||w[e])&&!1!==r?(r="//"+(r||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):r||(r=""),o&&"#"!==o.charAt(0)&&(o="#"+o),i&&"?"!==i.charAt(0)&&(i="?"+i),n=n.replace(/[?#]/g,function(t){return encodeURIComponent(t)}),i=i.replace("#","%23"),e+r+n+i+o},o.prototype.resolve=function(t){return this.resolveObject(r(t,!1,!0)).format()},o.prototype.resolveObject=function(t){if(h.isString(t)){var e=new o;e.parse(t,!1,!0),t=e}for(var n=new o,r=Object.keys(this),s=0;s<r.length;s++){var i=r[s];n[i]=this[i]}if(n.hash=t.hash,""===t.href)return n.href=n.format(),n;if(t.slashes&&!t.protocol){for(var a=Object.keys(t),u=0;u<a.length;u++){var l=a[u];"protocol"!==l&&(n[l]=t[l])}return w[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(t.protocol&&t.protocol!==n.protocol){if(!w[t.protocol]){for(var c=Object.keys(t),p=0;p<c.length;p++){var f=c[p];n[f]=t[f]}return n.href=n.format(),n}if(n.protocol=t.protocol,t.host||O[t.protocol])n.pathname=t.pathname;else{for(var d=(t.pathname||"").split("/");d.length&&!(t.host=d.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==d[0]&&d.unshift(""),d.length<2&&d.unshift(""),n.pathname=d.join("/")}if(n.search=t.search,n.query=t.query,n.host=t.host||"",n.auth=t.auth,n.hostname=t.hostname||t.host,n.port=t.port,n.pathname||n.search){var m=n.pathname||"",v=n.search||"";n.path=m+v}return n.slashes=n.slashes||t.slashes,n.href=n.format(),n}var y=n.pathname&&"/"===n.pathname.charAt(0),b=t.host||t.pathname&&"/"===t.pathname.charAt(0),g=b||y||n.host&&t.pathname,j=g,x=n.pathname&&n.pathname.split("/")||[],d=t.pathname&&t.pathname.split("/")||[],_=n.protocol&&!w[n.protocol];if(_&&(n.hostname="",n.port=null,n.host&&(""===x[0]?x[0]=n.host:x.unshift(n.host)),n.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===d[0]?d[0]=t.host:d.unshift(t.host)),t.host=null),g=g&&(""===d[0]||""===x[0])),b)n.host=t.host||""===t.host?t.host:n.host,n.hostname=t.hostname||""===t.hostname?t.hostname:n.hostname,n.search=t.search,n.query=t.query,x=d;else if(d.length)x||(x=[]),x.pop(),x=x.concat(d),n.search=t.search,n.query=t.query;else if(!h.isNullOrUndefined(t.search)){if(_){n.hostname=n.host=x.shift();var C=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");C&&(n.auth=C.shift(),n.host=n.hostname=C.shift())}return n.search=t.search,n.query=t.query,h.isNull(n.pathname)&&h.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!x.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var P=x.slice(-1)[0],q=(n.host||t.host||x.length>1)&&("."===P||".."===P)||""===P,T=0,A=x.length;A>=0;A--)P=x[A],"."===P?x.splice(A,1):".."===P?(x.splice(A,1),T++):T&&(x.splice(A,1),T--);if(!g&&!j)for(;T--;T)x.unshift("..");!g||""===x[0]||x[0]&&"/"===x[0].charAt(0)||x.unshift(""),q&&"/"!==x.join("/").substr(-1)&&x.push("");var I=""===x[0]||x[0]&&"/"===x[0].charAt(0);if(_){n.hostname=n.host=I?"":x.length?x.shift():"";var C=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");C&&(n.auth=C.shift(),n.host=n.hostname=C.shift())}return g=g||n.host&&x.length,g&&!I&&x.unshift(""),x.length?n.pathname=x.join("/"):(n.pathname=null,n.path=null),h.isNull(n.pathname)&&h.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=t.auth||n.auth,n.slashes=n.slashes||t.slashes,n.href=n.format(),n},o.prototype.parseHost=function(){var t=this.host,e=c.exec(t);e&&(e=e[0],":"!==e&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},"./node_modules/url/util.js":function(t,e,n){"use strict";t.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},"./node_modules/webpack/buildin/global.js":function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},"./node_modules/webpack/buildin/module.js":function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},0:function(t,e){t.exports=Injector},1:function(t,e){t.exports=React},2:function(t,e){t.exports=IsomorphicFetch},3:function(t,e){t.exports=ReactDom},4:function(t,e){t.exports=ReactSelect}});
|
||||
!function(t){function e(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:o})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s="./client/src/bundles/bundle.js")}({"./client/src/boot/index.js":function(t,e,n){"use strict";var o=n("./client/src/boot/registerComponents.js"),r=function(t){return t&&t.__esModule?t:{default:t}}(o);window.document.addEventListener("DOMContentLoaded",function(){(0,r.default)()})},"./client/src/boot/registerComponents.js":function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),s=o(r),i=n("./client/src/components/TagField.js"),a=o(i);e.default=function(){s.default.component.registerMany({TagField:a.default})}},"./client/src/bundles/bundle.js":function(t,e,n){"use strict";n("./client/src/legacy/entwine/TagField.js"),n("./client/src/boot/index.js")},"./client/src/components/TagField.js":function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){var n={};for(var o in t)e.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}function s(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function u(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var h=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},l=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),c=n(1),f=o(c),p=n(4),d=o(p),m=n(2),y=o(m),v=n("./node_modules/url/url.js"),b=o(v),g=n("./node_modules/debounce-promise/dist/index.js"),j=o(g),O=n("./node_modules/prop-types/index.js"),x=o(O),w=function(t){function e(t){i(this,e);var n=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.state={value:t.value},n.onChange=n.onChange.bind(n),n.getOptions=n.getOptions.bind(n),n.fetchOptions=(0,j.default)(n.fetchOptions,500),n}return u(e,t),l(e,[{key:"onChange",value:function(t){this.setState({value:t}),"function"==typeof this.props.onChange&&this.props.onChange(t)}},{key:"getOptions",value:function(t){var e=this.props,n=e.lazyLoad,o=e.options;return n?t?this.fetchOptions(t):Promise.resolve({options:[]}):Promise.resolve({options:o})}},{key:"fetchOptions",value:function(t){var e=this.props,n=e.optionUrl,o=e.labelKey,r=e.valueKey,i=b.default.parse(n,!0);return i.query.term=t,(0,y.default)(b.default.format(i),{credentials:"same-origin"}).then(function(t){return t.json()}).then(function(t){return{options:t.items.map(function(t){var e;return e={},s(e,o,t.id),s(e,r,t.text),e})}})}},{key:"render",value:function(){var t=this.props,e=t.lazyLoad,n=t.options,o=t.creatable,s=r(t,["lazyLoad","options","creatable"]),i=e?{loadOptions:this.getOptions}:{options:n},a=d.default;return e&&o?a=d.default.AsyncCreatable:e?a=d.default.Async:o&&(a=d.default.Creatable),s.value=this.state.value,f.default.createElement(a,h({},s,{onChange:this.onChange,inputProps:{className:"no-change-track"}},i))}}]),e}(c.Component);w.propTypes={name:x.default.string.isRequired,labelKey:x.default.string.isRequired,valueKey:x.default.string.isRequired,lazyLoad:x.default.bool.isRequired,creatable:x.default.bool.isRequired,multi:x.default.bool.isRequired,disabled:x.default.bool,options:x.default.arrayOf(x.default.object),optionUrl:x.default.string,value:x.default.any,onChange:x.default.func,onBlur:x.default.func},w.defaultProps={labelKey:"Title",valueKey:"Value",disabled:!1},e.default=w},"./client/src/legacy/entwine/TagField.js":function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}var r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},s=n(1),i=o(s),a=n(3),u=o(a),h=n(0);window.jQuery.entwine("ss",function(t){t(".js-injector-boot .ss-tag-field").entwine({onmatch:function(){var t=this,e=this.closest(".cms-content").attr("id"),n=e?{context:e}:{},o=(0,h.loadComponent)("TagField",n),s=r({},this.data("schema"),{onBlur:function(){t.parents(".cms-edit-form:first").trigger("change")}});u.default.render(i.default.createElement(o,s),this[0])},onunmatch:function(){u.default.unmountComponentAtNode(this[0])}})})},"./node_modules/debounce-promise/dist/index.js":function(t,e,n){"use strict";function o(t){return"function"==typeof t?t():t}function r(){var t={};return t.promise=new Promise(function(e,n){t.resolve=e,t.reject=n}),t}var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=function(t){function e(){var e=u;clearTimeout(h),Promise.resolve(i.accumulate?t.call(this,l):t.apply(this,l[l.length-1])).then(e.resolve,e.reject),l=[],u=null}var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=void 0,u=void 0,h=void 0,l=[];return function(){var c=o(n),f=(new Date).getTime(),p=!a||f-a>c;a=f;for(var d=arguments.length,m=Array(d),y=0;y<d;y++)m[y]=arguments[y];if(p&&i.leading)return i.accumulate?Promise.resolve(t.call(this,[m])).then(function(t){return t[0]}):Promise.resolve(t.call.apply(t,[this].concat(m)));if(u?clearTimeout(h):u=r(),l.push(m),h=setTimeout(e.bind(this),c),i.accumulate){var v=function(){var t=l.length-1;return{v:u.promise.then(function(e){return e[t]})}}();if("object"===(void 0===v?"undefined":s(v)))return v.v}return u.promise}}},"./node_modules/prop-types/factoryWithThrowingShims.js":function(t,e,n){"use strict";function o(){}function r(){}var s=n("./node_modules/prop-types/lib/ReactPropTypesSecret.js");r.resetWarningCache=o,t.exports=function(){function t(t,e,n,o,r,i){if(i!==s){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:r,resetWarningCache:o};return n.PropTypes=n,n}},"./node_modules/prop-types/index.js":function(t,e,n){t.exports=n("./node_modules/prop-types/factoryWithThrowingShims.js")()},"./node_modules/prop-types/lib/ReactPropTypesSecret.js":function(t,e,n){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},"./node_modules/punycode/punycode.js":function(t,e,n){(function(t,o){var r;!function(o){function s(t){throw new RangeError(R[t])}function i(t,e){for(var n=t.length,o=[];n--;)o[n]=e(t[n]);return o}function a(t,e){var n=t.split("@"),o="";return n.length>1&&(o=n[0]+"@",t=n[1]),t=t.replace(A,"."),o+i(t.split("."),e).join(".")}function u(t){for(var e,n,o=[],r=0,s=t.length;r<s;)e=t.charCodeAt(r++),e>=55296&&e<=56319&&r<s?(n=t.charCodeAt(r++),56320==(64512&n)?o.push(((1023&e)<<10)+(1023&n)+65536):(o.push(e),r--)):o.push(e);return o}function h(t){return i(t,function(t){var e="";return t>65535&&(t-=65536,e+=k(t>>>10&1023|55296),t=56320|1023&t),e+=k(t)}).join("")}function l(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:g}function c(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function f(t,e,n){var o=0;for(t=n?S(t/w):t>>1,t+=S(t/e);t>I*O>>1;o+=g)t=S(t/I);return S(o+(I+1)*t/(t+x))}function p(t){var e,n,o,r,i,a,u,c,p,d,m=[],y=t.length,v=0,x=C,w=_;for(n=t.lastIndexOf(P),n<0&&(n=0),o=0;o<n;++o)t.charCodeAt(o)>=128&&s("not-basic"),m.push(t.charCodeAt(o));for(r=n>0?n+1:0;r<y;){for(i=v,a=1,u=g;r>=y&&s("invalid-input"),c=l(t.charCodeAt(r++)),(c>=g||c>S((b-v)/a))&&s("overflow"),v+=c*a,p=u<=w?j:u>=w+O?O:u-w,!(c<p);u+=g)d=g-p,a>S(b/d)&&s("overflow"),a*=d;e=m.length+1,w=f(v-i,e,0==i),S(v/e)>b-x&&s("overflow"),x+=S(v/e),v%=e,m.splice(v++,0,x)}return h(m)}function d(t){var e,n,o,r,i,a,h,l,p,d,m,y,v,x,w,q=[];for(t=u(t),y=t.length,e=C,n=0,i=_,a=0;a<y;++a)(m=t[a])<128&&q.push(k(m));for(o=r=q.length,r&&q.push(P);o<y;){for(h=b,a=0;a<y;++a)(m=t[a])>=e&&m<h&&(h=m);for(v=o+1,h-e>S((b-n)/v)&&s("overflow"),n+=(h-e)*v,e=h,a=0;a<y;++a)if(m=t[a],m<e&&++n>b&&s("overflow"),m==e){for(l=n,p=g;d=p<=i?j:p>=i+O?O:p-i,!(l<d);p+=g)w=l-d,x=g-d,q.push(k(c(d+w%x,0))),l=S(w/x);q.push(k(c(l,0))),i=f(n,v,o==r),n=0,++o}++n,++e}return q.join("")}function m(t){return a(t,function(t){return q.test(t)?p(t.slice(4).toLowerCase()):t})}function y(t){return a(t,function(t){return T.test(t)?"xn--"+d(t):t})}var v,b=("object"==typeof e&&e&&e.nodeType,"object"==typeof t&&t&&t.nodeType,2147483647),g=36,j=1,O=26,x=38,w=700,_=72,C=128,P="-",q=/^xn--/,T=/[^\x20-\x7E]/,A=/[\x2E\u3002\uFF0E\uFF61]/g,R={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},I=g-j,S=Math.floor,k=String.fromCharCode;v={version:"1.4.1",ucs2:{decode:u,encode:h},decode:p,encode:d,toASCII:y,toUnicode:m},void 0!==(r=function(){return v}.call(e,n,e,t))&&(t.exports=r)}()}).call(e,n("./node_modules/webpack/buildin/module.js")(t),n("./node_modules/webpack/buildin/global.js"))},"./node_modules/querystring-es3/decode.js":function(t,e,n){"use strict";function o(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,e,n,s){e=e||"&",n=n||"=";var i={};if("string"!=typeof t||0===t.length)return i;var a=/\+/g;t=t.split(e);var u=1e3;s&&"number"==typeof s.maxKeys&&(u=s.maxKeys);var h=t.length;u>0&&h>u&&(h=u);for(var l=0;l<h;++l){var c,f,p,d,m=t[l].replace(a,"%20"),y=m.indexOf(n);y>=0?(c=m.substr(0,y),f=m.substr(y+1)):(c=m,f=""),p=decodeURIComponent(c),d=decodeURIComponent(f),o(i,p)?r(i[p])?i[p].push(d):i[p]=[i[p],d]:i[p]=d}return i};var r=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},"./node_modules/querystring-es3/encode.js":function(t,e,n){"use strict";function o(t,e){if(t.map)return t.map(e);for(var n=[],o=0;o<t.length;o++)n.push(e(t[o],o));return n}var r=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,e,n,a){return e=e||"&",n=n||"=",null===t&&(t=void 0),"object"==typeof t?o(i(t),function(i){var a=encodeURIComponent(r(i))+n;return s(t[i])?o(t[i],function(t){return a+encodeURIComponent(r(t))}).join(e):a+encodeURIComponent(r(t[i]))}).join(e):a?encodeURIComponent(r(a))+n+encodeURIComponent(r(t)):""};var s=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},i=Object.keys||function(t){var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.push(n);return e}},"./node_modules/querystring-es3/index.js":function(t,e,n){"use strict";e.decode=e.parse=n("./node_modules/querystring-es3/decode.js"),e.encode=e.stringify=n("./node_modules/querystring-es3/encode.js")},"./node_modules/url/url.js":function(t,e,n){"use strict";function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function r(t,e,n){if(t&&h.isObject(t)&&t instanceof o)return t;var r=new o;return r.parse(t,e,n),r}function s(t){return h.isString(t)&&(t=r(t)),t instanceof o?t.format():o.prototype.format.call(t)}function i(t,e){return r(t,!1,!0).resolve(e)}function a(t,e){return t?r(t,!1,!0).resolveObject(e):e}var u=n("./node_modules/punycode/punycode.js"),h=n("./node_modules/url/util.js");e.parse=r,e.resolve=i,e.resolveObject=a,e.format=s,e.Url=o;var l=/^([a-z0-9.+-]+:)/i,c=/:[0-9]*$/,f=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,p=["<",">",'"',"`"," ","\r","\n","\t"],d=["{","}","|","\\","^","`"].concat(p),m=["'"].concat(d),y=["%","/","?",";","#"].concat(m),v=["/","?","#"],b=/^[+a-z0-9A-Z_-]{0,63}$/,g=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,j={javascript:!0,"javascript:":!0},O={javascript:!0,"javascript:":!0},x={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},w=n("./node_modules/querystring-es3/index.js");o.prototype.parse=function(t,e,n){if(!h.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var o=t.indexOf("?"),r=-1!==o&&o<t.indexOf("#")?"?":"#",s=t.split(r),i=/\\/g;s[0]=s[0].replace(i,"/"),t=s.join(r);var a=t;if(a=a.trim(),!n&&1===t.split("#").length){var c=f.exec(a);if(c)return this.path=a,this.href=a,this.pathname=c[1],c[2]?(this.search=c[2],this.query=e?w.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var p=l.exec(a);if(p){p=p[0];var d=p.toLowerCase();this.protocol=d,a=a.substr(p.length)}if(n||p||a.match(/^\/\/[^@\/]+@[^@\/]+/)){var _="//"===a.substr(0,2);!_||p&&O[p]||(a=a.substr(2),this.slashes=!0)}if(!O[p]&&(_||p&&!x[p])){for(var C=-1,P=0;P<v.length;P++){var q=a.indexOf(v[P]);-1!==q&&(-1===C||q<C)&&(C=q)}var T,A;A=-1===C?a.lastIndexOf("@"):a.lastIndexOf("@",C),-1!==A&&(T=a.slice(0,A),a=a.slice(A+1),this.auth=decodeURIComponent(T)),C=-1;for(var P=0;P<y.length;P++){var q=a.indexOf(y[P]);-1!==q&&(-1===C||q<C)&&(C=q)}-1===C&&(C=a.length),this.host=a.slice(0,C),a=a.slice(C),this.parseHost(),this.hostname=this.hostname||"";var R="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!R)for(var I=this.hostname.split(/\./),P=0,S=I.length;P<S;P++){var k=I[P];if(k&&!k.match(b)){for(var U="",E=0,F=k.length;E<F;E++)k.charCodeAt(E)>127?U+="x":U+=k[E];if(!U.match(b)){var L=I.slice(0,P),M=I.slice(P+1),N=k.match(g);N&&(L.push(N[1]),M.unshift(N[2])),M.length&&(a="/"+M.join(".")+a),this.hostname=L.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),R||(this.hostname=u.toASCII(this.hostname));var K=this.port?":"+this.port:"",z=this.hostname||"";this.host=z+K,this.href+=this.host,R&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==a[0]&&(a="/"+a))}if(!j[d])for(var P=0,S=m.length;P<S;P++){var D=m[P];if(-1!==a.indexOf(D)){var W=encodeURIComponent(D);W===D&&(W=escape(D)),a=a.split(D).join(W)}}var $=a.indexOf("#");-1!==$&&(this.hash=a.substr($),a=a.slice(0,$));var B=a.indexOf("?");if(-1!==B?(this.search=a.substr(B),this.query=a.substr(B+1),e&&(this.query=w.parse(this.query)),a=a.slice(0,B)):e&&(this.search="",this.query={}),a&&(this.pathname=a),x[d]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var K=this.pathname||"",H=this.search||"";this.path=K+H}return this.href=this.format(),this},o.prototype.format=function(){var t=this.auth||"";t&&(t=encodeURIComponent(t),t=t.replace(/%3A/i,":"),t+="@");var e=this.protocol||"",n=this.pathname||"",o=this.hash||"",r=!1,s="";this.host?r=t+this.host:this.hostname&&(r=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(r+=":"+this.port)),this.query&&h.isObject(this.query)&&Object.keys(this.query).length&&(s=w.stringify(this.query));var i=this.search||s&&"?"+s||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||x[e])&&!1!==r?(r="//"+(r||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):r||(r=""),o&&"#"!==o.charAt(0)&&(o="#"+o),i&&"?"!==i.charAt(0)&&(i="?"+i),n=n.replace(/[?#]/g,function(t){return encodeURIComponent(t)}),i=i.replace("#","%23"),e+r+n+i+o},o.prototype.resolve=function(t){return this.resolveObject(r(t,!1,!0)).format()},o.prototype.resolveObject=function(t){if(h.isString(t)){var e=new o;e.parse(t,!1,!0),t=e}for(var n=new o,r=Object.keys(this),s=0;s<r.length;s++){var i=r[s];n[i]=this[i]}if(n.hash=t.hash,""===t.href)return n.href=n.format(),n;if(t.slashes&&!t.protocol){for(var a=Object.keys(t),u=0;u<a.length;u++){var l=a[u];"protocol"!==l&&(n[l]=t[l])}return x[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(t.protocol&&t.protocol!==n.protocol){if(!x[t.protocol]){for(var c=Object.keys(t),f=0;f<c.length;f++){var p=c[f];n[p]=t[p]}return n.href=n.format(),n}if(n.protocol=t.protocol,t.host||O[t.protocol])n.pathname=t.pathname;else{for(var d=(t.pathname||"").split("/");d.length&&!(t.host=d.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==d[0]&&d.unshift(""),d.length<2&&d.unshift(""),n.pathname=d.join("/")}if(n.search=t.search,n.query=t.query,n.host=t.host||"",n.auth=t.auth,n.hostname=t.hostname||t.host,n.port=t.port,n.pathname||n.search){var m=n.pathname||"",y=n.search||"";n.path=m+y}return n.slashes=n.slashes||t.slashes,n.href=n.format(),n}var v=n.pathname&&"/"===n.pathname.charAt(0),b=t.host||t.pathname&&"/"===t.pathname.charAt(0),g=b||v||n.host&&t.pathname,j=g,w=n.pathname&&n.pathname.split("/")||[],d=t.pathname&&t.pathname.split("/")||[],_=n.protocol&&!x[n.protocol];if(_&&(n.hostname="",n.port=null,n.host&&(""===w[0]?w[0]=n.host:w.unshift(n.host)),n.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===d[0]?d[0]=t.host:d.unshift(t.host)),t.host=null),g=g&&(""===d[0]||""===w[0])),b)n.host=t.host||""===t.host?t.host:n.host,n.hostname=t.hostname||""===t.hostname?t.hostname:n.hostname,n.search=t.search,n.query=t.query,w=d;else if(d.length)w||(w=[]),w.pop(),w=w.concat(d),n.search=t.search,n.query=t.query;else if(!h.isNullOrUndefined(t.search)){if(_){n.hostname=n.host=w.shift();var C=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");C&&(n.auth=C.shift(),n.host=n.hostname=C.shift())}return n.search=t.search,n.query=t.query,h.isNull(n.pathname)&&h.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!w.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var P=w.slice(-1)[0],q=(n.host||t.host||w.length>1)&&("."===P||".."===P)||""===P,T=0,A=w.length;A>=0;A--)P=w[A],"."===P?w.splice(A,1):".."===P?(w.splice(A,1),T++):T&&(w.splice(A,1),T--);if(!g&&!j)for(;T--;T)w.unshift("..");!g||""===w[0]||w[0]&&"/"===w[0].charAt(0)||w.unshift(""),q&&"/"!==w.join("/").substr(-1)&&w.push("");var R=""===w[0]||w[0]&&"/"===w[0].charAt(0);if(_){n.hostname=n.host=R?"":w.length?w.shift():"";var C=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");C&&(n.auth=C.shift(),n.host=n.hostname=C.shift())}return g=g||n.host&&w.length,g&&!R&&w.unshift(""),w.length?n.pathname=w.join("/"):(n.pathname=null,n.path=null),h.isNull(n.pathname)&&h.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=t.auth||n.auth,n.slashes=n.slashes||t.slashes,n.href=n.format(),n},o.prototype.parseHost=function(){var t=this.host,e=c.exec(t);e&&(e=e[0],":"!==e&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},"./node_modules/url/util.js":function(t,e,n){"use strict";t.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},"./node_modules/webpack/buildin/global.js":function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},"./node_modules/webpack/buildin/module.js":function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},0:function(t,e){t.exports=Injector},1:function(t,e){t.exports=React},2:function(t,e){t.exports=IsomorphicFetch},3:function(t,e){t.exports=ReactDom},4:function(t,e){t.exports=ReactSelect}});
|
Loading…
Reference in New Issue
Block a user