usb-paint
Version:
A universal, simple, and beautiful hand-drawn style painting tool, USB-Paint. It can be introduced and used in any front-end framework or page.
1 lines • 62.1 kB
JavaScript
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).USBPaint=e()}(this,(function(){"use strict";var t=Object.defineProperty,e=(e,n,r)=>((e,n,r)=>n in e?t(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r)(e,"symbol"!=typeof n?n+"":n,r),n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},r=function(t){return t&&t.Math===Math&&t},o=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n&&n)||r("object"==typeof n&&n)||function(){return this}()||Function("return this")(),i={},a=function(t){try{return!!t()}catch(e){return!0}},c=!a((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),u=!a((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),l=u,s=Function.prototype.call,f=l?s.bind(s):function(){return s.apply(s,arguments)},p={},d={}.propertyIsEnumerable,h=Object.getOwnPropertyDescriptor,v=h&&!d.call({1:2},1);p.f=v?function(t){var e=h(this,t);return!!e&&e.enumerable}:d;var g,m,y=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},b=u,w=Function.prototype,S=w.call,I=b&&w.bind.bind(S,S),O=b?I:function(t){return function(){return S.apply(t,arguments)}},j=O,x=j({}.toString),P=j("".slice),M=function(t){return P(x(t),8,-1)},T=a,E=M,C=Object,k=O("".split),N=T((function(){return!C("z").propertyIsEnumerable(0)}))?function(t){return"String"===E(t)?k(t,""):C(t)}:C,R=function(t){return null==t},A=R,$=TypeError,D=function(t){if(A(t))throw new $("Can't call method on "+t);return t},L=N,_=D,B=function(t){return L(_(t))},z="object"==typeof document&&document.all,W=void 0===z&&void 0!==z?function(t){return"function"==typeof t||t===z}:function(t){return"function"==typeof t},F=W,G=function(t){return"object"==typeof t?null!==t:F(t)},H=o,Z=W,U=function(t,e){return arguments.length<2?(n=H[t],Z(n)?n:void 0):H[t]&&H[t][e];var n},J=O({}.isPrototypeOf),V=o.navigator,Y=V&&V.userAgent,X=Y?String(Y):"",q=o,Q=X,K=q.process,tt=q.Deno,et=K&&K.versions||tt&&tt.version,nt=et&&et.v8;nt&&(m=(g=nt.split("."))[0]>0&&g[0]<4?1:+(g[0]+g[1])),!m&&Q&&(!(g=Q.match(/Edge\/(\d+)/))||g[1]>=74)&&(g=Q.match(/Chrome\/(\d+)/))&&(m=+g[1]);var rt=m,ot=rt,it=a,at=o.String,ct=!!Object.getOwnPropertySymbols&&!it((function(){var t=Symbol("symbol detection");return!at(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&ot&&ot<41})),ut=ct&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,lt=U,st=W,ft=J,pt=Object,dt=ut?function(t){return"symbol"==typeof t}:function(t){var e=lt("Symbol");return st(e)&&ft(e.prototype,pt(t))},ht=String,vt=function(t){try{return ht(t)}catch(e){return"Object"}},gt=W,mt=vt,yt=TypeError,bt=function(t){if(gt(t))return t;throw new yt(mt(t)+" is not a function")},wt=bt,St=R,It=function(t,e){var n=t[e];return St(n)?void 0:wt(n)},Ot=f,jt=W,xt=G,Pt=TypeError,Mt={exports:{}},Tt=o,Et=Object.defineProperty,Ct=function(t,e){try{Et(Tt,t,{value:e,configurable:!0,writable:!0})}catch(n){Tt[t]=e}return e},kt=o,Nt=Ct,Rt="__core-js_shared__",At=Mt.exports=kt[Rt]||Nt(Rt,{});(At.versions||(At.versions=[])).push({version:"3.39.0",mode:"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.39.0/LICENSE",source:"https://github.com/zloirock/core-js"});var $t=Mt.exports,Dt=$t,Lt=function(t,e){return Dt[t]||(Dt[t]=e||{})},_t=D,Bt=Object,zt=function(t){return Bt(_t(t))},Wt=zt,Ft=O({}.hasOwnProperty),Gt=Object.hasOwn||function(t,e){return Ft(Wt(t),e)},Ht=O,Zt=0,Ut=Math.random(),Jt=Ht(1..toString),Vt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+Jt(++Zt+Ut,36)},Yt=Lt,Xt=Gt,qt=Vt,Qt=ct,Kt=ut,te=o.Symbol,ee=Yt("wks"),ne=Kt?te.for||te:te&&te.withoutSetter||qt,re=function(t){return Xt(ee,t)||(ee[t]=Qt&&Xt(te,t)?te[t]:ne("Symbol."+t)),ee[t]},oe=f,ie=G,ae=dt,ce=It,ue=function(t,e){var n,r;if("string"===e&&jt(n=t.toString)&&!xt(r=Ot(n,t)))return r;if(jt(n=t.valueOf)&&!xt(r=Ot(n,t)))return r;if("string"!==e&&jt(n=t.toString)&&!xt(r=Ot(n,t)))return r;throw new Pt("Can't convert object to primitive value")},le=TypeError,se=re("toPrimitive"),fe=function(t,e){if(!ie(t)||ae(t))return t;var n,r=ce(t,se);if(r){if(void 0===e&&(e="default"),n=oe(r,t,e),!ie(n)||ae(n))return n;throw new le("Can't convert object to primitive value")}return void 0===e&&(e="number"),ue(t,e)},pe=dt,de=function(t){var e=fe(t,"string");return pe(e)?e:e+""},he=G,ve=o.document,ge=he(ve)&&he(ve.createElement),me=function(t){return ge?ve.createElement(t):{}},ye=me,be=!c&&!a((function(){return 7!==Object.defineProperty(ye("div"),"a",{get:function(){return 7}}).a})),we=c,Se=f,Ie=p,Oe=y,je=B,xe=de,Pe=Gt,Me=be,Te=Object.getOwnPropertyDescriptor;i.f=we?Te:function(t,e){if(t=je(t),e=xe(e),Me)try{return Te(t,e)}catch(n){}if(Pe(t,e))return Oe(!Se(Ie.f,t,e),t[e])};var Ee={},Ce=c&&a((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),ke=G,Ne=String,Re=TypeError,Ae=function(t){if(ke(t))return t;throw new Re(Ne(t)+" is not an object")},$e=c,De=be,Le=Ce,_e=Ae,Be=de,ze=TypeError,We=Object.defineProperty,Fe=Object.getOwnPropertyDescriptor,Ge="enumerable",He="configurable",Ze="writable";Ee.f=$e?Le?function(t,e,n){if(_e(t),e=Be(e),_e(n),"function"==typeof t&&"prototype"===e&&"value"in n&&Ze in n&&!n[Ze]){var r=Fe(t,e);r&&r[Ze]&&(t[e]=n.value,n={configurable:He in n?n[He]:r[He],enumerable:Ge in n?n[Ge]:r[Ge],writable:!1})}return We(t,e,n)}:We:function(t,e,n){if(_e(t),e=Be(e),_e(n),De)try{return We(t,e,n)}catch(r){}if("get"in n||"set"in n)throw new ze("Accessors not supported");return"value"in n&&(t[e]=n.value),t};var Ue=Ee,Je=y,Ve=c?function(t,e,n){return Ue.f(t,e,Je(1,n))}:function(t,e,n){return t[e]=n,t},Ye={exports:{}},Xe=c,qe=Gt,Qe=Function.prototype,Ke=Xe&&Object.getOwnPropertyDescriptor,tn=qe(Qe,"name"),en={EXISTS:tn,PROPER:tn&&"something"===function(){}.name,CONFIGURABLE:tn&&(!Xe||Xe&&Ke(Qe,"name").configurable)},nn=W,rn=$t,on=O(Function.toString);nn(rn.inspectSource)||(rn.inspectSource=function(t){return on(t)});var an,cn,un,ln=rn.inspectSource,sn=W,fn=o.WeakMap,pn=sn(fn)&&/native code/.test(String(fn)),dn=Vt,hn=Lt("keys"),vn=function(t){return hn[t]||(hn[t]=dn(t))},gn={},mn=pn,yn=o,bn=G,wn=Ve,Sn=Gt,In=$t,On=vn,jn=gn,xn="Object already initialized",Pn=yn.TypeError,Mn=yn.WeakMap;if(mn||In.state){var Tn=In.state||(In.state=new Mn);Tn.get=Tn.get,Tn.has=Tn.has,Tn.set=Tn.set,an=function(t,e){if(Tn.has(t))throw new Pn(xn);return e.facade=t,Tn.set(t,e),e},cn=function(t){return Tn.get(t)||{}},un=function(t){return Tn.has(t)}}else{var En=On("state");jn[En]=!0,an=function(t,e){if(Sn(t,En))throw new Pn(xn);return e.facade=t,wn(t,En,e),e},cn=function(t){return Sn(t,En)?t[En]:{}},un=function(t){return Sn(t,En)}}var Cn={set:an,get:cn,has:un,enforce:function(t){return un(t)?cn(t):an(t,{})},getterFor:function(t){return function(e){var n;if(!bn(e)||(n=cn(e)).type!==t)throw new Pn("Incompatible receiver, "+t+" required");return n}}},kn=O,Nn=a,Rn=W,An=Gt,$n=c,Dn=en.CONFIGURABLE,Ln=ln,_n=Cn.enforce,Bn=Cn.get,zn=String,Wn=Object.defineProperty,Fn=kn("".slice),Gn=kn("".replace),Hn=kn([].join),Zn=$n&&!Nn((function(){return 8!==Wn((function(){}),"length",{value:8}).length})),Un=String(String).split("String"),Jn=Ye.exports=function(t,e,n){"Symbol("===Fn(zn(e),0,7)&&(e="["+Gn(zn(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!An(t,"name")||Dn&&t.name!==e)&&($n?Wn(t,"name",{value:e,configurable:!0}):t.name=e),Zn&&n&&An(n,"arity")&&t.length!==n.arity&&Wn(t,"length",{value:n.arity});try{n&&An(n,"constructor")&&n.constructor?$n&&Wn(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(o){}var r=_n(t);return An(r,"source")||(r.source=Hn(Un,"string"==typeof e?e:"")),t};Function.prototype.toString=Jn((function(){return Rn(this)&&Bn(this).source||Ln(this)}),"toString");var Vn=Ye.exports,Yn=W,Xn=Ee,qn=Vn,Qn=Ct,Kn=function(t,e,n,r){r||(r={});var o=r.enumerable,i=void 0!==r.name?r.name:e;if(Yn(n)&&qn(n,i,r),r.global)o?t[e]=n:Qn(e,n);else{try{r.unsafe?t[e]&&(o=!0):delete t[e]}catch(a){}o?t[e]=n:Xn.f(t,e,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return t},tr={},er=Math.ceil,nr=Math.floor,rr=Math.trunc||function(t){var e=+t;return(e>0?nr:er)(e)},or=function(t){var e=+t;return e!=e||0===e?0:rr(e)},ir=or,ar=Math.max,cr=Math.min,ur=or,lr=Math.min,sr=function(t){var e=ur(t);return e>0?lr(e,9007199254740991):0},fr=function(t){return sr(t.length)},pr=B,dr=function(t,e){var n=ir(t);return n<0?ar(n+e,0):cr(n,e)},hr=fr,vr=function(t){return function(e,n,r){var o=pr(e),i=hr(o);if(0===i)return!t&&-1;var a,c=dr(r,i);if(t&&n!=n){for(;i>c;)if((a=o[c++])!=a)return!0}else for(;i>c;c++)if((t||c in o)&&o[c]===n)return t||c||0;return!t&&-1}},gr={includes:vr(!0),indexOf:vr(!1)},mr=Gt,yr=B,br=gr.indexOf,wr=gn,Sr=O([].push),Ir=function(t,e){var n,r=yr(t),o=0,i=[];for(n in r)!mr(wr,n)&&mr(r,n)&&Sr(i,n);for(;e.length>o;)mr(r,n=e[o++])&&(~br(i,n)||Sr(i,n));return i},Or=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],jr=Ir,xr=Or.concat("length","prototype");tr.f=Object.getOwnPropertyNames||function(t){return jr(t,xr)};var Pr={};Pr.f=Object.getOwnPropertySymbols;var Mr=U,Tr=tr,Er=Pr,Cr=Ae,kr=O([].concat),Nr=Mr("Reflect","ownKeys")||function(t){var e=Tr.f(Cr(t)),n=Er.f;return n?kr(e,n(t)):e},Rr=Gt,Ar=Nr,$r=i,Dr=Ee,Lr=function(t,e,n){for(var r=Ar(e),o=Dr.f,i=$r.f,a=0;a<r.length;a++){var c=r[a];Rr(t,c)||n&&Rr(n,c)||o(t,c,i(e,c))}},_r=a,Br=W,zr=/#|\.prototype\./,Wr=function(t,e){var n=Gr[Fr(t)];return n===Zr||n!==Hr&&(Br(e)?_r(e):!!e)},Fr=Wr.normalize=function(t){return String(t).replace(zr,".").toLowerCase()},Gr=Wr.data={},Hr=Wr.NATIVE="N",Zr=Wr.POLYFILL="P",Ur=Wr,Jr=o,Vr=i.f,Yr=Ve,Xr=Kn,qr=Ct,Qr=Lr,Kr=Ur,to=function(t,e){var n,r,o,i,a,c=t.target,u=t.global,l=t.stat;if(n=u?Jr:l?Jr[c]||qr(c,{}):Jr[c]&&Jr[c].prototype)for(r in e){if(i=e[r],o=t.dontCallGetSet?(a=Vr(n,r))&&a.value:n[r],!Kr(u?r:c+(l?".":"#")+r,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;Qr(i,o)}(t.sham||o&&o.sham)&&Yr(i,"sham",!0),Xr(n,r,i,t)}},eo=M,no=Array.isArray||function(t){return"Array"===eo(t)},ro=TypeError,oo=c,io=Ee,ao=y,co={};co[re("toStringTag")]="z";var uo="[object z]"===String(co),lo=uo,so=W,fo=M,po=re("toStringTag"),ho=Object,vo="Arguments"===fo(function(){return arguments}()),go=lo?fo:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(n){}}(e=ho(t),po))?n:vo?fo(e):"Object"===(r=fo(e))&&so(e.callee)?"Arguments":r},mo=O,yo=a,bo=W,wo=go,So=ln,Io=function(){},Oo=U("Reflect","construct"),jo=/^\s*(?:class|function)\b/,xo=mo(jo.exec),Po=!jo.test(Io),Mo=function(t){if(!bo(t))return!1;try{return Oo(Io,[],t),!0}catch(e){return!1}},To=function(t){if(!bo(t))return!1;switch(wo(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Po||!!xo(jo,So(t))}catch(e){return!0}};To.sham=!0;var Eo=!Oo||yo((function(){var t;return Mo(Mo.call)||!Mo(Object)||!Mo((function(){t=!0}))||t}))?To:Mo,Co=no,ko=Eo,No=G,Ro=re("species"),Ao=Array,$o=function(t){var e;return Co(t)&&(e=t.constructor,(ko(e)&&(e===Ao||Co(e.prototype))||No(e)&&null===(e=e[Ro]))&&(e=void 0)),void 0===e?Ao:e},Do=function(t,e){return new($o(t))(0===e?0:e)},Lo=a,_o=rt,Bo=re("species"),zo=to,Wo=a,Fo=no,Go=G,Ho=zt,Zo=fr,Uo=function(t){if(t>9007199254740991)throw ro("Maximum allowed index exceeded");return t},Jo=function(t,e,n){oo?io.f(t,e,ao(0,n)):t[e]=n},Vo=Do,Yo=function(t){return _o>=51||!Lo((function(){var e=[];return(e.constructor={})[Bo]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},Xo=rt,qo=re("isConcatSpreadable"),Qo=Xo>=51||!Wo((function(){var t=[];return t[qo]=!1,t.concat()[0]!==t})),Ko=function(t){if(!Go(t))return!1;var e=t[qo];return void 0!==e?!!e:Fo(t)};zo({target:"Array",proto:!0,arity:1,forced:!Qo||!Yo("concat")},{concat:function(t){var e,n,r,o,i,a=Ho(this),c=Vo(a,0),u=0;for(e=-1,r=arguments.length;e<r;e++)if(Ko(i=-1===e?a:arguments[e]))for(o=Zo(i),Uo(u+o),n=0;n<o;n++,u++)n in i&&Jo(c,u,i[n]);else Uo(u+1),Jo(c,u++,i);return c.length=u,c}});var ti=go,ei=uo?{}.toString:function(){return"[object "+ti(this)+"]"};uo||Kn(Object.prototype,"toString",ei,{unsafe:!0});var ni=go,ri=String,oi=function(t){if("Symbol"===ni(t))throw new TypeError("Cannot convert a Symbol value to a string");return ri(t)},ii={},ai=Ir,ci=Or,ui=Object.keys||function(t){return ai(t,ci)},li=c,si=Ce,fi=Ee,pi=Ae,di=B,hi=ui;ii.f=li&&!si?Object.defineProperties:function(t,e){pi(t);for(var n,r=di(e),o=hi(e),i=o.length,a=0;i>a;)fi.f(t,n=o[a++],r[n]);return t};var vi,gi=U("document","documentElement"),mi=Ae,yi=ii,bi=Or,wi=gn,Si=gi,Ii=me,Oi="prototype",ji="script",xi=vn("IE_PROTO"),Pi=function(){},Mi=function(t){return"<"+ji+">"+t+"</"+ji+">"},Ti=function(t){t.write(Mi("")),t.close();var e=t.parentWindow.Object;return t=null,e},Ei=function(){try{vi=new ActiveXObject("htmlfile")}catch(o){}var t,e,n;Ei="undefined"!=typeof document?document.domain&&vi?Ti(vi):(e=Ii("iframe"),n="java"+ji+":",e.style.display="none",Si.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(Mi("document.F=Object")),t.close(),t.F):Ti(vi);for(var r=bi.length;r--;)delete Ei[Oi][bi[r]];return Ei()};wi[xi]=!0;var Ci=Object.create||function(t,e){var n;return null!==t?(Pi[Oi]=mi(t),n=new Pi,Pi[Oi]=null,n[xi]=t):n=Ei(),void 0===e?n:yi.f(n,e)},ki={},Ni=O([].slice),Ri=M,Ai=B,$i=tr.f,Di=Ni,Li="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];ki.f=function(t){return Li&&"Window"===Ri(t)?function(t){try{return $i(t)}catch(e){return Di(Li)}}(t):$i(Ai(t))};var _i=Vn,Bi=Ee,zi=function(t,e,n){return n.get&&_i(n.get,e,{getter:!0}),n.set&&_i(n.set,e,{setter:!0}),Bi.f(t,e,n)},Wi={},Fi=re;Wi.f=Fi;var Gi=o,Hi=Gi,Zi=Gt,Ui=Wi,Ji=Ee.f,Vi=function(t){var e=Hi.Symbol||(Hi.Symbol={});Zi(e,t)||Ji(e,t,{value:Ui.f(t)})},Yi=f,Xi=U,qi=re,Qi=Kn,Ki=function(){var t=Xi("Symbol"),e=t&&t.prototype,n=e&&e.valueOf,r=qi("toPrimitive");e&&!e[r]&&Qi(e,r,(function(t){return Yi(n,this)}),{arity:1})},ta=Ee.f,ea=Gt,na=re("toStringTag"),ra=function(t,e,n){t&&!n&&(t=t.prototype),t&&!ea(t,na)&&ta(t,na,{configurable:!0,value:e})},oa=M,ia=O,aa=function(t){if("Function"===oa(t))return ia(t)},ca=bt,ua=u,la=aa(aa.bind),sa=function(t,e){return ca(t),void 0===e?t:ua?la(t,e):function(){return t.apply(e,arguments)}},fa=sa,pa=N,da=zt,ha=fr,va=Do,ga=O([].push),ma=function(t){var e=1===t,n=2===t,r=3===t,o=4===t,i=6===t,a=7===t,c=5===t||i;return function(u,l,s,f){for(var p,d,h=da(u),v=pa(h),g=ha(v),m=fa(l,s),y=0,b=f||va,w=e?b(u,g):n||a?b(u,0):void 0;g>y;y++)if((c||y in v)&&(d=m(p=v[y],y,h),t))if(e)w[y]=d;else if(d)switch(t){case 3:return!0;case 5:return p;case 6:return y;case 2:ga(w,p)}else switch(t){case 4:return!1;case 7:ga(w,p)}return i?-1:r||o?o:w}},ya={forEach:ma(0),map:ma(1),filter:ma(2),some:ma(3),every:ma(4),find:ma(5),findIndex:ma(6),filterReject:ma(7)},ba=to,wa=o,Sa=f,Ia=O,Oa=c,ja=ct,xa=a,Pa=Gt,Ma=J,Ta=Ae,Ea=B,Ca=de,ka=oi,Na=y,Ra=Ci,Aa=ui,$a=tr,Da=ki,La=Pr,_a=i,Ba=Ee,za=ii,Wa=p,Fa=Kn,Ga=zi,Ha=Lt,Za=gn,Ua=Vt,Ja=re,Va=Wi,Ya=Vi,Xa=Ki,qa=ra,Qa=Cn,Ka=ya.forEach,tc=vn("hidden"),ec="Symbol",nc="prototype",rc=Qa.set,oc=Qa.getterFor(ec),ic=Object[nc],ac=wa.Symbol,cc=ac&&ac[nc],uc=wa.RangeError,lc=wa.TypeError,sc=wa.QObject,fc=_a.f,pc=Ba.f,dc=Da.f,hc=Wa.f,vc=Ia([].push),gc=Ha("symbols"),mc=Ha("op-symbols"),yc=Ha("wks"),bc=!sc||!sc[nc]||!sc[nc].findChild,wc=function(t,e,n){var r=fc(ic,e);r&&delete ic[e],pc(t,e,n),r&&t!==ic&&pc(ic,e,r)},Sc=Oa&&xa((function(){return 7!==Ra(pc({},"a",{get:function(){return pc(this,"a",{value:7}).a}})).a}))?wc:pc,Ic=function(t,e){var n=gc[t]=Ra(cc);return rc(n,{type:ec,tag:t,description:e}),Oa||(n.description=e),n},Oc=function(t,e,n){t===ic&&Oc(mc,e,n),Ta(t);var r=Ca(e);return Ta(n),Pa(gc,r)?(n.enumerable?(Pa(t,tc)&&t[tc][r]&&(t[tc][r]=!1),n=Ra(n,{enumerable:Na(0,!1)})):(Pa(t,tc)||pc(t,tc,Na(1,Ra(null))),t[tc][r]=!0),Sc(t,r,n)):pc(t,r,n)},jc=function(t,e){Ta(t);var n=Ea(e),r=Aa(n).concat(Tc(n));return Ka(r,(function(e){Oa&&!Sa(xc,n,e)||Oc(t,e,n[e])})),t},xc=function(t){var e=Ca(t),n=Sa(hc,this,e);return!(this===ic&&Pa(gc,e)&&!Pa(mc,e))&&(!(n||!Pa(this,e)||!Pa(gc,e)||Pa(this,tc)&&this[tc][e])||n)},Pc=function(t,e){var n=Ea(t),r=Ca(e);if(n!==ic||!Pa(gc,r)||Pa(mc,r)){var o=fc(n,r);return!o||!Pa(gc,r)||Pa(n,tc)&&n[tc][r]||(o.enumerable=!0),o}},Mc=function(t){var e=dc(Ea(t)),n=[];return Ka(e,(function(t){Pa(gc,t)||Pa(Za,t)||vc(n,t)})),n},Tc=function(t){var e=t===ic,n=dc(e?mc:Ea(t)),r=[];return Ka(n,(function(t){!Pa(gc,t)||e&&!Pa(ic,t)||vc(r,gc[t])})),r};ja||(ac=function(){if(Ma(cc,this))throw new lc("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?ka(arguments[0]):void 0,e=Ua(t),n=function(t){var r=void 0===this?wa:this;r===ic&&Sa(n,mc,t),Pa(r,tc)&&Pa(r[tc],e)&&(r[tc][e]=!1);var o=Na(1,t);try{Sc(r,e,o)}catch(i){if(!(i instanceof uc))throw i;wc(r,e,o)}};return Oa&&bc&&Sc(ic,e,{configurable:!0,set:n}),Ic(e,t)},Fa(cc=ac[nc],"toString",(function(){return oc(this).tag})),Fa(ac,"withoutSetter",(function(t){return Ic(Ua(t),t)})),Wa.f=xc,Ba.f=Oc,za.f=jc,_a.f=Pc,$a.f=Da.f=Mc,La.f=Tc,Va.f=function(t){return Ic(Ja(t),t)},Oa&&(Ga(cc,"description",{configurable:!0,get:function(){return oc(this).description}}),Fa(ic,"propertyIsEnumerable",xc,{unsafe:!0}))),ba({global:!0,constructor:!0,wrap:!0,forced:!ja,sham:!ja},{Symbol:ac}),Ka(Aa(yc),(function(t){Ya(t)})),ba({target:ec,stat:!0,forced:!ja},{useSetter:function(){bc=!0},useSimple:function(){bc=!1}}),ba({target:"Object",stat:!0,forced:!ja,sham:!Oa},{create:function(t,e){return void 0===e?Ra(t):jc(Ra(t),e)},defineProperty:Oc,defineProperties:jc,getOwnPropertyDescriptor:Pc}),ba({target:"Object",stat:!0,forced:!ja},{getOwnPropertyNames:Mc}),Xa(),qa(ac,ec),Za[tc]=!0;var Ec=ct&&!!Symbol.for&&!!Symbol.keyFor,Cc=to,kc=U,Nc=Gt,Rc=oi,Ac=Lt,$c=Ec,Dc=Ac("string-to-symbol-registry"),Lc=Ac("symbol-to-string-registry");Cc({target:"Symbol",stat:!0,forced:!$c},{for:function(t){var e=Rc(t);if(Nc(Dc,e))return Dc[e];var n=kc("Symbol")(e);return Dc[e]=n,Lc[n]=e,n}});var _c=to,Bc=Gt,zc=dt,Wc=vt,Fc=Ec,Gc=Lt("symbol-to-string-registry");_c({target:"Symbol",stat:!0,forced:!Fc},{keyFor:function(t){if(!zc(t))throw new TypeError(Wc(t)+" is not a symbol");if(Bc(Gc,t))return Gc[t]}});var Hc=u,Zc=Function.prototype,Uc=Zc.apply,Jc=Zc.call,Vc="object"==typeof Reflect&&Reflect.apply||(Hc?Jc.bind(Uc):function(){return Jc.apply(Uc,arguments)}),Yc=no,Xc=W,qc=M,Qc=oi,Kc=O([].push),tu=to,eu=U,nu=Vc,ru=f,ou=O,iu=a,au=W,cu=dt,uu=Ni,lu=function(t){if(Xc(t))return t;if(Yc(t)){for(var e=t.length,n=[],r=0;r<e;r++){var o=t[r];"string"==typeof o?Kc(n,o):"number"!=typeof o&&"Number"!==qc(o)&&"String"!==qc(o)||Kc(n,Qc(o))}var i=n.length,a=!0;return function(t,e){if(a)return a=!1,e;if(Yc(this))return e;for(var r=0;r<i;r++)if(n[r]===t)return e}}},su=ct,fu=String,pu=eu("JSON","stringify"),du=ou(/./.exec),hu=ou("".charAt),vu=ou("".charCodeAt),gu=ou("".replace),mu=ou(1..toString),yu=/[\uD800-\uDFFF]/g,bu=/^[\uD800-\uDBFF]$/,wu=/^[\uDC00-\uDFFF]$/,Su=!su||iu((function(){var t=eu("Symbol")("stringify detection");return"[null]"!==pu([t])||"{}"!==pu({a:t})||"{}"!==pu(Object(t))})),Iu=iu((function(){return'"\\udf06\\ud834"'!==pu("\udf06\ud834")||'"\\udead"'!==pu("\udead")})),Ou=function(t,e){var n=uu(arguments),r=lu(e);if(au(r)||void 0!==t&&!cu(t))return n[1]=function(t,e){if(au(r)&&(e=ru(r,this,fu(t),e)),!cu(e))return e},nu(pu,null,n)},ju=function(t,e,n){var r=hu(n,e-1),o=hu(n,e+1);return du(bu,t)&&!du(wu,o)||du(wu,t)&&!du(bu,r)?"\\u"+mu(vu(t,0),16):t};pu&&tu({target:"JSON",stat:!0,arity:3,forced:Su||Iu},{stringify:function(t,e,n){var r=uu(arguments),o=nu(Su?Ou:pu,null,r);return Iu&&"string"==typeof o?gu(o,yu,ju):o}});var xu=Pr,Pu=zt;to({target:"Object",stat:!0,forced:!ct||a((function(){xu.f(1)}))},{getOwnPropertySymbols:function(t){var e=xu.f;return e?e(Pu(t)):[]}}),Vi("asyncIterator");var Mu=to,Tu=c,Eu=O,Cu=Gt,ku=W,Nu=J,Ru=oi,Au=zi,$u=Lr,Du=o.Symbol,Lu=Du&&Du.prototype;if(Tu&&ku(Du)&&(!("description"in Lu)||void 0!==Du().description)){var _u={},Bu=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:Ru(arguments[0]),e=Nu(Lu,this)?new Du(t):void 0===t?Du():Du(t);return""===t&&(_u[e]=!0),e};$u(Bu,Du),Bu.prototype=Lu,Lu.constructor=Bu;var zu="Symbol(description detection)"===String(Du("description detection")),Wu=Eu(Lu.valueOf),Fu=Eu(Lu.toString),Gu=/^Symbol\((.*)\)[^)]+$/,Hu=Eu("".replace),Zu=Eu("".slice);Au(Lu,"description",{configurable:!0,get:function(){var t=Wu(this);if(Cu(_u,t))return"";var e=Fu(t),n=zu?Zu(e,7,-1):Hu(e,Gu,"$1");return""===n?void 0:n}}),Mu({global:!0,constructor:!0,forced:!0},{Symbol:Bu})}Vi("hasInstance"),Vi("isConcatSpreadable"),Vi("iterator"),Vi("match"),Vi("matchAll"),Vi("replace"),Vi("search"),Vi("species"),Vi("split");var Uu=Ki;Vi("toPrimitive"),Uu();var Ju=U,Vu=ra;Vi("toStringTag"),Vu(Ju("Symbol"),"Symbol"),Vi("unscopables"),ra(o.JSON,"JSON",!0),ra(Math,"Math",!0);var Yu=o,Xu=ra;to({global:!0},{Reflect:{}}),Xu(Yu.Reflect,"Reflect",!0),Gi.Symbol;var qu=me("span").classList,Qu=qu&&qu.constructor&&qu.constructor.prototype,Ku=Qu===Object.prototype?void 0:Qu,tl=re,el=Ci,nl=Ee.f,rl=tl("unscopables"),ol=Array.prototype;void 0===ol[rl]&&nl(ol,rl,{configurable:!0,value:el(null)});var il,al,cl,ul={},ll=!a((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),sl=Gt,fl=W,pl=zt,dl=ll,hl=vn("IE_PROTO"),vl=Object,gl=vl.prototype,ml=dl?vl.getPrototypeOf:function(t){var e=pl(t);if(sl(e,hl))return e[hl];var n=e.constructor;return fl(n)&&e instanceof n?n.prototype:e instanceof vl?gl:null},yl=a,bl=W,wl=G,Sl=ml,Il=Kn,Ol=re("iterator"),jl=!1;[].keys&&("next"in(cl=[].keys())?(al=Sl(Sl(cl)))!==Object.prototype&&(il=al):jl=!0),(!wl(il)||yl((function(){var t={};return il[Ol].call(t)!==t})))&&(il={}),bl(il[Ol])||Il(il,Ol,(function(){return this}));var xl={IteratorPrototype:il,BUGGY_SAFARI_ITERATORS:jl},Pl=xl.IteratorPrototype,Ml=Ci,Tl=y,El=ra,Cl=ul,kl=function(){return this},Nl=O,Rl=bt,Al=G,$l=function(t){return Al(t)||null===t},Dl=String,Ll=TypeError,_l=function(t,e,n){try{return Nl(Rl(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(r){}},Bl=G,zl=D,Wl=function(t){if($l(t))return t;throw new Ll("Can't set "+Dl(t)+" as a prototype")},Fl=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=_l(Object.prototype,"__proto__","set"))(n,[]),e=n instanceof Array}catch(r){}return function(n,r){return zl(n),Wl(r),Bl(n)?(e?t(n,r):n.__proto__=r,n):n}}():void 0),Gl=to,Hl=f,Zl=W,Ul=function(t,e,n,r){var o=e+" Iterator";return t.prototype=Ml(Pl,{next:Tl(+!r,n)}),El(t,o,!1),Cl[o]=kl,t},Jl=ml,Vl=Fl,Yl=ra,Xl=Ve,ql=Kn,Ql=ul,Kl=en.PROPER,ts=en.CONFIGURABLE,es=xl.IteratorPrototype,ns=xl.BUGGY_SAFARI_ITERATORS,rs=re("iterator"),os="keys",is="values",as="entries",cs=function(){return this},us=function(t,e,n,r,o,i,a){Ul(n,e,r);var c,u,l,s=function(t){if(t===o&&v)return v;if(!ns&&t&&t in d)return d[t];switch(t){case os:case is:case as:return function(){return new n(this,t)}}return function(){return new n(this)}},f=e+" Iterator",p=!1,d=t.prototype,h=d[rs]||d["@@iterator"]||o&&d[o],v=!ns&&h||s(o),g="Array"===e&&d.entries||h;if(g&&(c=Jl(g.call(new t)))!==Object.prototype&&c.next&&(Jl(c)!==es&&(Vl?Vl(c,es):Zl(c[rs])||ql(c,rs,cs)),Yl(c,f,!0)),Kl&&o===is&&h&&h.name!==is&&(ts?Xl(d,"name",is):(p=!0,v=function(){return Hl(h,this)})),o)if(u={values:s(is),keys:i?v:s(os),entries:s(as)},a)for(l in u)(ns||p||!(l in d))&&ql(d,l,u[l]);else Gl({target:e,proto:!0,forced:ns||p},u);return d[rs]!==v&&ql(d,rs,v,{name:o}),Ql[e]=v,u},ls=function(t,e){return{value:t,done:e}},ss=B,fs=function(t){ol[rl][t]=!0},ps=ul,ds=Cn,hs=Ee.f,vs=us,gs=ls,ms=c,ys="Array Iterator",bs=ds.set,ws=ds.getterFor(ys),Ss=vs(Array,"Array",(function(t,e){bs(this,{type:ys,target:ss(t),index:0,kind:e})}),(function(){var t=ws(this),e=t.target,n=t.index++;if(!e||n>=e.length)return t.target=null,gs(void 0,!0);switch(t.kind){case"keys":return gs(n,!1);case"values":return gs(e[n],!1)}return gs([n,e[n]],!1)}),"values"),Is=ps.Arguments=ps.Array;if(fs("keys"),fs("values"),fs("entries"),ms&&"values"!==Is.name)try{hs(Is,"name",{value:"values"})}catch(Om){}var Os=o,js={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},xs=Ku,Ps=Ss,Ms=Ve,Ts=ra,Es=re("iterator"),Cs=Ps.values,ks=function(t,e){if(t){if(t[Es]!==Cs)try{Ms(t,Es,Cs)}catch(Om){t[Es]=Cs}if(Ts(t,e,!0),js[e])for(var n in Ps)if(t[n]!==Ps[n])try{Ms(t,n,Ps[n])}catch(Om){t[n]=Ps[n]}}};for(var Ns in js)ks(Os[Ns]&&Os[Ns].prototype,Ns);ks(xs,"DOMTokenList");var Rs=G,As=Ve,$s=Error,Ds=O("".replace),Ls=String(new $s("zxcasd").stack),_s=/\n\s*at [^:]*:[^\n]*/,Bs=_s.test(Ls),zs=y,Ws=!a((function(){var t=new Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",zs(1,7)),7!==t.stack)})),Fs=Ve,Gs=function(t,e){if(Bs&&"string"==typeof t&&!$s.prepareStackTrace)for(;e--;)t=Ds(t,_s,"");return t},Hs=Ws,Zs=Error.captureStackTrace,Us=ul,Js=re("iterator"),Vs=Array.prototype,Ys=go,Xs=It,qs=R,Qs=ul,Ks=re("iterator"),tf=function(t){if(!qs(t))return Xs(t,Ks)||Xs(t,"@@iterator")||Qs[Ys(t)]},ef=f,nf=bt,rf=Ae,of=vt,af=tf,cf=TypeError,uf=f,lf=Ae,sf=It,ff=sa,pf=f,df=Ae,hf=vt,vf=function(t){return void 0!==t&&(Us.Array===t||Vs[Js]===t)},gf=fr,mf=J,yf=function(t,e){var n=arguments.length<2?af(t):e;if(nf(n))return rf(ef(n,t));throw new cf(of(t)+" is not iterable")},bf=tf,wf=function(t,e,n){var r,o;lf(t);try{if(!(r=sf(t,"return"))){if("throw"===e)throw n;return n}r=uf(r,t)}catch(Om){o=!0,r=Om}if("throw"===e)throw n;if(o)throw r;return lf(r),n},Sf=TypeError,If=function(t,e){this.stopped=t,this.result=e},Of=If.prototype,jf=function(t,e,n){var r,o,i,a,c,u,l,s=n&&n.that,f=!(!n||!n.AS_ENTRIES),p=!(!n||!n.IS_RECORD),d=!(!n||!n.IS_ITERATOR),h=!(!n||!n.INTERRUPTED),v=ff(e,s),g=function(t){return r&&wf(r,"normal",t),new If(!0,t)},m=function(t){return f?(df(t),h?v(t[0],t[1],g):v(t[0],t[1])):h?v(t,g):v(t)};if(p)r=t.iterator;else if(d)r=t;else{if(!(o=bf(t)))throw new Sf(hf(t)+" is not iterable");if(vf(o)){for(i=0,a=gf(t);a>i;i++)if((c=m(t[i]))&&mf(Of,c))return c;return new If(!1)}r=yf(t,o)}for(u=p?t.next:r.next;!(l=pf(u,r)).done;){try{c=m(l.value)}catch(Om){wf(r,"throw",Om)}if("object"==typeof c&&c&&mf(Of,c))return c}return new If(!1)},xf=oi,Pf=to,Mf=J,Tf=ml,Ef=Fl,Cf=Lr,kf=Ci,Nf=Ve,Rf=y,Af=function(t,e){Rs(e)&&"cause"in e&&As(t,"cause",e.cause)},$f=function(t,e,n,r){Hs&&(Zs?Zs(t,e):Fs(t,"stack",Gs(n,r)))},Df=jf,Lf=function(t,e){return void 0===t?arguments.length<2?"":e:xf(t)},_f=re("toStringTag"),Bf=Error,zf=[].push,Wf=function(t,e){var n,r=Mf(Ff,this);Ef?n=Ef(new Bf,r?Tf(this):Ff):(n=r?this:kf(Ff),Nf(n,_f,"Error")),void 0!==e&&Nf(n,"message",Lf(e)),$f(n,Wf,n.stack,1),arguments.length>2&&Af(n,arguments[2]);var o=[];return Df(t,zf,{that:o}),Nf(n,"errors",o),n};Ef?Ef(Wf,Bf):Cf(Wf,Bf,{name:!0});var Ff=Wf.prototype=kf(Bf.prototype,{constructor:Rf(1,Wf),message:Rf(1,""),name:Rf(1,"AggregateError")});Pf({global:!0,constructor:!0,arity:2},{AggregateError:Wf});var Gf,Hf,Zf,Uf,Jf=o,Vf=X,Yf=M,Xf=function(t){return Vf.slice(0,t.length)===t},qf=Xf("Bun/")?"BUN":Xf("Cloudflare-Workers")?"CLOUDFLARE":Xf("Deno/")?"DENO":Xf("Node.js/")?"NODE":Jf.Bun&&"string"==typeof Bun.version?"BUN":Jf.Deno&&"object"==typeof Deno.version?"DENO":"process"===Yf(Jf.process)?"NODE":Jf.window&&Jf.document?"BROWSER":"REST",Qf="NODE"===qf,Kf=U,tp=zi,ep=c,np=re("species"),rp=J,op=TypeError,ip=Eo,ap=vt,cp=TypeError,up=Ae,lp=function(t){if(ip(t))return t;throw new cp(ap(t)+" is not a constructor")},sp=R,fp=re("species"),pp=function(t,e){var n,r=up(t).constructor;return void 0===r||sp(n=up(r)[fp])?e:lp(n)},dp=TypeError,hp=/(?:ipad|iphone|ipod).*applewebkit/i.test(X),vp=o,gp=Vc,mp=sa,yp=W,bp=Gt,wp=a,Sp=gi,Ip=Ni,Op=me,jp=function(t,e){if(t<e)throw new dp("Not enough arguments");return t},xp=hp,Pp=Qf,Mp=vp.setImmediate,Tp=vp.clearImmediate,Ep=vp.process,Cp=vp.Dispatch,kp=vp.Function,Np=vp.MessageChannel,Rp=vp.String,Ap=0,$p={},Dp="onreadystatechange";wp((function(){Gf=vp.location}));var Lp=function(t){if(bp($p,t)){var e=$p[t];delete $p[t],e()}},_p=function(t){return function(){Lp(t)}},Bp=function(t){Lp(t.data)},zp=function(t){vp.postMessage(Rp(t),Gf.protocol+"//"+Gf.host)};Mp&&Tp||(Mp=function(t){jp(arguments.length,1);var e=yp(t)?t:kp(t),n=Ip(arguments,1);return $p[++Ap]=function(){gp(e,void 0,n)},Hf(Ap),Ap},Tp=function(t){delete $p[t]},Pp?Hf=function(t){Ep.nextTick(_p(t))}:Cp&&Cp.now?Hf=function(t){Cp.now(_p(t))}:Np&&!xp?(Uf=(Zf=new Np).port2,Zf.port1.onmessage=Bp,Hf=mp(Uf.postMessage,Uf)):vp.addEventListener&&yp(vp.postMessage)&&!vp.importScripts&&Gf&&"file:"!==Gf.protocol&&!wp(zp)?(Hf=zp,vp.addEventListener("message",Bp,!1)):Hf=Dp in Op("script")?function(t){Sp.appendChild(Op("script"))[Dp]=function(){Sp.removeChild(this),Lp(t)}}:function(t){setTimeout(_p(t),0)});var Wp={set:Mp,clear:Tp},Fp=o,Gp=c,Hp=Object.getOwnPropertyDescriptor,Zp=function(){this.head=null,this.tail=null};Zp.prototype={add:function(t){var e={item:t,next:null},n=this.tail;n?n.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}};var Up,Jp,Vp,Yp,Xp,qp=Zp,Qp=/ipad|iphone|ipod/i.test(X)&&"undefined"!=typeof Pebble,Kp=/web0s(?!.*chrome)/i.test(X),td=o,ed=function(t){if(!Gp)return Fp[t];var e=Hp(Fp,t);return e&&e.value},nd=sa,rd=Wp.set,od=qp,id=hp,ad=Qp,cd=Kp,ud=Qf,ld=td.MutationObserver||td.WebKitMutationObserver,sd=td.document,fd=td.process,pd=td.Promise,dd=ed("queueMicrotask");if(!dd){var hd=new od,vd=function(){var t,e;for(ud&&(t=fd.domain)&&t.exit();e=hd.get();)try{e()}catch(Om){throw hd.head&&Up(),Om}t&&t.enter()};id||ud||cd||!ld||!sd?!ad&&pd&&pd.resolve?((Yp=pd.resolve(void 0)).constructor=pd,Xp=nd(Yp.then,Yp),Up=function(){Xp(vd)}):ud?Up=function(){fd.nextTick(vd)}:(rd=nd(rd,td),Up=function(){rd(vd)}):(Jp=!0,Vp=sd.createTextNode(""),new ld(vd).observe(Vp,{characterData:!0}),Up=function(){Vp.data=Jp=!Jp}),dd=function(t){hd.head||Up(),hd.add(t)}}var gd=dd,md=function(t){try{return{error:!1,value:t()}}catch(Om){return{error:!0,value:Om}}},yd=o.Promise,bd=o,wd=yd,Sd=W,Id=Ur,Od=ln,jd=re,xd=qf,Pd=rt;wd&&wd.prototype;var Md=jd("species"),Td=!1,Ed=Sd(bd.PromiseRejectionEvent),Cd={CONSTRUCTOR:Id("Promise",(function(){var t=Od(wd),e=t!==String(wd);if(!e&&66===Pd)return!0;if(!Pd||Pd<51||!/native code/.test(t)){var n=new wd((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};if((n.constructor={})[Md]=r,!(Td=n.then((function(){}))instanceof r))return!0}return!(e||"BROWSER"!==xd&&"DENO"!==xd||Ed)})),REJECTION_EVENT:Ed,SUBCLASSING:Td},kd={},Nd=bt,Rd=TypeError,Ad=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw new Rd("Bad Promise constructor");e=t,n=r})),this.resolve=Nd(e),this.reject=Nd(n)};kd.f=function(t){return new Ad(t)};var $d,Dd,Ld,_d=to,Bd=Qf,zd=o,Wd=f,Fd=Kn,Gd=Fl,Hd=ra,Zd=function(t){var e=Kf(t);ep&&e&&!e[np]&&tp(e,np,{configurable:!0,get:function(){return this}})},Ud=bt,Jd=W,Vd=G,Yd=function(t,e){if(rp(e,t))return t;throw new op("Incorrect invocation")},Xd=pp,qd=Wp.set,Qd=gd,Kd=function(t,e){try{1===arguments.length?console.error(t):console.error(t,e)}catch(Om){}},th=md,eh=qp,nh=Cn,rh=yd,oh=kd,ih="Promise",ah=Cd.CONSTRUCTOR,ch=Cd.REJECTION_EVENT,uh=Cd.SUBCLASSING,lh=nh.getterFor(ih),sh=nh.set,fh=rh&&rh.prototype,ph=rh,dh=fh,hh=zd.TypeError,vh=zd.document,gh=zd.process,mh=oh.f,yh=mh,bh=!!(vh&&vh.createEvent&&zd.dispatchEvent),wh="unhandledrejection",Sh=function(t){var e;return!(!Vd(t)||!Jd(e=t.then))&&e},Ih=function(t,e){var n,r,o,i=e.value,a=1===e.state,c=a?t.ok:t.fail,u=t.resolve,l=t.reject,s=t.domain;try{c?(a||(2===e.rejection&&Mh(e),e.rejection=1),!0===c?n=i:(s&&s.enter(),n=c(i),s&&(s.exit(),o=!0)),n===t.promise?l(new hh("Promise-chain cycle")):(r=Sh(n))?Wd(r,n,u,l):u(n)):l(i)}catch(Om){s&&!o&&s.exit(),l(Om)}},Oh=function(t,e){t.notified||(t.notified=!0,Qd((function(){for(var n,r=t.reactions;n=r.get();)Ih(n,t);t.notified=!1,e&&!t.rejection&&xh(t)})))},jh=function(t,e,n){var r,o;bh?((r=vh.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),zd.dispatchEvent(r)):r={promise:e,reason:n},!ch&&(o=zd["on"+t])?o(r):t===wh&&Kd("Unhandled promise rejection",n)},xh=function(t){Wd(qd,zd,(function(){var e,n=t.facade,r=t.value;if(Ph(t)&&(e=th((function(){Bd?gh.emit("unhandledRejection",r,n):jh(wh,n,r)})),t.rejection=Bd||Ph(t)?2:1,e.error))throw e.value}))},Ph=function(t){return 1!==t.rejection&&!t.parent},Mh=function(t){Wd(qd,zd,(function(){var e=t.facade;Bd?gh.emit("rejectionHandled",e):jh("rejectionhandled",e,t.value)}))},Th=function(t,e,n){return function(r){t(e,r,n)}},Eh=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,Oh(t,!0))},Ch=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw new hh("Promise can't be resolved itself");var r=Sh(e);r?Qd((function(){var n={done:!1};try{Wd(r,e,Th(Ch,n,t),Th(Eh,n,t))}catch(Om){Eh(n,Om,t)}})):(t.value=e,t.state=1,Oh(t,!1))}catch(Om){Eh({done:!1},Om,t)}}};if(ah&&(dh=(ph=function(t){Yd(this,dh),Ud(t),Wd($d,this);var e=lh(this);try{t(Th(Ch,e),Th(Eh,e))}catch(Om){Eh(e,Om)}}).prototype,($d=function(t){sh(this,{type:ih,done:!1,notified:!1,parent:!1,reactions:new eh,rejection:!1,state:0,value:null})}).prototype=Fd(dh,"then",(function(t,e){var n=lh(this),r=mh(Xd(this,ph));return n.parent=!0,r.ok=!Jd(t)||t,r.fail=Jd(e)&&e,r.domain=Bd?gh.domain:void 0,0===n.state?n.reactions.add(r):Qd((function(){Ih(r,n)})),r.promise})),Dd=function(){var t=new $d,e=lh(t);this.promise=t,this.resolve=Th(Ch,e),this.reject=Th(Eh,e)},oh.f=mh=function(t){return t===ph||undefined===t?new Dd(t):yh(t)},Jd(rh)&&fh!==Object.prototype)){Ld=fh.then,uh||Fd(fh,"then",(function(t,e){var n=this;return new ph((function(t,e){Wd(Ld,n,t,e)})).then(t,e)}),{unsafe:!0});try{delete fh.constructor}catch(Om){}Gd&&Gd(fh,dh)}_d({global:!0,constructor:!0,wrap:!0,forced:ah},{Promise:ph}),Hd(ph,ih,!1),Zd(ih);var kh=re("iterator"),Nh=!1;try{var Rh=0,Ah={next:function(){return{done:!!Rh++}},return:function(){Nh=!0}};Ah[kh]=function(){return this},Array.from(Ah,(function(){throw 2}))}catch(Om){}var $h=yd,Dh=Cd.CONSTRUCTOR||!function(t,e){try{if(!e&&!Nh)return!1}catch(Om){return!1}var n=!1;try{var r={};r[kh]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(Om){}return n}((function(t){$h.all(t).then(void 0,(function(){}))})),Lh=f,_h=bt,Bh=kd,zh=md,Wh=jf;to({target:"Promise",stat:!0,forced:Dh},{all:function(t){var e=this,n=Bh.f(e),r=n.resolve,o=n.reject,i=zh((function(){var n=_h(e.resolve),i=[],a=0,c=1;Wh(t,(function(t){var u=a++,l=!1;c++,Lh(n,e,t).then((function(t){l||(l=!0,i[u]=t,--c||r(i))}),o)})),--c||r(i)}));return i.error&&o(i.value),n.promise}});var Fh=to,Gh=Cd.CONSTRUCTOR,Hh=yd,Zh=U,Uh=W,Jh=Kn,Vh=Hh&&Hh.prototype;if(Fh({target:"Promise",proto:!0,forced:Gh,real:!0},{catch:function(t){return this.then(void 0,t)}}),Uh(Hh)){var Yh=Zh("Promise").prototype.catch;Vh.catch!==Yh&&Jh(Vh,"catch",Yh,{unsafe:!0})}var Xh=f,qh=bt,Qh=kd,Kh=md,tv=jf;to({target:"Promise",stat:!0,forced:Dh},{race:function(t){var e=this,n=Qh.f(e),r=n.reject,o=Kh((function(){var o=qh(e.resolve);tv(t,(function(t){Xh(o,e,t).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}});var ev=kd;to({target:"Promise",stat:!0,forced:Cd.CONSTRUCTOR},{reject:function(t){var e=ev.f(this);return(0,e.reject)(t),e.promise}});var nv=Ae,rv=G,ov=kd,iv=function(t,e){if(nv(t),rv(e)&&e.constructor===t)return e;var n=ov.f(t);return(0,n.resolve)(e),n.promise},av=to,cv=Cd.CONSTRUCTOR,uv=iv;U("Promise"),av({target:"Promise",stat:!0,forced:cv},{resolve:function(t){return uv(this,t)}});var lv=f,sv=bt,fv=kd,pv=md,dv=jf;to({target:"Promise",stat:!0,forced:Dh},{allSettled:function(t){var e=this,n=fv.f(e),r=n.resolve,o=n.reject,i=pv((function(){var n=sv(e.resolve),o=[],i=0,a=1;dv(t,(function(t){var c=i++,u=!1;a++,lv(n,e,t).then((function(t){u||(u=!0,o[c]={status:"fulfilled",value:t},--a||r(o))}),(function(t){u||(u=!0,o[c]={status:"rejected",reason:t},--a||r(o))}))})),--a||r(o)}));return i.error&&o(i.value),n.promise}});var hv=f,vv=bt,gv=U,mv=kd,yv=md,bv=jf,wv="No one promise resolved";to({target:"Promise",stat:!0,forced:Dh},{any:function(t){var e=this,n=gv("AggregateError"),r=mv.f(e),o=r.resolve,i=r.reject,a=yv((function(){var r=vv(e.resolve),a=[],c=0,u=1,l=!1;bv(t,(function(t){var s=c++,f=!1;u++,hv(r,e,t).then((function(t){f||l||(l=!0,o(t))}),(function(t){f||l||(f=!0,a[s]=t,--u||i(new n(a,wv)))}))})),--u||i(new n(a,wv))}));return a.error&&i(a.value),r.promise}});var Sv=to,Iv=Vc,Ov=Ni,jv=kd,xv=bt,Pv=md,Mv=o.Promise,Tv=!1;Sv({target:"Promise",stat:!0,forced:!Mv||!Mv.try||Pv((function(){Mv.try((function(t){Tv=8===t}),8)})).error||!Tv},{try:function(t){var e=arguments.length>1?Ov(arguments,1):[],n=jv.f(this),r=Pv((function(){return Iv(xv(t),void 0,e)}));return(r.error?n.reject:n.resolve)(r.value),n.promise}});var Ev=kd;to({target:"Promise",stat:!0},{withResolvers:function(){var t=Ev.f(this);return{promise:t.promise,resolve:t.resolve,reject:t.reject}}});var Cv=to,kv=yd,Nv=a,Rv=U,Av=W,$v=pp,Dv=iv,Lv=Kn,_v=kv&&kv.prototype;if(Cv({target:"Promise",proto:!0,real:!0,forced:!!kv&&Nv((function(){_v.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var e=$v(this,Rv("Promise")),n=Av(t);return this.then(n?function(n){return Dv(e,t()).then((function(){return n}))}:t,n?function(n){return Dv(e,t()).then((function(){throw n}))}:t)}}),Av(kv)){var Bv=Rv("Promise").prototype.finally;_v.finally!==Bv&&Lv(_v,"finally",Bv,{unsafe:!0})}var zv=O,Wv=or,Fv=oi,Gv=D,Hv=zv("".charAt),Zv=zv("".charCodeAt),Uv=zv("".slice),Jv=function(t){return function(e,n){var r,o,i=Fv(Gv(e)),a=Wv(n),c=i.length;return a<0||a>=c?t?"":void 0:(r=Zv(i,a))<55296||r>56319||a+1===c||(o=Zv(i,a+1))<56320||o>57343?t?Hv(i,a):r:t?Uv(i,a,a+2):o-56320+(r-55296<<10)+65536}},Vv={codeAt:Jv(!1),charAt:Jv(!0)}.charAt,Yv=oi,Xv=Cn,qv=us,Qv=ls,Kv="String Iterator",tg=Xv.set,eg=Xv.getterFor(Kv);function ng(){}function rg(t){return t()}function og(){return Object.create(null)}function ig(t){t.forEach(rg)}function ag(t){return"function"==typeof t}function cg(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}let ug,lg;function sg(t){return null==t?"":t}function fg(t,e){t.appendChild(e)}function pg(t,e,n){const r=function(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;if(e&&e.host)return e;return t.ownerDocument}(t);if(!r.getElementById(e)){const t=vg("style");t.id=e,t.textContent=n,function(t,e){fg(t.head||t,e),e.sheet}(r,t)}}function dg(t,e,n){t.insertBefore(e,n||null)}function hg(t){t.parentNode&&t.parentNode.removeChild(t)}function vg(t){return document.createElement(t)}function gg(t){return document.createTextNode(t)}function mg(){return gg(" ")}function yg(){return gg("")}function bg(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function wg(t,e,n,r){null==n?t.style.removeProperty(e):t.style.setProperty(e,n,"")}function Sg(t){lg=t}function Ig(){if(!lg)throw new Error("Function called outside component initialization");return lg}function Og(t){Ig().$$.on_mount.push(t)}function jg(){const t=Ig();return(e,n,{cancelable:r=!1}={})=>{const o=t.$$.callbacks[e];if(o){const i=function(t,e,{bubbles:n=!1,cancelable:r=!1}={}){return new CustomEvent(t,{detail:e,bubbles:n,cancelable:r})}(e,n,{cancelable:r});return o.slice().forEach((e=>{e.call(t,i)})),!i.defaultPrevented}return!0}}qv(String,"String",(function(t){tg(this,{type:Kv,string:Yv(t),index:0})}),(function(){var t,e=eg(this),n=e.string,r=e.index;return r>=n.length?Qv(void 0,!0):(t=Vv(n,r),e.index+=t.length,Qv(t,!1))})),Gi.Promise;const xg=[],Pg=[];let Mg=[];const Tg=[],Eg=Promise.resolve();let Cg=!1;function kg(t){Mg.push(t)}const Ng=new Set;let Rg=0;function Ag(){if(0!==Rg)return;const t=lg;do{try{for(;Rg<xg.length;){const t=xg[Rg];Rg++,Sg(t),$g(t.$$)}}catch(e){throw xg.length=0,Rg=0,e}for(Sg(null),xg.length=0,Rg=0;Pg.length;)Pg.pop()();for(let t=0;t<Mg.length;t+=1){const e=Mg[t];Ng.has(e)||(Ng.add(e),e())}Mg.length=0}while(xg.length);for(;Tg.length;)Tg.pop()();Cg=!1,Ng.clear(),Sg(t)}function $g(t){if(null!==t.fragment){t.update(),ig(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(kg)}}const Dg=new Set;let Lg;function _g(t,e){t&&t.i&&(Dg.delete(t),t.i(e))}function Bg(t,e,n,r){if(t&&t.o){if(Dg.has(t))return;Dg.add(t),Lg.c.push((()=>{Dg.delete(t),r&&(n&&t.d(1),r())})),t.o(e)}else r&&r()}function zg(t){return void 0!==(null==t?void 0:t.length)?t:Array.from(t)}function Wg(t,e){t.d(1),e.delete(t.key)}function Fg(t,e,n){const{fragment:r,after_update:o}=t.$$;r&&r.m(e,n),kg((()=>{const e=t.$$.on_mount.map(rg).filter(ag);t.$$.on_destroy?t.$$.on_destroy.push(...e):ig(e),t.$$.on_mount=[]})),o.forEach(kg)}function Gg(t,e){const n=t.$$;null!==n.fragment&&(!function(t){const e=[],n=[];Mg.forEach((r=>-1===t.indexOf(r)?e.push(r):n.push(r))),n.forEach((t=>t())),Mg=e}(n.after_update),ig(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Hg(t,e){-1===t.$$.dirty[0]&&(xg.push(t),Cg||(Cg=!0,Eg.then(Ag)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function Zg(t,e,n,r,o,i,a=null,c=[-1]){const u=lg;Sg(t);const l=t.$$={fragment:null,ctx:[],props:i,update:ng,not_equal:o,bound:og(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(u?u.$$.context:[])),callbacks:og(),dirty:c,skip_bound:!1,root:e.target||u.$$.root};a&&a(l.root);let s=!1;if(l.ctx=n?n(t,e.props||{},((e,n,...r)=>{const i=r.length?r[0]:n;return l.ctx&&o(l.ctx[e],l.ctx[e]=i)&&(!l.skip_bound&&l.bound[e]&&l.bound[e](i),s&&Hg(t,e)),n})):[],l.update(),s=!0,ig(l.before_update),l.fragment=!!r&&r(l.ctx),e.target){if(e.hydrate){const t=(f=e.target,Array.from(f.childNodes));l.fragment&&l.fragment.l(t),t.forEach(hg)}else l.fragment&&l.fragment.c();e.intro&&_g(t.$$.fragment),Fg(t,e.target,e.anchor),Ag()}var f;Sg(u)}class Ug{constructor(){e(this,"$$"),e(this,"$$set")}$destroy(){Gg(this,1),this.$destroy=ng}$on(t,e){if(!ag(e))return ng;const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}function Jg(t,e,n,r=t=>t){return t*r(.5-e*(.5-n))}function Vg(t,e){return[t[0]+e[0],t[1]+e[1]]}function Yg(t,e){return[t[0]-e[0],t[1]-e[1]]}function Xg(t,e){return[t[0]*e,t[1]*e]}function qg(t){return[t[1],-t[0]]}function Qg(t,e){return t[0]*e[0]+t[1]*e[1]}function Kg(t,e){return t[0]===e[0]&&t[1]===e[1]}function tm(t,e){return function(t){return t[0]*t[0]+t[1]*t[1]}(Yg(t,e))}function em(t){return function(t,e){return[t[0]/e,t[1]/e]}(t,function(t){return Math.hypot(t[0],t[1])}(t))}function nm(t,e){return Math.hypot(t[1]-e[1],t[0]-e[0])}function rm(t,e,n){let r=Math.sin(n),o=Math.cos(n),i=t[0]-e[0],a=t[1]-e[1],c=i*r+a*o;return[i*o-a*r+e[0],c+e[1]]}function om(t,e,n){return Vg(t,Xg(Yg(e,t),n))}function im(t,e,n){return Vg(t,Xg(e,n))}"undefined"!=typeof window&&(window.__svelte||(window.__svelte={v:new Set})).v.add("4");var{min:am,PI:cm}=Math,um=cm+1e-4;function lm(t,e={}){return function(t,e={}){let{size:n=16,smoothing:r=.5,thinning:o=.5,simulatePressure:i=!0,easing:a=t=>t,start:c={},end:u={},last:l=!1}=e,{cap:s=!0,easing:f=t=>t*(2-t)}=c,{cap:p=!0,easing:d=t=>--t*t*t+1}=u;if(0===t.length||n<=0)return[];let h,v=t[t.length-1].runningLength,g=!1===c.taper?0:!0===c.taper?Math.max(n,v):c.taper,m=!1===u.taper?0:!0===u.taper?Math.max(n,v):u.taper,y=Math.pow(n*r,2),b=[],w=[],S=t.slice(0,10).reduce(((t,e)=>{let r=e.pressure;if(i){let o=am(1,e.distance/n),i=am(1,1-o);r=am(1,t+.275*o*(i-t))}return(t+r)/2}),t[0].pressure),I=Jg(n,o,t[t.length-1].pressure,a),O=t[0].vector,j=t[0].point,x=j,P=j,M=x,T=!1;for(let R=0;R<t.length;R++){let{pressure:e}=t[R],{point:r,vector:c,distance:u,runningLength:l}=t[R];if(R<t.length-1&&v-l<3)continue;if(o){if(i){let t=am(1,u/n),r=am(1,1-t);e=am(1,S+.275*t*(r-S))}I=Jg(n,o,e,a)}else I=n/2;void 0===h&&(h=I);let s=l<g?f(l/g):1,p=v-l<m?d((v-l)/m):1;I=Math.max(.01,I*Math.min(s,p));let E=(R<t.length-1?t[R+1]:t[R]).vector,C=R<t.length-1?Qg(c,E):1,k=null!==C&&C<0;if(Qg(c,O)<0&&!T||k){let t=Xg(qg(O),I);for(let e=1/13,n=0;n<=1;n+=e)P=rm(Yg(r,t),r,um*n),b.push(P),M=rm(Vg(r,t),r,um*-n),w.push(M);j=P,x=M,k&&(T=!0);continue}if(T=!1,R===t.length-1){let t=Xg(qg(c),I);b.push(Yg(r,t)),w.push(Vg(r,t));continue}let N=Xg(qg(om(E,c,C)),I);P=Yg(r,N),(R<=1||tm(j,P)>y)&&(b.push(P),j=P),M=Vg(r,N),(R<=1||tm(x,M)>y)&&(w.push(M),x=M),S=e,O=c}let E=t[0].point.slice(0,2),C=t.length>1?t[t.length-1].point.slice(0,2):Vg(t[0].point,[1,1]),k=[],N=[];if(1===t.length){if(!g&&!m||l){let t=im(E,em(qg(Yg(E,C))),-(h||I)),e=[];for(let n=1/13,r=n;r<=1;r+=n)e.push(rm(t,E,2*um*r));return e}}else{if(!(g||m&&1===t.length))if(s)for(let t=1/13,n=t;n<=1;n+=t){let t=rm(w[0],E,um*n);k.push(t)}else{let t=Yg(b[0],w[0]),e=Xg(t,.5),n=Xg(t,.51);k.push(Yg(E,e),Yg(E,n),Vg(E,n),Vg(E,e))}let e=qg(function(t){return[-t[0],-t[1]]}(t[t.length-1].vector));if(m||g&&1===t.length)N.push(C);else if(p){let t=im(C,e,I);for(let e=1/29,n=e;n<1;n+=e)N.push(rm(t,C,3*um*n))}else N.push(Vg(C,Xg(e,I)),Vg(C,Xg(e,.99*I)),Yg(C,Xg(e,.99*I)),Yg(C,Xg(e,I)))}return b.concat(N,w.reverse(),k)}(function(t,e={}){var n;let{streamline:r=.5,size:o=16,last:i=!1}=e;if(0===t.length)return[];let a=.15+.85*(1-r),c=Array.isArray(t[0])?t:t.map((({x:t,y:e,pressure:n=.5})=>[t,e,n]));if(2===c.length){let t=c[1];c=c.slice(0,-1);for(let e=1;e<5;e++)c.push(om(c[0],t,e/4))}1===c.length&&(c=[...c,[...Vg(c[0],[1,1]),...c[0].slice(2)]]);let u=[{point:[c[0][0],c[0][1]],pressure:c[0][2]>=0?c[0][2]:.25,vector:[1,1],distance:0,runningLength:0}],l=!1,s=0,f=u[0],p=c.length-1;for(let d=1;d<c.length;d++){let t=i&&d===p?c[d].slice(0,2):om(f.point,c[d],a);if(Kg(f.point,t))continue;let e=nm(t,f.point);if(s+=e,d<p&&!l){if(s<o)continue;l=!0}f={point:t,pressure:c[d][2]>=0?c[d][2]:.5,vector:em(Yg(f.point,t)),distance:e,runningLength:s},u.push(f)}return u[0].vector=(null==(n=u[1])?void 0:n.vector)||[0,0],u}(t,e),e)}function sm(t){pg(t,"svelte-nbwwal",".usb-paint-tools.svelte-nbwwal.svelte-nbwwal{position:absolute;z-index:99;display:flex}.usb-paint-tools.svelte-nbwwal .gap.svelte-nbwwal{width:8px}.left.svelte-nbwwal.svelte-nbwwal{left:5px;top:50%;transform:translateY(-50%);display:flex;flex-direction:column;justify-content:center;align-items:center}.right.svelte-nbwwal.svelte-nbwwal{right:5px;top:50%;transform:translateY(-50%);display:flex;flex-direction:column;justify-content:center;align-items:center}.top.svelte-nbwwal.svelte-nbwwal{top:5px;left:50%;transform:translateX(-50%);display:flex;flex-direction:row;justify-content:center;align-items:center}.bottom.svelte-nbwwal.svelte-nbwwal{bottom:5px;left:50%;transform:translateX(-50%);display:flex;flex-direction:row;justify-content:center;align-items:center}.tool-svg.svelte-nbwwal.svelte-nbwwal{margin:5px;padding:3px}.tool-svg-active.svelte-nbwwal.svelte-nbwwal{background-color:#e0dfff;border-radius:5px}")}function fm(t,e,n){var r=t.slice();return r[9]=e[n],r}function pm(t){var e,n,r,o,i,a,c,u,l,s=t[4][t[9]].icon+"";function f(){return t[6](t[9])}return{c(){var u,l,s,f,p,d;d="svg",bg(e=document.createElementNS("http://www.w3.org/2000/svg",d),"viewBox","0 0 20 20"),bg(e,"width",n=null==(u=t[0].iconsConfig)?void 0:u.size),bg(e,"height",r=null==(l=t[0].iconsConfig)?void 0:l.size),bg(e,"stroke",o=null==(s=t[0].iconsConfig)?void 0:s.color),bg(e,"stroke-width",i=null==(f=t[0].iconsConfig)?void 0:f.width),bg(e,"fill",a=null==(p=t[0].iconsConfig)?void 0:p.fill),bg(e,"stroke-linecap","round"),bg(e,"stroke-linejoin","round"),bg(e,"class",c=sg(`tool-svg ${t[3]===t[9]&&"tool-svg-active"}`)+" svelte-nbwwal")},m(t,n){var r,o,i,a;dg(t,e,n),e.innerHTML=s,u||(o="click",i=f,(r=e).addEventListener(o,i,a),l=()=>r.removeEventListener(o,i,a),u=!0)},p(u,l){var f,p,d,h,v;t=u,1&l&&s!==(s=t[4][t[9]].icon+"")&&(e.innerHTML=s),1&l&&n!==(n=null==(f=t[0].iconsConfig)?void 0:f.size)&&bg(e,"width",n),1&l&&r!==(r=null==(p=t[0].iconsConfig)?void 0:p.size)&&bg(e,"height",r),1&l&&o!==(o=null==(d=t[0].iconsConfig)?void 0:d.color)&&bg(e,"stroke",o),1&l&&i!==(i=null==(h=t[0].iconsConfig)?void 0:h.width)&&bg(e,"stroke-width",i),1&l&&a!==(a=null==(v=t[0].iconsConfig)?void 0:v.fill)&&bg(e,"fill",a),9&l&&c!==(c=sg(`tool-svg ${t[3]===t[9]&&"tool-svg-active"}`)+" svelte-nbwwal")&&bg(e,"class",c)},d(t){t&&hg(e),u=!1,l()}}}function dm(t,e){var n,r,o=e[4][e[9]]&&pm(e);return{key:t,first:null,c(){n=yg(),o&&o.c(),r=yg(),this.first=n},m(t,e){dg(t,n,e),o&&o.m(t,e),dg(t,r,e)},p(t,n){(e=t)[4][e[9]]?o?o.p(e,n):((o=pm(e)).c(),o.m(r.parentNode,r)):o&&(o.d(1),o=null)},d(t){t&&(hg(n),hg(r)),o&&o.d(t)}}}function hm(t){for(var e,n,r,o,i,a,c=[],u=new Map,l=zg(t[0].tools||[]),s=t=>t[9],f=0;f<l.length;f+=1){var p=fm(t,l,f),d=s(p);u.set(d,c[f]=dm(d,p))}return{c(){e=vg("div"),n=vg("div"),r=mg();for(var u=0;u<c.length;u+=1)c[u].c();o=mg(),i=vg("div"),bg(n,"class","gap svelte-nbwwal"),bg(i,"class","gap svelte-nbwwal"),bg(e,"style",t[1]),bg(e,"class",a=sg(t[2])+" svelte-nbwwal")},m(t,a){dg(t,e,a),fg(e,n),fg(e,r);for(var u=0;u<c.length;u+=1)c[u]&&c[u].m(e,null);fg(e,o),fg(e,i)},p(t,n){var[r]=n;57&r&&(l=zg(t[0].tools||[]),c=function(t,e,n,r,o,i,a,c,u,l,s,f){let p=t.length,d=i.length,h=p;const v={};for(;h--;)v[t[h].key]=h;const g=[],m=new Map,y=new Map,b=[];for(h=d;h--;){const t=f(o,i,h),r=n(t);let c=a.get(r);c?b.push((()=>c.p(t,e))):(c=l(r,t),c.c()),m.set(r,g[h]=c),r in v&&y.set(r,Math.abs(h-v[r]))}const w=new Set,S=new Set;fu