canvas-editor-engine 2.0.4 → 2.0.5
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.
- package/dist/index.mjs.js +1 -1
- package/package.json +1 -1
package/dist/index.mjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see index.mjs.js.LICENSE.txt */
|
|
2
|
-
(()=>{var t={543:function(t,n,e){var r;t=e.nmd(t),function(){var o,i="Expected a function",u="__lodash_hash_undefined__",a="__lodash_placeholder__",c=32,f=128,s=1/0,l=9007199254740991,p=NaN,h=4294967295,d=[["ary",f],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",c],["partialRight",64],["rearg",256]],v="[object Arguments]",g="[object Array]",y="[object Boolean]",_="[object Date]",m="[object Error]",b="[object Function]",x="[object GeneratorFunction]",w="[object Map]",S="[object Number]",j="[object Object]",E="[object Promise]",A="[object RegExp]",C="[object Set]",O="[object String]",I="[object Symbol]",P="[object WeakMap]",z="[object ArrayBuffer]",L="[object DataView]",T="[object Float32Array]",k="[object Float64Array]",R="[object Int8Array]",D="[object Int16Array]",N="[object Int32Array]",M="[object Uint8Array]",B="[object Uint8ClampedArray]",W="[object Uint16Array]",V="[object Uint32Array]",F=/\b__p \+= '';/g,U=/\b(__p \+=) '' \+/g,H=/(__e\(.*?\)|\b__t\)) \+\n'';/g,G=/&(?:amp|lt|gt|quot|#39);/g,Z=/[&<>"']/g,q=RegExp(G.source),$=RegExp(Z.source),Y=/<%-([\s\S]+?)%>/g,K=/<%([\s\S]+?)%>/g,X=/<%=([\s\S]+?)%>/g,J=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Q=/^\w*$/,tt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,nt=/[\\^$.*+?()[\]{}|]/g,et=RegExp(nt.source),rt=/^\s+/,ot=/\s/,it=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ut=/\{\n\/\* \[wrapped with (.+)\] \*/,at=/,? & /,ct=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ft=/[()=,{}\[\]\/\s]/,st=/\\(\\)?/g,lt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pt=/\w*$/,ht=/^[-+]0x[0-9a-f]+$/i,dt=/^0b[01]+$/i,vt=/^\[object .+?Constructor\]$/,gt=/^0o[0-7]+$/i,yt=/^(?:0|[1-9]\d*)$/,_t=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,mt=/($^)/,bt=/['\n\r\u2028\u2029\\]/g,xt="\\ud800-\\udfff",wt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",St="\\u2700-\\u27bf",jt="a-z\\xdf-\\xf6\\xf8-\\xff",Et="A-Z\\xc0-\\xd6\\xd8-\\xde",At="\\ufe0e\\ufe0f",Ct="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ot="["+xt+"]",It="["+Ct+"]",Pt="["+wt+"]",zt="\\d+",Lt="["+St+"]",Tt="["+jt+"]",kt="[^"+xt+Ct+zt+St+jt+Et+"]",Rt="\\ud83c[\\udffb-\\udfff]",Dt="[^"+xt+"]",Nt="(?:\\ud83c[\\udde6-\\uddff]){2}",Mt="[\\ud800-\\udbff][\\udc00-\\udfff]",Bt="["+Et+"]",Wt="\\u200d",Vt="(?:"+Tt+"|"+kt+")",Ft="(?:"+Bt+"|"+kt+")",Ut="(?:['’](?:d|ll|m|re|s|t|ve))?",Ht="(?:['’](?:D|LL|M|RE|S|T|VE))?",Gt="(?:"+Pt+"|"+Rt+")?",Zt="["+At+"]?",qt=Zt+Gt+"(?:"+Wt+"(?:"+[Dt,Nt,Mt].join("|")+")"+Zt+Gt+")*",$t="(?:"+[Lt,Nt,Mt].join("|")+")"+qt,Yt="(?:"+[Dt+Pt+"?",Pt,Nt,Mt,Ot].join("|")+")",Kt=RegExp("['’]","g"),Xt=RegExp(Pt,"g"),Jt=RegExp(Rt+"(?="+Rt+")|"+Yt+qt,"g"),Qt=RegExp([Bt+"?"+Tt+"+"+Ut+"(?="+[It,Bt,"$"].join("|")+")",Ft+"+"+Ht+"(?="+[It,Bt+Vt,"$"].join("|")+")",Bt+"?"+Vt+"+"+Ut,Bt+"+"+Ht,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",zt,$t].join("|"),"g"),tn=RegExp("["+Wt+xt+wt+At+"]"),nn=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,en=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],rn=-1,on={};on[T]=on[k]=on[R]=on[D]=on[N]=on[M]=on[B]=on[W]=on[V]=!0,on[v]=on[g]=on[z]=on[y]=on[L]=on[_]=on[m]=on[b]=on[w]=on[S]=on[j]=on[A]=on[C]=on[O]=on[P]=!1;var un={};un[v]=un[g]=un[z]=un[L]=un[y]=un[_]=un[T]=un[k]=un[R]=un[D]=un[N]=un[w]=un[S]=un[j]=un[A]=un[C]=un[O]=un[I]=un[M]=un[B]=un[W]=un[V]=!0,un[m]=un[b]=un[P]=!1;var an={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},cn=parseFloat,fn=parseInt,sn="object"==typeof e.g&&e.g&&e.g.Object===Object&&e.g,ln="object"==typeof self&&self&&self.Object===Object&&self,pn=sn||ln||Function("return this")(),hn=n&&!n.nodeType&&n,dn=hn&&t&&!t.nodeType&&t,vn=dn&&dn.exports===hn,gn=vn&&sn.process,yn=function(){try{return dn&&dn.require&&dn.require("util").types||gn&&gn.binding&&gn.binding("util")}catch(t){}}(),_n=yn&&yn.isArrayBuffer,mn=yn&&yn.isDate,bn=yn&&yn.isMap,xn=yn&&yn.isRegExp,wn=yn&&yn.isSet,Sn=yn&&yn.isTypedArray;function jn(t,n,e){switch(e.length){case 0:return t.call(n);case 1:return t.call(n,e[0]);case 2:return t.call(n,e[0],e[1]);case 3:return t.call(n,e[0],e[1],e[2])}return t.apply(n,e)}function En(t,n,e,r){for(var o=-1,i=null==t?0:t.length;++o<i;){var u=t[o];n(r,u,e(u),t)}return r}function An(t,n){for(var e=-1,r=null==t?0:t.length;++e<r&&!1!==n(t[e],e,t););return t}function Cn(t,n){for(var e=null==t?0:t.length;e--&&!1!==n(t[e],e,t););return t}function On(t,n){for(var e=-1,r=null==t?0:t.length;++e<r;)if(!n(t[e],e,t))return!1;return!0}function In(t,n){for(var e=-1,r=null==t?0:t.length,o=0,i=[];++e<r;){var u=t[e];n(u,e,t)&&(i[o++]=u)}return i}function Pn(t,n){return!(null==t||!t.length)&&Wn(t,n,0)>-1}function zn(t,n,e){for(var r=-1,o=null==t?0:t.length;++r<o;)if(e(n,t[r]))return!0;return!1}function Ln(t,n){for(var e=-1,r=null==t?0:t.length,o=Array(r);++e<r;)o[e]=n(t[e],e,t);return o}function Tn(t,n){for(var e=-1,r=n.length,o=t.length;++e<r;)t[o+e]=n[e];return t}function kn(t,n,e,r){var o=-1,i=null==t?0:t.length;for(r&&i&&(e=t[++o]);++o<i;)e=n(e,t[o],o,t);return e}function Rn(t,n,e,r){var o=null==t?0:t.length;for(r&&o&&(e=t[--o]);o--;)e=n(e,t[o],o,t);return e}function Dn(t,n){for(var e=-1,r=null==t?0:t.length;++e<r;)if(n(t[e],e,t))return!0;return!1}var Nn=Hn("length");function Mn(t,n,e){var r;return e(t,(function(t,e,o){if(n(t,e,o))return r=e,!1})),r}function Bn(t,n,e,r){for(var o=t.length,i=e+(r?1:-1);r?i--:++i<o;)if(n(t[i],i,t))return i;return-1}function Wn(t,n,e){return n==n?function(t,n,e){for(var r=e-1,o=t.length;++r<o;)if(t[r]===n)return r;return-1}(t,n,e):Bn(t,Fn,e)}function Vn(t,n,e,r){for(var o=e-1,i=t.length;++o<i;)if(r(t[o],n))return o;return-1}function Fn(t){return t!=t}function Un(t,n){var e=null==t?0:t.length;return e?qn(t,n)/e:p}function Hn(t){return function(n){return null==n?o:n[t]}}function Gn(t){return function(n){return null==t?o:t[n]}}function Zn(t,n,e,r,o){return o(t,(function(t,o,i){e=r?(r=!1,t):n(e,t,o,i)})),e}function qn(t,n){for(var e,r=-1,i=t.length;++r<i;){var u=n(t[r]);u!==o&&(e=e===o?u:e+u)}return e}function $n(t,n){for(var e=-1,r=Array(t);++e<t;)r[e]=n(e);return r}function Yn(t){return t?t.slice(0,pe(t)+1).replace(rt,""):t}function Kn(t){return function(n){return t(n)}}function Xn(t,n){return Ln(n,(function(n){return t[n]}))}function Jn(t,n){return t.has(n)}function Qn(t,n){for(var e=-1,r=t.length;++e<r&&Wn(n,t[e],0)>-1;);return e}function te(t,n){for(var e=t.length;e--&&Wn(n,t[e],0)>-1;);return e}var ne=Gn({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),ee=Gn({"&":"&","<":"<",">":">",'"':""","'":"'"});function re(t){return"\\"+an[t]}function oe(t){return tn.test(t)}function ie(t){var n=-1,e=Array(t.size);return t.forEach((function(t,r){e[++n]=[r,t]})),e}function ue(t,n){return function(e){return t(n(e))}}function ae(t,n){for(var e=-1,r=t.length,o=0,i=[];++e<r;){var u=t[e];u!==n&&u!==a||(t[e]=a,i[o++]=e)}return i}function ce(t){var n=-1,e=Array(t.size);return t.forEach((function(t){e[++n]=t})),e}function fe(t){var n=-1,e=Array(t.size);return t.forEach((function(t){e[++n]=[t,t]})),e}function se(t){return oe(t)?function(t){for(var n=Jt.lastIndex=0;Jt.test(t);)++n;return n}(t):Nn(t)}function le(t){return oe(t)?function(t){return t.match(Jt)||[]}(t):function(t){return t.split("")}(t)}function pe(t){for(var n=t.length;n--&&ot.test(t.charAt(n)););return n}var he=Gn({"&":"&","<":"<",">":">",""":'"',"'":"'"}),de=function t(n){var e,r=(n=null==n?pn:de.defaults(pn.Object(),n,de.pick(pn,en))).Array,ot=n.Date,xt=n.Error,wt=n.Function,St=n.Math,jt=n.Object,Et=n.RegExp,At=n.String,Ct=n.TypeError,Ot=r.prototype,It=wt.prototype,Pt=jt.prototype,zt=n["__core-js_shared__"],Lt=It.toString,Tt=Pt.hasOwnProperty,kt=0,Rt=(e=/[^.]+$/.exec(zt&&zt.keys&&zt.keys.IE_PROTO||""))?"Symbol(src)_1."+e:"",Dt=Pt.toString,Nt=Lt.call(jt),Mt=pn._,Bt=Et("^"+Lt.call(Tt).replace(nt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Wt=vn?n.Buffer:o,Vt=n.Symbol,Ft=n.Uint8Array,Ut=Wt?Wt.allocUnsafe:o,Ht=ue(jt.getPrototypeOf,jt),Gt=jt.create,Zt=Pt.propertyIsEnumerable,qt=Ot.splice,$t=Vt?Vt.isConcatSpreadable:o,Yt=Vt?Vt.iterator:o,Jt=Vt?Vt.toStringTag:o,tn=function(){try{var t=fi(jt,"defineProperty");return t({},"",{}),t}catch(t){}}(),an=n.clearTimeout!==pn.clearTimeout&&n.clearTimeout,sn=ot&&ot.now!==pn.Date.now&&ot.now,ln=n.setTimeout!==pn.setTimeout&&n.setTimeout,hn=St.ceil,dn=St.floor,gn=jt.getOwnPropertySymbols,yn=Wt?Wt.isBuffer:o,Nn=n.isFinite,Gn=Ot.join,ve=ue(jt.keys,jt),ge=St.max,ye=St.min,_e=ot.now,me=n.parseInt,be=St.random,xe=Ot.reverse,we=fi(n,"DataView"),Se=fi(n,"Map"),je=fi(n,"Promise"),Ee=fi(n,"Set"),Ae=fi(n,"WeakMap"),Ce=fi(jt,"create"),Oe=Ae&&new Ae,Ie={},Pe=Ni(we),ze=Ni(Se),Le=Ni(je),Te=Ni(Ee),ke=Ni(Ae),Re=Vt?Vt.prototype:o,De=Re?Re.valueOf:o,Ne=Re?Re.toString:o;function Me(t){if(ta(t)&&!Uu(t)&&!(t instanceof Fe)){if(t instanceof Ve)return t;if(Tt.call(t,"__wrapped__"))return Mi(t)}return new Ve(t)}var Be=function(){function t(){}return function(n){if(!Qu(n))return{};if(Gt)return Gt(n);t.prototype=n;var e=new t;return t.prototype=o,e}}();function We(){}function Ve(t,n){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=o}function Fe(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=h,this.__views__=[]}function Ue(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}function He(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}function Ge(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}function Ze(t){var n=-1,e=null==t?0:t.length;for(this.__data__=new Ge;++n<e;)this.add(t[n])}function qe(t){var n=this.__data__=new He(t);this.size=n.size}function $e(t,n){var e=Uu(t),r=!e&&Fu(t),o=!e&&!r&&qu(t),i=!e&&!r&&!o&&ca(t),u=e||r||o||i,a=u?$n(t.length,At):[],c=a.length;for(var f in t)!n&&!Tt.call(t,f)||u&&("length"==f||o&&("offset"==f||"parent"==f)||i&&("buffer"==f||"byteLength"==f||"byteOffset"==f)||gi(f,c))||a.push(f);return a}function Ye(t){var n=t.length;return n?t[Gr(0,n-1)]:o}function Ke(t,n){return Li(Co(t),ir(n,0,t.length))}function Xe(t){return Li(Co(t))}function Je(t,n,e){(e!==o&&!Bu(t[n],e)||e===o&&!(n in t))&&rr(t,n,e)}function Qe(t,n,e){var r=t[n];Tt.call(t,n)&&Bu(r,e)&&(e!==o||n in t)||rr(t,n,e)}function tr(t,n){for(var e=t.length;e--;)if(Bu(t[e][0],n))return e;return-1}function nr(t,n,e,r){return sr(t,(function(t,o,i){n(r,t,e(t),i)})),r}function er(t,n){return t&&Oo(n,Pa(n),t)}function rr(t,n,e){"__proto__"==n&&tn?tn(t,n,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[n]=e}function or(t,n){for(var e=-1,i=n.length,u=r(i),a=null==t;++e<i;)u[e]=a?o:Ea(t,n[e]);return u}function ir(t,n,e){return t==t&&(e!==o&&(t=t<=e?t:e),n!==o&&(t=t>=n?t:n)),t}function ur(t,n,e,r,i,u){var a,c=1&n,f=2&n,s=4&n;if(e&&(a=i?e(t,r,i,u):e(t)),a!==o)return a;if(!Qu(t))return t;var l=Uu(t);if(l){if(a=function(t){var n=t.length,e=new t.constructor(n);return n&&"string"==typeof t[0]&&Tt.call(t,"index")&&(e.index=t.index,e.input=t.input),e}(t),!c)return Co(t,a)}else{var p=pi(t),h=p==b||p==x;if(qu(t))return xo(t,c);if(p==j||p==v||h&&!i){if(a=f||h?{}:di(t),!c)return f?function(t,n){return Oo(t,li(t),n)}(t,function(t,n){return t&&Oo(n,za(n),t)}(a,t)):function(t,n){return Oo(t,si(t),n)}(t,er(a,t))}else{if(!un[p])return i?t:{};a=function(t,n,e){var r,o=t.constructor;switch(n){case z:return wo(t);case y:case _:return new o(+t);case L:return function(t,n){var e=n?wo(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.byteLength)}(t,e);case T:case k:case R:case D:case N:case M:case B:case W:case V:return So(t,e);case w:return new o;case S:case O:return new o(t);case A:return function(t){var n=new t.constructor(t.source,pt.exec(t));return n.lastIndex=t.lastIndex,n}(t);case C:return new o;case I:return r=t,De?jt(De.call(r)):{}}}(t,p,c)}}u||(u=new qe);var d=u.get(t);if(d)return d;u.set(t,a),ia(t)?t.forEach((function(r){a.add(ur(r,n,e,r,t,u))})):na(t)&&t.forEach((function(r,o){a.set(o,ur(r,n,e,o,t,u))}));var g=l?o:(s?f?ei:ni:f?za:Pa)(t);return An(g||t,(function(r,o){g&&(r=t[o=r]),Qe(a,o,ur(r,n,e,o,t,u))})),a}function ar(t,n,e){var r=e.length;if(null==t)return!r;for(t=jt(t);r--;){var i=e[r],u=n[i],a=t[i];if(a===o&&!(i in t)||!u(a))return!1}return!0}function cr(t,n,e){if("function"!=typeof t)throw new Ct(i);return Oi((function(){t.apply(o,e)}),n)}function fr(t,n,e,r){var o=-1,i=Pn,u=!0,a=t.length,c=[],f=n.length;if(!a)return c;e&&(n=Ln(n,Kn(e))),r?(i=zn,u=!1):n.length>=200&&(i=Jn,u=!1,n=new Ze(n));t:for(;++o<a;){var s=t[o],l=null==e?s:e(s);if(s=r||0!==s?s:0,u&&l==l){for(var p=f;p--;)if(n[p]===l)continue t;c.push(s)}else i(n,l,r)||c.push(s)}return c}Me.templateSettings={escape:Y,evaluate:K,interpolate:X,variable:"",imports:{_:Me}},Me.prototype=We.prototype,Me.prototype.constructor=Me,Ve.prototype=Be(We.prototype),Ve.prototype.constructor=Ve,Fe.prototype=Be(We.prototype),Fe.prototype.constructor=Fe,Ue.prototype.clear=function(){this.__data__=Ce?Ce(null):{},this.size=0},Ue.prototype.delete=function(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n},Ue.prototype.get=function(t){var n=this.__data__;if(Ce){var e=n[t];return e===u?o:e}return Tt.call(n,t)?n[t]:o},Ue.prototype.has=function(t){var n=this.__data__;return Ce?n[t]!==o:Tt.call(n,t)},Ue.prototype.set=function(t,n){var e=this.__data__;return this.size+=this.has(t)?0:1,e[t]=Ce&&n===o?u:n,this},He.prototype.clear=function(){this.__data__=[],this.size=0},He.prototype.delete=function(t){var n=this.__data__,e=tr(n,t);return!(e<0||(e==n.length-1?n.pop():qt.call(n,e,1),--this.size,0))},He.prototype.get=function(t){var n=this.__data__,e=tr(n,t);return e<0?o:n[e][1]},He.prototype.has=function(t){return tr(this.__data__,t)>-1},He.prototype.set=function(t,n){var e=this.__data__,r=tr(e,t);return r<0?(++this.size,e.push([t,n])):e[r][1]=n,this},Ge.prototype.clear=function(){this.size=0,this.__data__={hash:new Ue,map:new(Se||He),string:new Ue}},Ge.prototype.delete=function(t){var n=ai(this,t).delete(t);return this.size-=n?1:0,n},Ge.prototype.get=function(t){return ai(this,t).get(t)},Ge.prototype.has=function(t){return ai(this,t).has(t)},Ge.prototype.set=function(t,n){var e=ai(this,t),r=e.size;return e.set(t,n),this.size+=e.size==r?0:1,this},Ze.prototype.add=Ze.prototype.push=function(t){return this.__data__.set(t,u),this},Ze.prototype.has=function(t){return this.__data__.has(t)},qe.prototype.clear=function(){this.__data__=new He,this.size=0},qe.prototype.delete=function(t){var n=this.__data__,e=n.delete(t);return this.size=n.size,e},qe.prototype.get=function(t){return this.__data__.get(t)},qe.prototype.has=function(t){return this.__data__.has(t)},qe.prototype.set=function(t,n){var e=this.__data__;if(e instanceof He){var r=e.__data__;if(!Se||r.length<199)return r.push([t,n]),this.size=++e.size,this;e=this.__data__=new Ge(r)}return e.set(t,n),this.size=e.size,this};var sr=zo(_r),lr=zo(mr,!0);function pr(t,n){var e=!0;return sr(t,(function(t,r,o){return e=!!n(t,r,o)})),e}function hr(t,n,e){for(var r=-1,i=t.length;++r<i;){var u=t[r],a=n(u);if(null!=a&&(c===o?a==a&&!aa(a):e(a,c)))var c=a,f=u}return f}function dr(t,n){var e=[];return sr(t,(function(t,r,o){n(t,r,o)&&e.push(t)})),e}function vr(t,n,e,r,o){var i=-1,u=t.length;for(e||(e=vi),o||(o=[]);++i<u;){var a=t[i];n>0&&e(a)?n>1?vr(a,n-1,e,r,o):Tn(o,a):r||(o[o.length]=a)}return o}var gr=Lo(),yr=Lo(!0);function _r(t,n){return t&&gr(t,n,Pa)}function mr(t,n){return t&&yr(t,n,Pa)}function br(t,n){return In(n,(function(n){return Ku(t[n])}))}function xr(t,n){for(var e=0,r=(n=yo(n,t)).length;null!=t&&e<r;)t=t[Di(n[e++])];return e&&e==r?t:o}function wr(t,n,e){var r=n(t);return Uu(t)?r:Tn(r,e(t))}function Sr(t){return null==t?t===o?"[object Undefined]":"[object Null]":Jt&&Jt in jt(t)?function(t){var n=Tt.call(t,Jt),e=t[Jt];try{t[Jt]=o;var r=!0}catch(t){}var i=Dt.call(t);return r&&(n?t[Jt]=e:delete t[Jt]),i}(t):function(t){return Dt.call(t)}(t)}function jr(t,n){return t>n}function Er(t,n){return null!=t&&Tt.call(t,n)}function Ar(t,n){return null!=t&&n in jt(t)}function Cr(t,n,e){for(var i=e?zn:Pn,u=t[0].length,a=t.length,c=a,f=r(a),s=1/0,l=[];c--;){var p=t[c];c&&n&&(p=Ln(p,Kn(n))),s=ye(p.length,s),f[c]=!e&&(n||u>=120&&p.length>=120)?new Ze(c&&p):o}p=t[0];var h=-1,d=f[0];t:for(;++h<u&&l.length<s;){var v=p[h],g=n?n(v):v;if(v=e||0!==v?v:0,!(d?Jn(d,g):i(l,g,e))){for(c=a;--c;){var y=f[c];if(!(y?Jn(y,g):i(t[c],g,e)))continue t}d&&d.push(g),l.push(v)}}return l}function Or(t,n,e){var r=null==(t=Ei(t,n=yo(n,t)))?t:t[Di(Yi(n))];return null==r?o:jn(r,t,e)}function Ir(t){return ta(t)&&Sr(t)==v}function Pr(t,n,e,r,i){return t===n||(null==t||null==n||!ta(t)&&!ta(n)?t!=t&&n!=n:function(t,n,e,r,i,u){var a=Uu(t),c=Uu(n),f=a?g:pi(t),s=c?g:pi(n),l=(f=f==v?j:f)==j,p=(s=s==v?j:s)==j,h=f==s;if(h&&qu(t)){if(!qu(n))return!1;a=!0,l=!1}if(h&&!l)return u||(u=new qe),a||ca(t)?Qo(t,n,e,r,i,u):function(t,n,e,r,o,i,u){switch(e){case L:if(t.byteLength!=n.byteLength||t.byteOffset!=n.byteOffset)return!1;t=t.buffer,n=n.buffer;case z:return!(t.byteLength!=n.byteLength||!i(new Ft(t),new Ft(n)));case y:case _:case S:return Bu(+t,+n);case m:return t.name==n.name&&t.message==n.message;case A:case O:return t==n+"";case w:var a=ie;case C:var c=1&r;if(a||(a=ce),t.size!=n.size&&!c)return!1;var f=u.get(t);if(f)return f==n;r|=2,u.set(t,n);var s=Qo(a(t),a(n),r,o,i,u);return u.delete(t),s;case I:if(De)return De.call(t)==De.call(n)}return!1}(t,n,f,e,r,i,u);if(!(1&e)){var d=l&&Tt.call(t,"__wrapped__"),b=p&&Tt.call(n,"__wrapped__");if(d||b){var x=d?t.value():t,E=b?n.value():n;return u||(u=new qe),i(x,E,e,r,u)}}return!!h&&(u||(u=new qe),function(t,n,e,r,i,u){var a=1&e,c=ni(t),f=c.length;if(f!=ni(n).length&&!a)return!1;for(var s=f;s--;){var l=c[s];if(!(a?l in n:Tt.call(n,l)))return!1}var p=u.get(t),h=u.get(n);if(p&&h)return p==n&&h==t;var d=!0;u.set(t,n),u.set(n,t);for(var v=a;++s<f;){var g=t[l=c[s]],y=n[l];if(r)var _=a?r(y,g,l,n,t,u):r(g,y,l,t,n,u);if(!(_===o?g===y||i(g,y,e,r,u):_)){d=!1;break}v||(v="constructor"==l)}if(d&&!v){var m=t.constructor,b=n.constructor;m==b||!("constructor"in t)||!("constructor"in n)||"function"==typeof m&&m instanceof m&&"function"==typeof b&&b instanceof b||(d=!1)}return u.delete(t),u.delete(n),d}(t,n,e,r,i,u))}(t,n,e,r,Pr,i))}function zr(t,n,e,r){var i=e.length,u=i,a=!r;if(null==t)return!u;for(t=jt(t);i--;){var c=e[i];if(a&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++i<u;){var f=(c=e[i])[0],s=t[f],l=c[1];if(a&&c[2]){if(s===o&&!(f in t))return!1}else{var p=new qe;if(r)var h=r(s,l,f,t,n,p);if(!(h===o?Pr(l,s,3,r,p):h))return!1}}return!0}function Lr(t){return!(!Qu(t)||(n=t,Rt&&Rt in n))&&(Ku(t)?Bt:vt).test(Ni(t));var n}function Tr(t){return"function"==typeof t?t:null==t?ec:"object"==typeof t?Uu(t)?Mr(t[0],t[1]):Nr(t):lc(t)}function kr(t){if(!xi(t))return ve(t);var n=[];for(var e in jt(t))Tt.call(t,e)&&"constructor"!=e&&n.push(e);return n}function Rr(t,n){return t<n}function Dr(t,n){var e=-1,o=Gu(t)?r(t.length):[];return sr(t,(function(t,r,i){o[++e]=n(t,r,i)})),o}function Nr(t){var n=ci(t);return 1==n.length&&n[0][2]?Si(n[0][0],n[0][1]):function(e){return e===t||zr(e,t,n)}}function Mr(t,n){return _i(t)&&wi(n)?Si(Di(t),n):function(e){var r=Ea(e,t);return r===o&&r===n?Aa(e,t):Pr(n,r,3)}}function Br(t,n,e,r,i){t!==n&&gr(n,(function(u,a){if(i||(i=new qe),Qu(u))!function(t,n,e,r,i,u,a){var c=Ai(t,e),f=Ai(n,e),s=a.get(f);if(s)Je(t,e,s);else{var l=u?u(c,f,e+"",t,n,a):o,p=l===o;if(p){var h=Uu(f),d=!h&&qu(f),v=!h&&!d&&ca(f);l=f,h||d||v?Uu(c)?l=c:Zu(c)?l=Co(c):d?(p=!1,l=xo(f,!0)):v?(p=!1,l=So(f,!0)):l=[]:ra(f)||Fu(f)?(l=c,Fu(c)?l=ga(c):Qu(c)&&!Ku(c)||(l=di(f))):p=!1}p&&(a.set(f,l),i(l,f,r,u,a),a.delete(f)),Je(t,e,l)}}(t,n,a,e,Br,r,i);else{var c=r?r(Ai(t,a),u,a+"",t,n,i):o;c===o&&(c=u),Je(t,a,c)}}),za)}function Wr(t,n){var e=t.length;if(e)return gi(n+=n<0?e:0,e)?t[n]:o}function Vr(t,n,e){n=n.length?Ln(n,(function(t){return Uu(t)?function(n){return xr(n,1===t.length?t[0]:t)}:t})):[ec];var r=-1;n=Ln(n,Kn(ui()));var o=Dr(t,(function(t,e,o){var i=Ln(n,(function(n){return n(t)}));return{criteria:i,index:++r,value:t}}));return function(t){var n=t.length;for(t.sort((function(t,n){return function(t,n,e){for(var r=-1,o=t.criteria,i=n.criteria,u=o.length,a=e.length;++r<u;){var c=jo(o[r],i[r]);if(c)return r>=a?c:c*("desc"==e[r]?-1:1)}return t.index-n.index}(t,n,e)}));n--;)t[n]=t[n].value;return t}(o)}function Fr(t,n,e){for(var r=-1,o=n.length,i={};++r<o;){var u=n[r],a=xr(t,u);e(a,u)&&Kr(i,yo(u,t),a)}return i}function Ur(t,n,e,r){var o=r?Vn:Wn,i=-1,u=n.length,a=t;for(t===n&&(n=Co(n)),e&&(a=Ln(t,Kn(e)));++i<u;)for(var c=0,f=n[i],s=e?e(f):f;(c=o(a,s,c,r))>-1;)a!==t&&qt.call(a,c,1),qt.call(t,c,1);return t}function Hr(t,n){for(var e=t?n.length:0,r=e-1;e--;){var o=n[e];if(e==r||o!==i){var i=o;gi(o)?qt.call(t,o,1):co(t,o)}}return t}function Gr(t,n){return t+dn(be()*(n-t+1))}function Zr(t,n){var e="";if(!t||n<1||n>l)return e;do{n%2&&(e+=t),(n=dn(n/2))&&(t+=t)}while(n);return e}function qr(t,n){return Ii(ji(t,n,ec),t+"")}function $r(t){return Ye(Ba(t))}function Yr(t,n){var e=Ba(t);return Li(e,ir(n,0,e.length))}function Kr(t,n,e,r){if(!Qu(t))return t;for(var i=-1,u=(n=yo(n,t)).length,a=u-1,c=t;null!=c&&++i<u;){var f=Di(n[i]),s=e;if("__proto__"===f||"constructor"===f||"prototype"===f)return t;if(i!=a){var l=c[f];(s=r?r(l,f,c):o)===o&&(s=Qu(l)?l:gi(n[i+1])?[]:{})}Qe(c,f,s),c=c[f]}return t}var Xr=Oe?function(t,n){return Oe.set(t,n),t}:ec,Jr=tn?function(t,n){return tn(t,"toString",{configurable:!0,enumerable:!1,value:Qa(n),writable:!0})}:ec;function Qr(t){return Li(Ba(t))}function to(t,n,e){var o=-1,i=t.length;n<0&&(n=-n>i?0:i+n),(e=e>i?i:e)<0&&(e+=i),i=n>e?0:e-n>>>0,n>>>=0;for(var u=r(i);++o<i;)u[o]=t[o+n];return u}function no(t,n){var e;return sr(t,(function(t,r,o){return!(e=n(t,r,o))})),!!e}function eo(t,n,e){var r=0,o=null==t?r:t.length;if("number"==typeof n&&n==n&&o<=2147483647){for(;r<o;){var i=r+o>>>1,u=t[i];null!==u&&!aa(u)&&(e?u<=n:u<n)?r=i+1:o=i}return o}return ro(t,n,ec,e)}function ro(t,n,e,r){var i=0,u=null==t?0:t.length;if(0===u)return 0;for(var a=(n=e(n))!=n,c=null===n,f=aa(n),s=n===o;i<u;){var l=dn((i+u)/2),p=e(t[l]),h=p!==o,d=null===p,v=p==p,g=aa(p);if(a)var y=r||v;else y=s?v&&(r||h):c?v&&h&&(r||!d):f?v&&h&&!d&&(r||!g):!d&&!g&&(r?p<=n:p<n);y?i=l+1:u=l}return ye(u,4294967294)}function oo(t,n){for(var e=-1,r=t.length,o=0,i=[];++e<r;){var u=t[e],a=n?n(u):u;if(!e||!Bu(a,c)){var c=a;i[o++]=0===u?0:u}}return i}function io(t){return"number"==typeof t?t:aa(t)?p:+t}function uo(t){if("string"==typeof t)return t;if(Uu(t))return Ln(t,uo)+"";if(aa(t))return Ne?Ne.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}function ao(t,n,e){var r=-1,o=Pn,i=t.length,u=!0,a=[],c=a;if(e)u=!1,o=zn;else if(i>=200){var f=n?null:qo(t);if(f)return ce(f);u=!1,o=Jn,c=new Ze}else c=n?[]:a;t:for(;++r<i;){var s=t[r],l=n?n(s):s;if(s=e||0!==s?s:0,u&&l==l){for(var p=c.length;p--;)if(c[p]===l)continue t;n&&c.push(l),a.push(s)}else o(c,l,e)||(c!==a&&c.push(l),a.push(s))}return a}function co(t,n){return null==(t=Ei(t,n=yo(n,t)))||delete t[Di(Yi(n))]}function fo(t,n,e,r){return Kr(t,n,e(xr(t,n)),r)}function so(t,n,e,r){for(var o=t.length,i=r?o:-1;(r?i--:++i<o)&&n(t[i],i,t););return e?to(t,r?0:i,r?i+1:o):to(t,r?i+1:0,r?o:i)}function lo(t,n){var e=t;return e instanceof Fe&&(e=e.value()),kn(n,(function(t,n){return n.func.apply(n.thisArg,Tn([t],n.args))}),e)}function po(t,n,e){var o=t.length;if(o<2)return o?ao(t[0]):[];for(var i=-1,u=r(o);++i<o;)for(var a=t[i],c=-1;++c<o;)c!=i&&(u[i]=fr(u[i]||a,t[c],n,e));return ao(vr(u,1),n,e)}function ho(t,n,e){for(var r=-1,i=t.length,u=n.length,a={};++r<i;){var c=r<u?n[r]:o;e(a,t[r],c)}return a}function vo(t){return Zu(t)?t:[]}function go(t){return"function"==typeof t?t:ec}function yo(t,n){return Uu(t)?t:_i(t,n)?[t]:Ri(ya(t))}var _o=qr;function mo(t,n,e){var r=t.length;return e=e===o?r:e,!n&&e>=r?t:to(t,n,e)}var bo=an||function(t){return pn.clearTimeout(t)};function xo(t,n){if(n)return t.slice();var e=t.length,r=Ut?Ut(e):new t.constructor(e);return t.copy(r),r}function wo(t){var n=new t.constructor(t.byteLength);return new Ft(n).set(new Ft(t)),n}function So(t,n){var e=n?wo(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)}function jo(t,n){if(t!==n){var e=t!==o,r=null===t,i=t==t,u=aa(t),a=n!==o,c=null===n,f=n==n,s=aa(n);if(!c&&!s&&!u&&t>n||u&&a&&f&&!c&&!s||r&&a&&f||!e&&f||!i)return 1;if(!r&&!u&&!s&&t<n||s&&e&&i&&!r&&!u||c&&e&&i||!a&&i||!f)return-1}return 0}function Eo(t,n,e,o){for(var i=-1,u=t.length,a=e.length,c=-1,f=n.length,s=ge(u-a,0),l=r(f+s),p=!o;++c<f;)l[c]=n[c];for(;++i<a;)(p||i<u)&&(l[e[i]]=t[i]);for(;s--;)l[c++]=t[i++];return l}function Ao(t,n,e,o){for(var i=-1,u=t.length,a=-1,c=e.length,f=-1,s=n.length,l=ge(u-c,0),p=r(l+s),h=!o;++i<l;)p[i]=t[i];for(var d=i;++f<s;)p[d+f]=n[f];for(;++a<c;)(h||i<u)&&(p[d+e[a]]=t[i++]);return p}function Co(t,n){var e=-1,o=t.length;for(n||(n=r(o));++e<o;)n[e]=t[e];return n}function Oo(t,n,e,r){var i=!e;e||(e={});for(var u=-1,a=n.length;++u<a;){var c=n[u],f=r?r(e[c],t[c],c,e,t):o;f===o&&(f=t[c]),i?rr(e,c,f):Qe(e,c,f)}return e}function Io(t,n){return function(e,r){var o=Uu(e)?En:nr,i=n?n():{};return o(e,t,ui(r,2),i)}}function Po(t){return qr((function(n,e){var r=-1,i=e.length,u=i>1?e[i-1]:o,a=i>2?e[2]:o;for(u=t.length>3&&"function"==typeof u?(i--,u):o,a&&yi(e[0],e[1],a)&&(u=i<3?o:u,i=1),n=jt(n);++r<i;){var c=e[r];c&&t(n,c,r,u)}return n}))}function zo(t,n){return function(e,r){if(null==e)return e;if(!Gu(e))return t(e,r);for(var o=e.length,i=n?o:-1,u=jt(e);(n?i--:++i<o)&&!1!==r(u[i],i,u););return e}}function Lo(t){return function(n,e,r){for(var o=-1,i=jt(n),u=r(n),a=u.length;a--;){var c=u[t?a:++o];if(!1===e(i[c],c,i))break}return n}}function To(t){return function(n){var e=oe(n=ya(n))?le(n):o,r=e?e[0]:n.charAt(0),i=e?mo(e,1).join(""):n.slice(1);return r[t]()+i}}function ko(t){return function(n){return kn(Ka(Fa(n).replace(Kt,"")),t,"")}}function Ro(t){return function(){var n=arguments;switch(n.length){case 0:return new t;case 1:return new t(n[0]);case 2:return new t(n[0],n[1]);case 3:return new t(n[0],n[1],n[2]);case 4:return new t(n[0],n[1],n[2],n[3]);case 5:return new t(n[0],n[1],n[2],n[3],n[4]);case 6:return new t(n[0],n[1],n[2],n[3],n[4],n[5]);case 7:return new t(n[0],n[1],n[2],n[3],n[4],n[5],n[6])}var e=Be(t.prototype),r=t.apply(e,n);return Qu(r)?r:e}}function Do(t){return function(n,e,r){var i=jt(n);if(!Gu(n)){var u=ui(e,3);n=Pa(n),e=function(t){return u(i[t],t,i)}}var a=t(n,e,r);return a>-1?i[u?n[a]:a]:o}}function No(t){return ti((function(n){var e=n.length,r=e,u=Ve.prototype.thru;for(t&&n.reverse();r--;){var a=n[r];if("function"!=typeof a)throw new Ct(i);if(u&&!c&&"wrapper"==oi(a))var c=new Ve([],!0)}for(r=c?r:e;++r<e;){var f=oi(a=n[r]),s="wrapper"==f?ri(a):o;c=s&&mi(s[0])&&424==s[1]&&!s[4].length&&1==s[9]?c[oi(s[0])].apply(c,s[3]):1==a.length&&mi(a)?c[f]():c.thru(a)}return function(){var t=arguments,r=t[0];if(c&&1==t.length&&Uu(r))return c.plant(r).value();for(var o=0,i=e?n[o].apply(this,t):r;++o<e;)i=n[o].call(this,i);return i}}))}function Mo(t,n,e,i,u,a,c,s,l,p){var h=n&f,d=1&n,v=2&n,g=24&n,y=512&n,_=v?o:Ro(t);return function f(){for(var m=arguments.length,b=r(m),x=m;x--;)b[x]=arguments[x];if(g)var w=ii(f),S=function(t,n){for(var e=t.length,r=0;e--;)t[e]===n&&++r;return r}(b,w);if(i&&(b=Eo(b,i,u,g)),a&&(b=Ao(b,a,c,g)),m-=S,g&&m<p){var j=ae(b,w);return Go(t,n,Mo,f.placeholder,e,b,j,s,l,p-m)}var E=d?e:this,A=v?E[t]:t;return m=b.length,s?b=function(t,n){for(var e=t.length,r=ye(n.length,e),i=Co(t);r--;){var u=n[r];t[r]=gi(u,e)?i[u]:o}return t}(b,s):y&&m>1&&b.reverse(),h&&l<m&&(b.length=l),this&&this!==pn&&this instanceof f&&(A=_||Ro(A)),A.apply(E,b)}}function Bo(t,n){return function(e,r){return function(t,n,e,r){return _r(t,(function(t,o,i){n(r,e(t),o,i)})),r}(e,t,n(r),{})}}function Wo(t,n){return function(e,r){var i;if(e===o&&r===o)return n;if(e!==o&&(i=e),r!==o){if(i===o)return r;"string"==typeof e||"string"==typeof r?(e=uo(e),r=uo(r)):(e=io(e),r=io(r)),i=t(e,r)}return i}}function Vo(t){return ti((function(n){return n=Ln(n,Kn(ui())),qr((function(e){var r=this;return t(n,(function(t){return jn(t,r,e)}))}))}))}function Fo(t,n){var e=(n=n===o?" ":uo(n)).length;if(e<2)return e?Zr(n,t):n;var r=Zr(n,hn(t/se(n)));return oe(n)?mo(le(r),0,t).join(""):r.slice(0,t)}function Uo(t){return function(n,e,i){return i&&"number"!=typeof i&&yi(n,e,i)&&(e=i=o),n=pa(n),e===o?(e=n,n=0):e=pa(e),function(t,n,e,o){for(var i=-1,u=ge(hn((n-t)/(e||1)),0),a=r(u);u--;)a[o?u:++i]=t,t+=e;return a}(n,e,i=i===o?n<e?1:-1:pa(i),t)}}function Ho(t){return function(n,e){return"string"==typeof n&&"string"==typeof e||(n=va(n),e=va(e)),t(n,e)}}function Go(t,n,e,r,i,u,a,f,s,l){var p=8&n;n|=p?c:64,4&(n&=~(p?64:c))||(n&=-4);var h=[t,n,i,p?u:o,p?a:o,p?o:u,p?o:a,f,s,l],d=e.apply(o,h);return mi(t)&&Ci(d,h),d.placeholder=r,Pi(d,t,n)}function Zo(t){var n=St[t];return function(t,e){if(t=va(t),(e=null==e?0:ye(ha(e),292))&&Nn(t)){var r=(ya(t)+"e").split("e");return+((r=(ya(n(r[0]+"e"+(+r[1]+e)))+"e").split("e"))[0]+"e"+(+r[1]-e))}return n(t)}}var qo=Ee&&1/ce(new Ee([,-0]))[1]==s?function(t){return new Ee(t)}:ac;function $o(t){return function(n){var e=pi(n);return e==w?ie(n):e==C?fe(n):function(t,n){return Ln(n,(function(n){return[n,t[n]]}))}(n,t(n))}}function Yo(t,n,e,u,s,l,p,h){var d=2&n;if(!d&&"function"!=typeof t)throw new Ct(i);var v=u?u.length:0;if(v||(n&=-97,u=s=o),p=p===o?p:ge(ha(p),0),h=h===o?h:ha(h),v-=s?s.length:0,64&n){var g=u,y=s;u=s=o}var _=d?o:ri(t),m=[t,n,e,u,s,g,y,l,p,h];if(_&&function(t,n){var e=t[1],r=n[1],o=e|r,i=o<131,u=r==f&&8==e||r==f&&256==e&&t[7].length<=n[8]||384==r&&n[7].length<=n[8]&&8==e;if(!i&&!u)return t;1&r&&(t[2]=n[2],o|=1&e?0:4);var c=n[3];if(c){var s=t[3];t[3]=s?Eo(s,c,n[4]):c,t[4]=s?ae(t[3],a):n[4]}(c=n[5])&&(s=t[5],t[5]=s?Ao(s,c,n[6]):c,t[6]=s?ae(t[5],a):n[6]),(c=n[7])&&(t[7]=c),r&f&&(t[8]=null==t[8]?n[8]:ye(t[8],n[8])),null==t[9]&&(t[9]=n[9]),t[0]=n[0],t[1]=o}(m,_),t=m[0],n=m[1],e=m[2],u=m[3],s=m[4],!(h=m[9]=m[9]===o?d?0:t.length:ge(m[9]-v,0))&&24&n&&(n&=-25),n&&1!=n)b=8==n||16==n?function(t,n,e){var i=Ro(t);return function u(){for(var a=arguments.length,c=r(a),f=a,s=ii(u);f--;)c[f]=arguments[f];var l=a<3&&c[0]!==s&&c[a-1]!==s?[]:ae(c,s);return(a-=l.length)<e?Go(t,n,Mo,u.placeholder,o,c,l,o,o,e-a):jn(this&&this!==pn&&this instanceof u?i:t,this,c)}}(t,n,h):n!=c&&33!=n||s.length?Mo.apply(o,m):function(t,n,e,o){var i=1&n,u=Ro(t);return function n(){for(var a=-1,c=arguments.length,f=-1,s=o.length,l=r(s+c),p=this&&this!==pn&&this instanceof n?u:t;++f<s;)l[f]=o[f];for(;c--;)l[f++]=arguments[++a];return jn(p,i?e:this,l)}}(t,n,e,u);else var b=function(t,n,e){var r=1&n,o=Ro(t);return function n(){return(this&&this!==pn&&this instanceof n?o:t).apply(r?e:this,arguments)}}(t,n,e);return Pi((_?Xr:Ci)(b,m),t,n)}function Ko(t,n,e,r){return t===o||Bu(t,Pt[e])&&!Tt.call(r,e)?n:t}function Xo(t,n,e,r,i,u){return Qu(t)&&Qu(n)&&(u.set(n,t),Br(t,n,o,Xo,u),u.delete(n)),t}function Jo(t){return ra(t)?o:t}function Qo(t,n,e,r,i,u){var a=1&e,c=t.length,f=n.length;if(c!=f&&!(a&&f>c))return!1;var s=u.get(t),l=u.get(n);if(s&&l)return s==n&&l==t;var p=-1,h=!0,d=2&e?new Ze:o;for(u.set(t,n),u.set(n,t);++p<c;){var v=t[p],g=n[p];if(r)var y=a?r(g,v,p,n,t,u):r(v,g,p,t,n,u);if(y!==o){if(y)continue;h=!1;break}if(d){if(!Dn(n,(function(t,n){if(!Jn(d,n)&&(v===t||i(v,t,e,r,u)))return d.push(n)}))){h=!1;break}}else if(v!==g&&!i(v,g,e,r,u)){h=!1;break}}return u.delete(t),u.delete(n),h}function ti(t){return Ii(ji(t,o,Hi),t+"")}function ni(t){return wr(t,Pa,si)}function ei(t){return wr(t,za,li)}var ri=Oe?function(t){return Oe.get(t)}:ac;function oi(t){for(var n=t.name+"",e=Ie[n],r=Tt.call(Ie,n)?e.length:0;r--;){var o=e[r],i=o.func;if(null==i||i==t)return o.name}return n}function ii(t){return(Tt.call(Me,"placeholder")?Me:t).placeholder}function ui(){var t=Me.iteratee||rc;return t=t===rc?Tr:t,arguments.length?t(arguments[0],arguments[1]):t}function ai(t,n){var e,r,o=t.__data__;return("string"==(r=typeof(e=n))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==e:null===e)?o["string"==typeof n?"string":"hash"]:o.map}function ci(t){for(var n=Pa(t),e=n.length;e--;){var r=n[e],o=t[r];n[e]=[r,o,wi(o)]}return n}function fi(t,n){var e=function(t,n){return null==t?o:t[n]}(t,n);return Lr(e)?e:o}var si=gn?function(t){return null==t?[]:(t=jt(t),In(gn(t),(function(n){return Zt.call(t,n)})))}:dc,li=gn?function(t){for(var n=[];t;)Tn(n,si(t)),t=Ht(t);return n}:dc,pi=Sr;function hi(t,n,e){for(var r=-1,o=(n=yo(n,t)).length,i=!1;++r<o;){var u=Di(n[r]);if(!(i=null!=t&&e(t,u)))break;t=t[u]}return i||++r!=o?i:!!(o=null==t?0:t.length)&&Ju(o)&&gi(u,o)&&(Uu(t)||Fu(t))}function di(t){return"function"!=typeof t.constructor||xi(t)?{}:Be(Ht(t))}function vi(t){return Uu(t)||Fu(t)||!!($t&&t&&t[$t])}function gi(t,n){var e=typeof t;return!!(n=null==n?l:n)&&("number"==e||"symbol"!=e&&yt.test(t))&&t>-1&&t%1==0&&t<n}function yi(t,n,e){if(!Qu(e))return!1;var r=typeof n;return!!("number"==r?Gu(e)&&gi(n,e.length):"string"==r&&n in e)&&Bu(e[n],t)}function _i(t,n){if(Uu(t))return!1;var e=typeof t;return!("number"!=e&&"symbol"!=e&&"boolean"!=e&&null!=t&&!aa(t))||Q.test(t)||!J.test(t)||null!=n&&t in jt(n)}function mi(t){var n=oi(t),e=Me[n];if("function"!=typeof e||!(n in Fe.prototype))return!1;if(t===e)return!0;var r=ri(e);return!!r&&t===r[0]}(we&&pi(new we(new ArrayBuffer(1)))!=L||Se&&pi(new Se)!=w||je&&pi(je.resolve())!=E||Ee&&pi(new Ee)!=C||Ae&&pi(new Ae)!=P)&&(pi=function(t){var n=Sr(t),e=n==j?t.constructor:o,r=e?Ni(e):"";if(r)switch(r){case Pe:return L;case ze:return w;case Le:return E;case Te:return C;case ke:return P}return n});var bi=zt?Ku:vc;function xi(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||Pt)}function wi(t){return t==t&&!Qu(t)}function Si(t,n){return function(e){return null!=e&&e[t]===n&&(n!==o||t in jt(e))}}function ji(t,n,e){return n=ge(n===o?t.length-1:n,0),function(){for(var o=arguments,i=-1,u=ge(o.length-n,0),a=r(u);++i<u;)a[i]=o[n+i];i=-1;for(var c=r(n+1);++i<n;)c[i]=o[i];return c[n]=e(a),jn(t,this,c)}}function Ei(t,n){return n.length<2?t:xr(t,to(n,0,-1))}function Ai(t,n){if(("constructor"!==n||"function"!=typeof t[n])&&"__proto__"!=n)return t[n]}var Ci=zi(Xr),Oi=ln||function(t,n){return pn.setTimeout(t,n)},Ii=zi(Jr);function Pi(t,n,e){var r=n+"";return Ii(t,function(t,n){var e=n.length;if(!e)return t;var r=e-1;return n[r]=(e>1?"& ":"")+n[r],n=n.join(e>2?", ":" "),t.replace(it,"{\n/* [wrapped with "+n+"] */\n")}(r,function(t,n){return An(d,(function(e){var r="_."+e[0];n&e[1]&&!Pn(t,r)&&t.push(r)})),t.sort()}(function(t){var n=t.match(ut);return n?n[1].split(at):[]}(r),e)))}function zi(t){var n=0,e=0;return function(){var r=_e(),i=16-(r-e);if(e=r,i>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(o,arguments)}}function Li(t,n){var e=-1,r=t.length,i=r-1;for(n=n===o?r:n;++e<n;){var u=Gr(e,i),a=t[u];t[u]=t[e],t[e]=a}return t.length=n,t}var Ti,ki,Ri=(Ti=Tu((function(t){var n=[];return 46===t.charCodeAt(0)&&n.push(""),t.replace(tt,(function(t,e,r,o){n.push(r?o.replace(st,"$1"):e||t)})),n}),(function(t){return 500===ki.size&&ki.clear(),t})),ki=Ti.cache,Ti);function Di(t){if("string"==typeof t||aa(t))return t;var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}function Ni(t){if(null!=t){try{return Lt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Mi(t){if(t instanceof Fe)return t.clone();var n=new Ve(t.__wrapped__,t.__chain__);return n.__actions__=Co(t.__actions__),n.__index__=t.__index__,n.__values__=t.__values__,n}var Bi=qr((function(t,n){return Zu(t)?fr(t,vr(n,1,Zu,!0)):[]})),Wi=qr((function(t,n){var e=Yi(n);return Zu(e)&&(e=o),Zu(t)?fr(t,vr(n,1,Zu,!0),ui(e,2)):[]})),Vi=qr((function(t,n){var e=Yi(n);return Zu(e)&&(e=o),Zu(t)?fr(t,vr(n,1,Zu,!0),o,e):[]}));function Fi(t,n,e){var r=null==t?0:t.length;if(!r)return-1;var o=null==e?0:ha(e);return o<0&&(o=ge(r+o,0)),Bn(t,ui(n,3),o)}function Ui(t,n,e){var r=null==t?0:t.length;if(!r)return-1;var i=r-1;return e!==o&&(i=ha(e),i=e<0?ge(r+i,0):ye(i,r-1)),Bn(t,ui(n,3),i,!0)}function Hi(t){return null!=t&&t.length?vr(t,1):[]}function Gi(t){return t&&t.length?t[0]:o}var Zi=qr((function(t){var n=Ln(t,vo);return n.length&&n[0]===t[0]?Cr(n):[]})),qi=qr((function(t){var n=Yi(t),e=Ln(t,vo);return n===Yi(e)?n=o:e.pop(),e.length&&e[0]===t[0]?Cr(e,ui(n,2)):[]})),$i=qr((function(t){var n=Yi(t),e=Ln(t,vo);return(n="function"==typeof n?n:o)&&e.pop(),e.length&&e[0]===t[0]?Cr(e,o,n):[]}));function Yi(t){var n=null==t?0:t.length;return n?t[n-1]:o}var Ki=qr(Xi);function Xi(t,n){return t&&t.length&&n&&n.length?Ur(t,n):t}var Ji=ti((function(t,n){var e=null==t?0:t.length,r=or(t,n);return Hr(t,Ln(n,(function(t){return gi(t,e)?+t:t})).sort(jo)),r}));function Qi(t){return null==t?t:xe.call(t)}var tu=qr((function(t){return ao(vr(t,1,Zu,!0))})),nu=qr((function(t){var n=Yi(t);return Zu(n)&&(n=o),ao(vr(t,1,Zu,!0),ui(n,2))})),eu=qr((function(t){var n=Yi(t);return n="function"==typeof n?n:o,ao(vr(t,1,Zu,!0),o,n)}));function ru(t){if(!t||!t.length)return[];var n=0;return t=In(t,(function(t){if(Zu(t))return n=ge(t.length,n),!0})),$n(n,(function(n){return Ln(t,Hn(n))}))}function ou(t,n){if(!t||!t.length)return[];var e=ru(t);return null==n?e:Ln(e,(function(t){return jn(n,o,t)}))}var iu=qr((function(t,n){return Zu(t)?fr(t,n):[]})),uu=qr((function(t){return po(In(t,Zu))})),au=qr((function(t){var n=Yi(t);return Zu(n)&&(n=o),po(In(t,Zu),ui(n,2))})),cu=qr((function(t){var n=Yi(t);return n="function"==typeof n?n:o,po(In(t,Zu),o,n)})),fu=qr(ru),su=qr((function(t){var n=t.length,e=n>1?t[n-1]:o;return e="function"==typeof e?(t.pop(),e):o,ou(t,e)}));function lu(t){var n=Me(t);return n.__chain__=!0,n}function pu(t,n){return n(t)}var hu=ti((function(t){var n=t.length,e=n?t[0]:0,r=this.__wrapped__,i=function(n){return or(n,t)};return!(n>1||this.__actions__.length)&&r instanceof Fe&&gi(e)?((r=r.slice(e,+e+(n?1:0))).__actions__.push({func:pu,args:[i],thisArg:o}),new Ve(r,this.__chain__).thru((function(t){return n&&!t.length&&t.push(o),t}))):this.thru(i)})),du=Io((function(t,n,e){Tt.call(t,e)?++t[e]:rr(t,e,1)})),vu=Do(Fi),gu=Do(Ui);function yu(t,n){return(Uu(t)?An:sr)(t,ui(n,3))}function _u(t,n){return(Uu(t)?Cn:lr)(t,ui(n,3))}var mu=Io((function(t,n,e){Tt.call(t,e)?t[e].push(n):rr(t,e,[n])})),bu=qr((function(t,n,e){var o=-1,i="function"==typeof n,u=Gu(t)?r(t.length):[];return sr(t,(function(t){u[++o]=i?jn(n,t,e):Or(t,n,e)})),u})),xu=Io((function(t,n,e){rr(t,e,n)}));function wu(t,n){return(Uu(t)?Ln:Dr)(t,ui(n,3))}var Su=Io((function(t,n,e){t[e?0:1].push(n)}),(function(){return[[],[]]})),ju=qr((function(t,n){if(null==t)return[];var e=n.length;return e>1&&yi(t,n[0],n[1])?n=[]:e>2&&yi(n[0],n[1],n[2])&&(n=[n[0]]),Vr(t,vr(n,1),[])})),Eu=sn||function(){return pn.Date.now()};function Au(t,n,e){return n=e?o:n,n=t&&null==n?t.length:n,Yo(t,f,o,o,o,o,n)}function Cu(t,n){var e;if("function"!=typeof n)throw new Ct(i);return t=ha(t),function(){return--t>0&&(e=n.apply(this,arguments)),t<=1&&(n=o),e}}var Ou=qr((function(t,n,e){var r=1;if(e.length){var o=ae(e,ii(Ou));r|=c}return Yo(t,r,n,e,o)})),Iu=qr((function(t,n,e){var r=3;if(e.length){var o=ae(e,ii(Iu));r|=c}return Yo(n,r,t,e,o)}));function Pu(t,n,e){var r,u,a,c,f,s,l=0,p=!1,h=!1,d=!0;if("function"!=typeof t)throw new Ct(i);function v(n){var e=r,i=u;return r=u=o,l=n,c=t.apply(i,e)}function g(t){var e=t-s;return s===o||e>=n||e<0||h&&t-l>=a}function y(){var t=Eu();if(g(t))return _(t);f=Oi(y,function(t){var e=n-(t-s);return h?ye(e,a-(t-l)):e}(t))}function _(t){return f=o,d&&r?v(t):(r=u=o,c)}function m(){var t=Eu(),e=g(t);if(r=arguments,u=this,s=t,e){if(f===o)return function(t){return l=t,f=Oi(y,n),p?v(t):c}(s);if(h)return bo(f),f=Oi(y,n),v(s)}return f===o&&(f=Oi(y,n)),c}return n=va(n)||0,Qu(e)&&(p=!!e.leading,a=(h="maxWait"in e)?ge(va(e.maxWait)||0,n):a,d="trailing"in e?!!e.trailing:d),m.cancel=function(){f!==o&&bo(f),l=0,r=s=u=f=o},m.flush=function(){return f===o?c:_(Eu())},m}var zu=qr((function(t,n){return cr(t,1,n)})),Lu=qr((function(t,n,e){return cr(t,va(n)||0,e)}));function Tu(t,n){if("function"!=typeof t||null!=n&&"function"!=typeof n)throw new Ct(i);var e=function(){var r=arguments,o=n?n.apply(this,r):r[0],i=e.cache;if(i.has(o))return i.get(o);var u=t.apply(this,r);return e.cache=i.set(o,u)||i,u};return e.cache=new(Tu.Cache||Ge),e}function ku(t){if("function"!=typeof t)throw new Ct(i);return function(){var n=arguments;switch(n.length){case 0:return!t.call(this);case 1:return!t.call(this,n[0]);case 2:return!t.call(this,n[0],n[1]);case 3:return!t.call(this,n[0],n[1],n[2])}return!t.apply(this,n)}}Tu.Cache=Ge;var Ru=_o((function(t,n){var e=(n=1==n.length&&Uu(n[0])?Ln(n[0],Kn(ui())):Ln(vr(n,1),Kn(ui()))).length;return qr((function(r){for(var o=-1,i=ye(r.length,e);++o<i;)r[o]=n[o].call(this,r[o]);return jn(t,this,r)}))})),Du=qr((function(t,n){var e=ae(n,ii(Du));return Yo(t,c,o,n,e)})),Nu=qr((function(t,n){var e=ae(n,ii(Nu));return Yo(t,64,o,n,e)})),Mu=ti((function(t,n){return Yo(t,256,o,o,o,n)}));function Bu(t,n){return t===n||t!=t&&n!=n}var Wu=Ho(jr),Vu=Ho((function(t,n){return t>=n})),Fu=Ir(function(){return arguments}())?Ir:function(t){return ta(t)&&Tt.call(t,"callee")&&!Zt.call(t,"callee")},Uu=r.isArray,Hu=_n?Kn(_n):function(t){return ta(t)&&Sr(t)==z};function Gu(t){return null!=t&&Ju(t.length)&&!Ku(t)}function Zu(t){return ta(t)&&Gu(t)}var qu=yn||vc,$u=mn?Kn(mn):function(t){return ta(t)&&Sr(t)==_};function Yu(t){if(!ta(t))return!1;var n=Sr(t);return n==m||"[object DOMException]"==n||"string"==typeof t.message&&"string"==typeof t.name&&!ra(t)}function Ku(t){if(!Qu(t))return!1;var n=Sr(t);return n==b||n==x||"[object AsyncFunction]"==n||"[object Proxy]"==n}function Xu(t){return"number"==typeof t&&t==ha(t)}function Ju(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=l}function Qu(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)}function ta(t){return null!=t&&"object"==typeof t}var na=bn?Kn(bn):function(t){return ta(t)&&pi(t)==w};function ea(t){return"number"==typeof t||ta(t)&&Sr(t)==S}function ra(t){if(!ta(t)||Sr(t)!=j)return!1;var n=Ht(t);if(null===n)return!0;var e=Tt.call(n,"constructor")&&n.constructor;return"function"==typeof e&&e instanceof e&&Lt.call(e)==Nt}var oa=xn?Kn(xn):function(t){return ta(t)&&Sr(t)==A},ia=wn?Kn(wn):function(t){return ta(t)&&pi(t)==C};function ua(t){return"string"==typeof t||!Uu(t)&&ta(t)&&Sr(t)==O}function aa(t){return"symbol"==typeof t||ta(t)&&Sr(t)==I}var ca=Sn?Kn(Sn):function(t){return ta(t)&&Ju(t.length)&&!!on[Sr(t)]},fa=Ho(Rr),sa=Ho((function(t,n){return t<=n}));function la(t){if(!t)return[];if(Gu(t))return ua(t)?le(t):Co(t);if(Yt&&t[Yt])return function(t){for(var n,e=[];!(n=t.next()).done;)e.push(n.value);return e}(t[Yt]());var n=pi(t);return(n==w?ie:n==C?ce:Ba)(t)}function pa(t){return t?(t=va(t))===s||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function ha(t){var n=pa(t),e=n%1;return n==n?e?n-e:n:0}function da(t){return t?ir(ha(t),0,h):0}function va(t){if("number"==typeof t)return t;if(aa(t))return p;if(Qu(t)){var n="function"==typeof t.valueOf?t.valueOf():t;t=Qu(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;t=Yn(t);var e=dt.test(t);return e||gt.test(t)?fn(t.slice(2),e?2:8):ht.test(t)?p:+t}function ga(t){return Oo(t,za(t))}function ya(t){return null==t?"":uo(t)}var _a=Po((function(t,n){if(xi(n)||Gu(n))Oo(n,Pa(n),t);else for(var e in n)Tt.call(n,e)&&Qe(t,e,n[e])})),ma=Po((function(t,n){Oo(n,za(n),t)})),ba=Po((function(t,n,e,r){Oo(n,za(n),t,r)})),xa=Po((function(t,n,e,r){Oo(n,Pa(n),t,r)})),wa=ti(or),Sa=qr((function(t,n){t=jt(t);var e=-1,r=n.length,i=r>2?n[2]:o;for(i&&yi(n[0],n[1],i)&&(r=1);++e<r;)for(var u=n[e],a=za(u),c=-1,f=a.length;++c<f;){var s=a[c],l=t[s];(l===o||Bu(l,Pt[s])&&!Tt.call(t,s))&&(t[s]=u[s])}return t})),ja=qr((function(t){return t.push(o,Xo),jn(Ta,o,t)}));function Ea(t,n,e){var r=null==t?o:xr(t,n);return r===o?e:r}function Aa(t,n){return null!=t&&hi(t,n,Ar)}var Ca=Bo((function(t,n,e){null!=n&&"function"!=typeof n.toString&&(n=Dt.call(n)),t[n]=e}),Qa(ec)),Oa=Bo((function(t,n,e){null!=n&&"function"!=typeof n.toString&&(n=Dt.call(n)),Tt.call(t,n)?t[n].push(e):t[n]=[e]}),ui),Ia=qr(Or);function Pa(t){return Gu(t)?$e(t):kr(t)}function za(t){return Gu(t)?$e(t,!0):function(t){if(!Qu(t))return function(t){var n=[];if(null!=t)for(var e in jt(t))n.push(e);return n}(t);var n=xi(t),e=[];for(var r in t)("constructor"!=r||!n&&Tt.call(t,r))&&e.push(r);return e}(t)}var La=Po((function(t,n,e){Br(t,n,e)})),Ta=Po((function(t,n,e,r){Br(t,n,e,r)})),ka=ti((function(t,n){var e={};if(null==t)return e;var r=!1;n=Ln(n,(function(n){return n=yo(n,t),r||(r=n.length>1),n})),Oo(t,ei(t),e),r&&(e=ur(e,7,Jo));for(var o=n.length;o--;)co(e,n[o]);return e})),Ra=ti((function(t,n){return null==t?{}:function(t,n){return Fr(t,n,(function(n,e){return Aa(t,e)}))}(t,n)}));function Da(t,n){if(null==t)return{};var e=Ln(ei(t),(function(t){return[t]}));return n=ui(n),Fr(t,e,(function(t,e){return n(t,e[0])}))}var Na=$o(Pa),Ma=$o(za);function Ba(t){return null==t?[]:Xn(t,Pa(t))}var Wa=ko((function(t,n,e){return n=n.toLowerCase(),t+(e?Va(n):n)}));function Va(t){return Ya(ya(t).toLowerCase())}function Fa(t){return(t=ya(t))&&t.replace(_t,ne).replace(Xt,"")}var Ua=ko((function(t,n,e){return t+(e?"-":"")+n.toLowerCase()})),Ha=ko((function(t,n,e){return t+(e?" ":"")+n.toLowerCase()})),Ga=To("toLowerCase"),Za=ko((function(t,n,e){return t+(e?"_":"")+n.toLowerCase()})),qa=ko((function(t,n,e){return t+(e?" ":"")+Ya(n)})),$a=ko((function(t,n,e){return t+(e?" ":"")+n.toUpperCase()})),Ya=To("toUpperCase");function Ka(t,n,e){return t=ya(t),(n=e?o:n)===o?function(t){return nn.test(t)}(t)?function(t){return t.match(Qt)||[]}(t):function(t){return t.match(ct)||[]}(t):t.match(n)||[]}var Xa=qr((function(t,n){try{return jn(t,o,n)}catch(t){return Yu(t)?t:new xt(t)}})),Ja=ti((function(t,n){return An(n,(function(n){n=Di(n),rr(t,n,Ou(t[n],t))})),t}));function Qa(t){return function(){return t}}var tc=No(),nc=No(!0);function ec(t){return t}function rc(t){return Tr("function"==typeof t?t:ur(t,1))}var oc=qr((function(t,n){return function(e){return Or(e,t,n)}})),ic=qr((function(t,n){return function(e){return Or(t,e,n)}}));function uc(t,n,e){var r=Pa(n),o=br(n,r);null!=e||Qu(n)&&(o.length||!r.length)||(e=n,n=t,t=this,o=br(n,Pa(n)));var i=!(Qu(e)&&"chain"in e&&!e.chain),u=Ku(t);return An(o,(function(e){var r=n[e];t[e]=r,u&&(t.prototype[e]=function(){var n=this.__chain__;if(i||n){var e=t(this.__wrapped__);return(e.__actions__=Co(this.__actions__)).push({func:r,args:arguments,thisArg:t}),e.__chain__=n,e}return r.apply(t,Tn([this.value()],arguments))})})),t}function ac(){}var cc=Vo(Ln),fc=Vo(On),sc=Vo(Dn);function lc(t){return _i(t)?Hn(Di(t)):function(t){return function(n){return xr(n,t)}}(t)}var pc=Uo(),hc=Uo(!0);function dc(){return[]}function vc(){return!1}var gc,yc=Wo((function(t,n){return t+n}),0),_c=Zo("ceil"),mc=Wo((function(t,n){return t/n}),1),bc=Zo("floor"),xc=Wo((function(t,n){return t*n}),1),wc=Zo("round"),Sc=Wo((function(t,n){return t-n}),0);return Me.after=function(t,n){if("function"!=typeof n)throw new Ct(i);return t=ha(t),function(){if(--t<1)return n.apply(this,arguments)}},Me.ary=Au,Me.assign=_a,Me.assignIn=ma,Me.assignInWith=ba,Me.assignWith=xa,Me.at=wa,Me.before=Cu,Me.bind=Ou,Me.bindAll=Ja,Me.bindKey=Iu,Me.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Uu(t)?t:[t]},Me.chain=lu,Me.chunk=function(t,n,e){n=(e?yi(t,n,e):n===o)?1:ge(ha(n),0);var i=null==t?0:t.length;if(!i||n<1)return[];for(var u=0,a=0,c=r(hn(i/n));u<i;)c[a++]=to(t,u,u+=n);return c},Me.compact=function(t){for(var n=-1,e=null==t?0:t.length,r=0,o=[];++n<e;){var i=t[n];i&&(o[r++]=i)}return o},Me.concat=function(){var t=arguments.length;if(!t)return[];for(var n=r(t-1),e=arguments[0],o=t;o--;)n[o-1]=arguments[o];return Tn(Uu(e)?Co(e):[e],vr(n,1))},Me.cond=function(t){var n=null==t?0:t.length,e=ui();return t=n?Ln(t,(function(t){if("function"!=typeof t[1])throw new Ct(i);return[e(t[0]),t[1]]})):[],qr((function(e){for(var r=-1;++r<n;){var o=t[r];if(jn(o[0],this,e))return jn(o[1],this,e)}}))},Me.conforms=function(t){return function(t){var n=Pa(t);return function(e){return ar(e,t,n)}}(ur(t,1))},Me.constant=Qa,Me.countBy=du,Me.create=function(t,n){var e=Be(t);return null==n?e:er(e,n)},Me.curry=function t(n,e,r){var i=Yo(n,8,o,o,o,o,o,e=r?o:e);return i.placeholder=t.placeholder,i},Me.curryRight=function t(n,e,r){var i=Yo(n,16,o,o,o,o,o,e=r?o:e);return i.placeholder=t.placeholder,i},Me.debounce=Pu,Me.defaults=Sa,Me.defaultsDeep=ja,Me.defer=zu,Me.delay=Lu,Me.difference=Bi,Me.differenceBy=Wi,Me.differenceWith=Vi,Me.drop=function(t,n,e){var r=null==t?0:t.length;return r?to(t,(n=e||n===o?1:ha(n))<0?0:n,r):[]},Me.dropRight=function(t,n,e){var r=null==t?0:t.length;return r?to(t,0,(n=r-(n=e||n===o?1:ha(n)))<0?0:n):[]},Me.dropRightWhile=function(t,n){return t&&t.length?so(t,ui(n,3),!0,!0):[]},Me.dropWhile=function(t,n){return t&&t.length?so(t,ui(n,3),!0):[]},Me.fill=function(t,n,e,r){var i=null==t?0:t.length;return i?(e&&"number"!=typeof e&&yi(t,n,e)&&(e=0,r=i),function(t,n,e,r){var i=t.length;for((e=ha(e))<0&&(e=-e>i?0:i+e),(r=r===o||r>i?i:ha(r))<0&&(r+=i),r=e>r?0:da(r);e<r;)t[e++]=n;return t}(t,n,e,r)):[]},Me.filter=function(t,n){return(Uu(t)?In:dr)(t,ui(n,3))},Me.flatMap=function(t,n){return vr(wu(t,n),1)},Me.flatMapDeep=function(t,n){return vr(wu(t,n),s)},Me.flatMapDepth=function(t,n,e){return e=e===o?1:ha(e),vr(wu(t,n),e)},Me.flatten=Hi,Me.flattenDeep=function(t){return null!=t&&t.length?vr(t,s):[]},Me.flattenDepth=function(t,n){return null!=t&&t.length?vr(t,n=n===o?1:ha(n)):[]},Me.flip=function(t){return Yo(t,512)},Me.flow=tc,Me.flowRight=nc,Me.fromPairs=function(t){for(var n=-1,e=null==t?0:t.length,r={};++n<e;){var o=t[n];r[o[0]]=o[1]}return r},Me.functions=function(t){return null==t?[]:br(t,Pa(t))},Me.functionsIn=function(t){return null==t?[]:br(t,za(t))},Me.groupBy=mu,Me.initial=function(t){return null!=t&&t.length?to(t,0,-1):[]},Me.intersection=Zi,Me.intersectionBy=qi,Me.intersectionWith=$i,Me.invert=Ca,Me.invertBy=Oa,Me.invokeMap=bu,Me.iteratee=rc,Me.keyBy=xu,Me.keys=Pa,Me.keysIn=za,Me.map=wu,Me.mapKeys=function(t,n){var e={};return n=ui(n,3),_r(t,(function(t,r,o){rr(e,n(t,r,o),t)})),e},Me.mapValues=function(t,n){var e={};return n=ui(n,3),_r(t,(function(t,r,o){rr(e,r,n(t,r,o))})),e},Me.matches=function(t){return Nr(ur(t,1))},Me.matchesProperty=function(t,n){return Mr(t,ur(n,1))},Me.memoize=Tu,Me.merge=La,Me.mergeWith=Ta,Me.method=oc,Me.methodOf=ic,Me.mixin=uc,Me.negate=ku,Me.nthArg=function(t){return t=ha(t),qr((function(n){return Wr(n,t)}))},Me.omit=ka,Me.omitBy=function(t,n){return Da(t,ku(ui(n)))},Me.once=function(t){return Cu(2,t)},Me.orderBy=function(t,n,e,r){return null==t?[]:(Uu(n)||(n=null==n?[]:[n]),Uu(e=r?o:e)||(e=null==e?[]:[e]),Vr(t,n,e))},Me.over=cc,Me.overArgs=Ru,Me.overEvery=fc,Me.overSome=sc,Me.partial=Du,Me.partialRight=Nu,Me.partition=Su,Me.pick=Ra,Me.pickBy=Da,Me.property=lc,Me.propertyOf=function(t){return function(n){return null==t?o:xr(t,n)}},Me.pull=Ki,Me.pullAll=Xi,Me.pullAllBy=function(t,n,e){return t&&t.length&&n&&n.length?Ur(t,n,ui(e,2)):t},Me.pullAllWith=function(t,n,e){return t&&t.length&&n&&n.length?Ur(t,n,o,e):t},Me.pullAt=Ji,Me.range=pc,Me.rangeRight=hc,Me.rearg=Mu,Me.reject=function(t,n){return(Uu(t)?In:dr)(t,ku(ui(n,3)))},Me.remove=function(t,n){var e=[];if(!t||!t.length)return e;var r=-1,o=[],i=t.length;for(n=ui(n,3);++r<i;){var u=t[r];n(u,r,t)&&(e.push(u),o.push(r))}return Hr(t,o),e},Me.rest=function(t,n){if("function"!=typeof t)throw new Ct(i);return qr(t,n=n===o?n:ha(n))},Me.reverse=Qi,Me.sampleSize=function(t,n,e){return n=(e?yi(t,n,e):n===o)?1:ha(n),(Uu(t)?Ke:Yr)(t,n)},Me.set=function(t,n,e){return null==t?t:Kr(t,n,e)},Me.setWith=function(t,n,e,r){return r="function"==typeof r?r:o,null==t?t:Kr(t,n,e,r)},Me.shuffle=function(t){return(Uu(t)?Xe:Qr)(t)},Me.slice=function(t,n,e){var r=null==t?0:t.length;return r?(e&&"number"!=typeof e&&yi(t,n,e)?(n=0,e=r):(n=null==n?0:ha(n),e=e===o?r:ha(e)),to(t,n,e)):[]},Me.sortBy=ju,Me.sortedUniq=function(t){return t&&t.length?oo(t):[]},Me.sortedUniqBy=function(t,n){return t&&t.length?oo(t,ui(n,2)):[]},Me.split=function(t,n,e){return e&&"number"!=typeof e&&yi(t,n,e)&&(n=e=o),(e=e===o?h:e>>>0)?(t=ya(t))&&("string"==typeof n||null!=n&&!oa(n))&&!(n=uo(n))&&oe(t)?mo(le(t),0,e):t.split(n,e):[]},Me.spread=function(t,n){if("function"!=typeof t)throw new Ct(i);return n=null==n?0:ge(ha(n),0),qr((function(e){var r=e[n],o=mo(e,0,n);return r&&Tn(o,r),jn(t,this,o)}))},Me.tail=function(t){var n=null==t?0:t.length;return n?to(t,1,n):[]},Me.take=function(t,n,e){return t&&t.length?to(t,0,(n=e||n===o?1:ha(n))<0?0:n):[]},Me.takeRight=function(t,n,e){var r=null==t?0:t.length;return r?to(t,(n=r-(n=e||n===o?1:ha(n)))<0?0:n,r):[]},Me.takeRightWhile=function(t,n){return t&&t.length?so(t,ui(n,3),!1,!0):[]},Me.takeWhile=function(t,n){return t&&t.length?so(t,ui(n,3)):[]},Me.tap=function(t,n){return n(t),t},Me.throttle=function(t,n,e){var r=!0,o=!0;if("function"!=typeof t)throw new Ct(i);return Qu(e)&&(r="leading"in e?!!e.leading:r,o="trailing"in e?!!e.trailing:o),Pu(t,n,{leading:r,maxWait:n,trailing:o})},Me.thru=pu,Me.toArray=la,Me.toPairs=Na,Me.toPairsIn=Ma,Me.toPath=function(t){return Uu(t)?Ln(t,Di):aa(t)?[t]:Co(Ri(ya(t)))},Me.toPlainObject=ga,Me.transform=function(t,n,e){var r=Uu(t),o=r||qu(t)||ca(t);if(n=ui(n,4),null==e){var i=t&&t.constructor;e=o?r?new i:[]:Qu(t)&&Ku(i)?Be(Ht(t)):{}}return(o?An:_r)(t,(function(t,r,o){return n(e,t,r,o)})),e},Me.unary=function(t){return Au(t,1)},Me.union=tu,Me.unionBy=nu,Me.unionWith=eu,Me.uniq=function(t){return t&&t.length?ao(t):[]},Me.uniqBy=function(t,n){return t&&t.length?ao(t,ui(n,2)):[]},Me.uniqWith=function(t,n){return n="function"==typeof n?n:o,t&&t.length?ao(t,o,n):[]},Me.unset=function(t,n){return null==t||co(t,n)},Me.unzip=ru,Me.unzipWith=ou,Me.update=function(t,n,e){return null==t?t:fo(t,n,go(e))},Me.updateWith=function(t,n,e,r){return r="function"==typeof r?r:o,null==t?t:fo(t,n,go(e),r)},Me.values=Ba,Me.valuesIn=function(t){return null==t?[]:Xn(t,za(t))},Me.without=iu,Me.words=Ka,Me.wrap=function(t,n){return Du(go(n),t)},Me.xor=uu,Me.xorBy=au,Me.xorWith=cu,Me.zip=fu,Me.zipObject=function(t,n){return ho(t||[],n||[],Qe)},Me.zipObjectDeep=function(t,n){return ho(t||[],n||[],Kr)},Me.zipWith=su,Me.entries=Na,Me.entriesIn=Ma,Me.extend=ma,Me.extendWith=ba,uc(Me,Me),Me.add=yc,Me.attempt=Xa,Me.camelCase=Wa,Me.capitalize=Va,Me.ceil=_c,Me.clamp=function(t,n,e){return e===o&&(e=n,n=o),e!==o&&(e=(e=va(e))==e?e:0),n!==o&&(n=(n=va(n))==n?n:0),ir(va(t),n,e)},Me.clone=function(t){return ur(t,4)},Me.cloneDeep=function(t){return ur(t,5)},Me.cloneDeepWith=function(t,n){return ur(t,5,n="function"==typeof n?n:o)},Me.cloneWith=function(t,n){return ur(t,4,n="function"==typeof n?n:o)},Me.conformsTo=function(t,n){return null==n||ar(t,n,Pa(n))},Me.deburr=Fa,Me.defaultTo=function(t,n){return null==t||t!=t?n:t},Me.divide=mc,Me.endsWith=function(t,n,e){t=ya(t),n=uo(n);var r=t.length,i=e=e===o?r:ir(ha(e),0,r);return(e-=n.length)>=0&&t.slice(e,i)==n},Me.eq=Bu,Me.escape=function(t){return(t=ya(t))&&$.test(t)?t.replace(Z,ee):t},Me.escapeRegExp=function(t){return(t=ya(t))&&et.test(t)?t.replace(nt,"\\$&"):t},Me.every=function(t,n,e){var r=Uu(t)?On:pr;return e&&yi(t,n,e)&&(n=o),r(t,ui(n,3))},Me.find=vu,Me.findIndex=Fi,Me.findKey=function(t,n){return Mn(t,ui(n,3),_r)},Me.findLast=gu,Me.findLastIndex=Ui,Me.findLastKey=function(t,n){return Mn(t,ui(n,3),mr)},Me.floor=bc,Me.forEach=yu,Me.forEachRight=_u,Me.forIn=function(t,n){return null==t?t:gr(t,ui(n,3),za)},Me.forInRight=function(t,n){return null==t?t:yr(t,ui(n,3),za)},Me.forOwn=function(t,n){return t&&_r(t,ui(n,3))},Me.forOwnRight=function(t,n){return t&&mr(t,ui(n,3))},Me.get=Ea,Me.gt=Wu,Me.gte=Vu,Me.has=function(t,n){return null!=t&&hi(t,n,Er)},Me.hasIn=Aa,Me.head=Gi,Me.identity=ec,Me.includes=function(t,n,e,r){t=Gu(t)?t:Ba(t),e=e&&!r?ha(e):0;var o=t.length;return e<0&&(e=ge(o+e,0)),ua(t)?e<=o&&t.indexOf(n,e)>-1:!!o&&Wn(t,n,e)>-1},Me.indexOf=function(t,n,e){var r=null==t?0:t.length;if(!r)return-1;var o=null==e?0:ha(e);return o<0&&(o=ge(r+o,0)),Wn(t,n,o)},Me.inRange=function(t,n,e){return n=pa(n),e===o?(e=n,n=0):e=pa(e),function(t,n,e){return t>=ye(n,e)&&t<ge(n,e)}(t=va(t),n,e)},Me.invoke=Ia,Me.isArguments=Fu,Me.isArray=Uu,Me.isArrayBuffer=Hu,Me.isArrayLike=Gu,Me.isArrayLikeObject=Zu,Me.isBoolean=function(t){return!0===t||!1===t||ta(t)&&Sr(t)==y},Me.isBuffer=qu,Me.isDate=$u,Me.isElement=function(t){return ta(t)&&1===t.nodeType&&!ra(t)},Me.isEmpty=function(t){if(null==t)return!0;if(Gu(t)&&(Uu(t)||"string"==typeof t||"function"==typeof t.splice||qu(t)||ca(t)||Fu(t)))return!t.length;var n=pi(t);if(n==w||n==C)return!t.size;if(xi(t))return!kr(t).length;for(var e in t)if(Tt.call(t,e))return!1;return!0},Me.isEqual=function(t,n){return Pr(t,n)},Me.isEqualWith=function(t,n,e){var r=(e="function"==typeof e?e:o)?e(t,n):o;return r===o?Pr(t,n,o,e):!!r},Me.isError=Yu,Me.isFinite=function(t){return"number"==typeof t&&Nn(t)},Me.isFunction=Ku,Me.isInteger=Xu,Me.isLength=Ju,Me.isMap=na,Me.isMatch=function(t,n){return t===n||zr(t,n,ci(n))},Me.isMatchWith=function(t,n,e){return e="function"==typeof e?e:o,zr(t,n,ci(n),e)},Me.isNaN=function(t){return ea(t)&&t!=+t},Me.isNative=function(t){if(bi(t))throw new xt("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Lr(t)},Me.isNil=function(t){return null==t},Me.isNull=function(t){return null===t},Me.isNumber=ea,Me.isObject=Qu,Me.isObjectLike=ta,Me.isPlainObject=ra,Me.isRegExp=oa,Me.isSafeInteger=function(t){return Xu(t)&&t>=-9007199254740991&&t<=l},Me.isSet=ia,Me.isString=ua,Me.isSymbol=aa,Me.isTypedArray=ca,Me.isUndefined=function(t){return t===o},Me.isWeakMap=function(t){return ta(t)&&pi(t)==P},Me.isWeakSet=function(t){return ta(t)&&"[object WeakSet]"==Sr(t)},Me.join=function(t,n){return null==t?"":Gn.call(t,n)},Me.kebabCase=Ua,Me.last=Yi,Me.lastIndexOf=function(t,n,e){var r=null==t?0:t.length;if(!r)return-1;var i=r;return e!==o&&(i=(i=ha(e))<0?ge(r+i,0):ye(i,r-1)),n==n?function(t,n,e){for(var r=e+1;r--;)if(t[r]===n)return r;return r}(t,n,i):Bn(t,Fn,i,!0)},Me.lowerCase=Ha,Me.lowerFirst=Ga,Me.lt=fa,Me.lte=sa,Me.max=function(t){return t&&t.length?hr(t,ec,jr):o},Me.maxBy=function(t,n){return t&&t.length?hr(t,ui(n,2),jr):o},Me.mean=function(t){return Un(t,ec)},Me.meanBy=function(t,n){return Un(t,ui(n,2))},Me.min=function(t){return t&&t.length?hr(t,ec,Rr):o},Me.minBy=function(t,n){return t&&t.length?hr(t,ui(n,2),Rr):o},Me.stubArray=dc,Me.stubFalse=vc,Me.stubObject=function(){return{}},Me.stubString=function(){return""},Me.stubTrue=function(){return!0},Me.multiply=xc,Me.nth=function(t,n){return t&&t.length?Wr(t,ha(n)):o},Me.noConflict=function(){return pn._===this&&(pn._=Mt),this},Me.noop=ac,Me.now=Eu,Me.pad=function(t,n,e){t=ya(t);var r=(n=ha(n))?se(t):0;if(!n||r>=n)return t;var o=(n-r)/2;return Fo(dn(o),e)+t+Fo(hn(o),e)},Me.padEnd=function(t,n,e){t=ya(t);var r=(n=ha(n))?se(t):0;return n&&r<n?t+Fo(n-r,e):t},Me.padStart=function(t,n,e){t=ya(t);var r=(n=ha(n))?se(t):0;return n&&r<n?Fo(n-r,e)+t:t},Me.parseInt=function(t,n,e){return e||null==n?n=0:n&&(n=+n),me(ya(t).replace(rt,""),n||0)},Me.random=function(t,n,e){if(e&&"boolean"!=typeof e&&yi(t,n,e)&&(n=e=o),e===o&&("boolean"==typeof n?(e=n,n=o):"boolean"==typeof t&&(e=t,t=o)),t===o&&n===o?(t=0,n=1):(t=pa(t),n===o?(n=t,t=0):n=pa(n)),t>n){var r=t;t=n,n=r}if(e||t%1||n%1){var i=be();return ye(t+i*(n-t+cn("1e-"+((i+"").length-1))),n)}return Gr(t,n)},Me.reduce=function(t,n,e){var r=Uu(t)?kn:Zn,o=arguments.length<3;return r(t,ui(n,4),e,o,sr)},Me.reduceRight=function(t,n,e){var r=Uu(t)?Rn:Zn,o=arguments.length<3;return r(t,ui(n,4),e,o,lr)},Me.repeat=function(t,n,e){return n=(e?yi(t,n,e):n===o)?1:ha(n),Zr(ya(t),n)},Me.replace=function(){var t=arguments,n=ya(t[0]);return t.length<3?n:n.replace(t[1],t[2])},Me.result=function(t,n,e){var r=-1,i=(n=yo(n,t)).length;for(i||(i=1,t=o);++r<i;){var u=null==t?o:t[Di(n[r])];u===o&&(r=i,u=e),t=Ku(u)?u.call(t):u}return t},Me.round=wc,Me.runInContext=t,Me.sample=function(t){return(Uu(t)?Ye:$r)(t)},Me.size=function(t){if(null==t)return 0;if(Gu(t))return ua(t)?se(t):t.length;var n=pi(t);return n==w||n==C?t.size:kr(t).length},Me.snakeCase=Za,Me.some=function(t,n,e){var r=Uu(t)?Dn:no;return e&&yi(t,n,e)&&(n=o),r(t,ui(n,3))},Me.sortedIndex=function(t,n){return eo(t,n)},Me.sortedIndexBy=function(t,n,e){return ro(t,n,ui(e,2))},Me.sortedIndexOf=function(t,n){var e=null==t?0:t.length;if(e){var r=eo(t,n);if(r<e&&Bu(t[r],n))return r}return-1},Me.sortedLastIndex=function(t,n){return eo(t,n,!0)},Me.sortedLastIndexBy=function(t,n,e){return ro(t,n,ui(e,2),!0)},Me.sortedLastIndexOf=function(t,n){if(null!=t&&t.length){var e=eo(t,n,!0)-1;if(Bu(t[e],n))return e}return-1},Me.startCase=qa,Me.startsWith=function(t,n,e){return t=ya(t),e=null==e?0:ir(ha(e),0,t.length),n=uo(n),t.slice(e,e+n.length)==n},Me.subtract=Sc,Me.sum=function(t){return t&&t.length?qn(t,ec):0},Me.sumBy=function(t,n){return t&&t.length?qn(t,ui(n,2)):0},Me.template=function(t,n,e){var r=Me.templateSettings;e&&yi(t,n,e)&&(n=o),t=ya(t),n=ba({},n,r,Ko);var i,u,a=ba({},n.imports,r.imports,Ko),c=Pa(a),f=Xn(a,c),s=0,l=n.interpolate||mt,p="__p += '",h=Et((n.escape||mt).source+"|"+l.source+"|"+(l===X?lt:mt).source+"|"+(n.evaluate||mt).source+"|$","g"),d="//# sourceURL="+(Tt.call(n,"sourceURL")?(n.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++rn+"]")+"\n";t.replace(h,(function(n,e,r,o,a,c){return r||(r=o),p+=t.slice(s,c).replace(bt,re),e&&(i=!0,p+="' +\n__e("+e+") +\n'"),a&&(u=!0,p+="';\n"+a+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),s=c+n.length,n})),p+="';\n";var v=Tt.call(n,"variable")&&n.variable;if(v){if(ft.test(v))throw new xt("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(u?p.replace(F,""):p).replace(U,"$1").replace(H,"$1;"),p="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(u?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var g=Xa((function(){return wt(c,d+"return "+p).apply(o,f)}));if(g.source=p,Yu(g))throw g;return g},Me.times=function(t,n){if((t=ha(t))<1||t>l)return[];var e=h,r=ye(t,h);n=ui(n),t-=h;for(var o=$n(r,n);++e<t;)n(e);return o},Me.toFinite=pa,Me.toInteger=ha,Me.toLength=da,Me.toLower=function(t){return ya(t).toLowerCase()},Me.toNumber=va,Me.toSafeInteger=function(t){return t?ir(ha(t),-9007199254740991,l):0===t?t:0},Me.toString=ya,Me.toUpper=function(t){return ya(t).toUpperCase()},Me.trim=function(t,n,e){if((t=ya(t))&&(e||n===o))return Yn(t);if(!t||!(n=uo(n)))return t;var r=le(t),i=le(n);return mo(r,Qn(r,i),te(r,i)+1).join("")},Me.trimEnd=function(t,n,e){if((t=ya(t))&&(e||n===o))return t.slice(0,pe(t)+1);if(!t||!(n=uo(n)))return t;var r=le(t);return mo(r,0,te(r,le(n))+1).join("")},Me.trimStart=function(t,n,e){if((t=ya(t))&&(e||n===o))return t.replace(rt,"");if(!t||!(n=uo(n)))return t;var r=le(t);return mo(r,Qn(r,le(n))).join("")},Me.truncate=function(t,n){var e=30,r="...";if(Qu(n)){var i="separator"in n?n.separator:i;e="length"in n?ha(n.length):e,r="omission"in n?uo(n.omission):r}var u=(t=ya(t)).length;if(oe(t)){var a=le(t);u=a.length}if(e>=u)return t;var c=e-se(r);if(c<1)return r;var f=a?mo(a,0,c).join(""):t.slice(0,c);if(i===o)return f+r;if(a&&(c+=f.length-c),oa(i)){if(t.slice(c).search(i)){var s,l=f;for(i.global||(i=Et(i.source,ya(pt.exec(i))+"g")),i.lastIndex=0;s=i.exec(l);)var p=s.index;f=f.slice(0,p===o?c:p)}}else if(t.indexOf(uo(i),c)!=c){var h=f.lastIndexOf(i);h>-1&&(f=f.slice(0,h))}return f+r},Me.unescape=function(t){return(t=ya(t))&&q.test(t)?t.replace(G,he):t},Me.uniqueId=function(t){var n=++kt;return ya(t)+n},Me.upperCase=$a,Me.upperFirst=Ya,Me.each=yu,Me.eachRight=_u,Me.first=Gi,uc(Me,(gc={},_r(Me,(function(t,n){Tt.call(Me.prototype,n)||(gc[n]=t)})),gc),{chain:!1}),Me.VERSION="4.17.21",An(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Me[t].placeholder=Me})),An(["drop","take"],(function(t,n){Fe.prototype[t]=function(e){e=e===o?1:ge(ha(e),0);var r=this.__filtered__&&!n?new Fe(this):this.clone();return r.__filtered__?r.__takeCount__=ye(e,r.__takeCount__):r.__views__.push({size:ye(e,h),type:t+(r.__dir__<0?"Right":"")}),r},Fe.prototype[t+"Right"]=function(n){return this.reverse()[t](n).reverse()}})),An(["filter","map","takeWhile"],(function(t,n){var e=n+1,r=1==e||3==e;Fe.prototype[t]=function(t){var n=this.clone();return n.__iteratees__.push({iteratee:ui(t,3),type:e}),n.__filtered__=n.__filtered__||r,n}})),An(["head","last"],(function(t,n){var e="take"+(n?"Right":"");Fe.prototype[t]=function(){return this[e](1).value()[0]}})),An(["initial","tail"],(function(t,n){var e="drop"+(n?"":"Right");Fe.prototype[t]=function(){return this.__filtered__?new Fe(this):this[e](1)}})),Fe.prototype.compact=function(){return this.filter(ec)},Fe.prototype.find=function(t){return this.filter(t).head()},Fe.prototype.findLast=function(t){return this.reverse().find(t)},Fe.prototype.invokeMap=qr((function(t,n){return"function"==typeof t?new Fe(this):this.map((function(e){return Or(e,t,n)}))})),Fe.prototype.reject=function(t){return this.filter(ku(ui(t)))},Fe.prototype.slice=function(t,n){t=ha(t);var e=this;return e.__filtered__&&(t>0||n<0)?new Fe(e):(t<0?e=e.takeRight(-t):t&&(e=e.drop(t)),n!==o&&(e=(n=ha(n))<0?e.dropRight(-n):e.take(n-t)),e)},Fe.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Fe.prototype.toArray=function(){return this.take(h)},_r(Fe.prototype,(function(t,n){var e=/^(?:filter|find|map|reject)|While$/.test(n),r=/^(?:head|last)$/.test(n),i=Me[r?"take"+("last"==n?"Right":""):n],u=r||/^find/.test(n);i&&(Me.prototype[n]=function(){var n=this.__wrapped__,a=r?[1]:arguments,c=n instanceof Fe,f=a[0],s=c||Uu(n),l=function(t){var n=i.apply(Me,Tn([t],a));return r&&p?n[0]:n};s&&e&&"function"==typeof f&&1!=f.length&&(c=s=!1);var p=this.__chain__,h=!!this.__actions__.length,d=u&&!p,v=c&&!h;if(!u&&s){n=v?n:new Fe(this);var g=t.apply(n,a);return g.__actions__.push({func:pu,args:[l],thisArg:o}),new Ve(g,p)}return d&&v?t.apply(this,a):(g=this.thru(l),d?r?g.value()[0]:g.value():g)})})),An(["pop","push","shift","sort","splice","unshift"],(function(t){var n=Ot[t],e=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);Me.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var o=this.value();return n.apply(Uu(o)?o:[],t)}return this[e]((function(e){return n.apply(Uu(e)?e:[],t)}))}})),_r(Fe.prototype,(function(t,n){var e=Me[n];if(e){var r=e.name+"";Tt.call(Ie,r)||(Ie[r]=[]),Ie[r].push({name:n,func:e})}})),Ie[Mo(o,2).name]=[{name:"wrapper",func:o}],Fe.prototype.clone=function(){var t=new Fe(this.__wrapped__);return t.__actions__=Co(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Co(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Co(this.__views__),t},Fe.prototype.reverse=function(){if(this.__filtered__){var t=new Fe(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Fe.prototype.value=function(){var t=this.__wrapped__.value(),n=this.__dir__,e=Uu(t),r=n<0,o=e?t.length:0,i=function(t,n,e){for(var r=-1,o=e.length;++r<o;){var i=e[r],u=i.size;switch(i.type){case"drop":t+=u;break;case"dropRight":n-=u;break;case"take":n=ye(n,t+u);break;case"takeRight":t=ge(t,n-u)}}return{start:t,end:n}}(0,o,this.__views__),u=i.start,a=i.end,c=a-u,f=r?a:u-1,s=this.__iteratees__,l=s.length,p=0,h=ye(c,this.__takeCount__);if(!e||!r&&o==c&&h==c)return lo(t,this.__actions__);var d=[];t:for(;c--&&p<h;){for(var v=-1,g=t[f+=n];++v<l;){var y=s[v],_=y.iteratee,m=y.type,b=_(g);if(2==m)g=b;else if(!b){if(1==m)continue t;break t}}d[p++]=g}return d},Me.prototype.at=hu,Me.prototype.chain=function(){return lu(this)},Me.prototype.commit=function(){return new Ve(this.value(),this.__chain__)},Me.prototype.next=function(){this.__values__===o&&(this.__values__=la(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?o:this.__values__[this.__index__++]}},Me.prototype.plant=function(t){for(var n,e=this;e instanceof We;){var r=Mi(e);r.__index__=0,r.__values__=o,n?i.__wrapped__=r:n=r;var i=r;e=e.__wrapped__}return i.__wrapped__=t,n},Me.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Fe){var n=t;return this.__actions__.length&&(n=new Fe(this)),(n=n.reverse()).__actions__.push({func:pu,args:[Qi],thisArg:o}),new Ve(n,this.__chain__)}return this.thru(Qi)},Me.prototype.toJSON=Me.prototype.valueOf=Me.prototype.value=function(){return lo(this.__wrapped__,this.__actions__)},Me.prototype.first=Me.prototype.head,Yt&&(Me.prototype[Yt]=function(){return this}),Me}();pn._=de,(r=function(){return de}.call(n,e,n,t))===o||(t.exports=r)}.call(this)}},n={};function e(r){var o=n[r];if(void 0!==o)return o.exports;var i=n[r]={id:r,loaded:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),e.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),(()=>{"use strict";var t,n=(t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)},function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),r=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),Object.defineProperty(e,"WEB_COMPONENT_TAG_NAME",{get:function(){return e._WEB_COMPONENT_TAG_NAME},set:function(t){t&&"string"==typeof t&&(e._WEB_COMPONENT_TAG_NAME=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"CANVAS_SIZE",{get:function(){return e._CANVAS_SIZE},set:function(t){t&&(null==t?void 0:t.width)&&(null==t?void 0:t.height)?e._CANVAS_SIZE=t:console.warn("CANVAS_SIZE denied")},enumerable:!1,configurable:!0}),Object.defineProperty(e,"LAYERS",{get:function(){return e._LAYERS},set:function(t){t&&(null==t?void 0:t.length)&&(e._LAYERS=t)},enumerable:!1,configurable:!0}),e}((function(){}));r._CANVAS_SIZE={width:300,height:150},r._WEB_COMPONENT_TAG_NAME="canvas-editor-engine",r._LAYERS=[{name:"low",index:1},{name:"normal",index:2},{name:"high",index:3}];const o=r,i=function(){function t(){}return t.getTemplate=function(t,n){var e={tag:"div"};n&&Object.keys(n).forEach((function(t){n[t]&&(e[t]=n[t])}));var r=document.createElement(e.tag);return e&&Object.keys(e).forEach((function(t){e[t]&&"tag"!==t&&(r[t]=e[t])})),t&&(r.innerHTML=t),r},t.getStyle=function(t){if(0==!!t)return null;var n=document.createElement("style");return n.type="text/css",n.appendChild(document.createTextNode(t)),n},t}(),u=function(){function t(){}return Object.defineProperty(t,"components",{get:function(){return t.getMethods("components")},enumerable:!1,configurable:!0}),Object.defineProperty(t,"services",{get:function(){return t.getMethods("services")},enumerable:!1,configurable:!0}),Object.defineProperty(t,"planed",{get:function(){return t.getMethods("planed")},enumerable:!1,configurable:!0}),t.getMethods=function(n){return{add:function(e){t._add(n,e)},get:function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];t._get.apply(t,n)}}},t._add=function(n,e){t.log[n].push(e)},t._get=function(n,e){return t.log[n].find((function(t){return t.info.name===e}))},t.log={components:[],services:[],planed:[]},t}(),a=function(){function t(){}return t.getLayerIndex=function(n){var e=o.LAYERS.find((function(t){return t.name===n}));return t.multiplier*e.index},t.multiplier=1e3,t}();var c=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}();const f=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return c(n,t),n.getComponent=function(){var t=n.getTemplate(n.template),e=n.getStyle(n.css);return n.canvas=t.getElementsByTagName("canvas")[0],n.canvas.width=o.CANVAS_SIZE.width,n.canvas.height=o.CANVAS_SIZE.height,n.ctx=n.canvas.getContext("2d",{willReadFrequently:!0}),n.eventListener=t.querySelector("#event-listener"),n.eventListener.style.width=o.CANVAS_SIZE.width+"px",n.eventListener.style.height=o.CANVAS_SIZE.height+"px",{canvasTemplate:t,canvasStyle:e}},n.getCanvasSelector=function(){return"#sc-canvas"},Object.defineProperty(n,"cursorStyle",{set:function(t){t?(n._cursorStyle.before=n._cursorStyle.current,n._cursorStyle.current=t,n.eventListener.style.cursor=t):n.eventListener.style.cursor="default"},enumerable:!1,configurable:!0}),n.getCursorPosition=function(t){var e=n.canvas.getBoundingClientRect();return{x:t.clientX-e.left,y:t.clientY-e.top}},n.subscribe=function(t,e){n.subscriptions[t].push(e)},n.simulateSubscriptions=function(){Object.keys(n.subscriptions).forEach((function(t){var e=n.subscriptions[t];e.length&&n.eventListener.addEventListener(t,(function(t){var r=n.getCursorPosition(t);e.forEach((function(n){n(t,r)}))}))}))},n.template='\n <div id="event-listener"></div>\n <canvas id="sc-canvas"></canvas>\n ',n.css="\n #event-listener {\n position: absolute;\n z-index: ".concat(a.getLayerIndex("normal"),";\n }\n "),n.subscriptions={click:[],mousemove:[],mousedown:[],mouseup:[]},n._cursorStyle={before:null,current:"default"},u.components.add({info:{name:"canvas",description:"canvas component"},prototype:n}),n}(i),s=function(){function t(){}return t.add=function(n){return t.registry.find((function(t){return t.id===n.id}))?(console.warn("Tool has been previously registered!"),!1):(t.registry.push(n),!0)},t.setActive=function(n){var e,r,o;if((null===(e=t.active)||void 0===e?void 0:e.id)===n)return console.warn("Tool is already active");(null===(r=t.active)||void 0===r?void 0:r.offAction)&&t.active.offAction();var i=t.registry.find((function(t){return t.id===n}));i?(t.active=i,(null===(o=t.active)||void 0===o?void 0:o.onAction)&&t.active.onAction()):console.warn("Tool has not previously been registered with this identifier")},t.offActive=function(n){if(n){if(t.active.id!==n)return console.warn('ID active tool is not "'.concat(n,'"'));t.off()}else t.off()},t.off=function(){var n;(null===(n=t.active)||void 0===n?void 0:n.offAction)&&t.active.offAction(),t.before=t.active,t.active=null,f.cursorStyle="default"},t.before=null,t.active=null,t.registry=[],t}();var l=function(){function t(){}return t.byteRGBToHEX=function(n){var e=n[0],r=n[1],o=n[2];return t.rgbToHex(e,r,o)},t.rgbToHex=function(n,e,r){return"#".concat(t.componentToHEX(n)).concat(t.componentToHEX(e)).concat(t.componentToHEX(r))},t.hexToRgb=function(t){var n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return n?{r:parseInt(n[1],16),g:parseInt(n[2],16),b:parseInt(n[3],16)}:null},t.componentToHEX=function(t){var n=t.toString(16);return 1==n.length?"0"+n:n},t}(),p=e(543),h=function(){function t(t){this.ctx=t}return t.prototype.setImageSize=function(t){this.imageSize=t},t.prototype.copy=function(t){var n=(null==t?void 0:t.width)?t.width:o.CANVAS_SIZE.width,e=(null==t?void 0:t.height)?t.height:o.CANVAS_SIZE.height;return this.ctx.getImageData(t.x,t.y,n,e)},t.prototype.copyExtendedModel=function(t){var n=(null==t?void 0:t.width)?t.width:o.CANVAS_SIZE.width,e=(null==t?void 0:t.height)?t.height:o.CANVAS_SIZE.height,r=this.ctx.getImageData(t.x,t.y,n,e);return this.clearEmptyPixels(r)},t.prototype.update=function(t,n){this.ctx.clearRect(0,0,o.CANVAS_SIZE.width,o.CANVAS_SIZE.height),this.ctx.putImageData(t,n.x,n.y)},t.prototype.clearEmptyPixels=function(t){var n=this.getRowRGBABuff(t),e=this.getRGBAMatrix(n,{width:t.width,height:t.height}),r={width:t.width,height:t.height},o=this.getSizeOfSparseMatrix(e,r),i=n.filter((function(t){return!!t[3]})),u=i.flat(),a=document.createElement("canvas").getContext("2d").createImageData(o.width,o.height);return u.forEach((function(t,n){return a.data[n]=u[n]})),console.log("cleared",i),{imageData:a,size:o}},t.prototype.getSizeOfSparseMatrix=function(t,n){for(var e,r,o,i,u=0,a=t.entries();u<a.length;u++){for(var c=a[u],f=c[0],s=0,l=c[1].entries();s<l.length;s++){var p=l[s],h=p[0];if(0!==p[1][3]){e=h,r=f;break}}if(void 0!==e&&void 0!==r)break}for(var d=0,v=t.reverse().entries();d<v.length;d++){for(var g=v[d],y=(f=g[0],0),_=g[1].reverse().entries();y<_.length;y++){var m=_[y];if(h=m[0],0!==m[1][3]){o=h,i=f;break}}if(void 0!==o&&void 0!==i)break}var b,x;return{width:(x=n.width,x-(e+o)),height:(b=n.height,b-(r+i))}},t.prototype.getBuffCollection=function(t){var n=this.getRowRGBABuff(t),e=n.map(l.byteRGBToHEX);return{rowRGBABuff:n,hexBuff:e,buff:this.getBuff(e)}},t.prototype.getBuff=function(t){var n=this,e=(0,p.range)(0,this.imageSize.height).map((function(t){return n.imageSize.width*t})),r=[],o=0;return t.forEach((function(t,n){var i;n>=e[o+1]&&o++,null!==(i=r[o])&&void 0!==i||(r[o]=[]),r[o].push(t)})),r},t.prototype.getRGBAMatrix=function(t,n){var e={width:n.width||this.imageSize.width,height:n.height||this.imageSize.height},r=(0,p.range)(0,e.height).map((function(t){return e.width*t})),o=[],i=0;return t.forEach((function(t,n){var e;n>=r[i+1]&&i++,null!==(e=o[i])&&void 0!==e||(o[i]=[]),o[i].push(t)})),o},t.prototype.getRowRGBABuff=function(t){var n=[],e=0,r=0;return t.data.forEach((function(t){var o;e>=4&&(e=0,r++),e++,null!==(o=n[r])&&void 0!==o||(n[r]=[]),n[r].push(t)})),n},t}();const d=function(){function t(){}return t.current=function(){var t=b.store.historyState.historyLines;return t[t.length-1]},t.prev=function(){var t=b.store.historyState.historyLines;return t[t.length-2]},t.undo=function(n){var e=t.current(),r=t.prev();(null==e?void 0:e.stateValue)&&(t.cache.unshift(e),b.store.historyState.reduce("UNDO"),(null==r?void 0:r.stateValue)&&t.updateCanvas(n,r.stateValue))},t.redo=function(n){var e=t.cache.shift();(null==e?void 0:e.stateValue)&&(b.store.historyState.reduce("REDO",e),t.updateCanvas(n,e.stateValue))},t.clearCache=function(){t.cache=[]},t.recovery=function(n){b.store.historyState.reduce("SET_HISTORY",{historyLines:n.state.history}),t.cache=n.state.cache},t.updateCanvas=function(t,n){new h(t).update(n.tempImageData,n.position)},t.cache=[],t}();var v=function(){function t(){this.default={historyLines:[]},this._historyLines=this.default.historyLines,this.reset()}return Object.defineProperty(t.prototype,"historyLines",{get:function(){return this._historyLines},enumerable:!1,configurable:!0}),t.prototype.reduce=function(t,n){var e=new g(this);switch(t){case"SET_HISTORY":e.setHistoryLines(n),d.clearCache();break;case"UPDATE_HISTORY":e.updateHistoryLines(n),d.clearCache();break;case"REDO":e.updateHistoryLines(n);break;case"UNDO":e.popHistoryLines()}},t.prototype.emerge=function(t){this._emergeCompleteIt=t},t.prototype.reset=function(){this.reduce("SET_HISTORY",this.default)},t}(),g=function(){function t(t){this.state=t}return t.prototype.setHistoryLines=function(t){var n=!1;(null==t?void 0:t.historyLines)&&(this.state._historyLines=t.historyLines,n=!0),n&&this.state._emergeCompleteIt&&this.state._emergeCompleteIt(this.state._historyLines)},t.prototype.updateHistoryLines=function(t){var n=!1;(null==t?void 0:t.view)&&(this.state._historyLines.push(t),n=!0),n&&this.state._emergeCompleteIt&&this.state._emergeCompleteIt(this.state._historyLines)},t.prototype.popHistoryLines=function(){this.state._historyLines.pop(),this.state._emergeCompleteIt&&this.state._emergeCompleteIt(this.state._historyLines)},t}(),y=function(){function t(){this.default={position:{x:0,y:0},size:{width:0,height:0},tempImageData:null},this._position=this.default.position,this._size=this.default.size,this._tempImageData=this.default.tempImageData,this.reset()}return Object.defineProperty(t.prototype,"position",{get:function(){return this._position},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tempImageData",{get:function(){return this._tempImageData},enumerable:!1,configurable:!0}),t.prototype.reduce=function(t,n){var e=!1;(null==t?void 0:t.position)&&(this._position=t.position),(null==t?void 0:t.size)&&(this._size=t.size),(null==t?void 0:t.tempImageData)&&(this._tempImageData=t.tempImageData,e=!0),e&&this.addToHistory("".concat(n||"reduce image"))},t.prototype.reset=function(){this.reduce(this.default,"reset to default")},t.prototype.getEntry=function(){return{position:this._position,size:this._size,imageData:this._tempImageData}},t.prototype.addToHistory=function(t){var n={position:this._position,size:this._size,tempImageData:this._tempImageData};b.store.historyState.reduce("UPDATE_HISTORY",{view:t,stateName:"image",stateValue:n})},t}(),_=function(){function t(t,n){this.imageState=t,this.historyState=n}return t.prototype.reset=function(){this.imageState.reset(),this.historyState.reset()},t}(),m=function(){function t(){}return t.subscribe=function(n,e){"history"===n&&t.store.historyState.emerge(e)},t}();m.store=new _(new y,new v);const b=m,x=function(){function t(){}return t.setup=function(){S.additionStyle="crop"},t.crop=function(n){var e;if(0!=!!(null===(e=S.excretionsCoords)||void 0===e?void 0:e.length)){var r=new h(n),i=t.options,u=r.copyExtendedModel(i),a=u.imageData,c=u.size,f={x:o.CANVAS_SIZE.width/2-c.width/2,y:o.CANVAS_SIZE.height/2-c.height/2};r.update(a,f),b.store.imageState.reduce({tempImageData:a,position:f,size:{width:c.width,height:c.height}},"Use crop")}},t.viewCropButton=function(){var t=S.excretionWrap.querySelectorAll(".crop-button");t[t.length-1].classList.add("crop-button--view")},Object.defineProperty(t,"options",{get:function(){var t=S.excretionsCoords.length-1,n=S.excretionsCoords[t],e=Math.abs(n.start.x-n.end.x),r=Math.abs(n.start.y-n.end.y);return{x:n.start.x,y:n.start.y,width:e,height:r}},enumerable:!1,configurable:!0}),t}();var w=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}();const S=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return w(n,t),Object.defineProperty(n,"additionStyle",{get:function(){return n._additionStyle},set:function(t){n._additionStyle=t,n.applyExcretionStyle()},enumerable:!1,configurable:!0}),n.applyExcretionStyle=function(){"crop"===n._additionStyle?n.determineCropStyle():n.determineDefaultStyle()},n.determineCropStyle=function(){n._excretions.forEach((function(t){0!=!!t&&(t.classList.contains("excretion_crop")||(t.classList.add("excretion_crop"),x.viewCropButton()))}))},n.determineDefaultStyle=function(){n._excretions.forEach((function(t){0!=!!t&&(t.classList=n._excretionDefaultStyle)}))},n.getComponent=function(){var t=n.getTemplate(n.template,{className:"excretions-wrap"}),e=n.getStyle(n.css);return n.excretionWrap=t,n.emmit(),{excretionsTemplate:t,excretionsStyle:e}},Object.defineProperty(n,"excretionState",{set:function(t){switch(n._excretionState=t,n.applyExcretionStyle(),t){case"abandoned":default:f.cursorStyle="default";break;case"create":f.cursorStyle="crosshair";break;case"add":f.cursorStyle="copy";break;case"remove":f.cursorStyle="alias"}},enumerable:!1,configurable:!0}),n.setToolState=function(t){switch(n._excretionToolState=t,t){case"abandoned":default:n.excretionState="abandoned",n._excretionActivity="abandoned";break;case"taken":n.excretionState="create"}},n.clearExcretionsCoords=function(){console.log("clear!"),n._excretions.forEach((function(t){return t.remove()})),n._excretions=[],n.excretionsCoords=[]},n.getTempCoords=function(){var t=n._tempCoords[0],e=n._tempCoords[1],r=Object.assign(t,e);return n._tempCoords=[],r},n.endExcretion=function(){var t=n.getTempCoords();n.excretionsCoords.push(t),n._excretionActivity="end",console.log("ExcretionsComponent.excretionsCoords",n.excretionsCoords)},n.emmit=function(){f.subscribe("mousedown",(function(t,e){if("abandoned"!==n._excretionToolState){var r=n._excretionState;if("create"===r){var o={className:n._excretionDefaultStyle[0]},i=n.getTemplate(n.templateExcretion,o);n.clearExcretionsCoords();var u={start:e};i.style.left="".concat(u.start.x,"px"),i.style.top="".concat(u.start.y,"px");var a=n.excretionWrap.appendChild(i);n._excretions.push(a),n._tempCoords.push(u)}"add"===r&&(u={start:e},n._tempCoords.push(u)),n.applyExcretionStyle(),n._excretionActivity="active"}})),f.subscribe("mousemove",(function(t,e){if("abandoned"!==n._excretionToolState){var r=n._excretionActivity;if(t.altKey&&"abandoned"!==n._excretionState&&(n._excretionState="add"),"abandoned"!==r&&"active"===r){var o=n._excretions.length-1,i=n._excretions[o],u=+i.style.left.split("px")[0],a=+i.style.top.split("px")[0],c=Math.abs(e.x-u),f=Math.abs(e.y-a);i.style.width=c+"px",i.style.height=f+"px";var s=e.x>u&&e.y>a,l=e.x<u&&e.y>a,p=e.x<u&&e.y<a,h=e.x>u&&e.y<a;s?i.style.transform="translateX(0px) translateY(0px)":l?i.style.transform="translateX(-".concat(c,"px) translateY(0px)"):p?i.style.transform="translateX(-".concat(c,"px) translateY(-").concat(f,"px)"):h&&(i.style.transform="translateX(0px) translateY(-".concat(f,"px)"))}}})),f.subscribe("mouseup",(function(t,e){if("abandoned"!==n._excretionToolState){var r=n._excretionState;if("abandoned"!==r&&("create"===r||"add"===r)){var o={end:e};n._tempCoords.push(o),n.endExcretion()}}}))},n.template="",n.templateExcretion='\n <button type="button" class="crop-button">\n <svg fill="#ffffff" viewBox="0 0 1920 1920" xmlns="http://www.w3.org/2000/svg" stroke="#ffffff"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <path fill-rule="evenodd" clip-rule="evenodd" d="M426.667 0h106.666v1386.67H1920v106.66H426.667V0zM320 426.667H0v106.666h320V426.667zm320 0v106.666h746.67V1280h106.66V426.667H640zM1493.33 1600h-106.66v320h106.66v-320z"></path> </g></svg>\n </button>\n ',n._excretionDefaultStyle=["excretion"],n.css="\n .excretion {\n display: flex;\n position: absolute;\n background-image: linear-gradient(90deg, silver 50%, transparent 50%), linear-gradient(90deg, silver 50%, transparent 50%), linear-gradient(0deg, silver 50%, transparent 50%), linear-gradient(0deg, silver 50%, transparent 50%);\n background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;\n background-size: 8px 1px, 8px 1px, 1px 8px, 1px 8px;\n background-position: left top, right bottom, left bottom, right top;\n animation: border-dance 1s infinite linear;\n z-index: ".concat(a.getLayerIndex("low"),";\n }\n\n .excretion_crop {\n box-shadow: 0px 0px 0px calc(100vw + 100vh) #50505070;\n }\n\n .crop-button {\n display: none;\n justify-content: center;\n align-items: center;\n position: absolute;\n padding: 5px;\n right: -35px;\n top: 0;\n background: #232222;\n border: 1px solid #ffffff50;\n border-radius: 4px;\n width: 30px;\n height: 30px;\n cursor: pointer;\n z-index: ").concat(a.getLayerIndex("high"),";\n }\n\n .crop-button--view {\n display: flex;\n }\n\n @keyframes border-dance {\n 0% {\n background-position: left top, right bottom, left bottom, right top;\n }\n 100% {\n background-position: left 8px top, right 8px bottom, left bottom 8px, right top 8px;\n }\n }\n "),n._excretions=[],n._excretionState="abandoned",n._excretionActivity="abandoned",n._excretionToolState="abandoned",n._tempCoords=[],n.excretionsCoords=[],n._additionStyle="default",n.tool={id:1,name:"excretion",onAction:function(){return n.setToolState("taken")},offAction:function(){return n.setToolState("abandoned")},support:function(){n.clearExcretionsCoords(),n.additionStyle="default"}},s.add(n.tool),u.components.add({info:{name:"excretion",description:"excretion component"},prototype:n}),n}(i);var j=function(){function t(){this.stack=[]}return t.prototype.generate=function(){return this.Guid4},Object.defineProperty(t.prototype,"finite",{get:function(){var t,n=this.stack[null===(t=this.stack)||void 0===t?void 0:t.length];if(n)return n;throw new Error("Guid4 not generate")},enumerable:!1,configurable:!0}),t.prototype.generateWithFactor=function(t){var n=this.getFactor(this.guid4);t.use("withError").run(n)},t.prototype.getFactor=function(t){var n=this;return function(e){t=n.Guid4,n.stack.includes(t)||(e.current=e.max,n.stack.push(t))}},Object.defineProperty(t.prototype,"attempt",{get:function(){return new E({current:1,max:5},{message:"[Fatal Error] Guid4 module cannot generate unique guid4"})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Guid4",{get:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,this.formating)},enumerable:!1,configurable:!0}),t.prototype.formating=function(t){var n=16*Math.random()|0;return("x"==t?n:3&n|8).toString(16)},t}(),E=function(){function t(t,n){this._attempt=t,n&&(this._error=n)}return t.prototype.use=function(t){void 0===t&&(t="default");var n=this;switch(t){case"default":return{run:function(t){n.defaultRun(t)}};case"withError":return{run:function(t){n.withErrorRun(t)}}}},t.prototype.defaultRun=function(t){for(var n=this._attempt.current<=this._attempt.max;n;)t(this._attempt),this._attempt.current++},t.prototype.withErrorRun=function(t){for(var n=this._attempt.current<=this._attempt.max,e=this._attempt.current===this._attempt.max,r=this._error.message;n;)this.throwError(e,r),t(this._attempt),this._attempt.current++},t.prototype.throwError=function(t,n){if(t)throw new Error(n)},t}(),A=function(){return A=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},A.apply(this,arguments)};const C=function(){function t(){}return t.subcribe=function(n){var e=A({id:(new j).generate()},n);t.eventList.push(e)},t.dispatch=function(n,e){t.eventList.find((function(t){return t.name===n})).action(e)},t.applyEvents=function(n){var e;null===(e=t.eventList)||void 0===e||e.forEach((function(t){n.addEventListener(t.name,t.action)}))},t.eventList=[],t}();var O=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}();const I=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return O(n,t),n.getComponent=function(){var t=n.getTemplate(n.template,{className:"loading-wrapper"}),e=n.getStyle(n.css);return n.loading=t,n.subscribeLoadingStart(),n.subscribeLoadingEnd(),{loadingTemplate:t,loadingStyle:e}},n.hide=function(){n.loading.style.display="none"},n.view=function(){n.loading.style.display="flex"},n.subscribeLoadingStart=function(){var t={name:"loading-start",action:function(){return n.view()}};C.subcribe(t)},n.subscribeLoadingEnd=function(){var t={name:"loading-end",action:function(){return n.hide()}};C.subcribe(t)},n.template='\n <span class="loader"></span>\n ',n.css='\n .loading-wrapper {\n display: none; \n justify-content: center;\n align-items: center;\n position: absolute;\n width: 100%;\n height: 100%;\n background: #ffffff30;\n }\n\n .loader {\n width: 48px;\n height: 48px;\n border-radius: 50%;\n position: relative;\n animation: rotate 1s linear infinite\n }\n .loader::before , .loader::after {\n content: "";\n box-sizing: border-box;\n position: absolute;\n inset: 0px;\n border-radius: 50%;\n border: 5px solid #FFF;\n animation: prixClipFix 2s linear infinite ;\n }\n .loader::after{\n inset: 8px;\n transform: rotate3d(90, 90, 0, 180deg );\n border-color: #FF3D00;\n }\n\n @keyframes rotate {\n 0% {transform: rotate(0deg)}\n 100% {transform: rotate(360deg)}\n }\n\n @keyframes prixClipFix {\n 0% {clip-path:polygon(50% 50%,0 0,0 0,0 0,0 0,0 0)}\n 50% {clip-path:polygon(50% 50%,0 0,100% 0,100% 0,100% 0,100% 0)}\n 75%, 100% {clip-path:polygon(50% 50%,0 0,100% 0,100% 100%,100% 100%,100% 100%)}\n }\n ',u.components.add({info:{name:"loading",description:"loading component"},prototype:n}),n}(i);var P=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}();const z=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return P(n,t),Object.defineProperty(n,"pipetteColor",{get:function(){return n._pipetteColor},set:function(t){n._pipetteColor=t,n._pipetteColorElement.style.borderColor=n._pipetteColor},enumerable:!1,configurable:!0}),n.getComponent=function(){var t=n.getTemplate(n.template,{className:"pipette"}),e=n.getStyle(n.css);return n.pipette=t,n._pipetteColorElement=t.querySelector(".pipette_color"),n.emmit(),{pipetteTemplate:t,pipetteStyle:e}},n.setState=function(t){switch(n._pipetteState=t,t){case"abandoned":default:return n.hide();case"taken":case"selected-color":return n.show()}},n.emmit=function(){f.subscribe("mousemove",(function(t,e){var r=n._pipetteState;if("taken"===r||"selected-color"===r){var o=e.x,i=e.y;n.pipette.style.left="".concat(o+10,"px"),n.pipette.style.top="".concat(i+10,"px")}})),f.subscribe("click",(function(t,e){var r=n._pipetteState;"taken"!==r&&"selected-color"!==r||(console.log("pipetteState",r),"taken"===r&&(n.setColorFromChoosenPixel(e),n.setState("selected-color")),"selected-color"===r&&n.setColorFromChoosenPixel(e))}))},n.setColorFromChoosenPixel=function(t){var e=t.x,r=t.y,o=f.ctx.getImageData(e,r,1,1).data,i=l.rgbToHex(o[0],o[1],o[2]);n.pipetteColor=i},n.show=function(){n.pipette.style.display="flex",f.cursorStyle="default"},n.hide=function(){n.pipette.style.display="none",f.cursorStyle="default"},n.template='\n <div class="pipette_border-out">\n <div class="pipette_color">\n <div class="pipette_border-in">\n <svg width="24px" height="24px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"><path d="M17 12C17 14.7614 14.7614 17 12 17M17 12C17 9.23858 14.7614 7 12 7M17 12H19M12 17C9.23858 17 7 14.7614 7 12M12 17V19M7 12C7 9.23858 9.23858 7 12 7M7 12H5M12 7V5M14 12C14 13.1046 13.1046 14 12 14C10.8954 14 10 13.1046 10 12C10 10.8954 10.8954 10 12 10C13.1046 10 14 10.8954 14 12Z" stroke="#d9d9d9" stroke-linecap="round" stroke-linejoin="round"></path></g></svg>\n </div> \n </div>\n </div>\n ',n.css="\n .pipette {\n position: absolute;\n display: none;\n justify-content: center;\n align-items: center;\n width: 48px;\n height: 48px;\n }\n\n .pipette_border-out {\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 100px;\n border: solid 2px #d9d9d9;\n width: 44px;\n height: 44px;\n }\n\n .pipette_border-in {\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 100px;\n border: solid 1px #d9d9d9;\n width: 32px;\n height: 32px;\n }\n\n .pipette_color {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 34px;\n height: 34px;\n border-radius: 100px;\n border-color: blue;\n border-style: solid;\n border-width: 5px;\n }\n ",n._pipetteState="abandoned",n.tool={id:0,name:"pipette",onAction:function(){return n.setState("taken")},offAction:function(){return n.setState("abandoned")}},s.add(n.tool),u.components.add({info:{name:"pipette",description:"pipette component"},prototype:n}),n}(i);var L=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}();const T=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return L(n,t),n.getComponent=function(t){var e=n.getTemplate(n.template,{className:"slot-wrapper"}),r=n.getStyle(n.css);return n.slot=e.querySelector("slot"),n.slot.name=t,{slotTemplate:e,slotStyle:r}},n.template='\n <slot class="slot"></slot>\n ',n.css="",u.components.add({info:{name:"slot",description:"slot component"},prototype:n}),n}(i);var k=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),R=function(){function t(){var t=document.createElement("div");t.className="wc-editor",t.style.position="relative",t.style.display="flex",t.style.overflow="hidden";var n=document.createElement("div");n.className="styles-wrap";var e=document.createElement("div");e.className="editor-wrap",e.style.position="relative",e.style.display="flex",e.style.overflow="hidden";var r=document.createElement("div");r.className="tools-wrap",r.style.position="relative",r.style.display="flex",t.appendChild(n),t.appendChild(e),t.appendChild(r),this.baseElement=t,this.stylesWrapElement=n,this.editorWrapElement=e,this.toolsWrapElement=r,this._baseStyle()}return Object.defineProperty(t.prototype,"base",{get:function(){return this._methods(this.baseElement)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"editorWrap",{get:function(){return this._methods(this.editorWrapElement)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"stylesWrap",{get:function(){return this._methods(this.stylesWrapElement)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"toolsWrap",{get:function(){return this._methods(this.toolsWrapElement)},enumerable:!1,configurable:!0}),t.prototype._methods=function(t){var n=this;return{add:function(e,r){return n._add(t,e,r)}}},t.prototype._add=function(t,n,e){var r=t.appendChild(n);return e&&this.stylesWrapElement.appendChild(e),r},t.prototype._baseStyle=function(){var t=document.createElement("style");t.innerHTML="\n * {\n user-select: none;\n }\n ",this.stylesWrapElement.appendChild(t)},t}();const D=function(t){function n(){var n=t.call(this)||this,e=n.attachShadow({mode:"open"}),r=new R,o=f.getComponent(),i=o.canvasTemplate,u=o.canvasStyle,a=r.editorWrap.add(i,u),c=z.getComponent(),s=c.pipetteTemplate,l=c.pipetteStyle;r.editorWrap.add(s,l);var p=T.getComponent("tools"),h=p.slotTemplate,d=p.slotStyle;r.toolsWrap.add(h,d);var v=S.getComponent(),g=v.excretionsTemplate,y=v.excretionsStyle;r.editorWrap.add(g,y);var _=I.getComponent(),m=_.loadingTemplate,b=_.loadingStyle;return r.editorWrap.add(m,b),e.appendChild(r.baseElement),f.simulateSubscriptions(),C.applyEvents(r.baseElement),n.addEventListener("initial",(function(){n.dispatchEvent(new CustomEvent("get-editor-element",{detail:{editorElement:a,canvasSelector:f.getCanvasSelector()}}))})),n}return k(n,t),n}(HTMLElement);var N=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}();const M=function(t){function n(n,e){var r=t.call(this,n)||this;return r.filterList=["pixel"],r.options=e,r}return N(n,t),n.prototype.on=function(t,n){var e=this;return new Promise((function(r){var o=e.options,i=e.copy(o),u=e[t](i,n);return e.update(u,o),r({imageData:u,position:{x:o.x,y:o.y},size:{width:u.width,height:u.height},quality:n.quality})}))},n.prototype.pixel=function(t,n){var e=n.quality;console.log("quality",e);var r=this.getQualityProcessedRemainder(t,+e),o={width:r.width,height:r.height};console.log("imageSize",o),this.setImageSize(o);var i=this.getBuffCollection(r),u=i.rowRGBABuff,a=i.buff,c=this.getQualityBuff(a,+e),f=c.qualityBuff,s=c.rangeCommit,p=this.getMostCommonQuanlityBuff(f,s).flat();if(u.length>=p.length){var h=p.map((function(t,n){var e=l.hexToRgb(t);return[e.r,e.g,e.b,u[n][3]]}));h.flat().forEach((function(t,n){r.data[n]=t}))}return r},n.prototype.getQualityProcessedRemainder=function(t,n){var e=this.getRowRGBABuff(t),r=this.getRGBAMatrix(e,{width:t.width,height:t.height}),o=n-t.width%n,i=n-t.height%n,u=(0,p.range)(0,o),a=(0,p.range)(0,i),c={width:t.width+o,height:t.height+i},f=r[0].length-1;r.forEach((function(t,n){var e=t[f];u.forEach((function(){return r[n].push(e)}))}));var s=r.length-1,l=r[s];a.forEach((function(){return r.push(l)}));var h=r.flat(2),d=document.createElement("canvas").getContext("2d").createImageData(c.width,c.height);return h.forEach((function(t,n){return d.data[n]=h[n]})),d},n.prototype.getQualityBuff=function(t,n){var e=Math.floor(this.imageSize.width/n),r=Math.floor(this.imageSize.height/n),o=[],i=[],u=0,a=0,c=n,f=0,s=n;return(0,p.range)(0,r).forEach((function(r){(0,p.range)(0,e).forEach((function(e){var r,l,h=(0,p.range)(f,s),d=(0,p.range)(a,c),v=[],g=[];h.forEach((function(n){d.forEach((function(e){v.push(t[n][e]),g.push({y:n,x:e})}))})),a+=n,c+=n,null!==(r=i[u])&&void 0!==r||(i[u]=g),null!==(l=o[u])&&void 0!==l||(o[u]=v),u++})),a=0,c=n,f+=n,s+=n})),{qualityBuff:o,rangeCommit:i}},n.prototype.getMostCommonQuanlityBuff=function(t,n){var e=this,r=[];return t.map((function(t){var n=e.getMostCommonElement(t);return t.map((function(){return n}))})).forEach((function(t,e){t.forEach((function(t,o){var i,u,a,c=n[e][o],f=c.x,s=c.y;null!==(i=r[s])&&void 0!==i||(r[s]=[]),null!==(u=(a=r[s])[f])&&void 0!==u||(a[f]=t)}))})),r},n.prototype.getMostCommonElement=function(t){var n=t.sort((function(n,e){return t.filter((function(t){return t===n})).length-t.filter((function(t){return t===e})).length}));return n[n.length-1]},n}(h);!function(){function t(){}t.drawImage=function(n,e,r){t.imageProcessor=new B(e,n),t.imageProcessor.draw(r).then((function(){var t={x:0,y:0},e=new h(n).copy(t);b.store.imageState.reduce({tempImageData:e,position:t,size:o.CANVAS_SIZE},"Loaded image")}))},t.drawProject=function(n,e){var r=e.state.current.imageData,o=e.state.current.position,i=e.state.current.size;t.imageProcessor=new W(e,n),t.imageProcessor.draw(),b.store.imageState.reduce({tempImageData:r,position:o,size:i},"Loaded project")},t.drawSmoothImage=function(n,e,r){var o=t.getFilterArgs(n,e);if(C.dispatch("loading-start"),!t.imageProcessor)throw new Error("No valid ImageProcessor instance found");t.imageProcessor.vague(o,r).then(t.updateImageStateAfterVague).finally((function(){return C.dispatch("loading-end")}))},t.updateImageStateAfterVague=function(t){var n=t.imageData,e=t.position,r=t.size,o=t.quality;b.store.imageState.reduce({tempImageData:n,position:e,size:r},"[Filter Vague] quality: ".concat(o))},t.getFilterArgs=function(t,n){var e,r,o,i=b.store.imageState;return t?(o={x:i.position.x,y:i.position.y},i.size.width&&i.size.height&&(o.width=i.size.width,o.height=i.size.height)):(o={x:n.position.x,y:n.position.y},"initial"!==n.size&&(null===(e=n.size)||void 0===e?void 0:e.width)&&(null===(r=n.size)||void 0===r?void 0:r.height)&&(o.width=n.size.width,o.height=n.size.height)),o}}();var B=function(){function t(t,n){this.img=new Image,this.img.src=t,this.ctx=n}return t.prototype.draw=function(t){var n=this,e=this,r=this.img;return new Promise((function(i,u){try{r.addEventListener("load",(function(){var u,a,c,f=[t.position.x,t.position.y];"initial"!==t.size&&(f=(null===(a=t.size)||void 0===a?void 0:a.width)&&(null===(c=t.size)||void 0===c?void 0:c.height)?f.concat([t.size.width,t.size.height]):f.concat([o.CANVAS_SIZE.width,o.CANVAS_SIZE.height])),(u=n.ctx).drawImage.apply(u,function(t,n,e){if(e||2===arguments.length)for(var r,o=0,i=n.length;o<i;o++)!r&&o in n||(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return t.concat(r||Array.prototype.slice.call(n))}([r],f,!1)),n.ctx.save(),i(e)}))}catch(t){u(t)}}))},t.prototype.vague=function(t,n){return new M(this.ctx,t).on("pixel",n)},t}(),W=function(){function t(t,n){this.project=t,this.ctx=n}return t.prototype.draw=function(t){var n=this,e=this.project.state.current,r=e.imageData,o=e.position;return new Promise((function(t,e){try{new h(n.ctx).update(r,o),n.ctx.save(),t(n)}catch(t){e(t)}}))},t.prototype.vague=function(t,n){return new M(this.ctx,t).on("pixel",n)},t}();!function(){function t(){}t.getDataUrl=function(){return f.canvas.toDataURL()},t.download=function(n){var e=document.createElement("a");e.download="".concat(n||"image",".png"),e.href=t.getDataUrl(),e.click()}}();var V=function(){function t(t){this.projects=[],this.file=t,this.projects=this.load()}return t.prototype.load=function(){var t=JSON.parse(this.file),n=function(t){var n,e;(null==t?void 0:t.current)?(n=Object.values(null==t?void 0:t.current.imageData.data),e=null==t?void 0:t.current.size):(null==t?void 0:t.state)&&(n=Object.values(null==t?void 0:t.state.tempImageData.data),e=null==t?void 0:t.state.size);var r=new ImageData(e.width,e.height);return n.forEach((function(t,n){r.data[n]=t})),r};return t.map((function(t){return t.state.current.imageData=n({current:t.state.current}),t.state.history=t.state.history.map((function(t){return t.stateValue.tempImageData=n({state:t.stateValue}),t})),t.state.cache=t.state.cache.map((function(t){return t.stateValue.tempImageData=n({state:t.stateValue}),t})),t}))},t.prototype.saveProjects=function(t){this.file.save(JSON.stringify(t))},t.prototype.getProjects=function(){return this.projects},t.prototype.getProject=function(t){return this.projects.find((function(n){return n.id===t}))},t.prototype.saveProject=function(t){var n=this.projects.findIndex((function(n){return n.id===t.id}));-1!==n?this.projects[n]=t:this.projects.push(t),this.saveProjects(this.projects)},t.prototype.removeProject=function(t){var n=this.projects.findIndex((function(n){return n.id===t}));-1!==n&&(this.projects.splice(n,1),this.saveProjects(this.projects))},t.prototype.updateProject=function(t){var n=this.projects.findIndex((function(n){return n.id===t.id}));-1!==n&&(this.projects[n]=t,this.saveProjects(this.projects))},t}(),F=function(){function t(){this.projectsKey="cee-projects"}return t.prototype.getProjectsFromLocalStorage=function(){var t=localStorage.getItem(this.projectsKey);return t?JSON.parse(t):[]},t.prototype.getProjectFromLocalStorage=function(t){return this.getProjectsFromLocalStorage().find((function(n){return n.id===t}))},t.prototype.saveProjectsToLocalStorage=function(t){localStorage.setItem(this.projectsKey,JSON.stringify(t))},t.prototype.saveProjectToLocalStorage=function(t){var n=this.getProjectsFromLocalStorage();n.push(t),localStorage.setItem(this.projectsKey,JSON.stringify(n))},t.prototype.removeProjectFromLocalStorage=function(t){var n=this.getProjectsFromLocalStorage(),e=n.findIndex((function(n){return n.id===t}));n.splice(e,1),localStorage.setItem(this.projectsKey,JSON.stringify(n))},t.prototype.updateProjectInLocalStorage=function(t){var n=this.getProjectsFromLocalStorage(),e=n.findIndex((function(n){return n.id===t.id}));n[e]=t,localStorage.setItem(this.projectsKey,JSON.stringify(n))},t.prototype.getProjects=function(){return this.getProjectsFromLocalStorage()},t.prototype.getProject=function(t){return this.getProjectFromLocalStorage(t)},t.prototype.saveProjects=function(t){this.saveProjectsToLocalStorage(t)},t.prototype.saveProject=function(t){this.saveProjectToLocalStorage(t)},t.prototype.removeProject=function(t){this.removeProjectFromLocalStorage(t)},t.prototype.updateProject=function(t){this.updateProjectInLocalStorage(t)},t}(),U=function(){function t(){}return t.setSerializer=function(n){t._serializer=n},t.prototype.getProjects=function(){return t._serializer.getProjects()},t.prototype.getProject=function(n){return t._serializer.getProject(n)},t.prototype.saveProject=function(n){return t._serializer.saveProject(n)},t.prototype.saveProjects=function(n){return t._serializer.saveProjects(n)},t.prototype.removeProject=function(n){return t._serializer.removeProject(n)},t.prototype.updateProject=function(n){return t._serializer.updateProject(n)},t}();!function(){function t(){}t.on=function(n){var e=t._modules.find((function(t){return t.name===n}));if(!e)throw new Error("Module ".concat(n," not found"));return{getSerializerInstance:function(n){return new t._serializer(n)},instance:e.instance}},t._addModule=function(n,e){t._modules.push({name:n,instance:e})},t._modules=[],t._serializer=V,t._addModule("LocalStorage",new F),t._addModule("File",new U)}();var H=function(){this.id=null,this.name=null,this.description=null,this.state=null,this.createdAt=new Date(Date.now()).toString(),this.updatedAt=new Date(Date.now()).toString()};!function(){function t(){}Object.defineProperty(t,"project",{get:function(){return this._project},enumerable:!1,configurable:!0}),t.refreshProject=function(){t._project=new H},t.updateProject=function(n){Object.keys(n).forEach((function(e){t._project[e]=n[e]}))},t.pull=function(t,n){var e=new H,r={cache:d.cache,history:b.store.historyState.historyLines,current:b.store.imageState.getEntry()};e.id=(new j).generate(),e.description=n||"New Project",e.name=t||"New Project",e.state=r,this._project=e},t._project=new H}();var G=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Z=function(){function t(t){o.WEB_COMPONENT_TAG_NAME=t}return t.prototype.getInitial=function(){return{tag:o.WEB_COMPONENT_TAG_NAME,component:D}},t}();(function(t){function n(n){return t.call(this,n)||this}G(n,t),n.prototype.init=function(){var t=window.customElements,n=this.getInitial(),e=n.tag,r=n.component;t.define(e,r)}})(Z),function(t){function n(n){return t.call(this,n)||this}G(n,t),n.prototype.getContext2D=function(){return f.ctx},n.prototype.getCanvas=function(){return f.canvas}}(Z)})()})();
|
|
2
|
+
(()=>{var t={543:function(t,e,n){var r;t=n.nmd(t),function(){var o,i="Expected a function",u="__lodash_hash_undefined__",a="__lodash_placeholder__",c=32,f=128,s=1/0,l=9007199254740991,p=NaN,h=4294967295,d=[["ary",f],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",c],["partialRight",64],["rearg",256]],v="[object Arguments]",g="[object Array]",_="[object Boolean]",y="[object Date]",m="[object Error]",b="[object Function]",x="[object GeneratorFunction]",w="[object Map]",S="[object Number]",j="[object Object]",E="[object Promise]",C="[object RegExp]",O="[object Set]",A="[object String]",P="[object Symbol]",I="[object WeakMap]",z="[object ArrayBuffer]",L="[object DataView]",T="[object Float32Array]",k="[object Float64Array]",M="[object Int8Array]",R="[object Int16Array]",D="[object Int32Array]",N="[object Uint8Array]",B="[object Uint8ClampedArray]",W="[object Uint16Array]",F="[object Uint32Array]",V=/\b__p \+= '';/g,H=/\b(__p \+=) '' \+/g,U=/(__e\(.*?\)|\b__t\)) \+\n'';/g,G=/&(?:amp|lt|gt|quot|#39);/g,Z=/[&<>"']/g,q=RegExp(G.source),$=RegExp(Z.source),Y=/<%-([\s\S]+?)%>/g,K=/<%([\s\S]+?)%>/g,X=/<%=([\s\S]+?)%>/g,J=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Q=/^\w*$/,tt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,et=/[\\^$.*+?()[\]{}|]/g,nt=RegExp(et.source),rt=/^\s+/,ot=/\s/,it=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ut=/\{\n\/\* \[wrapped with (.+)\] \*/,at=/,? & /,ct=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ft=/[()=,{}\[\]\/\s]/,st=/\\(\\)?/g,lt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pt=/\w*$/,ht=/^[-+]0x[0-9a-f]+$/i,dt=/^0b[01]+$/i,vt=/^\[object .+?Constructor\]$/,gt=/^0o[0-7]+$/i,_t=/^(?:0|[1-9]\d*)$/,yt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,mt=/($^)/,bt=/['\n\r\u2028\u2029\\]/g,xt="\\ud800-\\udfff",wt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",St="\\u2700-\\u27bf",jt="a-z\\xdf-\\xf6\\xf8-\\xff",Et="A-Z\\xc0-\\xd6\\xd8-\\xde",Ct="\\ufe0e\\ufe0f",Ot="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",At="["+xt+"]",Pt="["+Ot+"]",It="["+wt+"]",zt="\\d+",Lt="["+St+"]",Tt="["+jt+"]",kt="[^"+xt+Ot+zt+St+jt+Et+"]",Mt="\\ud83c[\\udffb-\\udfff]",Rt="[^"+xt+"]",Dt="(?:\\ud83c[\\udde6-\\uddff]){2}",Nt="[\\ud800-\\udbff][\\udc00-\\udfff]",Bt="["+Et+"]",Wt="\\u200d",Ft="(?:"+Tt+"|"+kt+")",Vt="(?:"+Bt+"|"+kt+")",Ht="(?:['’](?:d|ll|m|re|s|t|ve))?",Ut="(?:['’](?:D|LL|M|RE|S|T|VE))?",Gt="(?:"+It+"|"+Mt+")?",Zt="["+Ct+"]?",qt=Zt+Gt+"(?:"+Wt+"(?:"+[Rt,Dt,Nt].join("|")+")"+Zt+Gt+")*",$t="(?:"+[Lt,Dt,Nt].join("|")+")"+qt,Yt="(?:"+[Rt+It+"?",It,Dt,Nt,At].join("|")+")",Kt=RegExp("['’]","g"),Xt=RegExp(It,"g"),Jt=RegExp(Mt+"(?="+Mt+")|"+Yt+qt,"g"),Qt=RegExp([Bt+"?"+Tt+"+"+Ht+"(?="+[Pt,Bt,"$"].join("|")+")",Vt+"+"+Ut+"(?="+[Pt,Bt+Ft,"$"].join("|")+")",Bt+"?"+Ft+"+"+Ht,Bt+"+"+Ut,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",zt,$t].join("|"),"g"),te=RegExp("["+Wt+xt+wt+Ct+"]"),ee=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ne=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],re=-1,oe={};oe[T]=oe[k]=oe[M]=oe[R]=oe[D]=oe[N]=oe[B]=oe[W]=oe[F]=!0,oe[v]=oe[g]=oe[z]=oe[_]=oe[L]=oe[y]=oe[m]=oe[b]=oe[w]=oe[S]=oe[j]=oe[C]=oe[O]=oe[A]=oe[I]=!1;var ie={};ie[v]=ie[g]=ie[z]=ie[L]=ie[_]=ie[y]=ie[T]=ie[k]=ie[M]=ie[R]=ie[D]=ie[w]=ie[S]=ie[j]=ie[C]=ie[O]=ie[A]=ie[P]=ie[N]=ie[B]=ie[W]=ie[F]=!0,ie[m]=ie[b]=ie[I]=!1;var ue={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ae=parseFloat,ce=parseInt,fe="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,se="object"==typeof self&&self&&self.Object===Object&&self,le=fe||se||Function("return this")(),pe=e&&!e.nodeType&&e,he=pe&&t&&!t.nodeType&&t,de=he&&he.exports===pe,ve=de&&fe.process,ge=function(){try{return he&&he.require&&he.require("util").types||ve&&ve.binding&&ve.binding("util")}catch(t){}}(),_e=ge&&ge.isArrayBuffer,ye=ge&&ge.isDate,me=ge&&ge.isMap,be=ge&&ge.isRegExp,xe=ge&&ge.isSet,we=ge&&ge.isTypedArray;function Se(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function je(t,e,n,r){for(var o=-1,i=null==t?0:t.length;++o<i;){var u=t[o];e(r,u,n(u),t)}return r}function Ee(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function Ce(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function Oe(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function Ae(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var u=t[n];e(u,n,t)&&(i[o++]=u)}return i}function Pe(t,e){return!(null==t||!t.length)&&Be(t,e,0)>-1}function Ie(t,e,n){for(var r=-1,o=null==t?0:t.length;++r<o;)if(n(e,t[r]))return!0;return!1}function ze(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}function Le(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}function Te(t,e,n,r){var o=-1,i=null==t?0:t.length;for(r&&i&&(n=t[++o]);++o<i;)n=e(n,t[o],o,t);return n}function ke(t,e,n,r){var o=null==t?0:t.length;for(r&&o&&(n=t[--o]);o--;)n=e(n,t[o],o,t);return n}function Me(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var Re=He("length");function De(t,e,n){var r;return n(t,(function(t,n,o){if(e(t,n,o))return r=n,!1})),r}function Ne(t,e,n,r){for(var o=t.length,i=n+(r?1:-1);r?i--:++i<o;)if(e(t[i],i,t))return i;return-1}function Be(t,e,n){return e==e?function(t,e,n){for(var r=n-1,o=t.length;++r<o;)if(t[r]===e)return r;return-1}(t,e,n):Ne(t,Fe,n)}function We(t,e,n,r){for(var o=n-1,i=t.length;++o<i;)if(r(t[o],e))return o;return-1}function Fe(t){return t!=t}function Ve(t,e){var n=null==t?0:t.length;return n?Ze(t,e)/n:p}function He(t){return function(e){return null==e?o:e[t]}}function Ue(t){return function(e){return null==t?o:t[e]}}function Ge(t,e,n,r,o){return o(t,(function(t,o,i){n=r?(r=!1,t):e(n,t,o,i)})),n}function Ze(t,e){for(var n,r=-1,i=t.length;++r<i;){var u=e(t[r]);u!==o&&(n=n===o?u:n+u)}return n}function qe(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function $e(t){return t?t.slice(0,pn(t)+1).replace(rt,""):t}function Ye(t){return function(e){return t(e)}}function Ke(t,e){return ze(e,(function(e){return t[e]}))}function Xe(t,e){return t.has(e)}function Je(t,e){for(var n=-1,r=t.length;++n<r&&Be(e,t[n],0)>-1;);return n}function Qe(t,e){for(var n=t.length;n--&&Be(e,t[n],0)>-1;);return n}var tn=Ue({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),en=Ue({"&":"&","<":"<",">":">",'"':""","'":"'"});function nn(t){return"\\"+ue[t]}function rn(t){return te.test(t)}function on(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function un(t,e){return function(n){return t(e(n))}}function an(t,e){for(var n=-1,r=t.length,o=0,i=[];++n<r;){var u=t[n];u!==e&&u!==a||(t[n]=a,i[o++]=n)}return i}function cn(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function fn(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}function sn(t){return rn(t)?function(t){for(var e=Jt.lastIndex=0;Jt.test(t);)++e;return e}(t):Re(t)}function ln(t){return rn(t)?function(t){return t.match(Jt)||[]}(t):function(t){return t.split("")}(t)}function pn(t){for(var e=t.length;e--&&ot.test(t.charAt(e)););return e}var hn=Ue({"&":"&","<":"<",">":">",""":'"',"'":"'"}),dn=function t(e){var n,r=(e=null==e?le:dn.defaults(le.Object(),e,dn.pick(le,ne))).Array,ot=e.Date,xt=e.Error,wt=e.Function,St=e.Math,jt=e.Object,Et=e.RegExp,Ct=e.String,Ot=e.TypeError,At=r.prototype,Pt=wt.prototype,It=jt.prototype,zt=e["__core-js_shared__"],Lt=Pt.toString,Tt=It.hasOwnProperty,kt=0,Mt=(n=/[^.]+$/.exec(zt&&zt.keys&&zt.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Rt=It.toString,Dt=Lt.call(jt),Nt=le._,Bt=Et("^"+Lt.call(Tt).replace(et,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Wt=de?e.Buffer:o,Ft=e.Symbol,Vt=e.Uint8Array,Ht=Wt?Wt.allocUnsafe:o,Ut=un(jt.getPrototypeOf,jt),Gt=jt.create,Zt=It.propertyIsEnumerable,qt=At.splice,$t=Ft?Ft.isConcatSpreadable:o,Yt=Ft?Ft.iterator:o,Jt=Ft?Ft.toStringTag:o,te=function(){try{var t=fi(jt,"defineProperty");return t({},"",{}),t}catch(t){}}(),ue=e.clearTimeout!==le.clearTimeout&&e.clearTimeout,fe=ot&&ot.now!==le.Date.now&&ot.now,se=e.setTimeout!==le.setTimeout&&e.setTimeout,pe=St.ceil,he=St.floor,ve=jt.getOwnPropertySymbols,ge=Wt?Wt.isBuffer:o,Re=e.isFinite,Ue=At.join,vn=un(jt.keys,jt),gn=St.max,_n=St.min,yn=ot.now,mn=e.parseInt,bn=St.random,xn=At.reverse,wn=fi(e,"DataView"),Sn=fi(e,"Map"),jn=fi(e,"Promise"),En=fi(e,"Set"),Cn=fi(e,"WeakMap"),On=fi(jt,"create"),An=Cn&&new Cn,Pn={},In=Di(wn),zn=Di(Sn),Ln=Di(jn),Tn=Di(En),kn=Di(Cn),Mn=Ft?Ft.prototype:o,Rn=Mn?Mn.valueOf:o,Dn=Mn?Mn.toString:o;function Nn(t){if(ta(t)&&!Hu(t)&&!(t instanceof Vn)){if(t instanceof Fn)return t;if(Tt.call(t,"__wrapped__"))return Ni(t)}return new Fn(t)}var Bn=function(){function t(){}return function(e){if(!Qu(e))return{};if(Gt)return Gt(e);t.prototype=e;var n=new t;return t.prototype=o,n}}();function Wn(){}function Fn(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=o}function Vn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=h,this.__views__=[]}function Hn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Un(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Gn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Zn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Gn;++e<n;)this.add(t[e])}function qn(t){var e=this.__data__=new Un(t);this.size=e.size}function $n(t,e){var n=Hu(t),r=!n&&Vu(t),o=!n&&!r&&qu(t),i=!n&&!r&&!o&&ca(t),u=n||r||o||i,a=u?qe(t.length,Ct):[],c=a.length;for(var f in t)!e&&!Tt.call(t,f)||u&&("length"==f||o&&("offset"==f||"parent"==f)||i&&("buffer"==f||"byteLength"==f||"byteOffset"==f)||gi(f,c))||a.push(f);return a}function Yn(t){var e=t.length;return e?t[Gr(0,e-1)]:o}function Kn(t,e){return Li(Oo(t),ir(e,0,t.length))}function Xn(t){return Li(Oo(t))}function Jn(t,e,n){(n!==o&&!Bu(t[e],n)||n===o&&!(e in t))&&rr(t,e,n)}function Qn(t,e,n){var r=t[e];Tt.call(t,e)&&Bu(r,n)&&(n!==o||e in t)||rr(t,e,n)}function tr(t,e){for(var n=t.length;n--;)if(Bu(t[n][0],e))return n;return-1}function er(t,e,n,r){return sr(t,(function(t,o,i){e(r,t,n(t),i)})),r}function nr(t,e){return t&&Ao(e,Ia(e),t)}function rr(t,e,n){"__proto__"==e&&te?te(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function or(t,e){for(var n=-1,i=e.length,u=r(i),a=null==t;++n<i;)u[n]=a?o:Ea(t,e[n]);return u}function ir(t,e,n){return t==t&&(n!==o&&(t=t<=n?t:n),e!==o&&(t=t>=e?t:e)),t}function ur(t,e,n,r,i,u){var a,c=1&e,f=2&e,s=4&e;if(n&&(a=i?n(t,r,i,u):n(t)),a!==o)return a;if(!Qu(t))return t;var l=Hu(t);if(l){if(a=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&Tt.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!c)return Oo(t,a)}else{var p=pi(t),h=p==b||p==x;if(qu(t))return xo(t,c);if(p==j||p==v||h&&!i){if(a=f||h?{}:di(t),!c)return f?function(t,e){return Ao(t,li(t),e)}(t,function(t,e){return t&&Ao(e,za(e),t)}(a,t)):function(t,e){return Ao(t,si(t),e)}(t,nr(a,t))}else{if(!ie[p])return i?t:{};a=function(t,e,n){var r,o=t.constructor;switch(e){case z:return wo(t);case _:case y:return new o(+t);case L:return function(t,e){var n=e?wo(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case T:case k:case M:case R:case D:case N:case B:case W:case F:return So(t,n);case w:return new o;case S:case A:return new o(t);case C:return function(t){var e=new t.constructor(t.source,pt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case O:return new o;case P:return r=t,Rn?jt(Rn.call(r)):{}}}(t,p,c)}}u||(u=new qn);var d=u.get(t);if(d)return d;u.set(t,a),ia(t)?t.forEach((function(r){a.add(ur(r,e,n,r,t,u))})):ea(t)&&t.forEach((function(r,o){a.set(o,ur(r,e,n,o,t,u))}));var g=l?o:(s?f?ni:ei:f?za:Ia)(t);return Ee(g||t,(function(r,o){g&&(r=t[o=r]),Qn(a,o,ur(r,e,n,o,t,u))})),a}function ar(t,e,n){var r=n.length;if(null==t)return!r;for(t=jt(t);r--;){var i=n[r],u=e[i],a=t[i];if(a===o&&!(i in t)||!u(a))return!1}return!0}function cr(t,e,n){if("function"!=typeof t)throw new Ot(i);return Ai((function(){t.apply(o,n)}),e)}function fr(t,e,n,r){var o=-1,i=Pe,u=!0,a=t.length,c=[],f=e.length;if(!a)return c;n&&(e=ze(e,Ye(n))),r?(i=Ie,u=!1):e.length>=200&&(i=Xe,u=!1,e=new Zn(e));t:for(;++o<a;){var s=t[o],l=null==n?s:n(s);if(s=r||0!==s?s:0,u&&l==l){for(var p=f;p--;)if(e[p]===l)continue t;c.push(s)}else i(e,l,r)||c.push(s)}return c}Nn.templateSettings={escape:Y,evaluate:K,interpolate:X,variable:"",imports:{_:Nn}},Nn.prototype=Wn.prototype,Nn.prototype.constructor=Nn,Fn.prototype=Bn(Wn.prototype),Fn.prototype.constructor=Fn,Vn.prototype=Bn(Wn.prototype),Vn.prototype.constructor=Vn,Hn.prototype.clear=function(){this.__data__=On?On(null):{},this.size=0},Hn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Hn.prototype.get=function(t){var e=this.__data__;if(On){var n=e[t];return n===u?o:n}return Tt.call(e,t)?e[t]:o},Hn.prototype.has=function(t){var e=this.__data__;return On?e[t]!==o:Tt.call(e,t)},Hn.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=On&&e===o?u:e,this},Un.prototype.clear=function(){this.__data__=[],this.size=0},Un.prototype.delete=function(t){var e=this.__data__,n=tr(e,t);return!(n<0||(n==e.length-1?e.pop():qt.call(e,n,1),--this.size,0))},Un.prototype.get=function(t){var e=this.__data__,n=tr(e,t);return n<0?o:e[n][1]},Un.prototype.has=function(t){return tr(this.__data__,t)>-1},Un.prototype.set=function(t,e){var n=this.__data__,r=tr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},Gn.prototype.clear=function(){this.size=0,this.__data__={hash:new Hn,map:new(Sn||Un),string:new Hn}},Gn.prototype.delete=function(t){var e=ai(this,t).delete(t);return this.size-=e?1:0,e},Gn.prototype.get=function(t){return ai(this,t).get(t)},Gn.prototype.has=function(t){return ai(this,t).has(t)},Gn.prototype.set=function(t,e){var n=ai(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Zn.prototype.add=Zn.prototype.push=function(t){return this.__data__.set(t,u),this},Zn.prototype.has=function(t){return this.__data__.has(t)},qn.prototype.clear=function(){this.__data__=new Un,this.size=0},qn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},qn.prototype.get=function(t){return this.__data__.get(t)},qn.prototype.has=function(t){return this.__data__.has(t)},qn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Un){var r=n.__data__;if(!Sn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Gn(r)}return n.set(t,e),this.size=n.size,this};var sr=zo(yr),lr=zo(mr,!0);function pr(t,e){var n=!0;return sr(t,(function(t,r,o){return n=!!e(t,r,o)})),n}function hr(t,e,n){for(var r=-1,i=t.length;++r<i;){var u=t[r],a=e(u);if(null!=a&&(c===o?a==a&&!aa(a):n(a,c)))var c=a,f=u}return f}function dr(t,e){var n=[];return sr(t,(function(t,r,o){e(t,r,o)&&n.push(t)})),n}function vr(t,e,n,r,o){var i=-1,u=t.length;for(n||(n=vi),o||(o=[]);++i<u;){var a=t[i];e>0&&n(a)?e>1?vr(a,e-1,n,r,o):Le(o,a):r||(o[o.length]=a)}return o}var gr=Lo(),_r=Lo(!0);function yr(t,e){return t&&gr(t,e,Ia)}function mr(t,e){return t&&_r(t,e,Ia)}function br(t,e){return Ae(e,(function(e){return Ku(t[e])}))}function xr(t,e){for(var n=0,r=(e=_o(e,t)).length;null!=t&&n<r;)t=t[Ri(e[n++])];return n&&n==r?t:o}function wr(t,e,n){var r=e(t);return Hu(t)?r:Le(r,n(t))}function Sr(t){return null==t?t===o?"[object Undefined]":"[object Null]":Jt&&Jt in jt(t)?function(t){var e=Tt.call(t,Jt),n=t[Jt];try{t[Jt]=o;var r=!0}catch(t){}var i=Rt.call(t);return r&&(e?t[Jt]=n:delete t[Jt]),i}(t):function(t){return Rt.call(t)}(t)}function jr(t,e){return t>e}function Er(t,e){return null!=t&&Tt.call(t,e)}function Cr(t,e){return null!=t&&e in jt(t)}function Or(t,e,n){for(var i=n?Ie:Pe,u=t[0].length,a=t.length,c=a,f=r(a),s=1/0,l=[];c--;){var p=t[c];c&&e&&(p=ze(p,Ye(e))),s=_n(p.length,s),f[c]=!n&&(e||u>=120&&p.length>=120)?new Zn(c&&p):o}p=t[0];var h=-1,d=f[0];t:for(;++h<u&&l.length<s;){var v=p[h],g=e?e(v):v;if(v=n||0!==v?v:0,!(d?Xe(d,g):i(l,g,n))){for(c=a;--c;){var _=f[c];if(!(_?Xe(_,g):i(t[c],g,n)))continue t}d&&d.push(g),l.push(v)}}return l}function Ar(t,e,n){var r=null==(t=Ei(t,e=_o(e,t)))?t:t[Ri(Yi(e))];return null==r?o:Se(r,t,n)}function Pr(t){return ta(t)&&Sr(t)==v}function Ir(t,e,n,r,i){return t===e||(null==t||null==e||!ta(t)&&!ta(e)?t!=t&&e!=e:function(t,e,n,r,i,u){var a=Hu(t),c=Hu(e),f=a?g:pi(t),s=c?g:pi(e),l=(f=f==v?j:f)==j,p=(s=s==v?j:s)==j,h=f==s;if(h&&qu(t)){if(!qu(e))return!1;a=!0,l=!1}if(h&&!l)return u||(u=new qn),a||ca(t)?Qo(t,e,n,r,i,u):function(t,e,n,r,o,i,u){switch(n){case L:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case z:return!(t.byteLength!=e.byteLength||!i(new Vt(t),new Vt(e)));case _:case y:case S:return Bu(+t,+e);case m:return t.name==e.name&&t.message==e.message;case C:case A:return t==e+"";case w:var a=on;case O:var c=1&r;if(a||(a=cn),t.size!=e.size&&!c)return!1;var f=u.get(t);if(f)return f==e;r|=2,u.set(t,e);var s=Qo(a(t),a(e),r,o,i,u);return u.delete(t),s;case P:if(Rn)return Rn.call(t)==Rn.call(e)}return!1}(t,e,f,n,r,i,u);if(!(1&n)){var d=l&&Tt.call(t,"__wrapped__"),b=p&&Tt.call(e,"__wrapped__");if(d||b){var x=d?t.value():t,E=b?e.value():e;return u||(u=new qn),i(x,E,n,r,u)}}return!!h&&(u||(u=new qn),function(t,e,n,r,i,u){var a=1&n,c=ei(t),f=c.length;if(f!=ei(e).length&&!a)return!1;for(var s=f;s--;){var l=c[s];if(!(a?l in e:Tt.call(e,l)))return!1}var p=u.get(t),h=u.get(e);if(p&&h)return p==e&&h==t;var d=!0;u.set(t,e),u.set(e,t);for(var v=a;++s<f;){var g=t[l=c[s]],_=e[l];if(r)var y=a?r(_,g,l,e,t,u):r(g,_,l,t,e,u);if(!(y===o?g===_||i(g,_,n,r,u):y)){d=!1;break}v||(v="constructor"==l)}if(d&&!v){var m=t.constructor,b=e.constructor;m==b||!("constructor"in t)||!("constructor"in e)||"function"==typeof m&&m instanceof m&&"function"==typeof b&&b instanceof b||(d=!1)}return u.delete(t),u.delete(e),d}(t,e,n,r,i,u))}(t,e,n,r,Ir,i))}function zr(t,e,n,r){var i=n.length,u=i,a=!r;if(null==t)return!u;for(t=jt(t);i--;){var c=n[i];if(a&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++i<u;){var f=(c=n[i])[0],s=t[f],l=c[1];if(a&&c[2]){if(s===o&&!(f in t))return!1}else{var p=new qn;if(r)var h=r(s,l,f,t,e,p);if(!(h===o?Ir(l,s,3,r,p):h))return!1}}return!0}function Lr(t){return!(!Qu(t)||(e=t,Mt&&Mt in e))&&(Ku(t)?Bt:vt).test(Di(t));var e}function Tr(t){return"function"==typeof t?t:null==t?nc:"object"==typeof t?Hu(t)?Nr(t[0],t[1]):Dr(t):lc(t)}function kr(t){if(!xi(t))return vn(t);var e=[];for(var n in jt(t))Tt.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Mr(t,e){return t<e}function Rr(t,e){var n=-1,o=Gu(t)?r(t.length):[];return sr(t,(function(t,r,i){o[++n]=e(t,r,i)})),o}function Dr(t){var e=ci(t);return 1==e.length&&e[0][2]?Si(e[0][0],e[0][1]):function(n){return n===t||zr(n,t,e)}}function Nr(t,e){return yi(t)&&wi(e)?Si(Ri(t),e):function(n){var r=Ea(n,t);return r===o&&r===e?Ca(n,t):Ir(e,r,3)}}function Br(t,e,n,r,i){t!==e&&gr(e,(function(u,a){if(i||(i=new qn),Qu(u))!function(t,e,n,r,i,u,a){var c=Ci(t,n),f=Ci(e,n),s=a.get(f);if(s)Jn(t,n,s);else{var l=u?u(c,f,n+"",t,e,a):o,p=l===o;if(p){var h=Hu(f),d=!h&&qu(f),v=!h&&!d&&ca(f);l=f,h||d||v?Hu(c)?l=c:Zu(c)?l=Oo(c):d?(p=!1,l=xo(f,!0)):v?(p=!1,l=So(f,!0)):l=[]:ra(f)||Vu(f)?(l=c,Vu(c)?l=ga(c):Qu(c)&&!Ku(c)||(l=di(f))):p=!1}p&&(a.set(f,l),i(l,f,r,u,a),a.delete(f)),Jn(t,n,l)}}(t,e,a,n,Br,r,i);else{var c=r?r(Ci(t,a),u,a+"",t,e,i):o;c===o&&(c=u),Jn(t,a,c)}}),za)}function Wr(t,e){var n=t.length;if(n)return gi(e+=e<0?n:0,n)?t[e]:o}function Fr(t,e,n){e=e.length?ze(e,(function(t){return Hu(t)?function(e){return xr(e,1===t.length?t[0]:t)}:t})):[nc];var r=-1;e=ze(e,Ye(ui()));var o=Rr(t,(function(t,n,o){var i=ze(e,(function(e){return e(t)}));return{criteria:i,index:++r,value:t}}));return function(t){var e=t.length;for(t.sort((function(t,e){return function(t,e,n){for(var r=-1,o=t.criteria,i=e.criteria,u=o.length,a=n.length;++r<u;){var c=jo(o[r],i[r]);if(c)return r>=a?c:c*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)}));e--;)t[e]=t[e].value;return t}(o)}function Vr(t,e,n){for(var r=-1,o=e.length,i={};++r<o;){var u=e[r],a=xr(t,u);n(a,u)&&Kr(i,_o(u,t),a)}return i}function Hr(t,e,n,r){var o=r?We:Be,i=-1,u=e.length,a=t;for(t===e&&(e=Oo(e)),n&&(a=ze(t,Ye(n)));++i<u;)for(var c=0,f=e[i],s=n?n(f):f;(c=o(a,s,c,r))>-1;)a!==t&&qt.call(a,c,1),qt.call(t,c,1);return t}function Ur(t,e){for(var n=t?e.length:0,r=n-1;n--;){var o=e[n];if(n==r||o!==i){var i=o;gi(o)?qt.call(t,o,1):co(t,o)}}return t}function Gr(t,e){return t+he(bn()*(e-t+1))}function Zr(t,e){var n="";if(!t||e<1||e>l)return n;do{e%2&&(n+=t),(e=he(e/2))&&(t+=t)}while(e);return n}function qr(t,e){return Pi(ji(t,e,nc),t+"")}function $r(t){return Yn(Ba(t))}function Yr(t,e){var n=Ba(t);return Li(n,ir(e,0,n.length))}function Kr(t,e,n,r){if(!Qu(t))return t;for(var i=-1,u=(e=_o(e,t)).length,a=u-1,c=t;null!=c&&++i<u;){var f=Ri(e[i]),s=n;if("__proto__"===f||"constructor"===f||"prototype"===f)return t;if(i!=a){var l=c[f];(s=r?r(l,f,c):o)===o&&(s=Qu(l)?l:gi(e[i+1])?[]:{})}Qn(c,f,s),c=c[f]}return t}var Xr=An?function(t,e){return An.set(t,e),t}:nc,Jr=te?function(t,e){return te(t,"toString",{configurable:!0,enumerable:!1,value:Qa(e),writable:!0})}:nc;function Qr(t){return Li(Ba(t))}function to(t,e,n){var o=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var u=r(i);++o<i;)u[o]=t[o+e];return u}function eo(t,e){var n;return sr(t,(function(t,r,o){return!(n=e(t,r,o))})),!!n}function no(t,e,n){var r=0,o=null==t?r:t.length;if("number"==typeof e&&e==e&&o<=2147483647){for(;r<o;){var i=r+o>>>1,u=t[i];null!==u&&!aa(u)&&(n?u<=e:u<e)?r=i+1:o=i}return o}return ro(t,e,nc,n)}function ro(t,e,n,r){var i=0,u=null==t?0:t.length;if(0===u)return 0;for(var a=(e=n(e))!=e,c=null===e,f=aa(e),s=e===o;i<u;){var l=he((i+u)/2),p=n(t[l]),h=p!==o,d=null===p,v=p==p,g=aa(p);if(a)var _=r||v;else _=s?v&&(r||h):c?v&&h&&(r||!d):f?v&&h&&!d&&(r||!g):!d&&!g&&(r?p<=e:p<e);_?i=l+1:u=l}return _n(u,4294967294)}function oo(t,e){for(var n=-1,r=t.length,o=0,i=[];++n<r;){var u=t[n],a=e?e(u):u;if(!n||!Bu(a,c)){var c=a;i[o++]=0===u?0:u}}return i}function io(t){return"number"==typeof t?t:aa(t)?p:+t}function uo(t){if("string"==typeof t)return t;if(Hu(t))return ze(t,uo)+"";if(aa(t))return Dn?Dn.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function ao(t,e,n){var r=-1,o=Pe,i=t.length,u=!0,a=[],c=a;if(n)u=!1,o=Ie;else if(i>=200){var f=e?null:qo(t);if(f)return cn(f);u=!1,o=Xe,c=new Zn}else c=e?[]:a;t:for(;++r<i;){var s=t[r],l=e?e(s):s;if(s=n||0!==s?s:0,u&&l==l){for(var p=c.length;p--;)if(c[p]===l)continue t;e&&c.push(l),a.push(s)}else o(c,l,n)||(c!==a&&c.push(l),a.push(s))}return a}function co(t,e){return null==(t=Ei(t,e=_o(e,t)))||delete t[Ri(Yi(e))]}function fo(t,e,n,r){return Kr(t,e,n(xr(t,e)),r)}function so(t,e,n,r){for(var o=t.length,i=r?o:-1;(r?i--:++i<o)&&e(t[i],i,t););return n?to(t,r?0:i,r?i+1:o):to(t,r?i+1:0,r?o:i)}function lo(t,e){var n=t;return n instanceof Vn&&(n=n.value()),Te(e,(function(t,e){return e.func.apply(e.thisArg,Le([t],e.args))}),n)}function po(t,e,n){var o=t.length;if(o<2)return o?ao(t[0]):[];for(var i=-1,u=r(o);++i<o;)for(var a=t[i],c=-1;++c<o;)c!=i&&(u[i]=fr(u[i]||a,t[c],e,n));return ao(vr(u,1),e,n)}function ho(t,e,n){for(var r=-1,i=t.length,u=e.length,a={};++r<i;){var c=r<u?e[r]:o;n(a,t[r],c)}return a}function vo(t){return Zu(t)?t:[]}function go(t){return"function"==typeof t?t:nc}function _o(t,e){return Hu(t)?t:yi(t,e)?[t]:Mi(_a(t))}var yo=qr;function mo(t,e,n){var r=t.length;return n=n===o?r:n,!e&&n>=r?t:to(t,e,n)}var bo=ue||function(t){return le.clearTimeout(t)};function xo(t,e){if(e)return t.slice();var n=t.length,r=Ht?Ht(n):new t.constructor(n);return t.copy(r),r}function wo(t){var e=new t.constructor(t.byteLength);return new Vt(e).set(new Vt(t)),e}function So(t,e){var n=e?wo(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function jo(t,e){if(t!==e){var n=t!==o,r=null===t,i=t==t,u=aa(t),a=e!==o,c=null===e,f=e==e,s=aa(e);if(!c&&!s&&!u&&t>e||u&&a&&f&&!c&&!s||r&&a&&f||!n&&f||!i)return 1;if(!r&&!u&&!s&&t<e||s&&n&&i&&!r&&!u||c&&n&&i||!a&&i||!f)return-1}return 0}function Eo(t,e,n,o){for(var i=-1,u=t.length,a=n.length,c=-1,f=e.length,s=gn(u-a,0),l=r(f+s),p=!o;++c<f;)l[c]=e[c];for(;++i<a;)(p||i<u)&&(l[n[i]]=t[i]);for(;s--;)l[c++]=t[i++];return l}function Co(t,e,n,o){for(var i=-1,u=t.length,a=-1,c=n.length,f=-1,s=e.length,l=gn(u-c,0),p=r(l+s),h=!o;++i<l;)p[i]=t[i];for(var d=i;++f<s;)p[d+f]=e[f];for(;++a<c;)(h||i<u)&&(p[d+n[a]]=t[i++]);return p}function Oo(t,e){var n=-1,o=t.length;for(e||(e=r(o));++n<o;)e[n]=t[n];return e}function Ao(t,e,n,r){var i=!n;n||(n={});for(var u=-1,a=e.length;++u<a;){var c=e[u],f=r?r(n[c],t[c],c,n,t):o;f===o&&(f=t[c]),i?rr(n,c,f):Qn(n,c,f)}return n}function Po(t,e){return function(n,r){var o=Hu(n)?je:er,i=e?e():{};return o(n,t,ui(r,2),i)}}function Io(t){return qr((function(e,n){var r=-1,i=n.length,u=i>1?n[i-1]:o,a=i>2?n[2]:o;for(u=t.length>3&&"function"==typeof u?(i--,u):o,a&&_i(n[0],n[1],a)&&(u=i<3?o:u,i=1),e=jt(e);++r<i;){var c=n[r];c&&t(e,c,r,u)}return e}))}function zo(t,e){return function(n,r){if(null==n)return n;if(!Gu(n))return t(n,r);for(var o=n.length,i=e?o:-1,u=jt(n);(e?i--:++i<o)&&!1!==r(u[i],i,u););return n}}function Lo(t){return function(e,n,r){for(var o=-1,i=jt(e),u=r(e),a=u.length;a--;){var c=u[t?a:++o];if(!1===n(i[c],c,i))break}return e}}function To(t){return function(e){var n=rn(e=_a(e))?ln(e):o,r=n?n[0]:e.charAt(0),i=n?mo(n,1).join(""):e.slice(1);return r[t]()+i}}function ko(t){return function(e){return Te(Ka(Va(e).replace(Kt,"")),t,"")}}function Mo(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=Bn(t.prototype),r=t.apply(n,e);return Qu(r)?r:n}}function Ro(t){return function(e,n,r){var i=jt(e);if(!Gu(e)){var u=ui(n,3);e=Ia(e),n=function(t){return u(i[t],t,i)}}var a=t(e,n,r);return a>-1?i[u?e[a]:a]:o}}function Do(t){return ti((function(e){var n=e.length,r=n,u=Fn.prototype.thru;for(t&&e.reverse();r--;){var a=e[r];if("function"!=typeof a)throw new Ot(i);if(u&&!c&&"wrapper"==oi(a))var c=new Fn([],!0)}for(r=c?r:n;++r<n;){var f=oi(a=e[r]),s="wrapper"==f?ri(a):o;c=s&&mi(s[0])&&424==s[1]&&!s[4].length&&1==s[9]?c[oi(s[0])].apply(c,s[3]):1==a.length&&mi(a)?c[f]():c.thru(a)}return function(){var t=arguments,r=t[0];if(c&&1==t.length&&Hu(r))return c.plant(r).value();for(var o=0,i=n?e[o].apply(this,t):r;++o<n;)i=e[o].call(this,i);return i}}))}function No(t,e,n,i,u,a,c,s,l,p){var h=e&f,d=1&e,v=2&e,g=24&e,_=512&e,y=v?o:Mo(t);return function f(){for(var m=arguments.length,b=r(m),x=m;x--;)b[x]=arguments[x];if(g)var w=ii(f),S=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}(b,w);if(i&&(b=Eo(b,i,u,g)),a&&(b=Co(b,a,c,g)),m-=S,g&&m<p){var j=an(b,w);return Go(t,e,No,f.placeholder,n,b,j,s,l,p-m)}var E=d?n:this,C=v?E[t]:t;return m=b.length,s?b=function(t,e){for(var n=t.length,r=_n(e.length,n),i=Oo(t);r--;){var u=e[r];t[r]=gi(u,n)?i[u]:o}return t}(b,s):_&&m>1&&b.reverse(),h&&l<m&&(b.length=l),this&&this!==le&&this instanceof f&&(C=y||Mo(C)),C.apply(E,b)}}function Bo(t,e){return function(n,r){return function(t,e,n,r){return yr(t,(function(t,o,i){e(r,n(t),o,i)})),r}(n,t,e(r),{})}}function Wo(t,e){return function(n,r){var i;if(n===o&&r===o)return e;if(n!==o&&(i=n),r!==o){if(i===o)return r;"string"==typeof n||"string"==typeof r?(n=uo(n),r=uo(r)):(n=io(n),r=io(r)),i=t(n,r)}return i}}function Fo(t){return ti((function(e){return e=ze(e,Ye(ui())),qr((function(n){var r=this;return t(e,(function(t){return Se(t,r,n)}))}))}))}function Vo(t,e){var n=(e=e===o?" ":uo(e)).length;if(n<2)return n?Zr(e,t):e;var r=Zr(e,pe(t/sn(e)));return rn(e)?mo(ln(r),0,t).join(""):r.slice(0,t)}function Ho(t){return function(e,n,i){return i&&"number"!=typeof i&&_i(e,n,i)&&(n=i=o),e=pa(e),n===o?(n=e,e=0):n=pa(n),function(t,e,n,o){for(var i=-1,u=gn(pe((e-t)/(n||1)),0),a=r(u);u--;)a[o?u:++i]=t,t+=n;return a}(e,n,i=i===o?e<n?1:-1:pa(i),t)}}function Uo(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=va(e),n=va(n)),t(e,n)}}function Go(t,e,n,r,i,u,a,f,s,l){var p=8&e;e|=p?c:64,4&(e&=~(p?64:c))||(e&=-4);var h=[t,e,i,p?u:o,p?a:o,p?o:u,p?o:a,f,s,l],d=n.apply(o,h);return mi(t)&&Oi(d,h),d.placeholder=r,Ii(d,t,e)}function Zo(t){var e=St[t];return function(t,n){if(t=va(t),(n=null==n?0:_n(ha(n),292))&&Re(t)){var r=(_a(t)+"e").split("e");return+((r=(_a(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var qo=En&&1/cn(new En([,-0]))[1]==s?function(t){return new En(t)}:ac;function $o(t){return function(e){var n=pi(e);return n==w?on(e):n==O?fn(e):function(t,e){return ze(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Yo(t,e,n,u,s,l,p,h){var d=2&e;if(!d&&"function"!=typeof t)throw new Ot(i);var v=u?u.length:0;if(v||(e&=-97,u=s=o),p=p===o?p:gn(ha(p),0),h=h===o?h:ha(h),v-=s?s.length:0,64&e){var g=u,_=s;u=s=o}var y=d?o:ri(t),m=[t,e,n,u,s,g,_,l,p,h];if(y&&function(t,e){var n=t[1],r=e[1],o=n|r,i=o<131,u=r==f&&8==n||r==f&&256==n&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==n;if(!i&&!u)return t;1&r&&(t[2]=e[2],o|=1&n?0:4);var c=e[3];if(c){var s=t[3];t[3]=s?Eo(s,c,e[4]):c,t[4]=s?an(t[3],a):e[4]}(c=e[5])&&(s=t[5],t[5]=s?Co(s,c,e[6]):c,t[6]=s?an(t[5],a):e[6]),(c=e[7])&&(t[7]=c),r&f&&(t[8]=null==t[8]?e[8]:_n(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=o}(m,y),t=m[0],e=m[1],n=m[2],u=m[3],s=m[4],!(h=m[9]=m[9]===o?d?0:t.length:gn(m[9]-v,0))&&24&e&&(e&=-25),e&&1!=e)b=8==e||16==e?function(t,e,n){var i=Mo(t);return function u(){for(var a=arguments.length,c=r(a),f=a,s=ii(u);f--;)c[f]=arguments[f];var l=a<3&&c[0]!==s&&c[a-1]!==s?[]:an(c,s);return(a-=l.length)<n?Go(t,e,No,u.placeholder,o,c,l,o,o,n-a):Se(this&&this!==le&&this instanceof u?i:t,this,c)}}(t,e,h):e!=c&&33!=e||s.length?No.apply(o,m):function(t,e,n,o){var i=1&e,u=Mo(t);return function e(){for(var a=-1,c=arguments.length,f=-1,s=o.length,l=r(s+c),p=this&&this!==le&&this instanceof e?u:t;++f<s;)l[f]=o[f];for(;c--;)l[f++]=arguments[++a];return Se(p,i?n:this,l)}}(t,e,n,u);else var b=function(t,e,n){var r=1&e,o=Mo(t);return function e(){return(this&&this!==le&&this instanceof e?o:t).apply(r?n:this,arguments)}}(t,e,n);return Ii((y?Xr:Oi)(b,m),t,e)}function Ko(t,e,n,r){return t===o||Bu(t,It[n])&&!Tt.call(r,n)?e:t}function Xo(t,e,n,r,i,u){return Qu(t)&&Qu(e)&&(u.set(e,t),Br(t,e,o,Xo,u),u.delete(e)),t}function Jo(t){return ra(t)?o:t}function Qo(t,e,n,r,i,u){var a=1&n,c=t.length,f=e.length;if(c!=f&&!(a&&f>c))return!1;var s=u.get(t),l=u.get(e);if(s&&l)return s==e&&l==t;var p=-1,h=!0,d=2&n?new Zn:o;for(u.set(t,e),u.set(e,t);++p<c;){var v=t[p],g=e[p];if(r)var _=a?r(g,v,p,e,t,u):r(v,g,p,t,e,u);if(_!==o){if(_)continue;h=!1;break}if(d){if(!Me(e,(function(t,e){if(!Xe(d,e)&&(v===t||i(v,t,n,r,u)))return d.push(e)}))){h=!1;break}}else if(v!==g&&!i(v,g,n,r,u)){h=!1;break}}return u.delete(t),u.delete(e),h}function ti(t){return Pi(ji(t,o,Ui),t+"")}function ei(t){return wr(t,Ia,si)}function ni(t){return wr(t,za,li)}var ri=An?function(t){return An.get(t)}:ac;function oi(t){for(var e=t.name+"",n=Pn[e],r=Tt.call(Pn,e)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==t)return o.name}return e}function ii(t){return(Tt.call(Nn,"placeholder")?Nn:t).placeholder}function ui(){var t=Nn.iteratee||rc;return t=t===rc?Tr:t,arguments.length?t(arguments[0],arguments[1]):t}function ai(t,e){var n,r,o=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof e?"string":"hash"]:o.map}function ci(t){for(var e=Ia(t),n=e.length;n--;){var r=e[n],o=t[r];e[n]=[r,o,wi(o)]}return e}function fi(t,e){var n=function(t,e){return null==t?o:t[e]}(t,e);return Lr(n)?n:o}var si=ve?function(t){return null==t?[]:(t=jt(t),Ae(ve(t),(function(e){return Zt.call(t,e)})))}:dc,li=ve?function(t){for(var e=[];t;)Le(e,si(t)),t=Ut(t);return e}:dc,pi=Sr;function hi(t,e,n){for(var r=-1,o=(e=_o(e,t)).length,i=!1;++r<o;){var u=Ri(e[r]);if(!(i=null!=t&&n(t,u)))break;t=t[u]}return i||++r!=o?i:!!(o=null==t?0:t.length)&&Ju(o)&&gi(u,o)&&(Hu(t)||Vu(t))}function di(t){return"function"!=typeof t.constructor||xi(t)?{}:Bn(Ut(t))}function vi(t){return Hu(t)||Vu(t)||!!($t&&t&&t[$t])}function gi(t,e){var n=typeof t;return!!(e=null==e?l:e)&&("number"==n||"symbol"!=n&&_t.test(t))&&t>-1&&t%1==0&&t<e}function _i(t,e,n){if(!Qu(n))return!1;var r=typeof e;return!!("number"==r?Gu(n)&&gi(e,n.length):"string"==r&&e in n)&&Bu(n[e],t)}function yi(t,e){if(Hu(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!aa(t))||Q.test(t)||!J.test(t)||null!=e&&t in jt(e)}function mi(t){var e=oi(t),n=Nn[e];if("function"!=typeof n||!(e in Vn.prototype))return!1;if(t===n)return!0;var r=ri(n);return!!r&&t===r[0]}(wn&&pi(new wn(new ArrayBuffer(1)))!=L||Sn&&pi(new Sn)!=w||jn&&pi(jn.resolve())!=E||En&&pi(new En)!=O||Cn&&pi(new Cn)!=I)&&(pi=function(t){var e=Sr(t),n=e==j?t.constructor:o,r=n?Di(n):"";if(r)switch(r){case In:return L;case zn:return w;case Ln:return E;case Tn:return O;case kn:return I}return e});var bi=zt?Ku:vc;function xi(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||It)}function wi(t){return t==t&&!Qu(t)}function Si(t,e){return function(n){return null!=n&&n[t]===e&&(e!==o||t in jt(n))}}function ji(t,e,n){return e=gn(e===o?t.length-1:e,0),function(){for(var o=arguments,i=-1,u=gn(o.length-e,0),a=r(u);++i<u;)a[i]=o[e+i];i=-1;for(var c=r(e+1);++i<e;)c[i]=o[i];return c[e]=n(a),Se(t,this,c)}}function Ei(t,e){return e.length<2?t:xr(t,to(e,0,-1))}function Ci(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Oi=zi(Xr),Ai=se||function(t,e){return le.setTimeout(t,e)},Pi=zi(Jr);function Ii(t,e,n){var r=e+"";return Pi(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(it,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return Ee(d,(function(n){var r="_."+n[0];e&n[1]&&!Pe(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(ut);return e?e[1].split(at):[]}(r),n)))}function zi(t){var e=0,n=0;return function(){var r=yn(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(o,arguments)}}function Li(t,e){var n=-1,r=t.length,i=r-1;for(e=e===o?r:e;++n<e;){var u=Gr(n,i),a=t[u];t[u]=t[n],t[n]=a}return t.length=e,t}var Ti,ki,Mi=(Ti=Tu((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(tt,(function(t,n,r,o){e.push(r?o.replace(st,"$1"):n||t)})),e}),(function(t){return 500===ki.size&&ki.clear(),t})),ki=Ti.cache,Ti);function Ri(t){if("string"==typeof t||aa(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Di(t){if(null!=t){try{return Lt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Ni(t){if(t instanceof Vn)return t.clone();var e=new Fn(t.__wrapped__,t.__chain__);return e.__actions__=Oo(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Bi=qr((function(t,e){return Zu(t)?fr(t,vr(e,1,Zu,!0)):[]})),Wi=qr((function(t,e){var n=Yi(e);return Zu(n)&&(n=o),Zu(t)?fr(t,vr(e,1,Zu,!0),ui(n,2)):[]})),Fi=qr((function(t,e){var n=Yi(e);return Zu(n)&&(n=o),Zu(t)?fr(t,vr(e,1,Zu,!0),o,n):[]}));function Vi(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=null==n?0:ha(n);return o<0&&(o=gn(r+o,0)),Ne(t,ui(e,3),o)}function Hi(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r-1;return n!==o&&(i=ha(n),i=n<0?gn(r+i,0):_n(i,r-1)),Ne(t,ui(e,3),i,!0)}function Ui(t){return null!=t&&t.length?vr(t,1):[]}function Gi(t){return t&&t.length?t[0]:o}var Zi=qr((function(t){var e=ze(t,vo);return e.length&&e[0]===t[0]?Or(e):[]})),qi=qr((function(t){var e=Yi(t),n=ze(t,vo);return e===Yi(n)?e=o:n.pop(),n.length&&n[0]===t[0]?Or(n,ui(e,2)):[]})),$i=qr((function(t){var e=Yi(t),n=ze(t,vo);return(e="function"==typeof e?e:o)&&n.pop(),n.length&&n[0]===t[0]?Or(n,o,e):[]}));function Yi(t){var e=null==t?0:t.length;return e?t[e-1]:o}var Ki=qr(Xi);function Xi(t,e){return t&&t.length&&e&&e.length?Hr(t,e):t}var Ji=ti((function(t,e){var n=null==t?0:t.length,r=or(t,e);return Ur(t,ze(e,(function(t){return gi(t,n)?+t:t})).sort(jo)),r}));function Qi(t){return null==t?t:xn.call(t)}var tu=qr((function(t){return ao(vr(t,1,Zu,!0))})),eu=qr((function(t){var e=Yi(t);return Zu(e)&&(e=o),ao(vr(t,1,Zu,!0),ui(e,2))})),nu=qr((function(t){var e=Yi(t);return e="function"==typeof e?e:o,ao(vr(t,1,Zu,!0),o,e)}));function ru(t){if(!t||!t.length)return[];var e=0;return t=Ae(t,(function(t){if(Zu(t))return e=gn(t.length,e),!0})),qe(e,(function(e){return ze(t,He(e))}))}function ou(t,e){if(!t||!t.length)return[];var n=ru(t);return null==e?n:ze(n,(function(t){return Se(e,o,t)}))}var iu=qr((function(t,e){return Zu(t)?fr(t,e):[]})),uu=qr((function(t){return po(Ae(t,Zu))})),au=qr((function(t){var e=Yi(t);return Zu(e)&&(e=o),po(Ae(t,Zu),ui(e,2))})),cu=qr((function(t){var e=Yi(t);return e="function"==typeof e?e:o,po(Ae(t,Zu),o,e)})),fu=qr(ru),su=qr((function(t){var e=t.length,n=e>1?t[e-1]:o;return n="function"==typeof n?(t.pop(),n):o,ou(t,n)}));function lu(t){var e=Nn(t);return e.__chain__=!0,e}function pu(t,e){return e(t)}var hu=ti((function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,i=function(e){return or(e,t)};return!(e>1||this.__actions__.length)&&r instanceof Vn&&gi(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:pu,args:[i],thisArg:o}),new Fn(r,this.__chain__).thru((function(t){return e&&!t.length&&t.push(o),t}))):this.thru(i)})),du=Po((function(t,e,n){Tt.call(t,n)?++t[n]:rr(t,n,1)})),vu=Ro(Vi),gu=Ro(Hi);function _u(t,e){return(Hu(t)?Ee:sr)(t,ui(e,3))}function yu(t,e){return(Hu(t)?Ce:lr)(t,ui(e,3))}var mu=Po((function(t,e,n){Tt.call(t,n)?t[n].push(e):rr(t,n,[e])})),bu=qr((function(t,e,n){var o=-1,i="function"==typeof e,u=Gu(t)?r(t.length):[];return sr(t,(function(t){u[++o]=i?Se(e,t,n):Ar(t,e,n)})),u})),xu=Po((function(t,e,n){rr(t,n,e)}));function wu(t,e){return(Hu(t)?ze:Rr)(t,ui(e,3))}var Su=Po((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]})),ju=qr((function(t,e){if(null==t)return[];var n=e.length;return n>1&&_i(t,e[0],e[1])?e=[]:n>2&&_i(e[0],e[1],e[2])&&(e=[e[0]]),Fr(t,vr(e,1),[])})),Eu=fe||function(){return le.Date.now()};function Cu(t,e,n){return e=n?o:e,e=t&&null==e?t.length:e,Yo(t,f,o,o,o,o,e)}function Ou(t,e){var n;if("function"!=typeof e)throw new Ot(i);return t=ha(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=o),n}}var Au=qr((function(t,e,n){var r=1;if(n.length){var o=an(n,ii(Au));r|=c}return Yo(t,r,e,n,o)})),Pu=qr((function(t,e,n){var r=3;if(n.length){var o=an(n,ii(Pu));r|=c}return Yo(e,r,t,n,o)}));function Iu(t,e,n){var r,u,a,c,f,s,l=0,p=!1,h=!1,d=!0;if("function"!=typeof t)throw new Ot(i);function v(e){var n=r,i=u;return r=u=o,l=e,c=t.apply(i,n)}function g(t){var n=t-s;return s===o||n>=e||n<0||h&&t-l>=a}function _(){var t=Eu();if(g(t))return y(t);f=Ai(_,function(t){var n=e-(t-s);return h?_n(n,a-(t-l)):n}(t))}function y(t){return f=o,d&&r?v(t):(r=u=o,c)}function m(){var t=Eu(),n=g(t);if(r=arguments,u=this,s=t,n){if(f===o)return function(t){return l=t,f=Ai(_,e),p?v(t):c}(s);if(h)return bo(f),f=Ai(_,e),v(s)}return f===o&&(f=Ai(_,e)),c}return e=va(e)||0,Qu(n)&&(p=!!n.leading,a=(h="maxWait"in n)?gn(va(n.maxWait)||0,e):a,d="trailing"in n?!!n.trailing:d),m.cancel=function(){f!==o&&bo(f),l=0,r=s=u=f=o},m.flush=function(){return f===o?c:y(Eu())},m}var zu=qr((function(t,e){return cr(t,1,e)})),Lu=qr((function(t,e,n){return cr(t,va(e)||0,n)}));function Tu(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new Ot(i);var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var u=t.apply(this,r);return n.cache=i.set(o,u)||i,u};return n.cache=new(Tu.Cache||Gn),n}function ku(t){if("function"!=typeof t)throw new Ot(i);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Tu.Cache=Gn;var Mu=yo((function(t,e){var n=(e=1==e.length&&Hu(e[0])?ze(e[0],Ye(ui())):ze(vr(e,1),Ye(ui()))).length;return qr((function(r){for(var o=-1,i=_n(r.length,n);++o<i;)r[o]=e[o].call(this,r[o]);return Se(t,this,r)}))})),Ru=qr((function(t,e){var n=an(e,ii(Ru));return Yo(t,c,o,e,n)})),Du=qr((function(t,e){var n=an(e,ii(Du));return Yo(t,64,o,e,n)})),Nu=ti((function(t,e){return Yo(t,256,o,o,o,e)}));function Bu(t,e){return t===e||t!=t&&e!=e}var Wu=Uo(jr),Fu=Uo((function(t,e){return t>=e})),Vu=Pr(function(){return arguments}())?Pr:function(t){return ta(t)&&Tt.call(t,"callee")&&!Zt.call(t,"callee")},Hu=r.isArray,Uu=_e?Ye(_e):function(t){return ta(t)&&Sr(t)==z};function Gu(t){return null!=t&&Ju(t.length)&&!Ku(t)}function Zu(t){return ta(t)&&Gu(t)}var qu=ge||vc,$u=ye?Ye(ye):function(t){return ta(t)&&Sr(t)==y};function Yu(t){if(!ta(t))return!1;var e=Sr(t);return e==m||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!ra(t)}function Ku(t){if(!Qu(t))return!1;var e=Sr(t);return e==b||e==x||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Xu(t){return"number"==typeof t&&t==ha(t)}function Ju(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=l}function Qu(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function ta(t){return null!=t&&"object"==typeof t}var ea=me?Ye(me):function(t){return ta(t)&&pi(t)==w};function na(t){return"number"==typeof t||ta(t)&&Sr(t)==S}function ra(t){if(!ta(t)||Sr(t)!=j)return!1;var e=Ut(t);if(null===e)return!0;var n=Tt.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Lt.call(n)==Dt}var oa=be?Ye(be):function(t){return ta(t)&&Sr(t)==C},ia=xe?Ye(xe):function(t){return ta(t)&&pi(t)==O};function ua(t){return"string"==typeof t||!Hu(t)&&ta(t)&&Sr(t)==A}function aa(t){return"symbol"==typeof t||ta(t)&&Sr(t)==P}var ca=we?Ye(we):function(t){return ta(t)&&Ju(t.length)&&!!oe[Sr(t)]},fa=Uo(Mr),sa=Uo((function(t,e){return t<=e}));function la(t){if(!t)return[];if(Gu(t))return ua(t)?ln(t):Oo(t);if(Yt&&t[Yt])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Yt]());var e=pi(t);return(e==w?on:e==O?cn:Ba)(t)}function pa(t){return t?(t=va(t))===s||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function ha(t){var e=pa(t),n=e%1;return e==e?n?e-n:e:0}function da(t){return t?ir(ha(t),0,h):0}function va(t){if("number"==typeof t)return t;if(aa(t))return p;if(Qu(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Qu(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=$e(t);var n=dt.test(t);return n||gt.test(t)?ce(t.slice(2),n?2:8):ht.test(t)?p:+t}function ga(t){return Ao(t,za(t))}function _a(t){return null==t?"":uo(t)}var ya=Io((function(t,e){if(xi(e)||Gu(e))Ao(e,Ia(e),t);else for(var n in e)Tt.call(e,n)&&Qn(t,n,e[n])})),ma=Io((function(t,e){Ao(e,za(e),t)})),ba=Io((function(t,e,n,r){Ao(e,za(e),t,r)})),xa=Io((function(t,e,n,r){Ao(e,Ia(e),t,r)})),wa=ti(or),Sa=qr((function(t,e){t=jt(t);var n=-1,r=e.length,i=r>2?e[2]:o;for(i&&_i(e[0],e[1],i)&&(r=1);++n<r;)for(var u=e[n],a=za(u),c=-1,f=a.length;++c<f;){var s=a[c],l=t[s];(l===o||Bu(l,It[s])&&!Tt.call(t,s))&&(t[s]=u[s])}return t})),ja=qr((function(t){return t.push(o,Xo),Se(Ta,o,t)}));function Ea(t,e,n){var r=null==t?o:xr(t,e);return r===o?n:r}function Ca(t,e){return null!=t&&hi(t,e,Cr)}var Oa=Bo((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Rt.call(e)),t[e]=n}),Qa(nc)),Aa=Bo((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Rt.call(e)),Tt.call(t,e)?t[e].push(n):t[e]=[n]}),ui),Pa=qr(Ar);function Ia(t){return Gu(t)?$n(t):kr(t)}function za(t){return Gu(t)?$n(t,!0):function(t){if(!Qu(t))return function(t){var e=[];if(null!=t)for(var n in jt(t))e.push(n);return e}(t);var e=xi(t),n=[];for(var r in t)("constructor"!=r||!e&&Tt.call(t,r))&&n.push(r);return n}(t)}var La=Io((function(t,e,n){Br(t,e,n)})),Ta=Io((function(t,e,n,r){Br(t,e,n,r)})),ka=ti((function(t,e){var n={};if(null==t)return n;var r=!1;e=ze(e,(function(e){return e=_o(e,t),r||(r=e.length>1),e})),Ao(t,ni(t),n),r&&(n=ur(n,7,Jo));for(var o=e.length;o--;)co(n,e[o]);return n})),Ma=ti((function(t,e){return null==t?{}:function(t,e){return Vr(t,e,(function(e,n){return Ca(t,n)}))}(t,e)}));function Ra(t,e){if(null==t)return{};var n=ze(ni(t),(function(t){return[t]}));return e=ui(e),Vr(t,n,(function(t,n){return e(t,n[0])}))}var Da=$o(Ia),Na=$o(za);function Ba(t){return null==t?[]:Ke(t,Ia(t))}var Wa=ko((function(t,e,n){return e=e.toLowerCase(),t+(n?Fa(e):e)}));function Fa(t){return Ya(_a(t).toLowerCase())}function Va(t){return(t=_a(t))&&t.replace(yt,tn).replace(Xt,"")}var Ha=ko((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Ua=ko((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),Ga=To("toLowerCase"),Za=ko((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()})),qa=ko((function(t,e,n){return t+(n?" ":"")+Ya(e)})),$a=ko((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),Ya=To("toUpperCase");function Ka(t,e,n){return t=_a(t),(e=n?o:e)===o?function(t){return ee.test(t)}(t)?function(t){return t.match(Qt)||[]}(t):function(t){return t.match(ct)||[]}(t):t.match(e)||[]}var Xa=qr((function(t,e){try{return Se(t,o,e)}catch(t){return Yu(t)?t:new xt(t)}})),Ja=ti((function(t,e){return Ee(e,(function(e){e=Ri(e),rr(t,e,Au(t[e],t))})),t}));function Qa(t){return function(){return t}}var tc=Do(),ec=Do(!0);function nc(t){return t}function rc(t){return Tr("function"==typeof t?t:ur(t,1))}var oc=qr((function(t,e){return function(n){return Ar(n,t,e)}})),ic=qr((function(t,e){return function(n){return Ar(t,n,e)}}));function uc(t,e,n){var r=Ia(e),o=br(e,r);null!=n||Qu(e)&&(o.length||!r.length)||(n=e,e=t,t=this,o=br(e,Ia(e)));var i=!(Qu(n)&&"chain"in n&&!n.chain),u=Ku(t);return Ee(o,(function(n){var r=e[n];t[n]=r,u&&(t.prototype[n]=function(){var e=this.__chain__;if(i||e){var n=t(this.__wrapped__);return(n.__actions__=Oo(this.__actions__)).push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,Le([this.value()],arguments))})})),t}function ac(){}var cc=Fo(ze),fc=Fo(Oe),sc=Fo(Me);function lc(t){return yi(t)?He(Ri(t)):function(t){return function(e){return xr(e,t)}}(t)}var pc=Ho(),hc=Ho(!0);function dc(){return[]}function vc(){return!1}var gc,_c=Wo((function(t,e){return t+e}),0),yc=Zo("ceil"),mc=Wo((function(t,e){return t/e}),1),bc=Zo("floor"),xc=Wo((function(t,e){return t*e}),1),wc=Zo("round"),Sc=Wo((function(t,e){return t-e}),0);return Nn.after=function(t,e){if("function"!=typeof e)throw new Ot(i);return t=ha(t),function(){if(--t<1)return e.apply(this,arguments)}},Nn.ary=Cu,Nn.assign=ya,Nn.assignIn=ma,Nn.assignInWith=ba,Nn.assignWith=xa,Nn.at=wa,Nn.before=Ou,Nn.bind=Au,Nn.bindAll=Ja,Nn.bindKey=Pu,Nn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Hu(t)?t:[t]},Nn.chain=lu,Nn.chunk=function(t,e,n){e=(n?_i(t,e,n):e===o)?1:gn(ha(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var u=0,a=0,c=r(pe(i/e));u<i;)c[a++]=to(t,u,u+=e);return c},Nn.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,o=[];++e<n;){var i=t[e];i&&(o[r++]=i)}return o},Nn.concat=function(){var t=arguments.length;if(!t)return[];for(var e=r(t-1),n=arguments[0],o=t;o--;)e[o-1]=arguments[o];return Le(Hu(n)?Oo(n):[n],vr(e,1))},Nn.cond=function(t){var e=null==t?0:t.length,n=ui();return t=e?ze(t,(function(t){if("function"!=typeof t[1])throw new Ot(i);return[n(t[0]),t[1]]})):[],qr((function(n){for(var r=-1;++r<e;){var o=t[r];if(Se(o[0],this,n))return Se(o[1],this,n)}}))},Nn.conforms=function(t){return function(t){var e=Ia(t);return function(n){return ar(n,t,e)}}(ur(t,1))},Nn.constant=Qa,Nn.countBy=du,Nn.create=function(t,e){var n=Bn(t);return null==e?n:nr(n,e)},Nn.curry=function t(e,n,r){var i=Yo(e,8,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},Nn.curryRight=function t(e,n,r){var i=Yo(e,16,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},Nn.debounce=Iu,Nn.defaults=Sa,Nn.defaultsDeep=ja,Nn.defer=zu,Nn.delay=Lu,Nn.difference=Bi,Nn.differenceBy=Wi,Nn.differenceWith=Fi,Nn.drop=function(t,e,n){var r=null==t?0:t.length;return r?to(t,(e=n||e===o?1:ha(e))<0?0:e,r):[]},Nn.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?to(t,0,(e=r-(e=n||e===o?1:ha(e)))<0?0:e):[]},Nn.dropRightWhile=function(t,e){return t&&t.length?so(t,ui(e,3),!0,!0):[]},Nn.dropWhile=function(t,e){return t&&t.length?so(t,ui(e,3),!0):[]},Nn.fill=function(t,e,n,r){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&_i(t,e,n)&&(n=0,r=i),function(t,e,n,r){var i=t.length;for((n=ha(n))<0&&(n=-n>i?0:i+n),(r=r===o||r>i?i:ha(r))<0&&(r+=i),r=n>r?0:da(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},Nn.filter=function(t,e){return(Hu(t)?Ae:dr)(t,ui(e,3))},Nn.flatMap=function(t,e){return vr(wu(t,e),1)},Nn.flatMapDeep=function(t,e){return vr(wu(t,e),s)},Nn.flatMapDepth=function(t,e,n){return n=n===o?1:ha(n),vr(wu(t,e),n)},Nn.flatten=Ui,Nn.flattenDeep=function(t){return null!=t&&t.length?vr(t,s):[]},Nn.flattenDepth=function(t,e){return null!=t&&t.length?vr(t,e=e===o?1:ha(e)):[]},Nn.flip=function(t){return Yo(t,512)},Nn.flow=tc,Nn.flowRight=ec,Nn.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var o=t[e];r[o[0]]=o[1]}return r},Nn.functions=function(t){return null==t?[]:br(t,Ia(t))},Nn.functionsIn=function(t){return null==t?[]:br(t,za(t))},Nn.groupBy=mu,Nn.initial=function(t){return null!=t&&t.length?to(t,0,-1):[]},Nn.intersection=Zi,Nn.intersectionBy=qi,Nn.intersectionWith=$i,Nn.invert=Oa,Nn.invertBy=Aa,Nn.invokeMap=bu,Nn.iteratee=rc,Nn.keyBy=xu,Nn.keys=Ia,Nn.keysIn=za,Nn.map=wu,Nn.mapKeys=function(t,e){var n={};return e=ui(e,3),yr(t,(function(t,r,o){rr(n,e(t,r,o),t)})),n},Nn.mapValues=function(t,e){var n={};return e=ui(e,3),yr(t,(function(t,r,o){rr(n,r,e(t,r,o))})),n},Nn.matches=function(t){return Dr(ur(t,1))},Nn.matchesProperty=function(t,e){return Nr(t,ur(e,1))},Nn.memoize=Tu,Nn.merge=La,Nn.mergeWith=Ta,Nn.method=oc,Nn.methodOf=ic,Nn.mixin=uc,Nn.negate=ku,Nn.nthArg=function(t){return t=ha(t),qr((function(e){return Wr(e,t)}))},Nn.omit=ka,Nn.omitBy=function(t,e){return Ra(t,ku(ui(e)))},Nn.once=function(t){return Ou(2,t)},Nn.orderBy=function(t,e,n,r){return null==t?[]:(Hu(e)||(e=null==e?[]:[e]),Hu(n=r?o:n)||(n=null==n?[]:[n]),Fr(t,e,n))},Nn.over=cc,Nn.overArgs=Mu,Nn.overEvery=fc,Nn.overSome=sc,Nn.partial=Ru,Nn.partialRight=Du,Nn.partition=Su,Nn.pick=Ma,Nn.pickBy=Ra,Nn.property=lc,Nn.propertyOf=function(t){return function(e){return null==t?o:xr(t,e)}},Nn.pull=Ki,Nn.pullAll=Xi,Nn.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Hr(t,e,ui(n,2)):t},Nn.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?Hr(t,e,o,n):t},Nn.pullAt=Ji,Nn.range=pc,Nn.rangeRight=hc,Nn.rearg=Nu,Nn.reject=function(t,e){return(Hu(t)?Ae:dr)(t,ku(ui(e,3)))},Nn.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,o=[],i=t.length;for(e=ui(e,3);++r<i;){var u=t[r];e(u,r,t)&&(n.push(u),o.push(r))}return Ur(t,o),n},Nn.rest=function(t,e){if("function"!=typeof t)throw new Ot(i);return qr(t,e=e===o?e:ha(e))},Nn.reverse=Qi,Nn.sampleSize=function(t,e,n){return e=(n?_i(t,e,n):e===o)?1:ha(e),(Hu(t)?Kn:Yr)(t,e)},Nn.set=function(t,e,n){return null==t?t:Kr(t,e,n)},Nn.setWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:Kr(t,e,n,r)},Nn.shuffle=function(t){return(Hu(t)?Xn:Qr)(t)},Nn.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&_i(t,e,n)?(e=0,n=r):(e=null==e?0:ha(e),n=n===o?r:ha(n)),to(t,e,n)):[]},Nn.sortBy=ju,Nn.sortedUniq=function(t){return t&&t.length?oo(t):[]},Nn.sortedUniqBy=function(t,e){return t&&t.length?oo(t,ui(e,2)):[]},Nn.split=function(t,e,n){return n&&"number"!=typeof n&&_i(t,e,n)&&(e=n=o),(n=n===o?h:n>>>0)?(t=_a(t))&&("string"==typeof e||null!=e&&!oa(e))&&!(e=uo(e))&&rn(t)?mo(ln(t),0,n):t.split(e,n):[]},Nn.spread=function(t,e){if("function"!=typeof t)throw new Ot(i);return e=null==e?0:gn(ha(e),0),qr((function(n){var r=n[e],o=mo(n,0,e);return r&&Le(o,r),Se(t,this,o)}))},Nn.tail=function(t){var e=null==t?0:t.length;return e?to(t,1,e):[]},Nn.take=function(t,e,n){return t&&t.length?to(t,0,(e=n||e===o?1:ha(e))<0?0:e):[]},Nn.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?to(t,(e=r-(e=n||e===o?1:ha(e)))<0?0:e,r):[]},Nn.takeRightWhile=function(t,e){return t&&t.length?so(t,ui(e,3),!1,!0):[]},Nn.takeWhile=function(t,e){return t&&t.length?so(t,ui(e,3)):[]},Nn.tap=function(t,e){return e(t),t},Nn.throttle=function(t,e,n){var r=!0,o=!0;if("function"!=typeof t)throw new Ot(i);return Qu(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Iu(t,e,{leading:r,maxWait:e,trailing:o})},Nn.thru=pu,Nn.toArray=la,Nn.toPairs=Da,Nn.toPairsIn=Na,Nn.toPath=function(t){return Hu(t)?ze(t,Ri):aa(t)?[t]:Oo(Mi(_a(t)))},Nn.toPlainObject=ga,Nn.transform=function(t,e,n){var r=Hu(t),o=r||qu(t)||ca(t);if(e=ui(e,4),null==n){var i=t&&t.constructor;n=o?r?new i:[]:Qu(t)&&Ku(i)?Bn(Ut(t)):{}}return(o?Ee:yr)(t,(function(t,r,o){return e(n,t,r,o)})),n},Nn.unary=function(t){return Cu(t,1)},Nn.union=tu,Nn.unionBy=eu,Nn.unionWith=nu,Nn.uniq=function(t){return t&&t.length?ao(t):[]},Nn.uniqBy=function(t,e){return t&&t.length?ao(t,ui(e,2)):[]},Nn.uniqWith=function(t,e){return e="function"==typeof e?e:o,t&&t.length?ao(t,o,e):[]},Nn.unset=function(t,e){return null==t||co(t,e)},Nn.unzip=ru,Nn.unzipWith=ou,Nn.update=function(t,e,n){return null==t?t:fo(t,e,go(n))},Nn.updateWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:fo(t,e,go(n),r)},Nn.values=Ba,Nn.valuesIn=function(t){return null==t?[]:Ke(t,za(t))},Nn.without=iu,Nn.words=Ka,Nn.wrap=function(t,e){return Ru(go(e),t)},Nn.xor=uu,Nn.xorBy=au,Nn.xorWith=cu,Nn.zip=fu,Nn.zipObject=function(t,e){return ho(t||[],e||[],Qn)},Nn.zipObjectDeep=function(t,e){return ho(t||[],e||[],Kr)},Nn.zipWith=su,Nn.entries=Da,Nn.entriesIn=Na,Nn.extend=ma,Nn.extendWith=ba,uc(Nn,Nn),Nn.add=_c,Nn.attempt=Xa,Nn.camelCase=Wa,Nn.capitalize=Fa,Nn.ceil=yc,Nn.clamp=function(t,e,n){return n===o&&(n=e,e=o),n!==o&&(n=(n=va(n))==n?n:0),e!==o&&(e=(e=va(e))==e?e:0),ir(va(t),e,n)},Nn.clone=function(t){return ur(t,4)},Nn.cloneDeep=function(t){return ur(t,5)},Nn.cloneDeepWith=function(t,e){return ur(t,5,e="function"==typeof e?e:o)},Nn.cloneWith=function(t,e){return ur(t,4,e="function"==typeof e?e:o)},Nn.conformsTo=function(t,e){return null==e||ar(t,e,Ia(e))},Nn.deburr=Va,Nn.defaultTo=function(t,e){return null==t||t!=t?e:t},Nn.divide=mc,Nn.endsWith=function(t,e,n){t=_a(t),e=uo(e);var r=t.length,i=n=n===o?r:ir(ha(n),0,r);return(n-=e.length)>=0&&t.slice(n,i)==e},Nn.eq=Bu,Nn.escape=function(t){return(t=_a(t))&&$.test(t)?t.replace(Z,en):t},Nn.escapeRegExp=function(t){return(t=_a(t))&&nt.test(t)?t.replace(et,"\\$&"):t},Nn.every=function(t,e,n){var r=Hu(t)?Oe:pr;return n&&_i(t,e,n)&&(e=o),r(t,ui(e,3))},Nn.find=vu,Nn.findIndex=Vi,Nn.findKey=function(t,e){return De(t,ui(e,3),yr)},Nn.findLast=gu,Nn.findLastIndex=Hi,Nn.findLastKey=function(t,e){return De(t,ui(e,3),mr)},Nn.floor=bc,Nn.forEach=_u,Nn.forEachRight=yu,Nn.forIn=function(t,e){return null==t?t:gr(t,ui(e,3),za)},Nn.forInRight=function(t,e){return null==t?t:_r(t,ui(e,3),za)},Nn.forOwn=function(t,e){return t&&yr(t,ui(e,3))},Nn.forOwnRight=function(t,e){return t&&mr(t,ui(e,3))},Nn.get=Ea,Nn.gt=Wu,Nn.gte=Fu,Nn.has=function(t,e){return null!=t&&hi(t,e,Er)},Nn.hasIn=Ca,Nn.head=Gi,Nn.identity=nc,Nn.includes=function(t,e,n,r){t=Gu(t)?t:Ba(t),n=n&&!r?ha(n):0;var o=t.length;return n<0&&(n=gn(o+n,0)),ua(t)?n<=o&&t.indexOf(e,n)>-1:!!o&&Be(t,e,n)>-1},Nn.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=null==n?0:ha(n);return o<0&&(o=gn(r+o,0)),Be(t,e,o)},Nn.inRange=function(t,e,n){return e=pa(e),n===o?(n=e,e=0):n=pa(n),function(t,e,n){return t>=_n(e,n)&&t<gn(e,n)}(t=va(t),e,n)},Nn.invoke=Pa,Nn.isArguments=Vu,Nn.isArray=Hu,Nn.isArrayBuffer=Uu,Nn.isArrayLike=Gu,Nn.isArrayLikeObject=Zu,Nn.isBoolean=function(t){return!0===t||!1===t||ta(t)&&Sr(t)==_},Nn.isBuffer=qu,Nn.isDate=$u,Nn.isElement=function(t){return ta(t)&&1===t.nodeType&&!ra(t)},Nn.isEmpty=function(t){if(null==t)return!0;if(Gu(t)&&(Hu(t)||"string"==typeof t||"function"==typeof t.splice||qu(t)||ca(t)||Vu(t)))return!t.length;var e=pi(t);if(e==w||e==O)return!t.size;if(xi(t))return!kr(t).length;for(var n in t)if(Tt.call(t,n))return!1;return!0},Nn.isEqual=function(t,e){return Ir(t,e)},Nn.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:o)?n(t,e):o;return r===o?Ir(t,e,o,n):!!r},Nn.isError=Yu,Nn.isFinite=function(t){return"number"==typeof t&&Re(t)},Nn.isFunction=Ku,Nn.isInteger=Xu,Nn.isLength=Ju,Nn.isMap=ea,Nn.isMatch=function(t,e){return t===e||zr(t,e,ci(e))},Nn.isMatchWith=function(t,e,n){return n="function"==typeof n?n:o,zr(t,e,ci(e),n)},Nn.isNaN=function(t){return na(t)&&t!=+t},Nn.isNative=function(t){if(bi(t))throw new xt("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Lr(t)},Nn.isNil=function(t){return null==t},Nn.isNull=function(t){return null===t},Nn.isNumber=na,Nn.isObject=Qu,Nn.isObjectLike=ta,Nn.isPlainObject=ra,Nn.isRegExp=oa,Nn.isSafeInteger=function(t){return Xu(t)&&t>=-9007199254740991&&t<=l},Nn.isSet=ia,Nn.isString=ua,Nn.isSymbol=aa,Nn.isTypedArray=ca,Nn.isUndefined=function(t){return t===o},Nn.isWeakMap=function(t){return ta(t)&&pi(t)==I},Nn.isWeakSet=function(t){return ta(t)&&"[object WeakSet]"==Sr(t)},Nn.join=function(t,e){return null==t?"":Ue.call(t,e)},Nn.kebabCase=Ha,Nn.last=Yi,Nn.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=ha(n))<0?gn(r+i,0):_n(i,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,i):Ne(t,Fe,i,!0)},Nn.lowerCase=Ua,Nn.lowerFirst=Ga,Nn.lt=fa,Nn.lte=sa,Nn.max=function(t){return t&&t.length?hr(t,nc,jr):o},Nn.maxBy=function(t,e){return t&&t.length?hr(t,ui(e,2),jr):o},Nn.mean=function(t){return Ve(t,nc)},Nn.meanBy=function(t,e){return Ve(t,ui(e,2))},Nn.min=function(t){return t&&t.length?hr(t,nc,Mr):o},Nn.minBy=function(t,e){return t&&t.length?hr(t,ui(e,2),Mr):o},Nn.stubArray=dc,Nn.stubFalse=vc,Nn.stubObject=function(){return{}},Nn.stubString=function(){return""},Nn.stubTrue=function(){return!0},Nn.multiply=xc,Nn.nth=function(t,e){return t&&t.length?Wr(t,ha(e)):o},Nn.noConflict=function(){return le._===this&&(le._=Nt),this},Nn.noop=ac,Nn.now=Eu,Nn.pad=function(t,e,n){t=_a(t);var r=(e=ha(e))?sn(t):0;if(!e||r>=e)return t;var o=(e-r)/2;return Vo(he(o),n)+t+Vo(pe(o),n)},Nn.padEnd=function(t,e,n){t=_a(t);var r=(e=ha(e))?sn(t):0;return e&&r<e?t+Vo(e-r,n):t},Nn.padStart=function(t,e,n){t=_a(t);var r=(e=ha(e))?sn(t):0;return e&&r<e?Vo(e-r,n)+t:t},Nn.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),mn(_a(t).replace(rt,""),e||0)},Nn.random=function(t,e,n){if(n&&"boolean"!=typeof n&&_i(t,e,n)&&(e=n=o),n===o&&("boolean"==typeof e?(n=e,e=o):"boolean"==typeof t&&(n=t,t=o)),t===o&&e===o?(t=0,e=1):(t=pa(t),e===o?(e=t,t=0):e=pa(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var i=bn();return _n(t+i*(e-t+ae("1e-"+((i+"").length-1))),e)}return Gr(t,e)},Nn.reduce=function(t,e,n){var r=Hu(t)?Te:Ge,o=arguments.length<3;return r(t,ui(e,4),n,o,sr)},Nn.reduceRight=function(t,e,n){var r=Hu(t)?ke:Ge,o=arguments.length<3;return r(t,ui(e,4),n,o,lr)},Nn.repeat=function(t,e,n){return e=(n?_i(t,e,n):e===o)?1:ha(e),Zr(_a(t),e)},Nn.replace=function(){var t=arguments,e=_a(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Nn.result=function(t,e,n){var r=-1,i=(e=_o(e,t)).length;for(i||(i=1,t=o);++r<i;){var u=null==t?o:t[Ri(e[r])];u===o&&(r=i,u=n),t=Ku(u)?u.call(t):u}return t},Nn.round=wc,Nn.runInContext=t,Nn.sample=function(t){return(Hu(t)?Yn:$r)(t)},Nn.size=function(t){if(null==t)return 0;if(Gu(t))return ua(t)?sn(t):t.length;var e=pi(t);return e==w||e==O?t.size:kr(t).length},Nn.snakeCase=Za,Nn.some=function(t,e,n){var r=Hu(t)?Me:eo;return n&&_i(t,e,n)&&(e=o),r(t,ui(e,3))},Nn.sortedIndex=function(t,e){return no(t,e)},Nn.sortedIndexBy=function(t,e,n){return ro(t,e,ui(n,2))},Nn.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=no(t,e);if(r<n&&Bu(t[r],e))return r}return-1},Nn.sortedLastIndex=function(t,e){return no(t,e,!0)},Nn.sortedLastIndexBy=function(t,e,n){return ro(t,e,ui(n,2),!0)},Nn.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=no(t,e,!0)-1;if(Bu(t[n],e))return n}return-1},Nn.startCase=qa,Nn.startsWith=function(t,e,n){return t=_a(t),n=null==n?0:ir(ha(n),0,t.length),e=uo(e),t.slice(n,n+e.length)==e},Nn.subtract=Sc,Nn.sum=function(t){return t&&t.length?Ze(t,nc):0},Nn.sumBy=function(t,e){return t&&t.length?Ze(t,ui(e,2)):0},Nn.template=function(t,e,n){var r=Nn.templateSettings;n&&_i(t,e,n)&&(e=o),t=_a(t),e=ba({},e,r,Ko);var i,u,a=ba({},e.imports,r.imports,Ko),c=Ia(a),f=Ke(a,c),s=0,l=e.interpolate||mt,p="__p += '",h=Et((e.escape||mt).source+"|"+l.source+"|"+(l===X?lt:mt).source+"|"+(e.evaluate||mt).source+"|$","g"),d="//# sourceURL="+(Tt.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++re+"]")+"\n";t.replace(h,(function(e,n,r,o,a,c){return r||(r=o),p+=t.slice(s,c).replace(bt,nn),n&&(i=!0,p+="' +\n__e("+n+") +\n'"),a&&(u=!0,p+="';\n"+a+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),s=c+e.length,e})),p+="';\n";var v=Tt.call(e,"variable")&&e.variable;if(v){if(ft.test(v))throw new xt("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(u?p.replace(V,""):p).replace(H,"$1").replace(U,"$1;"),p="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(u?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var g=Xa((function(){return wt(c,d+"return "+p).apply(o,f)}));if(g.source=p,Yu(g))throw g;return g},Nn.times=function(t,e){if((t=ha(t))<1||t>l)return[];var n=h,r=_n(t,h);e=ui(e),t-=h;for(var o=qe(r,e);++n<t;)e(n);return o},Nn.toFinite=pa,Nn.toInteger=ha,Nn.toLength=da,Nn.toLower=function(t){return _a(t).toLowerCase()},Nn.toNumber=va,Nn.toSafeInteger=function(t){return t?ir(ha(t),-9007199254740991,l):0===t?t:0},Nn.toString=_a,Nn.toUpper=function(t){return _a(t).toUpperCase()},Nn.trim=function(t,e,n){if((t=_a(t))&&(n||e===o))return $e(t);if(!t||!(e=uo(e)))return t;var r=ln(t),i=ln(e);return mo(r,Je(r,i),Qe(r,i)+1).join("")},Nn.trimEnd=function(t,e,n){if((t=_a(t))&&(n||e===o))return t.slice(0,pn(t)+1);if(!t||!(e=uo(e)))return t;var r=ln(t);return mo(r,0,Qe(r,ln(e))+1).join("")},Nn.trimStart=function(t,e,n){if((t=_a(t))&&(n||e===o))return t.replace(rt,"");if(!t||!(e=uo(e)))return t;var r=ln(t);return mo(r,Je(r,ln(e))).join("")},Nn.truncate=function(t,e){var n=30,r="...";if(Qu(e)){var i="separator"in e?e.separator:i;n="length"in e?ha(e.length):n,r="omission"in e?uo(e.omission):r}var u=(t=_a(t)).length;if(rn(t)){var a=ln(t);u=a.length}if(n>=u)return t;var c=n-sn(r);if(c<1)return r;var f=a?mo(a,0,c).join(""):t.slice(0,c);if(i===o)return f+r;if(a&&(c+=f.length-c),oa(i)){if(t.slice(c).search(i)){var s,l=f;for(i.global||(i=Et(i.source,_a(pt.exec(i))+"g")),i.lastIndex=0;s=i.exec(l);)var p=s.index;f=f.slice(0,p===o?c:p)}}else if(t.indexOf(uo(i),c)!=c){var h=f.lastIndexOf(i);h>-1&&(f=f.slice(0,h))}return f+r},Nn.unescape=function(t){return(t=_a(t))&&q.test(t)?t.replace(G,hn):t},Nn.uniqueId=function(t){var e=++kt;return _a(t)+e},Nn.upperCase=$a,Nn.upperFirst=Ya,Nn.each=_u,Nn.eachRight=yu,Nn.first=Gi,uc(Nn,(gc={},yr(Nn,(function(t,e){Tt.call(Nn.prototype,e)||(gc[e]=t)})),gc),{chain:!1}),Nn.VERSION="4.17.21",Ee(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Nn[t].placeholder=Nn})),Ee(["drop","take"],(function(t,e){Vn.prototype[t]=function(n){n=n===o?1:gn(ha(n),0);var r=this.__filtered__&&!e?new Vn(this):this.clone();return r.__filtered__?r.__takeCount__=_n(n,r.__takeCount__):r.__views__.push({size:_n(n,h),type:t+(r.__dir__<0?"Right":"")}),r},Vn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),Ee(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;Vn.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:ui(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),Ee(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Vn.prototype[t]=function(){return this[n](1).value()[0]}})),Ee(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Vn.prototype[t]=function(){return this.__filtered__?new Vn(this):this[n](1)}})),Vn.prototype.compact=function(){return this.filter(nc)},Vn.prototype.find=function(t){return this.filter(t).head()},Vn.prototype.findLast=function(t){return this.reverse().find(t)},Vn.prototype.invokeMap=qr((function(t,e){return"function"==typeof t?new Vn(this):this.map((function(n){return Ar(n,t,e)}))})),Vn.prototype.reject=function(t){return this.filter(ku(ui(t)))},Vn.prototype.slice=function(t,e){t=ha(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Vn(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==o&&(n=(e=ha(e))<0?n.dropRight(-e):n.take(e-t)),n)},Vn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Vn.prototype.toArray=function(){return this.take(h)},yr(Vn.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=Nn[r?"take"+("last"==e?"Right":""):e],u=r||/^find/.test(e);i&&(Nn.prototype[e]=function(){var e=this.__wrapped__,a=r?[1]:arguments,c=e instanceof Vn,f=a[0],s=c||Hu(e),l=function(t){var e=i.apply(Nn,Le([t],a));return r&&p?e[0]:e};s&&n&&"function"==typeof f&&1!=f.length&&(c=s=!1);var p=this.__chain__,h=!!this.__actions__.length,d=u&&!p,v=c&&!h;if(!u&&s){e=v?e:new Vn(this);var g=t.apply(e,a);return g.__actions__.push({func:pu,args:[l],thisArg:o}),new Fn(g,p)}return d&&v?t.apply(this,a):(g=this.thru(l),d?r?g.value()[0]:g.value():g)})})),Ee(["pop","push","shift","sort","splice","unshift"],(function(t){var e=At[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);Nn.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var o=this.value();return e.apply(Hu(o)?o:[],t)}return this[n]((function(n){return e.apply(Hu(n)?n:[],t)}))}})),yr(Vn.prototype,(function(t,e){var n=Nn[e];if(n){var r=n.name+"";Tt.call(Pn,r)||(Pn[r]=[]),Pn[r].push({name:e,func:n})}})),Pn[No(o,2).name]=[{name:"wrapper",func:o}],Vn.prototype.clone=function(){var t=new Vn(this.__wrapped__);return t.__actions__=Oo(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Oo(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Oo(this.__views__),t},Vn.prototype.reverse=function(){if(this.__filtered__){var t=new Vn(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Vn.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Hu(t),r=e<0,o=n?t.length:0,i=function(t,e,n){for(var r=-1,o=n.length;++r<o;){var i=n[r],u=i.size;switch(i.type){case"drop":t+=u;break;case"dropRight":e-=u;break;case"take":e=_n(e,t+u);break;case"takeRight":t=gn(t,e-u)}}return{start:t,end:e}}(0,o,this.__views__),u=i.start,a=i.end,c=a-u,f=r?a:u-1,s=this.__iteratees__,l=s.length,p=0,h=_n(c,this.__takeCount__);if(!n||!r&&o==c&&h==c)return lo(t,this.__actions__);var d=[];t:for(;c--&&p<h;){for(var v=-1,g=t[f+=e];++v<l;){var _=s[v],y=_.iteratee,m=_.type,b=y(g);if(2==m)g=b;else if(!b){if(1==m)continue t;break t}}d[p++]=g}return d},Nn.prototype.at=hu,Nn.prototype.chain=function(){return lu(this)},Nn.prototype.commit=function(){return new Fn(this.value(),this.__chain__)},Nn.prototype.next=function(){this.__values__===o&&(this.__values__=la(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?o:this.__values__[this.__index__++]}},Nn.prototype.plant=function(t){for(var e,n=this;n instanceof Wn;){var r=Ni(n);r.__index__=0,r.__values__=o,e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e},Nn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Vn){var e=t;return this.__actions__.length&&(e=new Vn(this)),(e=e.reverse()).__actions__.push({func:pu,args:[Qi],thisArg:o}),new Fn(e,this.__chain__)}return this.thru(Qi)},Nn.prototype.toJSON=Nn.prototype.valueOf=Nn.prototype.value=function(){return lo(this.__wrapped__,this.__actions__)},Nn.prototype.first=Nn.prototype.head,Yt&&(Nn.prototype[Yt]=function(){return this}),Nn}();le._=dn,(r=function(){return dn}.call(e,n,e,t))===o||(t.exports=r)}.call(this)},128:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(28),u=n(195),a=n(248),c=n(51),f=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.getComponent=function(){var t=e.getTemplate(e.template),n=e.getStyle(e.css);return e.canvas=t.getElementsByTagName("canvas")[0],e.canvas.width=i.default.CANVAS_SIZE.width,e.canvas.height=i.default.CANVAS_SIZE.height,e.ctx=e.canvas.getContext("2d",{willReadFrequently:!0}),e.eventListener=t.querySelector("#event-listener"),e.eventListener.style.width=i.default.CANVAS_SIZE.width+"px",e.eventListener.style.height=i.default.CANVAS_SIZE.height+"px",{canvasTemplate:t,canvasStyle:n}},e.getCanvasSelector=function(){return"#sc-canvas"},Object.defineProperty(e,"cursorStyle",{set:function(t){t?(e._cursorStyle.before=e._cursorStyle.current,e._cursorStyle.current=t,e.eventListener.style.cursor=t):e.eventListener.style.cursor="default"},enumerable:!1,configurable:!0}),e.getCursorPosition=function(t){var n=e.canvas.getBoundingClientRect();return{x:t.clientX-n.left,y:t.clientY-n.top}},e.subscribe=function(t,n){e.subscriptions[t].push(n)},e.simulateSubscriptions=function(){Object.keys(e.subscriptions).forEach((function(t){var n=e.subscriptions[t];n.length&&e.eventListener.addEventListener(t,(function(t){var r=e.getCursorPosition(t);n.forEach((function(e){e(t,r)}))}))}))},e.template='\n <div id="event-listener"></div>\n <canvas id="sc-canvas"></canvas>\n ',e.css="\n #event-listener {\n position: absolute;\n z-index: ".concat(c.default.getLayerIndex("normal"),";\n }\n "),e.subscriptions={click:[],mousemove:[],mousedown:[],mouseup:[]},e._cursorStyle={before:null,current:"default"},a.default.components.add({info:{name:"canvas",description:"canvas component"},prototype:e}),e}(u.default);e.default=f},738:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(195),u=n(490),a=n(128),c=n(248),f=n(78),s=n(51),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),Object.defineProperty(e,"additionStyle",{get:function(){return e._additionStyle},set:function(t){e._additionStyle=t,e.applyExcretionStyle()},enumerable:!1,configurable:!0}),e.applyExcretionStyle=function(){"crop"===e._additionStyle?e.determineCropStyle():e.determineDefaultStyle()},e.determineCropStyle=function(){e._excretions.forEach((function(t){0!=!!t&&(t.classList.contains("excretion_crop")||(t.classList.add("excretion_crop"),f.default.viewCropButton()))}))},e.determineDefaultStyle=function(){e._excretions.forEach((function(t){0!=!!t&&(t.classList=e._excretionDefaultStyle)}))},e.getComponent=function(){var t=e.getTemplate(e.template,{className:"excretions-wrap"}),n=e.getStyle(e.css);return e.excretionWrap=t,e.emmit(),{excretionsTemplate:t,excretionsStyle:n}},Object.defineProperty(e,"excretionState",{set:function(t){switch(e._excretionState=t,e.applyExcretionStyle(),t){case"abandoned":default:a.default.cursorStyle="default";break;case"create":a.default.cursorStyle="crosshair";break;case"add":a.default.cursorStyle="copy";break;case"remove":a.default.cursorStyle="alias"}},enumerable:!1,configurable:!0}),e.setToolState=function(t){switch(e._excretionToolState=t,t){case"abandoned":default:e.excretionState="abandoned",e._excretionActivity="abandoned";break;case"taken":e.excretionState="create"}},e.clearExcretionsCoords=function(){console.log("clear!"),e._excretions.forEach((function(t){return t.remove()})),e._excretions=[],e.excretionsCoords=[]},e.getTempCoords=function(){var t=e._tempCoords[0],n=e._tempCoords[1],r=Object.assign(t,n);return e._tempCoords=[],r},e.endExcretion=function(){var t=e.getTempCoords();e.excretionsCoords.push(t),e._excretionActivity="end",console.log("ExcretionsComponent.excretionsCoords",e.excretionsCoords)},e.emmit=function(){a.default.subscribe("mousedown",(function(t,n){if("abandoned"!==e._excretionToolState){var r=e._excretionState;if("create"===r){var o={className:e._excretionDefaultStyle[0]},i=e.getTemplate(e.templateExcretion,o);e.clearExcretionsCoords();var u={start:n};i.style.left="".concat(u.start.x,"px"),i.style.top="".concat(u.start.y,"px");var a=e.excretionWrap.appendChild(i);e._excretions.push(a),e._tempCoords.push(u)}"add"===r&&(u={start:n},e._tempCoords.push(u)),e.applyExcretionStyle(),e._excretionActivity="active"}})),a.default.subscribe("mousemove",(function(t,n){if("abandoned"!==e._excretionToolState){var r=e._excretionActivity;if(t.altKey&&"abandoned"!==e._excretionState&&(e._excretionState="add"),"abandoned"!==r&&"active"===r){var o=e._excretions.length-1,i=e._excretions[o],u=+i.style.left.split("px")[0],a=+i.style.top.split("px")[0],c=Math.abs(n.x-u),f=Math.abs(n.y-a);i.style.width=c+"px",i.style.height=f+"px";var s=n.x>u&&n.y>a,l=n.x<u&&n.y>a,p=n.x<u&&n.y<a,h=n.x>u&&n.y<a;s?i.style.transform="translateX(0px) translateY(0px)":l?i.style.transform="translateX(-".concat(c,"px) translateY(0px)"):p?i.style.transform="translateX(-".concat(c,"px) translateY(-").concat(f,"px)"):h&&(i.style.transform="translateX(0px) translateY(-".concat(f,"px)"))}}})),a.default.subscribe("mouseup",(function(t,n){if("abandoned"!==e._excretionToolState){var r=e._excretionState;if("abandoned"!==r&&("create"===r||"add"===r)){var o={end:n};e._tempCoords.push(o),e.endExcretion()}}}))},e.template="",e.templateExcretion='\n <button type="button" class="crop-button">\n <svg fill="#ffffff" viewBox="0 0 1920 1920" xmlns="http://www.w3.org/2000/svg" stroke="#ffffff"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <path fill-rule="evenodd" clip-rule="evenodd" d="M426.667 0h106.666v1386.67H1920v106.66H426.667V0zM320 426.667H0v106.666h320V426.667zm320 0v106.666h746.67V1280h106.66V426.667H640zM1493.33 1600h-106.66v320h106.66v-320z"></path> </g></svg>\n </button>\n ',e._excretionDefaultStyle=["excretion"],e.css="\n .excretion {\n display: flex;\n position: absolute;\n background-image: linear-gradient(90deg, silver 50%, transparent 50%), linear-gradient(90deg, silver 50%, transparent 50%), linear-gradient(0deg, silver 50%, transparent 50%), linear-gradient(0deg, silver 50%, transparent 50%);\n background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;\n background-size: 8px 1px, 8px 1px, 1px 8px, 1px 8px;\n background-position: left top, right bottom, left bottom, right top;\n animation: border-dance 1s infinite linear;\n z-index: ".concat(s.default.getLayerIndex("low"),";\n }\n\n .excretion_crop {\n box-shadow: 0px 0px 0px calc(100vw + 100vh) #50505070;\n }\n\n .crop-button {\n display: none;\n justify-content: center;\n align-items: center;\n position: absolute;\n padding: 5px;\n right: -35px;\n top: 0;\n background: #232222;\n border: 1px solid #ffffff50;\n border-radius: 4px;\n width: 30px;\n height: 30px;\n cursor: pointer;\n z-index: ").concat(s.default.getLayerIndex("high"),";\n }\n\n .crop-button--view {\n display: flex;\n }\n\n @keyframes border-dance {\n 0% {\n background-position: left top, right bottom, left bottom, right top;\n }\n 100% {\n background-position: left 8px top, right 8px bottom, left bottom 8px, right top 8px;\n }\n }\n "),e._excretions=[],e._excretionState="abandoned",e._excretionActivity="abandoned",e._excretionToolState="abandoned",e._tempCoords=[],e.excretionsCoords=[],e._additionStyle="default",e.tool={id:1,name:"excretion",onAction:function(){return e.setToolState("taken")},offAction:function(){return e.setToolState("abandoned")},support:function(){e.clearExcretionsCoords(),e.additionStyle="default"}},u.default.add(e.tool),c.default.components.add({info:{name:"excretion",description:"excretion component"},prototype:e}),e}(i.default);e.default=l},576:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(195),u=n(308),a=n(248),c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.getComponent=function(){var t=e.getTemplate(e.template,{className:"loading-wrapper"}),n=e.getStyle(e.css);return e.loading=t,e.subscribeLoadingStart(),e.subscribeLoadingEnd(),{loadingTemplate:t,loadingStyle:n}},e.hide=function(){e.loading.style.display="none"},e.view=function(){e.loading.style.display="flex"},e.subscribeLoadingStart=function(){var t={name:"loading-start",action:function(){return e.view()}};u.default.subcribe(t)},e.subscribeLoadingEnd=function(){var t={name:"loading-end",action:function(){return e.hide()}};u.default.subcribe(t)},e.template='\n <span class="loader"></span>\n ',e.css='\n .loading-wrapper {\n display: none; \n justify-content: center;\n align-items: center;\n position: absolute;\n width: 100%;\n height: 100%;\n background: #ffffff30;\n }\n\n .loader {\n width: 48px;\n height: 48px;\n border-radius: 50%;\n position: relative;\n animation: rotate 1s linear infinite\n }\n .loader::before , .loader::after {\n content: "";\n box-sizing: border-box;\n position: absolute;\n inset: 0px;\n border-radius: 50%;\n border: 5px solid #FFF;\n animation: prixClipFix 2s linear infinite ;\n }\n .loader::after{\n inset: 8px;\n transform: rotate3d(90, 90, 0, 180deg );\n border-color: #FF3D00;\n }\n\n @keyframes rotate {\n 0% {transform: rotate(0deg)}\n 100% {transform: rotate(360deg)}\n }\n\n @keyframes prixClipFix {\n 0% {clip-path:polygon(50% 50%,0 0,0 0,0 0,0 0,0 0)}\n 50% {clip-path:polygon(50% 50%,0 0,100% 0,100% 0,100% 0,100% 0)}\n 75%, 100% {clip-path:polygon(50% 50%,0 0,100% 0,100% 100%,100% 100%,100% 100%)}\n }\n ',a.default.components.add({info:{name:"loading",description:"loading component"},prototype:e}),e}(i.default);e.default=c},351:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(433),u=n(128),a=n(195),c=n(490),f=n(248),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),Object.defineProperty(e,"pipetteColor",{get:function(){return e._pipetteColor},set:function(t){e._pipetteColor=t,e._pipetteColorElement.style.borderColor=e._pipetteColor},enumerable:!1,configurable:!0}),e.getComponent=function(){var t=e.getTemplate(e.template,{className:"pipette"}),n=e.getStyle(e.css);return e.pipette=t,e._pipetteColorElement=t.querySelector(".pipette_color"),e.emmit(),{pipetteTemplate:t,pipetteStyle:n}},e.setState=function(t){switch(e._pipetteState=t,t){case"abandoned":default:return e.hide();case"taken":case"selected-color":return e.show()}},e.emmit=function(){u.default.subscribe("mousemove",(function(t,n){var r=e._pipetteState;if("taken"===r||"selected-color"===r){var o=n.x,i=n.y;e.pipette.style.left="".concat(o+10,"px"),e.pipette.style.top="".concat(i+10,"px")}})),u.default.subscribe("click",(function(t,n){var r=e._pipetteState;"taken"!==r&&"selected-color"!==r||(console.log("pipetteState",r),"taken"===r&&(e.setColorFromChoosenPixel(n),e.setState("selected-color")),"selected-color"===r&&e.setColorFromChoosenPixel(n))}))},e.setColorFromChoosenPixel=function(t){var n=t.x,r=t.y,o=u.default.ctx.getImageData(n,r,1,1).data,a=i.Convert.rgbToHex(o[0],o[1],o[2]);e.pipetteColor=a},e.show=function(){e.pipette.style.display="flex",u.default.cursorStyle="default"},e.hide=function(){e.pipette.style.display="none",u.default.cursorStyle="default"},e.template='\n <div class="pipette_border-out">\n <div class="pipette_color">\n <div class="pipette_border-in">\n <svg width="24px" height="24px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"><path d="M17 12C17 14.7614 14.7614 17 12 17M17 12C17 9.23858 14.7614 7 12 7M17 12H19M12 17C9.23858 17 7 14.7614 7 12M12 17V19M7 12C7 9.23858 9.23858 7 12 7M7 12H5M12 7V5M14 12C14 13.1046 13.1046 14 12 14C10.8954 14 10 13.1046 10 12C10 10.8954 10.8954 10 12 10C13.1046 10 14 10.8954 14 12Z" stroke="#d9d9d9" stroke-linecap="round" stroke-linejoin="round"></path></g></svg>\n </div> \n </div>\n </div>\n ',e.css="\n .pipette {\n position: absolute;\n display: none;\n justify-content: center;\n align-items: center;\n width: 48px;\n height: 48px;\n }\n\n .pipette_border-out {\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 100px;\n border: solid 2px #d9d9d9;\n width: 44px;\n height: 44px;\n }\n\n .pipette_border-in {\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 100px;\n border: solid 1px #d9d9d9;\n width: 32px;\n height: 32px;\n }\n\n .pipette_color {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 34px;\n height: 34px;\n border-radius: 100px;\n border-color: blue;\n border-style: solid;\n border-width: 5px;\n }\n ",e._pipetteState="abandoned",e.tool={id:0,name:"pipette",onAction:function(){return e.setState("taken")},offAction:function(){return e.setState("abandoned")}},c.default.add(e.tool),f.default.components.add({info:{name:"pipette",description:"pipette component"},prototype:e}),e}(a.default);e.default=s},344:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(195),u=n(248),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.getComponent=function(t){var n=e.getTemplate(e.template,{className:"slot-wrapper"}),r=e.getStyle(e.css);return e.slot=n.querySelector("slot"),e.slot.name=t,{slotTemplate:n,slotStyle:r}},e.template='\n <slot class="slot"></slot>\n ',e.css="",u.default.components.add({info:{name:"slot",description:"slot component"},prototype:e}),e}(i.default);e.default=a},28:function(t,e){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigFabric=e.ConfigStore=void 0;e.ConfigStore=function(){};var o=function(){};e.ConfigFabric=o;var i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),Object.defineProperty(e,"WEB_COMPONENT_TAG_NAME",{get:function(){return e._WEB_COMPONENT_TAG_NAME},set:function(t){t&&"string"==typeof t&&(e._WEB_COMPONENT_TAG_NAME=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"CANVAS_SIZE",{get:function(){return e._CANVAS_SIZE},set:function(t){t&&(null==t?void 0:t.width)&&(null==t?void 0:t.height)?e._CANVAS_SIZE=t:console.warn("CANVAS_SIZE denied")},enumerable:!1,configurable:!0}),Object.defineProperty(e,"LAYERS",{get:function(){return e._LAYERS},set:function(t){t&&(null==t?void 0:t.length)&&(e._LAYERS=t)},enumerable:!1,configurable:!0}),e}(o);i._CANVAS_SIZE={width:300,height:150},i._WEB_COMPONENT_TAG_NAME="canvas-editor-engine",i._LAYERS=[{name:"low",index:1},{name:"normal",index:2},{name:"high",index:3}],e.default=i},981:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(670),u=n(433),a=n(543),c=function(t){function e(e,n){var r=t.call(this,e)||this;return r.filterList=["pixel"],r.options=n,r}return o(e,t),e.prototype.on=function(t,e){var n=this;return new Promise((function(r){var o=n.options,i=n.copy(o),u=n[t](i,e);return n.update(u,o),r({imageData:u,position:{x:o.x,y:o.y},size:{width:u.width,height:u.height},quality:e.quality})}))},e.prototype.pixel=function(t,e){var n=e.quality;console.log("quality",n);var r=this.getQualityProcessedRemainder(t,+n),o={width:r.width,height:r.height};console.log("imageSize",o),this.setImageSize(o);var i=this.getBuffCollection(r),a=i.rowRGBABuff,c=i.buff,f=this.getQualityBuff(c,+n),s=f.qualityBuff,l=f.rangeCommit,p=this.getMostCommonQuanlityBuff(s,l).flat();if(a.length>=p.length){var h=p.map((function(t,e){var n=u.Convert.hexToRgb(t);return[n.r,n.g,n.b,a[e][3]]}));h.flat().forEach((function(t,e){r.data[e]=t}))}return r},e.prototype.getQualityProcessedRemainder=function(t,e){var n=this.getRowRGBABuff(t),r=this.getRGBAMatrix(n,{width:t.width,height:t.height}),o=e-t.width%e,i=e-t.height%e,u=(0,a.range)(0,o),c=(0,a.range)(0,i),f={width:t.width+o,height:t.height+i},s=r[0].length-1;r.forEach((function(t,e){var n=t[s];u.forEach((function(){return r[e].push(n)}))}));var l=r.length-1,p=r[l];c.forEach((function(){return r.push(p)}));var h=r.flat(2),d=document.createElement("canvas").getContext("2d").createImageData(f.width,f.height);return h.forEach((function(t,e){return d.data[e]=h[e]})),d},e.prototype.getQualityBuff=function(t,e){var n=Math.floor(this.imageSize.width/e),r=Math.floor(this.imageSize.height/e),o=[],i=[],u=0,c=0,f=e,s=0,l=e;return(0,a.range)(0,r).forEach((function(r){(0,a.range)(0,n).forEach((function(n){var r,p,h=(0,a.range)(s,l),d=(0,a.range)(c,f),v=[],g=[];h.forEach((function(e){d.forEach((function(n){v.push(t[e][n]),g.push({y:e,x:n})}))})),c+=e,f+=e,null!==(r=i[u])&&void 0!==r||(i[u]=g),null!==(p=o[u])&&void 0!==p||(o[u]=v),u++})),c=0,f=e,s+=e,l+=e})),{qualityBuff:o,rangeCommit:i}},e.prototype.getMostCommonQuanlityBuff=function(t,e){var n=this,r=[];return t.map((function(t){var e=n.getMostCommonElement(t);return t.map((function(){return e}))})).forEach((function(t,n){t.forEach((function(t,o){var i,u,a,c=e[n][o],f=c.x,s=c.y;null!==(i=r[s])&&void 0!==i||(r[s]=[]),null!==(u=(a=r[s])[f])&&void 0!==u||(a[f]=t)}))})),r},e.prototype.getMostCommonElement=function(t){var e=t.sort((function(e,n){return t.filter((function(t){return t===e})).length-t.filter((function(t){return t===n})).length}));return e[e.length-1]},e}(i.Filter);e.default=c},840:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VagueFilter=void 0;var r=n(981);e.VagueFilter=r.default},156:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.AppStore=e.VueCanvasEditorEngine=e.StaticCanvasEditorEngine=e.PullProjectService=e.ProjectsService=e.ThroughHistoryService=e.EventService=e.ToolLayerService=e.DownloadService=e.CropService=e.LoggerService=e.DrawService=e.ToolService=e.LoadingComponent=e.SlotComponent=e.ExcretionComponent=e.CanvasComponent=e.PipetteComponent=e.AppConfig=void 0;var i=n(28);e.AppConfig=i.default;var u=n(436),a=n(128);e.CanvasComponent=a.default;var c=n(351);e.PipetteComponent=c.default;var f=n(738);e.ExcretionComponent=f.default;var s=n(344);e.SlotComponent=s.default;var l=n(576);e.LoadingComponent=l.default;var p=n(402);e.DrawService=p.default;var h=n(490);e.ToolService=h.default;var d=n(248);e.LoggerService=d.default;var v=n(78);e.CropService=v.default;var g=n(724);e.DownloadService=g.default;var _=n(51);e.ToolLayerService=_.default;var y=n(308);e.EventService=y.default;var m=n(512);e.ThroughHistoryService=m.default;var b=n(146);e.ProjectsService=b.default;var x=n(179);e.PullProjectService=x.default;var w=n(807);e.AppStore=w.default;var S=function(){function t(t){i.default.WEB_COMPONENT_TAG_NAME=t}return t.prototype.getInitial=function(){return{tag:i.default.WEB_COMPONENT_TAG_NAME,component:u.default}},t}(),j=function(t){function e(e){return t.call(this,e)||this}return o(e,t),e.prototype.init=function(){var t=window.customElements,e=this.getInitial(),n=e.tag,r=e.component;t.define(n,r)},e}(S);e.StaticCanvasEditorEngine=j;var E=function(t){function e(e){return t.call(this,e)||this}return o(e,t),e.prototype.getContext2D=function(){return a.default.ctx},e.prototype.getCanvas=function(){return a.default.canvas},e}(S);e.VueCanvasEditorEngine=E},195:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.getTemplate=function(t,e){var n={tag:"div"};e&&Object.keys(e).forEach((function(t){e[t]&&(n[t]=e[t])}));var r=document.createElement(n.tag);return n&&Object.keys(n).forEach((function(t){n[t]&&"tag"!==t&&(r[t]=n[t])})),t&&(r.innerHTML=t),r},t.getStyle=function(t){if(0==!!t)return null;var e=document.createElement("style");return e.type="text/css",e.appendChild(document.createTextNode(t)),e},t}();e.default=n},78:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(738),o=n(28),i=n(807),u=n(670),a=function(){function t(){}return t.setup=function(){r.default.additionStyle="crop"},t.crop=function(e){var n;if(0!=!!(null===(n=r.default.excretionsCoords)||void 0===n?void 0:n.length)){var a=new u.Filter(e),c=t.options,f=a.copyExtendedModel(c),s=f.imageData,l=f.size,p={x:o.default.CANVAS_SIZE.width/2-l.width/2,y:o.default.CANVAS_SIZE.height/2-l.height/2};a.update(s,p),i.default.store.imageState.reduce({tempImageData:s,position:p,size:{width:l.width,height:l.height}},"Use crop")}},t.viewCropButton=function(){var t=r.default.excretionWrap.querySelectorAll(".crop-button");t[t.length-1].classList.add("crop-button--view")},Object.defineProperty(t,"options",{get:function(){var t=r.default.excretionsCoords.length-1,e=r.default.excretionsCoords[t],n=Math.abs(e.start.x-e.end.x),o=Math.abs(e.start.y-e.end.y);return{x:e.start.x,y:e.start.y,width:n,height:o}},enumerable:!1,configurable:!0}),t}();e.default=a},724:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(128),o=function(){function t(){}return t.getDataUrl=function(){return r.default.canvas.toDataURL()},t.download=function(e){var n=document.createElement("a");n.download="".concat(e||"image",".png"),n.href=t.getDataUrl(),n.click()},t}();e.default=o},402:function(t,e,n){"use strict";var r=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.SCImage=void 0;var o=n(28),i=n(840),u=n(807),a=n(670),c=n(308),f=function(){function t(){}return t.drawImage=function(e,n,r){t.imageProcessor=new s(n,e),t.imageProcessor.draw(r).then((function(){var t={x:0,y:0},n=new a.Filter(e).copy(t);u.default.store.imageState.reduce({tempImageData:n,position:t,size:o.default.CANVAS_SIZE},"Loaded image")}))},t.drawProject=function(e,n){var r=n.state.current.imageData,o=n.state.current.position,i=n.state.current.size;t.imageProcessor=new l(n,e),t.imageProcessor.draw(),u.default.store.imageState.reduce({tempImageData:r,position:o,size:i},"Loaded project")},t.drawSmoothImage=function(e,n,r){var o=t.getFilterArgs(e,n);if(c.default.dispatch("loading-start"),!t.imageProcessor)throw new Error("No valid ImageProcessor instance found");t.imageProcessor.vague(o,r).then(t.updateImageStateAfterVague).finally((function(){return c.default.dispatch("loading-end")}))},t.updateImageStateAfterVague=function(t){var e=t.imageData,n=t.position,r=t.size,o=t.quality;u.default.store.imageState.reduce({tempImageData:e,position:n,size:r},"[Filter Vague] quality: ".concat(o))},t.getFilterArgs=function(t,e){var n,r,o,i=u.default.store.imageState;return t?(o={x:i.position.x,y:i.position.y},i.size.width&&i.size.height&&(o.width=i.size.width,o.height=i.size.height)):(o={x:e.position.x,y:e.position.y},"initial"!==e.size&&(null===(n=e.size)||void 0===n?void 0:n.width)&&(null===(r=e.size)||void 0===r?void 0:r.height)&&(o.width=e.size.width,o.height=e.size.height)),o},t}();e.default=f;var s=function(){function t(t,e){this.img=new Image,this.img.src=t,this.ctx=e}return t.prototype.draw=function(t){var e=this,n=this,i=this.img;return new Promise((function(u,a){try{i.addEventListener("load",(function(){var a,c,f,s=[t.position.x,t.position.y];"initial"!==t.size&&(s=(null===(c=t.size)||void 0===c?void 0:c.width)&&(null===(f=t.size)||void 0===f?void 0:f.height)?s.concat([t.size.width,t.size.height]):s.concat([o.default.CANVAS_SIZE.width,o.default.CANVAS_SIZE.height])),(a=e.ctx).drawImage.apply(a,r([i],s,!1)),e.ctx.save(),u(n)}))}catch(t){a(t)}}))},t.prototype.vague=function(t,e){return new i.VagueFilter(this.ctx,t).on("pixel",e)},t}();e.SCImage=s;var l=function(){function t(t,e){this.project=t,this.ctx=e}return t.prototype.draw=function(t){var e=this,n=this.project.state.current,r=n.imageData,o=n.position;return new Promise((function(t,n){try{new a.Filter(e.ctx).update(r,o),e.ctx.save(),t(e)}catch(t){n(t)}}))},t.prototype.vague=function(t,e){return new i.VagueFilter(this.ctx,t).on("pixel",e)},t}()},308:function(t,e,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.EventAtom=e.ControlEvent=void 0;var o=n(841);e.ControlEvent=function(){};e.EventAtom=function(){};var i=function(){function t(){}return t.subcribe=function(e){var n=r({id:(new o.Guid4).generate()},e);t.eventList.push(n)},t.dispatch=function(e,n){t.eventList.find((function(t){return t.name===e})).action(n)},t.applyEvents=function(e){var n;null===(n=t.eventList)||void 0===n||n.forEach((function(t){e.addEventListener(t.name,t.action)}))},t.eventList=[],t}();e.default=i},248:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return Object.defineProperty(t,"components",{get:function(){return t.getMethods("components")},enumerable:!1,configurable:!0}),Object.defineProperty(t,"services",{get:function(){return t.getMethods("services")},enumerable:!1,configurable:!0}),Object.defineProperty(t,"planed",{get:function(){return t.getMethods("planed")},enumerable:!1,configurable:!0}),t.getMethods=function(e){return{add:function(n){t._add(e,n)},get:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t._get.apply(t,e)}}},t._add=function(e,n){t.log[e].push(n)},t._get=function(e,n){return t.log[e].find((function(t){return t.info.name===n}))},t.log={components:[],services:[],planed:[]},t}();e.default=n},146:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(291),o=function(){function t(){this.projectsKey="cee-projects"}return t.prototype.getProjectsFromLocalStorage=function(){var t=localStorage.getItem(this.projectsKey);return t?JSON.parse(t):[]},t.prototype.getProjectFromLocalStorage=function(t){return this.getProjectsFromLocalStorage().find((function(e){return e.id===t}))},t.prototype.saveProjectsToLocalStorage=function(t){localStorage.setItem(this.projectsKey,JSON.stringify(t))},t.prototype.saveProjectToLocalStorage=function(t){var e=this.getProjectsFromLocalStorage();e.push(t),localStorage.setItem(this.projectsKey,JSON.stringify(e))},t.prototype.removeProjectFromLocalStorage=function(t){var e=this.getProjectsFromLocalStorage(),n=e.findIndex((function(e){return e.id===t}));e.splice(n,1),localStorage.setItem(this.projectsKey,JSON.stringify(e))},t.prototype.updateProjectInLocalStorage=function(t){var e=this.getProjectsFromLocalStorage(),n=e.findIndex((function(e){return e.id===t.id}));e[n]=t,localStorage.setItem(this.projectsKey,JSON.stringify(e))},t.prototype.getProjects=function(){return this.getProjectsFromLocalStorage()},t.prototype.getProject=function(t){return this.getProjectFromLocalStorage(t)},t.prototype.saveProjects=function(t){this.saveProjectsToLocalStorage(t)},t.prototype.saveProject=function(t){this.saveProjectToLocalStorage(t)},t.prototype.removeProject=function(t){this.removeProjectFromLocalStorage(t)},t.prototype.updateProject=function(t){this.updateProjectInLocalStorage(t)},t}(),i=function(){function t(){}return t.setSerializer=function(e){t._serializer=e},t.prototype.getProjects=function(){return t._serializer.getProjects()},t.prototype.getProject=function(e){return t._serializer.getProject(e)},t.prototype.saveProject=function(e){return t._serializer.saveProject(e)},t.prototype.saveProjects=function(e){return t._serializer.saveProjects(e)},t.prototype.removeProject=function(e){return t._serializer.removeProject(e)},t.prototype.updateProject=function(e){return t._serializer.updateProject(e)},t}(),u=function(){function t(){}return t.on=function(e){var n=t._modules.find((function(t){return t.name===e}));if(!n)throw new Error("Module ".concat(e," not found"));return{getSerializerInstance:function(e){return new t._serializer(e)},instance:n.instance}},t._addModule=function(e,n){t._modules.push({name:e,instance:n})},t._modules=[],t._serializer=r.ProjectFileSerializer,t._addModule("LocalStorage",new o),t._addModule("File",new i),t}();e.default=u},179:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(807),o=n(59),i=n(841),u=n(512),a=function(){function t(){}return Object.defineProperty(t,"project",{get:function(){return this._project},enumerable:!1,configurable:!0}),t.refreshProject=function(){t._project=new o.Project},t.updateProject=function(e){Object.keys(e).forEach((function(n){t._project[n]=e[n]}))},t.pull=function(t,e){var n=new o.Project,a={cache:u.default.cache,history:r.default.store.historyState.historyLines,current:r.default.store.imageState.getEntry()};n.id=(new i.Guid4).generate(),n.description=e||"New Project",n.name=t||"New Project",n.state=a,this._project=n},t._project=new o.Project,t}();e.default=a},512:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(807),o=n(670),i=function(){function t(){}return t.current=function(){var t=r.default.store.historyState.historyLines;return t[t.length-1]},t.prev=function(){var t=r.default.store.historyState.historyLines;return t[t.length-2]},t.undo=function(e){var n=t.current(),o=t.prev();(null==n?void 0:n.stateValue)&&(t.cache.unshift(n),r.default.store.historyState.reduce("UNDO"),(null==o?void 0:o.stateValue)&&t.updateCanvas(e,o.stateValue))},t.redo=function(e){var n=t.cache.shift();(null==n?void 0:n.stateValue)&&(r.default.store.historyState.reduce("REDO",n),t.updateCanvas(e,n.stateValue))},t.clearCache=function(){t.cache=[]},t.recovery=function(e){r.default.store.historyState.reduce("SET_HISTORY",{historyLines:e.state.history}),t.cache=e.state.cache},t.updateCanvas=function(t,e){new o.Filter(t).update(e.tempImageData,e.position)},t.cache=[],t}();e.default=i},51:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(28),o=function(){function t(){}return t.getLayerIndex=function(e){var n=r.default.LAYERS.find((function(t){return t.name===e}));return t.multiplier*n.index},t.multiplier=1e3,t}();e.default=o},490:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(128),o=function(){function t(){}return t.add=function(e){return t.registry.find((function(t){return t.id===e.id}))?(console.warn("Tool has been previously registered!"),!1):(t.registry.push(e),!0)},t.setActive=function(e){var n,r,o;if((null===(n=t.active)||void 0===n?void 0:n.id)===e)return console.warn("Tool is already active");(null===(r=t.active)||void 0===r?void 0:r.offAction)&&t.active.offAction();var i=t.registry.find((function(t){return t.id===e}));i?(t.active=i,(null===(o=t.active)||void 0===o?void 0:o.onAction)&&t.active.onAction()):console.warn("Tool has not previously been registered with this identifier")},t.offActive=function(e){if(e){if(t.active.id!==e)return console.warn('ID active tool is not "'.concat(e,'"'));t.off()}else t.off()},t.off=function(){var e;(null===(e=t.active)||void 0===e?void 0:e.offAction)&&t.active.offAction(),t.before=t.active,t.active=null,r.default.cursorStyle="default"},t.before=null,t.active=null,t.registry=[],t}();e.default=o},381:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HistoryState=void 0;var r=n(512),o=function(){function t(){this.default={historyLines:[]},this._historyLines=this.default.historyLines,this.reset()}return Object.defineProperty(t.prototype,"historyLines",{get:function(){return this._historyLines},enumerable:!1,configurable:!0}),t.prototype.reduce=function(t,e){var n=new i(this);switch(t){case"SET_HISTORY":n.setHistoryLines(e),r.default.clearCache();break;case"UPDATE_HISTORY":n.updateHistoryLines(e),r.default.clearCache();break;case"REDO":n.updateHistoryLines(e);break;case"UNDO":n.popHistoryLines()}},t.prototype.emerge=function(t){this._emergeCompleteIt=t},t.prototype.reset=function(){this.reduce("SET_HISTORY",this.default)},t}();e.HistoryState=o;var i=function(){function t(t){this.state=t}return t.prototype.setHistoryLines=function(t){var e=!1;(null==t?void 0:t.historyLines)&&(this.state._historyLines=t.historyLines,e=!0),e&&this.state._emergeCompleteIt&&this.state._emergeCompleteIt(this.state._historyLines)},t.prototype.updateHistoryLines=function(t){var e=!1;(null==t?void 0:t.view)&&(this.state._historyLines.push(t),e=!0),e&&this.state._emergeCompleteIt&&this.state._emergeCompleteIt(this.state._historyLines)},t.prototype.popHistoryLines=function(){this.state._historyLines.pop(),this.state._emergeCompleteIt&&this.state._emergeCompleteIt(this.state._historyLines)},t}()},624:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ImageState=void 0;var r=n(807),o=function(){function t(){this.default={position:{x:0,y:0},size:{width:0,height:0},tempImageData:null},this._position=this.default.position,this._size=this.default.size,this._tempImageData=this.default.tempImageData,this.reset()}return Object.defineProperty(t.prototype,"position",{get:function(){return this._position},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tempImageData",{get:function(){return this._tempImageData},enumerable:!1,configurable:!0}),t.prototype.reduce=function(t,e){var n=!1;(null==t?void 0:t.position)&&(this._position=t.position),(null==t?void 0:t.size)&&(this._size=t.size),(null==t?void 0:t.tempImageData)&&(this._tempImageData=t.tempImageData,n=!0),n&&this.addToHistory("".concat(e||"reduce image"))},t.prototype.reset=function(){this.reduce(this.default,"reset to default")},t.prototype.getEntry=function(){return{position:this._position,size:this._size,imageData:this._tempImageData}},t.prototype.addToHistory=function(t){var e={position:this._position,size:this._size,tempImageData:this._tempImageData};r.default.store.historyState.reduce("UPDATE_HISTORY",{view:t,stateName:"image",stateValue:e})},t}();e.ImageState=o},807:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Store=void 0;var r=n(381),o=n(624),i=function(){function t(t,e){this.imageState=t,this.historyState=e}return t.prototype.reset=function(){this.imageState.reset(),this.historyState.reset()},t}();e.Store=i;var u=function(){function t(){}return t.subscribe=function(e,n){"history"===e&&t.store.historyState.emerge(n)},t}();u.store=new i(new o.ImageState,new r.HistoryState),e.default=u},59:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Project=void 0;e.Project=function(){this.id=null,this.name=null,this.description=null,this.state=null,this.createdAt=new Date(Date.now()).toString(),this.updatedAt=new Date(Date.now()).toString()}},433:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Convert=void 0;var n=function(){function t(){}return t.byteRGBToHEX=function(e){var n=e[0],r=e[1],o=e[2];return t.rgbToHex(n,r,o)},t.rgbToHex=function(e,n,r){return"#".concat(t.componentToHEX(e)).concat(t.componentToHEX(n)).concat(t.componentToHEX(r))},t.hexToRgb=function(t){var e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return e?{r:parseInt(e[1],16),g:parseInt(e[2],16),b:parseInt(e[3],16)}:null},t.componentToHEX=function(t){var e=t.toString(16);return 1==e.length?"0"+e:e},t}();e.Convert=n},670:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Filter=void 0;var r=n(28),o=n(433),i=n(543),u=function(){function t(t){this.ctx=t}return t.prototype.setImageSize=function(t){this.imageSize=t},t.prototype.copy=function(t){var e=(null==t?void 0:t.width)?t.width:r.default.CANVAS_SIZE.width,n=(null==t?void 0:t.height)?t.height:r.default.CANVAS_SIZE.height;return this.ctx.getImageData(t.x,t.y,e,n)},t.prototype.copyExtendedModel=function(t){var e=(null==t?void 0:t.width)?t.width:r.default.CANVAS_SIZE.width,n=(null==t?void 0:t.height)?t.height:r.default.CANVAS_SIZE.height,o=this.ctx.getImageData(t.x,t.y,e,n);return this.clearEmptyPixels(o)},t.prototype.update=function(t,e){this.ctx.clearRect(0,0,r.default.CANVAS_SIZE.width,r.default.CANVAS_SIZE.height),this.ctx.putImageData(t,e.x,e.y)},t.prototype.clearEmptyPixels=function(t){var e=this.getRowRGBABuff(t),n=this.getRGBAMatrix(e,{width:t.width,height:t.height}),r={width:t.width,height:t.height},o=this.getSizeOfSparseMatrix(n,r),i=e.filter((function(t){return!!t[3]})),u=i.flat(),a=document.createElement("canvas").getContext("2d").createImageData(o.width,o.height);return u.forEach((function(t,e){return a.data[e]=u[e]})),console.log("cleared",i),{imageData:a,size:o}},t.prototype.getSizeOfSparseMatrix=function(t,e){for(var n,r,o,i,u=0,a=t.entries();u<a.length;u++){for(var c=a[u],f=c[0],s=0,l=c[1].entries();s<l.length;s++){var p=l[s],h=p[0];if(0!==p[1][3]){n=h,r=f;break}}if(void 0!==n&&void 0!==r)break}for(var d=0,v=t.reverse().entries();d<v.length;d++){for(var g=v[d],_=(f=g[0],0),y=g[1].reverse().entries();_<y.length;_++){var m=y[_];if(h=m[0],0!==m[1][3]){o=h,i=f;break}}if(void 0!==o&&void 0!==i)break}var b,x;return{width:(x=e.width,x-(n+o)),height:(b=e.height,b-(r+i))}},t.prototype.getBuffCollection=function(t){var e=this.getRowRGBABuff(t),n=e.map(o.Convert.byteRGBToHEX);return{rowRGBABuff:e,hexBuff:n,buff:this.getBuff(n)}},t.prototype.getBuff=function(t){var e=this,n=(0,i.range)(0,this.imageSize.height).map((function(t){return e.imageSize.width*t})),r=[],o=0;return t.forEach((function(t,e){var i;e>=n[o+1]&&o++,null!==(i=r[o])&&void 0!==i||(r[o]=[]),r[o].push(t)})),r},t.prototype.getRGBAMatrix=function(t,e){var n={width:e.width||this.imageSize.width,height:e.height||this.imageSize.height},r=(0,i.range)(0,n.height).map((function(t){return n.width*t})),o=[],u=0;return t.forEach((function(t,e){var n;e>=r[u+1]&&u++,null!==(n=o[u])&&void 0!==n||(o[u]=[]),o[u].push(t)})),o},t.prototype.getRowRGBABuff=function(t){var e=[],n=0,r=0;return t.data.forEach((function(t){var o;n>=4&&(n=0,r++),n++,null!==(o=e[r])&&void 0!==o||(e[r]=[]),e[r].push(t)})),e},t}();e.Filter=u},841:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Guid4=void 0;var n=function(){function t(){this.stack=[]}return t.prototype.generate=function(){return this.Guid4},Object.defineProperty(t.prototype,"finite",{get:function(){var t,e=this.stack[null===(t=this.stack)||void 0===t?void 0:t.length];if(e)return e;throw new Error("Guid4 not generate")},enumerable:!1,configurable:!0}),t.prototype.generateWithFactor=function(t){var e=this.getFactor(this.guid4);t.use("withError").run(e)},t.prototype.getFactor=function(t){var e=this;return function(n){t=e.Guid4,e.stack.includes(t)||(n.current=n.max,e.stack.push(t))}},Object.defineProperty(t.prototype,"attempt",{get:function(){return new r({current:1,max:5},{message:"[Fatal Error] Guid4 module cannot generate unique guid4"})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Guid4",{get:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,this.formating)},enumerable:!1,configurable:!0}),t.prototype.formating=function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)},t}();e.Guid4=n;var r=function(){function t(t,e){this._attempt=t,e&&(this._error=e)}return t.prototype.use=function(t){void 0===t&&(t="default");var e=this;switch(t){case"default":return{run:function(t){e.defaultRun(t)}};case"withError":return{run:function(t){e.withErrorRun(t)}}}},t.prototype.defaultRun=function(t){for(var e=this._attempt.current<=this._attempt.max;e;)t(this._attempt),this._attempt.current++},t.prototype.withErrorRun=function(t){for(var e=this._attempt.current<=this._attempt.max,n=this._attempt.current===this._attempt.max,r=this._error.message;e;)this.throwError(n,r),t(this._attempt),this._attempt.current++},t.prototype.throwError=function(t,e){if(t)throw new Error(e)},t}()},291:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProjectFileSerializer=void 0;var n=function(){function t(t){this.projects=[],this.file=t,this.projects=this.load()}return t.prototype.load=function(){var t=JSON.parse(this.file),e=function(t){var e,n;(null==t?void 0:t.current)?(e=Object.values(null==t?void 0:t.current.imageData.data),n=null==t?void 0:t.current.size):(null==t?void 0:t.state)&&(e=Object.values(null==t?void 0:t.state.tempImageData.data),n=null==t?void 0:t.state.size);var r=new ImageData(n.width,n.height);return e.forEach((function(t,e){r.data[e]=t})),r};return t.map((function(t){return t.state.current.imageData=e({current:t.state.current}),t.state.history=t.state.history.map((function(t){return t.stateValue.tempImageData=e({state:t.stateValue}),t})),t.state.cache=t.state.cache.map((function(t){return t.stateValue.tempImageData=e({state:t.stateValue}),t})),t}))},t.prototype.saveProjects=function(t){this.file.save(JSON.stringify(t))},t.prototype.getProjects=function(){return this.projects},t.prototype.getProject=function(t){return this.projects.find((function(e){return e.id===t}))},t.prototype.saveProject=function(t){var e=this.projects.findIndex((function(e){return e.id===t.id}));-1!==e?this.projects[e]=t:this.projects.push(t),this.saveProjects(this.projects)},t.prototype.removeProject=function(t){var e=this.projects.findIndex((function(e){return e.id===t}));-1!==e&&(this.projects.splice(e,1),this.saveProjects(this.projects))},t.prototype.updateProject=function(t){var e=this.projects.findIndex((function(e){return e.id===t.id}));-1!==e&&(this.projects[e]=t,this.saveProjects(this.projects))},t}();e.ProjectFileSerializer=n},436:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.WebComponentWrapper=void 0;var i=n(128),u=n(738),a=n(576),c=n(351),f=n(344),s=n(308),l=function(){function t(){var t=document.createElement("div");t.className="wc-editor",t.style.position="relative",t.style.display="flex",t.style.overflow="hidden";var e=document.createElement("div");e.className="styles-wrap";var n=document.createElement("div");n.className="editor-wrap",n.style.position="relative",n.style.display="flex",n.style.overflow="hidden";var r=document.createElement("div");r.className="tools-wrap",r.style.position="relative",r.style.display="flex",t.appendChild(e),t.appendChild(n),t.appendChild(r),this.baseElement=t,this.stylesWrapElement=e,this.editorWrapElement=n,this.toolsWrapElement=r,this._baseStyle()}return Object.defineProperty(t.prototype,"base",{get:function(){return this._methods(this.baseElement)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"editorWrap",{get:function(){return this._methods(this.editorWrapElement)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"stylesWrap",{get:function(){return this._methods(this.stylesWrapElement)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"toolsWrap",{get:function(){return this._methods(this.toolsWrapElement)},enumerable:!1,configurable:!0}),t.prototype._methods=function(t){var e=this;return{add:function(n,r){return e._add(t,n,r)}}},t.prototype._add=function(t,e,n){var r=t.appendChild(e);return n&&this.stylesWrapElement.appendChild(n),r},t.prototype._baseStyle=function(){var t=document.createElement("style");t.innerHTML="\n * {\n user-select: none;\n }\n ",this.stylesWrapElement.appendChild(t)},t}();e.WebComponentWrapper=l;var p=function(t){function e(){var e=t.call(this)||this,n=e.attachShadow({mode:"open"}),r=new l,o=i.default.getComponent(),p=o.canvasTemplate,h=o.canvasStyle,d=r.editorWrap.add(p,h),v=c.default.getComponent(),g=v.pipetteTemplate,_=v.pipetteStyle;r.editorWrap.add(g,_);var y=f.default.getComponent("tools"),m=y.slotTemplate,b=y.slotStyle;r.toolsWrap.add(m,b);var x=u.default.getComponent(),w=x.excretionsTemplate,S=x.excretionsStyle;r.editorWrap.add(w,S);var j=a.default.getComponent(),E=j.loadingTemplate,C=j.loadingStyle;return r.editorWrap.add(E,C),n.appendChild(r.baseElement),i.default.simulateSubscriptions(),s.default.applyEvents(r.baseElement),e.addEventListener("initial",(function(){e.dispatchEvent(new CustomEvent("get-editor-element",{detail:{editorElement:d,canvasSelector:i.default.getCanvasSelector()}}))})),e}return o(e,t),e}(HTMLElement);e.default=p}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={id:r,loaded:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),n(156)})();
|