@imposium-hub/components 1.43.0 → 1.43.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -277,5 +277,5 @@ e.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月
277
277
  *
278
278
  * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
279
279
  * Released under the MIT license
280
- */!function(o){if(void 0===(a="function"==typeof(r=o)?r.call(t,n,t,e):r)||(e.exports=a),!0,e.exports=o(),!!0){var i=window.Cookies,s=window.Cookies=o();s.noConflict=function(){return window.Cookies=i,s}}}((function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(r){function a(){}function o(t,n,o){if("undefined"!=typeof document){"number"==typeof(o=e({path:"/"},a.defaults,o)).expires&&(o.expires=new Date(1*new Date+864e5*o.expires)),o.expires=o.expires?o.expires.toUTCString():"";try{var i=JSON.stringify(n);/^[\{\[]/.test(i)&&(n=i)}catch(e){}n=r.write?r.write(n,t):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var s="";for(var u in o)o[u]&&(s+="; "+u,!0!==o[u]&&(s+="="+o[u].split(";")[0]));return document.cookie=t+"="+n+s}}function i(e,n){if("undefined"!=typeof document){for(var a={},o=document.cookie?document.cookie.split("; "):[],i=0;i<o.length;i++){var s=o[i].split("="),u=s.slice(1).join("=");n||'"'!==u.charAt(0)||(u=u.slice(1,-1));try{var l=t(s[0]);if(u=(r.read||r)(u,l)||t(u),n)try{u=JSON.parse(u)}catch(e){}if(a[l]=u,e===l)break}catch(e){}}return e?a[e]:a}}return a.set=o,a.get=function(e){return i(e,!1)},a.getJSON=function(e){return i(e,!0)},a.remove=function(t,n){o(t,"",e(n,{expires:-1}))},a.defaults={},a.withConverter=n,a}((function(){}))}))},function(e,t,n){"use strict";n.r(t),function(e,r){n.d(t,"Authentication",(function(){return Rt})),n.d(t,"Management",(function(){return Ft})),n.d(t,"WebAuth",(function(){return Ht})),n.d(t,"version",(function(){return se}));var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{};function o(e,t){return e(t={exports:{}},t.exports),t.exports}var i=o((function(e){var t,n;t=a,n=function(){function e(e){var t=[];if(0===e.length)return"";if("string"!=typeof e[0])throw new TypeError("Url must be a string. Received "+e[0]);if(e[0].match(/^[^/:]+:\/*$/)&&e.length>1){var n=e.shift();e[0]=n+e[0]}e[0].match(/^file:\/\/\//)?e[0]=e[0].replace(/^([^/:]+):\/*/,"$1:///"):e[0]=e[0].replace(/^([^/:]+):\/*/,"$1://");for(var r=0;r<e.length;r++){var a=e[r];if("string"!=typeof a)throw new TypeError("Url must be a string. Received "+a);""!==a&&(r>0&&(a=a.replace(/^[\/]+/,"")),a=r<e.length-1?a.replace(/[\/]+$/,""):a.replace(/[\/]+$/,"/"),t.push(a))}var o=t.join("/"),i=(o=o.replace(/\/(\?|&|#[^!])/g,"$1")).split("?");return i.shift()+(i.length>0?"?":"")+i.join("&")}return function(){return e("object"==typeof arguments[0]?arguments[0]:[].slice.call(arguments))}},e.exports?e.exports=n():t.urljoin=n()})),s=Object.prototype.hasOwnProperty,u=Array.isArray,l=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),c=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r<e.length;++r)void 0!==e[r]&&(n[r]=e[r]);return n},d={arrayToObject:c,assign:function(e,t){return Object.keys(t).reduce((function(e,n){return e[n]=t[n],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r<t.length;++r)for(var a=t[r],o=a.obj[a.prop],i=Object.keys(o),s=0;s<i.length;++s){var l=i[s],c=o[l];"object"==typeof c&&null!==c&&-1===n.indexOf(c)&&(t.push({obj:o,prop:l}),n.push(c))}return function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(u(n)){for(var r=[],a=0;a<n.length;++a)void 0!==n[a]&&r.push(n[a]);t.obj[t.prop]=r}}}(t),e},decode:function(e,t,n){var r=e.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(e){return r}},encode:function(e,t,n){if(0===e.length)return e;var r=e;if("symbol"==typeof e?r=Symbol.prototype.toString.call(e):"string"!=typeof e&&(r=String(e)),"iso-8859-1"===n)return escape(r).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var a="",o=0;o<r.length;++o){var i=r.charCodeAt(o);45===i||46===i||95===i||126===i||i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122?a+=r.charAt(o):i<128?a+=l[i]:i<2048?a+=l[192|i>>6]+l[128|63&i]:i<55296||i>=57344?a+=l[224|i>>12]+l[128|i>>6&63]+l[128|63&i]:(o+=1,i=65536+((1023&i)<<10|1023&r.charCodeAt(o)),a+=l[240|i>>18]+l[128|i>>12&63]+l[128|i>>6&63]+l[128|63&i])}return a},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)},maybeMap:function(e,t){if(u(e)){for(var n=[],r=0;r<e.length;r+=1)n.push(t(e[r]));return n}return t(e)},merge:function e(t,n,r){if(!n)return t;if("object"!=typeof n){if(u(t))t.push(n);else{if(!t||"object"!=typeof t)return[t,n];(r&&(r.plainObjects||r.allowPrototypes)||!s.call(Object.prototype,n))&&(t[n]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(n);var a=t;return u(t)&&!u(n)&&(a=c(t,r)),u(t)&&u(n)?(n.forEach((function(n,a){if(s.call(t,a)){var o=t[a];o&&"object"==typeof o&&n&&"object"==typeof n?t[a]=e(o,n,r):t.push(n)}else t[a]=n})),t):Object.keys(n).reduce((function(t,a){var o=n[a];return s.call(t,a)?t[a]=e(t[a],o,r):t[a]=o,t}),a)}},p=String.prototype.replace,f=/%20/g,h={RFC1738:"RFC1738",RFC3986:"RFC3986"},m=d.assign({default:h.RFC3986,formatters:{RFC1738:function(e){return p.call(e,f,"+")},RFC3986:function(e){return String(e)}}},h),_=Object.prototype.hasOwnProperty,y={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},g=Array.isArray,v=Array.prototype.push,b=function(e,t){v.apply(e,g(t)?t:[t])},w=Date.prototype.toISOString,M=m.default,L={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:d.encode,encodeValuesOnly:!1,format:M,formatter:m.formatters[M],indices:!1,serializeDate:function(e){return w.call(e)},skipNulls:!1,strictNullHandling:!1},T=function e(t,n,r,a,o,i,s,u,l,c,p,f,h){var m=t;if("function"==typeof s?m=s(n,m):m instanceof Date?m=c(m):"comma"===r&&g(m)&&(m=d.maybeMap(m,(function(e){return e instanceof Date?c(e):e})).join(",")),null===m){if(a)return i&&!f?i(n,L.encoder,h,"key"):n;m=""}if(function(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||"symbol"==typeof e||"bigint"==typeof e}(m)||d.isBuffer(m))return i?[p(f?n:i(n,L.encoder,h,"key"))+"="+p(i(m,L.encoder,h,"value"))]:[p(n)+"="+p(String(m))];var _,y=[];if(void 0===m)return y;if(g(s))_=s;else{var v=Object.keys(m);_=u?v.sort(u):v}for(var w=0;w<_.length;++w){var M=_[w],T=m[M];if(!o||null!==T){var k=g(m)?"function"==typeof r?r(n,M):n:n+(l?"."+M:"["+M+"]");b(y,e(T,k,r,a,o,i,s,u,l,c,p,f,h))}}return y},k=Object.prototype.hasOwnProperty,x=Array.isArray,E={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:d.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},S=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},O=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},D=function(e,t,n,r){if(e){var a=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/g,i=n.depth>0&&/(\[[^[\]]*])/.exec(a),s=i?a.slice(0,i.index):a,u=[];if(s){if(!n.plainObjects&&k.call(Object.prototype,s)&&!n.allowPrototypes)return;u.push(s)}for(var l=0;n.depth>0&&null!==(i=o.exec(a))&&l<n.depth;){if(l+=1,!n.plainObjects&&k.call(Object.prototype,i[1].slice(1,-1))&&!n.allowPrototypes)return;u.push(i[1])}return i&&u.push("["+a.slice(i.index)+"]"),function(e,t,n,r){for(var a=r?t:O(t,n),o=e.length-1;o>=0;--o){var i,s=e[o];if("[]"===s&&n.parseArrays)i=[].concat(a);else{i=n.plainObjects?Object.create(null):{};var u="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,l=parseInt(u,10);n.parseArrays||""!==u?!isNaN(l)&&s!==u&&String(l)===u&&l>=0&&n.parseArrays&&l<=n.arrayLimit?(i=[])[l]=a:i[u]=a:i={0:a}}a=i}return a}(u,t,n,r)}},Y=function(e,t){var n,r=e,a=function(e){if(!e)return L;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||L.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 n=m.default;if(void 0!==e.format){if(!_.call(m.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var r=m.formatters[n],a=L.filter;return("function"==typeof e.filter||g(e.filter))&&(a=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:L.addQueryPrefix,allowDots:void 0===e.allowDots?L.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:L.charsetSentinel,delimiter:void 0===e.delimiter?L.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:L.encode,encoder:"function"==typeof e.encoder?e.encoder:L.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:L.encodeValuesOnly,filter:a,formatter:r,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:L.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:L.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:L.strictNullHandling}}(t);"function"==typeof a.filter?r=(0,a.filter)("",r):g(a.filter)&&(n=a.filter);var o,i=[];if("object"!=typeof r||null===r)return"";o=t&&t.arrayFormat in y?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var s=y[o];n||(n=Object.keys(r)),a.sort&&n.sort(a.sort);for(var u=0;u<n.length;++u){var l=n[u];a.skipNulls&&null===r[l]||b(i,T(r[l],l,s,a.strictNullHandling,a.skipNulls,a.encode?a.encoder:null,a.filter,a.sort,a.allowDots,a.serializeDate,a.formatter,a.encodeValuesOnly,a.charset))}var c=i.join(a.delimiter),d=!0===a.addQueryPrefix?"?":"";return a.charsetSentinel&&("iso-8859-1"===a.charset?d+="utf8=%26%2310003%3B&":d+="utf8=%E2%9C%93&"),c.length>0?d+c:""},A=o((function(e){function t(e){if(e)return function(e){for(var n in t.prototype)e[n]=t.prototype[n];return e}(e)}e.exports=t,t.prototype.on=t.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},t.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var a=0;a<r.length;a++)if((n=r[a])===t||n.fn===t){r.splice(a,1);break}return 0===r.length&&delete this._callbacks["$"+e],this},t.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var a=(n=n.slice(0)).length;r<a;++r)n[r].apply(this,t)}return this},t.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},t.prototype.hasListeners=function(e){return!!this.listeners(e).length}})),C=H;H.default=H,H.stable=N,H.stableStringify=N;var j=[],P=[];function H(e,t,n){var r;for(function e(t,n,r,a){var o;if("object"==typeof t&&null!==t){for(o=0;o<r.length;o++)if(r[o]===t){var i=Object.getOwnPropertyDescriptor(a,n);return void(void 0!==i.get?i.configurable?(Object.defineProperty(a,n,{value:"[Circular]"}),j.push([a,n,t,i])):P.push([t,n]):(a[n]="[Circular]",j.push([a,n,t])))}if(r.push(t),Array.isArray(t))for(o=0;o<t.length;o++)e(t[o],o,r,t);else{var s=Object.keys(t);for(o=0;o<s.length;o++){var u=s[o];e(t[u],u,r,t)}}r.pop()}}(e,"",[],void 0),r=0===P.length?JSON.stringify(e,t,n):JSON.stringify(e,R(t),n);0!==j.length;){var a=j.pop();4===a.length?Object.defineProperty(a[0],a[1],a[3]):a[0][a[1]]=a[2]}return r}function I(e,t){return e<t?-1:e>t?1:0}function N(e,t,n){var r,a=function e(t,n,r,a){var o;if("object"==typeof t&&null!==t){for(o=0;o<r.length;o++)if(r[o]===t){var i=Object.getOwnPropertyDescriptor(a,n);return void(void 0!==i.get?i.configurable?(Object.defineProperty(a,n,{value:"[Circular]"}),j.push([a,n,t,i])):P.push([t,n]):(a[n]="[Circular]",j.push([a,n,t])))}if("function"==typeof t.toJSON)return;if(r.push(t),Array.isArray(t))for(o=0;o<t.length;o++)e(t[o],o,r,t);else{var s={},u=Object.keys(t).sort(I);for(o=0;o<u.length;o++){var l=u[o];e(t[l],l,r,t),s[l]=t[l]}if(void 0===a)return s;j.push([a,n,t]),a[n]=s}r.pop()}}(e,"",[],void 0)||e;for(r=0===P.length?JSON.stringify(a,t,n):JSON.stringify(a,R(t),n);0!==j.length;){var o=j.pop();4===o.length?Object.defineProperty(o[0],o[1],o[3]):o[0][o[1]]=o[2]}return r}function R(e){return e=void 0!==e?e:function(e,t){return t},function(t,n){if(P.length>0)for(var r=0;r<P.length;r++){var a=P[r];if(a[1]===t&&a[0]===n){n="[Circular]",P.splice(r,1);break}}return e.call(this,t,n)}}function F(e){return(F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var z=function(e){return null!==e&&"object"===F(e)};function U(e){return(U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var W=B;function B(e){if(e)return function(e){for(var t in B.prototype)Object.prototype.hasOwnProperty.call(B.prototype,t)&&(e[t]=B.prototype[t]);return e}(e)}B.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),clearTimeout(this._uploadTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,delete this._uploadTimeoutTimer,this},B.prototype.parse=function(e){return this._parser=e,this},B.prototype.responseType=function(e){return this._responseType=e,this},B.prototype.serialize=function(e){return this._serializer=e,this},B.prototype.timeout=function(e){if(!e||"object"!==U(e))return this._timeout=e,this._responseTimeout=0,this._uploadTimeout=0,this;for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))switch(t){case"deadline":this._timeout=e.deadline;break;case"response":this._responseTimeout=e.response;break;case"upload":this._uploadTimeout=e.upload;break;default:console.warn("Unknown timeout option",t)}return this},B.prototype.retry=function(e,t){return 0!==arguments.length&&!0!==e||(e=1),e<=0&&(e=0),this._maxRetries=e,this._retries=0,this._retryCallback=t,this};var V=["ECONNRESET","ETIMEDOUT","EADDRINFO","ESOCKETTIMEDOUT"];B.prototype._shouldRetry=function(e,t){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{var n=this._retryCallback(e,t);if(!0===n)return!0;if(!1===n)return!1}catch(e){console.error(e)}if(t&&t.status&&t.status>=500&&501!==t.status)return!0;if(e){if(e.code&&V.includes(e.code))return!0;if(e.timeout&&"ECONNABORTED"===e.code)return!0;if(e.crossDomain)return!0}return!1},B.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this.timedoutError=null,this._end()},B.prototype.then=function(e,t){var n=this;if(!this._fullfilledPromise){var r=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise((function(e,t){r.on("abort",(function(){if(!(n._maxRetries&&n._maxRetries>n._retries))if(n.timedout&&n.timedoutError)t(n.timedoutError);else{var e=new Error("Aborted");e.code="ABORTED",e.status=n.status,e.method=n.method,e.url=n.url,t(e)}})),r.end((function(n,r){n?t(n):e(r)}))}))}return this._fullfilledPromise.then(e,t)},B.prototype.catch=function(e){return this.then(void 0,e)},B.prototype.use=function(e){return e(this),this},B.prototype.ok=function(e){if("function"!=typeof e)throw new Error("Callback required");return this._okCallback=e,this},B.prototype._isResponseOK=function(e){return!!e&&(this._okCallback?this._okCallback(e):e.status>=200&&e.status<300)},B.prototype.get=function(e){return this._header[e.toLowerCase()]},B.prototype.getHeader=B.prototype.get,B.prototype.set=function(e,t){if(z(e)){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&this.set(n,e[n]);return this}return this._header[e.toLowerCase()]=t,this.header[e]=t,this},B.prototype.unset=function(e){return delete this._header[e.toLowerCase()],delete this.header[e],this},B.prototype.field=function(e,t){if(null==e)throw new Error(".field(name, val) name can not be empty");if(this._data)throw new Error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()");if(z(e)){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&this.field(n,e[n]);return this}if(Array.isArray(t)){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&this.field(e,t[r]);return this}if(null==t)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof t&&(t=String(t)),this._getFormData().append(e,t),this},B.prototype.abort=function(){return this._aborted||(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort")),this},B.prototype._auth=function(e,t,n,r){switch(n.type){case"basic":this.set("Authorization","Basic ".concat(r("".concat(e,":").concat(t))));break;case"auto":this.username=e,this.password=t;break;case"bearer":this.set("Authorization","Bearer ".concat(e))}return this},B.prototype.withCredentials=function(e){return void 0===e&&(e=!0),this._withCredentials=e,this},B.prototype.redirects=function(e){return this._maxRedirects=e,this},B.prototype.maxResponseSize=function(e){if("number"!=typeof e)throw new TypeError("Invalid argument");return this._maxResponseSize=e,this},B.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},B.prototype.send=function(e){var t=z(e),n=this._header["content-type"];if(this._formData)throw new Error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()");if(t&&!this._data)Array.isArray(e)?this._data=[]:this._isHost(e)||(this._data={});else if(e&&this._data&&this._isHost(this._data))throw new Error("Can't merge these send calls");if(t&&z(this._data))for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(this._data[r]=e[r]);else"string"==typeof e?(n||this.type("form"),n=this._header["content-type"],this._data="application/x-www-form-urlencoded"===n?this._data?"".concat(this._data,"&").concat(e):e:(this._data||"")+e):this._data=e;return!t||this._isHost(e)||n||this.type("json"),this},B.prototype.sortQuery=function(e){return this._sort=void 0===e||e,this},B.prototype._finalizeQueryString=function(){var e=this._query.join("&");if(e&&(this.url+=(this.url.includes("?")?"&":"?")+e),this._query.length=0,this._sort){var t=this.url.indexOf("?");if(t>=0){var n=this.url.slice(t+1).split("&");"function"==typeof this._sort?n.sort(this._sort):n.sort(),this.url=this.url.slice(0,t)+"?"+n.join("&")}}},B.prototype._appendQueryString=function(){console.warn("Unsupported")},B.prototype._timeoutError=function(e,t,n){if(!this._aborted){var r=new Error("".concat(e+t,"ms exceeded"));r.timeout=t,r.code="ECONNABORTED",r.errno=n,this.timedout=!0,this.timedoutError=r,this.abort(),this.callback(r)}},B.prototype._setTimeouts=function(){var e=this;this._timeout&&!this._timer&&(this._timer=setTimeout((function(){e._timeoutError("Timeout of ",e._timeout,"ETIME")}),this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout((function(){e._timeoutError("Response timeout of ",e._responseTimeout,"ETIMEDOUT")}),this._responseTimeout))};var G=q;function q(e){if(e)return function(e){for(var t in q.prototype)Object.prototype.hasOwnProperty.call(q.prototype,t)&&(e[t]=q.prototype[t]);return e}(e)}function J(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function K(){this._defaults=[]}q.prototype.get=function(e){return this.header[e.toLowerCase()]},q.prototype._setHeaderProperties=function(e){var t=e["content-type"]||"";this.type=t.split(/ *; */).shift();var n=function(e){return e.split(/ *; */).reduce((function(e,t){var n=t.split(/ *= */),r=n.shift(),a=n.shift();return r&&a&&(e[r]=a),e}),{})}(t);for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(this[r]=n[r]);this.links={};try{e.link&&(this.links=function(e){return e.split(/ *, */).reduce((function(e,t){var n=t.split(/ *; */),r=n[0].slice(1,-1);return e[n[1].split(/ *= */)[1].slice(1,-1)]=r,e}),{})}(e.link))}catch(e){}},q.prototype._setStatusProperties=function(e){var t=e/100|0;this.statusCode=e,this.status=this.statusCode,this.statusType=t,this.info=1===t,this.ok=2===t,this.redirect=3===t,this.clientError=4===t,this.serverError=5===t,this.error=(4===t||5===t)&&this.toError(),this.created=201===e,this.accepted=202===e,this.noContent=204===e,this.badRequest=400===e,this.unauthorized=401===e,this.notAcceptable=406===e,this.forbidden=403===e,this.notFound=404===e,this.unprocessableEntity=422===e},["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert","disableTLSCerts"].forEach((function(e){K.prototype[e]=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this._defaults.push({fn:e,args:n}),this}})),K.prototype._setDefaults=function(e){this._defaults.forEach((function(t){e[t.fn].apply(e,function(e){return function(e){if(Array.isArray(e))return J(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return J(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?J(e,void 0):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t.args))}))};for(var $=K,X=o((function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var r;function a(){}"undefined"!=typeof window?r=window:"undefined"==typeof self?(console.warn("Using browser-only version of superagent in non-browser environment"),r=void 0):r=self,e.exports=function(e,n){return"function"==typeof n?new t.Request("GET",e).end(n):1===arguments.length?new t.Request("GET",e):new t.Request(e,n)};var o=t=e.exports;t.Request=p,o.getXHR=function(){if(r.XMLHttpRequest&&(!r.location||"file:"!==r.location.protocol||!r.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}throw new Error("Browser-only version of superagent could not find XHR")};var i="".trim?function(e){return e.trim()}:function(e){return e.replace(/(^\s*|\s*$)/g,"")};function s(e){if(!z(e))return e;var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&u(t,n,e[n]);return t.join("&")}function u(e,t,n){if(void 0!==n)if(null!==n)if(Array.isArray(n))n.forEach((function(n){u(e,t,n)}));else if(z(n))for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&u(e,"".concat(t,"[").concat(r,"]"),n[r]);else e.push(encodeURI(t)+"="+encodeURIComponent(n));else e.push(encodeURI(t))}function l(e){for(var t,n,r={},a=e.split("&"),o=0,i=a.length;o<i;++o)-1===(n=(t=a[o]).indexOf("="))?r[decodeURIComponent(t)]="":r[decodeURIComponent(t.slice(0,n))]=decodeURIComponent(t.slice(n+1));return r}function c(e){return/[/+]json($|[^-\w])/.test(e)}function d(e){this.req=e,this.xhr=this.req.xhr,this.text="HEAD"!==this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||void 0===this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText;var t=this.xhr.status;1223===t&&(t=204),this._setStatusProperties(t),this.headers=function(e){for(var t,n,r,a,o=e.split(/\r?\n/),s={},u=0,l=o.length;u<l;++u)-1!==(t=(n=o[u]).indexOf(":"))&&(r=n.slice(0,t).toLowerCase(),a=i(n.slice(t+1)),s[r]=a);return s}(this.xhr.getAllResponseHeaders()),this.header=this.headers,this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),null===this.text&&e._responseType?this.body=this.xhr.response:this.body="HEAD"===this.req.method?null:this._parseBody(this.text?this.text:this.xhr.response)}function p(e,t){var n=this;this._query=this._query||[],this.method=e,this.url=t,this.header={},this._header={},this.on("end",(function(){var e,t=null,r=null;try{r=new d(n)}catch(e){return(t=new Error("Parser is unable to parse the response")).parse=!0,t.original=e,n.xhr?(t.rawResponse=void 0===n.xhr.responseType?n.xhr.responseText:n.xhr.response,t.status=n.xhr.status?n.xhr.status:null,t.statusCode=t.status):(t.rawResponse=null,t.status=null),n.callback(t)}n.emit("response",r);try{n._isResponseOK(r)||(e=new Error(r.statusText||r.text||"Unsuccessful HTTP response"))}catch(t){e=t}e?(e.original=t,e.response=r,e.status=r.status,n.callback(e,r)):n.callback(null,r)}))}function f(e,t,n){var r=o("DELETE",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r}o.serializeObject=s,o.parseString=l,o.types={html:"text/html",json:"application/json",xml:"text/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},o.serialize={"application/x-www-form-urlencoded":s,"application/json":C},o.parse={"application/x-www-form-urlencoded":l,"application/json":JSON.parse},G(d.prototype),d.prototype._parseBody=function(e){var t=o.parse[this.type];return this.req._parser?this.req._parser(this,e):(!t&&c(this.type)&&(t=o.parse["application/json"]),t&&e&&(e.length>0||e instanceof Object)?t(e):null)},d.prototype.toError=function(){var e=this.req,t=e.method,n=e.url,r="cannot ".concat(t," ").concat(n," (").concat(this.status,")"),a=new Error(r);return a.status=this.status,a.method=t,a.url=n,a},o.Response=d,A(p.prototype),W(p.prototype),p.prototype.type=function(e){return this.set("Content-Type",o.types[e]||e),this},p.prototype.accept=function(e){return this.set("Accept",o.types[e]||e),this},p.prototype.auth=function(e,t,r){1===arguments.length&&(t=""),"object"===n(t)&&null!==t&&(r=t,t=""),r||(r={type:"function"==typeof btoa?"basic":"auto"});var a=function(e){if("function"==typeof btoa)return btoa(e);throw new Error("Cannot use basic auth, btoa is not a function")};return this._auth(e,t,r,a)},p.prototype.query=function(e){return"string"!=typeof e&&(e=s(e)),e&&this._query.push(e),this},p.prototype.attach=function(e,t,n){if(t){if(this._data)throw new Error("superagent can't mix .send() and .attach()");this._getFormData().append(e,t,n||t.name)}return this},p.prototype._getFormData=function(){return this._formData||(this._formData=new r.FormData),this._formData},p.prototype.callback=function(e,t){if(this._shouldRetry(e,t))return this._retry();var n=this._callback;this.clearTimeout(),e&&(this._maxRetries&&(e.retries=this._retries-1),this.emit("error",e)),n(e,t)},p.prototype.crossDomainError=function(){var e=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");e.crossDomain=!0,e.status=this.status,e.method=this.method,e.url=this.url,this.callback(e)},p.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},p.prototype.ca=p.prototype.agent,p.prototype.buffer=p.prototype.ca,p.prototype.write=function(){throw new Error("Streaming is not supported in browser version of superagent")},p.prototype.pipe=p.prototype.write,p.prototype._isHost=function(e){return e&&"object"===n(e)&&!Array.isArray(e)&&"[object Object]"!==Object.prototype.toString.call(e)},p.prototype.end=function(e){this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=e||a,this._finalizeQueryString(),this._end()},p.prototype._setUploadTimeout=function(){var e=this;this._uploadTimeout&&!this._uploadTimeoutTimer&&(this._uploadTimeoutTimer=setTimeout((function(){e._timeoutError("Upload timeout of ",e._uploadTimeout,"ETIMEDOUT")}),this._uploadTimeout))},p.prototype._end=function(){if(this._aborted)return this.callback(new Error("The request has been aborted even before .end() was called"));var e=this;this.xhr=o.getXHR();var t=this.xhr,n=this._formData||this._data;this._setTimeouts(),t.onreadystatechange=function(){var n=t.readyState;if(n>=2&&e._responseTimeoutTimer&&clearTimeout(e._responseTimeoutTimer),4===n){var r;try{r=t.status}catch(e){r=0}if(!r){if(e.timedout||e._aborted)return;return e.crossDomainError()}e.emit("end")}};var r=function(t,n){n.total>0&&(n.percent=n.loaded/n.total*100,100===n.percent&&clearTimeout(e._uploadTimeoutTimer)),n.direction=t,e.emit("progress",n)};if(this.hasListeners("progress"))try{t.addEventListener("progress",r.bind(null,"download")),t.upload&&t.upload.addEventListener("progress",r.bind(null,"upload"))}catch(e){}t.upload&&this._setUploadTimeout();try{this.username&&this.password?t.open(this.method,this.url,!0,this.username,this.password):t.open(this.method,this.url,!0)}catch(e){return this.callback(e)}if(this._withCredentials&&(t.withCredentials=!0),!this._formData&&"GET"!==this.method&&"HEAD"!==this.method&&"string"!=typeof n&&!this._isHost(n)){var a=this._header["content-type"],i=this._serializer||o.serialize[a?a.split(";")[0]:""];!i&&c(a)&&(i=o.serialize["application/json"]),i&&(n=i(n))}for(var s in this.header)null!==this.header[s]&&Object.prototype.hasOwnProperty.call(this.header,s)&&t.setRequestHeader(s,this.header[s]);this._responseType&&(t.responseType=this._responseType),this.emit("request",this),t.send(void 0===n?null:n)},o.agent=function(){return new $},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach((function(e){$.prototype[e.toLowerCase()]=function(t,n){var r=new o.Request(e,t);return this._setDefaults(r),n&&r.end(n),r}})),$.prototype.del=$.prototype.delete,o.get=function(e,t,n){var r=o("GET",e);return"function"==typeof t&&(n=t,t=null),t&&r.query(t),n&&r.end(n),r},o.head=function(e,t,n){var r=o("HEAD",e);return"function"==typeof t&&(n=t,t=null),t&&r.query(t),n&&r.end(n),r},o.options=function(e,t,n){var r=o("OPTIONS",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},o.del=f,o.delete=f,o.patch=function(e,t,n){var r=o("PATCH",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},o.post=function(e,t,n){var r=o("POST",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},o.put=function(e,t,n){var r=o("PUT",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r}})),Z=(X.Request,[]),Q=[],ee=("undefined"!=typeof Uint8Array&&Uint8Array,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),te=0,ne=ee.length;te<ne;++te)Z[te]=ee[te],Q[ee.charCodeAt(te)]=te;function re(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&t,[n,n===t?0:4-n%4]}function ae(e,t,n){for(var r,a,o=[],i=t;i<n;i+=3)r=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),o.push(Z[(a=r)>>18&63]+Z[a>>12&63]+Z[a>>6&63]+Z[63&a]);return o.join("")}Q["-".charCodeAt(0)]=62,Q["_".charCodeAt(0)]=63;var oe=function(e){for(var t,n=e.length,r=n%3,a=[],o=0,i=n-r;o<i;o+=16383)a.push(ae(e,o,o+16383>i?i:o+16383));return 1===r?(t=e[n-1],a.push(Z[t>>2]+Z[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],a.push(Z[t>>10]+Z[t>>4&63]+Z[t<<2&63]+"=")),a.join("")},ie=function(e){return oe(function(e){for(var t=new Array(e.length),n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}(e)).replace(/\+/g,"-").replace(/\//g,"_")},se={raw:"9.16.2"},ue=Object.prototype.toString;function le(e,t,n,r){if(n="array"===n?"object":n,e&&typeof e[t]!==n)throw new Error(r)}function ce(e,t,n){if(typeof e!==t)throw new Error(n)}function de(e,t,n){if(-1===t.indexOf(e))throw new Error(n)}var pe={check:function(e,t,n){if(t.optional&&!e||ce(e,t.type,t.message),"object"===t.type&&n)for(var r=Object.keys(n),a=0;a<r.length;a++){var o=r[a];n[o].optional&&!e[o]||n[o].condition&&!n[o].condition(e)||(le(e,o,n[o].type,n[o].message),n[o].values&&de(e[o],n[o].values,n[o].value_message))}},attribute:le,variable:ce,value:de,isArray:function(e){return this.supportsIsArray()?Array.isArray(e):"[object Array]"===ue.call(e)},supportsIsArray:function(){return null!=Array.isArray}};function fe(e){if(null==e)throw new TypeError("Cannot convert first argument to object");for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(null!=r)for(var a=Object.keys(Object(r)),o=0,i=a.length;o<i;o++){var s=a[o],u=Object.getOwnPropertyDescriptor(r,s);void 0!==u&&u.enumerable&&(t[s]=r[s])}}return t}var he=function(){return Object.assign?Object.assign:fe};function me(e,t){return t.reduce((function(t,n){return e[n]&&(t[n]=e[n]),t}),{})}function _e(e){var t=[];for(var n in e)t.push(e[n]);return t}function ye(){var e=_e(arguments);return e.unshift({}),he().apply(void 0,e)}function ge(e){var t=e.match(/^(https?:|file:|chrome-extension:)\/\/(([^:/?#]*)(?::([0-9]+))?)([/]{0,1}[^?#]*)(\?[^#]*|)(#.*|)$/);return t&&{href:e,protocol:t[1],host:t[2],hostname:t[3],port:t[4],pathname:t[5],search:t[6],hash:t[7]}}function ve(e,t){var n=ye(e);return e[t]&&(n[t]=e[t].trim()),n}var be={toSnakeCase:function e(t,n){return"object"!=typeof t||pe.isArray(t)||null===t?t:(n=n||[],Object.keys(t).reduce((function(r,a){return r[-1===n.indexOf(a)?function(e){for(var t,n="",r=0,a=!0,o=!0;r<e.length;)t=e.charCodeAt(r),!o&&t>=65&&t<=90||!a&&t>=48&&t<=57?(n+="_",n+=e[r].toLowerCase()):n+=e[r].toLowerCase(),a=t>=48&&t<=57,o=t>=65&&t<=90,r++;return n}(a):a]=e(t[a]),r}),{}))},toCamelCase:function e(t,n,r){return"object"!=typeof t||pe.isArray(t)||null===t?t:(n=n||[],r=r||{},Object.keys(t).reduce((function(a,o){var i,s=-1===n.indexOf(o)?(i=o.split("_")).reduce((function(e,t){return e+t.charAt(0).toUpperCase()+t.slice(1)}),i.shift()):o;return a[s]=e(t[s]||t[o],[],r),r.keepOriginal&&(a[o]=e(t[o],[],r)),a}),{}))},blacklist:function(e,t){return Object.keys(e).reduce((function(n,r){return-1===t.indexOf(r)&&(n[r]=e[r]),n}),{})},merge:function(e,t){return{base:t?me(e,t):e,with:function(e,t){return e=t?me(e,t):e,ye(this.base,e)}}},pick:me,getKeysNotIn:function(e,t){var n=[];for(var r in e)-1===t.indexOf(r)&&n.push(r);return n},extend:ye,getOriginFromUrl:function(e){if(e){var t=ge(e);if(!t)return null;var n=t.protocol+"//"+t.hostname;return t.port&&(n+=":"+t.port),n}},getLocationFromUrl:ge,trimUserDetails:function(e){return function(e,t){return["username","email","phoneNumber"].reduce(ve,e)}(e)},updatePropertyOn:function e(t,n,r){"string"==typeof n&&(n=n.split("."));var a=n[0];t.hasOwnProperty(a)&&(1===n.length?t[a]=r:e(t[a],n.slice(1),r))}};function we(e){this.request=e,this.method=e.method,this.url=e.url,this.body=e._data,this.headers=e._header}function Me(e){this.request=e}function Le(e){this._sendTelemetry=!1!==e._sendTelemetry||e._sendTelemetry,this._telemetryInfo=e._telemetryInfo||null,this._timesToRetryFailedRequests=e._timesToRetryFailedRequests,this.headers=e.headers||{},this._universalLoginPage=e.universalLoginPage}function Te(){return window}we.prototype.abort=function(){this.request.abort()},we.prototype.getMethod=function(){return this.method},we.prototype.getBody=function(){return this.body},we.prototype.getUrl=function(){return this.url},we.prototype.getHeaders=function(){return this.headers},Me.prototype.set=function(e,t){return this.request=this.request.set(e,t),this},Me.prototype.send=function(e){return this.request=this.request.send(be.trimUserDetails(e)),this},Me.prototype.withCredentials=function(){return this.request=this.request.withCredentials(),this},Me.prototype.end=function(e){return this.request.end(e),new we(this.request)},Le.prototype.setCommonConfiguration=function(e,t){if(t=t||{},this._timesToRetryFailedRequests>0&&(e=e.retry(this._timesToRetryFailedRequests)),t.noHeaders)return e;var n=this.headers;e=e.set("Content-Type","application/json");for(var r=Object.keys(this.headers),a=0;a<r.length;a++)e=e.set(r[a],n[r[a]]);return this._sendTelemetry&&(e=e.set("Auth0-Client",this.getTelemetryData())),e},Le.prototype.getTelemetryData=function(){var e=this._universalLoginPage?"auth0.js-ulp":"auth0.js",t={name:e,version:se.raw};this._telemetryInfo&&((t=be.extend({},this._telemetryInfo)).env=be.extend({},this._telemetryInfo.env),t.env[e]=se.raw);var n=JSON.stringify(t);return ie(n)},Le.prototype.get=function(e,t){return new Me(this.setCommonConfiguration(X.get(e),t))},Le.prototype.post=function(e,t){return new Me(this.setCommonConfiguration(X.post(e),t))},Le.prototype.patch=function(e,t){return new Me(this.setCommonConfiguration(X.patch(e),t))};var ke={redirect:function(e){Te().location=e},getDocument:function(){return Te().document},getWindow:Te,getOrigin:function(){var e=Te().location,t=e.origin;return t||(t=be.getOriginFromUrl(e.href)),t}};function xe(){}xe.prototype.getItem=function(){return null},xe.prototype.removeItem=function(){},xe.prototype.setItem=function(){};var Ee=o((function(e,t){var n;n=function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(r){function a(){}function o(t,n,o){if("undefined"!=typeof document){"number"==typeof(o=e({path:"/"},a.defaults,o)).expires&&(o.expires=new Date(1*new Date+864e5*o.expires)),o.expires=o.expires?o.expires.toUTCString():"";try{var i=JSON.stringify(n);/^[\{\[]/.test(i)&&(n=i)}catch(e){}n=r.write?r.write(n,t):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var s="";for(var u in o)o[u]&&(s+="; "+u,!0!==o[u]&&(s+="="+o[u].split(";")[0]));return document.cookie=t+"="+n+s}}function i(e,n){if("undefined"!=typeof document){for(var a={},o=document.cookie?document.cookie.split("; "):[],i=0;i<o.length;i++){var s=o[i].split("="),u=s.slice(1).join("=");n||'"'!==u.charAt(0)||(u=u.slice(1,-1));try{var l=t(s[0]);if(u=(r.read||r)(u,l)||t(u),n)try{u=JSON.parse(u)}catch(e){}if(a[l]=u,e===l)break}catch(e){}}return e?a[e]:a}}return a.set=o,a.get=function(e){return i(e,!1)},a.getJSON=function(e){return i(e,!0)},a.remove=function(t,n){o(t,"",e(n,{expires:-1}))},a.defaults={},a.withConverter=n,a}((function(){}))},e.exports=n()}));function Se(){}function Oe(e){this.disableWarnings=e.disableWarnings}function De(e){if(this.warn=new Oe({}),this.storage=new Se,!0===e.__tryLocalStorageFirst)try{var t=ke.getWindow().localStorage;t&&(this.storage=t)}catch(e){this.warn.warning(e),this.warn.warning("Can't use localStorage. Using CookieStorage instead.")}}function Ye(e){this.handler=new De(e)}function Ae(e){this.storage=new Ye(e)}function Ce(e,t){return{error:e,errorDescription:t}}Se.prototype.getItem=function(e){return Ee.get(e)},Se.prototype.removeItem=function(e){Ee.remove(e)},Se.prototype.setItem=function(e,t,n){var r=be.extend({expires:1},n);"https:"===ke.getWindow().location.protocol&&(r.secure=!0),Ee.set(e,t,r)},Oe.prototype.warning=function(e){this.disableWarnings||console.warn(e)},De.prototype.failover=function(){this.storage instanceof xe?this.warn.warning("DummyStorage: ignore failover"):this.storage instanceof Se?(this.warn.warning("CookieStorage: failing over DummyStorage"),this.storage=new xe):(this.warn.warning("LocalStorage: failing over CookieStorage"),this.storage=new Se)},De.prototype.getItem=function(e){try{return this.storage.getItem(e)}catch(t){return this.warn.warning(t),this.failover(),this.getItem(e)}},De.prototype.removeItem=function(e){try{return this.storage.removeItem(e)}catch(t){return this.warn.warning(t),this.failover(),this.removeItem(e)}},De.prototype.setItem=function(e,t,n){try{return this.storage.setItem(e,t,n)}catch(r){return this.warn.warning(r),this.failover(),this.setItem(e,t,n)}},Ye.prototype.getItem=function(e){var t=this.handler.getItem(e);try{return JSON.parse(t)}catch(e){return t}},Ye.prototype.removeItem=function(e){return this.handler.removeItem(e)},Ye.prototype.setItem=function(e,t,n){var r=JSON.stringify(t);return this.handler.setItem(e,r,n)},Ae.prototype.set=function(e,t){var n={lastUsedConnection:e,lastUsedSub:t};this.storage.setItem("auth0.ssodata",JSON.stringify(n))},Ae.prototype.get=function(){var e=this.storage.getItem("auth0.ssodata");if(e)return JSON.parse(e)};var je={buildResponse:Ce,invalidToken:function(e){return Ce("invalid_token",e)}};function Pe(e,t){return(t=t||{}).ignoreCasing=!!t.ignoreCasing&&t.ignoreCasing,function(n,r){var a;return n||r?(!n&&r.err&&(n=r.err,r=null),!n&&r.error&&(n=r,r=null),n?(a={original:n},be.updatePropertyOn(a,"original.response.req._data.password","*****"),n.response&&n.response.statusCode&&(a.statusCode=n.response.statusCode),n.response&&n.response.statusText&&(a.statusText=n.response.statusText),n.response&&n.response.body&&(n=n.response.body),n.err&&(n=n.err),a.code=n.code||n.error||n.error_code||n.status||null,a.description=n.errorDescription||n.error_description||n.description||n.error||n.details||n.err||null,t.forceLegacyError&&(a.error=a.code,a.error_description=a.description),n.error_codes&&n.error_details&&(a.errorDetails={codes:n.error_codes,details:n.error_details}),n.name&&(a.name=n.name),n.policy&&(a.policy=n.policy),e(a)):!r.type||"text/html"!==r.type&&"text/plain"!==r.type?t.ignoreCasing?e(null,r.body||r):e(null,be.toCamelCase(r.body||r,[],{keepOriginal:t.keepOriginalCasing})):e(null,r.text)):e(je.buildResponse("generic_error","Something went wrong"))}}var He=["realm","audience","otp","client_id","client_secret","redirect_uri","scope","code","grant_type","username","password","refresh_token","assertion","client_assertion","client_assertion_type","code_verifier"],Ie=["connection","connection_scope","auth0Client","owp","device","realm","organization","invitation","protocol","_csrf","_intstate","login_ticket","client_id","response_type","response_mode","redirect_uri","audience","scope","state","nonce","display","prompt","screen_hint","max_age","ui_locales","claims_locales","id_token_hint","login_hint","acr_values","claims","registration","request","request_uri","code_challenge","code_challenge_method","access_type","display"],Ne=function(e,t){return be.pick(t,He)},Re=function(e,t){var n=be.getKeysNotIn(t,Ie);return n.length>0&&e.warning("Following parameters are not allowed on the `/authorize` endpoint: ["+n.join(",")+"]"),t},Fe="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{};function ze(e){var t={exports:{}};return e(t,t.exports),t.exports}var Ue=ze((function(e,t){e.exports=function(){function e(e){return"function"==typeof e}var t=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},n=0,a=void 0,o=void 0,i=function(e,t){f[n]=e,f[n+1]=t,2===(n+=2)&&(o?o(h):v())},s="undefined"!=typeof window?window:void 0,u=s||{},l=u.MutationObserver||u.WebKitMutationObserver,c="undefined"==typeof self&&void 0!==r&&"[object process]"==={}.toString.call(r),d="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function p(){var e=setTimeout;return function(){return e(h,1)}}var f=new Array(1e3);function h(){for(var e=0;e<n;e+=2)(0,f[e])(f[e+1]),f[e]=void 0,f[e+1]=void 0;n=0}var m,_,y,g,v=void 0;function b(e,t){var n=this,r=new this.constructor(L);void 0===r[M]&&j(r);var a=n._state;if(a){var o=arguments[a-1];i((function(){return A(a,r,o,n._result)}))}else D(n,r,e,t);return r}function w(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=new this(L);return x(t,e),t}v=c?function(){return r.nextTick(h)}:l?(_=0,y=new l(h),g=document.createTextNode(""),y.observe(g,{characterData:!0}),function(){g.data=_=++_%2}):d?((m=new MessageChannel).port1.onmessage=h,function(){return m.port2.postMessage(0)}):void 0===s?function(){try{var e=Function("return this")().require("vertx");return void 0!==(a=e.runOnLoop||e.runOnContext)?function(){a(h)}:p()}catch(e){return p()}}():p();var M=Math.random().toString(36).substring(2);function L(){}var T=void 0;function k(t,n,r){n.constructor===t.constructor&&r===b&&n.constructor.resolve===w?function(e,t){1===t._state?S(e,t._result):2===t._state?O(e,t._result):D(t,void 0,(function(t){return x(e,t)}),(function(t){return O(e,t)}))}(t,n):void 0===r?S(t,n):e(r)?function(e,t,n){i((function(e){var r=!1,a=function(n,a,o,i){try{n.call(a,(function(n){r||(r=!0,t!==n?x(e,n):S(e,n))}),(function(t){r||(r=!0,O(e,t))}))}catch(e){return e}}(n,t);!r&&a&&(r=!0,O(e,a))}),e)}(t,n,r):S(t,n)}function x(e,t){if(e===t)O(e,new TypeError("You cannot resolve a promise with itself"));else if(a=typeof(r=t),null===r||"object"!==a&&"function"!==a)S(e,t);else{var n=void 0;try{n=t.then}catch(t){return void O(e,t)}k(e,t,n)}var r,a}function E(e){e._onerror&&e._onerror(e._result),Y(e)}function S(e,t){e._state===T&&(e._result=t,e._state=1,0!==e._subscribers.length&&i(Y,e))}function O(e,t){e._state===T&&(e._state=2,e._result=t,i(E,e))}function D(e,t,n,r){var a=e._subscribers,o=a.length;e._onerror=null,a[o]=t,a[o+1]=n,a[o+2]=r,0===o&&e._state&&i(Y,e)}function Y(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r=void 0,a=void 0,o=e._result,i=0;i<t.length;i+=3)a=t[i+n],(r=t[i])?A(n,r,a,o):a(o);e._subscribers.length=0}}function A(t,n,r,a){var o=e(r),i=void 0,s=void 0,u=!0;if(o){try{i=r(a)}catch(t){u=!1,s=t}if(n===i)return void O(n,new TypeError("A promises callback cannot return that same promise."))}else i=a;n._state!==T||(o&&u?x(n,i):!1===u?O(n,s):1===t?S(n,i):2===t&&O(n,i))}var C=0;function j(e){e[M]=C++,e._state=void 0,e._result=void 0,e._subscribers=[]}var P=function(){function e(e,n){this._instanceConstructor=e,this.promise=new e(L),this.promise[M]||j(this.promise),t(n)?(this.length=n.length,this._remaining=n.length,this._result=new Array(this.length),0===this.length?S(this.promise,this._result):(this.length=this.length||0,this._enumerate(n),0===this._remaining&&S(this.promise,this._result))):O(this.promise,new Error("Array Methods must be provided an Array"))}return e.prototype._enumerate=function(e){for(var t=0;this._state===T&&t<e.length;t++)this._eachEntry(e[t],t)},e.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,r=n.resolve;if(r===w){var a=void 0,o=void 0,i=!1;try{a=e.then}catch(e){i=!0,o=e}if(a===b&&e._state!==T)this._settledAt(e._state,t,e._result);else if("function"!=typeof a)this._remaining--,this._result[t]=e;else if(n===H){var s=new n(L);i?O(s,o):k(s,e,a),this._willSettleAt(s,t)}else this._willSettleAt(new n((function(t){return t(e)})),t)}else this._willSettleAt(r(e),t)},e.prototype._settledAt=function(e,t,n){var r=this.promise;r._state===T&&(this._remaining--,2===e?O(r,n):this._result[t]=n),0===this._remaining&&S(r,this._result)},e.prototype._willSettleAt=function(e,t){var n=this;D(e,void 0,(function(e){return n._settledAt(1,t,e)}),(function(e){return n._settledAt(2,t,e)}))},e}(),H=function(){function t(e){this[M]=C++,this._result=this._state=void 0,this._subscribers=[],L!==e&&("function"!=typeof e&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof t?function(e,t){try{t((function(t){x(e,t)}),(function(t){O(e,t)}))}catch(t){O(e,t)}}(this,e):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return t.prototype.catch=function(e){return this.then(null,e)},t.prototype.finally=function(t){var n=this,r=n.constructor;return e(t)?n.then((function(e){return r.resolve(t()).then((function(){return e}))}),(function(e){return r.resolve(t()).then((function(){throw e}))})):n.then(t,t)},t}();return H.prototype.then=b,H.all=function(e){return new P(this,e).promise},H.race=function(e){var n=this;return t(e)?new n((function(t,r){for(var a=e.length,o=0;o<a;o++)n.resolve(e[o]).then(t,r)})):new n((function(e,t){return t(new TypeError("You must pass an array to race."))}))},H.resolve=w,H.reject=function(e){var t=new this(L);return O(t,e),t},H._setScheduler=function(e){o=e},H._setAsap=function(e){i=e},H._asap=i,H.polyfill=function(){var e=void 0;if(void 0!==Fe)e=Fe;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var n=null;try{n=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===n&&!t.cast)return}e.Promise=H},H.Promise=H,H}()})),We=ze((function(e,t){var n;e.exports=n=n||function(e,t){var n=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),r={},a=r.lib={},o=a.Base={extend:function(e){var t=n(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},i=a.WordArray=o.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||u).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,a=e.sigBytes;if(this.clamp(),r%4)for(var o=0;o<a;o++)t[r+o>>>2]|=(n[o>>>2]>>>24-o%4*8&255)<<24-(r+o)%4*8;else for(o=0;o<a;o+=4)t[r+o>>>2]=n[o>>>2];return this.sigBytes+=a,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=o.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n,r=[],a=function(t){t=t;var n=987654321,r=4294967295;return function(){var a=((n=36969*(65535&n)+(n>>16)&r)<<16)+(t=18e3*(65535&t)+(t>>16)&r)&r;return a/=4294967296,(a+=.5)*(e.random()>.5?1:-1)}},o=0;o<t;o+=4){var s=a(4294967296*(n||e.random()));n=987654071*s(),r.push(4294967296*s()|0)}return new i.init(r,t)}}),s=r.enc={},u=s.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],a=0;a<n;a++){var o=t[a>>>2]>>>24-a%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new i.init(n,t/2)}},l=s.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],a=0;a<n;a++)r.push(String.fromCharCode(t[a>>>2]>>>24-a%4*8&255));return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new i.init(n,t)}},c=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(l.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return l.parse(unescape(encodeURIComponent(e)))}},d=a.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new i.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=c.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,r=n.words,a=n.sigBytes,o=this.blockSize,s=a/(4*o),u=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*o,l=e.min(4*u,a);if(u){for(var c=0;c<u;c+=o)this._doProcessBlock(r,c);var d=r.splice(0,u);n.sigBytes-=l}return new i.init(d,l)},clone:function(){var e=o.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});a.Hasher=d.extend({cfg:o.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){d.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new p.HMAC.init(e,n).finalize(t)}}});var p=r.algo={};return r}(Math)})),Be=ze((function(e,t){var n;e.exports=(n=We,function(e){var t=n,r=t.lib,a=r.WordArray,o=r.Hasher,i=t.algo,s=[],u=[];!function(){function t(t){for(var n=e.sqrt(t),r=2;r<=n;r++)if(!(t%r))return!1;return!0}function n(e){return 4294967296*(e-(0|e))|0}for(var r=2,a=0;a<64;)t(r)&&(a<8&&(s[a]=n(e.pow(r,.5))),u[a]=n(e.pow(r,1/3)),a++),r++}();var l=[],c=i.SHA256=o.extend({_doReset:function(){this._hash=new a.init(s.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],a=n[1],o=n[2],i=n[3],s=n[4],c=n[5],d=n[6],p=n[7],f=0;f<64;f++){if(f<16)l[f]=0|e[t+f];else{var h=l[f-15],m=l[f-2];l[f]=((h<<25|h>>>7)^(h<<14|h>>>18)^h>>>3)+l[f-7]+((m<<15|m>>>17)^(m<<13|m>>>19)^m>>>10)+l[f-16]}var _=r&a^r&o^a&o,y=p+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&c^~s&d)+u[f]+l[f];p=d,d=c,c=s,s=i+y|0,i=o,o=a,a=r,r=y+(((r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22))+_)|0}n[0]=n[0]+r|0,n[1]=n[1]+a|0,n[2]=n[2]+o|0,n[3]=n[3]+i|0,n[4]=n[4]+s|0,n[5]=n[5]+c|0,n[6]=n[6]+d|0,n[7]=n[7]+p|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,a=8*t.sigBytes;return n[a>>>5]|=128<<24-a%32,n[14+(a+64>>>9<<4)]=e.floor(r/4294967296),n[15+(a+64>>>9<<4)]=r,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=o._createHelper(c),t.HmacSHA256=o._createHmacHelper(c)}(Math),n.SHA256)})),Ve=ze((function(e,t){var n,r;e.exports=(r=(n=We).lib.WordArray,n.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,r=this._map;e.clamp();for(var a=[],o=0;o<n;o+=3)for(var i=(t[o>>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,s=0;s<4&&o+.75*s<n;s++)a.push(r.charAt(i>>>6*(3-s)&63));var u=r.charAt(64);if(u)for(;a.length%4;)a.push(u);return a.join("")},parse:function(e){var t=e.length,n=this._map,a=this._reverseMap;if(!a){a=this._reverseMap=[];for(var o=0;o<n.length;o++)a[n.charCodeAt(o)]=o}var i=n.charAt(64);if(i){var s=e.indexOf(i);-1!==s&&(t=s)}return function(e,t,n){for(var a=[],o=0,i=0;i<t;i++)if(i%4){var s=n[e.charCodeAt(i-1)]<<i%4*2,u=n[e.charCodeAt(i)]>>>6-i%4*2;a[o>>>2]|=(s|u)<<24-o%4*8,o++}return r.create(a,o)}(e,t,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},n.enc.Base64)})),Ge=ze((function(e,t){e.exports=We.enc.Hex})),qe=ze((function(e,t){(function(){var t;function n(e,t,n){null!=e&&("number"==typeof e?this.fromNumber(e,t,n):this.fromString(e,null==t&&"string"!=typeof e?256:t))}function r(){return new n(null)}var a="undefined"!=typeof navigator;a&&"Microsoft Internet Explorer"==navigator.appName?(n.prototype.am=function(e,t,n,r,a,o){for(var i=32767&t,s=t>>15;--o>=0;){var u=32767&this[e],l=this[e++]>>15,c=s*u+l*i;a=((u=i*u+((32767&c)<<15)+n[r]+(1073741823&a))>>>30)+(c>>>15)+s*l+(a>>>30),n[r++]=1073741823&u}return a},t=30):a&&"Netscape"!=navigator.appName?(n.prototype.am=function(e,t,n,r,a,o){for(;--o>=0;){var i=t*this[e++]+n[r]+a;a=Math.floor(i/67108864),n[r++]=67108863&i}return a},t=26):(n.prototype.am=function(e,t,n,r,a,o){for(var i=16383&t,s=t>>14;--o>=0;){var u=16383&this[e],l=this[e++]>>14,c=s*u+l*i;a=((u=i*u+((16383&c)<<14)+n[r]+a)>>28)+(c>>14)+s*l,n[r++]=268435455&u}return a},t=28),n.prototype.DB=t,n.prototype.DM=(1<<t)-1,n.prototype.DV=1<<t,n.prototype.FV=Math.pow(2,52),n.prototype.F1=52-t,n.prototype.F2=2*t-52;var o,i,s=new Array;for(o="0".charCodeAt(0),i=0;i<=9;++i)s[o++]=i;for(o="a".charCodeAt(0),i=10;i<36;++i)s[o++]=i;for(o="A".charCodeAt(0),i=10;i<36;++i)s[o++]=i;function u(e){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(e)}function l(e,t){var n=s[e.charCodeAt(t)];return null==n?-1:n}function c(e){var t=r();return t.fromInt(e),t}function d(e){var t,n=1;return 0!=(t=e>>>16)&&(e=t,n+=16),0!=(t=e>>8)&&(e=t,n+=8),0!=(t=e>>4)&&(e=t,n+=4),0!=(t=e>>2)&&(e=t,n+=2),0!=(t=e>>1)&&(e=t,n+=1),n}function p(e){this.m=e}function f(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}function h(e,t){return e&t}function m(e,t){return e|t}function _(e,t){return e^t}function y(e,t){return e&~t}function g(e){if(0==e)return-1;var t=0;return 0==(65535&e)&&(e>>=16,t+=16),0==(255&e)&&(e>>=8,t+=8),0==(15&e)&&(e>>=4,t+=4),0==(3&e)&&(e>>=2,t+=2),0==(1&e)&&++t,t}function v(e){for(var t=0;0!=e;)e&=e-1,++t;return t}function b(){}function w(e){return e}function M(e){this.r2=r(),this.q3=r(),n.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}p.prototype.convert=function(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e},p.prototype.revert=function(e){return e},p.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},p.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},p.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},f.prototype.convert=function(e){var t=r();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(n.ZERO)>0&&this.m.subTo(t,t),t},f.prototype.revert=function(e){var t=r();return e.copyTo(t),this.reduce(t),t},f.prototype.reduce=function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t<this.m.t;++t){var n=32767&e[t],r=n*this.mpl+((n*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(e[n=t+this.m.t]+=this.m.am(0,r,e,t,0,this.m.t);e[n]>=e.DV;)e[n]-=e.DV,e[++n]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},f.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},f.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},n.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s},n.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0},n.prototype.fromString=function(e,t){var r;if(16==t)r=4;else if(8==t)r=3;else if(256==t)r=8;else if(2==t)r=1;else if(32==t)r=5;else{if(4!=t)return void this.fromRadix(e,t);r=2}this.t=0,this.s=0;for(var a=e.length,o=!1,i=0;--a>=0;){var s=8==r?255&e[a]:l(e,a);s<0?"-"==e.charAt(a)&&(o=!0):(o=!1,0==i?this[this.t++]=s:i+r>this.DB?(this[this.t-1]|=(s&(1<<this.DB-i)-1)<<i,this[this.t++]=s>>this.DB-i):this[this.t-1]|=s<<i,(i+=r)>=this.DB&&(i-=this.DB))}8==r&&0!=(128&e[0])&&(this.s=-1,i>0&&(this[this.t-1]|=(1<<this.DB-i)-1<<i)),this.clamp(),o&&n.ZERO.subTo(this,this)},n.prototype.clamp=function(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t},n.prototype.dlShiftTo=function(e,t){var n;for(n=this.t-1;n>=0;--n)t[n+e]=this[n];for(n=e-1;n>=0;--n)t[n]=0;t.t=this.t+e,t.s=this.s},n.prototype.drShiftTo=function(e,t){for(var n=e;n<this.t;++n)t[n-e]=this[n];t.t=Math.max(this.t-e,0),t.s=this.s},n.prototype.lShiftTo=function(e,t){var n,r=e%this.DB,a=this.DB-r,o=(1<<a)-1,i=Math.floor(e/this.DB),s=this.s<<r&this.DM;for(n=this.t-1;n>=0;--n)t[n+i+1]=this[n]>>a|s,s=(this[n]&o)<<r;for(n=i-1;n>=0;--n)t[n]=0;t[i]=s,t.t=this.t+i+1,t.s=this.s,t.clamp()},n.prototype.rShiftTo=function(e,t){t.s=this.s;var n=Math.floor(e/this.DB);if(n>=this.t)t.t=0;else{var r=e%this.DB,a=this.DB-r,o=(1<<r)-1;t[0]=this[n]>>r;for(var i=n+1;i<this.t;++i)t[i-n-1]|=(this[i]&o)<<a,t[i-n]=this[i]>>r;r>0&&(t[this.t-n-1]|=(this.s&o)<<a),t.t=this.t-n,t.clamp()}},n.prototype.subTo=function(e,t){for(var n=0,r=0,a=Math.min(e.t,this.t);n<a;)r+=this[n]-e[n],t[n++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r-=e.s;n<this.t;)r+=this[n],t[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<e.t;)r-=e[n],t[n++]=r&this.DM,r>>=this.DB;r-=e.s}t.s=r<0?-1:0,r<-1?t[n++]=this.DV+r:r>0&&(t[n++]=r),t.t=n,t.clamp()},n.prototype.multiplyTo=function(e,t){var r=this.abs(),a=e.abs(),o=r.t;for(t.t=o+a.t;--o>=0;)t[o]=0;for(o=0;o<a.t;++o)t[o+r.t]=r.am(0,a[o],t,o,0,r.t);t.s=0,t.clamp(),this.s!=e.s&&n.ZERO.subTo(t,t)},n.prototype.squareTo=function(e){for(var t=this.abs(),n=e.t=2*t.t;--n>=0;)e[n]=0;for(n=0;n<t.t-1;++n){var r=t.am(n,t[n],e,2*n,0,1);(e[n+t.t]+=t.am(n+1,2*t[n],e,2*n+1,r,t.t-n-1))>=t.DV&&(e[n+t.t]-=t.DV,e[n+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(n,t[n],e,2*n,0,1)),e.s=0,e.clamp()},n.prototype.divRemTo=function(e,t,a){var o=e.abs();if(!(o.t<=0)){var i=this.abs();if(i.t<o.t)return null!=t&&t.fromInt(0),void(null!=a&&this.copyTo(a));null==a&&(a=r());var s=r(),u=this.s,l=e.s,c=this.DB-d(o[o.t-1]);c>0?(o.lShiftTo(c,s),i.lShiftTo(c,a)):(o.copyTo(s),i.copyTo(a));var p=s.t,f=s[p-1];if(0!=f){var h=f*(1<<this.F1)+(p>1?s[p-2]>>this.F2:0),m=this.FV/h,_=(1<<this.F1)/h,y=1<<this.F2,g=a.t,v=g-p,b=null==t?r():t;for(s.dlShiftTo(v,b),a.compareTo(b)>=0&&(a[a.t++]=1,a.subTo(b,a)),n.ONE.dlShiftTo(p,b),b.subTo(s,s);s.t<p;)s[s.t++]=0;for(;--v>=0;){var w=a[--g]==f?this.DM:Math.floor(a[g]*m+(a[g-1]+y)*_);if((a[g]+=s.am(0,w,a,v,0,p))<w)for(s.dlShiftTo(v,b),a.subTo(b,a);a[g]<--w;)a.subTo(b,a)}null!=t&&(a.drShiftTo(p,t),u!=l&&n.ZERO.subTo(t,t)),a.t=p,a.clamp(),c>0&&a.rShiftTo(c,a),u<0&&n.ZERO.subTo(a,a)}}},n.prototype.invDigit=function(){if(this.t<1)return 0;var e=this[0];if(0==(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},n.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},n.prototype.exp=function(e,t){if(e>4294967295||e<1)return n.ONE;var a=r(),o=r(),i=t.convert(this),s=d(e)-1;for(i.copyTo(a);--s>=0;)if(t.sqrTo(a,o),(e&1<<s)>0)t.mulTo(o,i,a);else{var u=a;a=o,o=u}return t.revert(a)},n.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)return this.toRadix(e);t=2}var n,r=(1<<t)-1,a=!1,o="",i=this.t,s=this.DB-i*this.DB%t;if(i-- >0)for(s<this.DB&&(n=this[i]>>s)>0&&(a=!0,o=u(n));i>=0;)s<t?(n=(this[i]&(1<<s)-1)<<t-s,n|=this[--i]>>(s+=this.DB-t)):(n=this[i]>>(s-=t)&r,s<=0&&(s+=this.DB,--i)),n>0&&(a=!0),a&&(o+=u(n));return a?o:"0"},n.prototype.negate=function(){var e=r();return n.ZERO.subTo(this,e),e},n.prototype.abs=function(){return this.s<0?this.negate():this},n.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var n=this.t;if(0!=(t=n-e.t))return this.s<0?-t:t;for(;--n>=0;)if(0!=(t=this[n]-e[n]))return t;return 0},n.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+d(this[this.t-1]^this.s&this.DM)},n.prototype.mod=function(e){var t=r();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(n.ZERO)>0&&e.subTo(t,t),t},n.prototype.modPowInt=function(e,t){var n;return n=e<256||t.isEven()?new p(t):new f(t),this.exp(e,n)},n.ZERO=c(0),n.ONE=c(1),b.prototype.convert=w,b.prototype.revert=w,b.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n)},b.prototype.sqrTo=function(e,t){e.squareTo(t)},M.prototype.convert=function(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=r();return e.copyTo(t),this.reduce(t),t},M.prototype.revert=function(e){return e},M.prototype.reduce=function(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)},M.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},M.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)};var L,T,k,x=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],E=(1<<26)/x[x.length-1];function S(){var e;e=(new Date).getTime(),T[k++]^=255&e,T[k++]^=e>>8&255,T[k++]^=e>>16&255,T[k++]^=e>>24&255,k>=P&&(k-=P)}if(n.prototype.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},n.prototype.toRadix=function(e){if(null==e&&(e=10),0==this.signum()||e<2||e>36)return"0";var t=this.chunkSize(e),n=Math.pow(e,t),a=c(n),o=r(),i=r(),s="";for(this.divRemTo(a,o,i);o.signum()>0;)s=(n+i.intValue()).toString(e).substr(1)+s,o.divRemTo(a,o,i);return i.intValue().toString(e)+s},n.prototype.fromRadix=function(e,t){this.fromInt(0),null==t&&(t=10);for(var r=this.chunkSize(t),a=Math.pow(t,r),o=!1,i=0,s=0,u=0;u<e.length;++u){var c=l(e,u);c<0?"-"==e.charAt(u)&&0==this.signum()&&(o=!0):(s=t*s+c,++i>=r&&(this.dMultiply(a),this.dAddOffset(s,0),i=0,s=0))}i>0&&(this.dMultiply(Math.pow(t,i)),this.dAddOffset(s,0)),o&&n.ZERO.subTo(this,this)},n.prototype.fromNumber=function(e,t,r){if("number"==typeof t)if(e<2)this.fromInt(1);else for(this.fromNumber(e,r),this.testBit(e-1)||this.bitwiseTo(n.ONE.shiftLeft(e-1),m,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(n.ONE.shiftLeft(e-1),this);else{var a=new Array,o=7&e;a.length=1+(e>>3),t.nextBytes(a),o>0?a[0]&=(1<<o)-1:a[0]=0,this.fromString(a,256)}},n.prototype.bitwiseTo=function(e,t,n){var r,a,o=Math.min(e.t,this.t);for(r=0;r<o;++r)n[r]=t(this[r],e[r]);if(e.t<this.t){for(a=e.s&this.DM,r=o;r<this.t;++r)n[r]=t(this[r],a);n.t=this.t}else{for(a=this.s&this.DM,r=o;r<e.t;++r)n[r]=t(a,e[r]);n.t=e.t}n.s=t(this.s,e.s),n.clamp()},n.prototype.changeBit=function(e,t){var r=n.ONE.shiftLeft(e);return this.bitwiseTo(r,t,r),r},n.prototype.addTo=function(e,t){for(var n=0,r=0,a=Math.min(e.t,this.t);n<a;)r+=this[n]+e[n],t[n++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r+=e.s;n<this.t;)r+=this[n],t[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<e.t;)r+=e[n],t[n++]=r&this.DM,r>>=this.DB;r+=e.s}t.s=r<0?-1:0,r>0?t[n++]=r:r<-1&&(t[n++]=this.DV+r),t.t=n,t.clamp()},n.prototype.dMultiply=function(e){this[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},n.prototype.dAddOffset=function(e,t){if(0!=e){for(;this.t<=t;)this[this.t++]=0;for(this[t]+=e;this[t]>=this.DV;)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}},n.prototype.multiplyLowerTo=function(e,t,n){var r,a=Math.min(this.t+e.t,t);for(n.s=0,n.t=a;a>0;)n[--a]=0;for(r=n.t-this.t;a<r;++a)n[a+this.t]=this.am(0,e[a],n,a,0,this.t);for(r=Math.min(e.t,t);a<r;++a)this.am(0,e[a],n,a,0,t-a);n.clamp()},n.prototype.multiplyUpperTo=function(e,t,n){--t;var r=n.t=this.t+e.t-t;for(n.s=0;--r>=0;)n[r]=0;for(r=Math.max(t-this.t,0);r<e.t;++r)n[this.t+r-t]=this.am(t-r,e[r],n,0,0,this.t+r-t);n.clamp(),n.drShiftTo(1,n)},n.prototype.modInt=function(e){if(e<=0)return 0;var t=this.DV%e,n=this.s<0?e-1:0;if(this.t>0)if(0==t)n=this[0]%e;else for(var r=this.t-1;r>=0;--r)n=(t*n+this[r])%e;return n},n.prototype.millerRabin=function(e){var t=this.subtract(n.ONE),a=t.getLowestSetBit();if(a<=0)return!1;var o=t.shiftRight(a);(e=e+1>>1)>x.length&&(e=x.length);for(var i=r(),s=0;s<e;++s){i.fromInt(x[Math.floor(Math.random()*x.length)]);var u=i.modPow(o,this);if(0!=u.compareTo(n.ONE)&&0!=u.compareTo(t)){for(var l=1;l++<a&&0!=u.compareTo(t);)if(0==(u=u.modPowInt(2,this)).compareTo(n.ONE))return!1;if(0!=u.compareTo(t))return!1}}return!0},n.prototype.clone=function(){var e=r();return this.copyTo(e),e},n.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},n.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},n.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},n.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},n.prototype.toByteArray=function(){var e=this.t,t=new Array;t[0]=this.s;var n,r=this.DB-e*this.DB%8,a=0;if(e-- >0)for(r<this.DB&&(n=this[e]>>r)!=(this.s&this.DM)>>r&&(t[a++]=n|this.s<<this.DB-r);e>=0;)r<8?(n=(this[e]&(1<<r)-1)<<8-r,n|=this[--e]>>(r+=this.DB-8)):(n=this[e]>>(r-=8)&255,r<=0&&(r+=this.DB,--e)),0!=(128&n)&&(n|=-256),0==a&&(128&this.s)!=(128&n)&&++a,(a>0||n!=this.s)&&(t[a++]=n);return t},n.prototype.equals=function(e){return 0==this.compareTo(e)},n.prototype.min=function(e){return this.compareTo(e)<0?this:e},n.prototype.max=function(e){return this.compareTo(e)>0?this:e},n.prototype.and=function(e){var t=r();return this.bitwiseTo(e,h,t),t},n.prototype.or=function(e){var t=r();return this.bitwiseTo(e,m,t),t},n.prototype.xor=function(e){var t=r();return this.bitwiseTo(e,_,t),t},n.prototype.andNot=function(e){var t=r();return this.bitwiseTo(e,y,t),t},n.prototype.not=function(){for(var e=r(),t=0;t<this.t;++t)e[t]=this.DM&~this[t];return e.t=this.t,e.s=~this.s,e},n.prototype.shiftLeft=function(e){var t=r();return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t},n.prototype.shiftRight=function(e){var t=r();return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t},n.prototype.getLowestSetBit=function(){for(var e=0;e<this.t;++e)if(0!=this[e])return e*this.DB+g(this[e]);return this.s<0?this.t*this.DB:-1},n.prototype.bitCount=function(){for(var e=0,t=this.s&this.DM,n=0;n<this.t;++n)e+=v(this[n]^t);return e},n.prototype.testBit=function(e){var t=Math.floor(e/this.DB);return t>=this.t?0!=this.s:0!=(this[t]&1<<e%this.DB)},n.prototype.setBit=function(e){return this.changeBit(e,m)},n.prototype.clearBit=function(e){return this.changeBit(e,y)},n.prototype.flipBit=function(e){return this.changeBit(e,_)},n.prototype.add=function(e){var t=r();return this.addTo(e,t),t},n.prototype.subtract=function(e){var t=r();return this.subTo(e,t),t},n.prototype.multiply=function(e){var t=r();return this.multiplyTo(e,t),t},n.prototype.divide=function(e){var t=r();return this.divRemTo(e,t,null),t},n.prototype.remainder=function(e){var t=r();return this.divRemTo(e,null,t),t},n.prototype.divideAndRemainder=function(e){var t=r(),n=r();return this.divRemTo(e,t,n),new Array(t,n)},n.prototype.modPow=function(e,t){var n,a,o=e.bitLength(),i=c(1);if(o<=0)return i;n=o<18?1:o<48?3:o<144?4:o<768?5:6,a=o<8?new p(t):t.isEven()?new M(t):new f(t);var s=new Array,u=3,l=n-1,h=(1<<n)-1;if(s[1]=a.convert(this),n>1){var m=r();for(a.sqrTo(s[1],m);u<=h;)s[u]=r(),a.mulTo(m,s[u-2],s[u]),u+=2}var _,y,g=e.t-1,v=!0,b=r();for(o=d(e[g])-1;g>=0;){for(o>=l?_=e[g]>>o-l&h:(_=(e[g]&(1<<o+1)-1)<<l-o,g>0&&(_|=e[g-1]>>this.DB+o-l)),u=n;0==(1&_);)_>>=1,--u;if((o-=u)<0&&(o+=this.DB,--g),v)s[_].copyTo(i),v=!1;else{for(;u>1;)a.sqrTo(i,b),a.sqrTo(b,i),u-=2;u>0?a.sqrTo(i,b):(y=i,i=b,b=y),a.mulTo(b,s[_],i)}for(;g>=0&&0==(e[g]&1<<o);)a.sqrTo(i,b),y=i,i=b,b=y,--o<0&&(o=this.DB-1,--g)}return a.revert(i)},n.prototype.modInverse=function(e){var t=e.isEven();if(this.isEven()&&t||0==e.signum())return n.ZERO;for(var r=e.clone(),a=this.clone(),o=c(1),i=c(0),s=c(0),u=c(1);0!=r.signum();){for(;r.isEven();)r.rShiftTo(1,r),t?(o.isEven()&&i.isEven()||(o.addTo(this,o),i.subTo(e,i)),o.rShiftTo(1,o)):i.isEven()||i.subTo(e,i),i.rShiftTo(1,i);for(;a.isEven();)a.rShiftTo(1,a),t?(s.isEven()&&u.isEven()||(s.addTo(this,s),u.subTo(e,u)),s.rShiftTo(1,s)):u.isEven()||u.subTo(e,u),u.rShiftTo(1,u);r.compareTo(a)>=0?(r.subTo(a,r),t&&o.subTo(s,o),i.subTo(u,i)):(a.subTo(r,a),t&&s.subTo(o,s),u.subTo(i,u))}return 0!=a.compareTo(n.ONE)?n.ZERO:u.compareTo(e)>=0?u.subtract(e):u.signum()<0?(u.addTo(e,u),u.signum()<0?u.add(e):u):u},n.prototype.pow=function(e){return this.exp(e,new b)},n.prototype.gcd=function(e){var t=this.s<0?this.negate():this.clone(),n=e.s<0?e.negate():e.clone();if(t.compareTo(n)<0){var r=t;t=n,n=r}var a=t.getLowestSetBit(),o=n.getLowestSetBit();if(o<0)return t;for(a<o&&(o=a),o>0&&(t.rShiftTo(o,t),n.rShiftTo(o,n));t.signum()>0;)(a=t.getLowestSetBit())>0&&t.rShiftTo(a,t),(a=n.getLowestSetBit())>0&&n.rShiftTo(a,n),t.compareTo(n)>=0?(t.subTo(n,t),t.rShiftTo(1,t)):(n.subTo(t,n),n.rShiftTo(1,n));return o>0&&n.lShiftTo(o,n),n},n.prototype.isProbablePrime=function(e){var t,n=this.abs();if(1==n.t&&n[0]<=x[x.length-1]){for(t=0;t<x.length;++t)if(n[0]==x[t])return!0;return!1}if(n.isEven())return!1;for(t=1;t<x.length;){for(var r=x[t],a=t+1;a<x.length&&r<E;)r*=x[a++];for(r=n.modInt(r);t<a;)if(r%x[t++]==0)return!1}return n.millerRabin(e)},n.prototype.square=function(){var e=r();return this.squareTo(e),e},n.prototype.Barrett=M,null==T){var O;if(T=new Array,k=0,"undefined"!=typeof window&&window.crypto)if(window.crypto.getRandomValues){var D=new Uint8Array(32);for(window.crypto.getRandomValues(D),O=0;O<32;++O)T[k++]=D[O]}else if("Netscape"==navigator.appName&&navigator.appVersion<"5"){var Y=window.crypto.random(32);for(O=0;O<Y.length;++O)T[k++]=255&Y.charCodeAt(O)}for(;k<P;)O=Math.floor(65536*Math.random()),T[k++]=O>>>8,T[k++]=255&O;k=0,S()}function A(){if(null==L){for(S(),(L=new j).init(T),k=0;k<T.length;++k)T[k]=0;k=0}return L.next()}function C(){}function j(){this.i=0,this.j=0,this.S=new Array}C.prototype.nextBytes=function(e){var t;for(t=0;t<e.length;++t)e[t]=A()},j.prototype.init=function(e){var t,n,r;for(t=0;t<256;++t)this.S[t]=t;for(n=0,t=0;t<256;++t)r=this.S[t],this.S[t]=this.S[n=n+this.S[t]+e[t%e.length]&255],this.S[n]=r;this.i=0,this.j=0},j.prototype.next=function(){var e;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,e=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=e,this.S[e+this.S[this.i]&255]};var P=256;e.exports={default:n,BigInteger:n,SecureRandom:C}}).call(Fe)})),Je={sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",ripemd160:"3021300906052b2403020105000414"},Ke={sha256:Be};function $e(e,t){if(this.n=null,this.e=0,!(null!=e&&null!=t&&e.length>0&&t.length>0))throw new Error("Invalid key data");this.n=new qe.BigInteger(e,16),this.e=parseInt(t,16)}$e.prototype.verify=function(e,t){t=t.replace(/[^0-9a-f]|[\s\n]]/gi,"");var n=new qe.BigInteger(t,16);if(n.bitLength()>this.n.bitLength())throw new Error("Signature does not match with the key modulus.");var r=function(e){for(var t in Je){var n=Je[t],r=n.length;if(e.substring(0,r)===n)return{alg:t,hash:e.substring(r)}}return[]}(n.modPowInt(this.e,this.n).toString(16).replace(/^1f+00/,""));if(0===r.length)return!1;if(!Ke.hasOwnProperty(r.alg))throw new Error("Hashing algorithm is not supported.");var a=Ke[r.alg](e).toString();return r.hash===a};for(var Xe=[],Ze=[],Qe="undefined"!=typeof Uint8Array?Uint8Array:Array,et="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",tt=0,nt=et.length;tt<nt;++tt)Xe[tt]=et[tt],Ze[et.charCodeAt(tt)]=tt;Ze["-".charCodeAt(0)]=62,Ze["_".charCodeAt(0)]=63;var rt=function(e){var t,n,r=function(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}(e),a=r[0],o=r[1],i=new Qe(function(e,t,n){return 3*(t+n)/4-n}(0,a,o)),s=0,u=o>0?a-4:a;for(n=0;n<u;n+=4)t=Ze[e.charCodeAt(n)]<<18|Ze[e.charCodeAt(n+1)]<<12|Ze[e.charCodeAt(n+2)]<<6|Ze[e.charCodeAt(n+3)],i[s++]=t>>16&255,i[s++]=t>>8&255,i[s++]=255&t;return 2===o&&(t=Ze[e.charCodeAt(n)]<<2|Ze[e.charCodeAt(n+1)]>>4,i[s++]=255&t),1===o&&(t=Ze[e.charCodeAt(n)]<<10|Ze[e.charCodeAt(n+1)]<<4|Ze[e.charCodeAt(n+2)]>>2,i[s++]=t>>8&255,i[s++]=255&t),i};function at(e){var t=e.length%4;return 0===t?e:e+new Array(4-t+1).join("=")}function ot(e){return e=at(e).replace(/\-/g,"+").replace(/_/g,"/"),decodeURIComponent(function(e){for(var t="",n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}(rt(e)).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))}function it(e){return function(e){for(var t="",n=0;n<e.length;n++){var r=e[n].toString(16);t+=2===r.length?r:"0"+r}return t}(rt(at(e)))}var st=ze((function(e){var t,n;t=Fe,n=function(){function e(e){var t=[];if(0===e.length)return"";if("string"!=typeof e[0])throw new TypeError("Url must be a string. Received "+e[0]);if(e[0].match(/^[^/:]+:\/*$/)&&e.length>1){var n=e.shift();e[0]=n+e[0]}e[0]=e[0].match(/^file:\/\/\//)?e[0].replace(/^([^/:]+):\/*/,"$1:///"):e[0].replace(/^([^/:]+):\/*/,"$1://");for(var r=0;r<e.length;r++){var a=e[r];if("string"!=typeof a)throw new TypeError("Url must be a string. Received "+a);""!==a&&(r>0&&(a=a.replace(/^[\/]+/,"")),a=a.replace(/[\/]+$/,r<e.length-1?"":"/"),t.push(a))}var o=t.join("/"),i=(o=o.replace(/\/(\?|&|#[^!])/g,"$1")).split("?");return i.shift()+(i.length>0?"?":"")+i.join("&")}return function(){return e("object"==typeof arguments[0]?arguments[0]:[].slice.call(arguments))}},e.exports?e.exports=n():t.urljoin=n()}));function ut(e,t){return t=t||{},new Promise((function(n,r){var a=new XMLHttpRequest,o=[],i=[],s={},u=function(){return{ok:2==(a.status/100|0),statusText:a.statusText,status:a.status,url:a.responseURL,text:function(){return Promise.resolve(a.responseText)},json:function(){return Promise.resolve(JSON.parse(a.responseText))},blob:function(){return Promise.resolve(new Blob([a.response]))},clone:u,headers:{keys:function(){return o},entries:function(){return i},get:function(e){return s[e.toLowerCase()]},has:function(e){return e.toLowerCase()in s}}}};for(var l in a.open(t.method||"get",e,!0),a.onload=function(){a.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(e,t,n){o.push(t=t.toLowerCase()),i.push([t,n]),s[t]=s[t]?s[t]+","+n:n})),n(u())},a.onerror=r,a.withCredentials="include"==t.credentials,t.headers)a.setRequestHeader(l,t.headers[l]);a.send(t.body||null)}))}function lt(e){if(e.ok)return e.json();var t=new Error(e.statusText);return t.response=e,Promise.reject(t)}function ct(e){this.name="ConfigurationError",this.message=e||""}function dt(e){this.name="TokenValidationError",this.message=e||""}ct.prototype=Error.prototype,dt.prototype=Error.prototype;var pt=function(){function e(){}var t=e.prototype;return t.get=function(){return null},t.has=function(){return null},t.set=function(){return null},e}();Ue.polyfill();var ft=function(e){return"number"==typeof e},ht=function(){return new Date};function mt(e){var t=e||{};if(this.jwksCache=t.jwksCache||new pt,this.expectedAlg=t.expectedAlg||"RS256",this.issuer=t.issuer,this.audience=t.audience,this.leeway=0===t.leeway?0:t.leeway||60,this.jwksURI=t.jwksURI,this.maxAge=t.maxAge,this.__clock="function"==typeof t.__clock?t.__clock:ht,this.leeway<0||this.leeway>300)throw new ct("The leeway should be positive and lower than five minutes.");if("RS256"!==this.expectedAlg)throw new ct('Signature algorithm of "'+this.expectedAlg+'" is not supported. Expected the ID token to be signed with "RS256".')}function _t(e,t){this.plugins=t;for(var n=0;n<this.plugins.length;n++){if(this.plugins[n].version!==se.raw){var r="";throw this.plugins[n].constructor&&this.plugins[n].constructor.name&&(r=this.plugins[n].constructor.name),new Error("Plugin "+r+" version ("+this.plugins[n].version+") is not compatible with the SDK version ("+se.raw+")")}this.plugins[n].setWebAuth(e)}}mt.prototype.verify=function(e,t,n){if(!n&&t&&"function"==typeof t&&(n=t,t=void 0),!e)return n(new dt("ID token is required but missing"),null);var r=this.decode(e);if(r instanceof Error)return n(new dt("ID token could not be decoded"),null);var a=r.encoded.header+"."+r.encoded.payload,o=it(r.encoded.signature),i=r.header.alg,s=r.header.kid,u=r.payload.aud,l=r.payload.sub,c=r.payload.iss,d=r.payload.exp,p=r.payload.nbf,f=r.payload.iat,h=r.payload.azp,m=r.payload.auth_time,_=r.payload.nonce,y=this.__clock(),g=this;if(g.expectedAlg!==i)return n(new dt('Signature algorithm of "'+i+'" is not supported. Expected the ID token to be signed with "RS256".'),null);this.getRsaVerifier(c,s,(function(e,i){if(e)return n(e,null);if(!i.verify(a,o))return n(new dt("Invalid ID token signature."),null);if(!c||"string"!=typeof c)return n(new dt("Issuer (iss) claim must be a string present in the ID token"),null);if(g.issuer!==c)return n(new dt('Issuer (iss) claim mismatch in the ID token, expected "'+g.issuer+'", found "'+c+'"'),null);if(!l||"string"!=typeof l)return n(new dt("Subject (sub) claim must be a string present in the ID token"),null);if(!u||"string"!=typeof u&&!Array.isArray(u))return n(new dt("Audience (aud) claim must be a string or array of strings present in the ID token"),null);if(Array.isArray(u)&&!u.includes(g.audience))return n(new dt('Audience (aud) claim mismatch in the ID token; expected "'+g.audience+'" but was not one of "'+u.join(", ")+'"'),null);if("string"==typeof u&&g.audience!==u)return n(new dt('Audience (aud) claim mismatch in the ID token; expected "'+g.audience+'" but found "'+u+'"'),null);if(t){if(!_||"string"!=typeof _)return n(new dt("Nonce (nonce) claim must be a string present in the ID token"),null);if(_!==t)return n(new dt('Nonce (nonce) claim value mismatch in the ID token; expected "'+t+'", found "'+_+'"'),null)}if(Array.isArray(u)&&u.length>1){if(!h||"string"!=typeof h)return n(new dt("Authorized Party (azp) claim must be a string present in the ID token when Audience (aud) claim has multiple values"),null);if(h!==g.audience)return n(new dt('Authorized Party (azp) claim mismatch in the ID token; expected "'+g.audience+'", found "'+h+'"'),null)}if(!d||!ft(d))return n(new dt("Expiration Time (exp) claim must be a number present in the ID token"),null);if(!f||!ft(f))return n(new dt("Issued At (iat) claim must be a number present in the ID token"),null);var s=d+g.leeway,v=new Date(0);if(v.setUTCSeconds(s),y>v)return n(new dt('Expiration Time (exp) claim error in the ID token; current time "'+y+'" is after expiration time "'+v+'"'),null);if(p&&ft(p)){var b=p-g.leeway,w=new Date(0);if(w.setUTCSeconds(b),y<w)return n(new dt('Not Before Time (nbf) claim error in the ID token; current time "'+y+'" is before the not before time "'+w+'"'),null)}if(g.maxAge){if(!m||!ft(m))return n(new dt("Authentication Time (auth_time) claim must be a number present in the ID token when Max Age (max_age) is specified"),null);var M=m+g.maxAge+g.leeway,L=new Date(0);if(L.setUTCSeconds(M),y>L)return n(new dt('Authentication Time (auth_time) claim in the ID token indicates that too much time has passed since the last end-user authentication. Current time "'+y+'" is after last auth time at "'+L+'"'),null)}return n(null,r.payload)}))},mt.prototype.getRsaVerifier=function(e,t,n){var r=this,a=e+t;Promise.resolve(this.jwksCache.has(a)).then((function(n){return n?r.jwksCache.get(a):(o={jwksURI:r.jwksURI,iss:e,kid:t},("undefined"==typeof fetch?ut:fetch)(o.jwksURI||st(o.iss,".well-known","jwks.json")).then(lt).then((function(e){var t,n,r,a=null;for(t=0;t<e.keys.length&&null===a;t++)(n=e.keys[t]).kid===o.kid&&(a=n);if(!a)throw new Error('Could not find a public key for Key ID (kid) "'+o.kid+'"');return{modulus:it((r=a).n),exp:it(r.e)}})).catch((function(e){throw e})));var o})).then((function(e){if(!e||!e.modulus||!e.exp)throw new Error("Empty keyInfo in response");return Promise.resolve(r.jwksCache.set(a,e)).then((function(){n&&n(null,new $e(e.modulus,e.exp))}))})).catch((function(e){n&&n(e)}))},mt.prototype.decode=function(e){var t,n,r=e.split(".");if(3!==r.length)return new dt("Cannot decode a malformed JWT");try{t=JSON.parse(ot(r[0])),n=JSON.parse(ot(r[1]))}catch(e){return new dt("Token header or payload is not valid JSON")}return{header:t,payload:n,encoded:{header:r[0],payload:r[1],signature:r[2]}}},mt.prototype.validateAccessToken=function(e,t,n,r){if(this.expectedAlg!==t)return r(new dt('Signature algorithm of "'+t+'" is not supported. Expected "'+this.expectedAlg+'"'));var a,o=Be(e),i=Ge.stringify(o),s=i.substring(0,i.length/2),u=Ge.parse(s),l=Ve.stringify(u);return r((a={"+":"-","/":"_","=":""},l.replace(/[+/=]/g,(function(e){return a[e]}))!==n?new dt("Invalid access_token"):null))},_t.prototype.get=function(e){for(var t=0;t<this.plugins.length;t++)if(this.plugins[t].supports(e))return this.plugins[t].init();return null};var yt=function(e){var t=new Uint8Array(e),n=[],r="0123456789ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvwxyz-._~",a=ke.getWindow().crypto||ke.getWindow().msCrypto;if(!a)return null;for(var o=a.getRandomValues(t),i=0;i<o.length;i++)n.push(r[o[i]%r.length]);return n.join("")};function gt(e){var t=e.transaction||{};this.namespace=t.namespace||"com.auth0.auth.",this.keyLength=t.keyLength||32,this.storage=new Ye(e),this.options=e}function vt(e){if(this.url=e.url,this.callback=e.callback,this.timeout=e.timeout||6e4,this.timeoutCallback=e.timeoutCallback||null,this.eventListenerType=e.eventListenerType||"message",this.iframe=null,this.timeoutHandle=null,this._destroyTimeout=null,this.transientMessageEventListener=null,this.proxyEventListener=null,this.eventValidator=e.eventValidator||{isValid:function(){return!0}},"function"!=typeof this.callback)throw new Error("options.callback must be a function")}function bt(e){this.webAuth=e,this.warn=new Oe(e.baseOptions)}function wt(e,t){this.webAuth=e,this.baseOptions=t,this.request=new Le(t),this.webMessageHandler=new bt(e),this.storage=new Ye(t)}function Mt(e,t){return["co/verifier",encodeURIComponent(e),encodeURIComponent(t)].join("/")}function Lt(e,t){this.webAuth=e,this.baseOptions=t,this.crossOriginAuthentication=new wt(e,this.baseOptions),this.warn=new Oe({disableWarnings:!!t._disableDeprecationWarnings})}gt.prototype.process=function(e){if(!e.responseType)throw new Error("responseType is required");var t=e.realm||e.connection,n=-1!==e.responseType.indexOf("id_token"),r=this.generateTransaction(e.appState,e.state,e.nonce,t,n,e.organization);return e.state||(e.state=r.state),n&&!e.nonce&&(e.nonce=r.nonce),e},gt.prototype.generateTransaction=function(e,t,n,r,a,o){if(t=t||yt(this.keyLength),n=n||(a?yt(this.keyLength):null),ke.getWindow().location.host!==this.options.domain){var i={nonce:n,appState:e,state:t,lastUsedConnection:r};o&&(i.organization=o),this.storage.setItem(this.namespace+t,i,{expires:1/48})}return{state:t,nonce:n}},gt.prototype.getStoredTransaction=function(e){var t;return t=this.storage.getItem(this.namespace+e),this.clearTransaction(e),t},gt.prototype.clearTransaction=function(e){this.storage.removeItem(this.namespace+e)},vt.prototype.init=function(){var e=this,t=ke.getWindow();switch(this.iframe=t.document.createElement("iframe"),this.iframe.style.display="none",this.proxyEventListener=function(t){e.eventListener(t)},this.eventListenerType){case"message":this.eventSourceObject=t;break;case"load":this.eventSourceObject=this.iframe;break;default:throw new Error("Unsupported event listener type: "+this.eventListenerType)}this.eventSourceObject.addEventListener(this.eventListenerType,this.proxyEventListener,!1),t.document.body.appendChild(this.iframe),this.iframe.src=this.url,this.timeoutHandle=setTimeout((function(){e.timeoutHandler()}),this.timeout)},vt.prototype.eventListener=function(e){var t={event:e,sourceObject:this.eventSourceObject};this.eventValidator.isValid(t)&&(this.destroy(),this.callback(t))},vt.prototype.timeoutHandler=function(){this.destroy(),this.timeoutCallback&&this.timeoutCallback()},vt.prototype.destroy=function(){var e=this;clearTimeout(this.timeoutHandle),this._destroyTimeout=setTimeout((function(){e.eventSourceObject.removeEventListener(e.eventListenerType,e.proxyEventListener,!1),e.iframe.parentNode&&e.iframe.parentNode.removeChild(e.iframe)}),0)},bt.prototype.run=function(e,t){var n=this;e.responseMode="web_message",e.prompt="none";var r=ke.getOrigin(),a=be.getOriginFromUrl(e.redirectUri);if(a&&r!==a)return t({error:"origin_mismatch",error_description:"The redirectUri's origin ("+a+") should match the window's origin ("+r+")."});!function(e,t,n){new vt({url:e,eventListenerType:"message",callback:function(e){n(null,e)},timeout:t.timeout,eventValidator:{isValid:function(e){return"authorization_response"===e.event.data.type&&t.state===e.event.data.response.state}},timeoutCallback:function(){n({error:"timeout",error_description:"Timeout during executing web_message communication",state:t.state})}}).init()}(this.webAuth.client.buildAuthorizeUrl(e),e,(function(r,a){var o=r;if(!r&&a.event.data.response.error&&(o=a.event.data.response),!o){var i=a.event.data.response;return n.webAuth.validateAuthenticationResponse(e,i,t)}return"consent_required"===o.error&&"localhost"===ke.getWindow().location.hostname&&n.warn.warning("Consent Required. Consent can't be skipped on localhost. Read more here: https://auth0.com/docs/api-auth/user-consent#skipping-consent-for-first-party-clients"),n.webAuth.transactionManager.clearTransaction(o.state),t(be.pick(o,["error","error_description"]))}))},wt.prototype.login=function(e,t){var n=this,r=i(this.baseOptions.rootUrl,"/co/authenticate");e.username=e.username||e.email,delete e.email;var a={client_id:e.clientID||this.baseOptions.clientID,username:e.username};e.password&&(a.password=e.password),e.otp&&(a.otp=e.otp);var o=e.realm||this.baseOptions.realm;if(o){var s=e.credentialType||this.baseOptions.credentialType||"http://auth0.com/oauth/grant-type/password-realm";a.realm=o,a.credential_type=s}else a.credential_type="password";this.request.post(r).withCredentials().send(a).end((function(r,a){if(r){var o=r.response&&r.response.body||{error:"request_error",error_description:JSON.stringify(r)};return Pe(t,{forceLegacyError:!0})(o)}function i(){var r=!0===e.popup;e=be.blacklist(e,["password","credentialType","otp","popup","onRedirecting"]);var o=be.merge(e).with({loginTicket:a.body.login_ticket}),i=Mt(n.baseOptions.rootUrl,a.body.co_id);n.storage.setItem(i,a.body.co_verifier,{expires:1/96}),r?n.webMessageHandler.run(o,Pe(t,{forceLegacyError:!0})):n.webAuth.authorize(o)}"function"==typeof e.onRedirecting?e.onRedirecting(i):i()}))},wt.prototype.callback=function(){var e=decodeURIComponent(function(e){var t=("&"+ke.getWindow().location.hash.substring(1)).split("&origin=");if(2===t.length)return t.pop().split("&").shift()}()),t=ke.getWindow(),n=this;t.addEventListener("message",(function(e){if("co_verifier_request"===e.data.type){var t=Mt(e.origin,e.data.request.id),r=function(e,t){try{var n=e.getItem(t);return e.removeItem(t),n||""}catch(e){return""}}(n.storage,t);e.source.postMessage({type:"co_verifier_response",response:{verifier:r}},e.origin)}})),t.parent.postMessage({type:"ready"},e)},Lt.prototype.loginWithCredentials=function(e,t){e.realm=e.realm||e.connection,delete e.connection,this.crossOriginAuthentication.login(e,t)},Lt.prototype.signupAndLogin=function(e,t){var n=this;return this.webAuth.client.dbConnection.signup(e,(function(r){return r?t(r):(e.realm=e.realm||e.connection,delete e.connection,n.webAuth.login(e,t))}))};var Tt=o((function(e){var t=function(){function e(e,t,n){e.attachEvent?e.attachEvent("on"+t,n):e.addEventListener&&e.addEventListener(t,n,!1)}function t(e,t,n){e.detachEvent?e.detachEvent("on"+t,n):e.removeEventListener&&e.removeEventListener(t,n,!1)}function n(e){/^https?:\/\//.test(e)||(e=window.location.href);var t=/^(https?:\/\/[\-_a-zA-Z\.0-9:]+)/.exec(e);return t?t[1]:e}var r=function(){if("undefined"==typeof navigator)return!1;var e=-1,t=navigator.userAgent;return"Microsoft Internet Explorer"===navigator.appName?null!=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})").exec(t)&&(e=parseFloat(RegExp.$1)):t.indexOf("Trident")>-1&&null!==new RegExp("rv:([0-9]{2,2}[.0-9]{0,})").exec(t)&&(e=parseFloat(RegExp.$1)),e>=8}();return"undefined"!=typeof window&&window.JSON&&window.JSON.stringify&&window.JSON.parse&&window.postMessage?{open:function(a,o){if(!o)throw"missing required callback argument";var i,s;a.url||(i="missing required 'url' parameter"),a.relay_url||(i="missing required 'relay_url' parameter"),i&&setTimeout((function(){o(i)}),0),a.window_name||(a.window_name=null),a.window_features&&!function(){try{var e=navigator.userAgent;return-1!=e.indexOf("Fennec/")||-1!=e.indexOf("Firefox/")&&-1!=e.indexOf("Android")}catch(e){}return!1}()||(a.window_features=void 0);var u,l=a.origin||n(a.url);if(l!==n(a.relay_url))return setTimeout((function(){o("invalid arguments: origin of url and relay_url must match")}),0);r&&((s=document.createElement("iframe")).setAttribute("src",a.relay_url),s.style.display="none",s.setAttribute("name","__winchan_relay_frame"),document.body.appendChild(s),u=s.contentWindow);var c=a.popup||window.open(a.url,a.window_name,a.window_features);a.popup&&(c.location.href=a.url),u||(u=c);var d=setInterval((function(){c&&c.closed&&(f(),o&&(o("User closed the popup window"),o=null))}),500),p=JSON.stringify({a:"request",d:a.params});function f(){if(s&&document.body.removeChild(s),s=void 0,d&&(d=clearInterval(d)),t(window,"message",h),t(window,"unload",f),c)try{c.close()}catch(e){u.postMessage("die",l)}c=u=void 0}function h(e){if(e.origin===l){try{var t=JSON.parse(e.data)}catch(e){if(o)return o(e);throw e}"ready"===t.a?u.postMessage(p,l):"error"===t.a?(f(),o&&(o(t.d),o=null)):"response"===t.a&&(f(),o&&(o(null,t.d),o=null))}}return e(window,"unload",f),e(window,"message",h),{originalPopup:c,close:f,focus:function(){if(c)try{c.focus()}catch(e){}}}},onOpen:function(n){var a="*",o=r?function(){for(var e=window.opener.frames,t=e.length-1;t>=0;t--)try{if(e[t].location.protocol===window.location.protocol&&e[t].location.host===window.location.host&&"__winchan_relay_frame"===e[t].name)return e[t]}catch(e){}}():window.opener;if(!o)throw"can't find relay frame";function i(e){e=JSON.stringify(e),r?o.doPost(e,a):o.postMessage(e,a)}function s(e){if("die"===e.data)try{window.close()}catch(e){}}e(r?o:window,"message",(function e(r){var o;try{o=JSON.parse(r.data)}catch(e){}o&&"request"===o.a&&(t(window,"message",e),a=r.origin,n&&setTimeout((function(){n(a,o.d,(function(e){n=void 0,i({a:"response",d:e})}))}),0))})),e(r?o:window,"message",s);try{i({a:"ready"})}catch(t){e(o,"load",(function(e){i({a:"ready"})}))}var u=function(){try{t(r?o:window,"message",s)}catch(e){}n&&i({a:"error",d:"client closed window"}),n=void 0;try{window.close()}catch(e){}};return e(window,"unload",u),{detach:function(){t(window,"unload",u)}}}}:{open:function(e,t,n,r){setTimeout((function(){r("unsupported browser")}),0)},onOpen:function(e){setTimeout((function(){e("unsupported browser")}),0)}}}();e.exports&&(e.exports=t)})),kt=function(e){/^https?:\/\//.test(e)||(e=window.location.href);var t=/^(https?:\/\/[-_a-zA-Z.0-9:]+)/.exec(e);return t?t[1]:e};function xt(){this._current_popup=null}function Et(e,t){this.baseOptions=t,this.baseOptions.popupOrigin=t.popupOrigin,this.client=e.client,this.webAuth=e,this.transactionManager=new gt(this.baseOptions),this.crossOriginAuthentication=new wt(e,this.baseOptions),this.warn=new Oe({disableWarnings:!!t._disableDeprecationWarnings})}function St(e){this.authenticationUrl=e.authenticationUrl,this.timeout=e.timeout||6e4,this.handler=null,this.postMessageDataType=e.postMessageDataType||!1,this.postMessageOrigin=e.postMessageOrigin||ke.getWindow().location.origin||ke.getWindow().location.protocol+"//"+ke.getWindow().location.hostname+(ke.getWindow().location.port?":"+ke.getWindow().location.port:"")}function Ot(e){this.baseOptions=e,this.request=new Le(e),this.transactionManager=new gt(this.baseOptions)}function Dt(e,t){this.baseOptions=t,this.client=e,this.baseOptions.universalLoginPage=!0,this.request=new Le(this.baseOptions),this.warn=new Oe({disableWarnings:!!t._disableDeprecationWarnings})}xt.prototype.calculatePosition=function(e){var t=e.width||500,n=e.height||600,r=ke.getWindow(),a=void 0!==r.screenX?r.screenX:r.screenLeft,o=void 0!==r.screenY?r.screenY:r.screenTop,i=void 0!==r.outerWidth?r.outerWidth:r.document.body.clientWidth,s=void 0!==r.outerHeight?r.outerHeight:r.document.body.clientHeight;return{width:t,height:n,left:e.left||a+(i-t)/2,top:e.top||o+(s-n)/2}},xt.prototype.preload=function(e){var t=this,n=ke.getWindow(),r=this.calculatePosition(e.popupOptions||{}),a=be.merge(r).with(e.popupOptions),o=e.url||"about:blank",i=Y(a,{encode:!1,delimiter:","});return this._current_popup&&!this._current_popup.closed||(this._current_popup=n.open(o,"auth0_signup_popup",i),this._current_popup.kill=function(){this.close(),t._current_popup=null}),this._current_popup},xt.prototype.load=function(e,t,n,r){var a=this,o=this.calculatePosition(n.popupOptions||{}),i=be.merge(o).with(n.popupOptions),s=be.merge({url:e,relay_url:t,window_features:Y(i,{delimiter:",",encode:!1}),popup:this._current_popup}).with(n),u=Tt.open(s,(function(e,t){if(!e||"SyntaxError"!==e.name)return a._current_popup=null,r(e,t)}));return u.focus(),u},Et.prototype.buildPopupHandler=function(){var e=this.baseOptions.plugins.get("popup.getPopupHandler");return e?e.getPopupHandler():new xt},Et.prototype.preload=function(e){e=e||{};var t=this.buildPopupHandler();return t.preload(e),t},Et.prototype.getPopupHandler=function(e,t){return e.popupHandler?e.popupHandler:t?this.preload(e):this.buildPopupHandler()},Et.prototype.callback=function(e){var t=this,n=ke.getWindow(),r=(e=e||{}).popupOrigin||this.baseOptions.popupOrigin||ke.getOrigin();n.opener?Tt.onOpen((function(n,a,o){if(n!==r)return o({error:"origin_mismatch",error_description:"The popup's origin ("+n+") should match the `popupOrigin` parameter ("+r+")."});t.webAuth.parseHash(e||{},(function(e,t){return o(e||t)}))})):n.doPost=function(e){n.parent&&n.parent.postMessage(e,r)}},Et.prototype.authorize=function(e,t){var n,r,a={},o=this.baseOptions.plugins.get("popup.authorize"),s=be.merge(this.baseOptions,["clientID","scope","domain","audience","tenant","responseType","redirectUri","_csrf","state","_intstate","nonce","organization","invitation"]).with(be.blacklist(e,["popupHandler"]));return pe.check(s,{type:"object",message:"options parameter is not valid"},{responseType:{type:"string",message:"responseType option is required"}}),r=i(this.baseOptions.rootUrl,"relay.html"),e.owp?s.owp=!0:(a.origin=kt(s.redirectUri),r=s.redirectUri),e.popupOptions&&(a.popupOptions=be.pick(e.popupOptions,["width","height","top","left"])),o&&(s=o.processParams(s)),(s=this.transactionManager.process(s)).scope=s.scope||"openid profile email",delete s.domain,n=this.client.buildAuthorizeUrl(s),this.getPopupHandler(e).load(n,r,a,Pe(t,{keepOriginalCasing:!0}))},Et.prototype.loginWithCredentials=function(e,t){e.realm=e.realm||e.connection,e.popup=!0,e=be.merge(this.baseOptions,["redirectUri","responseType","state","nonce"]).with(be.blacklist(e,["popupHandler","connection"])),e=this.transactionManager.process(e),this.crossOriginAuthentication.login(e,t)},Et.prototype.passwordlessVerify=function(e,t){var n=this;return this.client.passwordless.verify(be.blacklist(e,["popupHandler"]),(function(r){if(r)return t(r);e.username=e.phoneNumber||e.email,e.password=e.verificationCode,delete e.email,delete e.phoneNumber,delete e.verificationCode,delete e.type,n.client.loginWithResourceOwner(e,t)}))},Et.prototype.signupAndLogin=function(e,t){var n=this;return this.client.dbConnection.signup(e,(function(r){if(r)return t(r);n.loginWithCredentials(e,t)}))},St.create=function(e){return new St(e)},St.prototype.login=function(e,t){this.handler=new vt({auth0:this.auth0,url:this.authenticationUrl,eventListenerType:e?"message":"load",callback:this.getCallbackHandler(t,e),timeout:this.timeout,eventValidator:this.getEventValidator(),timeoutCallback:function(){t(null,"#error=timeout&error_description=Timeout+during+authentication+renew.")},usePostMessage:e||!1}),this.handler.init()},St.prototype.getEventValidator=function(){var e=this;return{isValid:function(t){switch(t.event.type){case"message":return t.event.origin===e.postMessageOrigin&&t.event.source===e.handler.iframe.contentWindow&&(!1===e.postMessageDataType||t.event.data.type&&t.event.data.type===e.postMessageDataType);case"load":if("about:"===t.sourceObject.contentWindow.location.protocol)return!1;default:return!0}}}},St.prototype.getCallbackHandler=function(e,t){return function(n){var r;r=t?"object"==typeof n.event.data&&n.event.data.hash?n.event.data.hash:n.event.data:n.sourceObject.contentWindow.location.hash,e(null,r)}},Ot.prototype.login=function(e,t){var n,r;return n=i(this.baseOptions.rootUrl,"usernamepassword","login"),e.username=e.username||e.email,e=be.blacklist(e,["email","onRedirecting"]),r=be.merge(this.baseOptions,["clientID","redirectUri","tenant","responseType","responseMode","scope","audience"]).with(e),r=this.transactionManager.process(r),r=be.toSnakeCase(r,["auth0Client"]),this.request.post(n).send(r).end(Pe(t))},Ot.prototype.callback=function(e){var t,n=ke.getDocument();(t=n.createElement("div")).innerHTML=e,n.body.appendChild(t).children[0].submit()},Dt.prototype.login=function(e,t){if(ke.getWindow().location.host!==this.baseOptions.domain)throw new Error("This method is meant to be used only inside the Universal Login Page.");var n,r=be.merge(this.baseOptions,["clientID","redirectUri","tenant","responseType","responseMode","scope","audience","_csrf","state","_intstate","nonce"]).with(e);return pe.check(r,{type:"object",message:"options parameter is not valid"},{responseType:{type:"string",message:"responseType option is required"}}),(n=new Ot(this.baseOptions)).login(r,(function(r,a){if(r)return t(r);function o(){n.callback(a)}if("function"==typeof e.onRedirecting)return e.onRedirecting((function(){o()}));o()}))},Dt.prototype.signupAndLogin=function(e,t){var n=this;return n.client.client.dbConnection.signup(e,(function(r){return r?t(r):n.login(e,t)}))},Dt.prototype.getSSOData=function(e,t){var n,r="";return"function"==typeof e&&(t=e,e=!1),pe.check(e,{type:"boolean",message:"withActiveDirectories parameter is not valid"}),pe.check(t,{type:"function",message:"cb parameter is not valid"}),e&&(r="?"+Y({ldaps:1,client_id:this.baseOptions.clientID})),n=i(this.baseOptions.rootUrl,"user","ssodata",r),this.request.get(n,{noHeaders:!0}).withCredentials().end(Pe(t))};var Yt=function(){},At={lang:"en",templates:{auth0:function(e){var t="code"===e.type?"Enter the code shown above":"Solve the formula shown above";return'<div class="captcha-challenge">\n <img src="'+e.image+'" />\n <button type="button" class="captcha-reload">↺</button>\n</div>\n<input type="text" name="captcha"\n class="form-control captcha-control"\n placeholder="'+t+'" />'},recaptcha_v2:function(){return'<div class="recaptcha" ></div><input type="hidden" name="captcha" />'},recaptcha_enterprise:function(){return'<div class="recaptcha" ></div><input type="hidden" name="captcha" />'},error:function(){return'<div class="error" style="color: red;">Error getting the bot detection challenge. Please contact the system administrator.</div>'}}};function Ct(e){switch(e){case"recaptcha_v2":return window.grecaptcha;case"recaptcha_enterprise":return window.grecaptcha.enterprise;default:throw new Error("Unknown captcha provider")}}var jt=function(e,t,n,r){function a(r){r=r||Yt,e.getChallenge((function(e,o){return e?(t.innerHTML=n.templates.error(e),r(e)):o.required?(t.style.display="","auth0"===o.provider?function(e,t,n,r){e.innerHTML=t.templates[n.provider](n),e.querySelector(".captcha-reload").addEventListener("click",(function(e){e.preventDefault(),r()}))}(t,n,o,a):"recaptcha_v2"!==o.provider&&"recaptcha_enterprise"!==o.provider||function(e,t,n){var r=e.hasAttribute("data-wid")&&e.getAttribute("data-wid");function a(t){e.querySelector('input[name="captcha"]').value=t||""}if(r)return a(),void Ct(n.provider).reset(r);e.innerHTML=t.templates[n.provider](n);var o=e.querySelector(".recaptcha");!function(e,t,n){var r="recaptchaCallback_"+Math.floor(1000001*Math.random());window[r]=function(){delete window[r],n()};var a=window.document.createElement("script");a.src=function(e,t,n){switch(e){case"recaptcha_v2":return"https://www.recaptcha.net/recaptcha/api.js?hl="+t+"&onload="+n;case"recaptcha_enterprise":return"https://www.recaptcha.net/recaptcha/enterprise.js?render=explicit&hl="+t+"&onload="+n;default:throw new Error("Unknown captcha provider")}}(t.provider,t.lang,r),a.async=!0,window.document.body.appendChild(a)}(0,{lang:t.lang,provider:n.provider},(function(){var t=Ct(n.provider);r=t.render(o,{callback:a,"expired-callback":function(){a()},"error-callback":function(){a()},sitekey:n.siteKey}),e.setAttribute("data-wid",r)}))}(t,n,o),void r()):(t.style.display="none",void(t.innerHTML=""))}))}return n=be.merge(At).with(n||{}),a(r),{reload:a,getValue:function(){var e=t.querySelector('input[name="captcha"]');if(e)return e.value}}};function Pt(){return new Date}function Ht(e){pe.check(e,{type:"object",message:"options parameter is not valid"},{domain:{type:"string",message:"domain option is required"},clientID:{type:"string",message:"clientID option is required"},responseType:{optional:!0,type:"string",message:"responseType is not valid"},responseMode:{optional:!0,type:"string",message:"responseMode is not valid"},redirectUri:{optional:!0,type:"string",message:"redirectUri is not valid"},scope:{optional:!0,type:"string",message:"scope is not valid"},audience:{optional:!0,type:"string",message:"audience is not valid"},popupOrigin:{optional:!0,type:"string",message:"popupOrigin is not valid"},leeway:{optional:!0,type:"number",message:"leeway is not valid"},plugins:{optional:!0,type:"array",message:"plugins is not valid"},maxAge:{optional:!0,type:"number",message:"maxAge is not valid"},_disableDeprecationWarnings:{optional:!0,type:"boolean",message:"_disableDeprecationWarnings option is not valid"},_sendTelemetry:{optional:!0,type:"boolean",message:"_sendTelemetry option is not valid"},_telemetryInfo:{optional:!0,type:"object",message:"_telemetryInfo option is not valid"},_timesToRetryFailedRequests:{optional:!0,type:"number",message:"_timesToRetryFailedRequests option is not valid"}}),e.overrides&&pe.check(e.overrides,{type:"object",message:"overrides option is not valid"},{__tenant:{optional:!0,type:"string",message:"__tenant option is required"},__token_issuer:{optional:!0,type:"string",message:"__token_issuer option is required"},__jwks_uri:{optional:!0,type:"string",message:"__jwks_uri is required"}}),this.baseOptions=e,this.baseOptions.plugins=new _t(this,this.baseOptions.plugins||[]),this.baseOptions._sendTelemetry=!1!==this.baseOptions._sendTelemetry||this.baseOptions._sendTelemetry,this.baseOptions._timesToRetryFailedRequests=e._timesToRetryFailedRequests?parseInt(e._timesToRetryFailedRequests,0):0,this.baseOptions.tenant=this.baseOptions.overrides&&this.baseOptions.overrides.__tenant||this.baseOptions.domain.split(".")[0],this.baseOptions.token_issuer=this.baseOptions.overrides&&this.baseOptions.overrides.__token_issuer||"https://"+this.baseOptions.domain+"/",this.baseOptions.jwksURI=this.baseOptions.overrides&&this.baseOptions.overrides.__jwks_uri,this.transactionManager=new gt(this.baseOptions),this.client=new Rt(this.baseOptions),this.redirect=new Lt(this,this.baseOptions),this.popup=new Et(this,this.baseOptions),this.crossOriginAuthentication=new wt(this,this.baseOptions),this.webMessageHandler=new bt(this),this._universalLogin=new Dt(this,this.baseOptions),this.ssodataStorage=new Ae(this.baseOptions)}function It(e,t){this.baseOptions=t,this.request=e}function Nt(e,t){this.baseOptions=t,this.request=e}function Rt(e,t){2===arguments.length?this.auth0=e:t=e,pe.check(t,{type:"object",message:"options parameter is not valid"},{domain:{type:"string",message:"domain option is required"},clientID:{type:"string",message:"clientID option is required"},responseType:{optional:!0,type:"string",message:"responseType is not valid"},responseMode:{optional:!0,type:"string",message:"responseMode is not valid"},redirectUri:{optional:!0,type:"string",message:"redirectUri is not valid"},scope:{optional:!0,type:"string",message:"scope is not valid"},audience:{optional:!0,type:"string",message:"audience is not valid"},_disableDeprecationWarnings:{optional:!0,type:"boolean",message:"_disableDeprecationWarnings option is not valid"},_sendTelemetry:{optional:!0,type:"boolean",message:"_sendTelemetry option is not valid"},_telemetryInfo:{optional:!0,type:"object",message:"_telemetryInfo option is not valid"}}),this.baseOptions=t,this.baseOptions._sendTelemetry=!1!==this.baseOptions._sendTelemetry||this.baseOptions._sendTelemetry,this.baseOptions.rootUrl=this.baseOptions.domain&&0===this.baseOptions.domain.toLowerCase().indexOf("http")?this.baseOptions.domain:"https://"+this.baseOptions.domain,this.request=new Le(this.baseOptions),this.passwordless=new It(this.request,this.baseOptions),this.dbConnection=new Nt(this.request,this.baseOptions),this.warn=new Oe({disableWarnings:!!t._disableDeprecationWarnings}),this.ssodataStorage=new Ae(this.baseOptions)}function Ft(e){pe.check(e,{type:"object",message:"options parameter is not valid"},{domain:{type:"string",message:"domain option is required"},token:{type:"string",message:"token option is required"},_sendTelemetry:{optional:!0,type:"boolean",message:"_sendTelemetry option is not valid"},_telemetryInfo:{optional:!0,type:"object",message:"_telemetryInfo option is not valid"}}),this.baseOptions=e,this.baseOptions.headers={Authorization:"Bearer "+this.baseOptions.token},this.request=new Le(this.baseOptions),this.baseOptions.rootUrl=i("https://"+this.baseOptions.domain,"api","v2")}Ht.prototype.parseHash=function(e,t){var n,r;t||"function"!=typeof e?e=e||{}:(t=e,e={});var a=ke.getWindow(),o=void 0===e.hash?a.location.hash:e.hash;if((n=function(e,t){var n=function(e){if(!e)return E;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 TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?E.charset:e.charset;return{allowDots:void 0===e.allowDots?E.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:E.allowPrototypes,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:E.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:E.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:E.comma,decoder:"function"==typeof e.decoder?e.decoder:E.decoder,delimiter:"string"==typeof e.delimiter||d.isRegExp(e.delimiter)?e.delimiter:E.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:E.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:E.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:E.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:E.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:E.strictNullHandling}}(t);if(""===e||null==e)return n.plainObjects?Object.create(null):{};for(var r="string"==typeof e?function(e,t){var n,r={},a=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,o=t.parameterLimit===1/0?void 0:t.parameterLimit,i=a.split(t.delimiter,o),s=-1,u=t.charset;if(t.charsetSentinel)for(n=0;n<i.length;++n)0===i[n].indexOf("utf8=")&&("utf8=%E2%9C%93"===i[n]?u="utf-8":"utf8=%26%2310003%3B"===i[n]&&(u="iso-8859-1"),s=n,n=i.length);for(n=0;n<i.length;++n)if(n!==s){var l,c,p=i[n],f=p.indexOf("]="),h=-1===f?p.indexOf("="):f+1;-1===h?(l=t.decoder(p,E.decoder,u,"key"),c=t.strictNullHandling?null:""):(l=t.decoder(p.slice(0,h),E.decoder,u,"key"),c=d.maybeMap(O(p.slice(h+1),t),(function(e){return t.decoder(e,E.decoder,u,"value")}))),c&&t.interpretNumericEntities&&"iso-8859-1"===u&&(c=S(c)),p.indexOf("[]=")>-1&&(c=x(c)?[c]:c),k.call(r,l)?r[l]=d.combine(r[l],c):r[l]=c}return r}(e,n):e,a=n.plainObjects?Object.create(null):{},o=Object.keys(r),i=0;i<o.length;++i){var s=o[i],u=D(s,r[s],n,"string"==typeof e);a=d.merge(a,u,n)}return d.compact(a)}(o=o.replace(/^#?\/?/,""))).hasOwnProperty("error"))return r=je.buildResponse(n.error,n.error_description),n.state&&(r.state=n.state),t(r);if(!n.hasOwnProperty("access_token")&&!n.hasOwnProperty("id_token")&&!n.hasOwnProperty("refresh_token"))return t(null,null);var i=(this.baseOptions.responseType||e.responseType||"").split(" ");return i.length>0&&-1!==i.indexOf("token")&&!n.hasOwnProperty("access_token")?t(je.buildResponse("invalid_hash","response_type contains `token`, but the parsed hash does not contain an `access_token` property")):i.length>0&&-1!==i.indexOf("id_token")&&!n.hasOwnProperty("id_token")?t(je.buildResponse("invalid_hash","response_type contains `id_token`, but the parsed hash does not contain an `id_token` property")):this.validateAuthenticationResponse(e,n,t)},Ht.prototype.validateAuthenticationResponse=function(e,t,n){var r=this;e.__enableIdPInitiatedLogin=e.__enableIdPInitiatedLogin||e.__enableImpersonation;var a=t.state,o=this.transactionManager.getStoredTransaction(a),i=e.state||o&&o.state||null,s=i===a;if((a||i||!e.__enableIdPInitiatedLogin)&&!s)return n({error:"invalid_token",errorDescription:"`state` does not match."});var u=e.nonce||o&&o.nonce||null,l=o&&o.organization,c=e.state||o&&o.appState||null,d=function(e,a){return e?n(e):(o&&o.lastUsedConnection&&(a&&(i=a.sub),r.ssodataStorage.set(o.lastUsedConnection,i)),n(null,function(e,t,n){return{accessToken:e.access_token||null,idToken:e.id_token||null,idTokenPayload:n||null,appState:t||null,refreshToken:e.refresh_token||null,state:e.state||null,expiresIn:e.expires_in?parseInt(e.expires_in,10):null,tokenType:e.token_type||null,scope:e.scope||null}}(t,c,a)));var i};return t.id_token?this.validateToken(t.id_token,u,(function(e,n){if(!e){if(l){if(!n.org_id)return d(je.invalidToken("Organization Id (org_id) claim must be a string present in the ID token"));if(n.org_id!==l)return d(je.invalidToken('Organization Id (org_id) claim value mismatch in the ID token; expected "'+l+'", found "'+n.org_id+'"'))}return t.access_token&&n.at_hash?(new mt).validateAccessToken(t.access_token,"RS256",n.at_hash,(function(e){return e?d(je.invalidToken(e.message)):d(null,n)})):d(null,n)}if("invalid_token"!==e.error||e.errorDescription&&e.errorDescription.indexOf("Nonce (nonce) claim value mismatch in the ID token")>-1)return d(e);var a=(new mt).decode(t.id_token);return"HS256"!==a.header.alg?d(e):(a.payload.nonce||null)!==u?d({error:"invalid_token",errorDescription:'Nonce (nonce) claim value mismatch in the ID token; expected "'+u+'", found "'+a.payload.nonce+'"'}):t.access_token?r.client.userInfo(t.access_token,(function(e,t){return e?d(e):d(null,t)})):d({error:"invalid_token",description:"The id_token cannot be validated because it was signed with the HS256 algorithm and public clients (like a browser) can’t store secrets. Please read the associated doc for possible ways to fix this. Read more: https://auth0.com/docs/errors/libraries/auth0-js/invalid-token#parsing-an-hs256-signed-id-token-without-an-access-token"})})):d(null,null)},Ht.prototype.validateToken=function(e,t,n){new mt({issuer:this.baseOptions.token_issuer,jwksURI:this.baseOptions.jwksURI,audience:this.baseOptions.clientID,leeway:this.baseOptions.leeway||60,maxAge:this.baseOptions.maxAge,__clock:this.baseOptions.__clock||Pt}).verify(e,t,(function(e,t){if(e)return n(je.invalidToken(e.message));n(null,t)}))},Ht.prototype.renewAuth=function(e,t){var n=!!e.usePostMessage,r=e.postMessageDataType||!1,a=e.postMessageOrigin||ke.getWindow().origin,o=e.timeout,i=this,s=be.merge(this.baseOptions,["clientID","redirectUri","responseType","scope","audience","_csrf","state","_intstate","nonce"]).with(e);s.responseType=s.responseType||"token",s.responseMode=s.responseMode||"fragment",s=this.transactionManager.process(s),pe.check(s,{type:"object",message:"options parameter is not valid"}),pe.check(t,{type:"function",message:"cb parameter is not valid"}),s.prompt="none",s=be.blacklist(s,["usePostMessage","tenant","postMessageDataType","postMessageOrigin"]),St.create({authenticationUrl:this.client.buildAuthorizeUrl(s),postMessageDataType:r,postMessageOrigin:a,timeout:o}).login(n,(function(e,n){if("object"==typeof n)return t(e,n);i.parseHash({hash:n},t)}))},Ht.prototype.checkSession=function(e,t){var n=be.merge(this.baseOptions,["clientID","responseType","redirectUri","scope","audience","_csrf","state","_intstate","nonce"]).with(e);return"code"===n.responseType?t({error:"error",error_description:"responseType can't be `code`"}):(e.nonce||(n=this.transactionManager.process(n)),n.redirectUri?(pe.check(n,{type:"object",message:"options parameter is not valid"}),pe.check(t,{type:"function",message:"cb parameter is not valid"}),n=be.blacklist(n,["usePostMessage","tenant","postMessageDataType"]),void this.webMessageHandler.run(n,Pe(t,{forceLegacyError:!0,ignoreCasing:!0}))):t({error:"error",error_description:"redirectUri can't be empty"}))},Ht.prototype.changePassword=function(e,t){return this.client.dbConnection.changePassword(e,t)},Ht.prototype.passwordlessStart=function(e,t){var n=be.merge(this.baseOptions,["responseType","responseMode","redirectUri","scope","audience","_csrf","state","_intstate","nonce"]).with(e.authParams);return e.authParams=this.transactionManager.process(n),this.client.passwordless.start(e,t)},Ht.prototype.signup=function(e,t){return this.client.dbConnection.signup(e,t)},Ht.prototype.authorize=function(e){var t=be.merge(this.baseOptions,["clientID","responseType","responseMode","redirectUri","scope","audience","_csrf","state","_intstate","nonce","organization","invitation"]).with(e);pe.check(t,{type:"object",message:"options parameter is not valid"},{responseType:{type:"string",message:"responseType option is required"}}),(t=this.transactionManager.process(t)).scope=t.scope||"openid profile email",ke.redirect(this.client.buildAuthorizeUrl(t))},Ht.prototype.signupAndAuthorize=function(e,t){var n=this;return this.client.dbConnection.signup(be.blacklist(e,["popupHandler"]),(function(r){if(r)return t(r);e.realm=e.connection,e.username||(e.username=e.email),n.client.login(e,t)}))},Ht.prototype.login=function(e,t){var n=be.merge(this.baseOptions,["clientID","responseType","redirectUri","scope","audience","_csrf","state","_intstate","nonce","onRedirecting","organization","invitation"]).with(e);n=this.transactionManager.process(n),ke.getWindow().location.host===this.baseOptions.domain?(n.connection=n.realm,delete n.realm,this._universalLogin.login(n,t)):this.crossOriginAuthentication.login(n,t)},Ht.prototype.passwordlessLogin=function(e,t){var n=be.merge(this.baseOptions,["clientID","responseType","redirectUri","scope","audience","_csrf","state","_intstate","nonce","onRedirecting"]).with(e);if(n=this.transactionManager.process(n),ke.getWindow().location.host===this.baseOptions.domain)this.passwordlessVerify(n,t);else{var r=be.extend({credentialType:"http://auth0.com/oauth/grant-type/passwordless/otp",realm:n.connection,username:n.email||n.phoneNumber,otp:n.verificationCode},be.blacklist(n,["connection","email","phoneNumber","verificationCode"]));this.crossOriginAuthentication.login(r,t)}},Ht.prototype.crossOriginAuthenticationCallback=function(){this.crossOriginVerification()},Ht.prototype.crossOriginVerification=function(){this.crossOriginAuthentication.callback()},Ht.prototype.logout=function(e){ke.redirect(this.client.buildLogoutUrl(e))},Ht.prototype.passwordlessVerify=function(e,t){var n=this,r=be.merge(this.baseOptions,["clientID","responseType","responseMode","redirectUri","scope","audience","_csrf","state","_intstate","nonce","onRedirecting"]).with(e);return pe.check(r,{type:"object",message:"options parameter is not valid"},{responseType:{type:"string",message:"responseType option is required"}}),r=this.transactionManager.process(r),this.client.passwordless.verify(r,(function(a){if(a)return t(a);function o(){ke.redirect(n.client.passwordless.buildVerifyUrl(r))}if("function"==typeof e.onRedirecting)return e.onRedirecting((function(){o()}));o()}))},Ht.prototype.renderCaptcha=function(e,t,n){return jt(this.client,e,t,n)},It.prototype.buildVerifyUrl=function(e){var t,n;return pe.check(e,{type:"object",message:"options parameter is not valid"},{connection:{type:"string",message:"connection option is required"},verificationCode:{type:"string",message:"verificationCode option is required"},phoneNumber:{optional:!1,type:"string",message:"phoneNumber option is required",condition:function(e){return!e.email}},email:{optional:!1,type:"string",message:"email option is required",condition:function(e){return!e.phoneNumber}}}),t=be.merge(this.baseOptions,["clientID","responseType","responseMode","redirectUri","scope","audience","_csrf","state","_intstate","protocol","nonce"]).with(e),this.baseOptions._sendTelemetry&&(t.auth0Client=this.request.getTelemetryData()),t=be.toSnakeCase(t,["auth0Client"]),n=Y(t),i(this.baseOptions.rootUrl,"passwordless","verify_redirect","?"+n)},It.prototype.start=function(e,t){var n,r;return pe.check(e,{type:"object",message:"options parameter is not valid"},{connection:{type:"string",message:"connection option is required"},send:{type:"string",message:"send option is required",values:["link","code"],value_message:"send is not valid ([link, code])"},phoneNumber:{optional:!0,type:"string",message:"phoneNumber option is required",condition:function(e){return"code"===e.send||!e.email}},email:{optional:!0,type:"string",message:"email option is required",condition:function(e){return"link"===e.send||!e.phoneNumber}},authParams:{optional:!0,type:"object",message:"authParams option is required"}}),pe.check(t,{type:"function",message:"cb parameter is not valid"}),n=i(this.baseOptions.rootUrl,"passwordless","start"),(r=be.merge(this.baseOptions,["clientID","responseType","redirectUri","scope"]).with(e)).scope&&(r.authParams=r.authParams||{},r.authParams.scope=r.authParams.scope||r.scope),r.redirectUri&&(r.authParams=r.authParams||{},r.authParams.redirect_uri=r.authParams.redirectUri||r.redirectUri),r.responseType&&(r.authParams=r.authParams||{},r.authParams.response_type=r.authParams.responseType||r.responseType),delete r.redirectUri,delete r.responseType,delete r.scope,r=be.toSnakeCase(r,["auth0Client","authParams"]),this.request.post(n).send(r).end(Pe(t))},It.prototype.verify=function(e,t){var n,r;return pe.check(e,{type:"object",message:"options parameter is not valid"},{connection:{type:"string",message:"connection option is required"},verificationCode:{type:"string",message:"verificationCode option is required"},phoneNumber:{optional:!1,type:"string",message:"phoneNumber option is required",condition:function(e){return!e.email}},email:{optional:!1,type:"string",message:"email option is required",condition:function(e){return!e.phoneNumber}}}),pe.check(t,{type:"function",message:"cb parameter is not valid"}),r=be.pick(e,["connection","verificationCode","phoneNumber","email","auth0Client"]),r=be.toSnakeCase(r,["auth0Client"]),n=i(this.baseOptions.rootUrl,"passwordless","verify"),this.request.post(n).send(r).end(Pe(t))},Nt.prototype.signup=function(e,t){var n,r,a;return pe.check(e,{type:"object",message:"options parameter is not valid"},{connection:{type:"string",message:"connection option is required"},email:{type:"string",message:"email option is required"},password:{type:"string",message:"password option is required"}}),pe.check(t,{type:"function",message:"cb parameter is not valid"}),n=i(this.baseOptions.rootUrl,"dbconnections","signup"),a=(r=be.merge(this.baseOptions,["clientID","state"]).with(e)).user_metadata||r.userMetadata,r=be.blacklist(r,["scope","userMetadata","user_metadata"]),r=be.toSnakeCase(r,["auth0Client"]),a&&(r.user_metadata=a),this.request.post(n).send(r).end(Pe(t))},Nt.prototype.changePassword=function(e,t){var n,r;return pe.check(e,{type:"object",message:"options parameter is not valid"},{connection:{type:"string",message:"connection option is required"},email:{type:"string",message:"email option is required"}}),pe.check(t,{type:"function",message:"cb parameter is not valid"}),n=i(this.baseOptions.rootUrl,"dbconnections","change_password"),r=be.merge(this.baseOptions,["clientID"]).with(e,["email","connection"]),r=be.toSnakeCase(r,["auth0Client"]),this.request.post(n).send(r).end(Pe(t))},Rt.prototype.buildAuthorizeUrl=function(e){var t,n;return pe.check(e,{type:"object",message:"options parameter is not valid"}),t=be.merge(this.baseOptions,["clientID","responseType","responseMode","redirectUri","scope","audience"]).with(e),pe.check(t,{type:"object",message:"options parameter is not valid"},{clientID:{type:"string",message:"clientID option is required"},redirectUri:{optional:!0,type:"string",message:"redirectUri option is required"},responseType:{type:"string",message:"responseType option is required"},nonce:{type:"string",message:"nonce option is required",condition:function(e){return-1===e.responseType.indexOf("code")&&-1!==e.responseType.indexOf("id_token")}},scope:{optional:!0,type:"string",message:"scope option is required"},audience:{optional:!0,type:"string",message:"audience option is required"}}),this.baseOptions._sendTelemetry&&(t.auth0Client=this.request.getTelemetryData()),t.connection_scope&&pe.isArray(t.connection_scope)&&(t.connection_scope=t.connection_scope.join(",")),t=be.blacklist(t,["username","popupOptions","domain","tenant","timeout","appState"]),t=be.toSnakeCase(t,["auth0Client"]),t=Re(this.warn,t),n=Y(t),i(this.baseOptions.rootUrl,"authorize","?"+n)},Rt.prototype.buildLogoutUrl=function(e){var t,n;return pe.check(e,{optional:!0,type:"object",message:"options parameter is not valid"}),t=be.merge(this.baseOptions,["clientID"]).with(e||{}),this.baseOptions._sendTelemetry&&(t.auth0Client=this.request.getTelemetryData()),t=be.toSnakeCase(t,["auth0Client","returnTo"]),n=Y(be.blacklist(t,["federated"])),e&&void 0!==e.federated&&!1!==e.federated&&"false"!==e.federated&&(n+="&federated"),i(this.baseOptions.rootUrl,"v2","logout","?"+n)},Rt.prototype.loginWithDefaultDirectory=function(e,t){return pe.check(e,{type:"object",message:"options parameter is not valid"},{username:{type:"string",message:"username option is required"},password:{type:"string",message:"password option is required"},scope:{optional:!0,type:"string",message:"scope option is required"},audience:{optional:!0,type:"string",message:"audience option is required"}}),e.grantType="password",this.oauthToken(e,t)},Rt.prototype.login=function(e,t){return pe.check(e,{type:"object",message:"options parameter is not valid"},{username:{type:"string",message:"username option is required"},password:{type:"string",message:"password option is required"},realm:{type:"string",message:"realm option is required"},scope:{optional:!0,type:"string",message:"scope option is required"},audience:{optional:!0,type:"string",message:"audience option is required"}}),e.grantType="http://auth0.com/oauth/grant-type/password-realm",this.oauthToken(e,t)},Rt.prototype.oauthToken=function(e,t){var n,r;return pe.check(e,{type:"object",message:"options parameter is not valid"}),pe.check(t,{type:"function",message:"cb parameter is not valid"}),n=i(this.baseOptions.rootUrl,"oauth","token"),r=be.merge(this.baseOptions,["clientID","scope","audience"]).with(e),pe.check(r,{type:"object",message:"options parameter is not valid"},{clientID:{type:"string",message:"clientID option is required"},grantType:{type:"string",message:"grantType option is required"},scope:{optional:!0,type:"string",message:"scope option is required"},audience:{optional:!0,type:"string",message:"audience option is required"}}),r=be.toSnakeCase(r,["auth0Client"]),r=Ne(this.warn,r),this.request.post(n).send(r).end(Pe(t))},Rt.prototype.loginWithResourceOwner=function(e,t){var n,r;return pe.check(e,{type:"object",message:"options parameter is not valid"},{username:{type:"string",message:"username option is required"},password:{type:"string",message:"password option is required"},connection:{type:"string",message:"connection option is required"},scope:{optional:!0,type:"string",message:"scope option is required"}}),pe.check(t,{type:"function",message:"cb parameter is not valid"}),n=i(this.baseOptions.rootUrl,"oauth","ro"),r=be.merge(this.baseOptions,["clientID","scope"]).with(e,["username","password","scope","connection","device"]),(r=be.toSnakeCase(r,["auth0Client"])).grant_type=r.grant_type||"password",this.request.post(n).send(r).end(Pe(t))},Rt.prototype.getSSOData=function(e,t){if(this.auth0||(this.auth0=new Ht(this.baseOptions)),ke.getWindow().location.host===this.baseOptions.domain)return this.auth0._universalLogin.getSSOData(e,t);"function"==typeof e&&(t=e),pe.check(t,{type:"function",message:"cb parameter is not valid"});var n=this.baseOptions.clientID,r=this.ssodataStorage.get()||{};this.auth0.checkSession({responseType:"token id_token",scope:"openid profile email",connection:r.lastUsedConnection,timeout:5e3},(function(e,a){return e?"login_required"===e.error?t(null,{sso:!1}):("consent_required"===e.error&&(e.error_description="Consent required. When using `getSSOData`, the user has to be authenticated with the following scope: `openid profile email`."),t(e,{sso:!1})):r.lastUsedSub&&r.lastUsedSub!==a.idTokenPayload.sub?t(e,{sso:!1}):t(null,{lastUsedConnection:{name:r.lastUsedConnection},lastUsedUserID:a.idTokenPayload.sub,lastUsedUsername:a.idTokenPayload.email||a.idTokenPayload.name,lastUsedClientID:n,sessionClients:[n],sso:!0})}))},Rt.prototype.userInfo=function(e,t){var n;return pe.check(e,{type:"string",message:"accessToken parameter is not valid"}),pe.check(t,{type:"function",message:"cb parameter is not valid"}),n=i(this.baseOptions.rootUrl,"userinfo"),this.request.get(n).set("Authorization","Bearer "+e).end(Pe(t,{ignoreCasing:!0}))},Rt.prototype.getChallenge=function(e){if(pe.check(e,{type:"function",message:"cb parameter is not valid"}),!this.baseOptions.state)return e();var t=i(this.baseOptions.rootUrl,"usernamepassword","challenge");return this.request.post(t).send({state:this.baseOptions.state}).end(Pe(e,{ignoreCasing:!0}))},Rt.prototype.delegation=function(e,t){var n,r;return pe.check(e,{type:"object",message:"options parameter is not valid"},{grant_type:{type:"string",message:"grant_type option is required"}}),pe.check(t,{type:"function",message:"cb parameter is not valid"}),n=i(this.baseOptions.rootUrl,"delegation"),r=be.merge(this.baseOptions,["clientID"]).with(e),r=be.toSnakeCase(r,["auth0Client"]),this.request.post(n).send(r).end(Pe(t))},Rt.prototype.getUserCountry=function(e){var t;return pe.check(e,{type:"function",message:"cb parameter is not valid"}),t=i(this.baseOptions.rootUrl,"user","geoloc","country"),this.request.get(t).end(Pe(e))},Ft.prototype.getUser=function(e,t){var n;return pe.check(e,{type:"string",message:"userId parameter is not valid"}),pe.check(t,{type:"function",message:"cb parameter is not valid"}),n=i(this.baseOptions.rootUrl,"users",e),this.request.get(n).end(Pe(t,{ignoreCasing:!0}))},Ft.prototype.patchUserMetadata=function(e,t,n){var r;return pe.check(e,{type:"string",message:"userId parameter is not valid"}),pe.check(t,{type:"object",message:"userMetadata parameter is not valid"}),pe.check(n,{type:"function",message:"cb parameter is not valid"}),r=i(this.baseOptions.rootUrl,"users",e),this.request.patch(r).send({user_metadata:t}).end(Pe(n,{ignoreCasing:!0}))},Ft.prototype.patchUserAttributes=function(e,t,n){var r;return pe.check(e,{type:"string",message:"userId parameter is not valid"}),pe.check(t,{type:"object",message:"user parameter is not valid"}),pe.check(n,{type:"function",message:"cb parameter is not valid"}),r=i(this.baseOptions.rootUrl,"users",e),this.request.patch(r).send(t).end(Pe(n,{ignoreCasing:!0}))},Ft.prototype.linkUser=function(e,t,n){var r;return pe.check(e,{type:"string",message:"userId parameter is not valid"}),pe.check(t,{type:"string",message:"secondaryUserToken parameter is not valid"}),pe.check(n,{type:"function",message:"cb parameter is not valid"}),r=i(this.baseOptions.rootUrl,"users",e,"identities"),this.request.post(r).send({link_with:t}).end(Pe(n,{ignoreCasing:!0}))};var zt={Authentication:Rt,Management:Ft,WebAuth:Ht,version:se};t.default=zt}.call(this,n(38),n(345))},function(e,t){var n,r,a=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var u,l=[],c=!1,d=-1;function p(){c&&u&&(c=!1,u.length?l=u.concat(l):d=-1,l.length&&f())}function f(){if(!c){var e=s(p);c=!0;for(var t=l.length;t;){for(u=l,l=[];++d<t;)u&&u[d].run();d=-1,t=l.length}u=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function m(){}a.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new h(e,t)),1!==l.length||c||s(f)},h.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=m,a.addListener=m,a.once=m,a.off=m,a.removeListener=m,a.removeAllListeners=m,a.emit=m,a.prependListener=m,a.prependOnceListener=m,a.listeners=function(e){return[]},a.binding=function(e){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(e){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(347),s=n(27),u=n(29),l=n(8),c=n(10),d=n(39),p=n(40),f=function(e){function t(n){var r=e.call(this,n)||this;return r.componentDidMount=function(){var e=r.props,t=e.auth0ClientId,n=e.auth0Hash,a=e.onAuthenticated,o=e.baseUrl;u.default.bindToClient(t),n?u.default.parseIdFromHash(n).then((function(e){s.default.getAccessData(e.idToken,o).then((function(t){r.props.login(e),r.props.cacheAccessData(t),s.default.buildFreshSession(e,t),a()})).catch((function(e){u.default.login()}))})).catch((function(e){u.default.login()})):u.default.login()},r.render=function(){return o.createElement("div",{className:"auth-gate"},o.createElement(i.default,{color:t.LOADER_COLOR}))},r}return a(t,e),t.LOADER_COLOR="#2d8ceb",t}(o.PureComponent);t.default=l.connect(null,(function(e){return c.bindActionCreators({login:d.login,cacheAccessData:p.cacheAccessData},e)}))(f)},function(e,t,n){"use strict";var r,a=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var s,u,l=i(n(0)),c=n(532),d=n(350),p=c.keyframes(s||(s=a(["\n 0% {transform: scaley(1.0)}\n 50% {transform: scaley(0.4)}\n 100% {transform: scaley(1.0)}\n"],["\n 0% {transform: scaley(1.0)}\n 50% {transform: scaley(0.4)}\n 100% {transform: scaley(1.0)}\n"]))),f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.style=function(e){var n=t.props,r=n.color,o=n.width,i=n.height,s=n.margin,l=n.radius,d=n.widthUnit,f=n.heightUnit,h=n.radiusUnit;return c.css(u||(u=a(["\n background-color: ",";\n width: ",";\n height: ",";\n margin: ",";\n border-radius: ",";\n display: inline-block;\n animation: "," 1s ","s infinite cubic-bezier(0.2, 0.68, 0.18, 1.08);\n animation-fill-mode: both;\n "],["\n background-color: ",";\n width: ",";\n height: ",";\n margin: ",";\n border-radius: ",";\n display: inline-block;\n animation: "," 1s ","s infinite cubic-bezier(0.2, 0.68, 0.18, 1.08);\n animation-fill-mode: both;\n "])),r,""+o+d,""+i+f,s,""+l+h,p,.1*e)},t}return o(t,e),t.prototype.render=function(){var e=this.props,t=e.loading,n=e.css;return t?c.jsx("div",{css:[n]},c.jsx("div",{css:this.style(1)}),c.jsx("div",{css:this.style(2)}),c.jsx("div",{css:this.style(3)}),c.jsx("div",{css:this.style(4)}),c.jsx("div",{css:this.style(5)})):null},t.defaultProps=d.heightWidthRadiusDefaults(35,4,2),t}(l.PureComponent);t.default=f},function(e,t,n){var r=n(349);e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,n(t,r)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(351)),r(n(352))},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0});var a=((r={}).loading=!0,r.color="#000000",r.css={},r);t.sizeDefaults=function(e){return Object.assign({},a,function(e){var t;return(t={}).size=e,t.sizeUnit="px",t}(e))},t.sizeMarginDefaults=function(e){var n;return Object.assign({},t.sizeDefaults(e),((n={}).margin="2px",n))},t.heightWidthDefaults=function(e,t){return Object.assign({},a,function(e,t){var n;return(n={}).height=e,n.heightUnit="px",n.width=t,n.widthUnit="px",n}(e,t))},t.heightWidthRadiusDefaults=function(e,n,r){var a;return void 0===r&&(r=2),Object.assign({},t.heightWidthDefaults(e,n),((a={}).radius=r,a.radiusUnit="px",a.margin="2px",a))}},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.maroon="#800000",e.red="#FF0000",e.orange="#FFA500",e.yellow="#FFFF00",e.olive="#808000",e.green="#008000",e.purple="#800080",e.fuchsia="#FF00FF",e.lime="#00FF00",e.teal="#008080",e.aqua="#00FFFF",e.blue="#0000FF",e.navy="#000080",e.black="#000000",e.gray="#808080",e.silver="#C0C0C0",e.white="#FFFFFF"}(r||(r={})),t.calculateRgba=function(e,t){if(Object.keys(r).includes(e)&&(e=r[e]),"#"===e[0]&&(e=e.slice(1)),3===e.length){var n="";e.split("").forEach((function(e){n+=e,n+=e})),e=n}return"rgba("+e.match(/.{2}/g).map((function(e){return parseInt(e,16)})).join(", ")+", "+t+")"}},function(e,t){e.exports=l},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},a=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i};Object.defineProperty(t,"__esModule",{value:!0});var o,i=n(0),s=n(355),u=n(21),l=n(4),c=n(356),d=n(357),p=function(e){return i.createElement("div",{className:"ip-table-loader"},i.createElement(u.default,null))},f=function(e){return i.createElement("div",{className:"ip-table-empty"},i.createElement("span",{className:"empty-message"},l.ICON_EXCLAIMATION_TRIANGLE," ",e.copy||"No Data Found"))},h=function(e){[32,37,38,39,40].indexOf(e.keyCode)>-1&&e.preventDefault()};t.default=function(e){var t=i.useRef(null),n=i.useRef(null),u=a(i.useState(!1),2),m=u[0],_=u[1],y=a(i.useState([]),2),g=y[0],v=y[1],b=a(i.useState([]),2),w=b[0],M=b[1],L=Array.isArray(e.hiddenColumns)?e.hiddenColumns:[],T=Number.isInteger(e.currentPage)&&"function"==typeof e.onPage,k="function"==typeof e.onSort&&void 0!==e.sortBy,x="function"==typeof e.renderPivotComponent?e.renderPivotComponent:function(){return null},E="function"==typeof e.onRowDoubleClick,S={hiddenColumns:L,sortBy:k?e.sortBy:[],pageIndex:T?e.currentPage-1:void 0,pageSize:e.itemsPerPage,autoResetExpanded:!1},O=c.useTable({columns:w,data:g,manualSortBy:k,manualPagination:T,initialState:S,manualFilters:!0,disableMultiSorting:!0,autoResetExpanded:!1,disableSortRemove:k,pageCount:e.totalPages,pageSize:e.itemsPerPage},c.useFlexLayout,c.useFilters,c.useSortBy,c.useExpanded,c.usePagination,c.useResizeColumns),D=O.getTableProps,Y=O.getTableBodyProps,A=O.headerGroups,C=O.page,j=O.rows,P=O.prepareRow,H=O.canPreviousPage,I=O.canNextPage,N=O.pageOptions,R=O.pageCount,F=O.gotoPage,z=O.nextPage,U=O.previousPage,W=O.setPageSize,B=O.setHiddenColumns,V=O.visibleColumns,G=O.totalColumnsWidth,q=O.toggleAllRowsExpanded,J=O.state,K=J.pageIndex,$=J.pageSize,X=J.sortBy,Z=T?j:C,Q=e.hidePaginator?"hide-paginator":"",ee=t.current&&G>t.current.clientWidth?"horizontal-scroll":"",te=e.tightRows?"tight-rows":"";return i.useEffect((function(){return _(!0)}),[]),i.useEffect((function(){var t,n;M((t=e.columns,Array.isArray(t)?t:!Array.isArray(t)&&"object"==typeof t&&(n=Object.keys(t)).length>0?n.map((function(e){return r(r({},t[e]),{accessor:e})})):[]))}),[e.columns]),i.useEffect((function(){m&&Array.isArray(e.hiddenColumns)&&B(e.hiddenColumns)}),[e.hiddenColumns]),i.useEffect((function(){Array.isArray(e.data)&&v(e.data)}),[e.data]),i.useEffect((function(){m&&T&&q(!1)}),[e.currentPage]),i.useEffect((function(){m&&k&&e.onSort(X)}),[X]),i.createElement("section",{ref:t,className:"ip-table-wrapper",tabIndex:e.disableKeyScroll?0:void 0,onKeyDown:e.disableKeyScroll?h:null},e.showInterstitial&&i.createElement(p,null),m&&!e.showInterstitial&&0===g.length&&i.createElement(f,{copy:e.noDataText}),i.createElement("table",r({},D(),{className:"ip-table "+ee+" "+Q+" "+te}),i.createElement("thead",{className:"ip-table-head"},A.map((function(e){return i.createElement(i.Fragment,{key:"head-fragment"},i.createElement("tr",r({},e.getHeaderGroupProps(),{className:"ip-table-head-row"}),e.headers.map((function(e){var t=e.hasOwnProperty("Search"),n=e.getSortByToggleProps(),a=i.createElement("span",{className:"sort-status"},e.isSorted?e.isSortedDesc?l.ICON_CHEVRON_DOWN:l.ICON_CHEVRON_UP:null);return i.createElement("th",r({},e.getHeaderProps(),{className:"ip-table-header "+(e.canSort?"ip-sortable":"")}),!t&&i.createElement("div",r({},n,{className:"filterable-cell-wrapper"}),e.render("Header"),a),t&&i.createElement("div",{className:"filterable-cell-wrapper"},i.createElement("span",r({},n,{className:"searchable-sort-area"}),e.render("Header"),a),e.hasOwnProperty("Search")&&e.render("Search")),e.canResize&&i.createElement("div",r({},e.getResizerProps(),{className:"ip-table-resizer "+(e.isResizing?"resizing":"")})))}))),e.headers.some((function(e){return e.hasOwnProperty("Filter")}))&&i.createElement("tr",r({},e.getHeaderGroupProps({key:"filters-row"})),e.headers.map((function(e,t){return i.createElement("th",r({},e.getHeaderProps({key:"filter-"+t}),{key:"filter-col-"+t,className:"ip-table-filter"}),e.canFilter&&e.Filter?e.render("Filter"):null)}))))}))),i.createElement("tbody",r({},Y(),{className:"ip-table-body"}),Z.map((function(t,a){var s,u="";e.highlightBy&&t.original.hasOwnProperty(e.highlightBy.key)&&t.original[e.highlightBy.key]===e.highlightBy.value&&(u="selected",s=n),P(t);var l=t.getRowProps();l.className="ip-table-row "+u,l.onClick=function(n){var r=function(){"function"==typeof e.onRowClick&&e.onRowClick(t)};E||r(),1===n.detail&&E&&(o=window.setTimeout(r,200))},l.onDoubleClick=function(n){clearTimeout(o),E&&e.onRowDoubleClick(t)};var c=t.cells.map((function(e){return i.createElement("td",r({},e.getCellProps(),{className:("ip-table-col "+(e.column.overflowVisible?"overflow-visible":"")).trim()}),e.render("Cell"))}));return i.createElement(i.Fragment,{key:"row-"+a},e.dnd&&i.createElement(d.default,{rowProps:l,rowRef:s,key:"row-"+a,row:t,dndType:e.dndType,dndName:e.dndName},c),!e.dnd&&i.createElement("tr",r({key:"row-"+a,ref:s},l),c),t.isExpanded&&i.createElement("tr",r({},t.getRowProps({key:"pivot-row"}),{className:"ip-pivot-row"}),i.createElement("td",{className:"ip-pivot-col "+u,colSpan:V.length},x(t))))})))),!e.hidePaginator&&i.createElement(s.default,r({},{totalItems:e.totalItems,pageIndex:e.currentPage?e.currentPage:K,manualPagination:T,pageSize:$,pageCount:R,pageOptions:N,canNextPage:T?e.currentPage+1<=e.totalPages:I,canPreviousPage:T?e.currentPage-1>=1:H,gotoPage:T?e.onPage:F,setPageSize:W,nextPage:T?function(){return e.onPage(e.currentPage+1,$)}:z,previousPage:T?function(){return e.onPage(e.currentPage-1,$)}:U})))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,a=n(0),o=n(5),i=n(4);t.default=function(e){e.manualPagination;var t=e.pageCount,n=e.pageIndex,s=e.pageSize,u=(e.pageOptions,e.totalItems),l=e.canPreviousPage,c=e.canNextPage,d=e.gotoPage,p=e.previousPage,f=e.nextPage;e.setPageSize;return a.createElement("section",{className:"ip-table-pagination"},a.createElement("span",null,a.createElement(o.default,{style:"subtle",size:"small",tooltip:"Go to first page",disabled:!l,onClick:function(){return d(1,s)}},i.ICON_ANGLE_DOUBLE_LEFT),a.createElement(o.default,{style:"subtle",size:"small",tooltip:"Go to previous page",disabled:!l,onClick:function(){return p()}},i.ICON_ANGLE_LEFT),a.createElement(o.default,{style:"subtle",size:"small",tooltip:"Go to next page",disabled:!c,onClick:function(){return f()}},i.ICON_ANGLE_RIGHT),a.createElement(o.default,{style:"subtle",size:"small",tooltip:"Go to last page",disabled:!c,onClick:function(){return d(t,s)}},i.ICON_ANGLE_DOUBLE_RIGHT),"  ",a.createElement("span",null,"Page  ",a.createElement("strong",null,n," of ",t),"  "),a.createElement("span",null,"Go to page   ",a.createElement("input",{className:"paginator-input",type:"number",placeholder:n,onChange:function(e){var n,a=e.target.value,o=Number(a);clearTimeout(r),!a||o<1||o>t||(o>=1&&o<=t&&(n=o),r=window.setTimeout((function(){return d(n,s)}),300))}})),"  "),a.createElement("span",{className:"total-assets"},"Total  ",a.createElement("strong",null,u||0)))}},function(e,t){e.exports=c},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},a=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(61),s=n(358);t.default=function(e){var t=e.dndType,n=e.dndName,u=e.row,l=a(i.useDrag({type:t,item:{name:n,rowData:u.original,type:t}}),2),c=(l[0],l[1]);return o.createElement("tr",r({},e.rowProps,{ref:s.default([c,e.rowRef])}),e.children)}},function(e,t,n){"use strict";n.r(t),t.default=function(e){return function(t){e.forEach((function(e){"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(5),s=n(22),u=n(4),l=function(e){function t(n){var r=e.call(this,n)||this;return r.render=function(){for(var e=r.props,n=e.page,a=e.totalPages,l=e.totalItems,c=Number.isInteger(a),d=Number.isInteger(a)&&a>1,p=!c||n-1==0,f=!c||n+1>a,h=Math.max(n-t.DEFAULT_STEP,1),m=Math.min(n+t.DEFAULT_STEP,a),_=[],y=h;y<=m;y++)_.push(y);return o.createElement("div",{className:"paginator"},o.createElement("div",{className:"pagination-controls"},o.createElement("span",{className:"paging-button-group"},o.createElement(i.default,{color:"secondary",size:"small",disabled:p,onClick:function(){return r.props.onPage(1)}},u.ICON_ANGLE_DOUBLE_LEFT),o.createElement(i.default,{color:"secondary",size:"small",disabled:p,onClick:function(){return r.props.onPage(n-1)}},u.ICON_ANGLE_LEFT)),o.createElement("div",{className:"jump-to-wrapper"},o.createElement(s.default,{label:"Page",value:n,disable:!d,options:_,onChange:function(e){return r.props.onPage(parseInt(e,10))}})),o.createElement("span",{className:"paging-button-group"},o.createElement(i.default,{color:"secondary",size:"small",disabled:f,onClick:function(){return r.props.onPage(n+1)}},u.ICON_ANGLE_RIGHT),o.createElement(i.default,{color:"secondary",size:"small",disabled:f,onClick:function(){return r.props.onPage(a)}},u.ICON_ANGLE_DOUBLE_RIGHT))),o.createElement("div",{className:"total-assets"},"Total: ",l||t.DEFAULT_TOTAL))},r}return a(t,e),t.DEFAULT_TOTAL=0,t.DEFAULT_STEP=25,t}(o.PureComponent);t.default=l},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(5),s=n(4),u=function(e){function t(t){var n=e.call(this,t)||this;return n.closeStyles={position:"absolute",right:"0px",top:"0px"},n.evtHandlers={onClose:function(e){return n.onClose(e)}},n}return a(t,e),t.prototype.onClose=function(e){(0,this.props.onRequestClose)(e)},t.prototype.render=function(){var e=this.props,t=e.isOpen,n=(e.children,e.style),r=e.wrapperStyle;return t?o.createElement("div",{className:"modal",style:r},o.createElement("div",{className:"modal-bg",onClick:this.evtHandlers.onClose}),o.createElement("div",{className:"modal-container",style:n},o.createElement("div",{className:"modal-content"},this.props.children),o.createElement(i.default,{onClick:this.evtHandlers.onClose,customStyles:this.closeStyles},s.ICON_TIMES))):null},t}(o.PureComponent);t.default=u},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),s=n(101),u=n(97),l=n(98),c=n(5),d=n(4),p=function(e){function t(t){var n=e.call(this,t)||this;return n.headerRef=i.createRef(),n.state={allowableTabsInView:0,isMenuOpen:!1},n}return a(t,e),t.prototype.componentDidMount=function(){var e=Math.floor(this.allowableNumOfTabs());this.setState({allowableTabsInView:e})},t.prototype.componentDidUpdate=function(e){var t=Math.floor(this.allowableNumOfTabs());this.setState({allowableTabsInView:t})},t.prototype.allowableNumOfTabs=function(){var e=this.props,t=e.options,n=e.tabPadding,r=0,a=this.headerRef.current;if(a){for(var o=a.offsetWidth,i=0;i<t.length;i++){var s=t[i],u=s.canClose||s.menuButtons?20:0,l=document.createElement("div");if(l.className="tab-header-option",l.innerHTML=s.label,a.appendChild(l),r+=l.offsetWidth+u,a.removeChild(l),l=null,r>=o-n-25)return i}return t.length}},t.prototype.renderContent=function(){var e,t,n,r,a=this.props,s=a.options,u=a.activeTab,l=a.keepMounted,c=a.width,d=a.height;if(l){var p=[];try{for(var f=o(s),h=f.next();!h.done;h=f.next()){var m=(v=h.value).key===u,_=i.cloneElement(v.content,{active:m,width:c,height:d});p.push(_)}}catch(t){e={error:t}}finally{try{h&&!h.done&&(t=f.return)&&t.call(f)}finally{if(e)throw e.error}}return p.length>0?p:null}try{for(var y=o(s),g=y.next();!g.done;g=y.next()){var v;if((v=g.value).key===u||!u)return v.content}}catch(e){n={error:e}}finally{try{g&&!g.done&&(r=y.return)&&r.call(y)}finally{if(n)throw n.error}}return null},t.prototype.renderHeader=function(){for(var e=this,t=this.props,n=t.options,r=t.activeTab,a=[],o=[],s=!1,p=function(t){var u=n[t],p=u.canClose,h=u.key,m=u.label,_=u.menuButtons,y=p?i.createElement(c.default,{style:"subtle",size:"small",onClick:function(t){t.preventDefault(),t.stopPropagation(),e.props.onClose(h)}},d.ICON_TIMES):null,g=_||null,v=h===r?"active":"";t<f.state.allowableTabsInView?a.push(i.createElement("div",{className:"tab-header-option "+v,onClick:function(){return e.props.onChange(h)},key:h},m,y,g)):(r!==h||s||(s=!0),o.push(i.createElement(l.default,{key:h,label:i.createElement("span",null,m,y,g),onClick:function(t){e.props.onChange(h)},active:r===h})))},f=this,h=0;h<n.length;h++)p(h);var m=i.createElement(c.default,{size:"large",style:"subtle",color:s?"primary":null},d.ICON_BARS);return i.createElement(i.Fragment,null,a,o.length>0?i.createElement("span",{className:"tab-header-menu"},i.createElement(u.default,{position:"left",items:o,onClick:function(t){e.setState({isMenuOpen:t})},isOpen:this.state.isMenuOpen,button:m})):null)},t.prototype.render=function(){return i.createElement("div",{className:"tabs"},i.createElement("div",{ref:this.headerRef,className:"tab-header"},this.renderHeader()),i.createElement("div",{className:"tab-content"},this.renderContent()))},t}(i.PureComponent);t.default=s.withResizeDetector(p)},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},i=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,a=e.length;n<r;n++,a++)e[a]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),u=n(62),l=n(5),c=n(11),d=n(100),p=n(9),f=n(4),h=function(e){function t(t){var n=e.call(this,t)||this;return n.state={textInputValue:""},n.inputRef=s.createRef(),u.default.filter=function(e){return p.filterHotkeys(e)},n.submitHandler=function(){return n.submitOption()},n}return a(t,e),t.prototype.deleteOption=function(e){var t=i([],o(this.props.options));t.splice(e,1),this.props.onChange(t)},t.prototype.componentWillUnmount=function(){u.default.unbind("enter",this.submitHandler)},t.prototype.inputBlur=function(e){u.default.unbind("enter",this.submitHandler),this.props.onBlur&&this.props.onBlur()},t.prototype.inputChanged=function(e){this.setState({textInputValue:e.target.value})},t.prototype.inputFocus=function(e){u.default("enter",this.submitHandler),this.props.onFocus&&this.props.onFocus()},t.prototype.submitOption=function(){var e=this,t=this.state.textInputValue,n=this.props.onError;if(""!==t){var r=void 0;-1===(r=this.props.options?i([],o(this.props.options)):[]).indexOf(t)?(r.push(t),this.props.onChange(r),this.setState({textInputValue:""},(function(){var t=e.inputRef.current;t&&t.focus()}))):n&&this.props.onError('"'+t+'" already exists in the list.')}else n&&this.props.onError("Can not add an empty item to the list")},t.prototype.render=function(){var e=this,t=this.props,n=t.label,r=t.options,a=t.placeholder,o=t.disabled,i=t.width,u=t.tooltip,l=(t.tooltipAdd,t.info),p=t.labelPosition,f=this.state.textInputValue;return s.createElement(c.default,{customClass:"list-field",label:n,tooltip:u,buttons:this.renderButtons(),info:l,labelPosition:p,width:i},s.createElement("input",{type:"text",placeholder:a,value:f,ref:this.inputRef,disabled:o,onChange:function(t){return e.inputChanged(t)},onFocus:function(t){return e.inputFocus(t)},onBlur:function(t){return e.inputBlur(t)}}),s.createElement(d.default,{items:r,removable:!0,onRemove:function(t){return e.deleteOption(t)}}))},t.prototype.renderButtons=function(){var e=this.props,t=e.buttons,n=e.tooltipAdd,r=t?i([],o(t)):[];return r.push(s.createElement(l.default,{key:"btn-submit",style:"subtle",tooltip:n,color:"primary",onClick:this.submitHandler},f.ICON_PLUS)),r},t}(s.PureComponent);t.default=h},function(e,t){e.exports=d},function(e,t,n){"use strict";n.r(t),n.d(t,"Toast",(function(){return d}));var r=n(0),a=n.n(r),o=n(35),i=n.n(o),s=n(2),u=function(){return(u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};var l={success:function(e){return a.a.createElement("svg",u({viewBox:"0 0 426.667 426.667",width:18,height:18},e),a.a.createElement("path",{d:"M213.333 0C95.518 0 0 95.514 0 213.333s95.518 213.333 213.333 213.333c117.828 0 213.333-95.514 213.333-213.333S331.157 0 213.333 0zm-39.134 322.918l-93.935-93.931 31.309-31.309 62.626 62.622 140.894-140.898 31.309 31.309-172.203 172.207z",fill:"#6ac259"}))},warn:function(e){return a.a.createElement("svg",u({viewBox:"0 0 310.285 310.285",width:18,height:18},e),a.a.createElement("path",{d:"M264.845 45.441C235.542 16.139 196.583 0 155.142 0 113.702 0 74.743 16.139 45.44 45.441 16.138 74.743 0 113.703 0 155.144c0 41.439 16.138 80.399 45.44 109.701 29.303 29.303 68.262 45.44 109.702 45.44s80.399-16.138 109.702-45.44c29.303-29.302 45.44-68.262 45.44-109.701.001-41.441-16.137-80.401-45.439-109.703zm-132.673 3.895a12.587 12.587 0 0 1 9.119-3.873h28.04c3.482 0 6.72 1.403 9.114 3.888 2.395 2.485 3.643 5.804 3.514 9.284l-4.634 104.895c-.263 7.102-6.26 12.933-13.368 12.933H146.33c-7.112 0-13.099-5.839-13.345-12.945L128.64 58.594c-.121-3.48 1.133-6.773 3.532-9.258zm23.306 219.444c-16.266 0-28.532-12.844-28.532-29.876 0-17.223 12.122-30.211 28.196-30.211 16.602 0 28.196 12.423 28.196 30.211.001 17.591-11.456 29.876-27.86 29.876z",fill:"#FFDA44"}))},loading:function(e){return a.a.createElement("div",u({className:"ct-icon-loading"},e))},info:function(e){return a.a.createElement("svg",u({viewBox:"0 0 23.625 23.625",width:18,height:18},e),a.a.createElement("path",{d:"M11.812 0C5.289 0 0 5.289 0 11.812s5.289 11.813 11.812 11.813 11.813-5.29 11.813-11.813S18.335 0 11.812 0zm2.459 18.307c-.608.24-1.092.422-1.455.548a3.838 3.838 0 0 1-1.262.189c-.736 0-1.309-.18-1.717-.539s-.611-.814-.611-1.367c0-.215.015-.435.045-.659a8.23 8.23 0 0 1 .147-.759l.761-2.688c.067-.258.125-.503.171-.731.046-.23.068-.441.068-.633 0-.342-.071-.582-.212-.717-.143-.135-.412-.201-.813-.201-.196 0-.398.029-.605.09-.205.063-.383.12-.529.176l.201-.828c.498-.203.975-.377 1.43-.521a4.225 4.225 0 0 1 1.29-.218c.731 0 1.295.178 1.692.53.395.353.594.812.594 1.376 0 .117-.014.323-.041.617a4.129 4.129 0 0 1-.152.811l-.757 2.68a7.582 7.582 0 0 0-.167.736 3.892 3.892 0 0 0-.073.626c0 .356.079.599.239.728.158.129.435.194.827.194.185 0 .392-.033.626-.097.232-.064.4-.121.506-.17l-.203.827zm-.134-10.878a1.807 1.807 0 0 1-1.275.492c-.496 0-.924-.164-1.28-.492a1.57 1.57 0 0 1-.533-1.193c0-.465.18-.865.533-1.196a1.812 1.812 0 0 1 1.28-.497c.497 0 .923.165 1.275.497.353.331.53.731.53 1.196 0 .467-.177.865-.53 1.193z",fill:"#006DF0"}))},error:function(e){return a.a.createElement("svg",u({viewBox:"0 0 51.976 51.976",width:18,height:18},e),a.a.createElement("path",{d:"M44.373 7.603c-10.137-10.137-26.632-10.138-36.77 0-10.138 10.138-10.137 26.632 0 36.77s26.632 10.138 36.77 0c10.137-10.138 10.137-26.633 0-36.77zm-8.132 28.638a2 2 0 0 1-2.828 0l-7.425-7.425-7.778 7.778a2 2 0 1 1-2.828-2.828l7.778-7.778-7.425-7.425a2 2 0 1 1 2.828-2.828l7.425 7.425 7.071-7.071a2 2 0 1 1 2.828 2.828l-7.071 7.071 7.425 7.425a2 2 0 0 1 0 2.828z",fill:"#D80027"}))}},c={success:"#6EC05F",info:"#1271EC",warn:"#FED953",error:"#D60A2E",loading:"#0088ff"},d=function(e){var t,n,o,i,s="margin"+((e.position||"top-center").includes("bottom")?"Bottom":"Top"),d=["ct-toast",e.onClick?" ct-cursor-pointer":"","ct-toast-"+e.type].join(" "),p=((null===(n=e.bar)||void 0===n?void 0:n.size)||"3px")+" "+((null===(o=e.bar)||void 0===o?void 0:o.style)||"solid")+" "+((null===(i=e.bar)||void 0===i?void 0:i.color)||c[e.type]),f=l[e.type],h=Object(r.useState)(((t={opacity:0})[s]=-15,t)),m=h[0],_=h[1],y=u({paddingLeft:e.heading?25:void 0,minHeight:e.heading?50:void 0,borderLeft:p},m),g=function(){var t;_(((t={opacity:0})[s]="-15px",t)),setTimeout((function(){e.onHide(e.id,e.position)}),300)};Object(r.useEffect)((function(){var t,n=setTimeout((function(){var e;_(((e={opacity:1})[s]="15px",e))}),50);return 0!==e.hideAfter&&(t=setTimeout((function(){g()}),1e3*e.hideAfter)),function(){clearTimeout(n),t&&clearTimeout(t)}}),[]),Object(r.useEffect)((function(){e.show||g()}),[e.show]);var v={tabIndex:0,onClick:e.onClick,onKeyPress:function(t){13===t.keyCode&&e.onClick(t)}};return a.a.createElement("div",u({className:d,role:e.role?e.role:"status",style:y},e.onClick?v:{}),e.renderIcon?e.renderIcon():a.a.createElement(f,null),a.a.createElement("div",{className:e.heading?"ct-text-group-heading":"ct-text-group"},e.heading&&a.a.createElement("h4",{className:"ct-heading"},e.heading),a.a.createElement("div",{className:"ct-text"},e.text)))};d.propTypes={type:s.string.isRequired,text:Object(s.oneOfType)([s.string,s.node]).isRequired,show:s.bool,onHide:s.func,id:Object(s.oneOfType)([s.string,s.number]),hideAfter:s.number,heading:s.string,position:s.string,renderIcon:s.func,bar:Object(s.shape)({}),onClick:s.func,role:s.string},d.defaultProps={id:void 0,show:!0,onHide:void 0,hideAfter:3,heading:void 0,position:"top-center",renderIcon:void 0,bar:{},onClick:void 0,role:"status"};var p=function(e){return e.replace(/-([a-z])/g,(function(e){return e[1].toUpperCase()}))},f={topLeft:[],topCenter:[],topRight:[],bottomLeft:[],bottomCenter:[],bottomRight:[]},h=function(e){var t=e.toast,n=e.hiddenID,o=Object(r.useState)(f),i=o[0],s=o[1];Object(r.useEffect)((function(){t&&s((function(e){var n,r=p(t.position||"top-center");return u(u({},e),((n={})[r]=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),a=0;for(t=0;t<n;t++)for(var o=arguments[t],i=0,s=o.length;i<s;i++,a++)r[a]=o[i];return r}(e[r],[t]),n))}))}),[t]);var l=function(e,t){s((function(n){var r,a=p(t||"top-center");return u(u({},n),((r={})[a]=n[a].filter((function(t){return t.id!==e})),r))}))},c=["Left","Center","Right"];return a.a.createElement(a.a.Fragment,null,["top","bottom"].map((function(e){return a.a.createElement("div",{key:"row_"+e,className:"ct-row"},c.map((function(t){var r=""+e+t,o=["ct-group","bottom"===e?"ct-flex-bottom":""].join(" ");return a.a.createElement("div",{key:r,className:o},i[r].map((function(e){return a.a.createElement(d,u({key:r+"_"+e.id},e,{id:e.id,text:e.text,type:e.type,onClick:e.onClick,hideAfter:e.hideAfter,show:n!==e.id,onHide:l}))})))})))})))};h.propTypes={toast:Object(s.shape)({}),hiddenID:s.number},h.defaultProps={toast:void 0,hiddenID:void 0};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===n&&r.firstChild?r.insertBefore(a,r.firstChild):r.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}("#ct-container {\n\tposition: fixed;\n\twidth: 100%;\n\theight: 100vh;\n\ttop: 0px;\n\tleft: 0px;\n\tz-index: 2000;\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\tpointer-events: none;\n}\n\n.ct-row {\n\tdisplay: flex;\n\tjustify-content: space-between;\n}\n\n.ct-group {\n\tflex: 1;\n\tmargin: 10px 20px;\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: center;\n}\n\n.ct-group:first-child {\n\talign-items: flex-start;\n}\n\n.ct-group:last-child {\n\talign-items: flex-end;\n}\n\n.ct-flex-bottom {\n\tjustify-content: flex-end;\n}\n\n.ct-toast {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tpadding: 12px 20px;\n\tbackground-color: #fff;\n\tbox-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n\tcolor: #000;\n\tborder-radius: 4px;\n\tmargin: 0px;\n\topacity: 1;\n\ttransition: 0.3s all ease-in-out;\n\tmin-height: 45px;\n\tpointer-events: all;\n}\n\n.ct-toast:focus {\n\toutline: none;\n}\n\n.ct-toast svg {\n\tmin-width: 18px;\n}\n\n.ct-cursor-pointer {\n\tcursor: pointer;\n}\n\n.ct-icon-loading {\n\tdisplay: inline-block;\n\twidth: 20px;\n\theight: 20px;\n}\n\n.ct-icon-loading:after {\n\tcontent: ' ';\n\tdisplay: block;\n\twidth: 14px;\n\theight: 14px;\n\tmargin: 1px;\n\tborder-radius: 50%;\n\tborder: 2px solid #0088ff;\n\tborder-color: #0088ff transparent #0088ff transparent;\n\tanimation: ct-icon-loading 1.2s linear infinite;\n}\n\n@keyframes ct-icon-loading {\n\t0% {\n\t\ttransform: rotate(0deg);\n\t}\n\t100% {\n\t\ttransform: rotate(360deg);\n\t}\n}\n\n.ct-text-group {\n\tmargin-left: 15px;\n}\n\n.ct-text-group-heading {\n\tmargin-left: 25px;\n}\n\n.ct-heading {\n\tfont-size: 18px;\n\tmargin: 0px;\n\tmargin-bottom: 5px;\n}\n\n.ct-text {\n\tfont-size: 14px;\n}\n\n@media (max-width: 768px) {\n\t.ct-row {\n\t\tjustify-content: flex-start;\n\t\tflex-direction: column;\n\t\tmargin: 7px 0px;\n\t}\n\n\t.ct-group {\n\t\tflex: none;\n\t\tmargin: 0px;\n\t}\n\n\t.ct-toast {\n\t\tmargin: 8px 15px;\n\t\twidth: initial;\n\t}\n}\n");var m=0,_=function(e,t){var n,r,o=document.getElementById((null===(n=t)||void 0===n?void 0:n.toastContainerID)||"ct-container");o||((o=document.createElement("div")).id="ct-container",document.body.appendChild(o)),m+=1;var s=1e3*(void 0===(null===(r=t)||void 0===r?void 0:r.hideAfter)?3:t.hideAfter),l=u({id:m,text:e},t);i.a.render(a.a.createElement(h,{toast:l}),o);var c=new Promise((function(e){setTimeout((function(){e()}),s)}));return c.hide=function(){i.a.render(a.a.createElement(h,{hiddenID:l.id}),o)},c};_.success=function(e,t){return _(e,u(u({},t),{type:"success"}))},_.warn=function(e,t){return _(e,u(u({},t),{type:"warn"}))},_.info=function(e,t){return _(e,u(u({},t),{type:"info"}))},_.error=function(e,t){return _(e,u(u({},t),{type:"error"}))},_.loading=function(e,t){return _(e,u(u({},t),{type:"loading"}))},t.default=_},function(e,t,n){"use strict";var r=n(366);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,o,i){if(i!==r){var s=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 s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(11),s=function(e){function t(t){var n=e.call(this,t)||this;return n.state={tempValue:null},n}return a(t,e),t.prototype.componentWillUnmount=function(){clearTimeout(this.updateTimeout)},t.prototype.updateValue=function(e){this.props.onChange(e)},t.prototype.rangeInputChange=function(e){var t=this,n=e.target.value,r=parseFloat(n);clearTimeout(this.updateTimeout),this.setState({tempValue:r},(function(){t.updateTimeout=setTimeout((function(){t.updateValue(r),t.setState({tempValue:null})}),100)}))},t.prototype.numberInputChange=function(e){var t=this.props,n=t.min,r=t.max,a=e.target.value;(a=""===a?0:parseFloat(a))>=n&&a<=r&&this.updateValue(a)},t.prototype.render=function(){var e=this,t=this.props,n=t.label,r=t.width,a=t.min,s=t.max,u=t.step,l=t.defaultValue,c=t.value,d=t.tooltip,p=t.info,f=t.labelPosition,h=this.state.tempValue,m=null!==h?h:null==c?l:c;return o.createElement(i.default,{customClass:"slider-field",label:n,tooltip:d,info:p,labelPosition:f,width:r},o.createElement("input",{onChange:function(t){return e.rangeInputChange(t)},type:"range",min:a,max:s,value:m,step:u}),o.createElement("input",{className:"val",onChange:function(t){return e.numberInputChange(t)},type:"number",value:m}))},t}(o.PureComponent);t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flattenNames=void 0;var r=s(n(369)),a=s(n(66)),o=s(n(381)),i=s(n(382));function s(e){return e&&e.__esModule?e:{default:e}}var u=t.flattenNames=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=[];return(0,i.default)(t,(function(t){Array.isArray(t)?e(t).map((function(e){return n.push(e)})):(0,o.default)(t)?(0,a.default)(t,(function(e,t){!0===e&&n.push(t),n.push(t+"-"+e)})):(0,r.default)(t)&&n.push(t)})),n};t.default=u},function(e,t,n){var r=n(18),a=n(12),o=n(15);e.exports=function(e){return"string"==typeof e||!a(e)&&o(e)&&"[object String]"==r(e)}},function(e,t,n){var r=n(31),a=Object.prototype,o=a.hasOwnProperty,i=a.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=o.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var a=i.call(e);return r&&(t?e[s]=n:delete e[s]),a}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r=n(373)();e.exports=r},function(e,t){e.exports=function(e){return function(t,n,r){for(var a=-1,o=Object(t),i=r(t),s=i.length;s--;){var u=i[e?s:++a];if(!1===n(o[u],u,o))break}return t}}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},function(e,t,n){var r=n(18),a=n(15);e.exports=function(e){return a(e)&&"[object Arguments]"==r(e)}},function(e,t){e.exports=function(){return!1}},function(e,t,n){var r=n(18),a=n(68),o=n(15),i={};i["[object Float32Array]"]=i["[object Float64Array]"]=i["[object Int8Array]"]=i["[object Int16Array]"]=i["[object Int32Array]"]=i["[object Uint8Array]"]=i["[object Uint8ClampedArray]"]=i["[object Uint16Array]"]=i["[object Uint32Array]"]=!0,i["[object Arguments]"]=i["[object Array]"]=i["[object ArrayBuffer]"]=i["[object Boolean]"]=i["[object DataView]"]=i["[object Date]"]=i["[object Error]"]=i["[object Function]"]=i["[object Map]"]=i["[object Number]"]=i["[object Object]"]=i["[object RegExp]"]=i["[object Set]"]=i["[object String]"]=i["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&a(e.length)&&!!i[r(e)]}},function(e,t,n){var r=n(71),a=n(379),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return a(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}},function(e,t,n){var r=n(109)(Object.keys,Object);e.exports=r},function(e,t,n){var r=n(111);e.exports=function(e){return"function"==typeof e?e:r}},function(e,t,n){var r=n(18),a=n(72),o=n(15),i=Function.prototype,s=Object.prototype,u=i.toString,l=s.hasOwnProperty,c=u.call(Object);e.exports=function(e){if(!o(e)||"[object Object]"!=r(e))return!1;var t=a(e);if(null===t)return!0;var n=l.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&u.call(n)==c}},function(e,t,n){var r=n(112),a=n(383),o=n(441),i=n(12);e.exports=function(e,t){return(i(e)?r:o)(e,a(t,3))}},function(e,t,n){var r=n(384),a=n(428),o=n(111),i=n(12),s=n(438);e.exports=function(e){return"function"==typeof e?e:null==e?o:"object"==typeof e?i(e)?a(e[0],e[1]):r(e):s(e)}},function(e,t,n){var r=n(385),a=n(427),o=n(122);e.exports=function(e){var t=a(e);return 1==t.length&&t[0][2]?o(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},function(e,t,n){var r=n(73),a=n(114);e.exports=function(e,t,n,o){var i=n.length,s=i,u=!o;if(null==e)return!s;for(e=Object(e);i--;){var l=n[i];if(u&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i<s;){var c=(l=n[i])[0],d=e[c],p=l[1];if(u&&l[2]){if(void 0===d&&!(c in e))return!1}else{var f=new r;if(o)var h=o(d,p,c,e,t,f);if(!(void 0===h?a(p,d,3,o,f):h))return!1}}return!0}},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,n){var r=n(45),a=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():a.call(t,n,1),--this.size,!0)}},function(e,t,n){var r=n(45);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},function(e,t,n){var r=n(45);e.exports=function(e){return r(this.__data__,e)>-1}},function(e,t,n){var r=n(45);e.exports=function(e,t){var n=this.__data__,a=r(n,e);return a<0?(++this.size,n.push([e,t])):n[a][1]=t,this}},function(e,t,n){var r=n(44);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(44),a=n(75),o=n(76);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var i=n.__data__;if(!a||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(i)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(110),a=n(397),o=n(23),i=n(113),s=/^\[object .+?Constructor\]$/,u=Function.prototype,l=Object.prototype,c=u.toString,d=l.hasOwnProperty,p=RegExp("^"+c.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||a(e))&&(r(e)?p:s).test(i(e))}},function(e,t,n){var r,a=n(398),o=(r=/[^.]+$/.exec(a&&a.keys&&a.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!o&&o in e}},function(e,t,n){var r=n(14)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(401),a=n(44),o=n(75);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||a),string:new r}}},function(e,t,n){var r=n(402),a=n(403),o=n(404),i=n(405),s=n(406);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=a,u.prototype.get=o,u.prototype.has=i,u.prototype.set=s,e.exports=u},function(e,t,n){var r=n(46);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(e,t){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},function(e,t,n){var r=n(46),a=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return a.call(t,e)?t[e]:void 0}},function(e,t,n){var r=n(46),a=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:a.call(t,e)}},function(e,t,n){var r=n(46);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},function(e,t,n){var r=n(47);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},function(e,t){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},function(e,t,n){var r=n(47);e.exports=function(e){return r(this,e).get(e)}},function(e,t,n){var r=n(47);e.exports=function(e){return r(this,e).has(e)}},function(e,t,n){var r=n(47);e.exports=function(e,t){var n=r(this,e),a=n.size;return n.set(e,t),this.size+=n.size==a?0:1,this}},function(e,t,n){var r=n(73),a=n(115),o=n(418),i=n(421),s=n(48),u=n(12),l=n(67),c=n(108),d="[object Object]",p=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,f,h,m){var _=u(e),y=u(t),g=_?"[object Array]":s(e),v=y?"[object Array]":s(t),b=(g="[object Arguments]"==g?d:g)==d,w=(v="[object Arguments]"==v?d:v)==d,M=g==v;if(M&&l(e)){if(!l(t))return!1;_=!0,b=!1}if(M&&!b)return m||(m=new r),_||c(e)?a(e,t,n,f,h,m):o(e,t,g,n,f,h,m);if(!(1&n)){var L=b&&p.call(e,"__wrapped__"),T=w&&p.call(t,"__wrapped__");if(L||T){var k=L?e.value():e,x=T?t.value():t;return m||(m=new r),h(k,x,n,f,m)}}return!!M&&(m||(m=new r),i(e,t,n,f,h,m))}},function(e,t,n){var r=n(76),a=n(414),o=n(415);function i(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}i.prototype.add=i.prototype.push=a,i.prototype.has=o,e.exports=i},function(e,t){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},function(e,t){e.exports=function(e,t){return e.has(t)}},function(e,t,n){var r=n(31),a=n(116),o=n(74),i=n(115),s=n(419),u=n(420),l=r?r.prototype:void 0,c=l?l.valueOf:void 0;e.exports=function(e,t,n,r,l,d,p){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!d(new a(e),new a(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var f=s;case"[object Set]":var h=1&r;if(f||(f=u),e.size!=t.size&&!h)return!1;var m=p.get(e);if(m)return m==t;r|=2,p.set(e,t);var _=i(f(e),f(t),r,l,d,p);return p.delete(e),_;case"[object Symbol]":if(c)return c.call(e)==c.call(t)}return!1}},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},function(e,t,n){var r=n(117),a=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,o,i,s){var u=1&n,l=r(e),c=l.length;if(c!=r(t).length&&!u)return!1;for(var d=c;d--;){var p=l[d];if(!(u?p in t:a.call(t,p)))return!1}var f=s.get(e),h=s.get(t);if(f&&h)return f==t&&h==e;var m=!0;s.set(e,t),s.set(t,e);for(var _=u;++d<c;){var y=e[p=l[d]],g=t[p];if(o)var v=u?o(g,y,p,t,e,s):o(y,g,p,e,t,s);if(!(void 0===v?y===g||i(y,g,n,o,s):v)){m=!1;break}_||(_="constructor"==p)}if(m&&!_){var b=e.constructor,w=t.constructor;b==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w||(m=!1)}return s.delete(e),s.delete(t),m}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,a=0,o=[];++n<r;){var i=e[n];t(i,n,e)&&(o[a++]=i)}return o}},function(e,t,n){var r=n(19)(n(14),"DataView");e.exports=r},function(e,t,n){var r=n(19)(n(14),"Promise");e.exports=r},function(e,t,n){var r=n(19)(n(14),"Set");e.exports=r},function(e,t,n){var r=n(19)(n(14),"WeakMap");e.exports=r},function(e,t,n){var r=n(121),a=n(32);e.exports=function(e){for(var t=a(e),n=t.length;n--;){var o=t[n],i=e[o];t[n]=[o,i,r(i)]}return t}},function(e,t,n){var r=n(114),a=n(429),o=n(435),i=n(78),s=n(121),u=n(122),l=n(49);e.exports=function(e,t){return i(e)&&s(t)?u(l(e),t):function(n){var i=a(n,e);return void 0===i&&i===t?o(n,e):r(t,i,3)}}},function(e,t,n){var r=n(123);e.exports=function(e,t,n){var a=null==e?void 0:r(e,t);return void 0===a?n:a}},function(e,t,n){var r=n(431),a=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,i=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(a,(function(e,n,r,a){t.push(r?a.replace(o,"$1"):n||e)})),t}));e.exports=i},function(e,t,n){var r=n(432);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},function(e,t,n){var r=n(76);function a(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],o=n.cache;if(o.has(a))return o.get(a);var i=e.apply(this,r);return n.cache=o.set(a,i)||o,i};return n.cache=new(a.Cache||r),n}a.Cache=r,e.exports=a},function(e,t,n){var r=n(434);e.exports=function(e){return null==e?"":r(e)}},function(e,t,n){var r=n(31),a=n(112),o=n(12),i=n(79),s=r?r.prototype:void 0,u=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return a(t,e)+"";if(i(t))return u?u.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},function(e,t,n){var r=n(436),a=n(437);e.exports=function(e,t){return null!=e&&a(e,t,r)}},function(e,t){e.exports=function(e,t){return null!=e&&t in Object(e)}},function(e,t,n){var r=n(124),a=n(106),o=n(12),i=n(107),s=n(68),u=n(49);e.exports=function(e,t,n){for(var l=-1,c=(t=r(t,e)).length,d=!1;++l<c;){var p=u(t[l]);if(!(d=null!=e&&n(e,p)))break;e=e[p]}return d||++l!=c?d:!!(c=null==e?0:e.length)&&s(c)&&i(p,c)&&(o(e)||a(e))}},function(e,t,n){var r=n(439),a=n(440),o=n(78),i=n(49);e.exports=function(e){return o(e)?r(i(e)):a(e)}},function(e,t){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},function(e,t,n){var r=n(123);e.exports=function(e){return function(t){return r(t,e)}}},function(e,t,n){var r=n(442),a=n(43);e.exports=function(e,t){var n=-1,o=a(e)?Array(e.length):[];return r(e,(function(e,r,a){o[++n]=t(e,r,a)})),o}},function(e,t,n){var r=n(104),a=n(443)(r);e.exports=a},function(e,t,n){var r=n(43);e.exports=function(e,t){return function(n,a){if(null==n)return n;if(!r(n))return e(n,a);for(var o=n.length,i=t?o:-1,s=Object(n);(t?i--:++i<o)&&!1!==a(s[i],i,s););return n}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeClasses=void 0;var r=i(n(66)),a=i(n(445)),o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function i(e){return e&&e.__esModule?e:{default:e}}var s=t.mergeClasses=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=e.default&&(0,a.default)(e.default)||{};return t.map((function(t){var a=e[t];return a&&(0,r.default)(a,(function(e,t){n[t]||(n[t]={}),n[t]=o({},n[t],a[t])})),t})),n};t.default=s},function(e,t,n){var r=n(446);e.exports=function(e){return r(e,5)}},function(e,t,n){var r=n(73),a=n(447),o=n(125),i=n(449),s=n(450),u=n(453),l=n(454),c=n(455),d=n(456),p=n(117),f=n(457),h=n(48),m=n(458),_=n(459),y=n(464),g=n(12),v=n(67),b=n(466),w=n(23),M=n(468),L=n(32),T=n(80),k={};k["[object Arguments]"]=k["[object Array]"]=k["[object ArrayBuffer]"]=k["[object DataView]"]=k["[object Boolean]"]=k["[object Date]"]=k["[object Float32Array]"]=k["[object Float64Array]"]=k["[object Int8Array]"]=k["[object Int16Array]"]=k["[object Int32Array]"]=k["[object Map]"]=k["[object Number]"]=k["[object Object]"]=k["[object RegExp]"]=k["[object Set]"]=k["[object String]"]=k["[object Symbol]"]=k["[object Uint8Array]"]=k["[object Uint8ClampedArray]"]=k["[object Uint16Array]"]=k["[object Uint32Array]"]=!0,k["[object Error]"]=k["[object Function]"]=k["[object WeakMap]"]=!1,e.exports=function e(t,n,x,E,S,O){var D,Y=1&n,A=2&n,C=4&n;if(x&&(D=S?x(t,E,S,O):x(t)),void 0!==D)return D;if(!w(t))return t;var j=g(t);if(j){if(D=m(t),!Y)return l(t,D)}else{var P=h(t),H="[object Function]"==P||"[object GeneratorFunction]"==P;if(v(t))return u(t,Y);if("[object Object]"==P||"[object Arguments]"==P||H&&!S){if(D=A||H?{}:y(t),!Y)return A?d(t,s(D,t)):c(t,i(D,t))}else{if(!k[P])return S?t:{};D=_(t,P,Y)}}O||(O=new r);var I=O.get(t);if(I)return I;O.set(t,D),M(t)?t.forEach((function(r){D.add(e(r,n,x,r,t,O))})):b(t)&&t.forEach((function(r,a){D.set(a,e(r,n,x,a,t,O))}));var N=j?void 0:(C?A?f:p:A?T:L)(t);return a(N||t,(function(r,a){N&&(r=t[a=r]),o(D,a,e(r,n,x,a,t,O))})),D}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}},function(e,t,n){var r=n(19),a=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=a},function(e,t,n){var r=n(50),a=n(32);e.exports=function(e,t){return e&&r(t,a(t),e)}},function(e,t,n){var r=n(50),a=n(80);e.exports=function(e,t){return e&&r(t,a(t),e)}},function(e,t,n){var r=n(23),a=n(71),o=n(452),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=a(e),n=[];for(var s in e)("constructor"!=s||!t&&i.call(e,s))&&n.push(s);return n}},function(e,t){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},function(e,t,n){(function(e){var r=n(14),a=t&&!t.nodeType&&t,o=a&&"object"==typeof e&&e&&!e.nodeType&&e,i=o&&o.exports===a?r.Buffer:void 0,s=i?i.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}}).call(this,n(42)(e))},function(e,t){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},function(e,t,n){var r=n(50),a=n(77);e.exports=function(e,t){return r(e,a(e),t)}},function(e,t,n){var r=n(50),a=n(127);e.exports=function(e,t){return r(e,a(e),t)}},function(e,t,n){var r=n(118),a=n(127),o=n(80);e.exports=function(e){return r(e,o,a)}},function(e,t){var n=Object.prototype.hasOwnProperty;e.exports=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&n.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},function(e,t,n){var r=n(81),a=n(460),o=n(461),i=n(462),s=n(463);e.exports=function(e,t,n){var u=e.constructor;switch(t){case"[object ArrayBuffer]":return r(e);case"[object Boolean]":case"[object Date]":return new u(+e);case"[object DataView]":return a(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(e,n);case"[object Map]":return new u;case"[object Number]":case"[object String]":return new u(e);case"[object RegExp]":return o(e);case"[object Set]":return new u;case"[object Symbol]":return i(e)}}},function(e,t,n){var r=n(81);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},function(e,t){var n=/\w*$/;e.exports=function(e){var t=new e.constructor(e.source,n.exec(e));return t.lastIndex=e.lastIndex,t}},function(e,t,n){var r=n(31),a=r?r.prototype:void 0,o=a?a.valueOf:void 0;e.exports=function(e){return o?Object(o.call(e)):{}}},function(e,t,n){var r=n(81);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},function(e,t,n){var r=n(465),a=n(72),o=n(71);e.exports=function(e){return"function"!=typeof e.constructor||o(e)?{}:r(a(e))}},function(e,t,n){var r=n(23),a=Object.create,o=function(){function e(){}return function(t){if(!r(t))return{};if(a)return a(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=o},function(e,t,n){var r=n(467),a=n(69),o=n(70),i=o&&o.isMap,s=i?a(i):r;e.exports=s},function(e,t,n){var r=n(48),a=n(15);e.exports=function(e){return a(e)&&"[object Map]"==r(e)}},function(e,t,n){var r=n(469),a=n(69),o=n(70),i=o&&o.isSet,s=i?a(i):r;e.exports=s},function(e,t,n){var r=n(48),a=n(15);e.exports=function(e){return a(e)&&"[object Set]"==r(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.autoprefix=void 0;var r,a=n(66),o=(r=a)&&r.__esModule?r:{default:r},i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};var s={borderRadius:function(e){return{msBorderRadius:e,MozBorderRadius:e,OBorderRadius:e,WebkitBorderRadius:e,borderRadius:e}},boxShadow:function(e){return{msBoxShadow:e,MozBoxShadow:e,OBoxShadow:e,WebkitBoxShadow:e,boxShadow:e}},userSelect:function(e){return{WebkitTouchCallout:e,KhtmlUserSelect:e,MozUserSelect:e,msUserSelect:e,WebkitUserSelect:e,userSelect:e}},flex:function(e){return{WebkitBoxFlex:e,MozBoxFlex:e,WebkitFlex:e,msFlex:e,flex:e}},flexBasis:function(e){return{WebkitFlexBasis:e,flexBasis:e}},justifyContent:function(e){return{WebkitJustifyContent:e,justifyContent:e}},transition:function(e){return{msTransition:e,MozTransition:e,OTransition:e,WebkitTransition:e,transition:e}},transform:function(e){return{msTransform:e,MozTransform:e,OTransform:e,WebkitTransform:e,transform:e}},absolute:function(e){var t=e&&e.split(" ");return{position:"absolute",top:t&&t[0],right:t&&t[1],bottom:t&&t[2],left:t&&t[3]}},extend:function(e,t){var n=t[e];return n||{extend:e}}},u=t.autoprefix=function(e){var t={};return(0,o.default)(e,(function(e,n){var r={};(0,o.default)(e,(function(e,t){var n=s[t];n?r=i({},r,n(e)):r[t]=e})),t[n]=r})),t};t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hover=void 0;var r,a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=n(0),i=(r=o)&&r.__esModule?r:{default:r};function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var c=t.hover=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,o,l;s(this,r);for(var c=arguments.length,d=Array(c),p=0;p<c;p++)d[p]=arguments[p];return o=l=u(this,(n=r.__proto__||Object.getPrototypeOf(r)).call.apply(n,[this].concat(d))),l.state={hover:!1},l.handleMouseOver=function(){return l.setState({hover:!0})},l.handleMouseOut=function(){return l.setState({hover:!1})},l.render=function(){return i.default.createElement(t,{onMouseOver:l.handleMouseOver,onMouseOut:l.handleMouseOut},i.default.createElement(e,a({},l.props,l.state)))},u(l,o)}return l(r,n),r}(i.default.Component)};t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.active=void 0;var r,a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=n(0),i=(r=o)&&r.__esModule?r:{default:r};function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var c=t.active=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,o,l;s(this,r);for(var c=arguments.length,d=Array(c),p=0;p<c;p++)d[p]=arguments[p];return o=l=u(this,(n=r.__proto__||Object.getPrototypeOf(r)).call.apply(n,[this].concat(d))),l.state={active:!1},l.handleMouseDown=function(){return l.setState({active:!0})},l.handleMouseUp=function(){return l.setState({active:!1})},l.render=function(){return i.default.createElement(t,{onMouseDown:l.handleMouseDown,onMouseUp:l.handleMouseUp},i.default.createElement(e,a({},l.props,l.state)))},u(l,o)}return l(r,n),r}(i.default.Component)};t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e,t){var n={},r=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];n[e]=t};return 0===e&&r("first-child"),e===t-1&&r("last-child"),(0===e||e%2==0)&&r("even"),1===Math.abs(e%2)&&r("odd"),r("nth-child",e),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default=function(e){var t="string"==typeof e.className?e.className:"",n=e.isLoading?r.createElement("div",{className:"loading-bar"}):null,a=r.createElement("div",{className:"title"},e.title);return e.hasOwnProperty("tabs")&&Array.isArray(e.tabs)&&(a=e.tabs.map((function(t,n){return r.createElement("div",{key:n,className:"tab "+(e.activeTabName===t?"active":""),onClick:function(){return e.selectTab(t,n)}},t)}))),r.createElement("div",{className:"section "+t},r.createElement("div",{className:"section-header"},a,r.createElement("div",{className:"buttons"},e.buttons)),r.createElement("div",{className:"section-content"},e.children),n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),a=n(9),o=r.memo((function(e){return r.createElement("div",null,a.formatDateDefault(e.cell.row.values.date_created))}));t.default=o},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.HEADER_HEIGHT=t.PREVIEW_MAX_HEIGHT=t.PREVIEW_MAX_WIDTH=void 0;var i=n(0),s=n(90);t.PREVIEW_MAX_WIDTH=400,t.PREVIEW_MAX_HEIGHT=400,t.HEADER_HEIGHT=30;var u=function(e){function n(t){var n=e.call(this,t)||this;return n.iconRef=i.createRef(),n.evtHandlers={onClose:function(){return n.handleClose()},onClick:function(){return n.handlePreviewClick()}},n}return a(n,e),n.prototype.handleClose=function(){(0,this.props.onRequestClose)()},n.prototype.handlePreviewClick=function(){var e=this.props,t=e.onClick;e.showMedia||t()},n.prototype.render=function(){var e=this,n=function(n,r){if(e.iconRef.current){n||(n=t.PREVIEW_MAX_WIDTH),r||(r=t.PREVIEW_MAX_HEIGHT);var a=e.iconRef.current.getBoundingClientRect(),o=n/r,i=t.PREVIEW_MAX_WIDTH,s=i/o;s>t.PREVIEW_MAX_HEIGHT&&(i=(s=t.PREVIEW_MAX_HEIGHT)*o);var u=a.x+a.width-i,l=a.y+a.height-s-20;return u<0&&(u=a.x),l<t.HEADER_HEIGHT&&(l=a.y+20),{top:l,left:u,width:i,height:s,position:"absolute",zIndex:9e3}}},r=this.props,a=r.cell,u=r.showMedia;return i.createElement("div",{ref:this.iconRef,className:"asset-type-cell",onClick:this.evtHandlers.onClick},i.createElement(s.AssetsTypeIcon,{type:a.row.values.type}),a.row.values.type===s.ASSET_TYPES.IMAGE&&i.createElement(s.ImagePreview,{style:o({},n(a.row.original.width,a.row.original.height)),showMedia:u,url:a.row.original.url,onRequestClose:this.evtHandlers.onClose}),a.row.values.type===s.ASSET_TYPES.VIDEO&&i.createElement(s.VideoPreview,{playbackSettings:{autoPlay:!0,loop:!1},style:n(a.row.original.width,a.row.original.height),showMedia:u,url:a.row.original.url,onRequestClose:this.evtHandlers.onClose}))},n}(i.PureComponent),l=i.memo(u);t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.secondsToTime=void 0;var r=n(0),a=n(17),o=n(8),i=n(10);t.secondsToTime=function(e){var t=Math.floor(e/60),n=Math.floor(e-60*t);return n<10&&(n="0"+n),t+":"+n};t.default=o.connect((function(e){return{}}),(function(e){return i.bindActionCreators({updateAssetName:a.updateAssetName},e)}))((function(e){var n=e.cell.row.original,a=n.duration;n.id;return null!=a?r.createElement("div",{className:"asset-duration-cell"},t.secondsToTime(a)):null}))},function(e,t){e.exports=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ASSET_DND_TYPES=void 0,t.ASSET_DND_TYPES={ASSET_NAME:"asset_name"}},function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i};Object.defineProperty(t,"__esModule",{value:!0});var a,o=n(0),i=n(0),s=n(13),u=n(17),l=n(8),c=n(10);t.default=l.connect((function(e){return{}}),(function(e){return c.bindActionCreators({updateAssetName:u.updateAssetName},e)}))((function(e){var t=e.cell.row.original,n=t.name,u=t.id,l=r(i.useState(""),2),c=l[0],d=l[1],p=function(t){e.updateAssetName(e.api,u,t)};return i.useEffect((function(){return d(n),function(){clearTimeout(a)}}),[n]),o.createElement(s.default,{value:c,width:"100%",onChange:function(e){return function(e){d(e),clearTimeout(a),a=setTimeout((function(){return p(e)}),1e3)}(e)}})}))},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(13),s=n(24),u=n(8),l=n(10),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.render=function(){var e=t.props.assetFilters;return o.createElement(i.default,{submittable:!0,submittableType:"search",value:e.name,doSubmit:function(e){return t.props.updateFilters({name:e})}})},t}return a(t,e),t}(o.PureComponent),d=u.connect((function(e){return{assetFilters:e.assetFilters}}),(function(e){return l.bindActionCreators({updateFilters:s.updateFilters},e)}))(o.memo(c));t.default=d},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(33),s=n(30),u=n(8),l=n(10),c=function(e){function t(t){var n=e.call(this,t)||this;return n.render=function(){var e=n.props,t=e.cell,r=e.selectedAssets,a=t.row.original.id,i=r.indexOf(a)>-1;return o.createElement(s.default,{label:"",width:"auto",value:i,onChange:function(e,t){return function(e,t){e?t.shiftKey&&r.length>0?n.props.selectMultipleAssets(a):n.props.selectAsset(a):n.props.deselectAsset(a)}(e,t)}})},n}return a(t,e),t}(o.PureComponent),d=u.connect((function(e){return{selectedAssets:e.selectedAssets}}),(function(e){return l.bindActionCreators({selectAsset:i.selectAsset,deselectAsset:i.deselectAsset,selectMultipleAssets:i.selectMultipleAssets},e)}))(o.memo(c));t.default=d},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(30),s=n(33),u=n(8),l=n(10),c=function(e){function t(t){var n=e.call(this,t)||this;return n.render=function(){var e=0===n.props.selectedAssets.length,t=e?function(){return n.props.selectAll()}:function(){return n.props.resetSelection()};return o.createElement(i.default,{label:"",propagate:!1,value:!e,onChange:t})},n}return a(t,e),t}(o.PureComponent),d=u.connect((function(e){return{selectedAssets:e.selectedAssets}}),(function(e){return l.bindActionCreators({selectAll:s.selectAll,resetSelection:s.resetSelection},e)}))(o.memo(c));t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),a=n(5),o=r.memo((function(e){return r.createElement(a.default,{color:"secondary",style:"subtle",size:"small",onClick:e.onClick},e.cell.row.values.tags.length)}));t.default=o},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(24),s=n(13),u=n(8),l=n(10),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.render=function(){var e=t.props.assetFilters;return o.createElement(s.default,{submittable:!0,submittableType:"search",value:e.tags,doSubmit:function(e){return t.props.updateFilters({tags:e})}})},t}return a(t,e),t}(o.PureComponent),d=u.connect((function(e){return{assetFilters:e.assetFilters}}),(function(e){return l.bindActionCreators({updateFilters:i.updateFilters},e)}))(o.memo(c));t.default=d},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(7),s=n(51),u=n(13),l=n(17),c=n(8),d=n(10),p=n(5),f=n(4),h=function(e){function t(n){var r=e.call(this,n)||this;return r.addTags=function(e,t){t&&r.props.addAssetTag(r.props.api,e,t)},r.render=function(){var e=r.props,n=e.row.original,a=n.id,l=n.tags,c=e.assetTags,d=l.map((function(e){return o.createElement(s.default,{key:e,copy:e,colorize:t.COLORIZE_TAGS,removeHandler:function(){return r.props.deleteAssetTag(r.props.api,a,e)}})}));return o.createElement("div",{className:"tags-column"},o.createElement(o.Fragment,null,o.createElement(u.default,{submittable:!0,submittableType:"add",suggestions:c,label:i.assets.tags.add,width:t.ADD_TAG_INPUT_WIDTH,doSubmit:function(e){return r.addTags(a,e)}}),d,o.createElement(p.default,{customStyles:{position:"absolute",right:"1px",top:"9px"},style:"subtle",onClick:function(e){return r.props.onClose(e,r.props.row)}},f.ICON_TIMES)))},r}return a(t,e),t.ADD_TAG_INPUT_WIDTH="280px",t.COLORIZE_TAGS=!0,t}(o.PureComponent);t.default=c.connect((function(e){return{assetTags:e.assetTags}}),(function(e){return d.bindActionCreators({addAssetTag:l.addAssetTag,deleteAssetTag:l.deleteAssetTag},e)}))(h)},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(51),s=n(13),u=n(17),l=n(8),c=n(10),d=function(e){function t(t){var n=e.call(this,t)||this;return n.render=function(){var e=n.props,t=e.cell,r=e.assetTags,a=t.row.original.tags.map((function(e){return o.createElement(i.default,{key:e,copy:e,colorize:!0,removeHandler:function(){return n.removeTag(e)}})}));return o.createElement("div",{className:"tags-complex-column"},a,o.createElement("div",{className:"new-tag"},o.createElement(s.default,{submittable:!0,submittableType:"add",placeholder:"+",hideButtons:!0,suggestions:r,doSubmit:function(e){return n.onSubmit(e)},width:"150px",buttons:[],value:n.state.newTag})))},n.state={newTag:""},n.inputRef=o.createRef(),n}return a(t,e),t.prototype.onSubmit=function(e){var t=this.props.cell.row.original,n=t.id;-1===t.tags.indexOf(e)&&this.props.addAssetTag(this.props.api,n,e),this.setState({newTag:""})},t.prototype.removeTag=function(e){var t=this.props.cell.row.original.id;this.props.deleteAssetTag(this.props.api,t,e)},t}(o.Component),p=l.connect((function(e){return{assetTags:e.assetTags}}),(function(e){return c.bindActionCreators({addAssetTag:u.addAssetTag,deleteAssetTag:u.deleteAssetTag},e)}))(o.memo(d));t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),a=n(85),o=r.memo((function(e){return r.createElement("div",{className:"asset-type-cell"},r.createElement(a.default,{type:e.cell.row.values.type}))}));t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),a=r.memo((function(e){var t=e.cell.row.original.processing?"processing":"complete";return r.createElement("div",{className:"asset-status-cell"},r.createElement("div",{className:"status-indicator "+t}))}));t.default=a},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(85),s=n(5),u=n(59),l=n(24),c=n(8),d=n(10),p=n(25),f=function(e){function t(t){var n=e.call(this,t)||this;return n.handleFilterChange=function(e){var t=e!==p.ASSET_TYPES.ALL?e:"";n.props.updateFilters({type:t,page:1})},n.render=function(){var e=n.state.openMenu,t=n.props.assetFilters.type,r=[],a=function(e){if(p.ASSET_TYPES.hasOwnProperty(e)){var t=p.ASSET_TYPES[e];r.push(o.createElement("div",{key:t,className:"asset-filter",onClick:function(){return n.handleFilterChange(t)}},o.createElement(i.default,{type:t})))}};for(var l in p.ASSET_TYPES)a(l);return o.createElement("div",{className:"centered cell"},o.createElement(s.default,{tooltip:"Filter by Asset type",buttonRef:n.typeFilterRef,onClick:function(){return n.setState({openMenu:!e})}},o.createElement(i.default,{type:t||"filter"}),o.createElement(u.default,{fixed:!0,show:e,position:"bottomleft",toggleRef:n.typeFilterRef,onOutsideClick:function(){return n.setState({openMenu:!1})}},r)))},n.state={openMenu:!1},n.typeFilterRef=o.createRef(),n}return a(t,e),t}(o.PureComponent),h=c.connect((function(e){return{assetFilters:e.assetFilters}}),(function(e){return d.bindActionCreators({updateFilters:l.updateFilters},e)}))(o.memo(f));t.default=h},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(34),s=n(26),u=n(86),l=function(e){function t(t){var n=e.call(this,t)||this;return n.defaultSize=600,n}return a(t,e),t.prototype.getWrapperStyle=function(){var e=this.props,t=e.padding,n=e.width,r=e.height,a=void 0!==t?t:i.DEFAULT_PADDING;return s.getPlayerStyle(n,r,this.defaultSize,this.defaultSize,a,this.defaultSize,this.defaultSize)},t.prototype.render=function(){var e=this.props,t=e.active,n=e.asset,r=n.name,a=n.url,i=n.id,s=e.width,l=e.height,c=this.getWrapperStyle();return!1!==t?o.createElement("div",{className:"media-player"},o.createElement("div",{className:"inner-viewer",style:c},o.createElement(u.default,{options:{width:s,height:l,x:0,y:0,rotation:0,id:"xxx",name:"xxx",content:"ABCDEFGHIJKLM\nNOPQRSTUVWXYZ\nabcdefghijklm\nnopqrstuvwxyz\n1234567890",color:"#000000",background_color:"#ffffff",font_size:80,font_weight:400,font_type:"custom",font:r,custom_font_url:a,custom_font_id:i,letter_spacing:null,word_spacing:null,line_height:null,horizontal_alignment:"center",vertical_alignment:"center",text_wrap:!0,text_fit:!0}}))):null},t}(o.PureComponent);t.default=l},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(7),s=n(30),u=n(128),l=n(52),c=n(10),d=n(8),p=n(4),f=n(5),h=function(e){function t(t){var n=e.call(this,t)||this;return n.render=function(){var e,t=n.props.assetUploads,r=t.uploads,a=t.autoTag,l=t.assignToStory;return e=r.length>0?r.map((function(e){var t=e.filename,r=e.percent,a=r<100?o.createElement(u.default,{progress:e.percent}):o.createElement("span",null,i.assets.uploads.preparePhase),s=r<100&&o.createElement(f.default,{key:"btn-cancel",onClick:function(){return n.handleCancelAssetUpload(t)},style:"subtle"},p.ICON_TIMES);return o.createElement("div",{className:"ongoing-upload",key:t},o.createElement("div",{className:"ongoing-upload-inner"},o.createElement("div",{className:"upload-filename"},t),s),a)})):o.createElement("div",{className:"no-ongoing-uploads"},i.assets.uploads.noUploads),o.createElement("div",{className:"uploads-menu"},o.createElement("div",{className:"uploads-controls"},o.createElement(s.default,{width:"50%",label:i.assets.uploads.autoTagInput,value:a,onChange:function(){return n.props.toggleAutoTag(!a)}}),o.createElement(s.default,{width:"50%",label:i.assets.uploads.assignToStoryInput,info:i.assets.uploads.assignToStoryInfo,value:l,onChange:function(){return n.props.toggleAssignToStory(!l)}})),o.createElement("div",{className:"uploads-list"},e))},n}return a(t,e),t.prototype.handleCancelAssetUpload=function(e){var t=this.props.api;this.props.cancelAssetUpload(e,t)},t}(o.PureComponent);t.default=d.connect((function(e){return{assetUploads:e.assetUploads}}),(function(e){return c.bindActionCreators({toggleAutoTag:l.toggleAutoTag,toggleAssignToStory:l.toggleAssignToStory,cancelAssetUpload:l.cancelAssetUpload},e)}))(h)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PreviewNotAvailable=void 0;var r=n(0),a=n(4),o=n(7);t.PreviewNotAvailable=function(e){return!0===e.active||void 0===e.active?r.createElement("div",{className:"preview-not-available"},r.createElement("div",{className:"cta"},r.createElement("div",{className:"icon"},a.ICON_BAN),r.createElement("p",null,o.assets.previewNotAvailable))):null}},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(34),s=n(26),u=function(e){function t(t){var n=e.call(this,t)||this;return n.width=1280,n.height=720,n.audioNode=o.createRef(),n}return a(t,e),t.prototype.getImageStyle=function(){var e=this.props,t=e.padding,n=e.width,r=e.height,a=void 0!==t?t:i.DEFAULT_PADDING;return s.getPlayerStyle(n,r,this.width,this.height,a)},t.prototype.render=function(){var e=this.props,t=e.url;return!1!==e.active?o.createElement("div",{className:"media-player"},o.createElement("div",{className:"inner-viewer",style:this.getImageStyle()},o.createElement("audio",{controls:!0,src:t,ref:this.audioNode}))):null},t}(o.PureComponent);t.default=u},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),s=n(87),u=n(5),l=n(7),c=n(4),d=function(e){function t(t){var n=e.call(this,t)||this;return n.videoNode=null,n.videoNode=i.createRef(),n.evtHandlers={onClose:function(e){return n.onClose(e)}},n}return a(t,e),t.prototype.onClose=function(e){(0,this.props.onRequestClose)(e)},t.prototype.render=function(){var e=this.props,t=e.showMedia,n=e.url,r=e.playbackSettings,a=e.style;return t?i.createElement(s.default,{id:"portal-root"},i.createElement("div",{style:o({},a),className:"close-icon-preview"},i.createElement(u.default,{key:"btn-filter",onClick:this.evtHandlers.onClose,size:"large",style:"subtle",tooltip:l.assets.field.tooltipFilter},c.ICON_TIMES)),i.createElement("video",{style:a,muted:!0,ref:this.videoNode,autoPlay:r.autoPlay,loop:r.loop,controls:!0,preload:"preload",src:n,className:"asset-preview-background"})):null},t}(i.PureComponent);t.default=d},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),s=n(87),u=n(4),l=n(5),c=n(7),d=function(e){function t(t){var n=e.call(this,t)||this;return n.imageNode=null,n.imageNode=i.createRef(),n.evtHandlers={onClose:function(e){return n.onClose(e)}},n.state={loaded:!1},n}return a(t,e),t.prototype.onClose=function(e){(0,this.props.onRequestClose)(e)},t.prototype.render=function(){var e=this,t=this.props,n=t.showMedia,r=t.url,a=t.style,d=this.state.loaded;return n?i.createElement(s.default,{id:"portal-root"},i.createElement("div",{style:o({},a),className:"close-icon-preview"},i.createElement(l.default,{key:"btn-filter",onClick:this.evtHandlers.onClose,size:"large",style:"subtle",tooltip:c.assets.field.tooltipFilter},u.ICON_TIMES)),i.createElement("img",{onLoad:function(){return e.setState({loaded:!0})},src:r,ref:this.imageNode,className:"asset-preview-background transparent "+(d?"":"hidden"),style:a})):null},t}(i.PureComponent);t.default=d},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(34),s=n(26),u=function(e){function t(t){var n=e.call(this,t)||this;return n.state={imageHeight:1080,imageWidth:1920},n.imgNode=o.createRef(),n}return a(t,e),t.prototype.getImageStyle=function(){var e=this.state,t=e.imageHeight,n=e.imageWidth,r=this.props,a=r.padding,o=r.width,u=r.height,l=void 0!==a?a:i.DEFAULT_PADDING;return t&&n?s.getPlayerStyle(o,u,n,t,l):{}},t.prototype.metadataLoaded=function(e){this.setState({imageWidth:e.target.naturalWidth,imageHeight:e.target.naturalHeight})},t.prototype.render=function(){var e=this.props;e.url;return!1!==e.active?o.createElement("div",{className:"mediap-player"},o.createElement("div",{className:"inner-viewer",style:this.getImageStyle()})):null},t}(o.PureComponent);t.default=u},function(e,t,n){var r,a,o;a=[t],void 0===(o="function"==typeof(r=function(e){"use strict";var t,n=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};!function(e){e[e.EOS=0]="EOS",e[e.Text=1]="Text",e[e.Incomplete=2]="Incomplete",e[e.ESC=3]="ESC",e[e.Unknown=4]="Unknown",e[e.SGR=5]="SGR",e[e.OSCURL=6]="OSCURL"}(t||(t={}));var r=function(){function e(){this.VERSION="4.0.4",this.setup_palettes(),this._use_classes=!1,this._escape_for_html=!0,this.bold=!1,this.fg=this.bg=null,this._buffer="",this._url_whitelist={http:1,https:1}}return Object.defineProperty(e.prototype,"use_classes",{get:function(){return this._use_classes},set:function(e){this._use_classes=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"escape_for_html",{get:function(){return this._escape_for_html},set:function(e){this._escape_for_html=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"url_whitelist",{get:function(){return this._url_whitelist},set:function(e){this._url_whitelist=e},enumerable:!0,configurable:!0}),e.prototype.setup_palettes=function(){var e=this;this.ansi_colors=[[{rgb:[0,0,0],class_name:"ansi-black"},{rgb:[187,0,0],class_name:"ansi-red"},{rgb:[0,187,0],class_name:"ansi-green"},{rgb:[187,187,0],class_name:"ansi-yellow"},{rgb:[0,0,187],class_name:"ansi-blue"},{rgb:[187,0,187],class_name:"ansi-magenta"},{rgb:[0,187,187],class_name:"ansi-cyan"},{rgb:[255,255,255],class_name:"ansi-white"}],[{rgb:[85,85,85],class_name:"ansi-bright-black"},{rgb:[255,85,85],class_name:"ansi-bright-red"},{rgb:[0,255,0],class_name:"ansi-bright-green"},{rgb:[255,255,85],class_name:"ansi-bright-yellow"},{rgb:[85,85,255],class_name:"ansi-bright-blue"},{rgb:[255,85,255],class_name:"ansi-bright-magenta"},{rgb:[85,255,255],class_name:"ansi-bright-cyan"},{rgb:[255,255,255],class_name:"ansi-bright-white"}]],this.palette_256=[],this.ansi_colors.forEach((function(t){t.forEach((function(t){e.palette_256.push(t)}))}));for(var t=[0,95,135,175,215,255],n=0;n<6;++n)for(var r=0;r<6;++r)for(var a=0;a<6;++a){var o={rgb:[t[n],t[r],t[a]],class_name:"truecolor"};this.palette_256.push(o)}for(var i=8,s=0;s<24;++s,i+=10){var u={rgb:[i,i,i],class_name:"truecolor"};this.palette_256.push(u)}},e.prototype.escape_txt_for_html=function(e){return e.replace(/[&<>]/gm,(function(e){return"&"===e?"&amp;":"<"===e?"&lt;":">"===e?"&gt;":void 0}))},e.prototype.append_buffer=function(e){var t=this._buffer+e;this._buffer=t},e.prototype.get_next_packet=function(){var e={kind:t.EOS,text:"",url:""},r=this._buffer.length;if(0==r)return e;var o=this._buffer.indexOf("");if(-1==o)return e.kind=t.Text,e.text=this._buffer,this._buffer="",e;if(o>0)return e.kind=t.Text,e.text=this._buffer.slice(0,o),this._buffer=this._buffer.slice(o),e;if(0==o){if(1==r)return e.kind=t.Incomplete,e;var i=this._buffer.charAt(1);if("["!=i&&"]"!=i)return e.kind=t.ESC,e.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),e;if("["==i){if(this._csi_regex||(this._csi_regex=a(n(["\n ^ # beginning of line\n #\n # First attempt\n (?: # legal sequence\n [ # CSI\n ([<-?]?) # private-mode char\n ([d;]*) # any digits or semicolons\n ([ -/]? # an intermediate modifier\n [@-~]) # the command\n )\n | # alternate (second attempt)\n (?: # illegal sequence\n [ # CSI\n [ -~]* # anything legal\n ([\0-:]) # anything illegal\n )\n "],["\n ^ # beginning of line\n #\n # First attempt\n (?: # legal sequence\n \\x1b\\[ # CSI\n ([\\x3c-\\x3f]?) # private-mode char\n ([\\d;]*) # any digits or semicolons\n ([\\x20-\\x2f]? # an intermediate modifier\n [\\x40-\\x7e]) # the command\n )\n | # alternate (second attempt)\n (?: # illegal sequence\n \\x1b\\[ # CSI\n [\\x20-\\x7e]* # anything legal\n ([\\x00-\\x1f:]) # anything illegal\n )\n "]))),null===(l=this._buffer.match(this._csi_regex)))return e.kind=t.Incomplete,e;if(l[4])return e.kind=t.ESC,e.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),e;""!=l[1]||"m"!=l[3]?e.kind=t.Unknown:e.kind=t.SGR,e.text=l[2];var s=l[0].length;return this._buffer=this._buffer.slice(s),e}if("]"==i){if(r<4)return e.kind=t.Incomplete,e;if("8"!=this._buffer.charAt(2)||";"!=this._buffer.charAt(3))return e.kind=t.ESC,e.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),e;this._osc_st||(this._osc_st=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=e.raw[0],a=/^\s+|\s+\n|\s*#[\s\S]*?\n|\n/gm,o=r.replace(a,"");return new RegExp(o,"g")}(n(["\n (?: # legal sequence\n (\\) # ESC | # alternate\n () # BEL (what xterm did)\n )\n | # alternate (second attempt)\n ( # illegal sequence\n [\0-] # anything illegal\n | # alternate\n [\b-] # anything illegal\n | # alternate\n [-] # anything illegal\n )\n "],["\n (?: # legal sequence\n (\\x1b\\\\) # ESC \\\n | # alternate\n (\\x07) # BEL (what xterm did)\n )\n | # alternate (second attempt)\n ( # illegal sequence\n [\\x00-\\x06] # anything illegal\n | # alternate\n [\\x08-\\x1a] # anything illegal\n | # alternate\n [\\x1c-\\x1f] # anything illegal\n )\n "]))),this._osc_st.lastIndex=0;var u=this._osc_st.exec(this._buffer);if(null===u)return e.kind=t.Incomplete,e;if(u[3])return e.kind=t.ESC,e.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),e;var l,c=this._osc_st.exec(this._buffer);return null===c?(e.kind=t.Incomplete,e):c[3]?(e.kind=t.ESC,e.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),e):(this._osc_regex||(this._osc_regex=a(n(["\n ^ # beginning of line\n #\n ]8; # OSC Hyperlink\n [ -:<-~]* # params (excluding ;)\n ; # end of params\n ([!-~]{0,512}) # URL capture\n (?: # ST\n (?:\\) # ESC | # alternate\n (?:) # BEL (what xterm did)\n )\n ([!-~]+) # TEXT capture\n ]8;; # OSC Hyperlink End\n (?: # ST\n (?:\\) # ESC | # alternate\n (?:) # BEL (what xterm did)\n )\n "],["\n ^ # beginning of line\n #\n \\x1b\\]8; # OSC Hyperlink\n [\\x20-\\x3a\\x3c-\\x7e]* # params (excluding ;)\n ; # end of params\n ([\\x21-\\x7e]{0,512}) # URL capture\n (?: # ST\n (?:\\x1b\\\\) # ESC \\\n | # alternate\n (?:\\x07) # BEL (what xterm did)\n )\n ([\\x21-\\x7e]+) # TEXT capture\n \\x1b\\]8;; # OSC Hyperlink End\n (?: # ST\n (?:\\x1b\\\\) # ESC \\\n | # alternate\n (?:\\x07) # BEL (what xterm did)\n )\n "]))),null===(l=this._buffer.match(this._osc_regex))?(e.kind=t.ESC,e.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),e):(e.kind=t.OSCURL,e.url=l[1],e.text=l[2],s=l[0].length,this._buffer=this._buffer.slice(s),e))}}},e.prototype.ansi_to_html=function(e){this.append_buffer(e);for(var n=[];;){var r=this.get_next_packet();if(r.kind==t.EOS||r.kind==t.Incomplete)break;r.kind!=t.ESC&&r.kind!=t.Unknown&&(r.kind==t.Text?n.push(this.transform_to_html(this.with_state(r))):r.kind==t.SGR?this.process_ansi(r):r.kind==t.OSCURL&&n.push(this.process_hyperlink(r)))}return n.join("")},e.prototype.with_state=function(e){return{bold:this.bold,fg:this.fg,bg:this.bg,text:e.text}},e.prototype.process_ansi=function(e){for(var t=e.text.split(";");t.length>0;){var n=t.shift(),r=parseInt(n,10);if(isNaN(r)||0===r)this.fg=this.bg=null,this.bold=!1;else if(1===r)this.bold=!0;else if(22===r)this.bold=!1;else if(39===r)this.fg=null;else if(49===r)this.bg=null;else if(r>=30&&r<38)this.fg=this.ansi_colors[0][r-30];else if(r>=40&&r<48)this.bg=this.ansi_colors[0][r-40];else if(r>=90&&r<98)this.fg=this.ansi_colors[1][r-90];else if(r>=100&&r<108)this.bg=this.ansi_colors[1][r-100];else if((38===r||48===r)&&t.length>0){var a=38===r,o=t.shift();if("5"===o&&t.length>0){var i=parseInt(t.shift(),10);i>=0&&i<=255&&(a?this.fg=this.palette_256[i]:this.bg=this.palette_256[i])}if("2"===o&&t.length>2){var s=parseInt(t.shift(),10),u=parseInt(t.shift(),10),l=parseInt(t.shift(),10);if(s>=0&&s<=255&&u>=0&&u<=255&&l>=0&&l<=255){var c={rgb:[s,u,l],class_name:"truecolor"};a?this.fg=c:this.bg=c}}}}},e.prototype.transform_to_html=function(e){var t=e.text;if(0===t.length)return t;if(this._escape_for_html&&(t=this.escape_txt_for_html(t)),!e.bold&&null===e.fg&&null===e.bg)return t;var n=[],r=[],a=e.fg,o=e.bg;e.bold&&n.push("font-weight:bold"),this._use_classes?(a&&("truecolor"!==a.class_name?r.push(a.class_name+"-fg"):n.push("color:rgb("+a.rgb.join(",")+")")),o&&("truecolor"!==o.class_name?r.push(o.class_name+"-bg"):n.push("background-color:rgb("+o.rgb.join(",")+")"))):(a&&n.push("color:rgb("+a.rgb.join(",")+")"),o&&n.push("background-color:rgb("+o.rgb+")"));var i="",s="";return r.length&&(i=' class="'+r.join(" ")+'"'),n.length&&(s=' style="'+n.join(";")+'"'),"<span"+s+i+">"+t+"</span>"},e.prototype.process_hyperlink=function(e){var t=e.url.split(":");return t.length<1?"":this._url_whitelist[t[0]]?'<a href="'+this.escape_txt_for_html(e.url)+'">'+this.escape_txt_for_html(e.text)+"</a>":""},e}();function a(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=e.raw[0],a=/^\s+|\s+\n|\s*#[\s\S]*?\n|\n/gm,o=r.replace(a,"");return new RegExp(o)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=r})?r.apply(t,a):r)||(e.exports=o)},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),s=n(133),u=n(500),l=n(13),c=n(5),d=n(21),p=n(41),f=n(22),h=n(63),m=n(11),_=n(16),y=n(26),g=n(131),v=n(501),b=n(101),w=n(7),M=n(9),L=n(134),T=n(132),k=function(e){function t(t){var n=e.call(this,t)||this;n.TIMEOUT="02:00";var r=n.getInventoryDefaults(),a=n.getInventoryOptions();return n.state={inventory:r,inventoryOptions:a,experienceId:null,jobId:null,experience:null,timeElapsed:0,activeOutput:"",rendering:!1,isTimeOut:!1},n.timer=new L.default({interval:1e3,onUpdate:function(e){n.setState({timeElapsed:e})}}),n.evtHandlers={toggleOutput:function(e){return n.toggleActiveOutput(e)},createExp:function(){return n.createExperience()},gotExperience:null},n}return a(t,e),t.prototype.componentWillUnmount=function(){var e=this.props,t=e.api;e.onError,this.state.experienceId;this.timer.stop(),this.evtHandlers.gotExperience=null,t.cancelExperiencePolling()},t.prototype.getInventoryOptions=function(){var e=this.props.variables,t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];r.defaultItem&&r.defaultItem.type&&r.defaultItem.type.toLowerCase()===s.VARIABLE_TYPES.ENUM&&(t[r.id]=r.defaultItem.options)}return t},t.prototype.getInventoryDefaults=function(){var e=this.props.variables,t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];t[r.id]=this.getVariableValue(r.previewItem)}return t},t.prototype.checkInventoryDefaults=function(e){var t=this.props.variables,n=o({},this.state.inventory);for(var r in t)if(t.hasOwnProperty(r)){var a=t[r],i=e[r];if(i){var s=this.getVariableValue(i.previewItem),u=this.getVariableValue(a.previewItem);a.type===i.type&&s===u||(n[r]=u)}}return n},t.prototype.getVariableValue=function(e){if(e&&e.type){var t=e.type.toLowerCase();return t===s.VARIABLE_TYPES.IMAGE||t===s.VARIABLE_TYPES.VIDEO||t===s.VARIABLE_TYPES.AUDIO?e.url:e.src}},t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.experienceId,r=t.jobId;n&&r&&this.setState({jobId:r},(function(){e.getExperience(n)}))},t.prototype.componentDidUpdate=function(e,t){var n=this;if(e.storyId!==this.props.storyId&&(this.evtHandlers.gotExperience=null),e.variables!==this.props.variables){var r=void 0,a=this.getInventoryOptions();r=e.storyId===this.props.storyId?this.checkInventoryDefaults(e.variables):this.getInventoryDefaults(),this.setState({inventoryOptions:a,inventory:r})}if(t.timeElapsed!==this.state.timeElapsed&&M.formattedTime(this.state.timeElapsed)===this.TIMEOUT&&!this.state.experience){var o=this.props,i=o.onError,s=o.api,u=this.state.experienceId;s.cancelExperiencePolling().then((function(){i(w.previewer.runExpError.replace("[expId]",u)),n.resetState(!0,(function(){n.setState({isTimeOut:!0})}))}))}},t.prototype.variableInputChanged=function(e,t){var n=o({},this.state.inventory);n[e]=t,this.setState({inventory:n})},t.prototype.getViewerOptions=function(){var e=[],t=this.state,n=t.experience.output,r=t.jobId,a=n.videos,o=n.images;if(a)for(var i in a)if(a.hasOwnProperty(i)){var s={label:"Video: "+i,value:u.OUTPUT_TYPES.VIDEO+"."+i};e.push(s)}if(o)for(var i in o)if(o.hasOwnProperty(i)){var l={label:"Image: "+i,value:u.OUTPUT_TYPES.IMAGE+"."+i};e.push(l)}return r&&e.push({label:w.previewer.btnLog,value:u.OUTPUT_TYPES.LOG+"."+r}),e},t.prototype.renderVariableFields=function(){var e=this,t=this.state,n=t.inventory,r=t.inventoryOptions,a=this.props.variables,o=[],u=function(t){if(a.hasOwnProperty(t)){var u=a[t];switch(u.type.toLowerCase()){case s.VARIABLE_TYPES.TEXT:o.push(i.createElement(l.default,{label:u.name,key:u.id,value:n[u.id],onChange:function(t){return e.variableInputChanged(u.id,t)}}));break;case s.VARIABLE_TYPES.NUMBER:o.push(i.createElement(p.default,{label:u.name,key:u.id,value:n[u.id],onChange:function(t){return e.variableInputChanged(u.id,t)}}));break;case s.VARIABLE_TYPES.ENUM:o.push(i.createElement(f.default,{label:u.name,key:u.id,value:n[u.id],options:r[u.id],onChange:function(t){return e.variableInputChanged(u.id,t)}}));break;case s.VARIABLE_TYPES.BOOLEAN:o.push(i.createElement(h.default,{label:u.name,key:u.id,value:n[u.id],options:s.BOOLEAN_DEFAULT_OPTIONS,onChange:function(t){return e.variableInputChanged(u.id,t)}}));break;case s.VARIABLE_TYPES.IMAGE:o.push(i.createElement(m.default,{label:u.name,key:u.id},i.createElement(v.default,{value:n[u.id],type:u.type,onChange:function(t){return e.variableInputChanged(u.id,t)}})));break;case s.VARIABLE_TYPES.VIDEO:case s.VARIABLE_TYPES.AUDIO:o.push(i.createElement(m.default,{label:u.name,key:u.id},i.createElement(v.default,{type:u.type,value:n[u.id],onChange:function(t){return e.variableInputChanged(u.id,t)}})))}}};for(var c in a)u(c);return o},t.prototype.getFirstOutput=function(e){var t=e.output.videos,n=e.output.images;if(t){for(var r in t)if(t.hasOwnProperty(r))return u.OUTPUT_TYPES.VIDEO+"."+r}else{if(!n)return null;for(var r in n)if(n.hasOwnProperty(r))return u.OUTPUT_TYPES.IMAGE+"."+r}},t.prototype.getExperience=function(e,t,n,r){var a=this;void 0===t&&(t=!1),this.timer.running||this.timer.start();var o=this.props,i=o.api,s=o.onError,u=o.onExperenceLoaded,l=o.onJobCreated;this.setState({rendering:!0},(function(){a.setState({experienceId:e},(function(){t?i.triggerEvent(e,n,r).then((function(t){a.setState({jobId:t.job_id},(function(){l&&l(e,t.job_id),a.evtHandlers.gotExperience=function(e){a.timer.stop(),u&&u(e),a.setState({rendering:!1,activeOutput:a.getFirstOutput(e),experience:e})};i.getExperience(e,!0).then((function(e){a.evtHandlers.gotExperience&&a.evtHandlers.gotExperience(e)})).catch((function(t){a.resetState(),s&&(t.error?s(t.error):s(w.previewer.runExpError.replace("[expId]",e)))}))}))})).catch((function(t){a.resetState(),s&&s(w.previewer.triggerExpError.replace("[expId]",e))})):(a.evtHandlers.gotExperience=function(e){a.timer.stop(),u&&u(e),a.setState({rendering:!1,activeOutput:a.getFirstOutput(e),experience:e})},i.getExperience(e,!0).then((function(e){a.evtHandlers.gotExperience&&a.evtHandlers.gotExperience(e)})).catch((function(t){a.resetState(),s&&(t.error?s(t.error):s(w.previewer.runExpError.replace("[expId]",e)))})))}))}))},t.prototype.createExperience=function(){var e=this,t=this.props,n=t.storyId,r=t.onNotification,a=t.onError,o=t.api,i=t.onExperienceCreated,s=t.compositionId,u=t.useWorkingCopy;this.resetState(!1,(function(){e.setState({rendering:!0,isTimeOut:!1},(function(){e.timer.start(),r&&r(w.previewer.runExpStart),o.createExperience(n,e.state.inventory,s,u).then((function(t){r&&r(w.previewer.expId.replace("[expId]",t.id)),i&&i(t),e.getExperience(t.id,!0,s,u)})).catch((function(t){e.resetState();var n=t.response,r=n.data;n.status;a&&(r&&r.error?a(w.previewer.createExpError+": "+r.error):a(w.previewer.createExpError+": "+t))}))}))}))},t.prototype.resetState=function(e,t){this.timer.stop(),this.setState({rendering:!1,experienceId:null,experience:null,jobId:null,timeElapsed:e?this.state.timeElapsed:0,activeOutput:null,isTimeOut:e},(function(){t&&t()}))},t.prototype.renderViewerContent=function(){var e=this.state,t=e.rendering,n=e.experience,r=e.timeElapsed,a=e.activeOutput,o=e.isTimeOut,s=this.props,l=s.api,c=s.onError;if(t)return i.createElement("div",{className:"running-prompt"},i.createElement(d.default,null),i.createElement("br",null),i.createElement("h1",null,"  ",w.previewer.expRunning),i.createElement("p",null,w.previewer.time," ",M.formattedTime(r)));if(o||void 0===o)return i.createElement("div",{className:"running-prompt error-wrapper"},i.createElement("h1",null,"  ",w.previewer.runExpErrorDes),i.createElement("p",null,w.previewer.time," ",M.formattedTime(r)));if(n&&a){var p=void 0,f=void 0,h=a.split("."),m=h[0],_=h[1];if(m===u.OUTPUT_TYPES.IMAGE)f=n.output.images[_],p=i.createElement(g.default,{url:f,active:!0});else if(m===u.OUTPUT_TYPES.VIDEO){var v=n.output.videos[_],L=void 0!==v.width?parseInt(v.width,10):null,k=void 0!==v.height?parseInt(v.height,10):null;f=v.url,p=i.createElement(y.default,{url:f,active:!0,maxWidth:L,allowManualScale:!0,maxHeight:k})}else m===u.OUTPUT_TYPES.LOG&&(p=i.createElement("div",{className:"log"},i.createElement(T.default,{api:l,onError:c,jobId:_})));return i.createElement(b.default,{handleWidth:!0,handleHeight:!0},p)}return null},t.prototype.toggleActiveOutput=function(e){this.setState({activeOutput:e})},t.prototype.render=function(){var e,t,n=this.state,r=n.rendering,a=n.experience,o=n.activeOutput,s=a?w.previewer.btnReRender:w.previewer.btnRender,u=r?null:i.createElement(c.default,{size:"large",onClick:this.evtHandlers.createExp,color:"primary",style:"bold"},s);if(a){var d=this.getViewerOptions();e=i.createElement(f.default,{width:"130px",options:d,value:o,onChange:this.evtHandlers.toggleOutput}),t=i.createElement(l.default,{readOnly:!0,width:"360px",label:w.previewer.expIdField,showCopy:!0,value:a.id})}return i.createElement("div",{className:"story-viewer viewer"},i.createElement("div",{className:"variables"},i.createElement("h2",null,w.previewer.previewVars),i.createElement(_.default,null),this.renderVariableFields()),i.createElement("div",{className:"viewer-content"},i.createElement("div",{className:"content-header"},u,i.createElement("div",{className:"output"},e),i.createElement("div",{className:"right-interface"},t)),i.createElement("div",{className:"content-wrapper"},this.renderViewerContent())))},t}(i.PureComponent);t.default=k},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OUTPUT_TYPES=void 0,t.OUTPUT_TYPES={LOG:"log",IMAGE:"image",VIDEO:"video"}},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(21),s=n(133),u=n(84),l=n(5),c=n(4),d=function(e){function t(t){var n=e.call(this,t)||this;return n.input=o.createRef(),n.state={processing:!1,processedFile:null},n.evtHandlers={fileUpload:function(e){return n.fileUploaded(e)},fileDrop:function(e,t){return n.onFileDrop(e,t)},clearSelection:function(e){return n.clearSelection(e)},click:function(){return n.onClick()}},n}return a(t,e),t.prototype.clearSelection=function(e){e.preventDefault(),e.stopPropagation(),this.props.onChange(null)},t.prototype.fileUploaded=function(e){var t=e.target.files[0];t&&this.props.onChange(t)},t.prototype.componentDidUpdate=function(e){e.value!==this.props.value&&this.checkFile()},t.prototype.componentDidMount=function(){this.checkFile()},t.prototype.checkFile=function(){var e=this,t=this.props.value;t instanceof File&&this.setState({processing:!0,processedFile:null},(function(){var n=new FileReader;n.onload=function(){e.setState({processing:!1,processedFile:n.result})},n.readAsDataURL(t)}))},t.prototype.renderFields=function(){var e,t=this.state,n=t.processing,r=t.processedFile,a=this.props,u=a.type,l=a.value,c=l instanceof File;if(!l)return null;if(c){if(n)return o.createElement(i.default,null);e=r}else e=l;switch(u.toLowerCase()){case s.VARIABLE_TYPES.IMAGE:return o.createElement("img",{className:"default-preview",src:e});case s.VARIABLE_TYPES.VIDEO:return o.createElement("video",{className:"default-preview",src:e,controls:!0});case s.VARIABLE_TYPES.AUDIO:return o.createElement("audio",{className:"default-preview",src:e,controls:!0})}},t.prototype.getInputFilter=function(){var e=this.props,t=e.type;e.value;switch(t){case s.VARIABLE_TYPES.IMAGE:return"image/*";case s.VARIABLE_TYPES.VIDEO:return"video/*";case s.VARIABLE_TYPES.AUDIO:return"audio/*"}},t.prototype.onClick=function(){var e=this.input.current,t=this.state.processing;e&&!t&&e.click()},t.prototype.renderClearButton=function(){if(this.props.value)return o.createElement(l.default,{onClick:this.evtHandlers.clearSelection},c.ICON_TIMES)},t.prototype.onFileDrop=function(e,t){var n=t.getItem().files[0];n&&this.props.onChange(n)},t.prototype.render=function(){var e=this.state.processing,t=this.getInputFilter();return o.createElement(o.Fragment,null,o.createElement("input",{type:"file",accept:t,style:{display:"none"},ref:this.input,onChange:this.evtHandlers.fileUpload}),o.createElement(u.default,{onDrop:this.evtHandlers.fileDrop,disable:e},o.createElement("div",{className:"variable-default-upload",onClick:this.evtHandlers.click},this.renderFields(),o.createElement("div",{className:"btn-wrapper"},this.renderClearButton()))))},t}(o.PureComponent);t.default=d},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(503),s=n(135),u=n(53),l=function(e){function t(t){var n=e.call(this,t)||this;return n.state={selectedLayer:null},n.eventHandlers={updateSelectedLayer:function(e){return n.updateSelectedLayer(e)}},n}return a(t,e),t.prototype.updateSelectedLayer=function(e){this.setState({selectedLayer:e})},t.prototype.variablesToInventory=function(){var e=this.props.variables,t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n],a=r.type,o=r.previewItem;o&&(a===u.VARIABLE_TYPES.IMAGE||a===u.VARIABLE_TYPES.VIDEO||a===u.VARIABLE_TYPES.AUDIO?t[n]=o.url:t[n]=o.src)}return t},t.prototype.render=function(){var e=this.state.selectedLayer,t=this.props,n=t.storyId,r=t.api,a=t.composition;return a?o.createElement("div",{className:"static-composition-editor"},o.createElement("div",{className:"composition-config"},o.createElement(i.default,{storyId:n,api:r,composition:a,onSelectLayer:this.eventHandlers.updateSelectedLayer,selectedLayer:e,onUpdate:this.props.onUpdate})),o.createElement("div",{className:"composition-preview"},o.createElement(s.default,{inventory:this.variablesToInventory(),composition:a,onSelectLayer:this.eventHandlers.updateSelectedLayer,selectedLayer:e,onUpdate:this.props.onUpdate}))):null},t}(o.PureComponent);t.default=l},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},i=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},s=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,a=e.length;n<r;n++,a++)e[a]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0});var u=n(0),l=n(7),c=n(41),d=n(65),p=n(11),f=n(5),h=n(53),m=n(4),_=n(504),y=function(e){function t(t){var n=e.call(this,t)||this;return n.eventHandlers={inputs:{width:function(e){return n.compValueChanged("width",e)},height:function(e){return n.compValueChanged("height",e)},name:function(e){return n.compValueChanged("name",e)},backgroundColor:function(e){return n.bgChanged(e)}},selectLayer:function(e){return n.props.onSelectLayer(e)}},n.addLayerMenu=u.createElement(f.default,{onClick:function(){return n.addLayer()},style:"subtle",size:"small",color:"primary"},m.ICON_PLUS),n}return a(t,e),t.prototype.addLayer=function(){var e=h.getNewCompositionLayer(),t=o({},this.props.composition),n=s([],i(t.layers));n.push(e),t.layers=n,this.props.onUpdate(t),this.props.onSelectLayer(e.id)},t.prototype.updateLayer=function(e,t){var n=o({},this.props.composition),r=s([],i(n.layers));r[e]=t,n.layers=r,this.props.onUpdate(n)},t.prototype.compValueChanged=function(e,t){var n=o({},this.props.composition);n[e]=t,this.props.onUpdate(n)},t.prototype.bgChanged=function(e){if("transparent"===e.hex)this.compValueChanged("background_color",null);else{var t=e.rgb;this.compValueChanged("background_color","rgba("+t.r+","+t.g+","+t.b+","+t.a+")")}},t.prototype.render=function(){var e=this,t=this.props,n=t.composition,r=t.selectedLayer,a=t.storyId,o=t.api,i=(n.background_color&&n.background_color,u.createElement("span",null,l.compositions.layers," ",this.addLayerMenu));return u.createElement(u.Fragment,null,u.createElement(c.default,{label:l.compositions.width,tooltip:l.compositions.tooltipWidth,value:n.width,width:"30%",labelPosition:"top",onChange:this.eventHandlers.inputs.width}),u.createElement(c.default,{label:l.compositions.height,tooltip:l.compositions.tooltipHeight,value:n.height,width:"30%",labelPosition:"top",onChange:this.eventHandlers.inputs.height}),u.createElement(d.default,{label:l.compositions.backgroundColor,tooltip:l.compositions.tooltipBackgroundColor,enableAlpha:!0,value:n.background_color,width:"40%",labelPosition:"top",pickerPosition:"right",onChange:this.eventHandlers.inputs.backgroundColor}),u.createElement(p.default,{label:i,width:"100%",labelPosition:"top"},n.layers.map((function(t,n){var i=t.id===r;return u.createElement(_.default,{storyId:a,api:o,key:t.id,selected:i,onSelectLayer:e.eventHandlers.selectLayer,onUpdate:function(t){return e.updateLayer(n,t)},options:t})}))))},t}(u.PureComponent);t.default=y},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.V_ALIGN_OPTIONS=t.H_ALIGN_OPTIONS=void 0;var i=n(0),s=n(53),u=n(25),l=n(64),c=n(63),d=n(13),p=n(22),f=n(99),h=n(129),m=n(7),_=n(65),y=n(30),g=n(41),v=n(4);t.H_ALIGN_OPTIONS=[{icon:v.ICON_ALIGN_LEFT,value:"left"},{icon:v.ICON_ALIGN_CENTER,value:"center"},{icon:v.ICON_ALIGN_RIGHT,value:"right"}],t.V_ALIGN_OPTIONS=[{icon:v.ICON_ARROW_UP,value:"flex-start"},{icon:v.ICON_ARROW_CENTER_V,value:"center"},{icon:v.ICON_ARROW_DOWN,value:"flex-end"}];var b=function(e){function n(t){var n=e.call(this,t)||this;return n.eventHandlers={inputs:{name:function(e){return n.optionValueChanged("name",e)},width:function(e){return n.optionValueChanged("width",e)},height:function(e){return n.optionValueChanged("height",e)},x:function(e){return n.optionValueChanged("x",e)},y:function(e){return n.optionValueChanged("y",e)},rotation:function(e){return n.optionValueChanged("rotation",e)},content:function(e){return n.optionValueChanged("content",e)},hAlign:function(e){return n.optionValueChanged("horizontal_alignment",e)},vAlign:function(e){return n.optionValueChanged("vertical_alignment",e)},textWrap:function(e){return n.optionValueChanged("text_wrap",e)},textFit:function(e){return n.optionValueChanged("text_fit",e)},fontSize:function(e){return n.optionValueChanged("font_size",e)},lineHeight:function(e){return n.optionValueChanged("line_height",e)},letterSpacing:function(e){return n.optionValueChanged("letter_spacing",e)},font:function(e){return n.optionValueChanged("font",e)},customFont:function(e){return n.customFontUpdated(e)},fontType:function(e){return n.fontTypeChanged(e)},wordSpacing:function(e){return n.optionValueChanged("word_spacing",e)},color:function(e){return n.optionValueChanged("color",n.formatColor(e))},backgroundColor:function(e){return n.optionValueChanged("background_color",n.formatColor(e))}},onCardOpen:function(e){return n.onCardOpen()},onCardClose:function(e){return n.onCardClose()}},n}return a(n,e),n.prototype.customFontUpdated=function(e){var t=o({},this.props.options);if(e){var n=e.name,r=e.url,a=e.id;t.font=n,t.custom_font_url=r,t.custom_font_id=a}else t.font=s.DEFAULT_FONT,t.custom_font_url=null,t.custom_font_id=null;this.props.onUpdate(t)},n.prototype.onCardOpen=function(){var e=this.props.options.id;this.props.onSelectLayer(e)},n.prototype.onCardClose=function(){this.props.onSelectLayer(null)},n.prototype.fontTypeChanged=function(e){var t=o({},this.props.options);e===s.FONT_TYPES.STANDARD?(t.font_type=s.FONT_TYPES.STANDARD,t.font=s.DEFAULT_FONT):e===s.FONT_TYPES.CUSTOM&&(t.fontType=s.FONT_TYPES.CUSTOM,t.font=s.DEFAULT_FONT,t.custom_font_id=null,t.custom_font_url=null),this.props.onUpdate(t)},n.prototype.formatColor=function(e){var t=e.rgb;return"rgba("+t.r+","+t.g+","+t.b+","+t.a+")"},n.prototype.optionValueChanged=function(e,t){var n=o({},this.props.options);n[e]=t,this.props.onUpdate(n)},n.prototype.renderFontField=function(){var e=this.props,t=e.options,n=t.font_type,r=t.custom_font_id,a=t.font,o=e.storyId,l=e.api;return n===s.FONT_TYPES.STANDARD?i.createElement(p.default,{label:m.compositions.font,labelPosition:"top",width:"50%",options:s.STADARD_FONTS,onChange:this.eventHandlers.inputs.font,value:a}):n===s.FONT_TYPES.CUSTOM?i.createElement(h.default,{api:l,storyId:o,label:m.compositions.font,width:"50%",labelPosition:"top",onChange:this.eventHandlers.inputs.customFont,accepts:u.ASSET_TYPES.FONT,assetId:r}):null},n.prototype.render=function(){var e=this.props,n=e.options,r=e.selected;return i.createElement(f.default,{open:r,onOpen:this.eventHandlers.onCardOpen,onClose:this.eventHandlers.onCardClose,collapsable:!0,title:n.name},i.createElement(d.default,{label:m.compositions.name,tooltip:m.compositions.tooltipName,value:n.name,width:"100%",labelPosition:"top",onChange:this.eventHandlers.inputs.name}),i.createElement(g.default,{label:m.compositions.x,tooltip:m.compositions.tooltipLayerX,value:n.x,width:"20%",labelPosition:"top",onChange:this.eventHandlers.inputs.x}),i.createElement(g.default,{label:m.compositions.y,tooltip:m.compositions.tooltipLayerY,value:n.y,width:"20%",labelPosition:"top",onChange:this.eventHandlers.inputs.y}),i.createElement(g.default,{label:m.compositions.width,tooltip:m.compositions.tooltipLayerWidth,value:n.width,width:"20%",labelPosition:"top",onChange:this.eventHandlers.inputs.width}),i.createElement(g.default,{label:m.compositions.height,tooltip:m.compositions.tooltipLayerHeight,value:n.height,width:"20%",labelPosition:"top",onChange:this.eventHandlers.inputs.height}),i.createElement(g.default,{value:n.rotation,label:m.compositions.rotation,tooltip:m.compositions.tooltipLayerRotation,width:"20%",labelPosition:"top",onChange:this.eventHandlers.inputs.rotation}),i.createElement(l.default,{label:m.compositions.textLayerContent,tooltip:m.compositions.tooltipTextLayerContent,value:n.content,width:"100%",labelPosition:"top",onChange:this.eventHandlers.inputs.content}),i.createElement(c.default,{options:t.H_ALIGN_OPTIONS,value:n.horizontal_alignment,width:"50%",onChange:this.eventHandlers.inputs.hAlign}),i.createElement(c.default,{options:t.V_ALIGN_OPTIONS,value:n.vertical_alignment,width:"50%",onChange:this.eventHandlers.inputs.vAlign}),i.createElement(p.default,{label:m.compositions.fontType,options:s.FONT_TYPE_OPTIONS,value:n.font_type,width:"50%",labelPosition:"top",onChange:this.eventHandlers.inputs.fontType}),this.renderFontField(),i.createElement(g.default,{label:m.compositions.fontSize,value:n.font_size,width:"50%",labelPosition:"top",onChange:this.eventHandlers.inputs.fontSize}),i.createElement(g.default,{label:m.compositions.lineHeight,value:n.line_height,width:"50%",labelPosition:"top",onChange:this.eventHandlers.inputs.lineHeight}),i.createElement(g.default,{label:m.compositions.letterSpacing,value:n.letter_spacing,width:"50%",labelPosition:"top",onChange:this.eventHandlers.inputs.letterSpacing}),i.createElement(g.default,{label:m.compositions.wordSpacing,value:n.word_spacing,width:"50%",labelPosition:"top",onChange:this.eventHandlers.inputs.wordSpacing}),i.createElement(_.default,{label:m.compositions.color,value:n.color,enableAlpha:!0,width:"50%",labelPosition:"top",pickerPosition:"left",onChange:this.eventHandlers.inputs.color}),i.createElement(_.default,{label:m.compositions.backgroundColor,value:n.background_color,enableAlpha:!0,width:"50%",labelPosition:"top",pickerPosition:"right",onChange:this.eventHandlers.inputs.backgroundColor}),i.createElement(y.default,{label:m.compositions.wrap,value:n.text_wrap,width:"25%",labelPosition:"top",onChange:this.eventHandlers.inputs.textWrap}),i.createElement(y.default,{label:m.compositions.fit,value:n.text_fit,width:"25%",labelPosition:"top",onChange:this.eventHandlers.inputs.textFit}))},n}(i.PureComponent);t.default=b},function(e,t){e.exports=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),a=n(16);t.default=function(e){var t=e.shortcutCopyMap,n=e.heading,o=n?r.createElement(r.Fragment,null,r.createElement("h3",null,n),r.createElement(a.default,null)):null;return r.createElement("div",{className:"shortcuts-menu"},o,r.createElement("table",null,r.createElement("tbody",null,Object.keys(t).map((function(e){return r.createElement("tr",{className:"shortcut",key:e},r.createElement("td",{className:"hotkey-cell"},e),r.createElement("td",{className:"shortcut-desc"},t[e]))})))))}},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(13),s=n(11),u=n(51),l=n(16),c=n(9),d=n(8),p=n(7),f=function(e){function t(t){var n=e.call(this,t)||this;return n.render=function(){var e=n.props,t=e.asset,r=e.columns,a=e.newAsset,u=e.assetTags;if(!t)return null;var d=a?p.assets.newDetails:p.assets.details,f=c.formatDateDefault(t.date_created),h=2===r,m=a?void 0:function(e){return n.props.onNameChange(e)},_=a?function(e){return n.props.onNameChange(e)}:void 0,y=o.createElement(i.default,{label:p.assets.name,controlled:!a,width:h?"50%":"100%",onSubmit:m,onChange:_,value:t.name}),g=o.createElement(i.default,{readOnly:!0,label:p.assets.date,width:h?"50%":"100%",value:f}),v=o.createElement(i.default,{submittable:!0,submittableType:"add",label:p.assets.addTag,suggestions:u,doSubmit:function(e){return n.props.onAddTag(e)},width:h?"50%":"100%",buttons:[],value:n.state.newTag}),b=o.createElement(s.default,{label:p.assets.assetTag,width:h?"50%":"100%"},n.renderTags());return o.createElement("div",{className:"asset-details"},o.createElement("h2",null,d),o.createElement("div",{className:"header-buttons"},n.props.headerButtons),o.createElement(l.default,null),y,g,v,b)},n.state={newTag:""},n}return a(t,e),t.prototype.renderTags=function(){var e=this;return this.props.asset.tags.map((function(t){return o.createElement(u.default,{key:t,copy:t,removeHandler:function(){return e.props.onRemoveTag(t)},colorize:!0})}))},t}(o.Component);t.default=d.connect((function(e){return{assetTags:e.assetTags}}),null)(f)},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(5),s=n(64),u=n(16),l=n(7),c=n(4),d=function(e){function t(t){var n=e.call(this,t)||this;return n.getFirstAct=function(e){for(var t in e.acts)if(e.acts.hasOwnProperty(t))return e.acts[t]},n}return a(t,e),t.prototype.createUrl=function(){var e=this.props,t=e.story,n=e.compositionId,r=e.accessKey,a=t.id,o=this.getFirstAct(t).inventory,i="";for(var s in o){if(o.hasOwnProperty(s))i+=""+(i?"&":"?")+s+"={{"+s.toUpperCase()+"}}"}var u=window.location.href,l=-1!==u.indexOf("staging")||-1!==u.indexOf("localhost")?"staging.imposium.com":"imposium.com";return'<a href="'+("https://player."+l+"/new/"+r+"/"+a+"/"+n+i)+'" target="_blank"><img width="400" alt="Play Video" src="'+("https://api."+l+"/story/"+a+"/"+n+"/poster"+i)+'"></a>'},t.prototype.render=function(){var e=this.props,t=e.status,n=e.handleError,r=e.handleNotification;return o.createElement("div",null,o.createElement("h2",null,l.publish.hubspotTitle),o.createElement(u.default,null),o.createElement("p",null,l.publish.hubspotDesc),o.createElement(u.default,null),o.createElement(s.default,{label:l.publish.embeddedCode,value:this.createUrl(),showCopy:t!==l.header.publishing,onNotification:function(e){return r(e)},onError:function(e){return n(e)},readOnly:!0}),t===l.header.publishing&&o.createElement(i.default,{size:"small",customStyles:{margin:0,height:"20px",border:"none"},color:"primary",onClick:function(){return n(l.publish.embeddedCodeCopyError)}},c.ICON_CLIPBOARD))},t}(o.PureComponent);t.default=d},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(16),s=n(54),u=n(137),l=n(7),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){return o.createElement("div",null,o.createElement("h2",null,l.integration.documentation),o.createElement(i.default,null),o.createElement("p",null,l.integration.docParagraph),o.createElement("div",{className:"link-wrapper"},null===u.documentationLinks||void 0===u.documentationLinks?void 0:u.documentationLinks.map((function(e){return o.createElement(s.BigLink,{key:e.key,label:e.label,link:e.link})}))))},t}(o.PureComponent);t.default=c},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.downloadSDKArchive=void 0;var a=n(28),o=n(511),i={method:"POST",responseType:"blob",headers:{"Content-Type":"application/json"}};t.downloadSDKArchive=function(e,t){var n=r(r({},i),{url:"https://template-generator.imposium.com/sdk-archive",data:JSON.stringify(t)});a.default(n).then((function(t){o.saveAs(t.data,e)})).catch((function(e){console.error("Failed to download sdk archive:",e)}))}},function(e,t,n){(function(n){var r,a,o;a=[],void 0===(o="function"==typeof(r=function(){"use strict";function t(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){s(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function r(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function a(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var o="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n&&n.global===n?n:void 0,i=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),s=o.saveAs||("object"!=typeof window||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!i?function(e,n,i){var s=o.URL||o.webkitURL,u=document.createElement("a");n=n||e.name||"download",u.download=n,u.rel="noopener","string"==typeof e?(u.href=e,u.origin===location.origin?a(u):r(u.href)?t(e,n,i):a(u,u.target="_blank")):(u.href=s.createObjectURL(e),setTimeout((function(){s.revokeObjectURL(u.href)}),4e4),setTimeout((function(){a(u)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,n,o){if(n=n||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}(e,o),n);else if(r(e))t(e,n,o);else{var i=document.createElement("a");i.href=e,i.target="_blank",setTimeout((function(){a(i)}))}}:function(e,n,r,a){if((a=a||open("","_blank"))&&(a.document.title=a.document.body.innerText="downloading..."),"string"==typeof e)return t(e,n,r);var s="application/octet-stream"===e.type,u=/constructor/i.test(o.HTMLElement)||o.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||s&&u||i)&&"undefined"!=typeof FileReader){var c=new FileReader;c.onloadend=function(){var e=c.result;e=l?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),a?a.location.href=e:location=e,a=null},c.readAsDataURL(e)}else{var d=o.URL||o.webkitURL,p=d.createObjectURL(e);a?a.location=p:location.href=p,a=null,setTimeout((function(){d.revokeObjectURL(p)}),4e4)}});o.saveAs=s.saveAs=s,e.exports=s})?r.apply(t,a):r)||(e.exports=o)}).call(this,n(38))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDemoURL=void 0;t.getDemoURL=function(){var e=window.location.href;return-1!==e.indexOf("localhost")?"http://localhost:3044":-1!==e.indexOf("staging")?"https://demo.staging.imposium.com":"https://demo.imposium.com"}},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},i=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),u=n(16),l=n(21),c=n(7),d=n(54),p=n(514),f=n(4),h=n(1),m=n(10),_=n(8),y=n(22),g=n(88),v=function(e){function t(t){var n=e.call(this,t)||this;return n.selectCsv=function(){n.hiddenFileInputRef.current&&n.hiddenFileInputRef.current.click()},n.doUploadCsv=function(e){e.persist();var t=n.props.handleError;n.setState({uploading:!0,renderedBatch:!1}),n.props.createFreshBatch(n.getBatchName()).then((function(t){var r=t.id,a=t.name,o=t.story_id;n.setState({selectedBatchId:r}),n.importBatch({story_id:o,id:r,name:a,uploadEvt:e})})).catch((function(e){throw t(e),n.setState({uploadComplete:!1,uploading:!1}),e}))},n.getBatch=function(){var e=n.props.api;n.props.setPage(1),n.props.getBatch(e)},n.state={uploadComplete:!1,uploading:!1,downloading:!1,selectedBatchId:"",renderedBatch:!1,inventory:[],inventoryKeys:[],missingColumns:"",isMissing:!1},n.hiddenFileInputRef=s.createRef(),n}return a(t,e),t.prototype.componentDidMount=function(){this.getInventory()},t.prototype.getInventory=function(){var e=this.props.story.acts,t=Object.keys(e),n={};t.forEach((function(t){n=o(o({},n),e[t].inventory)}));var r=Object.keys(n).sort();this.setState({inventory:n}),this.setState({inventoryKeys:r})},t.prototype.downloadSampleCsv=function(){var e=this.props.story.name,n=this.state,r=n.inventory,a=n.inventoryKeys.map((function(e){return{id:e,name:r[e].name,show:!0}})).map((function(e){return e.id})).reduce((function(e,t){var n;return o(o({},e),((n={})[t]="",n))}),{}),i=b(e)+"-batch-template";new p.ExportToCsv(o(o({},t.CSV_EXPORT_CONFIG),{filename:i})).generateCsv([a])},t.prototype.getBatchName=function(){var e=this.props,t=e.story.name,n=e.compositionName,r=Date.now(),a=h(r).format("MMDDYY-HHmm");return b(t)+"-"+b(n)+"-"+a},t.prototype.proceedWithExport=function(){var e=this,t=this.props,n=t.renderBatch,r=t.activeBatch.data;n(r.id,r.name).then((function(){e.setState({renderedBatch:!0})})).catch((function(t){throw e.props.handleError(c.publish.renderBatchFailed),e.setState({renderedBatch:!1}),t}))},t.prototype.importBatch=function(e){var t=this,n=e.story_id,r=e.id,a=e.name,o=e.uploadEvt,i=this.props,s=i.accessKey,u=i.compositionId,l=i.isExport,c=i.onError;this.props.importBatchFromCsv(n,r,a,o.target.files[0],s,u,!l,l).then((function(){t.props.batchJobs.missing.length>0&&c(),t.setState({uploadComplete:!0,uploading:!1}),t.getBatch(),l&&0===Object.keys(t.props.batchJobs.missing).length&&t.renderBatch({id:r,name:a})})).catch((function(e){throw t.setState({uploadComplete:!1,uploading:!1}),e}))},t.prototype.renderBatch=function(e){var t=this,n=e.id,r=e.name;this.props.renderBatch(n,r).then((function(){t.setState({renderedBatch:!0})})).catch((function(e){throw t.props.handleError(c.publish.renderBatchFailed),t.setState({renderedBatch:!1}),e}))},t.prototype.downloadCsv=function(){var e=this;this.setState({downloading:!0},(function(){var t=e.props,n=t.status,r=(t.api,t.handleError),a=e.state.selectedBatchId;n!==c.header.publishing?e.props.getBatchExport(a).then((function(){e.props.onDone(),e.setState({downloading:!1})})):r(c.publish.downloadError)}))},t.prototype.renderLabel=function(){var e=this.props,n=e.isExport,r=e.batchJobs,a=this.state,o=a.renderedBatch,i=a.selectedBatchId,u=a.uploading,d=a.uploadComplete;if(n&&d&&!o&&0===Object.keys(this.props.batchJobs.missing).length)return s.createElement("div",{className:"progress-bar"},s.createElement("progress",{max:t.PROGRESS_MAX_VALUE,value:r.renders[i]}));if(u){var p=n?c.publish.importingData:c.publish.creatingLinks;return s.createElement("span",null,s.createElement(l.default,null)," ",p)}return s.createElement("span",null,f.ICON_UPLOAD," ",c.publish.uploadCsv)},t.prototype.onAssociationChange=function(e,t,n){var r=this.props.activeBatch.data.columns.findIndex((function(e){return e.detail===t}));-1!==r&&this.props.updateAssociation(this.props.api,r,"Static",null),this.props.updateAssociation(this.props.api,parseInt(e,10),"UGC",t),this.props.onNext(n)},t.prototype.renderColumnMap=function(){var e,t,n=this,r=this.props,a=r.activeBatch.data.columns,l=r.batchJobs.missing,d=r.variables;if(l.length>=0&&a){var p=Object.keys(d).map((function(e){return o({},d[e])})),f=Object.keys(a).map((function(e){return a[e]})),h=f.filter((function(e){return 0!==e.from_import})).map((function(e,t){var n={value:t,label:e.name};return-1!==p.findIndex((function(t){return e.detail===t.id}))&&(n.disabled=!0),n})),m=!1,_=function(e){if(!e.optional&&-1===f.findIndex((function(t){return t.detail===e.id})))return m=!0,"break"};try{for(var g=i(p),v=g.next();!v.done;v=g.next()){if("break"===_(v.value))break}}catch(t){e={error:t}}finally{try{v&&!v.done&&(t=g.return)&&t.call(g)}finally{if(e)throw e.error}}h.unshift("");var b=Object.keys(l).map((function(e){return l[e]})).join();return h.length<p.length?s.createElement(s.Fragment,null,s.createElement(u.default,null),s.createElement("p",{className:"missingColumns"},c.publish.csvMissingColumns+" "+b)):s.createElement("div",{className:"align-columns"},s.createElement(u.default,null),s.createElement("p",{className:"match-columns"},""+c.publish.csvMatchColumns),s.createElement("table",null,s.createElement("thead",null,s.createElement("tr",null,s.createElement("th",null,"Variable"),s.createElement("th",null,"CSV Column"))),s.createElement("tbody",null,p.map((function(e,t){var r=f.findIndex((function(t){return t.detail===e.id})),a=null!=r?r:"",o=e.optional?"":"required";return s.createElement("tr",{key:"var-"+e.id,className:""+o},s.createElement("td",{className:"variable"},s.createElement("p",null,e.name," ",e.optional?null:s.createElement("span",{style:{color:"red"}}," * "))),s.createElement("td",null,s.createElement(y.default,{options:h,value:a,onChange:function(t){return n.onAssociationChange(t,e.id,m)}})))})))))}},t.prototype.render=function(){var e=this,n=this.state,r=n.uploadComplete,a=n.uploading,o=n.downloading,i=n.renderedBatch,p=n.selectedBatchId,h=this.props,m=h.isExport,_=h.batchJobs,y=_.missing,g=_.renders,v=[{label:s.createElement("span",null,f.ICON_DOWNLOAD," ",c.publish.downloadSampleCsvLink),onClick:function(){return e.downloadSampleCsv()},key:"download-sample"},{label:this.renderLabel(),onClick:function(){return e.selectCsv()},key:"upload",disabled:m&&r||a}],b=o?s.createElement("span",null,s.createElement(l.default,null)," ",c.publish.exporting):s.createElement("span",null,f.ICON_DOWNLOAD," ",c.publish.btnDownload),w=s.createElement("div",{className:"progress-bar"},s.createElement("progress",{max:t.PROGRESS_MAX_VALUE,value:g[p]})),M=s.createElement("div",null,s.createElement("h2",null,r?c.publish.downloadLink:c.publish.generatingLink),s.createElement(u.default,null),s.createElement("p",null,r?c.publish.downloadDesc:c.publish.generatingLinkDesc),m&&r&&!i?s.createElement(d.BigButton,{label:w,disabled:m}):s.createElement(d.BigButton,{label:b,disabled:o,onClick:function(){return e.downloadCsv()}})),L=s.createElement(s.Fragment,null,this.props.error?this.props.next?M:"":M,this.renderColumnMap()),T=s.createElement("div",null,s.createElement("h2",null,c.publish.emailTitle),s.createElement(u.default,null),s.createElement("p",null,c.publish.emailDesc),s.createElement("input",{type:"file",style:{display:"none"},accept:"text/csv",ref:this.hiddenFileInputRef,onChange:this.doUploadCsv}),s.createElement("div",{className:"link-wrapper"},null==v?void 0:v.map((function(e,t){return s.createElement(d.BigButton,{label:s.createElement("span",null,e.label),onClick:e.onClick,disabled:null==e?void 0:e.disabled,key:e.key})}))));return(m&&0===Object.keys(y).length?i:r)?L:T},t.PROGRESS_MAX_VALUE=100,t.CSV_EXPORT_CONFIG={fieldSeparator:",",quoteStrings:'"',decimalSeparator:".",showLabels:!1,showTitle:!1,useTextFile:!1,useBom:!1,useKeysAsHeaders:!0},t}(s.PureComponent),b=function(e){return e.replace(/\W/g,"")};t.default=_.connect((function(e){return{activeBatch:e.activeBatch,batchesList:e.batchesList}}),(function(e){return m.bindActionCreators({updateAssociation:g.updateAssociation,getBatch:g.getBatch,setPage:g.setPage},e)}),null,{withRef:!0})(v)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(515))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){}return e.EOL="\r\n",e.BOM="\ufeff",e.DEFAULT_FIELD_SEPARATOR=",",e.DEFAULT_DECIMAL_SEPARATOR=".",e.DEFAULT_QUOTE='"',e.DEFAULT_SHOW_TITLE=!1,e.DEFAULT_TITLE="My Generated Report",e.DEFAULT_FILENAME="generated",e.DEFAULT_SHOW_LABELS=!1,e.DEFAULT_USE_TEXT_FILE=!1,e.DEFAULT_USE_BOM=!0,e.DEFAULT_HEADER=[],e.DEFAULT_KEYS_AS_HEADERS=!1,e}();t.CsvConfigConsts=r,t.ConfigDefaults={filename:r.DEFAULT_FILENAME,fieldSeparator:r.DEFAULT_FIELD_SEPARATOR,quoteStrings:r.DEFAULT_QUOTE,decimalSeparator:r.DEFAULT_DECIMAL_SEPARATOR,showLabels:r.DEFAULT_SHOW_LABELS,showTitle:r.DEFAULT_SHOW_TITLE,title:r.DEFAULT_TITLE,useTextFile:r.DEFAULT_USE_TEXT_FILE,useBom:r.DEFAULT_USE_BOM,headers:r.DEFAULT_HEADER,useKeysAsHeaders:r.DEFAULT_KEYS_AS_HEADERS};var a=function(){function e(e){this._csv="";var n=e||{};this._options=u({},t.ConfigDefaults,n),this._options.useKeysAsHeaders&&this._options.headers&&this._options.headers.length>0&&console.warn("Option to use object keys as headers was set, but headers were still passed!")}return Object.defineProperty(e.prototype,"options",{get:function(){return this._options},set:function(e){this._options=u({},t.ConfigDefaults,e)},enumerable:!0,configurable:!0}),e.prototype.generateCsv=function(e,t){if(void 0===t&&(t=!1),this._csv="",this._parseData(e),this._options.useBom&&(this._csv+=r.BOM),this._options.showTitle&&(this._csv+=this._options.title+"\r\n\n"),this._getHeaders(),this._getBody(),""!=this._csv){if(t)return this._csv;var n=this._options.useTextFile?"plain":"csv",a=this._options.useTextFile?".txt":".csv",o=new Blob([this._csv],{type:"text/"+n+";charset=utf8;"});if(navigator.msSaveBlob){var i=this._options.filename.replace(/ /g,"_")+a;navigator.msSaveBlob(o,i)}else{this._options.useTextFile,encodeURI(this._csv);var s=document.createElement("a");s.href=URL.createObjectURL(o),s.setAttribute("visibility","hidden"),s.download=this._options.filename.replace(/ /g,"_")+a,document.body.appendChild(s),s.click(),document.body.removeChild(s)}}else console.log("Invalid data")},e.prototype._getHeaders=function(){if(this._options.showLabels||this._options.useKeysAsHeaders){var e=this._options.useKeysAsHeaders?Object.keys(this._data[0]):this._options.headers;if(e.length>0){for(var t="",n=0;n<e.length;n++)t+=e[n]+this._options.fieldSeparator;t=t.slice(0,-1),this._csv+=t+r.EOL}}},e.prototype._getBody=function(){for(var e=Object.keys(this._data[0]),t=0;t<this._data.length;t++){for(var n="",a=0;a<e.length;a++){var o=e[a];n+=this._formatData(this._data[t][o])+this._options.fieldSeparator}n=n.slice(0,-1),this._csv+=n+r.EOL}},e.prototype._formatData=function(e){return"locale"===this._options.decimalSeparator&&this._isFloat(e)?e.toLocaleString():"."!==this._options.decimalSeparator&&this._isFloat(e)?e.toString().replace(".",this._options.decimalSeparator):"string"==typeof e?(e=e.replace(/"/g,'""'),(this._options.quoteStrings||e.indexOf(",")>-1||e.indexOf("\n")>-1||e.indexOf("\r")>-1)&&(e=this._options.quoteStrings+e+this._options.quoteStrings),e):"boolean"==typeof e?e?"TRUE":"FALSE":e},e.prototype._isFloat=function(e){return+e===e&&(!isFinite(e)||Boolean(e%1))},e.prototype._parseData=function(e){return this._data="object"!=typeof e?JSON.parse(e):e,this._data},e}();t.ExportToCsv=a;var o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function s(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function u(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];for(var a,u=s(e),l=1;l<arguments.length;l++){for(var c in t=Object(arguments[l]))o.call(t,c)&&(u[c]=t[c]);if(Object.getOwnPropertySymbols){a=Object.getOwnPropertySymbols(t);for(var d=0;d<a.length;d++)i.call(t,a[d])&&(u[a[d]]=t[a[d]])}}return u}},function(e,t,n){var r={"./af":138,"./af.js":138,"./ar":139,"./ar-dz":140,"./ar-dz.js":140,"./ar-kw":141,"./ar-kw.js":141,"./ar-ly":142,"./ar-ly.js":142,"./ar-ma":143,"./ar-ma.js":143,"./ar-sa":144,"./ar-sa.js":144,"./ar-tn":145,"./ar-tn.js":145,"./ar.js":139,"./az":146,"./az.js":146,"./be":147,"./be.js":147,"./bg":148,"./bg.js":148,"./bm":149,"./bm.js":149,"./bn":150,"./bn-bd":151,"./bn-bd.js":151,"./bn.js":150,"./bo":152,"./bo.js":152,"./br":153,"./br.js":153,"./bs":154,"./bs.js":154,"./ca":155,"./ca.js":155,"./cs":156,"./cs.js":156,"./cv":157,"./cv.js":157,"./cy":158,"./cy.js":158,"./da":159,"./da.js":159,"./de":160,"./de-at":161,"./de-at.js":161,"./de-ch":162,"./de-ch.js":162,"./de.js":160,"./dv":163,"./dv.js":163,"./el":164,"./el.js":164,"./en-au":165,"./en-au.js":165,"./en-ca":166,"./en-ca.js":166,"./en-gb":167,"./en-gb.js":167,"./en-ie":168,"./en-ie.js":168,"./en-il":169,"./en-il.js":169,"./en-in":170,"./en-in.js":170,"./en-nz":171,"./en-nz.js":171,"./en-sg":172,"./en-sg.js":172,"./eo":173,"./eo.js":173,"./es":174,"./es-do":175,"./es-do.js":175,"./es-mx":176,"./es-mx.js":176,"./es-us":177,"./es-us.js":177,"./es.js":174,"./et":178,"./et.js":178,"./eu":179,"./eu.js":179,"./fa":180,"./fa.js":180,"./fi":181,"./fi.js":181,"./fil":182,"./fil.js":182,"./fo":183,"./fo.js":183,"./fr":184,"./fr-ca":185,"./fr-ca.js":185,"./fr-ch":186,"./fr-ch.js":186,"./fr.js":184,"./fy":187,"./fy.js":187,"./ga":188,"./ga.js":188,"./gd":189,"./gd.js":189,"./gl":190,"./gl.js":190,"./gom-deva":191,"./gom-deva.js":191,"./gom-latn":192,"./gom-latn.js":192,"./gu":193,"./gu.js":193,"./he":194,"./he.js":194,"./hi":195,"./hi.js":195,"./hr":196,"./hr.js":196,"./hu":197,"./hu.js":197,"./hy-am":198,"./hy-am.js":198,"./id":199,"./id.js":199,"./is":200,"./is.js":200,"./it":201,"./it-ch":202,"./it-ch.js":202,"./it.js":201,"./ja":203,"./ja.js":203,"./jv":204,"./jv.js":204,"./ka":205,"./ka.js":205,"./kk":206,"./kk.js":206,"./km":207,"./km.js":207,"./kn":208,"./kn.js":208,"./ko":209,"./ko.js":209,"./ku":210,"./ku.js":210,"./ky":211,"./ky.js":211,"./lb":212,"./lb.js":212,"./lo":213,"./lo.js":213,"./lt":214,"./lt.js":214,"./lv":215,"./lv.js":215,"./me":216,"./me.js":216,"./mi":217,"./mi.js":217,"./mk":218,"./mk.js":218,"./ml":219,"./ml.js":219,"./mn":220,"./mn.js":220,"./mr":221,"./mr.js":221,"./ms":222,"./ms-my":223,"./ms-my.js":223,"./ms.js":222,"./mt":224,"./mt.js":224,"./my":225,"./my.js":225,"./nb":226,"./nb.js":226,"./ne":227,"./ne.js":227,"./nl":228,"./nl-be":229,"./nl-be.js":229,"./nl.js":228,"./nn":230,"./nn.js":230,"./oc-lnc":231,"./oc-lnc.js":231,"./pa-in":232,"./pa-in.js":232,"./pl":233,"./pl.js":233,"./pt":234,"./pt-br":235,"./pt-br.js":235,"./pt.js":234,"./ro":236,"./ro.js":236,"./ru":237,"./ru.js":237,"./sd":238,"./sd.js":238,"./se":239,"./se.js":239,"./si":240,"./si.js":240,"./sk":241,"./sk.js":241,"./sl":242,"./sl.js":242,"./sq":243,"./sq.js":243,"./sr":244,"./sr-cyrl":245,"./sr-cyrl.js":245,"./sr.js":244,"./ss":246,"./ss.js":246,"./sv":247,"./sv.js":247,"./sw":248,"./sw.js":248,"./ta":249,"./ta.js":249,"./te":250,"./te.js":250,"./tet":251,"./tet.js":251,"./tg":252,"./tg.js":252,"./th":253,"./th.js":253,"./tk":254,"./tk.js":254,"./tl-ph":255,"./tl-ph.js":255,"./tlh":256,"./tlh.js":256,"./tr":257,"./tr.js":257,"./tzl":258,"./tzl.js":258,"./tzm":259,"./tzm-latn":260,"./tzm-latn.js":260,"./tzm.js":259,"./ug-cn":261,"./ug-cn.js":261,"./uk":262,"./uk.js":262,"./ur":263,"./ur.js":263,"./uz":264,"./uz-latn":265,"./uz-latn.js":265,"./uz.js":264,"./vi":266,"./vi.js":266,"./x-pseudo":267,"./x-pseudo.js":267,"./yo":268,"./yo.js":268,"./zh-cn":269,"./zh-cn.js":269,"./zh-hk":270,"./zh-hk.js":270,"./zh-mo":271,"./zh-mo.js":271,"./zh-tw":272,"./zh-tw.js":272};function a(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=o,e.exports=a,a.id=516},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var a=n(39),o=n(29),i=null;try{var s=JSON.parse(localStorage.getItem(a.AUTH_CACHE_KEY));if(s){var u=s.idTokenPayload.exp;o.default.checkExpiry(u)&&(i=s)}}catch(e){console.warn("Cached credentials were malformed or missing, redirected to login.")}t.default=function(e,t){switch(void 0===e&&(e=i),t.type){case a.default.LOGIN:return r({},t.auth);case a.default.CLEAR:return null;default:return e}}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var a=n(40),o=null;try{o=JSON.parse(localStorage.getItem(a.ACCESS_CACHE_KEY))}catch(e){console.warn("Cached access data was malformed or missing, redirected to login.")}t.default=function(e,t){switch(void 0===e&&(e=o),t.type){case a.default.SET:case a.default.STORY_ADDED:case a.default.STORY_NAME_MUTATION:case a.default.ORG_NAME_MUTATION:case a.default.STORY_DELETED:return r({},t.accessData);case a.default.CLEAR:return null;default:return e}}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var a=n(55),o={publishing:!1};t.default=function(e,t){switch(void 0===e&&(e=o),t.type){case a.default.UPDATE_PUBLISH_STATUS:return r(r({},e),t.data);case a.default.CLEAR_PUBLISH_STATUS:return o;default:return e}}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var a=n(24),o={page:1,order:"date_created",order_direction:"desc",name:"",type:"",tags:""};t.default=function(e,t){switch(void 0===e&&(e=o),t.type){case a.default.UPDATE:return r(r({},e),t.newFilters);case a.default.RESET:return r({},o);default:return e}}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},a=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},o=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,a=e.length;n<r;n++,a++)e[a]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0});var i=n(17),s={loading:!1};t.default=function(e,t){void 0===e&&(e=s);var n,u=[];switch(t.type){case i.default.TOGGLE_LOADING:return r(r({},e),{loading:t.toggle});case i.default.GET:return r(r({},e),t.assetList);case i.default.ADD_TAG:for(var l=0,c=e.assets.length;l<c;l++)(n=e.assets[l]).id===t.id?u[l]=r(r({},n),{tags:o(o([],a(n.tags)),a(t.freshTags))}):u[l]=n;return r(r({},e),{assets:u});case i.default.DELETE_TAG:return r(r({},e),{assets:e.assets.map((function(e){return e.id===t.id?r(r({},e),{tags:e.tags.filter((function(e){return e!==t.tag}))}):e}))});case i.default.UPDATE_NAME:return r(r({},e),{assets:e.assets.map((function(e){return e.id===t.id?r(r({},e),{name:t.name}):e}))});case i.default.UPDATE_DATA:return r(r({},e),{assets:e.assets.map((function(e){return e.id===t.id?r(r({},e),{data:t.data}):e}))});default:return e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(83),a=[];t.default=function(e,t){switch(void 0===e&&(e=a),t.type){case r.default.GET:return t.assetTags;default:return e}}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},a=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},o=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,a=e.length;n<r;n++,a++)e[a]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0});var i=n(52),s={autoTag:!0,assignToStory:!0,uploads:[]};t.default=function(e,t){switch(void 0===e&&(e=s),t.type){case i.default.TOGGLE_AUTO_TAG:return r(r({},e),{autoTag:t.toggle});case i.default.TOGGLE_ASSIGN_TO_STORY:return r(r({},e),{assignToStory:t.toggle});case i.default.ADD_UPLOAD:return r(r({},e),{uploads:o(o([],a(e.uploads)),[t.uploadMeta])});case i.default.UPDATE_PERCENT_UPLOADED:var n=e.uploads.map((function(e){return e.filename===t.filename?r(r({},e),{percent:t.percent}):e}));return r(r({},e),{uploads:n});case i.default.REMOVE_UPLOAD:return r(r({},e),{uploads:e.uploads.filter((function(e){return e.filename!==t.filename}))});default:return e}}},function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},a=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,a=e.length;n<r;n++,a++)e[a]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0});var o=n(33),i=[];t.default=function(e,t){switch(void 0===e&&(e=i),t.type){case o.default.SELECT_ALL:return a([],r(t.allIds));case o.default.SELECT_ASSET:return a(a([],r(e)),[t.id]);case o.default.SELECT_MULTIPLE:return a([],r(new Set(a(a([],r(e)),r(t.assets)))));case o.default.DESELECT_ASSET:return e.filter((function(e){return e!==t.id}));case o.default.RESET_SELECTION:return[];default:return e}}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},a=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},o=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,a=e.length;n<r;n++,a++)e[a]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0});var i=n(88),s={loading:!0,updating:!1,associationOptions:{},page:1,data:{}},u={name:"New Column",type:"Static",from_import:1,detail:null};t.default=function(e,t){var n,l;switch(void 0===e&&(e=s),t.type){case i.default.TOGGlE_LOADING:return r(r({},e),{loading:t.toggle});case i.default.TOGGLE_UPDATING:return r(r({},e),{updating:t.toggle});case i.default.ADD_COLUMN:return void 0!==t.columnData?r(r({},e),{data:r(r({},e.data),{columns:o(o([],a(e.data.columns)),[t.columnData])})}):(l=(n=function(e){return e.data.columns.filter((function(e){return e.name.includes(u.name)})).length}(e))?r(r({},u),{name:u.name+" ("+n+")"}):r({},u),r(r({},e),{data:r(r({},e.data),{columns:o(o([],a(e.data.columns)),[l])})}));case i.default.REPLACE_ASSOCIATION_OPTIONS:return r(r({},e),{associationOptions:r({},t.associationOptions)});case i.default.UPDATE_ASSOCIATION:return r(r({},e),{data:r(r({},e.data),{columns:e.data.columns.map((function(e,n){return t.colIndex===n?"Static"===t.newType?r(r({},e),{type:t.newType,detail:null}):r(r({},e),{type:t.newType,detail:t.newAssociation,from_import:"EGC"===t.newType?0:1}):e}))})});case i.default.SET_BATCH:return r(r({},e),{data:r({},t.batch)});case i.default.SET_PAGE:return r(r({},e),{page:t.page});default:return e}}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var a=n(28),o=n(9),i=n(527),s=n(7),u=n(29),l=n(27),c=function(){function e(e,t,n){var c=this;this.pollingInterval=1e3,this.cancelTokenCache={player:void 0,system:void 0},this.cancelTokens={},this.doRequest=function(e,t){return void 0===t&&(t=""),new Promise((function(n,r){c.http(e).then((function(e){t&&c.clearCache(t),n(e.data)})).catch((function(e){!a.default.isCancel(e)&&t&&c.clearCache(t),!e.response||403!==e.response.status&&401!==e.response.status||(alert(s.assets.sessionExpired),l.default.getSession()&&(l.default.removeSession(),u.default.logout())),r(e)}))}))},this.cancelPrevious=function(e){var t=a.default.CancelToken.source();return c.cancelTokenCache[e]&&c.cancelTokenCache[e].cancel(),c.cancelTokenCache[e]=t,t.token},this.clearCache=function(e){c.cancelTokenCache[e]=void 0},this.doAWSRequest=function(e,t){return void 0===t&&(t=""),new Promise((function(t,n){c.awsHttp(e).then((function(e){t(e.data)})).catch((function(e){n(e)}))}))},this.saveStory=function(e,t){return c.doRequest({method:"PATCH",url:"/story/"+e,data:t})},this.newStory=function(e){return c.doRequest({method:"POST",url:"/story",data:e})},this.deleteStory=function(e){return c.doRequest({method:"DELETE",url:"/story/"+e})},this.getStoryStatus=function(e){return c.doRequest({method:"GET",url:"/story/"+e+"/version"})},this.getStoryVersions=function(e){return c.doRequest({method:"GET",url:"/story/"+e+"/versions"})},this.revertVersion=function(e,t){var n={version_id:t};return c.doRequest({method:"POST",url:"/story/"+e+"/version/revert",data:n})},this.getSignedUrl=function(e,t){return c.doRequest({method:"GET",url:"/story/"+e+"/upload-url",params:{filename:t.name,content_type:t.type}})},this.uploadToSignedUrl=function(e,t,n){return c.doAWSRequest({url:e,method:"PUT",data:t,onUploadProgress:n,headers:{"Content-Type":t.type}})},this.checkS3Bucket=function(e){var t="/bucket/"+e;return c.doRequest({method:"GET",url:t})},this.createS3Bucket=function(e,t,n,r){var a="/bucket/"+e,o={region:t,create_distribution:r?1:0,read_only:n?1:0};return c.doRequest({method:"POST",url:a,data:o})},this.processStoryFile=function(e,t,n){var r="/story/"+e+"/file",a={};return t?a.file_key=t:n&&(a.url=n),c.doRequest({method:"POST",url:r,data:a})},this.getAssets=function(e,t,n){void 0===n&&(n=!1);var r="/assets?items_per_page=50&optional_story_id="+t+"&unprocessed="+n,a=function(t){e.hasOwnProperty(t)&&(e[t]&&"tags"!==t&&(r+="&"+t+"="+encodeURIComponent(e[t])),e[t]&&"tags"===t&&e[t].split(",").forEach((function(e,n){r+="&"+t+"["+n+"]="+encodeURIComponent(e)})))};for(var o in e)a(o);return c.doRequest({method:"GET",url:r})},this.getAssetItem=function(e){return c.doRequest({method:"GET",url:"/assets/"+e})},this.duplicateAsset=function(e,t){return c.doRequest({method:"POST",url:"/assets/"+e+"/copy",data:{name:t}})},this.cancelRequest=function(e){var t=a.default.CancelToken.source();return c.cancelTokens[e]=t,t.token},this.clearCancelTokes=function(){c.cancelTokens={}},this.uploadAsset=function(e,t,n,r,a){var o=new FormData,i=c.cancelRequest(a);return e&&o.append("story_id",e),o.append("tags",t),o.append("file",n),c.doRequest({method:"POST",url:"/assets",data:o,onUploadProgress:r,cancelToken:i})},this.cancelUploadAssets=function(e){var t=c.cancelTokens[e];t&&t.cancel()},this.createCompositionAsset=function(e,t,n){var r=new FormData;return r.append("story_id",e),r.append("data",t),r.append("type","video_composition"),r.append("name",n||"New Composition"),c.doRequest({method:"POST",url:"/assets",data:r})},this.createStaticCompositionAsset=function(e,t){var n=new FormData;return n.append("story_id",e),n.append("data",t),n.append("type","static_composition"),n.append("name","New Template"),c.doRequest({method:"POST",url:"/assets",data:n})},this.deleteAsset=function(e){return c.doRequest({method:"DELETE",url:"/assets/"+e})},this.deleteAssets=function(e){return c.doRequest({method:"DELETE",url:"/assets",data:{ids:e}})},this.copyAsset=function(e,t){return c.doRequest({method:"POST",url:"/assets/"+e+"/copy",data:t})},this.addAssetTag=function(e,t){return c.doRequest({method:"POST",url:"/assets/"+e+"/tag",data:{tag:t}})},this.deleteAssetTag=function(e,t){return c.doRequest({method:"DELETE",url:"/assets/"+e+"/tag",data:{tag:t}})},this.updateAsset=function(e,t){return c.doRequest({method:"PATCH",url:"/assets/"+e,data:t})},this.getAssetTags=function(e){return c.doRequest({method:"GET",url:"/assets/tags?story_id="+e})},this.getStory=function(e){return c.doRequest({method:"GET",url:"/story/"+e})},this.getExperiences=function(e,t){return c.doRequest({method:"GET",url:"/story/"+e+"/experiences",params:t})},this.exportExperiences=function(e,t){return c.doRequest({method:"GET",url:"/story/"+e+"/experiences/export",params:t})},this.blockByExperience=function(e){var t="/experience/"+e+"/block";return c.doRequest({method:"POST",url:t})},this.getBatches=function(e,t){return c.doRequest({method:"GET",url:"/story/"+e+"/batches",params:t})},this.getBatch=function(e,t){return c.doRequest({method:"GET",url:"/batch/"+e,params:{page:t}})},this.getBatchProgress=function(e){return c.doRequest({method:"GET",url:"/batch/"+e+"/progress"})},this.createFreshBatch=function(e,t){return c.doRequest({method:"POST",url:"/batch",data:{story_id:e,name:t}})},this.updateBatchName=function(e,t){return c.doRequest({method:"PATCH",url:"/batch/"+e+"/rename",data:{name:t}})},this.importBatchDataFromCsv=function(e,t,n,r,a,o){void 0===n&&(n=!1),void 0===r&&(r=null),void 0===a&&(a=null),void 0===o&&(o=!1);var i=new FormData;return i.append("file_key",t),n&&r&&a&&(i.append("include_email_embed","true"),i.append("composition_id",a),i.append("access_key",r)),o&&i.append("include_media","true"),c.doRequest({method:"POST",url:"/batch/"+e+"/data/from-csv",data:i})},this.updateBatchColumns=function(e,t){return c.doRequest({method:"PUT",url:"/batch/"+e+"/columns",data:t})},this.insertNewRow=function(e,t){return c.doRequest({method:"POST",url:"/batch/"+e+"/row/"+t})},this.updateCellValue=function(e,t,n,r){return c.doRequest({method:"PUT",url:"/batch/"+e+"/cell",data:{column_index:t,row_index:n,value:r}})},this.prepareBatchForRender=function(e){return c.doRequest({method:"POST",url:"/batch/"+e+"/prepare"})},this.checkBatchExportStatus=function(e){return c.doRequest({method:"GET",url:"/batch/"+e+"/export"})},this.invokeBatchExportJob=function(e){return c.doRequest({method:"POST",url:"/batch/"+e+"/export"})},this.downloadBatchExport=function(e,t){return c.doRequest({method:"GET",url:"/batch/"+e+"/export/"+t,responseType:"blob",params:{preserve:"true"}})},this.duplicateBatch=function(e){return c.doRequest({method:"POST",url:"/batch/"+e+"/duplicate"})},this.deleteBatch=function(e){return c.doRequest({method:"DELETE",url:"/batch/"+e})},this.updateModerationStatus=function(e,t,n){return c.doRequest({method:"POST",url:"/experience/"+e+"/status",data:{status:t,reason:n}})},this.addOrReplaceNote=function(e,t){return c.doRequest({method:"POST",url:"/experience/"+e+"/notes",data:{notes:t}})},this.getJob=function(e){return c.doRequest({method:"GET",url:"/job/"+e})},this.runCut=function(e,t,n,r){var a="/job/"+i.JOB_TYPES.RUN_CUT,o={story_id:e,act_id:t,scene_id:n,cut_id:r};return c.doRequest({method:"POST",url:a,data:o})},this.runReRenderCuts=function(e,t,n){var r="/job/"+i.JOB_TYPES.RE_RUN_CUTS,a={story_id:e,act_id:t,scene_id:n};return c.doRequest({method:"POST",url:r,data:a})},this.runProcessBaseVideo=function(e,t){var n="/job/"+i.JOB_TYPES.PROCESS_BASE_VIDEO,r={story_id:e,file_key:t};return c.doRequest({method:"POST",url:n,data:r})},this.runPublish=function(e,t){var n={story_id:e,message:t};return c.doRequest({method:"POST",url:"/job/publish",data:n})},this.cancelPublish=function(e){var t={story_id:e};return c.doRequest({method:"DELETE",url:"/job/publish",data:t})},this.pollJob=function(e){var t={method:"GET",url:"/job/"+e};return new Promise((function(e,n){c.pollForJob(t,e,n)}))},this.pollForJob=function(e,t,n){c.http(e).then((function(r){"failed"===r.data.status?n(r):void 0!==r.data.output?t(r.data):c.jobPollTimer=setTimeout((function(){c.pollForJob(e,t,n)}),c.pollingInterval)})).catch((function(e){n(e)}))},this.pollForExperience=function(e,t,n){c.http(e).then((function(r){"failed"===r.data.status?n(r):!1===r.data.rendering&&void 0!==r.data.error?n(r.data):void 0!==r.data.output?o.isObjEmpty(r.data.output)?c.experiencePollTimer=setTimeout((function(){c.pollForExperience(e,t,n)}),c.pollingInterval):t(r.data):c.experiencePollTimer=setTimeout((function(){c.pollForExperience(e,t,n)}),c.pollingInterval)})).catch((function(e){n(e)}))},this.getJobLogUrl=function(e){var t="/job/"+e+"/log-url";return c.doRequest({method:"GET",url:t})},this.getJobLog=function(e){return c.doAWSRequest({method:"GET",url:e})},this.createExperience=function(e,t,n,r){void 0===t&&(t={});var a=c.experienceFormData(e,t,n);r&&a.append("published","false");return c.doRequest({method:"POST",url:"/experience",data:a})},this.deleteExperience=function(e,t){void 0===t&&(t=!0);var n="/experience/"+e,r={erase_media:t};return c.doRequest({method:"DELETE",data:r,url:n})},this.triggerEvent=function(e,t,n){var r="/experience/"+e+"/trigger-event";if(t){var a=new FormData;return a.append("composition_id",t),n&&a.append("published","false"),c.doRequest({method:"POST",url:r,data:a})}return c.doRequest({method:"POST",url:r})},this.getExperience=function(e,t){void 0===t&&(t=!1);var n={method:"GET",url:"/experience/"+e};return t?new Promise((function(e,t){c.pollForExperience(n,e,t)})):c.doRequest(n)},this.experienceFormData=function(e,t,n){var a=r({},t),o=new FormData;for(var i in o.append("story_id",e),n&&o.append("composition_id",n),a)if(a[i]){var s=a[i];if(s&&"file"===s.type){var u=s.files;u.length>0?(a[i]="",o.append(i,u[0])):a[i]=""}else s&&s instanceof File&&(a[i]="",o.append(i,s,s.name));o.append("inventory["+i+"]",a[i])}return o},this.getAccssCredentials=function(){return c.doRequest({method:"GET",url:"/api-key"})},this.createAccessCredentials=function(e){var t={name:e};return c.doRequest({method:"POST",data:t,url:"/api-key"})},this.deleteAccessCrednetials=function(e){var t={access_key_id:e};return c.doRequest({method:"DELETE",data:t,url:"/api-key"})},this.invokeBatchRenderJob=function(e){return c.doRequest({method:"POST",url:"/job/render-batch",data:{batch_id:e}})},this.cancelBatchRenderJob=function(e){return c.doRequest({method:"POST",url:"/batch/"+e+"/cancel"})},this.getUsers=function(e,t,n){return c.doRequest({url:"/account/"+e+"/users?page="+t+"&items_per_page="+n,method:"GET"})},this.addUser=function(e,t,n){return c.doRequest({url:"/account/"+e+"/grant",method:"POST",data:{email:t,role_id:n}})},this.resendInvite=function(e,t){return c.doRequest({url:"/account/"+e+"/resend",method:"POST",data:{email:t}})},this.revokeInvite=function(e,t){return c.doRequest({url:"/account/"+e+"/revoke",method:"POST",data:{email:t}})},this.updateInviteRole=function(e,t,n){return c.doRequest({url:"/account/"+e+"/grant",method:"PATCH",data:{email:t,role_id:n}})},this.updateRole=function(e,t,n){return c.doRequest({url:"/account/"+e+"/user",method:"PATCH",data:{user_id:t,role_id:n}})},this.deleteUser=function(e,t){return c.doRequest({url:"/account/"+e+"/user",method:"DELETE",data:{user_id:t}})},this.getPlayerMetrics=function(e,t,n,r){void 0===r&&(r="player");var a={method:"GET",url:"/metrics/player/"+e,params:{start:t,end:n},cancelToken:c.cancelPrevious(r)};return c.doRequest(a,r)},this.getSystemMetrics=function(e,t,n,r,a){void 0===a&&(a="system");var o={method:"GET",url:"/metrics/system/"+e,params:{start:t,end:n,step:r},cancelToken:c.cancelPrevious(a)};return c.doRequest(o,a)},this.getOrganizations=function(e,t){return c.doRequest({url:"/account",method:"GET",params:{page:e,items_per_page:t}})},this.addOrganization=function(e,t){return c.doRequest({url:"/account",method:"POST",data:{name:e,initial_story:t}})},this.updateOrgName=function(e,t){return c.doRequest({url:"/account/"+e,method:"PATCH",data:{name:t}})},this.deleteOrg=function(e){},this.changeOrgPlan=function(e,t){return c.doRequest({url:"/account/"+e,method:"PATCH",data:{tier:t}})},this.getAccountInfo=function(e){return c.doRequest({url:"/account/"+e,method:"GET"})},this.cancelOrgPlan=function(e){return c.doRequest({url:"/account/"+e,method:"PATCH",data:{cancel:!0}})},this.getNextBillingPeriod=function(e){return c.doRequest({url:"/account/"+e+"/next-payment",method:"GET"})},this.getRedirectToBillingPortal=function(e){return c.doRequest({url:"/account/"+e+"/billing-portal",method:"GET"})},this.getRedirectToRenew=function(e,t){return c.doRequest({url:"/account/"+e+"/renew?tier="+t,method:"GET"})},this.getAPIUsageOverview=function(e,t){var n=e&&t?"?start="+e+"&end="+t:"";return c.doRequest({url:"/usage"+n,method:"GET"})},this.getUsageGraph=function(e,t,n){var r=t&&n?"?start="+t+"&end="+n:"";return c.doRequest({url:"/usage/daily/"+e+r,method:"GET"})},this.getBillingPeriods=function(){return c.doRequest({url:"/usage/billing-periods",method:"GET"})},this.http=n?a.default.create({baseURL:e,headers:{Authorization:"Bearer "+t,"X-Imposium-API-Version":"2.0.0","X-Imposium-Account-Id":n||""}}):a.default.create({baseURL:e,headers:{"X-Imposium-Access-Key":""+t,"X-Imposium-API-Version":"2.0.0"}}),this.awsHttp=a.default.create()}return e.prototype.cancelExperiencePolling=function(){var e=this;return new Promise((function(t){clearTimeout(e.experiencePollTimer),t()}))},e.prototype.cancelJobPolling=function(){var e=this;return new Promise((function(t){clearTimeout(e.jobPollTimer),t()}))},e}();t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JOB_TYPES=void 0,t.JOB_TYPES={RUN_CUT:"make-cut",PROCESS_BASE_VIDEO:"process-base-video",RE_RUN_CUTS:"recut-scene"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(28),a=function(e){var t=this;this.doRequest=function(e){return new Promise((function(n,r){t.http(e).then((function(e){n(e.data)})).catch((function(e){r(e)}))}))},this.updateModerationStatus=function(e,n,r){return t.doRequest({method:"POST",url:"/",data:{task:"update-experience-status",experience_id:e,status:n,reason:r}})},this.addOrReplaceNote=function(e,n){return t.doRequest({method:"POST",url:"/",data:{task:"update-experience-notes",experience_id:e,notes:n}})},this.http=r.default.create({baseURL:e+"/1.1"})};t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(530),a=function(){function e(){}return e.setItem=function(e,t){return new Promise((function(n,a){r.setItem(e,t).then((function(){return n(null)})).catch((function(e){console.error("Failed to store key value pair:",e),a(e)}))}))},e.getItem=function(e){return new Promise((function(t,n){r.getItem(e).then((function(e){t(e)})).catch((function(e){console.error("Failed to look up value for key:",e),n(e)}))}))},e}();t.default=a},function(e,t){e.exports=h},function(e,t,n){"use strict";n.r(t),n.d(t,"AlphaPicker",(function(){return Gn})),n.d(t,"BlockPicker",(function(){return la})),n.d(t,"CirclePicker",(function(){return Ya})),n.d(t,"default",(function(){return za})),n.d(t,"ChromePicker",(function(){return za})),n.d(t,"CompactPicker",(function(){return Va})),n.d(t,"GithubPicker",(function(){return Ja})),n.d(t,"HuePicker",(function(){return Za})),n.d(t,"MaterialPicker",(function(){return Qa})),n.d(t,"PhotoshopPicker",(function(){return so})),n.d(t,"SketchPicker",(function(){return mo})),n.d(t,"SliderPicker",(function(){return bo})),n.d(t,"SwatchesPicker",(function(){return xo})),n.d(t,"TwitterPicker",(function(){return So})),n.d(t,"GooglePicker",(function(){return Po})),n.d(t,"CustomPicker",(function(){return Pn}));var r=n(0),a=n.n(r),o=n(3),i=n.n(o),s=function(e,t,n,r,a){var o=a.clientWidth,i=a.clientHeight,s="number"==typeof e.pageX?e.pageX:e.touches[0].pageX,u="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,l=s-(a.getBoundingClientRect().left+window.pageXOffset),c=u-(a.getBoundingClientRect().top+window.pageYOffset);if("vertical"===n){var d=void 0;if(d=c<0?0:c>i?1:Math.round(100*c/i)/100,t.a!==d)return{h:t.h,s:t.s,l:t.l,a:d,source:"rgb"}}else{var p=void 0;if(r!==(p=l<0?0:l>o?1:Math.round(100*l/o)/100))return{h:t.h,s:t.s,l:t.l,a:p,source:"rgb"}}return null},u={},l=function(e,t,n,r){var a=e+"-"+t+"-"+n+(r?"-server":"");if(u[a])return u[a];var o=function(e,t,n,r){if("undefined"==typeof document&&!r)return null;var a=r?new r:document.createElement("canvas");a.width=2*n,a.height=2*n;var o=a.getContext("2d");return o?(o.fillStyle=e,o.fillRect(0,0,a.width,a.height),o.fillStyle=t,o.fillRect(0,0,n,n),o.translate(n,n),o.fillRect(0,0,n,n),a.toDataURL()):null}(e,t,n,r);return u[a]=o,o},c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},d=function(e){var t=e.white,n=e.grey,o=e.size,s=e.renderers,u=e.borderRadius,d=e.boxShadow,p=e.children,f=i()({default:{grid:{borderRadius:u,boxShadow:d,absolute:"0px 0px 0px 0px",background:"url("+l(t,n,o,s.canvas)+") center left"}}});return Object(r.isValidElement)(p)?a.a.cloneElement(p,c({},p.props,{style:c({},p.props.style,f.grid)})):a.a.createElement("div",{style:f.grid})};d.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}};var p=d,f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var y=function(e){function t(){var e,n,r;m(this,t);for(var a=arguments.length,o=Array(a),i=0;i<a;i++)o[i]=arguments[i];return n=r=_(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(o))),r.handleChange=function(e){var t=s(e,r.props.hsl,r.props.direction,r.props.a,r.container);t&&"function"==typeof r.props.onChange&&r.props.onChange(t,e)},r.handleMouseDown=function(e){r.handleChange(e),window.addEventListener("mousemove",r.handleChange),window.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},r.unbindEventListeners=function(){window.removeEventListener("mousemove",r.handleChange),window.removeEventListener("mouseup",r.handleMouseUp)},_(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),h(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var e=this,t=this.props.rgb,n=i()({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+t.r+","+t.g+","+t.b+", 0) 0%,\n rgba("+t.r+","+t.g+","+t.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:100*t.a+"%"},slider:{width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",marginTop:"1px",transform:"translateX(-2px)"}},vertical:{gradient:{background:"linear-gradient(to bottom, rgba("+t.r+","+t.g+","+t.b+", 0) 0%,\n rgba("+t.r+","+t.g+","+t.b+", 1) 100%)"},pointer:{left:0,top:100*t.a+"%"}},overwrite:f({},this.props.style)},{vertical:"vertical"===this.props.direction,overwrite:!0});return a.a.createElement("div",{style:n.alpha},a.a.createElement("div",{style:n.checkboard},a.a.createElement(p,{renderers:this.props.renderers})),a.a.createElement("div",{style:n.gradient}),a.a.createElement("div",{style:n.container,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},a.a.createElement("div",{style:n.pointer},this.props.pointer?a.a.createElement(this.props.pointer,this.props):a.a.createElement("div",{style:n.slider}))))}}]),t}(r.PureComponent||r.Component),g=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var v=[38,40],b=1,w=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.handleBlur=function(){n.state.blurValue&&n.setState({value:n.state.blurValue,blurValue:null})},n.handleChange=function(e){n.setUpdatedValue(e.target.value,e)},n.handleKeyDown=function(e){var t,r=function(e){return Number(String(e).replace(/%/g,""))}(e.target.value);if(!isNaN(r)&&(t=e.keyCode,v.indexOf(t)>-1)){var a=n.getArrowOffset(),o=38===e.keyCode?r+a:r-a;n.setUpdatedValue(o,e)}},n.handleDrag=function(e){if(n.props.dragLabel){var t=Math.round(n.props.value+e.movementX);t>=0&&t<=n.props.dragMax&&n.props.onChange&&n.props.onChange(n.getValueObjectWithLabel(t),e)}},n.handleMouseDown=function(e){n.props.dragLabel&&(e.preventDefault(),n.handleDrag(e),window.addEventListener("mousemove",n.handleDrag),window.addEventListener("mouseup",n.handleMouseUp))},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleDrag),window.removeEventListener("mouseup",n.handleMouseUp)},n.state={value:String(e.value).toUpperCase(),blurValue:String(e.value).toUpperCase()},n.inputId="rc-editable-input-"+b++,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),g(t,[{key:"componentDidUpdate",value:function(e,t){this.props.value===this.state.value||e.value===this.props.value&&t.value===this.state.value||(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(e){return function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},this.props.label,e)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||1}},{key:"setUpdatedValue",value:function(e,t){var n=this.props.label?this.getValueObjectWithLabel(e):e;this.props.onChange&&this.props.onChange(n,t),this.setState({value:e})}},{key:"render",value:function(){var e=this,t=i()({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return a.a.createElement("div",{style:t.wrap},a.a.createElement("input",{id:this.inputId,style:t.input,ref:function(t){return e.input=t},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?a.a.createElement("label",{htmlFor:this.inputId,style:t.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}(r.PureComponent||r.Component),M=function(e,t,n,r){var a=r.clientWidth,o=r.clientHeight,i="number"==typeof e.pageX?e.pageX:e.touches[0].pageX,s="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,u=i-(r.getBoundingClientRect().left+window.pageXOffset),l=s-(r.getBoundingClientRect().top+window.pageYOffset);if("vertical"===t){var c=void 0;if(l<0)c=359;else if(l>o)c=0;else{c=360*(-100*l/o+100)/100}if(n.h!==c)return{h:c,s:n.s,l:n.l,a:n.a,source:"hsl"}}else{var d=void 0;if(u<0)d=0;else if(u>a)d=359;else{d=360*(100*u/a)/100}if(n.h!==d)return{h:d,s:n.s,l:n.l,a:n.a,source:"hsl"}}return null},L=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function T(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function k(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var x=function(e){function t(){var e,n,r;T(this,t);for(var a=arguments.length,o=Array(a),i=0;i<a;i++)o[i]=arguments[i];return n=r=k(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(o))),r.handleChange=function(e){var t=M(e,r.props.direction,r.props.hsl,r.container);t&&"function"==typeof r.props.onChange&&r.props.onChange(t,e)},r.handleMouseDown=function(e){r.handleChange(e),window.addEventListener("mousemove",r.handleChange),window.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},k(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),L(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"unbindEventListeners",value:function(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var e=this,t=this.props.direction,n=void 0===t?"horizontal":t,r=i()({default:{hue:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius,boxShadow:this.props.shadow},container:{padding:"0 2px",position:"relative",height:"100%",borderRadius:this.props.radius},pointer:{position:"absolute",left:100*this.props.hsl.h/360+"%"},slider:{marginTop:"1px",width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",transform:"translateX(-2px)"}},vertical:{pointer:{left:"0px",top:-100*this.props.hsl.h/360+100+"%"}}},{vertical:"vertical"===n});return a.a.createElement("div",{style:r.hue},a.a.createElement("div",{className:"hue-"+n,style:r.container,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},a.a.createElement("style",null,"\n .hue-horizontal {\n background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0\n 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n background: -webkit-linear-gradient(to right, #f00 0%, #ff0\n 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n }\n\n .hue-vertical {\n background: linear-gradient(to top, #f00 0%, #ff0 17%, #0f0 33%,\n #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n background: -webkit-linear-gradient(to top, #f00 0%, #ff0 17%,\n #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n }\n "),a.a.createElement("div",{style:r.pointer},this.props.pointer?a.a.createElement(this.props.pointer,this.props):a.a.createElement("div",{style:r.slider}))))}}]),t}(r.PureComponent||r.Component),E=n(2),S=n.n(E);var O=function(){this.__data__=[],this.size=0};var D=function(e,t){return e===t||e!=e&&t!=t};var Y=function(e,t){for(var n=e.length;n--;)if(D(e[n][0],t))return n;return-1},A=Array.prototype.splice;var C=function(e){var t=this.__data__,n=Y(t,e);return!(n<0)&&(n==t.length-1?t.pop():A.call(t,n,1),--this.size,!0)};var j=function(e){var t=this.__data__,n=Y(t,e);return n<0?void 0:t[n][1]};var P=function(e){return Y(this.__data__,e)>-1};var H=function(e,t){var n=this.__data__,r=Y(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function I(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}I.prototype.clear=O,I.prototype.delete=C,I.prototype.get=j,I.prototype.has=P,I.prototype.set=H;var N=I;var R=function(){this.__data__=new N,this.size=0};var F=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n};var z=function(e){return this.__data__.get(e)};var U=function(e){return this.__data__.has(e)},W=n(6),B=W.a.Symbol,V=Object.prototype,G=V.hasOwnProperty,q=V.toString,J=B?B.toStringTag:void 0;var K=function(e){var t=G.call(e,J),n=e[J];try{e[J]=void 0;var r=!0}catch(e){}var a=q.call(e);return r&&(t?e[J]=n:delete e[J]),a},$=Object.prototype.toString;var X=function(e){return $.call(e)},Z=B?B.toStringTag:void 0;var Q=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Z&&Z in Object(e)?K(e):X(e)};var ee=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};var te,ne=function(e){if(!ee(e))return!1;var t=Q(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},re=W.a["__core-js_shared__"],ae=(te=/[^.]+$/.exec(re&&re.keys&&re.keys.IE_PROTO||""))?"Symbol(src)_1."+te:"";var oe=function(e){return!!ae&&ae in e},ie=Function.prototype.toString;var se=function(e){if(null!=e){try{return ie.call(e)}catch(e){}try{return e+""}catch(e){}}return""},ue=/^\[object .+?Constructor\]$/,le=Function.prototype,ce=Object.prototype,de=le.toString,pe=ce.hasOwnProperty,fe=RegExp("^"+de.call(pe).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var he=function(e){return!(!ee(e)||oe(e))&&(ne(e)?fe:ue).test(se(e))};var me=function(e,t){return null==e?void 0:e[t]};var _e=function(e,t){var n=me(e,t);return he(n)?n:void 0},ye=_e(W.a,"Map"),ge=_e(Object,"create");var ve=function(){this.__data__=ge?ge(null):{},this.size=0};var be=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},we=Object.prototype.hasOwnProperty;var Me=function(e){var t=this.__data__;if(ge){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return we.call(t,e)?t[e]:void 0},Le=Object.prototype.hasOwnProperty;var Te=function(e){var t=this.__data__;return ge?void 0!==t[e]:Le.call(t,e)};var ke=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ge&&void 0===t?"__lodash_hash_undefined__":t,this};function xe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}xe.prototype.clear=ve,xe.prototype.delete=be,xe.prototype.get=Me,xe.prototype.has=Te,xe.prototype.set=ke;var Ee=xe;var Se=function(){this.size=0,this.__data__={hash:new Ee,map:new(ye||N),string:new Ee}};var Oe=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var De=function(e,t){var n=e.__data__;return Oe(t)?n["string"==typeof t?"string":"hash"]:n.map};var Ye=function(e){var t=De(this,e).delete(e);return this.size-=t?1:0,t};var Ae=function(e){return De(this,e).get(e)};var Ce=function(e){return De(this,e).has(e)};var je=function(e,t){var n=De(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function Pe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Pe.prototype.clear=Se,Pe.prototype.delete=Ye,Pe.prototype.get=Ae,Pe.prototype.has=Ce,Pe.prototype.set=je;var He=Pe;var Ie=function(e,t){var n=this.__data__;if(n instanceof N){var r=n.__data__;if(!ye||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new He(r)}return n.set(e,t),this.size=n.size,this};function Ne(e){var t=this.__data__=new N(e);this.size=t.size}Ne.prototype.clear=R,Ne.prototype.delete=F,Ne.prototype.get=z,Ne.prototype.has=U,Ne.prototype.set=Ie;var Re=Ne,Fe=function(){try{var e=_e(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();var ze=function(e,t,n){"__proto__"==t&&Fe?Fe(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n};var Ue=function(e,t,n){(void 0!==n&&!D(e[t],n)||void 0===n&&!(t in e))&&ze(e,t,n)};var We=function(e){return function(t,n,r){for(var a=-1,o=Object(t),i=r(t),s=i.length;s--;){var u=i[e?s:++a];if(!1===n(o[u],u,o))break}return t}}(),Be=n(275),Ve=W.a.Uint8Array;var Ge=function(e){var t=new e.constructor(e.byteLength);return new Ve(t).set(new Ve(e)),t};var qe=function(e,t){var n=t?Ge(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)};var Je=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t},Ke=Object.create,$e=function(){function e(){}return function(t){if(!ee(t))return{};if(Ke)return Ke(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();var Xe=function(e,t){return function(n){return e(t(n))}},Ze=Xe(Object.getPrototypeOf,Object),Qe=Object.prototype;var et=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Qe)};var tt=function(e){return"function"!=typeof e.constructor||et(e)?{}:$e(Ze(e))};var nt=function(e){return null!=e&&"object"==typeof e};var rt=function(e){return nt(e)&&"[object Arguments]"==Q(e)},at=Object.prototype,ot=at.hasOwnProperty,it=at.propertyIsEnumerable,st=rt(function(){return arguments}())?rt:function(e){return nt(e)&&ot.call(e,"callee")&&!it.call(e,"callee")},ut=Array.isArray;var lt=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var ct=function(e){return null!=e&&lt(e.length)&&!ne(e)};var dt=function(e){return nt(e)&&ct(e)},pt=n(20),ft=Function.prototype,ht=Object.prototype,mt=ft.toString,_t=ht.hasOwnProperty,yt=mt.call(Object);var gt=function(e){if(!nt(e)||"[object Object]"!=Q(e))return!1;var t=Ze(e);if(null===t)return!0;var n=_t.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&mt.call(n)==yt},vt={};vt["[object Float32Array]"]=vt["[object Float64Array]"]=vt["[object Int8Array]"]=vt["[object Int16Array]"]=vt["[object Int32Array]"]=vt["[object Uint8Array]"]=vt["[object Uint8ClampedArray]"]=vt["[object Uint16Array]"]=vt["[object Uint32Array]"]=!0,vt["[object Arguments]"]=vt["[object Array]"]=vt["[object ArrayBuffer]"]=vt["[object Boolean]"]=vt["[object DataView]"]=vt["[object Date]"]=vt["[object Error]"]=vt["[object Function]"]=vt["[object Map]"]=vt["[object Number]"]=vt["[object Object]"]=vt["[object RegExp]"]=vt["[object Set]"]=vt["[object String]"]=vt["[object WeakMap]"]=!1;var bt=function(e){return nt(e)&&lt(e.length)&&!!vt[Q(e)]};var wt=function(e){return function(t){return e(t)}},Mt=n(89),Lt=Mt.a&&Mt.a.isTypedArray,Tt=Lt?wt(Lt):bt;var kt=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]},xt=Object.prototype.hasOwnProperty;var Et=function(e,t,n){var r=e[t];xt.call(e,t)&&D(r,n)&&(void 0!==n||t in e)||ze(e,t,n)};var St=function(e,t,n,r){var a=!n;n||(n={});for(var o=-1,i=t.length;++o<i;){var s=t[o],u=r?r(n[s],e[s],s,n,e):void 0;void 0===u&&(u=e[s]),a?ze(n,s,u):Et(n,s,u)}return n};var Ot=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r},Dt=/^(?:0|[1-9]\d*)$/;var Yt=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&Dt.test(e))&&e>-1&&e%1==0&&e<t},At=Object.prototype.hasOwnProperty;var Ct=function(e,t){var n=ut(e),r=!n&&st(e),a=!n&&!r&&Object(pt.a)(e),o=!n&&!r&&!a&&Tt(e),i=n||r||a||o,s=i?Ot(e.length,String):[],u=s.length;for(var l in e)!t&&!At.call(e,l)||i&&("length"==l||a&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Yt(l,u))||s.push(l);return s};var jt=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t},Pt=Object.prototype.hasOwnProperty;var Ht=function(e){if(!ee(e))return jt(e);var t=et(e),n=[];for(var r in e)("constructor"!=r||!t&&Pt.call(e,r))&&n.push(r);return n};var It=function(e){return ct(e)?Ct(e,!0):Ht(e)};var Nt=function(e){return St(e,It(e))};var Rt=function(e,t,n,r,a,o,i){var s=kt(e,n),u=kt(t,n),l=i.get(u);if(l)Ue(e,n,l);else{var c=o?o(s,u,n+"",e,t,i):void 0,d=void 0===c;if(d){var p=ut(u),f=!p&&Object(pt.a)(u),h=!p&&!f&&Tt(u);c=u,p||f||h?ut(s)?c=s:dt(s)?c=Je(s):f?(d=!1,c=Object(Be.a)(u,!0)):h?(d=!1,c=qe(u,!0)):c=[]:gt(u)||st(u)?(c=s,st(s)?c=Nt(s):ee(s)&&!ne(s)||(c=tt(u))):d=!1}d&&(i.set(u,c),a(c,u,r,o,i),i.delete(u)),Ue(e,n,c)}};var Ft=function e(t,n,r,a,o){t!==n&&We(n,(function(i,s){if(o||(o=new Re),ee(i))Rt(t,n,s,r,e,a,o);else{var u=a?a(kt(t,s),i,s+"",t,n,o):void 0;void 0===u&&(u=i),Ue(t,s,u)}}),It)};var zt=function(e){return e};var Ut=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)},Wt=Math.max;var Bt=function(e,t,n){return t=Wt(void 0===t?e.length-1:t,0),function(){for(var r=arguments,a=-1,o=Wt(r.length-t,0),i=Array(o);++a<o;)i[a]=r[t+a];a=-1;for(var s=Array(t+1);++a<t;)s[a]=r[a];return s[t]=n(i),Ut(e,this,s)}};var Vt=function(e){return function(){return e}},Gt=Fe?function(e,t){return Fe(e,"toString",{configurable:!0,enumerable:!1,value:Vt(t),writable:!0})}:zt,qt=Date.now;var Jt=function(e){var t=0,n=0;return function(){var r=qt(),a=16-(r-n);if(n=r,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(Gt);var Kt=function(e,t){return Jt(Bt(e,t,zt),e+"")};var $t=function(e,t,n){if(!ee(n))return!1;var r=typeof t;return!!("number"==r?ct(n)&&Yt(t,n.length):"string"==r&&t in n)&&D(n[t],e)};var Xt=function(e){return Kt((function(t,n){var r=-1,a=n.length,o=a>1?n[a-1]:void 0,i=a>2?n[2]:void 0;for(o=e.length>3&&"function"==typeof o?(a--,o):void 0,i&&$t(n[0],n[1],i)&&(o=a<3?void 0:o,a=1),t=Object(t);++r<a;){var s=n[r];s&&e(t,s,r,o)}return t}))}((function(e,t,n){Ft(e,t,n)})),Zt=function(e){var t=e.zDepth,n=e.radius,r=e.background,o=e.children,s=e.styles,u=void 0===s?{}:s,l=i()(Xt({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+t+"px "+4*t+"px rgba(0,0,0,.24)",borderRadius:n,background:r}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},u),{"zDepth-1":1===t});return a.a.createElement("div",{style:l.wrap},a.a.createElement("div",{style:l.bg}),a.a.createElement("div",{style:l.content},o))};Zt.propTypes={background:S.a.string,zDepth:S.a.oneOf([0,1,2,3,4,5]),radius:S.a.number,styles:S.a.object},Zt.defaultProps={background:"#fff",zDepth:1,radius:2,styles:{}};var Qt=Zt,en=function(){return W.a.Date.now()},tn=/\s/;var nn=function(e){for(var t=e.length;t--&&tn.test(e.charAt(t)););return t},rn=/^\s+/;var an=function(e){return e?e.slice(0,nn(e)+1).replace(rn,""):e};var on=function(e){return"symbol"==typeof e||nt(e)&&"[object Symbol]"==Q(e)},sn=/^[-+]0x[0-9a-f]+$/i,un=/^0b[01]+$/i,ln=/^0o[0-7]+$/i,cn=parseInt;var dn=function(e){if("number"==typeof e)return e;if(on(e))return NaN;if(ee(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ee(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=an(e);var n=un.test(e);return n||ln.test(e)?cn(e.slice(2),n?2:8):sn.test(e)?NaN:+e},pn=Math.max,fn=Math.min;var hn=function(e,t,n){var r,a,o,i,s,u,l=0,c=!1,d=!1,p=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function f(t){var n=r,o=a;return r=a=void 0,l=t,i=e.apply(o,n)}function h(e){return l=e,s=setTimeout(_,t),c?f(e):i}function m(e){var n=e-u;return void 0===u||n>=t||n<0||d&&e-l>=o}function _(){var e=en();if(m(e))return y(e);s=setTimeout(_,function(e){var n=t-(e-u);return d?fn(n,o-(e-l)):n}(e))}function y(e){return s=void 0,p&&r?f(e):(r=a=void 0,i)}function g(){var e=en(),n=m(e);if(r=arguments,a=this,u=e,n){if(void 0===s)return h(u);if(d)return clearTimeout(s),s=setTimeout(_,t),f(u)}return void 0===s&&(s=setTimeout(_,t)),i}return t=dn(t)||0,ee(n)&&(c=!!n.leading,o=(d="maxWait"in n)?pn(dn(n.maxWait)||0,t):o,p="trailing"in n?!!n.trailing:p),g.cancel=function(){void 0!==s&&clearTimeout(s),l=0,r=u=a=s=void 0},g.flush=function(){return void 0===s?i:y(en())},g};var mn=function(e,t,n){var r=!0,a=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return ee(n)&&(r="leading"in n?!!n.leading:r,a="trailing"in n?!!n.trailing:a),hn(e,t,{leading:r,maxWait:t,trailing:a})},_n=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var yn=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleChange=function(e){"function"==typeof n.props.onChange&&n.throttle(n.props.onChange,function(e,t,n){var r=n.getBoundingClientRect(),a=r.width,o=r.height,i="number"==typeof e.pageX?e.pageX:e.touches[0].pageX,s="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,u=i-(n.getBoundingClientRect().left+window.pageXOffset),l=s-(n.getBoundingClientRect().top+window.pageYOffset);u<0?u=0:u>a&&(u=a),l<0?l=0:l>o&&(l=o);var c=u/a,d=1-l/o;return{h:t.h,s:c,v:d,a:t.a,source:"hsv"}}(e,n.props.hsl,n.container),e)},n.handleMouseDown=function(e){n.handleChange(e);var t=n.getContainerRenderWindow();t.addEventListener("mousemove",n.handleChange),t.addEventListener("mouseup",n.handleMouseUp)},n.handleMouseUp=function(){n.unbindEventListeners()},n.throttle=mn((function(e,t,n){e(t,n)}),50),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),_n(t,[{key:"componentWillUnmount",value:function(){this.throttle.cancel(),this.unbindEventListeners()}},{key:"getContainerRenderWindow",value:function(){for(var e=this.container,t=window;!t.document.contains(e)&&t.parent!==t;)t=t.parent;return t}},{key:"unbindEventListeners",value:function(){var e=this.getContainerRenderWindow();e.removeEventListener("mousemove",this.handleChange),e.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var e=this,t=this.props.style||{},n=t.color,r=t.white,o=t.black,s=t.pointer,u=t.circle,l=i()({default:{color:{absolute:"0px 0px 0px 0px",background:"hsl("+this.props.hsl.h+",100%, 50%)",borderRadius:this.props.radius},white:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},black:{absolute:"0px 0px 0px 0px",boxShadow:this.props.shadow,borderRadius:this.props.radius},pointer:{position:"absolute",top:-100*this.props.hsv.v+100+"%",left:100*this.props.hsv.s+"%",cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:"0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),\n 0 0 1px 2px rgba(0,0,0,.4)",borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}},custom:{color:n,white:r,black:o,pointer:s,circle:u}},{custom:!!this.props.style});return a.a.createElement("div",{style:l.color,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},a.a.createElement("style",null,"\n .saturation-white {\n background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));\n background: linear-gradient(to right, #fff, rgba(255,255,255,0));\n }\n .saturation-black {\n background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));\n background: linear-gradient(to top, #000, rgba(0,0,0,0));\n }\n "),a.a.createElement("div",{style:l.white,className:"saturation-white"},a.a.createElement("div",{style:l.black,className:"saturation-black"}),a.a.createElement("div",{style:l.pointer},this.props.pointer?a.a.createElement(this.props.pointer,this.props):a.a.createElement("div",{style:l.circle}))))}}]),t}(r.PureComponent||r.Component);var gn=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e},vn=Xe(Object.keys,Object),bn=Object.prototype.hasOwnProperty;var wn=function(e){if(!et(e))return vn(e);var t=[];for(var n in Object(e))bn.call(e,n)&&"constructor"!=n&&t.push(n);return t};var Mn=function(e){return ct(e)?Ct(e):wn(e)};var Ln=function(e,t){return function(n,r){if(null==n)return n;if(!ct(n))return e(n,r);for(var a=n.length,o=t?a:-1,i=Object(n);(t?o--:++o<a)&&!1!==r(i[o],o,i););return n}}((function(e,t){return e&&We(e,t,Mn)}));var Tn=function(e){return"function"==typeof e?e:zt};var kn=function(e,t){return(ut(e)?gn:Ln)(e,Tn(t))},xn=n(36),En=n.n(xn),Sn=function(e){var t=0,n=0;return kn(["r","g","b","a","h","s","l","v"],(function(r){if(e[r]&&(t+=1,isNaN(e[r])||(n+=1),"s"===r||"l"===r)){/^\d+%$/.test(e[r])&&(n+=1)}})),t===n&&e},On=function(e,t){var n=e.hex?En()(e.hex):En()(e),r=n.toHsl(),a=n.toHsv(),o=n.toRgb(),i=n.toHex();return 0===r.s&&(r.h=t||0,a.h=t||0),{hsl:r,hex:"000000"===i&&0===o.a?"transparent":"#"+i,rgb:o,hsv:a,oldHue:e.h||t||r.h,source:e.source}},Dn=function(e){if("transparent"===e)return!0;var t="#"===String(e).charAt(0)?1:0;return e.length!==4+t&&e.length<7+t&&En()(e).isValid()},Yn=function(e){if(!e)return"#fff";var t=On(e);return"transparent"===t.hex?"rgba(0,0,0,0.4)":(299*t.rgb.r+587*t.rgb.g+114*t.rgb.b)/1e3>=128?"#000":"#fff"},An=function(e,t){var n=e.replace("°","");return En()(t+" ("+n+")")._ok},Cn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jn=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var Pn=function(e){var t=function(t){function n(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return t.handleChange=function(e,n){if(Sn(e)){var r=On(e,e.h||t.state.oldHue);t.setState(r),t.props.onChangeComplete&&t.debounce(t.props.onChangeComplete,r,n),t.props.onChange&&t.props.onChange(r,n)}},t.handleSwatchHover=function(e,n){if(Sn(e)){var r=On(e,e.h||t.state.oldHue);t.props.onSwatchHover&&t.props.onSwatchHover(r,n)}},t.state=Cn({},On(e.color,0)),t.debounce=hn((function(e,t,n){e(t,n)}),100),t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,t),jn(n,[{key:"render",value:function(){var t={};return this.props.onSwatchHover&&(t.onSwatchHover=this.handleSwatchHover),a.a.createElement(e,Cn({},this.props,this.state,{onChange:this.handleChange},t))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return Cn({},On(e.color,t.oldHue))}}]),n}(r.PureComponent||r.Component);return t.propTypes=Cn({},e.propTypes),t.defaultProps=Cn({},e.defaultProps,{color:{h:250,s:.5,l:.2,a:1}}),t},Hn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},In=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function Nn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Rn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function Fn(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var zn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Un=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var e,t,n;Nn(this,r);for(var a=arguments.length,o=Array(a),i=0;i<a;i++)o[i]=arguments[i];return t=n=Rn(this,(e=r.__proto__||Object.getPrototypeOf(r)).call.apply(e,[this].concat(o))),n.state={focus:!1},n.handleFocus=function(){return n.setState({focus:!0})},n.handleBlur=function(){return n.setState({focus:!1})},Rn(n,t)}return Fn(r,n),In(r,[{key:"render",value:function(){return a.a.createElement(t,{onFocus:this.handleFocus,onBlur:this.handleBlur},a.a.createElement(e,Hn({},this.props,this.state)))}}]),r}(a.a.Component)}((function(e){var t=e.color,n=e.style,r=e.onClick,o=void 0===r?function(){}:r,s=e.onHover,u=e.title,l=void 0===u?t:u,c=e.children,d=e.focus,f=e.focusStyle,h=void 0===f?{}:f,m="transparent"===t,_=i()({default:{swatch:zn({background:t,height:"100%",width:"100%",cursor:"pointer",position:"relative",outline:"none"},n,d?h:{})}}),y={};return s&&(y.onMouseOver=function(e){return s(t,e)}),a.a.createElement("div",zn({style:_.swatch,onClick:function(e){return o(t,e)},title:l,tabIndex:0,onKeyDown:function(e){return 13===e.keyCode&&o(t,e)}},y),c,m&&a.a.createElement(p,{borderRadius:_.swatch.borderRadius,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.1)"}))})),Wn=function(e){var t=e.direction,n=i()({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:"vertical"===t});return a.a.createElement("div",{style:n.picker})},Bn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vn=function(e){var t=e.rgb,n=e.hsl,r=e.width,o=e.height,s=e.onChange,u=e.direction,l=e.style,c=e.renderers,d=e.pointer,p=e.className,f=void 0===p?"":p,h=i()({default:{picker:{position:"relative",width:r,height:o},alpha:{radius:"2px",style:l}}});return a.a.createElement("div",{style:h.picker,className:"alpha-picker "+f},a.a.createElement(y,Bn({},h.alpha,{rgb:t,hsl:n,pointer:d,renderers:c,onChange:s,direction:u})))};Vn.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:Wn};var Gn=Pn(Vn);var qn=function(e,t){for(var n=-1,r=null==e?0:e.length,a=Array(r);++n<r;)a[n]=t(e[n],n,e);return a};var Jn=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};var Kn=function(e){return this.__data__.has(e)};function $n(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new He;++t<n;)this.add(e[t])}$n.prototype.add=$n.prototype.push=Jn,$n.prototype.has=Kn;var Xn=$n;var Zn=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1};var Qn=function(e,t){return e.has(t)};var er=function(e,t,n,r,a,o){var i=1&n,s=e.length,u=t.length;if(s!=u&&!(i&&u>s))return!1;var l=o.get(e),c=o.get(t);if(l&&c)return l==t&&c==e;var d=-1,p=!0,f=2&n?new Xn:void 0;for(o.set(e,t),o.set(t,e);++d<s;){var h=e[d],m=t[d];if(r)var _=i?r(m,h,d,t,e,o):r(h,m,d,e,t,o);if(void 0!==_){if(_)continue;p=!1;break}if(f){if(!Zn(t,(function(e,t){if(!Qn(f,t)&&(h===e||a(h,e,n,r,o)))return f.push(t)}))){p=!1;break}}else if(h!==m&&!a(h,m,n,r,o)){p=!1;break}}return o.delete(e),o.delete(t),p};var tr=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n};var nr=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},rr=B?B.prototype:void 0,ar=rr?rr.valueOf:void 0;var or=function(e,t,n,r,a,o,i){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!o(new Ve(e),new Ve(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return D(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=tr;case"[object Set]":var u=1&r;if(s||(s=nr),e.size!=t.size&&!u)return!1;var l=i.get(e);if(l)return l==t;r|=2,i.set(e,t);var c=er(s(e),s(t),r,a,o,i);return i.delete(e),c;case"[object Symbol]":if(ar)return ar.call(e)==ar.call(t)}return!1};var ir=function(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e};var sr=function(e,t,n){var r=t(e);return ut(e)?r:ir(r,n(e))};var ur=function(e,t){for(var n=-1,r=null==e?0:e.length,a=0,o=[];++n<r;){var i=e[n];t(i,n,e)&&(o[a++]=i)}return o};var lr=function(){return[]},cr=Object.prototype.propertyIsEnumerable,dr=Object.getOwnPropertySymbols,pr=dr?function(e){return null==e?[]:(e=Object(e),ur(dr(e),(function(t){return cr.call(e,t)})))}:lr;var fr=function(e){return sr(e,Mn,pr)},hr=Object.prototype.hasOwnProperty;var mr=function(e,t,n,r,a,o){var i=1&n,s=fr(e),u=s.length;if(u!=fr(t).length&&!i)return!1;for(var l=u;l--;){var c=s[l];if(!(i?c in t:hr.call(t,c)))return!1}var d=o.get(e),p=o.get(t);if(d&&p)return d==t&&p==e;var f=!0;o.set(e,t),o.set(t,e);for(var h=i;++l<u;){var m=e[c=s[l]],_=t[c];if(r)var y=i?r(_,m,c,t,e,o):r(m,_,c,e,t,o);if(!(void 0===y?m===_||a(m,_,n,r,o):y)){f=!1;break}h||(h="constructor"==c)}if(f&&!h){var g=e.constructor,v=t.constructor;g==v||!("constructor"in e)||!("constructor"in t)||"function"==typeof g&&g instanceof g&&"function"==typeof v&&v instanceof v||(f=!1)}return o.delete(e),o.delete(t),f},_r=_e(W.a,"DataView"),yr=_e(W.a,"Promise"),gr=_e(W.a,"Set"),vr=_e(W.a,"WeakMap"),br=se(_r),wr=se(ye),Mr=se(yr),Lr=se(gr),Tr=se(vr),kr=Q;(_r&&"[object DataView]"!=kr(new _r(new ArrayBuffer(1)))||ye&&"[object Map]"!=kr(new ye)||yr&&"[object Promise]"!=kr(yr.resolve())||gr&&"[object Set]"!=kr(new gr)||vr&&"[object WeakMap]"!=kr(new vr))&&(kr=function(e){var t=Q(e),n="[object Object]"==t?e.constructor:void 0,r=n?se(n):"";if(r)switch(r){case br:return"[object DataView]";case wr:return"[object Map]";case Mr:return"[object Promise]";case Lr:return"[object Set]";case Tr:return"[object WeakMap]"}return t});var xr=kr,Er=Object.prototype.hasOwnProperty;var Sr=function(e,t,n,r,a,o){var i=ut(e),s=ut(t),u=i?"[object Array]":xr(e),l=s?"[object Array]":xr(t),c="[object Object]"==(u="[object Arguments]"==u?"[object Object]":u),d="[object Object]"==(l="[object Arguments]"==l?"[object Object]":l),p=u==l;if(p&&Object(pt.a)(e)){if(!Object(pt.a)(t))return!1;i=!0,c=!1}if(p&&!c)return o||(o=new Re),i||Tt(e)?er(e,t,n,r,a,o):or(e,t,u,n,r,a,o);if(!(1&n)){var f=c&&Er.call(e,"__wrapped__"),h=d&&Er.call(t,"__wrapped__");if(f||h){var m=f?e.value():e,_=h?t.value():t;return o||(o=new Re),a(m,_,n,r,o)}}return!!p&&(o||(o=new Re),mr(e,t,n,r,a,o))};var Or=function e(t,n,r,a,o){return t===n||(null==t||null==n||!nt(t)&&!nt(n)?t!=t&&n!=n:Sr(t,n,r,a,e,o))};var Dr=function(e,t,n,r){var a=n.length,o=a,i=!r;if(null==e)return!o;for(e=Object(e);a--;){var s=n[a];if(i&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++a<o;){var u=(s=n[a])[0],l=e[u],c=s[1];if(i&&s[2]){if(void 0===l&&!(u in e))return!1}else{var d=new Re;if(r)var p=r(l,c,u,e,t,d);if(!(void 0===p?Or(c,l,3,r,d):p))return!1}}return!0};var Yr=function(e){return e==e&&!ee(e)};var Ar=function(e){for(var t=Mn(e),n=t.length;n--;){var r=t[n],a=e[r];t[n]=[r,a,Yr(a)]}return t};var Cr=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}};var jr=function(e){var t=Ar(e);return 1==t.length&&t[0][2]?Cr(t[0][0],t[0][1]):function(n){return n===e||Dr(n,e,t)}},Pr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Hr=/^\w*$/;var Ir=function(e,t){if(ut(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!on(e))||(Hr.test(e)||!Pr.test(e)||null!=t&&e in Object(t))};function Nr(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],o=n.cache;if(o.has(a))return o.get(a);var i=e.apply(this,r);return n.cache=o.set(a,i)||o,i};return n.cache=new(Nr.Cache||He),n}Nr.Cache=He;var Rr=Nr;var Fr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,zr=/\\(\\)?/g,Ur=function(e){var t=Rr(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Fr,(function(e,n,r,a){t.push(r?a.replace(zr,"$1"):n||e)})),t})),Wr=B?B.prototype:void 0,Br=Wr?Wr.toString:void 0;var Vr=function e(t){if("string"==typeof t)return t;if(ut(t))return qn(t,e)+"";if(on(t))return Br?Br.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n};var Gr=function(e){return null==e?"":Vr(e)};var qr=function(e,t){return ut(e)?e:Ir(e,t)?[e]:Ur(Gr(e))};var Jr=function(e){if("string"==typeof e||on(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t};var Kr=function(e,t){for(var n=0,r=(t=qr(t,e)).length;null!=e&&n<r;)e=e[Jr(t[n++])];return n&&n==r?e:void 0};var $r=function(e,t,n){var r=null==e?void 0:Kr(e,t);return void 0===r?n:r};var Xr=function(e,t){return null!=e&&t in Object(e)};var Zr=function(e,t,n){for(var r=-1,a=(t=qr(t,e)).length,o=!1;++r<a;){var i=Jr(t[r]);if(!(o=null!=e&&n(e,i)))break;e=e[i]}return o||++r!=a?o:!!(a=null==e?0:e.length)&&lt(a)&&Yt(i,a)&&(ut(e)||st(e))};var Qr=function(e,t){return null!=e&&Zr(e,t,Xr)};var ea=function(e,t){return Ir(e)&&Yr(t)?Cr(Jr(e),t):function(n){var r=$r(n,e);return void 0===r&&r===t?Qr(n,e):Or(t,r,3)}};var ta=function(e){return function(t){return null==t?void 0:t[e]}};var na=function(e){return function(t){return Kr(t,e)}};var ra=function(e){return Ir(e)?ta(Jr(e)):na(e)};var aa=function(e){return"function"==typeof e?e:null==e?zt:"object"==typeof e?ut(e)?ea(e[0],e[1]):jr(e):ra(e)};var oa=function(e,t){var n=-1,r=ct(e)?Array(e.length):[];return Ln(e,(function(e,a,o){r[++n]=t(e,a,o)})),r};var ia=function(e,t){return(ut(e)?qn:oa)(e,aa(t,3))},sa=function(e){var t=e.colors,n=e.onClick,r=e.onSwatchHover,o=i()({default:{swatches:{marginRight:"-10px"},swatch:{width:"22px",height:"22px",float:"left",marginRight:"10px",marginBottom:"10px",borderRadius:"4px"},clear:{clear:"both"}}});return a.a.createElement("div",{style:o.swatches},ia(t,(function(e){return a.a.createElement(Un,{key:e,color:e,style:o.swatch,onClick:n,onHover:r,focusStyle:{boxShadow:"0 0 4px "+e}})})),a.a.createElement("div",{style:o.clear}))},ua=function(e){var t=e.onChange,n=e.onSwatchHover,r=e.hex,o=e.colors,s=e.width,u=e.triangle,l=e.styles,c=void 0===l?{}:l,d=e.className,f=void 0===d?"":d,h="transparent"===r,m=function(e,n){Dn(e)&&t({hex:e,source:"hex"},n)},_=i()(Xt({default:{card:{width:s,background:"#fff",boxShadow:"0 1px rgba(0,0,0,.1)",borderRadius:"6px",position:"relative"},head:{height:"110px",background:r,borderRadius:"6px 6px 0 0",display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},body:{padding:"10px"},label:{fontSize:"18px",color:Yn(r),position:"relative"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 10px 10px 10px",borderColor:"transparent transparent "+r+" transparent",position:"absolute",top:"-10px",left:"50%",marginLeft:"-10px"},input:{width:"100%",fontSize:"12px",color:"#666",border:"0px",outline:"none",height:"22px",boxShadow:"inset 0 0 0 1px #ddd",borderRadius:"4px",padding:"0 7px",boxSizing:"border-box"}},"hide-triangle":{triangle:{display:"none"}}},c),{"hide-triangle":"hide"===u});return a.a.createElement("div",{style:_.card,className:"block-picker "+f},a.a.createElement("div",{style:_.triangle}),a.a.createElement("div",{style:_.head},h&&a.a.createElement(p,{borderRadius:"6px 6px 0 0"}),a.a.createElement("div",{style:_.label},r)),a.a.createElement("div",{style:_.body},a.a.createElement(sa,{colors:o,onClick:m,onSwatchHover:n}),a.a.createElement(w,{style:{input:_.input},value:r,onChange:m})))};ua.propTypes={width:S.a.oneOfType([S.a.string,S.a.number]),colors:S.a.arrayOf(S.a.string),triangle:S.a.oneOf(["top","hide"]),styles:S.a.object},ua.defaultProps={width:170,colors:["#D9E3F0","#F47373","#697689","#37D67A","#2CCCE4","#555555","#dce775","#ff8a65","#ba68c8"],triangle:"top",styles:{}};var la=Pn(ua),ca={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",a100:"#ff8a80",a200:"#ff5252",a400:"#ff1744",a700:"#d50000"},da={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",a100:"#ff80ab",a200:"#ff4081",a400:"#f50057",a700:"#c51162"},pa={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",a100:"#ea80fc",a200:"#e040fb",a400:"#d500f9",a700:"#aa00ff"},fa={50:"#ede7f6",100:"#d1c4e9",200:"#b39ddb",300:"#9575cd",400:"#7e57c2",500:"#673ab7",600:"#5e35b1",700:"#512da8",800:"#4527a0",900:"#311b92",a100:"#b388ff",a200:"#7c4dff",a400:"#651fff",a700:"#6200ea"},ha={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",a100:"#8c9eff",a200:"#536dfe",a400:"#3d5afe",a700:"#304ffe"},ma={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",a100:"#82b1ff",a200:"#448aff",a400:"#2979ff",a700:"#2962ff"},_a={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",a100:"#80d8ff",a200:"#40c4ff",a400:"#00b0ff",a700:"#0091ea"},ya={50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064",a100:"#84ffff",a200:"#18ffff",a400:"#00e5ff",a700:"#00b8d4"},ga={50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",a100:"#a7ffeb",a200:"#64ffda",a400:"#1de9b6",a700:"#00bfa5"},va={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",a100:"#b9f6ca",a200:"#69f0ae",a400:"#00e676",a700:"#00c853"},ba={50:"#f1f8e9",100:"#dcedc8",200:"#c5e1a5",300:"#aed581",400:"#9ccc65",500:"#8bc34a",600:"#7cb342",700:"#689f38",800:"#558b2f",900:"#33691e",a100:"#ccff90",a200:"#b2ff59",a400:"#76ff03",a700:"#64dd17"},wa={50:"#f9fbe7",100:"#f0f4c3",200:"#e6ee9c",300:"#dce775",400:"#d4e157",500:"#cddc39",600:"#c0ca33",700:"#afb42b",800:"#9e9d24",900:"#827717",a100:"#f4ff81",a200:"#eeff41",a400:"#c6ff00",a700:"#aeea00"},Ma={50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",a100:"#ffff8d",a200:"#ffff00",a400:"#ffea00",a700:"#ffd600"},La={50:"#fff8e1",100:"#ffecb3",200:"#ffe082",300:"#ffd54f",400:"#ffca28",500:"#ffc107",600:"#ffb300",700:"#ffa000",800:"#ff8f00",900:"#ff6f00",a100:"#ffe57f",a200:"#ffd740",a400:"#ffc400",a700:"#ffab00"},Ta={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",a100:"#ffd180",a200:"#ffab40",a400:"#ff9100",a700:"#ff6d00"},ka={50:"#fbe9e7",100:"#ffccbc",200:"#ffab91",300:"#ff8a65",400:"#ff7043",500:"#ff5722",600:"#f4511e",700:"#e64a19",800:"#d84315",900:"#bf360c",a100:"#ff9e80",a200:"#ff6e40",a400:"#ff3d00",a700:"#dd2c00"},xa={50:"#efebe9",100:"#d7ccc8",200:"#bcaaa4",300:"#a1887f",400:"#8d6e63",500:"#795548",600:"#6d4c41",700:"#5d4037",800:"#4e342e",900:"#3e2723"},Ea={50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238"},Sa=function(e){var t=e.color,n=e.onClick,r=e.onSwatchHover,o=e.hover,s=e.active,u=e.circleSize,l=e.circleSpacing,c=i()({default:{swatch:{width:u,height:u,marginRight:l,marginBottom:l,transform:"scale(1)",transition:"100ms transform ease"},Swatch:{borderRadius:"50%",background:"transparent",boxShadow:"inset 0 0 0 "+(u/2+1)+"px "+t,transition:"100ms box-shadow ease"}},hover:{swatch:{transform:"scale(1.2)"}},active:{Swatch:{boxShadow:"inset 0 0 0 3px "+t}}},{hover:o,active:s});return a.a.createElement("div",{style:c.swatch},a.a.createElement(Un,{style:c.Swatch,color:t,onClick:n,onHover:r,focusStyle:{boxShadow:c.Swatch.boxShadow+", 0 0 5px "+t}}))};Sa.defaultProps={circleSize:28,circleSpacing:14};var Oa=Object(o.handleHover)(Sa),Da=function(e){var t=e.width,n=e.onChange,r=e.onSwatchHover,o=e.colors,s=e.hex,u=e.circleSize,l=e.styles,c=void 0===l?{}:l,d=e.circleSpacing,p=e.className,f=void 0===p?"":p,h=i()(Xt({default:{card:{width:t,display:"flex",flexWrap:"wrap",marginRight:-d,marginBottom:-d}}},c)),m=function(e,t){return n({hex:e,source:"hex"},t)};return a.a.createElement("div",{style:h.card,className:"circle-picker "+f},ia(o,(function(e){return a.a.createElement(Oa,{key:e,color:e,onClick:m,onSwatchHover:r,active:s===e.toLowerCase(),circleSize:u,circleSpacing:d})})))};Da.propTypes={width:S.a.oneOfType([S.a.string,S.a.number]),circleSize:S.a.number,circleSpacing:S.a.number,styles:S.a.object},Da.defaultProps={width:252,circleSize:28,circleSpacing:14,colors:[ca[500],da[500],pa[500],fa[500],ha[500],ma[500],_a[500],ya[500],ga[500],va[500],ba[500],wa[500],Ma[500],La[500],Ta[500],ka[500],xa[500],Ea[500]],styles:{}};var Ya=Pn(Da);var Aa=function(e){return void 0===e},Ca=n(276),ja=n.n(Ca),Pa=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var Ha=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.toggleViews=function(){"hex"===n.state.view?n.setState({view:"rgb"}):"rgb"===n.state.view?n.setState({view:"hsl"}):"hsl"===n.state.view&&(1===n.props.hsl.a?n.setState({view:"hex"}):n.setState({view:"rgb"}))},n.handleChange=function(e,t){e.hex?Dn(e.hex)&&n.props.onChange({hex:e.hex,source:"hex"},t):e.r||e.g||e.b?n.props.onChange({r:e.r||n.props.rgb.r,g:e.g||n.props.rgb.g,b:e.b||n.props.rgb.b,source:"rgb"},t):e.a?(e.a<0?e.a=0:e.a>1&&(e.a=1),n.props.onChange({h:n.props.hsl.h,s:n.props.hsl.s,l:n.props.hsl.l,a:Math.round(100*e.a)/100,source:"rgb"},t)):(e.h||e.s||e.l)&&("string"==typeof e.s&&e.s.includes("%")&&(e.s=e.s.replace("%","")),"string"==typeof e.l&&e.l.includes("%")&&(e.l=e.l.replace("%","")),1==e.s?e.s=.01:1==e.l&&(e.l=.01),n.props.onChange({h:e.h||n.props.hsl.h,s:Number(Aa(e.s)?n.props.hsl.s:e.s),l:Number(Aa(e.l)?n.props.hsl.l:e.l),source:"hsl"},t))},n.showHighlight=function(e){e.currentTarget.style.background="#eee"},n.hideHighlight=function(e){e.currentTarget.style.background="transparent"},1!==e.hsl.a&&"hex"===e.view?n.state={view:"rgb"}:n.state={view:e.view},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),Pa(t,[{key:"render",value:function(){var e=this,t=i()({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),n=void 0;return"hex"===this.state.view?n=a.a.createElement("div",{style:t.fields,className:"flexbox-fix"},a.a.createElement("div",{style:t.field},a.a.createElement(w,{style:{input:t.input,label:t.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):"rgb"===this.state.view?n=a.a.createElement("div",{style:t.fields,className:"flexbox-fix"},a.a.createElement("div",{style:t.field},a.a.createElement(w,{style:{input:t.input,label:t.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),a.a.createElement("div",{style:t.field},a.a.createElement(w,{style:{input:t.input,label:t.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),a.a.createElement("div",{style:t.field},a.a.createElement(w,{style:{input:t.input,label:t.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),a.a.createElement("div",{style:t.alpha},a.a.createElement(w,{style:{input:t.input,label:t.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):"hsl"===this.state.view&&(n=a.a.createElement("div",{style:t.fields,className:"flexbox-fix"},a.a.createElement("div",{style:t.field},a.a.createElement(w,{style:{input:t.input,label:t.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),a.a.createElement("div",{style:t.field},a.a.createElement(w,{style:{input:t.input,label:t.label},label:"s",value:Math.round(100*this.props.hsl.s)+"%",onChange:this.handleChange})),a.a.createElement("div",{style:t.field},a.a.createElement(w,{style:{input:t.input,label:t.label},label:"l",value:Math.round(100*this.props.hsl.l)+"%",onChange:this.handleChange})),a.a.createElement("div",{style:t.alpha},a.a.createElement(w,{style:{input:t.input,label:t.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),a.a.createElement("div",{style:t.wrap,className:"flexbox-fix"},n,a.a.createElement("div",{style:t.toggle},a.a.createElement("div",{style:t.icon,onClick:this.toggleViews,ref:function(t){return e.icon=t}},a.a.createElement(ja.a,{style:t.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return 1!==e.hsl.a&&"hex"===t.view?{view:"rgb"}:null}}]),t}(a.a.Component);Ha.defaultProps={view:"hex"};var Ia=Ha,Na=function(){var e=i()({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return a.a.createElement("div",{style:e.picker})},Ra=function(){var e=i()({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return a.a.createElement("div",{style:e.picker})},Fa=function(e){var t=e.width,n=e.onChange,r=e.disableAlpha,o=e.rgb,s=e.hsl,u=e.hsv,l=e.hex,c=e.renderers,d=e.styles,f=void 0===d?{}:d,h=e.className,m=void 0===h?"":h,_=e.defaultView,g=i()(Xt({default:{picker:{width:t,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+o.r+", "+o.g+", "+o.b+", "+o.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},f),{disableAlpha:r});return a.a.createElement("div",{style:g.picker,className:"chrome-picker "+m},a.a.createElement("div",{style:g.saturation},a.a.createElement(yn,{style:g.Saturation,hsl:s,hsv:u,pointer:Ra,onChange:n})),a.a.createElement("div",{style:g.body},a.a.createElement("div",{style:g.controls,className:"flexbox-fix"},a.a.createElement("div",{style:g.color},a.a.createElement("div",{style:g.swatch},a.a.createElement("div",{style:g.active}),a.a.createElement(p,{renderers:c}))),a.a.createElement("div",{style:g.toggles},a.a.createElement("div",{style:g.hue},a.a.createElement(x,{style:g.Hue,hsl:s,pointer:Na,onChange:n})),a.a.createElement("div",{style:g.alpha},a.a.createElement(y,{style:g.Alpha,rgb:o,hsl:s,pointer:Na,renderers:c,onChange:n})))),a.a.createElement(Ia,{rgb:o,hsl:s,hex:l,view:_,onChange:n,disableAlpha:r})))};Fa.propTypes={width:S.a.oneOfType([S.a.string,S.a.number]),disableAlpha:S.a.bool,styles:S.a.object,defaultView:S.a.oneOf(["hex","rgb","hsl"])},Fa.defaultProps={width:225,disableAlpha:!1,styles:{}};var za=Pn(Fa),Ua=function(e){var t=e.color,n=e.onClick,r=void 0===n?function(){}:n,o=e.onSwatchHover,s=e.active,u=i()({default:{color:{background:t,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:Yn(t),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:s,"color-#FFFFFF":"#FFFFFF"===t,transparent:"transparent"===t});return a.a.createElement(Un,{style:u.color,color:t,onClick:r,onHover:o,focusStyle:{boxShadow:"0 0 4px "+t}},a.a.createElement("div",{style:u.dot}))},Wa=function(e){var t=e.hex,n=e.rgb,r=e.onChange,o=i()({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:t},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),s=function(e,t){e.r||e.g||e.b?r({r:e.r||n.r,g:e.g||n.g,b:e.b||n.b,source:"rgb"},t):r({hex:e.hex,source:"hex"},t)};return a.a.createElement("div",{style:o.fields,className:"flexbox-fix"},a.a.createElement("div",{style:o.active}),a.a.createElement(w,{style:{wrap:o.HEXwrap,input:o.HEXinput,label:o.HEXlabel},label:"hex",value:t,onChange:s}),a.a.createElement(w,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"r",value:n.r,onChange:s}),a.a.createElement(w,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"g",value:n.g,onChange:s}),a.a.createElement(w,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"b",value:n.b,onChange:s}))},Ba=function(e){var t=e.onChange,n=e.onSwatchHover,r=e.colors,o=e.hex,s=e.rgb,u=e.styles,l=void 0===u?{}:u,c=e.className,d=void 0===c?"":c,p=i()(Xt({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},l)),f=function(e,n){e.hex?Dn(e.hex)&&t({hex:e.hex,source:"hex"},n):t(e,n)};return a.a.createElement(Qt,{style:p.Compact,styles:l},a.a.createElement("div",{style:p.compact,className:"compact-picker "+d},a.a.createElement("div",null,ia(r,(function(e){return a.a.createElement(Ua,{key:e,color:e,active:e.toLowerCase()===o,onClick:f,onSwatchHover:n})})),a.a.createElement("div",{style:p.clear})),a.a.createElement(Wa,{hex:o,rgb:s,onChange:f})))};Ba.propTypes={colors:S.a.arrayOf(S.a.string),styles:S.a.object},Ba.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}};var Va=Pn(Ba),Ga=Object(o.handleHover)((function(e){var t=e.hover,n=e.color,r=e.onClick,o=e.onSwatchHover,s={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},u=i()({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:s}},{hover:t});return a.a.createElement("div",{style:u.swatch},a.a.createElement(Un,{color:n,onClick:r,onHover:o,focusStyle:s}))})),qa=function(e){var t=e.width,n=e.colors,r=e.onChange,o=e.onSwatchHover,s=e.triangle,u=e.styles,l=void 0===u?{}:u,c=e.className,d=void 0===c?"":c,p=i()(Xt({default:{card:{width:t,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},l),{"hide-triangle":"hide"===s,"top-left-triangle":"top-left"===s,"top-right-triangle":"top-right"===s,"bottom-left-triangle":"bottom-left"===s,"bottom-right-triangle":"bottom-right"===s}),f=function(e,t){return r({hex:e,source:"hex"},t)};return a.a.createElement("div",{style:p.card,className:"github-picker "+d},a.a.createElement("div",{style:p.triangleShadow}),a.a.createElement("div",{style:p.triangle}),ia(n,(function(e){return a.a.createElement(Ga,{color:e,key:e,onClick:f,onSwatchHover:o})})))};qa.propTypes={width:S.a.oneOfType([S.a.string,S.a.number]),colors:S.a.arrayOf(S.a.string),triangle:S.a.oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:S.a.object},qa.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}};var Ja=Pn(qa),Ka=function(e){var t=e.direction,n=i()({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:"vertical"===t});return a.a.createElement("div",{style:n.picker})},$a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xa=function(e){var t=e.width,n=e.height,r=e.onChange,o=e.hsl,s=e.direction,u=e.pointer,l=e.styles,c=void 0===l?{}:l,d=e.className,p=void 0===d?"":d,f=i()(Xt({default:{picker:{position:"relative",width:t,height:n},hue:{radius:"2px"}}},c));return a.a.createElement("div",{style:f.picker,className:"hue-picker "+p},a.a.createElement(x,$a({},f.hue,{hsl:o,pointer:u,onChange:function(e){return r({a:1,h:e.h,l:.5,s:1})},direction:s})))};Xa.propTypes={styles:S.a.object},Xa.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:Ka,styles:{}};var Za=Pn(Xa),Qa=Pn((function(e){var t=e.onChange,n=e.hex,r=e.rgb,o=e.styles,s=void 0===o?{}:o,u=e.className,l=void 0===u?"":u,c=i()(Xt({default:{material:{width:"98px",height:"98px",padding:"16px",fontFamily:"Roboto"},HEXwrap:{position:"relative"},HEXinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"2px solid "+n,outline:"none",height:"30px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},Hex:{style:{}},RGBwrap:{position:"relative"},RGBinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"1px solid #eee",outline:"none",height:"30px"},RGBlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},split:{display:"flex",marginRight:"-10px",paddingTop:"11px"},third:{flex:"1",paddingRight:"10px"}}},s)),d=function(e,n){e.hex?Dn(e.hex)&&t({hex:e.hex,source:"hex"},n):(e.r||e.g||e.b)&&t({r:e.r||r.r,g:e.g||r.g,b:e.b||r.b,source:"rgb"},n)};return a.a.createElement(Qt,{styles:s},a.a.createElement("div",{style:c.material,className:"material-picker "+l},a.a.createElement(w,{style:{wrap:c.HEXwrap,input:c.HEXinput,label:c.HEXlabel},label:"hex",value:n,onChange:d}),a.a.createElement("div",{style:c.split,className:"flexbox-fix"},a.a.createElement("div",{style:c.third},a.a.createElement(w,{style:{wrap:c.RGBwrap,input:c.RGBinput,label:c.RGBlabel},label:"r",value:r.r,onChange:d})),a.a.createElement("div",{style:c.third},a.a.createElement(w,{style:{wrap:c.RGBwrap,input:c.RGBinput,label:c.RGBlabel},label:"g",value:r.g,onChange:d})),a.a.createElement("div",{style:c.third},a.a.createElement(w,{style:{wrap:c.RGBwrap,input:c.RGBinput,label:c.RGBlabel},label:"b",value:r.b,onChange:d})))))})),eo=function(e){var t=e.onChange,n=e.rgb,r=e.hsv,o=e.hex,s=i()({default:{fields:{paddingTop:"5px",paddingBottom:"9px",width:"80px",position:"relative"},divider:{height:"5px"},RGBwrap:{position:"relative"},RGBinput:{marginLeft:"40%",width:"40%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"5px",fontSize:"13px",paddingLeft:"3px",marginRight:"10px"},RGBlabel:{left:"0px",top:"0px",width:"34px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px",position:"absolute"},HEXwrap:{position:"relative"},HEXinput:{marginLeft:"20%",width:"80%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"6px",fontSize:"13px",paddingLeft:"3px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",width:"14px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px"},fieldSymbols:{position:"absolute",top:"5px",right:"-7px",fontSize:"13px"},symbol:{height:"20px",lineHeight:"22px",paddingBottom:"7px"}}}),u=function(e,a){e["#"]?Dn(e["#"])&&t({hex:e["#"],source:"hex"},a):e.r||e.g||e.b?t({r:e.r||n.r,g:e.g||n.g,b:e.b||n.b,source:"rgb"},a):(e.h||e.s||e.v)&&t({h:e.h||r.h,s:e.s||r.s,v:e.v||r.v,source:"hsv"},a)};return a.a.createElement("div",{style:s.fields},a.a.createElement(w,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"h",value:Math.round(r.h),onChange:u}),a.a.createElement(w,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"s",value:Math.round(100*r.s),onChange:u}),a.a.createElement(w,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"v",value:Math.round(100*r.v),onChange:u}),a.a.createElement("div",{style:s.divider}),a.a.createElement(w,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"r",value:n.r,onChange:u}),a.a.createElement(w,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"g",value:n.g,onChange:u}),a.a.createElement(w,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"b",value:n.b,onChange:u}),a.a.createElement("div",{style:s.divider}),a.a.createElement(w,{style:{wrap:s.HEXwrap,input:s.HEXinput,label:s.HEXlabel},label:"#",value:o.replace("#",""),onChange:u}),a.a.createElement("div",{style:s.fieldSymbols},a.a.createElement("div",{style:s.symbol},"°"),a.a.createElement("div",{style:s.symbol},"%"),a.a.createElement("div",{style:s.symbol},"%")))},to=function(e){var t=e.hsl,n=i()({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}},"black-outline":{picker:{boxShadow:"inset 0 0 0 1px #000"}}},{"black-outline":t.l>.5});return a.a.createElement("div",{style:n.picker})},no=function(){var e=i()({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return a.a.createElement("div",{style:e.pointer},a.a.createElement("div",{style:e.left},a.a.createElement("div",{style:e.leftInside})),a.a.createElement("div",{style:e.right},a.a.createElement("div",{style:e.rightInside})))},ro=function(e){var t=e.onClick,n=e.label,r=e.children,o=e.active,s=i()({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:o});return a.a.createElement("div",{style:s.button,onClick:t},n||r)},ao=function(e){var t=e.rgb,n=e.currentColor,r=i()({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+t.r+","+t.g+", "+t.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:n,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return a.a.createElement("div",null,a.a.createElement("div",{style:r.label},"new"),a.a.createElement("div",{style:r.swatches},a.a.createElement("div",{style:r.new}),a.a.createElement("div",{style:r.current})),a.a.createElement("div",{style:r.label},"current"))},oo=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var io=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.state={currentColor:e.hex},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),oo(t,[{key:"render",value:function(){var e=this.props,t=e.styles,n=void 0===t?{}:t,r=e.className,o=void 0===r?"":r,s=i()(Xt({default:{picker:{background:"#DCDCDC",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.25), 0 8px 16px rgba(0,0,0,.15)",boxSizing:"initial",width:"513px"},head:{backgroundImage:"linear-gradient(-180deg, #F0F0F0 0%, #D4D4D4 100%)",borderBottom:"1px solid #B1B1B1",boxShadow:"inset 0 1px 0 0 rgba(255,255,255,.2), inset 0 -1px 0 0 rgba(0,0,0,.02)",height:"23px",lineHeight:"24px",borderRadius:"4px 4px 0 0",fontSize:"13px",color:"#4D4D4D",textAlign:"center"},body:{padding:"15px 15px 0",display:"flex"},saturation:{width:"256px",height:"256px",position:"relative",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0",overflow:"hidden"},hue:{position:"relative",height:"256px",width:"19px",marginLeft:"10px",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0"},controls:{width:"180px",marginLeft:"10px"},top:{display:"flex"},previews:{width:"60px"},actions:{flex:"1",marginLeft:"20px"}}},n));return a.a.createElement("div",{style:s.picker,className:"photoshop-picker "+o},a.a.createElement("div",{style:s.head},this.props.header),a.a.createElement("div",{style:s.body,className:"flexbox-fix"},a.a.createElement("div",{style:s.saturation},a.a.createElement(yn,{hsl:this.props.hsl,hsv:this.props.hsv,pointer:to,onChange:this.props.onChange})),a.a.createElement("div",{style:s.hue},a.a.createElement(x,{direction:"vertical",hsl:this.props.hsl,pointer:no,onChange:this.props.onChange})),a.a.createElement("div",{style:s.controls},a.a.createElement("div",{style:s.top,className:"flexbox-fix"},a.a.createElement("div",{style:s.previews},a.a.createElement(ao,{rgb:this.props.rgb,currentColor:this.state.currentColor})),a.a.createElement("div",{style:s.actions},a.a.createElement(ro,{label:"OK",onClick:this.props.onAccept,active:!0}),a.a.createElement(ro,{label:"Cancel",onClick:this.props.onCancel}),a.a.createElement(eo,{onChange:this.props.onChange,rgb:this.props.rgb,hsv:this.props.hsv,hex:this.props.hex}))))))}}]),t}(a.a.Component);io.propTypes={header:S.a.string,styles:S.a.object},io.defaultProps={header:"Color Picker",styles:{}};var so=Pn(io),uo=function(e){var t=e.onChange,n=e.rgb,r=e.hsl,o=e.hex,s=e.disableAlpha,u=i()({default:{fields:{display:"flex",paddingTop:"4px"},single:{flex:"1",paddingLeft:"6px"},alpha:{flex:"1",paddingLeft:"6px"},double:{flex:"2"},input:{width:"80%",padding:"4px 10% 3px",border:"none",boxShadow:"inset 0 0 0 1px #ccc",fontSize:"11px"},label:{display:"block",textAlign:"center",fontSize:"11px",color:"#222",paddingTop:"3px",paddingBottom:"4px",textTransform:"capitalize"}},disableAlpha:{alpha:{display:"none"}}},{disableAlpha:s}),l=function(e,a){e.hex?Dn(e.hex)&&t({hex:e.hex,source:"hex"},a):e.r||e.g||e.b?t({r:e.r||n.r,g:e.g||n.g,b:e.b||n.b,a:n.a,source:"rgb"},a):e.a&&(e.a<0?e.a=0:e.a>100&&(e.a=100),e.a/=100,t({h:r.h,s:r.s,l:r.l,a:e.a,source:"rgb"},a))};return a.a.createElement("div",{style:u.fields,className:"flexbox-fix"},a.a.createElement("div",{style:u.double},a.a.createElement(w,{style:{input:u.input,label:u.label},label:"hex",value:o.replace("#",""),onChange:l})),a.a.createElement("div",{style:u.single},a.a.createElement(w,{style:{input:u.input,label:u.label},label:"r",value:n.r,onChange:l,dragLabel:"true",dragMax:"255"})),a.a.createElement("div",{style:u.single},a.a.createElement(w,{style:{input:u.input,label:u.label},label:"g",value:n.g,onChange:l,dragLabel:"true",dragMax:"255"})),a.a.createElement("div",{style:u.single},a.a.createElement(w,{style:{input:u.input,label:u.label},label:"b",value:n.b,onChange:l,dragLabel:"true",dragMax:"255"})),a.a.createElement("div",{style:u.alpha},a.a.createElement(w,{style:{input:u.input,label:u.label},label:"a",value:Math.round(100*n.a),onChange:l,dragLabel:"true",dragMax:"100"})))},lo=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},co=function(e){var t=e.colors,n=e.onClick,r=void 0===n?function(){}:n,o=e.onSwatchHover,s=i()({default:{colors:{margin:"0 -10px",padding:"10px 0 0 10px",borderTop:"1px solid #eee",display:"flex",flexWrap:"wrap",position:"relative"},swatchWrap:{width:"16px",height:"16px",margin:"0 10px 10px 0"},swatch:{borderRadius:"3px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15)"}},"no-presets":{colors:{display:"none"}}},{"no-presets":!t||!t.length}),u=function(e,t){r({hex:e,source:"hex"},t)};return a.a.createElement("div",{style:s.colors,className:"flexbox-fix"},t.map((function(e){var t="string"==typeof e?{color:e}:e,n=""+t.color+(t.title||"");return a.a.createElement("div",{key:n,style:s.swatchWrap},a.a.createElement(Un,lo({},t,{style:s.swatch,onClick:u,onHover:o,focusStyle:{boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), 0 0 4px "+t.color}})))})))};co.propTypes={colors:S.a.arrayOf(S.a.oneOfType([S.a.string,S.a.shape({color:S.a.string,title:S.a.string})])).isRequired};var po=co,fo=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ho=function(e){var t=e.width,n=e.rgb,r=e.hex,o=e.hsv,s=e.hsl,u=e.onChange,l=e.onSwatchHover,c=e.disableAlpha,d=e.presetColors,f=e.renderers,h=e.styles,m=void 0===h?{}:h,_=e.className,g=void 0===_?"":_,v=i()(Xt({default:fo({picker:{width:t,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:"rgba("+n.r+","+n.g+","+n.b+","+n.a+")",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}},m),disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},m),{disableAlpha:c});return a.a.createElement("div",{style:v.picker,className:"sketch-picker "+g},a.a.createElement("div",{style:v.saturation},a.a.createElement(yn,{style:v.Saturation,hsl:s,hsv:o,onChange:u})),a.a.createElement("div",{style:v.controls,className:"flexbox-fix"},a.a.createElement("div",{style:v.sliders},a.a.createElement("div",{style:v.hue},a.a.createElement(x,{style:v.Hue,hsl:s,onChange:u})),a.a.createElement("div",{style:v.alpha},a.a.createElement(y,{style:v.Alpha,rgb:n,hsl:s,renderers:f,onChange:u}))),a.a.createElement("div",{style:v.color},a.a.createElement(p,null),a.a.createElement("div",{style:v.activeColor}))),a.a.createElement(uo,{rgb:n,hsl:s,hex:r,onChange:u,disableAlpha:c}),a.a.createElement(po,{colors:d,onClick:u,onSwatchHover:l}))};ho.propTypes={disableAlpha:S.a.bool,width:S.a.oneOfType([S.a.string,S.a.number]),styles:S.a.object},ho.defaultProps={disableAlpha:!1,width:200,styles:{},presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]};var mo=Pn(ho),_o=function(e){var t=e.hsl,n=e.offset,r=e.onClick,o=void 0===r?function(){}:r,s=e.active,u=e.first,l=e.last,c=i()({default:{swatch:{height:"12px",background:"hsl("+t.h+", 50%, "+100*n+"%)",cursor:"pointer"}},first:{swatch:{borderRadius:"2px 0 0 2px"}},last:{swatch:{borderRadius:"0 2px 2px 0"}},active:{swatch:{transform:"scaleY(1.8)",borderRadius:"3.6px/2px"}}},{active:s,first:u,last:l});return a.a.createElement("div",{style:c.swatch,onClick:function(e){return o({h:t.h,s:.5,l:n,source:"hsl"},e)}})},yo=function(e){var t=e.onClick,n=e.hsl,r=i()({default:{swatches:{marginTop:"20px"},swatch:{boxSizing:"border-box",width:"20%",paddingRight:"1px",float:"left"},clear:{clear:"both"}}});return a.a.createElement("div",{style:r.swatches},a.a.createElement("div",{style:r.swatch},a.a.createElement(_o,{hsl:n,offset:".80",active:Math.abs(n.l-.8)<.1&&Math.abs(n.s-.5)<.1,onClick:t,first:!0})),a.a.createElement("div",{style:r.swatch},a.a.createElement(_o,{hsl:n,offset:".65",active:Math.abs(n.l-.65)<.1&&Math.abs(n.s-.5)<.1,onClick:t})),a.a.createElement("div",{style:r.swatch},a.a.createElement(_o,{hsl:n,offset:".50",active:Math.abs(n.l-.5)<.1&&Math.abs(n.s-.5)<.1,onClick:t})),a.a.createElement("div",{style:r.swatch},a.a.createElement(_o,{hsl:n,offset:".35",active:Math.abs(n.l-.35)<.1&&Math.abs(n.s-.5)<.1,onClick:t})),a.a.createElement("div",{style:r.swatch},a.a.createElement(_o,{hsl:n,offset:".20",active:Math.abs(n.l-.2)<.1&&Math.abs(n.s-.5)<.1,onClick:t,last:!0})),a.a.createElement("div",{style:r.clear}))},go=function(){var e=i()({default:{picker:{width:"14px",height:"14px",borderRadius:"6px",transform:"translate(-7px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return a.a.createElement("div",{style:e.picker})},vo=function(e){var t=e.hsl,n=e.onChange,r=e.pointer,o=e.styles,s=void 0===o?{}:o,u=e.className,l=void 0===u?"":u,c=i()(Xt({default:{hue:{height:"12px",position:"relative"},Hue:{radius:"2px"}}},s));return a.a.createElement("div",{style:c.wrap||{},className:"slider-picker "+l},a.a.createElement("div",{style:c.hue},a.a.createElement(x,{style:c.Hue,hsl:t,pointer:r,onChange:n})),a.a.createElement("div",{style:c.swatches},a.a.createElement(yo,{hsl:t,onClick:n})))};vo.propTypes={styles:S.a.object},vo.defaultProps={pointer:go,styles:{}};var bo=Pn(vo),wo=n(277),Mo=n.n(wo),Lo=function(e){var t=e.color,n=e.onClick,r=void 0===n?function(){}:n,o=e.onSwatchHover,s=e.first,u=e.last,l=e.active,c=i()({default:{color:{width:"40px",height:"24px",cursor:"pointer",background:t,marginBottom:"1px"},check:{color:Yn(t),marginLeft:"8px",display:"none"}},first:{color:{overflow:"hidden",borderRadius:"2px 2px 0 0"}},last:{color:{overflow:"hidden",borderRadius:"0 0 2px 2px"}},active:{check:{display:"block"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},check:{color:"#333"}},transparent:{check:{color:"#333"}}},{first:s,last:u,active:l,"color-#FFFFFF":"#FFFFFF"===t,transparent:"transparent"===t});return a.a.createElement(Un,{color:t,style:c.color,onClick:r,onHover:o,focusStyle:{boxShadow:"0 0 4px "+t}},a.a.createElement("div",{style:c.check},a.a.createElement(Mo.a,null)))},To=function(e){var t=e.onClick,n=e.onSwatchHover,r=e.group,o=e.active,s=i()({default:{group:{paddingBottom:"10px",width:"40px",float:"left",marginRight:"10px"}}});return a.a.createElement("div",{style:s.group},ia(r,(function(e,i){return a.a.createElement(Lo,{key:e,color:e,active:e.toLowerCase()===o,first:0===i,last:i===r.length-1,onClick:t,onSwatchHover:n})})))},ko=function(e){var t=e.width,n=e.height,r=e.onChange,o=e.onSwatchHover,s=e.colors,u=e.hex,l=e.styles,c=void 0===l?{}:l,d=e.className,p=void 0===d?"":d,f=i()(Xt({default:{picker:{width:t,height:n},overflow:{height:n,overflowY:"scroll"},body:{padding:"16px 0 6px 16px"},clear:{clear:"both"}}},c)),h=function(e,t){return r({hex:e,source:"hex"},t)};return a.a.createElement("div",{style:f.picker,className:"swatches-picker "+p},a.a.createElement(Qt,null,a.a.createElement("div",{style:f.overflow},a.a.createElement("div",{style:f.body},ia(s,(function(e){return a.a.createElement(To,{key:e.toString(),group:e,active:u,onClick:h,onSwatchHover:o})})),a.a.createElement("div",{style:f.clear})))))};ko.propTypes={width:S.a.oneOfType([S.a.string,S.a.number]),height:S.a.oneOfType([S.a.string,S.a.number]),colors:S.a.arrayOf(S.a.arrayOf(S.a.string)),styles:S.a.object},ko.defaultProps={width:320,height:240,colors:[[ca[900],ca[700],ca[500],ca[300],ca[100]],[da[900],da[700],da[500],da[300],da[100]],[pa[900],pa[700],pa[500],pa[300],pa[100]],[fa[900],fa[700],fa[500],fa[300],fa[100]],[ha[900],ha[700],ha[500],ha[300],ha[100]],[ma[900],ma[700],ma[500],ma[300],ma[100]],[_a[900],_a[700],_a[500],_a[300],_a[100]],[ya[900],ya[700],ya[500],ya[300],ya[100]],[ga[900],ga[700],ga[500],ga[300],ga[100]],["#194D33",va[700],va[500],va[300],va[100]],[ba[900],ba[700],ba[500],ba[300],ba[100]],[wa[900],wa[700],wa[500],wa[300],wa[100]],[Ma[900],Ma[700],Ma[500],Ma[300],Ma[100]],[La[900],La[700],La[500],La[300],La[100]],[Ta[900],Ta[700],Ta[500],Ta[300],Ta[100]],[ka[900],ka[700],ka[500],ka[300],ka[100]],[xa[900],xa[700],xa[500],xa[300],xa[100]],[Ea[900],Ea[700],Ea[500],Ea[300],Ea[100]],["#000000","#525252","#969696","#D9D9D9","#FFFFFF"]],styles:{}};var xo=Pn(ko),Eo=function(e){var t=e.onChange,n=e.onSwatchHover,r=e.hex,o=e.colors,s=e.width,u=e.triangle,l=e.styles,c=void 0===l?{}:l,d=e.className,p=void 0===d?"":d,f=i()(Xt({default:{card:{width:s,background:"#fff",border:"0 solid rgba(0,0,0,0.25)",boxShadow:"0 1px 4px rgba(0,0,0,0.25)",borderRadius:"4px",position:"relative"},body:{padding:"15px 9px 9px 15px"},label:{fontSize:"18px",color:"#fff"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent #fff transparent",position:"absolute"},triangleShadow:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent rgba(0,0,0,.1) transparent",position:"absolute"},hash:{background:"#F0F0F0",height:"30px",width:"30px",borderRadius:"4px 0 0 4px",float:"left",color:"#98A1A4",display:"flex",alignItems:"center",justifyContent:"center"},input:{width:"100px",fontSize:"14px",color:"#666",border:"0px",outline:"none",height:"28px",boxShadow:"inset 0 0 0 1px #F0F0F0",boxSizing:"content-box",borderRadius:"0 4px 4px 0",float:"left",paddingLeft:"8px"},swatch:{width:"30px",height:"30px",float:"left",borderRadius:"4px",margin:"0 6px 6px 0"},clear:{clear:"both"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-10px",left:"12px"},triangleShadow:{top:"-11px",left:"12px"}},"top-right-triangle":{triangle:{top:"-10px",right:"12px"},triangleShadow:{top:"-11px",right:"12px"}}},c),{"hide-triangle":"hide"===u,"top-left-triangle":"top-left"===u,"top-right-triangle":"top-right"===u}),h=function(e,n){Dn(e)&&t({hex:e,source:"hex"},n)};return a.a.createElement("div",{style:f.card,className:"twitter-picker "+p},a.a.createElement("div",{style:f.triangleShadow}),a.a.createElement("div",{style:f.triangle}),a.a.createElement("div",{style:f.body},ia(o,(function(e,t){return a.a.createElement(Un,{key:t,color:e,hex:e,style:f.swatch,onClick:h,onHover:n,focusStyle:{boxShadow:"0 0 4px "+e}})})),a.a.createElement("div",{style:f.hash},"#"),a.a.createElement(w,{label:null,style:{input:f.input},value:r.replace("#",""),onChange:h}),a.a.createElement("div",{style:f.clear})))};Eo.propTypes={width:S.a.oneOfType([S.a.string,S.a.number]),triangle:S.a.oneOf(["hide","top-left","top-right"]),colors:S.a.arrayOf(S.a.string),styles:S.a.object},Eo.defaultProps={width:276,colors:["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"],triangle:"top-left",styles:{}};var So=Pn(Eo),Oo=function(e){var t=i()({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",border:"2px #fff solid",transform:"translate(-12px, -13px)",background:"hsl("+Math.round(e.hsl.h)+", "+Math.round(100*e.hsl.s)+"%, "+Math.round(100*e.hsl.l)+"%)"}}});return a.a.createElement("div",{style:t.picker})};Oo.propTypes={hsl:S.a.shape({h:S.a.number,s:S.a.number,l:S.a.number,a:S.a.number})},Oo.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var Do=Oo,Yo=function(e){var t=i()({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",transform:"translate(-10px, -7px)",background:"hsl("+Math.round(e.hsl.h)+", 100%, 50%)",border:"2px white solid"}}});return a.a.createElement("div",{style:t.picker})};Yo.propTypes={hsl:S.a.shape({h:S.a.number,s:S.a.number,l:S.a.number,a:S.a.number})},Yo.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var Ao=Yo,Co=function(e){var t=e.onChange,n=e.rgb,r=e.hsl,o=e.hex,s=e.hsv,u=function(e,n){if(e.hex)Dn(e.hex)&&t({hex:e.hex,source:"hex"},n);else if(e.rgb){var r=e.rgb.split(",");An(e.rgb,"rgb")&&t({r:r[0],g:r[1],b:r[2],a:1,source:"rgb"},n)}else if(e.hsv){var a=e.hsv.split(",");An(e.hsv,"hsv")&&(a[2]=a[2].replace("%",""),a[1]=a[1].replace("%",""),a[0]=a[0].replace("°",""),1==a[1]?a[1]=.01:1==a[2]&&(a[2]=.01),t({h:Number(a[0]),s:Number(a[1]),v:Number(a[2]),source:"hsv"},n))}else if(e.hsl){var o=e.hsl.split(",");An(e.hsl,"hsl")&&(o[2]=o[2].replace("%",""),o[1]=o[1].replace("%",""),o[0]=o[0].replace("°",""),1==p[1]?p[1]=.01:1==p[2]&&(p[2]=.01),t({h:Number(o[0]),s:Number(o[1]),v:Number(o[2]),source:"hsl"},n))}},l=i()({default:{wrap:{display:"flex",height:"100px",marginTop:"4px"},fields:{width:"100%"},column:{paddingTop:"10px",display:"flex",justifyContent:"space-between"},double:{padding:"0px 4.4px",boxSizing:"border-box"},input:{width:"100%",height:"38px",boxSizing:"border-box",padding:"4px 10% 3px",textAlign:"center",border:"1px solid #dadce0",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",fontFamily:"Roboto,Arial,sans-serif"},input2:{height:"38px",width:"100%",border:"1px solid #dadce0",boxSizing:"border-box",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",paddingLeft:"10px",fontFamily:"Roboto,Arial,sans-serif"},label:{textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"35px",top:"-6px",left:"0",right:"0",marginLeft:"auto",marginRight:"auto",fontFamily:"Roboto,Arial,sans-serif"},label2:{left:"10px",textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"32px",top:"-6px",fontFamily:"Roboto,Arial,sans-serif"},single:{flexGrow:"1",margin:"0px 4.4px"}}}),c=n.r+", "+n.g+", "+n.b,d=Math.round(r.h)+"°, "+Math.round(100*r.s)+"%, "+Math.round(100*r.l)+"%",p=Math.round(s.h)+"°, "+Math.round(100*s.s)+"%, "+Math.round(100*s.v)+"%";return a.a.createElement("div",{style:l.wrap,className:"flexbox-fix"},a.a.createElement("div",{style:l.fields},a.a.createElement("div",{style:l.double},a.a.createElement(w,{style:{input:l.input,label:l.label},label:"hex",value:o,onChange:u})),a.a.createElement("div",{style:l.column},a.a.createElement("div",{style:l.single},a.a.createElement(w,{style:{input:l.input2,label:l.label2},label:"rgb",value:c,onChange:u})),a.a.createElement("div",{style:l.single},a.a.createElement(w,{style:{input:l.input2,label:l.label2},label:"hsv",value:p,onChange:u})),a.a.createElement("div",{style:l.single},a.a.createElement(w,{style:{input:l.input2,label:l.label2},label:"hsl",value:d,onChange:u})))))},jo=function(e){var t=e.width,n=e.onChange,r=e.rgb,o=e.hsl,s=e.hsv,u=e.hex,l=e.header,c=e.styles,d=void 0===c?{}:c,p=e.className,f=void 0===p?"":p,h=i()(Xt({default:{picker:{width:t,background:"#fff",border:"1px solid #dfe1e5",boxSizing:"initial",display:"flex",flexWrap:"wrap",borderRadius:"8px 8px 0px 0px"},head:{height:"57px",width:"100%",paddingTop:"16px",paddingBottom:"16px",paddingLeft:"16px",fontSize:"20px",boxSizing:"border-box",fontFamily:"Roboto-Regular,HelveticaNeue,Arial,sans-serif"},saturation:{width:"70%",padding:"0px",position:"relative",overflow:"hidden"},swatch:{width:"30%",height:"228px",padding:"0px",background:"rgba("+r.r+", "+r.g+", "+r.b+", 1)",position:"relative",overflow:"hidden"},body:{margin:"auto",width:"95%"},controls:{display:"flex",boxSizing:"border-box",height:"52px",paddingTop:"22px"},color:{width:"32px"},hue:{height:"8px",position:"relative",margin:"0px 16px 0px 16px",width:"100%"},Hue:{radius:"2px"}}},d));return a.a.createElement("div",{style:h.picker,className:"google-picker "+f},a.a.createElement("div",{style:h.head},l),a.a.createElement("div",{style:h.swatch}),a.a.createElement("div",{style:h.saturation},a.a.createElement(yn,{hsl:o,hsv:s,pointer:Do,onChange:n})),a.a.createElement("div",{style:h.body},a.a.createElement("div",{style:h.controls,className:"flexbox-fix"},a.a.createElement("div",{style:h.hue},a.a.createElement(x,{style:h.Hue,hsl:o,radius:"4px",pointer:Ao,onChange:n}))),a.a.createElement(Co,{rgb:r,hsl:o,hex:u,hsv:s,onChange:n})))};jo.propTypes={width:S.a.oneOfType([S.a.string,S.a.number]),styles:S.a.object,header:S.a.string},jo.defaultProps={width:652,styles:{},header:"Color picker"};var Po=Pn(jo)},function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n.r(t),n.d(t,"CacheProvider",(function(){return S})),n.d(t,"ThemeContext",(function(){return E})),n.d(t,"withEmotionCache",(function(){return O})),n.d(t,"css",(function(){return j})),n.d(t,"ClassNames",(function(){return z})),n.d(t,"Global",(function(){return H})),n.d(t,"createElement",(function(){return P})),n.d(t,"jsx",(function(){return P})),n.d(t,"keyframes",(function(){return N}));var a=n(0);var o=function(){function e(e){this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.before=null}var t=e.prototype;return t.insert=function(e){if(this.ctr%(this.isSpeedy?65e3:1)==0){var t,n=function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t}(this);t=0===this.tags.length?this.before:this.tags[this.tags.length-1].nextSibling,this.container.insertBefore(n,t),this.tags.push(n)}var r=this.tags[this.tags.length-1];if(this.isSpeedy){var a=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(r);try{var o=105===e.charCodeAt(1)&&64===e.charCodeAt(0);a.insertRule(e,o?0:a.cssRules.length)}catch(e){0}}else r.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}();var i=function(e){function t(e,t,r){var a=t.trim().split(h);t=a;var o=a.length,i=e.length;switch(i){case 0:case 1:var s=0;for(e=0===i?"":e[0]+" ";s<o;++s)t[s]=n(e,t[s],r).trim();break;default:var u=s=0;for(t=[];s<o;++s)for(var l=0;l<i;++l)t[u++]=n(e[l]+" ",a[s],r).trim()}return t}function n(e,t,n){var r=t.charCodeAt(0);switch(33>r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(m,"$1"+e.trim());case 58:return e.trim()+t.replace(m,"$1"+e.trim());default:if(0<1*n&&0<t.indexOf("\f"))return t.replace(m,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function r(e,t,n,o){var i=e+";",s=2*t+3*n+4*o;if(944===s){e=i.indexOf(":",9)+1;var u=i.substring(e,i.length-1).trim();return u=i.substring(0,e).trim()+u+";",1===O||2===O&&a(u,1)?"-webkit-"+u+u:u}if(0===O||2===O&&!a(i,1))return i;switch(s){case 1015:return 97===i.charCodeAt(10)?"-webkit-"+i+i:i;case 951:return 116===i.charCodeAt(3)?"-webkit-"+i+i:i;case 963:return 110===i.charCodeAt(5)?"-webkit-"+i+i:i;case 1009:if(100!==i.charCodeAt(4))break;case 969:case 942:return"-webkit-"+i+i;case 978:return"-webkit-"+i+"-moz-"+i+i;case 1019:case 983:return"-webkit-"+i+"-moz-"+i+"-ms-"+i+i;case 883:if(45===i.charCodeAt(8))return"-webkit-"+i+i;if(0<i.indexOf("image-set(",11))return i.replace(k,"$1-webkit-$2")+i;break;case 932:if(45===i.charCodeAt(4))switch(i.charCodeAt(5)){case 103:return"-webkit-box-"+i.replace("-grow","")+"-webkit-"+i+"-ms-"+i.replace("grow","positive")+i;case 115:return"-webkit-"+i+"-ms-"+i.replace("shrink","negative")+i;case 98:return"-webkit-"+i+"-ms-"+i.replace("basis","preferred-size")+i}return"-webkit-"+i+"-ms-"+i+i;case 964:return"-webkit-"+i+"-ms-flex-"+i+i;case 1023:if(99!==i.charCodeAt(8))break;return"-webkit-box-pack"+(u=i.substring(i.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+i+"-ms-flex-pack"+u+i;case 1005:return p.test(i)?i.replace(d,":-webkit-")+i.replace(d,":-moz-")+i:i;case 1e3:switch(t=(u=i.substring(13).trim()).indexOf("-")+1,u.charCodeAt(0)+u.charCodeAt(t)){case 226:u=i.replace(v,"tb");break;case 232:u=i.replace(v,"tb-rl");break;case 220:u=i.replace(v,"lr");break;default:return i}return"-webkit-"+i+"-ms-"+u+i;case 1017:if(-1===i.indexOf("sticky",9))break;case 975:switch(t=(i=e).length-10,s=(u=(33===i.charCodeAt(t)?i.substring(0,t):i).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|u.charCodeAt(7))){case 203:if(111>u.charCodeAt(8))break;case 115:i=i.replace(u,"-webkit-"+u)+";"+i;break;case 207:case 102:i=i.replace(u,"-webkit-"+(102<s?"inline-":"")+"box")+";"+i.replace(u,"-webkit-"+u)+";"+i.replace(u,"-ms-"+u+"box")+";"+i}return i+";";case 938:if(45===i.charCodeAt(5))switch(i.charCodeAt(6)){case 105:return u=i.replace("-items",""),"-webkit-"+i+"-webkit-box-"+u+"-ms-flex-"+u+i;case 115:return"-webkit-"+i+"-ms-flex-item-"+i.replace(M,"")+i;default:return"-webkit-"+i+"-ms-flex-line-pack"+i.replace("align-content","").replace(M,"")+i}break;case 973:case 989:if(45!==i.charCodeAt(3)||122===i.charCodeAt(4))break;case 931:case 953:if(!0===T.test(e))return 115===(u=e.substring(e.indexOf(":")+1)).charCodeAt(0)?r(e.replace("stretch","fill-available"),t,n,o).replace(":fill-available",":stretch"):i.replace(u,"-webkit-"+u)+i.replace(u,"-moz-"+u.replace("fill-",""))+i;break;case 962:if(i="-webkit-"+i+(102===i.charCodeAt(5)?"-ms-"+i:"")+i,211===n+o&&105===i.charCodeAt(13)&&0<i.indexOf("transform",10))return i.substring(0,i.indexOf(";",27)+1).replace(f,"$1-webkit-$2")+i}return i}function a(e,t){var n=e.indexOf(1===t?":":"{"),r=e.substring(0,3!==t?n:10);return n=e.substring(n+1,e.length-1),C(2!==t?r:r.replace(L,"$1"),n,t)}function o(e,t){var n=r(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n!==t+";"?n.replace(w," or ($1)").substring(4):"("+t+")"}function i(e,t,n,r,a,o,i,s,l,c){for(var d,p=0,f=t;p<A;++p)switch(d=Y[p].call(u,e,f,n,r,a,o,i,s,l,c)){case void 0:case!1:case!0:case null:break;default:f=d}if(f!==t)return f}function s(e){return void 0!==(e=e.prefix)&&(C=null,e?"function"!=typeof e?O=1:(O=2,C=e):O=0),s}function u(e,n){var s=e;if(33>s.charCodeAt(0)&&(s=s.trim()),s=[s],0<A){var u=i(-1,n,s,s,E,x,0,0,0,0);void 0!==u&&"string"==typeof u&&(n=u)}var d=function e(n,s,u,d,p){for(var f,h,m,v,w,M=0,L=0,T=0,k=0,Y=0,C=0,P=m=f=0,H=0,I=0,N=0,R=0,F=u.length,z=F-1,U="",W="",B="",V="";H<F;){if(h=u.charCodeAt(H),H===z&&0!==L+k+T+M&&(0!==L&&(h=47===L?10:47),k=T=M=0,F++,z++),0===L+k+T+M){if(H===z&&(0<I&&(U=U.replace(c,"")),0<U.trim().length)){switch(h){case 32:case 9:case 59:case 13:case 10:break;default:U+=u.charAt(H)}h=59}switch(h){case 123:for(f=(U=U.trim()).charCodeAt(0),m=1,R=++H;H<F;){switch(h=u.charCodeAt(H)){case 123:m++;break;case 125:m--;break;case 47:switch(h=u.charCodeAt(H+1)){case 42:case 47:e:{for(P=H+1;P<z;++P)switch(u.charCodeAt(P)){case 47:if(42===h&&42===u.charCodeAt(P-1)&&H+2!==P){H=P+1;break e}break;case 10:if(47===h){H=P+1;break e}}H=P}}break;case 91:h++;case 40:h++;case 34:case 39:for(;H++<z&&u.charCodeAt(H)!==h;);}if(0===m)break;H++}switch(m=u.substring(R,H),0===f&&(f=(U=U.replace(l,"").trim()).charCodeAt(0)),f){case 64:switch(0<I&&(U=U.replace(c,"")),h=U.charCodeAt(1)){case 100:case 109:case 115:case 45:I=s;break;default:I=D}if(R=(m=e(s,I,m,h,p+1)).length,0<A&&(w=i(3,m,I=t(D,U,N),s,E,x,R,h,p,d),U=I.join(""),void 0!==w&&0===(R=(m=w.trim()).length)&&(h=0,m="")),0<R)switch(h){case 115:U=U.replace(b,o);case 100:case 109:case 45:m=U+"{"+m+"}";break;case 107:m=(U=U.replace(_,"$1 $2"))+"{"+m+"}",m=1===O||2===O&&a("@"+m,3)?"@-webkit-"+m+"@"+m:"@"+m;break;default:m=U+m,112===d&&(W+=m,m="")}else m="";break;default:m=e(s,t(s,U,N),m,d,p+1)}B+=m,m=N=I=P=f=0,U="",h=u.charCodeAt(++H);break;case 125:case 59:if(1<(R=(U=(0<I?U.replace(c,""):U).trim()).length))switch(0===P&&(f=U.charCodeAt(0),45===f||96<f&&123>f)&&(R=(U=U.replace(" ",":")).length),0<A&&void 0!==(w=i(1,U,s,n,E,x,W.length,d,p,d))&&0===(R=(U=w.trim()).length)&&(U="\0\0"),f=U.charCodeAt(0),h=U.charCodeAt(1),f){case 0:break;case 64:if(105===h||99===h){V+=U+u.charAt(H);break}default:58!==U.charCodeAt(R-1)&&(W+=r(U,f,h,U.charCodeAt(2)))}N=I=P=f=0,U="",h=u.charCodeAt(++H)}}switch(h){case 13:case 10:47===L?L=0:0===1+f&&107!==d&&0<U.length&&(I=1,U+="\0"),0<A*j&&i(0,U,s,n,E,x,W.length,d,p,d),x=1,E++;break;case 59:case 125:if(0===L+k+T+M){x++;break}default:switch(x++,v=u.charAt(H),h){case 9:case 32:if(0===k+M+L)switch(Y){case 44:case 58:case 9:case 32:v="";break;default:32!==h&&(v=" ")}break;case 0:v="\\0";break;case 12:v="\\f";break;case 11:v="\\v";break;case 38:0===k+L+M&&(I=N=1,v="\f"+v);break;case 108:if(0===k+L+M+S&&0<P)switch(H-P){case 2:112===Y&&58===u.charCodeAt(H-3)&&(S=Y);case 8:111===C&&(S=C)}break;case 58:0===k+L+M&&(P=H);break;case 44:0===L+T+k+M&&(I=1,v+="\r");break;case 34:case 39:0===L&&(k=k===h?0:0===k?h:k);break;case 91:0===k+L+T&&M++;break;case 93:0===k+L+T&&M--;break;case 41:0===k+L+M&&T--;break;case 40:if(0===k+L+M){if(0===f)switch(2*Y+3*C){case 533:break;default:f=1}T++}break;case 64:0===L+T+k+M+P+m&&(m=1);break;case 42:case 47:if(!(0<k+M+T))switch(L){case 0:switch(2*h+3*u.charCodeAt(H+1)){case 235:L=47;break;case 220:R=H,L=42}break;case 42:47===h&&42===Y&&R+2!==H&&(33===u.charCodeAt(R+2)&&(W+=u.substring(R,H+1)),v="",L=0)}}0===L&&(U+=v)}C=Y,Y=h,H++}if(0<(R=W.length)){if(I=s,0<A&&(void 0!==(w=i(2,W,I,n,E,x,R,d,p,d))&&0===(W=w).length))return V+W+B;if(W=I.join(",")+"{"+W+"}",0!=O*S){switch(2!==O||a(W,2)||(S=0),S){case 111:W=W.replace(g,":-moz-$1")+W;break;case 112:W=W.replace(y,"::-webkit-input-$1")+W.replace(y,"::-moz-$1")+W.replace(y,":-ms-input-$1")+W}S=0}}return V+W+B}(D,s,n,0,0);return 0<A&&(void 0!==(u=i(-2,d,s,s,E,x,d.length,0,0,0))&&(d=u)),"",S=0,x=E=1,d}var l=/^\0+/g,c=/[\0\r\f]/g,d=/: */g,p=/zoo|gra/,f=/([,: ])(transform)/g,h=/,\r+?/g,m=/([\t\r\n ])*\f?&/g,_=/@(k\w+)\s*(\S*)\s*/,y=/::(place)/g,g=/:(read-only)/g,v=/[svh]\w+-[tblr]{2}/,b=/\(\s*(.*)\s*\)/g,w=/([\s\S]*?);/g,M=/-self|flex-/g,L=/[^]*?(:[rp][el]a[\w-]+)[^]*/,T=/stretch|:\s*\w+\-(?:conte|avail)/,k=/([^-])(image-set\()/,x=1,E=1,S=0,O=1,D=[],Y=[],A=0,C=null,j=0;return u.use=function e(t){switch(t){case void 0:case null:A=Y.length=0;break;default:if("function"==typeof t)Y[A++]=t;else if("object"==typeof t)for(var n=0,r=t.length;n<r;++n)e(t[n]);else j=0|!!t}return e},u.set=s,void 0!==e&&s(e),u};function s(e){e&&u.current.insert(e+"}")}var u={current:null},l=function(e,t,n,r,a,o,i,l,c,d){switch(e){case 1:switch(t.charCodeAt(0)){case 64:return u.current.insert(t+";"),"";case 108:if(98===t.charCodeAt(2))return""}break;case 2:if(0===l)return t+"/*|*/";break;case 3:switch(l){case 102:case 112:return u.current.insert(n[0]+t),"";default:return t+(0===d?"/*|*/":"")}case-2:t.split("/*|*/}").forEach(s)}},c=function(e){void 0===e&&(e={});var t,n=e.key||"css";void 0!==e.prefix&&(t={prefix:e.prefix});var r=new i(t);var a,s={};a=e.container||document.head;var c,d=document.querySelectorAll("style[data-emotion-"+n+"]");Array.prototype.forEach.call(d,(function(e){e.getAttribute("data-emotion-"+n).split(" ").forEach((function(e){s[e]=!0})),e.parentNode!==a&&a.appendChild(e)})),r.use(e.stylisPlugins)(l),c=function(e,t,n,a){var o=t.name;u.current=n,r(e,t.styles),a&&(p.inserted[o]=!0)};var p={key:n,sheet:new o({key:n,container:a,nonce:e.nonce,speedy:e.speedy}),nonce:e.nonce,inserted:s,registered:{},insert:c};return p};n(348);function d(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]):r+=n+" "})),r}var p=function(e,t,n){var r=e.key+"-"+t.name;if(!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles),void 0===e.inserted[t.name]){var a=t;do{e.insert("."+r,a,e.sheet,!0);a=a.next}while(void 0!==a)}};var f=function(e){for(var t,n=0,r=0,a=e.length;a>=4;++r,a-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(a){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)},h={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var m=/[A-Z]|^ms/g,_=/_EMO_([^_]+?)_([^]*?)_EMO_/g,y=function(e){return 45===e.charCodeAt(1)},g=function(e){return null!=e&&"boolean"!=typeof e},v=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){return y(e)?e:e.replace(m,"-$&").toLowerCase()})),b=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(_,(function(e,t,n){return M={name:t,styles:n,next:M},t}))}return 1===h[e]||y(e)||"number"!=typeof t||0===t?t:t+"px"};function w(e,t,n,r){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return M={name:n.name,styles:n.styles,next:M},n.name;if(void 0!==n.styles){var a=n.next;if(void 0!==a)for(;void 0!==a;)M={name:a.name,styles:a.styles,next:M},a=a.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var a=0;a<n.length;a++)r+=w(e,t,n[a],!1);else for(var o in n){var i=n[o];if("object"!=typeof i)null!=t&&void 0!==t[i]?r+=o+"{"+t[i]+"}":g(i)&&(r+=v(o)+":"+b(o,i)+";");else if(!Array.isArray(i)||"string"!=typeof i[0]||null!=t&&void 0!==t[i[0]]){var s=w(e,t,i,!1);switch(o){case"animation":case"animationName":r+=v(o)+":"+s+";";break;default:r+=o+"{"+s+"}"}}else for(var u=0;u<i.length;u++)g(i[u])&&(r+=v(o)+":"+b(o,i[u])+";")}return r}(e,t,n);case"function":if(void 0!==e){var o=M,i=n(e);return M=o,w(e,t,i,r)}break;case"string":}if(null==t)return n;var s=t[n];return void 0===s||r?n:s}var M,L=/label:\s*([^\s;\n{]+)\s*;/g;var T=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,a="";M=void 0;var o=e[0];null==o||void 0===o.raw?(r=!1,a+=w(n,t,o,!1)):a+=o[0];for(var i=1;i<e.length;i++)a+=w(n,t,e[i],46===a.charCodeAt(a.length-1)),r&&(a+=o[i]);L.lastIndex=0;for(var s,u="";null!==(s=L.exec(a));)u+="-"+s[1];return{name:f(a)+u,styles:a,next:M}},k=Object.prototype.hasOwnProperty,x=Object(a.createContext)("undefined"!=typeof HTMLElement?c():null),E=Object(a.createContext)({}),S=x.Provider,O=function(e){var t=function(t,n){return Object(a.createElement)(x.Consumer,null,(function(r){return e(t,r,n)}))};return Object(a.forwardRef)(t)},D="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Y=function(e,t){var n={};for(var r in t)k.call(t,r)&&(n[r]=t[r]);return n[D]=e,n},A=function(e,t,n,r){var o=null===n?t.css:t.css(n);"string"==typeof o&&void 0!==e.registered[o]&&(o=e.registered[o]);var i=t[D],s=[o],u="";"string"==typeof t.className?u=d(e.registered,s,t.className):null!=t.className&&(u=t.className+" ");var l=T(s);p(e,l,"string"==typeof i);u+=e.key+"-"+l.name;var c={};for(var f in t)k.call(t,f)&&"css"!==f&&f!==D&&(c[f]=t[f]);return c.ref=r,c.className=u,Object(a.createElement)(i,c)},C=O((function(e,t,n){return"function"==typeof e.css?Object(a.createElement)(E.Consumer,null,(function(r){return A(t,e,r,n)})):A(t,e,null,n)}));var j=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return T(t)},P=function(e,t){var n=arguments;if(null==t||!k.call(t,"css"))return a.createElement.apply(void 0,n);var r=n.length,o=new Array(r);o[0]=C,o[1]=Y(e,t);for(var i=2;i<r;i++)o[i]=n[i];return a.createElement.apply(null,o)},H=O((function(e,t){var n=e.styles;if("function"==typeof n)return Object(a.createElement)(E.Consumer,null,(function(e){var r=T([n(e)]);return Object(a.createElement)(I,{serialized:r,cache:t})}));var r=T([n]);return Object(a.createElement)(I,{serialized:r,cache:t})})),I=function(e){var t,n;function a(t,n,r){return e.call(this,t,n,r)||this}n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,r(t,n);var i=a.prototype;return i.componentDidMount=function(){this.sheet=new o({key:this.props.cache.key+"-global",nonce:this.props.cache.sheet.nonce,container:this.props.cache.sheet.container});var e=document.querySelector("style[data-emotion-"+this.props.cache.key+'="'+this.props.serialized.name+'"]');null!==e&&this.sheet.tags.push(e),this.props.cache.sheet.tags.length&&(this.sheet.before=this.props.cache.sheet.tags[0]),this.insertStyles()},i.componentDidUpdate=function(e){e.serialized.name!==this.props.serialized.name&&this.insertStyles()},i.insertStyles=function(){if(void 0!==this.props.serialized.next&&p(this.props.cache,this.props.serialized.next,!0),this.sheet.tags.length){var e=this.sheet.tags[this.sheet.tags.length-1].nextElementSibling;this.sheet.before=e,this.sheet.flush()}this.props.cache.insert("",this.props.serialized,this.sheet,!1)},i.componentWillUnmount=function(){this.sheet.flush()},i.render=function(){return null},a}(a.Component),N=function(){var e=j.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}},R=function e(t){for(var n=t.length,r=0,a="";r<n;r++){var o=t[r];if(null!=o){var i=void 0;switch(typeof o){case"boolean":break;case"object":if(Array.isArray(o))i=e(o);else for(var s in i="",o)o[s]&&s&&(i&&(i+=" "),i+=s);break;default:i=o}i&&(a&&(a+=" "),a+=i)}}return a};function F(e,t,n){var r=[],a=d(e,r,n);return r.length<2?n:a+t(r)}var z=O((function(e,t){return Object(a.createElement)(E.Consumer,null,(function(n){var r=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var a=T(n,t.registered);return p(t,a,!1),t.key+"-"+a.name},a={css:r,cx:function(){for(var e=arguments.length,n=new Array(e),a=0;a<e;a++)n[a]=arguments[a];return F(t.registered,r,R(n))},theme:n},o=e.children(a);return!0,o}))}))}])}));
280
+ */!function(o){if(void 0===(a="function"==typeof(r=o)?r.call(t,n,t,e):r)||(e.exports=a),!0,e.exports=o(),!!0){var i=window.Cookies,s=window.Cookies=o();s.noConflict=function(){return window.Cookies=i,s}}}((function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(r){function a(){}function o(t,n,o){if("undefined"!=typeof document){"number"==typeof(o=e({path:"/"},a.defaults,o)).expires&&(o.expires=new Date(1*new Date+864e5*o.expires)),o.expires=o.expires?o.expires.toUTCString():"";try{var i=JSON.stringify(n);/^[\{\[]/.test(i)&&(n=i)}catch(e){}n=r.write?r.write(n,t):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var s="";for(var u in o)o[u]&&(s+="; "+u,!0!==o[u]&&(s+="="+o[u].split(";")[0]));return document.cookie=t+"="+n+s}}function i(e,n){if("undefined"!=typeof document){for(var a={},o=document.cookie?document.cookie.split("; "):[],i=0;i<o.length;i++){var s=o[i].split("="),u=s.slice(1).join("=");n||'"'!==u.charAt(0)||(u=u.slice(1,-1));try{var l=t(s[0]);if(u=(r.read||r)(u,l)||t(u),n)try{u=JSON.parse(u)}catch(e){}if(a[l]=u,e===l)break}catch(e){}}return e?a[e]:a}}return a.set=o,a.get=function(e){return i(e,!1)},a.getJSON=function(e){return i(e,!0)},a.remove=function(t,n){o(t,"",e(n,{expires:-1}))},a.defaults={},a.withConverter=n,a}((function(){}))}))},function(e,t,n){"use strict";n.r(t),function(e,r){n.d(t,"Authentication",(function(){return Rt})),n.d(t,"Management",(function(){return Ft})),n.d(t,"WebAuth",(function(){return Ht})),n.d(t,"version",(function(){return se}));var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{};function o(e,t){return e(t={exports:{}},t.exports),t.exports}var i=o((function(e){var t,n;t=a,n=function(){function e(e){var t=[];if(0===e.length)return"";if("string"!=typeof e[0])throw new TypeError("Url must be a string. Received "+e[0]);if(e[0].match(/^[^/:]+:\/*$/)&&e.length>1){var n=e.shift();e[0]=n+e[0]}e[0].match(/^file:\/\/\//)?e[0]=e[0].replace(/^([^/:]+):\/*/,"$1:///"):e[0]=e[0].replace(/^([^/:]+):\/*/,"$1://");for(var r=0;r<e.length;r++){var a=e[r];if("string"!=typeof a)throw new TypeError("Url must be a string. Received "+a);""!==a&&(r>0&&(a=a.replace(/^[\/]+/,"")),a=r<e.length-1?a.replace(/[\/]+$/,""):a.replace(/[\/]+$/,"/"),t.push(a))}var o=t.join("/"),i=(o=o.replace(/\/(\?|&|#[^!])/g,"$1")).split("?");return i.shift()+(i.length>0?"?":"")+i.join("&")}return function(){return e("object"==typeof arguments[0]?arguments[0]:[].slice.call(arguments))}},e.exports?e.exports=n():t.urljoin=n()})),s=Object.prototype.hasOwnProperty,u=Array.isArray,l=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),c=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r<e.length;++r)void 0!==e[r]&&(n[r]=e[r]);return n},d={arrayToObject:c,assign:function(e,t){return Object.keys(t).reduce((function(e,n){return e[n]=t[n],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r<t.length;++r)for(var a=t[r],o=a.obj[a.prop],i=Object.keys(o),s=0;s<i.length;++s){var l=i[s],c=o[l];"object"==typeof c&&null!==c&&-1===n.indexOf(c)&&(t.push({obj:o,prop:l}),n.push(c))}return function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(u(n)){for(var r=[],a=0;a<n.length;++a)void 0!==n[a]&&r.push(n[a]);t.obj[t.prop]=r}}}(t),e},decode:function(e,t,n){var r=e.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(e){return r}},encode:function(e,t,n){if(0===e.length)return e;var r=e;if("symbol"==typeof e?r=Symbol.prototype.toString.call(e):"string"!=typeof e&&(r=String(e)),"iso-8859-1"===n)return escape(r).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var a="",o=0;o<r.length;++o){var i=r.charCodeAt(o);45===i||46===i||95===i||126===i||i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122?a+=r.charAt(o):i<128?a+=l[i]:i<2048?a+=l[192|i>>6]+l[128|63&i]:i<55296||i>=57344?a+=l[224|i>>12]+l[128|i>>6&63]+l[128|63&i]:(o+=1,i=65536+((1023&i)<<10|1023&r.charCodeAt(o)),a+=l[240|i>>18]+l[128|i>>12&63]+l[128|i>>6&63]+l[128|63&i])}return a},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)},maybeMap:function(e,t){if(u(e)){for(var n=[],r=0;r<e.length;r+=1)n.push(t(e[r]));return n}return t(e)},merge:function e(t,n,r){if(!n)return t;if("object"!=typeof n){if(u(t))t.push(n);else{if(!t||"object"!=typeof t)return[t,n];(r&&(r.plainObjects||r.allowPrototypes)||!s.call(Object.prototype,n))&&(t[n]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(n);var a=t;return u(t)&&!u(n)&&(a=c(t,r)),u(t)&&u(n)?(n.forEach((function(n,a){if(s.call(t,a)){var o=t[a];o&&"object"==typeof o&&n&&"object"==typeof n?t[a]=e(o,n,r):t.push(n)}else t[a]=n})),t):Object.keys(n).reduce((function(t,a){var o=n[a];return s.call(t,a)?t[a]=e(t[a],o,r):t[a]=o,t}),a)}},p=String.prototype.replace,f=/%20/g,h={RFC1738:"RFC1738",RFC3986:"RFC3986"},m=d.assign({default:h.RFC3986,formatters:{RFC1738:function(e){return p.call(e,f,"+")},RFC3986:function(e){return String(e)}}},h),_=Object.prototype.hasOwnProperty,y={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},g=Array.isArray,v=Array.prototype.push,b=function(e,t){v.apply(e,g(t)?t:[t])},w=Date.prototype.toISOString,M=m.default,L={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:d.encode,encodeValuesOnly:!1,format:M,formatter:m.formatters[M],indices:!1,serializeDate:function(e){return w.call(e)},skipNulls:!1,strictNullHandling:!1},T=function e(t,n,r,a,o,i,s,u,l,c,p,f,h){var m=t;if("function"==typeof s?m=s(n,m):m instanceof Date?m=c(m):"comma"===r&&g(m)&&(m=d.maybeMap(m,(function(e){return e instanceof Date?c(e):e})).join(",")),null===m){if(a)return i&&!f?i(n,L.encoder,h,"key"):n;m=""}if(function(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||"symbol"==typeof e||"bigint"==typeof e}(m)||d.isBuffer(m))return i?[p(f?n:i(n,L.encoder,h,"key"))+"="+p(i(m,L.encoder,h,"value"))]:[p(n)+"="+p(String(m))];var _,y=[];if(void 0===m)return y;if(g(s))_=s;else{var v=Object.keys(m);_=u?v.sort(u):v}for(var w=0;w<_.length;++w){var M=_[w],T=m[M];if(!o||null!==T){var k=g(m)?"function"==typeof r?r(n,M):n:n+(l?"."+M:"["+M+"]");b(y,e(T,k,r,a,o,i,s,u,l,c,p,f,h))}}return y},k=Object.prototype.hasOwnProperty,x=Array.isArray,E={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:d.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},S=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},O=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},D=function(e,t,n,r){if(e){var a=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/g,i=n.depth>0&&/(\[[^[\]]*])/.exec(a),s=i?a.slice(0,i.index):a,u=[];if(s){if(!n.plainObjects&&k.call(Object.prototype,s)&&!n.allowPrototypes)return;u.push(s)}for(var l=0;n.depth>0&&null!==(i=o.exec(a))&&l<n.depth;){if(l+=1,!n.plainObjects&&k.call(Object.prototype,i[1].slice(1,-1))&&!n.allowPrototypes)return;u.push(i[1])}return i&&u.push("["+a.slice(i.index)+"]"),function(e,t,n,r){for(var a=r?t:O(t,n),o=e.length-1;o>=0;--o){var i,s=e[o];if("[]"===s&&n.parseArrays)i=[].concat(a);else{i=n.plainObjects?Object.create(null):{};var u="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,l=parseInt(u,10);n.parseArrays||""!==u?!isNaN(l)&&s!==u&&String(l)===u&&l>=0&&n.parseArrays&&l<=n.arrayLimit?(i=[])[l]=a:i[u]=a:i={0:a}}a=i}return a}(u,t,n,r)}},Y=function(e,t){var n,r=e,a=function(e){if(!e)return L;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||L.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 n=m.default;if(void 0!==e.format){if(!_.call(m.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var r=m.formatters[n],a=L.filter;return("function"==typeof e.filter||g(e.filter))&&(a=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:L.addQueryPrefix,allowDots:void 0===e.allowDots?L.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:L.charsetSentinel,delimiter:void 0===e.delimiter?L.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:L.encode,encoder:"function"==typeof e.encoder?e.encoder:L.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:L.encodeValuesOnly,filter:a,formatter:r,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:L.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:L.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:L.strictNullHandling}}(t);"function"==typeof a.filter?r=(0,a.filter)("",r):g(a.filter)&&(n=a.filter);var o,i=[];if("object"!=typeof r||null===r)return"";o=t&&t.arrayFormat in y?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var s=y[o];n||(n=Object.keys(r)),a.sort&&n.sort(a.sort);for(var u=0;u<n.length;++u){var l=n[u];a.skipNulls&&null===r[l]||b(i,T(r[l],l,s,a.strictNullHandling,a.skipNulls,a.encode?a.encoder:null,a.filter,a.sort,a.allowDots,a.serializeDate,a.formatter,a.encodeValuesOnly,a.charset))}var c=i.join(a.delimiter),d=!0===a.addQueryPrefix?"?":"";return a.charsetSentinel&&("iso-8859-1"===a.charset?d+="utf8=%26%2310003%3B&":d+="utf8=%E2%9C%93&"),c.length>0?d+c:""},A=o((function(e){function t(e){if(e)return function(e){for(var n in t.prototype)e[n]=t.prototype[n];return e}(e)}e.exports=t,t.prototype.on=t.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},t.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var a=0;a<r.length;a++)if((n=r[a])===t||n.fn===t){r.splice(a,1);break}return 0===r.length&&delete this._callbacks["$"+e],this},t.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var a=(n=n.slice(0)).length;r<a;++r)n[r].apply(this,t)}return this},t.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},t.prototype.hasListeners=function(e){return!!this.listeners(e).length}})),C=H;H.default=H,H.stable=N,H.stableStringify=N;var j=[],P=[];function H(e,t,n){var r;for(function e(t,n,r,a){var o;if("object"==typeof t&&null!==t){for(o=0;o<r.length;o++)if(r[o]===t){var i=Object.getOwnPropertyDescriptor(a,n);return void(void 0!==i.get?i.configurable?(Object.defineProperty(a,n,{value:"[Circular]"}),j.push([a,n,t,i])):P.push([t,n]):(a[n]="[Circular]",j.push([a,n,t])))}if(r.push(t),Array.isArray(t))for(o=0;o<t.length;o++)e(t[o],o,r,t);else{var s=Object.keys(t);for(o=0;o<s.length;o++){var u=s[o];e(t[u],u,r,t)}}r.pop()}}(e,"",[],void 0),r=0===P.length?JSON.stringify(e,t,n):JSON.stringify(e,R(t),n);0!==j.length;){var a=j.pop();4===a.length?Object.defineProperty(a[0],a[1],a[3]):a[0][a[1]]=a[2]}return r}function I(e,t){return e<t?-1:e>t?1:0}function N(e,t,n){var r,a=function e(t,n,r,a){var o;if("object"==typeof t&&null!==t){for(o=0;o<r.length;o++)if(r[o]===t){var i=Object.getOwnPropertyDescriptor(a,n);return void(void 0!==i.get?i.configurable?(Object.defineProperty(a,n,{value:"[Circular]"}),j.push([a,n,t,i])):P.push([t,n]):(a[n]="[Circular]",j.push([a,n,t])))}if("function"==typeof t.toJSON)return;if(r.push(t),Array.isArray(t))for(o=0;o<t.length;o++)e(t[o],o,r,t);else{var s={},u=Object.keys(t).sort(I);for(o=0;o<u.length;o++){var l=u[o];e(t[l],l,r,t),s[l]=t[l]}if(void 0===a)return s;j.push([a,n,t]),a[n]=s}r.pop()}}(e,"",[],void 0)||e;for(r=0===P.length?JSON.stringify(a,t,n):JSON.stringify(a,R(t),n);0!==j.length;){var o=j.pop();4===o.length?Object.defineProperty(o[0],o[1],o[3]):o[0][o[1]]=o[2]}return r}function R(e){return e=void 0!==e?e:function(e,t){return t},function(t,n){if(P.length>0)for(var r=0;r<P.length;r++){var a=P[r];if(a[1]===t&&a[0]===n){n="[Circular]",P.splice(r,1);break}}return e.call(this,t,n)}}function F(e){return(F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var z=function(e){return null!==e&&"object"===F(e)};function U(e){return(U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var W=B;function B(e){if(e)return function(e){for(var t in B.prototype)Object.prototype.hasOwnProperty.call(B.prototype,t)&&(e[t]=B.prototype[t]);return e}(e)}B.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),clearTimeout(this._uploadTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,delete this._uploadTimeoutTimer,this},B.prototype.parse=function(e){return this._parser=e,this},B.prototype.responseType=function(e){return this._responseType=e,this},B.prototype.serialize=function(e){return this._serializer=e,this},B.prototype.timeout=function(e){if(!e||"object"!==U(e))return this._timeout=e,this._responseTimeout=0,this._uploadTimeout=0,this;for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))switch(t){case"deadline":this._timeout=e.deadline;break;case"response":this._responseTimeout=e.response;break;case"upload":this._uploadTimeout=e.upload;break;default:console.warn("Unknown timeout option",t)}return this},B.prototype.retry=function(e,t){return 0!==arguments.length&&!0!==e||(e=1),e<=0&&(e=0),this._maxRetries=e,this._retries=0,this._retryCallback=t,this};var V=["ECONNRESET","ETIMEDOUT","EADDRINFO","ESOCKETTIMEDOUT"];B.prototype._shouldRetry=function(e,t){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{var n=this._retryCallback(e,t);if(!0===n)return!0;if(!1===n)return!1}catch(e){console.error(e)}if(t&&t.status&&t.status>=500&&501!==t.status)return!0;if(e){if(e.code&&V.includes(e.code))return!0;if(e.timeout&&"ECONNABORTED"===e.code)return!0;if(e.crossDomain)return!0}return!1},B.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this.timedoutError=null,this._end()},B.prototype.then=function(e,t){var n=this;if(!this._fullfilledPromise){var r=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise((function(e,t){r.on("abort",(function(){if(!(n._maxRetries&&n._maxRetries>n._retries))if(n.timedout&&n.timedoutError)t(n.timedoutError);else{var e=new Error("Aborted");e.code="ABORTED",e.status=n.status,e.method=n.method,e.url=n.url,t(e)}})),r.end((function(n,r){n?t(n):e(r)}))}))}return this._fullfilledPromise.then(e,t)},B.prototype.catch=function(e){return this.then(void 0,e)},B.prototype.use=function(e){return e(this),this},B.prototype.ok=function(e){if("function"!=typeof e)throw new Error("Callback required");return this._okCallback=e,this},B.prototype._isResponseOK=function(e){return!!e&&(this._okCallback?this._okCallback(e):e.status>=200&&e.status<300)},B.prototype.get=function(e){return this._header[e.toLowerCase()]},B.prototype.getHeader=B.prototype.get,B.prototype.set=function(e,t){if(z(e)){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&this.set(n,e[n]);return this}return this._header[e.toLowerCase()]=t,this.header[e]=t,this},B.prototype.unset=function(e){return delete this._header[e.toLowerCase()],delete this.header[e],this},B.prototype.field=function(e,t){if(null==e)throw new Error(".field(name, val) name can not be empty");if(this._data)throw new Error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()");if(z(e)){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&this.field(n,e[n]);return this}if(Array.isArray(t)){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&this.field(e,t[r]);return this}if(null==t)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof t&&(t=String(t)),this._getFormData().append(e,t),this},B.prototype.abort=function(){return this._aborted||(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort")),this},B.prototype._auth=function(e,t,n,r){switch(n.type){case"basic":this.set("Authorization","Basic ".concat(r("".concat(e,":").concat(t))));break;case"auto":this.username=e,this.password=t;break;case"bearer":this.set("Authorization","Bearer ".concat(e))}return this},B.prototype.withCredentials=function(e){return void 0===e&&(e=!0),this._withCredentials=e,this},B.prototype.redirects=function(e){return this._maxRedirects=e,this},B.prototype.maxResponseSize=function(e){if("number"!=typeof e)throw new TypeError("Invalid argument");return this._maxResponseSize=e,this},B.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},B.prototype.send=function(e){var t=z(e),n=this._header["content-type"];if(this._formData)throw new Error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()");if(t&&!this._data)Array.isArray(e)?this._data=[]:this._isHost(e)||(this._data={});else if(e&&this._data&&this._isHost(this._data))throw new Error("Can't merge these send calls");if(t&&z(this._data))for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(this._data[r]=e[r]);else"string"==typeof e?(n||this.type("form"),n=this._header["content-type"],this._data="application/x-www-form-urlencoded"===n?this._data?"".concat(this._data,"&").concat(e):e:(this._data||"")+e):this._data=e;return!t||this._isHost(e)||n||this.type("json"),this},B.prototype.sortQuery=function(e){return this._sort=void 0===e||e,this},B.prototype._finalizeQueryString=function(){var e=this._query.join("&");if(e&&(this.url+=(this.url.includes("?")?"&":"?")+e),this._query.length=0,this._sort){var t=this.url.indexOf("?");if(t>=0){var n=this.url.slice(t+1).split("&");"function"==typeof this._sort?n.sort(this._sort):n.sort(),this.url=this.url.slice(0,t)+"?"+n.join("&")}}},B.prototype._appendQueryString=function(){console.warn("Unsupported")},B.prototype._timeoutError=function(e,t,n){if(!this._aborted){var r=new Error("".concat(e+t,"ms exceeded"));r.timeout=t,r.code="ECONNABORTED",r.errno=n,this.timedout=!0,this.timedoutError=r,this.abort(),this.callback(r)}},B.prototype._setTimeouts=function(){var e=this;this._timeout&&!this._timer&&(this._timer=setTimeout((function(){e._timeoutError("Timeout of ",e._timeout,"ETIME")}),this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout((function(){e._timeoutError("Response timeout of ",e._responseTimeout,"ETIMEDOUT")}),this._responseTimeout))};var G=q;function q(e){if(e)return function(e){for(var t in q.prototype)Object.prototype.hasOwnProperty.call(q.prototype,t)&&(e[t]=q.prototype[t]);return e}(e)}function J(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function K(){this._defaults=[]}q.prototype.get=function(e){return this.header[e.toLowerCase()]},q.prototype._setHeaderProperties=function(e){var t=e["content-type"]||"";this.type=t.split(/ *; */).shift();var n=function(e){return e.split(/ *; */).reduce((function(e,t){var n=t.split(/ *= */),r=n.shift(),a=n.shift();return r&&a&&(e[r]=a),e}),{})}(t);for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(this[r]=n[r]);this.links={};try{e.link&&(this.links=function(e){return e.split(/ *, */).reduce((function(e,t){var n=t.split(/ *; */),r=n[0].slice(1,-1);return e[n[1].split(/ *= */)[1].slice(1,-1)]=r,e}),{})}(e.link))}catch(e){}},q.prototype._setStatusProperties=function(e){var t=e/100|0;this.statusCode=e,this.status=this.statusCode,this.statusType=t,this.info=1===t,this.ok=2===t,this.redirect=3===t,this.clientError=4===t,this.serverError=5===t,this.error=(4===t||5===t)&&this.toError(),this.created=201===e,this.accepted=202===e,this.noContent=204===e,this.badRequest=400===e,this.unauthorized=401===e,this.notAcceptable=406===e,this.forbidden=403===e,this.notFound=404===e,this.unprocessableEntity=422===e},["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert","disableTLSCerts"].forEach((function(e){K.prototype[e]=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this._defaults.push({fn:e,args:n}),this}})),K.prototype._setDefaults=function(e){this._defaults.forEach((function(t){e[t.fn].apply(e,function(e){return function(e){if(Array.isArray(e))return J(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return J(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?J(e,void 0):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t.args))}))};for(var $=K,X=o((function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var r;function a(){}"undefined"!=typeof window?r=window:"undefined"==typeof self?(console.warn("Using browser-only version of superagent in non-browser environment"),r=void 0):r=self,e.exports=function(e,n){return"function"==typeof n?new t.Request("GET",e).end(n):1===arguments.length?new t.Request("GET",e):new t.Request(e,n)};var o=t=e.exports;t.Request=p,o.getXHR=function(){if(r.XMLHttpRequest&&(!r.location||"file:"!==r.location.protocol||!r.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}throw new Error("Browser-only version of superagent could not find XHR")};var i="".trim?function(e){return e.trim()}:function(e){return e.replace(/(^\s*|\s*$)/g,"")};function s(e){if(!z(e))return e;var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&u(t,n,e[n]);return t.join("&")}function u(e,t,n){if(void 0!==n)if(null!==n)if(Array.isArray(n))n.forEach((function(n){u(e,t,n)}));else if(z(n))for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&u(e,"".concat(t,"[").concat(r,"]"),n[r]);else e.push(encodeURI(t)+"="+encodeURIComponent(n));else e.push(encodeURI(t))}function l(e){for(var t,n,r={},a=e.split("&"),o=0,i=a.length;o<i;++o)-1===(n=(t=a[o]).indexOf("="))?r[decodeURIComponent(t)]="":r[decodeURIComponent(t.slice(0,n))]=decodeURIComponent(t.slice(n+1));return r}function c(e){return/[/+]json($|[^-\w])/.test(e)}function d(e){this.req=e,this.xhr=this.req.xhr,this.text="HEAD"!==this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||void 0===this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText;var t=this.xhr.status;1223===t&&(t=204),this._setStatusProperties(t),this.headers=function(e){for(var t,n,r,a,o=e.split(/\r?\n/),s={},u=0,l=o.length;u<l;++u)-1!==(t=(n=o[u]).indexOf(":"))&&(r=n.slice(0,t).toLowerCase(),a=i(n.slice(t+1)),s[r]=a);return s}(this.xhr.getAllResponseHeaders()),this.header=this.headers,this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),null===this.text&&e._responseType?this.body=this.xhr.response:this.body="HEAD"===this.req.method?null:this._parseBody(this.text?this.text:this.xhr.response)}function p(e,t){var n=this;this._query=this._query||[],this.method=e,this.url=t,this.header={},this._header={},this.on("end",(function(){var e,t=null,r=null;try{r=new d(n)}catch(e){return(t=new Error("Parser is unable to parse the response")).parse=!0,t.original=e,n.xhr?(t.rawResponse=void 0===n.xhr.responseType?n.xhr.responseText:n.xhr.response,t.status=n.xhr.status?n.xhr.status:null,t.statusCode=t.status):(t.rawResponse=null,t.status=null),n.callback(t)}n.emit("response",r);try{n._isResponseOK(r)||(e=new Error(r.statusText||r.text||"Unsuccessful HTTP response"))}catch(t){e=t}e?(e.original=t,e.response=r,e.status=r.status,n.callback(e,r)):n.callback(null,r)}))}function f(e,t,n){var r=o("DELETE",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r}o.serializeObject=s,o.parseString=l,o.types={html:"text/html",json:"application/json",xml:"text/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},o.serialize={"application/x-www-form-urlencoded":s,"application/json":C},o.parse={"application/x-www-form-urlencoded":l,"application/json":JSON.parse},G(d.prototype),d.prototype._parseBody=function(e){var t=o.parse[this.type];return this.req._parser?this.req._parser(this,e):(!t&&c(this.type)&&(t=o.parse["application/json"]),t&&e&&(e.length>0||e instanceof Object)?t(e):null)},d.prototype.toError=function(){var e=this.req,t=e.method,n=e.url,r="cannot ".concat(t," ").concat(n," (").concat(this.status,")"),a=new Error(r);return a.status=this.status,a.method=t,a.url=n,a},o.Response=d,A(p.prototype),W(p.prototype),p.prototype.type=function(e){return this.set("Content-Type",o.types[e]||e),this},p.prototype.accept=function(e){return this.set("Accept",o.types[e]||e),this},p.prototype.auth=function(e,t,r){1===arguments.length&&(t=""),"object"===n(t)&&null!==t&&(r=t,t=""),r||(r={type:"function"==typeof btoa?"basic":"auto"});var a=function(e){if("function"==typeof btoa)return btoa(e);throw new Error("Cannot use basic auth, btoa is not a function")};return this._auth(e,t,r,a)},p.prototype.query=function(e){return"string"!=typeof e&&(e=s(e)),e&&this._query.push(e),this},p.prototype.attach=function(e,t,n){if(t){if(this._data)throw new Error("superagent can't mix .send() and .attach()");this._getFormData().append(e,t,n||t.name)}return this},p.prototype._getFormData=function(){return this._formData||(this._formData=new r.FormData),this._formData},p.prototype.callback=function(e,t){if(this._shouldRetry(e,t))return this._retry();var n=this._callback;this.clearTimeout(),e&&(this._maxRetries&&(e.retries=this._retries-1),this.emit("error",e)),n(e,t)},p.prototype.crossDomainError=function(){var e=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");e.crossDomain=!0,e.status=this.status,e.method=this.method,e.url=this.url,this.callback(e)},p.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},p.prototype.ca=p.prototype.agent,p.prototype.buffer=p.prototype.ca,p.prototype.write=function(){throw new Error("Streaming is not supported in browser version of superagent")},p.prototype.pipe=p.prototype.write,p.prototype._isHost=function(e){return e&&"object"===n(e)&&!Array.isArray(e)&&"[object Object]"!==Object.prototype.toString.call(e)},p.prototype.end=function(e){this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=e||a,this._finalizeQueryString(),this._end()},p.prototype._setUploadTimeout=function(){var e=this;this._uploadTimeout&&!this._uploadTimeoutTimer&&(this._uploadTimeoutTimer=setTimeout((function(){e._timeoutError("Upload timeout of ",e._uploadTimeout,"ETIMEDOUT")}),this._uploadTimeout))},p.prototype._end=function(){if(this._aborted)return this.callback(new Error("The request has been aborted even before .end() was called"));var e=this;this.xhr=o.getXHR();var t=this.xhr,n=this._formData||this._data;this._setTimeouts(),t.onreadystatechange=function(){var n=t.readyState;if(n>=2&&e._responseTimeoutTimer&&clearTimeout(e._responseTimeoutTimer),4===n){var r;try{r=t.status}catch(e){r=0}if(!r){if(e.timedout||e._aborted)return;return e.crossDomainError()}e.emit("end")}};var r=function(t,n){n.total>0&&(n.percent=n.loaded/n.total*100,100===n.percent&&clearTimeout(e._uploadTimeoutTimer)),n.direction=t,e.emit("progress",n)};if(this.hasListeners("progress"))try{t.addEventListener("progress",r.bind(null,"download")),t.upload&&t.upload.addEventListener("progress",r.bind(null,"upload"))}catch(e){}t.upload&&this._setUploadTimeout();try{this.username&&this.password?t.open(this.method,this.url,!0,this.username,this.password):t.open(this.method,this.url,!0)}catch(e){return this.callback(e)}if(this._withCredentials&&(t.withCredentials=!0),!this._formData&&"GET"!==this.method&&"HEAD"!==this.method&&"string"!=typeof n&&!this._isHost(n)){var a=this._header["content-type"],i=this._serializer||o.serialize[a?a.split(";")[0]:""];!i&&c(a)&&(i=o.serialize["application/json"]),i&&(n=i(n))}for(var s in this.header)null!==this.header[s]&&Object.prototype.hasOwnProperty.call(this.header,s)&&t.setRequestHeader(s,this.header[s]);this._responseType&&(t.responseType=this._responseType),this.emit("request",this),t.send(void 0===n?null:n)},o.agent=function(){return new $},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach((function(e){$.prototype[e.toLowerCase()]=function(t,n){var r=new o.Request(e,t);return this._setDefaults(r),n&&r.end(n),r}})),$.prototype.del=$.prototype.delete,o.get=function(e,t,n){var r=o("GET",e);return"function"==typeof t&&(n=t,t=null),t&&r.query(t),n&&r.end(n),r},o.head=function(e,t,n){var r=o("HEAD",e);return"function"==typeof t&&(n=t,t=null),t&&r.query(t),n&&r.end(n),r},o.options=function(e,t,n){var r=o("OPTIONS",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},o.del=f,o.delete=f,o.patch=function(e,t,n){var r=o("PATCH",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},o.post=function(e,t,n){var r=o("POST",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},o.put=function(e,t,n){var r=o("PUT",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r}})),Z=(X.Request,[]),Q=[],ee=("undefined"!=typeof Uint8Array&&Uint8Array,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),te=0,ne=ee.length;te<ne;++te)Z[te]=ee[te],Q[ee.charCodeAt(te)]=te;function re(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&t,[n,n===t?0:4-n%4]}function ae(e,t,n){for(var r,a,o=[],i=t;i<n;i+=3)r=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),o.push(Z[(a=r)>>18&63]+Z[a>>12&63]+Z[a>>6&63]+Z[63&a]);return o.join("")}Q["-".charCodeAt(0)]=62,Q["_".charCodeAt(0)]=63;var oe=function(e){for(var t,n=e.length,r=n%3,a=[],o=0,i=n-r;o<i;o+=16383)a.push(ae(e,o,o+16383>i?i:o+16383));return 1===r?(t=e[n-1],a.push(Z[t>>2]+Z[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],a.push(Z[t>>10]+Z[t>>4&63]+Z[t<<2&63]+"=")),a.join("")},ie=function(e){return oe(function(e){for(var t=new Array(e.length),n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}(e)).replace(/\+/g,"-").replace(/\//g,"_")},se={raw:"9.16.2"},ue=Object.prototype.toString;function le(e,t,n,r){if(n="array"===n?"object":n,e&&typeof e[t]!==n)throw new Error(r)}function ce(e,t,n){if(typeof e!==t)throw new Error(n)}function de(e,t,n){if(-1===t.indexOf(e))throw new Error(n)}var pe={check:function(e,t,n){if(t.optional&&!e||ce(e,t.type,t.message),"object"===t.type&&n)for(var r=Object.keys(n),a=0;a<r.length;a++){var o=r[a];n[o].optional&&!e[o]||n[o].condition&&!n[o].condition(e)||(le(e,o,n[o].type,n[o].message),n[o].values&&de(e[o],n[o].values,n[o].value_message))}},attribute:le,variable:ce,value:de,isArray:function(e){return this.supportsIsArray()?Array.isArray(e):"[object Array]"===ue.call(e)},supportsIsArray:function(){return null!=Array.isArray}};function fe(e){if(null==e)throw new TypeError("Cannot convert first argument to object");for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(null!=r)for(var a=Object.keys(Object(r)),o=0,i=a.length;o<i;o++){var s=a[o],u=Object.getOwnPropertyDescriptor(r,s);void 0!==u&&u.enumerable&&(t[s]=r[s])}}return t}var he=function(){return Object.assign?Object.assign:fe};function me(e,t){return t.reduce((function(t,n){return e[n]&&(t[n]=e[n]),t}),{})}function _e(e){var t=[];for(var n in e)t.push(e[n]);return t}function ye(){var e=_e(arguments);return e.unshift({}),he().apply(void 0,e)}function ge(e){var t=e.match(/^(https?:|file:|chrome-extension:)\/\/(([^:/?#]*)(?::([0-9]+))?)([/]{0,1}[^?#]*)(\?[^#]*|)(#.*|)$/);return t&&{href:e,protocol:t[1],host:t[2],hostname:t[3],port:t[4],pathname:t[5],search:t[6],hash:t[7]}}function ve(e,t){var n=ye(e);return e[t]&&(n[t]=e[t].trim()),n}var be={toSnakeCase:function e(t,n){return"object"!=typeof t||pe.isArray(t)||null===t?t:(n=n||[],Object.keys(t).reduce((function(r,a){return r[-1===n.indexOf(a)?function(e){for(var t,n="",r=0,a=!0,o=!0;r<e.length;)t=e.charCodeAt(r),!o&&t>=65&&t<=90||!a&&t>=48&&t<=57?(n+="_",n+=e[r].toLowerCase()):n+=e[r].toLowerCase(),a=t>=48&&t<=57,o=t>=65&&t<=90,r++;return n}(a):a]=e(t[a]),r}),{}))},toCamelCase:function e(t,n,r){return"object"!=typeof t||pe.isArray(t)||null===t?t:(n=n||[],r=r||{},Object.keys(t).reduce((function(a,o){var i,s=-1===n.indexOf(o)?(i=o.split("_")).reduce((function(e,t){return e+t.charAt(0).toUpperCase()+t.slice(1)}),i.shift()):o;return a[s]=e(t[s]||t[o],[],r),r.keepOriginal&&(a[o]=e(t[o],[],r)),a}),{}))},blacklist:function(e,t){return Object.keys(e).reduce((function(n,r){return-1===t.indexOf(r)&&(n[r]=e[r]),n}),{})},merge:function(e,t){return{base:t?me(e,t):e,with:function(e,t){return e=t?me(e,t):e,ye(this.base,e)}}},pick:me,getKeysNotIn:function(e,t){var n=[];for(var r in e)-1===t.indexOf(r)&&n.push(r);return n},extend:ye,getOriginFromUrl:function(e){if(e){var t=ge(e);if(!t)return null;var n=t.protocol+"//"+t.hostname;return t.port&&(n+=":"+t.port),n}},getLocationFromUrl:ge,trimUserDetails:function(e){return function(e,t){return["username","email","phoneNumber"].reduce(ve,e)}(e)},updatePropertyOn:function e(t,n,r){"string"==typeof n&&(n=n.split("."));var a=n[0];t.hasOwnProperty(a)&&(1===n.length?t[a]=r:e(t[a],n.slice(1),r))}};function we(e){this.request=e,this.method=e.method,this.url=e.url,this.body=e._data,this.headers=e._header}function Me(e){this.request=e}function Le(e){this._sendTelemetry=!1!==e._sendTelemetry||e._sendTelemetry,this._telemetryInfo=e._telemetryInfo||null,this._timesToRetryFailedRequests=e._timesToRetryFailedRequests,this.headers=e.headers||{},this._universalLoginPage=e.universalLoginPage}function Te(){return window}we.prototype.abort=function(){this.request.abort()},we.prototype.getMethod=function(){return this.method},we.prototype.getBody=function(){return this.body},we.prototype.getUrl=function(){return this.url},we.prototype.getHeaders=function(){return this.headers},Me.prototype.set=function(e,t){return this.request=this.request.set(e,t),this},Me.prototype.send=function(e){return this.request=this.request.send(be.trimUserDetails(e)),this},Me.prototype.withCredentials=function(){return this.request=this.request.withCredentials(),this},Me.prototype.end=function(e){return this.request.end(e),new we(this.request)},Le.prototype.setCommonConfiguration=function(e,t){if(t=t||{},this._timesToRetryFailedRequests>0&&(e=e.retry(this._timesToRetryFailedRequests)),t.noHeaders)return e;var n=this.headers;e=e.set("Content-Type","application/json");for(var r=Object.keys(this.headers),a=0;a<r.length;a++)e=e.set(r[a],n[r[a]]);return this._sendTelemetry&&(e=e.set("Auth0-Client",this.getTelemetryData())),e},Le.prototype.getTelemetryData=function(){var e=this._universalLoginPage?"auth0.js-ulp":"auth0.js",t={name:e,version:se.raw};this._telemetryInfo&&((t=be.extend({},this._telemetryInfo)).env=be.extend({},this._telemetryInfo.env),t.env[e]=se.raw);var n=JSON.stringify(t);return ie(n)},Le.prototype.get=function(e,t){return new Me(this.setCommonConfiguration(X.get(e),t))},Le.prototype.post=function(e,t){return new Me(this.setCommonConfiguration(X.post(e),t))},Le.prototype.patch=function(e,t){return new Me(this.setCommonConfiguration(X.patch(e),t))};var ke={redirect:function(e){Te().location=e},getDocument:function(){return Te().document},getWindow:Te,getOrigin:function(){var e=Te().location,t=e.origin;return t||(t=be.getOriginFromUrl(e.href)),t}};function xe(){}xe.prototype.getItem=function(){return null},xe.prototype.removeItem=function(){},xe.prototype.setItem=function(){};var Ee=o((function(e,t){var n;n=function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(r){function a(){}function o(t,n,o){if("undefined"!=typeof document){"number"==typeof(o=e({path:"/"},a.defaults,o)).expires&&(o.expires=new Date(1*new Date+864e5*o.expires)),o.expires=o.expires?o.expires.toUTCString():"";try{var i=JSON.stringify(n);/^[\{\[]/.test(i)&&(n=i)}catch(e){}n=r.write?r.write(n,t):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var s="";for(var u in o)o[u]&&(s+="; "+u,!0!==o[u]&&(s+="="+o[u].split(";")[0]));return document.cookie=t+"="+n+s}}function i(e,n){if("undefined"!=typeof document){for(var a={},o=document.cookie?document.cookie.split("; "):[],i=0;i<o.length;i++){var s=o[i].split("="),u=s.slice(1).join("=");n||'"'!==u.charAt(0)||(u=u.slice(1,-1));try{var l=t(s[0]);if(u=(r.read||r)(u,l)||t(u),n)try{u=JSON.parse(u)}catch(e){}if(a[l]=u,e===l)break}catch(e){}}return e?a[e]:a}}return a.set=o,a.get=function(e){return i(e,!1)},a.getJSON=function(e){return i(e,!0)},a.remove=function(t,n){o(t,"",e(n,{expires:-1}))},a.defaults={},a.withConverter=n,a}((function(){}))},e.exports=n()}));function Se(){}function Oe(e){this.disableWarnings=e.disableWarnings}function De(e){if(this.warn=new Oe({}),this.storage=new Se,!0===e.__tryLocalStorageFirst)try{var t=ke.getWindow().localStorage;t&&(this.storage=t)}catch(e){this.warn.warning(e),this.warn.warning("Can't use localStorage. Using CookieStorage instead.")}}function Ye(e){this.handler=new De(e)}function Ae(e){this.storage=new Ye(e)}function Ce(e,t){return{error:e,errorDescription:t}}Se.prototype.getItem=function(e){return Ee.get(e)},Se.prototype.removeItem=function(e){Ee.remove(e)},Se.prototype.setItem=function(e,t,n){var r=be.extend({expires:1},n);"https:"===ke.getWindow().location.protocol&&(r.secure=!0),Ee.set(e,t,r)},Oe.prototype.warning=function(e){this.disableWarnings||console.warn(e)},De.prototype.failover=function(){this.storage instanceof xe?this.warn.warning("DummyStorage: ignore failover"):this.storage instanceof Se?(this.warn.warning("CookieStorage: failing over DummyStorage"),this.storage=new xe):(this.warn.warning("LocalStorage: failing over CookieStorage"),this.storage=new Se)},De.prototype.getItem=function(e){try{return this.storage.getItem(e)}catch(t){return this.warn.warning(t),this.failover(),this.getItem(e)}},De.prototype.removeItem=function(e){try{return this.storage.removeItem(e)}catch(t){return this.warn.warning(t),this.failover(),this.removeItem(e)}},De.prototype.setItem=function(e,t,n){try{return this.storage.setItem(e,t,n)}catch(r){return this.warn.warning(r),this.failover(),this.setItem(e,t,n)}},Ye.prototype.getItem=function(e){var t=this.handler.getItem(e);try{return JSON.parse(t)}catch(e){return t}},Ye.prototype.removeItem=function(e){return this.handler.removeItem(e)},Ye.prototype.setItem=function(e,t,n){var r=JSON.stringify(t);return this.handler.setItem(e,r,n)},Ae.prototype.set=function(e,t){var n={lastUsedConnection:e,lastUsedSub:t};this.storage.setItem("auth0.ssodata",JSON.stringify(n))},Ae.prototype.get=function(){var e=this.storage.getItem("auth0.ssodata");if(e)return JSON.parse(e)};var je={buildResponse:Ce,invalidToken:function(e){return Ce("invalid_token",e)}};function Pe(e,t){return(t=t||{}).ignoreCasing=!!t.ignoreCasing&&t.ignoreCasing,function(n,r){var a;return n||r?(!n&&r.err&&(n=r.err,r=null),!n&&r.error&&(n=r,r=null),n?(a={original:n},be.updatePropertyOn(a,"original.response.req._data.password","*****"),n.response&&n.response.statusCode&&(a.statusCode=n.response.statusCode),n.response&&n.response.statusText&&(a.statusText=n.response.statusText),n.response&&n.response.body&&(n=n.response.body),n.err&&(n=n.err),a.code=n.code||n.error||n.error_code||n.status||null,a.description=n.errorDescription||n.error_description||n.description||n.error||n.details||n.err||null,t.forceLegacyError&&(a.error=a.code,a.error_description=a.description),n.error_codes&&n.error_details&&(a.errorDetails={codes:n.error_codes,details:n.error_details}),n.name&&(a.name=n.name),n.policy&&(a.policy=n.policy),e(a)):!r.type||"text/html"!==r.type&&"text/plain"!==r.type?t.ignoreCasing?e(null,r.body||r):e(null,be.toCamelCase(r.body||r,[],{keepOriginal:t.keepOriginalCasing})):e(null,r.text)):e(je.buildResponse("generic_error","Something went wrong"))}}var He=["realm","audience","otp","client_id","client_secret","redirect_uri","scope","code","grant_type","username","password","refresh_token","assertion","client_assertion","client_assertion_type","code_verifier"],Ie=["connection","connection_scope","auth0Client","owp","device","realm","organization","invitation","protocol","_csrf","_intstate","login_ticket","client_id","response_type","response_mode","redirect_uri","audience","scope","state","nonce","display","prompt","screen_hint","max_age","ui_locales","claims_locales","id_token_hint","login_hint","acr_values","claims","registration","request","request_uri","code_challenge","code_challenge_method","access_type","display"],Ne=function(e,t){return be.pick(t,He)},Re=function(e,t){var n=be.getKeysNotIn(t,Ie);return n.length>0&&e.warning("Following parameters are not allowed on the `/authorize` endpoint: ["+n.join(",")+"]"),t},Fe="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{};function ze(e){var t={exports:{}};return e(t,t.exports),t.exports}var Ue=ze((function(e,t){e.exports=function(){function e(e){return"function"==typeof e}var t=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},n=0,a=void 0,o=void 0,i=function(e,t){f[n]=e,f[n+1]=t,2===(n+=2)&&(o?o(h):v())},s="undefined"!=typeof window?window:void 0,u=s||{},l=u.MutationObserver||u.WebKitMutationObserver,c="undefined"==typeof self&&void 0!==r&&"[object process]"==={}.toString.call(r),d="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function p(){var e=setTimeout;return function(){return e(h,1)}}var f=new Array(1e3);function h(){for(var e=0;e<n;e+=2)(0,f[e])(f[e+1]),f[e]=void 0,f[e+1]=void 0;n=0}var m,_,y,g,v=void 0;function b(e,t){var n=this,r=new this.constructor(L);void 0===r[M]&&j(r);var a=n._state;if(a){var o=arguments[a-1];i((function(){return A(a,r,o,n._result)}))}else D(n,r,e,t);return r}function w(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=new this(L);return x(t,e),t}v=c?function(){return r.nextTick(h)}:l?(_=0,y=new l(h),g=document.createTextNode(""),y.observe(g,{characterData:!0}),function(){g.data=_=++_%2}):d?((m=new MessageChannel).port1.onmessage=h,function(){return m.port2.postMessage(0)}):void 0===s?function(){try{var e=Function("return this")().require("vertx");return void 0!==(a=e.runOnLoop||e.runOnContext)?function(){a(h)}:p()}catch(e){return p()}}():p();var M=Math.random().toString(36).substring(2);function L(){}var T=void 0;function k(t,n,r){n.constructor===t.constructor&&r===b&&n.constructor.resolve===w?function(e,t){1===t._state?S(e,t._result):2===t._state?O(e,t._result):D(t,void 0,(function(t){return x(e,t)}),(function(t){return O(e,t)}))}(t,n):void 0===r?S(t,n):e(r)?function(e,t,n){i((function(e){var r=!1,a=function(n,a,o,i){try{n.call(a,(function(n){r||(r=!0,t!==n?x(e,n):S(e,n))}),(function(t){r||(r=!0,O(e,t))}))}catch(e){return e}}(n,t);!r&&a&&(r=!0,O(e,a))}),e)}(t,n,r):S(t,n)}function x(e,t){if(e===t)O(e,new TypeError("You cannot resolve a promise with itself"));else if(a=typeof(r=t),null===r||"object"!==a&&"function"!==a)S(e,t);else{var n=void 0;try{n=t.then}catch(t){return void O(e,t)}k(e,t,n)}var r,a}function E(e){e._onerror&&e._onerror(e._result),Y(e)}function S(e,t){e._state===T&&(e._result=t,e._state=1,0!==e._subscribers.length&&i(Y,e))}function O(e,t){e._state===T&&(e._state=2,e._result=t,i(E,e))}function D(e,t,n,r){var a=e._subscribers,o=a.length;e._onerror=null,a[o]=t,a[o+1]=n,a[o+2]=r,0===o&&e._state&&i(Y,e)}function Y(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r=void 0,a=void 0,o=e._result,i=0;i<t.length;i+=3)a=t[i+n],(r=t[i])?A(n,r,a,o):a(o);e._subscribers.length=0}}function A(t,n,r,a){var o=e(r),i=void 0,s=void 0,u=!0;if(o){try{i=r(a)}catch(t){u=!1,s=t}if(n===i)return void O(n,new TypeError("A promises callback cannot return that same promise."))}else i=a;n._state!==T||(o&&u?x(n,i):!1===u?O(n,s):1===t?S(n,i):2===t&&O(n,i))}var C=0;function j(e){e[M]=C++,e._state=void 0,e._result=void 0,e._subscribers=[]}var P=function(){function e(e,n){this._instanceConstructor=e,this.promise=new e(L),this.promise[M]||j(this.promise),t(n)?(this.length=n.length,this._remaining=n.length,this._result=new Array(this.length),0===this.length?S(this.promise,this._result):(this.length=this.length||0,this._enumerate(n),0===this._remaining&&S(this.promise,this._result))):O(this.promise,new Error("Array Methods must be provided an Array"))}return e.prototype._enumerate=function(e){for(var t=0;this._state===T&&t<e.length;t++)this._eachEntry(e[t],t)},e.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,r=n.resolve;if(r===w){var a=void 0,o=void 0,i=!1;try{a=e.then}catch(e){i=!0,o=e}if(a===b&&e._state!==T)this._settledAt(e._state,t,e._result);else if("function"!=typeof a)this._remaining--,this._result[t]=e;else if(n===H){var s=new n(L);i?O(s,o):k(s,e,a),this._willSettleAt(s,t)}else this._willSettleAt(new n((function(t){return t(e)})),t)}else this._willSettleAt(r(e),t)},e.prototype._settledAt=function(e,t,n){var r=this.promise;r._state===T&&(this._remaining--,2===e?O(r,n):this._result[t]=n),0===this._remaining&&S(r,this._result)},e.prototype._willSettleAt=function(e,t){var n=this;D(e,void 0,(function(e){return n._settledAt(1,t,e)}),(function(e){return n._settledAt(2,t,e)}))},e}(),H=function(){function t(e){this[M]=C++,this._result=this._state=void 0,this._subscribers=[],L!==e&&("function"!=typeof e&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof t?function(e,t){try{t((function(t){x(e,t)}),(function(t){O(e,t)}))}catch(t){O(e,t)}}(this,e):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return t.prototype.catch=function(e){return this.then(null,e)},t.prototype.finally=function(t){var n=this,r=n.constructor;return e(t)?n.then((function(e){return r.resolve(t()).then((function(){return e}))}),(function(e){return r.resolve(t()).then((function(){throw e}))})):n.then(t,t)},t}();return H.prototype.then=b,H.all=function(e){return new P(this,e).promise},H.race=function(e){var n=this;return t(e)?new n((function(t,r){for(var a=e.length,o=0;o<a;o++)n.resolve(e[o]).then(t,r)})):new n((function(e,t){return t(new TypeError("You must pass an array to race."))}))},H.resolve=w,H.reject=function(e){var t=new this(L);return O(t,e),t},H._setScheduler=function(e){o=e},H._setAsap=function(e){i=e},H._asap=i,H.polyfill=function(){var e=void 0;if(void 0!==Fe)e=Fe;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var n=null;try{n=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===n&&!t.cast)return}e.Promise=H},H.Promise=H,H}()})),We=ze((function(e,t){var n;e.exports=n=n||function(e,t){var n=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),r={},a=r.lib={},o=a.Base={extend:function(e){var t=n(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},i=a.WordArray=o.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||u).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,a=e.sigBytes;if(this.clamp(),r%4)for(var o=0;o<a;o++)t[r+o>>>2]|=(n[o>>>2]>>>24-o%4*8&255)<<24-(r+o)%4*8;else for(o=0;o<a;o+=4)t[r+o>>>2]=n[o>>>2];return this.sigBytes+=a,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=o.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n,r=[],a=function(t){t=t;var n=987654321,r=4294967295;return function(){var a=((n=36969*(65535&n)+(n>>16)&r)<<16)+(t=18e3*(65535&t)+(t>>16)&r)&r;return a/=4294967296,(a+=.5)*(e.random()>.5?1:-1)}},o=0;o<t;o+=4){var s=a(4294967296*(n||e.random()));n=987654071*s(),r.push(4294967296*s()|0)}return new i.init(r,t)}}),s=r.enc={},u=s.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],a=0;a<n;a++){var o=t[a>>>2]>>>24-a%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new i.init(n,t/2)}},l=s.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],a=0;a<n;a++)r.push(String.fromCharCode(t[a>>>2]>>>24-a%4*8&255));return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new i.init(n,t)}},c=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(l.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return l.parse(unescape(encodeURIComponent(e)))}},d=a.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new i.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=c.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,r=n.words,a=n.sigBytes,o=this.blockSize,s=a/(4*o),u=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*o,l=e.min(4*u,a);if(u){for(var c=0;c<u;c+=o)this._doProcessBlock(r,c);var d=r.splice(0,u);n.sigBytes-=l}return new i.init(d,l)},clone:function(){var e=o.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});a.Hasher=d.extend({cfg:o.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){d.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new p.HMAC.init(e,n).finalize(t)}}});var p=r.algo={};return r}(Math)})),Be=ze((function(e,t){var n;e.exports=(n=We,function(e){var t=n,r=t.lib,a=r.WordArray,o=r.Hasher,i=t.algo,s=[],u=[];!function(){function t(t){for(var n=e.sqrt(t),r=2;r<=n;r++)if(!(t%r))return!1;return!0}function n(e){return 4294967296*(e-(0|e))|0}for(var r=2,a=0;a<64;)t(r)&&(a<8&&(s[a]=n(e.pow(r,.5))),u[a]=n(e.pow(r,1/3)),a++),r++}();var l=[],c=i.SHA256=o.extend({_doReset:function(){this._hash=new a.init(s.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],a=n[1],o=n[2],i=n[3],s=n[4],c=n[5],d=n[6],p=n[7],f=0;f<64;f++){if(f<16)l[f]=0|e[t+f];else{var h=l[f-15],m=l[f-2];l[f]=((h<<25|h>>>7)^(h<<14|h>>>18)^h>>>3)+l[f-7]+((m<<15|m>>>17)^(m<<13|m>>>19)^m>>>10)+l[f-16]}var _=r&a^r&o^a&o,y=p+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&c^~s&d)+u[f]+l[f];p=d,d=c,c=s,s=i+y|0,i=o,o=a,a=r,r=y+(((r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22))+_)|0}n[0]=n[0]+r|0,n[1]=n[1]+a|0,n[2]=n[2]+o|0,n[3]=n[3]+i|0,n[4]=n[4]+s|0,n[5]=n[5]+c|0,n[6]=n[6]+d|0,n[7]=n[7]+p|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,a=8*t.sigBytes;return n[a>>>5]|=128<<24-a%32,n[14+(a+64>>>9<<4)]=e.floor(r/4294967296),n[15+(a+64>>>9<<4)]=r,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=o._createHelper(c),t.HmacSHA256=o._createHmacHelper(c)}(Math),n.SHA256)})),Ve=ze((function(e,t){var n,r;e.exports=(r=(n=We).lib.WordArray,n.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,r=this._map;e.clamp();for(var a=[],o=0;o<n;o+=3)for(var i=(t[o>>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,s=0;s<4&&o+.75*s<n;s++)a.push(r.charAt(i>>>6*(3-s)&63));var u=r.charAt(64);if(u)for(;a.length%4;)a.push(u);return a.join("")},parse:function(e){var t=e.length,n=this._map,a=this._reverseMap;if(!a){a=this._reverseMap=[];for(var o=0;o<n.length;o++)a[n.charCodeAt(o)]=o}var i=n.charAt(64);if(i){var s=e.indexOf(i);-1!==s&&(t=s)}return function(e,t,n){for(var a=[],o=0,i=0;i<t;i++)if(i%4){var s=n[e.charCodeAt(i-1)]<<i%4*2,u=n[e.charCodeAt(i)]>>>6-i%4*2;a[o>>>2]|=(s|u)<<24-o%4*8,o++}return r.create(a,o)}(e,t,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},n.enc.Base64)})),Ge=ze((function(e,t){e.exports=We.enc.Hex})),qe=ze((function(e,t){(function(){var t;function n(e,t,n){null!=e&&("number"==typeof e?this.fromNumber(e,t,n):this.fromString(e,null==t&&"string"!=typeof e?256:t))}function r(){return new n(null)}var a="undefined"!=typeof navigator;a&&"Microsoft Internet Explorer"==navigator.appName?(n.prototype.am=function(e,t,n,r,a,o){for(var i=32767&t,s=t>>15;--o>=0;){var u=32767&this[e],l=this[e++]>>15,c=s*u+l*i;a=((u=i*u+((32767&c)<<15)+n[r]+(1073741823&a))>>>30)+(c>>>15)+s*l+(a>>>30),n[r++]=1073741823&u}return a},t=30):a&&"Netscape"!=navigator.appName?(n.prototype.am=function(e,t,n,r,a,o){for(;--o>=0;){var i=t*this[e++]+n[r]+a;a=Math.floor(i/67108864),n[r++]=67108863&i}return a},t=26):(n.prototype.am=function(e,t,n,r,a,o){for(var i=16383&t,s=t>>14;--o>=0;){var u=16383&this[e],l=this[e++]>>14,c=s*u+l*i;a=((u=i*u+((16383&c)<<14)+n[r]+a)>>28)+(c>>14)+s*l,n[r++]=268435455&u}return a},t=28),n.prototype.DB=t,n.prototype.DM=(1<<t)-1,n.prototype.DV=1<<t,n.prototype.FV=Math.pow(2,52),n.prototype.F1=52-t,n.prototype.F2=2*t-52;var o,i,s=new Array;for(o="0".charCodeAt(0),i=0;i<=9;++i)s[o++]=i;for(o="a".charCodeAt(0),i=10;i<36;++i)s[o++]=i;for(o="A".charCodeAt(0),i=10;i<36;++i)s[o++]=i;function u(e){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(e)}function l(e,t){var n=s[e.charCodeAt(t)];return null==n?-1:n}function c(e){var t=r();return t.fromInt(e),t}function d(e){var t,n=1;return 0!=(t=e>>>16)&&(e=t,n+=16),0!=(t=e>>8)&&(e=t,n+=8),0!=(t=e>>4)&&(e=t,n+=4),0!=(t=e>>2)&&(e=t,n+=2),0!=(t=e>>1)&&(e=t,n+=1),n}function p(e){this.m=e}function f(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}function h(e,t){return e&t}function m(e,t){return e|t}function _(e,t){return e^t}function y(e,t){return e&~t}function g(e){if(0==e)return-1;var t=0;return 0==(65535&e)&&(e>>=16,t+=16),0==(255&e)&&(e>>=8,t+=8),0==(15&e)&&(e>>=4,t+=4),0==(3&e)&&(e>>=2,t+=2),0==(1&e)&&++t,t}function v(e){for(var t=0;0!=e;)e&=e-1,++t;return t}function b(){}function w(e){return e}function M(e){this.r2=r(),this.q3=r(),n.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}p.prototype.convert=function(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e},p.prototype.revert=function(e){return e},p.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},p.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},p.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},f.prototype.convert=function(e){var t=r();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(n.ZERO)>0&&this.m.subTo(t,t),t},f.prototype.revert=function(e){var t=r();return e.copyTo(t),this.reduce(t),t},f.prototype.reduce=function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t<this.m.t;++t){var n=32767&e[t],r=n*this.mpl+((n*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(e[n=t+this.m.t]+=this.m.am(0,r,e,t,0,this.m.t);e[n]>=e.DV;)e[n]-=e.DV,e[++n]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},f.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},f.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},n.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s},n.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0},n.prototype.fromString=function(e,t){var r;if(16==t)r=4;else if(8==t)r=3;else if(256==t)r=8;else if(2==t)r=1;else if(32==t)r=5;else{if(4!=t)return void this.fromRadix(e,t);r=2}this.t=0,this.s=0;for(var a=e.length,o=!1,i=0;--a>=0;){var s=8==r?255&e[a]:l(e,a);s<0?"-"==e.charAt(a)&&(o=!0):(o=!1,0==i?this[this.t++]=s:i+r>this.DB?(this[this.t-1]|=(s&(1<<this.DB-i)-1)<<i,this[this.t++]=s>>this.DB-i):this[this.t-1]|=s<<i,(i+=r)>=this.DB&&(i-=this.DB))}8==r&&0!=(128&e[0])&&(this.s=-1,i>0&&(this[this.t-1]|=(1<<this.DB-i)-1<<i)),this.clamp(),o&&n.ZERO.subTo(this,this)},n.prototype.clamp=function(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t},n.prototype.dlShiftTo=function(e,t){var n;for(n=this.t-1;n>=0;--n)t[n+e]=this[n];for(n=e-1;n>=0;--n)t[n]=0;t.t=this.t+e,t.s=this.s},n.prototype.drShiftTo=function(e,t){for(var n=e;n<this.t;++n)t[n-e]=this[n];t.t=Math.max(this.t-e,0),t.s=this.s},n.prototype.lShiftTo=function(e,t){var n,r=e%this.DB,a=this.DB-r,o=(1<<a)-1,i=Math.floor(e/this.DB),s=this.s<<r&this.DM;for(n=this.t-1;n>=0;--n)t[n+i+1]=this[n]>>a|s,s=(this[n]&o)<<r;for(n=i-1;n>=0;--n)t[n]=0;t[i]=s,t.t=this.t+i+1,t.s=this.s,t.clamp()},n.prototype.rShiftTo=function(e,t){t.s=this.s;var n=Math.floor(e/this.DB);if(n>=this.t)t.t=0;else{var r=e%this.DB,a=this.DB-r,o=(1<<r)-1;t[0]=this[n]>>r;for(var i=n+1;i<this.t;++i)t[i-n-1]|=(this[i]&o)<<a,t[i-n]=this[i]>>r;r>0&&(t[this.t-n-1]|=(this.s&o)<<a),t.t=this.t-n,t.clamp()}},n.prototype.subTo=function(e,t){for(var n=0,r=0,a=Math.min(e.t,this.t);n<a;)r+=this[n]-e[n],t[n++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r-=e.s;n<this.t;)r+=this[n],t[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<e.t;)r-=e[n],t[n++]=r&this.DM,r>>=this.DB;r-=e.s}t.s=r<0?-1:0,r<-1?t[n++]=this.DV+r:r>0&&(t[n++]=r),t.t=n,t.clamp()},n.prototype.multiplyTo=function(e,t){var r=this.abs(),a=e.abs(),o=r.t;for(t.t=o+a.t;--o>=0;)t[o]=0;for(o=0;o<a.t;++o)t[o+r.t]=r.am(0,a[o],t,o,0,r.t);t.s=0,t.clamp(),this.s!=e.s&&n.ZERO.subTo(t,t)},n.prototype.squareTo=function(e){for(var t=this.abs(),n=e.t=2*t.t;--n>=0;)e[n]=0;for(n=0;n<t.t-1;++n){var r=t.am(n,t[n],e,2*n,0,1);(e[n+t.t]+=t.am(n+1,2*t[n],e,2*n+1,r,t.t-n-1))>=t.DV&&(e[n+t.t]-=t.DV,e[n+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(n,t[n],e,2*n,0,1)),e.s=0,e.clamp()},n.prototype.divRemTo=function(e,t,a){var o=e.abs();if(!(o.t<=0)){var i=this.abs();if(i.t<o.t)return null!=t&&t.fromInt(0),void(null!=a&&this.copyTo(a));null==a&&(a=r());var s=r(),u=this.s,l=e.s,c=this.DB-d(o[o.t-1]);c>0?(o.lShiftTo(c,s),i.lShiftTo(c,a)):(o.copyTo(s),i.copyTo(a));var p=s.t,f=s[p-1];if(0!=f){var h=f*(1<<this.F1)+(p>1?s[p-2]>>this.F2:0),m=this.FV/h,_=(1<<this.F1)/h,y=1<<this.F2,g=a.t,v=g-p,b=null==t?r():t;for(s.dlShiftTo(v,b),a.compareTo(b)>=0&&(a[a.t++]=1,a.subTo(b,a)),n.ONE.dlShiftTo(p,b),b.subTo(s,s);s.t<p;)s[s.t++]=0;for(;--v>=0;){var w=a[--g]==f?this.DM:Math.floor(a[g]*m+(a[g-1]+y)*_);if((a[g]+=s.am(0,w,a,v,0,p))<w)for(s.dlShiftTo(v,b),a.subTo(b,a);a[g]<--w;)a.subTo(b,a)}null!=t&&(a.drShiftTo(p,t),u!=l&&n.ZERO.subTo(t,t)),a.t=p,a.clamp(),c>0&&a.rShiftTo(c,a),u<0&&n.ZERO.subTo(a,a)}}},n.prototype.invDigit=function(){if(this.t<1)return 0;var e=this[0];if(0==(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},n.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},n.prototype.exp=function(e,t){if(e>4294967295||e<1)return n.ONE;var a=r(),o=r(),i=t.convert(this),s=d(e)-1;for(i.copyTo(a);--s>=0;)if(t.sqrTo(a,o),(e&1<<s)>0)t.mulTo(o,i,a);else{var u=a;a=o,o=u}return t.revert(a)},n.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)return this.toRadix(e);t=2}var n,r=(1<<t)-1,a=!1,o="",i=this.t,s=this.DB-i*this.DB%t;if(i-- >0)for(s<this.DB&&(n=this[i]>>s)>0&&(a=!0,o=u(n));i>=0;)s<t?(n=(this[i]&(1<<s)-1)<<t-s,n|=this[--i]>>(s+=this.DB-t)):(n=this[i]>>(s-=t)&r,s<=0&&(s+=this.DB,--i)),n>0&&(a=!0),a&&(o+=u(n));return a?o:"0"},n.prototype.negate=function(){var e=r();return n.ZERO.subTo(this,e),e},n.prototype.abs=function(){return this.s<0?this.negate():this},n.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var n=this.t;if(0!=(t=n-e.t))return this.s<0?-t:t;for(;--n>=0;)if(0!=(t=this[n]-e[n]))return t;return 0},n.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+d(this[this.t-1]^this.s&this.DM)},n.prototype.mod=function(e){var t=r();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(n.ZERO)>0&&e.subTo(t,t),t},n.prototype.modPowInt=function(e,t){var n;return n=e<256||t.isEven()?new p(t):new f(t),this.exp(e,n)},n.ZERO=c(0),n.ONE=c(1),b.prototype.convert=w,b.prototype.revert=w,b.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n)},b.prototype.sqrTo=function(e,t){e.squareTo(t)},M.prototype.convert=function(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=r();return e.copyTo(t),this.reduce(t),t},M.prototype.revert=function(e){return e},M.prototype.reduce=function(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)},M.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},M.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)};var L,T,k,x=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],E=(1<<26)/x[x.length-1];function S(){var e;e=(new Date).getTime(),T[k++]^=255&e,T[k++]^=e>>8&255,T[k++]^=e>>16&255,T[k++]^=e>>24&255,k>=P&&(k-=P)}if(n.prototype.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},n.prototype.toRadix=function(e){if(null==e&&(e=10),0==this.signum()||e<2||e>36)return"0";var t=this.chunkSize(e),n=Math.pow(e,t),a=c(n),o=r(),i=r(),s="";for(this.divRemTo(a,o,i);o.signum()>0;)s=(n+i.intValue()).toString(e).substr(1)+s,o.divRemTo(a,o,i);return i.intValue().toString(e)+s},n.prototype.fromRadix=function(e,t){this.fromInt(0),null==t&&(t=10);for(var r=this.chunkSize(t),a=Math.pow(t,r),o=!1,i=0,s=0,u=0;u<e.length;++u){var c=l(e,u);c<0?"-"==e.charAt(u)&&0==this.signum()&&(o=!0):(s=t*s+c,++i>=r&&(this.dMultiply(a),this.dAddOffset(s,0),i=0,s=0))}i>0&&(this.dMultiply(Math.pow(t,i)),this.dAddOffset(s,0)),o&&n.ZERO.subTo(this,this)},n.prototype.fromNumber=function(e,t,r){if("number"==typeof t)if(e<2)this.fromInt(1);else for(this.fromNumber(e,r),this.testBit(e-1)||this.bitwiseTo(n.ONE.shiftLeft(e-1),m,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(n.ONE.shiftLeft(e-1),this);else{var a=new Array,o=7&e;a.length=1+(e>>3),t.nextBytes(a),o>0?a[0]&=(1<<o)-1:a[0]=0,this.fromString(a,256)}},n.prototype.bitwiseTo=function(e,t,n){var r,a,o=Math.min(e.t,this.t);for(r=0;r<o;++r)n[r]=t(this[r],e[r]);if(e.t<this.t){for(a=e.s&this.DM,r=o;r<this.t;++r)n[r]=t(this[r],a);n.t=this.t}else{for(a=this.s&this.DM,r=o;r<e.t;++r)n[r]=t(a,e[r]);n.t=e.t}n.s=t(this.s,e.s),n.clamp()},n.prototype.changeBit=function(e,t){var r=n.ONE.shiftLeft(e);return this.bitwiseTo(r,t,r),r},n.prototype.addTo=function(e,t){for(var n=0,r=0,a=Math.min(e.t,this.t);n<a;)r+=this[n]+e[n],t[n++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r+=e.s;n<this.t;)r+=this[n],t[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<e.t;)r+=e[n],t[n++]=r&this.DM,r>>=this.DB;r+=e.s}t.s=r<0?-1:0,r>0?t[n++]=r:r<-1&&(t[n++]=this.DV+r),t.t=n,t.clamp()},n.prototype.dMultiply=function(e){this[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},n.prototype.dAddOffset=function(e,t){if(0!=e){for(;this.t<=t;)this[this.t++]=0;for(this[t]+=e;this[t]>=this.DV;)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}},n.prototype.multiplyLowerTo=function(e,t,n){var r,a=Math.min(this.t+e.t,t);for(n.s=0,n.t=a;a>0;)n[--a]=0;for(r=n.t-this.t;a<r;++a)n[a+this.t]=this.am(0,e[a],n,a,0,this.t);for(r=Math.min(e.t,t);a<r;++a)this.am(0,e[a],n,a,0,t-a);n.clamp()},n.prototype.multiplyUpperTo=function(e,t,n){--t;var r=n.t=this.t+e.t-t;for(n.s=0;--r>=0;)n[r]=0;for(r=Math.max(t-this.t,0);r<e.t;++r)n[this.t+r-t]=this.am(t-r,e[r],n,0,0,this.t+r-t);n.clamp(),n.drShiftTo(1,n)},n.prototype.modInt=function(e){if(e<=0)return 0;var t=this.DV%e,n=this.s<0?e-1:0;if(this.t>0)if(0==t)n=this[0]%e;else for(var r=this.t-1;r>=0;--r)n=(t*n+this[r])%e;return n},n.prototype.millerRabin=function(e){var t=this.subtract(n.ONE),a=t.getLowestSetBit();if(a<=0)return!1;var o=t.shiftRight(a);(e=e+1>>1)>x.length&&(e=x.length);for(var i=r(),s=0;s<e;++s){i.fromInt(x[Math.floor(Math.random()*x.length)]);var u=i.modPow(o,this);if(0!=u.compareTo(n.ONE)&&0!=u.compareTo(t)){for(var l=1;l++<a&&0!=u.compareTo(t);)if(0==(u=u.modPowInt(2,this)).compareTo(n.ONE))return!1;if(0!=u.compareTo(t))return!1}}return!0},n.prototype.clone=function(){var e=r();return this.copyTo(e),e},n.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},n.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},n.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},n.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},n.prototype.toByteArray=function(){var e=this.t,t=new Array;t[0]=this.s;var n,r=this.DB-e*this.DB%8,a=0;if(e-- >0)for(r<this.DB&&(n=this[e]>>r)!=(this.s&this.DM)>>r&&(t[a++]=n|this.s<<this.DB-r);e>=0;)r<8?(n=(this[e]&(1<<r)-1)<<8-r,n|=this[--e]>>(r+=this.DB-8)):(n=this[e]>>(r-=8)&255,r<=0&&(r+=this.DB,--e)),0!=(128&n)&&(n|=-256),0==a&&(128&this.s)!=(128&n)&&++a,(a>0||n!=this.s)&&(t[a++]=n);return t},n.prototype.equals=function(e){return 0==this.compareTo(e)},n.prototype.min=function(e){return this.compareTo(e)<0?this:e},n.prototype.max=function(e){return this.compareTo(e)>0?this:e},n.prototype.and=function(e){var t=r();return this.bitwiseTo(e,h,t),t},n.prototype.or=function(e){var t=r();return this.bitwiseTo(e,m,t),t},n.prototype.xor=function(e){var t=r();return this.bitwiseTo(e,_,t),t},n.prototype.andNot=function(e){var t=r();return this.bitwiseTo(e,y,t),t},n.prototype.not=function(){for(var e=r(),t=0;t<this.t;++t)e[t]=this.DM&~this[t];return e.t=this.t,e.s=~this.s,e},n.prototype.shiftLeft=function(e){var t=r();return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t},n.prototype.shiftRight=function(e){var t=r();return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t},n.prototype.getLowestSetBit=function(){for(var e=0;e<this.t;++e)if(0!=this[e])return e*this.DB+g(this[e]);return this.s<0?this.t*this.DB:-1},n.prototype.bitCount=function(){for(var e=0,t=this.s&this.DM,n=0;n<this.t;++n)e+=v(this[n]^t);return e},n.prototype.testBit=function(e){var t=Math.floor(e/this.DB);return t>=this.t?0!=this.s:0!=(this[t]&1<<e%this.DB)},n.prototype.setBit=function(e){return this.changeBit(e,m)},n.prototype.clearBit=function(e){return this.changeBit(e,y)},n.prototype.flipBit=function(e){return this.changeBit(e,_)},n.prototype.add=function(e){var t=r();return this.addTo(e,t),t},n.prototype.subtract=function(e){var t=r();return this.subTo(e,t),t},n.prototype.multiply=function(e){var t=r();return this.multiplyTo(e,t),t},n.prototype.divide=function(e){var t=r();return this.divRemTo(e,t,null),t},n.prototype.remainder=function(e){var t=r();return this.divRemTo(e,null,t),t},n.prototype.divideAndRemainder=function(e){var t=r(),n=r();return this.divRemTo(e,t,n),new Array(t,n)},n.prototype.modPow=function(e,t){var n,a,o=e.bitLength(),i=c(1);if(o<=0)return i;n=o<18?1:o<48?3:o<144?4:o<768?5:6,a=o<8?new p(t):t.isEven()?new M(t):new f(t);var s=new Array,u=3,l=n-1,h=(1<<n)-1;if(s[1]=a.convert(this),n>1){var m=r();for(a.sqrTo(s[1],m);u<=h;)s[u]=r(),a.mulTo(m,s[u-2],s[u]),u+=2}var _,y,g=e.t-1,v=!0,b=r();for(o=d(e[g])-1;g>=0;){for(o>=l?_=e[g]>>o-l&h:(_=(e[g]&(1<<o+1)-1)<<l-o,g>0&&(_|=e[g-1]>>this.DB+o-l)),u=n;0==(1&_);)_>>=1,--u;if((o-=u)<0&&(o+=this.DB,--g),v)s[_].copyTo(i),v=!1;else{for(;u>1;)a.sqrTo(i,b),a.sqrTo(b,i),u-=2;u>0?a.sqrTo(i,b):(y=i,i=b,b=y),a.mulTo(b,s[_],i)}for(;g>=0&&0==(e[g]&1<<o);)a.sqrTo(i,b),y=i,i=b,b=y,--o<0&&(o=this.DB-1,--g)}return a.revert(i)},n.prototype.modInverse=function(e){var t=e.isEven();if(this.isEven()&&t||0==e.signum())return n.ZERO;for(var r=e.clone(),a=this.clone(),o=c(1),i=c(0),s=c(0),u=c(1);0!=r.signum();){for(;r.isEven();)r.rShiftTo(1,r),t?(o.isEven()&&i.isEven()||(o.addTo(this,o),i.subTo(e,i)),o.rShiftTo(1,o)):i.isEven()||i.subTo(e,i),i.rShiftTo(1,i);for(;a.isEven();)a.rShiftTo(1,a),t?(s.isEven()&&u.isEven()||(s.addTo(this,s),u.subTo(e,u)),s.rShiftTo(1,s)):u.isEven()||u.subTo(e,u),u.rShiftTo(1,u);r.compareTo(a)>=0?(r.subTo(a,r),t&&o.subTo(s,o),i.subTo(u,i)):(a.subTo(r,a),t&&s.subTo(o,s),u.subTo(i,u))}return 0!=a.compareTo(n.ONE)?n.ZERO:u.compareTo(e)>=0?u.subtract(e):u.signum()<0?(u.addTo(e,u),u.signum()<0?u.add(e):u):u},n.prototype.pow=function(e){return this.exp(e,new b)},n.prototype.gcd=function(e){var t=this.s<0?this.negate():this.clone(),n=e.s<0?e.negate():e.clone();if(t.compareTo(n)<0){var r=t;t=n,n=r}var a=t.getLowestSetBit(),o=n.getLowestSetBit();if(o<0)return t;for(a<o&&(o=a),o>0&&(t.rShiftTo(o,t),n.rShiftTo(o,n));t.signum()>0;)(a=t.getLowestSetBit())>0&&t.rShiftTo(a,t),(a=n.getLowestSetBit())>0&&n.rShiftTo(a,n),t.compareTo(n)>=0?(t.subTo(n,t),t.rShiftTo(1,t)):(n.subTo(t,n),n.rShiftTo(1,n));return o>0&&n.lShiftTo(o,n),n},n.prototype.isProbablePrime=function(e){var t,n=this.abs();if(1==n.t&&n[0]<=x[x.length-1]){for(t=0;t<x.length;++t)if(n[0]==x[t])return!0;return!1}if(n.isEven())return!1;for(t=1;t<x.length;){for(var r=x[t],a=t+1;a<x.length&&r<E;)r*=x[a++];for(r=n.modInt(r);t<a;)if(r%x[t++]==0)return!1}return n.millerRabin(e)},n.prototype.square=function(){var e=r();return this.squareTo(e),e},n.prototype.Barrett=M,null==T){var O;if(T=new Array,k=0,"undefined"!=typeof window&&window.crypto)if(window.crypto.getRandomValues){var D=new Uint8Array(32);for(window.crypto.getRandomValues(D),O=0;O<32;++O)T[k++]=D[O]}else if("Netscape"==navigator.appName&&navigator.appVersion<"5"){var Y=window.crypto.random(32);for(O=0;O<Y.length;++O)T[k++]=255&Y.charCodeAt(O)}for(;k<P;)O=Math.floor(65536*Math.random()),T[k++]=O>>>8,T[k++]=255&O;k=0,S()}function A(){if(null==L){for(S(),(L=new j).init(T),k=0;k<T.length;++k)T[k]=0;k=0}return L.next()}function C(){}function j(){this.i=0,this.j=0,this.S=new Array}C.prototype.nextBytes=function(e){var t;for(t=0;t<e.length;++t)e[t]=A()},j.prototype.init=function(e){var t,n,r;for(t=0;t<256;++t)this.S[t]=t;for(n=0,t=0;t<256;++t)r=this.S[t],this.S[t]=this.S[n=n+this.S[t]+e[t%e.length]&255],this.S[n]=r;this.i=0,this.j=0},j.prototype.next=function(){var e;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,e=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=e,this.S[e+this.S[this.i]&255]};var P=256;e.exports={default:n,BigInteger:n,SecureRandom:C}}).call(Fe)})),Je={sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",ripemd160:"3021300906052b2403020105000414"},Ke={sha256:Be};function $e(e,t){if(this.n=null,this.e=0,!(null!=e&&null!=t&&e.length>0&&t.length>0))throw new Error("Invalid key data");this.n=new qe.BigInteger(e,16),this.e=parseInt(t,16)}$e.prototype.verify=function(e,t){t=t.replace(/[^0-9a-f]|[\s\n]]/gi,"");var n=new qe.BigInteger(t,16);if(n.bitLength()>this.n.bitLength())throw new Error("Signature does not match with the key modulus.");var r=function(e){for(var t in Je){var n=Je[t],r=n.length;if(e.substring(0,r)===n)return{alg:t,hash:e.substring(r)}}return[]}(n.modPowInt(this.e,this.n).toString(16).replace(/^1f+00/,""));if(0===r.length)return!1;if(!Ke.hasOwnProperty(r.alg))throw new Error("Hashing algorithm is not supported.");var a=Ke[r.alg](e).toString();return r.hash===a};for(var Xe=[],Ze=[],Qe="undefined"!=typeof Uint8Array?Uint8Array:Array,et="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",tt=0,nt=et.length;tt<nt;++tt)Xe[tt]=et[tt],Ze[et.charCodeAt(tt)]=tt;Ze["-".charCodeAt(0)]=62,Ze["_".charCodeAt(0)]=63;var rt=function(e){var t,n,r=function(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}(e),a=r[0],o=r[1],i=new Qe(function(e,t,n){return 3*(t+n)/4-n}(0,a,o)),s=0,u=o>0?a-4:a;for(n=0;n<u;n+=4)t=Ze[e.charCodeAt(n)]<<18|Ze[e.charCodeAt(n+1)]<<12|Ze[e.charCodeAt(n+2)]<<6|Ze[e.charCodeAt(n+3)],i[s++]=t>>16&255,i[s++]=t>>8&255,i[s++]=255&t;return 2===o&&(t=Ze[e.charCodeAt(n)]<<2|Ze[e.charCodeAt(n+1)]>>4,i[s++]=255&t),1===o&&(t=Ze[e.charCodeAt(n)]<<10|Ze[e.charCodeAt(n+1)]<<4|Ze[e.charCodeAt(n+2)]>>2,i[s++]=t>>8&255,i[s++]=255&t),i};function at(e){var t=e.length%4;return 0===t?e:e+new Array(4-t+1).join("=")}function ot(e){return e=at(e).replace(/\-/g,"+").replace(/_/g,"/"),decodeURIComponent(function(e){for(var t="",n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}(rt(e)).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))}function it(e){return function(e){for(var t="",n=0;n<e.length;n++){var r=e[n].toString(16);t+=2===r.length?r:"0"+r}return t}(rt(at(e)))}var st=ze((function(e){var t,n;t=Fe,n=function(){function e(e){var t=[];if(0===e.length)return"";if("string"!=typeof e[0])throw new TypeError("Url must be a string. Received "+e[0]);if(e[0].match(/^[^/:]+:\/*$/)&&e.length>1){var n=e.shift();e[0]=n+e[0]}e[0]=e[0].match(/^file:\/\/\//)?e[0].replace(/^([^/:]+):\/*/,"$1:///"):e[0].replace(/^([^/:]+):\/*/,"$1://");for(var r=0;r<e.length;r++){var a=e[r];if("string"!=typeof a)throw new TypeError("Url must be a string. Received "+a);""!==a&&(r>0&&(a=a.replace(/^[\/]+/,"")),a=a.replace(/[\/]+$/,r<e.length-1?"":"/"),t.push(a))}var o=t.join("/"),i=(o=o.replace(/\/(\?|&|#[^!])/g,"$1")).split("?");return i.shift()+(i.length>0?"?":"")+i.join("&")}return function(){return e("object"==typeof arguments[0]?arguments[0]:[].slice.call(arguments))}},e.exports?e.exports=n():t.urljoin=n()}));function ut(e,t){return t=t||{},new Promise((function(n,r){var a=new XMLHttpRequest,o=[],i=[],s={},u=function(){return{ok:2==(a.status/100|0),statusText:a.statusText,status:a.status,url:a.responseURL,text:function(){return Promise.resolve(a.responseText)},json:function(){return Promise.resolve(JSON.parse(a.responseText))},blob:function(){return Promise.resolve(new Blob([a.response]))},clone:u,headers:{keys:function(){return o},entries:function(){return i},get:function(e){return s[e.toLowerCase()]},has:function(e){return e.toLowerCase()in s}}}};for(var l in a.open(t.method||"get",e,!0),a.onload=function(){a.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(e,t,n){o.push(t=t.toLowerCase()),i.push([t,n]),s[t]=s[t]?s[t]+","+n:n})),n(u())},a.onerror=r,a.withCredentials="include"==t.credentials,t.headers)a.setRequestHeader(l,t.headers[l]);a.send(t.body||null)}))}function lt(e){if(e.ok)return e.json();var t=new Error(e.statusText);return t.response=e,Promise.reject(t)}function ct(e){this.name="ConfigurationError",this.message=e||""}function dt(e){this.name="TokenValidationError",this.message=e||""}ct.prototype=Error.prototype,dt.prototype=Error.prototype;var pt=function(){function e(){}var t=e.prototype;return t.get=function(){return null},t.has=function(){return null},t.set=function(){return null},e}();Ue.polyfill();var ft=function(e){return"number"==typeof e},ht=function(){return new Date};function mt(e){var t=e||{};if(this.jwksCache=t.jwksCache||new pt,this.expectedAlg=t.expectedAlg||"RS256",this.issuer=t.issuer,this.audience=t.audience,this.leeway=0===t.leeway?0:t.leeway||60,this.jwksURI=t.jwksURI,this.maxAge=t.maxAge,this.__clock="function"==typeof t.__clock?t.__clock:ht,this.leeway<0||this.leeway>300)throw new ct("The leeway should be positive and lower than five minutes.");if("RS256"!==this.expectedAlg)throw new ct('Signature algorithm of "'+this.expectedAlg+'" is not supported. Expected the ID token to be signed with "RS256".')}function _t(e,t){this.plugins=t;for(var n=0;n<this.plugins.length;n++){if(this.plugins[n].version!==se.raw){var r="";throw this.plugins[n].constructor&&this.plugins[n].constructor.name&&(r=this.plugins[n].constructor.name),new Error("Plugin "+r+" version ("+this.plugins[n].version+") is not compatible with the SDK version ("+se.raw+")")}this.plugins[n].setWebAuth(e)}}mt.prototype.verify=function(e,t,n){if(!n&&t&&"function"==typeof t&&(n=t,t=void 0),!e)return n(new dt("ID token is required but missing"),null);var r=this.decode(e);if(r instanceof Error)return n(new dt("ID token could not be decoded"),null);var a=r.encoded.header+"."+r.encoded.payload,o=it(r.encoded.signature),i=r.header.alg,s=r.header.kid,u=r.payload.aud,l=r.payload.sub,c=r.payload.iss,d=r.payload.exp,p=r.payload.nbf,f=r.payload.iat,h=r.payload.azp,m=r.payload.auth_time,_=r.payload.nonce,y=this.__clock(),g=this;if(g.expectedAlg!==i)return n(new dt('Signature algorithm of "'+i+'" is not supported. Expected the ID token to be signed with "RS256".'),null);this.getRsaVerifier(c,s,(function(e,i){if(e)return n(e,null);if(!i.verify(a,o))return n(new dt("Invalid ID token signature."),null);if(!c||"string"!=typeof c)return n(new dt("Issuer (iss) claim must be a string present in the ID token"),null);if(g.issuer!==c)return n(new dt('Issuer (iss) claim mismatch in the ID token, expected "'+g.issuer+'", found "'+c+'"'),null);if(!l||"string"!=typeof l)return n(new dt("Subject (sub) claim must be a string present in the ID token"),null);if(!u||"string"!=typeof u&&!Array.isArray(u))return n(new dt("Audience (aud) claim must be a string or array of strings present in the ID token"),null);if(Array.isArray(u)&&!u.includes(g.audience))return n(new dt('Audience (aud) claim mismatch in the ID token; expected "'+g.audience+'" but was not one of "'+u.join(", ")+'"'),null);if("string"==typeof u&&g.audience!==u)return n(new dt('Audience (aud) claim mismatch in the ID token; expected "'+g.audience+'" but found "'+u+'"'),null);if(t){if(!_||"string"!=typeof _)return n(new dt("Nonce (nonce) claim must be a string present in the ID token"),null);if(_!==t)return n(new dt('Nonce (nonce) claim value mismatch in the ID token; expected "'+t+'", found "'+_+'"'),null)}if(Array.isArray(u)&&u.length>1){if(!h||"string"!=typeof h)return n(new dt("Authorized Party (azp) claim must be a string present in the ID token when Audience (aud) claim has multiple values"),null);if(h!==g.audience)return n(new dt('Authorized Party (azp) claim mismatch in the ID token; expected "'+g.audience+'", found "'+h+'"'),null)}if(!d||!ft(d))return n(new dt("Expiration Time (exp) claim must be a number present in the ID token"),null);if(!f||!ft(f))return n(new dt("Issued At (iat) claim must be a number present in the ID token"),null);var s=d+g.leeway,v=new Date(0);if(v.setUTCSeconds(s),y>v)return n(new dt('Expiration Time (exp) claim error in the ID token; current time "'+y+'" is after expiration time "'+v+'"'),null);if(p&&ft(p)){var b=p-g.leeway,w=new Date(0);if(w.setUTCSeconds(b),y<w)return n(new dt('Not Before Time (nbf) claim error in the ID token; current time "'+y+'" is before the not before time "'+w+'"'),null)}if(g.maxAge){if(!m||!ft(m))return n(new dt("Authentication Time (auth_time) claim must be a number present in the ID token when Max Age (max_age) is specified"),null);var M=m+g.maxAge+g.leeway,L=new Date(0);if(L.setUTCSeconds(M),y>L)return n(new dt('Authentication Time (auth_time) claim in the ID token indicates that too much time has passed since the last end-user authentication. Current time "'+y+'" is after last auth time at "'+L+'"'),null)}return n(null,r.payload)}))},mt.prototype.getRsaVerifier=function(e,t,n){var r=this,a=e+t;Promise.resolve(this.jwksCache.has(a)).then((function(n){return n?r.jwksCache.get(a):(o={jwksURI:r.jwksURI,iss:e,kid:t},("undefined"==typeof fetch?ut:fetch)(o.jwksURI||st(o.iss,".well-known","jwks.json")).then(lt).then((function(e){var t,n,r,a=null;for(t=0;t<e.keys.length&&null===a;t++)(n=e.keys[t]).kid===o.kid&&(a=n);if(!a)throw new Error('Could not find a public key for Key ID (kid) "'+o.kid+'"');return{modulus:it((r=a).n),exp:it(r.e)}})).catch((function(e){throw e})));var o})).then((function(e){if(!e||!e.modulus||!e.exp)throw new Error("Empty keyInfo in response");return Promise.resolve(r.jwksCache.set(a,e)).then((function(){n&&n(null,new $e(e.modulus,e.exp))}))})).catch((function(e){n&&n(e)}))},mt.prototype.decode=function(e){var t,n,r=e.split(".");if(3!==r.length)return new dt("Cannot decode a malformed JWT");try{t=JSON.parse(ot(r[0])),n=JSON.parse(ot(r[1]))}catch(e){return new dt("Token header or payload is not valid JSON")}return{header:t,payload:n,encoded:{header:r[0],payload:r[1],signature:r[2]}}},mt.prototype.validateAccessToken=function(e,t,n,r){if(this.expectedAlg!==t)return r(new dt('Signature algorithm of "'+t+'" is not supported. Expected "'+this.expectedAlg+'"'));var a,o=Be(e),i=Ge.stringify(o),s=i.substring(0,i.length/2),u=Ge.parse(s),l=Ve.stringify(u);return r((a={"+":"-","/":"_","=":""},l.replace(/[+/=]/g,(function(e){return a[e]}))!==n?new dt("Invalid access_token"):null))},_t.prototype.get=function(e){for(var t=0;t<this.plugins.length;t++)if(this.plugins[t].supports(e))return this.plugins[t].init();return null};var yt=function(e){var t=new Uint8Array(e),n=[],r="0123456789ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvwxyz-._~",a=ke.getWindow().crypto||ke.getWindow().msCrypto;if(!a)return null;for(var o=a.getRandomValues(t),i=0;i<o.length;i++)n.push(r[o[i]%r.length]);return n.join("")};function gt(e){var t=e.transaction||{};this.namespace=t.namespace||"com.auth0.auth.",this.keyLength=t.keyLength||32,this.storage=new Ye(e),this.options=e}function vt(e){if(this.url=e.url,this.callback=e.callback,this.timeout=e.timeout||6e4,this.timeoutCallback=e.timeoutCallback||null,this.eventListenerType=e.eventListenerType||"message",this.iframe=null,this.timeoutHandle=null,this._destroyTimeout=null,this.transientMessageEventListener=null,this.proxyEventListener=null,this.eventValidator=e.eventValidator||{isValid:function(){return!0}},"function"!=typeof this.callback)throw new Error("options.callback must be a function")}function bt(e){this.webAuth=e,this.warn=new Oe(e.baseOptions)}function wt(e,t){this.webAuth=e,this.baseOptions=t,this.request=new Le(t),this.webMessageHandler=new bt(e),this.storage=new Ye(t)}function Mt(e,t){return["co/verifier",encodeURIComponent(e),encodeURIComponent(t)].join("/")}function Lt(e,t){this.webAuth=e,this.baseOptions=t,this.crossOriginAuthentication=new wt(e,this.baseOptions),this.warn=new Oe({disableWarnings:!!t._disableDeprecationWarnings})}gt.prototype.process=function(e){if(!e.responseType)throw new Error("responseType is required");var t=e.realm||e.connection,n=-1!==e.responseType.indexOf("id_token"),r=this.generateTransaction(e.appState,e.state,e.nonce,t,n,e.organization);return e.state||(e.state=r.state),n&&!e.nonce&&(e.nonce=r.nonce),e},gt.prototype.generateTransaction=function(e,t,n,r,a,o){if(t=t||yt(this.keyLength),n=n||(a?yt(this.keyLength):null),ke.getWindow().location.host!==this.options.domain){var i={nonce:n,appState:e,state:t,lastUsedConnection:r};o&&(i.organization=o),this.storage.setItem(this.namespace+t,i,{expires:1/48})}return{state:t,nonce:n}},gt.prototype.getStoredTransaction=function(e){var t;return t=this.storage.getItem(this.namespace+e),this.clearTransaction(e),t},gt.prototype.clearTransaction=function(e){this.storage.removeItem(this.namespace+e)},vt.prototype.init=function(){var e=this,t=ke.getWindow();switch(this.iframe=t.document.createElement("iframe"),this.iframe.style.display="none",this.proxyEventListener=function(t){e.eventListener(t)},this.eventListenerType){case"message":this.eventSourceObject=t;break;case"load":this.eventSourceObject=this.iframe;break;default:throw new Error("Unsupported event listener type: "+this.eventListenerType)}this.eventSourceObject.addEventListener(this.eventListenerType,this.proxyEventListener,!1),t.document.body.appendChild(this.iframe),this.iframe.src=this.url,this.timeoutHandle=setTimeout((function(){e.timeoutHandler()}),this.timeout)},vt.prototype.eventListener=function(e){var t={event:e,sourceObject:this.eventSourceObject};this.eventValidator.isValid(t)&&(this.destroy(),this.callback(t))},vt.prototype.timeoutHandler=function(){this.destroy(),this.timeoutCallback&&this.timeoutCallback()},vt.prototype.destroy=function(){var e=this;clearTimeout(this.timeoutHandle),this._destroyTimeout=setTimeout((function(){e.eventSourceObject.removeEventListener(e.eventListenerType,e.proxyEventListener,!1),e.iframe.parentNode&&e.iframe.parentNode.removeChild(e.iframe)}),0)},bt.prototype.run=function(e,t){var n=this;e.responseMode="web_message",e.prompt="none";var r=ke.getOrigin(),a=be.getOriginFromUrl(e.redirectUri);if(a&&r!==a)return t({error:"origin_mismatch",error_description:"The redirectUri's origin ("+a+") should match the window's origin ("+r+")."});!function(e,t,n){new vt({url:e,eventListenerType:"message",callback:function(e){n(null,e)},timeout:t.timeout,eventValidator:{isValid:function(e){return"authorization_response"===e.event.data.type&&t.state===e.event.data.response.state}},timeoutCallback:function(){n({error:"timeout",error_description:"Timeout during executing web_message communication",state:t.state})}}).init()}(this.webAuth.client.buildAuthorizeUrl(e),e,(function(r,a){var o=r;if(!r&&a.event.data.response.error&&(o=a.event.data.response),!o){var i=a.event.data.response;return n.webAuth.validateAuthenticationResponse(e,i,t)}return"consent_required"===o.error&&"localhost"===ke.getWindow().location.hostname&&n.warn.warning("Consent Required. Consent can't be skipped on localhost. Read more here: https://auth0.com/docs/api-auth/user-consent#skipping-consent-for-first-party-clients"),n.webAuth.transactionManager.clearTransaction(o.state),t(be.pick(o,["error","error_description"]))}))},wt.prototype.login=function(e,t){var n=this,r=i(this.baseOptions.rootUrl,"/co/authenticate");e.username=e.username||e.email,delete e.email;var a={client_id:e.clientID||this.baseOptions.clientID,username:e.username};e.password&&(a.password=e.password),e.otp&&(a.otp=e.otp);var o=e.realm||this.baseOptions.realm;if(o){var s=e.credentialType||this.baseOptions.credentialType||"http://auth0.com/oauth/grant-type/password-realm";a.realm=o,a.credential_type=s}else a.credential_type="password";this.request.post(r).withCredentials().send(a).end((function(r,a){if(r){var o=r.response&&r.response.body||{error:"request_error",error_description:JSON.stringify(r)};return Pe(t,{forceLegacyError:!0})(o)}function i(){var r=!0===e.popup;e=be.blacklist(e,["password","credentialType","otp","popup","onRedirecting"]);var o=be.merge(e).with({loginTicket:a.body.login_ticket}),i=Mt(n.baseOptions.rootUrl,a.body.co_id);n.storage.setItem(i,a.body.co_verifier,{expires:1/96}),r?n.webMessageHandler.run(o,Pe(t,{forceLegacyError:!0})):n.webAuth.authorize(o)}"function"==typeof e.onRedirecting?e.onRedirecting(i):i()}))},wt.prototype.callback=function(){var e=decodeURIComponent(function(e){var t=("&"+ke.getWindow().location.hash.substring(1)).split("&origin=");if(2===t.length)return t.pop().split("&").shift()}()),t=ke.getWindow(),n=this;t.addEventListener("message",(function(e){if("co_verifier_request"===e.data.type){var t=Mt(e.origin,e.data.request.id),r=function(e,t){try{var n=e.getItem(t);return e.removeItem(t),n||""}catch(e){return""}}(n.storage,t);e.source.postMessage({type:"co_verifier_response",response:{verifier:r}},e.origin)}})),t.parent.postMessage({type:"ready"},e)},Lt.prototype.loginWithCredentials=function(e,t){e.realm=e.realm||e.connection,delete e.connection,this.crossOriginAuthentication.login(e,t)},Lt.prototype.signupAndLogin=function(e,t){var n=this;return this.webAuth.client.dbConnection.signup(e,(function(r){return r?t(r):(e.realm=e.realm||e.connection,delete e.connection,n.webAuth.login(e,t))}))};var Tt=o((function(e){var t=function(){function e(e,t,n){e.attachEvent?e.attachEvent("on"+t,n):e.addEventListener&&e.addEventListener(t,n,!1)}function t(e,t,n){e.detachEvent?e.detachEvent("on"+t,n):e.removeEventListener&&e.removeEventListener(t,n,!1)}function n(e){/^https?:\/\//.test(e)||(e=window.location.href);var t=/^(https?:\/\/[\-_a-zA-Z\.0-9:]+)/.exec(e);return t?t[1]:e}var r=function(){if("undefined"==typeof navigator)return!1;var e=-1,t=navigator.userAgent;return"Microsoft Internet Explorer"===navigator.appName?null!=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})").exec(t)&&(e=parseFloat(RegExp.$1)):t.indexOf("Trident")>-1&&null!==new RegExp("rv:([0-9]{2,2}[.0-9]{0,})").exec(t)&&(e=parseFloat(RegExp.$1)),e>=8}();return"undefined"!=typeof window&&window.JSON&&window.JSON.stringify&&window.JSON.parse&&window.postMessage?{open:function(a,o){if(!o)throw"missing required callback argument";var i,s;a.url||(i="missing required 'url' parameter"),a.relay_url||(i="missing required 'relay_url' parameter"),i&&setTimeout((function(){o(i)}),0),a.window_name||(a.window_name=null),a.window_features&&!function(){try{var e=navigator.userAgent;return-1!=e.indexOf("Fennec/")||-1!=e.indexOf("Firefox/")&&-1!=e.indexOf("Android")}catch(e){}return!1}()||(a.window_features=void 0);var u,l=a.origin||n(a.url);if(l!==n(a.relay_url))return setTimeout((function(){o("invalid arguments: origin of url and relay_url must match")}),0);r&&((s=document.createElement("iframe")).setAttribute("src",a.relay_url),s.style.display="none",s.setAttribute("name","__winchan_relay_frame"),document.body.appendChild(s),u=s.contentWindow);var c=a.popup||window.open(a.url,a.window_name,a.window_features);a.popup&&(c.location.href=a.url),u||(u=c);var d=setInterval((function(){c&&c.closed&&(f(),o&&(o("User closed the popup window"),o=null))}),500),p=JSON.stringify({a:"request",d:a.params});function f(){if(s&&document.body.removeChild(s),s=void 0,d&&(d=clearInterval(d)),t(window,"message",h),t(window,"unload",f),c)try{c.close()}catch(e){u.postMessage("die",l)}c=u=void 0}function h(e){if(e.origin===l){try{var t=JSON.parse(e.data)}catch(e){if(o)return o(e);throw e}"ready"===t.a?u.postMessage(p,l):"error"===t.a?(f(),o&&(o(t.d),o=null)):"response"===t.a&&(f(),o&&(o(null,t.d),o=null))}}return e(window,"unload",f),e(window,"message",h),{originalPopup:c,close:f,focus:function(){if(c)try{c.focus()}catch(e){}}}},onOpen:function(n){var a="*",o=r?function(){for(var e=window.opener.frames,t=e.length-1;t>=0;t--)try{if(e[t].location.protocol===window.location.protocol&&e[t].location.host===window.location.host&&"__winchan_relay_frame"===e[t].name)return e[t]}catch(e){}}():window.opener;if(!o)throw"can't find relay frame";function i(e){e=JSON.stringify(e),r?o.doPost(e,a):o.postMessage(e,a)}function s(e){if("die"===e.data)try{window.close()}catch(e){}}e(r?o:window,"message",(function e(r){var o;try{o=JSON.parse(r.data)}catch(e){}o&&"request"===o.a&&(t(window,"message",e),a=r.origin,n&&setTimeout((function(){n(a,o.d,(function(e){n=void 0,i({a:"response",d:e})}))}),0))})),e(r?o:window,"message",s);try{i({a:"ready"})}catch(t){e(o,"load",(function(e){i({a:"ready"})}))}var u=function(){try{t(r?o:window,"message",s)}catch(e){}n&&i({a:"error",d:"client closed window"}),n=void 0;try{window.close()}catch(e){}};return e(window,"unload",u),{detach:function(){t(window,"unload",u)}}}}:{open:function(e,t,n,r){setTimeout((function(){r("unsupported browser")}),0)},onOpen:function(e){setTimeout((function(){e("unsupported browser")}),0)}}}();e.exports&&(e.exports=t)})),kt=function(e){/^https?:\/\//.test(e)||(e=window.location.href);var t=/^(https?:\/\/[-_a-zA-Z.0-9:]+)/.exec(e);return t?t[1]:e};function xt(){this._current_popup=null}function Et(e,t){this.baseOptions=t,this.baseOptions.popupOrigin=t.popupOrigin,this.client=e.client,this.webAuth=e,this.transactionManager=new gt(this.baseOptions),this.crossOriginAuthentication=new wt(e,this.baseOptions),this.warn=new Oe({disableWarnings:!!t._disableDeprecationWarnings})}function St(e){this.authenticationUrl=e.authenticationUrl,this.timeout=e.timeout||6e4,this.handler=null,this.postMessageDataType=e.postMessageDataType||!1,this.postMessageOrigin=e.postMessageOrigin||ke.getWindow().location.origin||ke.getWindow().location.protocol+"//"+ke.getWindow().location.hostname+(ke.getWindow().location.port?":"+ke.getWindow().location.port:"")}function Ot(e){this.baseOptions=e,this.request=new Le(e),this.transactionManager=new gt(this.baseOptions)}function Dt(e,t){this.baseOptions=t,this.client=e,this.baseOptions.universalLoginPage=!0,this.request=new Le(this.baseOptions),this.warn=new Oe({disableWarnings:!!t._disableDeprecationWarnings})}xt.prototype.calculatePosition=function(e){var t=e.width||500,n=e.height||600,r=ke.getWindow(),a=void 0!==r.screenX?r.screenX:r.screenLeft,o=void 0!==r.screenY?r.screenY:r.screenTop,i=void 0!==r.outerWidth?r.outerWidth:r.document.body.clientWidth,s=void 0!==r.outerHeight?r.outerHeight:r.document.body.clientHeight;return{width:t,height:n,left:e.left||a+(i-t)/2,top:e.top||o+(s-n)/2}},xt.prototype.preload=function(e){var t=this,n=ke.getWindow(),r=this.calculatePosition(e.popupOptions||{}),a=be.merge(r).with(e.popupOptions),o=e.url||"about:blank",i=Y(a,{encode:!1,delimiter:","});return this._current_popup&&!this._current_popup.closed||(this._current_popup=n.open(o,"auth0_signup_popup",i),this._current_popup.kill=function(){this.close(),t._current_popup=null}),this._current_popup},xt.prototype.load=function(e,t,n,r){var a=this,o=this.calculatePosition(n.popupOptions||{}),i=be.merge(o).with(n.popupOptions),s=be.merge({url:e,relay_url:t,window_features:Y(i,{delimiter:",",encode:!1}),popup:this._current_popup}).with(n),u=Tt.open(s,(function(e,t){if(!e||"SyntaxError"!==e.name)return a._current_popup=null,r(e,t)}));return u.focus(),u},Et.prototype.buildPopupHandler=function(){var e=this.baseOptions.plugins.get("popup.getPopupHandler");return e?e.getPopupHandler():new xt},Et.prototype.preload=function(e){e=e||{};var t=this.buildPopupHandler();return t.preload(e),t},Et.prototype.getPopupHandler=function(e,t){return e.popupHandler?e.popupHandler:t?this.preload(e):this.buildPopupHandler()},Et.prototype.callback=function(e){var t=this,n=ke.getWindow(),r=(e=e||{}).popupOrigin||this.baseOptions.popupOrigin||ke.getOrigin();n.opener?Tt.onOpen((function(n,a,o){if(n!==r)return o({error:"origin_mismatch",error_description:"The popup's origin ("+n+") should match the `popupOrigin` parameter ("+r+")."});t.webAuth.parseHash(e||{},(function(e,t){return o(e||t)}))})):n.doPost=function(e){n.parent&&n.parent.postMessage(e,r)}},Et.prototype.authorize=function(e,t){var n,r,a={},o=this.baseOptions.plugins.get("popup.authorize"),s=be.merge(this.baseOptions,["clientID","scope","domain","audience","tenant","responseType","redirectUri","_csrf","state","_intstate","nonce","organization","invitation"]).with(be.blacklist(e,["popupHandler"]));return pe.check(s,{type:"object",message:"options parameter is not valid"},{responseType:{type:"string",message:"responseType option is required"}}),r=i(this.baseOptions.rootUrl,"relay.html"),e.owp?s.owp=!0:(a.origin=kt(s.redirectUri),r=s.redirectUri),e.popupOptions&&(a.popupOptions=be.pick(e.popupOptions,["width","height","top","left"])),o&&(s=o.processParams(s)),(s=this.transactionManager.process(s)).scope=s.scope||"openid profile email",delete s.domain,n=this.client.buildAuthorizeUrl(s),this.getPopupHandler(e).load(n,r,a,Pe(t,{keepOriginalCasing:!0}))},Et.prototype.loginWithCredentials=function(e,t){e.realm=e.realm||e.connection,e.popup=!0,e=be.merge(this.baseOptions,["redirectUri","responseType","state","nonce"]).with(be.blacklist(e,["popupHandler","connection"])),e=this.transactionManager.process(e),this.crossOriginAuthentication.login(e,t)},Et.prototype.passwordlessVerify=function(e,t){var n=this;return this.client.passwordless.verify(be.blacklist(e,["popupHandler"]),(function(r){if(r)return t(r);e.username=e.phoneNumber||e.email,e.password=e.verificationCode,delete e.email,delete e.phoneNumber,delete e.verificationCode,delete e.type,n.client.loginWithResourceOwner(e,t)}))},Et.prototype.signupAndLogin=function(e,t){var n=this;return this.client.dbConnection.signup(e,(function(r){if(r)return t(r);n.loginWithCredentials(e,t)}))},St.create=function(e){return new St(e)},St.prototype.login=function(e,t){this.handler=new vt({auth0:this.auth0,url:this.authenticationUrl,eventListenerType:e?"message":"load",callback:this.getCallbackHandler(t,e),timeout:this.timeout,eventValidator:this.getEventValidator(),timeoutCallback:function(){t(null,"#error=timeout&error_description=Timeout+during+authentication+renew.")},usePostMessage:e||!1}),this.handler.init()},St.prototype.getEventValidator=function(){var e=this;return{isValid:function(t){switch(t.event.type){case"message":return t.event.origin===e.postMessageOrigin&&t.event.source===e.handler.iframe.contentWindow&&(!1===e.postMessageDataType||t.event.data.type&&t.event.data.type===e.postMessageDataType);case"load":if("about:"===t.sourceObject.contentWindow.location.protocol)return!1;default:return!0}}}},St.prototype.getCallbackHandler=function(e,t){return function(n){var r;r=t?"object"==typeof n.event.data&&n.event.data.hash?n.event.data.hash:n.event.data:n.sourceObject.contentWindow.location.hash,e(null,r)}},Ot.prototype.login=function(e,t){var n,r;return n=i(this.baseOptions.rootUrl,"usernamepassword","login"),e.username=e.username||e.email,e=be.blacklist(e,["email","onRedirecting"]),r=be.merge(this.baseOptions,["clientID","redirectUri","tenant","responseType","responseMode","scope","audience"]).with(e),r=this.transactionManager.process(r),r=be.toSnakeCase(r,["auth0Client"]),this.request.post(n).send(r).end(Pe(t))},Ot.prototype.callback=function(e){var t,n=ke.getDocument();(t=n.createElement("div")).innerHTML=e,n.body.appendChild(t).children[0].submit()},Dt.prototype.login=function(e,t){if(ke.getWindow().location.host!==this.baseOptions.domain)throw new Error("This method is meant to be used only inside the Universal Login Page.");var n,r=be.merge(this.baseOptions,["clientID","redirectUri","tenant","responseType","responseMode","scope","audience","_csrf","state","_intstate","nonce"]).with(e);return pe.check(r,{type:"object",message:"options parameter is not valid"},{responseType:{type:"string",message:"responseType option is required"}}),(n=new Ot(this.baseOptions)).login(r,(function(r,a){if(r)return t(r);function o(){n.callback(a)}if("function"==typeof e.onRedirecting)return e.onRedirecting((function(){o()}));o()}))},Dt.prototype.signupAndLogin=function(e,t){var n=this;return n.client.client.dbConnection.signup(e,(function(r){return r?t(r):n.login(e,t)}))},Dt.prototype.getSSOData=function(e,t){var n,r="";return"function"==typeof e&&(t=e,e=!1),pe.check(e,{type:"boolean",message:"withActiveDirectories parameter is not valid"}),pe.check(t,{type:"function",message:"cb parameter is not valid"}),e&&(r="?"+Y({ldaps:1,client_id:this.baseOptions.clientID})),n=i(this.baseOptions.rootUrl,"user","ssodata",r),this.request.get(n,{noHeaders:!0}).withCredentials().end(Pe(t))};var Yt=function(){},At={lang:"en",templates:{auth0:function(e){var t="code"===e.type?"Enter the code shown above":"Solve the formula shown above";return'<div class="captcha-challenge">\n <img src="'+e.image+'" />\n <button type="button" class="captcha-reload">↺</button>\n</div>\n<input type="text" name="captcha"\n class="form-control captcha-control"\n placeholder="'+t+'" />'},recaptcha_v2:function(){return'<div class="recaptcha" ></div><input type="hidden" name="captcha" />'},recaptcha_enterprise:function(){return'<div class="recaptcha" ></div><input type="hidden" name="captcha" />'},error:function(){return'<div class="error" style="color: red;">Error getting the bot detection challenge. Please contact the system administrator.</div>'}}};function Ct(e){switch(e){case"recaptcha_v2":return window.grecaptcha;case"recaptcha_enterprise":return window.grecaptcha.enterprise;default:throw new Error("Unknown captcha provider")}}var jt=function(e,t,n,r){function a(r){r=r||Yt,e.getChallenge((function(e,o){return e?(t.innerHTML=n.templates.error(e),r(e)):o.required?(t.style.display="","auth0"===o.provider?function(e,t,n,r){e.innerHTML=t.templates[n.provider](n),e.querySelector(".captcha-reload").addEventListener("click",(function(e){e.preventDefault(),r()}))}(t,n,o,a):"recaptcha_v2"!==o.provider&&"recaptcha_enterprise"!==o.provider||function(e,t,n){var r=e.hasAttribute("data-wid")&&e.getAttribute("data-wid");function a(t){e.querySelector('input[name="captcha"]').value=t||""}if(r)return a(),void Ct(n.provider).reset(r);e.innerHTML=t.templates[n.provider](n);var o=e.querySelector(".recaptcha");!function(e,t,n){var r="recaptchaCallback_"+Math.floor(1000001*Math.random());window[r]=function(){delete window[r],n()};var a=window.document.createElement("script");a.src=function(e,t,n){switch(e){case"recaptcha_v2":return"https://www.recaptcha.net/recaptcha/api.js?hl="+t+"&onload="+n;case"recaptcha_enterprise":return"https://www.recaptcha.net/recaptcha/enterprise.js?render=explicit&hl="+t+"&onload="+n;default:throw new Error("Unknown captcha provider")}}(t.provider,t.lang,r),a.async=!0,window.document.body.appendChild(a)}(0,{lang:t.lang,provider:n.provider},(function(){var t=Ct(n.provider);r=t.render(o,{callback:a,"expired-callback":function(){a()},"error-callback":function(){a()},sitekey:n.siteKey}),e.setAttribute("data-wid",r)}))}(t,n,o),void r()):(t.style.display="none",void(t.innerHTML=""))}))}return n=be.merge(At).with(n||{}),a(r),{reload:a,getValue:function(){var e=t.querySelector('input[name="captcha"]');if(e)return e.value}}};function Pt(){return new Date}function Ht(e){pe.check(e,{type:"object",message:"options parameter is not valid"},{domain:{type:"string",message:"domain option is required"},clientID:{type:"string",message:"clientID option is required"},responseType:{optional:!0,type:"string",message:"responseType is not valid"},responseMode:{optional:!0,type:"string",message:"responseMode is not valid"},redirectUri:{optional:!0,type:"string",message:"redirectUri is not valid"},scope:{optional:!0,type:"string",message:"scope is not valid"},audience:{optional:!0,type:"string",message:"audience is not valid"},popupOrigin:{optional:!0,type:"string",message:"popupOrigin is not valid"},leeway:{optional:!0,type:"number",message:"leeway is not valid"},plugins:{optional:!0,type:"array",message:"plugins is not valid"},maxAge:{optional:!0,type:"number",message:"maxAge is not valid"},_disableDeprecationWarnings:{optional:!0,type:"boolean",message:"_disableDeprecationWarnings option is not valid"},_sendTelemetry:{optional:!0,type:"boolean",message:"_sendTelemetry option is not valid"},_telemetryInfo:{optional:!0,type:"object",message:"_telemetryInfo option is not valid"},_timesToRetryFailedRequests:{optional:!0,type:"number",message:"_timesToRetryFailedRequests option is not valid"}}),e.overrides&&pe.check(e.overrides,{type:"object",message:"overrides option is not valid"},{__tenant:{optional:!0,type:"string",message:"__tenant option is required"},__token_issuer:{optional:!0,type:"string",message:"__token_issuer option is required"},__jwks_uri:{optional:!0,type:"string",message:"__jwks_uri is required"}}),this.baseOptions=e,this.baseOptions.plugins=new _t(this,this.baseOptions.plugins||[]),this.baseOptions._sendTelemetry=!1!==this.baseOptions._sendTelemetry||this.baseOptions._sendTelemetry,this.baseOptions._timesToRetryFailedRequests=e._timesToRetryFailedRequests?parseInt(e._timesToRetryFailedRequests,0):0,this.baseOptions.tenant=this.baseOptions.overrides&&this.baseOptions.overrides.__tenant||this.baseOptions.domain.split(".")[0],this.baseOptions.token_issuer=this.baseOptions.overrides&&this.baseOptions.overrides.__token_issuer||"https://"+this.baseOptions.domain+"/",this.baseOptions.jwksURI=this.baseOptions.overrides&&this.baseOptions.overrides.__jwks_uri,this.transactionManager=new gt(this.baseOptions),this.client=new Rt(this.baseOptions),this.redirect=new Lt(this,this.baseOptions),this.popup=new Et(this,this.baseOptions),this.crossOriginAuthentication=new wt(this,this.baseOptions),this.webMessageHandler=new bt(this),this._universalLogin=new Dt(this,this.baseOptions),this.ssodataStorage=new Ae(this.baseOptions)}function It(e,t){this.baseOptions=t,this.request=e}function Nt(e,t){this.baseOptions=t,this.request=e}function Rt(e,t){2===arguments.length?this.auth0=e:t=e,pe.check(t,{type:"object",message:"options parameter is not valid"},{domain:{type:"string",message:"domain option is required"},clientID:{type:"string",message:"clientID option is required"},responseType:{optional:!0,type:"string",message:"responseType is not valid"},responseMode:{optional:!0,type:"string",message:"responseMode is not valid"},redirectUri:{optional:!0,type:"string",message:"redirectUri is not valid"},scope:{optional:!0,type:"string",message:"scope is not valid"},audience:{optional:!0,type:"string",message:"audience is not valid"},_disableDeprecationWarnings:{optional:!0,type:"boolean",message:"_disableDeprecationWarnings option is not valid"},_sendTelemetry:{optional:!0,type:"boolean",message:"_sendTelemetry option is not valid"},_telemetryInfo:{optional:!0,type:"object",message:"_telemetryInfo option is not valid"}}),this.baseOptions=t,this.baseOptions._sendTelemetry=!1!==this.baseOptions._sendTelemetry||this.baseOptions._sendTelemetry,this.baseOptions.rootUrl=this.baseOptions.domain&&0===this.baseOptions.domain.toLowerCase().indexOf("http")?this.baseOptions.domain:"https://"+this.baseOptions.domain,this.request=new Le(this.baseOptions),this.passwordless=new It(this.request,this.baseOptions),this.dbConnection=new Nt(this.request,this.baseOptions),this.warn=new Oe({disableWarnings:!!t._disableDeprecationWarnings}),this.ssodataStorage=new Ae(this.baseOptions)}function Ft(e){pe.check(e,{type:"object",message:"options parameter is not valid"},{domain:{type:"string",message:"domain option is required"},token:{type:"string",message:"token option is required"},_sendTelemetry:{optional:!0,type:"boolean",message:"_sendTelemetry option is not valid"},_telemetryInfo:{optional:!0,type:"object",message:"_telemetryInfo option is not valid"}}),this.baseOptions=e,this.baseOptions.headers={Authorization:"Bearer "+this.baseOptions.token},this.request=new Le(this.baseOptions),this.baseOptions.rootUrl=i("https://"+this.baseOptions.domain,"api","v2")}Ht.prototype.parseHash=function(e,t){var n,r;t||"function"!=typeof e?e=e||{}:(t=e,e={});var a=ke.getWindow(),o=void 0===e.hash?a.location.hash:e.hash;if((n=function(e,t){var n=function(e){if(!e)return E;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 TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?E.charset:e.charset;return{allowDots:void 0===e.allowDots?E.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:E.allowPrototypes,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:E.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:E.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:E.comma,decoder:"function"==typeof e.decoder?e.decoder:E.decoder,delimiter:"string"==typeof e.delimiter||d.isRegExp(e.delimiter)?e.delimiter:E.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:E.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:E.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:E.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:E.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:E.strictNullHandling}}(t);if(""===e||null==e)return n.plainObjects?Object.create(null):{};for(var r="string"==typeof e?function(e,t){var n,r={},a=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,o=t.parameterLimit===1/0?void 0:t.parameterLimit,i=a.split(t.delimiter,o),s=-1,u=t.charset;if(t.charsetSentinel)for(n=0;n<i.length;++n)0===i[n].indexOf("utf8=")&&("utf8=%E2%9C%93"===i[n]?u="utf-8":"utf8=%26%2310003%3B"===i[n]&&(u="iso-8859-1"),s=n,n=i.length);for(n=0;n<i.length;++n)if(n!==s){var l,c,p=i[n],f=p.indexOf("]="),h=-1===f?p.indexOf("="):f+1;-1===h?(l=t.decoder(p,E.decoder,u,"key"),c=t.strictNullHandling?null:""):(l=t.decoder(p.slice(0,h),E.decoder,u,"key"),c=d.maybeMap(O(p.slice(h+1),t),(function(e){return t.decoder(e,E.decoder,u,"value")}))),c&&t.interpretNumericEntities&&"iso-8859-1"===u&&(c=S(c)),p.indexOf("[]=")>-1&&(c=x(c)?[c]:c),k.call(r,l)?r[l]=d.combine(r[l],c):r[l]=c}return r}(e,n):e,a=n.plainObjects?Object.create(null):{},o=Object.keys(r),i=0;i<o.length;++i){var s=o[i],u=D(s,r[s],n,"string"==typeof e);a=d.merge(a,u,n)}return d.compact(a)}(o=o.replace(/^#?\/?/,""))).hasOwnProperty("error"))return r=je.buildResponse(n.error,n.error_description),n.state&&(r.state=n.state),t(r);if(!n.hasOwnProperty("access_token")&&!n.hasOwnProperty("id_token")&&!n.hasOwnProperty("refresh_token"))return t(null,null);var i=(this.baseOptions.responseType||e.responseType||"").split(" ");return i.length>0&&-1!==i.indexOf("token")&&!n.hasOwnProperty("access_token")?t(je.buildResponse("invalid_hash","response_type contains `token`, but the parsed hash does not contain an `access_token` property")):i.length>0&&-1!==i.indexOf("id_token")&&!n.hasOwnProperty("id_token")?t(je.buildResponse("invalid_hash","response_type contains `id_token`, but the parsed hash does not contain an `id_token` property")):this.validateAuthenticationResponse(e,n,t)},Ht.prototype.validateAuthenticationResponse=function(e,t,n){var r=this;e.__enableIdPInitiatedLogin=e.__enableIdPInitiatedLogin||e.__enableImpersonation;var a=t.state,o=this.transactionManager.getStoredTransaction(a),i=e.state||o&&o.state||null,s=i===a;if((a||i||!e.__enableIdPInitiatedLogin)&&!s)return n({error:"invalid_token",errorDescription:"`state` does not match."});var u=e.nonce||o&&o.nonce||null,l=o&&o.organization,c=e.state||o&&o.appState||null,d=function(e,a){return e?n(e):(o&&o.lastUsedConnection&&(a&&(i=a.sub),r.ssodataStorage.set(o.lastUsedConnection,i)),n(null,function(e,t,n){return{accessToken:e.access_token||null,idToken:e.id_token||null,idTokenPayload:n||null,appState:t||null,refreshToken:e.refresh_token||null,state:e.state||null,expiresIn:e.expires_in?parseInt(e.expires_in,10):null,tokenType:e.token_type||null,scope:e.scope||null}}(t,c,a)));var i};return t.id_token?this.validateToken(t.id_token,u,(function(e,n){if(!e){if(l){if(!n.org_id)return d(je.invalidToken("Organization Id (org_id) claim must be a string present in the ID token"));if(n.org_id!==l)return d(je.invalidToken('Organization Id (org_id) claim value mismatch in the ID token; expected "'+l+'", found "'+n.org_id+'"'))}return t.access_token&&n.at_hash?(new mt).validateAccessToken(t.access_token,"RS256",n.at_hash,(function(e){return e?d(je.invalidToken(e.message)):d(null,n)})):d(null,n)}if("invalid_token"!==e.error||e.errorDescription&&e.errorDescription.indexOf("Nonce (nonce) claim value mismatch in the ID token")>-1)return d(e);var a=(new mt).decode(t.id_token);return"HS256"!==a.header.alg?d(e):(a.payload.nonce||null)!==u?d({error:"invalid_token",errorDescription:'Nonce (nonce) claim value mismatch in the ID token; expected "'+u+'", found "'+a.payload.nonce+'"'}):t.access_token?r.client.userInfo(t.access_token,(function(e,t){return e?d(e):d(null,t)})):d({error:"invalid_token",description:"The id_token cannot be validated because it was signed with the HS256 algorithm and public clients (like a browser) can’t store secrets. Please read the associated doc for possible ways to fix this. Read more: https://auth0.com/docs/errors/libraries/auth0-js/invalid-token#parsing-an-hs256-signed-id-token-without-an-access-token"})})):d(null,null)},Ht.prototype.validateToken=function(e,t,n){new mt({issuer:this.baseOptions.token_issuer,jwksURI:this.baseOptions.jwksURI,audience:this.baseOptions.clientID,leeway:this.baseOptions.leeway||60,maxAge:this.baseOptions.maxAge,__clock:this.baseOptions.__clock||Pt}).verify(e,t,(function(e,t){if(e)return n(je.invalidToken(e.message));n(null,t)}))},Ht.prototype.renewAuth=function(e,t){var n=!!e.usePostMessage,r=e.postMessageDataType||!1,a=e.postMessageOrigin||ke.getWindow().origin,o=e.timeout,i=this,s=be.merge(this.baseOptions,["clientID","redirectUri","responseType","scope","audience","_csrf","state","_intstate","nonce"]).with(e);s.responseType=s.responseType||"token",s.responseMode=s.responseMode||"fragment",s=this.transactionManager.process(s),pe.check(s,{type:"object",message:"options parameter is not valid"}),pe.check(t,{type:"function",message:"cb parameter is not valid"}),s.prompt="none",s=be.blacklist(s,["usePostMessage","tenant","postMessageDataType","postMessageOrigin"]),St.create({authenticationUrl:this.client.buildAuthorizeUrl(s),postMessageDataType:r,postMessageOrigin:a,timeout:o}).login(n,(function(e,n){if("object"==typeof n)return t(e,n);i.parseHash({hash:n},t)}))},Ht.prototype.checkSession=function(e,t){var n=be.merge(this.baseOptions,["clientID","responseType","redirectUri","scope","audience","_csrf","state","_intstate","nonce"]).with(e);return"code"===n.responseType?t({error:"error",error_description:"responseType can't be `code`"}):(e.nonce||(n=this.transactionManager.process(n)),n.redirectUri?(pe.check(n,{type:"object",message:"options parameter is not valid"}),pe.check(t,{type:"function",message:"cb parameter is not valid"}),n=be.blacklist(n,["usePostMessage","tenant","postMessageDataType"]),void this.webMessageHandler.run(n,Pe(t,{forceLegacyError:!0,ignoreCasing:!0}))):t({error:"error",error_description:"redirectUri can't be empty"}))},Ht.prototype.changePassword=function(e,t){return this.client.dbConnection.changePassword(e,t)},Ht.prototype.passwordlessStart=function(e,t){var n=be.merge(this.baseOptions,["responseType","responseMode","redirectUri","scope","audience","_csrf","state","_intstate","nonce"]).with(e.authParams);return e.authParams=this.transactionManager.process(n),this.client.passwordless.start(e,t)},Ht.prototype.signup=function(e,t){return this.client.dbConnection.signup(e,t)},Ht.prototype.authorize=function(e){var t=be.merge(this.baseOptions,["clientID","responseType","responseMode","redirectUri","scope","audience","_csrf","state","_intstate","nonce","organization","invitation"]).with(e);pe.check(t,{type:"object",message:"options parameter is not valid"},{responseType:{type:"string",message:"responseType option is required"}}),(t=this.transactionManager.process(t)).scope=t.scope||"openid profile email",ke.redirect(this.client.buildAuthorizeUrl(t))},Ht.prototype.signupAndAuthorize=function(e,t){var n=this;return this.client.dbConnection.signup(be.blacklist(e,["popupHandler"]),(function(r){if(r)return t(r);e.realm=e.connection,e.username||(e.username=e.email),n.client.login(e,t)}))},Ht.prototype.login=function(e,t){var n=be.merge(this.baseOptions,["clientID","responseType","redirectUri","scope","audience","_csrf","state","_intstate","nonce","onRedirecting","organization","invitation"]).with(e);n=this.transactionManager.process(n),ke.getWindow().location.host===this.baseOptions.domain?(n.connection=n.realm,delete n.realm,this._universalLogin.login(n,t)):this.crossOriginAuthentication.login(n,t)},Ht.prototype.passwordlessLogin=function(e,t){var n=be.merge(this.baseOptions,["clientID","responseType","redirectUri","scope","audience","_csrf","state","_intstate","nonce","onRedirecting"]).with(e);if(n=this.transactionManager.process(n),ke.getWindow().location.host===this.baseOptions.domain)this.passwordlessVerify(n,t);else{var r=be.extend({credentialType:"http://auth0.com/oauth/grant-type/passwordless/otp",realm:n.connection,username:n.email||n.phoneNumber,otp:n.verificationCode},be.blacklist(n,["connection","email","phoneNumber","verificationCode"]));this.crossOriginAuthentication.login(r,t)}},Ht.prototype.crossOriginAuthenticationCallback=function(){this.crossOriginVerification()},Ht.prototype.crossOriginVerification=function(){this.crossOriginAuthentication.callback()},Ht.prototype.logout=function(e){ke.redirect(this.client.buildLogoutUrl(e))},Ht.prototype.passwordlessVerify=function(e,t){var n=this,r=be.merge(this.baseOptions,["clientID","responseType","responseMode","redirectUri","scope","audience","_csrf","state","_intstate","nonce","onRedirecting"]).with(e);return pe.check(r,{type:"object",message:"options parameter is not valid"},{responseType:{type:"string",message:"responseType option is required"}}),r=this.transactionManager.process(r),this.client.passwordless.verify(r,(function(a){if(a)return t(a);function o(){ke.redirect(n.client.passwordless.buildVerifyUrl(r))}if("function"==typeof e.onRedirecting)return e.onRedirecting((function(){o()}));o()}))},Ht.prototype.renderCaptcha=function(e,t,n){return jt(this.client,e,t,n)},It.prototype.buildVerifyUrl=function(e){var t,n;return pe.check(e,{type:"object",message:"options parameter is not valid"},{connection:{type:"string",message:"connection option is required"},verificationCode:{type:"string",message:"verificationCode option is required"},phoneNumber:{optional:!1,type:"string",message:"phoneNumber option is required",condition:function(e){return!e.email}},email:{optional:!1,type:"string",message:"email option is required",condition:function(e){return!e.phoneNumber}}}),t=be.merge(this.baseOptions,["clientID","responseType","responseMode","redirectUri","scope","audience","_csrf","state","_intstate","protocol","nonce"]).with(e),this.baseOptions._sendTelemetry&&(t.auth0Client=this.request.getTelemetryData()),t=be.toSnakeCase(t,["auth0Client"]),n=Y(t),i(this.baseOptions.rootUrl,"passwordless","verify_redirect","?"+n)},It.prototype.start=function(e,t){var n,r;return pe.check(e,{type:"object",message:"options parameter is not valid"},{connection:{type:"string",message:"connection option is required"},send:{type:"string",message:"send option is required",values:["link","code"],value_message:"send is not valid ([link, code])"},phoneNumber:{optional:!0,type:"string",message:"phoneNumber option is required",condition:function(e){return"code"===e.send||!e.email}},email:{optional:!0,type:"string",message:"email option is required",condition:function(e){return"link"===e.send||!e.phoneNumber}},authParams:{optional:!0,type:"object",message:"authParams option is required"}}),pe.check(t,{type:"function",message:"cb parameter is not valid"}),n=i(this.baseOptions.rootUrl,"passwordless","start"),(r=be.merge(this.baseOptions,["clientID","responseType","redirectUri","scope"]).with(e)).scope&&(r.authParams=r.authParams||{},r.authParams.scope=r.authParams.scope||r.scope),r.redirectUri&&(r.authParams=r.authParams||{},r.authParams.redirect_uri=r.authParams.redirectUri||r.redirectUri),r.responseType&&(r.authParams=r.authParams||{},r.authParams.response_type=r.authParams.responseType||r.responseType),delete r.redirectUri,delete r.responseType,delete r.scope,r=be.toSnakeCase(r,["auth0Client","authParams"]),this.request.post(n).send(r).end(Pe(t))},It.prototype.verify=function(e,t){var n,r;return pe.check(e,{type:"object",message:"options parameter is not valid"},{connection:{type:"string",message:"connection option is required"},verificationCode:{type:"string",message:"verificationCode option is required"},phoneNumber:{optional:!1,type:"string",message:"phoneNumber option is required",condition:function(e){return!e.email}},email:{optional:!1,type:"string",message:"email option is required",condition:function(e){return!e.phoneNumber}}}),pe.check(t,{type:"function",message:"cb parameter is not valid"}),r=be.pick(e,["connection","verificationCode","phoneNumber","email","auth0Client"]),r=be.toSnakeCase(r,["auth0Client"]),n=i(this.baseOptions.rootUrl,"passwordless","verify"),this.request.post(n).send(r).end(Pe(t))},Nt.prototype.signup=function(e,t){var n,r,a;return pe.check(e,{type:"object",message:"options parameter is not valid"},{connection:{type:"string",message:"connection option is required"},email:{type:"string",message:"email option is required"},password:{type:"string",message:"password option is required"}}),pe.check(t,{type:"function",message:"cb parameter is not valid"}),n=i(this.baseOptions.rootUrl,"dbconnections","signup"),a=(r=be.merge(this.baseOptions,["clientID","state"]).with(e)).user_metadata||r.userMetadata,r=be.blacklist(r,["scope","userMetadata","user_metadata"]),r=be.toSnakeCase(r,["auth0Client"]),a&&(r.user_metadata=a),this.request.post(n).send(r).end(Pe(t))},Nt.prototype.changePassword=function(e,t){var n,r;return pe.check(e,{type:"object",message:"options parameter is not valid"},{connection:{type:"string",message:"connection option is required"},email:{type:"string",message:"email option is required"}}),pe.check(t,{type:"function",message:"cb parameter is not valid"}),n=i(this.baseOptions.rootUrl,"dbconnections","change_password"),r=be.merge(this.baseOptions,["clientID"]).with(e,["email","connection"]),r=be.toSnakeCase(r,["auth0Client"]),this.request.post(n).send(r).end(Pe(t))},Rt.prototype.buildAuthorizeUrl=function(e){var t,n;return pe.check(e,{type:"object",message:"options parameter is not valid"}),t=be.merge(this.baseOptions,["clientID","responseType","responseMode","redirectUri","scope","audience"]).with(e),pe.check(t,{type:"object",message:"options parameter is not valid"},{clientID:{type:"string",message:"clientID option is required"},redirectUri:{optional:!0,type:"string",message:"redirectUri option is required"},responseType:{type:"string",message:"responseType option is required"},nonce:{type:"string",message:"nonce option is required",condition:function(e){return-1===e.responseType.indexOf("code")&&-1!==e.responseType.indexOf("id_token")}},scope:{optional:!0,type:"string",message:"scope option is required"},audience:{optional:!0,type:"string",message:"audience option is required"}}),this.baseOptions._sendTelemetry&&(t.auth0Client=this.request.getTelemetryData()),t.connection_scope&&pe.isArray(t.connection_scope)&&(t.connection_scope=t.connection_scope.join(",")),t=be.blacklist(t,["username","popupOptions","domain","tenant","timeout","appState"]),t=be.toSnakeCase(t,["auth0Client"]),t=Re(this.warn,t),n=Y(t),i(this.baseOptions.rootUrl,"authorize","?"+n)},Rt.prototype.buildLogoutUrl=function(e){var t,n;return pe.check(e,{optional:!0,type:"object",message:"options parameter is not valid"}),t=be.merge(this.baseOptions,["clientID"]).with(e||{}),this.baseOptions._sendTelemetry&&(t.auth0Client=this.request.getTelemetryData()),t=be.toSnakeCase(t,["auth0Client","returnTo"]),n=Y(be.blacklist(t,["federated"])),e&&void 0!==e.federated&&!1!==e.federated&&"false"!==e.federated&&(n+="&federated"),i(this.baseOptions.rootUrl,"v2","logout","?"+n)},Rt.prototype.loginWithDefaultDirectory=function(e,t){return pe.check(e,{type:"object",message:"options parameter is not valid"},{username:{type:"string",message:"username option is required"},password:{type:"string",message:"password option is required"},scope:{optional:!0,type:"string",message:"scope option is required"},audience:{optional:!0,type:"string",message:"audience option is required"}}),e.grantType="password",this.oauthToken(e,t)},Rt.prototype.login=function(e,t){return pe.check(e,{type:"object",message:"options parameter is not valid"},{username:{type:"string",message:"username option is required"},password:{type:"string",message:"password option is required"},realm:{type:"string",message:"realm option is required"},scope:{optional:!0,type:"string",message:"scope option is required"},audience:{optional:!0,type:"string",message:"audience option is required"}}),e.grantType="http://auth0.com/oauth/grant-type/password-realm",this.oauthToken(e,t)},Rt.prototype.oauthToken=function(e,t){var n,r;return pe.check(e,{type:"object",message:"options parameter is not valid"}),pe.check(t,{type:"function",message:"cb parameter is not valid"}),n=i(this.baseOptions.rootUrl,"oauth","token"),r=be.merge(this.baseOptions,["clientID","scope","audience"]).with(e),pe.check(r,{type:"object",message:"options parameter is not valid"},{clientID:{type:"string",message:"clientID option is required"},grantType:{type:"string",message:"grantType option is required"},scope:{optional:!0,type:"string",message:"scope option is required"},audience:{optional:!0,type:"string",message:"audience option is required"}}),r=be.toSnakeCase(r,["auth0Client"]),r=Ne(this.warn,r),this.request.post(n).send(r).end(Pe(t))},Rt.prototype.loginWithResourceOwner=function(e,t){var n,r;return pe.check(e,{type:"object",message:"options parameter is not valid"},{username:{type:"string",message:"username option is required"},password:{type:"string",message:"password option is required"},connection:{type:"string",message:"connection option is required"},scope:{optional:!0,type:"string",message:"scope option is required"}}),pe.check(t,{type:"function",message:"cb parameter is not valid"}),n=i(this.baseOptions.rootUrl,"oauth","ro"),r=be.merge(this.baseOptions,["clientID","scope"]).with(e,["username","password","scope","connection","device"]),(r=be.toSnakeCase(r,["auth0Client"])).grant_type=r.grant_type||"password",this.request.post(n).send(r).end(Pe(t))},Rt.prototype.getSSOData=function(e,t){if(this.auth0||(this.auth0=new Ht(this.baseOptions)),ke.getWindow().location.host===this.baseOptions.domain)return this.auth0._universalLogin.getSSOData(e,t);"function"==typeof e&&(t=e),pe.check(t,{type:"function",message:"cb parameter is not valid"});var n=this.baseOptions.clientID,r=this.ssodataStorage.get()||{};this.auth0.checkSession({responseType:"token id_token",scope:"openid profile email",connection:r.lastUsedConnection,timeout:5e3},(function(e,a){return e?"login_required"===e.error?t(null,{sso:!1}):("consent_required"===e.error&&(e.error_description="Consent required. When using `getSSOData`, the user has to be authenticated with the following scope: `openid profile email`."),t(e,{sso:!1})):r.lastUsedSub&&r.lastUsedSub!==a.idTokenPayload.sub?t(e,{sso:!1}):t(null,{lastUsedConnection:{name:r.lastUsedConnection},lastUsedUserID:a.idTokenPayload.sub,lastUsedUsername:a.idTokenPayload.email||a.idTokenPayload.name,lastUsedClientID:n,sessionClients:[n],sso:!0})}))},Rt.prototype.userInfo=function(e,t){var n;return pe.check(e,{type:"string",message:"accessToken parameter is not valid"}),pe.check(t,{type:"function",message:"cb parameter is not valid"}),n=i(this.baseOptions.rootUrl,"userinfo"),this.request.get(n).set("Authorization","Bearer "+e).end(Pe(t,{ignoreCasing:!0}))},Rt.prototype.getChallenge=function(e){if(pe.check(e,{type:"function",message:"cb parameter is not valid"}),!this.baseOptions.state)return e();var t=i(this.baseOptions.rootUrl,"usernamepassword","challenge");return this.request.post(t).send({state:this.baseOptions.state}).end(Pe(e,{ignoreCasing:!0}))},Rt.prototype.delegation=function(e,t){var n,r;return pe.check(e,{type:"object",message:"options parameter is not valid"},{grant_type:{type:"string",message:"grant_type option is required"}}),pe.check(t,{type:"function",message:"cb parameter is not valid"}),n=i(this.baseOptions.rootUrl,"delegation"),r=be.merge(this.baseOptions,["clientID"]).with(e),r=be.toSnakeCase(r,["auth0Client"]),this.request.post(n).send(r).end(Pe(t))},Rt.prototype.getUserCountry=function(e){var t;return pe.check(e,{type:"function",message:"cb parameter is not valid"}),t=i(this.baseOptions.rootUrl,"user","geoloc","country"),this.request.get(t).end(Pe(e))},Ft.prototype.getUser=function(e,t){var n;return pe.check(e,{type:"string",message:"userId parameter is not valid"}),pe.check(t,{type:"function",message:"cb parameter is not valid"}),n=i(this.baseOptions.rootUrl,"users",e),this.request.get(n).end(Pe(t,{ignoreCasing:!0}))},Ft.prototype.patchUserMetadata=function(e,t,n){var r;return pe.check(e,{type:"string",message:"userId parameter is not valid"}),pe.check(t,{type:"object",message:"userMetadata parameter is not valid"}),pe.check(n,{type:"function",message:"cb parameter is not valid"}),r=i(this.baseOptions.rootUrl,"users",e),this.request.patch(r).send({user_metadata:t}).end(Pe(n,{ignoreCasing:!0}))},Ft.prototype.patchUserAttributes=function(e,t,n){var r;return pe.check(e,{type:"string",message:"userId parameter is not valid"}),pe.check(t,{type:"object",message:"user parameter is not valid"}),pe.check(n,{type:"function",message:"cb parameter is not valid"}),r=i(this.baseOptions.rootUrl,"users",e),this.request.patch(r).send(t).end(Pe(n,{ignoreCasing:!0}))},Ft.prototype.linkUser=function(e,t,n){var r;return pe.check(e,{type:"string",message:"userId parameter is not valid"}),pe.check(t,{type:"string",message:"secondaryUserToken parameter is not valid"}),pe.check(n,{type:"function",message:"cb parameter is not valid"}),r=i(this.baseOptions.rootUrl,"users",e,"identities"),this.request.post(r).send({link_with:t}).end(Pe(n,{ignoreCasing:!0}))};var zt={Authentication:Rt,Management:Ft,WebAuth:Ht,version:se};t.default=zt}.call(this,n(38),n(345))},function(e,t){var n,r,a=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var u,l=[],c=!1,d=-1;function p(){c&&u&&(c=!1,u.length?l=u.concat(l):d=-1,l.length&&f())}function f(){if(!c){var e=s(p);c=!0;for(var t=l.length;t;){for(u=l,l=[];++d<t;)u&&u[d].run();d=-1,t=l.length}u=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function m(){}a.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new h(e,t)),1!==l.length||c||s(f)},h.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=m,a.addListener=m,a.once=m,a.off=m,a.removeListener=m,a.removeAllListeners=m,a.emit=m,a.prependListener=m,a.prependOnceListener=m,a.listeners=function(e){return[]},a.binding=function(e){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(e){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(347),s=n(27),u=n(29),l=n(8),c=n(10),d=n(39),p=n(40),f=function(e){function t(n){var r=e.call(this,n)||this;return r.componentDidMount=function(){var e=r.props,t=e.auth0ClientId,n=e.auth0Hash,a=e.onAuthenticated,o=e.baseUrl;u.default.bindToClient(t),n?u.default.parseIdFromHash(n).then((function(e){s.default.getAccessData(e.idToken,o).then((function(t){r.props.login(e),r.props.cacheAccessData(t),s.default.buildFreshSession(e,t),a()})).catch((function(e){u.default.login()}))})).catch((function(e){u.default.login()})):u.default.login()},r.render=function(){return o.createElement("div",{className:"auth-gate"},o.createElement(i.default,{color:t.LOADER_COLOR}))},r}return a(t,e),t.LOADER_COLOR="#2d8ceb",t}(o.PureComponent);t.default=l.connect(null,(function(e){return c.bindActionCreators({login:d.login,cacheAccessData:p.cacheAccessData},e)}))(f)},function(e,t,n){"use strict";var r,a=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var s,u,l=i(n(0)),c=n(532),d=n(350),p=c.keyframes(s||(s=a(["\n 0% {transform: scaley(1.0)}\n 50% {transform: scaley(0.4)}\n 100% {transform: scaley(1.0)}\n"],["\n 0% {transform: scaley(1.0)}\n 50% {transform: scaley(0.4)}\n 100% {transform: scaley(1.0)}\n"]))),f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.style=function(e){var n=t.props,r=n.color,o=n.width,i=n.height,s=n.margin,l=n.radius,d=n.widthUnit,f=n.heightUnit,h=n.radiusUnit;return c.css(u||(u=a(["\n background-color: ",";\n width: ",";\n height: ",";\n margin: ",";\n border-radius: ",";\n display: inline-block;\n animation: "," 1s ","s infinite cubic-bezier(0.2, 0.68, 0.18, 1.08);\n animation-fill-mode: both;\n "],["\n background-color: ",";\n width: ",";\n height: ",";\n margin: ",";\n border-radius: ",";\n display: inline-block;\n animation: "," 1s ","s infinite cubic-bezier(0.2, 0.68, 0.18, 1.08);\n animation-fill-mode: both;\n "])),r,""+o+d,""+i+f,s,""+l+h,p,.1*e)},t}return o(t,e),t.prototype.render=function(){var e=this.props,t=e.loading,n=e.css;return t?c.jsx("div",{css:[n]},c.jsx("div",{css:this.style(1)}),c.jsx("div",{css:this.style(2)}),c.jsx("div",{css:this.style(3)}),c.jsx("div",{css:this.style(4)}),c.jsx("div",{css:this.style(5)})):null},t.defaultProps=d.heightWidthRadiusDefaults(35,4,2),t}(l.PureComponent);t.default=f},function(e,t,n){var r=n(349);e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,n(t,r)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(351)),r(n(352))},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0});var a=((r={}).loading=!0,r.color="#000000",r.css={},r);t.sizeDefaults=function(e){return Object.assign({},a,function(e){var t;return(t={}).size=e,t.sizeUnit="px",t}(e))},t.sizeMarginDefaults=function(e){var n;return Object.assign({},t.sizeDefaults(e),((n={}).margin="2px",n))},t.heightWidthDefaults=function(e,t){return Object.assign({},a,function(e,t){var n;return(n={}).height=e,n.heightUnit="px",n.width=t,n.widthUnit="px",n}(e,t))},t.heightWidthRadiusDefaults=function(e,n,r){var a;return void 0===r&&(r=2),Object.assign({},t.heightWidthDefaults(e,n),((a={}).radius=r,a.radiusUnit="px",a.margin="2px",a))}},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.maroon="#800000",e.red="#FF0000",e.orange="#FFA500",e.yellow="#FFFF00",e.olive="#808000",e.green="#008000",e.purple="#800080",e.fuchsia="#FF00FF",e.lime="#00FF00",e.teal="#008080",e.aqua="#00FFFF",e.blue="#0000FF",e.navy="#000080",e.black="#000000",e.gray="#808080",e.silver="#C0C0C0",e.white="#FFFFFF"}(r||(r={})),t.calculateRgba=function(e,t){if(Object.keys(r).includes(e)&&(e=r[e]),"#"===e[0]&&(e=e.slice(1)),3===e.length){var n="";e.split("").forEach((function(e){n+=e,n+=e})),e=n}return"rgba("+e.match(/.{2}/g).map((function(e){return parseInt(e,16)})).join(", ")+", "+t+")"}},function(e,t){e.exports=l},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},a=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i};Object.defineProperty(t,"__esModule",{value:!0});var o,i=n(0),s=n(355),u=n(21),l=n(4),c=n(356),d=n(357),p=function(e){return i.createElement("div",{className:"ip-table-loader"},i.createElement(u.default,null))},f=function(e){return i.createElement("div",{className:"ip-table-empty"},i.createElement("span",{className:"empty-message"},l.ICON_EXCLAIMATION_TRIANGLE," ",e.copy||"No Data Found"))},h=function(e){[32,37,38,39,40].indexOf(e.keyCode)>-1&&e.preventDefault()};t.default=function(e){var t=i.useRef(null),n=i.useRef(null),u=a(i.useState(!1),2),m=u[0],_=u[1],y=a(i.useState([]),2),g=y[0],v=y[1],b=a(i.useState([]),2),w=b[0],M=b[1],L=Array.isArray(e.hiddenColumns)?e.hiddenColumns:[],T=Number.isInteger(e.currentPage)&&"function"==typeof e.onPage,k="function"==typeof e.onSort&&void 0!==e.sortBy,x="function"==typeof e.renderPivotComponent?e.renderPivotComponent:function(){return null},E="function"==typeof e.onRowDoubleClick,S={hiddenColumns:L,sortBy:k?e.sortBy:[],pageIndex:T?e.currentPage-1:void 0,pageSize:e.itemsPerPage,autoResetExpanded:!1},O=c.useTable({columns:w,data:g,manualSortBy:k,manualPagination:T,initialState:S,manualFilters:!0,disableMultiSorting:!0,autoResetExpanded:!1,disableSortRemove:k,pageCount:e.totalPages,pageSize:e.itemsPerPage},c.useFlexLayout,c.useFilters,c.useSortBy,c.useExpanded,c.usePagination,c.useResizeColumns),D=O.getTableProps,Y=O.getTableBodyProps,A=O.headerGroups,C=O.page,j=O.rows,P=O.prepareRow,H=O.canPreviousPage,I=O.canNextPage,N=O.pageOptions,R=O.pageCount,F=O.gotoPage,z=O.nextPage,U=O.previousPage,W=O.setPageSize,B=O.setHiddenColumns,V=O.visibleColumns,G=O.totalColumnsWidth,q=O.toggleAllRowsExpanded,J=O.state,K=J.pageIndex,$=J.pageSize,X=J.sortBy,Z=T?j:C,Q=e.hidePaginator?"hide-paginator":"",ee=t.current&&G>t.current.clientWidth?"horizontal-scroll":"",te=e.tightRows?"tight-rows":"";return i.useEffect((function(){return _(!0)}),[]),i.useEffect((function(){var t,n;M((t=e.columns,Array.isArray(t)?t:!Array.isArray(t)&&"object"==typeof t&&(n=Object.keys(t)).length>0?n.map((function(e){return r(r({},t[e]),{accessor:e})})):[]))}),[e.columns]),i.useEffect((function(){m&&Array.isArray(e.hiddenColumns)&&B(e.hiddenColumns)}),[e.hiddenColumns]),i.useEffect((function(){Array.isArray(e.data)&&v(e.data)}),[e.data]),i.useEffect((function(){m&&T&&q(!1)}),[e.currentPage]),i.useEffect((function(){m&&k&&e.onSort(X)}),[X]),i.createElement("section",{ref:t,className:"ip-table-wrapper",tabIndex:e.disableKeyScroll?0:void 0,onKeyDown:e.disableKeyScroll?h:null},e.showInterstitial&&i.createElement(p,null),m&&!e.showInterstitial&&0===g.length&&i.createElement(f,{copy:e.noDataText}),i.createElement("table",r({},D(),{className:"ip-table "+ee+" "+Q+" "+te}),i.createElement("thead",{className:"ip-table-head"},A.map((function(e){return i.createElement(i.Fragment,{key:"head-fragment"},i.createElement("tr",r({},e.getHeaderGroupProps(),{className:"ip-table-head-row"}),e.headers.map((function(e){var t=e.hasOwnProperty("Search"),n=e.getSortByToggleProps(),a=i.createElement("span",{className:"sort-status"},e.isSorted?e.isSortedDesc?l.ICON_CHEVRON_DOWN:l.ICON_CHEVRON_UP:null);return i.createElement("th",r({},e.getHeaderProps(),{className:"ip-table-header "+(e.canSort?"ip-sortable":"")}),!t&&i.createElement("div",r({},n,{className:"filterable-cell-wrapper"}),e.render("Header"),a),t&&i.createElement("div",{className:"filterable-cell-wrapper"},i.createElement("span",r({},n,{className:"searchable-sort-area"}),e.render("Header"),a),e.hasOwnProperty("Search")&&e.render("Search")),e.canResize&&i.createElement("div",r({},e.getResizerProps(),{className:"ip-table-resizer "+(e.isResizing?"resizing":"")})))}))),e.headers.some((function(e){return e.hasOwnProperty("Filter")}))&&i.createElement("tr",r({},e.getHeaderGroupProps({key:"filters-row"})),e.headers.map((function(e,t){return i.createElement("th",r({},e.getHeaderProps({key:"filter-"+t}),{key:"filter-col-"+t,className:"ip-table-filter"}),e.canFilter&&e.Filter?e.render("Filter"):null)}))))}))),i.createElement("tbody",r({},Y(),{className:"ip-table-body"}),Z.map((function(t,a){var s,u="";e.highlightBy&&t.original.hasOwnProperty(e.highlightBy.key)&&t.original[e.highlightBy.key]===e.highlightBy.value&&(u="selected",s=n),P(t);var l=t.getRowProps();l.className="ip-table-row "+u,l.onClick=function(n){var r=function(){"function"==typeof e.onRowClick&&e.onRowClick(t)};E||r(),1===n.detail&&E&&(o=window.setTimeout(r,200))},l.onDoubleClick=function(n){clearTimeout(o),E&&e.onRowDoubleClick(t)};var c=t.cells.map((function(e){return i.createElement("td",r({},e.getCellProps(),{className:("ip-table-col "+(e.column.overflowVisible?"overflow-visible":"")).trim()}),e.render("Cell"))}));return i.createElement(i.Fragment,{key:"row-"+a},e.dnd&&i.createElement(d.default,{rowProps:l,rowRef:s,key:"row-"+a,row:t,dndType:e.dndType,dndName:e.dndName},c),!e.dnd&&i.createElement("tr",r({key:"row-"+a,ref:s},l),c),t.isExpanded&&i.createElement("tr",r({},t.getRowProps({key:"pivot-row"}),{className:"ip-pivot-row"}),i.createElement("td",{className:"ip-pivot-col "+u,colSpan:V.length},x(t))))})))),!e.hidePaginator&&i.createElement(s.default,r({},{totalItems:e.totalItems,pageIndex:e.currentPage?e.currentPage:K,manualPagination:T,pageSize:$,pageCount:R,pageOptions:N,canNextPage:T?e.currentPage+1<=e.totalPages:I,canPreviousPage:T?e.currentPage-1>=1:H,gotoPage:T?e.onPage:F,setPageSize:W,nextPage:T?function(){return e.onPage(e.currentPage+1,$)}:z,previousPage:T?function(){return e.onPage(e.currentPage-1,$)}:U})))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,a=n(0),o=n(5),i=n(4);t.default=function(e){e.manualPagination;var t=e.pageCount,n=e.pageIndex,s=e.pageSize,u=(e.pageOptions,e.totalItems),l=e.canPreviousPage,c=e.canNextPage,d=e.gotoPage,p=e.previousPage,f=e.nextPage;e.setPageSize;return a.createElement("section",{className:"ip-table-pagination"},a.createElement("span",null,a.createElement(o.default,{style:"subtle",size:"small",tooltip:"Go to first page",disabled:!l,onClick:function(){return d(1,s)}},i.ICON_ANGLE_DOUBLE_LEFT),a.createElement(o.default,{style:"subtle",size:"small",tooltip:"Go to previous page",disabled:!l,onClick:function(){return p()}},i.ICON_ANGLE_LEFT),a.createElement(o.default,{style:"subtle",size:"small",tooltip:"Go to next page",disabled:!c,onClick:function(){return f()}},i.ICON_ANGLE_RIGHT),a.createElement(o.default,{style:"subtle",size:"small",tooltip:"Go to last page",disabled:!c,onClick:function(){return d(t,s)}},i.ICON_ANGLE_DOUBLE_RIGHT),"  ",a.createElement("span",null,"Page  ",a.createElement("strong",null,n," of ",t),"  "),a.createElement("span",null,"Go to page   ",a.createElement("input",{className:"paginator-input",type:"number",placeholder:n,onChange:function(e){var n,a=e.target.value,o=Number(a);clearTimeout(r),!a||o<1||o>t||(o>=1&&o<=t&&(n=o),r=window.setTimeout((function(){return d(n,s)}),300))}})),"  "),a.createElement("span",{className:"total-assets"},"Total  ",a.createElement("strong",null,u||0)))}},function(e,t){e.exports=c},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},a=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(61),s=n(358);t.default=function(e){var t=e.dndType,n=e.dndName,u=e.row,l=a(i.useDrag({type:t,item:{name:n,rowData:u.original,type:t}}),2),c=(l[0],l[1]);return o.createElement("tr",r({},e.rowProps,{ref:s.default([c,e.rowRef])}),e.children)}},function(e,t,n){"use strict";n.r(t),t.default=function(e){return function(t){e.forEach((function(e){"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(5),s=n(22),u=n(4),l=function(e){function t(n){var r=e.call(this,n)||this;return r.render=function(){for(var e=r.props,n=e.page,a=e.totalPages,l=e.totalItems,c=Number.isInteger(a),d=Number.isInteger(a)&&a>1,p=!c||n-1==0,f=!c||n+1>a,h=Math.max(n-t.DEFAULT_STEP,1),m=Math.min(n+t.DEFAULT_STEP,a),_=[],y=h;y<=m;y++)_.push(y);return o.createElement("div",{className:"paginator"},o.createElement("div",{className:"pagination-controls"},o.createElement("span",{className:"paging-button-group"},o.createElement(i.default,{color:"secondary",size:"small",disabled:p,onClick:function(){return r.props.onPage(1)}},u.ICON_ANGLE_DOUBLE_LEFT),o.createElement(i.default,{color:"secondary",size:"small",disabled:p,onClick:function(){return r.props.onPage(n-1)}},u.ICON_ANGLE_LEFT)),o.createElement("div",{className:"jump-to-wrapper"},o.createElement(s.default,{label:"Page",value:n,disable:!d,options:_,onChange:function(e){return r.props.onPage(parseInt(e,10))}})),o.createElement("span",{className:"paging-button-group"},o.createElement(i.default,{color:"secondary",size:"small",disabled:f,onClick:function(){return r.props.onPage(n+1)}},u.ICON_ANGLE_RIGHT),o.createElement(i.default,{color:"secondary",size:"small",disabled:f,onClick:function(){return r.props.onPage(a)}},u.ICON_ANGLE_DOUBLE_RIGHT))),o.createElement("div",{className:"total-assets"},"Total: ",l||t.DEFAULT_TOTAL))},r}return a(t,e),t.DEFAULT_TOTAL=0,t.DEFAULT_STEP=25,t}(o.PureComponent);t.default=l},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(5),s=n(4),u=function(e){function t(t){var n=e.call(this,t)||this;return n.closeStyles={position:"absolute",right:"0px",top:"0px"},n.evtHandlers={onClose:function(e){return n.onClose(e)}},n}return a(t,e),t.prototype.onClose=function(e){(0,this.props.onRequestClose)(e)},t.prototype.render=function(){var e=this.props,t=e.isOpen,n=(e.children,e.style),r=e.wrapperStyle;return t?o.createElement("div",{className:"modal",style:r},o.createElement("div",{className:"modal-bg",onClick:this.evtHandlers.onClose}),o.createElement("div",{className:"modal-container",style:n},o.createElement("div",{className:"modal-content"},this.props.children),o.createElement(i.default,{onClick:this.evtHandlers.onClose,customStyles:this.closeStyles},s.ICON_TIMES))):null},t}(o.PureComponent);t.default=u},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),s=n(101),u=n(97),l=n(98),c=n(5),d=n(4),p=function(e){function t(t){var n=e.call(this,t)||this;return n.headerRef=i.createRef(),n.state={allowableTabsInView:0,isMenuOpen:!1},n}return a(t,e),t.prototype.componentDidMount=function(){var e=Math.floor(this.allowableNumOfTabs());this.setState({allowableTabsInView:e})},t.prototype.componentDidUpdate=function(e){var t=Math.floor(this.allowableNumOfTabs());this.setState({allowableTabsInView:t})},t.prototype.allowableNumOfTabs=function(){var e=this.props,t=e.options,n=e.tabPadding,r=0,a=this.headerRef.current;if(a){for(var o=a.offsetWidth,i=0;i<t.length;i++){var s=t[i],u=s.canClose||s.menuButtons?20:0,l=document.createElement("div");if(l.className="tab-header-option",l.innerHTML=s.label,a.appendChild(l),r+=l.offsetWidth+u,a.removeChild(l),l=null,r>=o-n-25)return i}return t.length}},t.prototype.renderContent=function(){var e,t,n,r,a=this.props,s=a.options,u=a.activeTab,l=a.keepMounted,c=a.width,d=a.height;if(l){var p=[];try{for(var f=o(s),h=f.next();!h.done;h=f.next()){var m=(v=h.value).key===u,_=i.cloneElement(v.content,{active:m,width:c,height:d});p.push(_)}}catch(t){e={error:t}}finally{try{h&&!h.done&&(t=f.return)&&t.call(f)}finally{if(e)throw e.error}}return p.length>0?p:null}try{for(var y=o(s),g=y.next();!g.done;g=y.next()){var v;if((v=g.value).key===u||!u)return v.content}}catch(e){n={error:e}}finally{try{g&&!g.done&&(r=y.return)&&r.call(y)}finally{if(n)throw n.error}}return null},t.prototype.renderHeader=function(){for(var e=this,t=this.props,n=t.options,r=t.activeTab,a=[],o=[],s=!1,p=function(t){var u=n[t],p=u.canClose,h=u.key,m=u.label,_=u.menuButtons,y=p?i.createElement(c.default,{style:"subtle",size:"small",onClick:function(t){t.preventDefault(),t.stopPropagation(),e.props.onClose(h)}},d.ICON_TIMES):null,g=_||null,v=h===r?"active":"";t<f.state.allowableTabsInView?a.push(i.createElement("div",{className:"tab-header-option "+v,onClick:function(){return e.props.onChange(h)},key:h},m,y,g)):(r!==h||s||(s=!0),o.push(i.createElement(l.default,{key:h,label:i.createElement("span",null,m,y,g),onClick:function(t){e.props.onChange(h)},active:r===h})))},f=this,h=0;h<n.length;h++)p(h);var m=i.createElement(c.default,{size:"large",style:"subtle",color:s?"primary":null},d.ICON_BARS);return i.createElement(i.Fragment,null,a,o.length>0?i.createElement("span",{className:"tab-header-menu"},i.createElement(u.default,{position:"left",items:o,onClick:function(t){e.setState({isMenuOpen:t})},isOpen:this.state.isMenuOpen,button:m})):null)},t.prototype.render=function(){return i.createElement("div",{className:"tabs"},i.createElement("div",{ref:this.headerRef,className:"tab-header"},this.renderHeader()),i.createElement("div",{className:"tab-content"},this.renderContent()))},t}(i.PureComponent);t.default=s.withResizeDetector(p)},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},i=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,a=e.length;n<r;n++,a++)e[a]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),u=n(62),l=n(5),c=n(11),d=n(100),p=n(9),f=n(4),h=function(e){function t(t){var n=e.call(this,t)||this;return n.state={textInputValue:""},n.inputRef=s.createRef(),u.default.filter=function(e){return p.filterHotkeys(e)},n.submitHandler=function(){return n.submitOption()},n}return a(t,e),t.prototype.deleteOption=function(e){var t=i([],o(this.props.options));t.splice(e,1),this.props.onChange(t)},t.prototype.componentWillUnmount=function(){u.default.unbind("enter",this.submitHandler)},t.prototype.inputBlur=function(e){u.default.unbind("enter",this.submitHandler),this.props.onBlur&&this.props.onBlur()},t.prototype.inputChanged=function(e){this.setState({textInputValue:e.target.value})},t.prototype.inputFocus=function(e){u.default("enter",this.submitHandler),this.props.onFocus&&this.props.onFocus()},t.prototype.submitOption=function(){var e=this,t=this.state.textInputValue,n=this.props.onError;if(""!==t){var r=void 0;-1===(r=this.props.options?i([],o(this.props.options)):[]).indexOf(t)?(r.push(t),this.props.onChange(r),this.setState({textInputValue:""},(function(){var t=e.inputRef.current;t&&t.focus()}))):n&&this.props.onError('"'+t+'" already exists in the list.')}else n&&this.props.onError("Can not add an empty item to the list")},t.prototype.render=function(){var e=this,t=this.props,n=t.label,r=t.options,a=t.placeholder,o=t.disabled,i=t.width,u=t.tooltip,l=(t.tooltipAdd,t.info),p=t.labelPosition,f=this.state.textInputValue;return s.createElement(c.default,{customClass:"list-field",label:n,tooltip:u,buttons:this.renderButtons(),info:l,labelPosition:p,width:i},s.createElement("input",{type:"text",placeholder:a,value:f,ref:this.inputRef,disabled:o,onChange:function(t){return e.inputChanged(t)},onFocus:function(t){return e.inputFocus(t)},onBlur:function(t){return e.inputBlur(t)}}),s.createElement(d.default,{items:r,removable:!0,onRemove:function(t){return e.deleteOption(t)}}))},t.prototype.renderButtons=function(){var e=this.props,t=e.buttons,n=e.tooltipAdd,r=t?i([],o(t)):[];return r.push(s.createElement(l.default,{key:"btn-submit",style:"subtle",tooltip:n,color:"primary",onClick:this.submitHandler},f.ICON_PLUS)),r},t}(s.PureComponent);t.default=h},function(e,t){e.exports=d},function(e,t,n){"use strict";n.r(t),n.d(t,"Toast",(function(){return d}));var r=n(0),a=n.n(r),o=n(35),i=n.n(o),s=n(2),u=function(){return(u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};var l={success:function(e){return a.a.createElement("svg",u({viewBox:"0 0 426.667 426.667",width:18,height:18},e),a.a.createElement("path",{d:"M213.333 0C95.518 0 0 95.514 0 213.333s95.518 213.333 213.333 213.333c117.828 0 213.333-95.514 213.333-213.333S331.157 0 213.333 0zm-39.134 322.918l-93.935-93.931 31.309-31.309 62.626 62.622 140.894-140.898 31.309 31.309-172.203 172.207z",fill:"#6ac259"}))},warn:function(e){return a.a.createElement("svg",u({viewBox:"0 0 310.285 310.285",width:18,height:18},e),a.a.createElement("path",{d:"M264.845 45.441C235.542 16.139 196.583 0 155.142 0 113.702 0 74.743 16.139 45.44 45.441 16.138 74.743 0 113.703 0 155.144c0 41.439 16.138 80.399 45.44 109.701 29.303 29.303 68.262 45.44 109.702 45.44s80.399-16.138 109.702-45.44c29.303-29.302 45.44-68.262 45.44-109.701.001-41.441-16.137-80.401-45.439-109.703zm-132.673 3.895a12.587 12.587 0 0 1 9.119-3.873h28.04c3.482 0 6.72 1.403 9.114 3.888 2.395 2.485 3.643 5.804 3.514 9.284l-4.634 104.895c-.263 7.102-6.26 12.933-13.368 12.933H146.33c-7.112 0-13.099-5.839-13.345-12.945L128.64 58.594c-.121-3.48 1.133-6.773 3.532-9.258zm23.306 219.444c-16.266 0-28.532-12.844-28.532-29.876 0-17.223 12.122-30.211 28.196-30.211 16.602 0 28.196 12.423 28.196 30.211.001 17.591-11.456 29.876-27.86 29.876z",fill:"#FFDA44"}))},loading:function(e){return a.a.createElement("div",u({className:"ct-icon-loading"},e))},info:function(e){return a.a.createElement("svg",u({viewBox:"0 0 23.625 23.625",width:18,height:18},e),a.a.createElement("path",{d:"M11.812 0C5.289 0 0 5.289 0 11.812s5.289 11.813 11.812 11.813 11.813-5.29 11.813-11.813S18.335 0 11.812 0zm2.459 18.307c-.608.24-1.092.422-1.455.548a3.838 3.838 0 0 1-1.262.189c-.736 0-1.309-.18-1.717-.539s-.611-.814-.611-1.367c0-.215.015-.435.045-.659a8.23 8.23 0 0 1 .147-.759l.761-2.688c.067-.258.125-.503.171-.731.046-.23.068-.441.068-.633 0-.342-.071-.582-.212-.717-.143-.135-.412-.201-.813-.201-.196 0-.398.029-.605.09-.205.063-.383.12-.529.176l.201-.828c.498-.203.975-.377 1.43-.521a4.225 4.225 0 0 1 1.29-.218c.731 0 1.295.178 1.692.53.395.353.594.812.594 1.376 0 .117-.014.323-.041.617a4.129 4.129 0 0 1-.152.811l-.757 2.68a7.582 7.582 0 0 0-.167.736 3.892 3.892 0 0 0-.073.626c0 .356.079.599.239.728.158.129.435.194.827.194.185 0 .392-.033.626-.097.232-.064.4-.121.506-.17l-.203.827zm-.134-10.878a1.807 1.807 0 0 1-1.275.492c-.496 0-.924-.164-1.28-.492a1.57 1.57 0 0 1-.533-1.193c0-.465.18-.865.533-1.196a1.812 1.812 0 0 1 1.28-.497c.497 0 .923.165 1.275.497.353.331.53.731.53 1.196 0 .467-.177.865-.53 1.193z",fill:"#006DF0"}))},error:function(e){return a.a.createElement("svg",u({viewBox:"0 0 51.976 51.976",width:18,height:18},e),a.a.createElement("path",{d:"M44.373 7.603c-10.137-10.137-26.632-10.138-36.77 0-10.138 10.138-10.137 26.632 0 36.77s26.632 10.138 36.77 0c10.137-10.138 10.137-26.633 0-36.77zm-8.132 28.638a2 2 0 0 1-2.828 0l-7.425-7.425-7.778 7.778a2 2 0 1 1-2.828-2.828l7.778-7.778-7.425-7.425a2 2 0 1 1 2.828-2.828l7.425 7.425 7.071-7.071a2 2 0 1 1 2.828 2.828l-7.071 7.071 7.425 7.425a2 2 0 0 1 0 2.828z",fill:"#D80027"}))}},c={success:"#6EC05F",info:"#1271EC",warn:"#FED953",error:"#D60A2E",loading:"#0088ff"},d=function(e){var t,n,o,i,s="margin"+((e.position||"top-center").includes("bottom")?"Bottom":"Top"),d=["ct-toast",e.onClick?" ct-cursor-pointer":"","ct-toast-"+e.type].join(" "),p=((null===(n=e.bar)||void 0===n?void 0:n.size)||"3px")+" "+((null===(o=e.bar)||void 0===o?void 0:o.style)||"solid")+" "+((null===(i=e.bar)||void 0===i?void 0:i.color)||c[e.type]),f=l[e.type],h=Object(r.useState)(((t={opacity:0})[s]=-15,t)),m=h[0],_=h[1],y=u({paddingLeft:e.heading?25:void 0,minHeight:e.heading?50:void 0,borderLeft:p},m),g=function(){var t;_(((t={opacity:0})[s]="-15px",t)),setTimeout((function(){e.onHide(e.id,e.position)}),300)};Object(r.useEffect)((function(){var t,n=setTimeout((function(){var e;_(((e={opacity:1})[s]="15px",e))}),50);return 0!==e.hideAfter&&(t=setTimeout((function(){g()}),1e3*e.hideAfter)),function(){clearTimeout(n),t&&clearTimeout(t)}}),[]),Object(r.useEffect)((function(){e.show||g()}),[e.show]);var v={tabIndex:0,onClick:e.onClick,onKeyPress:function(t){13===t.keyCode&&e.onClick(t)}};return a.a.createElement("div",u({className:d,role:e.role?e.role:"status",style:y},e.onClick?v:{}),e.renderIcon?e.renderIcon():a.a.createElement(f,null),a.a.createElement("div",{className:e.heading?"ct-text-group-heading":"ct-text-group"},e.heading&&a.a.createElement("h4",{className:"ct-heading"},e.heading),a.a.createElement("div",{className:"ct-text"},e.text)))};d.propTypes={type:s.string.isRequired,text:Object(s.oneOfType)([s.string,s.node]).isRequired,show:s.bool,onHide:s.func,id:Object(s.oneOfType)([s.string,s.number]),hideAfter:s.number,heading:s.string,position:s.string,renderIcon:s.func,bar:Object(s.shape)({}),onClick:s.func,role:s.string},d.defaultProps={id:void 0,show:!0,onHide:void 0,hideAfter:3,heading:void 0,position:"top-center",renderIcon:void 0,bar:{},onClick:void 0,role:"status"};var p=function(e){return e.replace(/-([a-z])/g,(function(e){return e[1].toUpperCase()}))},f={topLeft:[],topCenter:[],topRight:[],bottomLeft:[],bottomCenter:[],bottomRight:[]},h=function(e){var t=e.toast,n=e.hiddenID,o=Object(r.useState)(f),i=o[0],s=o[1];Object(r.useEffect)((function(){t&&s((function(e){var n,r=p(t.position||"top-center");return u(u({},e),((n={})[r]=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),a=0;for(t=0;t<n;t++)for(var o=arguments[t],i=0,s=o.length;i<s;i++,a++)r[a]=o[i];return r}(e[r],[t]),n))}))}),[t]);var l=function(e,t){s((function(n){var r,a=p(t||"top-center");return u(u({},n),((r={})[a]=n[a].filter((function(t){return t.id!==e})),r))}))},c=["Left","Center","Right"];return a.a.createElement(a.a.Fragment,null,["top","bottom"].map((function(e){return a.a.createElement("div",{key:"row_"+e,className:"ct-row"},c.map((function(t){var r=""+e+t,o=["ct-group","bottom"===e?"ct-flex-bottom":""].join(" ");return a.a.createElement("div",{key:r,className:o},i[r].map((function(e){return a.a.createElement(d,u({key:r+"_"+e.id},e,{id:e.id,text:e.text,type:e.type,onClick:e.onClick,hideAfter:e.hideAfter,show:n!==e.id,onHide:l}))})))})))})))};h.propTypes={toast:Object(s.shape)({}),hiddenID:s.number},h.defaultProps={toast:void 0,hiddenID:void 0};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===n&&r.firstChild?r.insertBefore(a,r.firstChild):r.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}("#ct-container {\n\tposition: fixed;\n\twidth: 100%;\n\theight: 100vh;\n\ttop: 0px;\n\tleft: 0px;\n\tz-index: 2000;\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\tpointer-events: none;\n}\n\n.ct-row {\n\tdisplay: flex;\n\tjustify-content: space-between;\n}\n\n.ct-group {\n\tflex: 1;\n\tmargin: 10px 20px;\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: center;\n}\n\n.ct-group:first-child {\n\talign-items: flex-start;\n}\n\n.ct-group:last-child {\n\talign-items: flex-end;\n}\n\n.ct-flex-bottom {\n\tjustify-content: flex-end;\n}\n\n.ct-toast {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tpadding: 12px 20px;\n\tbackground-color: #fff;\n\tbox-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n\tcolor: #000;\n\tborder-radius: 4px;\n\tmargin: 0px;\n\topacity: 1;\n\ttransition: 0.3s all ease-in-out;\n\tmin-height: 45px;\n\tpointer-events: all;\n}\n\n.ct-toast:focus {\n\toutline: none;\n}\n\n.ct-toast svg {\n\tmin-width: 18px;\n}\n\n.ct-cursor-pointer {\n\tcursor: pointer;\n}\n\n.ct-icon-loading {\n\tdisplay: inline-block;\n\twidth: 20px;\n\theight: 20px;\n}\n\n.ct-icon-loading:after {\n\tcontent: ' ';\n\tdisplay: block;\n\twidth: 14px;\n\theight: 14px;\n\tmargin: 1px;\n\tborder-radius: 50%;\n\tborder: 2px solid #0088ff;\n\tborder-color: #0088ff transparent #0088ff transparent;\n\tanimation: ct-icon-loading 1.2s linear infinite;\n}\n\n@keyframes ct-icon-loading {\n\t0% {\n\t\ttransform: rotate(0deg);\n\t}\n\t100% {\n\t\ttransform: rotate(360deg);\n\t}\n}\n\n.ct-text-group {\n\tmargin-left: 15px;\n}\n\n.ct-text-group-heading {\n\tmargin-left: 25px;\n}\n\n.ct-heading {\n\tfont-size: 18px;\n\tmargin: 0px;\n\tmargin-bottom: 5px;\n}\n\n.ct-text {\n\tfont-size: 14px;\n}\n\n@media (max-width: 768px) {\n\t.ct-row {\n\t\tjustify-content: flex-start;\n\t\tflex-direction: column;\n\t\tmargin: 7px 0px;\n\t}\n\n\t.ct-group {\n\t\tflex: none;\n\t\tmargin: 0px;\n\t}\n\n\t.ct-toast {\n\t\tmargin: 8px 15px;\n\t\twidth: initial;\n\t}\n}\n");var m=0,_=function(e,t){var n,r,o=document.getElementById((null===(n=t)||void 0===n?void 0:n.toastContainerID)||"ct-container");o||((o=document.createElement("div")).id="ct-container",document.body.appendChild(o)),m+=1;var s=1e3*(void 0===(null===(r=t)||void 0===r?void 0:r.hideAfter)?3:t.hideAfter),l=u({id:m,text:e},t);i.a.render(a.a.createElement(h,{toast:l}),o);var c=new Promise((function(e){setTimeout((function(){e()}),s)}));return c.hide=function(){i.a.render(a.a.createElement(h,{hiddenID:l.id}),o)},c};_.success=function(e,t){return _(e,u(u({},t),{type:"success"}))},_.warn=function(e,t){return _(e,u(u({},t),{type:"warn"}))},_.info=function(e,t){return _(e,u(u({},t),{type:"info"}))},_.error=function(e,t){return _(e,u(u({},t),{type:"error"}))},_.loading=function(e,t){return _(e,u(u({},t),{type:"loading"}))},t.default=_},function(e,t,n){"use strict";var r=n(366);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,o,i){if(i!==r){var s=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 s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(11),s=function(e){function t(t){var n=e.call(this,t)||this;return n.state={tempValue:null},n}return a(t,e),t.prototype.componentWillUnmount=function(){clearTimeout(this.updateTimeout)},t.prototype.updateValue=function(e){this.props.onChange(e)},t.prototype.rangeInputChange=function(e){var t=this,n=e.target.value,r=parseFloat(n);clearTimeout(this.updateTimeout),this.setState({tempValue:r},(function(){t.updateTimeout=setTimeout((function(){t.updateValue(r),t.setState({tempValue:null})}),100)}))},t.prototype.numberInputChange=function(e){var t=this.props,n=t.min,r=t.max,a=e.target.value;(a=""===a?0:parseFloat(a))>=n&&a<=r&&this.updateValue(a)},t.prototype.render=function(){var e=this,t=this.props,n=t.label,r=t.width,a=t.min,s=t.max,u=t.step,l=t.defaultValue,c=t.value,d=t.tooltip,p=t.info,f=t.labelPosition,h=this.state.tempValue,m=null!==h?h:null==c?l:c;return o.createElement(i.default,{customClass:"slider-field",label:n,tooltip:d,info:p,labelPosition:f,width:r},o.createElement("input",{onChange:function(t){return e.rangeInputChange(t)},type:"range",min:a,max:s,value:m,step:u}),o.createElement("input",{className:"val",onChange:function(t){return e.numberInputChange(t)},type:"number",value:m}))},t}(o.PureComponent);t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flattenNames=void 0;var r=s(n(369)),a=s(n(66)),o=s(n(381)),i=s(n(382));function s(e){return e&&e.__esModule?e:{default:e}}var u=t.flattenNames=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=[];return(0,i.default)(t,(function(t){Array.isArray(t)?e(t).map((function(e){return n.push(e)})):(0,o.default)(t)?(0,a.default)(t,(function(e,t){!0===e&&n.push(t),n.push(t+"-"+e)})):(0,r.default)(t)&&n.push(t)})),n};t.default=u},function(e,t,n){var r=n(18),a=n(12),o=n(15);e.exports=function(e){return"string"==typeof e||!a(e)&&o(e)&&"[object String]"==r(e)}},function(e,t,n){var r=n(31),a=Object.prototype,o=a.hasOwnProperty,i=a.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=o.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var a=i.call(e);return r&&(t?e[s]=n:delete e[s]),a}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r=n(373)();e.exports=r},function(e,t){e.exports=function(e){return function(t,n,r){for(var a=-1,o=Object(t),i=r(t),s=i.length;s--;){var u=i[e?s:++a];if(!1===n(o[u],u,o))break}return t}}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},function(e,t,n){var r=n(18),a=n(15);e.exports=function(e){return a(e)&&"[object Arguments]"==r(e)}},function(e,t){e.exports=function(){return!1}},function(e,t,n){var r=n(18),a=n(68),o=n(15),i={};i["[object Float32Array]"]=i["[object Float64Array]"]=i["[object Int8Array]"]=i["[object Int16Array]"]=i["[object Int32Array]"]=i["[object Uint8Array]"]=i["[object Uint8ClampedArray]"]=i["[object Uint16Array]"]=i["[object Uint32Array]"]=!0,i["[object Arguments]"]=i["[object Array]"]=i["[object ArrayBuffer]"]=i["[object Boolean]"]=i["[object DataView]"]=i["[object Date]"]=i["[object Error]"]=i["[object Function]"]=i["[object Map]"]=i["[object Number]"]=i["[object Object]"]=i["[object RegExp]"]=i["[object Set]"]=i["[object String]"]=i["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&a(e.length)&&!!i[r(e)]}},function(e,t,n){var r=n(71),a=n(379),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return a(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}},function(e,t,n){var r=n(109)(Object.keys,Object);e.exports=r},function(e,t,n){var r=n(111);e.exports=function(e){return"function"==typeof e?e:r}},function(e,t,n){var r=n(18),a=n(72),o=n(15),i=Function.prototype,s=Object.prototype,u=i.toString,l=s.hasOwnProperty,c=u.call(Object);e.exports=function(e){if(!o(e)||"[object Object]"!=r(e))return!1;var t=a(e);if(null===t)return!0;var n=l.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&u.call(n)==c}},function(e,t,n){var r=n(112),a=n(383),o=n(441),i=n(12);e.exports=function(e,t){return(i(e)?r:o)(e,a(t,3))}},function(e,t,n){var r=n(384),a=n(428),o=n(111),i=n(12),s=n(438);e.exports=function(e){return"function"==typeof e?e:null==e?o:"object"==typeof e?i(e)?a(e[0],e[1]):r(e):s(e)}},function(e,t,n){var r=n(385),a=n(427),o=n(122);e.exports=function(e){var t=a(e);return 1==t.length&&t[0][2]?o(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},function(e,t,n){var r=n(73),a=n(114);e.exports=function(e,t,n,o){var i=n.length,s=i,u=!o;if(null==e)return!s;for(e=Object(e);i--;){var l=n[i];if(u&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i<s;){var c=(l=n[i])[0],d=e[c],p=l[1];if(u&&l[2]){if(void 0===d&&!(c in e))return!1}else{var f=new r;if(o)var h=o(d,p,c,e,t,f);if(!(void 0===h?a(p,d,3,o,f):h))return!1}}return!0}},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,n){var r=n(45),a=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():a.call(t,n,1),--this.size,!0)}},function(e,t,n){var r=n(45);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},function(e,t,n){var r=n(45);e.exports=function(e){return r(this.__data__,e)>-1}},function(e,t,n){var r=n(45);e.exports=function(e,t){var n=this.__data__,a=r(n,e);return a<0?(++this.size,n.push([e,t])):n[a][1]=t,this}},function(e,t,n){var r=n(44);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(44),a=n(75),o=n(76);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var i=n.__data__;if(!a||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(i)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(110),a=n(397),o=n(23),i=n(113),s=/^\[object .+?Constructor\]$/,u=Function.prototype,l=Object.prototype,c=u.toString,d=l.hasOwnProperty,p=RegExp("^"+c.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||a(e))&&(r(e)?p:s).test(i(e))}},function(e,t,n){var r,a=n(398),o=(r=/[^.]+$/.exec(a&&a.keys&&a.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!o&&o in e}},function(e,t,n){var r=n(14)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(401),a=n(44),o=n(75);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||a),string:new r}}},function(e,t,n){var r=n(402),a=n(403),o=n(404),i=n(405),s=n(406);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=a,u.prototype.get=o,u.prototype.has=i,u.prototype.set=s,e.exports=u},function(e,t,n){var r=n(46);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(e,t){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},function(e,t,n){var r=n(46),a=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return a.call(t,e)?t[e]:void 0}},function(e,t,n){var r=n(46),a=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:a.call(t,e)}},function(e,t,n){var r=n(46);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},function(e,t,n){var r=n(47);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},function(e,t){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},function(e,t,n){var r=n(47);e.exports=function(e){return r(this,e).get(e)}},function(e,t,n){var r=n(47);e.exports=function(e){return r(this,e).has(e)}},function(e,t,n){var r=n(47);e.exports=function(e,t){var n=r(this,e),a=n.size;return n.set(e,t),this.size+=n.size==a?0:1,this}},function(e,t,n){var r=n(73),a=n(115),o=n(418),i=n(421),s=n(48),u=n(12),l=n(67),c=n(108),d="[object Object]",p=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,f,h,m){var _=u(e),y=u(t),g=_?"[object Array]":s(e),v=y?"[object Array]":s(t),b=(g="[object Arguments]"==g?d:g)==d,w=(v="[object Arguments]"==v?d:v)==d,M=g==v;if(M&&l(e)){if(!l(t))return!1;_=!0,b=!1}if(M&&!b)return m||(m=new r),_||c(e)?a(e,t,n,f,h,m):o(e,t,g,n,f,h,m);if(!(1&n)){var L=b&&p.call(e,"__wrapped__"),T=w&&p.call(t,"__wrapped__");if(L||T){var k=L?e.value():e,x=T?t.value():t;return m||(m=new r),h(k,x,n,f,m)}}return!!M&&(m||(m=new r),i(e,t,n,f,h,m))}},function(e,t,n){var r=n(76),a=n(414),o=n(415);function i(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}i.prototype.add=i.prototype.push=a,i.prototype.has=o,e.exports=i},function(e,t){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},function(e,t){e.exports=function(e,t){return e.has(t)}},function(e,t,n){var r=n(31),a=n(116),o=n(74),i=n(115),s=n(419),u=n(420),l=r?r.prototype:void 0,c=l?l.valueOf:void 0;e.exports=function(e,t,n,r,l,d,p){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!d(new a(e),new a(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var f=s;case"[object Set]":var h=1&r;if(f||(f=u),e.size!=t.size&&!h)return!1;var m=p.get(e);if(m)return m==t;r|=2,p.set(e,t);var _=i(f(e),f(t),r,l,d,p);return p.delete(e),_;case"[object Symbol]":if(c)return c.call(e)==c.call(t)}return!1}},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},function(e,t,n){var r=n(117),a=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,o,i,s){var u=1&n,l=r(e),c=l.length;if(c!=r(t).length&&!u)return!1;for(var d=c;d--;){var p=l[d];if(!(u?p in t:a.call(t,p)))return!1}var f=s.get(e),h=s.get(t);if(f&&h)return f==t&&h==e;var m=!0;s.set(e,t),s.set(t,e);for(var _=u;++d<c;){var y=e[p=l[d]],g=t[p];if(o)var v=u?o(g,y,p,t,e,s):o(y,g,p,e,t,s);if(!(void 0===v?y===g||i(y,g,n,o,s):v)){m=!1;break}_||(_="constructor"==p)}if(m&&!_){var b=e.constructor,w=t.constructor;b==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w||(m=!1)}return s.delete(e),s.delete(t),m}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,a=0,o=[];++n<r;){var i=e[n];t(i,n,e)&&(o[a++]=i)}return o}},function(e,t,n){var r=n(19)(n(14),"DataView");e.exports=r},function(e,t,n){var r=n(19)(n(14),"Promise");e.exports=r},function(e,t,n){var r=n(19)(n(14),"Set");e.exports=r},function(e,t,n){var r=n(19)(n(14),"WeakMap");e.exports=r},function(e,t,n){var r=n(121),a=n(32);e.exports=function(e){for(var t=a(e),n=t.length;n--;){var o=t[n],i=e[o];t[n]=[o,i,r(i)]}return t}},function(e,t,n){var r=n(114),a=n(429),o=n(435),i=n(78),s=n(121),u=n(122),l=n(49);e.exports=function(e,t){return i(e)&&s(t)?u(l(e),t):function(n){var i=a(n,e);return void 0===i&&i===t?o(n,e):r(t,i,3)}}},function(e,t,n){var r=n(123);e.exports=function(e,t,n){var a=null==e?void 0:r(e,t);return void 0===a?n:a}},function(e,t,n){var r=n(431),a=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,i=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(a,(function(e,n,r,a){t.push(r?a.replace(o,"$1"):n||e)})),t}));e.exports=i},function(e,t,n){var r=n(432);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},function(e,t,n){var r=n(76);function a(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],o=n.cache;if(o.has(a))return o.get(a);var i=e.apply(this,r);return n.cache=o.set(a,i)||o,i};return n.cache=new(a.Cache||r),n}a.Cache=r,e.exports=a},function(e,t,n){var r=n(434);e.exports=function(e){return null==e?"":r(e)}},function(e,t,n){var r=n(31),a=n(112),o=n(12),i=n(79),s=r?r.prototype:void 0,u=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return a(t,e)+"";if(i(t))return u?u.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},function(e,t,n){var r=n(436),a=n(437);e.exports=function(e,t){return null!=e&&a(e,t,r)}},function(e,t){e.exports=function(e,t){return null!=e&&t in Object(e)}},function(e,t,n){var r=n(124),a=n(106),o=n(12),i=n(107),s=n(68),u=n(49);e.exports=function(e,t,n){for(var l=-1,c=(t=r(t,e)).length,d=!1;++l<c;){var p=u(t[l]);if(!(d=null!=e&&n(e,p)))break;e=e[p]}return d||++l!=c?d:!!(c=null==e?0:e.length)&&s(c)&&i(p,c)&&(o(e)||a(e))}},function(e,t,n){var r=n(439),a=n(440),o=n(78),i=n(49);e.exports=function(e){return o(e)?r(i(e)):a(e)}},function(e,t){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},function(e,t,n){var r=n(123);e.exports=function(e){return function(t){return r(t,e)}}},function(e,t,n){var r=n(442),a=n(43);e.exports=function(e,t){var n=-1,o=a(e)?Array(e.length):[];return r(e,(function(e,r,a){o[++n]=t(e,r,a)})),o}},function(e,t,n){var r=n(104),a=n(443)(r);e.exports=a},function(e,t,n){var r=n(43);e.exports=function(e,t){return function(n,a){if(null==n)return n;if(!r(n))return e(n,a);for(var o=n.length,i=t?o:-1,s=Object(n);(t?i--:++i<o)&&!1!==a(s[i],i,s););return n}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeClasses=void 0;var r=i(n(66)),a=i(n(445)),o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function i(e){return e&&e.__esModule?e:{default:e}}var s=t.mergeClasses=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=e.default&&(0,a.default)(e.default)||{};return t.map((function(t){var a=e[t];return a&&(0,r.default)(a,(function(e,t){n[t]||(n[t]={}),n[t]=o({},n[t],a[t])})),t})),n};t.default=s},function(e,t,n){var r=n(446);e.exports=function(e){return r(e,5)}},function(e,t,n){var r=n(73),a=n(447),o=n(125),i=n(449),s=n(450),u=n(453),l=n(454),c=n(455),d=n(456),p=n(117),f=n(457),h=n(48),m=n(458),_=n(459),y=n(464),g=n(12),v=n(67),b=n(466),w=n(23),M=n(468),L=n(32),T=n(80),k={};k["[object Arguments]"]=k["[object Array]"]=k["[object ArrayBuffer]"]=k["[object DataView]"]=k["[object Boolean]"]=k["[object Date]"]=k["[object Float32Array]"]=k["[object Float64Array]"]=k["[object Int8Array]"]=k["[object Int16Array]"]=k["[object Int32Array]"]=k["[object Map]"]=k["[object Number]"]=k["[object Object]"]=k["[object RegExp]"]=k["[object Set]"]=k["[object String]"]=k["[object Symbol]"]=k["[object Uint8Array]"]=k["[object Uint8ClampedArray]"]=k["[object Uint16Array]"]=k["[object Uint32Array]"]=!0,k["[object Error]"]=k["[object Function]"]=k["[object WeakMap]"]=!1,e.exports=function e(t,n,x,E,S,O){var D,Y=1&n,A=2&n,C=4&n;if(x&&(D=S?x(t,E,S,O):x(t)),void 0!==D)return D;if(!w(t))return t;var j=g(t);if(j){if(D=m(t),!Y)return l(t,D)}else{var P=h(t),H="[object Function]"==P||"[object GeneratorFunction]"==P;if(v(t))return u(t,Y);if("[object Object]"==P||"[object Arguments]"==P||H&&!S){if(D=A||H?{}:y(t),!Y)return A?d(t,s(D,t)):c(t,i(D,t))}else{if(!k[P])return S?t:{};D=_(t,P,Y)}}O||(O=new r);var I=O.get(t);if(I)return I;O.set(t,D),M(t)?t.forEach((function(r){D.add(e(r,n,x,r,t,O))})):b(t)&&t.forEach((function(r,a){D.set(a,e(r,n,x,a,t,O))}));var N=j?void 0:(C?A?f:p:A?T:L)(t);return a(N||t,(function(r,a){N&&(r=t[a=r]),o(D,a,e(r,n,x,a,t,O))})),D}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}},function(e,t,n){var r=n(19),a=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=a},function(e,t,n){var r=n(50),a=n(32);e.exports=function(e,t){return e&&r(t,a(t),e)}},function(e,t,n){var r=n(50),a=n(80);e.exports=function(e,t){return e&&r(t,a(t),e)}},function(e,t,n){var r=n(23),a=n(71),o=n(452),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=a(e),n=[];for(var s in e)("constructor"!=s||!t&&i.call(e,s))&&n.push(s);return n}},function(e,t){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},function(e,t,n){(function(e){var r=n(14),a=t&&!t.nodeType&&t,o=a&&"object"==typeof e&&e&&!e.nodeType&&e,i=o&&o.exports===a?r.Buffer:void 0,s=i?i.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}}).call(this,n(42)(e))},function(e,t){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},function(e,t,n){var r=n(50),a=n(77);e.exports=function(e,t){return r(e,a(e),t)}},function(e,t,n){var r=n(50),a=n(127);e.exports=function(e,t){return r(e,a(e),t)}},function(e,t,n){var r=n(118),a=n(127),o=n(80);e.exports=function(e){return r(e,o,a)}},function(e,t){var n=Object.prototype.hasOwnProperty;e.exports=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&n.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},function(e,t,n){var r=n(81),a=n(460),o=n(461),i=n(462),s=n(463);e.exports=function(e,t,n){var u=e.constructor;switch(t){case"[object ArrayBuffer]":return r(e);case"[object Boolean]":case"[object Date]":return new u(+e);case"[object DataView]":return a(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(e,n);case"[object Map]":return new u;case"[object Number]":case"[object String]":return new u(e);case"[object RegExp]":return o(e);case"[object Set]":return new u;case"[object Symbol]":return i(e)}}},function(e,t,n){var r=n(81);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},function(e,t){var n=/\w*$/;e.exports=function(e){var t=new e.constructor(e.source,n.exec(e));return t.lastIndex=e.lastIndex,t}},function(e,t,n){var r=n(31),a=r?r.prototype:void 0,o=a?a.valueOf:void 0;e.exports=function(e){return o?Object(o.call(e)):{}}},function(e,t,n){var r=n(81);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},function(e,t,n){var r=n(465),a=n(72),o=n(71);e.exports=function(e){return"function"!=typeof e.constructor||o(e)?{}:r(a(e))}},function(e,t,n){var r=n(23),a=Object.create,o=function(){function e(){}return function(t){if(!r(t))return{};if(a)return a(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=o},function(e,t,n){var r=n(467),a=n(69),o=n(70),i=o&&o.isMap,s=i?a(i):r;e.exports=s},function(e,t,n){var r=n(48),a=n(15);e.exports=function(e){return a(e)&&"[object Map]"==r(e)}},function(e,t,n){var r=n(469),a=n(69),o=n(70),i=o&&o.isSet,s=i?a(i):r;e.exports=s},function(e,t,n){var r=n(48),a=n(15);e.exports=function(e){return a(e)&&"[object Set]"==r(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.autoprefix=void 0;var r,a=n(66),o=(r=a)&&r.__esModule?r:{default:r},i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};var s={borderRadius:function(e){return{msBorderRadius:e,MozBorderRadius:e,OBorderRadius:e,WebkitBorderRadius:e,borderRadius:e}},boxShadow:function(e){return{msBoxShadow:e,MozBoxShadow:e,OBoxShadow:e,WebkitBoxShadow:e,boxShadow:e}},userSelect:function(e){return{WebkitTouchCallout:e,KhtmlUserSelect:e,MozUserSelect:e,msUserSelect:e,WebkitUserSelect:e,userSelect:e}},flex:function(e){return{WebkitBoxFlex:e,MozBoxFlex:e,WebkitFlex:e,msFlex:e,flex:e}},flexBasis:function(e){return{WebkitFlexBasis:e,flexBasis:e}},justifyContent:function(e){return{WebkitJustifyContent:e,justifyContent:e}},transition:function(e){return{msTransition:e,MozTransition:e,OTransition:e,WebkitTransition:e,transition:e}},transform:function(e){return{msTransform:e,MozTransform:e,OTransform:e,WebkitTransform:e,transform:e}},absolute:function(e){var t=e&&e.split(" ");return{position:"absolute",top:t&&t[0],right:t&&t[1],bottom:t&&t[2],left:t&&t[3]}},extend:function(e,t){var n=t[e];return n||{extend:e}}},u=t.autoprefix=function(e){var t={};return(0,o.default)(e,(function(e,n){var r={};(0,o.default)(e,(function(e,t){var n=s[t];n?r=i({},r,n(e)):r[t]=e})),t[n]=r})),t};t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hover=void 0;var r,a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=n(0),i=(r=o)&&r.__esModule?r:{default:r};function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var c=t.hover=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,o,l;s(this,r);for(var c=arguments.length,d=Array(c),p=0;p<c;p++)d[p]=arguments[p];return o=l=u(this,(n=r.__proto__||Object.getPrototypeOf(r)).call.apply(n,[this].concat(d))),l.state={hover:!1},l.handleMouseOver=function(){return l.setState({hover:!0})},l.handleMouseOut=function(){return l.setState({hover:!1})},l.render=function(){return i.default.createElement(t,{onMouseOver:l.handleMouseOver,onMouseOut:l.handleMouseOut},i.default.createElement(e,a({},l.props,l.state)))},u(l,o)}return l(r,n),r}(i.default.Component)};t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.active=void 0;var r,a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=n(0),i=(r=o)&&r.__esModule?r:{default:r};function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var c=t.active=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,o,l;s(this,r);for(var c=arguments.length,d=Array(c),p=0;p<c;p++)d[p]=arguments[p];return o=l=u(this,(n=r.__proto__||Object.getPrototypeOf(r)).call.apply(n,[this].concat(d))),l.state={active:!1},l.handleMouseDown=function(){return l.setState({active:!0})},l.handleMouseUp=function(){return l.setState({active:!1})},l.render=function(){return i.default.createElement(t,{onMouseDown:l.handleMouseDown,onMouseUp:l.handleMouseUp},i.default.createElement(e,a({},l.props,l.state)))},u(l,o)}return l(r,n),r}(i.default.Component)};t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e,t){var n={},r=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];n[e]=t};return 0===e&&r("first-child"),e===t-1&&r("last-child"),(0===e||e%2==0)&&r("even"),1===Math.abs(e%2)&&r("odd"),r("nth-child",e),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default=function(e){var t="string"==typeof e.className?e.className:"",n=e.isLoading?r.createElement("div",{className:"loading-bar"}):null,a=r.createElement("div",{className:"title"},e.title);return e.hasOwnProperty("tabs")&&Array.isArray(e.tabs)&&(a=e.tabs.map((function(t,n){return r.createElement("div",{key:n,className:"tab "+(e.activeTabName===t?"active":""),onClick:function(){return e.selectTab(t,n)}},t)}))),r.createElement("div",{className:"section "+t},r.createElement("div",{className:"section-header"},a,r.createElement("div",{className:"buttons"},e.buttons)),r.createElement("div",{className:"section-content"},e.children),n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),a=n(9),o=r.memo((function(e){return r.createElement("div",null,a.formatDateDefault(e.cell.row.values.date_created))}));t.default=o},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.HEADER_HEIGHT=t.PREVIEW_MAX_HEIGHT=t.PREVIEW_MAX_WIDTH=void 0;var i=n(0),s=n(90);t.PREVIEW_MAX_WIDTH=400,t.PREVIEW_MAX_HEIGHT=400,t.HEADER_HEIGHT=30;var u=function(e){function n(t){var n=e.call(this,t)||this;return n.iconRef=i.createRef(),n.evtHandlers={onClose:function(){return n.handleClose()},onClick:function(){return n.handlePreviewClick()}},n}return a(n,e),n.prototype.handleClose=function(){(0,this.props.onRequestClose)()},n.prototype.handlePreviewClick=function(){var e=this.props,t=e.onClick;e.showMedia||t()},n.prototype.render=function(){var e=this,n=function(n,r){if(e.iconRef.current){n||(n=t.PREVIEW_MAX_WIDTH),r||(r=t.PREVIEW_MAX_HEIGHT);var a=e.iconRef.current.getBoundingClientRect(),o=n/r,i=t.PREVIEW_MAX_WIDTH,s=i/o;s>t.PREVIEW_MAX_HEIGHT&&(i=(s=t.PREVIEW_MAX_HEIGHT)*o);var u=a.x+a.width-i,l=a.y+a.height-s-20;return u<0&&(u=a.x),l<t.HEADER_HEIGHT&&(l=a.y+20),{top:l,left:u,width:i,height:s,position:"absolute",zIndex:9e3}}},r=this.props,a=r.cell,u=r.showMedia;return i.createElement("div",{ref:this.iconRef,className:"asset-type-cell",onClick:this.evtHandlers.onClick},i.createElement(s.AssetsTypeIcon,{type:a.row.values.type}),a.row.values.type===s.ASSET_TYPES.IMAGE&&i.createElement(s.ImagePreview,{style:o({},n(a.row.original.width,a.row.original.height)),showMedia:u,url:a.row.original.url,onRequestClose:this.evtHandlers.onClose}),a.row.values.type===s.ASSET_TYPES.VIDEO&&i.createElement(s.VideoPreview,{playbackSettings:{autoPlay:!0,loop:!1},style:n(a.row.original.width,a.row.original.height),showMedia:u,url:a.row.original.url,onRequestClose:this.evtHandlers.onClose}))},n}(i.PureComponent),l=i.memo(u);t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.secondsToTime=void 0;var r=n(0),a=n(17),o=n(8),i=n(10);t.secondsToTime=function(e){var t=Math.floor(e/60),n=Math.floor(e-60*t);return n<10&&(n="0"+n),t+":"+n};t.default=o.connect((function(e){return{}}),(function(e){return i.bindActionCreators({updateAssetName:a.updateAssetName},e)}))((function(e){var n=e.cell.row.original,a=n.duration;n.id;return null!=a?r.createElement("div",{className:"asset-duration-cell"},t.secondsToTime(a)):null}))},function(e,t){e.exports=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ASSET_DND_TYPES=void 0,t.ASSET_DND_TYPES={ASSET_NAME:"asset_name"}},function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i};Object.defineProperty(t,"__esModule",{value:!0});var a,o=n(0),i=n(0),s=n(13),u=n(17),l=n(8),c=n(10);t.default=l.connect((function(e){return{}}),(function(e){return c.bindActionCreators({updateAssetName:u.updateAssetName},e)}))((function(e){var t=e.cell.row.original,n=t.name,u=t.id,l=r(i.useState(""),2),c=l[0],d=l[1],p=function(t){e.updateAssetName(e.api,u,t)};return i.useEffect((function(){return d(n),function(){clearTimeout(a)}}),[n]),o.createElement(s.default,{value:c,width:"100%",onChange:function(e){return function(e){d(e),clearTimeout(a),a=setTimeout((function(){return p(e)}),1e3)}(e)}})}))},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(13),s=n(24),u=n(8),l=n(10),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.render=function(){var e=t.props.assetFilters;return o.createElement(i.default,{submittable:!0,submittableType:"search",value:e.name,doSubmit:function(e){return t.props.updateFilters({name:e})}})},t}return a(t,e),t}(o.PureComponent),d=u.connect((function(e){return{assetFilters:e.assetFilters}}),(function(e){return l.bindActionCreators({updateFilters:s.updateFilters},e)}))(o.memo(c));t.default=d},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(33),s=n(30),u=n(8),l=n(10),c=function(e){function t(t){var n=e.call(this,t)||this;return n.render=function(){var e=n.props,t=e.cell,r=e.selectedAssets,a=t.row.original.id,i=r.indexOf(a)>-1;return o.createElement(s.default,{label:"",width:"auto",value:i,onChange:function(e,t){return function(e,t){e?t.shiftKey&&r.length>0?n.props.selectMultipleAssets(a):n.props.selectAsset(a):n.props.deselectAsset(a)}(e,t)}})},n}return a(t,e),t}(o.PureComponent),d=u.connect((function(e){return{selectedAssets:e.selectedAssets}}),(function(e){return l.bindActionCreators({selectAsset:i.selectAsset,deselectAsset:i.deselectAsset,selectMultipleAssets:i.selectMultipleAssets},e)}))(o.memo(c));t.default=d},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(30),s=n(33),u=n(8),l=n(10),c=function(e){function t(t){var n=e.call(this,t)||this;return n.render=function(){var e=0===n.props.selectedAssets.length,t=e?function(){return n.props.selectAll()}:function(){return n.props.resetSelection()};return o.createElement(i.default,{label:"",propagate:!1,value:!e,onChange:t})},n}return a(t,e),t}(o.PureComponent),d=u.connect((function(e){return{selectedAssets:e.selectedAssets}}),(function(e){return l.bindActionCreators({selectAll:s.selectAll,resetSelection:s.resetSelection},e)}))(o.memo(c));t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),a=n(5),o=r.memo((function(e){return r.createElement(a.default,{color:"secondary",style:"subtle",size:"small",onClick:e.onClick},e.cell.row.values.tags.length)}));t.default=o},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(24),s=n(13),u=n(8),l=n(10),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.render=function(){var e=t.props.assetFilters;return o.createElement(s.default,{submittable:!0,submittableType:"search",value:e.tags,doSubmit:function(e){return t.props.updateFilters({tags:e})}})},t}return a(t,e),t}(o.PureComponent),d=u.connect((function(e){return{assetFilters:e.assetFilters}}),(function(e){return l.bindActionCreators({updateFilters:i.updateFilters},e)}))(o.memo(c));t.default=d},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(7),s=n(51),u=n(13),l=n(17),c=n(8),d=n(10),p=n(5),f=n(4),h=function(e){function t(n){var r=e.call(this,n)||this;return r.addTags=function(e,t){t&&r.props.addAssetTag(r.props.api,e,t)},r.render=function(){var e=r.props,n=e.row.original,a=n.id,l=n.tags,c=e.assetTags,d=l.map((function(e){return o.createElement(s.default,{key:e,copy:e,colorize:t.COLORIZE_TAGS,removeHandler:function(){return r.props.deleteAssetTag(r.props.api,a,e)}})}));return o.createElement("div",{className:"tags-column"},o.createElement(o.Fragment,null,o.createElement(u.default,{submittable:!0,submittableType:"add",suggestions:c,label:i.assets.tags.add,width:t.ADD_TAG_INPUT_WIDTH,doSubmit:function(e){return r.addTags(a,e)}}),d,o.createElement(p.default,{customStyles:{position:"absolute",right:"1px",top:"9px"},style:"subtle",onClick:function(e){return r.props.onClose(e,r.props.row)}},f.ICON_TIMES)))},r}return a(t,e),t.ADD_TAG_INPUT_WIDTH="280px",t.COLORIZE_TAGS=!0,t}(o.PureComponent);t.default=c.connect((function(e){return{assetTags:e.assetTags}}),(function(e){return d.bindActionCreators({addAssetTag:l.addAssetTag,deleteAssetTag:l.deleteAssetTag},e)}))(h)},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(51),s=n(13),u=n(17),l=n(8),c=n(10),d=function(e){function t(t){var n=e.call(this,t)||this;return n.render=function(){var e=n.props,t=e.cell,r=e.assetTags,a=t.row.original.tags.map((function(e){return o.createElement(i.default,{key:e,copy:e,colorize:!0,removeHandler:function(){return n.removeTag(e)}})}));return o.createElement("div",{className:"tags-complex-column"},a,o.createElement("div",{className:"new-tag"},o.createElement(s.default,{submittable:!0,submittableType:"add",placeholder:"+",hideButtons:!0,suggestions:r,doSubmit:function(e){return n.onSubmit(e)},width:"150px",buttons:[],value:n.state.newTag})))},n.state={newTag:""},n.inputRef=o.createRef(),n}return a(t,e),t.prototype.onSubmit=function(e){var t=this.props.cell.row.original,n=t.id;-1===t.tags.indexOf(e)&&this.props.addAssetTag(this.props.api,n,e),this.setState({newTag:""})},t.prototype.removeTag=function(e){var t=this.props.cell.row.original.id;this.props.deleteAssetTag(this.props.api,t,e)},t}(o.Component),p=l.connect((function(e){return{assetTags:e.assetTags}}),(function(e){return c.bindActionCreators({addAssetTag:u.addAssetTag,deleteAssetTag:u.deleteAssetTag},e)}))(o.memo(d));t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),a=n(85),o=r.memo((function(e){return r.createElement("div",{className:"asset-type-cell"},r.createElement(a.default,{type:e.cell.row.values.type}))}));t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),a=r.memo((function(e){var t=e.cell.row.original.processing?"processing":"complete";return r.createElement("div",{className:"asset-status-cell"},r.createElement("div",{className:"status-indicator "+t}))}));t.default=a},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(85),s=n(5),u=n(59),l=n(24),c=n(8),d=n(10),p=n(25),f=function(e){function t(t){var n=e.call(this,t)||this;return n.handleFilterChange=function(e){var t=e!==p.ASSET_TYPES.ALL?e:"";n.props.updateFilters({type:t,page:1})},n.render=function(){var e=n.state.openMenu,t=n.props.assetFilters.type,r=[],a=function(e){if(p.ASSET_TYPES.hasOwnProperty(e)){var t=p.ASSET_TYPES[e];r.push(o.createElement("div",{key:t,className:"asset-filter",onClick:function(){return n.handleFilterChange(t)}},o.createElement(i.default,{type:t})))}};for(var l in p.ASSET_TYPES)a(l);return o.createElement("div",{className:"centered cell"},o.createElement(s.default,{tooltip:"Filter by Asset type",buttonRef:n.typeFilterRef,onClick:function(){return n.setState({openMenu:!e})}},o.createElement(i.default,{type:t||"filter"}),o.createElement(u.default,{fixed:!0,show:e,position:"bottomleft",toggleRef:n.typeFilterRef,onOutsideClick:function(){return n.setState({openMenu:!1})}},r)))},n.state={openMenu:!1},n.typeFilterRef=o.createRef(),n}return a(t,e),t}(o.PureComponent),h=c.connect((function(e){return{assetFilters:e.assetFilters}}),(function(e){return d.bindActionCreators({updateFilters:l.updateFilters},e)}))(o.memo(f));t.default=h},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(34),s=n(26),u=n(86),l=function(e){function t(t){var n=e.call(this,t)||this;return n.defaultSize=600,n}return a(t,e),t.prototype.getWrapperStyle=function(){var e=this.props,t=e.padding,n=e.width,r=e.height,a=void 0!==t?t:i.DEFAULT_PADDING;return s.getPlayerStyle(n,r,this.defaultSize,this.defaultSize,a,this.defaultSize,this.defaultSize)},t.prototype.render=function(){var e=this.props,t=e.active,n=e.asset,r=n.name,a=n.url,i=n.id,s=e.width,l=e.height,c=this.getWrapperStyle();return!1!==t?o.createElement("div",{className:"media-player"},o.createElement("div",{className:"inner-viewer",style:c},o.createElement(u.default,{options:{width:s,height:l,x:0,y:0,rotation:0,id:"xxx",name:"xxx",content:"ABCDEFGHIJKLM\nNOPQRSTUVWXYZ\nabcdefghijklm\nnopqrstuvwxyz\n1234567890",color:"#000000",background_color:"#ffffff",font_size:80,font_weight:400,font_type:"custom",font:r,custom_font_url:a,custom_font_id:i,letter_spacing:null,word_spacing:null,line_height:null,horizontal_alignment:"center",vertical_alignment:"center",text_wrap:!0,text_fit:!0}}))):null},t}(o.PureComponent);t.default=l},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(7),s=n(30),u=n(128),l=n(52),c=n(10),d=n(8),p=n(4),f=n(5),h=function(e){function t(t){var n=e.call(this,t)||this;return n.render=function(){var e,t=n.props.assetUploads,r=t.uploads,a=t.autoTag,l=t.assignToStory;return e=r.length>0?r.map((function(e){var t=e.filename,r=e.percent,a=r<100?o.createElement(u.default,{progress:e.percent}):o.createElement("span",null,i.assets.uploads.preparePhase),s=r<100&&o.createElement(f.default,{key:"btn-cancel",onClick:function(){return n.handleCancelAssetUpload(t)},style:"subtle"},p.ICON_TIMES);return o.createElement("div",{className:"ongoing-upload",key:t},o.createElement("div",{className:"ongoing-upload-inner"},o.createElement("div",{className:"upload-filename"},t),s),a)})):o.createElement("div",{className:"no-ongoing-uploads"},i.assets.uploads.noUploads),o.createElement("div",{className:"uploads-menu"},o.createElement("div",{className:"uploads-controls"},o.createElement(s.default,{width:"50%",label:i.assets.uploads.autoTagInput,value:a,onChange:function(){return n.props.toggleAutoTag(!a)}}),o.createElement(s.default,{width:"50%",label:i.assets.uploads.assignToStoryInput,info:i.assets.uploads.assignToStoryInfo,value:l,onChange:function(){return n.props.toggleAssignToStory(!l)}})),o.createElement("div",{className:"uploads-list"},e))},n}return a(t,e),t.prototype.handleCancelAssetUpload=function(e){var t=this.props.api;this.props.cancelAssetUpload(e,t)},t}(o.PureComponent);t.default=d.connect((function(e){return{assetUploads:e.assetUploads}}),(function(e){return c.bindActionCreators({toggleAutoTag:l.toggleAutoTag,toggleAssignToStory:l.toggleAssignToStory,cancelAssetUpload:l.cancelAssetUpload},e)}))(h)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PreviewNotAvailable=void 0;var r=n(0),a=n(4),o=n(7);t.PreviewNotAvailable=function(e){return!0===e.active||void 0===e.active?r.createElement("div",{className:"preview-not-available"},r.createElement("div",{className:"cta"},r.createElement("div",{className:"icon"},a.ICON_BAN),r.createElement("p",null,o.assets.previewNotAvailable))):null}},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(34),s=n(26),u=function(e){function t(t){var n=e.call(this,t)||this;return n.width=1280,n.height=720,n.audioNode=o.createRef(),n}return a(t,e),t.prototype.getImageStyle=function(){var e=this.props,t=e.padding,n=e.width,r=e.height,a=void 0!==t?t:i.DEFAULT_PADDING;return s.getPlayerStyle(n,r,this.width,this.height,a)},t.prototype.render=function(){var e=this.props,t=e.url;return!1!==e.active?o.createElement("div",{className:"media-player"},o.createElement("div",{className:"inner-viewer",style:this.getImageStyle()},o.createElement("audio",{controls:!0,src:t,ref:this.audioNode}))):null},t}(o.PureComponent);t.default=u},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),s=n(87),u=n(5),l=n(7),c=n(4),d=function(e){function t(t){var n=e.call(this,t)||this;return n.videoNode=null,n.videoNode=i.createRef(),n.evtHandlers={onClose:function(e){return n.onClose(e)}},n}return a(t,e),t.prototype.onClose=function(e){(0,this.props.onRequestClose)(e)},t.prototype.render=function(){var e=this.props,t=e.showMedia,n=e.url,r=e.playbackSettings,a=e.style;return t?i.createElement(s.default,{id:"portal-root"},i.createElement("div",{style:o({},a),className:"close-icon-preview"},i.createElement(u.default,{key:"btn-filter",onClick:this.evtHandlers.onClose,size:"large",style:"subtle",tooltip:l.assets.field.tooltipFilter},c.ICON_TIMES)),i.createElement("video",{style:a,muted:!0,ref:this.videoNode,autoPlay:r.autoPlay,loop:r.loop,controls:!0,preload:"preload",src:n,className:"asset-preview-background"})):null},t}(i.PureComponent);t.default=d},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),s=n(87),u=n(4),l=n(5),c=n(7),d=function(e){function t(t){var n=e.call(this,t)||this;return n.imageNode=null,n.imageNode=i.createRef(),n.evtHandlers={onClose:function(e){return n.onClose(e)}},n.state={loaded:!1},n}return a(t,e),t.prototype.onClose=function(e){(0,this.props.onRequestClose)(e)},t.prototype.render=function(){var e=this,t=this.props,n=t.showMedia,r=t.url,a=t.style,d=this.state.loaded;return n?i.createElement(s.default,{id:"portal-root"},i.createElement("div",{style:o({},a),className:"close-icon-preview"},i.createElement(l.default,{key:"btn-filter",onClick:this.evtHandlers.onClose,size:"large",style:"subtle",tooltip:c.assets.field.tooltipFilter},u.ICON_TIMES)),i.createElement("img",{onLoad:function(){return e.setState({loaded:!0})},src:r,ref:this.imageNode,className:"asset-preview-background transparent "+(d?"":"hidden"),style:a})):null},t}(i.PureComponent);t.default=d},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(34),s=n(26),u=function(e){function t(t){var n=e.call(this,t)||this;return n.state={imageHeight:1080,imageWidth:1920},n.imgNode=o.createRef(),n}return a(t,e),t.prototype.getImageStyle=function(){var e=this.state,t=e.imageHeight,n=e.imageWidth,r=this.props,a=r.padding,o=r.width,u=r.height,l=void 0!==a?a:i.DEFAULT_PADDING;return t&&n?s.getPlayerStyle(o,u,n,t,l):{}},t.prototype.metadataLoaded=function(e){this.setState({imageWidth:e.target.naturalWidth,imageHeight:e.target.naturalHeight})},t.prototype.render=function(){var e=this.props;e.url;return!1!==e.active?o.createElement("div",{className:"mediap-player"},o.createElement("div",{className:"inner-viewer",style:this.getImageStyle()})):null},t}(o.PureComponent);t.default=u},function(e,t,n){var r,a,o;a=[t],void 0===(o="function"==typeof(r=function(e){"use strict";var t,n=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};!function(e){e[e.EOS=0]="EOS",e[e.Text=1]="Text",e[e.Incomplete=2]="Incomplete",e[e.ESC=3]="ESC",e[e.Unknown=4]="Unknown",e[e.SGR=5]="SGR",e[e.OSCURL=6]="OSCURL"}(t||(t={}));var r=function(){function e(){this.VERSION="4.0.4",this.setup_palettes(),this._use_classes=!1,this._escape_for_html=!0,this.bold=!1,this.fg=this.bg=null,this._buffer="",this._url_whitelist={http:1,https:1}}return Object.defineProperty(e.prototype,"use_classes",{get:function(){return this._use_classes},set:function(e){this._use_classes=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"escape_for_html",{get:function(){return this._escape_for_html},set:function(e){this._escape_for_html=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"url_whitelist",{get:function(){return this._url_whitelist},set:function(e){this._url_whitelist=e},enumerable:!0,configurable:!0}),e.prototype.setup_palettes=function(){var e=this;this.ansi_colors=[[{rgb:[0,0,0],class_name:"ansi-black"},{rgb:[187,0,0],class_name:"ansi-red"},{rgb:[0,187,0],class_name:"ansi-green"},{rgb:[187,187,0],class_name:"ansi-yellow"},{rgb:[0,0,187],class_name:"ansi-blue"},{rgb:[187,0,187],class_name:"ansi-magenta"},{rgb:[0,187,187],class_name:"ansi-cyan"},{rgb:[255,255,255],class_name:"ansi-white"}],[{rgb:[85,85,85],class_name:"ansi-bright-black"},{rgb:[255,85,85],class_name:"ansi-bright-red"},{rgb:[0,255,0],class_name:"ansi-bright-green"},{rgb:[255,255,85],class_name:"ansi-bright-yellow"},{rgb:[85,85,255],class_name:"ansi-bright-blue"},{rgb:[255,85,255],class_name:"ansi-bright-magenta"},{rgb:[85,255,255],class_name:"ansi-bright-cyan"},{rgb:[255,255,255],class_name:"ansi-bright-white"}]],this.palette_256=[],this.ansi_colors.forEach((function(t){t.forEach((function(t){e.palette_256.push(t)}))}));for(var t=[0,95,135,175,215,255],n=0;n<6;++n)for(var r=0;r<6;++r)for(var a=0;a<6;++a){var o={rgb:[t[n],t[r],t[a]],class_name:"truecolor"};this.palette_256.push(o)}for(var i=8,s=0;s<24;++s,i+=10){var u={rgb:[i,i,i],class_name:"truecolor"};this.palette_256.push(u)}},e.prototype.escape_txt_for_html=function(e){return e.replace(/[&<>]/gm,(function(e){return"&"===e?"&amp;":"<"===e?"&lt;":">"===e?"&gt;":void 0}))},e.prototype.append_buffer=function(e){var t=this._buffer+e;this._buffer=t},e.prototype.get_next_packet=function(){var e={kind:t.EOS,text:"",url:""},r=this._buffer.length;if(0==r)return e;var o=this._buffer.indexOf("");if(-1==o)return e.kind=t.Text,e.text=this._buffer,this._buffer="",e;if(o>0)return e.kind=t.Text,e.text=this._buffer.slice(0,o),this._buffer=this._buffer.slice(o),e;if(0==o){if(1==r)return e.kind=t.Incomplete,e;var i=this._buffer.charAt(1);if("["!=i&&"]"!=i)return e.kind=t.ESC,e.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),e;if("["==i){if(this._csi_regex||(this._csi_regex=a(n(["\n ^ # beginning of line\n #\n # First attempt\n (?: # legal sequence\n [ # CSI\n ([<-?]?) # private-mode char\n ([d;]*) # any digits or semicolons\n ([ -/]? # an intermediate modifier\n [@-~]) # the command\n )\n | # alternate (second attempt)\n (?: # illegal sequence\n [ # CSI\n [ -~]* # anything legal\n ([\0-:]) # anything illegal\n )\n "],["\n ^ # beginning of line\n #\n # First attempt\n (?: # legal sequence\n \\x1b\\[ # CSI\n ([\\x3c-\\x3f]?) # private-mode char\n ([\\d;]*) # any digits or semicolons\n ([\\x20-\\x2f]? # an intermediate modifier\n [\\x40-\\x7e]) # the command\n )\n | # alternate (second attempt)\n (?: # illegal sequence\n \\x1b\\[ # CSI\n [\\x20-\\x7e]* # anything legal\n ([\\x00-\\x1f:]) # anything illegal\n )\n "]))),null===(l=this._buffer.match(this._csi_regex)))return e.kind=t.Incomplete,e;if(l[4])return e.kind=t.ESC,e.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),e;""!=l[1]||"m"!=l[3]?e.kind=t.Unknown:e.kind=t.SGR,e.text=l[2];var s=l[0].length;return this._buffer=this._buffer.slice(s),e}if("]"==i){if(r<4)return e.kind=t.Incomplete,e;if("8"!=this._buffer.charAt(2)||";"!=this._buffer.charAt(3))return e.kind=t.ESC,e.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),e;this._osc_st||(this._osc_st=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=e.raw[0],a=/^\s+|\s+\n|\s*#[\s\S]*?\n|\n/gm,o=r.replace(a,"");return new RegExp(o,"g")}(n(["\n (?: # legal sequence\n (\\) # ESC | # alternate\n () # BEL (what xterm did)\n )\n | # alternate (second attempt)\n ( # illegal sequence\n [\0-] # anything illegal\n | # alternate\n [\b-] # anything illegal\n | # alternate\n [-] # anything illegal\n )\n "],["\n (?: # legal sequence\n (\\x1b\\\\) # ESC \\\n | # alternate\n (\\x07) # BEL (what xterm did)\n )\n | # alternate (second attempt)\n ( # illegal sequence\n [\\x00-\\x06] # anything illegal\n | # alternate\n [\\x08-\\x1a] # anything illegal\n | # alternate\n [\\x1c-\\x1f] # anything illegal\n )\n "]))),this._osc_st.lastIndex=0;var u=this._osc_st.exec(this._buffer);if(null===u)return e.kind=t.Incomplete,e;if(u[3])return e.kind=t.ESC,e.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),e;var l,c=this._osc_st.exec(this._buffer);return null===c?(e.kind=t.Incomplete,e):c[3]?(e.kind=t.ESC,e.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),e):(this._osc_regex||(this._osc_regex=a(n(["\n ^ # beginning of line\n #\n ]8; # OSC Hyperlink\n [ -:<-~]* # params (excluding ;)\n ; # end of params\n ([!-~]{0,512}) # URL capture\n (?: # ST\n (?:\\) # ESC | # alternate\n (?:) # BEL (what xterm did)\n )\n ([!-~]+) # TEXT capture\n ]8;; # OSC Hyperlink End\n (?: # ST\n (?:\\) # ESC | # alternate\n (?:) # BEL (what xterm did)\n )\n "],["\n ^ # beginning of line\n #\n \\x1b\\]8; # OSC Hyperlink\n [\\x20-\\x3a\\x3c-\\x7e]* # params (excluding ;)\n ; # end of params\n ([\\x21-\\x7e]{0,512}) # URL capture\n (?: # ST\n (?:\\x1b\\\\) # ESC \\\n | # alternate\n (?:\\x07) # BEL (what xterm did)\n )\n ([\\x21-\\x7e]+) # TEXT capture\n \\x1b\\]8;; # OSC Hyperlink End\n (?: # ST\n (?:\\x1b\\\\) # ESC \\\n | # alternate\n (?:\\x07) # BEL (what xterm did)\n )\n "]))),null===(l=this._buffer.match(this._osc_regex))?(e.kind=t.ESC,e.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),e):(e.kind=t.OSCURL,e.url=l[1],e.text=l[2],s=l[0].length,this._buffer=this._buffer.slice(s),e))}}},e.prototype.ansi_to_html=function(e){this.append_buffer(e);for(var n=[];;){var r=this.get_next_packet();if(r.kind==t.EOS||r.kind==t.Incomplete)break;r.kind!=t.ESC&&r.kind!=t.Unknown&&(r.kind==t.Text?n.push(this.transform_to_html(this.with_state(r))):r.kind==t.SGR?this.process_ansi(r):r.kind==t.OSCURL&&n.push(this.process_hyperlink(r)))}return n.join("")},e.prototype.with_state=function(e){return{bold:this.bold,fg:this.fg,bg:this.bg,text:e.text}},e.prototype.process_ansi=function(e){for(var t=e.text.split(";");t.length>0;){var n=t.shift(),r=parseInt(n,10);if(isNaN(r)||0===r)this.fg=this.bg=null,this.bold=!1;else if(1===r)this.bold=!0;else if(22===r)this.bold=!1;else if(39===r)this.fg=null;else if(49===r)this.bg=null;else if(r>=30&&r<38)this.fg=this.ansi_colors[0][r-30];else if(r>=40&&r<48)this.bg=this.ansi_colors[0][r-40];else if(r>=90&&r<98)this.fg=this.ansi_colors[1][r-90];else if(r>=100&&r<108)this.bg=this.ansi_colors[1][r-100];else if((38===r||48===r)&&t.length>0){var a=38===r,o=t.shift();if("5"===o&&t.length>0){var i=parseInt(t.shift(),10);i>=0&&i<=255&&(a?this.fg=this.palette_256[i]:this.bg=this.palette_256[i])}if("2"===o&&t.length>2){var s=parseInt(t.shift(),10),u=parseInt(t.shift(),10),l=parseInt(t.shift(),10);if(s>=0&&s<=255&&u>=0&&u<=255&&l>=0&&l<=255){var c={rgb:[s,u,l],class_name:"truecolor"};a?this.fg=c:this.bg=c}}}}},e.prototype.transform_to_html=function(e){var t=e.text;if(0===t.length)return t;if(this._escape_for_html&&(t=this.escape_txt_for_html(t)),!e.bold&&null===e.fg&&null===e.bg)return t;var n=[],r=[],a=e.fg,o=e.bg;e.bold&&n.push("font-weight:bold"),this._use_classes?(a&&("truecolor"!==a.class_name?r.push(a.class_name+"-fg"):n.push("color:rgb("+a.rgb.join(",")+")")),o&&("truecolor"!==o.class_name?r.push(o.class_name+"-bg"):n.push("background-color:rgb("+o.rgb.join(",")+")"))):(a&&n.push("color:rgb("+a.rgb.join(",")+")"),o&&n.push("background-color:rgb("+o.rgb+")"));var i="",s="";return r.length&&(i=' class="'+r.join(" ")+'"'),n.length&&(s=' style="'+n.join(";")+'"'),"<span"+s+i+">"+t+"</span>"},e.prototype.process_hyperlink=function(e){var t=e.url.split(":");return t.length<1?"":this._url_whitelist[t[0]]?'<a href="'+this.escape_txt_for_html(e.url)+'">'+this.escape_txt_for_html(e.text)+"</a>":""},e}();function a(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=e.raw[0],a=/^\s+|\s+\n|\s*#[\s\S]*?\n|\n/gm,o=r.replace(a,"");return new RegExp(o)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=r})?r.apply(t,a):r)||(e.exports=o)},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),s=n(133),u=n(500),l=n(13),c=n(5),d=n(21),p=n(41),f=n(22),h=n(63),m=n(11),_=n(16),y=n(26),g=n(131),v=n(501),b=n(101),w=n(7),M=n(9),L=n(134),T=n(132),k=n(8),x=function(e){function t(t){var n=e.call(this,t)||this;n.TIMEOUT="02:00";var r=n.getInventoryDefaults(),a=n.getInventoryOptions();return n.state={inventory:r,inventoryOptions:a,experienceId:null,jobId:null,experience:null,timeElapsed:0,activeOutput:"",rendering:!1,isTimeOut:!1},n.timer=new L.default({interval:1e3,onUpdate:function(e){n.setState({timeElapsed:e})}}),n.evtHandlers={toggleOutput:function(e){return n.toggleActiveOutput(e)},createExp:function(){return n.createExperience()},gotExperience:null},n}return a(t,e),t.prototype.componentWillUnmount=function(){var e=this.props,t=e.api;e.onError,this.state.experienceId;this.timer.stop(),this.evtHandlers.gotExperience=null,t.cancelExperiencePolling()},t.prototype.getInventoryOptions=function(){var e=this.props.variables,t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];r.defaultItem&&r.defaultItem.type&&r.defaultItem.type.toLowerCase()===s.VARIABLE_TYPES.ENUM&&(t[r.id]=r.defaultItem.options)}return t},t.prototype.getInventoryDefaults=function(){var e=this.props.variables,t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];t[r.id]=this.getVariableValue(r.previewItem)}return t},t.prototype.checkInventoryDefaults=function(e){var t=this.props.variables,n=o({},this.state.inventory);for(var r in t)if(t.hasOwnProperty(r)){var a=t[r],i=e[r];if(i){var s=this.getVariableValue(i.previewItem),u=this.getVariableValue(a.previewItem);a.type===i.type&&s===u||(n[r]=u)}}return n},t.prototype.getVariableValue=function(e){if(e&&e.type){var t=e.type.toLowerCase();return t===s.VARIABLE_TYPES.IMAGE||t===s.VARIABLE_TYPES.VIDEO||t===s.VARIABLE_TYPES.AUDIO?e.url:e.src}},t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.experienceId,r=t.jobId;n&&r&&this.setState({jobId:r},(function(){e.getExperience(n)}))},t.prototype.componentDidUpdate=function(e,t){var n=this;if(e.storyId!==this.props.storyId&&(this.evtHandlers.gotExperience=null),e.variables!==this.props.variables){var r=void 0,a=this.getInventoryOptions();r=e.storyId===this.props.storyId?this.checkInventoryDefaults(e.variables):this.getInventoryDefaults(),this.setState({inventoryOptions:a,inventory:r})}if(this.props.notifications&&this.props.notifications[0]&&("error"===this.props.notifications[0].type&&this.setState({isTimeOut:!0}),"info"===this.props.notifications[0].type&&this.setState({isTimeOut:!1})),t.timeElapsed!==this.state.timeElapsed&&M.formattedTime(this.state.timeElapsed)===this.TIMEOUT&&!this.state.experience){var o=this.props,i=o.onError,s=o.api,u=this.state.experienceId;s.cancelExperiencePolling().then((function(){i(w.previewer.runExpError.replace("[expId]",u)),n.resetState(!0,(function(){n.setState({isTimeOut:!0})}))}))}},t.prototype.variableInputChanged=function(e,t){var n=o({},this.state.inventory);n[e]=t,this.setState({inventory:n})},t.prototype.getViewerOptions=function(){var e=[],t=this.state,n=t.experience.output,r=t.jobId,a=n.videos,o=n.images;if(a)for(var i in a)if(a.hasOwnProperty(i)){var s={label:"Video: "+i,value:u.OUTPUT_TYPES.VIDEO+"."+i};e.push(s)}if(o)for(var i in o)if(o.hasOwnProperty(i)){var l={label:"Image: "+i,value:u.OUTPUT_TYPES.IMAGE+"."+i};e.push(l)}return r&&e.push({label:w.previewer.btnLog,value:u.OUTPUT_TYPES.LOG+"."+r}),e},t.prototype.renderVariableFields=function(){var e=this,t=this.state,n=t.inventory,r=t.inventoryOptions,a=this.props.variables,o=[],u=function(t){if(a.hasOwnProperty(t)){var u=a[t];switch(u.type.toLowerCase()){case s.VARIABLE_TYPES.TEXT:o.push(i.createElement(l.default,{label:u.name,key:u.id,value:n[u.id],onChange:function(t){return e.variableInputChanged(u.id,t)}}));break;case s.VARIABLE_TYPES.NUMBER:o.push(i.createElement(p.default,{label:u.name,key:u.id,value:n[u.id],onChange:function(t){return e.variableInputChanged(u.id,t)}}));break;case s.VARIABLE_TYPES.ENUM:o.push(i.createElement(f.default,{label:u.name,key:u.id,value:n[u.id],options:r[u.id],onChange:function(t){return e.variableInputChanged(u.id,t)}}));break;case s.VARIABLE_TYPES.BOOLEAN:o.push(i.createElement(h.default,{label:u.name,key:u.id,value:n[u.id],options:s.BOOLEAN_DEFAULT_OPTIONS,onChange:function(t){return e.variableInputChanged(u.id,t)}}));break;case s.VARIABLE_TYPES.IMAGE:o.push(i.createElement(m.default,{label:u.name,key:u.id},i.createElement(v.default,{value:n[u.id],type:u.type,onChange:function(t){return e.variableInputChanged(u.id,t)}})));break;case s.VARIABLE_TYPES.VIDEO:case s.VARIABLE_TYPES.AUDIO:o.push(i.createElement(m.default,{label:u.name,key:u.id},i.createElement(v.default,{type:u.type,value:n[u.id],onChange:function(t){return e.variableInputChanged(u.id,t)}})))}}};for(var c in a)u(c);return o},t.prototype.getFirstOutput=function(e){var t=e.output.videos,n=e.output.images;if(t){for(var r in t)if(t.hasOwnProperty(r))return u.OUTPUT_TYPES.VIDEO+"."+r}else{if(!n)return null;for(var r in n)if(n.hasOwnProperty(r))return u.OUTPUT_TYPES.IMAGE+"."+r}},t.prototype.getExperience=function(e,t,n,r){var a=this;void 0===t&&(t=!1),this.timer.running||this.timer.start();var o=this.props,i=o.api,s=o.onError,u=o.onExperenceLoaded,l=o.onJobCreated;this.setState({rendering:!0},(function(){a.setState({experienceId:e},(function(){t?i.triggerEvent(e,n,r).then((function(t){a.setState({jobId:t.job_id},(function(){l&&l(e,t.job_id),a.evtHandlers.gotExperience=function(e){a.timer.stop(),u&&u(e),a.setState({rendering:!1,activeOutput:a.getFirstOutput(e),experience:e})};i.getExperience(e,!0).then((function(e){a.evtHandlers.gotExperience&&a.evtHandlers.gotExperience(e)})).catch((function(t){a.resetState(),s&&(t.error?s(t.error):s(w.previewer.runExpError.replace("[expId]",e)))}))}))})).catch((function(t){a.resetState(),s&&s(w.previewer.triggerExpError.replace("[expId]",e))})):(a.evtHandlers.gotExperience=function(e){a.timer.stop(),u&&u(e),a.setState({rendering:!1,activeOutput:a.getFirstOutput(e),experience:e})},i.getExperience(e,!0).then((function(e){a.evtHandlers.gotExperience&&a.evtHandlers.gotExperience(e)})).catch((function(t){a.resetState(),s&&(t.error?s(t.error):s(w.previewer.runExpError.replace("[expId]",e)))})))}))}))},t.prototype.createExperience=function(){var e=this,t=this.props,n=t.storyId,r=t.onNotification,a=t.onError,o=t.api,i=t.onExperienceCreated,s=t.compositionId,u=t.useWorkingCopy;this.resetState(!1,(function(){e.setState({rendering:!0,isTimeOut:!1},(function(){e.timer.start(),r&&r(w.previewer.runExpStart),o.createExperience(n,e.state.inventory,s,u).then((function(t){r&&r(w.previewer.expId.replace("[expId]",t.id)),i&&i(t),e.getExperience(t.id,!0,s,u)})).catch((function(t){e.resetState();var n=t.response,r=n.data;n.status;a&&(r&&r.error?a(w.previewer.createExpError+": "+r.error):a(w.previewer.createExpError+": "+t))}))}))}))},t.prototype.resetState=function(e,t){this.timer.stop(),this.setState({rendering:!1,experienceId:null,experience:null,jobId:null,timeElapsed:e?this.state.timeElapsed:0,activeOutput:null,isTimeOut:!1},(function(){t&&t()}))},t.prototype.renderViewerContent=function(){var e=this.state,t=e.rendering,n=e.experience,r=e.timeElapsed,a=e.activeOutput,o=e.isTimeOut,s=this.props,l=s.api,c=s.onError;if(t)return i.createElement("div",{className:"running-prompt"},i.createElement(d.default,null),i.createElement("br",null),i.createElement("h1",null,"  ",w.previewer.expRunning),i.createElement("p",null,w.previewer.time," ",M.formattedTime(r)));if(o||void 0===o)return i.createElement("div",{className:"running-prompt error-wrapper"},i.createElement("h1",null,"  ",w.previewer.runExpErrorDes),i.createElement("p",null,w.previewer.time," ",M.formattedTime(r)));if(n&&a){var p=void 0,f=void 0,h=a.split("."),m=h[0],_=h[1];if(m===u.OUTPUT_TYPES.IMAGE)f=n.output.images[_],p=i.createElement(g.default,{url:f,active:!0});else if(m===u.OUTPUT_TYPES.VIDEO){var v=n.output.videos[_],L=void 0!==v.width?parseInt(v.width,10):null,k=void 0!==v.height?parseInt(v.height,10):null;f=v.url,p=i.createElement(y.default,{url:f,active:!0,maxWidth:L,allowManualScale:!0,maxHeight:k})}else m===u.OUTPUT_TYPES.LOG&&(p=i.createElement("div",{className:"log"},i.createElement(T.default,{api:l,onError:c,jobId:_})));return i.createElement(b.default,{handleWidth:!0,handleHeight:!0},p)}return null},t.prototype.toggleActiveOutput=function(e){this.setState({activeOutput:e})},t.prototype.render=function(){var e,t,n=this.state,r=n.rendering,a=n.experience,o=n.activeOutput,s=a?w.previewer.btnReRender:w.previewer.btnRender,u=r?null:i.createElement(c.default,{size:"large",onClick:this.evtHandlers.createExp,color:"primary",style:"bold"},s);if(a){var d=this.getViewerOptions();e=i.createElement(f.default,{width:"130px",options:d,value:o,onChange:this.evtHandlers.toggleOutput}),t=i.createElement(l.default,{readOnly:!0,width:"360px",label:w.previewer.expIdField,showCopy:!0,value:a.id})}return i.createElement("div",{className:"story-viewer viewer"},i.createElement("div",{className:"variables"},i.createElement("h2",null,w.previewer.previewVars),i.createElement(_.default,null),this.renderVariableFields()),i.createElement("div",{className:"viewer-content"},i.createElement("div",{className:"content-header"},u,i.createElement("div",{className:"output"},e),i.createElement("div",{className:"right-interface"},t)),i.createElement("div",{className:"content-wrapper"},this.renderViewerContent())))},t}(i.PureComponent);t.default=k.connect((function(e){return{notifications:e.notifications}}),{})(x)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OUTPUT_TYPES=void 0,t.OUTPUT_TYPES={LOG:"log",IMAGE:"image",VIDEO:"video"}},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(21),s=n(133),u=n(84),l=n(5),c=n(4),d=function(e){function t(t){var n=e.call(this,t)||this;return n.input=o.createRef(),n.state={processing:!1,processedFile:null},n.evtHandlers={fileUpload:function(e){return n.fileUploaded(e)},fileDrop:function(e,t){return n.onFileDrop(e,t)},clearSelection:function(e){return n.clearSelection(e)},click:function(){return n.onClick()}},n}return a(t,e),t.prototype.clearSelection=function(e){e.preventDefault(),e.stopPropagation(),this.props.onChange(null)},t.prototype.fileUploaded=function(e){var t=e.target.files[0];t&&this.props.onChange(t)},t.prototype.componentDidUpdate=function(e){e.value!==this.props.value&&this.checkFile()},t.prototype.componentDidMount=function(){this.checkFile()},t.prototype.checkFile=function(){var e=this,t=this.props.value;t instanceof File&&this.setState({processing:!0,processedFile:null},(function(){var n=new FileReader;n.onload=function(){e.setState({processing:!1,processedFile:n.result})},n.readAsDataURL(t)}))},t.prototype.renderFields=function(){var e,t=this.state,n=t.processing,r=t.processedFile,a=this.props,u=a.type,l=a.value,c=l instanceof File;if(!l)return null;if(c){if(n)return o.createElement(i.default,null);e=r}else e=l;switch(u.toLowerCase()){case s.VARIABLE_TYPES.IMAGE:return o.createElement("img",{className:"default-preview",src:e});case s.VARIABLE_TYPES.VIDEO:return o.createElement("video",{className:"default-preview",src:e,controls:!0});case s.VARIABLE_TYPES.AUDIO:return o.createElement("audio",{className:"default-preview",src:e,controls:!0})}},t.prototype.getInputFilter=function(){var e=this.props,t=e.type;e.value;switch(t){case s.VARIABLE_TYPES.IMAGE:return"image/*";case s.VARIABLE_TYPES.VIDEO:return"video/*";case s.VARIABLE_TYPES.AUDIO:return"audio/*"}},t.prototype.onClick=function(){var e=this.input.current,t=this.state.processing;e&&!t&&e.click()},t.prototype.renderClearButton=function(){if(this.props.value)return o.createElement(l.default,{onClick:this.evtHandlers.clearSelection},c.ICON_TIMES)},t.prototype.onFileDrop=function(e,t){var n=t.getItem().files[0];n&&this.props.onChange(n)},t.prototype.render=function(){var e=this.state.processing,t=this.getInputFilter();return o.createElement(o.Fragment,null,o.createElement("input",{type:"file",accept:t,style:{display:"none"},ref:this.input,onChange:this.evtHandlers.fileUpload}),o.createElement(u.default,{onDrop:this.evtHandlers.fileDrop,disable:e},o.createElement("div",{className:"variable-default-upload",onClick:this.evtHandlers.click},this.renderFields(),o.createElement("div",{className:"btn-wrapper"},this.renderClearButton()))))},t}(o.PureComponent);t.default=d},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(503),s=n(135),u=n(53),l=function(e){function t(t){var n=e.call(this,t)||this;return n.state={selectedLayer:null},n.eventHandlers={updateSelectedLayer:function(e){return n.updateSelectedLayer(e)}},n}return a(t,e),t.prototype.updateSelectedLayer=function(e){this.setState({selectedLayer:e})},t.prototype.variablesToInventory=function(){var e=this.props.variables,t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n],a=r.type,o=r.previewItem;o&&(a===u.VARIABLE_TYPES.IMAGE||a===u.VARIABLE_TYPES.VIDEO||a===u.VARIABLE_TYPES.AUDIO?t[n]=o.url:t[n]=o.src)}return t},t.prototype.render=function(){var e=this.state.selectedLayer,t=this.props,n=t.storyId,r=t.api,a=t.composition;return a?o.createElement("div",{className:"static-composition-editor"},o.createElement("div",{className:"composition-config"},o.createElement(i.default,{storyId:n,api:r,composition:a,onSelectLayer:this.eventHandlers.updateSelectedLayer,selectedLayer:e,onUpdate:this.props.onUpdate})),o.createElement("div",{className:"composition-preview"},o.createElement(s.default,{inventory:this.variablesToInventory(),composition:a,onSelectLayer:this.eventHandlers.updateSelectedLayer,selectedLayer:e,onUpdate:this.props.onUpdate}))):null},t}(o.PureComponent);t.default=l},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},i=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},s=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,a=e.length;n<r;n++,a++)e[a]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0});var u=n(0),l=n(7),c=n(41),d=n(65),p=n(11),f=n(5),h=n(53),m=n(4),_=n(504),y=function(e){function t(t){var n=e.call(this,t)||this;return n.eventHandlers={inputs:{width:function(e){return n.compValueChanged("width",e)},height:function(e){return n.compValueChanged("height",e)},name:function(e){return n.compValueChanged("name",e)},backgroundColor:function(e){return n.bgChanged(e)}},selectLayer:function(e){return n.props.onSelectLayer(e)}},n.addLayerMenu=u.createElement(f.default,{onClick:function(){return n.addLayer()},style:"subtle",size:"small",color:"primary"},m.ICON_PLUS),n}return a(t,e),t.prototype.addLayer=function(){var e=h.getNewCompositionLayer(),t=o({},this.props.composition),n=s([],i(t.layers));n.push(e),t.layers=n,this.props.onUpdate(t),this.props.onSelectLayer(e.id)},t.prototype.updateLayer=function(e,t){var n=o({},this.props.composition),r=s([],i(n.layers));r[e]=t,n.layers=r,this.props.onUpdate(n)},t.prototype.compValueChanged=function(e,t){var n=o({},this.props.composition);n[e]=t,this.props.onUpdate(n)},t.prototype.bgChanged=function(e){if("transparent"===e.hex)this.compValueChanged("background_color",null);else{var t=e.rgb;this.compValueChanged("background_color","rgba("+t.r+","+t.g+","+t.b+","+t.a+")")}},t.prototype.render=function(){var e=this,t=this.props,n=t.composition,r=t.selectedLayer,a=t.storyId,o=t.api,i=(n.background_color&&n.background_color,u.createElement("span",null,l.compositions.layers," ",this.addLayerMenu));return u.createElement(u.Fragment,null,u.createElement(c.default,{label:l.compositions.width,tooltip:l.compositions.tooltipWidth,value:n.width,width:"30%",labelPosition:"top",onChange:this.eventHandlers.inputs.width}),u.createElement(c.default,{label:l.compositions.height,tooltip:l.compositions.tooltipHeight,value:n.height,width:"30%",labelPosition:"top",onChange:this.eventHandlers.inputs.height}),u.createElement(d.default,{label:l.compositions.backgroundColor,tooltip:l.compositions.tooltipBackgroundColor,enableAlpha:!0,value:n.background_color,width:"40%",labelPosition:"top",pickerPosition:"right",onChange:this.eventHandlers.inputs.backgroundColor}),u.createElement(p.default,{label:i,width:"100%",labelPosition:"top"},n.layers.map((function(t,n){var i=t.id===r;return u.createElement(_.default,{storyId:a,api:o,key:t.id,selected:i,onSelectLayer:e.eventHandlers.selectLayer,onUpdate:function(t){return e.updateLayer(n,t)},options:t})}))))},t}(u.PureComponent);t.default=y},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.V_ALIGN_OPTIONS=t.H_ALIGN_OPTIONS=void 0;var i=n(0),s=n(53),u=n(25),l=n(64),c=n(63),d=n(13),p=n(22),f=n(99),h=n(129),m=n(7),_=n(65),y=n(30),g=n(41),v=n(4);t.H_ALIGN_OPTIONS=[{icon:v.ICON_ALIGN_LEFT,value:"left"},{icon:v.ICON_ALIGN_CENTER,value:"center"},{icon:v.ICON_ALIGN_RIGHT,value:"right"}],t.V_ALIGN_OPTIONS=[{icon:v.ICON_ARROW_UP,value:"flex-start"},{icon:v.ICON_ARROW_CENTER_V,value:"center"},{icon:v.ICON_ARROW_DOWN,value:"flex-end"}];var b=function(e){function n(t){var n=e.call(this,t)||this;return n.eventHandlers={inputs:{name:function(e){return n.optionValueChanged("name",e)},width:function(e){return n.optionValueChanged("width",e)},height:function(e){return n.optionValueChanged("height",e)},x:function(e){return n.optionValueChanged("x",e)},y:function(e){return n.optionValueChanged("y",e)},rotation:function(e){return n.optionValueChanged("rotation",e)},content:function(e){return n.optionValueChanged("content",e)},hAlign:function(e){return n.optionValueChanged("horizontal_alignment",e)},vAlign:function(e){return n.optionValueChanged("vertical_alignment",e)},textWrap:function(e){return n.optionValueChanged("text_wrap",e)},textFit:function(e){return n.optionValueChanged("text_fit",e)},fontSize:function(e){return n.optionValueChanged("font_size",e)},lineHeight:function(e){return n.optionValueChanged("line_height",e)},letterSpacing:function(e){return n.optionValueChanged("letter_spacing",e)},font:function(e){return n.optionValueChanged("font",e)},customFont:function(e){return n.customFontUpdated(e)},fontType:function(e){return n.fontTypeChanged(e)},wordSpacing:function(e){return n.optionValueChanged("word_spacing",e)},color:function(e){return n.optionValueChanged("color",n.formatColor(e))},backgroundColor:function(e){return n.optionValueChanged("background_color",n.formatColor(e))}},onCardOpen:function(e){return n.onCardOpen()},onCardClose:function(e){return n.onCardClose()}},n}return a(n,e),n.prototype.customFontUpdated=function(e){var t=o({},this.props.options);if(e){var n=e.name,r=e.url,a=e.id;t.font=n,t.custom_font_url=r,t.custom_font_id=a}else t.font=s.DEFAULT_FONT,t.custom_font_url=null,t.custom_font_id=null;this.props.onUpdate(t)},n.prototype.onCardOpen=function(){var e=this.props.options.id;this.props.onSelectLayer(e)},n.prototype.onCardClose=function(){this.props.onSelectLayer(null)},n.prototype.fontTypeChanged=function(e){var t=o({},this.props.options);e===s.FONT_TYPES.STANDARD?(t.font_type=s.FONT_TYPES.STANDARD,t.font=s.DEFAULT_FONT):e===s.FONT_TYPES.CUSTOM&&(t.fontType=s.FONT_TYPES.CUSTOM,t.font=s.DEFAULT_FONT,t.custom_font_id=null,t.custom_font_url=null),this.props.onUpdate(t)},n.prototype.formatColor=function(e){var t=e.rgb;return"rgba("+t.r+","+t.g+","+t.b+","+t.a+")"},n.prototype.optionValueChanged=function(e,t){var n=o({},this.props.options);n[e]=t,this.props.onUpdate(n)},n.prototype.renderFontField=function(){var e=this.props,t=e.options,n=t.font_type,r=t.custom_font_id,a=t.font,o=e.storyId,l=e.api;return n===s.FONT_TYPES.STANDARD?i.createElement(p.default,{label:m.compositions.font,labelPosition:"top",width:"50%",options:s.STADARD_FONTS,onChange:this.eventHandlers.inputs.font,value:a}):n===s.FONT_TYPES.CUSTOM?i.createElement(h.default,{api:l,storyId:o,label:m.compositions.font,width:"50%",labelPosition:"top",onChange:this.eventHandlers.inputs.customFont,accepts:u.ASSET_TYPES.FONT,assetId:r}):null},n.prototype.render=function(){var e=this.props,n=e.options,r=e.selected;return i.createElement(f.default,{open:r,onOpen:this.eventHandlers.onCardOpen,onClose:this.eventHandlers.onCardClose,collapsable:!0,title:n.name},i.createElement(d.default,{label:m.compositions.name,tooltip:m.compositions.tooltipName,value:n.name,width:"100%",labelPosition:"top",onChange:this.eventHandlers.inputs.name}),i.createElement(g.default,{label:m.compositions.x,tooltip:m.compositions.tooltipLayerX,value:n.x,width:"20%",labelPosition:"top",onChange:this.eventHandlers.inputs.x}),i.createElement(g.default,{label:m.compositions.y,tooltip:m.compositions.tooltipLayerY,value:n.y,width:"20%",labelPosition:"top",onChange:this.eventHandlers.inputs.y}),i.createElement(g.default,{label:m.compositions.width,tooltip:m.compositions.tooltipLayerWidth,value:n.width,width:"20%",labelPosition:"top",onChange:this.eventHandlers.inputs.width}),i.createElement(g.default,{label:m.compositions.height,tooltip:m.compositions.tooltipLayerHeight,value:n.height,width:"20%",labelPosition:"top",onChange:this.eventHandlers.inputs.height}),i.createElement(g.default,{value:n.rotation,label:m.compositions.rotation,tooltip:m.compositions.tooltipLayerRotation,width:"20%",labelPosition:"top",onChange:this.eventHandlers.inputs.rotation}),i.createElement(l.default,{label:m.compositions.textLayerContent,tooltip:m.compositions.tooltipTextLayerContent,value:n.content,width:"100%",labelPosition:"top",onChange:this.eventHandlers.inputs.content}),i.createElement(c.default,{options:t.H_ALIGN_OPTIONS,value:n.horizontal_alignment,width:"50%",onChange:this.eventHandlers.inputs.hAlign}),i.createElement(c.default,{options:t.V_ALIGN_OPTIONS,value:n.vertical_alignment,width:"50%",onChange:this.eventHandlers.inputs.vAlign}),i.createElement(p.default,{label:m.compositions.fontType,options:s.FONT_TYPE_OPTIONS,value:n.font_type,width:"50%",labelPosition:"top",onChange:this.eventHandlers.inputs.fontType}),this.renderFontField(),i.createElement(g.default,{label:m.compositions.fontSize,value:n.font_size,width:"50%",labelPosition:"top",onChange:this.eventHandlers.inputs.fontSize}),i.createElement(g.default,{label:m.compositions.lineHeight,value:n.line_height,width:"50%",labelPosition:"top",onChange:this.eventHandlers.inputs.lineHeight}),i.createElement(g.default,{label:m.compositions.letterSpacing,value:n.letter_spacing,width:"50%",labelPosition:"top",onChange:this.eventHandlers.inputs.letterSpacing}),i.createElement(g.default,{label:m.compositions.wordSpacing,value:n.word_spacing,width:"50%",labelPosition:"top",onChange:this.eventHandlers.inputs.wordSpacing}),i.createElement(_.default,{label:m.compositions.color,value:n.color,enableAlpha:!0,width:"50%",labelPosition:"top",pickerPosition:"left",onChange:this.eventHandlers.inputs.color}),i.createElement(_.default,{label:m.compositions.backgroundColor,value:n.background_color,enableAlpha:!0,width:"50%",labelPosition:"top",pickerPosition:"right",onChange:this.eventHandlers.inputs.backgroundColor}),i.createElement(y.default,{label:m.compositions.wrap,value:n.text_wrap,width:"25%",labelPosition:"top",onChange:this.eventHandlers.inputs.textWrap}),i.createElement(y.default,{label:m.compositions.fit,value:n.text_fit,width:"25%",labelPosition:"top",onChange:this.eventHandlers.inputs.textFit}))},n}(i.PureComponent);t.default=b},function(e,t){e.exports=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),a=n(16);t.default=function(e){var t=e.shortcutCopyMap,n=e.heading,o=n?r.createElement(r.Fragment,null,r.createElement("h3",null,n),r.createElement(a.default,null)):null;return r.createElement("div",{className:"shortcuts-menu"},o,r.createElement("table",null,r.createElement("tbody",null,Object.keys(t).map((function(e){return r.createElement("tr",{className:"shortcut",key:e},r.createElement("td",{className:"hotkey-cell"},e),r.createElement("td",{className:"shortcut-desc"},t[e]))})))))}},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(13),s=n(11),u=n(51),l=n(16),c=n(9),d=n(8),p=n(7),f=function(e){function t(t){var n=e.call(this,t)||this;return n.render=function(){var e=n.props,t=e.asset,r=e.columns,a=e.newAsset,u=e.assetTags;if(!t)return null;var d=a?p.assets.newDetails:p.assets.details,f=c.formatDateDefault(t.date_created),h=2===r,m=a?void 0:function(e){return n.props.onNameChange(e)},_=a?function(e){return n.props.onNameChange(e)}:void 0,y=o.createElement(i.default,{label:p.assets.name,controlled:!a,width:h?"50%":"100%",onSubmit:m,onChange:_,value:t.name}),g=o.createElement(i.default,{readOnly:!0,label:p.assets.date,width:h?"50%":"100%",value:f}),v=o.createElement(i.default,{submittable:!0,submittableType:"add",label:p.assets.addTag,suggestions:u,doSubmit:function(e){return n.props.onAddTag(e)},width:h?"50%":"100%",buttons:[],value:n.state.newTag}),b=o.createElement(s.default,{label:p.assets.assetTag,width:h?"50%":"100%"},n.renderTags());return o.createElement("div",{className:"asset-details"},o.createElement("h2",null,d),o.createElement("div",{className:"header-buttons"},n.props.headerButtons),o.createElement(l.default,null),y,g,v,b)},n.state={newTag:""},n}return a(t,e),t.prototype.renderTags=function(){var e=this;return this.props.asset.tags.map((function(t){return o.createElement(u.default,{key:t,copy:t,removeHandler:function(){return e.props.onRemoveTag(t)},colorize:!0})}))},t}(o.Component);t.default=d.connect((function(e){return{assetTags:e.assetTags}}),null)(f)},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(5),s=n(64),u=n(16),l=n(7),c=n(4),d=function(e){function t(t){var n=e.call(this,t)||this;return n.getFirstAct=function(e){for(var t in e.acts)if(e.acts.hasOwnProperty(t))return e.acts[t]},n}return a(t,e),t.prototype.createUrl=function(){var e=this.props,t=e.story,n=e.compositionId,r=e.accessKey,a=t.id,o=this.getFirstAct(t).inventory,i="";for(var s in o){if(o.hasOwnProperty(s))i+=""+(i?"&":"?")+s+"={{"+s.toUpperCase()+"}}"}var u=window.location.href,l=-1!==u.indexOf("staging")||-1!==u.indexOf("localhost")?"staging.imposium.com":"imposium.com";return'<a href="'+("https://player."+l+"/new/"+r+"/"+a+"/"+n+i)+'" target="_blank"><img width="400" alt="Play Video" src="'+("https://api."+l+"/story/"+a+"/"+n+"/poster"+i)+'"></a>'},t.prototype.render=function(){var e=this.props,t=e.status,n=e.handleError,r=e.handleNotification;return o.createElement("div",null,o.createElement("h2",null,l.publish.hubspotTitle),o.createElement(u.default,null),o.createElement("p",null,l.publish.hubspotDesc),o.createElement(u.default,null),o.createElement(s.default,{label:l.publish.embeddedCode,value:this.createUrl(),showCopy:t!==l.header.publishing,onNotification:function(e){return r(e)},onError:function(e){return n(e)},readOnly:!0}),t===l.header.publishing&&o.createElement(i.default,{size:"small",customStyles:{margin:0,height:"20px",border:"none"},color:"primary",onClick:function(){return n(l.publish.embeddedCodeCopyError)}},c.ICON_CLIPBOARD))},t}(o.PureComponent);t.default=d},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(16),s=n(54),u=n(137),l=n(7),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){return o.createElement("div",null,o.createElement("h2",null,l.integration.documentation),o.createElement(i.default,null),o.createElement("p",null,l.integration.docParagraph),o.createElement("div",{className:"link-wrapper"},null===u.documentationLinks||void 0===u.documentationLinks?void 0:u.documentationLinks.map((function(e){return o.createElement(s.BigLink,{key:e.key,label:e.label,link:e.link})}))))},t}(o.PureComponent);t.default=c},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.downloadSDKArchive=void 0;var a=n(28),o=n(511),i={method:"POST",responseType:"blob",headers:{"Content-Type":"application/json"}};t.downloadSDKArchive=function(e,t){var n=r(r({},i),{url:"https://template-generator.imposium.com/sdk-archive",data:JSON.stringify(t)});a.default(n).then((function(t){o.saveAs(t.data,e)})).catch((function(e){console.error("Failed to download sdk archive:",e)}))}},function(e,t,n){(function(n){var r,a,o;a=[],void 0===(o="function"==typeof(r=function(){"use strict";function t(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){s(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function r(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function a(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var o="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n&&n.global===n?n:void 0,i=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),s=o.saveAs||("object"!=typeof window||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!i?function(e,n,i){var s=o.URL||o.webkitURL,u=document.createElement("a");n=n||e.name||"download",u.download=n,u.rel="noopener","string"==typeof e?(u.href=e,u.origin===location.origin?a(u):r(u.href)?t(e,n,i):a(u,u.target="_blank")):(u.href=s.createObjectURL(e),setTimeout((function(){s.revokeObjectURL(u.href)}),4e4),setTimeout((function(){a(u)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,n,o){if(n=n||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}(e,o),n);else if(r(e))t(e,n,o);else{var i=document.createElement("a");i.href=e,i.target="_blank",setTimeout((function(){a(i)}))}}:function(e,n,r,a){if((a=a||open("","_blank"))&&(a.document.title=a.document.body.innerText="downloading..."),"string"==typeof e)return t(e,n,r);var s="application/octet-stream"===e.type,u=/constructor/i.test(o.HTMLElement)||o.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||s&&u||i)&&"undefined"!=typeof FileReader){var c=new FileReader;c.onloadend=function(){var e=c.result;e=l?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),a?a.location.href=e:location=e,a=null},c.readAsDataURL(e)}else{var d=o.URL||o.webkitURL,p=d.createObjectURL(e);a?a.location=p:location.href=p,a=null,setTimeout((function(){d.revokeObjectURL(p)}),4e4)}});o.saveAs=s.saveAs=s,e.exports=s})?r.apply(t,a):r)||(e.exports=o)}).call(this,n(38))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDemoURL=void 0;t.getDemoURL=function(){var e=window.location.href;return-1!==e.indexOf("localhost")?"http://localhost:3044":-1!==e.indexOf("staging")?"https://demo.staging.imposium.com":"https://demo.imposium.com"}},function(e,t,n){"use strict";var r,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},i=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),u=n(16),l=n(21),c=n(7),d=n(54),p=n(514),f=n(4),h=n(1),m=n(10),_=n(8),y=n(22),g=n(88),v=function(e){function t(t){var n=e.call(this,t)||this;return n.selectCsv=function(){n.hiddenFileInputRef.current&&n.hiddenFileInputRef.current.click()},n.doUploadCsv=function(e){e.persist();var t=n.props.handleError;n.setState({uploading:!0,renderedBatch:!1}),n.props.createFreshBatch(n.getBatchName()).then((function(t){var r=t.id,a=t.name,o=t.story_id;n.setState({selectedBatchId:r}),n.importBatch({story_id:o,id:r,name:a,uploadEvt:e})})).catch((function(e){throw t(e),n.setState({uploadComplete:!1,uploading:!1}),e}))},n.getBatch=function(){var e=n.props.api;n.props.setPage(1),n.props.getBatch(e)},n.state={uploadComplete:!1,uploading:!1,downloading:!1,selectedBatchId:"",renderedBatch:!1,inventory:[],inventoryKeys:[],missingColumns:"",isMissing:!1},n.hiddenFileInputRef=s.createRef(),n}return a(t,e),t.prototype.componentDidMount=function(){this.getInventory()},t.prototype.getInventory=function(){var e=this.props.story.acts,t=Object.keys(e),n={};t.forEach((function(t){n=o(o({},n),e[t].inventory)}));var r=Object.keys(n).sort();this.setState({inventory:n}),this.setState({inventoryKeys:r})},t.prototype.downloadSampleCsv=function(){var e=this.props.story.name,n=this.state,r=n.inventory,a=n.inventoryKeys.map((function(e){return{id:e,name:r[e].name,show:!0}})).map((function(e){return e.id})).reduce((function(e,t){var n;return o(o({},e),((n={})[t]="",n))}),{}),i=b(e)+"-batch-template";new p.ExportToCsv(o(o({},t.CSV_EXPORT_CONFIG),{filename:i})).generateCsv([a])},t.prototype.getBatchName=function(){var e=this.props,t=e.story.name,n=e.compositionName,r=Date.now(),a=h(r).format("MMDDYY-HHmm");return b(t)+"-"+b(n)+"-"+a},t.prototype.proceedWithExport=function(){var e=this,t=this.props,n=t.renderBatch,r=t.activeBatch.data;n(r.id,r.name).then((function(){e.setState({renderedBatch:!0})})).catch((function(t){throw e.props.handleError(c.publish.renderBatchFailed),e.setState({renderedBatch:!1}),t}))},t.prototype.importBatch=function(e){var t=this,n=e.story_id,r=e.id,a=e.name,o=e.uploadEvt,i=this.props,s=i.accessKey,u=i.compositionId,l=i.isExport,c=i.onError;this.props.importBatchFromCsv(n,r,a,o.target.files[0],s,u,!l,l).then((function(){t.props.batchJobs.missing.length>0&&c(),t.setState({uploadComplete:!0,uploading:!1}),t.getBatch(),l&&0===Object.keys(t.props.batchJobs.missing).length&&t.renderBatch({id:r,name:a})})).catch((function(e){throw t.setState({uploadComplete:!1,uploading:!1}),e}))},t.prototype.renderBatch=function(e){var t=this,n=e.id,r=e.name;this.props.renderBatch(n,r).then((function(){t.setState({renderedBatch:!0})})).catch((function(e){throw t.props.handleError(c.publish.renderBatchFailed),t.setState({renderedBatch:!1}),e}))},t.prototype.downloadCsv=function(){var e=this;this.setState({downloading:!0},(function(){var t=e.props,n=t.status,r=(t.api,t.handleError),a=e.state.selectedBatchId;n!==c.header.publishing?e.props.getBatchExport(a).then((function(){e.props.onDone(),e.setState({downloading:!1})})):r(c.publish.downloadError)}))},t.prototype.renderLabel=function(){var e=this.props,n=e.isExport,r=e.batchJobs,a=this.state,o=a.renderedBatch,i=a.selectedBatchId,u=a.uploading,d=a.uploadComplete;if(n&&d&&!o&&0===Object.keys(this.props.batchJobs.missing).length)return s.createElement("div",{className:"progress-bar"},s.createElement("progress",{max:t.PROGRESS_MAX_VALUE,value:r.renders[i]}));if(u){var p=n?c.publish.importingData:c.publish.creatingLinks;return s.createElement("span",null,s.createElement(l.default,null)," ",p)}return s.createElement("span",null,f.ICON_UPLOAD," ",c.publish.uploadCsv)},t.prototype.onAssociationChange=function(e,t,n){var r=this.props.activeBatch.data.columns.findIndex((function(e){return e.detail===t}));-1!==r&&this.props.updateAssociation(this.props.api,r,"Static",null),this.props.updateAssociation(this.props.api,parseInt(e,10),"UGC",t),this.props.onNext(n)},t.prototype.renderColumnMap=function(){var e,t,n=this,r=this.props,a=r.activeBatch.data.columns,l=r.batchJobs.missing,d=r.variables;if(l.length>=0&&a){var p=Object.keys(d).map((function(e){return o({},d[e])})),f=Object.keys(a).map((function(e){return a[e]})),h=f.filter((function(e){return 0!==e.from_import})).map((function(e,t){var n={value:t,label:e.name};return-1!==p.findIndex((function(t){return e.detail===t.id}))&&(n.disabled=!0),n})),m=!1,_=function(e){if(!e.optional&&-1===f.findIndex((function(t){return t.detail===e.id})))return m=!0,"break"};try{for(var g=i(p),v=g.next();!v.done;v=g.next()){if("break"===_(v.value))break}}catch(t){e={error:t}}finally{try{v&&!v.done&&(t=g.return)&&t.call(g)}finally{if(e)throw e.error}}h.unshift("");var b=Object.keys(l).map((function(e){return l[e]})).join();return h.length<p.length?s.createElement(s.Fragment,null,s.createElement(u.default,null),s.createElement("p",{className:"missingColumns"},c.publish.csvMissingColumns+" "+b)):s.createElement("div",{className:"align-columns"},s.createElement(u.default,null),s.createElement("p",{className:"match-columns"},""+c.publish.csvMatchColumns),s.createElement("table",null,s.createElement("thead",null,s.createElement("tr",null,s.createElement("th",null,"Variable"),s.createElement("th",null,"CSV Column"))),s.createElement("tbody",null,p.map((function(e,t){var r=f.findIndex((function(t){return t.detail===e.id})),a=null!=r?r:"",o=e.optional?"":"required";return s.createElement("tr",{key:"var-"+e.id,className:""+o},s.createElement("td",{className:"variable"},s.createElement("p",null,e.name," ",e.optional?null:s.createElement("span",{style:{color:"red"}}," * "))),s.createElement("td",null,s.createElement(y.default,{options:h,value:a,onChange:function(t){return n.onAssociationChange(t,e.id,m)}})))})))))}},t.prototype.render=function(){var e=this,n=this.state,r=n.uploadComplete,a=n.uploading,o=n.downloading,i=n.renderedBatch,p=n.selectedBatchId,h=this.props,m=h.isExport,_=h.batchJobs,y=_.missing,g=_.renders,v=[{label:s.createElement("span",null,f.ICON_DOWNLOAD," ",c.publish.downloadSampleCsvLink),onClick:function(){return e.downloadSampleCsv()},key:"download-sample"},{label:this.renderLabel(),onClick:function(){return e.selectCsv()},key:"upload",disabled:m&&r||a}],b=o?s.createElement("span",null,s.createElement(l.default,null)," ",c.publish.exporting):s.createElement("span",null,f.ICON_DOWNLOAD," ",c.publish.btnDownload),w=s.createElement("div",{className:"progress-bar"},s.createElement("progress",{max:t.PROGRESS_MAX_VALUE,value:g[p]})),M=s.createElement("div",null,s.createElement("h2",null,r?c.publish.downloadLink:c.publish.generatingLink),s.createElement(u.default,null),s.createElement("p",null,r?c.publish.downloadDesc:c.publish.generatingLinkDesc),m&&r&&!i?s.createElement(d.BigButton,{label:w,disabled:m}):s.createElement(d.BigButton,{label:b,disabled:o,onClick:function(){return e.downloadCsv()}})),L=s.createElement(s.Fragment,null,this.props.error?this.props.next?M:"":M,this.renderColumnMap()),T=s.createElement("div",null,s.createElement("h2",null,c.publish.emailTitle),s.createElement(u.default,null),s.createElement("p",null,c.publish.emailDesc),s.createElement("input",{type:"file",style:{display:"none"},accept:"text/csv",ref:this.hiddenFileInputRef,onChange:this.doUploadCsv}),s.createElement("div",{className:"link-wrapper"},null==v?void 0:v.map((function(e,t){return s.createElement(d.BigButton,{label:s.createElement("span",null,e.label),onClick:e.onClick,disabled:null==e?void 0:e.disabled,key:e.key})}))));return(m&&0===Object.keys(y).length?i:r)?L:T},t.PROGRESS_MAX_VALUE=100,t.CSV_EXPORT_CONFIG={fieldSeparator:",",quoteStrings:'"',decimalSeparator:".",showLabels:!1,showTitle:!1,useTextFile:!1,useBom:!1,useKeysAsHeaders:!0},t}(s.PureComponent),b=function(e){return e.replace(/\W/g,"")};t.default=_.connect((function(e){return{activeBatch:e.activeBatch,batchesList:e.batchesList}}),(function(e){return m.bindActionCreators({updateAssociation:g.updateAssociation,getBatch:g.getBatch,setPage:g.setPage},e)}),null,{withRef:!0})(v)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(515))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){}return e.EOL="\r\n",e.BOM="\ufeff",e.DEFAULT_FIELD_SEPARATOR=",",e.DEFAULT_DECIMAL_SEPARATOR=".",e.DEFAULT_QUOTE='"',e.DEFAULT_SHOW_TITLE=!1,e.DEFAULT_TITLE="My Generated Report",e.DEFAULT_FILENAME="generated",e.DEFAULT_SHOW_LABELS=!1,e.DEFAULT_USE_TEXT_FILE=!1,e.DEFAULT_USE_BOM=!0,e.DEFAULT_HEADER=[],e.DEFAULT_KEYS_AS_HEADERS=!1,e}();t.CsvConfigConsts=r,t.ConfigDefaults={filename:r.DEFAULT_FILENAME,fieldSeparator:r.DEFAULT_FIELD_SEPARATOR,quoteStrings:r.DEFAULT_QUOTE,decimalSeparator:r.DEFAULT_DECIMAL_SEPARATOR,showLabels:r.DEFAULT_SHOW_LABELS,showTitle:r.DEFAULT_SHOW_TITLE,title:r.DEFAULT_TITLE,useTextFile:r.DEFAULT_USE_TEXT_FILE,useBom:r.DEFAULT_USE_BOM,headers:r.DEFAULT_HEADER,useKeysAsHeaders:r.DEFAULT_KEYS_AS_HEADERS};var a=function(){function e(e){this._csv="";var n=e||{};this._options=u({},t.ConfigDefaults,n),this._options.useKeysAsHeaders&&this._options.headers&&this._options.headers.length>0&&console.warn("Option to use object keys as headers was set, but headers were still passed!")}return Object.defineProperty(e.prototype,"options",{get:function(){return this._options},set:function(e){this._options=u({},t.ConfigDefaults,e)},enumerable:!0,configurable:!0}),e.prototype.generateCsv=function(e,t){if(void 0===t&&(t=!1),this._csv="",this._parseData(e),this._options.useBom&&(this._csv+=r.BOM),this._options.showTitle&&(this._csv+=this._options.title+"\r\n\n"),this._getHeaders(),this._getBody(),""!=this._csv){if(t)return this._csv;var n=this._options.useTextFile?"plain":"csv",a=this._options.useTextFile?".txt":".csv",o=new Blob([this._csv],{type:"text/"+n+";charset=utf8;"});if(navigator.msSaveBlob){var i=this._options.filename.replace(/ /g,"_")+a;navigator.msSaveBlob(o,i)}else{this._options.useTextFile,encodeURI(this._csv);var s=document.createElement("a");s.href=URL.createObjectURL(o),s.setAttribute("visibility","hidden"),s.download=this._options.filename.replace(/ /g,"_")+a,document.body.appendChild(s),s.click(),document.body.removeChild(s)}}else console.log("Invalid data")},e.prototype._getHeaders=function(){if(this._options.showLabels||this._options.useKeysAsHeaders){var e=this._options.useKeysAsHeaders?Object.keys(this._data[0]):this._options.headers;if(e.length>0){for(var t="",n=0;n<e.length;n++)t+=e[n]+this._options.fieldSeparator;t=t.slice(0,-1),this._csv+=t+r.EOL}}},e.prototype._getBody=function(){for(var e=Object.keys(this._data[0]),t=0;t<this._data.length;t++){for(var n="",a=0;a<e.length;a++){var o=e[a];n+=this._formatData(this._data[t][o])+this._options.fieldSeparator}n=n.slice(0,-1),this._csv+=n+r.EOL}},e.prototype._formatData=function(e){return"locale"===this._options.decimalSeparator&&this._isFloat(e)?e.toLocaleString():"."!==this._options.decimalSeparator&&this._isFloat(e)?e.toString().replace(".",this._options.decimalSeparator):"string"==typeof e?(e=e.replace(/"/g,'""'),(this._options.quoteStrings||e.indexOf(",")>-1||e.indexOf("\n")>-1||e.indexOf("\r")>-1)&&(e=this._options.quoteStrings+e+this._options.quoteStrings),e):"boolean"==typeof e?e?"TRUE":"FALSE":e},e.prototype._isFloat=function(e){return+e===e&&(!isFinite(e)||Boolean(e%1))},e.prototype._parseData=function(e){return this._data="object"!=typeof e?JSON.parse(e):e,this._data},e}();t.ExportToCsv=a;var o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function s(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function u(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];for(var a,u=s(e),l=1;l<arguments.length;l++){for(var c in t=Object(arguments[l]))o.call(t,c)&&(u[c]=t[c]);if(Object.getOwnPropertySymbols){a=Object.getOwnPropertySymbols(t);for(var d=0;d<a.length;d++)i.call(t,a[d])&&(u[a[d]]=t[a[d]])}}return u}},function(e,t,n){var r={"./af":138,"./af.js":138,"./ar":139,"./ar-dz":140,"./ar-dz.js":140,"./ar-kw":141,"./ar-kw.js":141,"./ar-ly":142,"./ar-ly.js":142,"./ar-ma":143,"./ar-ma.js":143,"./ar-sa":144,"./ar-sa.js":144,"./ar-tn":145,"./ar-tn.js":145,"./ar.js":139,"./az":146,"./az.js":146,"./be":147,"./be.js":147,"./bg":148,"./bg.js":148,"./bm":149,"./bm.js":149,"./bn":150,"./bn-bd":151,"./bn-bd.js":151,"./bn.js":150,"./bo":152,"./bo.js":152,"./br":153,"./br.js":153,"./bs":154,"./bs.js":154,"./ca":155,"./ca.js":155,"./cs":156,"./cs.js":156,"./cv":157,"./cv.js":157,"./cy":158,"./cy.js":158,"./da":159,"./da.js":159,"./de":160,"./de-at":161,"./de-at.js":161,"./de-ch":162,"./de-ch.js":162,"./de.js":160,"./dv":163,"./dv.js":163,"./el":164,"./el.js":164,"./en-au":165,"./en-au.js":165,"./en-ca":166,"./en-ca.js":166,"./en-gb":167,"./en-gb.js":167,"./en-ie":168,"./en-ie.js":168,"./en-il":169,"./en-il.js":169,"./en-in":170,"./en-in.js":170,"./en-nz":171,"./en-nz.js":171,"./en-sg":172,"./en-sg.js":172,"./eo":173,"./eo.js":173,"./es":174,"./es-do":175,"./es-do.js":175,"./es-mx":176,"./es-mx.js":176,"./es-us":177,"./es-us.js":177,"./es.js":174,"./et":178,"./et.js":178,"./eu":179,"./eu.js":179,"./fa":180,"./fa.js":180,"./fi":181,"./fi.js":181,"./fil":182,"./fil.js":182,"./fo":183,"./fo.js":183,"./fr":184,"./fr-ca":185,"./fr-ca.js":185,"./fr-ch":186,"./fr-ch.js":186,"./fr.js":184,"./fy":187,"./fy.js":187,"./ga":188,"./ga.js":188,"./gd":189,"./gd.js":189,"./gl":190,"./gl.js":190,"./gom-deva":191,"./gom-deva.js":191,"./gom-latn":192,"./gom-latn.js":192,"./gu":193,"./gu.js":193,"./he":194,"./he.js":194,"./hi":195,"./hi.js":195,"./hr":196,"./hr.js":196,"./hu":197,"./hu.js":197,"./hy-am":198,"./hy-am.js":198,"./id":199,"./id.js":199,"./is":200,"./is.js":200,"./it":201,"./it-ch":202,"./it-ch.js":202,"./it.js":201,"./ja":203,"./ja.js":203,"./jv":204,"./jv.js":204,"./ka":205,"./ka.js":205,"./kk":206,"./kk.js":206,"./km":207,"./km.js":207,"./kn":208,"./kn.js":208,"./ko":209,"./ko.js":209,"./ku":210,"./ku.js":210,"./ky":211,"./ky.js":211,"./lb":212,"./lb.js":212,"./lo":213,"./lo.js":213,"./lt":214,"./lt.js":214,"./lv":215,"./lv.js":215,"./me":216,"./me.js":216,"./mi":217,"./mi.js":217,"./mk":218,"./mk.js":218,"./ml":219,"./ml.js":219,"./mn":220,"./mn.js":220,"./mr":221,"./mr.js":221,"./ms":222,"./ms-my":223,"./ms-my.js":223,"./ms.js":222,"./mt":224,"./mt.js":224,"./my":225,"./my.js":225,"./nb":226,"./nb.js":226,"./ne":227,"./ne.js":227,"./nl":228,"./nl-be":229,"./nl-be.js":229,"./nl.js":228,"./nn":230,"./nn.js":230,"./oc-lnc":231,"./oc-lnc.js":231,"./pa-in":232,"./pa-in.js":232,"./pl":233,"./pl.js":233,"./pt":234,"./pt-br":235,"./pt-br.js":235,"./pt.js":234,"./ro":236,"./ro.js":236,"./ru":237,"./ru.js":237,"./sd":238,"./sd.js":238,"./se":239,"./se.js":239,"./si":240,"./si.js":240,"./sk":241,"./sk.js":241,"./sl":242,"./sl.js":242,"./sq":243,"./sq.js":243,"./sr":244,"./sr-cyrl":245,"./sr-cyrl.js":245,"./sr.js":244,"./ss":246,"./ss.js":246,"./sv":247,"./sv.js":247,"./sw":248,"./sw.js":248,"./ta":249,"./ta.js":249,"./te":250,"./te.js":250,"./tet":251,"./tet.js":251,"./tg":252,"./tg.js":252,"./th":253,"./th.js":253,"./tk":254,"./tk.js":254,"./tl-ph":255,"./tl-ph.js":255,"./tlh":256,"./tlh.js":256,"./tr":257,"./tr.js":257,"./tzl":258,"./tzl.js":258,"./tzm":259,"./tzm-latn":260,"./tzm-latn.js":260,"./tzm.js":259,"./ug-cn":261,"./ug-cn.js":261,"./uk":262,"./uk.js":262,"./ur":263,"./ur.js":263,"./uz":264,"./uz-latn":265,"./uz-latn.js":265,"./uz.js":264,"./vi":266,"./vi.js":266,"./x-pseudo":267,"./x-pseudo.js":267,"./yo":268,"./yo.js":268,"./zh-cn":269,"./zh-cn.js":269,"./zh-hk":270,"./zh-hk.js":270,"./zh-mo":271,"./zh-mo.js":271,"./zh-tw":272,"./zh-tw.js":272};function a(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=o,e.exports=a,a.id=516},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var a=n(39),o=n(29),i=null;try{var s=JSON.parse(localStorage.getItem(a.AUTH_CACHE_KEY));if(s){var u=s.idTokenPayload.exp;o.default.checkExpiry(u)&&(i=s)}}catch(e){console.warn("Cached credentials were malformed or missing, redirected to login.")}t.default=function(e,t){switch(void 0===e&&(e=i),t.type){case a.default.LOGIN:return r({},t.auth);case a.default.CLEAR:return null;default:return e}}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var a=n(40),o=null;try{o=JSON.parse(localStorage.getItem(a.ACCESS_CACHE_KEY))}catch(e){console.warn("Cached access data was malformed or missing, redirected to login.")}t.default=function(e,t){switch(void 0===e&&(e=o),t.type){case a.default.SET:case a.default.STORY_ADDED:case a.default.STORY_NAME_MUTATION:case a.default.ORG_NAME_MUTATION:case a.default.STORY_DELETED:return r({},t.accessData);case a.default.CLEAR:return null;default:return e}}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var a=n(55),o={publishing:!1};t.default=function(e,t){switch(void 0===e&&(e=o),t.type){case a.default.UPDATE_PUBLISH_STATUS:return r(r({},e),t.data);case a.default.CLEAR_PUBLISH_STATUS:return o;default:return e}}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var a=n(24),o={page:1,order:"date_created",order_direction:"desc",name:"",type:"",tags:""};t.default=function(e,t){switch(void 0===e&&(e=o),t.type){case a.default.UPDATE:return r(r({},e),t.newFilters);case a.default.RESET:return r({},o);default:return e}}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},a=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},o=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,a=e.length;n<r;n++,a++)e[a]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0});var i=n(17),s={loading:!1};t.default=function(e,t){void 0===e&&(e=s);var n,u=[];switch(t.type){case i.default.TOGGLE_LOADING:return r(r({},e),{loading:t.toggle});case i.default.GET:return r(r({},e),t.assetList);case i.default.ADD_TAG:for(var l=0,c=e.assets.length;l<c;l++)(n=e.assets[l]).id===t.id?u[l]=r(r({},n),{tags:o(o([],a(n.tags)),a(t.freshTags))}):u[l]=n;return r(r({},e),{assets:u});case i.default.DELETE_TAG:return r(r({},e),{assets:e.assets.map((function(e){return e.id===t.id?r(r({},e),{tags:e.tags.filter((function(e){return e!==t.tag}))}):e}))});case i.default.UPDATE_NAME:return r(r({},e),{assets:e.assets.map((function(e){return e.id===t.id?r(r({},e),{name:t.name}):e}))});case i.default.UPDATE_DATA:return r(r({},e),{assets:e.assets.map((function(e){return e.id===t.id?r(r({},e),{data:t.data}):e}))});default:return e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(83),a=[];t.default=function(e,t){switch(void 0===e&&(e=a),t.type){case r.default.GET:return t.assetTags;default:return e}}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},a=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},o=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,a=e.length;n<r;n++,a++)e[a]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0});var i=n(52),s={autoTag:!0,assignToStory:!0,uploads:[]};t.default=function(e,t){switch(void 0===e&&(e=s),t.type){case i.default.TOGGLE_AUTO_TAG:return r(r({},e),{autoTag:t.toggle});case i.default.TOGGLE_ASSIGN_TO_STORY:return r(r({},e),{assignToStory:t.toggle});case i.default.ADD_UPLOAD:return r(r({},e),{uploads:o(o([],a(e.uploads)),[t.uploadMeta])});case i.default.UPDATE_PERCENT_UPLOADED:var n=e.uploads.map((function(e){return e.filename===t.filename?r(r({},e),{percent:t.percent}):e}));return r(r({},e),{uploads:n});case i.default.REMOVE_UPLOAD:return r(r({},e),{uploads:e.uploads.filter((function(e){return e.filename!==t.filename}))});default:return e}}},function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},a=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,a=e.length;n<r;n++,a++)e[a]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0});var o=n(33),i=[];t.default=function(e,t){switch(void 0===e&&(e=i),t.type){case o.default.SELECT_ALL:return a([],r(t.allIds));case o.default.SELECT_ASSET:return a(a([],r(e)),[t.id]);case o.default.SELECT_MULTIPLE:return a([],r(new Set(a(a([],r(e)),r(t.assets)))));case o.default.DESELECT_ASSET:return e.filter((function(e){return e!==t.id}));case o.default.RESET_SELECTION:return[];default:return e}}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},a=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},o=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,a=e.length;n<r;n++,a++)e[a]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0});var i=n(88),s={loading:!0,updating:!1,associationOptions:{},page:1,data:{}},u={name:"New Column",type:"Static",from_import:1,detail:null};t.default=function(e,t){var n,l;switch(void 0===e&&(e=s),t.type){case i.default.TOGGlE_LOADING:return r(r({},e),{loading:t.toggle});case i.default.TOGGLE_UPDATING:return r(r({},e),{updating:t.toggle});case i.default.ADD_COLUMN:return void 0!==t.columnData?r(r({},e),{data:r(r({},e.data),{columns:o(o([],a(e.data.columns)),[t.columnData])})}):(l=(n=function(e){return e.data.columns.filter((function(e){return e.name.includes(u.name)})).length}(e))?r(r({},u),{name:u.name+" ("+n+")"}):r({},u),r(r({},e),{data:r(r({},e.data),{columns:o(o([],a(e.data.columns)),[l])})}));case i.default.REPLACE_ASSOCIATION_OPTIONS:return r(r({},e),{associationOptions:r({},t.associationOptions)});case i.default.UPDATE_ASSOCIATION:return r(r({},e),{data:r(r({},e.data),{columns:e.data.columns.map((function(e,n){return t.colIndex===n?"Static"===t.newType?r(r({},e),{type:t.newType,detail:null}):r(r({},e),{type:t.newType,detail:t.newAssociation,from_import:"EGC"===t.newType?0:1}):e}))})});case i.default.SET_BATCH:return r(r({},e),{data:r({},t.batch)});case i.default.SET_PAGE:return r(r({},e),{page:t.page});default:return e}}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var a=n(28),o=n(9),i=n(527),s=n(7),u=n(29),l=n(27),c=function(){function e(e,t,n){var c=this;this.pollingInterval=1e3,this.cancelTokenCache={player:void 0,system:void 0},this.cancelTokens={},this.doRequest=function(e,t){return void 0===t&&(t=""),new Promise((function(n,r){c.http(e).then((function(e){t&&c.clearCache(t),n(e.data)})).catch((function(e){!a.default.isCancel(e)&&t&&c.clearCache(t),!e.response||403!==e.response.status&&401!==e.response.status||(alert(s.assets.sessionExpired),l.default.getSession()&&(l.default.removeSession(),u.default.logout())),r(e)}))}))},this.cancelPrevious=function(e){var t=a.default.CancelToken.source();return c.cancelTokenCache[e]&&c.cancelTokenCache[e].cancel(),c.cancelTokenCache[e]=t,t.token},this.clearCache=function(e){c.cancelTokenCache[e]=void 0},this.doAWSRequest=function(e,t){return void 0===t&&(t=""),new Promise((function(t,n){c.awsHttp(e).then((function(e){t(e.data)})).catch((function(e){n(e)}))}))},this.saveStory=function(e,t){return c.doRequest({method:"PATCH",url:"/story/"+e,data:t})},this.newStory=function(e){return c.doRequest({method:"POST",url:"/story",data:e})},this.deleteStory=function(e){return c.doRequest({method:"DELETE",url:"/story/"+e})},this.getStoryStatus=function(e){return c.doRequest({method:"GET",url:"/story/"+e+"/version"})},this.getStoryVersions=function(e){return c.doRequest({method:"GET",url:"/story/"+e+"/versions"})},this.revertVersion=function(e,t){var n={version_id:t};return c.doRequest({method:"POST",url:"/story/"+e+"/version/revert",data:n})},this.getSignedUrl=function(e,t){return c.doRequest({method:"GET",url:"/story/"+e+"/upload-url",params:{filename:t.name,content_type:t.type}})},this.uploadToSignedUrl=function(e,t,n){return c.doAWSRequest({url:e,method:"PUT",data:t,onUploadProgress:n,headers:{"Content-Type":t.type}})},this.checkS3Bucket=function(e){var t="/bucket/"+e;return c.doRequest({method:"GET",url:t})},this.createS3Bucket=function(e,t,n,r){var a="/bucket/"+e,o={region:t,create_distribution:r?1:0,read_only:n?1:0};return c.doRequest({method:"POST",url:a,data:o})},this.processStoryFile=function(e,t,n){var r="/story/"+e+"/file",a={};return t?a.file_key=t:n&&(a.url=n),c.doRequest({method:"POST",url:r,data:a})},this.getAssets=function(e,t,n){void 0===n&&(n=!1);var r="/assets?items_per_page=50&optional_story_id="+t+"&unprocessed="+n,a=function(t){e.hasOwnProperty(t)&&(e[t]&&"tags"!==t&&(r+="&"+t+"="+encodeURIComponent(e[t])),e[t]&&"tags"===t&&e[t].split(",").forEach((function(e,n){r+="&"+t+"["+n+"]="+encodeURIComponent(e)})))};for(var o in e)a(o);return c.doRequest({method:"GET",url:r})},this.getAssetItem=function(e){return c.doRequest({method:"GET",url:"/assets/"+e})},this.duplicateAsset=function(e,t){return c.doRequest({method:"POST",url:"/assets/"+e+"/copy",data:{name:t}})},this.cancelRequest=function(e){var t=a.default.CancelToken.source();return c.cancelTokens[e]=t,t.token},this.clearCancelTokes=function(){c.cancelTokens={}},this.uploadAsset=function(e,t,n,r,a){var o=new FormData,i=c.cancelRequest(a);return e&&o.append("story_id",e),o.append("tags",t),o.append("file",n),c.doRequest({method:"POST",url:"/assets",data:o,onUploadProgress:r,cancelToken:i})},this.cancelUploadAssets=function(e){var t=c.cancelTokens[e];t&&t.cancel()},this.createCompositionAsset=function(e,t,n){var r=new FormData;return r.append("story_id",e),r.append("data",t),r.append("type","video_composition"),r.append("name",n||"New Composition"),c.doRequest({method:"POST",url:"/assets",data:r})},this.createStaticCompositionAsset=function(e,t){var n=new FormData;return n.append("story_id",e),n.append("data",t),n.append("type","static_composition"),n.append("name","New Template"),c.doRequest({method:"POST",url:"/assets",data:n})},this.deleteAsset=function(e){return c.doRequest({method:"DELETE",url:"/assets/"+e})},this.deleteAssets=function(e){return c.doRequest({method:"DELETE",url:"/assets",data:{ids:e}})},this.copyAsset=function(e,t){return c.doRequest({method:"POST",url:"/assets/"+e+"/copy",data:t})},this.addAssetTag=function(e,t){return c.doRequest({method:"POST",url:"/assets/"+e+"/tag",data:{tag:t}})},this.deleteAssetTag=function(e,t){return c.doRequest({method:"DELETE",url:"/assets/"+e+"/tag",data:{tag:t}})},this.updateAsset=function(e,t){return c.doRequest({method:"PATCH",url:"/assets/"+e,data:t})},this.getAssetTags=function(e){return c.doRequest({method:"GET",url:"/assets/tags?story_id="+e})},this.getStory=function(e){return c.doRequest({method:"GET",url:"/story/"+e})},this.getExperiences=function(e,t){return c.doRequest({method:"GET",url:"/story/"+e+"/experiences",params:t})},this.exportExperiences=function(e,t){return c.doRequest({method:"GET",url:"/story/"+e+"/experiences/export",params:t})},this.blockByExperience=function(e){var t="/experience/"+e+"/block";return c.doRequest({method:"POST",url:t})},this.getBatches=function(e,t){return c.doRequest({method:"GET",url:"/story/"+e+"/batches",params:t})},this.getBatch=function(e,t){return c.doRequest({method:"GET",url:"/batch/"+e,params:{page:t}})},this.getBatchProgress=function(e){return c.doRequest({method:"GET",url:"/batch/"+e+"/progress"})},this.createFreshBatch=function(e,t){return c.doRequest({method:"POST",url:"/batch",data:{story_id:e,name:t}})},this.updateBatchName=function(e,t){return c.doRequest({method:"PATCH",url:"/batch/"+e+"/rename",data:{name:t}})},this.importBatchDataFromCsv=function(e,t,n,r,a,o){void 0===n&&(n=!1),void 0===r&&(r=null),void 0===a&&(a=null),void 0===o&&(o=!1);var i=new FormData;return i.append("file_key",t),n&&r&&a&&(i.append("include_email_embed","true"),i.append("composition_id",a),i.append("access_key",r)),o&&i.append("include_media","true"),c.doRequest({method:"POST",url:"/batch/"+e+"/data/from-csv",data:i})},this.updateBatchColumns=function(e,t){return c.doRequest({method:"PUT",url:"/batch/"+e+"/columns",data:t})},this.insertNewRow=function(e,t){return c.doRequest({method:"POST",url:"/batch/"+e+"/row/"+t})},this.updateCellValue=function(e,t,n,r){return c.doRequest({method:"PUT",url:"/batch/"+e+"/cell",data:{column_index:t,row_index:n,value:r}})},this.prepareBatchForRender=function(e){return c.doRequest({method:"POST",url:"/batch/"+e+"/prepare"})},this.checkBatchExportStatus=function(e){return c.doRequest({method:"GET",url:"/batch/"+e+"/export"})},this.invokeBatchExportJob=function(e){return c.doRequest({method:"POST",url:"/batch/"+e+"/export"})},this.downloadBatchExport=function(e,t){return c.doRequest({method:"GET",url:"/batch/"+e+"/export/"+t,responseType:"blob",params:{preserve:"true"}})},this.duplicateBatch=function(e){return c.doRequest({method:"POST",url:"/batch/"+e+"/duplicate"})},this.deleteBatch=function(e){return c.doRequest({method:"DELETE",url:"/batch/"+e})},this.updateModerationStatus=function(e,t,n){return c.doRequest({method:"POST",url:"/experience/"+e+"/status",data:{status:t,reason:n}})},this.addOrReplaceNote=function(e,t){return c.doRequest({method:"POST",url:"/experience/"+e+"/notes",data:{notes:t}})},this.getJob=function(e){return c.doRequest({method:"GET",url:"/job/"+e})},this.runCut=function(e,t,n,r){var a="/job/"+i.JOB_TYPES.RUN_CUT,o={story_id:e,act_id:t,scene_id:n,cut_id:r};return c.doRequest({method:"POST",url:a,data:o})},this.runReRenderCuts=function(e,t,n){var r="/job/"+i.JOB_TYPES.RE_RUN_CUTS,a={story_id:e,act_id:t,scene_id:n};return c.doRequest({method:"POST",url:r,data:a})},this.runProcessBaseVideo=function(e,t){var n="/job/"+i.JOB_TYPES.PROCESS_BASE_VIDEO,r={story_id:e,file_key:t};return c.doRequest({method:"POST",url:n,data:r})},this.runPublish=function(e,t){var n={story_id:e,message:t};return c.doRequest({method:"POST",url:"/job/publish",data:n})},this.cancelPublish=function(e){var t={story_id:e};return c.doRequest({method:"DELETE",url:"/job/publish",data:t})},this.pollJob=function(e){var t={method:"GET",url:"/job/"+e};return new Promise((function(e,n){c.pollForJob(t,e,n)}))},this.pollForJob=function(e,t,n){c.http(e).then((function(r){"failed"===r.data.status?n(r):void 0!==r.data.output?t(r.data):c.jobPollTimer=setTimeout((function(){c.pollForJob(e,t,n)}),c.pollingInterval)})).catch((function(e){n(e)}))},this.pollForExperience=function(e,t,n){c.http(e).then((function(r){"failed"===r.data.status?n(r):!1===r.data.rendering&&void 0!==r.data.error?n(r.data):void 0!==r.data.output?o.isObjEmpty(r.data.output)?c.experiencePollTimer=setTimeout((function(){c.pollForExperience(e,t,n)}),c.pollingInterval):t(r.data):c.experiencePollTimer=setTimeout((function(){c.pollForExperience(e,t,n)}),c.pollingInterval)})).catch((function(e){n(e)}))},this.getJobLogUrl=function(e){var t="/job/"+e+"/log-url";return c.doRequest({method:"GET",url:t})},this.getJobLog=function(e){return c.doAWSRequest({method:"GET",url:e})},this.createExperience=function(e,t,n,r){void 0===t&&(t={});var a=c.experienceFormData(e,t,n);r&&a.append("published","false");return c.doRequest({method:"POST",url:"/experience",data:a})},this.deleteExperience=function(e,t){void 0===t&&(t=!0);var n="/experience/"+e,r={erase_media:t};return c.doRequest({method:"DELETE",data:r,url:n})},this.triggerEvent=function(e,t,n){var r="/experience/"+e+"/trigger-event";if(t){var a=new FormData;return a.append("composition_id",t),n&&a.append("published","false"),c.doRequest({method:"POST",url:r,data:a})}return c.doRequest({method:"POST",url:r})},this.getExperience=function(e,t){void 0===t&&(t=!1);var n={method:"GET",url:"/experience/"+e};return t?new Promise((function(e,t){c.pollForExperience(n,e,t)})):c.doRequest(n)},this.experienceFormData=function(e,t,n){var a=r({},t),o=new FormData;for(var i in o.append("story_id",e),n&&o.append("composition_id",n),a)if(a[i]){var s=a[i];if(s&&"file"===s.type){var u=s.files;u.length>0?(a[i]="",o.append(i,u[0])):a[i]=""}else s&&s instanceof File&&(a[i]="",o.append(i,s,s.name));o.append("inventory["+i+"]",a[i])}return o},this.getAccssCredentials=function(){return c.doRequest({method:"GET",url:"/api-key"})},this.createAccessCredentials=function(e){var t={name:e};return c.doRequest({method:"POST",data:t,url:"/api-key"})},this.deleteAccessCrednetials=function(e){var t={access_key_id:e};return c.doRequest({method:"DELETE",data:t,url:"/api-key"})},this.invokeBatchRenderJob=function(e){return c.doRequest({method:"POST",url:"/job/render-batch",data:{batch_id:e}})},this.cancelBatchRenderJob=function(e){return c.doRequest({method:"POST",url:"/batch/"+e+"/cancel"})},this.getUsers=function(e,t,n){return c.doRequest({url:"/account/"+e+"/users?page="+t+"&items_per_page="+n,method:"GET"})},this.addUser=function(e,t,n){return c.doRequest({url:"/account/"+e+"/grant",method:"POST",data:{email:t,role_id:n}})},this.resendInvite=function(e,t){return c.doRequest({url:"/account/"+e+"/resend",method:"POST",data:{email:t}})},this.revokeInvite=function(e,t){return c.doRequest({url:"/account/"+e+"/revoke",method:"POST",data:{email:t}})},this.updateInviteRole=function(e,t,n){return c.doRequest({url:"/account/"+e+"/grant",method:"PATCH",data:{email:t,role_id:n}})},this.updateRole=function(e,t,n){return c.doRequest({url:"/account/"+e+"/user",method:"PATCH",data:{user_id:t,role_id:n}})},this.deleteUser=function(e,t){return c.doRequest({url:"/account/"+e+"/user",method:"DELETE",data:{user_id:t}})},this.getPlayerMetrics=function(e,t,n,r){void 0===r&&(r="player");var a={method:"GET",url:"/metrics/player/"+e,params:{start:t,end:n},cancelToken:c.cancelPrevious(r)};return c.doRequest(a,r)},this.getSystemMetrics=function(e,t,n,r,a){void 0===a&&(a="system");var o={method:"GET",url:"/metrics/system/"+e,params:{start:t,end:n,step:r},cancelToken:c.cancelPrevious(a)};return c.doRequest(o,a)},this.getOrganizations=function(e,t){return c.doRequest({url:"/account",method:"GET",params:{page:e,items_per_page:t}})},this.addOrganization=function(e,t){return c.doRequest({url:"/account",method:"POST",data:{name:e,initial_story:t}})},this.updateOrgName=function(e,t){return c.doRequest({url:"/account/"+e,method:"PATCH",data:{name:t}})},this.deleteOrg=function(e){},this.changeOrgPlan=function(e,t){return c.doRequest({url:"/account/"+e,method:"PATCH",data:{tier:t}})},this.getAccountInfo=function(e){return c.doRequest({url:"/account/"+e,method:"GET"})},this.cancelOrgPlan=function(e){return c.doRequest({url:"/account/"+e,method:"PATCH",data:{cancel:!0}})},this.getNextBillingPeriod=function(e){return c.doRequest({url:"/account/"+e+"/next-payment",method:"GET"})},this.getRedirectToBillingPortal=function(e){return c.doRequest({url:"/account/"+e+"/billing-portal",method:"GET"})},this.getRedirectToRenew=function(e,t){return c.doRequest({url:"/account/"+e+"/renew?tier="+t,method:"GET"})},this.getAPIUsageOverview=function(e,t){var n=e&&t?"?start="+e+"&end="+t:"";return c.doRequest({url:"/usage"+n,method:"GET"})},this.getUsageGraph=function(e,t,n){var r=t&&n?"?start="+t+"&end="+n:"";return c.doRequest({url:"/usage/daily/"+e+r,method:"GET"})},this.getBillingPeriods=function(){return c.doRequest({url:"/usage/billing-periods",method:"GET"})},this.http=n?a.default.create({baseURL:e,headers:{Authorization:"Bearer "+t,"X-Imposium-API-Version":"2.0.0","X-Imposium-Account-Id":n||""}}):a.default.create({baseURL:e,headers:{"X-Imposium-Access-Key":""+t,"X-Imposium-API-Version":"2.0.0"}}),this.awsHttp=a.default.create()}return e.prototype.cancelExperiencePolling=function(){var e=this;return new Promise((function(t){clearTimeout(e.experiencePollTimer),t()}))},e.prototype.cancelJobPolling=function(){var e=this;return new Promise((function(t){clearTimeout(e.jobPollTimer),t()}))},e}();t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JOB_TYPES=void 0,t.JOB_TYPES={RUN_CUT:"make-cut",PROCESS_BASE_VIDEO:"process-base-video",RE_RUN_CUTS:"recut-scene"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(28),a=function(e){var t=this;this.doRequest=function(e){return new Promise((function(n,r){t.http(e).then((function(e){n(e.data)})).catch((function(e){r(e)}))}))},this.updateModerationStatus=function(e,n,r){return t.doRequest({method:"POST",url:"/",data:{task:"update-experience-status",experience_id:e,status:n,reason:r}})},this.addOrReplaceNote=function(e,n){return t.doRequest({method:"POST",url:"/",data:{task:"update-experience-notes",experience_id:e,notes:n}})},this.http=r.default.create({baseURL:e+"/1.1"})};t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(530),a=function(){function e(){}return e.setItem=function(e,t){return new Promise((function(n,a){r.setItem(e,t).then((function(){return n(null)})).catch((function(e){console.error("Failed to store key value pair:",e),a(e)}))}))},e.getItem=function(e){return new Promise((function(t,n){r.getItem(e).then((function(e){t(e)})).catch((function(e){console.error("Failed to look up value for key:",e),n(e)}))}))},e}();t.default=a},function(e,t){e.exports=h},function(e,t,n){"use strict";n.r(t),n.d(t,"AlphaPicker",(function(){return Gn})),n.d(t,"BlockPicker",(function(){return la})),n.d(t,"CirclePicker",(function(){return Ya})),n.d(t,"default",(function(){return za})),n.d(t,"ChromePicker",(function(){return za})),n.d(t,"CompactPicker",(function(){return Va})),n.d(t,"GithubPicker",(function(){return Ja})),n.d(t,"HuePicker",(function(){return Za})),n.d(t,"MaterialPicker",(function(){return Qa})),n.d(t,"PhotoshopPicker",(function(){return so})),n.d(t,"SketchPicker",(function(){return mo})),n.d(t,"SliderPicker",(function(){return bo})),n.d(t,"SwatchesPicker",(function(){return xo})),n.d(t,"TwitterPicker",(function(){return So})),n.d(t,"GooglePicker",(function(){return Po})),n.d(t,"CustomPicker",(function(){return Pn}));var r=n(0),a=n.n(r),o=n(3),i=n.n(o),s=function(e,t,n,r,a){var o=a.clientWidth,i=a.clientHeight,s="number"==typeof e.pageX?e.pageX:e.touches[0].pageX,u="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,l=s-(a.getBoundingClientRect().left+window.pageXOffset),c=u-(a.getBoundingClientRect().top+window.pageYOffset);if("vertical"===n){var d=void 0;if(d=c<0?0:c>i?1:Math.round(100*c/i)/100,t.a!==d)return{h:t.h,s:t.s,l:t.l,a:d,source:"rgb"}}else{var p=void 0;if(r!==(p=l<0?0:l>o?1:Math.round(100*l/o)/100))return{h:t.h,s:t.s,l:t.l,a:p,source:"rgb"}}return null},u={},l=function(e,t,n,r){var a=e+"-"+t+"-"+n+(r?"-server":"");if(u[a])return u[a];var o=function(e,t,n,r){if("undefined"==typeof document&&!r)return null;var a=r?new r:document.createElement("canvas");a.width=2*n,a.height=2*n;var o=a.getContext("2d");return o?(o.fillStyle=e,o.fillRect(0,0,a.width,a.height),o.fillStyle=t,o.fillRect(0,0,n,n),o.translate(n,n),o.fillRect(0,0,n,n),a.toDataURL()):null}(e,t,n,r);return u[a]=o,o},c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},d=function(e){var t=e.white,n=e.grey,o=e.size,s=e.renderers,u=e.borderRadius,d=e.boxShadow,p=e.children,f=i()({default:{grid:{borderRadius:u,boxShadow:d,absolute:"0px 0px 0px 0px",background:"url("+l(t,n,o,s.canvas)+") center left"}}});return Object(r.isValidElement)(p)?a.a.cloneElement(p,c({},p.props,{style:c({},p.props.style,f.grid)})):a.a.createElement("div",{style:f.grid})};d.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}};var p=d,f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var y=function(e){function t(){var e,n,r;m(this,t);for(var a=arguments.length,o=Array(a),i=0;i<a;i++)o[i]=arguments[i];return n=r=_(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(o))),r.handleChange=function(e){var t=s(e,r.props.hsl,r.props.direction,r.props.a,r.container);t&&"function"==typeof r.props.onChange&&r.props.onChange(t,e)},r.handleMouseDown=function(e){r.handleChange(e),window.addEventListener("mousemove",r.handleChange),window.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},r.unbindEventListeners=function(){window.removeEventListener("mousemove",r.handleChange),window.removeEventListener("mouseup",r.handleMouseUp)},_(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),h(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var e=this,t=this.props.rgb,n=i()({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+t.r+","+t.g+","+t.b+", 0) 0%,\n rgba("+t.r+","+t.g+","+t.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:100*t.a+"%"},slider:{width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",marginTop:"1px",transform:"translateX(-2px)"}},vertical:{gradient:{background:"linear-gradient(to bottom, rgba("+t.r+","+t.g+","+t.b+", 0) 0%,\n rgba("+t.r+","+t.g+","+t.b+", 1) 100%)"},pointer:{left:0,top:100*t.a+"%"}},overwrite:f({},this.props.style)},{vertical:"vertical"===this.props.direction,overwrite:!0});return a.a.createElement("div",{style:n.alpha},a.a.createElement("div",{style:n.checkboard},a.a.createElement(p,{renderers:this.props.renderers})),a.a.createElement("div",{style:n.gradient}),a.a.createElement("div",{style:n.container,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},a.a.createElement("div",{style:n.pointer},this.props.pointer?a.a.createElement(this.props.pointer,this.props):a.a.createElement("div",{style:n.slider}))))}}]),t}(r.PureComponent||r.Component),g=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var v=[38,40],b=1,w=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.handleBlur=function(){n.state.blurValue&&n.setState({value:n.state.blurValue,blurValue:null})},n.handleChange=function(e){n.setUpdatedValue(e.target.value,e)},n.handleKeyDown=function(e){var t,r=function(e){return Number(String(e).replace(/%/g,""))}(e.target.value);if(!isNaN(r)&&(t=e.keyCode,v.indexOf(t)>-1)){var a=n.getArrowOffset(),o=38===e.keyCode?r+a:r-a;n.setUpdatedValue(o,e)}},n.handleDrag=function(e){if(n.props.dragLabel){var t=Math.round(n.props.value+e.movementX);t>=0&&t<=n.props.dragMax&&n.props.onChange&&n.props.onChange(n.getValueObjectWithLabel(t),e)}},n.handleMouseDown=function(e){n.props.dragLabel&&(e.preventDefault(),n.handleDrag(e),window.addEventListener("mousemove",n.handleDrag),window.addEventListener("mouseup",n.handleMouseUp))},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleDrag),window.removeEventListener("mouseup",n.handleMouseUp)},n.state={value:String(e.value).toUpperCase(),blurValue:String(e.value).toUpperCase()},n.inputId="rc-editable-input-"+b++,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),g(t,[{key:"componentDidUpdate",value:function(e,t){this.props.value===this.state.value||e.value===this.props.value&&t.value===this.state.value||(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(e){return function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},this.props.label,e)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||1}},{key:"setUpdatedValue",value:function(e,t){var n=this.props.label?this.getValueObjectWithLabel(e):e;this.props.onChange&&this.props.onChange(n,t),this.setState({value:e})}},{key:"render",value:function(){var e=this,t=i()({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return a.a.createElement("div",{style:t.wrap},a.a.createElement("input",{id:this.inputId,style:t.input,ref:function(t){return e.input=t},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?a.a.createElement("label",{htmlFor:this.inputId,style:t.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}(r.PureComponent||r.Component),M=function(e,t,n,r){var a=r.clientWidth,o=r.clientHeight,i="number"==typeof e.pageX?e.pageX:e.touches[0].pageX,s="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,u=i-(r.getBoundingClientRect().left+window.pageXOffset),l=s-(r.getBoundingClientRect().top+window.pageYOffset);if("vertical"===t){var c=void 0;if(l<0)c=359;else if(l>o)c=0;else{c=360*(-100*l/o+100)/100}if(n.h!==c)return{h:c,s:n.s,l:n.l,a:n.a,source:"hsl"}}else{var d=void 0;if(u<0)d=0;else if(u>a)d=359;else{d=360*(100*u/a)/100}if(n.h!==d)return{h:d,s:n.s,l:n.l,a:n.a,source:"hsl"}}return null},L=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function T(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function k(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var x=function(e){function t(){var e,n,r;T(this,t);for(var a=arguments.length,o=Array(a),i=0;i<a;i++)o[i]=arguments[i];return n=r=k(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(o))),r.handleChange=function(e){var t=M(e,r.props.direction,r.props.hsl,r.container);t&&"function"==typeof r.props.onChange&&r.props.onChange(t,e)},r.handleMouseDown=function(e){r.handleChange(e),window.addEventListener("mousemove",r.handleChange),window.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},k(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),L(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"unbindEventListeners",value:function(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var e=this,t=this.props.direction,n=void 0===t?"horizontal":t,r=i()({default:{hue:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius,boxShadow:this.props.shadow},container:{padding:"0 2px",position:"relative",height:"100%",borderRadius:this.props.radius},pointer:{position:"absolute",left:100*this.props.hsl.h/360+"%"},slider:{marginTop:"1px",width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",transform:"translateX(-2px)"}},vertical:{pointer:{left:"0px",top:-100*this.props.hsl.h/360+100+"%"}}},{vertical:"vertical"===n});return a.a.createElement("div",{style:r.hue},a.a.createElement("div",{className:"hue-"+n,style:r.container,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},a.a.createElement("style",null,"\n .hue-horizontal {\n background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0\n 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n background: -webkit-linear-gradient(to right, #f00 0%, #ff0\n 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n }\n\n .hue-vertical {\n background: linear-gradient(to top, #f00 0%, #ff0 17%, #0f0 33%,\n #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n background: -webkit-linear-gradient(to top, #f00 0%, #ff0 17%,\n #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n }\n "),a.a.createElement("div",{style:r.pointer},this.props.pointer?a.a.createElement(this.props.pointer,this.props):a.a.createElement("div",{style:r.slider}))))}}]),t}(r.PureComponent||r.Component),E=n(2),S=n.n(E);var O=function(){this.__data__=[],this.size=0};var D=function(e,t){return e===t||e!=e&&t!=t};var Y=function(e,t){for(var n=e.length;n--;)if(D(e[n][0],t))return n;return-1},A=Array.prototype.splice;var C=function(e){var t=this.__data__,n=Y(t,e);return!(n<0)&&(n==t.length-1?t.pop():A.call(t,n,1),--this.size,!0)};var j=function(e){var t=this.__data__,n=Y(t,e);return n<0?void 0:t[n][1]};var P=function(e){return Y(this.__data__,e)>-1};var H=function(e,t){var n=this.__data__,r=Y(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function I(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}I.prototype.clear=O,I.prototype.delete=C,I.prototype.get=j,I.prototype.has=P,I.prototype.set=H;var N=I;var R=function(){this.__data__=new N,this.size=0};var F=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n};var z=function(e){return this.__data__.get(e)};var U=function(e){return this.__data__.has(e)},W=n(6),B=W.a.Symbol,V=Object.prototype,G=V.hasOwnProperty,q=V.toString,J=B?B.toStringTag:void 0;var K=function(e){var t=G.call(e,J),n=e[J];try{e[J]=void 0;var r=!0}catch(e){}var a=q.call(e);return r&&(t?e[J]=n:delete e[J]),a},$=Object.prototype.toString;var X=function(e){return $.call(e)},Z=B?B.toStringTag:void 0;var Q=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Z&&Z in Object(e)?K(e):X(e)};var ee=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};var te,ne=function(e){if(!ee(e))return!1;var t=Q(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},re=W.a["__core-js_shared__"],ae=(te=/[^.]+$/.exec(re&&re.keys&&re.keys.IE_PROTO||""))?"Symbol(src)_1."+te:"";var oe=function(e){return!!ae&&ae in e},ie=Function.prototype.toString;var se=function(e){if(null!=e){try{return ie.call(e)}catch(e){}try{return e+""}catch(e){}}return""},ue=/^\[object .+?Constructor\]$/,le=Function.prototype,ce=Object.prototype,de=le.toString,pe=ce.hasOwnProperty,fe=RegExp("^"+de.call(pe).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var he=function(e){return!(!ee(e)||oe(e))&&(ne(e)?fe:ue).test(se(e))};var me=function(e,t){return null==e?void 0:e[t]};var _e=function(e,t){var n=me(e,t);return he(n)?n:void 0},ye=_e(W.a,"Map"),ge=_e(Object,"create");var ve=function(){this.__data__=ge?ge(null):{},this.size=0};var be=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},we=Object.prototype.hasOwnProperty;var Me=function(e){var t=this.__data__;if(ge){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return we.call(t,e)?t[e]:void 0},Le=Object.prototype.hasOwnProperty;var Te=function(e){var t=this.__data__;return ge?void 0!==t[e]:Le.call(t,e)};var ke=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ge&&void 0===t?"__lodash_hash_undefined__":t,this};function xe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}xe.prototype.clear=ve,xe.prototype.delete=be,xe.prototype.get=Me,xe.prototype.has=Te,xe.prototype.set=ke;var Ee=xe;var Se=function(){this.size=0,this.__data__={hash:new Ee,map:new(ye||N),string:new Ee}};var Oe=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var De=function(e,t){var n=e.__data__;return Oe(t)?n["string"==typeof t?"string":"hash"]:n.map};var Ye=function(e){var t=De(this,e).delete(e);return this.size-=t?1:0,t};var Ae=function(e){return De(this,e).get(e)};var Ce=function(e){return De(this,e).has(e)};var je=function(e,t){var n=De(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function Pe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Pe.prototype.clear=Se,Pe.prototype.delete=Ye,Pe.prototype.get=Ae,Pe.prototype.has=Ce,Pe.prototype.set=je;var He=Pe;var Ie=function(e,t){var n=this.__data__;if(n instanceof N){var r=n.__data__;if(!ye||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new He(r)}return n.set(e,t),this.size=n.size,this};function Ne(e){var t=this.__data__=new N(e);this.size=t.size}Ne.prototype.clear=R,Ne.prototype.delete=F,Ne.prototype.get=z,Ne.prototype.has=U,Ne.prototype.set=Ie;var Re=Ne,Fe=function(){try{var e=_e(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();var ze=function(e,t,n){"__proto__"==t&&Fe?Fe(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n};var Ue=function(e,t,n){(void 0!==n&&!D(e[t],n)||void 0===n&&!(t in e))&&ze(e,t,n)};var We=function(e){return function(t,n,r){for(var a=-1,o=Object(t),i=r(t),s=i.length;s--;){var u=i[e?s:++a];if(!1===n(o[u],u,o))break}return t}}(),Be=n(275),Ve=W.a.Uint8Array;var Ge=function(e){var t=new e.constructor(e.byteLength);return new Ve(t).set(new Ve(e)),t};var qe=function(e,t){var n=t?Ge(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)};var Je=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t},Ke=Object.create,$e=function(){function e(){}return function(t){if(!ee(t))return{};if(Ke)return Ke(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();var Xe=function(e,t){return function(n){return e(t(n))}},Ze=Xe(Object.getPrototypeOf,Object),Qe=Object.prototype;var et=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Qe)};var tt=function(e){return"function"!=typeof e.constructor||et(e)?{}:$e(Ze(e))};var nt=function(e){return null!=e&&"object"==typeof e};var rt=function(e){return nt(e)&&"[object Arguments]"==Q(e)},at=Object.prototype,ot=at.hasOwnProperty,it=at.propertyIsEnumerable,st=rt(function(){return arguments}())?rt:function(e){return nt(e)&&ot.call(e,"callee")&&!it.call(e,"callee")},ut=Array.isArray;var lt=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var ct=function(e){return null!=e&&lt(e.length)&&!ne(e)};var dt=function(e){return nt(e)&&ct(e)},pt=n(20),ft=Function.prototype,ht=Object.prototype,mt=ft.toString,_t=ht.hasOwnProperty,yt=mt.call(Object);var gt=function(e){if(!nt(e)||"[object Object]"!=Q(e))return!1;var t=Ze(e);if(null===t)return!0;var n=_t.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&mt.call(n)==yt},vt={};vt["[object Float32Array]"]=vt["[object Float64Array]"]=vt["[object Int8Array]"]=vt["[object Int16Array]"]=vt["[object Int32Array]"]=vt["[object Uint8Array]"]=vt["[object Uint8ClampedArray]"]=vt["[object Uint16Array]"]=vt["[object Uint32Array]"]=!0,vt["[object Arguments]"]=vt["[object Array]"]=vt["[object ArrayBuffer]"]=vt["[object Boolean]"]=vt["[object DataView]"]=vt["[object Date]"]=vt["[object Error]"]=vt["[object Function]"]=vt["[object Map]"]=vt["[object Number]"]=vt["[object Object]"]=vt["[object RegExp]"]=vt["[object Set]"]=vt["[object String]"]=vt["[object WeakMap]"]=!1;var bt=function(e){return nt(e)&&lt(e.length)&&!!vt[Q(e)]};var wt=function(e){return function(t){return e(t)}},Mt=n(89),Lt=Mt.a&&Mt.a.isTypedArray,Tt=Lt?wt(Lt):bt;var kt=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]},xt=Object.prototype.hasOwnProperty;var Et=function(e,t,n){var r=e[t];xt.call(e,t)&&D(r,n)&&(void 0!==n||t in e)||ze(e,t,n)};var St=function(e,t,n,r){var a=!n;n||(n={});for(var o=-1,i=t.length;++o<i;){var s=t[o],u=r?r(n[s],e[s],s,n,e):void 0;void 0===u&&(u=e[s]),a?ze(n,s,u):Et(n,s,u)}return n};var Ot=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r},Dt=/^(?:0|[1-9]\d*)$/;var Yt=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&Dt.test(e))&&e>-1&&e%1==0&&e<t},At=Object.prototype.hasOwnProperty;var Ct=function(e,t){var n=ut(e),r=!n&&st(e),a=!n&&!r&&Object(pt.a)(e),o=!n&&!r&&!a&&Tt(e),i=n||r||a||o,s=i?Ot(e.length,String):[],u=s.length;for(var l in e)!t&&!At.call(e,l)||i&&("length"==l||a&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Yt(l,u))||s.push(l);return s};var jt=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t},Pt=Object.prototype.hasOwnProperty;var Ht=function(e){if(!ee(e))return jt(e);var t=et(e),n=[];for(var r in e)("constructor"!=r||!t&&Pt.call(e,r))&&n.push(r);return n};var It=function(e){return ct(e)?Ct(e,!0):Ht(e)};var Nt=function(e){return St(e,It(e))};var Rt=function(e,t,n,r,a,o,i){var s=kt(e,n),u=kt(t,n),l=i.get(u);if(l)Ue(e,n,l);else{var c=o?o(s,u,n+"",e,t,i):void 0,d=void 0===c;if(d){var p=ut(u),f=!p&&Object(pt.a)(u),h=!p&&!f&&Tt(u);c=u,p||f||h?ut(s)?c=s:dt(s)?c=Je(s):f?(d=!1,c=Object(Be.a)(u,!0)):h?(d=!1,c=qe(u,!0)):c=[]:gt(u)||st(u)?(c=s,st(s)?c=Nt(s):ee(s)&&!ne(s)||(c=tt(u))):d=!1}d&&(i.set(u,c),a(c,u,r,o,i),i.delete(u)),Ue(e,n,c)}};var Ft=function e(t,n,r,a,o){t!==n&&We(n,(function(i,s){if(o||(o=new Re),ee(i))Rt(t,n,s,r,e,a,o);else{var u=a?a(kt(t,s),i,s+"",t,n,o):void 0;void 0===u&&(u=i),Ue(t,s,u)}}),It)};var zt=function(e){return e};var Ut=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)},Wt=Math.max;var Bt=function(e,t,n){return t=Wt(void 0===t?e.length-1:t,0),function(){for(var r=arguments,a=-1,o=Wt(r.length-t,0),i=Array(o);++a<o;)i[a]=r[t+a];a=-1;for(var s=Array(t+1);++a<t;)s[a]=r[a];return s[t]=n(i),Ut(e,this,s)}};var Vt=function(e){return function(){return e}},Gt=Fe?function(e,t){return Fe(e,"toString",{configurable:!0,enumerable:!1,value:Vt(t),writable:!0})}:zt,qt=Date.now;var Jt=function(e){var t=0,n=0;return function(){var r=qt(),a=16-(r-n);if(n=r,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(Gt);var Kt=function(e,t){return Jt(Bt(e,t,zt),e+"")};var $t=function(e,t,n){if(!ee(n))return!1;var r=typeof t;return!!("number"==r?ct(n)&&Yt(t,n.length):"string"==r&&t in n)&&D(n[t],e)};var Xt=function(e){return Kt((function(t,n){var r=-1,a=n.length,o=a>1?n[a-1]:void 0,i=a>2?n[2]:void 0;for(o=e.length>3&&"function"==typeof o?(a--,o):void 0,i&&$t(n[0],n[1],i)&&(o=a<3?void 0:o,a=1),t=Object(t);++r<a;){var s=n[r];s&&e(t,s,r,o)}return t}))}((function(e,t,n){Ft(e,t,n)})),Zt=function(e){var t=e.zDepth,n=e.radius,r=e.background,o=e.children,s=e.styles,u=void 0===s?{}:s,l=i()(Xt({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+t+"px "+4*t+"px rgba(0,0,0,.24)",borderRadius:n,background:r}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},u),{"zDepth-1":1===t});return a.a.createElement("div",{style:l.wrap},a.a.createElement("div",{style:l.bg}),a.a.createElement("div",{style:l.content},o))};Zt.propTypes={background:S.a.string,zDepth:S.a.oneOf([0,1,2,3,4,5]),radius:S.a.number,styles:S.a.object},Zt.defaultProps={background:"#fff",zDepth:1,radius:2,styles:{}};var Qt=Zt,en=function(){return W.a.Date.now()},tn=/\s/;var nn=function(e){for(var t=e.length;t--&&tn.test(e.charAt(t)););return t},rn=/^\s+/;var an=function(e){return e?e.slice(0,nn(e)+1).replace(rn,""):e};var on=function(e){return"symbol"==typeof e||nt(e)&&"[object Symbol]"==Q(e)},sn=/^[-+]0x[0-9a-f]+$/i,un=/^0b[01]+$/i,ln=/^0o[0-7]+$/i,cn=parseInt;var dn=function(e){if("number"==typeof e)return e;if(on(e))return NaN;if(ee(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ee(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=an(e);var n=un.test(e);return n||ln.test(e)?cn(e.slice(2),n?2:8):sn.test(e)?NaN:+e},pn=Math.max,fn=Math.min;var hn=function(e,t,n){var r,a,o,i,s,u,l=0,c=!1,d=!1,p=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function f(t){var n=r,o=a;return r=a=void 0,l=t,i=e.apply(o,n)}function h(e){return l=e,s=setTimeout(_,t),c?f(e):i}function m(e){var n=e-u;return void 0===u||n>=t||n<0||d&&e-l>=o}function _(){var e=en();if(m(e))return y(e);s=setTimeout(_,function(e){var n=t-(e-u);return d?fn(n,o-(e-l)):n}(e))}function y(e){return s=void 0,p&&r?f(e):(r=a=void 0,i)}function g(){var e=en(),n=m(e);if(r=arguments,a=this,u=e,n){if(void 0===s)return h(u);if(d)return clearTimeout(s),s=setTimeout(_,t),f(u)}return void 0===s&&(s=setTimeout(_,t)),i}return t=dn(t)||0,ee(n)&&(c=!!n.leading,o=(d="maxWait"in n)?pn(dn(n.maxWait)||0,t):o,p="trailing"in n?!!n.trailing:p),g.cancel=function(){void 0!==s&&clearTimeout(s),l=0,r=u=a=s=void 0},g.flush=function(){return void 0===s?i:y(en())},g};var mn=function(e,t,n){var r=!0,a=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return ee(n)&&(r="leading"in n?!!n.leading:r,a="trailing"in n?!!n.trailing:a),hn(e,t,{leading:r,maxWait:t,trailing:a})},_n=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var yn=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleChange=function(e){"function"==typeof n.props.onChange&&n.throttle(n.props.onChange,function(e,t,n){var r=n.getBoundingClientRect(),a=r.width,o=r.height,i="number"==typeof e.pageX?e.pageX:e.touches[0].pageX,s="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,u=i-(n.getBoundingClientRect().left+window.pageXOffset),l=s-(n.getBoundingClientRect().top+window.pageYOffset);u<0?u=0:u>a&&(u=a),l<0?l=0:l>o&&(l=o);var c=u/a,d=1-l/o;return{h:t.h,s:c,v:d,a:t.a,source:"hsv"}}(e,n.props.hsl,n.container),e)},n.handleMouseDown=function(e){n.handleChange(e);var t=n.getContainerRenderWindow();t.addEventListener("mousemove",n.handleChange),t.addEventListener("mouseup",n.handleMouseUp)},n.handleMouseUp=function(){n.unbindEventListeners()},n.throttle=mn((function(e,t,n){e(t,n)}),50),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),_n(t,[{key:"componentWillUnmount",value:function(){this.throttle.cancel(),this.unbindEventListeners()}},{key:"getContainerRenderWindow",value:function(){for(var e=this.container,t=window;!t.document.contains(e)&&t.parent!==t;)t=t.parent;return t}},{key:"unbindEventListeners",value:function(){var e=this.getContainerRenderWindow();e.removeEventListener("mousemove",this.handleChange),e.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var e=this,t=this.props.style||{},n=t.color,r=t.white,o=t.black,s=t.pointer,u=t.circle,l=i()({default:{color:{absolute:"0px 0px 0px 0px",background:"hsl("+this.props.hsl.h+",100%, 50%)",borderRadius:this.props.radius},white:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},black:{absolute:"0px 0px 0px 0px",boxShadow:this.props.shadow,borderRadius:this.props.radius},pointer:{position:"absolute",top:-100*this.props.hsv.v+100+"%",left:100*this.props.hsv.s+"%",cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:"0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),\n 0 0 1px 2px rgba(0,0,0,.4)",borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}},custom:{color:n,white:r,black:o,pointer:s,circle:u}},{custom:!!this.props.style});return a.a.createElement("div",{style:l.color,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},a.a.createElement("style",null,"\n .saturation-white {\n background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));\n background: linear-gradient(to right, #fff, rgba(255,255,255,0));\n }\n .saturation-black {\n background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));\n background: linear-gradient(to top, #000, rgba(0,0,0,0));\n }\n "),a.a.createElement("div",{style:l.white,className:"saturation-white"},a.a.createElement("div",{style:l.black,className:"saturation-black"}),a.a.createElement("div",{style:l.pointer},this.props.pointer?a.a.createElement(this.props.pointer,this.props):a.a.createElement("div",{style:l.circle}))))}}]),t}(r.PureComponent||r.Component);var gn=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e},vn=Xe(Object.keys,Object),bn=Object.prototype.hasOwnProperty;var wn=function(e){if(!et(e))return vn(e);var t=[];for(var n in Object(e))bn.call(e,n)&&"constructor"!=n&&t.push(n);return t};var Mn=function(e){return ct(e)?Ct(e):wn(e)};var Ln=function(e,t){return function(n,r){if(null==n)return n;if(!ct(n))return e(n,r);for(var a=n.length,o=t?a:-1,i=Object(n);(t?o--:++o<a)&&!1!==r(i[o],o,i););return n}}((function(e,t){return e&&We(e,t,Mn)}));var Tn=function(e){return"function"==typeof e?e:zt};var kn=function(e,t){return(ut(e)?gn:Ln)(e,Tn(t))},xn=n(36),En=n.n(xn),Sn=function(e){var t=0,n=0;return kn(["r","g","b","a","h","s","l","v"],(function(r){if(e[r]&&(t+=1,isNaN(e[r])||(n+=1),"s"===r||"l"===r)){/^\d+%$/.test(e[r])&&(n+=1)}})),t===n&&e},On=function(e,t){var n=e.hex?En()(e.hex):En()(e),r=n.toHsl(),a=n.toHsv(),o=n.toRgb(),i=n.toHex();return 0===r.s&&(r.h=t||0,a.h=t||0),{hsl:r,hex:"000000"===i&&0===o.a?"transparent":"#"+i,rgb:o,hsv:a,oldHue:e.h||t||r.h,source:e.source}},Dn=function(e){if("transparent"===e)return!0;var t="#"===String(e).charAt(0)?1:0;return e.length!==4+t&&e.length<7+t&&En()(e).isValid()},Yn=function(e){if(!e)return"#fff";var t=On(e);return"transparent"===t.hex?"rgba(0,0,0,0.4)":(299*t.rgb.r+587*t.rgb.g+114*t.rgb.b)/1e3>=128?"#000":"#fff"},An=function(e,t){var n=e.replace("°","");return En()(t+" ("+n+")")._ok},Cn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jn=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var Pn=function(e){var t=function(t){function n(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return t.handleChange=function(e,n){if(Sn(e)){var r=On(e,e.h||t.state.oldHue);t.setState(r),t.props.onChangeComplete&&t.debounce(t.props.onChangeComplete,r,n),t.props.onChange&&t.props.onChange(r,n)}},t.handleSwatchHover=function(e,n){if(Sn(e)){var r=On(e,e.h||t.state.oldHue);t.props.onSwatchHover&&t.props.onSwatchHover(r,n)}},t.state=Cn({},On(e.color,0)),t.debounce=hn((function(e,t,n){e(t,n)}),100),t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,t),jn(n,[{key:"render",value:function(){var t={};return this.props.onSwatchHover&&(t.onSwatchHover=this.handleSwatchHover),a.a.createElement(e,Cn({},this.props,this.state,{onChange:this.handleChange},t))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return Cn({},On(e.color,t.oldHue))}}]),n}(r.PureComponent||r.Component);return t.propTypes=Cn({},e.propTypes),t.defaultProps=Cn({},e.defaultProps,{color:{h:250,s:.5,l:.2,a:1}}),t},Hn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},In=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function Nn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Rn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function Fn(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var zn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Un=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var e,t,n;Nn(this,r);for(var a=arguments.length,o=Array(a),i=0;i<a;i++)o[i]=arguments[i];return t=n=Rn(this,(e=r.__proto__||Object.getPrototypeOf(r)).call.apply(e,[this].concat(o))),n.state={focus:!1},n.handleFocus=function(){return n.setState({focus:!0})},n.handleBlur=function(){return n.setState({focus:!1})},Rn(n,t)}return Fn(r,n),In(r,[{key:"render",value:function(){return a.a.createElement(t,{onFocus:this.handleFocus,onBlur:this.handleBlur},a.a.createElement(e,Hn({},this.props,this.state)))}}]),r}(a.a.Component)}((function(e){var t=e.color,n=e.style,r=e.onClick,o=void 0===r?function(){}:r,s=e.onHover,u=e.title,l=void 0===u?t:u,c=e.children,d=e.focus,f=e.focusStyle,h=void 0===f?{}:f,m="transparent"===t,_=i()({default:{swatch:zn({background:t,height:"100%",width:"100%",cursor:"pointer",position:"relative",outline:"none"},n,d?h:{})}}),y={};return s&&(y.onMouseOver=function(e){return s(t,e)}),a.a.createElement("div",zn({style:_.swatch,onClick:function(e){return o(t,e)},title:l,tabIndex:0,onKeyDown:function(e){return 13===e.keyCode&&o(t,e)}},y),c,m&&a.a.createElement(p,{borderRadius:_.swatch.borderRadius,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.1)"}))})),Wn=function(e){var t=e.direction,n=i()({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:"vertical"===t});return a.a.createElement("div",{style:n.picker})},Bn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vn=function(e){var t=e.rgb,n=e.hsl,r=e.width,o=e.height,s=e.onChange,u=e.direction,l=e.style,c=e.renderers,d=e.pointer,p=e.className,f=void 0===p?"":p,h=i()({default:{picker:{position:"relative",width:r,height:o},alpha:{radius:"2px",style:l}}});return a.a.createElement("div",{style:h.picker,className:"alpha-picker "+f},a.a.createElement(y,Bn({},h.alpha,{rgb:t,hsl:n,pointer:d,renderers:c,onChange:s,direction:u})))};Vn.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:Wn};var Gn=Pn(Vn);var qn=function(e,t){for(var n=-1,r=null==e?0:e.length,a=Array(r);++n<r;)a[n]=t(e[n],n,e);return a};var Jn=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};var Kn=function(e){return this.__data__.has(e)};function $n(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new He;++t<n;)this.add(e[t])}$n.prototype.add=$n.prototype.push=Jn,$n.prototype.has=Kn;var Xn=$n;var Zn=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1};var Qn=function(e,t){return e.has(t)};var er=function(e,t,n,r,a,o){var i=1&n,s=e.length,u=t.length;if(s!=u&&!(i&&u>s))return!1;var l=o.get(e),c=o.get(t);if(l&&c)return l==t&&c==e;var d=-1,p=!0,f=2&n?new Xn:void 0;for(o.set(e,t),o.set(t,e);++d<s;){var h=e[d],m=t[d];if(r)var _=i?r(m,h,d,t,e,o):r(h,m,d,e,t,o);if(void 0!==_){if(_)continue;p=!1;break}if(f){if(!Zn(t,(function(e,t){if(!Qn(f,t)&&(h===e||a(h,e,n,r,o)))return f.push(t)}))){p=!1;break}}else if(h!==m&&!a(h,m,n,r,o)){p=!1;break}}return o.delete(e),o.delete(t),p};var tr=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n};var nr=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},rr=B?B.prototype:void 0,ar=rr?rr.valueOf:void 0;var or=function(e,t,n,r,a,o,i){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!o(new Ve(e),new Ve(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return D(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=tr;case"[object Set]":var u=1&r;if(s||(s=nr),e.size!=t.size&&!u)return!1;var l=i.get(e);if(l)return l==t;r|=2,i.set(e,t);var c=er(s(e),s(t),r,a,o,i);return i.delete(e),c;case"[object Symbol]":if(ar)return ar.call(e)==ar.call(t)}return!1};var ir=function(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e};var sr=function(e,t,n){var r=t(e);return ut(e)?r:ir(r,n(e))};var ur=function(e,t){for(var n=-1,r=null==e?0:e.length,a=0,o=[];++n<r;){var i=e[n];t(i,n,e)&&(o[a++]=i)}return o};var lr=function(){return[]},cr=Object.prototype.propertyIsEnumerable,dr=Object.getOwnPropertySymbols,pr=dr?function(e){return null==e?[]:(e=Object(e),ur(dr(e),(function(t){return cr.call(e,t)})))}:lr;var fr=function(e){return sr(e,Mn,pr)},hr=Object.prototype.hasOwnProperty;var mr=function(e,t,n,r,a,o){var i=1&n,s=fr(e),u=s.length;if(u!=fr(t).length&&!i)return!1;for(var l=u;l--;){var c=s[l];if(!(i?c in t:hr.call(t,c)))return!1}var d=o.get(e),p=o.get(t);if(d&&p)return d==t&&p==e;var f=!0;o.set(e,t),o.set(t,e);for(var h=i;++l<u;){var m=e[c=s[l]],_=t[c];if(r)var y=i?r(_,m,c,t,e,o):r(m,_,c,e,t,o);if(!(void 0===y?m===_||a(m,_,n,r,o):y)){f=!1;break}h||(h="constructor"==c)}if(f&&!h){var g=e.constructor,v=t.constructor;g==v||!("constructor"in e)||!("constructor"in t)||"function"==typeof g&&g instanceof g&&"function"==typeof v&&v instanceof v||(f=!1)}return o.delete(e),o.delete(t),f},_r=_e(W.a,"DataView"),yr=_e(W.a,"Promise"),gr=_e(W.a,"Set"),vr=_e(W.a,"WeakMap"),br=se(_r),wr=se(ye),Mr=se(yr),Lr=se(gr),Tr=se(vr),kr=Q;(_r&&"[object DataView]"!=kr(new _r(new ArrayBuffer(1)))||ye&&"[object Map]"!=kr(new ye)||yr&&"[object Promise]"!=kr(yr.resolve())||gr&&"[object Set]"!=kr(new gr)||vr&&"[object WeakMap]"!=kr(new vr))&&(kr=function(e){var t=Q(e),n="[object Object]"==t?e.constructor:void 0,r=n?se(n):"";if(r)switch(r){case br:return"[object DataView]";case wr:return"[object Map]";case Mr:return"[object Promise]";case Lr:return"[object Set]";case Tr:return"[object WeakMap]"}return t});var xr=kr,Er=Object.prototype.hasOwnProperty;var Sr=function(e,t,n,r,a,o){var i=ut(e),s=ut(t),u=i?"[object Array]":xr(e),l=s?"[object Array]":xr(t),c="[object Object]"==(u="[object Arguments]"==u?"[object Object]":u),d="[object Object]"==(l="[object Arguments]"==l?"[object Object]":l),p=u==l;if(p&&Object(pt.a)(e)){if(!Object(pt.a)(t))return!1;i=!0,c=!1}if(p&&!c)return o||(o=new Re),i||Tt(e)?er(e,t,n,r,a,o):or(e,t,u,n,r,a,o);if(!(1&n)){var f=c&&Er.call(e,"__wrapped__"),h=d&&Er.call(t,"__wrapped__");if(f||h){var m=f?e.value():e,_=h?t.value():t;return o||(o=new Re),a(m,_,n,r,o)}}return!!p&&(o||(o=new Re),mr(e,t,n,r,a,o))};var Or=function e(t,n,r,a,o){return t===n||(null==t||null==n||!nt(t)&&!nt(n)?t!=t&&n!=n:Sr(t,n,r,a,e,o))};var Dr=function(e,t,n,r){var a=n.length,o=a,i=!r;if(null==e)return!o;for(e=Object(e);a--;){var s=n[a];if(i&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++a<o;){var u=(s=n[a])[0],l=e[u],c=s[1];if(i&&s[2]){if(void 0===l&&!(u in e))return!1}else{var d=new Re;if(r)var p=r(l,c,u,e,t,d);if(!(void 0===p?Or(c,l,3,r,d):p))return!1}}return!0};var Yr=function(e){return e==e&&!ee(e)};var Ar=function(e){for(var t=Mn(e),n=t.length;n--;){var r=t[n],a=e[r];t[n]=[r,a,Yr(a)]}return t};var Cr=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}};var jr=function(e){var t=Ar(e);return 1==t.length&&t[0][2]?Cr(t[0][0],t[0][1]):function(n){return n===e||Dr(n,e,t)}},Pr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Hr=/^\w*$/;var Ir=function(e,t){if(ut(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!on(e))||(Hr.test(e)||!Pr.test(e)||null!=t&&e in Object(t))};function Nr(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],o=n.cache;if(o.has(a))return o.get(a);var i=e.apply(this,r);return n.cache=o.set(a,i)||o,i};return n.cache=new(Nr.Cache||He),n}Nr.Cache=He;var Rr=Nr;var Fr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,zr=/\\(\\)?/g,Ur=function(e){var t=Rr(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Fr,(function(e,n,r,a){t.push(r?a.replace(zr,"$1"):n||e)})),t})),Wr=B?B.prototype:void 0,Br=Wr?Wr.toString:void 0;var Vr=function e(t){if("string"==typeof t)return t;if(ut(t))return qn(t,e)+"";if(on(t))return Br?Br.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n};var Gr=function(e){return null==e?"":Vr(e)};var qr=function(e,t){return ut(e)?e:Ir(e,t)?[e]:Ur(Gr(e))};var Jr=function(e){if("string"==typeof e||on(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t};var Kr=function(e,t){for(var n=0,r=(t=qr(t,e)).length;null!=e&&n<r;)e=e[Jr(t[n++])];return n&&n==r?e:void 0};var $r=function(e,t,n){var r=null==e?void 0:Kr(e,t);return void 0===r?n:r};var Xr=function(e,t){return null!=e&&t in Object(e)};var Zr=function(e,t,n){for(var r=-1,a=(t=qr(t,e)).length,o=!1;++r<a;){var i=Jr(t[r]);if(!(o=null!=e&&n(e,i)))break;e=e[i]}return o||++r!=a?o:!!(a=null==e?0:e.length)&&lt(a)&&Yt(i,a)&&(ut(e)||st(e))};var Qr=function(e,t){return null!=e&&Zr(e,t,Xr)};var ea=function(e,t){return Ir(e)&&Yr(t)?Cr(Jr(e),t):function(n){var r=$r(n,e);return void 0===r&&r===t?Qr(n,e):Or(t,r,3)}};var ta=function(e){return function(t){return null==t?void 0:t[e]}};var na=function(e){return function(t){return Kr(t,e)}};var ra=function(e){return Ir(e)?ta(Jr(e)):na(e)};var aa=function(e){return"function"==typeof e?e:null==e?zt:"object"==typeof e?ut(e)?ea(e[0],e[1]):jr(e):ra(e)};var oa=function(e,t){var n=-1,r=ct(e)?Array(e.length):[];return Ln(e,(function(e,a,o){r[++n]=t(e,a,o)})),r};var ia=function(e,t){return(ut(e)?qn:oa)(e,aa(t,3))},sa=function(e){var t=e.colors,n=e.onClick,r=e.onSwatchHover,o=i()({default:{swatches:{marginRight:"-10px"},swatch:{width:"22px",height:"22px",float:"left",marginRight:"10px",marginBottom:"10px",borderRadius:"4px"},clear:{clear:"both"}}});return a.a.createElement("div",{style:o.swatches},ia(t,(function(e){return a.a.createElement(Un,{key:e,color:e,style:o.swatch,onClick:n,onHover:r,focusStyle:{boxShadow:"0 0 4px "+e}})})),a.a.createElement("div",{style:o.clear}))},ua=function(e){var t=e.onChange,n=e.onSwatchHover,r=e.hex,o=e.colors,s=e.width,u=e.triangle,l=e.styles,c=void 0===l?{}:l,d=e.className,f=void 0===d?"":d,h="transparent"===r,m=function(e,n){Dn(e)&&t({hex:e,source:"hex"},n)},_=i()(Xt({default:{card:{width:s,background:"#fff",boxShadow:"0 1px rgba(0,0,0,.1)",borderRadius:"6px",position:"relative"},head:{height:"110px",background:r,borderRadius:"6px 6px 0 0",display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},body:{padding:"10px"},label:{fontSize:"18px",color:Yn(r),position:"relative"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 10px 10px 10px",borderColor:"transparent transparent "+r+" transparent",position:"absolute",top:"-10px",left:"50%",marginLeft:"-10px"},input:{width:"100%",fontSize:"12px",color:"#666",border:"0px",outline:"none",height:"22px",boxShadow:"inset 0 0 0 1px #ddd",borderRadius:"4px",padding:"0 7px",boxSizing:"border-box"}},"hide-triangle":{triangle:{display:"none"}}},c),{"hide-triangle":"hide"===u});return a.a.createElement("div",{style:_.card,className:"block-picker "+f},a.a.createElement("div",{style:_.triangle}),a.a.createElement("div",{style:_.head},h&&a.a.createElement(p,{borderRadius:"6px 6px 0 0"}),a.a.createElement("div",{style:_.label},r)),a.a.createElement("div",{style:_.body},a.a.createElement(sa,{colors:o,onClick:m,onSwatchHover:n}),a.a.createElement(w,{style:{input:_.input},value:r,onChange:m})))};ua.propTypes={width:S.a.oneOfType([S.a.string,S.a.number]),colors:S.a.arrayOf(S.a.string),triangle:S.a.oneOf(["top","hide"]),styles:S.a.object},ua.defaultProps={width:170,colors:["#D9E3F0","#F47373","#697689","#37D67A","#2CCCE4","#555555","#dce775","#ff8a65","#ba68c8"],triangle:"top",styles:{}};var la=Pn(ua),ca={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",a100:"#ff8a80",a200:"#ff5252",a400:"#ff1744",a700:"#d50000"},da={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",a100:"#ff80ab",a200:"#ff4081",a400:"#f50057",a700:"#c51162"},pa={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",a100:"#ea80fc",a200:"#e040fb",a400:"#d500f9",a700:"#aa00ff"},fa={50:"#ede7f6",100:"#d1c4e9",200:"#b39ddb",300:"#9575cd",400:"#7e57c2",500:"#673ab7",600:"#5e35b1",700:"#512da8",800:"#4527a0",900:"#311b92",a100:"#b388ff",a200:"#7c4dff",a400:"#651fff",a700:"#6200ea"},ha={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",a100:"#8c9eff",a200:"#536dfe",a400:"#3d5afe",a700:"#304ffe"},ma={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",a100:"#82b1ff",a200:"#448aff",a400:"#2979ff",a700:"#2962ff"},_a={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",a100:"#80d8ff",a200:"#40c4ff",a400:"#00b0ff",a700:"#0091ea"},ya={50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064",a100:"#84ffff",a200:"#18ffff",a400:"#00e5ff",a700:"#00b8d4"},ga={50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",a100:"#a7ffeb",a200:"#64ffda",a400:"#1de9b6",a700:"#00bfa5"},va={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",a100:"#b9f6ca",a200:"#69f0ae",a400:"#00e676",a700:"#00c853"},ba={50:"#f1f8e9",100:"#dcedc8",200:"#c5e1a5",300:"#aed581",400:"#9ccc65",500:"#8bc34a",600:"#7cb342",700:"#689f38",800:"#558b2f",900:"#33691e",a100:"#ccff90",a200:"#b2ff59",a400:"#76ff03",a700:"#64dd17"},wa={50:"#f9fbe7",100:"#f0f4c3",200:"#e6ee9c",300:"#dce775",400:"#d4e157",500:"#cddc39",600:"#c0ca33",700:"#afb42b",800:"#9e9d24",900:"#827717",a100:"#f4ff81",a200:"#eeff41",a400:"#c6ff00",a700:"#aeea00"},Ma={50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",a100:"#ffff8d",a200:"#ffff00",a400:"#ffea00",a700:"#ffd600"},La={50:"#fff8e1",100:"#ffecb3",200:"#ffe082",300:"#ffd54f",400:"#ffca28",500:"#ffc107",600:"#ffb300",700:"#ffa000",800:"#ff8f00",900:"#ff6f00",a100:"#ffe57f",a200:"#ffd740",a400:"#ffc400",a700:"#ffab00"},Ta={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",a100:"#ffd180",a200:"#ffab40",a400:"#ff9100",a700:"#ff6d00"},ka={50:"#fbe9e7",100:"#ffccbc",200:"#ffab91",300:"#ff8a65",400:"#ff7043",500:"#ff5722",600:"#f4511e",700:"#e64a19",800:"#d84315",900:"#bf360c",a100:"#ff9e80",a200:"#ff6e40",a400:"#ff3d00",a700:"#dd2c00"},xa={50:"#efebe9",100:"#d7ccc8",200:"#bcaaa4",300:"#a1887f",400:"#8d6e63",500:"#795548",600:"#6d4c41",700:"#5d4037",800:"#4e342e",900:"#3e2723"},Ea={50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238"},Sa=function(e){var t=e.color,n=e.onClick,r=e.onSwatchHover,o=e.hover,s=e.active,u=e.circleSize,l=e.circleSpacing,c=i()({default:{swatch:{width:u,height:u,marginRight:l,marginBottom:l,transform:"scale(1)",transition:"100ms transform ease"},Swatch:{borderRadius:"50%",background:"transparent",boxShadow:"inset 0 0 0 "+(u/2+1)+"px "+t,transition:"100ms box-shadow ease"}},hover:{swatch:{transform:"scale(1.2)"}},active:{Swatch:{boxShadow:"inset 0 0 0 3px "+t}}},{hover:o,active:s});return a.a.createElement("div",{style:c.swatch},a.a.createElement(Un,{style:c.Swatch,color:t,onClick:n,onHover:r,focusStyle:{boxShadow:c.Swatch.boxShadow+", 0 0 5px "+t}}))};Sa.defaultProps={circleSize:28,circleSpacing:14};var Oa=Object(o.handleHover)(Sa),Da=function(e){var t=e.width,n=e.onChange,r=e.onSwatchHover,o=e.colors,s=e.hex,u=e.circleSize,l=e.styles,c=void 0===l?{}:l,d=e.circleSpacing,p=e.className,f=void 0===p?"":p,h=i()(Xt({default:{card:{width:t,display:"flex",flexWrap:"wrap",marginRight:-d,marginBottom:-d}}},c)),m=function(e,t){return n({hex:e,source:"hex"},t)};return a.a.createElement("div",{style:h.card,className:"circle-picker "+f},ia(o,(function(e){return a.a.createElement(Oa,{key:e,color:e,onClick:m,onSwatchHover:r,active:s===e.toLowerCase(),circleSize:u,circleSpacing:d})})))};Da.propTypes={width:S.a.oneOfType([S.a.string,S.a.number]),circleSize:S.a.number,circleSpacing:S.a.number,styles:S.a.object},Da.defaultProps={width:252,circleSize:28,circleSpacing:14,colors:[ca[500],da[500],pa[500],fa[500],ha[500],ma[500],_a[500],ya[500],ga[500],va[500],ba[500],wa[500],Ma[500],La[500],Ta[500],ka[500],xa[500],Ea[500]],styles:{}};var Ya=Pn(Da);var Aa=function(e){return void 0===e},Ca=n(276),ja=n.n(Ca),Pa=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var Ha=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.toggleViews=function(){"hex"===n.state.view?n.setState({view:"rgb"}):"rgb"===n.state.view?n.setState({view:"hsl"}):"hsl"===n.state.view&&(1===n.props.hsl.a?n.setState({view:"hex"}):n.setState({view:"rgb"}))},n.handleChange=function(e,t){e.hex?Dn(e.hex)&&n.props.onChange({hex:e.hex,source:"hex"},t):e.r||e.g||e.b?n.props.onChange({r:e.r||n.props.rgb.r,g:e.g||n.props.rgb.g,b:e.b||n.props.rgb.b,source:"rgb"},t):e.a?(e.a<0?e.a=0:e.a>1&&(e.a=1),n.props.onChange({h:n.props.hsl.h,s:n.props.hsl.s,l:n.props.hsl.l,a:Math.round(100*e.a)/100,source:"rgb"},t)):(e.h||e.s||e.l)&&("string"==typeof e.s&&e.s.includes("%")&&(e.s=e.s.replace("%","")),"string"==typeof e.l&&e.l.includes("%")&&(e.l=e.l.replace("%","")),1==e.s?e.s=.01:1==e.l&&(e.l=.01),n.props.onChange({h:e.h||n.props.hsl.h,s:Number(Aa(e.s)?n.props.hsl.s:e.s),l:Number(Aa(e.l)?n.props.hsl.l:e.l),source:"hsl"},t))},n.showHighlight=function(e){e.currentTarget.style.background="#eee"},n.hideHighlight=function(e){e.currentTarget.style.background="transparent"},1!==e.hsl.a&&"hex"===e.view?n.state={view:"rgb"}:n.state={view:e.view},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),Pa(t,[{key:"render",value:function(){var e=this,t=i()({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),n=void 0;return"hex"===this.state.view?n=a.a.createElement("div",{style:t.fields,className:"flexbox-fix"},a.a.createElement("div",{style:t.field},a.a.createElement(w,{style:{input:t.input,label:t.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):"rgb"===this.state.view?n=a.a.createElement("div",{style:t.fields,className:"flexbox-fix"},a.a.createElement("div",{style:t.field},a.a.createElement(w,{style:{input:t.input,label:t.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),a.a.createElement("div",{style:t.field},a.a.createElement(w,{style:{input:t.input,label:t.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),a.a.createElement("div",{style:t.field},a.a.createElement(w,{style:{input:t.input,label:t.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),a.a.createElement("div",{style:t.alpha},a.a.createElement(w,{style:{input:t.input,label:t.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):"hsl"===this.state.view&&(n=a.a.createElement("div",{style:t.fields,className:"flexbox-fix"},a.a.createElement("div",{style:t.field},a.a.createElement(w,{style:{input:t.input,label:t.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),a.a.createElement("div",{style:t.field},a.a.createElement(w,{style:{input:t.input,label:t.label},label:"s",value:Math.round(100*this.props.hsl.s)+"%",onChange:this.handleChange})),a.a.createElement("div",{style:t.field},a.a.createElement(w,{style:{input:t.input,label:t.label},label:"l",value:Math.round(100*this.props.hsl.l)+"%",onChange:this.handleChange})),a.a.createElement("div",{style:t.alpha},a.a.createElement(w,{style:{input:t.input,label:t.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),a.a.createElement("div",{style:t.wrap,className:"flexbox-fix"},n,a.a.createElement("div",{style:t.toggle},a.a.createElement("div",{style:t.icon,onClick:this.toggleViews,ref:function(t){return e.icon=t}},a.a.createElement(ja.a,{style:t.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return 1!==e.hsl.a&&"hex"===t.view?{view:"rgb"}:null}}]),t}(a.a.Component);Ha.defaultProps={view:"hex"};var Ia=Ha,Na=function(){var e=i()({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return a.a.createElement("div",{style:e.picker})},Ra=function(){var e=i()({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return a.a.createElement("div",{style:e.picker})},Fa=function(e){var t=e.width,n=e.onChange,r=e.disableAlpha,o=e.rgb,s=e.hsl,u=e.hsv,l=e.hex,c=e.renderers,d=e.styles,f=void 0===d?{}:d,h=e.className,m=void 0===h?"":h,_=e.defaultView,g=i()(Xt({default:{picker:{width:t,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+o.r+", "+o.g+", "+o.b+", "+o.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},f),{disableAlpha:r});return a.a.createElement("div",{style:g.picker,className:"chrome-picker "+m},a.a.createElement("div",{style:g.saturation},a.a.createElement(yn,{style:g.Saturation,hsl:s,hsv:u,pointer:Ra,onChange:n})),a.a.createElement("div",{style:g.body},a.a.createElement("div",{style:g.controls,className:"flexbox-fix"},a.a.createElement("div",{style:g.color},a.a.createElement("div",{style:g.swatch},a.a.createElement("div",{style:g.active}),a.a.createElement(p,{renderers:c}))),a.a.createElement("div",{style:g.toggles},a.a.createElement("div",{style:g.hue},a.a.createElement(x,{style:g.Hue,hsl:s,pointer:Na,onChange:n})),a.a.createElement("div",{style:g.alpha},a.a.createElement(y,{style:g.Alpha,rgb:o,hsl:s,pointer:Na,renderers:c,onChange:n})))),a.a.createElement(Ia,{rgb:o,hsl:s,hex:l,view:_,onChange:n,disableAlpha:r})))};Fa.propTypes={width:S.a.oneOfType([S.a.string,S.a.number]),disableAlpha:S.a.bool,styles:S.a.object,defaultView:S.a.oneOf(["hex","rgb","hsl"])},Fa.defaultProps={width:225,disableAlpha:!1,styles:{}};var za=Pn(Fa),Ua=function(e){var t=e.color,n=e.onClick,r=void 0===n?function(){}:n,o=e.onSwatchHover,s=e.active,u=i()({default:{color:{background:t,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:Yn(t),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:s,"color-#FFFFFF":"#FFFFFF"===t,transparent:"transparent"===t});return a.a.createElement(Un,{style:u.color,color:t,onClick:r,onHover:o,focusStyle:{boxShadow:"0 0 4px "+t}},a.a.createElement("div",{style:u.dot}))},Wa=function(e){var t=e.hex,n=e.rgb,r=e.onChange,o=i()({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:t},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),s=function(e,t){e.r||e.g||e.b?r({r:e.r||n.r,g:e.g||n.g,b:e.b||n.b,source:"rgb"},t):r({hex:e.hex,source:"hex"},t)};return a.a.createElement("div",{style:o.fields,className:"flexbox-fix"},a.a.createElement("div",{style:o.active}),a.a.createElement(w,{style:{wrap:o.HEXwrap,input:o.HEXinput,label:o.HEXlabel},label:"hex",value:t,onChange:s}),a.a.createElement(w,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"r",value:n.r,onChange:s}),a.a.createElement(w,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"g",value:n.g,onChange:s}),a.a.createElement(w,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"b",value:n.b,onChange:s}))},Ba=function(e){var t=e.onChange,n=e.onSwatchHover,r=e.colors,o=e.hex,s=e.rgb,u=e.styles,l=void 0===u?{}:u,c=e.className,d=void 0===c?"":c,p=i()(Xt({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},l)),f=function(e,n){e.hex?Dn(e.hex)&&t({hex:e.hex,source:"hex"},n):t(e,n)};return a.a.createElement(Qt,{style:p.Compact,styles:l},a.a.createElement("div",{style:p.compact,className:"compact-picker "+d},a.a.createElement("div",null,ia(r,(function(e){return a.a.createElement(Ua,{key:e,color:e,active:e.toLowerCase()===o,onClick:f,onSwatchHover:n})})),a.a.createElement("div",{style:p.clear})),a.a.createElement(Wa,{hex:o,rgb:s,onChange:f})))};Ba.propTypes={colors:S.a.arrayOf(S.a.string),styles:S.a.object},Ba.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}};var Va=Pn(Ba),Ga=Object(o.handleHover)((function(e){var t=e.hover,n=e.color,r=e.onClick,o=e.onSwatchHover,s={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},u=i()({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:s}},{hover:t});return a.a.createElement("div",{style:u.swatch},a.a.createElement(Un,{color:n,onClick:r,onHover:o,focusStyle:s}))})),qa=function(e){var t=e.width,n=e.colors,r=e.onChange,o=e.onSwatchHover,s=e.triangle,u=e.styles,l=void 0===u?{}:u,c=e.className,d=void 0===c?"":c,p=i()(Xt({default:{card:{width:t,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},l),{"hide-triangle":"hide"===s,"top-left-triangle":"top-left"===s,"top-right-triangle":"top-right"===s,"bottom-left-triangle":"bottom-left"===s,"bottom-right-triangle":"bottom-right"===s}),f=function(e,t){return r({hex:e,source:"hex"},t)};return a.a.createElement("div",{style:p.card,className:"github-picker "+d},a.a.createElement("div",{style:p.triangleShadow}),a.a.createElement("div",{style:p.triangle}),ia(n,(function(e){return a.a.createElement(Ga,{color:e,key:e,onClick:f,onSwatchHover:o})})))};qa.propTypes={width:S.a.oneOfType([S.a.string,S.a.number]),colors:S.a.arrayOf(S.a.string),triangle:S.a.oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:S.a.object},qa.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}};var Ja=Pn(qa),Ka=function(e){var t=e.direction,n=i()({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:"vertical"===t});return a.a.createElement("div",{style:n.picker})},$a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xa=function(e){var t=e.width,n=e.height,r=e.onChange,o=e.hsl,s=e.direction,u=e.pointer,l=e.styles,c=void 0===l?{}:l,d=e.className,p=void 0===d?"":d,f=i()(Xt({default:{picker:{position:"relative",width:t,height:n},hue:{radius:"2px"}}},c));return a.a.createElement("div",{style:f.picker,className:"hue-picker "+p},a.a.createElement(x,$a({},f.hue,{hsl:o,pointer:u,onChange:function(e){return r({a:1,h:e.h,l:.5,s:1})},direction:s})))};Xa.propTypes={styles:S.a.object},Xa.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:Ka,styles:{}};var Za=Pn(Xa),Qa=Pn((function(e){var t=e.onChange,n=e.hex,r=e.rgb,o=e.styles,s=void 0===o?{}:o,u=e.className,l=void 0===u?"":u,c=i()(Xt({default:{material:{width:"98px",height:"98px",padding:"16px",fontFamily:"Roboto"},HEXwrap:{position:"relative"},HEXinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"2px solid "+n,outline:"none",height:"30px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},Hex:{style:{}},RGBwrap:{position:"relative"},RGBinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"1px solid #eee",outline:"none",height:"30px"},RGBlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},split:{display:"flex",marginRight:"-10px",paddingTop:"11px"},third:{flex:"1",paddingRight:"10px"}}},s)),d=function(e,n){e.hex?Dn(e.hex)&&t({hex:e.hex,source:"hex"},n):(e.r||e.g||e.b)&&t({r:e.r||r.r,g:e.g||r.g,b:e.b||r.b,source:"rgb"},n)};return a.a.createElement(Qt,{styles:s},a.a.createElement("div",{style:c.material,className:"material-picker "+l},a.a.createElement(w,{style:{wrap:c.HEXwrap,input:c.HEXinput,label:c.HEXlabel},label:"hex",value:n,onChange:d}),a.a.createElement("div",{style:c.split,className:"flexbox-fix"},a.a.createElement("div",{style:c.third},a.a.createElement(w,{style:{wrap:c.RGBwrap,input:c.RGBinput,label:c.RGBlabel},label:"r",value:r.r,onChange:d})),a.a.createElement("div",{style:c.third},a.a.createElement(w,{style:{wrap:c.RGBwrap,input:c.RGBinput,label:c.RGBlabel},label:"g",value:r.g,onChange:d})),a.a.createElement("div",{style:c.third},a.a.createElement(w,{style:{wrap:c.RGBwrap,input:c.RGBinput,label:c.RGBlabel},label:"b",value:r.b,onChange:d})))))})),eo=function(e){var t=e.onChange,n=e.rgb,r=e.hsv,o=e.hex,s=i()({default:{fields:{paddingTop:"5px",paddingBottom:"9px",width:"80px",position:"relative"},divider:{height:"5px"},RGBwrap:{position:"relative"},RGBinput:{marginLeft:"40%",width:"40%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"5px",fontSize:"13px",paddingLeft:"3px",marginRight:"10px"},RGBlabel:{left:"0px",top:"0px",width:"34px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px",position:"absolute"},HEXwrap:{position:"relative"},HEXinput:{marginLeft:"20%",width:"80%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"6px",fontSize:"13px",paddingLeft:"3px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",width:"14px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px"},fieldSymbols:{position:"absolute",top:"5px",right:"-7px",fontSize:"13px"},symbol:{height:"20px",lineHeight:"22px",paddingBottom:"7px"}}}),u=function(e,a){e["#"]?Dn(e["#"])&&t({hex:e["#"],source:"hex"},a):e.r||e.g||e.b?t({r:e.r||n.r,g:e.g||n.g,b:e.b||n.b,source:"rgb"},a):(e.h||e.s||e.v)&&t({h:e.h||r.h,s:e.s||r.s,v:e.v||r.v,source:"hsv"},a)};return a.a.createElement("div",{style:s.fields},a.a.createElement(w,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"h",value:Math.round(r.h),onChange:u}),a.a.createElement(w,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"s",value:Math.round(100*r.s),onChange:u}),a.a.createElement(w,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"v",value:Math.round(100*r.v),onChange:u}),a.a.createElement("div",{style:s.divider}),a.a.createElement(w,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"r",value:n.r,onChange:u}),a.a.createElement(w,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"g",value:n.g,onChange:u}),a.a.createElement(w,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"b",value:n.b,onChange:u}),a.a.createElement("div",{style:s.divider}),a.a.createElement(w,{style:{wrap:s.HEXwrap,input:s.HEXinput,label:s.HEXlabel},label:"#",value:o.replace("#",""),onChange:u}),a.a.createElement("div",{style:s.fieldSymbols},a.a.createElement("div",{style:s.symbol},"°"),a.a.createElement("div",{style:s.symbol},"%"),a.a.createElement("div",{style:s.symbol},"%")))},to=function(e){var t=e.hsl,n=i()({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}},"black-outline":{picker:{boxShadow:"inset 0 0 0 1px #000"}}},{"black-outline":t.l>.5});return a.a.createElement("div",{style:n.picker})},no=function(){var e=i()({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return a.a.createElement("div",{style:e.pointer},a.a.createElement("div",{style:e.left},a.a.createElement("div",{style:e.leftInside})),a.a.createElement("div",{style:e.right},a.a.createElement("div",{style:e.rightInside})))},ro=function(e){var t=e.onClick,n=e.label,r=e.children,o=e.active,s=i()({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:o});return a.a.createElement("div",{style:s.button,onClick:t},n||r)},ao=function(e){var t=e.rgb,n=e.currentColor,r=i()({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+t.r+","+t.g+", "+t.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:n,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return a.a.createElement("div",null,a.a.createElement("div",{style:r.label},"new"),a.a.createElement("div",{style:r.swatches},a.a.createElement("div",{style:r.new}),a.a.createElement("div",{style:r.current})),a.a.createElement("div",{style:r.label},"current"))},oo=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var io=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.state={currentColor:e.hex},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),oo(t,[{key:"render",value:function(){var e=this.props,t=e.styles,n=void 0===t?{}:t,r=e.className,o=void 0===r?"":r,s=i()(Xt({default:{picker:{background:"#DCDCDC",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.25), 0 8px 16px rgba(0,0,0,.15)",boxSizing:"initial",width:"513px"},head:{backgroundImage:"linear-gradient(-180deg, #F0F0F0 0%, #D4D4D4 100%)",borderBottom:"1px solid #B1B1B1",boxShadow:"inset 0 1px 0 0 rgba(255,255,255,.2), inset 0 -1px 0 0 rgba(0,0,0,.02)",height:"23px",lineHeight:"24px",borderRadius:"4px 4px 0 0",fontSize:"13px",color:"#4D4D4D",textAlign:"center"},body:{padding:"15px 15px 0",display:"flex"},saturation:{width:"256px",height:"256px",position:"relative",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0",overflow:"hidden"},hue:{position:"relative",height:"256px",width:"19px",marginLeft:"10px",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0"},controls:{width:"180px",marginLeft:"10px"},top:{display:"flex"},previews:{width:"60px"},actions:{flex:"1",marginLeft:"20px"}}},n));return a.a.createElement("div",{style:s.picker,className:"photoshop-picker "+o},a.a.createElement("div",{style:s.head},this.props.header),a.a.createElement("div",{style:s.body,className:"flexbox-fix"},a.a.createElement("div",{style:s.saturation},a.a.createElement(yn,{hsl:this.props.hsl,hsv:this.props.hsv,pointer:to,onChange:this.props.onChange})),a.a.createElement("div",{style:s.hue},a.a.createElement(x,{direction:"vertical",hsl:this.props.hsl,pointer:no,onChange:this.props.onChange})),a.a.createElement("div",{style:s.controls},a.a.createElement("div",{style:s.top,className:"flexbox-fix"},a.a.createElement("div",{style:s.previews},a.a.createElement(ao,{rgb:this.props.rgb,currentColor:this.state.currentColor})),a.a.createElement("div",{style:s.actions},a.a.createElement(ro,{label:"OK",onClick:this.props.onAccept,active:!0}),a.a.createElement(ro,{label:"Cancel",onClick:this.props.onCancel}),a.a.createElement(eo,{onChange:this.props.onChange,rgb:this.props.rgb,hsv:this.props.hsv,hex:this.props.hex}))))))}}]),t}(a.a.Component);io.propTypes={header:S.a.string,styles:S.a.object},io.defaultProps={header:"Color Picker",styles:{}};var so=Pn(io),uo=function(e){var t=e.onChange,n=e.rgb,r=e.hsl,o=e.hex,s=e.disableAlpha,u=i()({default:{fields:{display:"flex",paddingTop:"4px"},single:{flex:"1",paddingLeft:"6px"},alpha:{flex:"1",paddingLeft:"6px"},double:{flex:"2"},input:{width:"80%",padding:"4px 10% 3px",border:"none",boxShadow:"inset 0 0 0 1px #ccc",fontSize:"11px"},label:{display:"block",textAlign:"center",fontSize:"11px",color:"#222",paddingTop:"3px",paddingBottom:"4px",textTransform:"capitalize"}},disableAlpha:{alpha:{display:"none"}}},{disableAlpha:s}),l=function(e,a){e.hex?Dn(e.hex)&&t({hex:e.hex,source:"hex"},a):e.r||e.g||e.b?t({r:e.r||n.r,g:e.g||n.g,b:e.b||n.b,a:n.a,source:"rgb"},a):e.a&&(e.a<0?e.a=0:e.a>100&&(e.a=100),e.a/=100,t({h:r.h,s:r.s,l:r.l,a:e.a,source:"rgb"},a))};return a.a.createElement("div",{style:u.fields,className:"flexbox-fix"},a.a.createElement("div",{style:u.double},a.a.createElement(w,{style:{input:u.input,label:u.label},label:"hex",value:o.replace("#",""),onChange:l})),a.a.createElement("div",{style:u.single},a.a.createElement(w,{style:{input:u.input,label:u.label},label:"r",value:n.r,onChange:l,dragLabel:"true",dragMax:"255"})),a.a.createElement("div",{style:u.single},a.a.createElement(w,{style:{input:u.input,label:u.label},label:"g",value:n.g,onChange:l,dragLabel:"true",dragMax:"255"})),a.a.createElement("div",{style:u.single},a.a.createElement(w,{style:{input:u.input,label:u.label},label:"b",value:n.b,onChange:l,dragLabel:"true",dragMax:"255"})),a.a.createElement("div",{style:u.alpha},a.a.createElement(w,{style:{input:u.input,label:u.label},label:"a",value:Math.round(100*n.a),onChange:l,dragLabel:"true",dragMax:"100"})))},lo=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},co=function(e){var t=e.colors,n=e.onClick,r=void 0===n?function(){}:n,o=e.onSwatchHover,s=i()({default:{colors:{margin:"0 -10px",padding:"10px 0 0 10px",borderTop:"1px solid #eee",display:"flex",flexWrap:"wrap",position:"relative"},swatchWrap:{width:"16px",height:"16px",margin:"0 10px 10px 0"},swatch:{borderRadius:"3px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15)"}},"no-presets":{colors:{display:"none"}}},{"no-presets":!t||!t.length}),u=function(e,t){r({hex:e,source:"hex"},t)};return a.a.createElement("div",{style:s.colors,className:"flexbox-fix"},t.map((function(e){var t="string"==typeof e?{color:e}:e,n=""+t.color+(t.title||"");return a.a.createElement("div",{key:n,style:s.swatchWrap},a.a.createElement(Un,lo({},t,{style:s.swatch,onClick:u,onHover:o,focusStyle:{boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), 0 0 4px "+t.color}})))})))};co.propTypes={colors:S.a.arrayOf(S.a.oneOfType([S.a.string,S.a.shape({color:S.a.string,title:S.a.string})])).isRequired};var po=co,fo=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ho=function(e){var t=e.width,n=e.rgb,r=e.hex,o=e.hsv,s=e.hsl,u=e.onChange,l=e.onSwatchHover,c=e.disableAlpha,d=e.presetColors,f=e.renderers,h=e.styles,m=void 0===h?{}:h,_=e.className,g=void 0===_?"":_,v=i()(Xt({default:fo({picker:{width:t,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:"rgba("+n.r+","+n.g+","+n.b+","+n.a+")",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}},m),disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},m),{disableAlpha:c});return a.a.createElement("div",{style:v.picker,className:"sketch-picker "+g},a.a.createElement("div",{style:v.saturation},a.a.createElement(yn,{style:v.Saturation,hsl:s,hsv:o,onChange:u})),a.a.createElement("div",{style:v.controls,className:"flexbox-fix"},a.a.createElement("div",{style:v.sliders},a.a.createElement("div",{style:v.hue},a.a.createElement(x,{style:v.Hue,hsl:s,onChange:u})),a.a.createElement("div",{style:v.alpha},a.a.createElement(y,{style:v.Alpha,rgb:n,hsl:s,renderers:f,onChange:u}))),a.a.createElement("div",{style:v.color},a.a.createElement(p,null),a.a.createElement("div",{style:v.activeColor}))),a.a.createElement(uo,{rgb:n,hsl:s,hex:r,onChange:u,disableAlpha:c}),a.a.createElement(po,{colors:d,onClick:u,onSwatchHover:l}))};ho.propTypes={disableAlpha:S.a.bool,width:S.a.oneOfType([S.a.string,S.a.number]),styles:S.a.object},ho.defaultProps={disableAlpha:!1,width:200,styles:{},presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]};var mo=Pn(ho),_o=function(e){var t=e.hsl,n=e.offset,r=e.onClick,o=void 0===r?function(){}:r,s=e.active,u=e.first,l=e.last,c=i()({default:{swatch:{height:"12px",background:"hsl("+t.h+", 50%, "+100*n+"%)",cursor:"pointer"}},first:{swatch:{borderRadius:"2px 0 0 2px"}},last:{swatch:{borderRadius:"0 2px 2px 0"}},active:{swatch:{transform:"scaleY(1.8)",borderRadius:"3.6px/2px"}}},{active:s,first:u,last:l});return a.a.createElement("div",{style:c.swatch,onClick:function(e){return o({h:t.h,s:.5,l:n,source:"hsl"},e)}})},yo=function(e){var t=e.onClick,n=e.hsl,r=i()({default:{swatches:{marginTop:"20px"},swatch:{boxSizing:"border-box",width:"20%",paddingRight:"1px",float:"left"},clear:{clear:"both"}}});return a.a.createElement("div",{style:r.swatches},a.a.createElement("div",{style:r.swatch},a.a.createElement(_o,{hsl:n,offset:".80",active:Math.abs(n.l-.8)<.1&&Math.abs(n.s-.5)<.1,onClick:t,first:!0})),a.a.createElement("div",{style:r.swatch},a.a.createElement(_o,{hsl:n,offset:".65",active:Math.abs(n.l-.65)<.1&&Math.abs(n.s-.5)<.1,onClick:t})),a.a.createElement("div",{style:r.swatch},a.a.createElement(_o,{hsl:n,offset:".50",active:Math.abs(n.l-.5)<.1&&Math.abs(n.s-.5)<.1,onClick:t})),a.a.createElement("div",{style:r.swatch},a.a.createElement(_o,{hsl:n,offset:".35",active:Math.abs(n.l-.35)<.1&&Math.abs(n.s-.5)<.1,onClick:t})),a.a.createElement("div",{style:r.swatch},a.a.createElement(_o,{hsl:n,offset:".20",active:Math.abs(n.l-.2)<.1&&Math.abs(n.s-.5)<.1,onClick:t,last:!0})),a.a.createElement("div",{style:r.clear}))},go=function(){var e=i()({default:{picker:{width:"14px",height:"14px",borderRadius:"6px",transform:"translate(-7px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return a.a.createElement("div",{style:e.picker})},vo=function(e){var t=e.hsl,n=e.onChange,r=e.pointer,o=e.styles,s=void 0===o?{}:o,u=e.className,l=void 0===u?"":u,c=i()(Xt({default:{hue:{height:"12px",position:"relative"},Hue:{radius:"2px"}}},s));return a.a.createElement("div",{style:c.wrap||{},className:"slider-picker "+l},a.a.createElement("div",{style:c.hue},a.a.createElement(x,{style:c.Hue,hsl:t,pointer:r,onChange:n})),a.a.createElement("div",{style:c.swatches},a.a.createElement(yo,{hsl:t,onClick:n})))};vo.propTypes={styles:S.a.object},vo.defaultProps={pointer:go,styles:{}};var bo=Pn(vo),wo=n(277),Mo=n.n(wo),Lo=function(e){var t=e.color,n=e.onClick,r=void 0===n?function(){}:n,o=e.onSwatchHover,s=e.first,u=e.last,l=e.active,c=i()({default:{color:{width:"40px",height:"24px",cursor:"pointer",background:t,marginBottom:"1px"},check:{color:Yn(t),marginLeft:"8px",display:"none"}},first:{color:{overflow:"hidden",borderRadius:"2px 2px 0 0"}},last:{color:{overflow:"hidden",borderRadius:"0 0 2px 2px"}},active:{check:{display:"block"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},check:{color:"#333"}},transparent:{check:{color:"#333"}}},{first:s,last:u,active:l,"color-#FFFFFF":"#FFFFFF"===t,transparent:"transparent"===t});return a.a.createElement(Un,{color:t,style:c.color,onClick:r,onHover:o,focusStyle:{boxShadow:"0 0 4px "+t}},a.a.createElement("div",{style:c.check},a.a.createElement(Mo.a,null)))},To=function(e){var t=e.onClick,n=e.onSwatchHover,r=e.group,o=e.active,s=i()({default:{group:{paddingBottom:"10px",width:"40px",float:"left",marginRight:"10px"}}});return a.a.createElement("div",{style:s.group},ia(r,(function(e,i){return a.a.createElement(Lo,{key:e,color:e,active:e.toLowerCase()===o,first:0===i,last:i===r.length-1,onClick:t,onSwatchHover:n})})))},ko=function(e){var t=e.width,n=e.height,r=e.onChange,o=e.onSwatchHover,s=e.colors,u=e.hex,l=e.styles,c=void 0===l?{}:l,d=e.className,p=void 0===d?"":d,f=i()(Xt({default:{picker:{width:t,height:n},overflow:{height:n,overflowY:"scroll"},body:{padding:"16px 0 6px 16px"},clear:{clear:"both"}}},c)),h=function(e,t){return r({hex:e,source:"hex"},t)};return a.a.createElement("div",{style:f.picker,className:"swatches-picker "+p},a.a.createElement(Qt,null,a.a.createElement("div",{style:f.overflow},a.a.createElement("div",{style:f.body},ia(s,(function(e){return a.a.createElement(To,{key:e.toString(),group:e,active:u,onClick:h,onSwatchHover:o})})),a.a.createElement("div",{style:f.clear})))))};ko.propTypes={width:S.a.oneOfType([S.a.string,S.a.number]),height:S.a.oneOfType([S.a.string,S.a.number]),colors:S.a.arrayOf(S.a.arrayOf(S.a.string)),styles:S.a.object},ko.defaultProps={width:320,height:240,colors:[[ca[900],ca[700],ca[500],ca[300],ca[100]],[da[900],da[700],da[500],da[300],da[100]],[pa[900],pa[700],pa[500],pa[300],pa[100]],[fa[900],fa[700],fa[500],fa[300],fa[100]],[ha[900],ha[700],ha[500],ha[300],ha[100]],[ma[900],ma[700],ma[500],ma[300],ma[100]],[_a[900],_a[700],_a[500],_a[300],_a[100]],[ya[900],ya[700],ya[500],ya[300],ya[100]],[ga[900],ga[700],ga[500],ga[300],ga[100]],["#194D33",va[700],va[500],va[300],va[100]],[ba[900],ba[700],ba[500],ba[300],ba[100]],[wa[900],wa[700],wa[500],wa[300],wa[100]],[Ma[900],Ma[700],Ma[500],Ma[300],Ma[100]],[La[900],La[700],La[500],La[300],La[100]],[Ta[900],Ta[700],Ta[500],Ta[300],Ta[100]],[ka[900],ka[700],ka[500],ka[300],ka[100]],[xa[900],xa[700],xa[500],xa[300],xa[100]],[Ea[900],Ea[700],Ea[500],Ea[300],Ea[100]],["#000000","#525252","#969696","#D9D9D9","#FFFFFF"]],styles:{}};var xo=Pn(ko),Eo=function(e){var t=e.onChange,n=e.onSwatchHover,r=e.hex,o=e.colors,s=e.width,u=e.triangle,l=e.styles,c=void 0===l?{}:l,d=e.className,p=void 0===d?"":d,f=i()(Xt({default:{card:{width:s,background:"#fff",border:"0 solid rgba(0,0,0,0.25)",boxShadow:"0 1px 4px rgba(0,0,0,0.25)",borderRadius:"4px",position:"relative"},body:{padding:"15px 9px 9px 15px"},label:{fontSize:"18px",color:"#fff"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent #fff transparent",position:"absolute"},triangleShadow:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent rgba(0,0,0,.1) transparent",position:"absolute"},hash:{background:"#F0F0F0",height:"30px",width:"30px",borderRadius:"4px 0 0 4px",float:"left",color:"#98A1A4",display:"flex",alignItems:"center",justifyContent:"center"},input:{width:"100px",fontSize:"14px",color:"#666",border:"0px",outline:"none",height:"28px",boxShadow:"inset 0 0 0 1px #F0F0F0",boxSizing:"content-box",borderRadius:"0 4px 4px 0",float:"left",paddingLeft:"8px"},swatch:{width:"30px",height:"30px",float:"left",borderRadius:"4px",margin:"0 6px 6px 0"},clear:{clear:"both"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-10px",left:"12px"},triangleShadow:{top:"-11px",left:"12px"}},"top-right-triangle":{triangle:{top:"-10px",right:"12px"},triangleShadow:{top:"-11px",right:"12px"}}},c),{"hide-triangle":"hide"===u,"top-left-triangle":"top-left"===u,"top-right-triangle":"top-right"===u}),h=function(e,n){Dn(e)&&t({hex:e,source:"hex"},n)};return a.a.createElement("div",{style:f.card,className:"twitter-picker "+p},a.a.createElement("div",{style:f.triangleShadow}),a.a.createElement("div",{style:f.triangle}),a.a.createElement("div",{style:f.body},ia(o,(function(e,t){return a.a.createElement(Un,{key:t,color:e,hex:e,style:f.swatch,onClick:h,onHover:n,focusStyle:{boxShadow:"0 0 4px "+e}})})),a.a.createElement("div",{style:f.hash},"#"),a.a.createElement(w,{label:null,style:{input:f.input},value:r.replace("#",""),onChange:h}),a.a.createElement("div",{style:f.clear})))};Eo.propTypes={width:S.a.oneOfType([S.a.string,S.a.number]),triangle:S.a.oneOf(["hide","top-left","top-right"]),colors:S.a.arrayOf(S.a.string),styles:S.a.object},Eo.defaultProps={width:276,colors:["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"],triangle:"top-left",styles:{}};var So=Pn(Eo),Oo=function(e){var t=i()({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",border:"2px #fff solid",transform:"translate(-12px, -13px)",background:"hsl("+Math.round(e.hsl.h)+", "+Math.round(100*e.hsl.s)+"%, "+Math.round(100*e.hsl.l)+"%)"}}});return a.a.createElement("div",{style:t.picker})};Oo.propTypes={hsl:S.a.shape({h:S.a.number,s:S.a.number,l:S.a.number,a:S.a.number})},Oo.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var Do=Oo,Yo=function(e){var t=i()({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",transform:"translate(-10px, -7px)",background:"hsl("+Math.round(e.hsl.h)+", 100%, 50%)",border:"2px white solid"}}});return a.a.createElement("div",{style:t.picker})};Yo.propTypes={hsl:S.a.shape({h:S.a.number,s:S.a.number,l:S.a.number,a:S.a.number})},Yo.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var Ao=Yo,Co=function(e){var t=e.onChange,n=e.rgb,r=e.hsl,o=e.hex,s=e.hsv,u=function(e,n){if(e.hex)Dn(e.hex)&&t({hex:e.hex,source:"hex"},n);else if(e.rgb){var r=e.rgb.split(",");An(e.rgb,"rgb")&&t({r:r[0],g:r[1],b:r[2],a:1,source:"rgb"},n)}else if(e.hsv){var a=e.hsv.split(",");An(e.hsv,"hsv")&&(a[2]=a[2].replace("%",""),a[1]=a[1].replace("%",""),a[0]=a[0].replace("°",""),1==a[1]?a[1]=.01:1==a[2]&&(a[2]=.01),t({h:Number(a[0]),s:Number(a[1]),v:Number(a[2]),source:"hsv"},n))}else if(e.hsl){var o=e.hsl.split(",");An(e.hsl,"hsl")&&(o[2]=o[2].replace("%",""),o[1]=o[1].replace("%",""),o[0]=o[0].replace("°",""),1==p[1]?p[1]=.01:1==p[2]&&(p[2]=.01),t({h:Number(o[0]),s:Number(o[1]),v:Number(o[2]),source:"hsl"},n))}},l=i()({default:{wrap:{display:"flex",height:"100px",marginTop:"4px"},fields:{width:"100%"},column:{paddingTop:"10px",display:"flex",justifyContent:"space-between"},double:{padding:"0px 4.4px",boxSizing:"border-box"},input:{width:"100%",height:"38px",boxSizing:"border-box",padding:"4px 10% 3px",textAlign:"center",border:"1px solid #dadce0",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",fontFamily:"Roboto,Arial,sans-serif"},input2:{height:"38px",width:"100%",border:"1px solid #dadce0",boxSizing:"border-box",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",paddingLeft:"10px",fontFamily:"Roboto,Arial,sans-serif"},label:{textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"35px",top:"-6px",left:"0",right:"0",marginLeft:"auto",marginRight:"auto",fontFamily:"Roboto,Arial,sans-serif"},label2:{left:"10px",textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"32px",top:"-6px",fontFamily:"Roboto,Arial,sans-serif"},single:{flexGrow:"1",margin:"0px 4.4px"}}}),c=n.r+", "+n.g+", "+n.b,d=Math.round(r.h)+"°, "+Math.round(100*r.s)+"%, "+Math.round(100*r.l)+"%",p=Math.round(s.h)+"°, "+Math.round(100*s.s)+"%, "+Math.round(100*s.v)+"%";return a.a.createElement("div",{style:l.wrap,className:"flexbox-fix"},a.a.createElement("div",{style:l.fields},a.a.createElement("div",{style:l.double},a.a.createElement(w,{style:{input:l.input,label:l.label},label:"hex",value:o,onChange:u})),a.a.createElement("div",{style:l.column},a.a.createElement("div",{style:l.single},a.a.createElement(w,{style:{input:l.input2,label:l.label2},label:"rgb",value:c,onChange:u})),a.a.createElement("div",{style:l.single},a.a.createElement(w,{style:{input:l.input2,label:l.label2},label:"hsv",value:p,onChange:u})),a.a.createElement("div",{style:l.single},a.a.createElement(w,{style:{input:l.input2,label:l.label2},label:"hsl",value:d,onChange:u})))))},jo=function(e){var t=e.width,n=e.onChange,r=e.rgb,o=e.hsl,s=e.hsv,u=e.hex,l=e.header,c=e.styles,d=void 0===c?{}:c,p=e.className,f=void 0===p?"":p,h=i()(Xt({default:{picker:{width:t,background:"#fff",border:"1px solid #dfe1e5",boxSizing:"initial",display:"flex",flexWrap:"wrap",borderRadius:"8px 8px 0px 0px"},head:{height:"57px",width:"100%",paddingTop:"16px",paddingBottom:"16px",paddingLeft:"16px",fontSize:"20px",boxSizing:"border-box",fontFamily:"Roboto-Regular,HelveticaNeue,Arial,sans-serif"},saturation:{width:"70%",padding:"0px",position:"relative",overflow:"hidden"},swatch:{width:"30%",height:"228px",padding:"0px",background:"rgba("+r.r+", "+r.g+", "+r.b+", 1)",position:"relative",overflow:"hidden"},body:{margin:"auto",width:"95%"},controls:{display:"flex",boxSizing:"border-box",height:"52px",paddingTop:"22px"},color:{width:"32px"},hue:{height:"8px",position:"relative",margin:"0px 16px 0px 16px",width:"100%"},Hue:{radius:"2px"}}},d));return a.a.createElement("div",{style:h.picker,className:"google-picker "+f},a.a.createElement("div",{style:h.head},l),a.a.createElement("div",{style:h.swatch}),a.a.createElement("div",{style:h.saturation},a.a.createElement(yn,{hsl:o,hsv:s,pointer:Do,onChange:n})),a.a.createElement("div",{style:h.body},a.a.createElement("div",{style:h.controls,className:"flexbox-fix"},a.a.createElement("div",{style:h.hue},a.a.createElement(x,{style:h.Hue,hsl:o,radius:"4px",pointer:Ao,onChange:n}))),a.a.createElement(Co,{rgb:r,hsl:o,hex:u,hsv:s,onChange:n})))};jo.propTypes={width:S.a.oneOfType([S.a.string,S.a.number]),styles:S.a.object,header:S.a.string},jo.defaultProps={width:652,styles:{},header:"Color picker"};var Po=Pn(jo)},function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n.r(t),n.d(t,"CacheProvider",(function(){return S})),n.d(t,"ThemeContext",(function(){return E})),n.d(t,"withEmotionCache",(function(){return O})),n.d(t,"css",(function(){return j})),n.d(t,"ClassNames",(function(){return z})),n.d(t,"Global",(function(){return H})),n.d(t,"createElement",(function(){return P})),n.d(t,"jsx",(function(){return P})),n.d(t,"keyframes",(function(){return N}));var a=n(0);var o=function(){function e(e){this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.before=null}var t=e.prototype;return t.insert=function(e){if(this.ctr%(this.isSpeedy?65e3:1)==0){var t,n=function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t}(this);t=0===this.tags.length?this.before:this.tags[this.tags.length-1].nextSibling,this.container.insertBefore(n,t),this.tags.push(n)}var r=this.tags[this.tags.length-1];if(this.isSpeedy){var a=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(r);try{var o=105===e.charCodeAt(1)&&64===e.charCodeAt(0);a.insertRule(e,o?0:a.cssRules.length)}catch(e){0}}else r.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}();var i=function(e){function t(e,t,r){var a=t.trim().split(h);t=a;var o=a.length,i=e.length;switch(i){case 0:case 1:var s=0;for(e=0===i?"":e[0]+" ";s<o;++s)t[s]=n(e,t[s],r).trim();break;default:var u=s=0;for(t=[];s<o;++s)for(var l=0;l<i;++l)t[u++]=n(e[l]+" ",a[s],r).trim()}return t}function n(e,t,n){var r=t.charCodeAt(0);switch(33>r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(m,"$1"+e.trim());case 58:return e.trim()+t.replace(m,"$1"+e.trim());default:if(0<1*n&&0<t.indexOf("\f"))return t.replace(m,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function r(e,t,n,o){var i=e+";",s=2*t+3*n+4*o;if(944===s){e=i.indexOf(":",9)+1;var u=i.substring(e,i.length-1).trim();return u=i.substring(0,e).trim()+u+";",1===O||2===O&&a(u,1)?"-webkit-"+u+u:u}if(0===O||2===O&&!a(i,1))return i;switch(s){case 1015:return 97===i.charCodeAt(10)?"-webkit-"+i+i:i;case 951:return 116===i.charCodeAt(3)?"-webkit-"+i+i:i;case 963:return 110===i.charCodeAt(5)?"-webkit-"+i+i:i;case 1009:if(100!==i.charCodeAt(4))break;case 969:case 942:return"-webkit-"+i+i;case 978:return"-webkit-"+i+"-moz-"+i+i;case 1019:case 983:return"-webkit-"+i+"-moz-"+i+"-ms-"+i+i;case 883:if(45===i.charCodeAt(8))return"-webkit-"+i+i;if(0<i.indexOf("image-set(",11))return i.replace(k,"$1-webkit-$2")+i;break;case 932:if(45===i.charCodeAt(4))switch(i.charCodeAt(5)){case 103:return"-webkit-box-"+i.replace("-grow","")+"-webkit-"+i+"-ms-"+i.replace("grow","positive")+i;case 115:return"-webkit-"+i+"-ms-"+i.replace("shrink","negative")+i;case 98:return"-webkit-"+i+"-ms-"+i.replace("basis","preferred-size")+i}return"-webkit-"+i+"-ms-"+i+i;case 964:return"-webkit-"+i+"-ms-flex-"+i+i;case 1023:if(99!==i.charCodeAt(8))break;return"-webkit-box-pack"+(u=i.substring(i.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+i+"-ms-flex-pack"+u+i;case 1005:return p.test(i)?i.replace(d,":-webkit-")+i.replace(d,":-moz-")+i:i;case 1e3:switch(t=(u=i.substring(13).trim()).indexOf("-")+1,u.charCodeAt(0)+u.charCodeAt(t)){case 226:u=i.replace(v,"tb");break;case 232:u=i.replace(v,"tb-rl");break;case 220:u=i.replace(v,"lr");break;default:return i}return"-webkit-"+i+"-ms-"+u+i;case 1017:if(-1===i.indexOf("sticky",9))break;case 975:switch(t=(i=e).length-10,s=(u=(33===i.charCodeAt(t)?i.substring(0,t):i).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|u.charCodeAt(7))){case 203:if(111>u.charCodeAt(8))break;case 115:i=i.replace(u,"-webkit-"+u)+";"+i;break;case 207:case 102:i=i.replace(u,"-webkit-"+(102<s?"inline-":"")+"box")+";"+i.replace(u,"-webkit-"+u)+";"+i.replace(u,"-ms-"+u+"box")+";"+i}return i+";";case 938:if(45===i.charCodeAt(5))switch(i.charCodeAt(6)){case 105:return u=i.replace("-items",""),"-webkit-"+i+"-webkit-box-"+u+"-ms-flex-"+u+i;case 115:return"-webkit-"+i+"-ms-flex-item-"+i.replace(M,"")+i;default:return"-webkit-"+i+"-ms-flex-line-pack"+i.replace("align-content","").replace(M,"")+i}break;case 973:case 989:if(45!==i.charCodeAt(3)||122===i.charCodeAt(4))break;case 931:case 953:if(!0===T.test(e))return 115===(u=e.substring(e.indexOf(":")+1)).charCodeAt(0)?r(e.replace("stretch","fill-available"),t,n,o).replace(":fill-available",":stretch"):i.replace(u,"-webkit-"+u)+i.replace(u,"-moz-"+u.replace("fill-",""))+i;break;case 962:if(i="-webkit-"+i+(102===i.charCodeAt(5)?"-ms-"+i:"")+i,211===n+o&&105===i.charCodeAt(13)&&0<i.indexOf("transform",10))return i.substring(0,i.indexOf(";",27)+1).replace(f,"$1-webkit-$2")+i}return i}function a(e,t){var n=e.indexOf(1===t?":":"{"),r=e.substring(0,3!==t?n:10);return n=e.substring(n+1,e.length-1),C(2!==t?r:r.replace(L,"$1"),n,t)}function o(e,t){var n=r(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n!==t+";"?n.replace(w," or ($1)").substring(4):"("+t+")"}function i(e,t,n,r,a,o,i,s,l,c){for(var d,p=0,f=t;p<A;++p)switch(d=Y[p].call(u,e,f,n,r,a,o,i,s,l,c)){case void 0:case!1:case!0:case null:break;default:f=d}if(f!==t)return f}function s(e){return void 0!==(e=e.prefix)&&(C=null,e?"function"!=typeof e?O=1:(O=2,C=e):O=0),s}function u(e,n){var s=e;if(33>s.charCodeAt(0)&&(s=s.trim()),s=[s],0<A){var u=i(-1,n,s,s,E,x,0,0,0,0);void 0!==u&&"string"==typeof u&&(n=u)}var d=function e(n,s,u,d,p){for(var f,h,m,v,w,M=0,L=0,T=0,k=0,Y=0,C=0,P=m=f=0,H=0,I=0,N=0,R=0,F=u.length,z=F-1,U="",W="",B="",V="";H<F;){if(h=u.charCodeAt(H),H===z&&0!==L+k+T+M&&(0!==L&&(h=47===L?10:47),k=T=M=0,F++,z++),0===L+k+T+M){if(H===z&&(0<I&&(U=U.replace(c,"")),0<U.trim().length)){switch(h){case 32:case 9:case 59:case 13:case 10:break;default:U+=u.charAt(H)}h=59}switch(h){case 123:for(f=(U=U.trim()).charCodeAt(0),m=1,R=++H;H<F;){switch(h=u.charCodeAt(H)){case 123:m++;break;case 125:m--;break;case 47:switch(h=u.charCodeAt(H+1)){case 42:case 47:e:{for(P=H+1;P<z;++P)switch(u.charCodeAt(P)){case 47:if(42===h&&42===u.charCodeAt(P-1)&&H+2!==P){H=P+1;break e}break;case 10:if(47===h){H=P+1;break e}}H=P}}break;case 91:h++;case 40:h++;case 34:case 39:for(;H++<z&&u.charCodeAt(H)!==h;);}if(0===m)break;H++}switch(m=u.substring(R,H),0===f&&(f=(U=U.replace(l,"").trim()).charCodeAt(0)),f){case 64:switch(0<I&&(U=U.replace(c,"")),h=U.charCodeAt(1)){case 100:case 109:case 115:case 45:I=s;break;default:I=D}if(R=(m=e(s,I,m,h,p+1)).length,0<A&&(w=i(3,m,I=t(D,U,N),s,E,x,R,h,p,d),U=I.join(""),void 0!==w&&0===(R=(m=w.trim()).length)&&(h=0,m="")),0<R)switch(h){case 115:U=U.replace(b,o);case 100:case 109:case 45:m=U+"{"+m+"}";break;case 107:m=(U=U.replace(_,"$1 $2"))+"{"+m+"}",m=1===O||2===O&&a("@"+m,3)?"@-webkit-"+m+"@"+m:"@"+m;break;default:m=U+m,112===d&&(W+=m,m="")}else m="";break;default:m=e(s,t(s,U,N),m,d,p+1)}B+=m,m=N=I=P=f=0,U="",h=u.charCodeAt(++H);break;case 125:case 59:if(1<(R=(U=(0<I?U.replace(c,""):U).trim()).length))switch(0===P&&(f=U.charCodeAt(0),45===f||96<f&&123>f)&&(R=(U=U.replace(" ",":")).length),0<A&&void 0!==(w=i(1,U,s,n,E,x,W.length,d,p,d))&&0===(R=(U=w.trim()).length)&&(U="\0\0"),f=U.charCodeAt(0),h=U.charCodeAt(1),f){case 0:break;case 64:if(105===h||99===h){V+=U+u.charAt(H);break}default:58!==U.charCodeAt(R-1)&&(W+=r(U,f,h,U.charCodeAt(2)))}N=I=P=f=0,U="",h=u.charCodeAt(++H)}}switch(h){case 13:case 10:47===L?L=0:0===1+f&&107!==d&&0<U.length&&(I=1,U+="\0"),0<A*j&&i(0,U,s,n,E,x,W.length,d,p,d),x=1,E++;break;case 59:case 125:if(0===L+k+T+M){x++;break}default:switch(x++,v=u.charAt(H),h){case 9:case 32:if(0===k+M+L)switch(Y){case 44:case 58:case 9:case 32:v="";break;default:32!==h&&(v=" ")}break;case 0:v="\\0";break;case 12:v="\\f";break;case 11:v="\\v";break;case 38:0===k+L+M&&(I=N=1,v="\f"+v);break;case 108:if(0===k+L+M+S&&0<P)switch(H-P){case 2:112===Y&&58===u.charCodeAt(H-3)&&(S=Y);case 8:111===C&&(S=C)}break;case 58:0===k+L+M&&(P=H);break;case 44:0===L+T+k+M&&(I=1,v+="\r");break;case 34:case 39:0===L&&(k=k===h?0:0===k?h:k);break;case 91:0===k+L+T&&M++;break;case 93:0===k+L+T&&M--;break;case 41:0===k+L+M&&T--;break;case 40:if(0===k+L+M){if(0===f)switch(2*Y+3*C){case 533:break;default:f=1}T++}break;case 64:0===L+T+k+M+P+m&&(m=1);break;case 42:case 47:if(!(0<k+M+T))switch(L){case 0:switch(2*h+3*u.charCodeAt(H+1)){case 235:L=47;break;case 220:R=H,L=42}break;case 42:47===h&&42===Y&&R+2!==H&&(33===u.charCodeAt(R+2)&&(W+=u.substring(R,H+1)),v="",L=0)}}0===L&&(U+=v)}C=Y,Y=h,H++}if(0<(R=W.length)){if(I=s,0<A&&(void 0!==(w=i(2,W,I,n,E,x,R,d,p,d))&&0===(W=w).length))return V+W+B;if(W=I.join(",")+"{"+W+"}",0!=O*S){switch(2!==O||a(W,2)||(S=0),S){case 111:W=W.replace(g,":-moz-$1")+W;break;case 112:W=W.replace(y,"::-webkit-input-$1")+W.replace(y,"::-moz-$1")+W.replace(y,":-ms-input-$1")+W}S=0}}return V+W+B}(D,s,n,0,0);return 0<A&&(void 0!==(u=i(-2,d,s,s,E,x,d.length,0,0,0))&&(d=u)),"",S=0,x=E=1,d}var l=/^\0+/g,c=/[\0\r\f]/g,d=/: */g,p=/zoo|gra/,f=/([,: ])(transform)/g,h=/,\r+?/g,m=/([\t\r\n ])*\f?&/g,_=/@(k\w+)\s*(\S*)\s*/,y=/::(place)/g,g=/:(read-only)/g,v=/[svh]\w+-[tblr]{2}/,b=/\(\s*(.*)\s*\)/g,w=/([\s\S]*?);/g,M=/-self|flex-/g,L=/[^]*?(:[rp][el]a[\w-]+)[^]*/,T=/stretch|:\s*\w+\-(?:conte|avail)/,k=/([^-])(image-set\()/,x=1,E=1,S=0,O=1,D=[],Y=[],A=0,C=null,j=0;return u.use=function e(t){switch(t){case void 0:case null:A=Y.length=0;break;default:if("function"==typeof t)Y[A++]=t;else if("object"==typeof t)for(var n=0,r=t.length;n<r;++n)e(t[n]);else j=0|!!t}return e},u.set=s,void 0!==e&&s(e),u};function s(e){e&&u.current.insert(e+"}")}var u={current:null},l=function(e,t,n,r,a,o,i,l,c,d){switch(e){case 1:switch(t.charCodeAt(0)){case 64:return u.current.insert(t+";"),"";case 108:if(98===t.charCodeAt(2))return""}break;case 2:if(0===l)return t+"/*|*/";break;case 3:switch(l){case 102:case 112:return u.current.insert(n[0]+t),"";default:return t+(0===d?"/*|*/":"")}case-2:t.split("/*|*/}").forEach(s)}},c=function(e){void 0===e&&(e={});var t,n=e.key||"css";void 0!==e.prefix&&(t={prefix:e.prefix});var r=new i(t);var a,s={};a=e.container||document.head;var c,d=document.querySelectorAll("style[data-emotion-"+n+"]");Array.prototype.forEach.call(d,(function(e){e.getAttribute("data-emotion-"+n).split(" ").forEach((function(e){s[e]=!0})),e.parentNode!==a&&a.appendChild(e)})),r.use(e.stylisPlugins)(l),c=function(e,t,n,a){var o=t.name;u.current=n,r(e,t.styles),a&&(p.inserted[o]=!0)};var p={key:n,sheet:new o({key:n,container:a,nonce:e.nonce,speedy:e.speedy}),nonce:e.nonce,inserted:s,registered:{},insert:c};return p};n(348);function d(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]):r+=n+" "})),r}var p=function(e,t,n){var r=e.key+"-"+t.name;if(!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles),void 0===e.inserted[t.name]){var a=t;do{e.insert("."+r,a,e.sheet,!0);a=a.next}while(void 0!==a)}};var f=function(e){for(var t,n=0,r=0,a=e.length;a>=4;++r,a-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(a){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)},h={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var m=/[A-Z]|^ms/g,_=/_EMO_([^_]+?)_([^]*?)_EMO_/g,y=function(e){return 45===e.charCodeAt(1)},g=function(e){return null!=e&&"boolean"!=typeof e},v=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){return y(e)?e:e.replace(m,"-$&").toLowerCase()})),b=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(_,(function(e,t,n){return M={name:t,styles:n,next:M},t}))}return 1===h[e]||y(e)||"number"!=typeof t||0===t?t:t+"px"};function w(e,t,n,r){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return M={name:n.name,styles:n.styles,next:M},n.name;if(void 0!==n.styles){var a=n.next;if(void 0!==a)for(;void 0!==a;)M={name:a.name,styles:a.styles,next:M},a=a.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var a=0;a<n.length;a++)r+=w(e,t,n[a],!1);else for(var o in n){var i=n[o];if("object"!=typeof i)null!=t&&void 0!==t[i]?r+=o+"{"+t[i]+"}":g(i)&&(r+=v(o)+":"+b(o,i)+";");else if(!Array.isArray(i)||"string"!=typeof i[0]||null!=t&&void 0!==t[i[0]]){var s=w(e,t,i,!1);switch(o){case"animation":case"animationName":r+=v(o)+":"+s+";";break;default:r+=o+"{"+s+"}"}}else for(var u=0;u<i.length;u++)g(i[u])&&(r+=v(o)+":"+b(o,i[u])+";")}return r}(e,t,n);case"function":if(void 0!==e){var o=M,i=n(e);return M=o,w(e,t,i,r)}break;case"string":}if(null==t)return n;var s=t[n];return void 0===s||r?n:s}var M,L=/label:\s*([^\s;\n{]+)\s*;/g;var T=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,a="";M=void 0;var o=e[0];null==o||void 0===o.raw?(r=!1,a+=w(n,t,o,!1)):a+=o[0];for(var i=1;i<e.length;i++)a+=w(n,t,e[i],46===a.charCodeAt(a.length-1)),r&&(a+=o[i]);L.lastIndex=0;for(var s,u="";null!==(s=L.exec(a));)u+="-"+s[1];return{name:f(a)+u,styles:a,next:M}},k=Object.prototype.hasOwnProperty,x=Object(a.createContext)("undefined"!=typeof HTMLElement?c():null),E=Object(a.createContext)({}),S=x.Provider,O=function(e){var t=function(t,n){return Object(a.createElement)(x.Consumer,null,(function(r){return e(t,r,n)}))};return Object(a.forwardRef)(t)},D="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Y=function(e,t){var n={};for(var r in t)k.call(t,r)&&(n[r]=t[r]);return n[D]=e,n},A=function(e,t,n,r){var o=null===n?t.css:t.css(n);"string"==typeof o&&void 0!==e.registered[o]&&(o=e.registered[o]);var i=t[D],s=[o],u="";"string"==typeof t.className?u=d(e.registered,s,t.className):null!=t.className&&(u=t.className+" ");var l=T(s);p(e,l,"string"==typeof i);u+=e.key+"-"+l.name;var c={};for(var f in t)k.call(t,f)&&"css"!==f&&f!==D&&(c[f]=t[f]);return c.ref=r,c.className=u,Object(a.createElement)(i,c)},C=O((function(e,t,n){return"function"==typeof e.css?Object(a.createElement)(E.Consumer,null,(function(r){return A(t,e,r,n)})):A(t,e,null,n)}));var j=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return T(t)},P=function(e,t){var n=arguments;if(null==t||!k.call(t,"css"))return a.createElement.apply(void 0,n);var r=n.length,o=new Array(r);o[0]=C,o[1]=Y(e,t);for(var i=2;i<r;i++)o[i]=n[i];return a.createElement.apply(null,o)},H=O((function(e,t){var n=e.styles;if("function"==typeof n)return Object(a.createElement)(E.Consumer,null,(function(e){var r=T([n(e)]);return Object(a.createElement)(I,{serialized:r,cache:t})}));var r=T([n]);return Object(a.createElement)(I,{serialized:r,cache:t})})),I=function(e){var t,n;function a(t,n,r){return e.call(this,t,n,r)||this}n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,r(t,n);var i=a.prototype;return i.componentDidMount=function(){this.sheet=new o({key:this.props.cache.key+"-global",nonce:this.props.cache.sheet.nonce,container:this.props.cache.sheet.container});var e=document.querySelector("style[data-emotion-"+this.props.cache.key+'="'+this.props.serialized.name+'"]');null!==e&&this.sheet.tags.push(e),this.props.cache.sheet.tags.length&&(this.sheet.before=this.props.cache.sheet.tags[0]),this.insertStyles()},i.componentDidUpdate=function(e){e.serialized.name!==this.props.serialized.name&&this.insertStyles()},i.insertStyles=function(){if(void 0!==this.props.serialized.next&&p(this.props.cache,this.props.serialized.next,!0),this.sheet.tags.length){var e=this.sheet.tags[this.sheet.tags.length-1].nextElementSibling;this.sheet.before=e,this.sheet.flush()}this.props.cache.insert("",this.props.serialized,this.sheet,!1)},i.componentWillUnmount=function(){this.sheet.flush()},i.render=function(){return null},a}(a.Component),N=function(){var e=j.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}},R=function e(t){for(var n=t.length,r=0,a="";r<n;r++){var o=t[r];if(null!=o){var i=void 0;switch(typeof o){case"boolean":break;case"object":if(Array.isArray(o))i=e(o);else for(var s in i="",o)o[s]&&s&&(i&&(i+=" "),i+=s);break;default:i=o}i&&(a&&(a+=" "),a+=i)}}return a};function F(e,t,n){var r=[],a=d(e,r,n);return r.length<2?n:a+t(r)}var z=O((function(e,t){return Object(a.createElement)(E.Consumer,null,(function(n){var r=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var a=T(n,t.registered);return p(t,a,!1),t.key+"-"+a.name},a={css:r,cx:function(){for(var e=arguments.length,n=new Array(e),a=0;a<e;a++)n[a]=arguments[a];return F(t.registered,r,R(n))},theme:n},o=e.children(a);return!0,o}))}))}])}));
281
281
  //# sourceMappingURL=components.js.map