@opentrainticketing/netex-deckplan-editor 1.0.1 → 1.0.3
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/netex-deckplan-editor.es.js +542 -548
- package/dist/netex-deckplan-editor.umd.js +14 -14
- package/package.json +1 -1
- package/dist/app/App.vue.d.ts +0 -4
- package/dist/app/main.d.ts +0 -1
- package/dist/components/DeckVisualization.vue.d.ts +0 -46
- package/dist/components/DeckplanEditor.vue.d.ts +0 -8
- package/dist/components/ElementCatalog.vue.d.ts +0 -9
- package/dist/components/ObjectProperties.vue.d.ts +0 -19
- package/dist/components/WagonVisualization.vue.d.ts +0 -25
- package/dist/components/XmlViewer.vue.d.ts +0 -23
- package/dist/components/index.d.ts +0 -3
- package/dist/helpers/parser.d.ts +0 -2
- package/dist/index.d.ts +0 -8
- package/dist/types/netex/actualVehicleEquipment.d.ts +0 -28
- package/dist/types/netex/centroid.d.ts +0 -11
- package/dist/types/netex/deck.d.ts +0 -82
- package/dist/types/netex/deckEntranceCouple.d.ts +0 -25
- package/dist/types/netex/deckEntranceUsage.d.ts +0 -31
- package/dist/types/netex/deckLevel.d.ts +0 -27
- package/dist/types/netex/deckPlan.d.ts +0 -32
- package/dist/types/netex/deckSpaceCapacity.d.ts +0 -18
- package/dist/types/netex/equipment.d.ts +0 -12
- package/dist/types/netex/general.d.ts +0 -30
- package/dist/types/netex/luggageSpot.d.ts +0 -50
- package/dist/types/netex/otherDeckSpace.d.ts +0 -33
- package/dist/types/netex/passengerEntrance.d.ts +0 -114
- package/dist/types/netex/passengerSpace.d.ts +0 -109
- package/dist/types/netex/passengerSpot.d.ts +0 -107
- package/dist/types/netex/polygon.d.ts +0 -5
- package/dist/types/netex/serviceFacilitySet.d.ts +0 -12
- package/dist/types/netex/spotColumn.d.ts +0 -24
- package/dist/types/netex/spotRow.d.ts +0 -24
- package/dist/types/netex/stopAffinity.d.ts +0 -1
- package/dist/types/netex/validityCondition.d.ts +0 -27
- package/dist/types/view/seats.d.ts +0 -8
- package/dist/webcomponent/webcomponent.d.ts +0 -22
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
(function(Kt,ht){typeof exports=="object"&&typeof module<"u"?module.exports=ht():typeof define=="function"&&define.amd?define(ht):(Kt=typeof globalThis<"u"?globalThis:Kt||self,Kt["netex-deckplan-editor"]=ht())})(this,(function(){"use strict";function Kt(e){const t=Object.create(null);for(const i of e.split(","))t[i]=1;return i=>i in t}const ht=process.env.NODE_ENV!=="production"?Object.freeze({}):{},Ai=process.env.NODE_ENV!=="production"?Object.freeze([]):[],Lt=()=>{},Mo=()=>!1,Zi=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Kn=e=>e.startsWith("onUpdate:"),xt=Object.assign,sr=(e,t)=>{const i=e.indexOf(t);i>-1&&e.splice(i,1)},bh=Object.prototype.hasOwnProperty,at=(e,t)=>bh.call(e,t),Q=Array.isArray,li=e=>tn(e)==="[object Map]",Ri=e=>tn(e)==="[object Set]",Lo=e=>tn(e)==="[object Date]",it=e=>typeof e=="function",Ct=e=>typeof e=="string",be=e=>typeof e=="symbol",ut=e=>e!==null&&typeof e=="object",rr=e=>(ut(e)||it(e))&&it(e.then)&&it(e.catch),Io=Object.prototype.toString,tn=e=>Io.call(e),or=e=>tn(e).slice(8,-1),Jn=e=>tn(e)==="[object Object]",ar=e=>Ct(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,en=Kt(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),yh=Kt("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),Qn=e=>{const t=Object.create(null);return(i=>t[i]||(t[i]=e(i)))},Eh=/-\w/g,Vt=Qn(e=>e.replace(Eh,t=>t.slice(1).toUpperCase())),Sh=/\B([A-Z])/g,Jt=Qn(e=>e.replace(Sh,"-$1").toLowerCase()),ci=Qn(e=>e.charAt(0).toUpperCase()+e.slice(1)),hi=Qn(e=>e?`on${ci(e)}`:""),je=(e,t)=>!Object.is(e,t),Mi=(e,...t)=>{for(let i=0;i<e.length;i++)e[i](...t)},Zn=(e,t,i,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:i})},ts=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Do=e=>{const t=Ct(e)?Number(e):NaN;return isNaN(t)?e:t};let Vo;const nn=()=>Vo||(Vo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function lr(e){if(Q(e)){const t={};for(let i=0;i<e.length;i++){const n=e[i],s=Ct(n)?Nh(n):lr(n);if(s)for(const r in s)t[r]=s[r]}return t}else if(Ct(e)||ut(e))return e}const wh=/;(?![^(]*\))/g,xh=/:([^]+)/,Ch=/\/\*[^]*?\*\//g;function Nh(e){const t={};return e.replace(Ch,"").split(wh).forEach(i=>{if(i){const n=i.split(xh);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function Li(e){let t="";if(Ct(e))t=e;else if(Q(e))for(let i=0;i<e.length;i++){const n=Li(e[i]);n&&(t+=n+" ")}else if(ut(e))for(const i in e)e[i]&&(t+=i+" ");return t.trim()}const Th="html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot",kh="svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view",Oh="annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics",Ph=Kt(Th),Ah=Kt(kh),Rh=Kt(Oh),Mh=Kt("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function Fo(e){return!!e||e===""}function Lh(e,t){if(e.length!==t.length)return!1;let i=!0;for(let n=0;i&&n<e.length;n++)i=di(e[n],t[n]);return i}function di(e,t){if(e===t)return!0;let i=Lo(e),n=Lo(t);if(i||n)return i&&n?e.getTime()===t.getTime():!1;if(i=be(e),n=be(t),i||n)return e===t;if(i=Q(e),n=Q(t),i||n)return i&&n?Lh(e,t):!1;if(i=ut(e),n=ut(t),i||n){if(!i||!n)return!1;const s=Object.keys(e).length,r=Object.keys(t).length;if(s!==r)return!1;for(const o in e){const a=e.hasOwnProperty(o),l=t.hasOwnProperty(o);if(a&&!l||!a&&l||!di(e[o],t[o]))return!1}}return String(e)===String(t)}function cr(e,t){return e.findIndex(i=>di(i,t))}const Go=e=>!!(e&&e.__v_isRef===!0),Xe=e=>Ct(e)?e:e==null?"":Q(e)||ut(e)&&(e.toString===Io||!it(e.toString))?Go(e)?Xe(e.value):JSON.stringify(e,Bo,2):String(e),Bo=(e,t)=>Go(t)?Bo(e,t.value):li(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((i,[n,s],r)=>(i[hr(n,r)+" =>"]=s,i),{})}:Ri(t)?{[`Set(${t.size})`]:[...t.values()].map(i=>hr(i))}:be(t)?hr(t):ut(t)&&!Q(t)&&!Jn(t)?String(t):t,hr=(e,t="")=>{var i;return be(e)?`Symbol(${(i=e.description)!=null?i:t})`:e};function ce(e,...t){console.warn(`[Vue warn] ${e}`,...t)}let jt;class Ih{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=jt,!t&&jt&&(this.index=(jt.scopes||(jt.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,i;if(this.scopes)for(t=0,i=this.scopes.length;t<i;t++)this.scopes[t].pause();for(t=0,i=this.effects.length;t<i;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,i;if(this.scopes)for(t=0,i=this.scopes.length;t<i;t++)this.scopes[t].resume();for(t=0,i=this.effects.length;t<i;t++)this.effects[t].resume()}}run(t){if(this._active){const i=jt;try{return jt=this,t()}finally{jt=i}}else process.env.NODE_ENV!=="production"&&ce("cannot run an inactive effect scope.")}on(){++this._on===1&&(this.prevScope=jt,jt=this)}off(){this._on>0&&--this._on===0&&(jt=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let i,n;for(i=0,n=this.effects.length;i<n;i++)this.effects[i].stop();for(this.effects.length=0,i=0,n=this.cleanups.length;i<n;i++)this.cleanups[i]();if(this.cleanups.length=0,this.scopes){for(i=0,n=this.scopes.length;i<n;i++)this.scopes[i].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const s=this.parent.scopes.pop();s&&s!==this&&(this.parent.scopes[this.index]=s,s.index=this.index)}this.parent=void 0}}}function Dh(){return jt}let mt;const dr=new WeakSet;class Ho{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,jt&&jt.active&&jt.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,dr.has(this)&&(dr.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Wo(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Yo(this),Uo(this);const t=mt,i=he;mt=this,he=!0;try{return this.fn()}finally{process.env.NODE_ENV!=="production"&&mt!==this&&ce("Active effect was not restored correctly - this is likely a Vue internal bug."),jo(this),mt=t,he=i,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)gr(t);this.deps=this.depsTail=void 0,Yo(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?dr.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){pr(this)&&this.run()}get dirty(){return pr(this)}}let $o=0,sn,rn;function Wo(e,t=!1){if(e.flags|=8,t){e.next=rn,rn=e;return}e.next=sn,sn=e}function ur(){$o++}function fr(){if(--$o>0)return;if(rn){let t=rn;for(rn=void 0;t;){const i=t.next;t.next=void 0,t.flags&=-9,t=i}}let e;for(;sn;){let t=sn;for(sn=void 0;t;){const i=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){e||(e=n)}t=i}}if(e)throw e}function Uo(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function jo(e){let t,i=e.depsTail,n=i;for(;n;){const s=n.prevDep;n.version===-1?(n===i&&(i=s),gr(n),Vh(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=s}e.deps=t,e.depsTail=i}function pr(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Xo(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Xo(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===on)||(e.globalVersion=on,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!pr(e))))return;e.flags|=2;const t=e.dep,i=mt,n=he;mt=e,he=!0;try{Uo(e);const s=e.fn(e._value);(t.version===0||je(s,e._value))&&(e.flags|=128,e._value=s,t.version++)}catch(s){throw t.version++,s}finally{mt=i,he=n,jo(e),e.flags&=-3}}function gr(e,t=!1){const{dep:i,prevSub:n,nextSub:s}=e;if(n&&(n.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=n,e.nextSub=void 0),process.env.NODE_ENV!=="production"&&i.subsHead===e&&(i.subsHead=s),i.subs===e&&(i.subs=n,!n&&i.computed)){i.computed.flags&=-5;for(let r=i.computed.deps;r;r=r.nextDep)gr(r,!0)}!t&&!--i.sc&&i.map&&i.map.delete(i.key)}function Vh(e){const{prevDep:t,nextDep:i}=e;t&&(t.nextDep=i,e.prevDep=void 0),i&&(i.prevDep=t,e.nextDep=void 0)}let he=!0;const zo=[];function de(){zo.push(he),he=!1}function ue(){const e=zo.pop();he=e===void 0?!0:e}function Yo(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const i=mt;mt=void 0;try{t()}finally{mt=i}}}let on=0;class Fh{constructor(t,i){this.sub=t,this.dep=i,this.version=i.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class mr{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0,process.env.NODE_ENV!=="production"&&(this.subsHead=void 0)}track(t){if(!mt||!he||mt===this.computed)return;let i=this.activeLink;if(i===void 0||i.sub!==mt)i=this.activeLink=new Fh(mt,this),mt.deps?(i.prevDep=mt.depsTail,mt.depsTail.nextDep=i,mt.depsTail=i):mt.deps=mt.depsTail=i,qo(i);else if(i.version===-1&&(i.version=this.version,i.nextDep)){const n=i.nextDep;n.prevDep=i.prevDep,i.prevDep&&(i.prevDep.nextDep=n),i.prevDep=mt.depsTail,i.nextDep=void 0,mt.depsTail.nextDep=i,mt.depsTail=i,mt.deps===i&&(mt.deps=n)}return process.env.NODE_ENV!=="production"&&mt.onTrack&&mt.onTrack(xt({effect:mt},t)),i}trigger(t){this.version++,on++,this.notify(t)}notify(t){ur();try{if(process.env.NODE_ENV!=="production")for(let i=this.subsHead;i;i=i.nextSub)i.sub.onTrigger&&!(i.sub.flags&8)&&i.sub.onTrigger(xt({effect:i.sub},t));for(let i=this.subs;i;i=i.prevSub)i.sub.notify()&&i.sub.dep.notify()}finally{fr()}}}function qo(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)qo(n)}const i=e.dep.subs;i!==e&&(e.prevSub=i,i&&(i.nextSub=e)),process.env.NODE_ENV!=="production"&&e.dep.subsHead===void 0&&(e.dep.subsHead=e),e.dep.subs=e}}const _r=new WeakMap,ui=Symbol(process.env.NODE_ENV!=="production"?"Object iterate":""),vr=Symbol(process.env.NODE_ENV!=="production"?"Map keys iterate":""),an=Symbol(process.env.NODE_ENV!=="production"?"Array iterate":"");function It(e,t,i){if(he&&mt){let n=_r.get(e);n||_r.set(e,n=new Map);let s=n.get(i);s||(n.set(i,s=new mr),s.map=n,s.key=i),process.env.NODE_ENV!=="production"?s.track({target:e,type:t,key:i}):s.track()}}function ye(e,t,i,n,s,r){const o=_r.get(e);if(!o){on++;return}const a=l=>{l&&(process.env.NODE_ENV!=="production"?l.trigger({target:e,type:t,key:i,newValue:n,oldValue:s,oldTarget:r}):l.trigger())};if(ur(),t==="clear")o.forEach(a);else{const l=Q(e),c=l&&ar(i);if(l&&i==="length"){const h=Number(n);o.forEach((d,u)=>{(u==="length"||u===an||!be(u)&&u>=h)&&a(d)})}else switch((i!==void 0||o.has(void 0))&&a(o.get(i)),c&&a(o.get(an)),t){case"add":l?c&&a(o.get("length")):(a(o.get(ui)),li(e)&&a(o.get(vr)));break;case"delete":l||(a(o.get(ui)),li(e)&&a(o.get(vr)));break;case"set":li(e)&&a(o.get(ui));break}}fr()}function Ii(e){const t=rt(e);return t===e?t:(It(t,"iterate",an),Bt(e)?t:t.map(pe))}function es(e){return It(e=rt(e),"iterate",an),e}function ze(e,t){return fe(e)?Ye(e)?Di(pe(t)):Di(t):pe(t)}const Gh={__proto__:null,[Symbol.iterator](){return br(this,Symbol.iterator,e=>ze(this,e))},concat(...e){return Ii(this).concat(...e.map(t=>Q(t)?Ii(t):t))},entries(){return br(this,"entries",e=>(e[1]=ze(this,e[1]),e))},every(e,t){return Re(this,"every",e,t,void 0,arguments)},filter(e,t){return Re(this,"filter",e,t,i=>i.map(n=>ze(this,n)),arguments)},find(e,t){return Re(this,"find",e,t,i=>ze(this,i),arguments)},findIndex(e,t){return Re(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Re(this,"findLast",e,t,i=>ze(this,i),arguments)},findLastIndex(e,t){return Re(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Re(this,"forEach",e,t,void 0,arguments)},includes(...e){return yr(this,"includes",e)},indexOf(...e){return yr(this,"indexOf",e)},join(e){return Ii(this).join(e)},lastIndexOf(...e){return yr(this,"lastIndexOf",e)},map(e,t){return Re(this,"map",e,t,void 0,arguments)},pop(){return ln(this,"pop")},push(...e){return ln(this,"push",e)},reduce(e,...t){return Ko(this,"reduce",e,t)},reduceRight(e,...t){return Ko(this,"reduceRight",e,t)},shift(){return ln(this,"shift")},some(e,t){return Re(this,"some",e,t,void 0,arguments)},splice(...e){return ln(this,"splice",e)},toReversed(){return Ii(this).toReversed()},toSorted(e){return Ii(this).toSorted(e)},toSpliced(...e){return Ii(this).toSpliced(...e)},unshift(...e){return ln(this,"unshift",e)},values(){return br(this,"values",e=>ze(this,e))}};function br(e,t,i){const n=es(e),s=n[t]();return n!==e&&!Bt(e)&&(s._next=s.next,s.next=()=>{const r=s._next();return r.done||(r.value=i(r.value)),r}),s}const Bh=Array.prototype;function Re(e,t,i,n,s,r){const o=es(e),a=o!==e&&!Bt(e),l=o[t];if(l!==Bh[t]){const d=l.apply(e,r);return a?pe(d):d}let c=i;o!==e&&(a?c=function(d,u){return i.call(this,ze(e,d),u,e)}:i.length>2&&(c=function(d,u){return i.call(this,d,u,e)}));const h=l.call(o,c,n);return a&&s?s(h):h}function Ko(e,t,i,n){const s=es(e);let r=i;return s!==e&&(Bt(e)?i.length>3&&(r=function(o,a,l){return i.call(this,o,a,l,e)}):r=function(o,a,l){return i.call(this,o,ze(e,a),l,e)}),s[t](r,...n)}function yr(e,t,i){const n=rt(e);It(n,"iterate",an);const s=n[t](...i);return(s===-1||s===!1)&&os(i[0])?(i[0]=rt(i[0]),n[t](...i)):s}function ln(e,t,i=[]){de(),ur();const n=rt(e)[t].apply(e,i);return fr(),ue(),n}const Hh=Kt("__proto__,__v_isRef,__isVue"),Jo=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(be));function $h(e){be(e)||(e=String(e));const t=rt(this);return It(t,"has",e),t.hasOwnProperty(e)}class Qo{constructor(t=!1,i=!1){this._isReadonly=t,this._isShallow=i}get(t,i,n){if(i==="__v_skip")return t.__v_skip;const s=this._isReadonly,r=this._isShallow;if(i==="__v_isReactive")return!s;if(i==="__v_isReadonly")return s;if(i==="__v_isShallow")return r;if(i==="__v_raw")return n===(s?r?ra:sa:r?na:ia).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const o=Q(t);if(!s){let l;if(o&&(l=Gh[i]))return l;if(i==="hasOwnProperty")return $h}const a=Reflect.get(t,i,Rt(t)?t:n);if((be(i)?Jo.has(i):Hh(i))||(s||It(t,"get",i),r))return a;if(Rt(a)){const l=o&&ar(i)?a:a.value;return s&&ut(l)?Sr(l):l}return ut(a)?s?Sr(a):cn(a):a}}class Zo extends Qo{constructor(t=!1){super(!1,t)}set(t,i,n,s){let r=t[i];const o=Q(t)&&ar(i);if(!this._isShallow){const c=fe(r);if(!Bt(n)&&!fe(n)&&(r=rt(r),n=rt(n)),!o&&Rt(r)&&!Rt(n))return c?(process.env.NODE_ENV!=="production"&&ce(`Set operation on key "${String(i)}" failed: target is readonly.`,t[i]),!0):(r.value=n,!0)}const a=o?Number(i)<t.length:at(t,i),l=Reflect.set(t,i,n,Rt(t)?t:s);return t===rt(s)&&(a?je(n,r)&&ye(t,"set",i,n,r):ye(t,"add",i,n)),l}deleteProperty(t,i){const n=at(t,i),s=t[i],r=Reflect.deleteProperty(t,i);return r&&n&&ye(t,"delete",i,void 0,s),r}has(t,i){const n=Reflect.has(t,i);return(!be(i)||!Jo.has(i))&&It(t,"has",i),n}ownKeys(t){return It(t,"iterate",Q(t)?"length":ui),Reflect.ownKeys(t)}}class ta extends Qo{constructor(t=!1){super(!0,t)}set(t,i){return process.env.NODE_ENV!=="production"&&ce(`Set operation on key "${String(i)}" failed: target is readonly.`,t),!0}deleteProperty(t,i){return process.env.NODE_ENV!=="production"&&ce(`Delete operation on key "${String(i)}" failed: target is readonly.`,t),!0}}const Wh=new Zo,Uh=new ta,jh=new Zo(!0),Xh=new ta(!0),Er=e=>e,is=e=>Reflect.getPrototypeOf(e);function zh(e,t,i){return function(...n){const s=this.__v_raw,r=rt(s),o=li(r),a=e==="entries"||e===Symbol.iterator&&o,l=e==="keys"&&o,c=s[e](...n),h=i?Er:t?Di:pe;return!t&&It(r,"iterate",l?vr:ui),{next(){const{value:d,done:u}=c.next();return u?{value:d,done:u}:{value:a?[h(d[0]),h(d[1])]:h(d),done:u}},[Symbol.iterator](){return this}}}}function ns(e){return function(...t){if(process.env.NODE_ENV!=="production"){const i=t[0]?`on key "${t[0]}" `:"";ce(`${ci(e)} operation ${i}failed: target is readonly.`,rt(this))}return e==="delete"?!1:e==="clear"?void 0:this}}function Yh(e,t){const i={get(s){const r=this.__v_raw,o=rt(r),a=rt(s);e||(je(s,a)&&It(o,"get",s),It(o,"get",a));const{has:l}=is(o),c=t?Er:e?Di:pe;if(l.call(o,s))return c(r.get(s));if(l.call(o,a))return c(r.get(a));r!==o&&r.get(s)},get size(){const s=this.__v_raw;return!e&&It(rt(s),"iterate",ui),s.size},has(s){const r=this.__v_raw,o=rt(r),a=rt(s);return e||(je(s,a)&&It(o,"has",s),It(o,"has",a)),s===a?r.has(s):r.has(s)||r.has(a)},forEach(s,r){const o=this,a=o.__v_raw,l=rt(a),c=t?Er:e?Di:pe;return!e&&It(l,"iterate",ui),a.forEach((h,d)=>s.call(r,c(h),c(d),o))}};return xt(i,e?{add:ns("add"),set:ns("set"),delete:ns("delete"),clear:ns("clear")}:{add(s){!t&&!Bt(s)&&!fe(s)&&(s=rt(s));const r=rt(this);return is(r).has.call(r,s)||(r.add(s),ye(r,"add",s,s)),this},set(s,r){!t&&!Bt(r)&&!fe(r)&&(r=rt(r));const o=rt(this),{has:a,get:l}=is(o);let c=a.call(o,s);c?process.env.NODE_ENV!=="production"&&ea(o,a,s):(s=rt(s),c=a.call(o,s));const h=l.call(o,s);return o.set(s,r),c?je(r,h)&&ye(o,"set",s,r,h):ye(o,"add",s,r),this},delete(s){const r=rt(this),{has:o,get:a}=is(r);let l=o.call(r,s);l?process.env.NODE_ENV!=="production"&&ea(r,o,s):(s=rt(s),l=o.call(r,s));const c=a?a.call(r,s):void 0,h=r.delete(s);return l&&ye(r,"delete",s,void 0,c),h},clear(){const s=rt(this),r=s.size!==0,o=process.env.NODE_ENV!=="production"?li(s)?new Map(s):new Set(s):void 0,a=s.clear();return r&&ye(s,"clear",void 0,void 0,o),a}}),["keys","values","entries",Symbol.iterator].forEach(s=>{i[s]=zh(s,e,t)}),i}function ss(e,t){const i=Yh(e,t);return(n,s,r)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?n:Reflect.get(at(i,s)&&s in n?i:n,s,r)}const qh={get:ss(!1,!1)},Kh={get:ss(!1,!0)},Jh={get:ss(!0,!1)},Qh={get:ss(!0,!0)};function ea(e,t,i){const n=rt(i);if(n!==i&&t.call(e,n)){const s=or(e);ce(`Reactive ${s} contains both the raw and reactive versions of the same object${s==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}const ia=new WeakMap,na=new WeakMap,sa=new WeakMap,ra=new WeakMap;function Zh(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function td(e){return e.__v_skip||!Object.isExtensible(e)?0:Zh(or(e))}function cn(e){return fe(e)?e:rs(e,!1,Wh,qh,ia)}function ed(e){return rs(e,!1,jh,Kh,na)}function Sr(e){return rs(e,!0,Uh,Jh,sa)}function Ee(e){return rs(e,!0,Xh,Qh,ra)}function rs(e,t,i,n,s){if(!ut(e))return process.env.NODE_ENV!=="production"&&ce(`value cannot be made ${t?"readonly":"reactive"}: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;const r=td(e);if(r===0)return e;const o=s.get(e);if(o)return o;const a=new Proxy(e,r===2?n:i);return s.set(e,a),a}function Ye(e){return fe(e)?Ye(e.__v_raw):!!(e&&e.__v_isReactive)}function fe(e){return!!(e&&e.__v_isReadonly)}function Bt(e){return!!(e&&e.__v_isShallow)}function os(e){return e?!!e.__v_raw:!1}function rt(e){const t=e&&e.__v_raw;return t?rt(t):e}function id(e){return!at(e,"__v_skip")&&Object.isExtensible(e)&&Zn(e,"__v_skip",!0),e}const pe=e=>ut(e)?cn(e):e,Di=e=>ut(e)?Sr(e):e;function Rt(e){return e?e.__v_isRef===!0:!1}function Xt(e){return nd(e,!1)}function nd(e,t){return Rt(e)?e:new sd(e,t)}class sd{constructor(t,i){this.dep=new mr,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=i?t:rt(t),this._value=i?t:pe(t),this.__v_isShallow=i}get value(){return process.env.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track(),this._value}set value(t){const i=this._rawValue,n=this.__v_isShallow||Bt(t)||fe(t);t=n?t:rt(t),je(t,i)&&(this._rawValue=t,this._value=n?t:pe(t),process.env.NODE_ENV!=="production"?this.dep.trigger({target:this,type:"set",key:"value",newValue:t,oldValue:i}):this.dep.trigger())}}function oa(e){return Rt(e)?e.value:e}const rd={get:(e,t,i)=>t==="__v_raw"?e:oa(Reflect.get(e,t,i)),set:(e,t,i,n)=>{const s=e[t];return Rt(s)&&!Rt(i)?(s.value=i,!0):Reflect.set(e,t,i,n)}};function aa(e){return Ye(e)?e:new Proxy(e,rd)}class od{constructor(t,i,n){this.fn=t,this.setter=i,this._value=void 0,this.dep=new mr(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=on-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!i,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&mt!==this)return Wo(this,!0),!0;process.env.NODE_ENV}get value(){const t=process.env.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track();return Xo(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter?this.setter(t):process.env.NODE_ENV!=="production"&&ce("Write operation failed: computed value is readonly")}}function ad(e,t,i=!1){let n,s;it(e)?n=e:(n=e.get,s=e.set);const r=new od(n,s,i);return process.env.NODE_ENV,r}const as={},ls=new WeakMap;let fi;function ld(e,t=!1,i=fi){if(i){let n=ls.get(i);n||ls.set(i,n=[]),n.push(e)}else process.env.NODE_ENV!=="production"&&!t&&ce("onWatcherCleanup() was called when there was no active watcher to associate with.")}function cd(e,t,i=ht){const{immediate:n,deep:s,once:r,scheduler:o,augmentJob:a,call:l}=i,c=T=>{(i.onWarn||ce)("Invalid watch source: ",T,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},h=T=>s?T:Bt(T)||s===!1||s===0?Me(T,1):Me(T);let d,u,f,p,_=!1,b=!1;if(Rt(e)?(u=()=>e.value,_=Bt(e)):Ye(e)?(u=()=>h(e),_=!0):Q(e)?(b=!0,_=e.some(T=>Ye(T)||Bt(T)),u=()=>e.map(T=>{if(Rt(T))return T.value;if(Ye(T))return h(T);if(it(T))return l?l(T,2):T();process.env.NODE_ENV!=="production"&&c(T)})):it(e)?t?u=l?()=>l(e,2):e:u=()=>{if(f){de();try{f()}finally{ue()}}const T=fi;fi=d;try{return l?l(e,3,[p]):e(p)}finally{fi=T}}:(u=Lt,process.env.NODE_ENV!=="production"&&c(e)),t&&s){const T=u,O=s===!0?1/0:s;u=()=>Me(T(),O)}const S=Dh(),y=()=>{d.stop(),S&&S.active&&sr(S.effects,d)};if(r&&t){const T=t;t=(...O)=>{T(...O),y()}}let C=b?new Array(e.length).fill(as):as;const N=T=>{if(!(!(d.flags&1)||!d.dirty&&!T))if(t){const O=d.run();if(s||_||(b?O.some((w,x)=>je(w,C[x])):je(O,C))){f&&f();const w=fi;fi=d;try{const x=[O,C===as?void 0:b&&C[0]===as?[]:C,p];C=O,l?l(t,3,x):t(...x)}finally{fi=w}}}else d.run()};return a&&a(N),d=new Ho(u),d.scheduler=o?()=>o(N,!1):N,p=T=>ld(T,!1,d),f=d.onStop=()=>{const T=ls.get(d);if(T){if(l)l(T,4);else for(const O of T)O();ls.delete(d)}},process.env.NODE_ENV!=="production"&&(d.onTrack=i.onTrack,d.onTrigger=i.onTrigger),t?n?N(!0):C=d.run():o?o(N.bind(null,!0),!0):d.run(),y.pause=d.pause.bind(d),y.resume=d.resume.bind(d),y.stop=y,y}function Me(e,t=1/0,i){if(t<=0||!ut(e)||e.__v_skip||(i=i||new Map,(i.get(e)||0)>=t))return e;if(i.set(e,t),t--,Rt(e))Me(e.value,t,i);else if(Q(e))for(let n=0;n<e.length;n++)Me(e[n],t,i);else if(Ri(e)||li(e))e.forEach(n=>{Me(n,t,i)});else if(Jn(e)){for(const n in e)Me(e[n],t,i);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&Me(e[n],t,i)}return e}const pi=[];function cs(e){pi.push(e)}function hs(){pi.pop()}let wr=!1;function U(e,...t){if(wr)return;wr=!0,de();const i=pi.length?pi[pi.length-1].component:null,n=i&&i.appContext.config.warnHandler,s=hd();if(n)Vi(n,i,11,[e+t.map(r=>{var o,a;return(a=(o=r.toString)==null?void 0:o.call(r))!=null?a:JSON.stringify(r)}).join(""),i&&i.proxy,s.map(({vnode:r})=>`at <${Cn(i,r.type)}>`).join(`
|
|
1
|
+
(function(Kt,ht){typeof exports=="object"&&typeof module<"u"?module.exports=ht():typeof define=="function"&&define.amd?define(ht):(Kt=typeof globalThis<"u"?globalThis:Kt||self,Kt["netex-deckplan-editor"]=ht())})(this,(function(){"use strict";function Kt(e){const t=Object.create(null);for(const i of e.split(","))t[i]=1;return i=>i in t}const ht=process.env.NODE_ENV!=="production"?Object.freeze({}):{},Ai=process.env.NODE_ENV!=="production"?Object.freeze([]):[],Lt=()=>{},Ro=()=>!1,Zi=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Kn=e=>e.startsWith("onUpdate:"),xt=Object.assign,sr=(e,t)=>{const i=e.indexOf(t);i>-1&&e.splice(i,1)},bh=Object.prototype.hasOwnProperty,at=(e,t)=>bh.call(e,t),Q=Array.isArray,li=e=>tn(e)==="[object Map]",Ri=e=>tn(e)==="[object Set]",Mo=e=>tn(e)==="[object Date]",it=e=>typeof e=="function",Ct=e=>typeof e=="string",be=e=>typeof e=="symbol",ut=e=>e!==null&&typeof e=="object",rr=e=>(ut(e)||it(e))&&it(e.then)&&it(e.catch),Lo=Object.prototype.toString,tn=e=>Lo.call(e),or=e=>tn(e).slice(8,-1),Jn=e=>tn(e)==="[object Object]",ar=e=>Ct(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,en=Kt(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),yh=Kt("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),Qn=e=>{const t=Object.create(null);return(i=>t[i]||(t[i]=e(i)))},Eh=/-\w/g,Vt=Qn(e=>e.replace(Eh,t=>t.slice(1).toUpperCase())),Sh=/\B([A-Z])/g,Jt=Qn(e=>e.replace(Sh,"-$1").toLowerCase()),ci=Qn(e=>e.charAt(0).toUpperCase()+e.slice(1)),hi=Qn(e=>e?`on${ci(e)}`:""),je=(e,t)=>!Object.is(e,t),Mi=(e,...t)=>{for(let i=0;i<e.length;i++)e[i](...t)},Zn=(e,t,i,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:i})},ts=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Io=e=>{const t=Ct(e)?Number(e):NaN;return isNaN(t)?e:t};let Do;const nn=()=>Do||(Do=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function lr(e){if(Q(e)){const t={};for(let i=0;i<e.length;i++){const n=e[i],s=Ct(n)?Nh(n):lr(n);if(s)for(const r in s)t[r]=s[r]}return t}else if(Ct(e)||ut(e))return e}const wh=/;(?![^(]*\))/g,xh=/:([^]+)/,Ch=/\/\*[^]*?\*\//g;function Nh(e){const t={};return e.replace(Ch,"").split(wh).forEach(i=>{if(i){const n=i.split(xh);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function Li(e){let t="";if(Ct(e))t=e;else if(Q(e))for(let i=0;i<e.length;i++){const n=Li(e[i]);n&&(t+=n+" ")}else if(ut(e))for(const i in e)e[i]&&(t+=i+" ");return t.trim()}const Th="html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot",kh="svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view",Oh="annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics",Ph=Kt(Th),Ah=Kt(kh),Rh=Kt(Oh),Mh=Kt("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function Vo(e){return!!e||e===""}function Lh(e,t){if(e.length!==t.length)return!1;let i=!0;for(let n=0;i&&n<e.length;n++)i=di(e[n],t[n]);return i}function di(e,t){if(e===t)return!0;let i=Mo(e),n=Mo(t);if(i||n)return i&&n?e.getTime()===t.getTime():!1;if(i=be(e),n=be(t),i||n)return e===t;if(i=Q(e),n=Q(t),i||n)return i&&n?Lh(e,t):!1;if(i=ut(e),n=ut(t),i||n){if(!i||!n)return!1;const s=Object.keys(e).length,r=Object.keys(t).length;if(s!==r)return!1;for(const o in e){const a=e.hasOwnProperty(o),l=t.hasOwnProperty(o);if(a&&!l||!a&&l||!di(e[o],t[o]))return!1}}return String(e)===String(t)}function cr(e,t){return e.findIndex(i=>di(i,t))}const Fo=e=>!!(e&&e.__v_isRef===!0),Xe=e=>Ct(e)?e:e==null?"":Q(e)||ut(e)&&(e.toString===Lo||!it(e.toString))?Fo(e)?Xe(e.value):JSON.stringify(e,Go,2):String(e),Go=(e,t)=>Fo(t)?Go(e,t.value):li(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((i,[n,s],r)=>(i[hr(n,r)+" =>"]=s,i),{})}:Ri(t)?{[`Set(${t.size})`]:[...t.values()].map(i=>hr(i))}:be(t)?hr(t):ut(t)&&!Q(t)&&!Jn(t)?String(t):t,hr=(e,t="")=>{var i;return be(e)?`Symbol(${(i=e.description)!=null?i:t})`:e};function ce(e,...t){console.warn(`[Vue warn] ${e}`,...t)}let jt;class Ih{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=jt,!t&&jt&&(this.index=(jt.scopes||(jt.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,i;if(this.scopes)for(t=0,i=this.scopes.length;t<i;t++)this.scopes[t].pause();for(t=0,i=this.effects.length;t<i;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,i;if(this.scopes)for(t=0,i=this.scopes.length;t<i;t++)this.scopes[t].resume();for(t=0,i=this.effects.length;t<i;t++)this.effects[t].resume()}}run(t){if(this._active){const i=jt;try{return jt=this,t()}finally{jt=i}}else process.env.NODE_ENV!=="production"&&ce("cannot run an inactive effect scope.")}on(){++this._on===1&&(this.prevScope=jt,jt=this)}off(){this._on>0&&--this._on===0&&(jt=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let i,n;for(i=0,n=this.effects.length;i<n;i++)this.effects[i].stop();for(this.effects.length=0,i=0,n=this.cleanups.length;i<n;i++)this.cleanups[i]();if(this.cleanups.length=0,this.scopes){for(i=0,n=this.scopes.length;i<n;i++)this.scopes[i].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const s=this.parent.scopes.pop();s&&s!==this&&(this.parent.scopes[this.index]=s,s.index=this.index)}this.parent=void 0}}}function Dh(){return jt}let mt;const dr=new WeakSet;class Bo{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,jt&&jt.active&&jt.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,dr.has(this)&&(dr.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||$o(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,zo(this),Wo(this);const t=mt,i=he;mt=this,he=!0;try{return this.fn()}finally{process.env.NODE_ENV!=="production"&&mt!==this&&ce("Active effect was not restored correctly - this is likely a Vue internal bug."),Uo(this),mt=t,he=i,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)gr(t);this.deps=this.depsTail=void 0,zo(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?dr.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){pr(this)&&this.run()}get dirty(){return pr(this)}}let Ho=0,sn,rn;function $o(e,t=!1){if(e.flags|=8,t){e.next=rn,rn=e;return}e.next=sn,sn=e}function ur(){Ho++}function fr(){if(--Ho>0)return;if(rn){let t=rn;for(rn=void 0;t;){const i=t.next;t.next=void 0,t.flags&=-9,t=i}}let e;for(;sn;){let t=sn;for(sn=void 0;t;){const i=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){e||(e=n)}t=i}}if(e)throw e}function Wo(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Uo(e){let t,i=e.depsTail,n=i;for(;n;){const s=n.prevDep;n.version===-1?(n===i&&(i=s),gr(n),Vh(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=s}e.deps=t,e.depsTail=i}function pr(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(jo(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function jo(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===on)||(e.globalVersion=on,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!pr(e))))return;e.flags|=2;const t=e.dep,i=mt,n=he;mt=e,he=!0;try{Wo(e);const s=e.fn(e._value);(t.version===0||je(s,e._value))&&(e.flags|=128,e._value=s,t.version++)}catch(s){throw t.version++,s}finally{mt=i,he=n,Uo(e),e.flags&=-3}}function gr(e,t=!1){const{dep:i,prevSub:n,nextSub:s}=e;if(n&&(n.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=n,e.nextSub=void 0),process.env.NODE_ENV!=="production"&&i.subsHead===e&&(i.subsHead=s),i.subs===e&&(i.subs=n,!n&&i.computed)){i.computed.flags&=-5;for(let r=i.computed.deps;r;r=r.nextDep)gr(r,!0)}!t&&!--i.sc&&i.map&&i.map.delete(i.key)}function Vh(e){const{prevDep:t,nextDep:i}=e;t&&(t.nextDep=i,e.prevDep=void 0),i&&(i.prevDep=t,e.nextDep=void 0)}let he=!0;const Xo=[];function de(){Xo.push(he),he=!1}function ue(){const e=Xo.pop();he=e===void 0?!0:e}function zo(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const i=mt;mt=void 0;try{t()}finally{mt=i}}}let on=0;class Fh{constructor(t,i){this.sub=t,this.dep=i,this.version=i.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class mr{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0,process.env.NODE_ENV!=="production"&&(this.subsHead=void 0)}track(t){if(!mt||!he||mt===this.computed)return;let i=this.activeLink;if(i===void 0||i.sub!==mt)i=this.activeLink=new Fh(mt,this),mt.deps?(i.prevDep=mt.depsTail,mt.depsTail.nextDep=i,mt.depsTail=i):mt.deps=mt.depsTail=i,Yo(i);else if(i.version===-1&&(i.version=this.version,i.nextDep)){const n=i.nextDep;n.prevDep=i.prevDep,i.prevDep&&(i.prevDep.nextDep=n),i.prevDep=mt.depsTail,i.nextDep=void 0,mt.depsTail.nextDep=i,mt.depsTail=i,mt.deps===i&&(mt.deps=n)}return process.env.NODE_ENV!=="production"&&mt.onTrack&&mt.onTrack(xt({effect:mt},t)),i}trigger(t){this.version++,on++,this.notify(t)}notify(t){ur();try{if(process.env.NODE_ENV!=="production")for(let i=this.subsHead;i;i=i.nextSub)i.sub.onTrigger&&!(i.sub.flags&8)&&i.sub.onTrigger(xt({effect:i.sub},t));for(let i=this.subs;i;i=i.prevSub)i.sub.notify()&&i.sub.dep.notify()}finally{fr()}}}function Yo(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)Yo(n)}const i=e.dep.subs;i!==e&&(e.prevSub=i,i&&(i.nextSub=e)),process.env.NODE_ENV!=="production"&&e.dep.subsHead===void 0&&(e.dep.subsHead=e),e.dep.subs=e}}const _r=new WeakMap,ui=Symbol(process.env.NODE_ENV!=="production"?"Object iterate":""),vr=Symbol(process.env.NODE_ENV!=="production"?"Map keys iterate":""),an=Symbol(process.env.NODE_ENV!=="production"?"Array iterate":"");function It(e,t,i){if(he&&mt){let n=_r.get(e);n||_r.set(e,n=new Map);let s=n.get(i);s||(n.set(i,s=new mr),s.map=n,s.key=i),process.env.NODE_ENV!=="production"?s.track({target:e,type:t,key:i}):s.track()}}function ye(e,t,i,n,s,r){const o=_r.get(e);if(!o){on++;return}const a=l=>{l&&(process.env.NODE_ENV!=="production"?l.trigger({target:e,type:t,key:i,newValue:n,oldValue:s,oldTarget:r}):l.trigger())};if(ur(),t==="clear")o.forEach(a);else{const l=Q(e),c=l&&ar(i);if(l&&i==="length"){const h=Number(n);o.forEach((d,u)=>{(u==="length"||u===an||!be(u)&&u>=h)&&a(d)})}else switch((i!==void 0||o.has(void 0))&&a(o.get(i)),c&&a(o.get(an)),t){case"add":l?c&&a(o.get("length")):(a(o.get(ui)),li(e)&&a(o.get(vr)));break;case"delete":l||(a(o.get(ui)),li(e)&&a(o.get(vr)));break;case"set":li(e)&&a(o.get(ui));break}}fr()}function Ii(e){const t=rt(e);return t===e?t:(It(t,"iterate",an),Bt(e)?t:t.map(pe))}function es(e){return It(e=rt(e),"iterate",an),e}function ze(e,t){return fe(e)?Ye(e)?Di(pe(t)):Di(t):pe(t)}const Gh={__proto__:null,[Symbol.iterator](){return br(this,Symbol.iterator,e=>ze(this,e))},concat(...e){return Ii(this).concat(...e.map(t=>Q(t)?Ii(t):t))},entries(){return br(this,"entries",e=>(e[1]=ze(this,e[1]),e))},every(e,t){return Re(this,"every",e,t,void 0,arguments)},filter(e,t){return Re(this,"filter",e,t,i=>i.map(n=>ze(this,n)),arguments)},find(e,t){return Re(this,"find",e,t,i=>ze(this,i),arguments)},findIndex(e,t){return Re(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Re(this,"findLast",e,t,i=>ze(this,i),arguments)},findLastIndex(e,t){return Re(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Re(this,"forEach",e,t,void 0,arguments)},includes(...e){return yr(this,"includes",e)},indexOf(...e){return yr(this,"indexOf",e)},join(e){return Ii(this).join(e)},lastIndexOf(...e){return yr(this,"lastIndexOf",e)},map(e,t){return Re(this,"map",e,t,void 0,arguments)},pop(){return ln(this,"pop")},push(...e){return ln(this,"push",e)},reduce(e,...t){return qo(this,"reduce",e,t)},reduceRight(e,...t){return qo(this,"reduceRight",e,t)},shift(){return ln(this,"shift")},some(e,t){return Re(this,"some",e,t,void 0,arguments)},splice(...e){return ln(this,"splice",e)},toReversed(){return Ii(this).toReversed()},toSorted(e){return Ii(this).toSorted(e)},toSpliced(...e){return Ii(this).toSpliced(...e)},unshift(...e){return ln(this,"unshift",e)},values(){return br(this,"values",e=>ze(this,e))}};function br(e,t,i){const n=es(e),s=n[t]();return n!==e&&!Bt(e)&&(s._next=s.next,s.next=()=>{const r=s._next();return r.done||(r.value=i(r.value)),r}),s}const Bh=Array.prototype;function Re(e,t,i,n,s,r){const o=es(e),a=o!==e&&!Bt(e),l=o[t];if(l!==Bh[t]){const d=l.apply(e,r);return a?pe(d):d}let c=i;o!==e&&(a?c=function(d,u){return i.call(this,ze(e,d),u,e)}:i.length>2&&(c=function(d,u){return i.call(this,d,u,e)}));const h=l.call(o,c,n);return a&&s?s(h):h}function qo(e,t,i,n){const s=es(e);let r=i;return s!==e&&(Bt(e)?i.length>3&&(r=function(o,a,l){return i.call(this,o,a,l,e)}):r=function(o,a,l){return i.call(this,o,ze(e,a),l,e)}),s[t](r,...n)}function yr(e,t,i){const n=rt(e);It(n,"iterate",an);const s=n[t](...i);return(s===-1||s===!1)&&os(i[0])?(i[0]=rt(i[0]),n[t](...i)):s}function ln(e,t,i=[]){de(),ur();const n=rt(e)[t].apply(e,i);return fr(),ue(),n}const Hh=Kt("__proto__,__v_isRef,__isVue"),Ko=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(be));function $h(e){be(e)||(e=String(e));const t=rt(this);return It(t,"has",e),t.hasOwnProperty(e)}class Jo{constructor(t=!1,i=!1){this._isReadonly=t,this._isShallow=i}get(t,i,n){if(i==="__v_skip")return t.__v_skip;const s=this._isReadonly,r=this._isShallow;if(i==="__v_isReactive")return!s;if(i==="__v_isReadonly")return s;if(i==="__v_isShallow")return r;if(i==="__v_raw")return n===(s?r?sa:na:r?ia:ea).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const o=Q(t);if(!s){let l;if(o&&(l=Gh[i]))return l;if(i==="hasOwnProperty")return $h}const a=Reflect.get(t,i,Rt(t)?t:n);if((be(i)?Ko.has(i):Hh(i))||(s||It(t,"get",i),r))return a;if(Rt(a)){const l=o&&ar(i)?a:a.value;return s&&ut(l)?Sr(l):l}return ut(a)?s?Sr(a):cn(a):a}}class Qo extends Jo{constructor(t=!1){super(!1,t)}set(t,i,n,s){let r=t[i];const o=Q(t)&&ar(i);if(!this._isShallow){const c=fe(r);if(!Bt(n)&&!fe(n)&&(r=rt(r),n=rt(n)),!o&&Rt(r)&&!Rt(n))return c?(process.env.NODE_ENV!=="production"&&ce(`Set operation on key "${String(i)}" failed: target is readonly.`,t[i]),!0):(r.value=n,!0)}const a=o?Number(i)<t.length:at(t,i),l=Reflect.set(t,i,n,Rt(t)?t:s);return t===rt(s)&&(a?je(n,r)&&ye(t,"set",i,n,r):ye(t,"add",i,n)),l}deleteProperty(t,i){const n=at(t,i),s=t[i],r=Reflect.deleteProperty(t,i);return r&&n&&ye(t,"delete",i,void 0,s),r}has(t,i){const n=Reflect.has(t,i);return(!be(i)||!Ko.has(i))&&It(t,"has",i),n}ownKeys(t){return It(t,"iterate",Q(t)?"length":ui),Reflect.ownKeys(t)}}class Zo extends Jo{constructor(t=!1){super(!0,t)}set(t,i){return process.env.NODE_ENV!=="production"&&ce(`Set operation on key "${String(i)}" failed: target is readonly.`,t),!0}deleteProperty(t,i){return process.env.NODE_ENV!=="production"&&ce(`Delete operation on key "${String(i)}" failed: target is readonly.`,t),!0}}const Wh=new Qo,Uh=new Zo,jh=new Qo(!0),Xh=new Zo(!0),Er=e=>e,is=e=>Reflect.getPrototypeOf(e);function zh(e,t,i){return function(...n){const s=this.__v_raw,r=rt(s),o=li(r),a=e==="entries"||e===Symbol.iterator&&o,l=e==="keys"&&o,c=s[e](...n),h=i?Er:t?Di:pe;return!t&&It(r,"iterate",l?vr:ui),{next(){const{value:d,done:u}=c.next();return u?{value:d,done:u}:{value:a?[h(d[0]),h(d[1])]:h(d),done:u}},[Symbol.iterator](){return this}}}}function ns(e){return function(...t){if(process.env.NODE_ENV!=="production"){const i=t[0]?`on key "${t[0]}" `:"";ce(`${ci(e)} operation ${i}failed: target is readonly.`,rt(this))}return e==="delete"?!1:e==="clear"?void 0:this}}function Yh(e,t){const i={get(s){const r=this.__v_raw,o=rt(r),a=rt(s);e||(je(s,a)&&It(o,"get",s),It(o,"get",a));const{has:l}=is(o),c=t?Er:e?Di:pe;if(l.call(o,s))return c(r.get(s));if(l.call(o,a))return c(r.get(a));r!==o&&r.get(s)},get size(){const s=this.__v_raw;return!e&&It(rt(s),"iterate",ui),s.size},has(s){const r=this.__v_raw,o=rt(r),a=rt(s);return e||(je(s,a)&&It(o,"has",s),It(o,"has",a)),s===a?r.has(s):r.has(s)||r.has(a)},forEach(s,r){const o=this,a=o.__v_raw,l=rt(a),c=t?Er:e?Di:pe;return!e&&It(l,"iterate",ui),a.forEach((h,d)=>s.call(r,c(h),c(d),o))}};return xt(i,e?{add:ns("add"),set:ns("set"),delete:ns("delete"),clear:ns("clear")}:{add(s){!t&&!Bt(s)&&!fe(s)&&(s=rt(s));const r=rt(this);return is(r).has.call(r,s)||(r.add(s),ye(r,"add",s,s)),this},set(s,r){!t&&!Bt(r)&&!fe(r)&&(r=rt(r));const o=rt(this),{has:a,get:l}=is(o);let c=a.call(o,s);c?process.env.NODE_ENV!=="production"&&ta(o,a,s):(s=rt(s),c=a.call(o,s));const h=l.call(o,s);return o.set(s,r),c?je(r,h)&&ye(o,"set",s,r,h):ye(o,"add",s,r),this},delete(s){const r=rt(this),{has:o,get:a}=is(r);let l=o.call(r,s);l?process.env.NODE_ENV!=="production"&&ta(r,o,s):(s=rt(s),l=o.call(r,s));const c=a?a.call(r,s):void 0,h=r.delete(s);return l&&ye(r,"delete",s,void 0,c),h},clear(){const s=rt(this),r=s.size!==0,o=process.env.NODE_ENV!=="production"?li(s)?new Map(s):new Set(s):void 0,a=s.clear();return r&&ye(s,"clear",void 0,void 0,o),a}}),["keys","values","entries",Symbol.iterator].forEach(s=>{i[s]=zh(s,e,t)}),i}function ss(e,t){const i=Yh(e,t);return(n,s,r)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?n:Reflect.get(at(i,s)&&s in n?i:n,s,r)}const qh={get:ss(!1,!1)},Kh={get:ss(!1,!0)},Jh={get:ss(!0,!1)},Qh={get:ss(!0,!0)};function ta(e,t,i){const n=rt(i);if(n!==i&&t.call(e,n)){const s=or(e);ce(`Reactive ${s} contains both the raw and reactive versions of the same object${s==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}const ea=new WeakMap,ia=new WeakMap,na=new WeakMap,sa=new WeakMap;function Zh(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function td(e){return e.__v_skip||!Object.isExtensible(e)?0:Zh(or(e))}function cn(e){return fe(e)?e:rs(e,!1,Wh,qh,ea)}function ed(e){return rs(e,!1,jh,Kh,ia)}function Sr(e){return rs(e,!0,Uh,Jh,na)}function Ee(e){return rs(e,!0,Xh,Qh,sa)}function rs(e,t,i,n,s){if(!ut(e))return process.env.NODE_ENV!=="production"&&ce(`value cannot be made ${t?"readonly":"reactive"}: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;const r=td(e);if(r===0)return e;const o=s.get(e);if(o)return o;const a=new Proxy(e,r===2?n:i);return s.set(e,a),a}function Ye(e){return fe(e)?Ye(e.__v_raw):!!(e&&e.__v_isReactive)}function fe(e){return!!(e&&e.__v_isReadonly)}function Bt(e){return!!(e&&e.__v_isShallow)}function os(e){return e?!!e.__v_raw:!1}function rt(e){const t=e&&e.__v_raw;return t?rt(t):e}function id(e){return!at(e,"__v_skip")&&Object.isExtensible(e)&&Zn(e,"__v_skip",!0),e}const pe=e=>ut(e)?cn(e):e,Di=e=>ut(e)?Sr(e):e;function Rt(e){return e?e.__v_isRef===!0:!1}function Xt(e){return nd(e,!1)}function nd(e,t){return Rt(e)?e:new sd(e,t)}class sd{constructor(t,i){this.dep=new mr,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=i?t:rt(t),this._value=i?t:pe(t),this.__v_isShallow=i}get value(){return process.env.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track(),this._value}set value(t){const i=this._rawValue,n=this.__v_isShallow||Bt(t)||fe(t);t=n?t:rt(t),je(t,i)&&(this._rawValue=t,this._value=n?t:pe(t),process.env.NODE_ENV!=="production"?this.dep.trigger({target:this,type:"set",key:"value",newValue:t,oldValue:i}):this.dep.trigger())}}function ra(e){return Rt(e)?e.value:e}const rd={get:(e,t,i)=>t==="__v_raw"?e:ra(Reflect.get(e,t,i)),set:(e,t,i,n)=>{const s=e[t];return Rt(s)&&!Rt(i)?(s.value=i,!0):Reflect.set(e,t,i,n)}};function oa(e){return Ye(e)?e:new Proxy(e,rd)}class od{constructor(t,i,n){this.fn=t,this.setter=i,this._value=void 0,this.dep=new mr(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=on-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!i,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&mt!==this)return $o(this,!0),!0;process.env.NODE_ENV}get value(){const t=process.env.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track();return jo(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter?this.setter(t):process.env.NODE_ENV!=="production"&&ce("Write operation failed: computed value is readonly")}}function ad(e,t,i=!1){let n,s;it(e)?n=e:(n=e.get,s=e.set);const r=new od(n,s,i);return process.env.NODE_ENV,r}const as={},ls=new WeakMap;let fi;function ld(e,t=!1,i=fi){if(i){let n=ls.get(i);n||ls.set(i,n=[]),n.push(e)}else process.env.NODE_ENV!=="production"&&!t&&ce("onWatcherCleanup() was called when there was no active watcher to associate with.")}function cd(e,t,i=ht){const{immediate:n,deep:s,once:r,scheduler:o,augmentJob:a,call:l}=i,c=T=>{(i.onWarn||ce)("Invalid watch source: ",T,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},h=T=>s?T:Bt(T)||s===!1||s===0?Me(T,1):Me(T);let d,u,f,p,_=!1,b=!1;if(Rt(e)?(u=()=>e.value,_=Bt(e)):Ye(e)?(u=()=>h(e),_=!0):Q(e)?(b=!0,_=e.some(T=>Ye(T)||Bt(T)),u=()=>e.map(T=>{if(Rt(T))return T.value;if(Ye(T))return h(T);if(it(T))return l?l(T,2):T();process.env.NODE_ENV!=="production"&&c(T)})):it(e)?t?u=l?()=>l(e,2):e:u=()=>{if(f){de();try{f()}finally{ue()}}const T=fi;fi=d;try{return l?l(e,3,[p]):e(p)}finally{fi=T}}:(u=Lt,process.env.NODE_ENV!=="production"&&c(e)),t&&s){const T=u,O=s===!0?1/0:s;u=()=>Me(T(),O)}const S=Dh(),y=()=>{d.stop(),S&&S.active&&sr(S.effects,d)};if(r&&t){const T=t;t=(...O)=>{T(...O),y()}}let C=b?new Array(e.length).fill(as):as;const N=T=>{if(!(!(d.flags&1)||!d.dirty&&!T))if(t){const O=d.run();if(s||_||(b?O.some((w,x)=>je(w,C[x])):je(O,C))){f&&f();const w=fi;fi=d;try{const x=[O,C===as?void 0:b&&C[0]===as?[]:C,p];C=O,l?l(t,3,x):t(...x)}finally{fi=w}}}else d.run()};return a&&a(N),d=new Bo(u),d.scheduler=o?()=>o(N,!1):N,p=T=>ld(T,!1,d),f=d.onStop=()=>{const T=ls.get(d);if(T){if(l)l(T,4);else for(const O of T)O();ls.delete(d)}},process.env.NODE_ENV!=="production"&&(d.onTrack=i.onTrack,d.onTrigger=i.onTrigger),t?n?N(!0):C=d.run():o?o(N.bind(null,!0),!0):d.run(),y.pause=d.pause.bind(d),y.resume=d.resume.bind(d),y.stop=y,y}function Me(e,t=1/0,i){if(t<=0||!ut(e)||e.__v_skip||(i=i||new Map,(i.get(e)||0)>=t))return e;if(i.set(e,t),t--,Rt(e))Me(e.value,t,i);else if(Q(e))for(let n=0;n<e.length;n++)Me(e[n],t,i);else if(Ri(e)||li(e))e.forEach(n=>{Me(n,t,i)});else if(Jn(e)){for(const n in e)Me(e[n],t,i);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&Me(e[n],t,i)}return e}const pi=[];function cs(e){pi.push(e)}function hs(){pi.pop()}let wr=!1;function U(e,...t){if(wr)return;wr=!0,de();const i=pi.length?pi[pi.length-1].component:null,n=i&&i.appContext.config.warnHandler,s=hd();if(n)Vi(n,i,11,[e+t.map(r=>{var o,a;return(a=(o=r.toString)==null?void 0:o.call(r))!=null?a:JSON.stringify(r)}).join(""),i&&i.proxy,s.map(({vnode:r})=>`at <${Cn(i,r.type)}>`).join(`
|
|
2
2
|
`),s]);else{const r=[`[Vue warn]: ${e}`,...t];s.length&&r.push(`
|
|
3
3
|
`,...dd(s)),console.warn(...r)}ue(),wr=!1}function hd(){let e=pi[pi.length-1];if(!e)return[];const t=[];for(;e;){const i=t[0];i&&i.vnode===e?i.recurseCount++:t.push({vnode:e,recurseCount:0});const n=e.component&&e.component.parent;e=n&&n.vnode}return t}function dd(e){const t=[];return e.forEach((i,n)=>{t.push(...n===0?[]:[`
|
|
4
|
-
`],...ud(i))}),t}function ud({vnode:e,recurseCount:t}){const i=t>0?`... (${t} recursive calls)`:"",n=e.component?e.component.parent==null:!1,s=` at <${Cn(e.component,e.type,n)}`,r=">"+i;return e.props?[s,...fd(e.props),r]:[s+r]}function fd(e){const t=[],i=Object.keys(e);return i.slice(0,3).forEach(n=>{t.push(...la(n,e[n]))}),i.length>3&&t.push(" ..."),t}function la(e,t,i){return Ct(t)?(t=JSON.stringify(t),i?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?i?t:[`${e}=${t}`]:Rt(t)?(t=la(e,rt(t.value),!0),i?t:[`${e}=Ref<`,t,">"]):it(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=rt(t),i?t:[`${e}=`,t])}const xr={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function Vi(e,t,i,n){try{return n?e(...n):e()}catch(s){hn(s,t,i)}}function Se(e,t,i,n){if(it(e)){const s=Vi(e,t,i,n);return s&&rr(s)&&s.catch(r=>{hn(r,t,i)}),s}if(Q(e)){const s=[];for(let r=0;r<e.length;r++)s.push(Se(e[r],t,i,n));return s}else process.env.NODE_ENV!=="production"&&U(`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof e}`)}function hn(e,t,i,n=!0){const s=t?t.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||ht;if(t){let a=t.parent;const l=t.proxy,c=process.env.NODE_ENV!=="production"?xr[i]:`https://vuejs.org/error-reference/#runtime-${i}`;for(;a;){const h=a.ec;if(h){for(let d=0;d<h.length;d++)if(h[d](e,l,c)===!1)return}a=a.parent}if(r){de(),Vi(r,null,10,[e,l,c]),ue();return}}pd(e,i,s,n,o)}function pd(e,t,i,n=!0,s=!1){if(process.env.NODE_ENV!=="production"){const r=xr[t];if(i&&cs(i),U(`Unhandled error${r?` during execution of ${r}`:""}`),i&&hs(),n)throw e;console.error(e)}else{if(s)throw e;console.error(e)}}const Ht=[];let we=-1;const Fi=[];let qe=null,Gi=0;const ca=Promise.resolve();let ds=null;const gd=100;function us(e){const t=ds||ca;return e?t.then(this?e.bind(this):e):t}function md(e){let t=we+1,i=Ht.length;for(;t<i;){const n=t+i>>>1,s=Ht[n],r=dn(s);r<e||r===e&&s.flags&2?t=n+1:i=n}return t}function fs(e){if(!(e.flags&1)){const t=dn(e),i=Ht[Ht.length-1];!i||!(e.flags&2)&&t>=dn(i)?Ht.push(e):Ht.splice(md(t),0,e),e.flags|=1,ha()}}function ha(){ds||(ds=ca.then(pa))}function da(e){Q(e)?Fi.push(...e):qe&&e.id===-1?qe.splice(Gi+1,0,e):e.flags&1||(Fi.push(e),e.flags|=1),ha()}function ua(e,t,i=we+1){for(process.env.NODE_ENV!=="production"&&(t=t||new Map);i<Ht.length;i++){const n=Ht[i];if(n&&n.flags&2){if(e&&n.id!==e.uid||process.env.NODE_ENV!=="production"&&Cr(t,n))continue;Ht.splice(i,1),i--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function fa(e){if(Fi.length){const t=[...new Set(Fi)].sort((i,n)=>dn(i)-dn(n));if(Fi.length=0,qe){qe.push(...t);return}for(qe=t,process.env.NODE_ENV!=="production"&&(e=e||new Map),Gi=0;Gi<qe.length;Gi++){const i=qe[Gi];process.env.NODE_ENV!=="production"&&Cr(e,i)||(i.flags&4&&(i.flags&=-2),i.flags&8||i(),i.flags&=-2)}qe=null,Gi=0}}const dn=e=>e.id==null?e.flags&2?-1:1/0:e.id;function pa(e){process.env.NODE_ENV!=="production"&&(e=e||new Map);const t=process.env.NODE_ENV!=="production"?i=>Cr(e,i):Lt;try{for(we=0;we<Ht.length;we++){const i=Ht[we];if(i&&!(i.flags&8)){if(process.env.NODE_ENV!=="production"&&t(i))continue;i.flags&4&&(i.flags&=-2),Vi(i,i.i,i.i?15:14),i.flags&4||(i.flags&=-2)}}}finally{for(;we<Ht.length;we++){const i=Ht[we];i&&(i.flags&=-2)}we=-1,Ht.length=0,fa(e),ds=null,(Ht.length||Fi.length)&&pa(e)}}function Cr(e,t){const i=e.get(t)||0;if(i>gd){const n=t.i,s=n&&Kr(n.type);return hn(`Maximum recursive updates exceeded${s?` in component <${s}>`:""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,null,10),!0}return e.set(t,i+1),!1}let xe=!1;const ps=new Map;process.env.NODE_ENV!=="production"&&(nn().__VUE_HMR_RUNTIME__={createRecord:Nr(ga),rerender:Nr(bd),reload:Nr(yd)});const gi=new Map;function _d(e){const t=e.type.__hmrId;let i=gi.get(t);i||(ga(t,e.type),i=gi.get(t)),i.instances.add(e)}function vd(e){gi.get(e.type.__hmrId).instances.delete(e)}function ga(e,t){return gi.has(e)?!1:(gi.set(e,{initialDef:gs(t),instances:new Set}),!0)}function gs(e){return dl(e)?e.__vccOpts:e}function bd(e,t){const i=gi.get(e);i&&(i.initialDef.render=t,[...i.instances].forEach(n=>{t&&(n.render=t,gs(n.type).render=t),n.renderCache=[],xe=!0,n.job.flags&8||n.update(),xe=!1}))}function yd(e,t){const i=gi.get(e);if(!i)return;t=gs(t),ma(i.initialDef,t);const n=[...i.instances];for(let s=0;s<n.length;s++){const r=n[s],o=gs(r.type);let a=ps.get(o);a||(o!==i.initialDef&&ma(o,t),ps.set(o,a=new Set)),a.add(r),r.appContext.propsCache.delete(r.type),r.appContext.emitsCache.delete(r.type),r.appContext.optionsCache.delete(r.type),r.ceReload?(a.add(r),r.ceReload(t.styles),a.delete(r)):r.parent?fs(()=>{r.job.flags&8||(xe=!0,r.parent.update(),xe=!1,a.delete(r))}):r.appContext.reload?r.appContext.reload():typeof window<"u"?window.location.reload():console.warn("[HMR] Root or manually mounted instance modified. Full reload required."),r.root.ce&&r!==r.root&&r.root.ce._removeChildStyle(o)}da(()=>{ps.clear()})}function ma(e,t){xt(e,t);for(const i in e)i!=="__file"&&!(i in t)&&delete e[i]}function Nr(e){return(t,i)=>{try{return e(t,i)}catch(n){console.error(n),console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")}}}let ge,un=[],Tr=!1;function fn(e,...t){ge?ge.emit(e,...t):Tr||un.push({event:e,args:t})}function kr(e,t){var i,n;ge=e,ge?(ge.enabled=!0,un.forEach(({event:s,args:r})=>ge.emit(s,...r)),un=[]):typeof window<"u"&&window.HTMLElement&&!((n=(i=window.navigator)==null?void 0:i.userAgent)!=null&&n.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(r=>{kr(r,t)}),setTimeout(()=>{ge||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Tr=!0,un=[])},3e3)):(Tr=!0,un=[])}function Ed(e,t){fn("app:init",e,t,{Fragment:Ft,Text:bn,Comment:Zt,Static:Ns})}function Sd(e){fn("app:unmount",e)}const wd=Or("component:added"),_a=Or("component:updated"),xd=Or("component:removed"),Cd=e=>{ge&&typeof ge.cleanupBuffer=="function"&&!ge.cleanupBuffer(e)&&xd(e)};function Or(e){return t=>{fn(e,t.appContext.app,t.uid,t.parent?t.parent.uid:void 0,t)}}const Nd=va("perf:start"),Td=va("perf:end");function va(e){return(t,i,n)=>{fn(e,t.appContext.app,t.uid,t,i,n)}}function kd(e,t,i){fn("component:emit",e.appContext.app,e,t,i)}let Gt=null,ba=null;function ms(e){const t=Gt;return Gt=e,ba=e&&e.type.__scopeId||null,t}function pn(e,t=Gt,i){if(!t||e._n)return e;const n=(...s)=>{n._d&&Ts(-1);const r=ms(t);let o;try{o=e(...s)}finally{ms(r),n._d&&Ts(1)}return process.env.NODE_ENV!=="production"&&_a(t),o};return n._n=!0,n._c=!0,n._d=!0,n}function ya(e){yh(e)&&U("Do not use built-in directive ids as custom directive id: "+e)}function _s(e,t){if(Gt===null)return process.env.NODE_ENV!=="production"&&U("withDirectives can only be used inside render functions."),e;const i=Rs(Gt),n=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[r,o,a,l=ht]=t[s];r&&(it(r)&&(r={mounted:r,updated:r}),r.deep&&Me(o),n.push({dir:r,instance:i,value:o,oldValue:void 0,arg:a,modifiers:l}))}return e}function mi(e,t,i,n){const s=e.dirs,r=t&&t.dirs;for(let o=0;o<s.length;o++){const a=s[o];r&&(a.oldValue=r[o].value);let l=a.dir[n];l&&(de(),Se(l,i,8,[e.el,a,e,t]),ue())}}const Od=Symbol("_vte"),Pd=e=>e.__isTeleport,Ad=Symbol("_leaveCb");function Pr(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Pr(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Le(e,t){return it(e)?xt({name:e.name},t,{setup:e}):e}function Ea(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}const Sa=new WeakSet,vs=new WeakMap;function gn(e,t,i,n,s=!1){if(Q(e)){e.forEach((_,b)=>gn(_,t&&(Q(t)?t[b]:t),i,n,s));return}if(mn(n)&&!s){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&gn(e,t,i,n.component.subTree);return}const r=n.shapeFlag&4?Rs(n.component):n.el,o=s?null:r,{i:a,r:l}=e;if(process.env.NODE_ENV!=="production"&&!a){U("Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.");return}const c=t&&t.r,h=a.refs===ht?a.refs={}:a.refs,d=a.setupState,u=rt(d),f=d===ht?Mo:_=>process.env.NODE_ENV!=="production"&&(at(u,_)&&!Rt(u[_])&&U(`Template ref "${_}" used on a non-ref value. It will not work in the production build.`),Sa.has(u[_]))?!1:at(u,_),p=_=>process.env.NODE_ENV==="production"||!Sa.has(_);if(c!=null&&c!==l){if(wa(t),Ct(c))h[c]=null,f(c)&&(d[c]=null);else if(Rt(c)){p(c)&&(c.value=null);const _=t;_.k&&(h[_.k]=null)}}if(it(l))Vi(l,a,12,[o,h]);else{const _=Ct(l),b=Rt(l);if(_||b){const S=()=>{if(e.f){const y=_?f(l)?d[l]:h[l]:p(l)||!e.k?l.value:h[e.k];if(s)Q(y)&&sr(y,r);else if(Q(y))y.includes(r)||y.push(r);else if(_)h[l]=[r],f(l)&&(d[l]=h[l]);else{const C=[r];p(l)&&(l.value=C),e.k&&(h[e.k]=C)}}else _?(h[l]=o,f(l)&&(d[l]=o)):b?(p(l)&&(l.value=o),e.k&&(h[e.k]=o)):process.env.NODE_ENV!=="production"&&U("Invalid template ref type:",l,`(${typeof l})`)};if(o){const y=()=>{S(),vs.delete(e)};y.id=-1,vs.set(e,y),Qt(y,i)}else wa(e),S()}else process.env.NODE_ENV!=="production"&&U("Invalid template ref type:",l,`(${typeof l})`)}}function wa(e){const t=vs.get(e);t&&(t.flags|=8,vs.delete(e))}nn().requestIdleCallback,nn().cancelIdleCallback;const mn=e=>!!e.type.__asyncLoader,Ar=e=>e.type.__isKeepAlive;function Rd(e,t){xa(e,"a",t)}function Md(e,t){xa(e,"da",t)}function xa(e,t,i=Mt){const n=e.__wdc||(e.__wdc=()=>{let s=i;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(bs(t,n,i),i){let s=i.parent;for(;s&&s.parent;)Ar(s.parent.vnode)&&Ld(n,t,i,s),s=s.parent}}function Ld(e,t,i,n){const s=bs(t,e,n,!0);Lr(()=>{sr(n[t],s)},i)}function bs(e,t,i=Mt,n=!1){if(i){const s=i[e]||(i[e]=[]),r=t.__weh||(t.__weh=(...o)=>{de();const a=wn(i),l=Se(t,i,e,o);return a(),ue(),l});return n?s.unshift(r):s.push(r),r}else if(process.env.NODE_ENV!=="production"){const s=hi(xr[e].replace(/ hook$/,""));U(`${s} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.`)}}const Ie=e=>(t,i=Mt)=>{(!xn||e==="sp")&&bs(e,(...n)=>t(...n),i)},Id=Ie("bm"),Rr=Ie("m"),Dd=Ie("bu"),Mr=Ie("u"),Ca=Ie("bum"),Lr=Ie("um"),Vd=Ie("sp"),Fd=Ie("rtg"),Gd=Ie("rtc");function Bd(e,t=Mt){bs("ec",e,t)}const Hd="components";function Bi(e,t){return Wd(Hd,e,!0,t)||e}const $d=Symbol.for("v-ndc");function Wd(e,t,i=!0,n=!1){const s=Gt||Mt;if(s){const r=s.type;{const a=Kr(r,!1);if(a&&(a===t||a===Vt(t)||a===ci(Vt(t))))return r}const o=Na(s[e]||r[e],t)||Na(s.appContext[e],t);return!o&&n?r:(process.env.NODE_ENV!=="production"&&i&&!o&&U(`Failed to resolve ${e.slice(0,-1)}: ${t}
|
|
5
|
-
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.`),o)}else process.env.NODE_ENV!=="production"&&U(`resolve${ci(e.slice(0,-1))} can only be used in render() or setup().`)}function Na(e,t){return e&&(e[t]||e[Vt(t)]||e[ci(Vt(t))])}function _i(e,t,i,n){let s;const r=i,o=Q(e);if(o||Ct(e)){const a=o&&Ye(e);let l=!1,c=!1;a&&(l=!Bt(e),c=fe(e),e=es(e)),s=new Array(e.length);for(let h=0,d=e.length;h<d;h++)s[h]=t(l?c?Di(pe(e[h])):pe(e[h]):e[h],h,void 0,r)}else if(typeof e=="number"){process.env.NODE_ENV!=="production"&&!Number.isInteger(e)&&U(`The v-for range expect an integer value but got ${e}.`),s=new Array(e);for(let a=0;a<e;a++)s[a]=t(a+1,a,void 0,r)}else if(ut(e))if(e[Symbol.iterator])s=Array.from(e,(a,l)=>t(a,l,void 0,r));else{const a=Object.keys(e);s=new Array(a.length);for(let l=0,c=a.length;l<c;l++){const h=a[l];s[l]=t(e[h],h,l,r)}}else s=[];return s}const Ir=e=>e?al(e)?Rs(e):Ir(e.parent):null,vi=xt(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>process.env.NODE_ENV!=="production"?Ee(e.props):e.props,$attrs:e=>process.env.NODE_ENV!=="production"?Ee(e.attrs):e.attrs,$slots:e=>process.env.NODE_ENV!=="production"?Ee(e.slots):e.slots,$refs:e=>process.env.NODE_ENV!=="production"?Ee(e.refs):e.refs,$parent:e=>Ir(e.parent),$root:e=>Ir(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Aa(e),$forceUpdate:e=>e.f||(e.f=()=>{fs(e.update)}),$nextTick:e=>e.n||(e.n=us.bind(e.proxy)),$watch:e=>su.bind(e)}),Dr=e=>e==="_"||e==="$",Vr=(e,t)=>e!==ht&&!e.__isScriptSetup&&at(e,t),Ta={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:i,setupState:n,data:s,props:r,accessCache:o,type:a,appContext:l}=e;if(process.env.NODE_ENV!=="production"&&t==="__isVue")return!0;if(t[0]!=="$"){const u=o[t];if(u!==void 0)switch(u){case 1:return n[t];case 2:return s[t];case 4:return i[t];case 3:return r[t]}else{if(Vr(n,t))return o[t]=1,n[t];if(s!==ht&&at(s,t))return o[t]=2,s[t];if(at(r,t))return o[t]=3,r[t];if(i!==ht&&at(i,t))return o[t]=4,i[t];Fr&&(o[t]=0)}}const c=vi[t];let h,d;if(c)return t==="$attrs"?(It(e.attrs,"get",""),process.env.NODE_ENV!=="production"&&ws()):process.env.NODE_ENV!=="production"&&t==="$slots"&&It(e,"get",t),c(e);if((h=a.__cssModules)&&(h=h[t]))return h;if(i!==ht&&at(i,t))return o[t]=4,i[t];if(d=l.config.globalProperties,at(d,t))return d[t];process.env.NODE_ENV!=="production"&&Gt&&(!Ct(t)||t.indexOf("__v")!==0)&&(s!==ht&&Dr(t[0])&&at(s,t)?U(`Property ${JSON.stringify(t)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`):e===Gt&&U(`Property ${JSON.stringify(t)} was accessed during render but is not defined on instance.`))},set({_:e},t,i){const{data:n,setupState:s,ctx:r}=e;return Vr(s,t)?(s[t]=i,!0):process.env.NODE_ENV!=="production"&&s.__isScriptSetup&&at(s,t)?(U(`Cannot mutate <script setup> binding "${t}" from Options API.`),!1):n!==ht&&at(n,t)?(n[t]=i,!0):at(e.props,t)?(process.env.NODE_ENV!=="production"&&U(`Attempting to mutate prop "${t}". Props are readonly.`),!1):t[0]==="$"&&t.slice(1)in e?(process.env.NODE_ENV!=="production"&&U(`Attempting to mutate public property "${t}". Properties starting with $ are reserved and readonly.`),!1):(process.env.NODE_ENV!=="production"&&t in e.appContext.config.globalProperties?Object.defineProperty(r,t,{enumerable:!0,configurable:!0,value:i}):r[t]=i,!0)},has({_:{data:e,setupState:t,accessCache:i,ctx:n,appContext:s,props:r,type:o}},a){let l;return!!(i[a]||e!==ht&&a[0]!=="$"&&at(e,a)||Vr(t,a)||at(r,a)||at(n,a)||at(vi,a)||at(s.config.globalProperties,a)||(l=o.__cssModules)&&l[a])},defineProperty(e,t,i){return i.get!=null?e._.accessCache[t]=0:at(i,"value")&&this.set(e,t,i.value,null),Reflect.defineProperty(e,t,i)}};process.env.NODE_ENV!=="production"&&(Ta.ownKeys=e=>(U("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."),Reflect.ownKeys(e)));function Ud(e){const t={};return Object.defineProperty(t,"_",{configurable:!0,enumerable:!1,get:()=>e}),Object.keys(vi).forEach(i=>{Object.defineProperty(t,i,{configurable:!0,enumerable:!1,get:()=>vi[i](e),set:Lt})}),t}function jd(e){const{ctx:t,propsOptions:[i]}=e;i&&Object.keys(i).forEach(n=>{Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>e.props[n],set:Lt})})}function Xd(e){const{ctx:t,setupState:i}=e;Object.keys(rt(i)).forEach(n=>{if(!i.__isScriptSetup){if(Dr(n[0])){U(`setup() return property ${JSON.stringify(n)} should not start with "$" or "_" which are reserved prefixes for Vue internals.`);return}Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i[n],set:Lt})}})}function ka(e){return Q(e)?e.reduce((t,i)=>(t[i]=null,t),{}):e}function zd(){const e=Object.create(null);return(t,i)=>{e[i]?U(`${t} property "${i}" is already defined in ${e[i]}.`):e[i]=t}}let Fr=!0;function Yd(e){const t=Aa(e),i=e.proxy,n=e.ctx;Fr=!1,t.beforeCreate&&Oa(t.beforeCreate,e,"bc");const{data:s,computed:r,methods:o,watch:a,provide:l,inject:c,created:h,beforeMount:d,mounted:u,beforeUpdate:f,updated:p,activated:_,deactivated:b,beforeDestroy:S,beforeUnmount:y,destroyed:C,unmounted:N,render:T,renderTracked:O,renderTriggered:w,errorCaptured:x,serverPrefetch:P,expose:B,inheritAttrs:K,components:z,directives:Z,filters:J}=t,A=process.env.NODE_ENV!=="production"?zd():null;if(process.env.NODE_ENV!=="production"){const[H]=e.propsOptions;if(H)for(const D in H)A("Props",D)}if(c&&qd(c,n,A),o)for(const H in o){const D=o[H];it(D)?(process.env.NODE_ENV!=="production"?Object.defineProperty(n,H,{value:D.bind(i),configurable:!0,enumerable:!0,writable:!0}):n[H]=D.bind(i),process.env.NODE_ENV!=="production"&&A("Methods",H)):process.env.NODE_ENV!=="production"&&U(`Method "${H}" has type "${typeof D}" in the component definition. Did you reference the function correctly?`)}if(s){process.env.NODE_ENV!=="production"&&!it(s)&&U("The data option must be a function. Plain object usage is no longer supported.");const H=s.call(i,i);if(process.env.NODE_ENV!=="production"&&rr(H)&&U("data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>."),!ut(H))process.env.NODE_ENV!=="production"&&U("data() should return an object.");else if(e.data=cn(H),process.env.NODE_ENV!=="production")for(const D in H)A("Data",D),Dr(D[0])||Object.defineProperty(n,D,{configurable:!0,enumerable:!0,get:()=>H[D],set:Lt})}if(Fr=!0,r)for(const H in r){const D=r[H],nt=it(D)?D.bind(i,i):it(D.get)?D.get.bind(i,i):Lt;process.env.NODE_ENV!=="production"&&nt===Lt&&U(`Computed property "${H}" has no getter.`);const ct=!it(D)&&it(D.set)?D.set.bind(i):process.env.NODE_ENV!=="production"?()=>{U(`Write operation failed: computed property "${H}" is readonly.`)}:Lt,ot=Ms({get:nt,set:ct});Object.defineProperty(n,H,{enumerable:!0,configurable:!0,get:()=>ot.value,set:gt=>ot.value=gt}),process.env.NODE_ENV!=="production"&&A("Computed",H)}if(a)for(const H in a)Pa(a[H],n,i,H);if(l){const H=it(l)?l.call(i):l;Reflect.ownKeys(H).forEach(D=>{eu(D,H[D])})}h&&Oa(h,e,"c");function L(H,D){Q(D)?D.forEach(nt=>H(nt.bind(i))):D&&H(D.bind(i))}if(L(Id,d),L(Rr,u),L(Dd,f),L(Mr,p),L(Rd,_),L(Md,b),L(Bd,x),L(Gd,O),L(Fd,w),L(Ca,y),L(Lr,N),L(Vd,P),Q(B))if(B.length){const H=e.exposed||(e.exposed={});B.forEach(D=>{Object.defineProperty(H,D,{get:()=>i[D],set:nt=>i[D]=nt,enumerable:!0})})}else e.exposed||(e.exposed={});T&&e.render===Lt&&(e.render=T),K!=null&&(e.inheritAttrs=K),z&&(e.components=z),Z&&(e.directives=Z),P&&Ea(e)}function qd(e,t,i=Lt){Q(e)&&(e=Gr(e));for(const n in e){const s=e[n];let r;ut(s)?"default"in s?r=Es(s.from||n,s.default,!0):r=Es(s.from||n):r=Es(s),Rt(r)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>r.value,set:o=>r.value=o}):t[n]=r,process.env.NODE_ENV!=="production"&&i("Inject",n)}}function Oa(e,t,i){Se(Q(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,i)}function Pa(e,t,i,n){let s=n.includes(".")?Da(i,n):()=>i[n];if(Ct(e)){const r=t[e];it(r)?bi(s,r):process.env.NODE_ENV!=="production"&&U(`Invalid watch handler specified by key "${e}"`,r)}else if(it(e))bi(s,e.bind(i));else if(ut(e))if(Q(e))e.forEach(r=>Pa(r,t,i,n));else{const r=it(e.handler)?e.handler.bind(i):t[e.handler];it(r)?bi(s,r,e):process.env.NODE_ENV!=="production"&&U(`Invalid watch handler specified by key "${e.handler}"`,r)}else process.env.NODE_ENV!=="production"&&U(`Invalid watch option: "${n}"`,e)}function Aa(e){const t=e.type,{mixins:i,extends:n}=t,{mixins:s,optionsCache:r,config:{optionMergeStrategies:o}}=e.appContext,a=r.get(t);let l;return a?l=a:!s.length&&!i&&!n?l=t:(l={},s.length&&s.forEach(c=>ys(l,c,o,!0)),ys(l,t,o)),ut(t)&&r.set(t,l),l}function ys(e,t,i,n=!1){const{mixins:s,extends:r}=t;r&&ys(e,r,i,!0),s&&s.forEach(o=>ys(e,o,i,!0));for(const o in t)if(n&&o==="expose")process.env.NODE_ENV!=="production"&&U('"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.');else{const a=Kd[o]||i&&i[o];e[o]=a?a(e[o],t[o]):t[o]}return e}const Kd={data:Ra,props:Ma,emits:Ma,methods:_n,computed:_n,beforeCreate:$t,created:$t,beforeMount:$t,mounted:$t,beforeUpdate:$t,updated:$t,beforeDestroy:$t,beforeUnmount:$t,destroyed:$t,unmounted:$t,activated:$t,deactivated:$t,errorCaptured:$t,serverPrefetch:$t,components:_n,directives:_n,watch:Qd,provide:Ra,inject:Jd};function Ra(e,t){return t?e?function(){return xt(it(e)?e.call(this,this):e,it(t)?t.call(this,this):t)}:t:e}function Jd(e,t){return _n(Gr(e),Gr(t))}function Gr(e){if(Q(e)){const t={};for(let i=0;i<e.length;i++)t[e[i]]=e[i];return t}return e}function $t(e,t){return e?[...new Set([].concat(e,t))]:t}function _n(e,t){return e?xt(Object.create(null),e,t):t}function Ma(e,t){return e?Q(e)&&Q(t)?[...new Set([...e,...t])]:xt(Object.create(null),ka(e),ka(t??{})):t}function Qd(e,t){if(!e)return t;if(!t)return e;const i=xt(Object.create(null),e);for(const n in t)i[n]=$t(e[n],t[n]);return i}function La(){return{app:null,config:{isNativeTag:Mo,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Zd=0;function tu(e,t){return function(n,s=null){it(n)||(n=xt({},n)),s!=null&&!ut(s)&&(process.env.NODE_ENV!=="production"&&U("root props passed to app.mount() must be an object."),s=null);const r=La(),o=new WeakSet,a=[];let l=!1;const c=r.app={_uid:Zd++,_component:n,_props:s,_container:null,_context:r,_instance:null,version:fl,get config(){return r.config},set config(h){process.env.NODE_ENV!=="production"&&U("app.config cannot be replaced. Modify individual options instead.")},use(h,...d){return o.has(h)?process.env.NODE_ENV!=="production"&&U("Plugin has already been applied to target app."):h&&it(h.install)?(o.add(h),h.install(c,...d)):it(h)?(o.add(h),h(c,...d)):process.env.NODE_ENV!=="production"&&U('A plugin must either be a function or an object with an "install" function.'),c},mixin(h){return r.mixins.includes(h)?process.env.NODE_ENV!=="production"&&U("Mixin has already been applied to target app"+(h.name?`: ${h.name}`:"")):r.mixins.push(h),c},component(h,d){return process.env.NODE_ENV!=="production"&&qr(h,r.config),d?(process.env.NODE_ENV!=="production"&&r.components[h]&&U(`Component "${h}" has already been registered in target app.`),r.components[h]=d,c):r.components[h]},directive(h,d){return process.env.NODE_ENV!=="production"&&ya(h),d?(process.env.NODE_ENV!=="production"&&r.directives[h]&&U(`Directive "${h}" has already been registered in target app.`),r.directives[h]=d,c):r.directives[h]},mount(h,d,u){if(l)process.env.NODE_ENV!=="production"&&U("App has already been mounted.\nIf you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. `const createMyApp = () => createApp(App)`");else{process.env.NODE_ENV!=="production"&&h.__vue_app__&&U("There is already an app instance mounted on the host container.\n If you want to mount another app on the same host container, you need to unmount the previous app by calling `app.unmount()` first.");const f=c._ceVNode||Tt(n,s);return f.appContext=r,u===!0?u="svg":u===!1&&(u=void 0),process.env.NODE_ENV!=="production"&&(r.reload=()=>{const p=Je(f);p.el=null,e(p,h,u)}),e(f,h,u),l=!0,c._container=h,h.__vue_app__=c,process.env.NODE_ENV!=="production"&&(c._instance=f.component,Ed(c,fl)),Rs(f.component)}},onUnmount(h){process.env.NODE_ENV!=="production"&&typeof h!="function"&&U(`Expected function as first argument to app.onUnmount(), but got ${typeof h}`),a.push(h)},unmount(){l?(Se(a,c._instance,16),e(null,c._container),process.env.NODE_ENV!=="production"&&(c._instance=null,Sd(c)),delete c._container.__vue_app__):process.env.NODE_ENV!=="production"&&U("Cannot unmount an app that is not mounted.")},provide(h,d){return process.env.NODE_ENV!=="production"&&h in r.provides&&(at(r.provides,h)?U(`App already provides property with key "${String(h)}". It will be overwritten with the new value.`):U(`App already provides property with key "${String(h)}" inherited from its parent element. It will be overwritten with the new value.`)),r.provides[h]=d,c},runWithContext(h){const d=Hi;Hi=c;try{return h()}finally{Hi=d}}};return c}}let Hi=null;function eu(e,t){if(process.env.NODE_ENV!=="production"&&(!Mt||Mt.isMounted)&&U("provide() can only be used inside setup()."),Mt){let i=Mt.provides;const n=Mt.parent&&Mt.parent.provides;n===i&&(i=Mt.provides=Object.create(n)),i[e]=t}}function Es(e,t,i=!1){const n=Ps();if(n||Hi){let s=Hi?Hi._context.provides:n?n.parent==null||n.ce?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:void 0;if(s&&e in s)return s[e];if(arguments.length>1)return i&&it(t)?t.call(n&&n.proxy):t;process.env.NODE_ENV!=="production"&&U(`injection "${String(e)}" not found.`)}else process.env.NODE_ENV!=="production"&&U("inject() can only be used inside setup() or functional components.")}const iu=Symbol.for("v-scx"),nu=()=>{{const e=Es(iu);return e||process.env.NODE_ENV!=="production"&&U("Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build."),e}};function bi(e,t,i){return process.env.NODE_ENV!=="production"&&!it(t)&&U("`watch(fn, options?)` signature has been moved to a separate API. Use `watchEffect(fn, options?)` instead. `watch` now only supports `watch(source, cb, options?) signature."),Ia(e,t,i)}function Ia(e,t,i=ht){const{immediate:n,deep:s,flush:r,once:o}=i;process.env.NODE_ENV!=="production"&&!t&&(n!==void 0&&U('watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'),s!==void 0&&U('watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'),o!==void 0&&U('watch() "once" option is only respected when using the watch(source, callback, options?) signature.'));const a=xt({},i);process.env.NODE_ENV!=="production"&&(a.onWarn=U);const l=t&&n||!t&&r!=="post";let c;if(xn){if(r==="sync"){const f=nu();c=f.__watcherHandles||(f.__watcherHandles=[])}else if(!l){const f=()=>{};return f.stop=Lt,f.resume=Lt,f.pause=Lt,f}}const h=Mt;a.call=(f,p,_)=>Se(f,h,p,_);let d=!1;r==="post"?a.scheduler=f=>{Qt(f,h&&h.suspense)}:r!=="sync"&&(d=!0,a.scheduler=(f,p)=>{p?f():fs(f)}),a.augmentJob=f=>{t&&(f.flags|=4),d&&(f.flags|=2,h&&(f.id=h.uid,f.i=h))};const u=cd(e,t,a);return xn&&(c?c.push(u):l&&u()),u}function su(e,t,i){const n=this.proxy,s=Ct(e)?e.includes(".")?Da(n,e):()=>n[e]:e.bind(n,n);let r;it(t)?r=t:(r=t.handler,i=t);const o=wn(this),a=Ia(s,r.bind(n),i);return o(),a}function Da(e,t){const i=t.split(".");return()=>{let n=e;for(let s=0;s<i.length&&n;s++)n=n[i[s]];return n}}const ru=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Vt(t)}Modifiers`]||e[`${Jt(t)}Modifiers`];function ou(e,t,...i){if(e.isUnmounted)return;const n=e.vnode.props||ht;if(process.env.NODE_ENV!=="production"){const{emitsOptions:h,propsOptions:[d]}=e;if(h)if(!(t in h))(!d||!(hi(Vt(t))in d))&&U(`Component emitted event "${t}" but it is neither declared in the emits option nor as an "${hi(Vt(t))}" prop.`);else{const u=h[t];it(u)&&(u(...i)||U(`Invalid event arguments: event validation failed for event "${t}".`))}}let s=i;const r=t.startsWith("update:"),o=r&&ru(n,t.slice(7));if(o&&(o.trim&&(s=i.map(h=>Ct(h)?h.trim():h)),o.number&&(s=i.map(ts))),process.env.NODE_ENV!=="production"&&kd(e,t,s),process.env.NODE_ENV!=="production"){const h=t.toLowerCase();h!==t&&n[hi(h)]&&U(`Event "${h}" is emitted in component ${Cn(e,e.type)} but the handler is registered for "${t}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${Jt(t)}" instead of "${t}".`)}let a,l=n[a=hi(t)]||n[a=hi(Vt(t))];!l&&r&&(l=n[a=hi(Jt(t))]),l&&Se(l,e,6,s);const c=n[a+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,Se(c,e,6,s)}}const au=new WeakMap;function Va(e,t,i=!1){const n=i?au:t.emitsCache,s=n.get(e);if(s!==void 0)return s;const r=e.emits;let o={},a=!1;if(!it(e)){const l=c=>{const h=Va(c,t,!0);h&&(a=!0,xt(o,h))};!i&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!r&&!a?(ut(e)&&n.set(e,null),null):(Q(r)?r.forEach(l=>o[l]=null):xt(o,r),ut(e)&&n.set(e,o),o)}function Ss(e,t){return!e||!Zi(t)?!1:(t=t.slice(2).replace(/Once$/,""),at(e,t[0].toLowerCase()+t.slice(1))||at(e,Jt(t))||at(e,t))}let Br=!1;function ws(){Br=!0}function Fa(e){const{type:t,vnode:i,proxy:n,withProxy:s,propsOptions:[r],slots:o,attrs:a,emit:l,render:c,renderCache:h,props:d,data:u,setupState:f,ctx:p,inheritAttrs:_}=e,b=ms(e);let S,y;process.env.NODE_ENV!=="production"&&(Br=!1);try{if(i.shapeFlag&4){const T=s||n,O=process.env.NODE_ENV!=="production"&&f.__isScriptSetup?new Proxy(T,{get(w,x,P){return U(`Property '${String(x)}' was accessed via 'this'. Avoid using 'this' in templates.`),Reflect.get(w,x,P)}}):T;S=me(c.call(O,T,h,process.env.NODE_ENV!=="production"?Ee(d):d,f,u,p)),y=a}else{const T=t;process.env.NODE_ENV!=="production"&&a===d&&ws(),S=me(T.length>1?T(process.env.NODE_ENV!=="production"?Ee(d):d,process.env.NODE_ENV!=="production"?{get attrs(){return ws(),Ee(a)},slots:o,emit:l}:{attrs:a,slots:o,emit:l}):T(process.env.NODE_ENV!=="production"?Ee(d):d,null)),y=t.props?a:lu(a)}}catch(T){yn.length=0,hn(T,e,1),S=Tt(Zt)}let C=S,N;if(process.env.NODE_ENV!=="production"&&S.patchFlag>0&&S.patchFlag&2048&&([C,N]=Ga(S)),y&&_!==!1){const T=Object.keys(y),{shapeFlag:O}=C;if(T.length){if(O&7)r&&T.some(Kn)&&(y=cu(y,r)),C=Je(C,y,!1,!0);else if(process.env.NODE_ENV!=="production"&&!Br&&C.type!==Zt){const w=Object.keys(a),x=[],P=[];for(let B=0,K=w.length;B<K;B++){const z=w[B];Zi(z)?Kn(z)||x.push(z[2].toLowerCase()+z.slice(3)):P.push(z)}P.length&&U(`Extraneous non-props attributes (${P.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.`),x.length&&U(`Extraneous non-emits event listeners (${x.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.`)}}}return i.dirs&&(process.env.NODE_ENV!=="production"&&!Ba(C)&&U("Runtime directive used on component with non-element root node. The directives will not function as intended."),C=Je(C,null,!1,!0),C.dirs=C.dirs?C.dirs.concat(i.dirs):i.dirs),i.transition&&(process.env.NODE_ENV!=="production"&&!Ba(C)&&U("Component inside <Transition> renders non-element root node that cannot be animated."),Pr(C,i.transition)),process.env.NODE_ENV!=="production"&&N?N(C):S=C,ms(b),S}const Ga=e=>{const t=e.children,i=e.dynamicChildren,n=Hr(t,!1);if(n){if(process.env.NODE_ENV!=="production"&&n.patchFlag>0&&n.patchFlag&2048)return Ga(n)}else return[e,void 0];const s=t.indexOf(n),r=i?i.indexOf(n):-1,o=a=>{t[s]=a,i&&(r>-1?i[r]=a:a.patchFlag>0&&(e.dynamicChildren=[...i,a]))};return[me(n),o]};function Hr(e,t=!0){let i;for(let n=0;n<e.length;n++){const s=e[n];if(Ui(s)){if(s.type!==Zt||s.children==="v-if"){if(i)return;if(i=s,process.env.NODE_ENV!=="production"&&t&&i.patchFlag>0&&i.patchFlag&2048)return Hr(i.children)}}else return}return i}const lu=e=>{let t;for(const i in e)(i==="class"||i==="style"||Zi(i))&&((t||(t={}))[i]=e[i]);return t},cu=(e,t)=>{const i={};for(const n in e)(!Kn(n)||!(n.slice(9)in t))&&(i[n]=e[n]);return i},Ba=e=>e.shapeFlag&7||e.type===Zt;function hu(e,t,i){const{props:n,children:s,component:r}=e,{props:o,children:a,patchFlag:l}=t,c=r.emitsOptions;if(process.env.NODE_ENV!=="production"&&(s||a)&&xe||t.dirs||t.transition)return!0;if(i&&l>=0){if(l&1024)return!0;if(l&16)return n?Ha(n,o,c):!!o;if(l&8){const h=t.dynamicProps;for(let d=0;d<h.length;d++){const u=h[d];if(o[u]!==n[u]&&!Ss(c,u))return!0}}}else return(s||a)&&(!a||!a.$stable)?!0:n===o?!1:n?o?Ha(n,o,c):!0:!!o;return!1}function Ha(e,t,i){const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!0;for(let s=0;s<n.length;s++){const r=n[s];if(t[r]!==e[r]&&!Ss(i,r))return!0}return!1}function du({vnode:e,parent:t},i){for(;t;){const n=t.subTree;if(n.suspense&&n.suspense.activeBranch===e&&(n.el=e.el),n===e)(e=t.vnode).el=i,t=t.parent;else break}}const $a={},Wa=()=>Object.create($a),Ua=e=>Object.getPrototypeOf(e)===$a;function uu(e,t,i,n=!1){const s={},r=Wa();e.propsDefaults=Object.create(null),ja(e,t,s,r);for(const o in e.propsOptions[0])o in s||(s[o]=void 0);process.env.NODE_ENV!=="production"&&Ya(t||{},s,e),i?e.props=n?s:ed(s):e.type.props?e.props=s:e.props=r,e.attrs=r}function fu(e){for(;e;){if(e.type.__hmrId)return!0;e=e.parent}}function pu(e,t,i,n){const{props:s,attrs:r,vnode:{patchFlag:o}}=e,a=rt(s),[l]=e.propsOptions;let c=!1;if(!(process.env.NODE_ENV!=="production"&&fu(e))&&(n||o>0)&&!(o&16)){if(o&8){const h=e.vnode.dynamicProps;for(let d=0;d<h.length;d++){let u=h[d];if(Ss(e.emitsOptions,u))continue;const f=t[u];if(l)if(at(r,u))f!==r[u]&&(r[u]=f,c=!0);else{const p=Vt(u);s[p]=$r(l,a,p,f,e,!1)}else f!==r[u]&&(r[u]=f,c=!0)}}}else{ja(e,t,s,r)&&(c=!0);let h;for(const d in a)(!t||!at(t,d)&&((h=Jt(d))===d||!at(t,h)))&&(l?i&&(i[d]!==void 0||i[h]!==void 0)&&(s[d]=$r(l,a,d,void 0,e,!0)):delete s[d]);if(r!==a)for(const d in r)(!t||!at(t,d))&&(delete r[d],c=!0)}c&&ye(e.attrs,"set",""),process.env.NODE_ENV!=="production"&&Ya(t||{},s,e)}function ja(e,t,i,n){const[s,r]=e.propsOptions;let o=!1,a;if(t)for(let l in t){if(en(l))continue;const c=t[l];let h;s&&at(s,h=Vt(l))?!r||!r.includes(h)?i[h]=c:(a||(a={}))[h]=c:Ss(e.emitsOptions,l)||(!(l in n)||c!==n[l])&&(n[l]=c,o=!0)}if(r){const l=rt(i),c=a||ht;for(let h=0;h<r.length;h++){const d=r[h];i[d]=$r(s,l,d,c[d],e,!at(c,d))}}return o}function $r(e,t,i,n,s,r){const o=e[i];if(o!=null){const a=at(o,"default");if(a&&n===void 0){const l=o.default;if(o.type!==Function&&!o.skipFactory&&it(l)){const{propsDefaults:c}=s;if(i in c)n=c[i];else{const h=wn(s);n=c[i]=l.call(null,t),h()}}else n=l;s.ce&&s.ce._setProp(i,n)}o[0]&&(r&&!a?n=!1:o[1]&&(n===""||n===Jt(i))&&(n=!0))}return n}const gu=new WeakMap;function Xa(e,t,i=!1){const n=i?gu:t.propsCache,s=n.get(e);if(s)return s;const r=e.props,o={},a=[];let l=!1;if(!it(e)){const h=d=>{l=!0;const[u,f]=Xa(d,t,!0);xt(o,u),f&&a.push(...f)};!i&&t.mixins.length&&t.mixins.forEach(h),e.extends&&h(e.extends),e.mixins&&e.mixins.forEach(h)}if(!r&&!l)return ut(e)&&n.set(e,Ai),Ai;if(Q(r))for(let h=0;h<r.length;h++){process.env.NODE_ENV!=="production"&&!Ct(r[h])&&U("props must be strings when using array syntax.",r[h]);const d=Vt(r[h]);za(d)&&(o[d]=ht)}else if(r){process.env.NODE_ENV!=="production"&&!ut(r)&&U("invalid props options",r);for(const h in r){const d=Vt(h);if(za(d)){const u=r[h],f=o[d]=Q(u)||it(u)?{type:u}:xt({},u),p=f.type;let _=!1,b=!0;if(Q(p))for(let S=0;S<p.length;++S){const y=p[S],C=it(y)&&y.name;if(C==="Boolean"){_=!0;break}else C==="String"&&(b=!1)}else _=it(p)&&p.name==="Boolean";f[0]=_,f[1]=b,(_||at(f,"default"))&&a.push(d)}}}const c=[o,a];return ut(e)&&n.set(e,c),c}function za(e){return e[0]!=="$"&&!en(e)?!0:(process.env.NODE_ENV!=="production"&&U(`Invalid prop name: "${e}" is a reserved property.`),!1)}function mu(e){return e===null?"null":typeof e=="function"?e.name||"":typeof e=="object"&&e.constructor&&e.constructor.name||""}function Ya(e,t,i){const n=rt(t),s=i.propsOptions[0],r=Object.keys(e).map(o=>Vt(o));for(const o in s){let a=s[o];a!=null&&_u(o,n[o],a,process.env.NODE_ENV!=="production"?Ee(n):n,!r.includes(o))}}function _u(e,t,i,n,s){const{type:r,required:o,validator:a,skipCheck:l}=i;if(o&&s){U('Missing required prop: "'+e+'"');return}if(!(t==null&&!o)){if(r!=null&&r!==!0&&!l){let c=!1;const h=Q(r)?r:[r],d=[];for(let u=0;u<h.length&&!c;u++){const{valid:f,expectedType:p}=bu(t,h[u]);d.push(p||""),c=f}if(!c){U(yu(e,t,d));return}}a&&!a(t,n)&&U('Invalid prop: custom validator check failed for prop "'+e+'".')}}const vu=Kt("String,Number,Boolean,Function,Symbol,BigInt");function bu(e,t){let i;const n=mu(t);if(n==="null")i=e===null;else if(vu(n)){const s=typeof e;i=s===n.toLowerCase(),!i&&s==="object"&&(i=e instanceof t)}else n==="Object"?i=ut(e):n==="Array"?i=Q(e):i=e instanceof t;return{valid:i,expectedType:n}}function yu(e,t,i){if(i.length===0)return`Prop type [] for prop "${e}" won't match anything. Did you mean to use type Array instead?`;let n=`Invalid prop: type check failed for prop "${e}". Expected ${i.map(ci).join(" | ")}`;const s=i[0],r=or(t),o=qa(t,s),a=qa(t,r);return i.length===1&&Ka(s)&&!Eu(s,r)&&(n+=` with value ${o}`),n+=`, got ${r} `,Ka(r)&&(n+=`with value ${a}.`),n}function qa(e,t){return t==="String"?`"${e}"`:t==="Number"?`${Number(e)}`:`${e}`}function Ka(e){return["string","number","boolean"].some(i=>e.toLowerCase()===i)}function Eu(...e){return e.some(t=>t.toLowerCase()==="boolean")}const Wr=e=>e==="_"||e==="_ctx"||e==="$stable",Ur=e=>Q(e)?e.map(me):[me(e)],Su=(e,t,i)=>{if(t._n)return t;const n=pn((...s)=>(process.env.NODE_ENV!=="production"&&Mt&&!(i===null&&Gt)&&!(i&&i.root!==Mt.root)&&U(`Slot "${e}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`),Ur(t(...s))),i);return n._c=!1,n},Ja=(e,t,i)=>{const n=e._ctx;for(const s in e){if(Wr(s))continue;const r=e[s];if(it(r))t[s]=Su(s,r,n);else if(r!=null){process.env.NODE_ENV!=="production"&&U(`Non-function value encountered for slot "${s}". Prefer function slots for better performance.`);const o=Ur(r);t[s]=()=>o}}},Qa=(e,t)=>{process.env.NODE_ENV!=="production"&&!Ar(e.vnode)&&U("Non-function value encountered for default slot. Prefer function slots for better performance.");const i=Ur(t);e.slots.default=()=>i},jr=(e,t,i)=>{for(const n in t)(i||!Wr(n))&&(e[n]=t[n])},wu=(e,t,i)=>{const n=e.slots=Wa();if(e.vnode.shapeFlag&32){const s=t._;s?(jr(n,t,i),i&&Zn(n,"_",s,!0)):Ja(t,n)}else t&&Qa(e,t)},xu=(e,t,i)=>{const{vnode:n,slots:s}=e;let r=!0,o=ht;if(n.shapeFlag&32){const a=t._;a?process.env.NODE_ENV!=="production"&&xe?(jr(s,t,i),ye(e,"set","$slots")):i&&a===1?r=!1:jr(s,t,i):(r=!t.$stable,Ja(t,s)),o=t}else t&&(Qa(e,t),o={default:1});if(r)for(const a in s)!Wr(a)&&o[a]==null&&delete s[a]};let vn,De;function $i(e,t){e.appContext.config.performance&&xs()&&De.mark(`vue-${t}-${e.uid}`),process.env.NODE_ENV!=="production"&&Nd(e,t,xs()?De.now():Date.now())}function Wi(e,t){if(e.appContext.config.performance&&xs()){const i=`vue-${t}-${e.uid}`,n=i+":end",s=`<${Cn(e,e.type)}> ${t}`;De.mark(n),De.measure(s,i,n),De.clearMeasures(s),De.clearMarks(i),De.clearMarks(n)}process.env.NODE_ENV!=="production"&&Td(e,t,xs()?De.now():Date.now())}function xs(){return vn!==void 0||(typeof window<"u"&&window.performance?(vn=!0,De=window.performance):vn=!1),vn}function Cu(){const e=[];if(process.env.NODE_ENV!=="production"&&e.length){const t=e.length>1;console.warn(`Feature flag${t?"s":""} ${e.join(", ")} ${t?"are":"is"} not explicitly defined. You are running the esm-bundler build of Vue, which expects these compile-time feature flags to be globally injected via the bundler config in order to get better tree-shaking in the production bundle.
|
|
4
|
+
`],...ud(i))}),t}function ud({vnode:e,recurseCount:t}){const i=t>0?`... (${t} recursive calls)`:"",n=e.component?e.component.parent==null:!1,s=` at <${Cn(e.component,e.type,n)}`,r=">"+i;return e.props?[s,...fd(e.props),r]:[s+r]}function fd(e){const t=[],i=Object.keys(e);return i.slice(0,3).forEach(n=>{t.push(...aa(n,e[n]))}),i.length>3&&t.push(" ..."),t}function aa(e,t,i){return Ct(t)?(t=JSON.stringify(t),i?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?i?t:[`${e}=${t}`]:Rt(t)?(t=aa(e,rt(t.value),!0),i?t:[`${e}=Ref<`,t,">"]):it(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=rt(t),i?t:[`${e}=`,t])}const xr={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function Vi(e,t,i,n){try{return n?e(...n):e()}catch(s){hn(s,t,i)}}function Se(e,t,i,n){if(it(e)){const s=Vi(e,t,i,n);return s&&rr(s)&&s.catch(r=>{hn(r,t,i)}),s}if(Q(e)){const s=[];for(let r=0;r<e.length;r++)s.push(Se(e[r],t,i,n));return s}else process.env.NODE_ENV!=="production"&&U(`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof e}`)}function hn(e,t,i,n=!0){const s=t?t.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||ht;if(t){let a=t.parent;const l=t.proxy,c=process.env.NODE_ENV!=="production"?xr[i]:`https://vuejs.org/error-reference/#runtime-${i}`;for(;a;){const h=a.ec;if(h){for(let d=0;d<h.length;d++)if(h[d](e,l,c)===!1)return}a=a.parent}if(r){de(),Vi(r,null,10,[e,l,c]),ue();return}}pd(e,i,s,n,o)}function pd(e,t,i,n=!0,s=!1){if(process.env.NODE_ENV!=="production"){const r=xr[t];if(i&&cs(i),U(`Unhandled error${r?` during execution of ${r}`:""}`),i&&hs(),n)throw e;console.error(e)}else{if(s)throw e;console.error(e)}}const Ht=[];let we=-1;const Fi=[];let qe=null,Gi=0;const la=Promise.resolve();let ds=null;const gd=100;function us(e){const t=ds||la;return e?t.then(this?e.bind(this):e):t}function md(e){let t=we+1,i=Ht.length;for(;t<i;){const n=t+i>>>1,s=Ht[n],r=dn(s);r<e||r===e&&s.flags&2?t=n+1:i=n}return t}function fs(e){if(!(e.flags&1)){const t=dn(e),i=Ht[Ht.length-1];!i||!(e.flags&2)&&t>=dn(i)?Ht.push(e):Ht.splice(md(t),0,e),e.flags|=1,ca()}}function ca(){ds||(ds=la.then(fa))}function ha(e){Q(e)?Fi.push(...e):qe&&e.id===-1?qe.splice(Gi+1,0,e):e.flags&1||(Fi.push(e),e.flags|=1),ca()}function da(e,t,i=we+1){for(process.env.NODE_ENV!=="production"&&(t=t||new Map);i<Ht.length;i++){const n=Ht[i];if(n&&n.flags&2){if(e&&n.id!==e.uid||process.env.NODE_ENV!=="production"&&Cr(t,n))continue;Ht.splice(i,1),i--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function ua(e){if(Fi.length){const t=[...new Set(Fi)].sort((i,n)=>dn(i)-dn(n));if(Fi.length=0,qe){qe.push(...t);return}for(qe=t,process.env.NODE_ENV!=="production"&&(e=e||new Map),Gi=0;Gi<qe.length;Gi++){const i=qe[Gi];process.env.NODE_ENV!=="production"&&Cr(e,i)||(i.flags&4&&(i.flags&=-2),i.flags&8||i(),i.flags&=-2)}qe=null,Gi=0}}const dn=e=>e.id==null?e.flags&2?-1:1/0:e.id;function fa(e){process.env.NODE_ENV!=="production"&&(e=e||new Map);const t=process.env.NODE_ENV!=="production"?i=>Cr(e,i):Lt;try{for(we=0;we<Ht.length;we++){const i=Ht[we];if(i&&!(i.flags&8)){if(process.env.NODE_ENV!=="production"&&t(i))continue;i.flags&4&&(i.flags&=-2),Vi(i,i.i,i.i?15:14),i.flags&4||(i.flags&=-2)}}}finally{for(;we<Ht.length;we++){const i=Ht[we];i&&(i.flags&=-2)}we=-1,Ht.length=0,ua(e),ds=null,(Ht.length||Fi.length)&&fa(e)}}function Cr(e,t){const i=e.get(t)||0;if(i>gd){const n=t.i,s=n&&Kr(n.type);return hn(`Maximum recursive updates exceeded${s?` in component <${s}>`:""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,null,10),!0}return e.set(t,i+1),!1}let xe=!1;const ps=new Map;process.env.NODE_ENV!=="production"&&(nn().__VUE_HMR_RUNTIME__={createRecord:Nr(pa),rerender:Nr(bd),reload:Nr(yd)});const gi=new Map;function _d(e){const t=e.type.__hmrId;let i=gi.get(t);i||(pa(t,e.type),i=gi.get(t)),i.instances.add(e)}function vd(e){gi.get(e.type.__hmrId).instances.delete(e)}function pa(e,t){return gi.has(e)?!1:(gi.set(e,{initialDef:gs(t),instances:new Set}),!0)}function gs(e){return hl(e)?e.__vccOpts:e}function bd(e,t){const i=gi.get(e);i&&(i.initialDef.render=t,[...i.instances].forEach(n=>{t&&(n.render=t,gs(n.type).render=t),n.renderCache=[],xe=!0,n.job.flags&8||n.update(),xe=!1}))}function yd(e,t){const i=gi.get(e);if(!i)return;t=gs(t),ga(i.initialDef,t);const n=[...i.instances];for(let s=0;s<n.length;s++){const r=n[s],o=gs(r.type);let a=ps.get(o);a||(o!==i.initialDef&&ga(o,t),ps.set(o,a=new Set)),a.add(r),r.appContext.propsCache.delete(r.type),r.appContext.emitsCache.delete(r.type),r.appContext.optionsCache.delete(r.type),r.ceReload?(a.add(r),r.ceReload(t.styles),a.delete(r)):r.parent?fs(()=>{r.job.flags&8||(xe=!0,r.parent.update(),xe=!1,a.delete(r))}):r.appContext.reload?r.appContext.reload():typeof window<"u"?window.location.reload():console.warn("[HMR] Root or manually mounted instance modified. Full reload required."),r.root.ce&&r!==r.root&&r.root.ce._removeChildStyle(o)}ha(()=>{ps.clear()})}function ga(e,t){xt(e,t);for(const i in e)i!=="__file"&&!(i in t)&&delete e[i]}function Nr(e){return(t,i)=>{try{return e(t,i)}catch(n){console.error(n),console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")}}}let ge,un=[],Tr=!1;function fn(e,...t){ge?ge.emit(e,...t):Tr||un.push({event:e,args:t})}function kr(e,t){var i,n;ge=e,ge?(ge.enabled=!0,un.forEach(({event:s,args:r})=>ge.emit(s,...r)),un=[]):typeof window<"u"&&window.HTMLElement&&!((n=(i=window.navigator)==null?void 0:i.userAgent)!=null&&n.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(r=>{kr(r,t)}),setTimeout(()=>{ge||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Tr=!0,un=[])},3e3)):(Tr=!0,un=[])}function Ed(e,t){fn("app:init",e,t,{Fragment:Ft,Text:bn,Comment:Zt,Static:Ns})}function Sd(e){fn("app:unmount",e)}const wd=Or("component:added"),ma=Or("component:updated"),xd=Or("component:removed"),Cd=e=>{ge&&typeof ge.cleanupBuffer=="function"&&!ge.cleanupBuffer(e)&&xd(e)};function Or(e){return t=>{fn(e,t.appContext.app,t.uid,t.parent?t.parent.uid:void 0,t)}}const Nd=_a("perf:start"),Td=_a("perf:end");function _a(e){return(t,i,n)=>{fn(e,t.appContext.app,t.uid,t,i,n)}}function kd(e,t,i){fn("component:emit",e.appContext.app,e,t,i)}let Gt=null,va=null;function ms(e){const t=Gt;return Gt=e,va=e&&e.type.__scopeId||null,t}function pn(e,t=Gt,i){if(!t||e._n)return e;const n=(...s)=>{n._d&&Ts(-1);const r=ms(t);let o;try{o=e(...s)}finally{ms(r),n._d&&Ts(1)}return process.env.NODE_ENV!=="production"&&ma(t),o};return n._n=!0,n._c=!0,n._d=!0,n}function ba(e){yh(e)&&U("Do not use built-in directive ids as custom directive id: "+e)}function _s(e,t){if(Gt===null)return process.env.NODE_ENV!=="production"&&U("withDirectives can only be used inside render functions."),e;const i=Rs(Gt),n=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[r,o,a,l=ht]=t[s];r&&(it(r)&&(r={mounted:r,updated:r}),r.deep&&Me(o),n.push({dir:r,instance:i,value:o,oldValue:void 0,arg:a,modifiers:l}))}return e}function mi(e,t,i,n){const s=e.dirs,r=t&&t.dirs;for(let o=0;o<s.length;o++){const a=s[o];r&&(a.oldValue=r[o].value);let l=a.dir[n];l&&(de(),Se(l,i,8,[e.el,a,e,t]),ue())}}const Od=Symbol("_vte"),Pd=e=>e.__isTeleport,Ad=Symbol("_leaveCb");function Pr(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Pr(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Le(e,t){return it(e)?xt({name:e.name},t,{setup:e}):e}function ya(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}const Ea=new WeakSet,vs=new WeakMap;function gn(e,t,i,n,s=!1){if(Q(e)){e.forEach((_,b)=>gn(_,t&&(Q(t)?t[b]:t),i,n,s));return}if(mn(n)&&!s){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&gn(e,t,i,n.component.subTree);return}const r=n.shapeFlag&4?Rs(n.component):n.el,o=s?null:r,{i:a,r:l}=e;if(process.env.NODE_ENV!=="production"&&!a){U("Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.");return}const c=t&&t.r,h=a.refs===ht?a.refs={}:a.refs,d=a.setupState,u=rt(d),f=d===ht?Ro:_=>process.env.NODE_ENV!=="production"&&(at(u,_)&&!Rt(u[_])&&U(`Template ref "${_}" used on a non-ref value. It will not work in the production build.`),Ea.has(u[_]))?!1:at(u,_),p=_=>process.env.NODE_ENV==="production"||!Ea.has(_);if(c!=null&&c!==l){if(Sa(t),Ct(c))h[c]=null,f(c)&&(d[c]=null);else if(Rt(c)){p(c)&&(c.value=null);const _=t;_.k&&(h[_.k]=null)}}if(it(l))Vi(l,a,12,[o,h]);else{const _=Ct(l),b=Rt(l);if(_||b){const S=()=>{if(e.f){const y=_?f(l)?d[l]:h[l]:p(l)||!e.k?l.value:h[e.k];if(s)Q(y)&&sr(y,r);else if(Q(y))y.includes(r)||y.push(r);else if(_)h[l]=[r],f(l)&&(d[l]=h[l]);else{const C=[r];p(l)&&(l.value=C),e.k&&(h[e.k]=C)}}else _?(h[l]=o,f(l)&&(d[l]=o)):b?(p(l)&&(l.value=o),e.k&&(h[e.k]=o)):process.env.NODE_ENV!=="production"&&U("Invalid template ref type:",l,`(${typeof l})`)};if(o){const y=()=>{S(),vs.delete(e)};y.id=-1,vs.set(e,y),Qt(y,i)}else Sa(e),S()}else process.env.NODE_ENV!=="production"&&U("Invalid template ref type:",l,`(${typeof l})`)}}function Sa(e){const t=vs.get(e);t&&(t.flags|=8,vs.delete(e))}nn().requestIdleCallback,nn().cancelIdleCallback;const mn=e=>!!e.type.__asyncLoader,Ar=e=>e.type.__isKeepAlive;function Rd(e,t){wa(e,"a",t)}function Md(e,t){wa(e,"da",t)}function wa(e,t,i=Mt){const n=e.__wdc||(e.__wdc=()=>{let s=i;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(bs(t,n,i),i){let s=i.parent;for(;s&&s.parent;)Ar(s.parent.vnode)&&Ld(n,t,i,s),s=s.parent}}function Ld(e,t,i,n){const s=bs(t,e,n,!0);Lr(()=>{sr(n[t],s)},i)}function bs(e,t,i=Mt,n=!1){if(i){const s=i[e]||(i[e]=[]),r=t.__weh||(t.__weh=(...o)=>{de();const a=wn(i),l=Se(t,i,e,o);return a(),ue(),l});return n?s.unshift(r):s.push(r),r}else if(process.env.NODE_ENV!=="production"){const s=hi(xr[e].replace(/ hook$/,""));U(`${s} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.`)}}const Ie=e=>(t,i=Mt)=>{(!xn||e==="sp")&&bs(e,(...n)=>t(...n),i)},Id=Ie("bm"),Rr=Ie("m"),Dd=Ie("bu"),Mr=Ie("u"),xa=Ie("bum"),Lr=Ie("um"),Vd=Ie("sp"),Fd=Ie("rtg"),Gd=Ie("rtc");function Bd(e,t=Mt){bs("ec",e,t)}const Hd="components";function Bi(e,t){return Wd(Hd,e,!0,t)||e}const $d=Symbol.for("v-ndc");function Wd(e,t,i=!0,n=!1){const s=Gt||Mt;if(s){const r=s.type;{const a=Kr(r,!1);if(a&&(a===t||a===Vt(t)||a===ci(Vt(t))))return r}const o=Ca(s[e]||r[e],t)||Ca(s.appContext[e],t);return!o&&n?r:(process.env.NODE_ENV!=="production"&&i&&!o&&U(`Failed to resolve ${e.slice(0,-1)}: ${t}
|
|
5
|
+
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.`),o)}else process.env.NODE_ENV!=="production"&&U(`resolve${ci(e.slice(0,-1))} can only be used in render() or setup().`)}function Ca(e,t){return e&&(e[t]||e[Vt(t)]||e[ci(Vt(t))])}function _i(e,t,i,n){let s;const r=i,o=Q(e);if(o||Ct(e)){const a=o&&Ye(e);let l=!1,c=!1;a&&(l=!Bt(e),c=fe(e),e=es(e)),s=new Array(e.length);for(let h=0,d=e.length;h<d;h++)s[h]=t(l?c?Di(pe(e[h])):pe(e[h]):e[h],h,void 0,r)}else if(typeof e=="number"){process.env.NODE_ENV!=="production"&&!Number.isInteger(e)&&U(`The v-for range expect an integer value but got ${e}.`),s=new Array(e);for(let a=0;a<e;a++)s[a]=t(a+1,a,void 0,r)}else if(ut(e))if(e[Symbol.iterator])s=Array.from(e,(a,l)=>t(a,l,void 0,r));else{const a=Object.keys(e);s=new Array(a.length);for(let l=0,c=a.length;l<c;l++){const h=a[l];s[l]=t(e[h],h,l,r)}}else s=[];return s}const Ir=e=>e?ol(e)?Rs(e):Ir(e.parent):null,vi=xt(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>process.env.NODE_ENV!=="production"?Ee(e.props):e.props,$attrs:e=>process.env.NODE_ENV!=="production"?Ee(e.attrs):e.attrs,$slots:e=>process.env.NODE_ENV!=="production"?Ee(e.slots):e.slots,$refs:e=>process.env.NODE_ENV!=="production"?Ee(e.refs):e.refs,$parent:e=>Ir(e.parent),$root:e=>Ir(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Pa(e),$forceUpdate:e=>e.f||(e.f=()=>{fs(e.update)}),$nextTick:e=>e.n||(e.n=us.bind(e.proxy)),$watch:e=>su.bind(e)}),Dr=e=>e==="_"||e==="$",Vr=(e,t)=>e!==ht&&!e.__isScriptSetup&&at(e,t),Na={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:i,setupState:n,data:s,props:r,accessCache:o,type:a,appContext:l}=e;if(process.env.NODE_ENV!=="production"&&t==="__isVue")return!0;if(t[0]!=="$"){const u=o[t];if(u!==void 0)switch(u){case 1:return n[t];case 2:return s[t];case 4:return i[t];case 3:return r[t]}else{if(Vr(n,t))return o[t]=1,n[t];if(s!==ht&&at(s,t))return o[t]=2,s[t];if(at(r,t))return o[t]=3,r[t];if(i!==ht&&at(i,t))return o[t]=4,i[t];Fr&&(o[t]=0)}}const c=vi[t];let h,d;if(c)return t==="$attrs"?(It(e.attrs,"get",""),process.env.NODE_ENV!=="production"&&ws()):process.env.NODE_ENV!=="production"&&t==="$slots"&&It(e,"get",t),c(e);if((h=a.__cssModules)&&(h=h[t]))return h;if(i!==ht&&at(i,t))return o[t]=4,i[t];if(d=l.config.globalProperties,at(d,t))return d[t];process.env.NODE_ENV!=="production"&&Gt&&(!Ct(t)||t.indexOf("__v")!==0)&&(s!==ht&&Dr(t[0])&&at(s,t)?U(`Property ${JSON.stringify(t)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`):e===Gt&&U(`Property ${JSON.stringify(t)} was accessed during render but is not defined on instance.`))},set({_:e},t,i){const{data:n,setupState:s,ctx:r}=e;return Vr(s,t)?(s[t]=i,!0):process.env.NODE_ENV!=="production"&&s.__isScriptSetup&&at(s,t)?(U(`Cannot mutate <script setup> binding "${t}" from Options API.`),!1):n!==ht&&at(n,t)?(n[t]=i,!0):at(e.props,t)?(process.env.NODE_ENV!=="production"&&U(`Attempting to mutate prop "${t}". Props are readonly.`),!1):t[0]==="$"&&t.slice(1)in e?(process.env.NODE_ENV!=="production"&&U(`Attempting to mutate public property "${t}". Properties starting with $ are reserved and readonly.`),!1):(process.env.NODE_ENV!=="production"&&t in e.appContext.config.globalProperties?Object.defineProperty(r,t,{enumerable:!0,configurable:!0,value:i}):r[t]=i,!0)},has({_:{data:e,setupState:t,accessCache:i,ctx:n,appContext:s,props:r,type:o}},a){let l;return!!(i[a]||e!==ht&&a[0]!=="$"&&at(e,a)||Vr(t,a)||at(r,a)||at(n,a)||at(vi,a)||at(s.config.globalProperties,a)||(l=o.__cssModules)&&l[a])},defineProperty(e,t,i){return i.get!=null?e._.accessCache[t]=0:at(i,"value")&&this.set(e,t,i.value,null),Reflect.defineProperty(e,t,i)}};process.env.NODE_ENV!=="production"&&(Na.ownKeys=e=>(U("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."),Reflect.ownKeys(e)));function Ud(e){const t={};return Object.defineProperty(t,"_",{configurable:!0,enumerable:!1,get:()=>e}),Object.keys(vi).forEach(i=>{Object.defineProperty(t,i,{configurable:!0,enumerable:!1,get:()=>vi[i](e),set:Lt})}),t}function jd(e){const{ctx:t,propsOptions:[i]}=e;i&&Object.keys(i).forEach(n=>{Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>e.props[n],set:Lt})})}function Xd(e){const{ctx:t,setupState:i}=e;Object.keys(rt(i)).forEach(n=>{if(!i.__isScriptSetup){if(Dr(n[0])){U(`setup() return property ${JSON.stringify(n)} should not start with "$" or "_" which are reserved prefixes for Vue internals.`);return}Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i[n],set:Lt})}})}function Ta(e){return Q(e)?e.reduce((t,i)=>(t[i]=null,t),{}):e}function zd(){const e=Object.create(null);return(t,i)=>{e[i]?U(`${t} property "${i}" is already defined in ${e[i]}.`):e[i]=t}}let Fr=!0;function Yd(e){const t=Pa(e),i=e.proxy,n=e.ctx;Fr=!1,t.beforeCreate&&ka(t.beforeCreate,e,"bc");const{data:s,computed:r,methods:o,watch:a,provide:l,inject:c,created:h,beforeMount:d,mounted:u,beforeUpdate:f,updated:p,activated:_,deactivated:b,beforeDestroy:S,beforeUnmount:y,destroyed:C,unmounted:N,render:T,renderTracked:O,renderTriggered:w,errorCaptured:x,serverPrefetch:P,expose:B,inheritAttrs:K,components:z,directives:Z,filters:J}=t,A=process.env.NODE_ENV!=="production"?zd():null;if(process.env.NODE_ENV!=="production"){const[H]=e.propsOptions;if(H)for(const D in H)A("Props",D)}if(c&&qd(c,n,A),o)for(const H in o){const D=o[H];it(D)?(process.env.NODE_ENV!=="production"?Object.defineProperty(n,H,{value:D.bind(i),configurable:!0,enumerable:!0,writable:!0}):n[H]=D.bind(i),process.env.NODE_ENV!=="production"&&A("Methods",H)):process.env.NODE_ENV!=="production"&&U(`Method "${H}" has type "${typeof D}" in the component definition. Did you reference the function correctly?`)}if(s){process.env.NODE_ENV!=="production"&&!it(s)&&U("The data option must be a function. Plain object usage is no longer supported.");const H=s.call(i,i);if(process.env.NODE_ENV!=="production"&&rr(H)&&U("data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>."),!ut(H))process.env.NODE_ENV!=="production"&&U("data() should return an object.");else if(e.data=cn(H),process.env.NODE_ENV!=="production")for(const D in H)A("Data",D),Dr(D[0])||Object.defineProperty(n,D,{configurable:!0,enumerable:!0,get:()=>H[D],set:Lt})}if(Fr=!0,r)for(const H in r){const D=r[H],nt=it(D)?D.bind(i,i):it(D.get)?D.get.bind(i,i):Lt;process.env.NODE_ENV!=="production"&&nt===Lt&&U(`Computed property "${H}" has no getter.`);const ct=!it(D)&&it(D.set)?D.set.bind(i):process.env.NODE_ENV!=="production"?()=>{U(`Write operation failed: computed property "${H}" is readonly.`)}:Lt,ot=Ms({get:nt,set:ct});Object.defineProperty(n,H,{enumerable:!0,configurable:!0,get:()=>ot.value,set:gt=>ot.value=gt}),process.env.NODE_ENV!=="production"&&A("Computed",H)}if(a)for(const H in a)Oa(a[H],n,i,H);if(l){const H=it(l)?l.call(i):l;Reflect.ownKeys(H).forEach(D=>{eu(D,H[D])})}h&&ka(h,e,"c");function L(H,D){Q(D)?D.forEach(nt=>H(nt.bind(i))):D&&H(D.bind(i))}if(L(Id,d),L(Rr,u),L(Dd,f),L(Mr,p),L(Rd,_),L(Md,b),L(Bd,x),L(Gd,O),L(Fd,w),L(xa,y),L(Lr,N),L(Vd,P),Q(B))if(B.length){const H=e.exposed||(e.exposed={});B.forEach(D=>{Object.defineProperty(H,D,{get:()=>i[D],set:nt=>i[D]=nt,enumerable:!0})})}else e.exposed||(e.exposed={});T&&e.render===Lt&&(e.render=T),K!=null&&(e.inheritAttrs=K),z&&(e.components=z),Z&&(e.directives=Z),P&&ya(e)}function qd(e,t,i=Lt){Q(e)&&(e=Gr(e));for(const n in e){const s=e[n];let r;ut(s)?"default"in s?r=Es(s.from||n,s.default,!0):r=Es(s.from||n):r=Es(s),Rt(r)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>r.value,set:o=>r.value=o}):t[n]=r,process.env.NODE_ENV!=="production"&&i("Inject",n)}}function ka(e,t,i){Se(Q(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,i)}function Oa(e,t,i,n){let s=n.includes(".")?Ia(i,n):()=>i[n];if(Ct(e)){const r=t[e];it(r)?bi(s,r):process.env.NODE_ENV!=="production"&&U(`Invalid watch handler specified by key "${e}"`,r)}else if(it(e))bi(s,e.bind(i));else if(ut(e))if(Q(e))e.forEach(r=>Oa(r,t,i,n));else{const r=it(e.handler)?e.handler.bind(i):t[e.handler];it(r)?bi(s,r,e):process.env.NODE_ENV!=="production"&&U(`Invalid watch handler specified by key "${e.handler}"`,r)}else process.env.NODE_ENV!=="production"&&U(`Invalid watch option: "${n}"`,e)}function Pa(e){const t=e.type,{mixins:i,extends:n}=t,{mixins:s,optionsCache:r,config:{optionMergeStrategies:o}}=e.appContext,a=r.get(t);let l;return a?l=a:!s.length&&!i&&!n?l=t:(l={},s.length&&s.forEach(c=>ys(l,c,o,!0)),ys(l,t,o)),ut(t)&&r.set(t,l),l}function ys(e,t,i,n=!1){const{mixins:s,extends:r}=t;r&&ys(e,r,i,!0),s&&s.forEach(o=>ys(e,o,i,!0));for(const o in t)if(n&&o==="expose")process.env.NODE_ENV!=="production"&&U('"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.');else{const a=Kd[o]||i&&i[o];e[o]=a?a(e[o],t[o]):t[o]}return e}const Kd={data:Aa,props:Ra,emits:Ra,methods:_n,computed:_n,beforeCreate:$t,created:$t,beforeMount:$t,mounted:$t,beforeUpdate:$t,updated:$t,beforeDestroy:$t,beforeUnmount:$t,destroyed:$t,unmounted:$t,activated:$t,deactivated:$t,errorCaptured:$t,serverPrefetch:$t,components:_n,directives:_n,watch:Qd,provide:Aa,inject:Jd};function Aa(e,t){return t?e?function(){return xt(it(e)?e.call(this,this):e,it(t)?t.call(this,this):t)}:t:e}function Jd(e,t){return _n(Gr(e),Gr(t))}function Gr(e){if(Q(e)){const t={};for(let i=0;i<e.length;i++)t[e[i]]=e[i];return t}return e}function $t(e,t){return e?[...new Set([].concat(e,t))]:t}function _n(e,t){return e?xt(Object.create(null),e,t):t}function Ra(e,t){return e?Q(e)&&Q(t)?[...new Set([...e,...t])]:xt(Object.create(null),Ta(e),Ta(t??{})):t}function Qd(e,t){if(!e)return t;if(!t)return e;const i=xt(Object.create(null),e);for(const n in t)i[n]=$t(e[n],t[n]);return i}function Ma(){return{app:null,config:{isNativeTag:Ro,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Zd=0;function tu(e,t){return function(n,s=null){it(n)||(n=xt({},n)),s!=null&&!ut(s)&&(process.env.NODE_ENV!=="production"&&U("root props passed to app.mount() must be an object."),s=null);const r=Ma(),o=new WeakSet,a=[];let l=!1;const c=r.app={_uid:Zd++,_component:n,_props:s,_container:null,_context:r,_instance:null,version:ul,get config(){return r.config},set config(h){process.env.NODE_ENV!=="production"&&U("app.config cannot be replaced. Modify individual options instead.")},use(h,...d){return o.has(h)?process.env.NODE_ENV!=="production"&&U("Plugin has already been applied to target app."):h&&it(h.install)?(o.add(h),h.install(c,...d)):it(h)?(o.add(h),h(c,...d)):process.env.NODE_ENV!=="production"&&U('A plugin must either be a function or an object with an "install" function.'),c},mixin(h){return r.mixins.includes(h)?process.env.NODE_ENV!=="production"&&U("Mixin has already been applied to target app"+(h.name?`: ${h.name}`:"")):r.mixins.push(h),c},component(h,d){return process.env.NODE_ENV!=="production"&&qr(h,r.config),d?(process.env.NODE_ENV!=="production"&&r.components[h]&&U(`Component "${h}" has already been registered in target app.`),r.components[h]=d,c):r.components[h]},directive(h,d){return process.env.NODE_ENV!=="production"&&ba(h),d?(process.env.NODE_ENV!=="production"&&r.directives[h]&&U(`Directive "${h}" has already been registered in target app.`),r.directives[h]=d,c):r.directives[h]},mount(h,d,u){if(l)process.env.NODE_ENV!=="production"&&U("App has already been mounted.\nIf you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. `const createMyApp = () => createApp(App)`");else{process.env.NODE_ENV!=="production"&&h.__vue_app__&&U("There is already an app instance mounted on the host container.\n If you want to mount another app on the same host container, you need to unmount the previous app by calling `app.unmount()` first.");const f=c._ceVNode||Tt(n,s);return f.appContext=r,u===!0?u="svg":u===!1&&(u=void 0),process.env.NODE_ENV!=="production"&&(r.reload=()=>{const p=Je(f);p.el=null,e(p,h,u)}),e(f,h,u),l=!0,c._container=h,h.__vue_app__=c,process.env.NODE_ENV!=="production"&&(c._instance=f.component,Ed(c,ul)),Rs(f.component)}},onUnmount(h){process.env.NODE_ENV!=="production"&&typeof h!="function"&&U(`Expected function as first argument to app.onUnmount(), but got ${typeof h}`),a.push(h)},unmount(){l?(Se(a,c._instance,16),e(null,c._container),process.env.NODE_ENV!=="production"&&(c._instance=null,Sd(c)),delete c._container.__vue_app__):process.env.NODE_ENV!=="production"&&U("Cannot unmount an app that is not mounted.")},provide(h,d){return process.env.NODE_ENV!=="production"&&h in r.provides&&(at(r.provides,h)?U(`App already provides property with key "${String(h)}". It will be overwritten with the new value.`):U(`App already provides property with key "${String(h)}" inherited from its parent element. It will be overwritten with the new value.`)),r.provides[h]=d,c},runWithContext(h){const d=Hi;Hi=c;try{return h()}finally{Hi=d}}};return c}}let Hi=null;function eu(e,t){if(process.env.NODE_ENV!=="production"&&(!Mt||Mt.isMounted)&&U("provide() can only be used inside setup()."),Mt){let i=Mt.provides;const n=Mt.parent&&Mt.parent.provides;n===i&&(i=Mt.provides=Object.create(n)),i[e]=t}}function Es(e,t,i=!1){const n=Ps();if(n||Hi){let s=Hi?Hi._context.provides:n?n.parent==null||n.ce?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:void 0;if(s&&e in s)return s[e];if(arguments.length>1)return i&&it(t)?t.call(n&&n.proxy):t;process.env.NODE_ENV!=="production"&&U(`injection "${String(e)}" not found.`)}else process.env.NODE_ENV!=="production"&&U("inject() can only be used inside setup() or functional components.")}const iu=Symbol.for("v-scx"),nu=()=>{{const e=Es(iu);return e||process.env.NODE_ENV!=="production"&&U("Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build."),e}};function bi(e,t,i){return process.env.NODE_ENV!=="production"&&!it(t)&&U("`watch(fn, options?)` signature has been moved to a separate API. Use `watchEffect(fn, options?)` instead. `watch` now only supports `watch(source, cb, options?) signature."),La(e,t,i)}function La(e,t,i=ht){const{immediate:n,deep:s,flush:r,once:o}=i;process.env.NODE_ENV!=="production"&&!t&&(n!==void 0&&U('watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'),s!==void 0&&U('watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'),o!==void 0&&U('watch() "once" option is only respected when using the watch(source, callback, options?) signature.'));const a=xt({},i);process.env.NODE_ENV!=="production"&&(a.onWarn=U);const l=t&&n||!t&&r!=="post";let c;if(xn){if(r==="sync"){const f=nu();c=f.__watcherHandles||(f.__watcherHandles=[])}else if(!l){const f=()=>{};return f.stop=Lt,f.resume=Lt,f.pause=Lt,f}}const h=Mt;a.call=(f,p,_)=>Se(f,h,p,_);let d=!1;r==="post"?a.scheduler=f=>{Qt(f,h&&h.suspense)}:r!=="sync"&&(d=!0,a.scheduler=(f,p)=>{p?f():fs(f)}),a.augmentJob=f=>{t&&(f.flags|=4),d&&(f.flags|=2,h&&(f.id=h.uid,f.i=h))};const u=cd(e,t,a);return xn&&(c?c.push(u):l&&u()),u}function su(e,t,i){const n=this.proxy,s=Ct(e)?e.includes(".")?Ia(n,e):()=>n[e]:e.bind(n,n);let r;it(t)?r=t:(r=t.handler,i=t);const o=wn(this),a=La(s,r.bind(n),i);return o(),a}function Ia(e,t){const i=t.split(".");return()=>{let n=e;for(let s=0;s<i.length&&n;s++)n=n[i[s]];return n}}const ru=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Vt(t)}Modifiers`]||e[`${Jt(t)}Modifiers`];function ou(e,t,...i){if(e.isUnmounted)return;const n=e.vnode.props||ht;if(process.env.NODE_ENV!=="production"){const{emitsOptions:h,propsOptions:[d]}=e;if(h)if(!(t in h))(!d||!(hi(Vt(t))in d))&&U(`Component emitted event "${t}" but it is neither declared in the emits option nor as an "${hi(Vt(t))}" prop.`);else{const u=h[t];it(u)&&(u(...i)||U(`Invalid event arguments: event validation failed for event "${t}".`))}}let s=i;const r=t.startsWith("update:"),o=r&&ru(n,t.slice(7));if(o&&(o.trim&&(s=i.map(h=>Ct(h)?h.trim():h)),o.number&&(s=i.map(ts))),process.env.NODE_ENV!=="production"&&kd(e,t,s),process.env.NODE_ENV!=="production"){const h=t.toLowerCase();h!==t&&n[hi(h)]&&U(`Event "${h}" is emitted in component ${Cn(e,e.type)} but the handler is registered for "${t}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${Jt(t)}" instead of "${t}".`)}let a,l=n[a=hi(t)]||n[a=hi(Vt(t))];!l&&r&&(l=n[a=hi(Jt(t))]),l&&Se(l,e,6,s);const c=n[a+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,Se(c,e,6,s)}}const au=new WeakMap;function Da(e,t,i=!1){const n=i?au:t.emitsCache,s=n.get(e);if(s!==void 0)return s;const r=e.emits;let o={},a=!1;if(!it(e)){const l=c=>{const h=Da(c,t,!0);h&&(a=!0,xt(o,h))};!i&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!r&&!a?(ut(e)&&n.set(e,null),null):(Q(r)?r.forEach(l=>o[l]=null):xt(o,r),ut(e)&&n.set(e,o),o)}function Ss(e,t){return!e||!Zi(t)?!1:(t=t.slice(2).replace(/Once$/,""),at(e,t[0].toLowerCase()+t.slice(1))||at(e,Jt(t))||at(e,t))}let Br=!1;function ws(){Br=!0}function Va(e){const{type:t,vnode:i,proxy:n,withProxy:s,propsOptions:[r],slots:o,attrs:a,emit:l,render:c,renderCache:h,props:d,data:u,setupState:f,ctx:p,inheritAttrs:_}=e,b=ms(e);let S,y;process.env.NODE_ENV!=="production"&&(Br=!1);try{if(i.shapeFlag&4){const T=s||n,O=process.env.NODE_ENV!=="production"&&f.__isScriptSetup?new Proxy(T,{get(w,x,P){return U(`Property '${String(x)}' was accessed via 'this'. Avoid using 'this' in templates.`),Reflect.get(w,x,P)}}):T;S=me(c.call(O,T,h,process.env.NODE_ENV!=="production"?Ee(d):d,f,u,p)),y=a}else{const T=t;process.env.NODE_ENV!=="production"&&a===d&&ws(),S=me(T.length>1?T(process.env.NODE_ENV!=="production"?Ee(d):d,process.env.NODE_ENV!=="production"?{get attrs(){return ws(),Ee(a)},slots:o,emit:l}:{attrs:a,slots:o,emit:l}):T(process.env.NODE_ENV!=="production"?Ee(d):d,null)),y=t.props?a:lu(a)}}catch(T){yn.length=0,hn(T,e,1),S=Tt(Zt)}let C=S,N;if(process.env.NODE_ENV!=="production"&&S.patchFlag>0&&S.patchFlag&2048&&([C,N]=Fa(S)),y&&_!==!1){const T=Object.keys(y),{shapeFlag:O}=C;if(T.length){if(O&7)r&&T.some(Kn)&&(y=cu(y,r)),C=Je(C,y,!1,!0);else if(process.env.NODE_ENV!=="production"&&!Br&&C.type!==Zt){const w=Object.keys(a),x=[],P=[];for(let B=0,K=w.length;B<K;B++){const z=w[B];Zi(z)?Kn(z)||x.push(z[2].toLowerCase()+z.slice(3)):P.push(z)}P.length&&U(`Extraneous non-props attributes (${P.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.`),x.length&&U(`Extraneous non-emits event listeners (${x.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.`)}}}return i.dirs&&(process.env.NODE_ENV!=="production"&&!Ga(C)&&U("Runtime directive used on component with non-element root node. The directives will not function as intended."),C=Je(C,null,!1,!0),C.dirs=C.dirs?C.dirs.concat(i.dirs):i.dirs),i.transition&&(process.env.NODE_ENV!=="production"&&!Ga(C)&&U("Component inside <Transition> renders non-element root node that cannot be animated."),Pr(C,i.transition)),process.env.NODE_ENV!=="production"&&N?N(C):S=C,ms(b),S}const Fa=e=>{const t=e.children,i=e.dynamicChildren,n=Hr(t,!1);if(n){if(process.env.NODE_ENV!=="production"&&n.patchFlag>0&&n.patchFlag&2048)return Fa(n)}else return[e,void 0];const s=t.indexOf(n),r=i?i.indexOf(n):-1,o=a=>{t[s]=a,i&&(r>-1?i[r]=a:a.patchFlag>0&&(e.dynamicChildren=[...i,a]))};return[me(n),o]};function Hr(e,t=!0){let i;for(let n=0;n<e.length;n++){const s=e[n];if(Ui(s)){if(s.type!==Zt||s.children==="v-if"){if(i)return;if(i=s,process.env.NODE_ENV!=="production"&&t&&i.patchFlag>0&&i.patchFlag&2048)return Hr(i.children)}}else return}return i}const lu=e=>{let t;for(const i in e)(i==="class"||i==="style"||Zi(i))&&((t||(t={}))[i]=e[i]);return t},cu=(e,t)=>{const i={};for(const n in e)(!Kn(n)||!(n.slice(9)in t))&&(i[n]=e[n]);return i},Ga=e=>e.shapeFlag&7||e.type===Zt;function hu(e,t,i){const{props:n,children:s,component:r}=e,{props:o,children:a,patchFlag:l}=t,c=r.emitsOptions;if(process.env.NODE_ENV!=="production"&&(s||a)&&xe||t.dirs||t.transition)return!0;if(i&&l>=0){if(l&1024)return!0;if(l&16)return n?Ba(n,o,c):!!o;if(l&8){const h=t.dynamicProps;for(let d=0;d<h.length;d++){const u=h[d];if(o[u]!==n[u]&&!Ss(c,u))return!0}}}else return(s||a)&&(!a||!a.$stable)?!0:n===o?!1:n?o?Ba(n,o,c):!0:!!o;return!1}function Ba(e,t,i){const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!0;for(let s=0;s<n.length;s++){const r=n[s];if(t[r]!==e[r]&&!Ss(i,r))return!0}return!1}function du({vnode:e,parent:t},i){for(;t;){const n=t.subTree;if(n.suspense&&n.suspense.activeBranch===e&&(n.el=e.el),n===e)(e=t.vnode).el=i,t=t.parent;else break}}const Ha={},$a=()=>Object.create(Ha),Wa=e=>Object.getPrototypeOf(e)===Ha;function uu(e,t,i,n=!1){const s={},r=$a();e.propsDefaults=Object.create(null),Ua(e,t,s,r);for(const o in e.propsOptions[0])o in s||(s[o]=void 0);process.env.NODE_ENV!=="production"&&za(t||{},s,e),i?e.props=n?s:ed(s):e.type.props?e.props=s:e.props=r,e.attrs=r}function fu(e){for(;e;){if(e.type.__hmrId)return!0;e=e.parent}}function pu(e,t,i,n){const{props:s,attrs:r,vnode:{patchFlag:o}}=e,a=rt(s),[l]=e.propsOptions;let c=!1;if(!(process.env.NODE_ENV!=="production"&&fu(e))&&(n||o>0)&&!(o&16)){if(o&8){const h=e.vnode.dynamicProps;for(let d=0;d<h.length;d++){let u=h[d];if(Ss(e.emitsOptions,u))continue;const f=t[u];if(l)if(at(r,u))f!==r[u]&&(r[u]=f,c=!0);else{const p=Vt(u);s[p]=$r(l,a,p,f,e,!1)}else f!==r[u]&&(r[u]=f,c=!0)}}}else{Ua(e,t,s,r)&&(c=!0);let h;for(const d in a)(!t||!at(t,d)&&((h=Jt(d))===d||!at(t,h)))&&(l?i&&(i[d]!==void 0||i[h]!==void 0)&&(s[d]=$r(l,a,d,void 0,e,!0)):delete s[d]);if(r!==a)for(const d in r)(!t||!at(t,d))&&(delete r[d],c=!0)}c&&ye(e.attrs,"set",""),process.env.NODE_ENV!=="production"&&za(t||{},s,e)}function Ua(e,t,i,n){const[s,r]=e.propsOptions;let o=!1,a;if(t)for(let l in t){if(en(l))continue;const c=t[l];let h;s&&at(s,h=Vt(l))?!r||!r.includes(h)?i[h]=c:(a||(a={}))[h]=c:Ss(e.emitsOptions,l)||(!(l in n)||c!==n[l])&&(n[l]=c,o=!0)}if(r){const l=rt(i),c=a||ht;for(let h=0;h<r.length;h++){const d=r[h];i[d]=$r(s,l,d,c[d],e,!at(c,d))}}return o}function $r(e,t,i,n,s,r){const o=e[i];if(o!=null){const a=at(o,"default");if(a&&n===void 0){const l=o.default;if(o.type!==Function&&!o.skipFactory&&it(l)){const{propsDefaults:c}=s;if(i in c)n=c[i];else{const h=wn(s);n=c[i]=l.call(null,t),h()}}else n=l;s.ce&&s.ce._setProp(i,n)}o[0]&&(r&&!a?n=!1:o[1]&&(n===""||n===Jt(i))&&(n=!0))}return n}const gu=new WeakMap;function ja(e,t,i=!1){const n=i?gu:t.propsCache,s=n.get(e);if(s)return s;const r=e.props,o={},a=[];let l=!1;if(!it(e)){const h=d=>{l=!0;const[u,f]=ja(d,t,!0);xt(o,u),f&&a.push(...f)};!i&&t.mixins.length&&t.mixins.forEach(h),e.extends&&h(e.extends),e.mixins&&e.mixins.forEach(h)}if(!r&&!l)return ut(e)&&n.set(e,Ai),Ai;if(Q(r))for(let h=0;h<r.length;h++){process.env.NODE_ENV!=="production"&&!Ct(r[h])&&U("props must be strings when using array syntax.",r[h]);const d=Vt(r[h]);Xa(d)&&(o[d]=ht)}else if(r){process.env.NODE_ENV!=="production"&&!ut(r)&&U("invalid props options",r);for(const h in r){const d=Vt(h);if(Xa(d)){const u=r[h],f=o[d]=Q(u)||it(u)?{type:u}:xt({},u),p=f.type;let _=!1,b=!0;if(Q(p))for(let S=0;S<p.length;++S){const y=p[S],C=it(y)&&y.name;if(C==="Boolean"){_=!0;break}else C==="String"&&(b=!1)}else _=it(p)&&p.name==="Boolean";f[0]=_,f[1]=b,(_||at(f,"default"))&&a.push(d)}}}const c=[o,a];return ut(e)&&n.set(e,c),c}function Xa(e){return e[0]!=="$"&&!en(e)?!0:(process.env.NODE_ENV!=="production"&&U(`Invalid prop name: "${e}" is a reserved property.`),!1)}function mu(e){return e===null?"null":typeof e=="function"?e.name||"":typeof e=="object"&&e.constructor&&e.constructor.name||""}function za(e,t,i){const n=rt(t),s=i.propsOptions[0],r=Object.keys(e).map(o=>Vt(o));for(const o in s){let a=s[o];a!=null&&_u(o,n[o],a,process.env.NODE_ENV!=="production"?Ee(n):n,!r.includes(o))}}function _u(e,t,i,n,s){const{type:r,required:o,validator:a,skipCheck:l}=i;if(o&&s){U('Missing required prop: "'+e+'"');return}if(!(t==null&&!o)){if(r!=null&&r!==!0&&!l){let c=!1;const h=Q(r)?r:[r],d=[];for(let u=0;u<h.length&&!c;u++){const{valid:f,expectedType:p}=bu(t,h[u]);d.push(p||""),c=f}if(!c){U(yu(e,t,d));return}}a&&!a(t,n)&&U('Invalid prop: custom validator check failed for prop "'+e+'".')}}const vu=Kt("String,Number,Boolean,Function,Symbol,BigInt");function bu(e,t){let i;const n=mu(t);if(n==="null")i=e===null;else if(vu(n)){const s=typeof e;i=s===n.toLowerCase(),!i&&s==="object"&&(i=e instanceof t)}else n==="Object"?i=ut(e):n==="Array"?i=Q(e):i=e instanceof t;return{valid:i,expectedType:n}}function yu(e,t,i){if(i.length===0)return`Prop type [] for prop "${e}" won't match anything. Did you mean to use type Array instead?`;let n=`Invalid prop: type check failed for prop "${e}". Expected ${i.map(ci).join(" | ")}`;const s=i[0],r=or(t),o=Ya(t,s),a=Ya(t,r);return i.length===1&&qa(s)&&!Eu(s,r)&&(n+=` with value ${o}`),n+=`, got ${r} `,qa(r)&&(n+=`with value ${a}.`),n}function Ya(e,t){return t==="String"?`"${e}"`:t==="Number"?`${Number(e)}`:`${e}`}function qa(e){return["string","number","boolean"].some(i=>e.toLowerCase()===i)}function Eu(...e){return e.some(t=>t.toLowerCase()==="boolean")}const Wr=e=>e==="_"||e==="_ctx"||e==="$stable",Ur=e=>Q(e)?e.map(me):[me(e)],Su=(e,t,i)=>{if(t._n)return t;const n=pn((...s)=>(process.env.NODE_ENV!=="production"&&Mt&&!(i===null&&Gt)&&!(i&&i.root!==Mt.root)&&U(`Slot "${e}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`),Ur(t(...s))),i);return n._c=!1,n},Ka=(e,t,i)=>{const n=e._ctx;for(const s in e){if(Wr(s))continue;const r=e[s];if(it(r))t[s]=Su(s,r,n);else if(r!=null){process.env.NODE_ENV!=="production"&&U(`Non-function value encountered for slot "${s}". Prefer function slots for better performance.`);const o=Ur(r);t[s]=()=>o}}},Ja=(e,t)=>{process.env.NODE_ENV!=="production"&&!Ar(e.vnode)&&U("Non-function value encountered for default slot. Prefer function slots for better performance.");const i=Ur(t);e.slots.default=()=>i},jr=(e,t,i)=>{for(const n in t)(i||!Wr(n))&&(e[n]=t[n])},wu=(e,t,i)=>{const n=e.slots=$a();if(e.vnode.shapeFlag&32){const s=t._;s?(jr(n,t,i),i&&Zn(n,"_",s,!0)):Ka(t,n)}else t&&Ja(e,t)},xu=(e,t,i)=>{const{vnode:n,slots:s}=e;let r=!0,o=ht;if(n.shapeFlag&32){const a=t._;a?process.env.NODE_ENV!=="production"&&xe?(jr(s,t,i),ye(e,"set","$slots")):i&&a===1?r=!1:jr(s,t,i):(r=!t.$stable,Ka(t,s)),o=t}else t&&(Ja(e,t),o={default:1});if(r)for(const a in s)!Wr(a)&&o[a]==null&&delete s[a]};let vn,De;function $i(e,t){e.appContext.config.performance&&xs()&&De.mark(`vue-${t}-${e.uid}`),process.env.NODE_ENV!=="production"&&Nd(e,t,xs()?De.now():Date.now())}function Wi(e,t){if(e.appContext.config.performance&&xs()){const i=`vue-${t}-${e.uid}`,n=i+":end",s=`<${Cn(e,e.type)}> ${t}`;De.mark(n),De.measure(s,i,n),De.clearMeasures(s),De.clearMarks(i),De.clearMarks(n)}process.env.NODE_ENV!=="production"&&Td(e,t,xs()?De.now():Date.now())}function xs(){return vn!==void 0||(typeof window<"u"&&window.performance?(vn=!0,De=window.performance):vn=!1),vn}function Cu(){const e=[];if(process.env.NODE_ENV!=="production"&&e.length){const t=e.length>1;console.warn(`Feature flag${t?"s":""} ${e.join(", ")} ${t?"are":"is"} not explicitly defined. You are running the esm-bundler build of Vue, which expects these compile-time feature flags to be globally injected via the bundler config in order to get better tree-shaking in the production bundle.
|
|
6
6
|
|
|
7
|
-
For more details, see https://link.vuejs.org/feature-flags.`)}}const Qt=Pu;function Nu(e){return Tu(e)}function Tu(e,t){Cu();const i=nn();i.__VUE__=!0,process.env.NODE_ENV!=="production"&&kr(i.__VUE_DEVTOOLS_GLOBAL_HOOK__,i);const{insert:n,remove:s,patchProp:r,createElement:o,createText:a,createComment:l,setText:c,setElementText:h,parentNode:d,nextSibling:u,setScopeId:f=Lt,insertStaticContent:p}=e,_=(g,v,k,F=null,R=null,M=null,Y=void 0,j=null,W=process.env.NODE_ENV!=="production"&&xe?!1:!!v.dynamicChildren)=>{if(g===v)return;g&&!Sn(g,v)&&(F=ve(g),Ot(g,R,M,!0),g=null),v.patchFlag===-2&&(W=!1,v.dynamicChildren=null);const{type:I,ref:et,shapeFlag:q}=v;switch(I){case bn:b(g,v,k,F);break;case Zt:S(g,v,k,F);break;case Ns:g==null?y(v,k,F,Y):process.env.NODE_ENV!=="production"&&C(g,v,k,Y);break;case Ft:Z(g,v,k,F,R,M,Y,j,W);break;default:q&1?O(g,v,k,F,R,M,Y,j,W):q&6?J(g,v,k,F,R,M,Y,j,W):q&64||q&128?I.process(g,v,k,F,R,M,Y,j,W,Yn):process.env.NODE_ENV!=="production"&&U("Invalid VNode type:",I,`(${typeof I})`)}et!=null&&R?gn(et,g&&g.ref,M,v||g,!v):et==null&&g&&g.ref!=null&&gn(g.ref,null,M,g,!0)},b=(g,v,k,F)=>{if(g==null)n(v.el=a(v.children),k,F);else{const R=v.el=g.el;v.children!==g.children&&c(R,v.children)}},S=(g,v,k,F)=>{g==null?n(v.el=l(v.children||""),k,F):v.el=g.el},y=(g,v,k,F)=>{[g.el,g.anchor]=p(g.children,v,k,F,g.el,g.anchor)},C=(g,v,k,F)=>{if(v.children!==g.children){const R=u(g.anchor);T(g),[v.el,v.anchor]=p(v.children,k,R,F)}else v.el=g.el,v.anchor=g.anchor},N=({el:g,anchor:v},k,F)=>{let R;for(;g&&g!==v;)R=u(g),n(g,k,F),g=R;n(v,k,F)},T=({el:g,anchor:v})=>{let k;for(;g&&g!==v;)k=u(g),s(g),g=k;s(v)},O=(g,v,k,F,R,M,Y,j,W)=>{if(v.type==="svg"?Y="svg":v.type==="math"&&(Y="mathml"),g==null)w(v,k,F,R,M,Y,j,W);else{const I=g.el&&g.el._isVueCE?g.el:null;try{I&&I._beginPatch(),B(g,v,R,M,Y,j,W)}finally{I&&I._endPatch()}}},w=(g,v,k,F,R,M,Y,j)=>{let W,I;const{props:et,shapeFlag:q,transition:tt,dirs:st}=g;if(W=g.el=o(g.type,M,et&&et.is,et),q&8?h(W,g.children):q&16&&P(g.children,W,null,F,R,Xr(g,M),Y,j),st&&mi(g,null,F,"created"),x(W,g,g.scopeId,Y,F),et){for(const bt in et)bt!=="value"&&!en(bt)&&r(W,bt,null,et[bt],M,F);"value"in et&&r(W,"value",null,et.value,M),(I=et.onVnodeBeforeMount)&&Ce(I,F,g)}process.env.NODE_ENV!=="production"&&(Zn(W,"__vnode",g,!0),Zn(W,"__vueParentComponent",F,!0)),st&&mi(g,null,F,"beforeMount");const dt=ku(R,tt);dt&&tt.beforeEnter(W),n(W,v,k),((I=et&&et.onVnodeMounted)||dt||st)&&Qt(()=>{I&&Ce(I,F,g),dt&&tt.enter(W),st&&mi(g,null,F,"mounted")},R)},x=(g,v,k,F,R)=>{if(k&&f(g,k),F)for(let M=0;M<F.length;M++)f(g,F[M]);if(R){let M=R.subTree;if(process.env.NODE_ENV!=="production"&&M.patchFlag>0&&M.patchFlag&2048&&(M=Hr(M.children)||M),v===M||el(M.type)&&(M.ssContent===v||M.ssFallback===v)){const Y=R.vnode;x(g,Y,Y.scopeId,Y.slotScopeIds,R.parent)}}},P=(g,v,k,F,R,M,Y,j,W=0)=>{for(let I=W;I<g.length;I++){const et=g[I]=j?Qe(g[I]):me(g[I]);_(null,et,v,k,F,R,M,Y,j)}},B=(g,v,k,F,R,M,Y)=>{const j=v.el=g.el;process.env.NODE_ENV!=="production"&&(j.__vnode=v);let{patchFlag:W,dynamicChildren:I,dirs:et}=v;W|=g.patchFlag&16;const q=g.props||ht,tt=v.props||ht;let st;if(k&&yi(k,!1),(st=tt.onVnodeBeforeUpdate)&&Ce(st,k,v,g),et&&mi(v,g,k,"beforeUpdate"),k&&yi(k,!0),process.env.NODE_ENV!=="production"&&xe&&(W=0,Y=!1,I=null),(q.innerHTML&&tt.innerHTML==null||q.textContent&&tt.textContent==null)&&h(j,""),I?(K(g.dynamicChildren,I,j,k,F,Xr(v,R),M),process.env.NODE_ENV!=="production"&&Cs(g,v)):Y||nt(g,v,j,null,k,F,Xr(v,R),M,!1),W>0){if(W&16)z(j,q,tt,k,R);else if(W&2&&q.class!==tt.class&&r(j,"class",null,tt.class,R),W&4&&r(j,"style",q.style,tt.style,R),W&8){const dt=v.dynamicProps;for(let bt=0;bt<dt.length;bt++){const _t=dt[bt],Yt=q[_t],qt=tt[_t];(qt!==Yt||_t==="value")&&r(j,_t,Yt,qt,R,k)}}W&1&&g.children!==v.children&&h(j,v.children)}else!Y&&I==null&&z(j,q,tt,k,R);((st=tt.onVnodeUpdated)||et)&&Qt(()=>{st&&Ce(st,k,v,g),et&&mi(v,g,k,"updated")},F)},K=(g,v,k,F,R,M,Y)=>{for(let j=0;j<v.length;j++){const W=g[j],I=v[j],et=W.el&&(W.type===Ft||!Sn(W,I)||W.shapeFlag&198)?d(W.el):k;_(W,I,et,null,F,R,M,Y,!0)}},z=(g,v,k,F,R)=>{if(v!==k){if(v!==ht)for(const M in v)!en(M)&&!(M in k)&&r(g,M,v[M],null,R,F);for(const M in k){if(en(M))continue;const Y=k[M],j=v[M];Y!==j&&M!=="value"&&r(g,M,j,Y,R,F)}"value"in k&&r(g,"value",v.value,k.value,R)}},Z=(g,v,k,F,R,M,Y,j,W)=>{const I=v.el=g?g.el:a(""),et=v.anchor=g?g.anchor:a("");let{patchFlag:q,dynamicChildren:tt,slotScopeIds:st}=v;process.env.NODE_ENV!=="production"&&(xe||q&2048)&&(q=0,W=!1,tt=null),st&&(j=j?j.concat(st):st),g==null?(n(I,k,F),n(et,k,F),P(v.children||[],k,et,R,M,Y,j,W)):q>0&&q&64&&tt&&g.dynamicChildren?(K(g.dynamicChildren,tt,k,R,M,Y,j),process.env.NODE_ENV!=="production"?Cs(g,v):(v.key!=null||R&&v===R.subTree)&&Cs(g,v,!0)):nt(g,v,k,et,R,M,Y,j,W)},J=(g,v,k,F,R,M,Y,j,W)=>{v.slotScopeIds=j,g==null?v.shapeFlag&512?R.ctx.activate(v,k,F,Y,W):A(v,k,F,R,M,Y,W):L(g,v,W)},A=(g,v,k,F,R,M,Y)=>{const j=g.component=Fu(g,F,R);if(process.env.NODE_ENV!=="production"&&j.type.__hmrId&&_d(j),process.env.NODE_ENV!=="production"&&(cs(g),$i(j,"mount")),Ar(g)&&(j.ctx.renderer=Yn),process.env.NODE_ENV!=="production"&&$i(j,"init"),Bu(j,!1,Y),process.env.NODE_ENV!=="production"&&Wi(j,"init"),process.env.NODE_ENV!=="production"&&xe&&(g.el=null),j.asyncDep){if(R&&R.registerDep(j,H,Y),!g.el){const W=j.subTree=Tt(Zt);S(null,W,v,k),g.placeholder=W.el}}else H(j,g,v,k,R,M,Y);process.env.NODE_ENV!=="production"&&(hs(),Wi(j,"mount"))},L=(g,v,k)=>{const F=v.component=g.component;if(hu(g,v,k))if(F.asyncDep&&!F.asyncResolved){process.env.NODE_ENV!=="production"&&cs(v),D(F,v,k),process.env.NODE_ENV!=="production"&&hs();return}else F.next=v,F.update();else v.el=g.el,F.vnode=v},H=(g,v,k,F,R,M,Y)=>{const j=()=>{if(g.isMounted){let{next:q,bu:tt,u:st,parent:dt,vnode:bt}=g;{const Pe=Za(g);if(Pe){q&&(q.el=bt.el,D(g,q,Y)),Pe.asyncDep.then(()=>{g.isUnmounted||j()});return}}let _t=q,Yt;process.env.NODE_ENV!=="production"&&cs(q||g.vnode),yi(g,!1),q?(q.el=bt.el,D(g,q,Y)):q=bt,tt&&Mi(tt),(Yt=q.props&&q.props.onVnodeBeforeUpdate)&&Ce(Yt,dt,q,bt),yi(g,!0),process.env.NODE_ENV!=="production"&&$i(g,"render");const qt=Fa(g);process.env.NODE_ENV!=="production"&&Wi(g,"render");const Oe=g.subTree;g.subTree=qt,process.env.NODE_ENV!=="production"&&$i(g,"patch"),_(Oe,qt,d(Oe.el),ve(Oe),g,R,M),process.env.NODE_ENV!=="production"&&Wi(g,"patch"),q.el=qt.el,_t===null&&du(g,qt.el),st&&Qt(st,R),(Yt=q.props&&q.props.onVnodeUpdated)&&Qt(()=>Ce(Yt,dt,q,bt),R),process.env.NODE_ENV!=="production"&&_a(g),process.env.NODE_ENV!=="production"&&hs()}else{let q;const{el:tt,props:st}=v,{bm:dt,m:bt,parent:_t,root:Yt,type:qt}=g,Oe=mn(v);yi(g,!1),dt&&Mi(dt),!Oe&&(q=st&&st.onVnodeBeforeMount)&&Ce(q,_t,v),yi(g,!0);{Yt.ce&&Yt.ce._def.shadowRoot!==!1&&Yt.ce._injectChildStyle(qt),process.env.NODE_ENV!=="production"&&$i(g,"render");const Pe=g.subTree=Fa(g);process.env.NODE_ENV!=="production"&&Wi(g,"render"),process.env.NODE_ENV!=="production"&&$i(g,"patch"),_(null,Pe,k,F,g,R,M),process.env.NODE_ENV!=="production"&&Wi(g,"patch"),v.el=Pe.el}if(bt&&Qt(bt,R),!Oe&&(q=st&&st.onVnodeMounted)){const Pe=v;Qt(()=>Ce(q,_t,Pe),R)}(v.shapeFlag&256||_t&&mn(_t.vnode)&&_t.vnode.shapeFlag&256)&&g.a&&Qt(g.a,R),g.isMounted=!0,process.env.NODE_ENV!=="production"&&wd(g),v=k=F=null}};g.scope.on();const W=g.effect=new Ho(j);g.scope.off();const I=g.update=W.run.bind(W),et=g.job=W.runIfDirty.bind(W);et.i=g,et.id=g.uid,W.scheduler=()=>fs(et),yi(g,!0),process.env.NODE_ENV!=="production"&&(W.onTrack=g.rtc?q=>Mi(g.rtc,q):void 0,W.onTrigger=g.rtg?q=>Mi(g.rtg,q):void 0),I()},D=(g,v,k)=>{v.component=g;const F=g.vnode.props;g.vnode=v,g.next=null,pu(g,v.props,F,k),xu(g,v.children,k),de(),ua(g),ue()},nt=(g,v,k,F,R,M,Y,j,W=!1)=>{const I=g&&g.children,et=g?g.shapeFlag:0,q=v.children,{patchFlag:tt,shapeFlag:st}=v;if(tt>0){if(tt&128){ot(I,q,k,F,R,M,Y,j,W);return}else if(tt&256){ct(I,q,k,F,R,M,Y,j,W);return}}st&8?(et&16&&le(I,R,M),q!==I&&h(k,q)):et&16?st&16?ot(I,q,k,F,R,M,Y,j,W):le(I,R,M,!0):(et&8&&h(k,""),st&16&&P(q,k,F,R,M,Y,j,W))},ct=(g,v,k,F,R,M,Y,j,W)=>{g=g||Ai,v=v||Ai;const I=g.length,et=v.length,q=Math.min(I,et);let tt;for(tt=0;tt<q;tt++){const st=v[tt]=W?Qe(v[tt]):me(v[tt]);_(g[tt],st,k,null,R,M,Y,j,W)}I>et?le(g,R,M,!0,!1,q):P(v,k,F,R,M,Y,j,W,q)},ot=(g,v,k,F,R,M,Y,j,W)=>{let I=0;const et=v.length;let q=g.length-1,tt=et-1;for(;I<=q&&I<=tt;){const st=g[I],dt=v[I]=W?Qe(v[I]):me(v[I]);if(Sn(st,dt))_(st,dt,k,null,R,M,Y,j,W);else break;I++}for(;I<=q&&I<=tt;){const st=g[q],dt=v[tt]=W?Qe(v[tt]):me(v[tt]);if(Sn(st,dt))_(st,dt,k,null,R,M,Y,j,W);else break;q--,tt--}if(I>q){if(I<=tt){const st=tt+1,dt=st<et?v[st].el:F;for(;I<=tt;)_(null,v[I]=W?Qe(v[I]):me(v[I]),k,dt,R,M,Y,j,W),I++}}else if(I>tt)for(;I<=q;)Ot(g[I],R,M,!0),I++;else{const st=I,dt=I,bt=new Map;for(I=dt;I<=tt;I++){const Ut=v[I]=W?Qe(v[I]):me(v[I]);Ut.key!=null&&(process.env.NODE_ENV!=="production"&&bt.has(Ut.key)&&U("Duplicate keys found during update:",JSON.stringify(Ut.key),"Make sure keys are unique."),bt.set(Ut.key,I))}let _t,Yt=0;const qt=tt-dt+1;let Oe=!1,Pe=0;const qn=new Array(qt);for(I=0;I<qt;I++)qn[I]=0;for(I=st;I<=q;I++){const Ut=g[I];if(Yt>=qt){Ot(Ut,R,M,!0);continue}let Ae;if(Ut.key!=null)Ae=bt.get(Ut.key);else for(_t=dt;_t<=tt;_t++)if(qn[_t-dt]===0&&Sn(Ut,v[_t])){Ae=_t;break}Ae===void 0?Ot(Ut,R,M,!0):(qn[Ae-dt]=I+1,Ae>=Pe?Pe=Ae:Oe=!0,_(Ut,v[Ae],k,null,R,M,Y,j,W),Yt++)}const mh=Oe?Ou(qn):Ai;for(_t=mh.length-1,I=qt-1;I>=0;I--){const Ut=dt+I,Ae=v[Ut],_h=v[Ut+1],vh=Ut+1<et?_h.el||_h.placeholder:F;qn[I]===0?_(null,Ae,k,vh,R,M,Y,j,W):Oe&&(_t<0||I!==mh[_t]?gt(Ae,k,vh,2):_t--)}}},gt=(g,v,k,F,R=null)=>{const{el:M,type:Y,transition:j,children:W,shapeFlag:I}=g;if(I&6){gt(g.component.subTree,v,k,F);return}if(I&128){g.suspense.move(v,k,F);return}if(I&64){Y.move(g,v,k,Yn);return}if(Y===Ft){n(M,v,k);for(let q=0;q<W.length;q++)gt(W[q],v,k,F);n(g.anchor,v,k);return}if(Y===Ns){N(g,v,k);return}if(F!==2&&I&1&&j)if(F===0)j.beforeEnter(M),n(M,v,k),Qt(()=>j.enter(M),R);else{const{leave:q,delayLeave:tt,afterLeave:st}=j,dt=()=>{g.ctx.isUnmounted?s(M):n(M,v,k)},bt=()=>{M._isLeaving&&M[Ad](!0),q(M,()=>{dt(),st&&st()})};tt?tt(M,dt,bt):bt()}else n(M,v,k)},Ot=(g,v,k,F=!1,R=!1)=>{const{type:M,props:Y,ref:j,children:W,dynamicChildren:I,shapeFlag:et,patchFlag:q,dirs:tt,cacheIndex:st}=g;if(q===-2&&(R=!1),j!=null&&(de(),gn(j,null,k,g,!0),ue()),st!=null&&(v.renderCache[st]=void 0),et&256){v.ctx.deactivate(g);return}const dt=et&1&&tt,bt=!mn(g);let _t;if(bt&&(_t=Y&&Y.onVnodeBeforeUnmount)&&Ce(_t,v,g),et&6)Qi(g.component,k,F);else{if(et&128){g.suspense.unmount(k,F);return}dt&&mi(g,null,v,"beforeUnmount"),et&64?g.type.remove(g,v,k,Yn,F):I&&!I.hasOnce&&(M!==Ft||q>0&&q&64)?le(I,v,k,!1,!0):(M===Ft&&q&384||!R&&et&16)&&le(W,v,k),F&&Ji(g)}(bt&&(_t=Y&&Y.onVnodeUnmounted)||dt)&&Qt(()=>{_t&&Ce(_t,v,g),dt&&mi(g,null,v,"unmounted")},k)},Ji=g=>{const{type:v,el:k,anchor:F,transition:R}=g;if(v===Ft){process.env.NODE_ENV!=="production"&&g.patchFlag>0&&g.patchFlag&2048&&R&&!R.persisted?g.children.forEach(Y=>{Y.type===Zt?s(Y.el):Ji(Y)}):nr(k,F);return}if(v===Ns){T(g);return}const M=()=>{s(k),R&&!R.persisted&&R.afterLeave&&R.afterLeave()};if(g.shapeFlag&1&&R&&!R.persisted){const{leave:Y,delayLeave:j}=R,W=()=>Y(k,M);j?j(g.el,M,W):W()}else M()},nr=(g,v)=>{let k;for(;g!==v;)k=u(g),s(g),g=k;s(v)},Qi=(g,v,k)=>{process.env.NODE_ENV!=="production"&&g.type.__hmrId&&vd(g);const{bum:F,scope:R,job:M,subTree:Y,um:j,m:W,a:I}=g;tl(W),tl(I),F&&Mi(F),R.stop(),M&&(M.flags|=8,Ot(Y,g,v,k)),j&&Qt(j,v),Qt(()=>{g.isUnmounted=!0},v),process.env.NODE_ENV!=="production"&&Cd(g)},le=(g,v,k,F=!1,R=!1,M=0)=>{for(let Y=M;Y<g.length;Y++)Ot(g[Y],v,k,F,R)},ve=g=>{if(g.shapeFlag&6)return ve(g.component.subTree);if(g.shapeFlag&128)return g.suspense.next();const v=u(g.anchor||g.el),k=v&&v[Od];return k?u(k):v};let Ro=!1;const gh=(g,v,k)=>{g==null?v._vnode&&Ot(v._vnode,null,null,!0):_(v._vnode||null,g,v,null,null,null,k),v._vnode=g,Ro||(Ro=!0,ua(),fa(),Ro=!1)},Yn={p:_,um:Ot,m:gt,r:Ji,mt:A,mc:P,pc:nt,pbc:K,n:ve,o:e};return{render:gh,hydrate:void 0,createApp:tu(gh)}}function Xr({type:e,props:t},i){return i==="svg"&&e==="foreignObject"||i==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:i}function yi({effect:e,job:t},i){i?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function ku(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Cs(e,t,i=!1){const n=e.children,s=t.children;if(Q(n)&&Q(s))for(let r=0;r<n.length;r++){const o=n[r];let a=s[r];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=s[r]=Qe(s[r]),a.el=o.el),!i&&a.patchFlag!==-2&&Cs(o,a)),a.type===bn&&a.patchFlag!==-1&&(a.el=o.el),a.type===Zt&&!a.el&&(a.el=o.el),process.env.NODE_ENV!=="production"&&a.el&&(a.el.__vnode=a)}}function Ou(e){const t=e.slice(),i=[0];let n,s,r,o,a;const l=e.length;for(n=0;n<l;n++){const c=e[n];if(c!==0){if(s=i[i.length-1],e[s]<c){t[n]=s,i.push(n);continue}for(r=0,o=i.length-1;r<o;)a=r+o>>1,e[i[a]]<c?r=a+1:o=a;c<e[i[r]]&&(r>0&&(t[n]=i[r-1]),i[r]=n)}}for(r=i.length,o=i[r-1];r-- >0;)i[r]=o,o=t[o];return i}function Za(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Za(t)}function tl(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const el=e=>e.__isSuspense;function Pu(e,t){t&&t.pendingBranch?Q(e)?t.effects.push(...e):t.effects.push(e):da(e)}const Ft=Symbol.for("v-fgt"),bn=Symbol.for("v-txt"),Zt=Symbol.for("v-cmt"),Ns=Symbol.for("v-stc"),yn=[];let te=null;function ft(e=!1){yn.push(te=e?null:[])}function Au(){yn.pop(),te=yn[yn.length-1]||null}let En=1;function Ts(e,t=!1){En+=e,e<0&&te&&t&&(te.hasOnce=!0)}function il(e){return e.dynamicChildren=En>0?te||Ai:null,Au(),En>0&&te&&te.push(e),e}function Nt(e,t,i,n,s,r){return il(yt(e,t,i,n,s,r,!0))}function Ke(e,t,i,n,s){return il(Tt(e,t,i,n,s,!0))}function Ui(e){return e?e.__v_isVNode===!0:!1}function Sn(e,t){if(process.env.NODE_ENV!=="production"&&t.shapeFlag&6&&e.component){const i=ps.get(t.type);if(i&&i.has(e.component))return e.shapeFlag&=-257,t.shapeFlag&=-513,!1}return e.type===t.type&&e.key===t.key}const Ru=(...e)=>sl(...e),nl=({key:e})=>e??null,ks=({ref:e,ref_key:t,ref_for:i})=>(typeof e=="number"&&(e=""+e),e!=null?Ct(e)||Rt(e)||it(e)?{i:Gt,r:e,k:t,f:!!i}:e:null);function yt(e,t=null,i=null,n=0,s=null,r=e===Ft?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&nl(t),ref:t&&ks(t),scopeId:ba,slotScopeIds:null,children:i,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:n,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:Gt};return a?(zr(l,i),r&128&&e.normalize(l)):i&&(l.shapeFlag|=Ct(i)?8:16),process.env.NODE_ENV!=="production"&&l.key!==l.key&&U("VNode created with invalid key (NaN). VNode type:",l.type),En>0&&!o&&te&&(l.patchFlag>0||r&6)&&l.patchFlag!==32&&te.push(l),l}const Tt=process.env.NODE_ENV!=="production"?Ru:sl;function sl(e,t=null,i=null,n=0,s=null,r=!1){if((!e||e===$d)&&(process.env.NODE_ENV!=="production"&&!e&&U(`Invalid vnode type when creating vnode: ${e}.`),e=Zt),Ui(e)){const a=Je(e,t,!0);return i&&zr(a,i),En>0&&!r&&te&&(a.shapeFlag&6?te[te.indexOf(e)]=a:te.push(a)),a.patchFlag=-2,a}if(dl(e)&&(e=e.__vccOpts),t){t=Mu(t);let{class:a,style:l}=t;a&&!Ct(a)&&(t.class=Li(a)),ut(l)&&(os(l)&&!Q(l)&&(l=xt({},l)),t.style=lr(l))}const o=Ct(e)?1:el(e)?128:Pd(e)?64:ut(e)?4:it(e)?2:0;return process.env.NODE_ENV!=="production"&&o&4&&os(e)&&(e=rt(e),U("Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",`
|
|
8
|
-
Component that was made reactive: `,e)),yt(e,t,i,n,s,o,r,!0)}function Mu(e){return e?os(e)||Ua(e)?xt({},e):e:null}function Je(e,t,i=!1,n=!1){const{props:s,ref:r,patchFlag:o,children:a,transition:l}=e,c=t?Iu(s||{},t):s,h={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&nl(c),ref:t&&t.ref?i&&r?Q(r)?r.concat(ks(t)):[r,ks(t)]:ks(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:process.env.NODE_ENV!=="production"&&o===-1&&Q(a)?a.map(rl):a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Ft?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Je(e.ssContent),ssFallback:e.ssFallback&&Je(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&n&&Pr(h,l.clone(h)),h}function rl(e){const t=Je(e);return Q(e.children)&&(t.children=e.children.map(rl)),t}function Lu(e=" ",t=0){return Tt(bn,null,e,t)}function Os(e="",t=!1){return t?(ft(),Ke(Zt,null,e)):Tt(Zt,null,e)}function me(e){return e==null||typeof e=="boolean"?Tt(Zt):Q(e)?Tt(Ft,null,e.slice()):Ui(e)?Qe(e):Tt(bn,null,String(e))}function Qe(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Je(e)}function zr(e,t){let i=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(Q(t))i=16;else if(typeof t=="object")if(n&65){const s=t.default;s&&(s._c&&(s._d=!1),zr(e,s()),s._c&&(s._d=!0));return}else{i=32;const s=t._;!s&&!Ua(t)?t._ctx=Gt:s===3&&Gt&&(Gt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else it(t)?(t={default:t,_ctx:Gt},i=32):(t=String(t),n&64?(i=16,t=[Lu(t)]):i=8);e.children=t,e.shapeFlag|=i}function Iu(...e){const t={};for(let i=0;i<e.length;i++){const n=e[i];for(const s in n)if(s==="class")t.class!==n.class&&(t.class=Li([t.class,n.class]));else if(s==="style")t.style=lr([t.style,n.style]);else if(Zi(s)){const r=t[s],o=n[s];o&&r!==o&&!(Q(r)&&r.includes(o))&&(t[s]=r?[].concat(r,o):o)}else s!==""&&(t[s]=n[s])}return t}function Ce(e,t,i,n=null){Se(e,t,7,[i,n])}const Du=La();let Vu=0;function Fu(e,t,i){const n=e.type,s=(t?t.appContext:e.appContext)||Du,r={uid:Vu++,vnode:e,type:n,parent:t,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Ih(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(s.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Xa(n,s),emitsOptions:Va(n,s),emit:null,emitted:null,propsDefaults:ht,inheritAttrs:n.inheritAttrs,ctx:ht,data:ht,props:ht,attrs:ht,slots:ht,refs:ht,setupState:ht,setupContext:null,suspense:i,suspenseId:i?i.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return process.env.NODE_ENV!=="production"?r.ctx=Ud(r):r.ctx={_:r},r.root=t?t.root:r,r.emit=ou.bind(null,r),e.ce&&e.ce(r),r}let Mt=null;const Ps=()=>Mt||Gt;let As,Yr;{const e=nn(),t=(i,n)=>{let s;return(s=e[i])||(s=e[i]=[]),s.push(n),r=>{s.length>1?s.forEach(o=>o(r)):s[0](r)}};As=t("__VUE_INSTANCE_SETTERS__",i=>Mt=i),Yr=t("__VUE_SSR_SETTERS__",i=>xn=i)}const wn=e=>{const t=Mt;return As(e),e.scope.on(),()=>{e.scope.off(),As(t)}},ol=()=>{Mt&&Mt.scope.off(),As(null)},Gu=Kt("slot,component");function qr(e,{isNativeTag:t}){(Gu(e)||t(e))&&U("Do not use built-in or reserved HTML elements as component id: "+e)}function al(e){return e.vnode.shapeFlag&4}let xn=!1;function Bu(e,t=!1,i=!1){t&&Yr(t);const{props:n,children:s}=e.vnode,r=al(e);uu(e,n,r,t),wu(e,s,i||t);const o=r?Hu(e,t):void 0;return t&&Yr(!1),o}function Hu(e,t){const i=e.type;if(process.env.NODE_ENV!=="production"){if(i.name&&qr(i.name,e.appContext.config),i.components){const s=Object.keys(i.components);for(let r=0;r<s.length;r++)qr(s[r],e.appContext.config)}if(i.directives){const s=Object.keys(i.directives);for(let r=0;r<s.length;r++)ya(s[r])}i.compilerOptions&&$u()&&U('"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.')}e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Ta),process.env.NODE_ENV!=="production"&&jd(e);const{setup:n}=i;if(n){de();const s=e.setupContext=n.length>1?Uu(e):null,r=wn(e),o=Vi(n,e,0,[process.env.NODE_ENV!=="production"?Ee(e.props):e.props,s]),a=rr(o);if(ue(),r(),(a||e.sp)&&!mn(e)&&Ea(e),a){if(o.then(ol,ol),t)return o.then(l=>{ll(e,l,t)}).catch(l=>{hn(l,e,0)});if(e.asyncDep=o,process.env.NODE_ENV!=="production"&&!e.suspense){const l=Cn(e,i);U(`Component <${l}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.`)}}else ll(e,o,t)}else cl(e,t)}function ll(e,t,i){it(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ut(t)?(process.env.NODE_ENV!=="production"&&Ui(t)&&U("setup() should not return VNodes directly - return a render function instead."),process.env.NODE_ENV!=="production"&&(e.devtoolsRawSetupState=t),e.setupState=aa(t),process.env.NODE_ENV!=="production"&&Xd(e)):process.env.NODE_ENV!=="production"&&t!==void 0&&U(`setup() should return an object. Received: ${t===null?"null":typeof t}`),cl(e,i)}const $u=()=>!0;function cl(e,t,i){const n=e.type;e.render||(e.render=n.render||Lt);{const s=wn(e);de();try{Yd(e)}finally{ue(),s()}}process.env.NODE_ENV!=="production"&&!n.render&&e.render===Lt&&!t&&(n.template?U('Component provided template option but runtime compilation is not supported in this build of Vue. Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".'):U("Component is missing template or render function: ",n))}const hl=process.env.NODE_ENV!=="production"?{get(e,t){return ws(),It(e,"get",""),e[t]},set(){return U("setupContext.attrs is readonly."),!1},deleteProperty(){return U("setupContext.attrs is readonly."),!1}}:{get(e,t){return It(e,"get",""),e[t]}};function Wu(e){return new Proxy(e.slots,{get(t,i){return It(e,"get","$slots"),t[i]}})}function Uu(e){const t=i=>{if(process.env.NODE_ENV!=="production"&&(e.exposed&&U("expose() should be called only once per setup()."),i!=null)){let n=typeof i;n==="object"&&(Q(i)?n="array":Rt(i)&&(n="ref")),n!=="object"&&U(`expose() should be passed a plain object, received ${n}.`)}e.exposed=i||{}};if(process.env.NODE_ENV!=="production"){let i,n;return Object.freeze({get attrs(){return i||(i=new Proxy(e.attrs,hl))},get slots(){return n||(n=Wu(e))},get emit(){return(s,...r)=>e.emit(s,...r)},expose:t})}else return{attrs:new Proxy(e.attrs,hl),slots:e.slots,emit:e.emit,expose:t}}function Rs(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(aa(id(e.exposed)),{get(t,i){if(i in t)return t[i];if(i in vi)return vi[i](e)},has(t,i){return i in t||i in vi}})):e.proxy}const ju=/(?:^|[-_])\w/g,Xu=e=>e.replace(ju,t=>t.toUpperCase()).replace(/[-_]/g,"");function Kr(e,t=!0){return it(e)?e.displayName||e.name:e.name||t&&e.__name}function Cn(e,t,i=!1){let n=Kr(t);if(!n&&t.__file){const s=t.__file.match(/([^/\\]+)\.\w+$/);s&&(n=s[1])}if(!n&&e){const s=r=>{for(const o in r)if(r[o]===t)return o};n=s(e.components)||e.parent&&s(e.parent.type.components)||s(e.appContext.components)}return n?Xu(n):i?"App":"Anonymous"}function dl(e){return it(e)&&"__vccOpts"in e}const Ms=(e,t)=>{const i=ad(e,t,xn);if(process.env.NODE_ENV!=="production"){const n=Ps();n&&n.appContext.config.warnRecursiveComputed&&(i._warnRecursive=!0)}return i};function ul(e,t,i){try{Ts(-1);const n=arguments.length;return n===2?ut(t)&&!Q(t)?Ui(t)?Tt(e,null,[t]):Tt(e,t):Tt(e,null,t):(n>3?i=Array.prototype.slice.call(arguments,2):n===3&&Ui(i)&&(i=[i]),Tt(e,t,i))}finally{Ts(1)}}function zu(){if(process.env.NODE_ENV==="production"||typeof window>"u")return;const e={style:"color:#3ba776"},t={style:"color:#1677ff"},i={style:"color:#f5222d"},n={style:"color:#eb2f96"},s={__vue_custom_formatter:!0,header(d){if(!ut(d))return null;if(d.__isVue)return["div",e,"VueInstance"];if(Rt(d)){de();const u=d.value;return ue(),["div",{},["span",e,h(d)],"<",a(u),">"]}else{if(Ye(d))return["div",{},["span",e,Bt(d)?"ShallowReactive":"Reactive"],"<",a(d),`>${fe(d)?" (readonly)":""}`];if(fe(d))return["div",{},["span",e,Bt(d)?"ShallowReadonly":"Readonly"],"<",a(d),">"]}return null},hasBody(d){return d&&d.__isVue},body(d){if(d&&d.__isVue)return["div",{},...r(d.$)]}};function r(d){const u=[];d.type.props&&d.props&&u.push(o("props",rt(d.props))),d.setupState!==ht&&u.push(o("setup",d.setupState)),d.data!==ht&&u.push(o("data",rt(d.data)));const f=l(d,"computed");f&&u.push(o("computed",f));const p=l(d,"inject");return p&&u.push(o("injected",p)),u.push(["div",{},["span",{style:n.style+";opacity:0.66"},"$ (internal): "],["object",{object:d}]]),u}function o(d,u){return u=xt({},u),Object.keys(u).length?["div",{style:"line-height:1.25em;margin-bottom:0.6em"},["div",{style:"color:#476582"},d],["div",{style:"padding-left:1.25em"},...Object.keys(u).map(f=>["div",{},["span",n,f+": "],a(u[f],!1)])]]:["span",{}]}function a(d,u=!0){return typeof d=="number"?["span",t,d]:typeof d=="string"?["span",i,JSON.stringify(d)]:typeof d=="boolean"?["span",n,d]:ut(d)?["object",{object:u?rt(d):d}]:["span",i,String(d)]}function l(d,u){const f=d.type;if(it(f))return;const p={};for(const _ in d.ctx)c(f,_,u)&&(p[_]=d.ctx[_]);return p}function c(d,u,f){const p=d[f];if(Q(p)&&p.includes(u)||ut(p)&&u in p||d.extends&&c(d.extends,u,f)||d.mixins&&d.mixins.some(_=>c(_,u,f)))return!0}function h(d){return Bt(d)?"ShallowRef":d.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(s):window.devtoolsFormatters=[s]}const fl="3.5.25",ee=process.env.NODE_ENV!=="production"?U:Lt;process.env.NODE_ENV,process.env.NODE_ENV;let Jr;const pl=typeof window<"u"&&window.trustedTypes;if(pl)try{Jr=pl.createPolicy("vue",{createHTML:e=>e})}catch(e){process.env.NODE_ENV!=="production"&&ee(`Error creating trusted types policy: ${e}`)}const gl=Jr?e=>Jr.createHTML(e):e=>e,Yu="http://www.w3.org/2000/svg",qu="http://www.w3.org/1998/Math/MathML",Ve=typeof document<"u"?document:null,ml=Ve&&Ve.createElement("template"),Ku={insert:(e,t,i)=>{t.insertBefore(e,i||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,i,n)=>{const s=t==="svg"?Ve.createElementNS(Yu,e):t==="mathml"?Ve.createElementNS(qu,e):i?Ve.createElement(e,{is:i}):Ve.createElement(e);return e==="select"&&n&&n.multiple!=null&&s.setAttribute("multiple",n.multiple),s},createText:e=>Ve.createTextNode(e),createComment:e=>Ve.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Ve.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,i,n,s,r){const o=i?i.previousSibling:t.lastChild;if(s&&(s===r||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),i),!(s===r||!(s=s.nextSibling)););else{ml.innerHTML=gl(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const a=ml.content;if(n==="svg"||n==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,i)}return[o?o.nextSibling:t.firstChild,i?i.previousSibling:t.lastChild]}},Ju=Symbol("_vtc");function Qu(e,t,i){const n=e[Ju];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):i?e.setAttribute("class",t):e.className=t}const _l=Symbol("_vod"),Zu=Symbol("_vsh"),tf=Symbol(process.env.NODE_ENV!=="production"?"CSS_VAR_TEXT":""),ef=/(?:^|;)\s*display\s*:/;function nf(e,t,i){const n=e.style,s=Ct(i);let r=!1;if(i&&!s){if(t)if(Ct(t))for(const o of t.split(";")){const a=o.slice(0,o.indexOf(":")).trim();i[a]==null&&Ls(n,a,"")}else for(const o in t)i[o]==null&&Ls(n,o,"");for(const o in i)o==="display"&&(r=!0),Ls(n,o,i[o])}else if(s){if(t!==i){const o=n[tf];o&&(i+=";"+o),n.cssText=i,r=ef.test(i)}}else t&&e.removeAttribute("style");_l in e&&(e[_l]=r?n.display:"",e[Zu]&&(n.display="none"))}const sf=/[^\\];\s*$/,vl=/\s*!important$/;function Ls(e,t,i){if(Q(i))i.forEach(n=>Ls(e,t,n));else if(i==null&&(i=""),process.env.NODE_ENV!=="production"&&sf.test(i)&&ee(`Unexpected semicolon at the end of '${t}' style value: '${i}'`),t.startsWith("--"))e.setProperty(t,i);else{const n=rf(e,t);vl.test(i)?e.setProperty(Jt(n),i.replace(vl,""),"important"):e[n]=i}}const bl=["Webkit","Moz","ms"],Qr={};function rf(e,t){const i=Qr[t];if(i)return i;let n=Vt(t);if(n!=="filter"&&n in e)return Qr[t]=n;n=ci(n);for(let s=0;s<bl.length;s++){const r=bl[s]+n;if(r in e)return Qr[t]=r}return t}const yl="http://www.w3.org/1999/xlink";function El(e,t,i,n,s,r=Mh(t)){n&&t.startsWith("xlink:")?i==null?e.removeAttributeNS(yl,t.slice(6,t.length)):e.setAttributeNS(yl,t,i):i==null||r&&!Fo(i)?e.removeAttribute(t):e.setAttribute(t,r?"":be(i)?String(i):i)}function Sl(e,t,i,n,s){if(t==="innerHTML"||t==="textContent"){i!=null&&(e[t]=t==="innerHTML"?gl(i):i);return}const r=e.tagName;if(t==="value"&&r!=="PROGRESS"&&!r.includes("-")){const a=r==="OPTION"?e.getAttribute("value")||"":e.value,l=i==null?e.type==="checkbox"?"on":"":String(i);(a!==l||!("_value"in e))&&(e.value=l),i==null&&e.removeAttribute(t),e._value=i;return}let o=!1;if(i===""||i==null){const a=typeof e[t];a==="boolean"?i=Fo(i):i==null&&a==="string"?(i="",o=!0):a==="number"&&(i=0,o=!0)}try{e[t]=i}catch(a){process.env.NODE_ENV!=="production"&&!o&&ee(`Failed setting prop "${t}" on <${r.toLowerCase()}>: value ${i} is invalid.`,a)}o&&e.removeAttribute(s||t)}function Fe(e,t,i,n){e.addEventListener(t,i,n)}function of(e,t,i,n){e.removeEventListener(t,i,n)}const wl=Symbol("_vei");function af(e,t,i,n,s=null){const r=e[wl]||(e[wl]={}),o=r[t];if(n&&o)o.value=process.env.NODE_ENV!=="production"?Cl(n,t):n;else{const[a,l]=lf(t);if(n){const c=r[t]=df(process.env.NODE_ENV!=="production"?Cl(n,t):n,s);Fe(e,a,c,l)}else o&&(of(e,a,o,l),r[t]=void 0)}}const xl=/(?:Once|Passive|Capture)$/;function lf(e){let t;if(xl.test(e)){t={};let n;for(;n=e.match(xl);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Jt(e.slice(2)),t]}let Zr=0;const cf=Promise.resolve(),hf=()=>Zr||(cf.then(()=>Zr=0),Zr=Date.now());function df(e,t){const i=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=i.attached)return;Se(uf(n,i.value),t,5,[n])};return i.value=e,i.attached=hf(),i}function Cl(e,t){return it(e)||Q(e)?e:(ee(`Wrong type passed as event handler to ${t} - did you forget @ or : in front of your prop?
|
|
9
|
-
Expected function or array of functions, received type ${typeof e}.`),Lt)}function uf(e,t){if(Q(t)){const i=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{i.call(e),e._stopped=!0},t.map(n=>s=>!s._stopped&&n&&n(s))}else return t}const Nl=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,ff=(e,t,i,n,s,r)=>{const o=s==="svg";t==="class"?Qu(e,n,o):t==="style"?nf(e,i,n):Zi(t)?Kn(t)||af(e,t,i,n,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):pf(e,t,n,o))?(Sl(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&El(e,t,n,o,r,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Ct(n))?Sl(e,Vt(t),n,r,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),El(e,t,n,o))};function pf(e,t,i,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&Nl(t)&&it(i));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const s=e.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return Nl(t)&&Ct(i)?!1:t in e}const Tl={};function kl(e,t,i){let n=Le(e,t);Jn(n)&&(n=xt({},n,t));class s extends to{constructor(o){super(n,o,i)}}return s.def=n,s}const gf=typeof HTMLElement<"u"?HTMLElement:class{};class to extends gf{constructor(t,i={},n=Vl){super(),this._def=t,this._props=i,this._createApp=n,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._patching=!1,this._dirty=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&n!==Vl?this._root=this.shadowRoot:(process.env.NODE_ENV!=="production"&&this.shadowRoot&&ee("Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use `defineSSRCustomElement`."),t.shadowRoot!==!1?(this.attachShadow(xt({},t.shadowRootOptions,{mode:"open"})),this._root=this.shadowRoot):this._root=this)}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let t=this;for(;t=t&&(t.parentNode||t.host);)if(t instanceof to){this._parent=t;break}this._instance||(this._resolved?this._mount(this._def):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(t=this._parent){t&&(this._instance.parent=t._instance,this._inheritParentContext(t))}_inheritParentContext(t=this._parent){t&&this._app&&Object.setPrototypeOf(this._app._context.provides,t._instance.provides)}disconnectedCallback(){this._connected=!1,us(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null,this._teleportTargets&&(this._teleportTargets.clear(),this._teleportTargets=void 0))})}_processMutations(t){for(const i of t)this._setAttr(i.attributeName)}_resolveDef(){if(this._pendingResolve)return;for(let n=0;n<this.attributes.length;n++)this._setAttr(this.attributes[n].name);this._ob=new MutationObserver(this._processMutations.bind(this)),this._ob.observe(this,{attributes:!0});const t=(n,s=!1)=>{this._resolved=!0,this._pendingResolve=void 0;const{props:r,styles:o}=n;let a;if(r&&!Q(r))for(const l in r){const c=r[l];(c===Number||c&&c.type===Number)&&(l in this._props&&(this._props[l]=Do(this._props[l])),(a||(a=Object.create(null)))[Vt(l)]=!0)}this._numberProps=a,this._resolveProps(n),this.shadowRoot?this._applyStyles(o):process.env.NODE_ENV!=="production"&&o&&ee("Custom element style injection is not supported when using shadowRoot: false"),this._mount(n)},i=this._def.__asyncLoader;i?this._pendingResolve=i().then(n=>{n.configureApp=this._def.configureApp,t(this._def=n,!0)}):t(this._def)}_mount(t){process.env.NODE_ENV!=="production"&&!t.name&&(t.name="VueElement"),this._app=this._createApp(t),this._inheritParentContext(),t.configureApp&&t.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const i=this._instance&&this._instance.exposed;if(i)for(const n in i)at(this,n)?process.env.NODE_ENV!=="production"&&ee(`Exposed property "${n}" already exists on custom element.`):Object.defineProperty(this,n,{get:()=>oa(i[n])})}_resolveProps(t){const{props:i}=t,n=Q(i)?i:Object.keys(i||{});for(const s of Object.keys(this))s[0]!=="_"&&n.includes(s)&&this._setProp(s,this[s]);for(const s of n.map(Vt))Object.defineProperty(this,s,{get(){return this._getProp(s)},set(r){this._setProp(s,r,!0,!this._patching)}})}_setAttr(t){if(t.startsWith("data-v-"))return;const i=this.hasAttribute(t);let n=i?this.getAttribute(t):Tl;const s=Vt(t);i&&this._numberProps&&this._numberProps[s]&&(n=Do(n)),this._setProp(s,n,!1,!0)}_getProp(t){return this._props[t]}_setProp(t,i,n=!0,s=!1){if(i!==this._props[t]&&(this._dirty=!0,i===Tl?delete this._props[t]:(this._props[t]=i,t==="key"&&this._app&&(this._app._ceVNode.key=i)),s&&this._instance&&this._update(),n)){const r=this._ob;r&&(this._processMutations(r.takeRecords()),r.disconnect()),i===!0?this.setAttribute(Jt(t),""):typeof i=="string"||typeof i=="number"?this.setAttribute(Jt(t),i+""):i||this.removeAttribute(Jt(t)),r&&r.observe(this,{attributes:!0})}}_update(){const t=this._createVNode();this._app&&(t.appContext=this._app._context),Sf(t,this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const i=Tt(this._def,xt(t,this._props));return this._instance||(i.ce=n=>{this._instance=n,n.ce=this,n.isCE=!0,process.env.NODE_ENV!=="production"&&(n.ceReload=r=>{this._styles&&(this._styles.forEach(o=>this._root.removeChild(o)),this._styles.length=0),this._applyStyles(r),this._instance=null,this._update()});const s=(r,o)=>{this.dispatchEvent(new CustomEvent(r,Jn(o[0])?xt({detail:o},o[0]):{detail:o}))};n.emit=(r,...o)=>{s(r,o),Jt(r)!==r&&s(Jt(r),o)},this._setParent()}),i}_applyStyles(t,i){if(!t)return;if(i){if(i===this._def||this._styleChildren.has(i))return;this._styleChildren.add(i)}const n=this._nonce;for(let s=t.length-1;s>=0;s--){const r=document.createElement("style");if(n&&r.setAttribute("nonce",n),r.textContent=t[s],this.shadowRoot.prepend(r),process.env.NODE_ENV!=="production")if(i){if(i.__hmrId){this._childStyles||(this._childStyles=new Map);let o=this._childStyles.get(i.__hmrId);o||this._childStyles.set(i.__hmrId,o=[]),o.push(r)}}else(this._styles||(this._styles=[])).push(r)}}_parseSlots(){const t=this._slots={};let i;for(;i=this.firstChild;){const n=i.nodeType===1&&i.getAttribute("slot")||"default";(t[n]||(t[n]=[])).push(i),this.removeChild(i)}}_renderSlots(){const t=this._getSlots(),i=this._instance.type.__scopeId;for(let n=0;n<t.length;n++){const s=t[n],r=s.getAttribute("name")||"default",o=this._slots[r],a=s.parentNode;if(o)for(const l of o){if(i&&l.nodeType===1){const c=i+"-s",h=document.createTreeWalker(l,1);l.setAttribute(c,"");let d;for(;d=h.nextNode();)d.setAttribute(c,"")}a.insertBefore(l,s)}else for(;s.firstChild;)a.insertBefore(s.firstChild,s);a.removeChild(s)}}_getSlots(){const t=[this];this._teleportTargets&&t.push(...this._teleportTargets);const i=new Set;for(const n of t){const s=n.querySelectorAll("slot");for(let r=0;r<s.length;r++)i.add(s[r])}return Array.from(i)}_injectChildStyle(t){this._applyStyles(t.styles,t)}_beginPatch(){this._patching=!0,this._dirty=!1}_endPatch(){this._patching=!1,this._dirty&&this._instance&&this._update()}_removeChildStyle(t){if(process.env.NODE_ENV!=="production"&&(this._styleChildren.delete(t),this._childStyles&&t.__hmrId)){const i=this._childStyles.get(t.__hmrId);i&&(i.forEach(n=>this._root.removeChild(n)),i.length=0)}}}const Ze=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Q(t)?i=>Mi(t,i):t};function mf(e){e.target.composing=!0}function Ol(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const oe=Symbol("_assign");function Pl(e,t,i){return t&&(e=e.trim()),i&&(e=ts(e)),e}const Is={created(e,{modifiers:{lazy:t,trim:i,number:n}},s){e[oe]=Ze(s);const r=n||s.props&&s.props.type==="number";Fe(e,t?"change":"input",o=>{o.target.composing||e[oe](Pl(e.value,i,r))}),(i||r)&&Fe(e,"change",()=>{e.value=Pl(e.value,i,r)}),t||(Fe(e,"compositionstart",mf),Fe(e,"compositionend",Ol),Fe(e,"change",Ol))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:i,modifiers:{lazy:n,trim:s,number:r}},o){if(e[oe]=Ze(o),e.composing)return;const a=(r||e.type==="number")&&!/^0\d/.test(e.value)?ts(e.value):e.value,l=t??"";a!==l&&(document.activeElement===e&&e.type!=="range"&&(n&&t===i||s&&e.value.trim()===l)||(e.value=l))}},Al={deep:!0,created(e,t,i){e[oe]=Ze(i),Fe(e,"change",()=>{const n=e._modelValue,s=ji(e),r=e.checked,o=e[oe];if(Q(n)){const a=cr(n,s),l=a!==-1;if(r&&!l)o(n.concat(s));else if(!r&&l){const c=[...n];c.splice(a,1),o(c)}}else if(Ri(n)){const a=new Set(n);r?a.add(s):a.delete(s),o(a)}else o(Ll(e,r))})},mounted:Rl,beforeUpdate(e,t,i){e[oe]=Ze(i),Rl(e,t,i)}};function Rl(e,{value:t,oldValue:i},n){e._modelValue=t;let s;if(Q(t))s=cr(t,n.props.value)>-1;else if(Ri(t))s=t.has(n.props.value);else{if(t===i)return;s=di(t,Ll(e,!0))}e.checked!==s&&(e.checked=s)}const _f={created(e,{value:t},i){e.checked=di(t,i.props.value),e[oe]=Ze(i),Fe(e,"change",()=>{e[oe](ji(e))})},beforeUpdate(e,{value:t,oldValue:i},n){e[oe]=Ze(n),t!==i&&(e.checked=di(t,n.props.value))}},vf={deep:!0,created(e,{value:t,modifiers:{number:i}},n){const s=Ri(t);Fe(e,"change",()=>{const r=Array.prototype.filter.call(e.options,o=>o.selected).map(o=>i?ts(ji(o)):ji(o));e[oe](e.multiple?s?new Set(r):r:r[0]),e._assigning=!0,us(()=>{e._assigning=!1})}),e[oe]=Ze(n)},mounted(e,{value:t}){Ml(e,t)},beforeUpdate(e,t,i){e[oe]=Ze(i)},updated(e,{value:t}){e._assigning||Ml(e,t)}};function Ml(e,t){const i=e.multiple,n=Q(t);if(i&&!n&&!Ri(t)){process.env.NODE_ENV!=="production"&&ee(`<select multiple v-model> expects an Array or Set value for its binding, but got ${Object.prototype.toString.call(t).slice(8,-1)}.`);return}for(let s=0,r=e.options.length;s<r;s++){const o=e.options[s],a=ji(o);if(i)if(n){const l=typeof a;l==="string"||l==="number"?o.selected=t.some(c=>String(c)===String(a)):o.selected=cr(t,a)>-1}else o.selected=t.has(a);else if(di(ji(o),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!i&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}function ji(e){return"_value"in e?e._value:e.value}function Ll(e,t){const i=t?"_trueValue":"_falseValue";return i in e?e[i]:t}const bf={created(e,t,i){Ds(e,t,i,null,"created")},mounted(e,t,i){Ds(e,t,i,null,"mounted")},beforeUpdate(e,t,i,n){Ds(e,t,i,n,"beforeUpdate")},updated(e,t,i,n){Ds(e,t,i,n,"updated")}};function yf(e,t){switch(e){case"SELECT":return vf;case"TEXTAREA":return Is;default:switch(t){case"checkbox":return Al;case"radio":return _f;default:return Is}}}function Ds(e,t,i,n,s){const o=yf(e.tagName,i.props&&i.props.type)[s];o&&o(e,t,i,n)}const Ef=xt({patchProp:ff},Ku);let Il;function Dl(){return Il||(Il=Nu(Ef))}const Sf=((...e)=>{Dl().render(...e)}),Vl=((...e)=>{const t=Dl().createApp(...e);process.env.NODE_ENV!=="production"&&(xf(t),Cf(t));const{mount:i}=t;return t.mount=n=>{const s=Nf(n);if(!s)return;const r=t._component;!it(r)&&!r.render&&!r.template&&(r.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const o=i(s,!1,wf(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),o},t});function wf(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function xf(e){Object.defineProperty(e.config,"isNativeTag",{value:t=>Ph(t)||Ah(t)||Rh(t),writable:!1})}function Cf(e){{const t=e.config.isCustomElement;Object.defineProperty(e.config,"isCustomElement",{get(){return t},set(){ee("The `isCustomElement` config option is deprecated. Use `compilerOptions.isCustomElement` instead.")}});const i=e.config.compilerOptions,n='The `compilerOptions` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, `compilerOptions` must be passed to `@vue/compiler-dom` in the build setup instead.\n- For vue-loader: pass it via vue-loader\'s `compilerOptions` loader option.\n- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader\n- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc';Object.defineProperty(e.config,"compilerOptions",{get(){return ee(n),i},set(){ee(n)}})}}function Nf(e){if(Ct(e)){const t=document.querySelector(e);return process.env.NODE_ENV!=="production"&&!t&&ee(`Failed to mount app: mount target selector "${e}" returned null.`),t}return process.env.NODE_ENV!=="production"&&window.ShadowRoot&&e instanceof window.ShadowRoot&&e.mode==="closed"&&ee('mounting on a ShadowRoot with `{mode: "closed"}` may lead to unpredictable bugs'),e}function Tf(){zu()}process.env.NODE_ENV!=="production"&&Tf();const Fl=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",kf=Fl+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Of="["+Fl+"]["+kf+"]*",Pf=new RegExp("^"+Of+"$");function Gl(e,t){const i=[];let n=t.exec(e);for(;n;){const s=[];s.startIndex=t.lastIndex-n[0].length;const r=n.length;for(let o=0;o<r;o++)s.push(n[o]);i.push(s),n=t.exec(e)}return i}const Vs=function(e){const t=Pf.exec(e);return!(t===null||typeof t>"u")};function Af(e){return typeof e<"u"}const Rf={allowBooleanAttributes:!1,unpairedTags:[]};function Mf(e,t){t=Object.assign({},Rf,t);const i=[];let n=!1,s=!1;e[0]==="\uFEFF"&&(e=e.substr(1));for(let r=0;r<e.length;r++)if(e[r]==="<"&&e[r+1]==="?"){if(r+=2,r=Hl(e,r),r.err)return r}else if(e[r]==="<"){let o=r;if(r++,e[r]==="!"){r=$l(e,r);continue}else{let a=!1;e[r]==="/"&&(a=!0,r++);let l="";for(;r<e.length&&e[r]!==">"&&e[r]!==" "&&e[r]!==" "&&e[r]!==`
|
|
10
|
-
`&&e[r]!=="\r";r++)l+=e[r];if(l=l.trim(),l[l.length-1]==="/"&&(l=l.substring(0,l.length-1),r--),!Hf(l)){let d;return l.trim().length===0?d="Invalid space after '<'.":d="Tag '"+l+"' is an invalid name.",Pt("InvalidTag",d,Wt(e,r))}const c=Df(e,r);if(c===!1)return Pt("InvalidAttr","Attributes for '"+l+"' have open quote.",Wt(e,r));let h=c.value;if(r=c.index,h[h.length-1]==="/"){const d=r-h.length;h=h.substring(0,h.length-1);const u
|
|
11
|
-
`||e==="\r"}function Hl(e,t){const i=t;for(;t<e.length;t++)if(e[t]=="?"||e[t]==" "){const n=e.substr(i,t-i);if(t>5&&n==="xml")return Pt("InvalidXml","XML declaration allowed only at the start of the document.",Wt(e,t));if(e[t]=="?"&&e[t+1]==">"){t++;break}else continue}return t}function $l(e,t){if(e.length>t+5&&e[t+1]==="-"&&e[t+2]==="-"){for(t+=3;t<e.length;t++)if(e[t]==="-"&&e[t+1]==="-"&&e[t+2]===">"){t+=2;break}}else if(e.length>t+8&&e[t+1]==="D"&&e[t+2]==="O"&&e[t+3]==="C"&&e[t+4]==="T"&&e[t+5]==="Y"&&e[t+6]==="P"&&e[t+7]==="E"){let i=1;for(t+=8;t<e.length;t++)if(e[t]==="<")i++;else if(e[t]===">"&&(i--,i===0))break}else if(e.length>t+9&&e[t+1]==="["&&e[t+2]==="C"&&e[t+3]==="D"&&e[t+4]==="A"&&e[t+5]==="T"&&e[t+6]==="A"&&e[t+7]==="["){for(t+=8;t<e.length;t++)if(e[t]==="]"&&e[t+1]==="]"&&e[t+2]===">"){t+=2;break}}return t}const Lf='"',If="'";function Df(e,t){let i="",n="",s=!1;for(;t<e.length;t++){if(e[t]===Lf||e[t]===If)n===""?n=e[t]:n!==e[t]||(n="");else if(e[t]===">"&&n===""){s=!0;break}i+=e[t]}return n!==""?!1:{value:i,index:t,tagClosed:s}}const Vf=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function Wl(e,t){const i=Gl(e,Vf),n={};for(let s=0;s<i.length;s++){if(i[s][1].length===0)return Pt("InvalidAttr","Attribute '"+i[s][2]+"' has no space in starting.",Nn(i[s]));if(i[s][3]!==void 0&&i[s][4]===void 0)return Pt("InvalidAttr","Attribute '"+i[s][2]+"' is without value.",Nn(i[s]));if(i[s][3]===void 0&&!t.allowBooleanAttributes)return Pt("InvalidAttr","boolean attribute '"+i[s][2]+"' is not allowed.",Nn(i[s]));const r=i[s][2];if(!Bf(r))return Pt("InvalidAttr","Attribute '"+r+"' is an invalid name.",Nn(i[s]));if(!n.hasOwnProperty(r))n[r]=1;else return Pt("InvalidAttr","Attribute '"+r+"' is repeated.",Nn(i[s]))}return!0}function Ff(e,t){let i=/\d/;for(e[t]==="x"&&(t++,i=/[\da-fA-F]/);t<e.length;t++){if(e[t]===";")return t;if(!e[t].match(i))break}return-1}function Gf(e,t){if(t++,e[t]===";")return-1;if(e[t]==="#")return t++,Ff(e,t);let i=0;for(;t<e.length;t++,i++)if(!(e[t].match(/\w/)&&i<20)){if(e[t]===";")break;return-1}return t}function Pt(e,t,i){return{err:{code:e,msg:t,line:i.line||i,col:i.col}}}function Bf(e){return Vs(e)}function Hf(e){return Vs(e)}function Wt(e,t){const i=e.substring(0,t).split(/\r?\n/);return{line:i.length,col:i[i.length-1].length+1}}function Nn(e){return e.startIndex+e[1].length}const $f={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,i){return e},captureMetaData:!1},Wf=function(e){return Object.assign({},$f,e)};let Fs;typeof Symbol!="function"?Fs="@@xmlMetadata":Fs=Symbol("XML Node Metadata");class Ei{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,i){t==="__proto__"&&(t="#__proto__"),this.child.push({[t]:i})}addChild(t,i){t.tagname==="__proto__"&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child}),i!==void 0&&(this.child[this.child.length-1][Fs]={startIndex:i})}static getMetaDataSymbol(){return Fs}}class Uf{constructor(t){this.suppressValidationErr=!t}readDocType(t,i){const n={};if(t[i+3]==="O"&&t[i+4]==="C"&&t[i+5]==="T"&&t[i+6]==="Y"&&t[i+7]==="P"&&t[i+8]==="E"){i=i+9;let s=1,r=!1,o=!1,a="";for(;i<t.length;i++)if(t[i]==="<"&&!o){if(r&&Si(t,"!ENTITY",i)){i+=7;let l,c;[l,c,i]=this.readEntityExp(t,i+1,this.suppressValidationErr),c.indexOf("&")===-1&&(n[l]={regx:RegExp(`&${l};`,"g"),val:c})}else if(r&&Si(t,"!ELEMENT",i)){i+=8;const{index:l}=this.readElementExp(t,i+1);i=l}else if(r&&Si(t,"!ATTLIST",i))i+=8;else if(r&&Si(t,"!NOTATION",i)){i+=9;const{index:l}=this.readNotationExp(t,i+1,this.suppressValidationErr);i=l}else if(Si(t,"!--",i))o=!0;else throw new Error("Invalid DOCTYPE");s++,a=""}else if(t[i]===">"){if(o?t[i-1]==="-"&&t[i-2]==="-"&&(o=!1,s--):s--,s===0)break}else t[i]==="["?r=!0:a+=t[i];if(s!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:n,i}}readEntityExp(t,i){i=zt(t,i);let n="";for(;i<t.length&&!/\s/.test(t[i])&&t[i]!=='"'&&t[i]!=="'";)n+=t[i],i++;if(Tn(n),i=zt(t,i),!this.suppressValidationErr){if(t.substring(i,i+6).toUpperCase()==="SYSTEM")throw new Error("External entities are not supported");if(t[i]==="%")throw new Error("Parameter entities are not supported")}let s="";return[i,s]=this.readIdentifierVal(t,i,"entity"),i--,[n,s,i]}readNotationExp(t,i){i=zt(t,i);let n="";for(;i<t.length&&!/\s/.test(t[i]);)n+=t[i],i++;!this.suppressValidationErr&&Tn(n),i=zt(t,i);const s=t.substring(i,i+6).toUpperCase();if(!this.suppressValidationErr&&s!=="SYSTEM"&&s!=="PUBLIC")throw new Error(`Expected SYSTEM or PUBLIC, found "${s}"`);i+=s.length,i=zt(t,i);let r=null,o=null;if(s==="PUBLIC")[i,r]=this.readIdentifierVal(t,i,"publicIdentifier"),i=zt(t,i),(t[i]==='"'||t[i]==="'")&&([i,o]=this.readIdentifierVal(t,i,"systemIdentifier"));else if(s==="SYSTEM"&&([i,o]=this.readIdentifierVal(t,i,"systemIdentifier"),!this.suppressValidationErr&&!o))throw new Error("Missing mandatory system identifier for SYSTEM notation");return{notationName:n,publicIdentifier:r,systemIdentifier:o,index:--i}}readIdentifierVal(t,i,n){let s="";const r=t[i];if(r!=='"'&&r!=="'")throw new Error(`Expected quoted string, found "${r}"`);for(i++;i<t.length&&t[i]!==r;)s+=t[i],i++;if(t[i]!==r)throw new Error(`Unterminated ${n} value`);return i++,[i,s]}readElementExp(t,i){i=zt(t,i);let n="";for(;i<t.length&&!/\s/.test(t[i]);)n+=t[i],i++;if(!this.suppressValidationErr&&!Vs(n))throw new Error(`Invalid element name: "${n}"`);i=zt(t,i);let s="";if(t[i]==="E"&&Si(t,"MPTY",i))i+=4;else if(t[i]==="A"&&Si(t,"NY",i))i+=2;else if(t[i]==="("){for(i++;i<t.length&&t[i]!==")";)s+=t[i],i++;if(t[i]!==")")throw new Error("Unterminated content model")}else if(!this.suppressValidationErr)throw new Error(`Invalid Element Expression, found "${t[i]}"`);return{elementName:n,contentModel:s.trim(),index:i}}readAttlistExp(t,i){i=zt(t,i);let n="";for(;i<t.length&&!/\s/.test(t[i]);)n+=t[i],i++;Tn(n),i=zt(t,i);let s="";for(;i<t.length&&!/\s/.test(t[i]);)s+=t[i],i++;if(!Tn(s))throw new Error(`Invalid attribute name: "${s}"`);i=zt(t,i);let r="";if(t.substring(i,i+8).toUpperCase()==="NOTATION"){if(r="NOTATION",i+=8,i=zt(t,i),t[i]!=="(")throw new Error(`Expected '(', found "${t[i]}"`);i++;let a=[];for(;i<t.length&&t[i]!==")";){let l="";for(;i<t.length&&t[i]!=="|"&&t[i]!==")";)l+=t[i],i++;if(l=l.trim(),!Tn(l))throw new Error(`Invalid notation name: "${l}"`);a.push(l),t[i]==="|"&&(i++,i=zt(t,i))}if(t[i]!==")")throw new Error("Unterminated list of notations");i++,r+=" ("+a.join("|")+")"}else{for(;i<t.length&&!/\s/.test(t[i]);)r+=t[i],i++;const a=["CDATA","ID","IDREF","IDREFS","ENTITY","ENTITIES","NMTOKEN","NMTOKENS"];if(!this.suppressValidationErr&&!a.includes(r.toUpperCase()))throw new Error(`Invalid attribute type: "${r}"`)}i=zt(t,i);let o="";return t.substring(i,i+8).toUpperCase()==="#REQUIRED"?(o="#REQUIRED",i+=8):t.substring(i,i+7).toUpperCase()==="#IMPLIED"?(o="#IMPLIED",i+=7):[i,o]=this.readIdentifierVal(t,i,"ATTLIST"),{elementName:n,attributeName:s,attributeType:r,defaultValue:o,index:i}}}const zt=(e,t)=>{for(;t<e.length&&/\s/.test(e[t]);)t++;return t};function Si(e,t,i){for(let n=0;n<t.length;n++)if(t[n]!==e[i+n+1])return!1;return!0}function Tn(e){if(Vs(e))return e;throw new Error(`Invalid entity name ${e}`)}const jf=/^[-+]?0x[a-fA-F0-9]+$/,Xf=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,zf={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};function Yf(e,t={}){if(t=Object.assign({},zf,t),!e||typeof e!="string")return e;let i=e.trim();if(t.skipLike!==void 0&&t.skipLike.test(i))return e;if(e==="0")return 0;if(t.hex&&jf.test(i))return Qf(i,16);if(i.includes("e")||i.includes("E"))return Kf(e,i,t);{const n=Xf.exec(i);if(n){const s=n[1]||"",r=n[2];let o=Jf(n[3]);const a=s?e[r.length+1]===".":e[r.length]===".";if(!t.leadingZeros&&(r.length>1||r.length===1&&!a))return e;{const l=Number(i),c=String(l);if(l===0)return l;if(c.search(/[eE]/)!==-1)return t.eNotation?l:e;if(i.indexOf(".")!==-1)return c==="0"||c===o||c===`${s}${o}`?l:e;let h=r?o:i;return r?h===c||s+h===c?l:e:h===c||h===s+c?l:e}}else return e}}const qf=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;function Kf(e,t,i){if(!i.eNotation)return e;const n=t.match(qf);if(n){let s=n[1]||"";const r=n[3].indexOf("e")===-1?"E":"e",o=n[2],a=s?e[o.length+1]===r:e[o.length]===r;return o.length>1&&a?e:o.length===1&&(n[3].startsWith(`.${r}`)||n[3][0]===r)?Number(t):i.leadingZeros&&!a?(t=(n[1]||"")+n[3],Number(t)):e}else return e}function Jf(e){return e&&e.indexOf(".")!==-1&&(e=e.replace(/0+$/,""),e==="."?e="0":e[0]==="."?e="0"+e:e[e.length-1]==="."&&(e=e.substring(0,e.length-1))),e}function Qf(e,t){if(parseInt)return parseInt(e,t);if(Number.parseInt)return Number.parseInt(e,t);if(window&&window.parseInt)return window.parseInt(e,t);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}function Ul(e){return typeof e=="function"?e:Array.isArray(e)?t=>{for(const i of e)if(typeof i=="string"&&t===i||i instanceof RegExp&&i.test(t))return!0}:()=>!1}class Zf{constructor(t){if(this.options=t,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(i,n)=>String.fromCodePoint(Number.parseInt(n,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(i,n)=>String.fromCodePoint(Number.parseInt(n,16))}},this.addExternalEntities=t0,this.parseXml=r0,this.parseTextData=e0,this.resolveNameSpace=i0,this.buildAttributesMap=s0,this.isItStopNode=c0,this.replaceEntitiesValue=a0,this.readStopNodeData=d0,this.saveTextToParentTag=l0,this.addChild=o0,this.ignoreAttributesFn=Ul(this.options.ignoreAttributes),this.options.stopNodes&&this.options.stopNodes.length>0){this.stopNodesExact=new Set,this.stopNodesWildcard=new Set;for(let i=0;i<this.options.stopNodes.length;i++){const n=this.options.stopNodes[i];typeof n=="string"&&(n.startsWith("*.")?this.stopNodesWildcard.add(n.substring(2)):this.stopNodesExact.add(n))}}}}function t0(e){const t=Object.keys(e);for(let i=0;i<t.length;i++){const n=t[i];this.lastEntities[n]={regex:new RegExp("&"+n+";","g"),val:e[n]}}}function e0(e,t,i,n,s,r,o){if(e!==void 0&&(this.options.trimValues&&!n&&(e=e.trim()),e.length>0)){o||(e=this.replaceEntitiesValue(e));const a=this.options.tagValueProcessor(t,e,i,s,r);return a==null?e:typeof a!=typeof e||a!==e?a:this.options.trimValues?io(e,this.options.parseTagValue,this.options.numberParseOptions):e.trim()===e?io(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function i0(e){if(this.options.removeNSPrefix){const t=e.split(":"),i=e.charAt(0)==="/"?"/":"";if(t[0]==="xmlns")return"";t.length===2&&(e=i+t[1])}return e}const n0=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function s0(e,t){if(this.options.ignoreAttributes!==!0&&typeof e=="string"){const i=Gl(e,n0),n=i.length,s={};for(let r=0;r<n;r++){const o=this.resolveNameSpace(i[r][1]);if(this.ignoreAttributesFn(o,t))continue;let a=i[r][4],l=this.options.attributeNamePrefix+o;if(o.length)if(this.options.transformAttributeName&&(l=this.options.transformAttributeName(l)),l==="__proto__"&&(l="#__proto__"),a!==void 0){this.options.trimValues&&(a=a.trim()),a=this.replaceEntitiesValue(a);const c=this.options.attributeValueProcessor(o,a,t);c==null?s[l]=a:typeof c!=typeof a||c!==a?s[l]=c:s[l]=io(a,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(s[l]=!0)}if(!Object.keys(s).length)return;if(this.options.attributesGroupName){const r={};return r[this.options.attributesGroupName]=s,r}return s}}const r0=function(e){e=e.replace(/\r\n?/g,`
|
|
12
|
-
`);const t=new Ei("!xml");let i=t,n="",s="";const r=new Uf(this.options.processEntities);for(let o=0;o<e.length;o++)if(e[o]==="<")if(e[o+1]==="/"){const l=wi(e,">",o,"Closing Tag is not closed.");let c=e.substring(o+2,l).trim();if(this.options.removeNSPrefix){const u=c.indexOf(":");u!==-1&&(c=c.substr(u+1))}this.options.transformTagName&&(c=this.options.transformTagName(c)),i&&(n=this.saveTextToParentTag(n,i,s));const h=s.substring(s.lastIndexOf(".")+1);if(c&&this.options.unpairedTags.indexOf(c)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${c}>`);let d=0;h&&this.options.unpairedTags.indexOf(h)!==-1?(d=s.lastIndexOf(".",s.lastIndexOf(".")-1),this.tagsNodeStack.pop()):d=s.lastIndexOf("."),s=s.substring(0,d),i=this.tagsNodeStack.pop(),n="",o=l}else if(e[o+1]==="?"){let l=eo(e,o,!1,"?>");if(!l)throw new Error("Pi Tag is not closed.");if(n=this.saveTextToParentTag(n,i,s),!(this.options.ignoreDeclaration&&l.tagName==="?xml"||this.options.ignorePiTags)){const c=new Ei(l.tagName);c.add(this.options.textNodeName,""),l.tagName!==l.tagExp&&l.attrExpPresent&&(c[":@"]=this.buildAttributesMap(l.tagExp,s)),this.addChild(i,c,s,o)}o=l.closeIndex+1}else if(e.substr(o+1,3)==="!--"){const l=wi(e,"-->",o+4,"Comment is not closed.");if(this.options.commentPropName){const c=e.substring(o+4,l-2);n=this.saveTextToParentTag(n,i,s),i.add(this.options.commentPropName,[{[this.options.textNodeName]:c}])}o=l}else if(e.substr(o+1,2)==="!D"){const l=r.readDocType(e,o);this.docTypeEntities=l.entities,o=l.i}else if(e.substr(o+1,2)==="!["){const l=wi(e,"]]>",o,"CDATA is not closed.")-2,c=e.substring(o+9,l);n=this.saveTextToParentTag(n,i,s);let h=this.parseTextData(c,i.tagname,s,!0,!1,!0,!0);h==null&&(h=""),this.options.cdataPropName?i.add(this.options.cdataPropName,[{[this.options.textNodeName]:c}]):i.add(this.options.textNodeName,h),o=l+2}else{let l=eo(e,o,this.options.removeNSPrefix),c=l.tagName;const h=l.rawTagName;let d=l.tagExp,u=l.attrExpPresent,f=l.closeIndex;if(this.options.transformTagName){const b=this.options.transformTagName(c);d===c&&(d=b),c=b}i&&n&&i.tagname!=="!xml"&&(n=this.saveTextToParentTag(n,i,s,!1));const p=i;p&&this.options.unpairedTags.indexOf(p.tagname)!==-1&&(i=this.tagsNodeStack.pop(),s=s.substring(0,s.lastIndexOf("."))),c!==t.tagname&&(s+=s?"."+c:c);const _=o;if(this.isItStopNode(this.stopNodesExact,this.stopNodesWildcard,s,c)){let b="";if(d.length>0&&d.lastIndexOf("/")===d.length-1)c[c.length-1]==="/"?(c=c.substr(0,c.length-1),s=s.substr(0,s.length-1),d=c):d=d.substr(0,d.length-1),o=l.closeIndex;else if(this.options.unpairedTags.indexOf(c)!==-1)o=l.closeIndex;else{const y=this.readStopNodeData(e,h,f+1);if(!y)throw new Error(`Unexpected end of ${h}`);o=y.i,b=y.tagContent}const S=new Ei(c);c!==d&&u&&(S[":@"]=this.buildAttributesMap(d,s)),b&&(b=this.parseTextData(b,c,s,!0,u,!0,!0)),s=s.substr(0,s.lastIndexOf(".")),S.add(this.options.textNodeName,b),this.addChild(i,S,s,_)}else{if(d.length>0&&d.lastIndexOf("/")===d.length-1){if(c[c.length-1]==="/"?(c=c.substr(0,c.length-1),s=s.substr(0,s.length-1),d=c):d=d.substr(0,d.length-1),this.options.transformTagName){const S=this.options.transformTagName(c);d===c&&(d=S),c=S}const b=new Ei(c);c!==d&&u&&(b[":@"]=this.buildAttributesMap(d,s)),this.addChild(i,b,s,_),s=s.substr(0,s.lastIndexOf("."))}else{const b=new Ei(c);this.tagsNodeStack.push(i),c!==d&&u&&(b[":@"]=this.buildAttributesMap(d,s)),this.addChild(i,b,s,_),i=b}n="",o=f}}else n+=e[o];return t.child};function o0(e,t,i,n){this.options.captureMetaData||(n=void 0);const s=this.options.updateTag(t.tagname,i,t[":@"]);s===!1||(typeof s=="string"&&(t.tagname=s),e.addChild(t,n))}const a0=function(e){if(this.options.processEntities){for(let t in this.docTypeEntities){const i=this.docTypeEntities[t];e=e.replace(i.regx,i.val)}for(let t in this.lastEntities){const i=this.lastEntities[t];e=e.replace(i.regex,i.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){const i=this.htmlEntities[t];e=e.replace(i.regex,i.val)}e=e.replace(this.ampEntity.regex,this.ampEntity.val)}return e};function l0(e,t,i,n){return e&&(n===void 0&&(n=t.child.length===0),e=this.parseTextData(e,t.tagname,i,!1,t[":@"]?Object.keys(t[":@"]).length!==0:!1,n),e!==void 0&&e!==""&&t.add(this.options.textNodeName,e),e=""),e}function c0(e,t,i,n){return!!(t&&t.has(n)||e&&e.has(i))}function h0(e,t,i=">"){let n,s="";for(let r=t;r<e.length;r++){let o=e[r];if(n)o===n&&(n="");else if(o==='"'||o==="'")n=o;else if(o===i[0])if(i[1]){if(e[r+1]===i[1])return{data:s,index:r}}else return{data:s,index:r};else o===" "&&(o=" ");s+=o}}function wi(e,t,i,n){const s=e.indexOf(t,i);if(s===-1)throw new Error(n);return s+t.length-1}function eo(e,t,i,n=">"){const s=h0(e,t+1,n);if(!s)return;let r=s.data;const o=s.index,a=r.search(/\s/);let l=r,c=!0;a!==-1&&(l=r.substring(0,a),r=r.substring(a+1).trimStart());const h=l;if(i){const d=l.indexOf(":");d!==-1&&(l=l.substr(d+1),c=l!==s.data.substr(d+1))}return{tagName:l,tagExp:r,closeIndex:o,attrExpPresent:c,rawTagName:h}}function d0(e,t,i){const n=i;let s=1;for(;i<e.length;i++)if(e[i]==="<")if(e[i+1]==="/"){const r=wi(e,">",i,`${t} is not closed`);if(e.substring(i+2,r).trim()===t&&(s--,s===0))return{tagContent:e.substring(n,i),i:r};i=r}else if(e[i+1]==="?")i=wi(e,"?>",i+1,"StopNode is not closed.");else if(e.substr(i+1,3)==="!--")i=wi(e,"-->",i+3,"StopNode is not closed.");else if(e.substr(i+1,2)==="![")i=wi(e,"]]>",i,"StopNode is not closed.")-2;else{const r=eo(e,i,">");r&&((r&&r.tagName)===t&&r.tagExp[r.tagExp.length-1]!=="/"&&s++,i=r.closeIndex)}}function io(e,t,i){if(t&&typeof e=="string"){const n=e.trim();return n==="true"?!0:n==="false"?!1:Yf(e,i)}else return Af(e)?e:""}const no=Ei.getMetaDataSymbol();function u0(e,t){return
|
|
13
|
-
`;function _0(e,t){let i="";return t.format&&t.indentBy.length>0&&(i=m0),Xl(e,t,"",i)}function Xl(e,t,i,n){let s="",r=!1;for(let o=0;o<e.length;o++){const a=e[o],l=v0(a);if(l===void 0)continue;let c="";if(i.length===0?c=l:c=`${i}.${l}`,l===t.textNodeName){let p=a[l];b0(c,t)||(p=t.tagValueProcessor(l,p),p=Yl(p,t)),r&&(s+=n),s+=p,r=!1;continue}else if(l===t.cdataPropName){r&&(s+=n),s+=`<![CDATA[${a[l][0][t.textNodeName]}]]>`,r=!1;continue}else if(l===t.commentPropName){s+=n+`<!--${a[l][0][t.textNodeName]}-->`,r=!0;continue}else if(l[0]==="?"){const p=zl(a[":@"],t),_=l==="?xml"?"":n;let b=a[l][0][t.textNodeName];b=b.length!==0?" "+b:"",s+=_+`<${l}${b}${p}?>`,r=!0;continue}let h=n;h!==""&&(h+=t.indentBy);const d=zl(a[":@"],t),u=n+`<${l}${d}`,f=Xl(a[l],t,c,h);t.unpairedTags.indexOf(l)!==-1?t.suppressUnpairedNode?s+=u+">":s+=u+"/>":(!f||f.length===0)&&t.suppressEmptyNode?s+=u+"/>":f&&f.endsWith(">")?s+=u+`>${f}${n}</${l}>`:(s+=u+">",f&&n!==""&&(f.includes("/>")||f.includes("</"))?s+=n+t.indentBy+f+n:s+=f,s+=`</${l}>`),r=!0}return s}function v0(e){const t=Object.keys(e);for(let i=0;i<t.length;i++){const n=t[i];if(e.hasOwnProperty(n)&&n!==":@")return n}}function zl(e,t){let i="";if(e&&!t.ignoreAttributes)for(let n in e){if(!e.hasOwnProperty(n))continue;let s=t.attributeValueProcessor(n,e[n]);s=Yl(s,t),s===!0&&t.suppressBooleanAttributes?i+=` ${n.substr(t.attributeNamePrefix.length)}`:i+=` ${n.substr(t.attributeNamePrefix.length)}="${s}"`}return i}function b0(e,t){e=e.substr(0,e.length-t.textNodeName.length-1);let i=e.substr(e.lastIndexOf(".")+1);for(let n in t.stopNodes)if(t.stopNodes[n]===e||t.stopNodes[n]==="*."+i)return!0;return!1}function Yl(e,t){if(e&&e.length>0&&t.processEntities)for(let i=0;i<t.entities.length;i++){const n=t.entities[i];e=e.replace(n.regex,n.val)}return e}const y0={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function Ne(e){this.options=Object.assign({},y0,e),this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=
|
|
7
|
+
For more details, see https://link.vuejs.org/feature-flags.`)}}const Qt=Pu;function Nu(e){return Tu(e)}function Tu(e,t){Cu();const i=nn();i.__VUE__=!0,process.env.NODE_ENV!=="production"&&kr(i.__VUE_DEVTOOLS_GLOBAL_HOOK__,i);const{insert:n,remove:s,patchProp:r,createElement:o,createText:a,createComment:l,setText:c,setElementText:h,parentNode:d,nextSibling:u,setScopeId:f=Lt,insertStaticContent:p}=e,_=(g,v,k,F=null,R=null,M=null,Y=void 0,j=null,W=process.env.NODE_ENV!=="production"&&xe?!1:!!v.dynamicChildren)=>{if(g===v)return;g&&!Sn(g,v)&&(F=ve(g),Ot(g,R,M,!0),g=null),v.patchFlag===-2&&(W=!1,v.dynamicChildren=null);const{type:I,ref:et,shapeFlag:q}=v;switch(I){case bn:b(g,v,k,F);break;case Zt:S(g,v,k,F);break;case Ns:g==null?y(v,k,F,Y):process.env.NODE_ENV!=="production"&&C(g,v,k,Y);break;case Ft:Z(g,v,k,F,R,M,Y,j,W);break;default:q&1?O(g,v,k,F,R,M,Y,j,W):q&6?J(g,v,k,F,R,M,Y,j,W):q&64||q&128?I.process(g,v,k,F,R,M,Y,j,W,Yn):process.env.NODE_ENV!=="production"&&U("Invalid VNode type:",I,`(${typeof I})`)}et!=null&&R?gn(et,g&&g.ref,M,v||g,!v):et==null&&g&&g.ref!=null&&gn(g.ref,null,M,g,!0)},b=(g,v,k,F)=>{if(g==null)n(v.el=a(v.children),k,F);else{const R=v.el=g.el;v.children!==g.children&&c(R,v.children)}},S=(g,v,k,F)=>{g==null?n(v.el=l(v.children||""),k,F):v.el=g.el},y=(g,v,k,F)=>{[g.el,g.anchor]=p(g.children,v,k,F,g.el,g.anchor)},C=(g,v,k,F)=>{if(v.children!==g.children){const R=u(g.anchor);T(g),[v.el,v.anchor]=p(v.children,k,R,F)}else v.el=g.el,v.anchor=g.anchor},N=({el:g,anchor:v},k,F)=>{let R;for(;g&&g!==v;)R=u(g),n(g,k,F),g=R;n(v,k,F)},T=({el:g,anchor:v})=>{let k;for(;g&&g!==v;)k=u(g),s(g),g=k;s(v)},O=(g,v,k,F,R,M,Y,j,W)=>{if(v.type==="svg"?Y="svg":v.type==="math"&&(Y="mathml"),g==null)w(v,k,F,R,M,Y,j,W);else{const I=g.el&&g.el._isVueCE?g.el:null;try{I&&I._beginPatch(),B(g,v,R,M,Y,j,W)}finally{I&&I._endPatch()}}},w=(g,v,k,F,R,M,Y,j)=>{let W,I;const{props:et,shapeFlag:q,transition:tt,dirs:st}=g;if(W=g.el=o(g.type,M,et&&et.is,et),q&8?h(W,g.children):q&16&&P(g.children,W,null,F,R,Xr(g,M),Y,j),st&&mi(g,null,F,"created"),x(W,g,g.scopeId,Y,F),et){for(const bt in et)bt!=="value"&&!en(bt)&&r(W,bt,null,et[bt],M,F);"value"in et&&r(W,"value",null,et.value,M),(I=et.onVnodeBeforeMount)&&Ce(I,F,g)}process.env.NODE_ENV!=="production"&&(Zn(W,"__vnode",g,!0),Zn(W,"__vueParentComponent",F,!0)),st&&mi(g,null,F,"beforeMount");const dt=ku(R,tt);dt&&tt.beforeEnter(W),n(W,v,k),((I=et&&et.onVnodeMounted)||dt||st)&&Qt(()=>{I&&Ce(I,F,g),dt&&tt.enter(W),st&&mi(g,null,F,"mounted")},R)},x=(g,v,k,F,R)=>{if(k&&f(g,k),F)for(let M=0;M<F.length;M++)f(g,F[M]);if(R){let M=R.subTree;if(process.env.NODE_ENV!=="production"&&M.patchFlag>0&&M.patchFlag&2048&&(M=Hr(M.children)||M),v===M||tl(M.type)&&(M.ssContent===v||M.ssFallback===v)){const Y=R.vnode;x(g,Y,Y.scopeId,Y.slotScopeIds,R.parent)}}},P=(g,v,k,F,R,M,Y,j,W=0)=>{for(let I=W;I<g.length;I++){const et=g[I]=j?Qe(g[I]):me(g[I]);_(null,et,v,k,F,R,M,Y,j)}},B=(g,v,k,F,R,M,Y)=>{const j=v.el=g.el;process.env.NODE_ENV!=="production"&&(j.__vnode=v);let{patchFlag:W,dynamicChildren:I,dirs:et}=v;W|=g.patchFlag&16;const q=g.props||ht,tt=v.props||ht;let st;if(k&&yi(k,!1),(st=tt.onVnodeBeforeUpdate)&&Ce(st,k,v,g),et&&mi(v,g,k,"beforeUpdate"),k&&yi(k,!0),process.env.NODE_ENV!=="production"&&xe&&(W=0,Y=!1,I=null),(q.innerHTML&&tt.innerHTML==null||q.textContent&&tt.textContent==null)&&h(j,""),I?(K(g.dynamicChildren,I,j,k,F,Xr(v,R),M),process.env.NODE_ENV!=="production"&&Cs(g,v)):Y||nt(g,v,j,null,k,F,Xr(v,R),M,!1),W>0){if(W&16)z(j,q,tt,k,R);else if(W&2&&q.class!==tt.class&&r(j,"class",null,tt.class,R),W&4&&r(j,"style",q.style,tt.style,R),W&8){const dt=v.dynamicProps;for(let bt=0;bt<dt.length;bt++){const _t=dt[bt],Yt=q[_t],qt=tt[_t];(qt!==Yt||_t==="value")&&r(j,_t,Yt,qt,R,k)}}W&1&&g.children!==v.children&&h(j,v.children)}else!Y&&I==null&&z(j,q,tt,k,R);((st=tt.onVnodeUpdated)||et)&&Qt(()=>{st&&Ce(st,k,v,g),et&&mi(v,g,k,"updated")},F)},K=(g,v,k,F,R,M,Y)=>{for(let j=0;j<v.length;j++){const W=g[j],I=v[j],et=W.el&&(W.type===Ft||!Sn(W,I)||W.shapeFlag&198)?d(W.el):k;_(W,I,et,null,F,R,M,Y,!0)}},z=(g,v,k,F,R)=>{if(v!==k){if(v!==ht)for(const M in v)!en(M)&&!(M in k)&&r(g,M,v[M],null,R,F);for(const M in k){if(en(M))continue;const Y=k[M],j=v[M];Y!==j&&M!=="value"&&r(g,M,j,Y,R,F)}"value"in k&&r(g,"value",v.value,k.value,R)}},Z=(g,v,k,F,R,M,Y,j,W)=>{const I=v.el=g?g.el:a(""),et=v.anchor=g?g.anchor:a("");let{patchFlag:q,dynamicChildren:tt,slotScopeIds:st}=v;process.env.NODE_ENV!=="production"&&(xe||q&2048)&&(q=0,W=!1,tt=null),st&&(j=j?j.concat(st):st),g==null?(n(I,k,F),n(et,k,F),P(v.children||[],k,et,R,M,Y,j,W)):q>0&&q&64&&tt&&g.dynamicChildren?(K(g.dynamicChildren,tt,k,R,M,Y,j),process.env.NODE_ENV!=="production"?Cs(g,v):(v.key!=null||R&&v===R.subTree)&&Cs(g,v,!0)):nt(g,v,k,et,R,M,Y,j,W)},J=(g,v,k,F,R,M,Y,j,W)=>{v.slotScopeIds=j,g==null?v.shapeFlag&512?R.ctx.activate(v,k,F,Y,W):A(v,k,F,R,M,Y,W):L(g,v,W)},A=(g,v,k,F,R,M,Y)=>{const j=g.component=Fu(g,F,R);if(process.env.NODE_ENV!=="production"&&j.type.__hmrId&&_d(j),process.env.NODE_ENV!=="production"&&(cs(g),$i(j,"mount")),Ar(g)&&(j.ctx.renderer=Yn),process.env.NODE_ENV!=="production"&&$i(j,"init"),Bu(j,!1,Y),process.env.NODE_ENV!=="production"&&Wi(j,"init"),process.env.NODE_ENV!=="production"&&xe&&(g.el=null),j.asyncDep){if(R&&R.registerDep(j,H,Y),!g.el){const W=j.subTree=Tt(Zt);S(null,W,v,k),g.placeholder=W.el}}else H(j,g,v,k,R,M,Y);process.env.NODE_ENV!=="production"&&(hs(),Wi(j,"mount"))},L=(g,v,k)=>{const F=v.component=g.component;if(hu(g,v,k))if(F.asyncDep&&!F.asyncResolved){process.env.NODE_ENV!=="production"&&cs(v),D(F,v,k),process.env.NODE_ENV!=="production"&&hs();return}else F.next=v,F.update();else v.el=g.el,F.vnode=v},H=(g,v,k,F,R,M,Y)=>{const j=()=>{if(g.isMounted){let{next:q,bu:tt,u:st,parent:dt,vnode:bt}=g;{const Pe=Qa(g);if(Pe){q&&(q.el=bt.el,D(g,q,Y)),Pe.asyncDep.then(()=>{g.isUnmounted||j()});return}}let _t=q,Yt;process.env.NODE_ENV!=="production"&&cs(q||g.vnode),yi(g,!1),q?(q.el=bt.el,D(g,q,Y)):q=bt,tt&&Mi(tt),(Yt=q.props&&q.props.onVnodeBeforeUpdate)&&Ce(Yt,dt,q,bt),yi(g,!0),process.env.NODE_ENV!=="production"&&$i(g,"render");const qt=Va(g);process.env.NODE_ENV!=="production"&&Wi(g,"render");const Oe=g.subTree;g.subTree=qt,process.env.NODE_ENV!=="production"&&$i(g,"patch"),_(Oe,qt,d(Oe.el),ve(Oe),g,R,M),process.env.NODE_ENV!=="production"&&Wi(g,"patch"),q.el=qt.el,_t===null&&du(g,qt.el),st&&Qt(st,R),(Yt=q.props&&q.props.onVnodeUpdated)&&Qt(()=>Ce(Yt,dt,q,bt),R),process.env.NODE_ENV!=="production"&&ma(g),process.env.NODE_ENV!=="production"&&hs()}else{let q;const{el:tt,props:st}=v,{bm:dt,m:bt,parent:_t,root:Yt,type:qt}=g,Oe=mn(v);yi(g,!1),dt&&Mi(dt),!Oe&&(q=st&&st.onVnodeBeforeMount)&&Ce(q,_t,v),yi(g,!0);{Yt.ce&&Yt.ce._def.shadowRoot!==!1&&Yt.ce._injectChildStyle(qt),process.env.NODE_ENV!=="production"&&$i(g,"render");const Pe=g.subTree=Va(g);process.env.NODE_ENV!=="production"&&Wi(g,"render"),process.env.NODE_ENV!=="production"&&$i(g,"patch"),_(null,Pe,k,F,g,R,M),process.env.NODE_ENV!=="production"&&Wi(g,"patch"),v.el=Pe.el}if(bt&&Qt(bt,R),!Oe&&(q=st&&st.onVnodeMounted)){const Pe=v;Qt(()=>Ce(q,_t,Pe),R)}(v.shapeFlag&256||_t&&mn(_t.vnode)&&_t.vnode.shapeFlag&256)&&g.a&&Qt(g.a,R),g.isMounted=!0,process.env.NODE_ENV!=="production"&&wd(g),v=k=F=null}};g.scope.on();const W=g.effect=new Bo(j);g.scope.off();const I=g.update=W.run.bind(W),et=g.job=W.runIfDirty.bind(W);et.i=g,et.id=g.uid,W.scheduler=()=>fs(et),yi(g,!0),process.env.NODE_ENV!=="production"&&(W.onTrack=g.rtc?q=>Mi(g.rtc,q):void 0,W.onTrigger=g.rtg?q=>Mi(g.rtg,q):void 0),I()},D=(g,v,k)=>{v.component=g;const F=g.vnode.props;g.vnode=v,g.next=null,pu(g,v.props,F,k),xu(g,v.children,k),de(),da(g),ue()},nt=(g,v,k,F,R,M,Y,j,W=!1)=>{const I=g&&g.children,et=g?g.shapeFlag:0,q=v.children,{patchFlag:tt,shapeFlag:st}=v;if(tt>0){if(tt&128){ot(I,q,k,F,R,M,Y,j,W);return}else if(tt&256){ct(I,q,k,F,R,M,Y,j,W);return}}st&8?(et&16&&le(I,R,M),q!==I&&h(k,q)):et&16?st&16?ot(I,q,k,F,R,M,Y,j,W):le(I,R,M,!0):(et&8&&h(k,""),st&16&&P(q,k,F,R,M,Y,j,W))},ct=(g,v,k,F,R,M,Y,j,W)=>{g=g||Ai,v=v||Ai;const I=g.length,et=v.length,q=Math.min(I,et);let tt;for(tt=0;tt<q;tt++){const st=v[tt]=W?Qe(v[tt]):me(v[tt]);_(g[tt],st,k,null,R,M,Y,j,W)}I>et?le(g,R,M,!0,!1,q):P(v,k,F,R,M,Y,j,W,q)},ot=(g,v,k,F,R,M,Y,j,W)=>{let I=0;const et=v.length;let q=g.length-1,tt=et-1;for(;I<=q&&I<=tt;){const st=g[I],dt=v[I]=W?Qe(v[I]):me(v[I]);if(Sn(st,dt))_(st,dt,k,null,R,M,Y,j,W);else break;I++}for(;I<=q&&I<=tt;){const st=g[q],dt=v[tt]=W?Qe(v[tt]):me(v[tt]);if(Sn(st,dt))_(st,dt,k,null,R,M,Y,j,W);else break;q--,tt--}if(I>q){if(I<=tt){const st=tt+1,dt=st<et?v[st].el:F;for(;I<=tt;)_(null,v[I]=W?Qe(v[I]):me(v[I]),k,dt,R,M,Y,j,W),I++}}else if(I>tt)for(;I<=q;)Ot(g[I],R,M,!0),I++;else{const st=I,dt=I,bt=new Map;for(I=dt;I<=tt;I++){const Ut=v[I]=W?Qe(v[I]):me(v[I]);Ut.key!=null&&(process.env.NODE_ENV!=="production"&&bt.has(Ut.key)&&U("Duplicate keys found during update:",JSON.stringify(Ut.key),"Make sure keys are unique."),bt.set(Ut.key,I))}let _t,Yt=0;const qt=tt-dt+1;let Oe=!1,Pe=0;const qn=new Array(qt);for(I=0;I<qt;I++)qn[I]=0;for(I=st;I<=q;I++){const Ut=g[I];if(Yt>=qt){Ot(Ut,R,M,!0);continue}let Ae;if(Ut.key!=null)Ae=bt.get(Ut.key);else for(_t=dt;_t<=tt;_t++)if(qn[_t-dt]===0&&Sn(Ut,v[_t])){Ae=_t;break}Ae===void 0?Ot(Ut,R,M,!0):(qn[Ae-dt]=I+1,Ae>=Pe?Pe=Ae:Oe=!0,_(Ut,v[Ae],k,null,R,M,Y,j,W),Yt++)}const mh=Oe?Ou(qn):Ai;for(_t=mh.length-1,I=qt-1;I>=0;I--){const Ut=dt+I,Ae=v[Ut],_h=v[Ut+1],vh=Ut+1<et?_h.el||_h.placeholder:F;qn[I]===0?_(null,Ae,k,vh,R,M,Y,j,W):Oe&&(_t<0||I!==mh[_t]?gt(Ae,k,vh,2):_t--)}}},gt=(g,v,k,F,R=null)=>{const{el:M,type:Y,transition:j,children:W,shapeFlag:I}=g;if(I&6){gt(g.component.subTree,v,k,F);return}if(I&128){g.suspense.move(v,k,F);return}if(I&64){Y.move(g,v,k,Yn);return}if(Y===Ft){n(M,v,k);for(let q=0;q<W.length;q++)gt(W[q],v,k,F);n(g.anchor,v,k);return}if(Y===Ns){N(g,v,k);return}if(F!==2&&I&1&&j)if(F===0)j.beforeEnter(M),n(M,v,k),Qt(()=>j.enter(M),R);else{const{leave:q,delayLeave:tt,afterLeave:st}=j,dt=()=>{g.ctx.isUnmounted?s(M):n(M,v,k)},bt=()=>{M._isLeaving&&M[Ad](!0),q(M,()=>{dt(),st&&st()})};tt?tt(M,dt,bt):bt()}else n(M,v,k)},Ot=(g,v,k,F=!1,R=!1)=>{const{type:M,props:Y,ref:j,children:W,dynamicChildren:I,shapeFlag:et,patchFlag:q,dirs:tt,cacheIndex:st}=g;if(q===-2&&(R=!1),j!=null&&(de(),gn(j,null,k,g,!0),ue()),st!=null&&(v.renderCache[st]=void 0),et&256){v.ctx.deactivate(g);return}const dt=et&1&&tt,bt=!mn(g);let _t;if(bt&&(_t=Y&&Y.onVnodeBeforeUnmount)&&Ce(_t,v,g),et&6)Qi(g.component,k,F);else{if(et&128){g.suspense.unmount(k,F);return}dt&&mi(g,null,v,"beforeUnmount"),et&64?g.type.remove(g,v,k,Yn,F):I&&!I.hasOnce&&(M!==Ft||q>0&&q&64)?le(I,v,k,!1,!0):(M===Ft&&q&384||!R&&et&16)&&le(W,v,k),F&&Ji(g)}(bt&&(_t=Y&&Y.onVnodeUnmounted)||dt)&&Qt(()=>{_t&&Ce(_t,v,g),dt&&mi(g,null,v,"unmounted")},k)},Ji=g=>{const{type:v,el:k,anchor:F,transition:R}=g;if(v===Ft){process.env.NODE_ENV!=="production"&&g.patchFlag>0&&g.patchFlag&2048&&R&&!R.persisted?g.children.forEach(Y=>{Y.type===Zt?s(Y.el):Ji(Y)}):nr(k,F);return}if(v===Ns){T(g);return}const M=()=>{s(k),R&&!R.persisted&&R.afterLeave&&R.afterLeave()};if(g.shapeFlag&1&&R&&!R.persisted){const{leave:Y,delayLeave:j}=R,W=()=>Y(k,M);j?j(g.el,M,W):W()}else M()},nr=(g,v)=>{let k;for(;g!==v;)k=u(g),s(g),g=k;s(v)},Qi=(g,v,k)=>{process.env.NODE_ENV!=="production"&&g.type.__hmrId&&vd(g);const{bum:F,scope:R,job:M,subTree:Y,um:j,m:W,a:I}=g;Za(W),Za(I),F&&Mi(F),R.stop(),M&&(M.flags|=8,Ot(Y,g,v,k)),j&&Qt(j,v),Qt(()=>{g.isUnmounted=!0},v),process.env.NODE_ENV!=="production"&&Cd(g)},le=(g,v,k,F=!1,R=!1,M=0)=>{for(let Y=M;Y<g.length;Y++)Ot(g[Y],v,k,F,R)},ve=g=>{if(g.shapeFlag&6)return ve(g.component.subTree);if(g.shapeFlag&128)return g.suspense.next();const v=u(g.anchor||g.el),k=v&&v[Od];return k?u(k):v};let Ao=!1;const gh=(g,v,k)=>{g==null?v._vnode&&Ot(v._vnode,null,null,!0):_(v._vnode||null,g,v,null,null,null,k),v._vnode=g,Ao||(Ao=!0,da(),ua(),Ao=!1)},Yn={p:_,um:Ot,m:gt,r:Ji,mt:A,mc:P,pc:nt,pbc:K,n:ve,o:e};return{render:gh,hydrate:void 0,createApp:tu(gh)}}function Xr({type:e,props:t},i){return i==="svg"&&e==="foreignObject"||i==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:i}function yi({effect:e,job:t},i){i?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function ku(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Cs(e,t,i=!1){const n=e.children,s=t.children;if(Q(n)&&Q(s))for(let r=0;r<n.length;r++){const o=n[r];let a=s[r];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=s[r]=Qe(s[r]),a.el=o.el),!i&&a.patchFlag!==-2&&Cs(o,a)),a.type===bn&&a.patchFlag!==-1&&(a.el=o.el),a.type===Zt&&!a.el&&(a.el=o.el),process.env.NODE_ENV!=="production"&&a.el&&(a.el.__vnode=a)}}function Ou(e){const t=e.slice(),i=[0];let n,s,r,o,a;const l=e.length;for(n=0;n<l;n++){const c=e[n];if(c!==0){if(s=i[i.length-1],e[s]<c){t[n]=s,i.push(n);continue}for(r=0,o=i.length-1;r<o;)a=r+o>>1,e[i[a]]<c?r=a+1:o=a;c<e[i[r]]&&(r>0&&(t[n]=i[r-1]),i[r]=n)}}for(r=i.length,o=i[r-1];r-- >0;)i[r]=o,o=t[o];return i}function Qa(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Qa(t)}function Za(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const tl=e=>e.__isSuspense;function Pu(e,t){t&&t.pendingBranch?Q(e)?t.effects.push(...e):t.effects.push(e):ha(e)}const Ft=Symbol.for("v-fgt"),bn=Symbol.for("v-txt"),Zt=Symbol.for("v-cmt"),Ns=Symbol.for("v-stc"),yn=[];let te=null;function ft(e=!1){yn.push(te=e?null:[])}function Au(){yn.pop(),te=yn[yn.length-1]||null}let En=1;function Ts(e,t=!1){En+=e,e<0&&te&&t&&(te.hasOnce=!0)}function el(e){return e.dynamicChildren=En>0?te||Ai:null,Au(),En>0&&te&&te.push(e),e}function Nt(e,t,i,n,s,r){return el(yt(e,t,i,n,s,r,!0))}function Ke(e,t,i,n,s){return el(Tt(e,t,i,n,s,!0))}function Ui(e){return e?e.__v_isVNode===!0:!1}function Sn(e,t){if(process.env.NODE_ENV!=="production"&&t.shapeFlag&6&&e.component){const i=ps.get(t.type);if(i&&i.has(e.component))return e.shapeFlag&=-257,t.shapeFlag&=-513,!1}return e.type===t.type&&e.key===t.key}const Ru=(...e)=>nl(...e),il=({key:e})=>e??null,ks=({ref:e,ref_key:t,ref_for:i})=>(typeof e=="number"&&(e=""+e),e!=null?Ct(e)||Rt(e)||it(e)?{i:Gt,r:e,k:t,f:!!i}:e:null);function yt(e,t=null,i=null,n=0,s=null,r=e===Ft?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&il(t),ref:t&&ks(t),scopeId:va,slotScopeIds:null,children:i,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:n,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:Gt};return a?(zr(l,i),r&128&&e.normalize(l)):i&&(l.shapeFlag|=Ct(i)?8:16),process.env.NODE_ENV!=="production"&&l.key!==l.key&&U("VNode created with invalid key (NaN). VNode type:",l.type),En>0&&!o&&te&&(l.patchFlag>0||r&6)&&l.patchFlag!==32&&te.push(l),l}const Tt=process.env.NODE_ENV!=="production"?Ru:nl;function nl(e,t=null,i=null,n=0,s=null,r=!1){if((!e||e===$d)&&(process.env.NODE_ENV!=="production"&&!e&&U(`Invalid vnode type when creating vnode: ${e}.`),e=Zt),Ui(e)){const a=Je(e,t,!0);return i&&zr(a,i),En>0&&!r&&te&&(a.shapeFlag&6?te[te.indexOf(e)]=a:te.push(a)),a.patchFlag=-2,a}if(hl(e)&&(e=e.__vccOpts),t){t=Mu(t);let{class:a,style:l}=t;a&&!Ct(a)&&(t.class=Li(a)),ut(l)&&(os(l)&&!Q(l)&&(l=xt({},l)),t.style=lr(l))}const o=Ct(e)?1:tl(e)?128:Pd(e)?64:ut(e)?4:it(e)?2:0;return process.env.NODE_ENV!=="production"&&o&4&&os(e)&&(e=rt(e),U("Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",`
|
|
8
|
+
Component that was made reactive: `,e)),yt(e,t,i,n,s,o,r,!0)}function Mu(e){return e?os(e)||Wa(e)?xt({},e):e:null}function Je(e,t,i=!1,n=!1){const{props:s,ref:r,patchFlag:o,children:a,transition:l}=e,c=t?Iu(s||{},t):s,h={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&il(c),ref:t&&t.ref?i&&r?Q(r)?r.concat(ks(t)):[r,ks(t)]:ks(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:process.env.NODE_ENV!=="production"&&o===-1&&Q(a)?a.map(sl):a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Ft?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Je(e.ssContent),ssFallback:e.ssFallback&&Je(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&n&&Pr(h,l.clone(h)),h}function sl(e){const t=Je(e);return Q(e.children)&&(t.children=e.children.map(sl)),t}function Lu(e=" ",t=0){return Tt(bn,null,e,t)}function Os(e="",t=!1){return t?(ft(),Ke(Zt,null,e)):Tt(Zt,null,e)}function me(e){return e==null||typeof e=="boolean"?Tt(Zt):Q(e)?Tt(Ft,null,e.slice()):Ui(e)?Qe(e):Tt(bn,null,String(e))}function Qe(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Je(e)}function zr(e,t){let i=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(Q(t))i=16;else if(typeof t=="object")if(n&65){const s=t.default;s&&(s._c&&(s._d=!1),zr(e,s()),s._c&&(s._d=!0));return}else{i=32;const s=t._;!s&&!Wa(t)?t._ctx=Gt:s===3&&Gt&&(Gt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else it(t)?(t={default:t,_ctx:Gt},i=32):(t=String(t),n&64?(i=16,t=[Lu(t)]):i=8);e.children=t,e.shapeFlag|=i}function Iu(...e){const t={};for(let i=0;i<e.length;i++){const n=e[i];for(const s in n)if(s==="class")t.class!==n.class&&(t.class=Li([t.class,n.class]));else if(s==="style")t.style=lr([t.style,n.style]);else if(Zi(s)){const r=t[s],o=n[s];o&&r!==o&&!(Q(r)&&r.includes(o))&&(t[s]=r?[].concat(r,o):o)}else s!==""&&(t[s]=n[s])}return t}function Ce(e,t,i,n=null){Se(e,t,7,[i,n])}const Du=Ma();let Vu=0;function Fu(e,t,i){const n=e.type,s=(t?t.appContext:e.appContext)||Du,r={uid:Vu++,vnode:e,type:n,parent:t,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Ih(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(s.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:ja(n,s),emitsOptions:Da(n,s),emit:null,emitted:null,propsDefaults:ht,inheritAttrs:n.inheritAttrs,ctx:ht,data:ht,props:ht,attrs:ht,slots:ht,refs:ht,setupState:ht,setupContext:null,suspense:i,suspenseId:i?i.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return process.env.NODE_ENV!=="production"?r.ctx=Ud(r):r.ctx={_:r},r.root=t?t.root:r,r.emit=ou.bind(null,r),e.ce&&e.ce(r),r}let Mt=null;const Ps=()=>Mt||Gt;let As,Yr;{const e=nn(),t=(i,n)=>{let s;return(s=e[i])||(s=e[i]=[]),s.push(n),r=>{s.length>1?s.forEach(o=>o(r)):s[0](r)}};As=t("__VUE_INSTANCE_SETTERS__",i=>Mt=i),Yr=t("__VUE_SSR_SETTERS__",i=>xn=i)}const wn=e=>{const t=Mt;return As(e),e.scope.on(),()=>{e.scope.off(),As(t)}},rl=()=>{Mt&&Mt.scope.off(),As(null)},Gu=Kt("slot,component");function qr(e,{isNativeTag:t}){(Gu(e)||t(e))&&U("Do not use built-in or reserved HTML elements as component id: "+e)}function ol(e){return e.vnode.shapeFlag&4}let xn=!1;function Bu(e,t=!1,i=!1){t&&Yr(t);const{props:n,children:s}=e.vnode,r=ol(e);uu(e,n,r,t),wu(e,s,i||t);const o=r?Hu(e,t):void 0;return t&&Yr(!1),o}function Hu(e,t){const i=e.type;if(process.env.NODE_ENV!=="production"){if(i.name&&qr(i.name,e.appContext.config),i.components){const s=Object.keys(i.components);for(let r=0;r<s.length;r++)qr(s[r],e.appContext.config)}if(i.directives){const s=Object.keys(i.directives);for(let r=0;r<s.length;r++)ba(s[r])}i.compilerOptions&&$u()&&U('"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.')}e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Na),process.env.NODE_ENV!=="production"&&jd(e);const{setup:n}=i;if(n){de();const s=e.setupContext=n.length>1?Uu(e):null,r=wn(e),o=Vi(n,e,0,[process.env.NODE_ENV!=="production"?Ee(e.props):e.props,s]),a=rr(o);if(ue(),r(),(a||e.sp)&&!mn(e)&&ya(e),a){if(o.then(rl,rl),t)return o.then(l=>{al(e,l,t)}).catch(l=>{hn(l,e,0)});if(e.asyncDep=o,process.env.NODE_ENV!=="production"&&!e.suspense){const l=Cn(e,i);U(`Component <${l}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.`)}}else al(e,o,t)}else ll(e,t)}function al(e,t,i){it(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ut(t)?(process.env.NODE_ENV!=="production"&&Ui(t)&&U("setup() should not return VNodes directly - return a render function instead."),process.env.NODE_ENV!=="production"&&(e.devtoolsRawSetupState=t),e.setupState=oa(t),process.env.NODE_ENV!=="production"&&Xd(e)):process.env.NODE_ENV!=="production"&&t!==void 0&&U(`setup() should return an object. Received: ${t===null?"null":typeof t}`),ll(e,i)}const $u=()=>!0;function ll(e,t,i){const n=e.type;e.render||(e.render=n.render||Lt);{const s=wn(e);de();try{Yd(e)}finally{ue(),s()}}process.env.NODE_ENV!=="production"&&!n.render&&e.render===Lt&&!t&&(n.template?U('Component provided template option but runtime compilation is not supported in this build of Vue. Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".'):U("Component is missing template or render function: ",n))}const cl=process.env.NODE_ENV!=="production"?{get(e,t){return ws(),It(e,"get",""),e[t]},set(){return U("setupContext.attrs is readonly."),!1},deleteProperty(){return U("setupContext.attrs is readonly."),!1}}:{get(e,t){return It(e,"get",""),e[t]}};function Wu(e){return new Proxy(e.slots,{get(t,i){return It(e,"get","$slots"),t[i]}})}function Uu(e){const t=i=>{if(process.env.NODE_ENV!=="production"&&(e.exposed&&U("expose() should be called only once per setup()."),i!=null)){let n=typeof i;n==="object"&&(Q(i)?n="array":Rt(i)&&(n="ref")),n!=="object"&&U(`expose() should be passed a plain object, received ${n}.`)}e.exposed=i||{}};if(process.env.NODE_ENV!=="production"){let i,n;return Object.freeze({get attrs(){return i||(i=new Proxy(e.attrs,cl))},get slots(){return n||(n=Wu(e))},get emit(){return(s,...r)=>e.emit(s,...r)},expose:t})}else return{attrs:new Proxy(e.attrs,cl),slots:e.slots,emit:e.emit,expose:t}}function Rs(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(oa(id(e.exposed)),{get(t,i){if(i in t)return t[i];if(i in vi)return vi[i](e)},has(t,i){return i in t||i in vi}})):e.proxy}const ju=/(?:^|[-_])\w/g,Xu=e=>e.replace(ju,t=>t.toUpperCase()).replace(/[-_]/g,"");function Kr(e,t=!0){return it(e)?e.displayName||e.name:e.name||t&&e.__name}function Cn(e,t,i=!1){let n=Kr(t);if(!n&&t.__file){const s=t.__file.match(/([^/\\]+)\.\w+$/);s&&(n=s[1])}if(!n&&e){const s=r=>{for(const o in r)if(r[o]===t)return o};n=s(e.components)||e.parent&&s(e.parent.type.components)||s(e.appContext.components)}return n?Xu(n):i?"App":"Anonymous"}function hl(e){return it(e)&&"__vccOpts"in e}const Ms=(e,t)=>{const i=ad(e,t,xn);if(process.env.NODE_ENV!=="production"){const n=Ps();n&&n.appContext.config.warnRecursiveComputed&&(i._warnRecursive=!0)}return i};function dl(e,t,i){try{Ts(-1);const n=arguments.length;return n===2?ut(t)&&!Q(t)?Ui(t)?Tt(e,null,[t]):Tt(e,t):Tt(e,null,t):(n>3?i=Array.prototype.slice.call(arguments,2):n===3&&Ui(i)&&(i=[i]),Tt(e,t,i))}finally{Ts(1)}}function zu(){if(process.env.NODE_ENV==="production"||typeof window>"u")return;const e={style:"color:#3ba776"},t={style:"color:#1677ff"},i={style:"color:#f5222d"},n={style:"color:#eb2f96"},s={__vue_custom_formatter:!0,header(d){if(!ut(d))return null;if(d.__isVue)return["div",e,"VueInstance"];if(Rt(d)){de();const u=d.value;return ue(),["div",{},["span",e,h(d)],"<",a(u),">"]}else{if(Ye(d))return["div",{},["span",e,Bt(d)?"ShallowReactive":"Reactive"],"<",a(d),`>${fe(d)?" (readonly)":""}`];if(fe(d))return["div",{},["span",e,Bt(d)?"ShallowReadonly":"Readonly"],"<",a(d),">"]}return null},hasBody(d){return d&&d.__isVue},body(d){if(d&&d.__isVue)return["div",{},...r(d.$)]}};function r(d){const u=[];d.type.props&&d.props&&u.push(o("props",rt(d.props))),d.setupState!==ht&&u.push(o("setup",d.setupState)),d.data!==ht&&u.push(o("data",rt(d.data)));const f=l(d,"computed");f&&u.push(o("computed",f));const p=l(d,"inject");return p&&u.push(o("injected",p)),u.push(["div",{},["span",{style:n.style+";opacity:0.66"},"$ (internal): "],["object",{object:d}]]),u}function o(d,u){return u=xt({},u),Object.keys(u).length?["div",{style:"line-height:1.25em;margin-bottom:0.6em"},["div",{style:"color:#476582"},d],["div",{style:"padding-left:1.25em"},...Object.keys(u).map(f=>["div",{},["span",n,f+": "],a(u[f],!1)])]]:["span",{}]}function a(d,u=!0){return typeof d=="number"?["span",t,d]:typeof d=="string"?["span",i,JSON.stringify(d)]:typeof d=="boolean"?["span",n,d]:ut(d)?["object",{object:u?rt(d):d}]:["span",i,String(d)]}function l(d,u){const f=d.type;if(it(f))return;const p={};for(const _ in d.ctx)c(f,_,u)&&(p[_]=d.ctx[_]);return p}function c(d,u,f){const p=d[f];if(Q(p)&&p.includes(u)||ut(p)&&u in p||d.extends&&c(d.extends,u,f)||d.mixins&&d.mixins.some(_=>c(_,u,f)))return!0}function h(d){return Bt(d)?"ShallowRef":d.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(s):window.devtoolsFormatters=[s]}const ul="3.5.25",ee=process.env.NODE_ENV!=="production"?U:Lt;process.env.NODE_ENV,process.env.NODE_ENV;let Jr;const fl=typeof window<"u"&&window.trustedTypes;if(fl)try{Jr=fl.createPolicy("vue",{createHTML:e=>e})}catch(e){process.env.NODE_ENV!=="production"&&ee(`Error creating trusted types policy: ${e}`)}const pl=Jr?e=>Jr.createHTML(e):e=>e,Yu="http://www.w3.org/2000/svg",qu="http://www.w3.org/1998/Math/MathML",Ve=typeof document<"u"?document:null,gl=Ve&&Ve.createElement("template"),Ku={insert:(e,t,i)=>{t.insertBefore(e,i||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,i,n)=>{const s=t==="svg"?Ve.createElementNS(Yu,e):t==="mathml"?Ve.createElementNS(qu,e):i?Ve.createElement(e,{is:i}):Ve.createElement(e);return e==="select"&&n&&n.multiple!=null&&s.setAttribute("multiple",n.multiple),s},createText:e=>Ve.createTextNode(e),createComment:e=>Ve.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Ve.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,i,n,s,r){const o=i?i.previousSibling:t.lastChild;if(s&&(s===r||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),i),!(s===r||!(s=s.nextSibling)););else{gl.innerHTML=pl(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const a=gl.content;if(n==="svg"||n==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,i)}return[o?o.nextSibling:t.firstChild,i?i.previousSibling:t.lastChild]}},Ju=Symbol("_vtc");function Qu(e,t,i){const n=e[Ju];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):i?e.setAttribute("class",t):e.className=t}const ml=Symbol("_vod"),Zu=Symbol("_vsh"),tf=Symbol(process.env.NODE_ENV!=="production"?"CSS_VAR_TEXT":""),ef=/(?:^|;)\s*display\s*:/;function nf(e,t,i){const n=e.style,s=Ct(i);let r=!1;if(i&&!s){if(t)if(Ct(t))for(const o of t.split(";")){const a=o.slice(0,o.indexOf(":")).trim();i[a]==null&&Ls(n,a,"")}else for(const o in t)i[o]==null&&Ls(n,o,"");for(const o in i)o==="display"&&(r=!0),Ls(n,o,i[o])}else if(s){if(t!==i){const o=n[tf];o&&(i+=";"+o),n.cssText=i,r=ef.test(i)}}else t&&e.removeAttribute("style");ml in e&&(e[ml]=r?n.display:"",e[Zu]&&(n.display="none"))}const sf=/[^\\];\s*$/,_l=/\s*!important$/;function Ls(e,t,i){if(Q(i))i.forEach(n=>Ls(e,t,n));else if(i==null&&(i=""),process.env.NODE_ENV!=="production"&&sf.test(i)&&ee(`Unexpected semicolon at the end of '${t}' style value: '${i}'`),t.startsWith("--"))e.setProperty(t,i);else{const n=rf(e,t);_l.test(i)?e.setProperty(Jt(n),i.replace(_l,""),"important"):e[n]=i}}const vl=["Webkit","Moz","ms"],Qr={};function rf(e,t){const i=Qr[t];if(i)return i;let n=Vt(t);if(n!=="filter"&&n in e)return Qr[t]=n;n=ci(n);for(let s=0;s<vl.length;s++){const r=vl[s]+n;if(r in e)return Qr[t]=r}return t}const bl="http://www.w3.org/1999/xlink";function yl(e,t,i,n,s,r=Mh(t)){n&&t.startsWith("xlink:")?i==null?e.removeAttributeNS(bl,t.slice(6,t.length)):e.setAttributeNS(bl,t,i):i==null||r&&!Vo(i)?e.removeAttribute(t):e.setAttribute(t,r?"":be(i)?String(i):i)}function El(e,t,i,n,s){if(t==="innerHTML"||t==="textContent"){i!=null&&(e[t]=t==="innerHTML"?pl(i):i);return}const r=e.tagName;if(t==="value"&&r!=="PROGRESS"&&!r.includes("-")){const a=r==="OPTION"?e.getAttribute("value")||"":e.value,l=i==null?e.type==="checkbox"?"on":"":String(i);(a!==l||!("_value"in e))&&(e.value=l),i==null&&e.removeAttribute(t),e._value=i;return}let o=!1;if(i===""||i==null){const a=typeof e[t];a==="boolean"?i=Vo(i):i==null&&a==="string"?(i="",o=!0):a==="number"&&(i=0,o=!0)}try{e[t]=i}catch(a){process.env.NODE_ENV!=="production"&&!o&&ee(`Failed setting prop "${t}" on <${r.toLowerCase()}>: value ${i} is invalid.`,a)}o&&e.removeAttribute(s||t)}function Fe(e,t,i,n){e.addEventListener(t,i,n)}function of(e,t,i,n){e.removeEventListener(t,i,n)}const Sl=Symbol("_vei");function af(e,t,i,n,s=null){const r=e[Sl]||(e[Sl]={}),o=r[t];if(n&&o)o.value=process.env.NODE_ENV!=="production"?xl(n,t):n;else{const[a,l]=lf(t);if(n){const c=r[t]=df(process.env.NODE_ENV!=="production"?xl(n,t):n,s);Fe(e,a,c,l)}else o&&(of(e,a,o,l),r[t]=void 0)}}const wl=/(?:Once|Passive|Capture)$/;function lf(e){let t;if(wl.test(e)){t={};let n;for(;n=e.match(wl);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Jt(e.slice(2)),t]}let Zr=0;const cf=Promise.resolve(),hf=()=>Zr||(cf.then(()=>Zr=0),Zr=Date.now());function df(e,t){const i=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=i.attached)return;Se(uf(n,i.value),t,5,[n])};return i.value=e,i.attached=hf(),i}function xl(e,t){return it(e)||Q(e)?e:(ee(`Wrong type passed as event handler to ${t} - did you forget @ or : in front of your prop?
|
|
9
|
+
Expected function or array of functions, received type ${typeof e}.`),Lt)}function uf(e,t){if(Q(t)){const i=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{i.call(e),e._stopped=!0},t.map(n=>s=>!s._stopped&&n&&n(s))}else return t}const Cl=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,ff=(e,t,i,n,s,r)=>{const o=s==="svg";t==="class"?Qu(e,n,o):t==="style"?nf(e,i,n):Zi(t)?Kn(t)||af(e,t,i,n,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):pf(e,t,n,o))?(El(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&yl(e,t,n,o,r,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Ct(n))?El(e,Vt(t),n,r,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),yl(e,t,n,o))};function pf(e,t,i,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&Cl(t)&&it(i));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const s=e.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return Cl(t)&&Ct(i)?!1:t in e}const Nl={};function Tl(e,t,i){let n=Le(e,t);Jn(n)&&(n=xt({},n,t));class s extends to{constructor(o){super(n,o,i)}}return s.def=n,s}const gf=typeof HTMLElement<"u"?HTMLElement:class{};class to extends gf{constructor(t,i={},n=Dl){super(),this._def=t,this._props=i,this._createApp=n,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._patching=!1,this._dirty=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&n!==Dl?this._root=this.shadowRoot:(process.env.NODE_ENV!=="production"&&this.shadowRoot&&ee("Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use `defineSSRCustomElement`."),t.shadowRoot!==!1?(this.attachShadow(xt({},t.shadowRootOptions,{mode:"open"})),this._root=this.shadowRoot):this._root=this)}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let t=this;for(;t=t&&(t.parentNode||t.host);)if(t instanceof to){this._parent=t;break}this._instance||(this._resolved?this._mount(this._def):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(t=this._parent){t&&(this._instance.parent=t._instance,this._inheritParentContext(t))}_inheritParentContext(t=this._parent){t&&this._app&&Object.setPrototypeOf(this._app._context.provides,t._instance.provides)}disconnectedCallback(){this._connected=!1,us(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null,this._teleportTargets&&(this._teleportTargets.clear(),this._teleportTargets=void 0))})}_processMutations(t){for(const i of t)this._setAttr(i.attributeName)}_resolveDef(){if(this._pendingResolve)return;for(let n=0;n<this.attributes.length;n++)this._setAttr(this.attributes[n].name);this._ob=new MutationObserver(this._processMutations.bind(this)),this._ob.observe(this,{attributes:!0});const t=(n,s=!1)=>{this._resolved=!0,this._pendingResolve=void 0;const{props:r,styles:o}=n;let a;if(r&&!Q(r))for(const l in r){const c=r[l];(c===Number||c&&c.type===Number)&&(l in this._props&&(this._props[l]=Io(this._props[l])),(a||(a=Object.create(null)))[Vt(l)]=!0)}this._numberProps=a,this._resolveProps(n),this.shadowRoot?this._applyStyles(o):process.env.NODE_ENV!=="production"&&o&&ee("Custom element style injection is not supported when using shadowRoot: false"),this._mount(n)},i=this._def.__asyncLoader;i?this._pendingResolve=i().then(n=>{n.configureApp=this._def.configureApp,t(this._def=n,!0)}):t(this._def)}_mount(t){process.env.NODE_ENV!=="production"&&!t.name&&(t.name="VueElement"),this._app=this._createApp(t),this._inheritParentContext(),t.configureApp&&t.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const i=this._instance&&this._instance.exposed;if(i)for(const n in i)at(this,n)?process.env.NODE_ENV!=="production"&&ee(`Exposed property "${n}" already exists on custom element.`):Object.defineProperty(this,n,{get:()=>ra(i[n])})}_resolveProps(t){const{props:i}=t,n=Q(i)?i:Object.keys(i||{});for(const s of Object.keys(this))s[0]!=="_"&&n.includes(s)&&this._setProp(s,this[s]);for(const s of n.map(Vt))Object.defineProperty(this,s,{get(){return this._getProp(s)},set(r){this._setProp(s,r,!0,!this._patching)}})}_setAttr(t){if(t.startsWith("data-v-"))return;const i=this.hasAttribute(t);let n=i?this.getAttribute(t):Nl;const s=Vt(t);i&&this._numberProps&&this._numberProps[s]&&(n=Io(n)),this._setProp(s,n,!1,!0)}_getProp(t){return this._props[t]}_setProp(t,i,n=!0,s=!1){if(i!==this._props[t]&&(this._dirty=!0,i===Nl?delete this._props[t]:(this._props[t]=i,t==="key"&&this._app&&(this._app._ceVNode.key=i)),s&&this._instance&&this._update(),n)){const r=this._ob;r&&(this._processMutations(r.takeRecords()),r.disconnect()),i===!0?this.setAttribute(Jt(t),""):typeof i=="string"||typeof i=="number"?this.setAttribute(Jt(t),i+""):i||this.removeAttribute(Jt(t)),r&&r.observe(this,{attributes:!0})}}_update(){const t=this._createVNode();this._app&&(t.appContext=this._app._context),Sf(t,this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const i=Tt(this._def,xt(t,this._props));return this._instance||(i.ce=n=>{this._instance=n,n.ce=this,n.isCE=!0,process.env.NODE_ENV!=="production"&&(n.ceReload=r=>{this._styles&&(this._styles.forEach(o=>this._root.removeChild(o)),this._styles.length=0),this._applyStyles(r),this._instance=null,this._update()});const s=(r,o)=>{this.dispatchEvent(new CustomEvent(r,Jn(o[0])?xt({detail:o},o[0]):{detail:o}))};n.emit=(r,...o)=>{s(r,o),Jt(r)!==r&&s(Jt(r),o)},this._setParent()}),i}_applyStyles(t,i){if(!t)return;if(i){if(i===this._def||this._styleChildren.has(i))return;this._styleChildren.add(i)}const n=this._nonce;for(let s=t.length-1;s>=0;s--){const r=document.createElement("style");if(n&&r.setAttribute("nonce",n),r.textContent=t[s],this.shadowRoot.prepend(r),process.env.NODE_ENV!=="production")if(i){if(i.__hmrId){this._childStyles||(this._childStyles=new Map);let o=this._childStyles.get(i.__hmrId);o||this._childStyles.set(i.__hmrId,o=[]),o.push(r)}}else(this._styles||(this._styles=[])).push(r)}}_parseSlots(){const t=this._slots={};let i;for(;i=this.firstChild;){const n=i.nodeType===1&&i.getAttribute("slot")||"default";(t[n]||(t[n]=[])).push(i),this.removeChild(i)}}_renderSlots(){const t=this._getSlots(),i=this._instance.type.__scopeId;for(let n=0;n<t.length;n++){const s=t[n],r=s.getAttribute("name")||"default",o=this._slots[r],a=s.parentNode;if(o)for(const l of o){if(i&&l.nodeType===1){const c=i+"-s",h=document.createTreeWalker(l,1);l.setAttribute(c,"");let d;for(;d=h.nextNode();)d.setAttribute(c,"")}a.insertBefore(l,s)}else for(;s.firstChild;)a.insertBefore(s.firstChild,s);a.removeChild(s)}}_getSlots(){const t=[this];this._teleportTargets&&t.push(...this._teleportTargets);const i=new Set;for(const n of t){const s=n.querySelectorAll("slot");for(let r=0;r<s.length;r++)i.add(s[r])}return Array.from(i)}_injectChildStyle(t){this._applyStyles(t.styles,t)}_beginPatch(){this._patching=!0,this._dirty=!1}_endPatch(){this._patching=!1,this._dirty&&this._instance&&this._update()}_removeChildStyle(t){if(process.env.NODE_ENV!=="production"&&(this._styleChildren.delete(t),this._childStyles&&t.__hmrId)){const i=this._childStyles.get(t.__hmrId);i&&(i.forEach(n=>this._root.removeChild(n)),i.length=0)}}}const Ze=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Q(t)?i=>Mi(t,i):t};function mf(e){e.target.composing=!0}function kl(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const oe=Symbol("_assign");function Ol(e,t,i){return t&&(e=e.trim()),i&&(e=ts(e)),e}const Is={created(e,{modifiers:{lazy:t,trim:i,number:n}},s){e[oe]=Ze(s);const r=n||s.props&&s.props.type==="number";Fe(e,t?"change":"input",o=>{o.target.composing||e[oe](Ol(e.value,i,r))}),(i||r)&&Fe(e,"change",()=>{e.value=Ol(e.value,i,r)}),t||(Fe(e,"compositionstart",mf),Fe(e,"compositionend",kl),Fe(e,"change",kl))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:i,modifiers:{lazy:n,trim:s,number:r}},o){if(e[oe]=Ze(o),e.composing)return;const a=(r||e.type==="number")&&!/^0\d/.test(e.value)?ts(e.value):e.value,l=t??"";a!==l&&(document.activeElement===e&&e.type!=="range"&&(n&&t===i||s&&e.value.trim()===l)||(e.value=l))}},Pl={deep:!0,created(e,t,i){e[oe]=Ze(i),Fe(e,"change",()=>{const n=e._modelValue,s=ji(e),r=e.checked,o=e[oe];if(Q(n)){const a=cr(n,s),l=a!==-1;if(r&&!l)o(n.concat(s));else if(!r&&l){const c=[...n];c.splice(a,1),o(c)}}else if(Ri(n)){const a=new Set(n);r?a.add(s):a.delete(s),o(a)}else o(Ml(e,r))})},mounted:Al,beforeUpdate(e,t,i){e[oe]=Ze(i),Al(e,t,i)}};function Al(e,{value:t,oldValue:i},n){e._modelValue=t;let s;if(Q(t))s=cr(t,n.props.value)>-1;else if(Ri(t))s=t.has(n.props.value);else{if(t===i)return;s=di(t,Ml(e,!0))}e.checked!==s&&(e.checked=s)}const _f={created(e,{value:t},i){e.checked=di(t,i.props.value),e[oe]=Ze(i),Fe(e,"change",()=>{e[oe](ji(e))})},beforeUpdate(e,{value:t,oldValue:i},n){e[oe]=Ze(n),t!==i&&(e.checked=di(t,n.props.value))}},vf={deep:!0,created(e,{value:t,modifiers:{number:i}},n){const s=Ri(t);Fe(e,"change",()=>{const r=Array.prototype.filter.call(e.options,o=>o.selected).map(o=>i?ts(ji(o)):ji(o));e[oe](e.multiple?s?new Set(r):r:r[0]),e._assigning=!0,us(()=>{e._assigning=!1})}),e[oe]=Ze(n)},mounted(e,{value:t}){Rl(e,t)},beforeUpdate(e,t,i){e[oe]=Ze(i)},updated(e,{value:t}){e._assigning||Rl(e,t)}};function Rl(e,t){const i=e.multiple,n=Q(t);if(i&&!n&&!Ri(t)){process.env.NODE_ENV!=="production"&&ee(`<select multiple v-model> expects an Array or Set value for its binding, but got ${Object.prototype.toString.call(t).slice(8,-1)}.`);return}for(let s=0,r=e.options.length;s<r;s++){const o=e.options[s],a=ji(o);if(i)if(n){const l=typeof a;l==="string"||l==="number"?o.selected=t.some(c=>String(c)===String(a)):o.selected=cr(t,a)>-1}else o.selected=t.has(a);else if(di(ji(o),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!i&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}function ji(e){return"_value"in e?e._value:e.value}function Ml(e,t){const i=t?"_trueValue":"_falseValue";return i in e?e[i]:t}const bf={created(e,t,i){Ds(e,t,i,null,"created")},mounted(e,t,i){Ds(e,t,i,null,"mounted")},beforeUpdate(e,t,i,n){Ds(e,t,i,n,"beforeUpdate")},updated(e,t,i,n){Ds(e,t,i,n,"updated")}};function yf(e,t){switch(e){case"SELECT":return vf;case"TEXTAREA":return Is;default:switch(t){case"checkbox":return Pl;case"radio":return _f;default:return Is}}}function Ds(e,t,i,n,s){const o=yf(e.tagName,i.props&&i.props.type)[s];o&&o(e,t,i,n)}const Ef=xt({patchProp:ff},Ku);let Ll;function Il(){return Ll||(Ll=Nu(Ef))}const Sf=((...e)=>{Il().render(...e)}),Dl=((...e)=>{const t=Il().createApp(...e);process.env.NODE_ENV!=="production"&&(xf(t),Cf(t));const{mount:i}=t;return t.mount=n=>{const s=Nf(n);if(!s)return;const r=t._component;!it(r)&&!r.render&&!r.template&&(r.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const o=i(s,!1,wf(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),o},t});function wf(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function xf(e){Object.defineProperty(e.config,"isNativeTag",{value:t=>Ph(t)||Ah(t)||Rh(t),writable:!1})}function Cf(e){{const t=e.config.isCustomElement;Object.defineProperty(e.config,"isCustomElement",{get(){return t},set(){ee("The `isCustomElement` config option is deprecated. Use `compilerOptions.isCustomElement` instead.")}});const i=e.config.compilerOptions,n='The `compilerOptions` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, `compilerOptions` must be passed to `@vue/compiler-dom` in the build setup instead.\n- For vue-loader: pass it via vue-loader\'s `compilerOptions` loader option.\n- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader\n- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc';Object.defineProperty(e.config,"compilerOptions",{get(){return ee(n),i},set(){ee(n)}})}}function Nf(e){if(Ct(e)){const t=document.querySelector(e);return process.env.NODE_ENV!=="production"&&!t&&ee(`Failed to mount app: mount target selector "${e}" returned null.`),t}return process.env.NODE_ENV!=="production"&&window.ShadowRoot&&e instanceof window.ShadowRoot&&e.mode==="closed"&&ee('mounting on a ShadowRoot with `{mode: "closed"}` may lead to unpredictable bugs'),e}function Tf(){zu()}process.env.NODE_ENV!=="production"&&Tf();const Vl=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",kf=Vl+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Of="["+Vl+"]["+kf+"]*",Pf=new RegExp("^"+Of+"$");function Fl(e,t){const i=[];let n=t.exec(e);for(;n;){const s=[];s.startIndex=t.lastIndex-n[0].length;const r=n.length;for(let o=0;o<r;o++)s.push(n[o]);i.push(s),n=t.exec(e)}return i}const Vs=function(e){const t=Pf.exec(e);return!(t===null||typeof t>"u")};function Af(e){return typeof e<"u"}const Rf={allowBooleanAttributes:!1,unpairedTags:[]};function Mf(e,t){t=Object.assign({},Rf,t);const i=[];let n=!1,s=!1;e[0]==="\uFEFF"&&(e=e.substr(1));for(let r=0;r<e.length;r++)if(e[r]==="<"&&e[r+1]==="?"){if(r+=2,r=Bl(e,r),r.err)return r}else if(e[r]==="<"){let o=r;if(r++,e[r]==="!"){r=Hl(e,r);continue}else{let a=!1;e[r]==="/"&&(a=!0,r++);let l="";for(;r<e.length&&e[r]!==">"&&e[r]!==" "&&e[r]!==" "&&e[r]!==`
|
|
10
|
+
`&&e[r]!=="\r";r++)l+=e[r];if(l=l.trim(),l[l.length-1]==="/"&&(l=l.substring(0,l.length-1),r--),!Hf(l)){let d;return l.trim().length===0?d="Invalid space after '<'.":d="Tag '"+l+"' is an invalid name.",Pt("InvalidTag",d,Wt(e,r))}const c=Df(e,r);if(c===!1)return Pt("InvalidAttr","Attributes for '"+l+"' have open quote.",Wt(e,r));let h=c.value;if(r=c.index,h[h.length-1]==="/"){const d=r-h.length;h=h.substring(0,h.length-1);const u=$l(h,t);if(u===!0)n=!0;else return Pt(u.err.code,u.err.msg,Wt(e,d+u.err.line))}else if(a)if(c.tagClosed){if(h.trim().length>0)return Pt("InvalidTag","Closing tag '"+l+"' can't have attributes or invalid starting.",Wt(e,o));if(i.length===0)return Pt("InvalidTag","Closing tag '"+l+"' has not been opened.",Wt(e,o));{const d=i.pop();if(l!==d.tagName){let u=Wt(e,d.tagStartPos);return Pt("InvalidTag","Expected closing tag '"+d.tagName+"' (opened in line "+u.line+", col "+u.col+") instead of closing tag '"+l+"'.",Wt(e,o))}i.length==0&&(s=!0)}}else return Pt("InvalidTag","Closing tag '"+l+"' doesn't have proper closing.",Wt(e,r));else{const d=$l(h,t);if(d!==!0)return Pt(d.err.code,d.err.msg,Wt(e,r-h.length+d.err.line));if(s===!0)return Pt("InvalidXml","Multiple possible root nodes found.",Wt(e,r));t.unpairedTags.indexOf(l)!==-1||i.push({tagName:l,tagStartPos:o}),n=!0}for(r++;r<e.length;r++)if(e[r]==="<")if(e[r+1]==="!"){r++,r=Hl(e,r);continue}else if(e[r+1]==="?"){if(r=Bl(e,++r),r.err)return r}else break;else if(e[r]==="&"){const d=Gf(e,r);if(d==-1)return Pt("InvalidChar","char '&' is not expected.",Wt(e,r));r=d}else if(s===!0&&!Gl(e[r]))return Pt("InvalidXml","Extra text at the end",Wt(e,r));e[r]==="<"&&r--}}else{if(Gl(e[r]))continue;return Pt("InvalidChar","char '"+e[r]+"' is not expected.",Wt(e,r))}if(n){if(i.length==1)return Pt("InvalidTag","Unclosed tag '"+i[0].tagName+"'.",Wt(e,i[0].tagStartPos));if(i.length>0)return Pt("InvalidXml","Invalid '"+JSON.stringify(i.map(r=>r.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return Pt("InvalidXml","Start tag expected.",1);return!0}function Gl(e){return e===" "||e===" "||e===`
|
|
11
|
+
`||e==="\r"}function Bl(e,t){const i=t;for(;t<e.length;t++)if(e[t]=="?"||e[t]==" "){const n=e.substr(i,t-i);if(t>5&&n==="xml")return Pt("InvalidXml","XML declaration allowed only at the start of the document.",Wt(e,t));if(e[t]=="?"&&e[t+1]==">"){t++;break}else continue}return t}function Hl(e,t){if(e.length>t+5&&e[t+1]==="-"&&e[t+2]==="-"){for(t+=3;t<e.length;t++)if(e[t]==="-"&&e[t+1]==="-"&&e[t+2]===">"){t+=2;break}}else if(e.length>t+8&&e[t+1]==="D"&&e[t+2]==="O"&&e[t+3]==="C"&&e[t+4]==="T"&&e[t+5]==="Y"&&e[t+6]==="P"&&e[t+7]==="E"){let i=1;for(t+=8;t<e.length;t++)if(e[t]==="<")i++;else if(e[t]===">"&&(i--,i===0))break}else if(e.length>t+9&&e[t+1]==="["&&e[t+2]==="C"&&e[t+3]==="D"&&e[t+4]==="A"&&e[t+5]==="T"&&e[t+6]==="A"&&e[t+7]==="["){for(t+=8;t<e.length;t++)if(e[t]==="]"&&e[t+1]==="]"&&e[t+2]===">"){t+=2;break}}return t}const Lf='"',If="'";function Df(e,t){let i="",n="",s=!1;for(;t<e.length;t++){if(e[t]===Lf||e[t]===If)n===""?n=e[t]:n!==e[t]||(n="");else if(e[t]===">"&&n===""){s=!0;break}i+=e[t]}return n!==""?!1:{value:i,index:t,tagClosed:s}}const Vf=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function $l(e,t){const i=Fl(e,Vf),n={};for(let s=0;s<i.length;s++){if(i[s][1].length===0)return Pt("InvalidAttr","Attribute '"+i[s][2]+"' has no space in starting.",Nn(i[s]));if(i[s][3]!==void 0&&i[s][4]===void 0)return Pt("InvalidAttr","Attribute '"+i[s][2]+"' is without value.",Nn(i[s]));if(i[s][3]===void 0&&!t.allowBooleanAttributes)return Pt("InvalidAttr","boolean attribute '"+i[s][2]+"' is not allowed.",Nn(i[s]));const r=i[s][2];if(!Bf(r))return Pt("InvalidAttr","Attribute '"+r+"' is an invalid name.",Nn(i[s]));if(!n.hasOwnProperty(r))n[r]=1;else return Pt("InvalidAttr","Attribute '"+r+"' is repeated.",Nn(i[s]))}return!0}function Ff(e,t){let i=/\d/;for(e[t]==="x"&&(t++,i=/[\da-fA-F]/);t<e.length;t++){if(e[t]===";")return t;if(!e[t].match(i))break}return-1}function Gf(e,t){if(t++,e[t]===";")return-1;if(e[t]==="#")return t++,Ff(e,t);let i=0;for(;t<e.length;t++,i++)if(!(e[t].match(/\w/)&&i<20)){if(e[t]===";")break;return-1}return t}function Pt(e,t,i){return{err:{code:e,msg:t,line:i.line||i,col:i.col}}}function Bf(e){return Vs(e)}function Hf(e){return Vs(e)}function Wt(e,t){const i=e.substring(0,t).split(/\r?\n/);return{line:i.length,col:i[i.length-1].length+1}}function Nn(e){return e.startIndex+e[1].length}const $f={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,i){return e},captureMetaData:!1},Wf=function(e){return Object.assign({},$f,e)};let Fs;typeof Symbol!="function"?Fs="@@xmlMetadata":Fs=Symbol("XML Node Metadata");class Ei{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,i){t==="__proto__"&&(t="#__proto__"),this.child.push({[t]:i})}addChild(t,i){t.tagname==="__proto__"&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child}),i!==void 0&&(this.child[this.child.length-1][Fs]={startIndex:i})}static getMetaDataSymbol(){return Fs}}class Uf{constructor(t){this.suppressValidationErr=!t}readDocType(t,i){const n={};if(t[i+3]==="O"&&t[i+4]==="C"&&t[i+5]==="T"&&t[i+6]==="Y"&&t[i+7]==="P"&&t[i+8]==="E"){i=i+9;let s=1,r=!1,o=!1,a="";for(;i<t.length;i++)if(t[i]==="<"&&!o){if(r&&Si(t,"!ENTITY",i)){i+=7;let l,c;[l,c,i]=this.readEntityExp(t,i+1,this.suppressValidationErr),c.indexOf("&")===-1&&(n[l]={regx:RegExp(`&${l};`,"g"),val:c})}else if(r&&Si(t,"!ELEMENT",i)){i+=8;const{index:l}=this.readElementExp(t,i+1);i=l}else if(r&&Si(t,"!ATTLIST",i))i+=8;else if(r&&Si(t,"!NOTATION",i)){i+=9;const{index:l}=this.readNotationExp(t,i+1,this.suppressValidationErr);i=l}else if(Si(t,"!--",i))o=!0;else throw new Error("Invalid DOCTYPE");s++,a=""}else if(t[i]===">"){if(o?t[i-1]==="-"&&t[i-2]==="-"&&(o=!1,s--):s--,s===0)break}else t[i]==="["?r=!0:a+=t[i];if(s!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:n,i}}readEntityExp(t,i){i=zt(t,i);let n="";for(;i<t.length&&!/\s/.test(t[i])&&t[i]!=='"'&&t[i]!=="'";)n+=t[i],i++;if(Tn(n),i=zt(t,i),!this.suppressValidationErr){if(t.substring(i,i+6).toUpperCase()==="SYSTEM")throw new Error("External entities are not supported");if(t[i]==="%")throw new Error("Parameter entities are not supported")}let s="";return[i,s]=this.readIdentifierVal(t,i,"entity"),i--,[n,s,i]}readNotationExp(t,i){i=zt(t,i);let n="";for(;i<t.length&&!/\s/.test(t[i]);)n+=t[i],i++;!this.suppressValidationErr&&Tn(n),i=zt(t,i);const s=t.substring(i,i+6).toUpperCase();if(!this.suppressValidationErr&&s!=="SYSTEM"&&s!=="PUBLIC")throw new Error(`Expected SYSTEM or PUBLIC, found "${s}"`);i+=s.length,i=zt(t,i);let r=null,o=null;if(s==="PUBLIC")[i,r]=this.readIdentifierVal(t,i,"publicIdentifier"),i=zt(t,i),(t[i]==='"'||t[i]==="'")&&([i,o]=this.readIdentifierVal(t,i,"systemIdentifier"));else if(s==="SYSTEM"&&([i,o]=this.readIdentifierVal(t,i,"systemIdentifier"),!this.suppressValidationErr&&!o))throw new Error("Missing mandatory system identifier for SYSTEM notation");return{notationName:n,publicIdentifier:r,systemIdentifier:o,index:--i}}readIdentifierVal(t,i,n){let s="";const r=t[i];if(r!=='"'&&r!=="'")throw new Error(`Expected quoted string, found "${r}"`);for(i++;i<t.length&&t[i]!==r;)s+=t[i],i++;if(t[i]!==r)throw new Error(`Unterminated ${n} value`);return i++,[i,s]}readElementExp(t,i){i=zt(t,i);let n="";for(;i<t.length&&!/\s/.test(t[i]);)n+=t[i],i++;if(!this.suppressValidationErr&&!Vs(n))throw new Error(`Invalid element name: "${n}"`);i=zt(t,i);let s="";if(t[i]==="E"&&Si(t,"MPTY",i))i+=4;else if(t[i]==="A"&&Si(t,"NY",i))i+=2;else if(t[i]==="("){for(i++;i<t.length&&t[i]!==")";)s+=t[i],i++;if(t[i]!==")")throw new Error("Unterminated content model")}else if(!this.suppressValidationErr)throw new Error(`Invalid Element Expression, found "${t[i]}"`);return{elementName:n,contentModel:s.trim(),index:i}}readAttlistExp(t,i){i=zt(t,i);let n="";for(;i<t.length&&!/\s/.test(t[i]);)n+=t[i],i++;Tn(n),i=zt(t,i);let s="";for(;i<t.length&&!/\s/.test(t[i]);)s+=t[i],i++;if(!Tn(s))throw new Error(`Invalid attribute name: "${s}"`);i=zt(t,i);let r="";if(t.substring(i,i+8).toUpperCase()==="NOTATION"){if(r="NOTATION",i+=8,i=zt(t,i),t[i]!=="(")throw new Error(`Expected '(', found "${t[i]}"`);i++;let a=[];for(;i<t.length&&t[i]!==")";){let l="";for(;i<t.length&&t[i]!=="|"&&t[i]!==")";)l+=t[i],i++;if(l=l.trim(),!Tn(l))throw new Error(`Invalid notation name: "${l}"`);a.push(l),t[i]==="|"&&(i++,i=zt(t,i))}if(t[i]!==")")throw new Error("Unterminated list of notations");i++,r+=" ("+a.join("|")+")"}else{for(;i<t.length&&!/\s/.test(t[i]);)r+=t[i],i++;const a=["CDATA","ID","IDREF","IDREFS","ENTITY","ENTITIES","NMTOKEN","NMTOKENS"];if(!this.suppressValidationErr&&!a.includes(r.toUpperCase()))throw new Error(`Invalid attribute type: "${r}"`)}i=zt(t,i);let o="";return t.substring(i,i+8).toUpperCase()==="#REQUIRED"?(o="#REQUIRED",i+=8):t.substring(i,i+7).toUpperCase()==="#IMPLIED"?(o="#IMPLIED",i+=7):[i,o]=this.readIdentifierVal(t,i,"ATTLIST"),{elementName:n,attributeName:s,attributeType:r,defaultValue:o,index:i}}}const zt=(e,t)=>{for(;t<e.length&&/\s/.test(e[t]);)t++;return t};function Si(e,t,i){for(let n=0;n<t.length;n++)if(t[n]!==e[i+n+1])return!1;return!0}function Tn(e){if(Vs(e))return e;throw new Error(`Invalid entity name ${e}`)}const jf=/^[-+]?0x[a-fA-F0-9]+$/,Xf=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,zf={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};function Yf(e,t={}){if(t=Object.assign({},zf,t),!e||typeof e!="string")return e;let i=e.trim();if(t.skipLike!==void 0&&t.skipLike.test(i))return e;if(e==="0")return 0;if(t.hex&&jf.test(i))return Qf(i,16);if(i.includes("e")||i.includes("E"))return Kf(e,i,t);{const n=Xf.exec(i);if(n){const s=n[1]||"",r=n[2];let o=Jf(n[3]);const a=s?e[r.length+1]===".":e[r.length]===".";if(!t.leadingZeros&&(r.length>1||r.length===1&&!a))return e;{const l=Number(i),c=String(l);if(l===0)return l;if(c.search(/[eE]/)!==-1)return t.eNotation?l:e;if(i.indexOf(".")!==-1)return c==="0"||c===o||c===`${s}${o}`?l:e;let h=r?o:i;return r?h===c||s+h===c?l:e:h===c||h===s+c?l:e}}else return e}}const qf=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;function Kf(e,t,i){if(!i.eNotation)return e;const n=t.match(qf);if(n){let s=n[1]||"";const r=n[3].indexOf("e")===-1?"E":"e",o=n[2],a=s?e[o.length+1]===r:e[o.length]===r;return o.length>1&&a?e:o.length===1&&(n[3].startsWith(`.${r}`)||n[3][0]===r)?Number(t):i.leadingZeros&&!a?(t=(n[1]||"")+n[3],Number(t)):e}else return e}function Jf(e){return e&&e.indexOf(".")!==-1&&(e=e.replace(/0+$/,""),e==="."?e="0":e[0]==="."?e="0"+e:e[e.length-1]==="."&&(e=e.substring(0,e.length-1))),e}function Qf(e,t){if(parseInt)return parseInt(e,t);if(Number.parseInt)return Number.parseInt(e,t);if(window&&window.parseInt)return window.parseInt(e,t);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}function Wl(e){return typeof e=="function"?e:Array.isArray(e)?t=>{for(const i of e)if(typeof i=="string"&&t===i||i instanceof RegExp&&i.test(t))return!0}:()=>!1}class Zf{constructor(t){if(this.options=t,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(i,n)=>String.fromCodePoint(Number.parseInt(n,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(i,n)=>String.fromCodePoint(Number.parseInt(n,16))}},this.addExternalEntities=t0,this.parseXml=r0,this.parseTextData=e0,this.resolveNameSpace=i0,this.buildAttributesMap=s0,this.isItStopNode=c0,this.replaceEntitiesValue=a0,this.readStopNodeData=d0,this.saveTextToParentTag=l0,this.addChild=o0,this.ignoreAttributesFn=Wl(this.options.ignoreAttributes),this.options.stopNodes&&this.options.stopNodes.length>0){this.stopNodesExact=new Set,this.stopNodesWildcard=new Set;for(let i=0;i<this.options.stopNodes.length;i++){const n=this.options.stopNodes[i];typeof n=="string"&&(n.startsWith("*.")?this.stopNodesWildcard.add(n.substring(2)):this.stopNodesExact.add(n))}}}}function t0(e){const t=Object.keys(e);for(let i=0;i<t.length;i++){const n=t[i];this.lastEntities[n]={regex:new RegExp("&"+n+";","g"),val:e[n]}}}function e0(e,t,i,n,s,r,o){if(e!==void 0&&(this.options.trimValues&&!n&&(e=e.trim()),e.length>0)){o||(e=this.replaceEntitiesValue(e));const a=this.options.tagValueProcessor(t,e,i,s,r);return a==null?e:typeof a!=typeof e||a!==e?a:this.options.trimValues?io(e,this.options.parseTagValue,this.options.numberParseOptions):e.trim()===e?io(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function i0(e){if(this.options.removeNSPrefix){const t=e.split(":"),i=e.charAt(0)==="/"?"/":"";if(t[0]==="xmlns")return"";t.length===2&&(e=i+t[1])}return e}const n0=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function s0(e,t){if(this.options.ignoreAttributes!==!0&&typeof e=="string"){const i=Fl(e,n0),n=i.length,s={};for(let r=0;r<n;r++){const o=this.resolveNameSpace(i[r][1]);if(this.ignoreAttributesFn(o,t))continue;let a=i[r][4],l=this.options.attributeNamePrefix+o;if(o.length)if(this.options.transformAttributeName&&(l=this.options.transformAttributeName(l)),l==="__proto__"&&(l="#__proto__"),a!==void 0){this.options.trimValues&&(a=a.trim()),a=this.replaceEntitiesValue(a);const c=this.options.attributeValueProcessor(o,a,t);c==null?s[l]=a:typeof c!=typeof a||c!==a?s[l]=c:s[l]=io(a,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(s[l]=!0)}if(!Object.keys(s).length)return;if(this.options.attributesGroupName){const r={};return r[this.options.attributesGroupName]=s,r}return s}}const r0=function(e){e=e.replace(/\r\n?/g,`
|
|
12
|
+
`);const t=new Ei("!xml");let i=t,n="",s="";const r=new Uf(this.options.processEntities);for(let o=0;o<e.length;o++)if(e[o]==="<")if(e[o+1]==="/"){const l=wi(e,">",o,"Closing Tag is not closed.");let c=e.substring(o+2,l).trim();if(this.options.removeNSPrefix){const u=c.indexOf(":");u!==-1&&(c=c.substr(u+1))}this.options.transformTagName&&(c=this.options.transformTagName(c)),i&&(n=this.saveTextToParentTag(n,i,s));const h=s.substring(s.lastIndexOf(".")+1);if(c&&this.options.unpairedTags.indexOf(c)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${c}>`);let d=0;h&&this.options.unpairedTags.indexOf(h)!==-1?(d=s.lastIndexOf(".",s.lastIndexOf(".")-1),this.tagsNodeStack.pop()):d=s.lastIndexOf("."),s=s.substring(0,d),i=this.tagsNodeStack.pop(),n="",o=l}else if(e[o+1]==="?"){let l=eo(e,o,!1,"?>");if(!l)throw new Error("Pi Tag is not closed.");if(n=this.saveTextToParentTag(n,i,s),!(this.options.ignoreDeclaration&&l.tagName==="?xml"||this.options.ignorePiTags)){const c=new Ei(l.tagName);c.add(this.options.textNodeName,""),l.tagName!==l.tagExp&&l.attrExpPresent&&(c[":@"]=this.buildAttributesMap(l.tagExp,s)),this.addChild(i,c,s,o)}o=l.closeIndex+1}else if(e.substr(o+1,3)==="!--"){const l=wi(e,"-->",o+4,"Comment is not closed.");if(this.options.commentPropName){const c=e.substring(o+4,l-2);n=this.saveTextToParentTag(n,i,s),i.add(this.options.commentPropName,[{[this.options.textNodeName]:c}])}o=l}else if(e.substr(o+1,2)==="!D"){const l=r.readDocType(e,o);this.docTypeEntities=l.entities,o=l.i}else if(e.substr(o+1,2)==="!["){const l=wi(e,"]]>",o,"CDATA is not closed.")-2,c=e.substring(o+9,l);n=this.saveTextToParentTag(n,i,s);let h=this.parseTextData(c,i.tagname,s,!0,!1,!0,!0);h==null&&(h=""),this.options.cdataPropName?i.add(this.options.cdataPropName,[{[this.options.textNodeName]:c}]):i.add(this.options.textNodeName,h),o=l+2}else{let l=eo(e,o,this.options.removeNSPrefix),c=l.tagName;const h=l.rawTagName;let d=l.tagExp,u=l.attrExpPresent,f=l.closeIndex;if(this.options.transformTagName){const b=this.options.transformTagName(c);d===c&&(d=b),c=b}i&&n&&i.tagname!=="!xml"&&(n=this.saveTextToParentTag(n,i,s,!1));const p=i;p&&this.options.unpairedTags.indexOf(p.tagname)!==-1&&(i=this.tagsNodeStack.pop(),s=s.substring(0,s.lastIndexOf("."))),c!==t.tagname&&(s+=s?"."+c:c);const _=o;if(this.isItStopNode(this.stopNodesExact,this.stopNodesWildcard,s,c)){let b="";if(d.length>0&&d.lastIndexOf("/")===d.length-1)c[c.length-1]==="/"?(c=c.substr(0,c.length-1),s=s.substr(0,s.length-1),d=c):d=d.substr(0,d.length-1),o=l.closeIndex;else if(this.options.unpairedTags.indexOf(c)!==-1)o=l.closeIndex;else{const y=this.readStopNodeData(e,h,f+1);if(!y)throw new Error(`Unexpected end of ${h}`);o=y.i,b=y.tagContent}const S=new Ei(c);c!==d&&u&&(S[":@"]=this.buildAttributesMap(d,s)),b&&(b=this.parseTextData(b,c,s,!0,u,!0,!0)),s=s.substr(0,s.lastIndexOf(".")),S.add(this.options.textNodeName,b),this.addChild(i,S,s,_)}else{if(d.length>0&&d.lastIndexOf("/")===d.length-1){if(c[c.length-1]==="/"?(c=c.substr(0,c.length-1),s=s.substr(0,s.length-1),d=c):d=d.substr(0,d.length-1),this.options.transformTagName){const S=this.options.transformTagName(c);d===c&&(d=S),c=S}const b=new Ei(c);c!==d&&u&&(b[":@"]=this.buildAttributesMap(d,s)),this.addChild(i,b,s,_),s=s.substr(0,s.lastIndexOf("."))}else{const b=new Ei(c);this.tagsNodeStack.push(i),c!==d&&u&&(b[":@"]=this.buildAttributesMap(d,s)),this.addChild(i,b,s,_),i=b}n="",o=f}}else n+=e[o];return t.child};function o0(e,t,i,n){this.options.captureMetaData||(n=void 0);const s=this.options.updateTag(t.tagname,i,t[":@"]);s===!1||(typeof s=="string"&&(t.tagname=s),e.addChild(t,n))}const a0=function(e){if(this.options.processEntities){for(let t in this.docTypeEntities){const i=this.docTypeEntities[t];e=e.replace(i.regx,i.val)}for(let t in this.lastEntities){const i=this.lastEntities[t];e=e.replace(i.regex,i.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){const i=this.htmlEntities[t];e=e.replace(i.regex,i.val)}e=e.replace(this.ampEntity.regex,this.ampEntity.val)}return e};function l0(e,t,i,n){return e&&(n===void 0&&(n=t.child.length===0),e=this.parseTextData(e,t.tagname,i,!1,t[":@"]?Object.keys(t[":@"]).length!==0:!1,n),e!==void 0&&e!==""&&t.add(this.options.textNodeName,e),e=""),e}function c0(e,t,i,n){return!!(t&&t.has(n)||e&&e.has(i))}function h0(e,t,i=">"){let n,s="";for(let r=t;r<e.length;r++){let o=e[r];if(n)o===n&&(n="");else if(o==='"'||o==="'")n=o;else if(o===i[0])if(i[1]){if(e[r+1]===i[1])return{data:s,index:r}}else return{data:s,index:r};else o===" "&&(o=" ");s+=o}}function wi(e,t,i,n){const s=e.indexOf(t,i);if(s===-1)throw new Error(n);return s+t.length-1}function eo(e,t,i,n=">"){const s=h0(e,t+1,n);if(!s)return;let r=s.data;const o=s.index,a=r.search(/\s/);let l=r,c=!0;a!==-1&&(l=r.substring(0,a),r=r.substring(a+1).trimStart());const h=l;if(i){const d=l.indexOf(":");d!==-1&&(l=l.substr(d+1),c=l!==s.data.substr(d+1))}return{tagName:l,tagExp:r,closeIndex:o,attrExpPresent:c,rawTagName:h}}function d0(e,t,i){const n=i;let s=1;for(;i<e.length;i++)if(e[i]==="<")if(e[i+1]==="/"){const r=wi(e,">",i,`${t} is not closed`);if(e.substring(i+2,r).trim()===t&&(s--,s===0))return{tagContent:e.substring(n,i),i:r};i=r}else if(e[i+1]==="?")i=wi(e,"?>",i+1,"StopNode is not closed.");else if(e.substr(i+1,3)==="!--")i=wi(e,"-->",i+3,"StopNode is not closed.");else if(e.substr(i+1,2)==="![")i=wi(e,"]]>",i,"StopNode is not closed.")-2;else{const r=eo(e,i,">");r&&((r&&r.tagName)===t&&r.tagExp[r.tagExp.length-1]!=="/"&&s++,i=r.closeIndex)}}function io(e,t,i){if(t&&typeof e=="string"){const n=e.trim();return n==="true"?!0:n==="false"?!1:Yf(e,i)}else return Af(e)?e:""}const no=Ei.getMetaDataSymbol();function u0(e,t){return Ul(e,t)}function Ul(e,t,i){let n;const s={};for(let r=0;r<e.length;r++){const o=e[r],a=f0(o);let l="";if(i===void 0?l=a:l=i+"."+a,a===t.textNodeName)n===void 0?n=o[a]:n+=""+o[a];else{if(a===void 0)continue;if(o[a]){let c=Ul(o[a],t,l);const h=g0(c,t);o[no]!==void 0&&(c[no]=o[no]),o[":@"]?p0(c,o[":@"],l,t):Object.keys(c).length===1&&c[t.textNodeName]!==void 0&&!t.alwaysCreateTextNode?c=c[t.textNodeName]:Object.keys(c).length===0&&(t.alwaysCreateTextNode?c[t.textNodeName]="":c=""),s[a]!==void 0&&s.hasOwnProperty(a)?(Array.isArray(s[a])||(s[a]=[s[a]]),s[a].push(c)):t.isArray(a,l,h)?s[a]=[c]:s[a]=c}}}return typeof n=="string"?n.length>0&&(s[t.textNodeName]=n):n!==void 0&&(s[t.textNodeName]=n),s}function f0(e){const t=Object.keys(e);for(let i=0;i<t.length;i++){const n=t[i];if(n!==":@")return n}}function p0(e,t,i,n){if(t){const s=Object.keys(t),r=s.length;for(let o=0;o<r;o++){const a=s[o];n.isArray(a,i+"."+a,!0,!0)?e[a]=[t[a]]:e[a]=t[a]}}}function g0(e,t){const{textNodeName:i}=t,n=Object.keys(e).length;return!!(n===0||n===1&&(e[i]||typeof e[i]=="boolean"||e[i]===0))}class jl{constructor(t){this.externalEntities={},this.options=Wf(t)}parse(t,i){if(typeof t!="string"&&t.toString)t=t.toString();else if(typeof t!="string")throw new Error("XML data is accepted in String or Bytes[] form.");if(i){i===!0&&(i={});const r=Mf(t,i);if(r!==!0)throw Error(`${r.err.msg}:${r.err.line}:${r.err.col}`)}const n=new Zf(this.options);n.addExternalEntities(this.externalEntities);const s=n.parseXml(t);return this.options.preserveOrder||s===void 0?s:u0(s,this.options)}addEntity(t,i){if(i.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");if(t.indexOf("&")!==-1||t.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'");if(i==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[t]=i}static getMetaDataSymbol(){return Ei.getMetaDataSymbol()}}const m0=`
|
|
13
|
+
`;function _0(e,t){let i="";return t.format&&t.indentBy.length>0&&(i=m0),Xl(e,t,"",i)}function Xl(e,t,i,n){let s="",r=!1;for(let o=0;o<e.length;o++){const a=e[o],l=v0(a);if(l===void 0)continue;let c="";if(i.length===0?c=l:c=`${i}.${l}`,l===t.textNodeName){let p=a[l];b0(c,t)||(p=t.tagValueProcessor(l,p),p=Yl(p,t)),r&&(s+=n),s+=p,r=!1;continue}else if(l===t.cdataPropName){r&&(s+=n),s+=`<![CDATA[${a[l][0][t.textNodeName]}]]>`,r=!1;continue}else if(l===t.commentPropName){s+=n+`<!--${a[l][0][t.textNodeName]}-->`,r=!0;continue}else if(l[0]==="?"){const p=zl(a[":@"],t),_=l==="?xml"?"":n;let b=a[l][0][t.textNodeName];b=b.length!==0?" "+b:"",s+=_+`<${l}${b}${p}?>`,r=!0;continue}let h=n;h!==""&&(h+=t.indentBy);const d=zl(a[":@"],t),u=n+`<${l}${d}`,f=Xl(a[l],t,c,h);t.unpairedTags.indexOf(l)!==-1?t.suppressUnpairedNode?s+=u+">":s+=u+"/>":(!f||f.length===0)&&t.suppressEmptyNode?s+=u+"/>":f&&f.endsWith(">")?s+=u+`>${f}${n}</${l}>`:(s+=u+">",f&&n!==""&&(f.includes("/>")||f.includes("</"))?s+=n+t.indentBy+f+n:s+=f,s+=`</${l}>`),r=!0}return s}function v0(e){const t=Object.keys(e);for(let i=0;i<t.length;i++){const n=t[i];if(e.hasOwnProperty(n)&&n!==":@")return n}}function zl(e,t){let i="";if(e&&!t.ignoreAttributes)for(let n in e){if(!e.hasOwnProperty(n))continue;let s=t.attributeValueProcessor(n,e[n]);s=Yl(s,t),s===!0&&t.suppressBooleanAttributes?i+=` ${n.substr(t.attributeNamePrefix.length)}`:i+=` ${n.substr(t.attributeNamePrefix.length)}="${s}"`}return i}function b0(e,t){e=e.substr(0,e.length-t.textNodeName.length-1);let i=e.substr(e.lastIndexOf(".")+1);for(let n in t.stopNodes)if(t.stopNodes[n]===e||t.stopNodes[n]==="*."+i)return!0;return!1}function Yl(e,t){if(e&&e.length>0&&t.processEntities)for(let i=0;i<t.entities.length;i++){const n=t.entities[i];e=e.replace(n.regex,n.val)}return e}const y0={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function Ne(e){this.options=Object.assign({},y0,e),this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=Wl(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=w0),this.processTextOrObjNode=E0,this.options.format?(this.indentate=S0,this.tagEndChar=`>
|
|
14
14
|
`,this.newLine=`
|
|
15
|
-
`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}Ne.prototype.build=function(e){return this.options.preserveOrder?_0(e,this.options):(Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e}),this.j2x(e,0,[]).val)},Ne.prototype.j2x=function(e,t,i){let n="",s="";const r=i.join(".");for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o))if(typeof e[o]>"u")this.isAttribute(o)&&(s+="");else if(e[o]===null)this.isAttribute(o)||o===this.options.cdataPropName?s+="":o[0]==="?"?s+=this.indentate(t)+"<"+o+"?"+this.tagEndChar:s+=this.indentate(t)+"<"+o+"/"+this.tagEndChar;else if(e[o]instanceof Date)s+=this.buildTextValNode(e[o],o,"",t);else if(typeof e[o]!="object"){const a=this.isAttribute(o);if(a&&!this.ignoreAttributesFn(a,r))n+=this.buildAttrPairStr(a,""+e[o]);else if(!a)if(o===this.options.textNodeName){let l=this.options.tagValueProcessor(o,""+e[o]);s+=this.replaceEntitiesValue(l)}else s+=this.buildTextValNode(e[o],o,"",t)}else if(Array.isArray(e[o])){const a=e[o].length;let l="",c="";for(let h=0;h<a;h++){const d=e[o][h];if(!(typeof d>"u"))if(d===null)o[0]==="?"?s+=this.indentate(t)+"<"+o+"?"+this.tagEndChar:s+=this.indentate(t)+"<"+o+"/"+this.tagEndChar;else if(typeof d=="object")if(this.options.oneListGroup){const u=this.j2x(d,t+1,i.concat(o));l+=u.val,this.options.attributesGroupName&&d.hasOwnProperty(this.options.attributesGroupName)&&(c+=u.attrStr)}else l+=this.processTextOrObjNode(d,o,t,i);else if(this.options.oneListGroup){let u=this.options.tagValueProcessor(o,d);u=this.replaceEntitiesValue(u),l+=u}else l+=this.buildTextValNode(d,o,"",t)}this.options.oneListGroup&&(l=this.buildObjectNode(l,o,c,t)),s+=l}else if(this.options.attributesGroupName&&o===this.options.attributesGroupName){const a=Object.keys(e[o]),l=a.length;for(let c=0;c<l;c++)n+=this.buildAttrPairStr(a[c],""+e[o][a[c]])}else s+=this.processTextOrObjNode(e[o],o,t,i);return{attrStr:n,val:s}},Ne.prototype.buildAttrPairStr=function(e,t){return t=this.options.attributeValueProcessor(e,""+t),t=this.replaceEntitiesValue(t),this.options.suppressBooleanAttributes&&t==="true"?" "+e:" "+e+'="'+t+'"'};function E0(e,t,i,n){const s=this.j2x(e,i+1,n.concat(t));return e[this.options.textNodeName]!==void 0&&Object.keys(e).length===1?this.buildTextValNode(e[this.options.textNodeName],t,s.attrStr,i):this.buildObjectNode(s.val,t,s.attrStr,i)}Ne.prototype.buildObjectNode=function(e,t,i,n){if(e==="")return t[0]==="?"?this.indentate(n)+"<"+t+i+"?"+this.tagEndChar:this.indentate(n)+"<"+t+i+this.closeTag(t)+this.tagEndChar;{let s="</"+t+this.tagEndChar,r="";return t[0]==="?"&&(r="?",s=""),(i||i==="")&&e.indexOf("<")===-1?this.indentate(n)+"<"+t+i+r+">"+e+s:this.options.commentPropName!==!1&&t===this.options.commentPropName&&r.length===0?this.indentate(n)+`<!--${e}-->`+this.newLine:this.indentate(n)+"<"+t+i+r+this.tagEndChar+e+this.indentate(n)+s}},Ne.prototype.closeTag=function(e){let t="";return this.options.unpairedTags.indexOf(e)!==-1?this.options.suppressUnpairedNode||(t="/"):this.options.suppressEmptyNode?t="/":t=`></${e}`,t},Ne.prototype.buildTextValNode=function(e,t,i,n){if(this.options.cdataPropName!==!1&&t===this.options.cdataPropName)return this.indentate(n)+`<![CDATA[${e}]]>`+this.newLine;if(this.options.commentPropName!==!1&&t===this.options.commentPropName)return this.indentate(n)+`<!--${e}-->`+this.newLine;if(t[0]==="?")return this.indentate(n)+"<"+t+i+"?"+this.tagEndChar;{let s=this.options.tagValueProcessor(t,e);return s=this.replaceEntitiesValue(s),s===""?this.indentate(n)+"<"+t+i+this.closeTag(t)+this.tagEndChar:this.indentate(n)+"<"+t+i+">"+s+"</"+t+this.tagEndChar}},Ne.prototype.replaceEntitiesValue=function(e){if(e&&e.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){const i=this.options.entities[t];e=e.replace(i.regex,i.val)}return e};function S0(e){return this.options.indentBy.repeat(e)}function w0(e){return e.startsWith(this.options.attributeNamePrefix)&&e!==this.options.textNodeName?e.substr(this.attrPrefixLen):!1}class x0{attr_id;attr_version;Label;constructor({Label:t,attr_id:i,attr_version:n}){this.attr_id=i,this.attr_version=n,this.Label=t}toXML(){return{attr_id:this.attr_id,attr_version:this.attr_version,Label:this.Label}}}class C0{attr_ref;attr_version;constructor({attr_ref:t,attr_version:i}){this.attr_ref=t,this.attr_version=i}toXML(){return{attr_ref:this.attr_ref,attr_version:this.attr_version}}}class ql{value;constructor(t){this.value=t?.text_value}toXML(){return{text_value:this.value}}}function At(e,t){return e?Array.isArray(e)?e.map(i=>new t(i)):[new t(e)]:[]}function Ge(e){return e.map(t=>t.toXML())}function Te(e){const t={};return e.forEach(i=>{const s=i.constructor.xmlTagName??i.constructor.name;t[s]||(t[s]=[]),t[s].push(i.toXML())}),t}class kn{attr_id;attr_version;Units;TicketingEquipmentRef;TicketValidatorEquipmentRef;constructor({attr_id:t,attr_version:i,Units:n,TicketingEquipmentRef:s=void 0,TicketValidatorEquipmentRef:r=void 0}){this.attr_id=t,this.attr_version=i,this.Units=n,this.TicketingEquipmentRef=s,this.TicketValidatorEquipmentRef=r}toXML(){return{attr_id:this.attr_id,attr_version:this.attr_version,Units:this.Units,TicketingEquipmentRef:this.TicketingEquipmentRef?.toXML(),TicketValidatorEquipmentRef:this.TicketValidatorEquipmentRef?.toXML()}}}class N0{attr_id;attr_version;Name;PublicUse;TotalCapacity;actualVehicleEquipments;constructor({attr_id:t,attr_version:i,Name:n,PublicUse:s,TotalCapacity:r,actualVehicleEquipments:o}){this.attr_id=t,this.attr_version=i,this.Name=n?new ql(n):void 0,this.actualVehicleEquipments=o?At(o.ActualVehicleEquipment,kn):[],this.PublicUse=s?.text_value,this.TotalCapacity=r?.text_value}toXML(){return{attr_id:this.attr_id,attr_version:this.attr_version,Name:this.Name?.toXML}}}class ti{x;y;constructor(t,i){this.x=t,this.y=i}static fromXML(t){const i=t?.Location?.pos;if(typeof i=="string"){const[n,s]=i.split(" ").map(Number);if(typeof n=="number"&&typeof s=="number")return new ti(n,s)}else return new ti(0,0)}toXML(){return{Location:{pos:`${this.x} ${this.y}`}}}}class Kl{static xmlTagName="PassengerEntrance";attr_id;attr_version;Name;Label;Width;Height;actualVehicleEquipments;PublicUse;VehicleSide;SequenceFromFront;HeightFromGround;DeckEntranceType;IsEmergencyExit;HasDoor;IsAutomatic;Centroid;constructor({attr_id:t,attr_version:i,Name:n,Label:s,Width:r,Height:o,actualVehicleEquipments:a,PublicUse:l,VehicleSide:c,SequenceFromFront:h,HeightFromGround:d,DeckEntranceType:u,IsEmergencyExit:f,HasDoor:p,IsAutomatic:_,Centroid:b=void 0}){this.attr_id=t,this.attr_version=i,this.Name=n?new ql(n):void 0,this.Label=s?.text_value,this.Width=r?.text_value,this.Height=o?.text_value,this.actualVehicleEquipments=At(a?.ActualVehicleEquipment,kn),this.PublicUse=l?.text_value,this.VehicleSide=c?.text_value,this.SequenceFromFront=h?.text_value,this.HeightFromGround=d?.text_value,this.DeckEntranceType=u?.text_value,this.IsEmergencyExit=f?.text_value,this.HasDoor=p?.text_value,this.IsAutomatic=_?.text_value,this.Centroid=b?ti.fromXML(b):void 0}toXML(){return{attr_id:this.attr_id,attr_version:this.attr_version,Name:this.Name?.toXML(),Label:this.Label,Width:this.Width,Height:this.Height,actualVehicleEquipments:{ActualVehicleEquipment:Ge(this.actualVehicleEquipments)},PublicUse:this.PublicUse,VehicleSide:this.VehicleSide,SequenceFromFront:this.SequenceFromFront,HeightFromGround:this.HeightFromGround,DeckEntranceType:this.DeckEntranceType,IsEmergencyExit:this.IsEmergencyExit,HasDoor:this.HasDoor,IsAutomatic:this.IsAutomatic,Centroid:this.Centroid?.toXML()}}getShape(t,i,n){const s=(this.Width||.8)*t,r=.2*t;let o=s,a=r;if((this.VehicleSide==="front"||this.VehicleSide==="back")&&(o=r,a=s),this.Centroid)return{x:this.Centroid.x*t,y:this.Centroid.y*t,width:o,height:a,fill:"orange",stroke:"darkorange",strokeWidth:2,draggable:!0};let l=0,c=0;return this.VehicleSide==="leftSide"?(l=(this.SequenceFromFront??0)*t-o/2+5,c=5):this.VehicleSide==="rightSide"?(l=(this.SequenceFromFront??0)*t-o/2+5,c=n*t+5-a):this.VehicleSide==="front"?(l=5,c=n*t/2+5-a/2):this.VehicleSide==="back"?(l=i*t+5-o,c=n*t/2+5-a/2):(l=5,c=5),{x:l,y:c,width:o,height:a,fill:"orange",stroke:"darkorange",strokeWidth:2,draggable:!0}}}class Jl{attr_ref;attr_version;constructor({attr_ref:t,attr_version:i}){this.attr_ref=t,this.attr_version=i}toXML(){return{attr_ref:this.attr_ref,attr_version:this.attr_version}}}class T0{attr_ref;attr_version;FromDeckEntranceRef;ToDeckEntranceRef;constructor({attr_ref:t,attr_version:i,FromDeckEntranceRef:n,ToDeckEntranceRef:s}){this.attr_ref=t,this.attr_version=i,this.FromDeckEntranceRef=new Jl(n),this.ToDeckEntranceRef=new Jl(s)}toXML(){return{attr_ref:this.attr_ref,attr_version:this.attr_version,FromDeckEntranceRef:this.FromDeckEntranceRef.toXML(),ToDeckEntranceRef:this.ToDeckEntranceRef.toXML()}}}class k0{attr_id;attr_version;Name;constructor({attr_id:t,attr_version:i,Name:n}){this.attr_id=t,this.attr_version=i,this.Name=n}toXML(){return{attr_id:this.attr_id,Name:this.Name,attr_version:this.attr_version}}}class O0{attr_ref;attr_version;constructor({attr_ref:t,attr_version:i}){this.attr_ref=t,this.attr_version=i}toXML(){return{attr_ref:this.attr_ref,attr_version:this.attr_version}}}class P0{attr_ref;attr_version;validityConditions;Name;EntranceUsageType;EntranceSetting;ControlledLocking;constructor({attr_ref:t,attr_version:i,validityConditions:n,Name:s,EntranceUsageType:r,EntranceSetting:o,ControlledLocking:a}){this.attr_ref=t,this.attr_version=i,this.validityConditions=Object.entries(n).flatMap(([l,c])=>(l==="ValidityConditionRef"&&c.map(h=>new O0(h)),l==="ValidityCondition"&&c.map(h=>new k0(h)),[])),this.Name=s,this.EntranceUsageType=r,this.EntranceSetting=o,this.ControlledLocking=a}toXML(){return{attr_ref:this.attr_ref,attr_version:this.attr_version,validityConditions:Te(this.validityConditions),Name:this.Name,EntranceUsageType:this.EntranceUsageType,EntranceSetting:this.EntranceSetting,ControlledLocking:this.ControlledLocking}}}class A0{attr_ref;attr_version;LocatableSpotType;capacity;constructor({attr_ref:t,attr_version:i,LocatableSpotType:n,capacity:s}){this.attr_ref=t,this.attr_version=i,this.LocatableSpotType=n,this.capacity=s}toXML(){return{attr_ref:this.attr_ref,attr_version:this.attr_version,LocatableSpotType:this.LocatableSpotType,capacity:this.capacity}}}class R0{attr_id;label;constructor({attr_id:t,Label:i}){this.attr_id=t,this.label=i}toXML(){return{attr_id:this.attr_id,label:this.label}}}class Ql{attr_ref;attr_version;constructor({attr_ref:t,attr_version:i}){this.attr_ref=t,this.attr_version=i}toXML(){return{attr_ref:this.attr_ref,attr_version:this.attr_version}}}class M0{attr_id;label;constructor({attr_id:t,Label:i}){this.attr_id=t,this.label=i}toXML(){return{attr_id:this.attr_id,label:this.label}}}class Zl{attr_ref;attr_version;constructor({attr_ref:t,attr_version:i}){this.attr_ref=t,this.attr_version=i}toXML(){return{attr_ref:this.attr_ref,attr_version:this.attr_version}}}class L0{attr_id;attr_version;Label;Orientation;actualVehicleEquipments;SpotColumnRef;SpotRowRef;constructor({attr_id:t,attr_version:i,Label:n,Orientation:s,actualVehicleEquipments:r,SpotColumnRef:o,SpotRowRef:a}){this.attr_id=t,this.attr_version=i,this.Label=n,this.Orientation=s,this.actualVehicleEquipments=r?At(r,kn):[],this.SpotColumnRef=o?new Ql(o):void 0,this.SpotRowRef=a?new Zl(a):void 0}toXML(){return{attr_id:this.attr_id,attr_version:this.attr_version,Label:this.Label,Orientation:this.Orientation,actualVehicleEquipments:{ActualVehicleEquipment:Ge(this.actualVehicleEquipments)},SpotColumnRef:this.SpotColumnRef?.toXML(),SpotRowRef:this.SpotRowRef?.toXML()}}}class I0{attr_ref;attr_version;constructor({attr_ref:t,attr_version:i}){this.attr_ref=t,this.attr_version=i}toXML(){return{attr_ref:this.attr_ref,attr_version:this.attr_version}}}var ie=(e=>(e.Occupied="Occupied",e.Selected="Selected",e.Filtered="Filtered",e.Defect="Defect",e.Undefined="Undefined",e))(ie||{});class On{static xmlTagName="PassengerSpot";attr_id;attr_version;Label;Orientation;actualVehicleEquipments;SpotColumnRef;SpotRowRef;ByWindow;ByAisle;HasPower;Centroid;Width;Length;availability;constructor({attr_id:t,attr_version:i,Label:n,Orientation:s,actualVehicleEquipments:r,SpotColumnRef:o,SpotRowRef:a,ByWindow:l,ByAisle:c,HasPower:h,Centroid:d,Width:u,Length:f}){this.attr_id=t,this.attr_version=i,this.Label=n||"",this.Orientation=s||void 0,this.actualVehicleEquipments=r?At(r,kn):void 0,this.SpotColumnRef=o?new Ql(o):void 0,this.SpotRowRef=a?new Zl(a):void 0,this.ByWindow=l,this.ByAisle=c,this.HasPower=h,this.Centroid=d?ti.fromXML(d):void 0,this.Width=u||.5,this.Length=f||.5}toXML(){return{attr_id:this.attr_id,attr_version:this.attr_version,Label:this.Label?{text_value:this.Label}:void 0,Orientation:this.Orientation?{text_value:this.Orientation}:void 0,actualVehicleEquipments:this.actualVehicleEquipments?Te(this.actualVehicleEquipments):void 0,SpotColumnRef:this.SpotColumnRef?.toXML(),SpotRowRef:this.SpotRowRef?.toXML(),ByWindow:this.ByWindow?{text_value:this.ByWindow}:void 0,ByAisle:this.ByAisle?{text_value:this.ByAisle}:void 0,HasPower:this.HasPower?{text_value:this.HasPower}:void 0,Centroid:this.Centroid?.toXML(),Width:this.Width,Length:this.Length}}getFillColor(){switch(this.availability){case ie.Occupied:return"lightred";case ie.Selected:return"lightgreen";case ie.Filtered:return"lightgray";case ie.Defect:return"black";case ie.Undefined:return"lightyellow";default:return"lightgray"}}getStrokeColor(){switch(this.availability){case ie.Occupied:return"red";case ie.Selected:return"green";case ie.Filtered:return"gray";case ie.Defect:return"black";case ie.Undefined:return"#121212";default:return"#121212"}}getShape(t){if(this.Centroid){const i=this.Width*t,n=this.Length*t;return{x:(this.Centroid?.x??1)*t-i/2+5,y:(this.Centroid?.y??1)*t-n/2+5,width:i,height:n,fill:this.getFillColor(),stroke:this.getStrokeColor(),strokeWidth:1,cornerRadius:2,draggable:!0}}return{x:0,y:0,width:this.Width*t,height:this.Length*t,fill:"red",draggable:!0}}}class D0{attr_ref;attr_version;constructor({attr_ref:t,attr_version:i}){this.attr_ref=t,this.attr_version=i}toXML(){return{attr_ref:this.attr_ref,attr_version:this.attr_version}}}class tc{value;constructor(t){this.value=t}toXML(){return this.value}}class V0{attr_ref;attr_version;constructor({attr_ref:t,attr_version:i}){this.attr_ref=t,this.attr_version=i}toXML(){return{attr_ref:this.attr_ref,attr_version:this.attr_version}}}class Be{static xmlTagName="PassengerSpace";attr_id;attr_version;Name;SmokingAllowed;StandingAllowed;PassengerSpaceType;passengerSpots;luggageSpots;deckEntrances;deckEntranceUsage;deckEntranceCouples;deckSpaceCapacities;actualVehicleEquipments;ServiceFacilitySetRef;Centroid;Polygon;PublicUse;TotalCapacity;FareClass;AirConditioned;constructor({attr_id:t,attr_version:i,Name:n,SmokingAllowed:s,StandingAllowed:r,PassengerSpaceType:o,passengerSpots:a,luggageSpots:l,deckEntrances:c,deckEntranceUsage:h,deckEntranceCouples:d,deckSpaceCapacities:u,actualVehicleEquipments:f,ServiceFacilitySetRef:p,Centroid:_,Polygon:b,PublicUse:S,TotalCapacity:y,FareClass:C,AirConditioned:N}){this.attr_id=t,this.attr_version=i,this.Name=n,this.SmokingAllowed=s,this.StandingAllowed=r,this.PassengerSpaceType=o,this.passengerSpots=a?Object.entries(a).flatMap(([T,O])=>T==="PassengerSpot"?At(O,On):T==="PassengerSpotRef"?At(O,D0):[]):[],this.luggageSpots=l?Object.entries(l).flatMap(([T,O])=>T==="LuggageSpot"?At(O,L0):T==="LuggageSpotRef"?At(O,I0):[]):[],this.deckEntrances=At(c?.PassengerEntrance,Kl),this.deckEntranceUsage=At(h?.DeckEntranceUsage,P0),this.deckEntranceCouples=At(d?.DeckEntranceCouple,T0),this.deckSpaceCapacities=At(u?.DeckSpaceCapacity,A0),this.actualVehicleEquipments=At(f?.ActualVehicleEquipment,kn),this.ServiceFacilitySetRef=p?new V0(p):void 0,this.Centroid=_?ti.fromXML(_):void 0,this.Polygon=b?new tc(b):void 0,this.PublicUse=S?.text_value,this.TotalCapacity=y?.text_value,this.FareClass=C?.text_value,this.AirConditioned=N?.text_value}toXML(){return{attr_id:this.attr_id,attr_version:this.attr_version,Name:this.Name,SmokingAllowed:this.SmokingAllowed,StandingAllowed:this.StandingAllowed,PassengerSpaceType:this.PassengerSpaceType,passengerSpots:this.passengerSpots?Te(this.passengerSpots):"",luggageSpots:this.luggageSpots?Te(this.luggageSpots):void 0,deckEntrances:this.deckEntrances?Te(this.deckEntrances):void 0,deckEntranceUsage:this.deckEntranceUsage?Te(this.deckEntranceUsage):void 0,deckEntranceCouples:this.deckEntranceCouples?Te(this.deckEntranceCouples):void 0,deckSpaceCapacities:this.deckSpaceCapacities?Te(this.deckSpaceCapacities):void 0,actualVehicleEquipments:this.actualVehicleEquipments?Te(this.actualVehicleEquipments):void 0,ServiceFacilitySetRef:this.ServiceFacilitySetRef?.toXML(),Centroid:this.Centroid?.toXML(),Polygon:this.Polygon?.toXML(),PublicUse:this.PublicUse,TotalCapacity:this.TotalCapacity,FareClass:this.FareClass,AirConditioned:this.AirConditioned}}}class F0{attr_id;attr_version;Name;polygon;deckspaces;DeckLevelRef;spotRows;spotColumns;Width;Length;constructor({attr_id:t,attr_version:i,deckSpaces:n,spotRows:s=void 0,spotColumns:r=void 0,DeckLevelRef:o=void 0,Name:a=void 0,polygon:l=void 0,Width:c=void 0,Length:h=void 0}){this.attr_id=t,this.attr_version=i,this.Name=a?.text_value||"",this.polygon=l?new tc(l):void 0,this.DeckLevelRef=o?new C0(o):void 0,this.Width=c?.text_value||2.825,this.Length=h?.text_value||26.4,this.deckspaces=n?Object.entries(n).flatMap(([d,u])=>d==="OtherDeckSpace"?At(u,N0):d==="PassengerSpace"?At(u,Be):[]):[],this.spotRows=At(s?.SpotRow,M0),this.spotColumns=At(r?.SpotColumn,R0)}toXML(){return{attr_id:this.attr_id,attr_version:this.attr_version,spotRows:{SpotRow:Ge(this.spotRows)},spotColumns:{SpotColumn:Ge(this.spotColumns)},deckSpaces:Te(this.deckspaces),DeckLevelRef:this.DeckLevelRef?.toXML(),polygon:this.polygon?.toXML(),Name:{text_value:this.Name},Width:{text_value:this.Width},Length:{text_value:this.Length}}}getBoundingBox(){const t=this.Length,i=this.Width;return{width:t,height:i}}getShape(t){const{width:i,height:n}=this.getBoundingBox();return{x:5,y:5,width:i*t,height:n*t,fill:"white",stroke:"gray",strokeWidth:2,cornerRadius:5}}}class ec{attr_id;attr_version;deckLevels;decks;constructor({attr_id:t,attr_version:i,decks:n=void 0,deckLevels:s=void 0}){this.attr_id=t,this.attr_version=i,this.deckLevels=At(s?.DeckLevel,x0),this.decks=At(n?.Deck,F0)}toXML(){return{attr_id:this.attr_id,attr_version:this.attr_version,decks:{Deck:Ge(this.decks)},deckLevels:{DeckLevel:Ge(this.deckLevels)}}}}const ic=Le({__name:"DeckVisualization",props:{deck:{type:Object,required:!0},availability:{type:Object},scale:{type:Number,required:!0},selectedElements:{type:Array,default:()=>[]}},emits:["select","area-select"],setup(e,{emit:t}){const i=e,n=t,s=Xt(null),r=Xt(!1),o=Xt({x:0,y:0}),a=Xt([]),l=Xt(new Map),c=Ms(()=>i.deck.deckspaces?.flatMap(w=>w instanceof Be?w.passengerSpots?.filter(x=>x instanceof On)||[]:[]).map(w=>{const x=w;return x.availability=i.availability&&w.attr_id?ie[i.availability[w.attr_id]??"Undefined"]:ie.Undefined,x})||[]),h=Ms(()=>i.deck.deckspaces?.flatMap(w=>w instanceof Be?w.deckEntrances||[]:[])||[]),d=w=>i.selectedElements.includes(w)?{stroke:"#68a691",strokeWidth:3}:{},u=(w,x)=>{let P=0,B=0;const{width:K,height:z}=w.getBoundingBox();return P=Math.max(P,K),B=Math.max(B,z),{width:P*x+10,height:B*x+10}},f=(w,x)=>{r.value||(n("select",{element:x,ctrlKey:w.evt.ctrlKey||w.evt.metaKey}),w.cancelBubble=!0)},p=w=>{if(w.evt.ctrlKey||w.evt.metaKey||w.target===w.target.getStage()){r.value=!0;const P=w.target.getStage().getPointerPosition(),B=w.target.getAbsoluteTransform().copy();B.invert();const K=B.point(P);o.value={x:K.x,y:K.y},s.value={x:K.x,y:K.y,width:0,height:0,fill:"rgba(0, 255, 0, 0.3)",stroke:"#68a691",strokeWidth:1}}else n("area-select",[])},_=w=>{if(!r.value)return;const P=w.target.getStage().getPointerPosition(),B=w.target.getAbsoluteTransform().copy();B.invert();const K=B.point(P);s.value.width=K.x-o.value.x,s.value.height=K.y-o.value.y},b=w=>{if(!r.value)return;r.value=!1;const x=s.value;if(!x)return;const P=x.width>0?x.x:x.x+x.width,B=x.height>0?x.y:x.y+x.height,K=Math.abs(x.width),z=Math.abs(x.height),Z=c.value.filter(J=>{const A=J.getShape(i.scale);return A.x<P+K&&A.x+A.width>P&&A.y<B+z&&A.y+A.height>B});Z.length>0&&n("area-select",Z),s.value=null},S=(w,x)=>{l.value.clear(),i.selectedElements.includes(x)&&i.selectedElements.forEach(P=>{if(P instanceof On){const B=P.getShape(i.scale);l.value.set(P,{x:B.x,y:B.y})}})},y=(w,x)=>{a.value=[];const P=w.target.getStage();w.target.getLayer();const B=c.value.filter(H=>H!==x&&!i.selectedElements.includes(H)),K=w.target.x(),z=w.target.y(),Z=10;let J=K,A=z;B.forEach(H=>{const D=H.getShape(i.scale);Math.abs(K-D.x)<Z&&(J=D.x,a.value.push({points:[D.x,0,D.x,P.height()],stroke:"red",strokeWidth:1,dash:[4,6]})),Math.abs(z-D.y)<Z&&(A=D.y,a.value.push({points:[0,D.y,P.width(),D.y],stroke:"red",strokeWidth:1,dash:[4,6]}))}),w.target.x(J),w.target.y(A);const L=l.value.get(x);if(L&&i.selectedElements.includes(x)){const H=J-L.x,D=A-L.y;i.selectedElements.forEach(nt=>{if(nt!==x&&nt instanceof On){const ct=l.value.get(nt);ct&&N(nt,ct.x+H,ct.y+D)}})}},C=(w,x)=>{a.value=[];const P=w.target.x(),B=w.target.y();N(x,P,B),l.value.clear()},N=(w,x,P)=>{w.Centroid?(w.Centroid.x=(x-5)/i.scale+w.Width/2,w.Centroid.y=(P-5)/i.scale+w.Length/2):w.Centroid=new ti((x-5)/i.scale+w.Width/2,(P-5)/i.scale+w.Length/2)},T=(w,x)=>{const P=w.target.x(),B=w.target.y(),K=i.deck.Width*i.scale,z=i.deck.Length*i.scale,Z=x.getShape(i.scale,i.deck.Length,i.deck.Width),J=Z.width,A=Z.height,L=5,H=5,D=L+z,nt=H+K,ct=P+J/2,ot=B+A/2,gt=Math.abs(ct-L),Ot=Math.abs(ct-D),Ji=Math.abs(ot-H),nr=Math.abs(ot-nt),Qi=Math.min(gt,Ot,Ji,nr);let le=P,ve=B;Qi===Ji?(ve=H,le=Math.max(L,Math.min(P,D-J))):Qi===nr?(ve=nt-A,le=Math.max(L,Math.min(P,D-J))):Qi===gt?(le=L,ve=K/2+5-A/2):Qi===Ot&&(le=D-J,ve=K/2+5-A/2),w.target.x(le),w.target.y(ve),x.Centroid||(x.Centroid=new ti(0,0)),x.Centroid.x=le/i.scale,x.Centroid.y=ve/i.scale},O=(w,x)=>{const P=w.target.x(),B=w.target.y(),K=i.deck.Width*i.scale,z=i.deck.Length*i.scale,Z=x.getShape(i.scale,i.deck.Length,i.deck.Width),J=Z.width,A=Z.height,L=5,H=5,D=L+z,nt=H+K,ct=1;Math.abs(B-H)<ct?(x.VehicleSide="leftSide",x.SequenceFromFront=(P-L+J/2)/i.scale):Math.abs(B-(nt-A))<ct?(x.VehicleSide="rightSide",x.SequenceFromFront=(P-L+J/2)/i.scale):Math.abs(P-L)<ct?(x.VehicleSide="front",x.SequenceFromFront=0):Math.abs(P-(D-J))<ct&&(x.VehicleSide="back",x.SequenceFromFront=i.deck.Length)};return(w,x)=>{const P=Bi("v-rect"),B=Bi("v-text"),K=Bi("v-group"),z=Bi("v-line"),Z=Bi("v-layer"),J=Bi("v-stage");return ft(),Ke(J,{config:u(e.deck,e.scale)},{default:pn(()=>[Tt(Z,null,{default:pn(()=>[Tt(P,{config:{...e.deck.getShape(e.scale),y:5,...d(e.deck)},onClick:x[0]||(x[0]=A=>f(A,e.deck))},null,8,["config"]),Tt(P,{config:{x:0,y:0,width:e.deck.getShape(e.scale).width,height:e.deck.getShape(e.scale).height,fill:"transparent",listening:!0},onMousedown:p,onMousemove:_,onMouseup:b},null,8,["config"]),(ft(!0),Nt(Ft,null,_i(c.value,(A,L)=>(ft(),Ke(K,{key:`seats-${L}`,config:{x:A.getShape(e.scale).x,y:A.getShape(e.scale).y,draggable:!0},onDragstart:H=>S(H,A),onDragend:H=>C(H,A),onDragmove:H=>y(H,A),onClick:H=>f(H,A)},{default:pn(()=>[Tt(P,{config:{width:A.getShape(e.scale).width,height:A.getShape(e.scale).height,fill:A.getShape(e.scale).fill,stroke:A.getShape(e.scale).stroke,strokeWidth:A.getShape(e.scale).strokeWidth,cornerRadius:A.getShape(e.scale).cornerRadius,...d(A)}},null,8,["config"]),Tt(B,{config:{width:A.getShape(e.scale).width,height:A.getShape(e.scale).height,text:A.Label,align:"center",verticalAlign:"middle",fontSize:Math.min(Math.min(A.getShape(e.scale).width,A.getShape(e.scale).height)/2,16),listening:!1}},null,8,["config"])]),_:2},1032,["config","onDragstart","onDragend","onDragmove","onClick"]))),128)),(ft(!0),Nt(Ft,null,_i(h.value,(A,L)=>(ft(),Ke(K,{key:`entrance-${L}`,config:{x:A.getShape(e.scale,e.deck.Length,e.deck.Width).x,y:A.getShape(e.scale,e.deck.Length,e.deck.Width).y,draggable:!0},onDragmove:H=>T(H,A),onDragend:H=>O(H,A),onClick:H=>f(H,A)},{default:pn(()=>[Tt(P,{config:{width:A.getShape(e.scale,e.deck.Length,e.deck.Width).width,height:A.getShape(e.scale,e.deck.Length,e.deck.Width).height,fill:A.getShape(e.scale,e.deck.Length,e.deck.Width).fill,stroke:A.getShape(e.scale,e.deck.Length,e.deck.Width).stroke,strokeWidth:A.getShape(e.scale,e.deck.Length,e.deck.Width).strokeWidth,...d(A)}},null,8,["config"])]),_:2},1032,["config","onDragmove","onDragend","onClick"]))),128)),s.value?(ft(),Ke(P,{key:0,config:{...s.value,listening:!1}},null,8,["config"])):Os("",!0),(ft(!0),Nt(Ft,null,_i(a.value,(A,L)=>(ft(),Ke(z,{key:`guide-${L}`,config:A},null,8,["config"]))),128))]),_:1})]),_:1},8,["config"])}}}),G0={class:"flex flex-col h-full"},B0={class:"flex p-4 w-full items-center justify-center gap-10"},H0={for:"scale-slider"},$0={style:{display:"flex","flex-direction":"row","overflow-x":"auto",gap:"20px",padding:"20px"}},W0=["onClick"],U0=Le({__name:"WagonVisualization",props:{deckPlans:{type:Array,required:!1},selectedElements:{type:Array,default:()=>[]}},setup(e){const t=Xt(20);return(i,n)=>(ft(),Nt("div",G0,[yt("div",B0,[yt("label",H0,"Scale: "+Xe(t.value),1),_s(yt("input",{id:"scale-slider",type:"range",min:"10",max:"50","onUpdate:modelValue":n[0]||(n[0]=s=>t.value=s)},null,512),[[Is,t.value,void 0,{number:!0}]])]),yt("div",$0,[(ft(!0),Nt(Ft,null,_i(e.deckPlans,(s,r)=>(ft(),Nt("div",{key:`deckplan-${r}`},[yt("h3",null,Xe(s.attr_id),1),(ft(!0),Nt(Ft,null,_i(s.decks,(o,a)=>(ft(),Nt("div",{key:`deck-${a}`},[yt("h4",{onClick:l=>i.$emit("select",{element:o,ctrlKey:!1}),class:Li(`${e.selectedElements.includes(o)?"text-ott-accent":""} cursor-pointer`)},Xe(o.Name),11,W0),Tt(ic,{deck:o,scale:t.value,selectedElements:e.selectedElements,onSelect:n[1]||(n[1]=l=>i.$emit("select",l)),onAreaSelect:n[2]||(n[2]=l=>i.$emit("area-select",l))},null,8,["deck","scale","selectedElements"])]))),128))]))),128))])]))}}),j0={class:"bg-ott-bg-primary p-4"},X0={class:"flex justify-between items-center mb-4"},z0={key:0},Y0=["for"],q0=["id","onUpdate:modelValue","type"],K0=["id","onUpdate:modelValue"],J0={key:2},Q0=["id","onUpdate:modelValue"],Z0={key:3},tp={key:4},ep={key:1},ip=((e,t)=>{const i=e.__vccOpts||e;for(const[n,s]of t)i[n]=s;return i})(Le({__name:"ObjectProperties",props:{element:{type:Object,default:null}},emits:["delete"],setup(e){return(t,i)=>(ft(),Nt("div",j0,[yt("div",X0,[i[1]||(i[1]=yt("h3",{class:"font-bold"},"Properties",-1)),e.element?(ft(),Nt("button",{key:0,class:"ott-button border-ott-error! text-ott-error!",onClick:i[0]||(i[0]=n=>t.$emit("delete",e.element))}," Delete ")):Os("",!0)]),e.element?(ft(),Nt("div",z0,[(ft(!0),Nt(Ft,null,_i(e.element,(n,s)=>(ft(),Nt("div",{key:s,class:"flex items-center mb-10"},[yt("label",{for:s,class:"min-w-[150px] font-bold"},Xe(s),9,Y0),typeof n=="string"||typeof n=="number"?_s((ft(),Nt("input",{key:0,id:s,"onUpdate:modelValue":r=>e.element[s]=r,type:typeof n=="number"?"number":"text"},null,8,q0)),[[bf,e.element[s]]]):typeof n=="boolean"?_s((ft(),Nt("input",{key:1,id:s,"onUpdate:modelValue":r=>e.element[s]=r,type:"checkbox"},null,8,K0)),[[Al,e.element[s]]]):n&&typeof n=="object"&&n.value!==void 0?(ft(),Nt("span",J0,[_s(yt("input",{id:s,"onUpdate:modelValue":r=>n.value=r,type:"text"},null,8,Q0),[[Is,n.value]])])):n&&Array.isArray(n)?(ft(),Nt("span",Z0,Xe(n.length)+" elements ",1)):(ft(),Nt("span",tp,Xe(n),1))]))),128))])):(ft(),Nt("div",ep,[...i[2]||(i[2]=[yt("p",null,"Select an element to view properties.",-1)])]))]))}}),[["styles",[".object-properties[data-v-7c2c07dd]{padding:20px;border-top:1px solid #ccc;background-color:#f9f9f9}.property-row[data-v-7c2c07dd]{margin-bottom:10px;display:flex;align-items:center}.property-row label[data-v-7c2c07dd]{width:150px;font-weight:700}.property-row input[data-v-7c2c07dd]{flex:1;padding:5px}"]],["__scopeId","data-v-7c2c07dd"]]),np={class:"flex flex-col gap-2 p-4 bg-white flex-1"},sp={class:"flex flex-col gap-2"},rp=Le({__name:"ElementCatalog",emits:["add-seat","add-door"],setup(e){return(t,i)=>(ft(),Nt("div",np,[i[2]||(i[2]=yt("h3",{class:"font-bold mb-2"},"Catalog",-1)),yt("div",sp,[yt("button",{class:"ott-button w-fit text-left",onClick:i[0]||(i[0]=n=>t.$emit("add-seat"))}," + Add Seat "),yt("button",{class:"ott-button w-fit text-left",onClick:i[1]||(i[1]=n=>t.$emit("add-door"))}," + Add Door ")])]))}}),op={class:"h-full overflow-y-auto bg-gray-100 p-4 font-mono text-sm"},ap=["id"],lp=Le({__name:"XmlViewer",props:{xml:{type:String,required:!0},selectedId:{type:String,default:null}},setup(e){const t=e,i=Ms(()=>t.xml.split(`
|
|
16
|
-
`)),n=Xt(null),s=o=>n.value?o>=n.value.start&&o<=n.value.end:!1,r=()=>{if(!t.selectedId){n.value=null;return}const o=i.value.findIndex(l=>l.includes(`id="${t.selectedId}"`));if(o===-1){n.value=null;return}const a=i.value[o];if(a){if(a.trim().endsWith("/>"))n.value={start:o,end:o};else{const l=a.match(/<(\w+)/);if(l){const c=l[1];let h=1,d=o;for(let u=o+1;u<i.value.length;u++){const f=i.value[u];if(f&&!f.match(new RegExp(`<${c}.*/>`))&&(f.match(new RegExp(`<${c}`))?h++:f.match(new RegExp(`</${c}>`))&&h--,h===0)){d=u;break}}n.value={start:o,end:d}}else n.value={start:o,end:o}}us(()=>{document.getElementById(`line-${o}`)?.scrollIntoView({behavior:"smooth",block:"center"})})}};return bi(()=>[t.selectedId,t.xml],()=>{r()},{immediate:!0}),(o,a)=>(ft(),Nt("div",op,[(ft(!0),Nt(Ft,null,_i(i.value,(l,c)=>(ft(),Nt("div",{key:c,id:`line-${c}`,class:Li({"bg-yellow-200":s(c)})},[yt("pre",null,Xe(l),1)],10,ap))),128))]))}}),nc=e=>{const i=new
|
|
15
|
+
`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}Ne.prototype.build=function(e){return this.options.preserveOrder?_0(e,this.options):(Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e}),this.j2x(e,0,[]).val)},Ne.prototype.j2x=function(e,t,i){let n="",s="";const r=i.join(".");for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o))if(typeof e[o]>"u")this.isAttribute(o)&&(s+="");else if(e[o]===null)this.isAttribute(o)||o===this.options.cdataPropName?s+="":o[0]==="?"?s+=this.indentate(t)+"<"+o+"?"+this.tagEndChar:s+=this.indentate(t)+"<"+o+"/"+this.tagEndChar;else if(e[o]instanceof Date)s+=this.buildTextValNode(e[o],o,"",t);else if(typeof e[o]!="object"){const a=this.isAttribute(o);if(a&&!this.ignoreAttributesFn(a,r))n+=this.buildAttrPairStr(a,""+e[o]);else if(!a)if(o===this.options.textNodeName){let l=this.options.tagValueProcessor(o,""+e[o]);s+=this.replaceEntitiesValue(l)}else s+=this.buildTextValNode(e[o],o,"",t)}else if(Array.isArray(e[o])){const a=e[o].length;let l="",c="";for(let h=0;h<a;h++){const d=e[o][h];if(!(typeof d>"u"))if(d===null)o[0]==="?"?s+=this.indentate(t)+"<"+o+"?"+this.tagEndChar:s+=this.indentate(t)+"<"+o+"/"+this.tagEndChar;else if(typeof d=="object")if(this.options.oneListGroup){const u=this.j2x(d,t+1,i.concat(o));l+=u.val,this.options.attributesGroupName&&d.hasOwnProperty(this.options.attributesGroupName)&&(c+=u.attrStr)}else l+=this.processTextOrObjNode(d,o,t,i);else if(this.options.oneListGroup){let u=this.options.tagValueProcessor(o,d);u=this.replaceEntitiesValue(u),l+=u}else l+=this.buildTextValNode(d,o,"",t)}this.options.oneListGroup&&(l=this.buildObjectNode(l,o,c,t)),s+=l}else if(this.options.attributesGroupName&&o===this.options.attributesGroupName){const a=Object.keys(e[o]),l=a.length;for(let c=0;c<l;c++)n+=this.buildAttrPairStr(a[c],""+e[o][a[c]])}else s+=this.processTextOrObjNode(e[o],o,t,i);return{attrStr:n,val:s}},Ne.prototype.buildAttrPairStr=function(e,t){return t=this.options.attributeValueProcessor(e,""+t),t=this.replaceEntitiesValue(t),this.options.suppressBooleanAttributes&&t==="true"?" "+e:" "+e+'="'+t+'"'};function E0(e,t,i,n){const s=this.j2x(e,i+1,n.concat(t));return e[this.options.textNodeName]!==void 0&&Object.keys(e).length===1?this.buildTextValNode(e[this.options.textNodeName],t,s.attrStr,i):this.buildObjectNode(s.val,t,s.attrStr,i)}Ne.prototype.buildObjectNode=function(e,t,i,n){if(e==="")return t[0]==="?"?this.indentate(n)+"<"+t+i+"?"+this.tagEndChar:this.indentate(n)+"<"+t+i+this.closeTag(t)+this.tagEndChar;{let s="</"+t+this.tagEndChar,r="";return t[0]==="?"&&(r="?",s=""),(i||i==="")&&e.indexOf("<")===-1?this.indentate(n)+"<"+t+i+r+">"+e+s:this.options.commentPropName!==!1&&t===this.options.commentPropName&&r.length===0?this.indentate(n)+`<!--${e}-->`+this.newLine:this.indentate(n)+"<"+t+i+r+this.tagEndChar+e+this.indentate(n)+s}},Ne.prototype.closeTag=function(e){let t="";return this.options.unpairedTags.indexOf(e)!==-1?this.options.suppressUnpairedNode||(t="/"):this.options.suppressEmptyNode?t="/":t=`></${e}`,t},Ne.prototype.buildTextValNode=function(e,t,i,n){if(this.options.cdataPropName!==!1&&t===this.options.cdataPropName)return this.indentate(n)+`<![CDATA[${e}]]>`+this.newLine;if(this.options.commentPropName!==!1&&t===this.options.commentPropName)return this.indentate(n)+`<!--${e}-->`+this.newLine;if(t[0]==="?")return this.indentate(n)+"<"+t+i+"?"+this.tagEndChar;{let s=this.options.tagValueProcessor(t,e);return s=this.replaceEntitiesValue(s),s===""?this.indentate(n)+"<"+t+i+this.closeTag(t)+this.tagEndChar:this.indentate(n)+"<"+t+i+">"+s+"</"+t+this.tagEndChar}},Ne.prototype.replaceEntitiesValue=function(e){if(e&&e.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){const i=this.options.entities[t];e=e.replace(i.regex,i.val)}return e};function S0(e){return this.options.indentBy.repeat(e)}function w0(e){return e.startsWith(this.options.attributeNamePrefix)&&e!==this.options.textNodeName?e.substr(this.attrPrefixLen):!1}class x0{attr_id;attr_version;Label;constructor({Label:t,attr_id:i,attr_version:n}){this.attr_id=i,this.attr_version=n,this.Label=t}toXML(){return{attr_id:this.attr_id,attr_version:this.attr_version,Label:this.Label}}}class C0{attr_ref;attr_version;constructor({attr_ref:t,attr_version:i}){this.attr_ref=t,this.attr_version=i}toXML(){return{attr_ref:this.attr_ref,attr_version:this.attr_version}}}class ql{value;constructor(t){this.value=t?.text_value}toXML(){return{text_value:this.value}}}function At(e,t){return e?Array.isArray(e)?e.map(i=>new t(i)):[new t(e)]:[]}function Ge(e){return e.map(t=>t.toXML())}function Te(e){const t={};return e.forEach(i=>{const n=i.constructor.xmlTagName??i.constructor.name;t[n]||(t[n]=[]),t[n].push(i.toXML())}),t}class kn{attr_id;attr_version;Units;TicketingEquipmentRef;TicketValidatorEquipmentRef;constructor({attr_id:t,attr_version:i,Units:n,TicketingEquipmentRef:s=void 0,TicketValidatorEquipmentRef:r=void 0}){this.attr_id=t,this.attr_version=i,this.Units=n,this.TicketingEquipmentRef=s,this.TicketValidatorEquipmentRef=r}toXML(){return{attr_id:this.attr_id,attr_version:this.attr_version,Units:this.Units,TicketingEquipmentRef:this.TicketingEquipmentRef?.toXML(),TicketValidatorEquipmentRef:this.TicketValidatorEquipmentRef?.toXML()}}}class N0{attr_id;attr_version;Name;PublicUse;TotalCapacity;actualVehicleEquipments;constructor({attr_id:t,attr_version:i,Name:n,PublicUse:s,TotalCapacity:r,actualVehicleEquipments:o}){this.attr_id=t,this.attr_version=i,this.Name=n?new ql(n):void 0,this.actualVehicleEquipments=o?At(o.ActualVehicleEquipment,kn):[],this.PublicUse=s?.text_value,this.TotalCapacity=r?.text_value}toXML(){return{attr_id:this.attr_id,attr_version:this.attr_version,Name:this.Name?.toXML}}}class ti{x;y;constructor(t,i){this.x=t,this.y=i}static fromXML(t){const i=t?.Location?.pos;if(typeof i=="string"){const[n,s]=i.split(" ").map(Number);if(typeof n=="number"&&typeof s=="number")return new ti(n,s)}else return new ti(0,0)}toXML(){return{Location:{pos:`${this.x} ${this.y}`}}}}class Kl{static xmlTagName="PassengerEntrance";attr_id;attr_version;Name;Label;Width;Height;actualVehicleEquipments;PublicUse;VehicleSide;SequenceFromFront;HeightFromGround;DeckEntranceType;IsEmergencyExit;HasDoor;IsAutomatic;Centroid;constructor({attr_id:t,attr_version:i,Name:n,Label:s,Width:r,Height:o,actualVehicleEquipments:a,PublicUse:l,VehicleSide:c,SequenceFromFront:h,HeightFromGround:d,DeckEntranceType:u,IsEmergencyExit:f,HasDoor:p,IsAutomatic:_,Centroid:b=void 0}){this.attr_id=t,this.attr_version=i,this.Name=n?new ql(n):void 0,this.Label=s?.text_value,this.Width=r?.text_value,this.Height=o?.text_value,this.actualVehicleEquipments=At(a?.ActualVehicleEquipment,kn),this.PublicUse=l?.text_value,this.VehicleSide=c?.text_value,this.SequenceFromFront=h?.text_value,this.HeightFromGround=d?.text_value,this.DeckEntranceType=u?.text_value,this.IsEmergencyExit=f?.text_value,this.HasDoor=p?.text_value,this.IsAutomatic=_?.text_value,this.Centroid=b?ti.fromXML(b):void 0}toXML(){return{attr_id:this.attr_id,attr_version:this.attr_version,Name:this.Name?.toXML(),Label:this.Label,Width:this.Width,Height:this.Height,actualVehicleEquipments:{ActualVehicleEquipment:Ge(this.actualVehicleEquipments)},PublicUse:this.PublicUse,VehicleSide:this.VehicleSide,SequenceFromFront:this.SequenceFromFront,HeightFromGround:this.HeightFromGround,DeckEntranceType:this.DeckEntranceType,IsEmergencyExit:this.IsEmergencyExit,HasDoor:this.HasDoor,IsAutomatic:this.IsAutomatic,Centroid:this.Centroid?.toXML()}}getShape(t,i,n){const s=(this.Width||.8)*t,r=.2*t;let o=s,a=r;if((this.VehicleSide==="front"||this.VehicleSide==="back")&&(o=r,a=s),this.Centroid)return{x:this.Centroid.x*t,y:this.Centroid.y*t,width:o,height:a,fill:"orange",stroke:"darkorange",strokeWidth:2,draggable:!0};let l=0,c=0;return this.VehicleSide==="leftSide"?(l=(this.SequenceFromFront??0)*t-o/2+5,c=5):this.VehicleSide==="rightSide"?(l=(this.SequenceFromFront??0)*t-o/2+5,c=n*t+5-a):this.VehicleSide==="front"?(l=5,c=n*t/2+5-a/2):this.VehicleSide==="back"?(l=i*t+5-o,c=n*t/2+5-a/2):(l=5,c=5),{x:l,y:c,width:o,height:a,fill:"orange",stroke:"darkorange",strokeWidth:2,draggable:!0}}}class Jl{attr_ref;attr_version;constructor({attr_ref:t,attr_version:i}){this.attr_ref=t,this.attr_version=i}toXML(){return{attr_ref:this.attr_ref,attr_version:this.attr_version}}}class T0{attr_ref;attr_version;FromDeckEntranceRef;ToDeckEntranceRef;constructor({attr_ref:t,attr_version:i,FromDeckEntranceRef:n,ToDeckEntranceRef:s}){this.attr_ref=t,this.attr_version=i,this.FromDeckEntranceRef=new Jl(n),this.ToDeckEntranceRef=new Jl(s)}toXML(){return{attr_ref:this.attr_ref,attr_version:this.attr_version,FromDeckEntranceRef:this.FromDeckEntranceRef.toXML(),ToDeckEntranceRef:this.ToDeckEntranceRef.toXML()}}}class k0{attr_id;attr_version;Name;constructor({attr_id:t,attr_version:i,Name:n}){this.attr_id=t,this.attr_version=i,this.Name=n}toXML(){return{attr_id:this.attr_id,Name:this.Name,attr_version:this.attr_version}}}class O0{attr_ref;attr_version;constructor({attr_ref:t,attr_version:i}){this.attr_ref=t,this.attr_version=i}toXML(){return{attr_ref:this.attr_ref,attr_version:this.attr_version}}}class P0{attr_ref;attr_version;validityConditions;Name;EntranceUsageType;EntranceSetting;ControlledLocking;constructor({attr_ref:t,attr_version:i,validityConditions:n,Name:s,EntranceUsageType:r,EntranceSetting:o,ControlledLocking:a}){this.attr_ref=t,this.attr_version=i,this.validityConditions=Object.entries(n).flatMap(([l,c])=>(l==="ValidityConditionRef"&&c.map(h=>new O0(h)),l==="ValidityCondition"&&c.map(h=>new k0(h)),[])),this.Name=s,this.EntranceUsageType=r,this.EntranceSetting=o,this.ControlledLocking=a}toXML(){return{attr_ref:this.attr_ref,attr_version:this.attr_version,validityConditions:Te(this.validityConditions),Name:this.Name,EntranceUsageType:this.EntranceUsageType,EntranceSetting:this.EntranceSetting,ControlledLocking:this.ControlledLocking}}}class A0{attr_ref;attr_version;LocatableSpotType;capacity;constructor({attr_ref:t,attr_version:i,LocatableSpotType:n,capacity:s}){this.attr_ref=t,this.attr_version=i,this.LocatableSpotType=n,this.capacity=s}toXML(){return{attr_ref:this.attr_ref,attr_version:this.attr_version,LocatableSpotType:this.LocatableSpotType,capacity:this.capacity}}}class R0{attr_id;label;constructor({attr_id:t,Label:i}){this.attr_id=t,this.label=i}toXML(){return{attr_id:this.attr_id,label:this.label}}}class Ql{attr_ref;attr_version;constructor({attr_ref:t,attr_version:i}){this.attr_ref=t,this.attr_version=i}toXML(){return{attr_ref:this.attr_ref,attr_version:this.attr_version}}}class M0{attr_id;label;constructor({attr_id:t,Label:i}){this.attr_id=t,this.label=i}toXML(){return{attr_id:this.attr_id,label:this.label}}}class Zl{attr_ref;attr_version;constructor({attr_ref:t,attr_version:i}){this.attr_ref=t,this.attr_version=i}toXML(){return{attr_ref:this.attr_ref,attr_version:this.attr_version}}}class L0{attr_id;attr_version;Label;Orientation;actualVehicleEquipments;SpotColumnRef;SpotRowRef;constructor({attr_id:t,attr_version:i,Label:n,Orientation:s,actualVehicleEquipments:r,SpotColumnRef:o,SpotRowRef:a}){this.attr_id=t,this.attr_version=i,this.Label=n,this.Orientation=s,this.actualVehicleEquipments=r?At(r,kn):[],this.SpotColumnRef=o?new Ql(o):void 0,this.SpotRowRef=a?new Zl(a):void 0}toXML(){return{attr_id:this.attr_id,attr_version:this.attr_version,Label:this.Label,Orientation:this.Orientation,actualVehicleEquipments:{ActualVehicleEquipment:Ge(this.actualVehicleEquipments)},SpotColumnRef:this.SpotColumnRef?.toXML(),SpotRowRef:this.SpotRowRef?.toXML()}}}class I0{attr_ref;attr_version;constructor({attr_ref:t,attr_version:i}){this.attr_ref=t,this.attr_version=i}toXML(){return{attr_ref:this.attr_ref,attr_version:this.attr_version}}}var ie=(e=>(e.Occupied="Occupied",e.Selected="Selected",e.Filtered="Filtered",e.Defect="Defect",e.Undefined="Undefined",e))(ie||{});class On{static xmlTagName="PassengerSpot";attr_id;attr_version;Label;Orientation;actualVehicleEquipments;SpotColumnRef;SpotRowRef;ByWindow;ByAisle;HasPower;Centroid;Width;Length;availability;constructor({attr_id:t,attr_version:i,Label:n,Orientation:s,actualVehicleEquipments:r,SpotColumnRef:o,SpotRowRef:a,ByWindow:l,ByAisle:c,HasPower:h,Centroid:d,Width:u,Length:f}){this.attr_id=t,this.attr_version=i,this.Label=n||"",this.Orientation=s||void 0,this.actualVehicleEquipments=r?At(r,kn):void 0,this.SpotColumnRef=o?new Ql(o):void 0,this.SpotRowRef=a?new Zl(a):void 0,this.ByWindow=l,this.ByAisle=c,this.HasPower=h,this.Centroid=d?ti.fromXML(d):void 0,this.Width=u||.5,this.Length=f||.5}toXML(){return{attr_id:this.attr_id,attr_version:this.attr_version,Label:this.Label?{text_value:this.Label}:void 0,Orientation:this.Orientation?{text_value:this.Orientation}:void 0,actualVehicleEquipments:this.actualVehicleEquipments?Te(this.actualVehicleEquipments):void 0,SpotColumnRef:this.SpotColumnRef?.toXML(),SpotRowRef:this.SpotRowRef?.toXML(),ByWindow:this.ByWindow?{text_value:this.ByWindow}:void 0,ByAisle:this.ByAisle?{text_value:this.ByAisle}:void 0,HasPower:this.HasPower?{text_value:this.HasPower}:void 0,Centroid:this.Centroid?.toXML(),Width:this.Width,Length:this.Length}}getFillColor(){switch(this.availability){case ie.Occupied:return"lightred";case ie.Selected:return"lightgreen";case ie.Filtered:return"lightgray";case ie.Defect:return"black";case ie.Undefined:return"lightyellow";default:return"lightgray"}}getStrokeColor(){switch(this.availability){case ie.Occupied:return"red";case ie.Selected:return"green";case ie.Filtered:return"gray";case ie.Defect:return"black";case ie.Undefined:return"#121212";default:return"#121212"}}getShape(t){if(this.Centroid){const i=this.Width*t,n=this.Length*t;return{x:(this.Centroid?.x??1)*t-i/2+5,y:(this.Centroid?.y??1)*t-n/2+5,width:i,height:n,fill:this.getFillColor(),stroke:this.getStrokeColor(),strokeWidth:1,cornerRadius:2,draggable:!0}}return{x:0,y:0,width:this.Width*t,height:this.Length*t,fill:"red",draggable:!0}}}class D0{attr_ref;attr_version;constructor({attr_ref:t,attr_version:i}){this.attr_ref=t,this.attr_version=i}toXML(){return{attr_ref:this.attr_ref,attr_version:this.attr_version}}}class tc{value;constructor(t){this.value=t}toXML(){return this.value}}class V0{attr_ref;attr_version;constructor({attr_ref:t,attr_version:i}){this.attr_ref=t,this.attr_version=i}toXML(){return{attr_ref:this.attr_ref,attr_version:this.attr_version}}}class Be{static xmlTagName="PassengerSpace";attr_id;attr_version;Name;SmokingAllowed;StandingAllowed;PassengerSpaceType;passengerSpots;luggageSpots;deckEntrances;deckEntranceUsage;deckEntranceCouples;deckSpaceCapacities;actualVehicleEquipments;ServiceFacilitySetRef;Centroid;Polygon;PublicUse;TotalCapacity;FareClass;AirConditioned;constructor({attr_id:t,attr_version:i,Name:n,SmokingAllowed:s,StandingAllowed:r,PassengerSpaceType:o,passengerSpots:a,luggageSpots:l,deckEntrances:c,deckEntranceUsage:h,deckEntranceCouples:d,deckSpaceCapacities:u,actualVehicleEquipments:f,ServiceFacilitySetRef:p,Centroid:_,Polygon:b,PublicUse:S,TotalCapacity:y,FareClass:C,AirConditioned:N}){this.attr_id=t,this.attr_version=i,this.Name=n,this.SmokingAllowed=s,this.StandingAllowed=r,this.PassengerSpaceType=o,this.passengerSpots=a?Object.entries(a).flatMap(([T,O])=>T==="PassengerSpot"?At(O,On):T==="PassengerSpotRef"?At(O,D0):[]):[],this.luggageSpots=l?Object.entries(l).flatMap(([T,O])=>T==="LuggageSpot"?At(O,L0):T==="LuggageSpotRef"?At(O,I0):[]):[],this.deckEntrances=At(c?.PassengerEntrance,Kl),this.deckEntranceUsage=At(h?.DeckEntranceUsage,P0),this.deckEntranceCouples=At(d?.DeckEntranceCouple,T0),this.deckSpaceCapacities=At(u?.DeckSpaceCapacity,A0),this.actualVehicleEquipments=At(f?.ActualVehicleEquipment,kn),this.ServiceFacilitySetRef=p?new V0(p):void 0,this.Centroid=_?ti.fromXML(_):void 0,this.Polygon=b?new tc(b):void 0,this.PublicUse=S?.text_value,this.TotalCapacity=y?.text_value,this.FareClass=C?.text_value,this.AirConditioned=N?.text_value}toXML(){return{attr_id:this.attr_id,attr_version:this.attr_version,Name:this.Name,SmokingAllowed:this.SmokingAllowed,StandingAllowed:this.StandingAllowed,PassengerSpaceType:this.PassengerSpaceType,passengerSpots:this.passengerSpots?Te(this.passengerSpots):"",luggageSpots:this.luggageSpots?Te(this.luggageSpots):void 0,deckEntrances:this.deckEntrances?Te(this.deckEntrances):void 0,deckEntranceUsage:this.deckEntranceUsage?Te(this.deckEntranceUsage):void 0,deckEntranceCouples:this.deckEntranceCouples?Te(this.deckEntranceCouples):void 0,deckSpaceCapacities:this.deckSpaceCapacities?Te(this.deckSpaceCapacities):void 0,actualVehicleEquipments:this.actualVehicleEquipments?Te(this.actualVehicleEquipments):void 0,ServiceFacilitySetRef:this.ServiceFacilitySetRef?.toXML(),Centroid:this.Centroid?.toXML(),Polygon:this.Polygon?.toXML(),PublicUse:this.PublicUse,TotalCapacity:this.TotalCapacity,FareClass:this.FareClass,AirConditioned:this.AirConditioned}}}class F0{attr_id;attr_version;Name;polygon;deckspaces;DeckLevelRef;spotRows;spotColumns;Width;Length;constructor({attr_id:t,attr_version:i,deckSpaces:n,spotRows:s=void 0,spotColumns:r=void 0,DeckLevelRef:o=void 0,Name:a=void 0,polygon:l=void 0,Width:c=void 0,Length:h=void 0}){this.attr_id=t,this.attr_version=i,this.Name=a?.text_value||"",this.polygon=l?new tc(l):void 0,this.DeckLevelRef=o?new C0(o):void 0,this.Width=c?.text_value||2.825,this.Length=h?.text_value||26.4,this.deckspaces=n?Object.entries(n).flatMap(([d,u])=>d==="OtherDeckSpace"?At(u,N0):d==="PassengerSpace"?At(u,Be):[]):[],this.spotRows=At(s?.SpotRow,M0),this.spotColumns=At(r?.SpotColumn,R0)}toXML(){return{attr_id:this.attr_id,attr_version:this.attr_version,spotRows:{SpotRow:Ge(this.spotRows)},spotColumns:{SpotColumn:Ge(this.spotColumns)},deckSpaces:Te(this.deckspaces),DeckLevelRef:this.DeckLevelRef?.toXML(),polygon:this.polygon?.toXML(),Name:{text_value:this.Name},Width:{text_value:this.Width},Length:{text_value:this.Length}}}getBoundingBox(){const t=this.Length,i=this.Width;return{width:t,height:i}}getShape(t){const{width:i,height:n}=this.getBoundingBox();return{x:5,y:5,width:i*t,height:n*t,fill:"white",stroke:"gray",strokeWidth:2,cornerRadius:5}}}class ec{attr_id;attr_version;deckLevels;decks;constructor({attr_id:t,attr_version:i,decks:n=void 0,deckLevels:s=void 0}){this.attr_id=t,this.attr_version=i,this.deckLevels=At(s?.DeckLevel,x0),this.decks=At(n?.Deck,F0)}toXML(){return{attr_id:this.attr_id,attr_version:this.attr_version,decks:{Deck:Ge(this.decks)},deckLevels:{DeckLevel:Ge(this.deckLevels)}}}}const ic=Le({__name:"DeckVisualization",props:{deck:{type:Object,required:!0},availability:{type:Object},scale:{type:Number,required:!0},selectedElements:{type:Array,default:()=>[]}},emits:["select","area-select"],setup(e,{emit:t}){const i=e,n=t,s=Xt(null),r=Xt(!1),o=Xt({x:0,y:0}),a=Xt([]),l=Xt(new Map),c=Ms(()=>i.deck.deckspaces?.flatMap(w=>w instanceof Be?w.passengerSpots?.filter(x=>x instanceof On)||[]:[]).map(w=>{const x=w;return x.availability=i.availability&&w.attr_id?ie[i.availability[w.attr_id]??"Undefined"]:ie.Undefined,x})||[]),h=Ms(()=>i.deck.deckspaces?.flatMap(w=>w instanceof Be?w.deckEntrances||[]:[])||[]),d=w=>i.selectedElements.includes(w)?{stroke:"#68a691",strokeWidth:3}:{},u=(w,x)=>{let P=0,B=0;const{width:K,height:z}=w.getBoundingBox();return P=Math.max(P,K),B=Math.max(B,z),{width:P*x+10,height:B*x+10}},f=(w,x)=>{r.value||(n("select",{element:x,ctrlKey:w.evt.ctrlKey||w.evt.metaKey}),w.cancelBubble=!0)},p=w=>{if(w.evt.ctrlKey||w.evt.metaKey||w.target===w.target.getStage()){r.value=!0;const P=w.target.getStage().getPointerPosition(),B=w.target.getAbsoluteTransform().copy();B.invert();const K=B.point(P);o.value={x:K.x,y:K.y},s.value={x:K.x,y:K.y,width:0,height:0,fill:"rgba(0, 255, 0, 0.3)",stroke:"#68a691",strokeWidth:1}}else n("area-select",[])},_=w=>{if(!r.value)return;const P=w.target.getStage().getPointerPosition(),B=w.target.getAbsoluteTransform().copy();B.invert();const K=B.point(P);s.value.width=K.x-o.value.x,s.value.height=K.y-o.value.y},b=w=>{if(!r.value)return;r.value=!1;const x=s.value;if(!x)return;const P=x.width>0?x.x:x.x+x.width,B=x.height>0?x.y:x.y+x.height,K=Math.abs(x.width),z=Math.abs(x.height),Z=c.value.filter(J=>{const A=J.getShape(i.scale);return A.x<P+K&&A.x+A.width>P&&A.y<B+z&&A.y+A.height>B});Z.length>0&&n("area-select",Z),s.value=null},S=(w,x)=>{l.value.clear(),i.selectedElements.includes(x)&&i.selectedElements.forEach(P=>{if(P instanceof On){const B=P.getShape(i.scale);l.value.set(P,{x:B.x,y:B.y})}})},y=(w,x)=>{a.value=[];const P=w.target.getStage();w.target.getLayer();const B=c.value.filter(H=>H!==x&&!i.selectedElements.includes(H)),K=w.target.x(),z=w.target.y(),Z=10;let J=K,A=z;B.forEach(H=>{const D=H.getShape(i.scale);Math.abs(K-D.x)<Z&&(J=D.x,a.value.push({points:[D.x,0,D.x,P.height()],stroke:"red",strokeWidth:1,dash:[4,6]})),Math.abs(z-D.y)<Z&&(A=D.y,a.value.push({points:[0,D.y,P.width(),D.y],stroke:"red",strokeWidth:1,dash:[4,6]}))}),w.target.x(J),w.target.y(A);const L=l.value.get(x);if(L&&i.selectedElements.includes(x)){const H=J-L.x,D=A-L.y;i.selectedElements.forEach(nt=>{if(nt!==x&&nt instanceof On){const ct=l.value.get(nt);ct&&N(nt,ct.x+H,ct.y+D)}})}},C=(w,x)=>{a.value=[];const P=w.target.x(),B=w.target.y();N(x,P,B),l.value.clear()},N=(w,x,P)=>{w.Centroid?(w.Centroid.x=(x-5)/i.scale+w.Width/2,w.Centroid.y=(P-5)/i.scale+w.Length/2):w.Centroid=new ti((x-5)/i.scale+w.Width/2,(P-5)/i.scale+w.Length/2)},T=(w,x)=>{const P=w.target.x(),B=w.target.y(),K=i.deck.Width*i.scale,z=i.deck.Length*i.scale,Z=x.getShape(i.scale,i.deck.Length,i.deck.Width),J=Z.width,A=Z.height,L=5,H=5,D=L+z,nt=H+K,ct=P+J/2,ot=B+A/2,gt=Math.abs(ct-L),Ot=Math.abs(ct-D),Ji=Math.abs(ot-H),nr=Math.abs(ot-nt),Qi=Math.min(gt,Ot,Ji,nr);let le=P,ve=B;Qi===Ji?(ve=H,le=Math.max(L,Math.min(P,D-J))):Qi===nr?(ve=nt-A,le=Math.max(L,Math.min(P,D-J))):Qi===gt?(le=L,ve=K/2+5-A/2):Qi===Ot&&(le=D-J,ve=K/2+5-A/2),w.target.x(le),w.target.y(ve),x.Centroid||(x.Centroid=new ti(0,0)),x.Centroid.x=le/i.scale,x.Centroid.y=ve/i.scale},O=(w,x)=>{const P=w.target.x(),B=w.target.y(),K=i.deck.Width*i.scale,z=i.deck.Length*i.scale,Z=x.getShape(i.scale,i.deck.Length,i.deck.Width),J=Z.width,A=Z.height,L=5,H=5,D=L+z,nt=H+K,ct=1;Math.abs(B-H)<ct?(x.VehicleSide="leftSide",x.SequenceFromFront=(P-L+J/2)/i.scale):Math.abs(B-(nt-A))<ct?(x.VehicleSide="rightSide",x.SequenceFromFront=(P-L+J/2)/i.scale):Math.abs(P-L)<ct?(x.VehicleSide="front",x.SequenceFromFront=0):Math.abs(P-(D-J))<ct&&(x.VehicleSide="back",x.SequenceFromFront=i.deck.Length)};return(w,x)=>{const P=Bi("v-rect"),B=Bi("v-text"),K=Bi("v-group"),z=Bi("v-line"),Z=Bi("v-layer"),J=Bi("v-stage");return ft(),Ke(J,{config:u(e.deck,e.scale)},{default:pn(()=>[Tt(Z,null,{default:pn(()=>[Tt(P,{config:{...e.deck.getShape(e.scale),y:5,...d(e.deck)},onClick:x[0]||(x[0]=A=>f(A,e.deck))},null,8,["config"]),Tt(P,{config:{x:0,y:0,width:e.deck.getShape(e.scale).width,height:e.deck.getShape(e.scale).height,fill:"transparent",listening:!0},onMousedown:p,onMousemove:_,onMouseup:b},null,8,["config"]),(ft(!0),Nt(Ft,null,_i(c.value,(A,L)=>(ft(),Ke(K,{key:`seats-${L}`,config:{x:A.getShape(e.scale).x,y:A.getShape(e.scale).y,draggable:!0},onDragstart:H=>S(H,A),onDragend:H=>C(H,A),onDragmove:H=>y(H,A),onClick:H=>f(H,A)},{default:pn(()=>[Tt(P,{config:{width:A.getShape(e.scale).width,height:A.getShape(e.scale).height,fill:A.getShape(e.scale).fill,stroke:A.getShape(e.scale).stroke,strokeWidth:A.getShape(e.scale).strokeWidth,cornerRadius:A.getShape(e.scale).cornerRadius,...d(A)}},null,8,["config"]),Tt(B,{config:{width:A.getShape(e.scale).width,height:A.getShape(e.scale).height,text:A.Label,align:"center",verticalAlign:"middle",fontSize:Math.min(Math.min(A.getShape(e.scale).width,A.getShape(e.scale).height)/2,16),listening:!1}},null,8,["config"])]),_:2},1032,["config","onDragstart","onDragend","onDragmove","onClick"]))),128)),(ft(!0),Nt(Ft,null,_i(h.value,(A,L)=>(ft(),Ke(K,{key:`entrance-${L}`,config:{x:A.getShape(e.scale,e.deck.Length,e.deck.Width).x,y:A.getShape(e.scale,e.deck.Length,e.deck.Width).y,draggable:!0},onDragmove:H=>T(H,A),onDragend:H=>O(H,A),onClick:H=>f(H,A)},{default:pn(()=>[Tt(P,{config:{width:A.getShape(e.scale,e.deck.Length,e.deck.Width).width,height:A.getShape(e.scale,e.deck.Length,e.deck.Width).height,fill:A.getShape(e.scale,e.deck.Length,e.deck.Width).fill,stroke:A.getShape(e.scale,e.deck.Length,e.deck.Width).stroke,strokeWidth:A.getShape(e.scale,e.deck.Length,e.deck.Width).strokeWidth,...d(A)}},null,8,["config"])]),_:2},1032,["config","onDragmove","onDragend","onClick"]))),128)),s.value?(ft(),Ke(P,{key:0,config:{...s.value,listening:!1}},null,8,["config"])):Os("",!0),(ft(!0),Nt(Ft,null,_i(a.value,(A,L)=>(ft(),Ke(z,{key:`guide-${L}`,config:A},null,8,["config"]))),128))]),_:1})]),_:1},8,["config"])}}}),G0={class:"flex flex-col h-full"},B0={class:"flex p-4 w-full items-center justify-center gap-10"},H0={for:"scale-slider"},$0={style:{display:"flex","flex-direction":"row","overflow-x":"auto",gap:"20px",padding:"20px"}},W0=["onClick"],U0=Le({__name:"WagonVisualization",props:{deckPlans:{type:Array,required:!1},selectedElements:{type:Array,default:()=>[]}},setup(e){const t=Xt(20);return(i,n)=>(ft(),Nt("div",G0,[yt("div",B0,[yt("label",H0,"Scale: "+Xe(t.value),1),_s(yt("input",{id:"scale-slider",type:"range",min:"10",max:"50","onUpdate:modelValue":n[0]||(n[0]=s=>t.value=s)},null,512),[[Is,t.value,void 0,{number:!0}]])]),yt("div",$0,[(ft(!0),Nt(Ft,null,_i(e.deckPlans,(s,r)=>(ft(),Nt("div",{key:`deckplan-${r}`},[yt("h3",null,Xe(s.attr_id),1),(ft(!0),Nt(Ft,null,_i(s.decks,(o,a)=>(ft(),Nt("div",{key:`deck-${a}`},[yt("h4",{onClick:l=>i.$emit("select",{element:o,ctrlKey:!1}),class:Li(`${e.selectedElements.includes(o)?"text-ott-accent":""} cursor-pointer`)},Xe(o.Name),11,W0),Tt(ic,{deck:o,scale:t.value,selectedElements:e.selectedElements,onSelect:n[1]||(n[1]=l=>i.$emit("select",l)),onAreaSelect:n[2]||(n[2]=l=>i.$emit("area-select",l))},null,8,["deck","scale","selectedElements"])]))),128))]))),128))])]))}}),j0={class:"bg-ott-bg-primary p-4"},X0={class:"flex justify-between items-center mb-4"},z0={key:0},Y0=["for"],q0=["id","onUpdate:modelValue","type"],K0=["id","onUpdate:modelValue"],J0={key:2},Q0=["id","onUpdate:modelValue"],Z0={key:3},tp={key:4},ep={key:1},ip=((e,t)=>{const i=e.__vccOpts||e;for(const[n,s]of t)i[n]=s;return i})(Le({__name:"ObjectProperties",props:{element:{type:Object,default:null}},emits:["delete"],setup(e){return(t,i)=>(ft(),Nt("div",j0,[yt("div",X0,[i[1]||(i[1]=yt("h3",{class:"font-bold"},"Properties",-1)),e.element?(ft(),Nt("button",{key:0,class:"ott-button border-ott-error! text-ott-error!",onClick:i[0]||(i[0]=n=>t.$emit("delete",e.element))}," Delete ")):Os("",!0)]),e.element?(ft(),Nt("div",z0,[(ft(!0),Nt(Ft,null,_i(e.element,(n,s)=>(ft(),Nt("div",{key:s,class:"flex items-center mb-10"},[yt("label",{for:s,class:"min-w-[150px] font-bold"},Xe(s),9,Y0),typeof n=="string"||typeof n=="number"?_s((ft(),Nt("input",{key:0,id:s,"onUpdate:modelValue":r=>e.element[s]=r,type:typeof n=="number"?"number":"text"},null,8,q0)),[[bf,e.element[s]]]):typeof n=="boolean"?_s((ft(),Nt("input",{key:1,id:s,"onUpdate:modelValue":r=>e.element[s]=r,type:"checkbox"},null,8,K0)),[[Pl,e.element[s]]]):n&&typeof n=="object"&&n.value!==void 0?(ft(),Nt("span",J0,[_s(yt("input",{id:s,"onUpdate:modelValue":r=>n.value=r,type:"text"},null,8,Q0),[[Is,n.value]])])):n&&Array.isArray(n)?(ft(),Nt("span",Z0,Xe(n.length)+" elements ",1)):(ft(),Nt("span",tp,Xe(n),1))]))),128))])):(ft(),Nt("div",ep,[...i[2]||(i[2]=[yt("p",null,"Select an element to view properties.",-1)])]))]))}}),[["styles",[".object-properties[data-v-7c2c07dd]{padding:20px;border-top:1px solid #ccc;background-color:#f9f9f9}.property-row[data-v-7c2c07dd]{margin-bottom:10px;display:flex;align-items:center}.property-row label[data-v-7c2c07dd]{width:150px;font-weight:700}.property-row input[data-v-7c2c07dd]{flex:1;padding:5px}"]],["__scopeId","data-v-7c2c07dd"]]),np={class:"flex flex-col gap-2 p-4 bg-white flex-1"},sp={class:"flex flex-col gap-2"},rp=Le({__name:"ElementCatalog",emits:["add-seat","add-door"],setup(e){return(t,i)=>(ft(),Nt("div",np,[i[2]||(i[2]=yt("h3",{class:"font-bold mb-2"},"Catalog",-1)),yt("div",sp,[yt("button",{class:"ott-button w-fit text-left",onClick:i[0]||(i[0]=n=>t.$emit("add-seat"))}," + Add Seat "),yt("button",{class:"ott-button w-fit text-left",onClick:i[1]||(i[1]=n=>t.$emit("add-door"))}," + Add Door ")])]))}}),op={class:"h-full overflow-y-auto bg-gray-100 p-4 font-mono text-sm"},ap=["id"],lp=Le({__name:"XmlViewer",props:{xml:{type:String,required:!0},selectedId:{type:String,default:null}},setup(e){const t=e,i=Ms(()=>t.xml.split(`
|
|
16
|
+
`)),n=Xt(null),s=o=>n.value?o>=n.value.start&&o<=n.value.end:!1,r=()=>{if(!t.selectedId){n.value=null;return}const o=i.value.findIndex(l=>l.includes(`id="${t.selectedId}"`));if(o===-1){n.value=null;return}const a=i.value[o];if(a){if(a.trim().endsWith("/>"))n.value={start:o,end:o};else{const l=a.match(/<(\w+)/);if(l){const c=l[1];let h=1,d=o;for(let u=o+1;u<i.value.length;u++){const f=i.value[u];if(f&&!f.match(new RegExp(`<${c}.*/>`))&&(f.match(new RegExp(`<${c}`))?h++:f.match(new RegExp(`</${c}>`))&&h--,h===0)){d=u;break}}n.value={start:o,end:d}}else n.value={start:o,end:o}}us(()=>{document.getElementById(`line-${o}`)?.scrollIntoView({behavior:"smooth",block:"center"})})}};return bi(()=>[t.selectedId,t.xml],()=>{r()},{immediate:!0}),(o,a)=>(ft(),Nt("div",op,[(ft(!0),Nt(Ft,null,_i(i.value,(l,c)=>(ft(),Nt("div",{key:c,id:`line-${c}`,class:Li({"bg-yellow-200":s(c)})},[yt("pre",null,Xe(l),1)],10,ap))),128))]))}}),nc=e=>{const i=new jl({ignoreAttributes:!1,attributeNamePrefix:"attr_",removeNSPrefix:!0}).parse(e);return console.log(i),At(i.PublicationDelivery.dataObjects.CompositeFrame.frames.ResourceFrame.deckPlans.DeckPlan,ec)},cp={class:"flex flex-col h-full"},hp={class:"p-4 border-b border-b-ott-bg-dark flex gap-2 items-center bg-ott-bg-primary"},dp={class:"flex-1 flex overflow-hidden"},up={class:"flex-1 overflow-hidden"},fp={class:"flex flex-row h-75 border-t border-ott-bg-dark"},pp=Le({__name:"DeckplanEditor",setup(e,{expose:t}){const i=Xt(null),n=Xt([]),s=Xt([]),r=Xt(null),o=Xt(!1),a=Xt(""),l=()=>{if(!o.value||!r.value)return;r.value.PublicationDelivery.dataObjects.CompositeFrame.frames.ResourceFrame.deckPlans.DeckPlan=Ge(n.value);const O=new Ne({ignoreAttributes:!1,textNodeName:"text_value",attributeNamePrefix:"attr_",format:!0});a.value=O.build(r.value)},c=()=>{o.value=!o.value,o.value&&l()};bi(n,()=>{l()},{deep:!0});const h=({element:O,ctrlKey:w})=>{if(w){const x=s.value.indexOf(O);if(x>-1)s.value.splice(x,1);else{if(s.value.length>0&&s.value[0].constructor!==O.constructor)return;s.value.push(O)}}else s.value=[O]},d=O=>{s.value=O},u=O=>{const w=O.target;i.value=w.files?w.files[0]:null};function f(){if(i.value){const O=new FileReader;O.addEventListener("load",w=>{const x=w.target?.result;typeof x=="string"&&(n.value=nc(x),n.value=[...n.value])}),O.readAsText(i.value)}}function p(){if(i.value){r.value.PublicationDelivery.dataObjects.CompositeFrame.frames.ResourceFrame.deckPlans.DeckPlan=Ge(n.value);const w=new Ne({ignoreAttributes:!1,textNodeName:"text_value",attributeNamePrefix:"attr_"}).build(r.value),x=new Blob([w],{type:"text/xml"}),P=document.createElement("a");P.href=URL.createObjectURL(x),P.download="Demo.xml",P.click()}}const _=()=>n.value.length>0&&n.value[0]?.decks.length&&n.value[0]?.decks?.length>0?n.value[0].decks[0]:null,b=()=>{const O=_();if(!O)return;const w=O.deckspaces?.find(P=>P instanceof Be);if(!w){console.warn("No PassengerSpace found to add seat to");return}const x=new On({attr_id:`seat_${Date.now()}`,attr_version:"1",Label:{text_value:""},Orientation:{text_value:"forwards"},actualVehicleEquipments:[],SpotColumnRef:null,SpotRowRef:null,ByWindow:{text_value:!1},ByAisle:{text_value:!1},HasPower:{text_value:!1},Centroid:{x:1,y:1},Width:{text_value:.5},Length:{text_value:.5}});w.passengerSpots||(w.passengerSpots=[]),w.passengerSpots.push(x)},S=()=>{const O=_();if(!O)return;const w=O.deckspaces?.find(P=>P instanceof Be);if(!w){console.warn("No PassengerSpace found to add door to");return}const x=new Kl({attr_id:`door_${Date.now()}`,attr_version:"1",Name:{text_value:"New Door"},Width:{text_value:1},VehicleSide:{text_value:"leftSide"},SequenceFromFront:{text_value:0},DeckEntranceType:{text_value:"external"},actualVehicleEquipments:{ActualVehicleEquipment:[]},Label:void 0,Height:void 0,PublicUse:void 0,HeightFromGround:void 0,IsEmergencyExit:void 0,HasDoor:void 0,IsAutomatic:void 0,Centroid:void 0});w.deckEntrances||(w.deckEntrances=[]),w.deckEntrances.push(x)},y=O=>{n.value.forEach(w=>{w.decks.forEach(x=>{x.deckspaces?.forEach(P=>{if(P instanceof Be){if(P.passengerSpots){const B=P.passengerSpots.indexOf(O);B>-1&&P.passengerSpots.splice(B,1)}if(P.deckEntrances){const B=P.deckEntrances.indexOf(O);B>-1&&P.deckEntrances.splice(B,1)}}})})}),s.value=[]};function C(){return r.value?(r.value.PublicationDelivery.dataObjects.CompositeFrame.frames.ResourceFrame.deckPlans.DeckPlan=Ge(n.value),new Ne({ignoreAttributes:!1,textNodeName:"text_value",attributeNamePrefix:"attr_",format:!0}).build(r.value)):null}function N(){return new Be({attr_id:`ps-${Date.now()}`,attr_version:"1",Name:void 0,SmokingAllowed:void 0,StandingAllowed:void 0,PassengerSpaceType:"seatingArea",passengerSpots:{PassengerSpot:[],PassengerSpotRef:[]},luggageSpots:{LuggageSpot:[],LuggageSpotRef:[]},deckEntrances:{PassengerEntrance:[]},deckEntranceUsage:{DeckEntranceUsage:[]},deckEntranceCouples:{DeckEntranceCouple:[]},deckSpaceCapacities:{DeckSpaceCapacity:[]},actualVehicleEquipments:{ActualVehicleEquipment:[]},ServiceFacilitySetRef:void 0,Centroid:void 0,Polygon:void 0,PublicUse:void 0,TotalCapacity:void 0,FareClass:void 0,AirConditioned:void 0})}function T(O){const x=new jl({ignoreAttributes:!1,attributeNamePrefix:"attr_",removeNSPrefix:!0,alwaysCreateTextNode:!1}).parse(O);r.value=x;const P=At(x.PublicationDelivery.dataObjects.CompositeFrame.frames.ResourceFrame.deckPlans.DeckPlan,ec);P.forEach(B=>{B.decks.forEach(K=>{if(!K.deckspaces||K.deckspaces.length===0){K.deckspaces=[N()];return}const z=[];K.deckspaces.forEach(Z=>{Z instanceof Be?z.push(Z):(Z?.passengerSpots||Z?.PassengerSpaceType)&&z.push(new Be(Z))}),K.deckspaces=z})}),n.value=P}return t({exportXml:C,loadXml:T}),(O,w)=>(ft(),Nt("div",cp,[yt("div",hp,[yt("input",{ref:"inputRef",class:"ott-button",type:"file",multiple:"",onChange:u,accept:"text/xml"},null,544),yt("button",{onClick:f,class:"ott-button"},"Load"),yt("button",{onClick:p,class:"ott-button"},"Save"),yt("button",{onClick:c,class:Li(["ott-button",{"bg-ott-accent text-white":o.value}])},"XML",2)]),yt("div",dp,[yt("div",up,[n.value.length>0?(ft(),Ke(U0,{key:0,deckPlans:n.value,selectedElements:s.value,onSelect:h,onAreaSelect:d},null,8,["deckPlans","selectedElements"])):Os("",!0)]),o.value?(ft(),Ke(lp,{key:0,xml:a.value,selectedId:s.value[0]?.attr_id,class:"w-1/3 border-l border-ott-bg-dark"},null,8,["xml","selectedId"])):Os("",!0)]),yt("div",fp,[Tt(ip,{element:s.value.length===1?s.value[0]:null,class:"flex-1 overflow-y-auto",onDelete:y},null,8,["element"]),Tt(rp,{class:"w-50 border-l border-ott-bg-dark",onAddSeat:b,onAddDoor:S})])]))}}),gp=Math.PI/180;function mp(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const xi=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},X={_global:xi,version:"10.0.12",isBrowser:mp(),isUnminified:/param/.test((function(e){}).toString()),dblClickWindow:400,getAngle(e){return X.angleDeg?e*gp:e},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,_renderBackend:"web",legacyTextRendering:!1,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return X.DD.isDragging},isTransforming(){var e,t;return(t=(e=X.Transformer)===null||e===void 0?void 0:e.isTransforming())!==null&&t!==void 0?t:!1},isDragReady(){return!!X.DD.node},releaseCanvasOnDestroy:!0,document:xi.document,_injectGlobal(e){typeof xi.Konva<"u"&&console.error("Several Konva instances detected. It is not recommended to use multiple Konva instances in the same environment."),xi.Konva=e}},kt=e=>{X[e.prototype.getClassName()]=e};X._injectGlobal(X);const _p=`Konva.js unsupported environment.
|
|
17
17
|
|
|
18
18
|
Looks like you are trying to use Konva.js in Node.js environment. because "document" object is undefined.
|
|
19
19
|
|
|
@@ -26,5 +26,5 @@ or
|
|
|
26
26
|
|
|
27
27
|
bash: npm install skia-canvas
|
|
28
28
|
js: import "konva/skia-backend";
|
|
29
|
-
`,sc=()=>{if(typeof document>"u")throw new Error(_p)};class ne{constructor(t=[1,0,0,1,0,0]){this.dirty=!1,this.m=t&&t.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new ne(this.m)}copyInto(t){t.m[0]=this.m[0],t.m[1]=this.m[1],t.m[2]=this.m[2],t.m[3]=this.m[3],t.m[4]=this.m[4],t.m[5]=this.m[5]}point(t){const i=this.m;return{x:i[0]*t.x+i[2]*t.y+i[4],y:i[1]*t.x+i[3]*t.y+i[5]}}translate(t,i){return this.m[4]+=this.m[0]*t+this.m[2]*i,this.m[5]+=this.m[1]*t+this.m[3]*i,this}scale(t,i){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=i,this.m[3]*=i,this}rotate(t){const i=Math.cos(t),n=Math.sin(t),s=this.m[0]*i+this.m[2]*n,r=this.m[1]*i+this.m[3]*n,o=this.m[0]*-n+this.m[2]*i,a=this.m[1]*-n+this.m[3]*i;return this.m[0]=s,this.m[1]=r,this.m[2]=o,this.m[3]=a,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(t,i){const n=this.m[0]+this.m[2]*i,s=this.m[1]+this.m[3]*i,r=this.m[2]+this.m[0]*t,o=this.m[3]+this.m[1]*t;return this.m[0]=n,this.m[1]=s,this.m[2]=r,this.m[3]=o,this}multiply(t){const i=this.m[0]*t.m[0]+this.m[2]*t.m[1],n=this.m[1]*t.m[0]+this.m[3]*t.m[1],s=this.m[0]*t.m[2]+this.m[2]*t.m[3],r=this.m[1]*t.m[2]+this.m[3]*t.m[3],o=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],a=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=i,this.m[1]=n,this.m[2]=s,this.m[3]=r,this.m[4]=o,this.m[5]=a,this}invert(){const t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),i=this.m[3]*t,n=-this.m[1]*t,s=-this.m[2]*t,r=this.m[0]*t,o=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),a=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=i,this.m[1]=n,this.m[2]=s,this.m[3]=r,this.m[4]=o,this.m[5]=a,this}getMatrix(){return this.m}decompose(){const t=this.m[0],i=this.m[1],n=this.m[2],s=this.m[3],r=this.m[4],o=this.m[5],a=t*s-i*n,l={x:r,y:o,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(t!=0||i!=0){const c=Math.sqrt(t*t+i*i);l.rotation=i>0?Math.acos(t/c):-Math.acos(t/c),l.scaleX=c,l.scaleY=a/c,l.skewX=(t*n+i*s)/a,l.skewY=0}else if(n!=0||s!=0){const c=Math.sqrt(n*n+s*s);l.rotation=Math.PI/2-(s>0?Math.acos(-n/c):-Math.acos(n/c)),l.scaleX=a/c,l.scaleY=c,l.skewX=0,l.skewY=(t*n+i*s)/a}return l.rotation=E._getRotation(l.rotation),l}}const vp="[object Array]",bp="[object Number]",yp="[object String]",Ep="[object Boolean]",Sp=Math.PI/180,wp=180/Math.PI,Pn="#",xp="",Cp="0",Np="Konva warning: ",rc="Konva error: ",Tp="rgb(",ro={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},kp=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/;let Gs=[],An=null;const Op=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(e){setTimeout(e,60)},E={_isElement(e){return!!(e&&e.nodeType==1)},_isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},_isPlainObject(e){return!!e&&e.constructor===Object},_isArray(e){return Object.prototype.toString.call(e)===vp},_isNumber(e){return Object.prototype.toString.call(e)===bp&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===yp},_isBoolean(e){return Object.prototype.toString.call(e)===Ep},isObject(e){return e instanceof Object},isValidSelector(e){if(typeof e!="string")return!1;const t=e[0];return t==="#"||t==="."||t===t.toUpperCase()},_sign(e){return e===0||e>0?1:-1},requestAnimFrame(e){Gs.push(e),Gs.length===1&&Op(function(){const t=Gs;Gs=[],t.forEach(function(i){i()})})},createCanvasElement(){sc();const e=document.createElement("canvas");try{e.style=e.style||{}}catch{}return e},createImageElement(){return sc(),document.createElement("img")},_isInDocument(e){for(;e=e.parentNode;)if(e==document)return!0;return!1},_urlToImage(e,t){const i=E.createImageElement();i.onload=function(){t(i)},i.src=e},_rgbToHex(e,t,i){return((1<<24)+(e<<16)+(t<<8)+i).toString(16).slice(1)},_hexToRgb(e){e=e.replace(Pn,xp);const t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}},getRandomColor(){let e=(Math.random()*16777215<<0).toString(16);for(;e.length<6;)e=Cp+e;return Pn+e},isCanvasFarblingActive(){if(An!==null)return An;if(typeof document>"u")return An=!1,!1;const e=this.createCanvasElement();e.width=10,e.height=10;const t=e.getContext("2d",{willReadFrequently:!0});t.clearRect(0,0,10,10),t.fillStyle="#282828",t.fillRect(0,0,10,10);const i=t.getImageData(0,0,10,10).data;let n=!1;for(let s=0;s<100;s++)if(i[s*4]!==40||i[s*4+1]!==40||i[s*4+2]!==40||i[s*4+3]!==255){n=!0;break}return An=n,this.releaseCanvas(e),An},getHitColor(){const e=this.getRandomColor();return this.isCanvasFarblingActive()?this.getSnappedHexColor(e):e},getHitColorKey(e,t,i){return this.isCanvasFarblingActive()&&(e=Math.round(e/5)*5,t=Math.round(t/5)*5,i=Math.round(i/5)*5),Pn+this._rgbToHex(e,t,i)},getSnappedHexColor(e){const t=this._hexToRgb(e);return Pn+this._rgbToHex(Math.round(t.r/5)*5,Math.round(t.g/5)*5,Math.round(t.b/5)*5)},getRGB(e){let t;return e in ro?(t=ro[e],{r:t[0],g:t[1],b:t[2]}):e[0]===Pn?this._hexToRgb(e.substring(1)):e.substr(0,4)===Tp?(t=kp.exec(e.replace(/ /g,"")),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA(e){return e=e||"black",E._namedColorToRBA(e)||E._hex3ColorToRGBA(e)||E._hex4ColorToRGBA(e)||E._hex6ColorToRGBA(e)||E._hex8ColorToRGBA(e)||E._rgbColorToRGBA(e)||E._rgbaColorToRGBA(e)||E._hslColorToRGBA(e)},_namedColorToRBA(e){const t=ro[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(e){if(e.indexOf("rgb(")===0){e=e.match(/rgb\(([^)]+)\)/)[1];const t=e.split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(e){if(e.indexOf("rgba(")===0){e=e.match(/rgba\(([^)]+)\)/)[1];const t=e.split(/ *, */).map((i,n)=>i.slice(-1)==="%"?n===3?parseInt(i)/100:parseInt(i)/100*255:Number(i));return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex8ColorToRGBA(e){if(e[0]==="#"&&e.length===9)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:parseInt(e.slice(7,9),16)/255}},_hex6ColorToRGBA(e){if(e[0]==="#"&&e.length===7)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:1}},_hex4ColorToRGBA(e){if(e[0]==="#"&&e.length===5)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:parseInt(e[4]+e[4],16)/255}},_hex3ColorToRGBA(e){if(e[0]==="#"&&e.length===4)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:1}},_hslColorToRGBA(e){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(e)){const[t,...i]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e),n=Number(i[0])/360,s=Number(i[1])/100,r=Number(i[2])/100;let o,a,l;if(s===0)return l=r*255,{r:Math.round(l),g:Math.round(l),b:Math.round(l),a:1};r<.5?o=r*(1+s):o=r+s-r*s;const c=2*r-o,h=[0,0,0];for(let d=0;d<3;d++)a=n+1/3*-(d-1),a<0&&a++,a>1&&a--,6*a<1?l=c+(o-c)*6*a:2*a<1?l=o:3*a<2?l=c+(o-c)*(2/3-a)*6:l=c,h[d]=l*255;return{r:Math.round(h[0]),g:Math.round(h[1]),b:Math.round(h[2]),a:1}}},haveIntersection(e,t){return!(t.x>e.x+e.width||t.x+t.width<e.x||t.y>e.y+e.height||t.y+t.height<e.y)},cloneObject(e){const t={};for(const i in e)this._isPlainObject(e[i])?t[i]=this.cloneObject(e[i]):this._isArray(e[i])?t[i]=this.cloneArray(e[i]):t[i]=e[i];return t},cloneArray(e){return e.slice(0)},degToRad(e){return e*Sp},radToDeg(e){return e*wp},_degToRad(e){return E.warn("Util._degToRad is removed. Please use public Util.degToRad instead."),E.degToRad(e)},_radToDeg(e){return E.warn("Util._radToDeg is removed. Please use public Util.radToDeg instead."),E.radToDeg(e)},_getRotation(e){return X.angleDeg?E.radToDeg(e):e},_capitalize(e){return e.charAt(0).toUpperCase()+e.slice(1)},throw(e){throw new Error(rc+e)},error(e){console.error(rc+e)},warn(e){X.showWarnings&&console.warn(Np+e)},each(e,t){for(const i in e)t(i,e[i])},_inRange(e,t,i){return t<=e&&e<i},_getProjectionToSegment(e,t,i,n,s,r){let o,a,l;const c=(e-i)*(e-i)+(t-n)*(t-n);if(c==0)o=e,a=t,l=(s-i)*(s-i)+(r-n)*(r-n);else{const h=((s-e)*(i-e)+(r-t)*(n-t))/c;h<0?(o=e,a=t,l=(e-s)*(e-s)+(t-r)*(t-r)):h>1?(o=i,a=n,l=(i-s)*(i-s)+(n-r)*(n-r)):(o=e+h*(i-e),a=t+h*(n-t),l=(o-s)*(o-s)+(a-r)*(a-r))}return[o,a,l]},_getProjectionToLine(e,t,i){const n=E.cloneObject(e);let s=Number.MAX_VALUE;return t.forEach(function(r,o){if(!i&&o===t.length-1)return;const a=t[(o+1)%t.length],l=E._getProjectionToSegment(r.x,r.y,a.x,a.y,e.x,e.y),c=l[0],h=l[1],d=l[2];d<s&&(n.x=c,n.y=h,s=d)}),n},_prepareArrayForTween(e,t,i){const n=[],s=[];if(e.length>t.length){const o=t;t=e,e=o}for(let o=0;o<e.length;o+=2)n.push({x:e[o],y:e[o+1]});for(let o=0;o<t.length;o+=2)s.push({x:t[o],y:t[o+1]});const r=[];return s.forEach(function(o){const a=E._getProjectionToLine(o,n,i);r.push(a.x),r.push(a.y)}),r},_prepareToStringify(e){let t;e.visitedByCircularReferenceRemoval=!0;for(const i in e)if(e.hasOwnProperty(i)&&e[i]&&typeof e[i]=="object"){if(t=Object.getOwnPropertyDescriptor(e,i),e[i].visitedByCircularReferenceRemoval||E._isElement(e[i]))if(t.configurable)delete e[i];else return null;else if(E._prepareToStringify(e[i])===null)if(t.configurable)delete e[i];else return null}return delete e.visitedByCircularReferenceRemoval,e},_assign(e,t){for(const i in t)e[i]=t[i];return e},_getFirstPointerId(e){return e.touches?e.changedTouches[0].identifier:e.pointerId||999},releaseCanvas(...e){X.releaseCanvasOnDestroy&&e.forEach(t=>{t.width=0,t.height=0})},drawRoundedRectPath(e,t,i,n){let s=t<0?t:0,r=i<0?i:0;t=Math.abs(t),i=Math.abs(i);let o=0,a=0,l=0,c=0;typeof n=="number"?o=a=l=c=Math.min(n,t/2,i/2):(o=Math.min(n[0]||0,t/2,i/2),a=Math.min(n[1]||0,t/2,i/2),c=Math.min(n[2]||0,t/2,i/2),l=Math.min(n[3]||0,t/2,i/2)),e.moveTo(s+o,r),e.lineTo(s+t-a,r),e.arc(s+t-a,r+a,a,Math.PI*3/2,0,!1),e.lineTo(s+t,r+i-c),e.arc(s+t-c,r+i-c,c,0,Math.PI/2,!1),e.lineTo(s+l,r+i),e.arc(s+l,r+i-l,l,Math.PI/2,Math.PI,!1),e.lineTo(s,r+o),e.arc(s+o,r+o,o,Math.PI,Math.PI*3/2,!1)},drawRoundedPolygonPath(e,t,i,n,s){n=Math.abs(n);for(let r=0;r<i;r++){const o=t[(r-1+i)%i],a=t[r],l=t[(r+1)%i],c={x:a.x-o.x,y:a.y-o.y},h={x:l.x-a.x,y:l.y-a.y},d=Math.hypot(c.x,c.y),u=Math.hypot(h.x,h.y);let f;typeof s=="number"?f=s:f=r<s.length?s[r]:0,f=n*Math.cos(Math.PI/i)*Math.min(1,f/n*2);const _={x:c.x/d,y:c.y/d},b={x:h.x/u,y:h.y/u},S={x:a.x-_.x*f,y:a.y-_.y*f},y={x:a.x+b.x*f,y:a.y+b.y*f};r===0?e.moveTo(S.x,S.y):e.lineTo(S.x,S.y),e.arcTo(a.x,a.y,y.x,y.y,f)}}};function Pp(e){const t=[],i=e.length,n=E;for(let s=0;s<i;s++){let r=e[s];n._isNumber(r)?r=Math.round(r*1e3)/1e3:n._isString(r)||(r=r+""),t.push(r)}return t}const oc=",",Ap="(",Rp=")",Mp="([",Lp="])",Ip=";",Dp="()",Vp="=",ac=["arc","arcTo","beginPath","bezierCurveTo","clearRect","clip","closePath","createLinearGradient","createPattern","createRadialGradient","drawImage","ellipse","fill","fillText","getImageData","createImageData","lineTo","moveTo","putImageData","quadraticCurveTo","rect","roundRect","restore","rotate","save","scale","setLineDash","setTransform","stroke","strokeText","transform","translate"],Fp=["fillStyle","strokeStyle","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","letterSpacing","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","direction","font","textAlign","textBaseline","globalAlpha","globalCompositeOperation","imageSmoothingEnabled","filter"],Gp=100;let Bs=null;function lc(){if(Bs!==null)return Bs;try{const t=E.createCanvasElement().getContext("2d");return t?!!t&&"filter"in t:(Bs=!1,!1)}catch{return Bs=!1,!1}}class Hs{constructor(t){this.canvas=t,X.enableTrace&&(this.traceArr=[],this._enableTrace())}fillShape(t){t.fillEnabled()&&this._fill(t)}_fill(t){}strokeShape(t){t.hasStroke()&&this._stroke(t)}_stroke(t){}fillStrokeShape(t){t.attrs.fillAfterStrokeEnabled?(this.strokeShape(t),this.fillShape(t)):(this.fillShape(t),this.strokeShape(t))}getTrace(t,i){let n=this.traceArr,s=n.length,r="",o,a,l,c;for(o=0;o<s;o++)a=n[o],l=a.method,l?(c=a.args,r+=l,t?r+=Dp:E._isArray(c[0])?r+=Mp+c.join(oc)+Lp:(i&&(c=c.map(h=>typeof h=="number"?Math.floor(h):h)),r+=Ap+c.join(oc)+Rp)):(r+=a.property,t||(r+=Vp+a.val)),r+=Ip;return r}clearTrace(){this.traceArr=[]}_trace(t){let i=this.traceArr,n;i.push(t),n=i.length,n>=Gp&&i.shift()}reset(){const t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){const i=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,i.getWidth()/i.pixelRatio,i.getHeight()/i.pixelRatio)}_applyLineCap(t){const i=t.attrs.lineCap;i&&this.setAttr("lineCap",i)}_applyOpacity(t){const i=t.getAbsoluteOpacity();i!==1&&this.setAttr("globalAlpha",i)}_applyLineJoin(t){const i=t.attrs.lineJoin;i&&this.setAttr("lineJoin",i)}_applyMiterLimit(t){const i=t.attrs.miterLimit;i!=null&&this.setAttr("miterLimit",i)}setAttr(t,i){this._context[t]=i}arc(t,i,n,s,r,o){this._context.arc(t,i,n,s,r,o)}arcTo(t,i,n,s,r){this._context.arcTo(t,i,n,s,r)}beginPath(){this._context.beginPath()}bezierCurveTo(t,i,n,s,r,o){this._context.bezierCurveTo(t,i,n,s,r,o)}clearRect(t,i,n,s){this._context.clearRect(t,i,n,s)}clip(...t){this._context.clip.apply(this._context,t)}closePath(){this._context.closePath()}createImageData(t,i){const n=arguments;if(n.length===2)return this._context.createImageData(t,i);if(n.length===1)return this._context.createImageData(t)}createLinearGradient(t,i,n,s){return this._context.createLinearGradient(t,i,n,s)}createPattern(t,i){return this._context.createPattern(t,i)}createRadialGradient(t,i,n,s,r,o){return this._context.createRadialGradient(t,i,n,s,r,o)}drawImage(t,i,n,s,r,o,a,l,c){const h=arguments,d=this._context;h.length===3?d.drawImage(t,i,n):h.length===5?d.drawImage(t,i,n,s,r):h.length===9&&d.drawImage(t,i,n,s,r,o,a,l,c)}ellipse(t,i,n,s,r,o,a,l){this._context.ellipse(t,i,n,s,r,o,a,l)}isPointInPath(t,i,n,s){return n?this._context.isPointInPath(n,t,i,s):this._context.isPointInPath(t,i,s)}fill(...t){this._context.fill.apply(this._context,t)}fillRect(t,i,n,s){this._context.fillRect(t,i,n,s)}strokeRect(t,i,n,s){this._context.strokeRect(t,i,n,s)}fillText(t,i,n,s){s?this._context.fillText(t,i,n,s):this._context.fillText(t,i,n)}measureText(t){return this._context.measureText(t)}getImageData(t,i,n,s){return this._context.getImageData(t,i,n,s)}lineTo(t,i){this._context.lineTo(t,i)}moveTo(t,i){this._context.moveTo(t,i)}rect(t,i,n,s){this._context.rect(t,i,n,s)}roundRect(t,i,n,s,r){this._context.roundRect(t,i,n,s,r)}putImageData(t,i,n){this._context.putImageData(t,i,n)}quadraticCurveTo(t,i,n,s){this._context.quadraticCurveTo(t,i,n,s)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,i){this._context.scale(t,i)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,i,n,s,r,o){this._context.setTransform(t,i,n,s,r,o)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,i,n,s){this._context.strokeText(t,i,n,s)}transform(t,i,n,s,r,o){this._context.transform(t,i,n,s,r,o)}translate(t,i){this._context.translate(t,i)}_enableTrace(){let t=this,i=ac.length,n=this.setAttr,s,r;const o=function(a){let l=t[a],c;t[a]=function(){return r=Pp(Array.prototype.slice.call(arguments,0)),c=l.apply(t,arguments),t._trace({method:a,args:r}),c}};for(s=0;s<i;s++)o(ac[s]);t.setAttr=function(){n.apply(t,arguments);const a=arguments[0];let l=arguments[1];(a==="shadowOffsetX"||a==="shadowOffsetY"||a==="shadowBlur")&&(l=l/this.canvas.getPixelRatio()),t._trace({property:a,val:l})}}_applyGlobalCompositeOperation(t){const i=t.attrs.globalCompositeOperation;!i||i==="source-over"||this.setAttr("globalCompositeOperation",i)}}Fp.forEach(function(e){Object.defineProperty(Hs.prototype,e,{get(){return this._context[e]},set(t){this._context[e]=t}})});class Bp extends Hs{constructor(t,{willReadFrequently:i=!1}={}){super(t),this._context=t._canvas.getContext("2d",{willReadFrequently:i})}_fillColor(t){const i=t.fill();this.setAttr("fillStyle",i),t._fillFunc(this)}_fillPattern(t){this.setAttr("fillStyle",t._getFillPattern()),t._fillFunc(this)}_fillLinearGradient(t){const i=t._getLinearGradient();i&&(this.setAttr("fillStyle",i),t._fillFunc(this))}_fillRadialGradient(t){const i=t._getRadialGradient();i&&(this.setAttr("fillStyle",i),t._fillFunc(this))}_fill(t){const i=t.fill(),n=t.getFillPriority();if(i&&n==="color"){this._fillColor(t);return}const s=t.getFillPatternImage();if(s&&n==="pattern"){this._fillPattern(t);return}const r=t.getFillLinearGradientColorStops();if(r&&n==="linear-gradient"){this._fillLinearGradient(t);return}const o=t.getFillRadialGradientColorStops();if(o&&n==="radial-gradient"){this._fillRadialGradient(t);return}i?this._fillColor(t):s?this._fillPattern(t):r?this._fillLinearGradient(t):o&&this._fillRadialGradient(t)}_strokeLinearGradient(t){const i=t.getStrokeLinearGradientStartPoint(),n=t.getStrokeLinearGradientEndPoint(),s=t.getStrokeLinearGradientColorStops(),r=this.createLinearGradient(i.x,i.y,n.x,n.y);if(s){for(let o=0;o<s.length;o+=2)r.addColorStop(s[o],s[o+1]);this.setAttr("strokeStyle",r)}}_stroke(t){const i=t.dash(),n=t.getStrokeScaleEnabled();if(t.hasStroke()){if(!n){this.save();const r=this.getCanvas().getPixelRatio();this.setTransform(r,0,0,r,0,0)}this._applyLineCap(t),i&&t.dashEnabled()&&(this.setLineDash(i),this.setAttr("lineDashOffset",t.dashOffset())),this.setAttr("lineWidth",t.strokeWidth()),t.getShadowForStrokeEnabled()||this.setAttr("shadowColor","rgba(0,0,0,0)"),t.getStrokeLinearGradientColorStops()?this._strokeLinearGradient(t):this.setAttr("strokeStyle",t.stroke()),t._strokeFunc(this),n||this.restore()}}_applyShadow(t){var i,n,s;const r=(i=t.getShadowRGBA())!==null&&i!==void 0?i:"black",o=(n=t.getShadowBlur())!==null&&n!==void 0?n:5,a=(s=t.getShadowOffset())!==null&&s!==void 0?s:{x:0,y:0},l=t.getAbsoluteScale(),c=this.canvas.getPixelRatio(),h=l.x*c,d=l.y*c;this.setAttr("shadowColor",r),this.setAttr("shadowBlur",o*Math.min(Math.abs(h),Math.abs(d))),this.setAttr("shadowOffsetX",a.x*h),this.setAttr("shadowOffsetY",a.y*d)}}class Hp extends Hs{constructor(t){super(t),this._context=t._canvas.getContext("2d",{willReadFrequently:!0})}_fill(t){this.save(),this.setAttr("fillStyle",t.colorKey),t._fillFuncHit(this),this.restore()}strokeShape(t){t.hasHitStroke()&&this._stroke(t)}_stroke(t){if(t.hasHitStroke()){const i=t.getStrokeScaleEnabled();if(!i){this.save();const r=this.getCanvas().getPixelRatio();this.setTransform(r,0,0,r,0,0)}this._applyLineCap(t);const n=t.hitStrokeWidth(),s=n==="auto"?t.strokeWidth():n;this.setAttr("lineWidth",s),this.setAttr("strokeStyle",t.colorKey),t._strokeFuncHit(this),i||this.restore()}}}let $s;function $p(){if($s)return $s;const e=E.createCanvasElement(),t=e.getContext("2d");return $s=(function(){const i=X._global.devicePixelRatio||1,n=t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return i/n})(),E.releaseCanvas(e),$s}class oo{constructor(t){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;const n=(t||{}).pixelRatio||X.pixelRatio||$p();this.pixelRatio=n,this._canvas=E.createCanvasElement(),this._canvas.style.padding="0",this._canvas.style.margin="0",this._canvas.style.border="0",this._canvas.style.background="transparent",this._canvas.style.position="absolute",this._canvas.style.top="0",this._canvas.style.left="0"}getContext(){return this.context}getPixelRatio(){return this.pixelRatio}setPixelRatio(t){const i=this.pixelRatio;this.pixelRatio=t,this.setSize(this.getWidth()/i,this.getHeight()/i)}setWidth(t){this.width=this._canvas.width=t*this.pixelRatio,this._canvas.style.width=t+"px";const i=this.pixelRatio;this.getContext()._context.scale(i,i)}setHeight(t){this.height=this._canvas.height=t*this.pixelRatio,this._canvas.style.height=t+"px";const i=this.pixelRatio;this.getContext()._context.scale(i,i)}getWidth(){return this.width}getHeight(){return this.height}setSize(t,i){this.setWidth(t||0),this.setHeight(i||0)}toDataURL(t,i){try{return this._canvas.toDataURL(t,i)}catch{try{return this._canvas.toDataURL()}catch(s){return E.error("Unable to get data URL. "+s.message+" For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html."),""}}}}class ei extends oo{constructor(t={width:0,height:0,willReadFrequently:!1}){super(t),this.context=new Bp(this,{willReadFrequently:t.willReadFrequently}),this.setSize(t.width,t.height)}}class ao extends oo{constructor(t={width:0,height:0}){super(t),this.hitCanvas=!0,this.context=new Hp(this),this.setSize(t.width,t.height)}}const pt={get isDragging(){let e=!1;return pt._dragElements.forEach(t=>{t.dragStatus==="dragging"&&(e=!0)}),e},justDragged:!1,get node(){let e;return pt._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){const t=[];pt._dragElements.forEach((i,n)=>{const{node:s}=i,r=s.getStage();r.setPointersPositions(e),i.pointerId===void 0&&(i.pointerId=E._getFirstPointerId(e));const o=r._changedPointerPositions.find(a=>a.id===i.pointerId);if(o){if(i.dragStatus!=="dragging"){const a=s.dragDistance();if(Math.max(Math.abs(o.x-i.startPointerPos.x),Math.abs(o.y-i.startPointerPos.y))<a||(s.startDrag({evt:e}),!s.isDragging()))return}s._setDragPosition(e,i),t.push(s)}}),t.forEach(i=>{i.fire("dragmove",{type:"dragmove",target:i,evt:e},!0)})},_endDragBefore(e){const t=[];pt._dragElements.forEach(i=>{const{node:n}=i,s=n.getStage();if(e&&s.setPointersPositions(e),!s._changedPointerPositions.find(a=>a.id===i.pointerId))return;(i.dragStatus==="dragging"||i.dragStatus==="stopped")&&(pt.justDragged=!0,X._mouseListenClick=!1,X._touchListenClick=!1,X._pointerListenClick=!1,i.dragStatus="stopped");const o=i.node.getLayer()||i.node instanceof X.Stage&&i.node;o&&t.indexOf(o)===-1&&t.push(o)}),t.forEach(i=>{i.draw()})},_endDragAfter(e){pt._dragElements.forEach((t,i)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),t.dragStatus!=="dragging"&&pt._dragElements.delete(i)})}};X.isBrowser&&(window.addEventListener("mouseup",pt._endDragBefore,!0),window.addEventListener("touchend",pt._endDragBefore,!0),window.addEventListener("touchcancel",pt._endDragBefore,!0),window.addEventListener("mousemove",pt._drag),window.addEventListener("touchmove",pt._drag),window.addEventListener("mouseup",pt._endDragAfter,!1),window.addEventListener("touchend",pt._endDragAfter,!1),window.addEventListener("touchcancel",pt._endDragAfter,!1));function ii(e){return E._isString(e)?'"'+e+'"':Object.prototype.toString.call(e)==="[object Number]"||E._isBoolean(e)?e:Object.prototype.toString.call(e)}function cc(e){return e>255?255:e<0?0:Math.round(e)}function $(){if(X.isUnminified)return function(e,t){return E._isNumber(e)||E.warn(ii(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function Ws(e){if(X.isUnminified)return function(t,i){let n=E._isNumber(t),s=E._isArray(t)&&t.length==e;return!n&&!s&&E.warn(ii(t)+' is a not valid value for "'+i+'" attribute. The value should be a number or Array<number>('+e+")"),t}}function lo(){if(X.isUnminified)return function(e,t){return E._isNumber(e)||e==="auto"||E.warn(ii(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function Ci(){if(X.isUnminified)return function(e,t){return E._isString(e)||E.warn(ii(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function hc(){if(X.isUnminified)return function(e,t){const i=E._isString(e),n=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return i||n||E.warn(ii(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function Wp(){if(X.isUnminified)return function(e,t){const i=Int8Array?Object.getPrototypeOf(Int8Array):null;return i&&e instanceof i||(E._isArray(e)?e.forEach(function(n){E._isNumber(n)||E.warn('"'+t+'" attribute has non numeric element '+n+". Make sure that all elements are numbers.")}):E.warn(ii(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}function _e(){if(X.isUnminified)return function(e,t){return e===!0||e===!1||E.warn(ii(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}function Up(e){if(X.isUnminified)return function(t,i){return t==null||E.isObject(t)||E.warn(ii(t)+' is a not valid value for "'+i+'" attribute. The value should be an object with properties '+e),t}}const Rn="get",Mn="set",m={addGetterSetter(e,t,i,n,s){m.addGetter(e,t,i),m.addSetter(e,t,n,s),m.addOverloadedGetterSetter(e,t)},addGetter(e,t,i){const n=Rn+E._capitalize(t);e.prototype[n]=e.prototype[n]||function(){const s=this.attrs[t];return s===void 0?i:s}},addSetter(e,t,i,n){const s=Mn+E._capitalize(t);e.prototype[s]||m.overWriteSetter(e,t,i,n)},overWriteSetter(e,t,i,n){const s=Mn+E._capitalize(t);e.prototype[s]=function(r){return i&&r!==void 0&&r!==null&&(r=i.call(this,r,t)),this._setAttr(t,r),n&&n.call(this),this}},addComponentsGetterSetter(e,t,i,n,s){const r=i.length,o=E._capitalize,a=Rn+o(t),l=Mn+o(t);e.prototype[a]=function(){const h={};for(let d=0;d<r;d++){const u=i[d];h[u]=this.getAttr(t+o(u))}return h};const c=Up(i);e.prototype[l]=function(h){const d=this.attrs[t];n&&(h=n.call(this,h,t)),c&&c.call(this,h,t);for(const u in h)h.hasOwnProperty(u)&&this._setAttr(t+o(u),h[u]);return h||i.forEach(u=>{this._setAttr(t+o(u),void 0)}),this._fireChangeEvent(t,d,h),s&&s.call(this),this},m.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){const i=E._capitalize(t),n=Mn+i,s=Rn+i;e.prototype[t]=function(){return arguments.length?(this[n](arguments[0]),this):this[s]()}},addDeprecatedGetterSetter(e,t,i,n){E.error("Adding deprecated "+t);const s=Rn+E._capitalize(t),r=t+" property is deprecated and will be removed soon. Look at Konva change log for more information.";e.prototype[s]=function(){E.error(r);const o=this.attrs[t];return o===void 0?i:o},m.addSetter(e,t,n,function(){E.error(r)}),m.addOverloadedGetterSetter(e,t)},backCompat(e,t){E.each(t,function(i,n){const s=e.prototype[n],r=Rn+E._capitalize(i),o=Mn+E._capitalize(i);function a(){s.apply(this,arguments),E.error('"'+i+'" method is deprecated and will be removed soon. Use ""'+n+'" instead.')}e.prototype[i]=a,e.prototype[r]=a,e.prototype[o]=a})},afterSetFilter(){this._filterUpToDate=!1}};function jp(e){const t=/(\w+)\(([^)]+)\)/g;let i;for(;(i=t.exec(e))!==null;){const[,n,s]=i;switch(n){case"blur":{const r=parseFloat(s.replace("px",""));return function(o){this.blurRadius(r*.5);const a=X.Filters;a&&a.Blur&&a.Blur.call(this,o)}}case"brightness":{const r=s.includes("%")?parseFloat(s)/100:parseFloat(s);return function(o){this.brightness(r);const a=X.Filters;a&&a.Brightness&&a.Brightness.call(this,o)}}case"contrast":{const r=parseFloat(s);return function(o){const a=100*(Math.sqrt(r)-1);this.contrast(a);const l=X.Filters;l&&l.Contrast&&l.Contrast.call(this,o)}}case"grayscale":return function(r){const o=X.Filters;o&&o.Grayscale&&o.Grayscale.call(this,r)};case"sepia":return function(r){const o=X.Filters;o&&o.Sepia&&o.Sepia.call(this,r)};case"invert":return function(r){const o=X.Filters;o&&o.Invert&&o.Invert.call(this,r)};default:E.warn(`CSS filter "${n}" is not supported in fallback mode. Consider using function filters for better compatibility.`);break}}return()=>{}}const Us="absoluteOpacity",js="allEventListeners",He="absoluteTransform",dc="absoluteScale",Ni="canvas",Xp="Change",zp="children",Yp="konva",co="listening",qp="mouseenter",Kp="mouseleave",Jp="pointerenter",Qp="pointerleave",Zp="touchenter",tg="touchleave",uc="set",fc="Shape",Xs=" ",pc="stage",ni="transform",eg="Stage",ho="visible",ig=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(Xs);let ng=1;class G{constructor(t){this._id=ng++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===ni||t===He)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,i){let n=this._cache.get(t);return(n===void 0||(t===ni||t===He)&&n.dirty===!0)&&(n=i.call(this),this._cache.set(t,n)),n}_calculate(t,i,n){if(!this._attachedDepsListeners.get(t)){const s=i.map(r=>r+"Change.konva").join(Xs);this.on(s,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,n)}_getCanvasCache(){return this._cache.get(Ni)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===He&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(Ni)){const{scene:t,filter:i,hit:n,buffer:s}=this._cache.get(Ni);E.releaseCanvas(t,i,n,s),this._cache.delete(Ni)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){const i=t||{};let n={};(i.x===void 0||i.y===void 0||i.width===void 0||i.height===void 0)&&(n=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()||void 0}));let s=Math.ceil(i.width||n.width),r=Math.ceil(i.height||n.height),o=i.pixelRatio,a=i.x===void 0?Math.floor(n.x):i.x,l=i.y===void 0?Math.floor(n.y):i.y,c=i.offset||0,h=i.drawBorder||!1,d=i.hitCanvasPixelRatio||1;if(!s||!r){E.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}const u=Math.abs(Math.round(n.x)-a)>.5?1:0,f=Math.abs(Math.round(n.y)-l)>.5?1:0;s+=c*2+u,r+=c*2+f,a-=c,l-=c;const p=new ei({pixelRatio:o,width:s,height:r}),_=new ei({pixelRatio:o,width:0,height:0,willReadFrequently:!0}),b=new ao({pixelRatio:d,width:s,height:r}),S=p.getContext(),y=b.getContext(),C=new ei({width:p.width/p.pixelRatio+Math.abs(a),height:p.height/p.pixelRatio+Math.abs(l),pixelRatio:p.pixelRatio}),N=C.getContext();return b.isCache=!0,p.isCache=!0,this._cache.delete(Ni),this._filterUpToDate=!1,i.imageSmoothingEnabled===!1&&(p.getContext()._context.imageSmoothingEnabled=!1,_.getContext()._context.imageSmoothingEnabled=!1),S.save(),y.save(),N.save(),S.translate(-a,-l),y.translate(-a,-l),N.translate(-a,-l),C.x=a,C.y=l,this._isUnderCache=!0,this._clearSelfAndDescendantCache(Us),this._clearSelfAndDescendantCache(dc),this.drawScene(p,this,C),this.drawHit(b,this),this._isUnderCache=!1,S.restore(),y.restore(),h&&(S.save(),S.beginPath(),S.rect(0,0,s,r),S.closePath(),S.setAttr("strokeStyle","red"),S.setAttr("lineWidth",5),S.stroke(),S.restore()),this._cache.set(Ni,{scene:p,filter:_,hit:b,buffer:C,x:a,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(Ni)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,i){const n=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}];let s=1/0,r=1/0,o=-1/0,a=-1/0;const l=this.getAbsoluteTransform(i);return n.forEach(function(c){const h=l.point(c);s===void 0&&(s=o=h.x,r=a=h.y),s=Math.min(s,h.x),r=Math.min(r,h.y),o=Math.max(o,h.x),a=Math.max(a,h.y)}),{x:s,y:r,width:o-s,height:a-r}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const i=this._getCanvasCache();t.translate(i.x,i.y);const n=this._getCachedSceneCanvas(),s=n.pixelRatio;t.drawImage(n._canvas,0,0,n.width/s,n.height/s),t.restore()}_drawCachedHitCanvas(t){const i=this._getCanvasCache(),n=i.hit;t.save(),t.translate(i.x,i.y),t.drawImage(n._canvas,0,0,n.width/n.pixelRatio,n.height/n.pixelRatio),t.restore()}_getCachedSceneCanvas(){let t=this.filters(),i=this._getCanvasCache(),n=i.scene,s=i.filter,r=s.getContext(),o,a,l,c;if(!t||t.length===0)return n;if(this._filterUpToDate)return s;let h=!0;for(let u=0;u<t.length;u++)if(typeof t[u]=="string"&&lc(),typeof t[u]!="string"||!lc()){h=!1;break}const d=n.pixelRatio;if(s.setSize(n.width/n.pixelRatio,n.height/n.pixelRatio),h){const u=t.join(" ");return r.save(),r.setAttr("filter",u),r.drawImage(n._canvas,0,0,n.getWidth()/d,n.getHeight()/d),r.restore(),this._filterUpToDate=!0,s}try{for(o=t.length,r.clear(),r.drawImage(n._canvas,0,0,n.getWidth()/d,n.getHeight()/d),a=r.getImageData(0,0,s.getWidth(),s.getHeight()),l=0;l<o;l++)c=t[l],typeof c=="string"&&(c=jp(c)),c.call(this,a),r.putImageData(a,0,0)}catch(u){E.error("Unable to apply filter. "+u.message+" This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.")}return this._filterUpToDate=!0,s}on(t,i){if(this._cache&&this._cache.delete(js),arguments.length===3)return this._delegate.apply(this,arguments);const n=t.split(Xs);for(let s=0;s<n.length;s++){const o=n[s].split("."),a=o[0],l=o[1]||"";this.eventListeners[a]||(this.eventListeners[a]=[]),this.eventListeners[a].push({name:l,handler:i})}return this}off(t,i){let n=(t||"").split(Xs),s=n.length,r,o,a,l,c,h;if(this._cache&&this._cache.delete(js),!t)for(o in this.eventListeners)this._off(o);for(r=0;r<s;r++)if(a=n[r],l=a.split("."),c=l[0],h=l[1],c)this.eventListeners[c]&&this._off(c,h,i);else for(o in this.eventListeners)this._off(o,h,i);return this}dispatchEvent(t){const i={target:this,type:t.type,evt:t};return this.fire(t.type,i),this}addEventListener(t,i){return this.on(t,function(n){i.call(this,n.evt)}),this}removeEventListener(t){return this.off(t),this}_delegate(t,i,n){const s=this;this.on(t,function(r){const o=r.target.findAncestors(i,!0,s);for(let a=0;a<o.length;a++)r=E.cloneObject(r),r.currentTarget=o[a],n.call(o[a],r)})}remove(){return this.isDragging()&&this.stopDrag(),pt._dragElements.delete(this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(He),this._clearSelfAndDescendantCache(Us),this._clearSelfAndDescendantCache(dc),this._clearSelfAndDescendantCache(pc),this._clearSelfAndDescendantCache(ho),this._clearSelfAndDescendantCache(co)}_remove(){this._clearCaches();const t=this.getParent();t&&t.children&&(t.children.splice(this.index,1),t._setChildrenIndices(),this.parent=null)}destroy(){return this.remove(),this.clearCache(),this}getAttr(t){const i="get"+E._capitalize(t);return E._isFunction(this[i])?this[i]():this.attrs[t]}getAncestors(){let t=this.getParent(),i=[];for(;t;)i.push(t),t=t.getParent();return i}getAttrs(){return this.attrs||{}}setAttrs(t){return this._batchTransformChanges(()=>{let i,n;if(!t)return this;for(i in t)i!==zp&&(n=uc+E._capitalize(i),E._isFunction(this[n])?this[n](t[i]):this._setAttr(i,t[i]))}),this}isListening(){return this._getCache(co,this._isListening)}_isListening(t){if(!this.listening())return!1;const n=this.getParent();return n&&n!==t&&this!==t?n._isListening(t):!0}isVisible(){return this._getCache(ho,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const n=this.getParent();return n&&n!==t&&this!==t?n._isVisible(t):!0}shouldDrawHit(t,i=!1){if(t)return this._isVisible(t)&&this._isListening(t);const n=this.getLayer();let s=!1;pt._dragElements.forEach(o=>{o.dragStatus==="dragging"&&(o.node.nodeType==="Stage"||o.node.getLayer()===n)&&(s=!0)});const r=!i&&!X.hitOnDragEnabled&&(s||X.isTransforming());return this.isListening()&&this.isVisible()&&!r}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){let t=this.getDepth(),i=this,n=0,s,r,o,a;function l(h){for(s=[],r=h.length,o=0;o<r;o++)a=h[o],n++,a.nodeType!==fc&&(s=s.concat(a.getChildren().slice())),a._id===i._id&&(o=r);s.length>0&&s[0].getDepth()<=t&&l(s)}const c=this.getStage();return i.nodeType!==eg&&c&&l(c.getChildren()),n}getDepth(){let t=0,i=this.parent;for(;i;)t++,i=i.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(ni),this._clearSelfAndDescendantCache(He)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){const t=this.getStage();if(!t)return null;const i=t.getPointerPosition();if(!i)return null;const n=this.getAbsoluteTransform().copy();return n.invert(),n.point(i)}getAbsolutePosition(t){let i=!1,n=this.parent;for(;n;){if(n.isCached()){i=!0;break}n=n.parent}i&&!t&&(t=!0);const s=this.getAbsoluteTransform(t).getMatrix(),r=new ne,o=this.offset();return r.m=s.slice(),r.translate(o.x,o.y),r.getTranslation()}setAbsolutePosition(t){const{x:i,y:n,...s}=this._clearTransform();this.attrs.x=i,this.attrs.y=n,this._clearCache(ni);const r=this._getAbsoluteTransform().copy();return r.invert(),r.translate(t.x,t.y),t={x:this.attrs.x+r.getTranslation().x,y:this.attrs.y+r.getTranslation().y},this._setTransform(s),this.setPosition({x:t.x,y:t.y}),this._clearCache(ni),this._clearSelfAndDescendantCache(He),this}_setTransform(t){let i;for(i in t)this.attrs[i]=t[i]}_clearTransform(){const t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){let i=t.x,n=t.y,s=this.x(),r=this.y();return i!==void 0&&(s+=i),n!==void 0&&(r+=n),this.setPosition({x:s,y:r}),this}_eachAncestorReverse(t,i){let n=[],s=this.getParent(),r,o;if(!(i&&i._id===this._id)){for(n.unshift(this);s&&(!i||s._id!==i._id);)n.unshift(s),s=s.parent;for(r=n.length,o=0;o<r;o++)t(n[o])}}rotate(t){return this.rotation(this.rotation()+t),this}moveToTop(){if(!this.parent)return E.warn("Node has no parent. moveToTop function is ignored."),!1;const t=this.index,i=this.parent.getChildren().length;return t<i-1?(this.parent.children.splice(t,1),this.parent.children.push(this),this.parent._setChildrenIndices(),!0):!1}moveUp(){if(!this.parent)return E.warn("Node has no parent. moveUp function is ignored."),!1;const t=this.index,i=this.parent.getChildren().length;return t<i-1?(this.parent.children.splice(t,1),this.parent.children.splice(t+1,0,this),this.parent._setChildrenIndices(),!0):!1}moveDown(){if(!this.parent)return E.warn("Node has no parent. moveDown function is ignored."),!1;const t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return E.warn("Node has no parent. moveToBottom function is ignored."),!1;const t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return E.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&E.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");const i=this.index;return this.parent.children.splice(i,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(Us,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){let t=this.opacity();const i=this.getParent();return i&&!i._isUnderCache&&(t*=i.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){let t=this.getAttrs(),i,n,s,r,o;const a={attrs:{},className:this.getClassName()};for(i in t)n=t[i],o=E.isObject(n)&&!E._isPlainObject(n)&&!E._isArray(n),!o&&(s=typeof this[i]=="function"&&this[i],delete t[i],r=s?s.call(this):null,t[i]=n,r!==n&&(a.attrs[i]=n));return E._prepareToStringify(a)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,i,n){const s=[];i&&this._isMatch(t)&&s.push(this);let r=this.parent;for(;r;){if(r===n)return s;r._isMatch(t)&&s.push(r),r=r.parent}return s}isAncestorOf(t){return!1}findAncestor(t,i,n){return this.findAncestors(t,i,n)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);let i=t.replace(/ /g,"").split(","),n=i.length,s,r;for(s=0;s<n;s++)if(r=i[s],E.isValidSelector(r)||(E.warn('Selector "'+r+'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'),E.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'),E.warn("Konva is awesome, right?")),r.charAt(0)==="#"){if(this.id()===r.slice(1))return!0}else if(r.charAt(0)==="."){if(this.hasName(r.slice(1)))return!0}else if(this.className===r||this.nodeType===r)return!0;return!1}getLayer(){const t=this.getParent();return t?t.getLayer():null}getStage(){return this._getCache(pc,this._getStage)}_getStage(){const t=this.getParent();return t?t.getStage():null}fire(t,i={},n){return i.target=i.target||this,n?this._fireAndBubble(t,i):this._fire(t,i),this}getAbsoluteTransform(t){return t?this._getAbsoluteTransform(t):this._getCache(He,this._getAbsoluteTransform)}_getAbsoluteTransform(t){let i;if(t)return i=new ne,this._eachAncestorReverse(function(n){const s=n.transformsEnabled();s==="all"?i.multiply(n.getTransform()):s==="position"&&i.translate(n.x()-n.offsetX(),n.y()-n.offsetY())},t),i;{i=this._cache.get(He)||new ne,this.parent?this.parent.getAbsoluteTransform().copyInto(i):i.reset();const n=this.transformsEnabled();if(n==="all")i.multiply(this.getTransform());else if(n==="position"){const s=this.attrs.x||0,r=this.attrs.y||0,o=this.attrs.offsetX||0,a=this.attrs.offsetY||0;i.translate(s-o,r-a)}return i.dirty=!1,i}}getAbsoluteScale(t){let i=this;for(;i;)i._isUnderCache&&(t=i),i=i.getParent();const s=this.getAbsoluteTransform(t).decompose();return{x:s.scaleX,y:s.scaleY}}getAbsoluteRotation(){return this.getAbsoluteTransform().decompose().rotation}getTransform(){return this._getCache(ni,this._getTransform)}_getTransform(){var t,i;const n=this._cache.get(ni)||new ne;n.reset();const s=this.x(),r=this.y(),o=X.getAngle(this.rotation()),a=(t=this.attrs.scaleX)!==null&&t!==void 0?t:1,l=(i=this.attrs.scaleY)!==null&&i!==void 0?i:1,c=this.attrs.skewX||0,h=this.attrs.skewY||0,d=this.attrs.offsetX||0,u=this.attrs.offsetY||0;return(s!==0||r!==0)&&n.translate(s,r),o!==0&&n.rotate(o),(c!==0||h!==0)&&n.skew(c,h),(a!==1||l!==1)&&n.scale(a,l),(d!==0||u!==0)&&n.translate(-1*d,-1*u),n.dirty=!1,n}clone(t){let i=E.cloneObject(this.attrs),n,s,r,o,a;for(n in t)i[n]=t[n];const l=new this.constructor(i);for(n in this.eventListeners)for(s=this.eventListeners[n],r=s.length,o=0;o<r;o++)a=s[o],a.name.indexOf(Yp)<0&&(l.eventListeners[n]||(l.eventListeners[n]=[]),l.eventListeners[n].push(a));return l}_toKonvaCanvas(t){t=t||{};const i=this.getClientRect(),n=this.getStage(),s=t.x!==void 0?t.x:Math.floor(i.x),r=t.y!==void 0?t.y:Math.floor(i.y),o=t.pixelRatio||1,a=new ei({width:t.width||Math.ceil(i.width)||(n?n.width():0),height:t.height||Math.ceil(i.height)||(n?n.height():0),pixelRatio:o}),l=a.getContext(),c=new ei({width:a.width/a.pixelRatio+Math.abs(s),height:a.height/a.pixelRatio+Math.abs(r),pixelRatio:a.pixelRatio});return t.imageSmoothingEnabled===!1&&(l._context.imageSmoothingEnabled=!1),l.save(),(s||r)&&l.translate(-1*s,-1*r),this.drawScene(a,void 0,c),l.restore(),a}toCanvas(t){return this._toKonvaCanvas(t)._canvas}toDataURL(t){t=t||{};const i=t.mimeType||null,n=t.quality||null,s=this._toKonvaCanvas(t).toDataURL(i,n);return t.callback&&t.callback(s),s}toImage(t){return new Promise((i,n)=>{try{const s=t?.callback;s&&delete t.callback,E._urlToImage(this.toDataURL(t),function(r){i(r),s?.(r)})}catch(s){n(s)}})}toBlob(t){return new Promise((i,n)=>{try{const s=t?.callback;s&&delete t.callback,this.toCanvas(t).toBlob(r=>{i(r),s?.(r)},t?.mimeType,t?.quality)}catch(s){n(s)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():X.dragDistance}_off(t,i,n){let s=this.eventListeners[t],r,o,a;for(r=0;r<s.length;r++)if(o=s[r].name,a=s[r].handler,(o!=="konva"||i==="konva")&&(!i||o===i)&&(!n||n===a)){if(s.splice(r,1),s.length===0){delete this.eventListeners[t];break}r--}}_fireChangeEvent(t,i,n){this._fire(t+Xp,{oldVal:i,newVal:n})}addName(t){if(!this.hasName(t)){const i=this.name(),n=i?i+" "+t:t;this.name(n)}return this}hasName(t){if(!t)return!1;const i=this.name();return i?(i||"").split(/\s/g).indexOf(t)!==-1:!1}removeName(t){const i=(this.name()||"").split(/\s/g),n=i.indexOf(t);return n!==-1&&(i.splice(n,1),this.name(i.join(" "))),this}setAttr(t,i){const n=this[uc+E._capitalize(t)];return E._isFunction(n)?n.call(this,i):this._setAttr(t,i),this}_requestDraw(){if(X.autoDrawEnabled){const t=this.getLayer()||this.getStage();t?.batchDraw()}}_setAttr(t,i){const n=this.attrs[t];n===i&&!E.isObject(i)||(i==null?delete this.attrs[t]:this.attrs[t]=i,this._shouldFireChangeEvents&&this._fireChangeEvent(t,n,i),this._requestDraw())}_setComponentAttr(t,i,n){let s;n!==void 0&&(s=this.attrs[t],s||(this.attrs[t]=this.getAttr(t)),this.attrs[t][i]=n,this._fireChangeEvent(t,s,n))}_fireAndBubble(t,i,n){i&&this.nodeType===fc&&(i.target=this);const s=[qp,Kp,Jp,Qp,Zp,tg];if(!(s.indexOf(t)!==-1&&(n&&(this===n||this.isAncestorOf&&this.isAncestorOf(n))||this.nodeType==="Stage"&&!n))){this._fire(t,i);const o=s.indexOf(t)!==-1&&n&&n.isAncestorOf&&n.isAncestorOf(this)&&!n.isAncestorOf(this.parent);(i&&!i.cancelBubble||!i)&&this.parent&&this.parent.isListening()&&!o&&(n&&n.parent?this._fireAndBubble.call(this.parent,t,i,n):this._fireAndBubble.call(this.parent,t,i))}}_getProtoListeners(t){var i,n,s;const r=(i=this._cache.get(js))!==null&&i!==void 0?i:{};let o=r?.[t];if(o===void 0){o=[];let a=Object.getPrototypeOf(this);for(;a;){const l=(s=(n=a.eventListeners)===null||n===void 0?void 0:n[t])!==null&&s!==void 0?s:[];o.push(...l),a=Object.getPrototypeOf(a)}r[t]=o,this._cache.set(js,r)}return o}_fire(t,i){i=i||{},i.currentTarget=this,i.type=t;const n=this._getProtoListeners(t);if(n)for(let r=0;r<n.length;r++)n[r].handler.call(this,i);const s=this.eventListeners[t];if(s)for(let r=0;r<s.length;r++)s[r].handler.call(this,i)}draw(){return this.drawScene(),this.drawHit(),this}_createDragElement(t){const i=t?t.pointerId:void 0,n=this.getStage(),s=this.getAbsolutePosition();if(!n)return;const r=n._getPointerById(i)||n._changedPointerPositions[0]||s;pt._dragElements.set(this._id,{node:this,startPointerPos:r,offset:{x:r.x-s.x,y:r.y-s.y},dragStatus:"ready",pointerId:i})}startDrag(t,i=!0){pt._dragElements.has(this._id)||this._createDragElement(t);const n=pt._dragElements.get(this._id);n.dragStatus="dragging",this.fire("dragstart",{type:"dragstart",target:this,evt:t&&t.evt},i)}_setDragPosition(t,i){const n=this.getStage()._getPointerById(i.pointerId);if(!n)return;let s={x:n.x-i.offset.x,y:n.y-i.offset.y};const r=this.dragBoundFunc();if(r!==void 0){const o=r.call(this,s,t);o?s=o:E.warn("dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.")}(!this._lastPos||this._lastPos.x!==s.x||this._lastPos.y!==s.y)&&(this.setAbsolutePosition(s),this._requestDraw()),this._lastPos=s}stopDrag(t){const i=pt._dragElements.get(this._id);i&&(i.dragStatus="stopped"),pt._endDragBefore(t),pt._endDragAfter(t)}setDraggable(t){this._setAttr("draggable",t),this._dragChange()}isDragging(){const t=pt._dragElements.get(this._id);return t?t.dragStatus==="dragging":!1}_listenDrag(){this._dragCleanup(),this.on("mousedown.konva touchstart.konva",function(t){if(!(!(t.evt.button!==void 0)||X.dragButtons.indexOf(t.evt.button)>=0)||this.isDragging())return;let s=!1;pt._dragElements.forEach(r=>{this.isAncestorOf(r.node)&&(s=!0)}),s||this._createDragElement(t)})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{if(this._dragCleanup(),!this.getStage())return;const i=pt._dragElements.get(this._id),n=i&&i.dragStatus==="dragging",s=i&&i.dragStatus==="ready";n?this.stopDrag():s&&pt._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const i=this.getStage();if(!i)return!1;const n={x:-t.x,y:-t.y,width:i.width()+2*t.x,height:i.height()+2*t.y};return E.haveIntersection(n,this.getClientRect())}static create(t,i){return E._isString(t)&&(t=JSON.parse(t)),this._createNode(t,i)}static _createNode(t,i){let n=G.prototype.getClassName.call(t),s=t.children,r,o,a;i&&(t.attrs.container=i),X[n]||(E.warn('Can not find a node with class name "'+n+'". Fallback to "Shape".'),n="Shape");const l=X[n];if(r=new l(t.attrs),s)for(o=s.length,a=0;a<o;a++)r.add(G._createNode(s[a]));return r}}G.prototype.nodeType="Node",G.prototype._attrsAffectingSize=[],G.prototype.eventListeners={},G.prototype.on.call(G.prototype,ig,function(){if(this._batchingTransformChange){this._needClearTransformCache=!0;return}this._clearCache(ni),this._clearSelfAndDescendantCache(He)}),G.prototype.on.call(G.prototype,"visibleChange.konva",function(){this._clearSelfAndDescendantCache(ho)}),G.prototype.on.call(G.prototype,"listeningChange.konva",function(){this._clearSelfAndDescendantCache(co)}),G.prototype.on.call(G.prototype,"opacityChange.konva",function(){this._clearSelfAndDescendantCache(Us)});const vt=m.addGetterSetter;vt(G,"zIndex"),vt(G,"absolutePosition"),vt(G,"position"),vt(G,"x",0,$()),vt(G,"y",0,$()),vt(G,"globalCompositeOperation","source-over",Ci()),vt(G,"opacity",1,$()),vt(G,"name","",Ci()),vt(G,"id","",Ci()),vt(G,"rotation",0,$()),m.addComponentsGetterSetter(G,"scale",["x","y"]),vt(G,"scaleX",1,$()),vt(G,"scaleY",1,$()),m.addComponentsGetterSetter(G,"skew",["x","y"]),vt(G,"skewX",0,$()),vt(G,"skewY",0,$()),m.addComponentsGetterSetter(G,"offset",["x","y"]),vt(G,"offsetX",0,$()),vt(G,"offsetY",0,$()),vt(G,"dragDistance",void 0,$()),vt(G,"width",0,$()),vt(G,"height",0,$()),vt(G,"listening",!0,_e()),vt(G,"preventDefault",!0,_e()),vt(G,"filters",void 0,function(e){return this._filterUpToDate=!1,e}),vt(G,"visible",!0,_e()),vt(G,"transformsEnabled","all",Ci()),vt(G,"size"),vt(G,"dragBoundFunc"),vt(G,"draggable",!1,_e()),m.backCompat(G,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"});class se extends G{constructor(){super(...arguments),this.children=[]}getChildren(t){const i=this.children||[];return t?i.filter(t):i}hasChildren(){return this.getChildren().length>0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(t.length===0)return this;if(t.length>1){for(let n=0;n<t.length;n++)this.add(t[n]);return this}const i=t[0];return i.getParent()?(i.moveTo(this),this):(this._validateAdd(i),i.index=this.getChildren().length,i.parent=this,i._clearCaches(),this.getChildren().push(i),this._fire("add",{child:i}),this._requestDraw(),this)}destroy(){return this.hasChildren()&&this.destroyChildren(),super.destroy(),this}find(t){return this._generalFind(t,!1)}findOne(t){const i=this._generalFind(t,!0);return i.length>0?i[0]:void 0}_generalFind(t,i){const n=[];return this._descendants(s=>{const r=s._isMatch(t);return r&&n.push(s),!!(r&&i)}),n}_descendants(t){let i=!1;const n=this.getChildren();for(const s of n){if(i=t(s),i)return!0;if(s.hasChildren()&&(i=s._descendants(t),i))return!0}return!1}toObject(){const t=G.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(i=>{t.children.push(i.toObject())}),t}isAncestorOf(t){let i=t.getParent();for(;i;){if(i._id===this._id)return!0;i=i.getParent()}return!1}clone(t){const i=G.prototype.clone.call(this,t);return this.getChildren().forEach(function(n){i.add(n.clone())}),i}getAllIntersections(t){const i=[];return this.find("Shape").forEach(n=>{n.isVisible()&&n.intersects(t)&&i.push(n)}),i}_clearSelfAndDescendantCache(t){var i;super._clearSelfAndDescendantCache(t),!this.isCached()&&((i=this.children)===null||i===void 0||i.forEach(function(n){n._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(i,n){i.index=n}),this._requestDraw()}drawScene(t,i,n){const s=this.getLayer(),r=t||s&&s.getCanvas(),o=r&&r.getContext(),a=this._getCanvasCache(),l=a&&a.scene,c=r&&r.isCache;if(!this.isVisible()&&!c)return this;if(l){o.save();const h=this.getAbsoluteTransform(i).getMatrix();o.transform(h[0],h[1],h[2],h[3],h[4],h[5]),this._drawCachedSceneCanvas(o),o.restore()}else this._drawChildren("drawScene",r,i,n);return this}drawHit(t,i){if(!this.shouldDrawHit(i))return this;const n=this.getLayer(),s=t||n&&n.hitCanvas,r=s&&s.getContext(),o=this._getCanvasCache();if(o&&o.hit){r.save();const l=this.getAbsoluteTransform(i).getMatrix();r.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedHitCanvas(r),r.restore()}else this._drawChildren("drawHit",s,i);return this}_drawChildren(t,i,n,s){var r;const o=i&&i.getContext(),a=this.clipWidth(),l=this.clipHeight(),c=this.clipFunc(),h=typeof a=="number"&&typeof l=="number"||c,d=n===this;if(h){o.save();const f=this.getAbsoluteTransform(n);let p=f.getMatrix();o.transform(p[0],p[1],p[2],p[3],p[4],p[5]),o.beginPath();let _;if(c)_=c.call(this,o,this);else{const b=this.clipX(),S=this.clipY();o.rect(b||0,S||0,a,l)}o.clip.apply(o,_),p=f.copy().invert().getMatrix(),o.transform(p[0],p[1],p[2],p[3],p[4],p[5])}const u=!d&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";u&&(o.save(),o._applyGlobalCompositeOperation(this)),(r=this.children)===null||r===void 0||r.forEach(function(f){f[t](i,n,s)}),u&&o.restore(),h&&o.restore()}getClientRect(t={}){var i;const n=t.skipTransform,s=t.relativeTo;let r,o,a,l,c={x:1/0,y:1/0,width:0,height:0};const h=this;(i=this.children)===null||i===void 0||i.forEach(function(f){if(!f.visible())return;const p=f.getClientRect({relativeTo:h,skipShadow:t.skipShadow,skipStroke:t.skipStroke});p.width===0&&p.height===0||(r===void 0?(r=p.x,o=p.y,a=p.x+p.width,l=p.y+p.height):(r=Math.min(r,p.x),o=Math.min(o,p.y),a=Math.max(a,p.x+p.width),l=Math.max(l,p.y+p.height)))});const d=this.find("Shape");let u=!1;for(let f=0;f<d.length;f++)if(d[f]._isVisible(this)){u=!0;break}return u&&r!==void 0?c={x:r,y:o,width:a-r,height:l-o}:c={x:0,y:0,width:0,height:0},n?c:this._transformedRect(c,s)}}m.addComponentsGetterSetter(se,"clip",["x","y","width","height"]),m.addGetterSetter(se,"clipX",void 0,$()),m.addGetterSetter(se,"clipY",void 0,$()),m.addGetterSetter(se,"clipWidth",void 0,$()),m.addGetterSetter(se,"clipHeight",void 0,$()),m.addGetterSetter(se,"clipFunc");const Ln=new Map,gc=X._global.PointerEvent!==void 0;function uo(e){return Ln.get(e)}function fo(e){return{evt:e,pointerId:e.pointerId}}function mc(e,t){return Ln.get(e)===t}function _c(e,t){In(e),t.getStage()&&(Ln.set(e,t),gc&&t._fire("gotpointercapture",fo(new PointerEvent("gotpointercapture"))))}function In(e,t){const i=Ln.get(e);if(!i)return;const n=i.getStage();n&&n.content,Ln.delete(e),gc&&i._fire("lostpointercapture",fo(new PointerEvent("lostpointercapture")))}const sg="Stage",rg="string",vc="px",og="mouseout",bc="mouseleave",yc="mouseover",Ec="mouseenter",Sc="mousemove",wc="mousedown",xc="mouseup",Dn="pointermove",Vn="pointerdown",Xi="pointerup",Fn="pointercancel",ag="lostpointercapture",zs="pointerout",Gn="pointerleave",Ys="pointerover",qs="pointerenter",po="contextmenu",Cc="touchstart",Nc="touchend",Tc="touchmove",kc="touchcancel",go="wheel",lg=5,cg=[[Ec,"_pointerenter"],[wc,"_pointerdown"],[Sc,"_pointermove"],[xc,"_pointerup"],[bc,"_pointerleave"],[Cc,"_pointerdown"],[Tc,"_pointermove"],[Nc,"_pointerup"],[kc,"_pointercancel"],[yc,"_pointerover"],[go,"_wheel"],[po,"_contextmenu"],[Vn,"_pointerdown"],[Dn,"_pointermove"],[Xi,"_pointerup"],[Fn,"_pointercancel"],[Gn,"_pointerleave"],[ag,"_lostpointercapture"]],mo={mouse:{[zs]:og,[Gn]:bc,[Ys]:yc,[qs]:Ec,[Dn]:Sc,[Vn]:wc,[Xi]:xc,[Fn]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},touch:{[zs]:"touchout",[Gn]:"touchleave",[Ys]:"touchover",[qs]:"touchenter",[Dn]:Tc,[Vn]:Cc,[Xi]:Nc,[Fn]:kc,pointerclick:"tap",pointerdblclick:"dbltap"},pointer:{[zs]:zs,[Gn]:Gn,[Ys]:Ys,[qs]:qs,[Dn]:Dn,[Vn]:Vn,[Xi]:Xi,[Fn]:Fn,pointerclick:"pointerclick",pointerdblclick:"pointerdblclick"}},Bn=e=>e.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",zi=e=>{const t=Bn(e);if(t==="pointer")return X.pointerEventsEnabled&&mo.pointer;if(t==="touch")return mo.touch;if(t==="mouse")return mo.mouse};function Oc(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&E.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const hg="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);",Hn=[];class Ks extends se{constructor(t){super(Oc(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),Hn.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{Oc(this.attrs)}),this._checkVisibility()}_validateAdd(t){const i=t.getType()==="Layer",n=t.getType()==="FastLayer";i||n||E.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const t=this.visible()?"":"none";this.content.style.display=t}setContainer(t){if(typeof t===rg){let i;if(t.charAt(0)==="."){const n=t.slice(1);t=document.getElementsByClassName(n)[0]}else t.charAt(0)!=="#"?i=t:i=t.slice(1),t=document.getElementById(i);if(!t)throw"Can not find container in document with id "+i}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){const t=this.children,i=t.length;for(let n=0;n<i;n++)t[n].clear();return this}clone(t){return t||(t={}),t.container=typeof document<"u"&&document.createElement("div"),se.prototype.clone.call(this,t)}destroy(){super.destroy();const t=this.content;t&&E._isInDocument(t)&&this.container().removeChild(t);const i=Hn.indexOf(this);return i>-1&&Hn.splice(i,1),E.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(E.warn(hg),null)}_getPointerById(t){return this._pointerPositions.find(i=>i.id===t)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(t){t={...t},t.x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();const i=new ei({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),n=i.getContext()._context,s=this.children;return(t.x||t.y)&&n.translate(-1*t.x,-1*t.y),s.forEach(function(r){if(!r.isVisible())return;const o=r._toKonvaCanvas(t);n.drawImage(o._canvas,t.x,t.y,o.getWidth()/o.getPixelRatio(),o.getHeight()/o.getPixelRatio())}),i}getIntersection(t){if(!t)return null;const i=this.children,n=i.length,s=n-1;for(let r=s;r>=0;r--){const o=i[r].getIntersection(t);if(o)return o}return null}_resizeDOM(){const t=this.width(),i=this.height();this.content&&(this.content.style.width=t+vc,this.content.style.height=i+vc),this.bufferCanvas.setSize(t,i),this.bufferHitCanvas.setSize(t,i),this.children.forEach(n=>{n.setSize({width:t,height:i}),n.draw()})}add(t,...i){if(arguments.length>1){for(let s=0;s<arguments.length;s++)this.add(arguments[s]);return this}super.add(t);const n=this.children.length;return n>lg&&E.warn("The stage has "+n+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),t.setSize({width:this.width(),height:this.height()}),t.draw(),X.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return mc(t,this)}setPointerCapture(t){_c(t,this)}releaseCapture(t){In(t)}getLayers(){return this.children}_bindContentEvents(){X.isBrowser&&cg.forEach(([t,i])=>{this.content.addEventListener(t,n=>{this[i](n)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const i=zi(t.type);i&&this._fire(i.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const i=zi(t.type);i&&this._fire(i.pointerover,{evt:t,target:this,currentTarget:this})}_getTargetShape(t){let i=this[t+"targetShape"];return i&&!i.getStage()&&(i=null),i}_pointerleave(t){const i=zi(t.type),n=Bn(t.type);if(!i)return;this.setPointersPositions(t);const s=this._getTargetShape(n),r=!(X.isDragging()||X.isTransforming())||X.hitOnDragEnabled;s&&r?(s._fireAndBubble(i.pointerout,{evt:t}),s._fireAndBubble(i.pointerleave,{evt:t}),this._fire(i.pointerleave,{evt:t,target:this,currentTarget:this}),this[n+"targetShape"]=null):r&&(this._fire(i.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(i.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=null,this._pointerPositions=[]}_pointerdown(t){const i=zi(t.type),n=Bn(t.type);if(!i)return;this.setPointersPositions(t);let s=!1;this._changedPointerPositions.forEach(r=>{const o=this.getIntersection(r);if(pt.justDragged=!1,X["_"+n+"ListenClick"]=!0,!o||!o.isListening()){this[n+"ClickStartShape"]=void 0;return}X.capturePointerEventsEnabled&&o.setPointerCapture(r.id),this[n+"ClickStartShape"]=o,o._fireAndBubble(i.pointerdown,{evt:t,pointerId:r.id}),s=!0;const a=t.type.indexOf("touch")>=0;o.preventDefault()&&t.cancelable&&a&&t.preventDefault()}),s||this._fire(i.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}_pointermove(t){const i=zi(t.type),n=Bn(t.type);if(!i)return;const s=t.type.indexOf("touch")>=0||t.pointerType==="touch";if(X.isDragging()&&pt.node.preventDefault()&&t.cancelable&&s&&t.preventDefault(),this.setPointersPositions(t),!(!(X.isDragging()||X.isTransforming())||X.hitOnDragEnabled))return;const o={};let a=!1;const l=this._getTargetShape(n);this._changedPointerPositions.forEach(c=>{const h=uo(c.id)||this.getIntersection(c),d=c.id,u={evt:t,pointerId:d},f=l!==h;if(f&&l&&(l._fireAndBubble(i.pointerout,{...u},h),l._fireAndBubble(i.pointerleave,{...u},h)),h){if(o[h._id])return;o[h._id]=!0}h&&h.isListening()?(a=!0,f&&(h._fireAndBubble(i.pointerover,{...u},l),h._fireAndBubble(i.pointerenter,{...u},l),this[n+"targetShape"]=h),h._fireAndBubble(i.pointermove,{...u})):l&&(this._fire(i.pointerover,{evt:t,target:this,currentTarget:this,pointerId:d}),this[n+"targetShape"]=null)}),a||this._fire(i.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const i=zi(t.type),n=Bn(t.type);if(!i)return;this.setPointersPositions(t);const s=this[n+"ClickStartShape"],r=this[n+"ClickEndShape"],o={};let a=!1;this._changedPointerPositions.forEach(l=>{const c=uo(l.id)||this.getIntersection(l);if(c){if(c.releaseCapture(l.id),o[c._id])return;o[c._id]=!0}const h=l.id,d={evt:t,pointerId:h};let u=!1;X["_"+n+"InDblClickWindow"]?(u=!0,clearTimeout(this[n+"DblTimeout"])):pt.justDragged||(X["_"+n+"InDblClickWindow"]=!0,clearTimeout(this[n+"DblTimeout"])),this[n+"DblTimeout"]=setTimeout(function(){X["_"+n+"InDblClickWindow"]=!1},X.dblClickWindow),c&&c.isListening()?(a=!0,this[n+"ClickEndShape"]=c,c._fireAndBubble(i.pointerup,{...d}),X["_"+n+"ListenClick"]&&s&&s===c&&(c._fireAndBubble(i.pointerclick,{...d}),u&&r&&r===c&&c._fireAndBubble(i.pointerdblclick,{...d}))):(this[n+"ClickEndShape"]=null,a||(this._fire(i.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),a=!0),X["_"+n+"ListenClick"]&&this._fire(i.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:h}),u&&this._fire(i.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:h}))}),a||this._fire(i.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),X["_"+n+"ListenClick"]=!1,t.cancelable&&n!=="touch"&&n!=="pointer"&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);const i=this.getIntersection(this.getPointerPosition());i&&i.isListening()?i._fireAndBubble(po,{evt:t}):this._fire(po,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);const i=this.getIntersection(this.getPointerPosition());i&&i.isListening()?i._fireAndBubble(go,{evt:t}):this._fire(go,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const i=uo(t.pointerId)||this.getIntersection(this.getPointerPosition());i&&i._fireAndBubble(Xi,fo(t)),In(t.pointerId)}_lostpointercapture(t){In(t.pointerId)}setPointersPositions(t){const i=this._getContentPosition();let n=null,s=null;t=t||window.event,t.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(t.touches,r=>{this._pointerPositions.push({id:r.identifier,x:(r.clientX-i.left)/i.scaleX,y:(r.clientY-i.top)/i.scaleY})}),Array.prototype.forEach.call(t.changedTouches||t.touches,r=>{this._changedPointerPositions.push({id:r.identifier,x:(r.clientX-i.left)/i.scaleX,y:(r.clientY-i.top)/i.scaleY})})):(n=(t.clientX-i.left)/i.scaleX,s=(t.clientY-i.top)/i.scaleY,this.pointerPos={x:n,y:s},this._pointerPositions=[{x:n,y:s,id:E._getFirstPointerId(t)}],this._changedPointerPositions=[{x:n,y:s,id:E._getFirstPointerId(t)}])}_setPointerPosition(t){E.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(t)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};const t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new ei({width:this.width(),height:this.height()}),this.bufferHitCanvas=new ao({pixelRatio:1,width:this.width(),height:this.height()}),!X.isBrowser)return;const t=this.container();if(!t)throw"Stage has no container. A container is required.";t.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),this._resizeDOM()}cache(){return E.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(t){t.batchDraw()}),this}}Ks.prototype.nodeType=sg,kt(Ks),m.addGetterSetter(Ks,"container"),X.isBrowser&&document.addEventListener("visibilitychange",()=>{Hn.forEach(e=>{e.batchDraw()})});const Pc="hasShadow",Ac="shadowRGBA",Rc="patternImage",Mc="linearGradient",Lc="radialGradient";let Js;function _o(){return Js||(Js=E.createCanvasElement().getContext("2d"),Js)}const $n={};function dg(e){const t=this.attrs.fillRule;t?e.fill(t):e.fill()}function ug(e){e.stroke()}function fg(e){const t=this.attrs.fillRule;t?e.fill(t):e.fill()}function pg(e){e.stroke()}function gg(){this._clearCache(Pc)}function mg(){this._clearCache(Ac)}function _g(){this._clearCache(Rc)}function vg(){this._clearCache(Mc)}function bg(){this._clearCache(Lc)}class V extends G{constructor(t){super(t);let i,n=0;for(;i=E.getHitColor(),!(i&&!(i in $n));)if(n++,n>=1e4){E.warn("Failed to find a unique color key for a shape. Konva may work incorrectly. Most likely your browser is using canvas farbling. Consider disabling it."),i=E.getRandomColor();break}this.colorKey=i,$n[i]=this}getContext(){return E.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return E.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(Pc,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(Rc,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){const i=_o().createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(i&&i.setTransform){const n=new ne;n.translate(this.fillPatternX(),this.fillPatternY()),n.rotate(X.getAngle(this.fillPatternRotation())),n.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),n.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const s=n.getMatrix(),r=typeof DOMMatrix>"u"?{a:s[0],b:s[1],c:s[2],d:s[3],e:s[4],f:s[5]}:new DOMMatrix(s);i.setTransform(r)}return i}}_getLinearGradient(){return this._getCache(Mc,this.__getLinearGradient)}__getLinearGradient(){const t=this.fillLinearGradientColorStops();if(t){const i=_o(),n=this.fillLinearGradientStartPoint(),s=this.fillLinearGradientEndPoint(),r=i.createLinearGradient(n.x,n.y,s.x,s.y);for(let o=0;o<t.length;o+=2)r.addColorStop(t[o],t[o+1]);return r}}_getRadialGradient(){return this._getCache(Lc,this.__getRadialGradient)}__getRadialGradient(){const t=this.fillRadialGradientColorStops();if(t){const i=_o(),n=this.fillRadialGradientStartPoint(),s=this.fillRadialGradientEndPoint(),r=i.createRadialGradient(n.x,n.y,this.fillRadialGradientStartRadius(),s.x,s.y,this.fillRadialGradientEndRadius());for(let o=0;o<t.length;o+=2)r.addColorStop(t[o],t[o+1]);return r}}getShadowRGBA(){return this._getCache(Ac,this._getShadowRGBA)}_getShadowRGBA(){if(!this.hasShadow())return;const t=E.colorToRGBA(this.shadowColor());if(t)return"rgba("+t.r+","+t.g+","+t.b+","+t.a*(this.shadowOpacity()||1)+")"}hasFill(){return this._calculate("hasFill",["fillEnabled","fill","fillPatternImage","fillLinearGradientColorStops","fillRadialGradientColorStops"],()=>this.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const t=this.hitStrokeWidth();return t==="auto"?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){const i=this.getStage();if(!i)return!1;const n=i.bufferHitCanvas;return n.getContext().clear(),this.drawHit(n,void 0,!0),n.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data[3]>0}destroy(){return G.prototype.destroy.call(this),delete $n[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var i;if(!((i=this.attrs.perfectDrawEnabled)!==null&&i!==void 0?i:!0))return!1;const s=t||this.hasFill(),r=this.hasStroke(),o=this.getAbsoluteOpacity()!==1;if(s&&r&&o)return!0;const a=this.hasShadow(),l=this.shadowForStrokeEnabled();return!!(s&&r&&a&&l)}setStrokeHitEnabled(t){E.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){const t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}getClientRect(t={}){let i=!1,n=this.getParent();for(;n;){if(n.isCached()){i=!0;break}n=n.getParent()}const s=t.skipTransform,r=t.relativeTo||i&&this.getStage()||void 0,o=this.getSelfRect(),l=!t.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,c=o.width+l,h=o.height+l,d=!t.skipShadow&&this.hasShadow(),u=d?this.shadowOffsetX():0,f=d?this.shadowOffsetY():0,p=c+Math.abs(u),_=h+Math.abs(f),b=d&&this.shadowBlur()||0,S=p+b*2,y=_+b*2,C={width:S,height:y,x:-(l/2+b)+Math.min(u,0)+o.x,y:-(l/2+b)+Math.min(f,0)+o.y};return s?C:this._transformedRect(C,r)}drawScene(t,i,n){const s=this.getLayer(),r=t||s.getCanvas(),o=r.getContext(),a=this._getCanvasCache(),l=this.getSceneFunc(),c=this.hasShadow();let h;const d=i===this;if(!this.isVisible()&&!d)return this;if(a){o.save();const u=this.getAbsoluteTransform(i).getMatrix();return o.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedSceneCanvas(o),o.restore(),this}if(!l)return this;if(o.save(),this._useBufferCanvas()){h=this.getStage();const u=n||h.bufferCanvas,f=u.getContext();f.clear(),f.save(),f._applyLineJoin(this),f._applyMiterLimit(this);const p=this.getAbsoluteTransform(i).getMatrix();f.transform(p[0],p[1],p[2],p[3],p[4],p[5]),l.call(this,f,this),f.restore();const _=u.pixelRatio;c&&o._applyShadow(this),d||(o._applyOpacity(this),o._applyGlobalCompositeOperation(this)),o.drawImage(u._canvas,u.x||0,u.y||0,u.width/_,u.height/_)}else{if(o._applyLineJoin(this),o._applyMiterLimit(this),!d){const u=this.getAbsoluteTransform(i).getMatrix();o.transform(u[0],u[1],u[2],u[3],u[4],u[5]),o._applyOpacity(this),o._applyGlobalCompositeOperation(this)}c&&o._applyShadow(this),l.call(this,o,this)}return o.restore(),this}drawHit(t,i,n=!1){if(!this.shouldDrawHit(i,n))return this;const s=this.getLayer(),r=t||s.hitCanvas,o=r&&r.getContext(),a=this.hitFunc()||this.sceneFunc(),l=this._getCanvasCache(),c=l&&l.hit;if(this.colorKey||E.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),c){o.save();const d=this.getAbsoluteTransform(i).getMatrix();return o.transform(d[0],d[1],d[2],d[3],d[4],d[5]),this._drawCachedHitCanvas(o),o.restore(),this}if(!a)return this;if(o.save(),o._applyLineJoin(this),o._applyMiterLimit(this),!(this===i)){const d=this.getAbsoluteTransform(i).getMatrix();o.transform(d[0],d[1],d[2],d[3],d[4],d[5])}return a.call(this,o,this),o.restore(),this}drawHitFromCache(t=0){const i=this._getCanvasCache(),n=this._getCachedSceneCanvas(),s=i.hit,r=s.getContext(),o=s.getWidth(),a=s.getHeight();r.clear(),r.drawImage(n._canvas,0,0,o,a);try{const l=r.getImageData(0,0,o,a),c=l.data,h=c.length,d=E._hexToRgb(this.colorKey);for(let u=0;u<h;u+=4)c[u+3]>t?(c[u]=d.r,c[u+1]=d.g,c[u+2]=d.b,c[u+3]=255):c[u+3]=0;r.putImageData(l,0,0)}catch(l){E.error("Unable to draw hit graph from cached scene canvas. "+l.message)}return this}hasPointerCapture(t){return mc(t,this)}setPointerCapture(t){_c(t,this)}releaseCapture(t){In(t)}}V.prototype._fillFunc=dg,V.prototype._strokeFunc=ug,V.prototype._fillFuncHit=fg,V.prototype._strokeFuncHit=pg,V.prototype._centroid=!1,V.prototype.nodeType="Shape",kt(V),V.prototype.eventListeners={},V.prototype.on.call(V.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",gg),V.prototype.on.call(V.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",mg),V.prototype.on.call(V.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",_g),V.prototype.on.call(V.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",vg),V.prototype.on.call(V.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",bg),m.addGetterSetter(V,"stroke",void 0,hc()),m.addGetterSetter(V,"strokeWidth",2,$()),m.addGetterSetter(V,"fillAfterStrokeEnabled",!1),m.addGetterSetter(V,"hitStrokeWidth","auto",lo()),m.addGetterSetter(V,"strokeHitEnabled",!0,_e()),m.addGetterSetter(V,"perfectDrawEnabled",!0,_e()),m.addGetterSetter(V,"shadowForStrokeEnabled",!0,_e()),m.addGetterSetter(V,"lineJoin"),m.addGetterSetter(V,"lineCap"),m.addGetterSetter(V,"miterLimit"),m.addGetterSetter(V,"sceneFunc"),m.addGetterSetter(V,"hitFunc"),m.addGetterSetter(V,"dash"),m.addGetterSetter(V,"dashOffset",0,$()),m.addGetterSetter(V,"shadowColor",void 0,Ci()),m.addGetterSetter(V,"shadowBlur",0,$()),m.addGetterSetter(V,"shadowOpacity",1,$()),m.addComponentsGetterSetter(V,"shadowOffset",["x","y"]),m.addGetterSetter(V,"shadowOffsetX",0,$()),m.addGetterSetter(V,"shadowOffsetY",0,$()),m.addGetterSetter(V,"fillPatternImage"),m.addGetterSetter(V,"fill",void 0,hc()),m.addGetterSetter(V,"fillPatternX",0,$()),m.addGetterSetter(V,"fillPatternY",0,$()),m.addGetterSetter(V,"fillLinearGradientColorStops"),m.addGetterSetter(V,"strokeLinearGradientColorStops"),m.addGetterSetter(V,"fillRadialGradientStartRadius",0),m.addGetterSetter(V,"fillRadialGradientEndRadius",0),m.addGetterSetter(V,"fillRadialGradientColorStops"),m.addGetterSetter(V,"fillPatternRepeat","repeat"),m.addGetterSetter(V,"fillEnabled",!0),m.addGetterSetter(V,"strokeEnabled",!0),m.addGetterSetter(V,"shadowEnabled",!0),m.addGetterSetter(V,"dashEnabled",!0),m.addGetterSetter(V,"strokeScaleEnabled",!0),m.addGetterSetter(V,"fillPriority","color"),m.addComponentsGetterSetter(V,"fillPatternOffset",["x","y"]),m.addGetterSetter(V,"fillPatternOffsetX",0,$()),m.addGetterSetter(V,"fillPatternOffsetY",0,$()),m.addComponentsGetterSetter(V,"fillPatternScale",["x","y"]),m.addGetterSetter(V,"fillPatternScaleX",1,$()),m.addGetterSetter(V,"fillPatternScaleY",1,$()),m.addComponentsGetterSetter(V,"fillLinearGradientStartPoint",["x","y"]),m.addComponentsGetterSetter(V,"strokeLinearGradientStartPoint",["x","y"]),m.addGetterSetter(V,"fillLinearGradientStartPointX",0),m.addGetterSetter(V,"strokeLinearGradientStartPointX",0),m.addGetterSetter(V,"fillLinearGradientStartPointY",0),m.addGetterSetter(V,"strokeLinearGradientStartPointY",0),m.addComponentsGetterSetter(V,"fillLinearGradientEndPoint",["x","y"]),m.addComponentsGetterSetter(V,"strokeLinearGradientEndPoint",["x","y"]),m.addGetterSetter(V,"fillLinearGradientEndPointX",0),m.addGetterSetter(V,"strokeLinearGradientEndPointX",0),m.addGetterSetter(V,"fillLinearGradientEndPointY",0),m.addGetterSetter(V,"strokeLinearGradientEndPointY",0),m.addComponentsGetterSetter(V,"fillRadialGradientStartPoint",["x","y"]),m.addGetterSetter(V,"fillRadialGradientStartPointX",0),m.addGetterSetter(V,"fillRadialGradientStartPointY",0),m.addComponentsGetterSetter(V,"fillRadialGradientEndPoint",["x","y"]),m.addGetterSetter(V,"fillRadialGradientEndPointX",0),m.addGetterSetter(V,"fillRadialGradientEndPointY",0),m.addGetterSetter(V,"fillPatternRotation",0),m.addGetterSetter(V,"fillRule",void 0,Ci()),m.backCompat(V,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});const yg="beforeDraw",Eg="draw",Ic=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],Sg=Ic.length;class Ti extends se{constructor(t){super(t),this.canvas=new ei,this.hitCanvas=new ao({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);const i=this.getStage();return i&&i.content&&(i.content.removeChild(this.getNativeCanvasElement()),t<i.children.length-1?i.content.insertBefore(this.getNativeCanvasElement(),i.children[t+1].getCanvas()._canvas):i.content.appendChild(this.getNativeCanvasElement())),this}moveToTop(){G.prototype.moveToTop.call(this);const t=this.getStage();return t&&t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.appendChild(this.getNativeCanvasElement())),!0}moveUp(){if(!G.prototype.moveUp.call(this))return!1;const i=this.getStage();return!i||!i.content?!1:(i.content.removeChild(this.getNativeCanvasElement()),this.index<i.children.length-1?i.content.insertBefore(this.getNativeCanvasElement(),i.children[this.index+1].getCanvas()._canvas):i.content.appendChild(this.getNativeCanvasElement()),!0)}moveDown(){if(G.prototype.moveDown.call(this)){const t=this.getStage();if(t){const i=t.children;t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.insertBefore(this.getNativeCanvasElement(),i[this.index+1].getCanvas()._canvas))}return!0}return!1}moveToBottom(){if(G.prototype.moveToBottom.call(this)){const t=this.getStage();if(t){const i=t.children;t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.insertBefore(this.getNativeCanvasElement(),i[1].getCanvas()._canvas))}return!0}return!1}getLayer(){return this}remove(){const t=this.getNativeCanvasElement();return G.prototype.remove.call(this),t&&t.parentNode&&E._isInDocument(t)&&t.parentNode.removeChild(t),this}getStage(){return this.parent}setSize({width:t,height:i}){return this.canvas.setSize(t,i),this.hitCanvas.setSize(t,i),this._setSmoothEnabled(),this}_validateAdd(t){const i=t.getType();i!=="Group"&&i!=="Shape"&&E.throw("You may only add groups and shapes to a layer.")}_toKonvaCanvas(t){return t={...t},t.width=t.width||this.getWidth(),t.height=t.height||this.getHeight(),t.x=t.x!==void 0?t.x:this.x(),t.y=t.y!==void 0?t.y:this.y(),G.prototype._toKonvaCanvas.call(this,t)}_checkVisibility(){this.visible()?this.canvas._canvas.style.display="block":this.canvas._canvas.style.display="none"}_setSmoothEnabled(){this.getContext()._context.imageSmoothingEnabled=this.imageSmoothingEnabled()}getWidth(){if(this.parent)return this.parent.width()}setWidth(){E.warn('Can not change width of layer. Use "stage.width(value)" function instead.')}getHeight(){if(this.parent)return this.parent.height()}setHeight(){E.warn('Can not change height of layer. Use "stage.height(value)" function instead.')}batchDraw(){return this._waitingForDraw||(this._waitingForDraw=!0,E.requestAnimFrame(()=>{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;let i=1,n=!1;for(;;){for(let s=0;s<Sg;s++){const r=Ic[s],o=this._getIntersection({x:t.x+r.x*i,y:t.y+r.y*i}),a=o.shape;if(a)return a;if(n=!!o.antialiased,!o.antialiased)break}if(n)i+=1;else return null}}_getIntersection(t){const i=this.hitCanvas.pixelRatio,n=this.hitCanvas.context.getImageData(Math.round(t.x*i),Math.round(t.y*i),1,1).data,s=n[3];if(s===255){const r=E.getHitColorKey(n[0],n[1],n[2]),o=$n[r];return o?{shape:o}:{antialiased:!0}}else if(s>0)return{antialiased:!0};return{}}drawScene(t,i,n){const s=this.getLayer(),r=t||s&&s.getCanvas();return this._fire(yg,{node:this}),this.clearBeforeDraw()&&r.getContext().clear(),se.prototype.drawScene.call(this,r,i,n),this._fire(Eg,{node:this}),this}drawHit(t,i){const n=this.getLayer(),s=t||n&&n.hitCanvas;return n&&n.clearBeforeDraw()&&n.getHitCanvas().getContext().clear(),se.prototype.drawHit.call(this,s,i),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){E.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return E.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!this.parent||!this.parent.content)return;const t=this.parent;!!this.hitCanvas._canvas.parentNode?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}destroy(){return E.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}}Ti.prototype.nodeType="Layer",kt(Ti),m.addGetterSetter(Ti,"imageSmoothingEnabled",!0),m.addGetterSetter(Ti,"clearBeforeDraw",!0),m.addGetterSetter(Ti,"hitGraphEnabled",!0,_e());class vo extends Ti{constructor(t){super(t),this.listening(!1),E.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}vo.prototype.nodeType="FastLayer",kt(vo);class Yi extends se{_validateAdd(t){const i=t.getType();i!=="Group"&&i!=="Shape"&&E.throw("You may only add groups and shapes to groups.")}}Yi.prototype.nodeType="Group",kt(Yi);const bo=(function(){return xi.performance&&xi.performance.now?function(){return xi.performance.now()}:function(){return new Date().getTime()}})();class ae{constructor(t,i){this.id=ae.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:bo(),frameRate:0},this.func=t,this.setLayers(i)}setLayers(t){let i=[];return t&&(i=Array.isArray(t)?t:[t]),this.layers=i,this}getLayers(){return this.layers}addLayer(t){const i=this.layers,n=i.length;for(let s=0;s<n;s++)if(i[s]._id===t._id)return!1;return this.layers.push(t),!0}isRunning(){const i=ae.animations,n=i.length;for(let s=0;s<n;s++)if(i[s].id===this.id)return!0;return!1}start(){return this.stop(),this.frame.timeDiff=0,this.frame.lastTime=bo(),ae._addAnimation(this),this}stop(){return ae._removeAnimation(this),this}_updateFrameObject(t){this.frame.timeDiff=t-this.frame.lastTime,this.frame.lastTime=t,this.frame.time+=this.frame.timeDiff,this.frame.frameRate=1e3/this.frame.timeDiff}static _addAnimation(t){this.animations.push(t),this._handleAnimation()}static _removeAnimation(t){const i=t.id,n=this.animations,s=n.length;for(let r=0;r<s;r++)if(n[r].id===i){this.animations.splice(r,1);break}}static _runFrames(){const t={},i=this.animations;for(let n=0;n<i.length;n++){const s=i[n],r=s.layers,o=s.func;s._updateFrameObject(bo());const a=r.length;let l;if(o?l=o.call(s,s.frame)!==!1:l=!0,!!l)for(let c=0;c<a;c++){const h=r[c];h._id!==void 0&&(t[h._id]=h)}}for(const n in t)t.hasOwnProperty(n)&&t[n].batchDraw()}static _animationLoop(){const t=ae;t.animations.length?(t._runFrames(),E.requestAnimFrame(t._animationLoop)):t.animRunning=!1}static _handleAnimation(){this.animRunning||(this.animRunning=!0,E.requestAnimFrame(this._animationLoop))}}ae.animations=[],ae.animIdCounter=0,ae.animRunning=!1;const wg={node:1,duration:1,easing:1,onFinish:1,yoyo:1},xg=1,Dc=2,Vc=3,Fc=["fill","stroke","shadowColor"];let Cg=0;class Ng{constructor(t,i,n,s,r,o,a){this.prop=t,this.propFunc=i,this.begin=s,this._pos=s,this.duration=o,this._change=0,this.prevPos=0,this.yoyo=a,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=n,this._change=r-this.begin,this.pause()}fire(t){const i=this[t];i&&i()}setTime(t){t>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())}getTime(){return this._time}setPosition(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}getPosition(t){return t===void 0&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}play(){this.state=Dc,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=Vc,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){const t=this.getTimer()-this._startTime;this.state===Dc?this.setTime(t):this.state===Vc&&this.setTime(this.duration-t)}pause(){this.state=xg,this.fire("onPause")}getTimer(){return new Date().getTime()}}class Et{constructor(t){const i=this,n=t.node,s=n._id,r=t.easing||Wn.Linear,o=!!t.yoyo;let a,l;typeof t.duration>"u"?a=.3:t.duration===0?a=.001:a=t.duration,this.node=n,this._id=Cg++;const c=n.getLayer()||(n instanceof X.Stage?n.getLayers():null);c||E.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new ae(function(){i.tween.onEnterFrame()},c),this.tween=new Ng(l,function(h){i._tweenFunc(h)},r,0,1,a*1e3,o),this._addListeners(),Et.attrs[s]||(Et.attrs[s]={}),Et.attrs[s][this._id]||(Et.attrs[s][this._id]={}),Et.tweens[s]||(Et.tweens[s]={});for(l in t)wg[l]===void 0&&this._addAttr(l,t[l]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,i){const n=this.node,s=n._id;let r,o,a,l,c;const h=Et.tweens[s][t];h&&delete Et.attrs[s][h][t];let d=n.getAttr(t);if(E._isArray(i))if(r=[],o=Math.max(i.length,d.length),t==="points"&&i.length!==d.length&&(i.length>d.length?(l=d,d=E._prepareArrayForTween(d,i,n.closed())):(a=i,i=E._prepareArrayForTween(i,d,n.closed()))),t.indexOf("fill")===0)for(let u=0;u<o;u++)if(u%2===0)r.push(i[u]-d[u]);else{const f=E.colorToRGBA(d[u]);c=E.colorToRGBA(i[u]),d[u]=f,r.push({r:c.r-f.r,g:c.g-f.g,b:c.b-f.b,a:c.a-f.a})}else for(let u=0;u<o;u++)r.push(i[u]-d[u]);else Fc.indexOf(t)!==-1?(d=E.colorToRGBA(d),c=E.colorToRGBA(i),r={r:c.r-d.r,g:c.g-d.g,b:c.b-d.b,a:c.a-d.a}):r=i-d;Et.attrs[s][this._id][t]={start:d,diff:r,end:i,trueEnd:a,trueStart:l},Et.tweens[s][t]=this._id}_tweenFunc(t){const i=this.node,n=Et.attrs[i._id][this._id];let s,r,o,a,l,c,h,d;for(s in n){if(r=n[s],o=r.start,a=r.diff,d=r.end,E._isArray(o))if(l=[],h=Math.max(o.length,d.length),s.indexOf("fill")===0)for(c=0;c<h;c++)c%2===0?l.push((o[c]||0)+a[c]*t):l.push("rgba("+Math.round(o[c].r+a[c].r*t)+","+Math.round(o[c].g+a[c].g*t)+","+Math.round(o[c].b+a[c].b*t)+","+(o[c].a+a[c].a*t)+")");else for(c=0;c<h;c++)l.push((o[c]||0)+a[c]*t);else Fc.indexOf(s)!==-1?l="rgba("+Math.round(o.r+a.r*t)+","+Math.round(o.g+a.g*t)+","+Math.round(o.b+a.b*t)+","+(o.a+a.a*t)+")":l=o+a*t;i.setAttr(s,l)}}_addListeners(){this.tween.onPlay=()=>{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{const t=this.node,i=Et.attrs[t._id][this._id];i.points&&i.points.trueEnd&&t.setAttr("points",i.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{const t=this.node,i=Et.attrs[t._id][this._id];i.points&&i.points.trueStart&&t.points(i.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(t){return this.tween.seek(t*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){const t=this.node._id,i=this._id,n=Et.tweens[t];this.pause(),this.anim&&this.anim.stop();for(const s in n)delete Et.tweens[t][s];delete Et.attrs[t][i],Et.tweens[t]&&(Object.keys(Et.tweens[t]).length===0&&delete Et.tweens[t],Object.keys(Et.attrs[t]).length===0&&delete Et.attrs[t])}}Et.attrs={},Et.tweens={},G.prototype.to=function(e){const t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()},new Et(e).play()};const Wn={BackEaseIn(e,t,i,n){return i*(e/=n)*e*((1.70158+1)*e-1.70158)+t},BackEaseOut(e,t,i,n){return i*((e=e/n-1)*e*((1.70158+1)*e+1.70158)+1)+t},BackEaseInOut(e,t,i,n){let s=1.70158;return(e/=n/2)<1?i/2*(e*e*(((s*=1.525)+1)*e-s))+t:i/2*((e-=2)*e*(((s*=1.525)+1)*e+s)+2)+t},ElasticEaseIn(e,t,i,n,s,r){let o=0;return e===0?t:(e/=n)===1?t+i:(r||(r=n*.3),!s||s<Math.abs(i)?(s=i,o=r/4):o=r/(2*Math.PI)*Math.asin(i/s),-(s*Math.pow(2,10*(e-=1))*Math.sin((e*n-o)*(2*Math.PI)/r))+t)},ElasticEaseOut(e,t,i,n,s,r){let o=0;return e===0?t:(e/=n)===1?t+i:(r||(r=n*.3),!s||s<Math.abs(i)?(s=i,o=r/4):o=r/(2*Math.PI)*Math.asin(i/s),s*Math.pow(2,-10*e)*Math.sin((e*n-o)*(2*Math.PI)/r)+i+t)},ElasticEaseInOut(e,t,i,n,s,r){let o=0;return e===0?t:(e/=n/2)===2?t+i:(r||(r=n*(.3*1.5)),!s||s<Math.abs(i)?(s=i,o=r/4):o=r/(2*Math.PI)*Math.asin(i/s),e<1?-.5*(s*Math.pow(2,10*(e-=1))*Math.sin((e*n-o)*(2*Math.PI)/r))+t:s*Math.pow(2,-10*(e-=1))*Math.sin((e*n-o)*(2*Math.PI)/r)*.5+i+t)},BounceEaseOut(e,t,i,n){return(e/=n)<1/2.75?i*(7.5625*e*e)+t:e<2/2.75?i*(7.5625*(e-=1.5/2.75)*e+.75)+t:e<2.5/2.75?i*(7.5625*(e-=2.25/2.75)*e+.9375)+t:i*(7.5625*(e-=2.625/2.75)*e+.984375)+t},BounceEaseIn(e,t,i,n){return i-Wn.BounceEaseOut(n-e,0,i,n)+t},BounceEaseInOut(e,t,i,n){return e<n/2?Wn.BounceEaseIn(e*2,0,i,n)*.5+t:Wn.BounceEaseOut(e*2-n,0,i,n)*.5+i*.5+t},EaseIn(e,t,i,n){return i*(e/=n)*e+t},EaseOut(e,t,i,n){return-i*(e/=n)*(e-2)+t},EaseInOut(e,t,i,n){return(e/=n/2)<1?i/2*e*e+t:-i/2*(--e*(e-2)-1)+t},StrongEaseIn(e,t,i,n){return i*(e/=n)*e*e*e*e+t},StrongEaseOut(e,t,i,n){return i*((e=e/n-1)*e*e*e*e+1)+t},StrongEaseInOut(e,t,i,n){return(e/=n/2)<1?i/2*e*e*e*e*e+t:i/2*((e-=2)*e*e*e*e+2)+t},Linear(e,t,i,n){return i*e/n+t}},Gc=E._assign(X,{Util:E,Transform:ne,Node:G,Container:se,Stage:Ks,stages:Hn,Layer:Ti,FastLayer:vo,Group:Yi,DD:pt,Shape:V,shapes:$n,Animation:ae,Tween:Et,Easings:Wn,Context:Hs,Canvas:oo});class $e extends V{_sceneFunc(t){const i=X.getAngle(this.angle()),n=this.clockwise();t.beginPath(),t.arc(0,0,this.outerRadius(),0,i,n),t.arc(0,0,this.innerRadius(),i,0,!n),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}getSelfRect(){const t=this.innerRadius(),i=this.outerRadius(),n=this.clockwise(),s=X.getAngle(n?360-this.angle():this.angle()),r=Math.cos(Math.min(s,Math.PI)),o=1,a=Math.sin(Math.min(Math.max(Math.PI,s),3*Math.PI/2)),l=Math.sin(Math.min(s,Math.PI/2)),c=r*(r>0?t:i),h=o*i,d=a*(a>0?t:i),u=l*(l>0?i:t);return{x:c,y:n?-1*u:d,width:h-c,height:u-d}}}$e.prototype._centroid=!0,$e.prototype.className="Arc",$e.prototype._attrsAffectingSize=["innerRadius","outerRadius","angle","clockwise"],kt($e),m.addGetterSetter($e,"innerRadius",0,$()),m.addGetterSetter($e,"outerRadius",0,$()),m.addGetterSetter($e,"angle",0,$()),m.addGetterSetter($e,"clockwise",!1,_e());function yo(e,t,i,n,s,r,o){const a=Math.sqrt(Math.pow(i-e,2)+Math.pow(n-t,2)),l=Math.sqrt(Math.pow(s-i,2)+Math.pow(r-n,2)),c=o*a/(a+l),h=o*l/(a+l),d=i-c*(s-e),u=n-c*(r-t),f=i+h*(s-e),p=n+h*(r-t);return[d,u,f,p]}function Bc(e,t){const i=e.length,n=[];for(let s=2;s<i-2;s+=2){const r=yo(e[s-2],e[s-1],e[s],e[s+1],e[s+2],e[s+3],t);isNaN(r[0])||(n.push(r[0]),n.push(r[1]),n.push(e[s]),n.push(e[s+1]),n.push(r[2]),n.push(r[3]))}return n}class We extends V{constructor(t){super(t),this.on("pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva",function(){this._clearCache("tensionPoints")})}_sceneFunc(t){const i=this.points(),n=i.length,s=this.tension(),r=this.closed(),o=this.bezier();if(!n)return;let a=0;if(t.beginPath(),t.moveTo(i[0],i[1]),s!==0&&n>4){const l=this.getTensionPoints(),c=l.length;for(a=r?0:4,r||t.quadraticCurveTo(l[0],l[1],l[2],l[3]);a<c-2;)t.bezierCurveTo(l[a++],l[a++],l[a++],l[a++],l[a++],l[a++]);r||t.quadraticCurveTo(l[c-2],l[c-1],i[n-2],i[n-1])}else if(o)for(a=2;a<n;)t.bezierCurveTo(i[a++],i[a++],i[a++],i[a++],i[a++],i[a++]);else for(a=2;a<n;a+=2)t.lineTo(i[a],i[a+1]);r?(t.closePath(),t.fillStrokeShape(this)):t.strokeShape(this)}getTensionPoints(){return this._getCache("tensionPoints",this._getTensionPoints)}_getTensionPoints(){return this.closed()?this._getTensionPointsClosed():Bc(this.points(),this.tension())}_getTensionPointsClosed(){const t=this.points(),i=t.length,n=this.tension(),s=yo(t[i-2],t[i-1],t[0],t[1],t[2],t[3],n),r=yo(t[i-4],t[i-3],t[i-2],t[i-1],t[0],t[1],n),o=Bc(t,n);return[s[2],s[3]].concat(o).concat([r[0],r[1],t[i-2],t[i-1],r[2],r[3],s[0],s[1],t[0],t[1]])}getWidth(){return this.getSelfRect().width}getHeight(){return this.getSelfRect().height}getSelfRect(){let t=this.points();if(t.length<4)return{x:t[0]||0,y:t[1]||0,width:0,height:0};this.tension()!==0?t=[t[0],t[1],...this._getTensionPoints(),t[t.length-2],t[t.length-1]]:t=this.points();let i=t[0],n=t[0],s=t[1],r=t[1],o,a;for(let l=0;l<t.length/2;l++)o=t[l*2],a=t[l*2+1],i=Math.min(i,o),n=Math.max(n,o),s=Math.min(s,a),r=Math.max(r,a);return{x:i,y:s,width:n-i,height:r-s}}}We.prototype.className="Line",We.prototype._attrsAffectingSize=["points","bezier","tension"],kt(We),m.addGetterSetter(We,"closed",!1),m.addGetterSetter(We,"bezier",!1),m.addGetterSetter(We,"tension",0,$()),m.addGetterSetter(We,"points",[],Wp());const Tg=[[],[],[-.5773502691896257,.5773502691896257],[0,-.7745966692414834,.7745966692414834],[-.33998104358485626,.33998104358485626,-.8611363115940526,.8611363115940526],[0,-.5384693101056831,.5384693101056831,-.906179845938664,.906179845938664],[.6612093864662645,-.6612093864662645,-.2386191860831969,.2386191860831969,-.932469514203152,.932469514203152],[0,.4058451513773972,-.4058451513773972,-.7415311855993945,.7415311855993945,-.9491079123427585,.9491079123427585],[-.1834346424956498,.1834346424956498,-.525532409916329,.525532409916329,-.7966664774136267,.7966664774136267,-.9602898564975363,.9602898564975363],[0,-.8360311073266358,.8360311073266358,-.9681602395076261,.9681602395076261,-.3242534234038089,.3242534234038089,-.6133714327005904,.6133714327005904],[-.14887433898163122,.14887433898163122,-.4333953941292472,.4333953941292472,-.6794095682990244,.6794095682990244,-.8650633666889845,.8650633666889845,-.9739065285171717,.9739065285171717],[0,-.26954315595234496,.26954315595234496,-.5190961292068118,.5190961292068118,-.7301520055740494,.7301520055740494,-.8870625997680953,.8870625997680953,-.978228658146057,.978228658146057],[-.1252334085114689,.1252334085114689,-.3678314989981802,.3678314989981802,-.5873179542866175,.5873179542866175,-.7699026741943047,.7699026741943047,-.9041172563704749,.9041172563704749,-.9815606342467192,.9815606342467192],[0,-.2304583159551348,.2304583159551348,-.44849275103644687,.44849275103644687,-.6423493394403402,.6423493394403402,-.8015780907333099,.8015780907333099,-.9175983992229779,.9175983992229779,-.9841830547185881,.9841830547185881],[-.10805494870734367,.10805494870734367,-.31911236892788974,.31911236892788974,-.5152486363581541,.5152486363581541,-.6872929048116855,.6872929048116855,-.827201315069765,.827201315069765,-.9284348836635735,.9284348836635735,-.9862838086968123,.9862838086968123],[0,-.20119409399743451,.20119409399743451,-.3941513470775634,.3941513470775634,-.5709721726085388,.5709721726085388,-.7244177313601701,.7244177313601701,-.8482065834104272,.8482065834104272,-.937273392400706,.937273392400706,-.9879925180204854,.9879925180204854],[-.09501250983763744,.09501250983763744,-.2816035507792589,.2816035507792589,-.45801677765722737,.45801677765722737,-.6178762444026438,.6178762444026438,-.755404408355003,.755404408355003,-.8656312023878318,.8656312023878318,-.9445750230732326,.9445750230732326,-.9894009349916499,.9894009349916499],[0,-.17848418149584785,.17848418149584785,-.3512317634538763,.3512317634538763,-.5126905370864769,.5126905370864769,-.6576711592166907,.6576711592166907,-.7815140038968014,.7815140038968014,-.8802391537269859,.8802391537269859,-.9506755217687678,.9506755217687678,-.9905754753144174,.9905754753144174],[-.0847750130417353,.0847750130417353,-.2518862256915055,.2518862256915055,-.41175116146284263,.41175116146284263,-.5597708310739475,.5597708310739475,-.6916870430603532,.6916870430603532,-.8037049589725231,.8037049589725231,-.8926024664975557,.8926024664975557,-.9558239495713977,.9558239495713977,-.9915651684209309,.9915651684209309],[0,-.16035864564022537,.16035864564022537,-.31656409996362983,.31656409996362983,-.46457074137596094,.46457074137596094,-.600545304661681,.600545304661681,-.7209661773352294,.7209661773352294,-.8227146565371428,.8227146565371428,-.9031559036148179,.9031559036148179,-.96020815213483,.96020815213483,-.9924068438435844,.9924068438435844],[-.07652652113349734,.07652652113349734,-.22778585114164507,.22778585114164507,-.37370608871541955,.37370608871541955,-.5108670019508271,.5108670019508271,-.636053680726515,.636053680726515,-.7463319064601508,.7463319064601508,-.8391169718222188,.8391169718222188,-.912234428251326,.912234428251326,-.9639719272779138,.9639719272779138,-.9931285991850949,.9931285991850949],[0,-.1455618541608951,.1455618541608951,-.2880213168024011,.2880213168024011,-.4243421202074388,.4243421202074388,-.5516188358872198,.5516188358872198,-.6671388041974123,.6671388041974123,-.7684399634756779,.7684399634756779,-.8533633645833173,.8533633645833173,-.9200993341504008,.9200993341504008,-.9672268385663063,.9672268385663063,-.9937521706203895,.9937521706203895],[-.06973927331972223,.06973927331972223,-.20786042668822127,.20786042668822127,-.34193582089208424,.34193582089208424,-.469355837986757,.469355837986757,-.5876404035069116,.5876404035069116,-.6944872631866827,.6944872631866827,-.7878168059792081,.7878168059792081,-.8658125777203002,.8658125777203002,-.926956772187174,.926956772187174,-.9700604978354287,.9700604978354287,-.9942945854823992,.9942945854823992],[0,-.1332568242984661,.1332568242984661,-.26413568097034495,.26413568097034495,-.3903010380302908,.3903010380302908,-.5095014778460075,.5095014778460075,-.6196098757636461,.6196098757636461,-.7186613631319502,.7186613631319502,-.8048884016188399,.8048884016188399,-.8767523582704416,.8767523582704416,-.9329710868260161,.9329710868260161,-.9725424712181152,.9725424712181152,-.9947693349975522,.9947693349975522],[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213]],kg=[[],[],[1,1],[.8888888888888888,.5555555555555556,.5555555555555556],[.6521451548625461,.6521451548625461,.34785484513745385,.34785484513745385],[.5688888888888889,.47862867049936647,.47862867049936647,.23692688505618908,.23692688505618908],[.3607615730481386,.3607615730481386,.46791393457269104,.46791393457269104,.17132449237917036,.17132449237917036],[.4179591836734694,.3818300505051189,.3818300505051189,.27970539148927664,.27970539148927664,.1294849661688697,.1294849661688697],[.362683783378362,.362683783378362,.31370664587788727,.31370664587788727,.22238103445337448,.22238103445337448,.10122853629037626,.10122853629037626],[.3302393550012598,.1806481606948574,.1806481606948574,.08127438836157441,.08127438836157441,.31234707704000286,.31234707704000286,.26061069640293544,.26061069640293544],[.29552422471475287,.29552422471475287,.26926671930999635,.26926671930999635,.21908636251598204,.21908636251598204,.1494513491505806,.1494513491505806,.06667134430868814,.06667134430868814],[.2729250867779006,.26280454451024665,.26280454451024665,.23319376459199048,.23319376459199048,.18629021092773426,.18629021092773426,.1255803694649046,.1255803694649046,.05566856711617366,.05566856711617366],[.24914704581340277,.24914704581340277,.2334925365383548,.2334925365383548,.20316742672306592,.20316742672306592,.16007832854334622,.16007832854334622,.10693932599531843,.10693932599531843,.04717533638651183,.04717533638651183],[.2325515532308739,.22628318026289723,.22628318026289723,.2078160475368885,.2078160475368885,.17814598076194574,.17814598076194574,.13887351021978725,.13887351021978725,.09212149983772845,.09212149983772845,.04048400476531588,.04048400476531588],[.2152638534631578,.2152638534631578,.2051984637212956,.2051984637212956,.18553839747793782,.18553839747793782,.15720316715819355,.15720316715819355,.12151857068790319,.12151857068790319,.08015808715976021,.08015808715976021,.03511946033175186,.03511946033175186],[.2025782419255613,.19843148532711158,.19843148532711158,.1861610000155622,.1861610000155622,.16626920581699392,.16626920581699392,.13957067792615432,.13957067792615432,.10715922046717194,.10715922046717194,.07036604748810812,.07036604748810812,.03075324199611727,.03075324199611727],[.1894506104550685,.1894506104550685,.18260341504492358,.18260341504492358,.16915651939500254,.16915651939500254,.14959598881657674,.14959598881657674,.12462897125553388,.12462897125553388,.09515851168249279,.09515851168249279,.062253523938647894,.062253523938647894,.027152459411754096,.027152459411754096],[.17944647035620653,.17656270536699264,.17656270536699264,.16800410215645004,.16800410215645004,.15404576107681028,.15404576107681028,.13513636846852548,.13513636846852548,.11188384719340397,.11188384719340397,.08503614831717918,.08503614831717918,.0554595293739872,.0554595293739872,.02414830286854793,.02414830286854793],[.1691423829631436,.1691423829631436,.16427648374583273,.16427648374583273,.15468467512626524,.15468467512626524,.14064291467065065,.14064291467065065,.12255520671147846,.12255520671147846,.10094204410628717,.10094204410628717,.07642573025488905,.07642573025488905,.0497145488949698,.0497145488949698,.02161601352648331,.02161601352648331],[.1610544498487837,.15896884339395434,.15896884339395434,.15276604206585967,.15276604206585967,.1426067021736066,.1426067021736066,.12875396253933621,.12875396253933621,.11156664554733399,.11156664554733399,.09149002162245,.09149002162245,.06904454273764123,.06904454273764123,.0448142267656996,.0448142267656996,.019461788229726478,.019461788229726478],[.15275338713072584,.15275338713072584,.14917298647260374,.14917298647260374,.14209610931838204,.14209610931838204,.13168863844917664,.13168863844917664,.11819453196151841,.11819453196151841,.10193011981724044,.10193011981724044,.08327674157670475,.08327674157670475,.06267204833410907,.06267204833410907,.04060142980038694,.04060142980038694,.017614007139152118,.017614007139152118],[.14608113364969041,.14452440398997005,.14452440398997005,.13988739479107315,.13988739479107315,.13226893863333747,.13226893863333747,.12183141605372853,.12183141605372853,.10879729916714838,.10879729916714838,.09344442345603386,.09344442345603386,.0761001136283793,.0761001136283793,.057134425426857205,.057134425426857205,.036953789770852494,.036953789770852494,.016017228257774335,.016017228257774335],[.13925187285563198,.13925187285563198,.13654149834601517,.13654149834601517,.13117350478706238,.13117350478706238,.12325237681051242,.12325237681051242,.11293229608053922,.11293229608053922,.10041414444288096,.10041414444288096,.08594160621706773,.08594160621706773,.06979646842452049,.06979646842452049,.052293335152683286,.052293335152683286,.03377490158481415,.03377490158481415,.0146279952982722,.0146279952982722],[.13365457218610619,.1324620394046966,.1324620394046966,.12890572218808216,.12890572218808216,.12304908430672953,.12304908430672953,.11499664022241136,.11499664022241136,.10489209146454141,.10489209146454141,.09291576606003515,.09291576606003515,.07928141177671895,.07928141177671895,.06423242140852585,.06423242140852585,.04803767173108467,.04803767173108467,.030988005856979445,.030988005856979445,.013411859487141771,.013411859487141771],[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872]],Og=[[1],[1,1],[1,2,1],[1,3,3,1]],Hc=(e,t,i)=>{let n,s;const o=i/2;n=0;for(let a=0;a<20;a++)s=o*Tg[20][a]+o,n+=kg[20][a]*Pg(e,t,s);return o*n},$c=(e,t,i)=>{i===void 0&&(i=1);const n=e[0]-2*e[1]+e[2],s=t[0]-2*t[1]+t[2],r=2*e[1]-2*e[0],o=2*t[1]-2*t[0],a=4*(n*n+s*s),l=4*(n*r+s*o),c=r*r+o*o;if(a===0)return i*Math.sqrt(Math.pow(e[2]-e[0],2)+Math.pow(t[2]-t[0],2));const h=l/(2*a),d=c/a,u=i+h,f=d-h*h,p=u*u+f>0?Math.sqrt(u*u+f):0,_=h*h+f>0?Math.sqrt(h*h+f):0,b=h+Math.sqrt(h*h+f)!==0?f*Math.log(Math.abs((u+p)/(h+_))):0;return Math.sqrt(a)/2*(u*p-h*_+b)};function Pg(e,t,i){const n=Eo(1,i,e),s=Eo(1,i,t),r=n*n+s*s;return Math.sqrt(r)}const Eo=(e,t,i)=>{const n=i.length-1;let s,r;if(n===0)return 0;if(e===0){r=0;for(let o=0;o<=n;o++)r+=Og[n][o]*Math.pow(1-t,n-o)*Math.pow(t,o)*i[o];return r}else{s=new Array(n);for(let o=0;o<n;o++)s[o]=n*(i[o+1]-i[o]);return Eo(e-1,t,s)}},Wc=(e,t,i)=>{let n=1,s=e/t,r=(e-i(s))/t,o=0;for(;n>.001;){const a=i(s+r),l=Math.abs(e-a)/t;if(l<n)n=l,s+=r;else{const c=i(s-r),h=Math.abs(e-c)/t;h<n?(n=h,s-=r):r/=2}if(o++,o>500)break}return s};class St extends V{constructor(t){super(t),this.dataArray=[],this.pathLength=0,this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute()})}_readDataAttribute(){this.dataArray=St.parsePathData(this.data()),this.pathLength=St.getPathLength(this.dataArray)}_sceneFunc(t){const i=this.dataArray;t.beginPath();let n=!1;for(let s=0;s<i.length;s++){const r=i[s].command,o=i[s].points;switch(r){case"L":t.lineTo(o[0],o[1]);break;case"M":t.moveTo(o[0],o[1]);break;case"C":t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"Q":t.quadraticCurveTo(o[0],o[1],o[2],o[3]);break;case"A":const a=o[0],l=o[1],c=o[2],h=o[3],d=o[4],u=o[5],f=o[6],p=o[7],_=c>h?c:h,b=c>h?1:c/h,S=c>h?h/c:1;t.translate(a,l),t.rotate(f),t.scale(b,S),t.arc(0,0,_,d,d+u,1-p),t.scale(1/b,1/S),t.rotate(-f),t.translate(-a,-l);break;case"z":n=!0,t.closePath();break}}!n&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){let t=[];this.dataArray.forEach(function(l){if(l.command==="A"){const c=l.points[4],h=l.points[5],d=l.points[4]+h;let u=Math.PI/180;if(Math.abs(c-d)<u&&(u=Math.abs(c-d)),h<0)for(let f=c-u;f>d;f-=u){const p=St.getPointOnEllipticalArc(l.points[0],l.points[1],l.points[2],l.points[3],f,0);t.push(p.x,p.y)}else for(let f=c+u;f<d;f+=u){const p=St.getPointOnEllipticalArc(l.points[0],l.points[1],l.points[2],l.points[3],f,0);t.push(p.x,p.y)}}else if(l.command==="C")for(let c=0;c<=1;c+=.01){const h=St.getPointOnCubicBezier(c,l.start.x,l.start.y,l.points[0],l.points[1],l.points[2],l.points[3],l.points[4],l.points[5]);t.push(h.x,h.y)}else t=t.concat(l.points)});let i=t[0],n=t[0],s=t[1],r=t[1],o,a;for(let l=0;l<t.length/2;l++)o=t[l*2],a=t[l*2+1],isNaN(o)||(i=Math.min(i,o),n=Math.max(n,o)),isNaN(a)||(s=Math.min(s,a),r=Math.max(r,a));return{x:i,y:s,width:n-i,height:r-s}}getLength(){return this.pathLength}getPointAtLength(t){return St.getPointAtLengthOfDataArray(t,this.dataArray)}static getLineLength(t,i,n,s){return Math.sqrt((n-t)*(n-t)+(s-i)*(s-i))}static getPathLength(t){let i=0;for(let n=0;n<t.length;++n)i+=t[n].pathLength;return i}static getPointAtLengthOfDataArray(t,i){let n,s=0,r=i.length;if(!r)return null;for(;s<r&&t>i[s].pathLength;)t-=i[s].pathLength,++s;if(s===r)return n=i[s-1].points.slice(-2),{x:n[0],y:n[1]};if(t<.01)return i[s].command==="M"?(n=i[s].points.slice(0,2),{x:n[0],y:n[1]}):{x:i[s].start.x,y:i[s].start.y};const o=i[s],a=o.points;switch(o.command){case"L":return St.getPointOnLine(t,o.start.x,o.start.y,a[0],a[1]);case"C":return St.getPointOnCubicBezier(Wc(t,St.getPathLength(i),_=>Hc([o.start.x,a[0],a[2],a[4]],[o.start.y,a[1],a[3],a[5]],_)),o.start.x,o.start.y,a[0],a[1],a[2],a[3],a[4],a[5]);case"Q":return St.getPointOnQuadraticBezier(Wc(t,St.getPathLength(i),_=>$c([o.start.x,a[0],a[2]],[o.start.y,a[1],a[3]],_)),o.start.x,o.start.y,a[0],a[1],a[2],a[3]);case"A":const l=a[0],c=a[1],h=a[2],d=a[3],u=a[5],f=a[6];let p=a[4];return p+=u*t/o.pathLength,St.getPointOnEllipticalArc(l,c,h,d,p,f)}return null}static getPointOnLine(t,i,n,s,r,o,a){o=o??i,a=a??n;const l=this.getLineLength(i,n,s,r);if(l<1e-10)return{x:i,y:n};if(s===i)return{x:o,y:a+(r>n?t:-t)};const c=(r-n)/(s-i),h=Math.sqrt(t*t/(1+c*c))*(s<i?-1:1),d=c*h;if(Math.abs(a-n-c*(o-i))<1e-10)return{x:o+h,y:a+d};const u=((o-i)*(s-i)+(a-n)*(r-n))/(l*l),f=i+u*(s-i),p=n+u*(r-n),_=this.getLineLength(o,a,f,p),b=Math.sqrt(t*t-_*_),S=Math.sqrt(b*b/(1+c*c))*(s<i?-1:1),y=c*S;return{x:f+S,y:p+y}}static getPointOnCubicBezier(t,i,n,s,r,o,a,l,c){function h(b){return b*b*b}function d(b){return 3*b*b*(1-b)}function u(b){return 3*b*(1-b)*(1-b)}function f(b){return(1-b)*(1-b)*(1-b)}const p=l*h(t)+o*d(t)+s*u(t)+i*f(t),_=c*h(t)+a*d(t)+r*u(t)+n*f(t);return{x:p,y:_}}static getPointOnQuadraticBezier(t,i,n,s,r,o,a){function l(f){return f*f}function c(f){return 2*f*(1-f)}function h(f){return(1-f)*(1-f)}const d=o*l(t)+s*c(t)+i*h(t),u=a*l(t)+r*c(t)+n*h(t);return{x:d,y:u}}static getPointOnEllipticalArc(t,i,n,s,r,o){const a=Math.cos(o),l=Math.sin(o),c={x:n*Math.cos(r),y:s*Math.sin(r)};return{x:t+(c.x*a-c.y*l),y:i+(c.x*l+c.y*a)}}static parsePathData(t){if(!t)return[];let i=t;const n=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"];i=i.replace(new RegExp(" ","g"),",");for(let d=0;d<n.length;d++)i=i.replace(new RegExp(n[d],"g"),"|"+n[d]);const s=i.split("|"),r=[],o=[];let a=0,l=0;const c=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi;let h;for(let d=1;d<s.length;d++){let u=s[d],f=u.charAt(0);for(u=u.slice(1),o.length=0;h=c.exec(u);)o.push(h[0]);let p=[],_=f==="A"||f==="a"?0:-1;for(let b=0,S=o.length;b<S;b++){const y=o[b];if(y==="00"){p.push(0,0),_>=0&&(_+=2,_>=7&&(_-=7));continue}if(_>=0){if(_===3){if(/^[01]{2}\d+(?:\.\d+)?$/.test(y)){p.push(parseInt(y[0],10)),p.push(parseInt(y[1],10)),p.push(parseFloat(y.slice(2))),_+=3,_>=7&&(_-=7);continue}if(y==="11"||y==="10"||y==="01"){p.push(parseInt(y[0],10)),p.push(parseInt(y[1],10)),_+=2,_>=7&&(_-=7);continue}if(y==="0"||y==="1"){p.push(parseInt(y,10)),_+=1,_>=7&&(_-=7);continue}}else if(_===4){if(/^[01]\d+(?:\.\d+)?$/.test(y)){p.push(parseInt(y[0],10)),p.push(parseFloat(y.slice(1))),_+=2,_>=7&&(_-=7);continue}if(y==="0"||y==="1"){p.push(parseInt(y,10)),_+=1,_>=7&&(_-=7);continue}}const C=parseFloat(y);isNaN(C)?p.push(0):p.push(C),_+=1,_>=7&&(_-=7)}else{const C=parseFloat(y);isNaN(C)?p.push(0):p.push(C)}}for(;p.length>0&&!isNaN(p[0]);){let b="",S=[];const y=a,C=l;let N,T,O,w,x,P,B,K,z,Z;switch(f){case"l":a+=p.shift(),l+=p.shift(),b="L",S.push(a,l);break;case"L":a=p.shift(),l=p.shift(),S.push(a,l);break;case"m":const J=p.shift(),A=p.shift();if(a+=J,l+=A,b="M",r.length>2&&r[r.length-1].command==="z"){for(let L=r.length-2;L>=0;L--)if(r[L].command==="M"){a=r[L].points[0]+J,l=r[L].points[1]+A;break}}S.push(a,l),f="l";break;case"M":a=p.shift(),l=p.shift(),b="M",S.push(a,l),f="L";break;case"h":a+=p.shift(),b="L",S.push(a,l);break;case"H":a=p.shift(),b="L",S.push(a,l);break;case"v":l+=p.shift(),b="L",S.push(a,l);break;case"V":l=p.shift(),b="L",S.push(a,l);break;case"C":S.push(p.shift(),p.shift(),p.shift(),p.shift()),a=p.shift(),l=p.shift(),S.push(a,l);break;case"c":S.push(a+p.shift(),l+p.shift(),a+p.shift(),l+p.shift()),a+=p.shift(),l+=p.shift(),b="C",S.push(a,l);break;case"S":T=a,O=l,N=r[r.length-1],N.command==="C"&&(T=a+(a-N.points[2]),O=l+(l-N.points[3])),S.push(T,O,p.shift(),p.shift()),a=p.shift(),l=p.shift(),b="C",S.push(a,l);break;case"s":T=a,O=l,N=r[r.length-1],N.command==="C"&&(T=a+(a-N.points[2]),O=l+(l-N.points[3])),S.push(T,O,a+p.shift(),l+p.shift()),a+=p.shift(),l+=p.shift(),b="C",S.push(a,l);break;case"Q":S.push(p.shift(),p.shift()),a=p.shift(),l=p.shift(),S.push(a,l);break;case"q":S.push(a+p.shift(),l+p.shift()),a+=p.shift(),l+=p.shift(),b="Q",S.push(a,l);break;case"T":T=a,O=l,N=r[r.length-1],N.command==="Q"&&(T=a+(a-N.points[0]),O=l+(l-N.points[1])),a=p.shift(),l=p.shift(),b="Q",S.push(T,O,a,l);break;case"t":T=a,O=l,N=r[r.length-1],N.command==="Q"&&(T=a+(a-N.points[0]),O=l+(l-N.points[1])),a+=p.shift(),l+=p.shift(),b="Q",S.push(T,O,a,l);break;case"A":w=p.shift(),x=p.shift(),P=p.shift(),B=p.shift(),K=p.shift(),z=a,Z=l,a=p.shift(),l=p.shift(),b="A",S=this.convertEndpointToCenterParameterization(z,Z,a,l,B,K,w,x,P);break;case"a":w=p.shift(),x=p.shift(),P=p.shift(),B=p.shift(),K=p.shift(),z=a,Z=l,a+=p.shift(),l+=p.shift(),b="A",S=this.convertEndpointToCenterParameterization(z,Z,a,l,B,K,w,x,P);break}r.push({command:b||f,points:S,start:{x:y,y:C},pathLength:this.calcLength(y,C,b||f,S)})}(f==="z"||f==="Z")&&r.push({command:"z",points:[],start:void 0,pathLength:0})}return r}static calcLength(t,i,n,s){let r,o,a,l;const c=St;switch(n){case"L":return c.getLineLength(t,i,s[0],s[1]);case"C":return Hc([t,s[0],s[2],s[4]],[i,s[1],s[3],s[5]],1);case"Q":return $c([t,s[0],s[2]],[i,s[1],s[3]],1);case"A":r=0;const h=s[4],d=s[5],u=s[4]+d;let f=Math.PI/180;if(Math.abs(h-u)<f&&(f=Math.abs(h-u)),o=c.getPointOnEllipticalArc(s[0],s[1],s[2],s[3],h,0),d<0)for(l=h-f;l>u;l-=f)a=c.getPointOnEllipticalArc(s[0],s[1],s[2],s[3],l,0),r+=c.getLineLength(o.x,o.y,a.x,a.y),o=a;else for(l=h+f;l<u;l+=f)a=c.getPointOnEllipticalArc(s[0],s[1],s[2],s[3],l,0),r+=c.getLineLength(o.x,o.y,a.x,a.y),o=a;return a=c.getPointOnEllipticalArc(s[0],s[1],s[2],s[3],u,0),r+=c.getLineLength(o.x,o.y,a.x,a.y),r}return 0}static convertEndpointToCenterParameterization(t,i,n,s,r,o,a,l,c){const h=c*(Math.PI/180),d=Math.cos(h)*(t-n)/2+Math.sin(h)*(i-s)/2,u=-1*Math.sin(h)*(t-n)/2+Math.cos(h)*(i-s)/2,f=d*d/(a*a)+u*u/(l*l);f>1&&(a*=Math.sqrt(f),l*=Math.sqrt(f));let p=Math.sqrt((a*a*(l*l)-a*a*(u*u)-l*l*(d*d))/(a*a*(u*u)+l*l*(d*d)));r===o&&(p*=-1),isNaN(p)&&(p=0);const _=p*a*u/l,b=p*-l*d/a,S=(t+n)/2+Math.cos(h)*_-Math.sin(h)*b,y=(i+s)/2+Math.sin(h)*_+Math.cos(h)*b,C=function(B){return Math.sqrt(B[0]*B[0]+B[1]*B[1])},N=function(B,K){return(B[0]*K[0]+B[1]*K[1])/(C(B)*C(K))},T=function(B,K){return(B[0]*K[1]<B[1]*K[0]?-1:1)*Math.acos(N(B,K))},O=T([1,0],[(d-_)/a,(u-b)/l]),w=[(d-_)/a,(u-b)/l],x=[(-1*d-_)/a,(-1*u-b)/l];let P=T(w,x);return N(w,x)<=-1&&(P=Math.PI),N(w,x)>=1&&(P=0),o===0&&P>0&&(P=P-2*Math.PI),o===1&&P<0&&(P=P+2*Math.PI),[S,y,a,l,O,P,h,o]}}St.prototype.className="Path",St.prototype._attrsAffectingSize=["data"],kt(St),m.addGetterSetter(St,"data");class ki extends We{_sceneFunc(t){super._sceneFunc(t);const i=Math.PI*2,n=this.points();let s=n;const r=this.tension()!==0&&n.length>4;r&&(s=this.getTensionPoints());const o=this.pointerLength(),a=n.length;let l,c;if(r){const u=[s[s.length-4],s[s.length-3],s[s.length-2],s[s.length-1],n[a-2],n[a-1]],f=St.calcLength(s[s.length-4],s[s.length-3],"C",u),p=St.getPointOnQuadraticBezier(Math.min(1,1-o/f),u[0],u[1],u[2],u[3],u[4],u[5]);l=n[a-2]-p.x,c=n[a-1]-p.y}else l=n[a-2]-n[a-4],c=n[a-1]-n[a-3];const h=(Math.atan2(c,l)+i)%i,d=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(n[a-2],n[a-1]),t.rotate(h),t.moveTo(0,0),t.lineTo(-o,d/2),t.lineTo(-o,-d/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(n[0],n[1]),r?(l=(s[0]+s[2])/2-n[0],c=(s[1]+s[3])/2-n[1]):(l=n[2]-n[0],c=n[3]-n[1]),t.rotate((Math.atan2(-c,-l)+i)%i),t.moveTo(0,0),t.lineTo(-o,d/2),t.lineTo(-o,-d/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){const i=this.dashEnabled();i&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),i&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),i=this.pointerWidth()/2;return{x:t.x,y:t.y-i,width:t.width,height:t.height+i*2}}}ki.prototype.className="Arrow",kt(ki),m.addGetterSetter(ki,"pointerLength",10,$()),m.addGetterSetter(ki,"pointerWidth",10,$()),m.addGetterSetter(ki,"pointerAtBeginning",!1),m.addGetterSetter(ki,"pointerAtEnding",!0);class qi extends V{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}}qi.prototype._centroid=!0,qi.prototype.className="Circle",qi.prototype._attrsAffectingSize=["radius"],kt(qi),m.addGetterSetter(qi,"radius",0,$());class si extends V{_sceneFunc(t){const i=this.radiusX(),n=this.radiusY();t.beginPath(),t.save(),i!==n&&t.scale(1,n/i),t.arc(0,0,i,0,Math.PI*2,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}si.prototype.className="Ellipse",si.prototype._centroid=!0,si.prototype._attrsAffectingSize=["radiusX","radiusY"],kt(si),m.addComponentsGetterSetter(si,"radius",["x","y"]),m.addGetterSetter(si,"radiusX",0,$()),m.addGetterSetter(si,"radiusY",0,$());class re extends V{constructor(t){super(t),this._loadListener=()=>{this._requestDraw()},this.on("imageChange.konva",i=>{this._removeImageLoad(i.oldVal),this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",this._loadListener)}_removeImageLoad(t){t&&t.removeEventListener&&t.removeEventListener("load",this._loadListener)}destroy(){return this._removeImageLoad(this.image()),super.destroy(),this}_useBufferCanvas(){const t=!!this.cornerRadius(),i=this.hasShadow();return t&&i?!0:super._useBufferCanvas(!0)}_sceneFunc(t){const i=this.getWidth(),n=this.getHeight(),s=this.cornerRadius(),r=this.attrs.image;let o;if(r){const a=this.attrs.cropWidth,l=this.attrs.cropHeight;a&&l?o=[r,this.cropX(),this.cropY(),a,l,0,0,i,n]:o=[r,0,0,i,n]}(this.hasFill()||this.hasStroke()||s)&&(t.beginPath(),s?E.drawRoundedRectPath(t,i,n,s):t.rect(0,0,i,n),t.closePath(),t.fillStrokeShape(this)),r&&(s&&t.clip(),t.drawImage.apply(t,o))}_hitFunc(t){const i=this.width(),n=this.height(),s=this.cornerRadius();t.beginPath(),s?E.drawRoundedRectPath(t,i,n,s):t.rect(0,0,i,n),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,i,n;return(n=(t=this.attrs.width)!==null&&t!==void 0?t:(i=this.image())===null||i===void 0?void 0:i.width)!==null&&n!==void 0?n:0}getHeight(){var t,i,n;return(n=(t=this.attrs.height)!==null&&t!==void 0?t:(i=this.image())===null||i===void 0?void 0:i.height)!==null&&n!==void 0?n:0}static fromURL(t,i,n=null){const s=E.createImageElement();s.onload=function(){const r=new re({image:s});i(r)},s.onerror=n,s.crossOrigin="Anonymous",s.src=t}}re.prototype.className="Image",re.prototype._attrsAffectingSize=["image"],kt(re),m.addGetterSetter(re,"cornerRadius",0,Ws(4)),m.addGetterSetter(re,"image"),m.addComponentsGetterSetter(re,"crop",["x","y","width","height"]),m.addGetterSetter(re,"cropX",0,$()),m.addGetterSetter(re,"cropY",0,$()),m.addGetterSetter(re,"cropWidth",0,$()),m.addGetterSetter(re,"cropHeight",0,$());const Uc=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],Ag="Change.konva",Rg="none",So="up",wo="right",xo="down",Co="left",Mg=Uc.length;class No extends Yi{constructor(t){super(t),this.on("add.konva",function(i){this._addListeners(i.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){let i=this,n;const s=function(){i._sync()};for(n=0;n<Mg;n++)t.on(Uc[n]+Ag,s)}getWidth(){return this.getText().width()}getHeight(){return this.getText().height()}_sync(){let t=this.getText(),i=this.getTag(),n,s,r,o,a,l,c;if(t&&i){switch(n=t.width(),s=t.height(),r=i.pointerDirection(),o=i.pointerWidth(),c=i.pointerHeight(),a=0,l=0,r){case So:a=n/2,l=-1*c;break;case wo:a=n+o,l=s/2;break;case xo:a=n/2,l=s+c;break;case Co:a=-1*o,l=s/2;break}i.setAttrs({x:-1*a,y:-1*l,width:n,height:s}),t.setAttrs({x:-1*a,y:-1*l})}}}No.prototype.className="Label",kt(No);class Oi extends V{_sceneFunc(t){const i=this.width(),n=this.height(),s=this.pointerDirection(),r=this.pointerWidth(),o=this.pointerHeight(),a=this.cornerRadius();let l=0,c=0,h=0,d=0;typeof a=="number"?l=c=h=d=Math.min(a,i/2,n/2):(l=Math.min(a[0]||0,i/2,n/2),c=Math.min(a[1]||0,i/2,n/2),d=Math.min(a[2]||0,i/2,n/2),h=Math.min(a[3]||0,i/2,n/2)),t.beginPath(),t.moveTo(l,0),s===So&&(t.lineTo((i-r)/2,0),t.lineTo(i/2,-1*o),t.lineTo((i+r)/2,0)),t.lineTo(i-c,0),t.arc(i-c,c,c,Math.PI*3/2,0,!1),s===wo&&(t.lineTo(i,(n-o)/2),t.lineTo(i+r,n/2),t.lineTo(i,(n+o)/2)),t.lineTo(i,n-d),t.arc(i-d,n-d,d,0,Math.PI/2,!1),s===xo&&(t.lineTo((i+r)/2,n),t.lineTo(i/2,n+o),t.lineTo((i-r)/2,n)),t.lineTo(h,n),t.arc(h,n-h,h,Math.PI/2,Math.PI,!1),s===Co&&(t.lineTo(0,(n+o)/2),t.lineTo(-1*r,n/2),t.lineTo(0,(n-o)/2)),t.lineTo(0,l),t.arc(l,l,l,Math.PI,Math.PI*3/2,!1),t.closePath(),t.fillStrokeShape(this)}getSelfRect(){let t=0,i=0,n=this.pointerWidth(),s=this.pointerHeight(),r=this.pointerDirection(),o=this.width(),a=this.height();return r===So?(i-=s,a+=s):r===xo?a+=s:r===Co?(t-=n*1.5,o+=n):r===wo&&(o+=n*1.5),{x:t,y:i,width:o,height:a}}}Oi.prototype.className="Tag",kt(Oi),m.addGetterSetter(Oi,"pointerDirection",Rg),m.addGetterSetter(Oi,"pointerWidth",0,$()),m.addGetterSetter(Oi,"pointerHeight",0,$()),m.addGetterSetter(Oi,"cornerRadius",0,Ws(4));class Un extends V{_sceneFunc(t){const i=this.cornerRadius(),n=this.width(),s=this.height();t.beginPath(),i?E.drawRoundedRectPath(t,n,s,i):t.rect(0,0,n,s),t.closePath(),t.fillStrokeShape(this)}}Un.prototype.className="Rect",kt(Un),m.addGetterSetter(Un,"cornerRadius",0,Ws(4));class ri extends V{_sceneFunc(t){const i=this._getPoints(),n=this.radius(),s=this.sides(),r=this.cornerRadius();if(t.beginPath(),r)E.drawRoundedPolygonPath(t,i,s,n,r);else{t.moveTo(i[0].x,i[0].y);for(let o=1;o<i.length;o++)t.lineTo(i[o].x,i[o].y)}t.closePath(),t.fillStrokeShape(this)}_getPoints(){const t=this.attrs.sides,i=this.attrs.radius||0,n=[];for(let s=0;s<t;s++)n.push({x:i*Math.sin(s*2*Math.PI/t),y:-1*i*Math.cos(s*2*Math.PI/t)});return n}getSelfRect(){const t=this._getPoints();let i=t[0].x,n=t[0].x,s=t[0].y,r=t[0].y;return t.forEach(o=>{i=Math.min(i,o.x),n=Math.max(n,o.x),s=Math.min(s,o.y),r=Math.max(r,o.y)}),{x:i,y:s,width:n-i,height:r-s}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}ri.prototype.className="RegularPolygon",ri.prototype._centroid=!0,ri.prototype._attrsAffectingSize=["radius"],kt(ri),m.addGetterSetter(ri,"radius",0,$()),m.addGetterSetter(ri,"sides",0,$()),m.addGetterSetter(ri,"cornerRadius",0,Ws(4));const jc=Math.PI*2;class Pi extends V{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,jc,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),jc,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}Pi.prototype.className="Ring",Pi.prototype._centroid=!0,Pi.prototype._attrsAffectingSize=["innerRadius","outerRadius"],kt(Pi),m.addGetterSetter(Pi,"innerRadius",0,$()),m.addGetterSetter(Pi,"outerRadius",0,$());class ke extends V{constructor(t){super(t),this._updated=!0,this.anim=new ae(()=>{const i=this._updated;return this._updated=!1,i}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){this.anim.isRunning()&&(clearInterval(this.interval),this._setInterval())})}_sceneFunc(t){const i=this.animation(),n=this.frameIndex(),s=n*4,r=this.animations()[i],o=this.frameOffsets(),a=r[s+0],l=r[s+1],c=r[s+2],h=r[s+3],d=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,c,h),t.closePath(),t.fillStrokeShape(this)),d)if(o){const u=o[i],f=n*2;t.drawImage(d,a,l,c,h,u[f+0],u[f+1],c,h)}else t.drawImage(d,a,l,c,h,0,0,c,h)}_hitFunc(t){const i=this.animation(),n=this.frameIndex(),s=n*4,r=this.animations()[i],o=this.frameOffsets(),a=r[s+2],l=r[s+3];if(t.beginPath(),o){const c=o[i],h=n*2;t.rect(c[h+0],c[h+1],a,l)}else t.rect(0,0,a,l);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){const t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(this.isRunning())return;const t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){const t=this.frameIndex(),i=this.animation(),n=this.animations(),s=n[i],r=s.length/4;t<r-1?this.frameIndex(t+1):this.frameIndex(0)}}ke.prototype.className="Sprite",kt(ke),m.addGetterSetter(ke,"animation"),m.addGetterSetter(ke,"animations"),m.addGetterSetter(ke,"frameOffsets"),m.addGetterSetter(ke,"image"),m.addGetterSetter(ke,"frameIndex",0,$()),m.addGetterSetter(ke,"frameRate",17,$()),m.backCompat(ke,{index:"frameIndex",getIndex:"getFrameIndex",setIndex:"setFrameIndex"});class oi extends V{_sceneFunc(t){const i=this.innerRadius(),n=this.outerRadius(),s=this.numPoints();t.beginPath(),t.moveTo(0,0-n);for(let r=1;r<s*2;r++){const o=r%2===0?n:i,a=o*Math.sin(r*Math.PI/s),l=-1*o*Math.cos(r*Math.PI/s);t.lineTo(a,l)}t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}oi.prototype.className="Star",oi.prototype._centroid=!0,oi.prototype._attrsAffectingSize=["innerRadius","outerRadius"],kt(oi),m.addGetterSetter(oi,"numPoints",5,$()),m.addGetterSetter(oi,"innerRadius",0,$()),m.addGetterSetter(oi,"outerRadius",0,$());function ai(e){return[...e].reduce((t,i,n,s)=>{if(new RegExp("\\p{Emoji}","u").test(i)){const r=s[n+1];r&&new RegExp("\\p{Emoji_Modifier}|\\u200D","u").test(r)?(t.push(i+r),s[n+1]=""):t.push(i)}else new RegExp("\\p{Regional_Indicator}{2}","u").test(i+(s[n+1]||""))?t.push(i+s[n+1]):n>0&&new RegExp("\\p{Mn}|\\p{Me}|\\p{Mc}","u").test(i)?t[t.length-1]+=i:i&&t.push(i);return t},[])}const Ki="auto",Lg="center",Xc="inherit",jn="justify",Ig="Change.konva",Dg="2d",zc="-",Yc="left",Vg="text",Fg="Text",Gg="top",Bg="bottom",qc="middle",Kc="normal",Hg="px ",Qs=" ",$g="right",Jc="rtl",Wg="word",Ug="char",Qc="none",To="…",Zc=["direction","fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],jg=Zc.length;function Xg(e){return e.split(",").map(t=>{t=t.trim();const i=t.indexOf(" ")>=0,n=t.indexOf('"')>=0||t.indexOf("'")>=0;return i&&!n&&(t=`"${t}"`),t}).join(", ")}let Zs;function ko(){return Zs||(Zs=E.createCanvasElement().getContext(Dg),Zs)}function zg(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function Yg(e){e.setAttr("miterLimit",2),e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function qg(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class wt extends V{constructor(t){super(qg(t)),this._partialTextX=0,this._partialTextY=0;for(let i=0;i<jg;i++)this.on(Zc[i]+Ig,this._setTextData);this._setTextData()}_sceneFunc(t){var i,n;const s=this.textArr,r=s.length;if(!this.text())return;let o=this.padding(),a=this.fontSize(),l=this.lineHeight()*a,c=this.verticalAlign(),h=this.direction(),d=0,u=this.align(),f=this.getWidth(),p=this.letterSpacing(),_=this.charRenderFunc(),b=this.fill(),S=this.textDecoration(),y=S.indexOf("underline")!==-1,C=S.indexOf("line-through")!==-1,N;h=h===Xc?t.direction:h;let T=l/2,O=qc;if(!X.legacyTextRendering){const w=this.measureSize("M");O="alphabetic";const x=(i=w.fontBoundingBoxAscent)!==null&&i!==void 0?i:w.actualBoundingBoxAscent,P=(n=w.fontBoundingBoxDescent)!==null&&n!==void 0?n:w.actualBoundingBoxDescent;T=(x-P)/2+l/2}for(h===Jc&&t.setAttr("direction",h),t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",O),t.setAttr("textAlign",Yc),c===qc?d=(this.getHeight()-r*l-o*2)/2:c===Bg&&(d=this.getHeight()-r*l-o*2),t.translate(o,d+o),N=0;N<r;N++){let w=0,x=0;const P=s[N],B=P.text,K=P.width,z=P.lastInParagraph;if(t.save(),u===$g?w+=f-K-o*2:u===Lg&&(w+=(f-K-o*2)/2),y){t.save(),t.beginPath();const J=X.legacyTextRendering?Math.round(a/2):Math.round(a/4),A=w,L=T+x+J;t.moveTo(A,L);const H=u===jn&&!z?f-o*2:K;t.lineTo(A+Math.round(H),L),t.lineWidth=a/15;const D=this._getLinearGradient();t.strokeStyle=D||b,t.stroke(),t.restore()}const Z=w;if(h!==Jc&&(p!==0||u===jn||_)){const J=B.split(" ").length-1,A=ai(B);for(let L=0;L<A.length;L++){const H=A[L];if(H===" "&&!z&&u===jn&&(w+=(f-o*2-K)/J),this._partialTextX=w,this._partialTextY=T+x,this._partialText=H,_){t.save();const nt=s.slice(0,N).reduce((ot,gt)=>ot+ai(gt.text).length,0),ct=L+nt;_({char:H,index:ct,x:w,y:T+x,lineIndex:N,column:L,isLastInLine:z,width:this.measureSize(H).width,context:t})}t.fillStrokeShape(this),_&&t.restore(),w+=this.measureSize(H).width+p}}else p!==0&&t.setAttr("letterSpacing",`${p}px`),this._partialTextX=w,this._partialTextY=T+x,this._partialText=B,t.fillStrokeShape(this);if(C){t.save(),t.beginPath();const J=X.legacyTextRendering?0:-Math.round(a/4),A=Z;t.moveTo(A,T+x+J);const L=u===jn&&!z?f-o*2:K;t.lineTo(A+Math.round(L),T+x+J),t.lineWidth=a/15;const H=this._getLinearGradient();t.strokeStyle=H||b,t.stroke(),t.restore()}t.restore(),r>1&&(T+=l)}}_hitFunc(t){const i=this.getWidth(),n=this.getHeight();t.beginPath(),t.rect(0,0,i,n),t.closePath(),t.fillStrokeShape(this)}setText(t){const i=E._isString(t)?t:t==null?"":t+"";return this._setAttr(Vg,i),this}getWidth(){return this.attrs.width===Ki||this.attrs.width===void 0?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){return this.attrs.height===Ki||this.attrs.height===void 0?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return E.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var i,n,s,r,o,a,l,c,h,d,u;let f=ko(),p=this.fontSize(),_;f.save(),f.font=this._getContextFont(),_=f.measureText(t),f.restore();const b=p/100;return{actualBoundingBoxAscent:(i=_.actualBoundingBoxAscent)!==null&&i!==void 0?i:71.58203125*b,actualBoundingBoxDescent:(n=_.actualBoundingBoxDescent)!==null&&n!==void 0?n:0,actualBoundingBoxLeft:(s=_.actualBoundingBoxLeft)!==null&&s!==void 0?s:-7.421875*b,actualBoundingBoxRight:(r=_.actualBoundingBoxRight)!==null&&r!==void 0?r:75.732421875*b,alphabeticBaseline:(o=_.alphabeticBaseline)!==null&&o!==void 0?o:0,emHeightAscent:(a=_.emHeightAscent)!==null&&a!==void 0?a:100*b,emHeightDescent:(l=_.emHeightDescent)!==null&&l!==void 0?l:-20*b,fontBoundingBoxAscent:(c=_.fontBoundingBoxAscent)!==null&&c!==void 0?c:91*b,fontBoundingBoxDescent:(h=_.fontBoundingBoxDescent)!==null&&h!==void 0?h:21*b,hangingBaseline:(d=_.hangingBaseline)!==null&&d!==void 0?d:72.80000305175781*b,ideographicBaseline:(u=_.ideographicBaseline)!==null&&u!==void 0?u:-21*b,width:_.width,height:p}}_getContextFont(){return this.fontStyle()+Qs+this.fontVariant()+Qs+(this.fontSize()+Hg)+Xg(this.fontFamily())}_addTextLine(t){this.align()===jn&&(t=t.trim());const n=this._getTextWidth(t);return this.textArr.push({text:t,width:n,lastInParagraph:!1})}_getTextWidth(t){const i=this.letterSpacing(),n=t.length;return ko().measureText(t).width+i*n}_setTextData(){let t=this.text().split(`
|
|
30
|
-
`),i=+this.fontSize(),n=0,s=this.lineHeight()*i,r=this.attrs.width,o=this.attrs.height,a=r!==Ki&&r!==void 0,l=o!==Ki&&o!==void 0,c=this.padding(),h=r-c*2,d=o-c*2,u=0,f=this.wrap(),p=f!==Qc,_=f!==Ug&&p,b=this.ellipsis();this.textArr=[],ko().font=this._getContextFont();const S=b?this._getTextWidth(To):0;for(let y=0,C=t.length;y<C;++y){let N=t[y],T=this._getTextWidth(N);if(a&&T>h)for(;N.length>0;){let O=0,w=ai(N).length,x="",P=0;for(;O<w;){const B=O+w>>>1,K=ai(N),z=K.slice(0,B+1).join(""),Z=this._getTextWidth(z);(b&&l&&u+s>d?Z+S:Z)<=h?(O=B+1,x=z,P=Z):w=B}if(x){if(_){const z=ai(N),Z=ai(x),J=z[Z.length],A=J===Qs||J===zc;let L;if(A&&P<=h)L=Z.length;else{const H=Z.lastIndexOf(Qs),D=Z.lastIndexOf(zc);L=Math.max(H,D)+1}L>0&&(O=L,x=z.slice(0,O).join(""),P=this._getTextWidth(x))}if(x=x.trimRight(),this._addTextLine(x),n=Math.max(n,P),u+=s,this._shouldHandleEllipsis(u)){this._tryToAddEllipsisToLastLine();break}if(N=ai(N).slice(O).join("").trimLeft(),N.length>0&&(T=this._getTextWidth(N),T<=h)){this._addTextLine(N),u+=s,n=Math.max(n,T);break}}else break}else this._addTextLine(N),u+=s,n=Math.max(n,T),this._shouldHandleEllipsis(u)&&y<C-1&&this._tryToAddEllipsisToLastLine();if(this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0),l&&u+s>d)break}this.textHeight=i,this.textWidth=n}_shouldHandleEllipsis(t){const i=+this.fontSize(),n=this.lineHeight()*i,s=this.attrs.height,r=s!==Ki&&s!==void 0,o=this.padding(),a=s-o*2;return!(this.wrap()!==Qc)||r&&t+n>a}_tryToAddEllipsisToLastLine(){const t=this.attrs.width,i=t!==Ki&&t!==void 0,n=this.padding(),s=t-n*2,r=this.ellipsis(),o=this.textArr[this.textArr.length-1];!o||!r||(i&&(this._getTextWidth(o.text+To)<s||(o.text=o.text.slice(0,o.text.length-3))),this.textArr.splice(this.textArr.length-1,1),this._addTextLine(o.text+To))}getStrokeScaleEnabled(){return!0}_useBufferCanvas(){const t=this.textDecoration().indexOf("underline")!==-1||this.textDecoration().indexOf("line-through")!==-1,i=this.hasShadow();return t&&i?!0:super._useBufferCanvas()}}wt.prototype._fillFunc=zg,wt.prototype._strokeFunc=Yg,wt.prototype.className=Fg,wt.prototype._attrsAffectingSize=["text","fontSize","padding","wrap","lineHeight","letterSpacing"],kt(wt),m.overWriteSetter(wt,"width",lo()),m.overWriteSetter(wt,"height",lo()),m.addGetterSetter(wt,"direction",Xc),m.addGetterSetter(wt,"fontFamily","Arial"),m.addGetterSetter(wt,"fontSize",12,$()),m.addGetterSetter(wt,"fontStyle",Kc),m.addGetterSetter(wt,"fontVariant",Kc),m.addGetterSetter(wt,"padding",0,$()),m.addGetterSetter(wt,"align",Yc),m.addGetterSetter(wt,"verticalAlign",Gg),m.addGetterSetter(wt,"lineHeight",1,$()),m.addGetterSetter(wt,"wrap",Wg),m.addGetterSetter(wt,"ellipsis",!1,_e()),m.addGetterSetter(wt,"letterSpacing",0,$()),m.addGetterSetter(wt,"text","",Ci()),m.addGetterSetter(wt,"textDecoration",""),m.addGetterSetter(wt,"charRenderFunc",void 0);const Kg="",th="normal";function eh(e){e.fillText(this.partialText,0,0)}function ih(e){e.strokeText(this.partialText,0,0)}class Dt extends V{constructor(t){super(t),this.dummyCanvas=E.createCanvasElement(),this.dataArray=[],this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute(),this._setTextData()}),this.on("textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncChange.konva fontSizeChange.konva fontFamilyChange.konva",this._setTextData),this._setTextData()}_getTextPathLength(){return St.getPathLength(this.dataArray)}_getPointAtLength(t){if(!this.attrs.data)return null;const i=this.pathLength;return t>i?null:St.getPointAtLengthOfDataArray(t,this.dataArray)}_readDataAttribute(){this.dataArray=St.parsePathData(this.attrs.data),this.pathLength=this._getTextPathLength()}_sceneFunc(t){t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",this.textBaseline()),t.setAttr("textAlign","left"),t.save();const i=this.textDecoration(),n=this.fill(),s=this.fontSize(),r=this.glyphInfo,o=i.indexOf("underline")!==-1,a=i.indexOf("line-through")!==-1;o&&t.beginPath();for(let l=0;l<r.length;l++){t.save();const c=r[l].p0;t.translate(c.x,c.y),t.rotate(r[l].rotation),this.partialText=r[l].text,t.fillStrokeShape(this),o&&(l===0&&t.moveTo(0,s/2+1),t.lineTo(r[l].width,s/2+1)),t.restore()}if(o&&(t.strokeStyle=n,t.lineWidth=s/20,t.stroke()),a){t.beginPath();for(let l=0;l<r.length;l++){t.save();const c=r[l].p0;t.translate(c.x,c.y),t.rotate(r[l].rotation),l===0&&t.moveTo(0,0),t.lineTo(r[l].width,0),t.restore()}t.strokeStyle=n,t.lineWidth=s/20,t.stroke()}t.restore()}_hitFunc(t){t.beginPath();const i=this.glyphInfo;if(i.length>=1){const n=i[0].p0;t.moveTo(n.x,n.y)}for(let n=0;n<i.length;n++){const s=i[n].p1;t.lineTo(s.x,s.y)}t.setAttr("lineWidth",this.fontSize()),t.setAttr("strokeStyle",this.colorKey),t.stroke()}getTextWidth(){return this.textWidth}getTextHeight(){return E.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}setText(t){return wt.prototype.setText.call(this,t)}_getContextFont(){return wt.prototype._getContextFont.call(this)}_getTextSize(t){const n=this.dummyCanvas.getContext("2d");n.save(),n.font=this._getContextFont();const s=n.measureText(t);return n.restore(),{width:s.width,height:parseInt(`${this.fontSize()}`,10)}}_setTextData(){const t=ai(this.text()),i=[];let n=0;for(let d=0;d<t.length;d++)i.push({char:t[d],width:this._getTextSize(t[d]).width}),n+=i[d].width;const{height:s}=this._getTextSize(this.attrs.text);if(this.textWidth=n,this.textHeight=s,this.glyphInfo=[],!this.attrs.data)return null;const r=this.letterSpacing(),o=this.align(),a=this.kerningFunc(),l=Math.max(this.textWidth+((this.attrs.text||"").length-1)*r,0);let c=0;o==="center"&&(c=Math.max(0,this.pathLength/2-l/2)),o==="right"&&(c=Math.max(0,this.pathLength-l));let h=c;for(let d=0;d<i.length;d++){const u=this._getPointAtLength(h);if(!u)return;const f=i[d].char;let p=i[d].width+r;if(f===" "&&o==="justify"){const N=this.text().split(" ").length-1;p+=(this.pathLength-l)/N}const _=this._getPointAtLength(h+p);if(!_)return;const b=St.getLineLength(u.x,u.y,_.x,_.y);let S=0;if(a)try{S=a(i[d-1].char,f)*this.fontSize()}catch{S=0}u.x+=S,_.x+=S,this.textWidth+=S;const y=St.getPointOnLine(S+b/2,u.x,u.y,_.x,_.y),C=Math.atan2(_.y-u.y,_.x-u.x);this.glyphInfo.push({transposeX:y.x,transposeY:y.y,text:t[d],rotation:C,p0:u,p1:_,width:b}),h+=p}}getSelfRect(){if(!this.glyphInfo.length)return{x:0,y:0,width:0,height:0};const t=[];this.glyphInfo.forEach(function(c){t.push(c.p0.x),t.push(c.p0.y),t.push(c.p1.x),t.push(c.p1.y)});let i=t[0]||0,n=t[0]||0,s=t[1]||0,r=t[1]||0,o,a;for(let c=0;c<t.length/2;c++)o=t[c*2],a=t[c*2+1],i=Math.min(i,o),n=Math.max(n,o),s=Math.min(s,a),r=Math.max(r,a);const l=this.fontSize();return{x:i-l/2,y:s-l/2,width:n-i+l,height:r-s+l}}destroy(){return E.releaseCanvas(this.dummyCanvas),super.destroy()}}Dt.prototype._fillFunc=eh,Dt.prototype._strokeFunc=ih,Dt.prototype._fillFuncHit=eh,Dt.prototype._strokeFuncHit=ih,Dt.prototype.className="TextPath",Dt.prototype._attrsAffectingSize=["text","fontSize","data"],kt(Dt),m.addGetterSetter(Dt,"data"),m.addGetterSetter(Dt,"fontFamily","Arial"),m.addGetterSetter(Dt,"fontSize",12,$()),m.addGetterSetter(Dt,"fontStyle",th),m.addGetterSetter(Dt,"align","left"),m.addGetterSetter(Dt,"letterSpacing",0,$()),m.addGetterSetter(Dt,"textBaseline","middle"),m.addGetterSetter(Dt,"fontVariant",th),m.addGetterSetter(Dt,"text",Kg),m.addGetterSetter(Dt,"textDecoration",""),m.addGetterSetter(Dt,"kerningFunc",void 0);const nh="tr-konva",Jg=["resizeEnabledChange","rotateAnchorOffsetChange","rotateEnabledChange","enabledAnchorsChange","anchorSizeChange","borderEnabledChange","borderStrokeChange","borderStrokeWidthChange","borderDashChange","anchorStrokeChange","anchorStrokeWidthChange","anchorFillChange","anchorCornerRadiusChange","ignoreStrokeChange","anchorStyleFuncChange"].map(e=>e+`.${nh}`).join(" "),sh="nodesRect",Qg=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange","draggableChange"],Zg={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135},t1="ontouchstart"in X._global;function e1(e,t,i){if(e==="rotater")return i;t+=E.degToRad(Zg[e]||0);const n=(E.radToDeg(t)%360+360)%360;return E._inRange(n,315+22.5,360)||E._inRange(n,0,22.5)?"ns-resize":E._inRange(n,45-22.5,45+22.5)?"nesw-resize":E._inRange(n,90-22.5,90+22.5)?"ew-resize":E._inRange(n,135-22.5,135+22.5)?"nwse-resize":E._inRange(n,180-22.5,180+22.5)?"ns-resize":E._inRange(n,225-22.5,225+22.5)?"nesw-resize":E._inRange(n,270-22.5,270+22.5)?"ew-resize":E._inRange(n,315-22.5,315+22.5)?"nwse-resize":(E.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}const tr=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"];function i1(e){return{x:e.x+e.width/2*Math.cos(e.rotation)+e.height/2*Math.sin(-e.rotation),y:e.y+e.height/2*Math.cos(e.rotation)+e.width/2*Math.sin(e.rotation)}}function rh(e,t,i){const n=i.x+(e.x-i.x)*Math.cos(t)-(e.y-i.y)*Math.sin(t),s=i.y+(e.x-i.x)*Math.sin(t)+(e.y-i.y)*Math.cos(t);return{...e,rotation:e.rotation+t,x:n,y:s}}function n1(e,t){const i=i1(e);return rh(e,t,i)}function s1(e,t,i){let n=t;for(let s=0;s<e.length;s++){const r=X.getAngle(e[s]),o=Math.abs(r-t)%(Math.PI*2);Math.min(o,Math.PI*2-o)<i&&(n=r)}return n}let Oo=0;class lt extends Yi{constructor(t){super(t),this._movingAnchorName=null,this._transforming=!1,this._createElements(),this._handleMouseMove=this._handleMouseMove.bind(this),this._handleMouseUp=this._handleMouseUp.bind(this),this.update=this.update.bind(this),this.on(Jg,this.update),this.getNode()&&this.update()}attachTo(t){return this.setNode(t),this}setNode(t){return E.warn("tr.setNode(shape), tr.node(shape) and tr.attachTo(shape) methods are deprecated. Please use tr.nodes(nodesArray) instead."),this.setNodes([t])}getNode(){return this._nodes&&this._nodes[0]}_getEventNamespace(){return nh+this._id}setNodes(t=[]){this._nodes&&this._nodes.length&&this.detach();const i=t.filter(s=>s.isAncestorOf(this)?(E.error("Konva.Transformer cannot be an a child of the node you are trying to attach"),!1):!0);return this._nodes=t=i,t.length===1&&this.useSingleNodeRotation()?this.rotation(t[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach(s=>{const r=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()};if(s._attrsAffectingSize.length){const o=s._attrsAffectingSize.map(a=>a+"Change."+this._getEventNamespace()).join(" ");s.on(o,r)}s.on(Qg.map(o=>o+`.${this._getEventNamespace()}`).join(" "),r),s.on(`absoluteTransformChange.${this._getEventNamespace()}`,r),this._proxyDrag(s)}),this._resetTransformCache(),!!this.findOne(".top-left")&&this.update(),this}_proxyDrag(t){let i;t.on(`dragstart.${this._getEventNamespace()}`,n=>{i=t.getAbsolutePosition(),!this.isDragging()&&t!==this.findOne(".back")&&this.startDrag(n,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,n=>{if(!i)return;const s=t.getAbsolutePosition(),r=s.x-i.x,o=s.y-i.y;this.nodes().forEach(a=>{if(a===t||a.isDragging())return;const l=a.getAbsolutePosition();a.setAbsolutePosition({x:l.x+r,y:l.y+o}),a.startDrag(n)}),i=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(sh),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(sh,this.__getNodeRect)}__getNodeShape(t,i=this.rotation(),n){const s=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),r=t.getAbsoluteScale(n),o=t.getAbsolutePosition(n),a=s.x*r.x-t.offsetX()*r.x,l=s.y*r.y-t.offsetY()*r.y,c=(X.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),h={x:o.x+a*Math.cos(c)+l*Math.sin(-c),y:o.y+l*Math.cos(c)+a*Math.sin(c),width:s.width*r.x,height:s.height*r.y,rotation:c};return rh(h,-X.getAngle(i),{x:0,y:0})}__getNodeRect(){if(!this.getNode())return{x:-1e8,y:-1e8,width:0,height:0,rotation:0};const i=[];this.nodes().map(c=>{const h=c.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),d=[{x:h.x,y:h.y},{x:h.x+h.width,y:h.y},{x:h.x+h.width,y:h.y+h.height},{x:h.x,y:h.y+h.height}],u=c.getAbsoluteTransform();d.forEach(function(f){const p=u.point(f);i.push(p)})});const n=new ne;n.rotate(-X.getAngle(this.rotation()));let s=1/0,r=1/0,o=-1/0,a=-1/0;i.forEach(function(c){const h=n.point(c);s===void 0&&(s=o=h.x,r=a=h.y),s=Math.min(s,h.x),r=Math.min(r,h.y),o=Math.max(o,h.x),a=Math.max(a,h.y)}),n.invert();const l=n.point({x:s,y:r});return{x:l.x,y:l.y,width:o-s,height:a-r,rotation:X.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),tr.forEach(t=>{this._createAnchor(t)}),this._createAnchor("rotater")}_createAnchor(t){const i=new Un({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:t1?10:"auto"}),n=this;i.on("mousedown touchstart",function(s){n._handleMouseDown(s)}),i.on("dragstart",s=>{i.stopDrag(),s.cancelBubble=!0}),i.on("dragend",s=>{s.cancelBubble=!0}),i.on("mouseenter",()=>{const s=X.getAngle(this.rotation()),r=this.rotateAnchorCursor(),o=e1(t,s,r);i.getStage().content&&(i.getStage().content.style.cursor=o),this._cursorChange=!0}),i.on("mouseout",()=>{i.getStage().content&&(i.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(i)}_createBack(){const t=new V({name:"back",width:0,height:0,sceneFunc(i,n){const s=n.getParent(),r=s.padding();i.beginPath(),i.rect(-r,-r,n.width()+r*2,n.height()+r*2),i.moveTo(n.width()/2,-r),s.rotateEnabled()&&s.rotateLineVisible()&&i.lineTo(n.width()/2,-s.rotateAnchorOffset()*E._sign(n.height())-r),i.fillStrokeShape(n)},hitFunc:(i,n)=>{if(!this.shouldOverdrawWholeArea())return;const s=this.padding();i.beginPath(),i.rect(-s,-s,n.width()+s*2,n.height()+s*2),i.fillStrokeShape(n)}});this.add(t),this._proxyDrag(t),t.on("dragstart",i=>{i.cancelBubble=!0}),t.on("dragmove",i=>{i.cancelBubble=!0}),t.on("dragend",i=>{i.cancelBubble=!0}),this.on("dragmove",i=>{this.update()})}_handleMouseDown(t){if(this._transforming)return;this._movingAnchorName=t.target.name().split(" ")[0];const i=this._getNodeRect(),n=i.width,s=i.height,r=Math.sqrt(Math.pow(n,2)+Math.pow(s,2));this.sin=Math.abs(s/r),this.cos=Math.abs(n/r),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;const o=t.target.getAbsolutePosition(),a=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:a.x-o.x,y:a.y-o.y},Oo++,this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(l=>{l._fire("transformstart",{evt:t.evt,target:l})})}_handleMouseMove(t){let i,n,s;const r=this.findOne("."+this._movingAnchorName),o=r.getStage();o.setPointersPositions(t);const a=o.getPointerPosition();let l={x:a.x-this._anchorDragOffset.x,y:a.y-this._anchorDragOffset.y};const c=r.getAbsolutePosition();this.anchorDragBoundFunc()&&(l=this.anchorDragBoundFunc()(c,l,t)),r.setAbsolutePosition(l);const h=r.getAbsolutePosition();if(c.x===h.x&&c.y===h.y)return;if(this._movingAnchorName==="rotater"){const y=this._getNodeRect();i=r.x()-y.width/2,n=-r.y()+y.height/2;let C=Math.atan2(-n,i)+Math.PI/2;y.height<0&&(C-=Math.PI);const T=X.getAngle(this.rotation())+C,O=X.getAngle(this.rotationSnapTolerance()),x=s1(this.rotationSnaps(),T,O)-y.rotation,P=n1(y,x);this._fitNodesInto(P,t);return}const d=this.shiftBehavior();let u;d==="inverted"?u=this.keepRatio()&&!t.shiftKey:d==="none"?u=this.keepRatio():u=this.keepRatio()||t.shiftKey;let f=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(u){const y=f?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};s=Math.sqrt(Math.pow(y.x-r.x(),2)+Math.pow(y.y-r.y(),2));const C=this.findOne(".top-left").x()>y.x?-1:1,N=this.findOne(".top-left").y()>y.y?-1:1;i=s*this.cos*C,n=s*this.sin*N,this.findOne(".top-left").x(y.x-i),this.findOne(".top-left").y(y.y-n)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(r.y());else if(this._movingAnchorName==="top-right"){if(u){const y=f?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};s=Math.sqrt(Math.pow(r.x()-y.x,2)+Math.pow(y.y-r.y(),2));const C=this.findOne(".top-right").x()<y.x?-1:1,N=this.findOne(".top-right").y()>y.y?-1:1;i=s*this.cos*C,n=s*this.sin*N,this.findOne(".top-right").x(y.x+i),this.findOne(".top-right").y(y.y-n)}var p=r.position();this.findOne(".top-left").y(p.y),this.findOne(".bottom-right").x(p.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(r.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(r.x());else if(this._movingAnchorName==="bottom-left"){if(u){const y=f?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};s=Math.sqrt(Math.pow(y.x-r.x(),2)+Math.pow(r.y()-y.y,2));const C=y.x<r.x()?-1:1,N=r.y()<y.y?-1:1;i=s*this.cos*C,n=s*this.sin*N,r.x(y.x-i),r.y(y.y+n)}p=r.position(),this.findOne(".top-left").x(p.x),this.findOne(".bottom-right").y(p.y)}else if(this._movingAnchorName==="bottom-center")this.findOne(".bottom-right").y(r.y());else if(this._movingAnchorName==="bottom-right"){if(u){const y=f?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-left").x(),y:this.findOne(".top-left").y()};s=Math.sqrt(Math.pow(r.x()-y.x,2)+Math.pow(r.y()-y.y,2));const C=this.findOne(".bottom-right").x()<y.x?-1:1,N=this.findOne(".bottom-right").y()<y.y?-1:1;i=s*this.cos*C,n=s*this.sin*N,this.findOne(".bottom-right").x(y.x+i),this.findOne(".bottom-right").y(y.y+n)}}else console.error(new Error("Wrong position argument of selection resizer: "+this._movingAnchorName));if(f=this.centeredScaling()||t.altKey,f){const y=this.findOne(".top-left"),C=this.findOne(".bottom-right"),N=y.x(),T=y.y(),O=this.getWidth()-C.x(),w=this.getHeight()-C.y();C.move({x:-N,y:-T}),y.move({x:O,y:w})}const _=this.findOne(".top-left").getAbsolutePosition();i=_.x,n=_.y;const b=this.findOne(".bottom-right").x()-this.findOne(".top-left").x(),S=this.findOne(".bottom-right").y()-this.findOne(".top-left").y();this._fitNodesInto({x:i,y:n,width:b,height:S,rotation:X.getAngle(this.rotation())},t)}_handleMouseUp(t){this._removeEvents(t)}getAbsoluteTransform(){return this.getTransform()}_removeEvents(t){var i;if(this._transforming){this._transforming=!1,typeof window<"u"&&(window.removeEventListener("mousemove",this._handleMouseMove),window.removeEventListener("touchmove",this._handleMouseMove),window.removeEventListener("mouseup",this._handleMouseUp,!0),window.removeEventListener("touchend",this._handleMouseUp,!0));const n=this.getNode();Oo--,this._fire("transformend",{evt:t,target:n}),(i=this.getLayer())===null||i===void 0||i.batchDraw(),n&&this._nodes.forEach(s=>{var r;s._fire("transformend",{evt:t,target:s}),(r=s.getLayer())===null||r===void 0||r.batchDraw()}),this._movingAnchorName=null}}_fitNodesInto(t,i){const n=this._getNodeRect(),s=1;if(E._inRange(t.width,-this.padding()*2-s,s)){this.update();return}if(E._inRange(t.height,-this.padding()*2-s,s)){this.update();return}const r=new ne;if(r.rotate(X.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const u=r.point({x:-this.padding()*2,y:0});t.x+=u.x,t.y+=u.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=u.x,this._anchorDragOffset.y-=u.y}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const u=r.point({x:this.padding()*2,y:0});this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=u.x,this._anchorDragOffset.y-=u.y,t.width+=this.padding()*2}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const u=r.point({x:0,y:-this.padding()*2});t.x+=u.x,t.y+=u.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=u.x,this._anchorDragOffset.y-=u.y,t.height+=this.padding()*2}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const u=r.point({x:0,y:this.padding()*2});this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=u.x,this._anchorDragOffset.y-=u.y,t.height+=this.padding()*2}if(this.boundBoxFunc()){const u=this.boundBoxFunc()(n,t);u?t=u:E.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const o=1e7,a=new ne;a.translate(n.x,n.y),a.rotate(n.rotation),a.scale(n.width/o,n.height/o);const l=new ne,c=t.width/o,h=t.height/o;this.flipEnabled()===!1?(l.translate(t.x,t.y),l.rotate(t.rotation),l.translate(t.width<0?t.width:0,t.height<0?t.height:0),l.scale(Math.abs(c),Math.abs(h))):(l.translate(t.x,t.y),l.rotate(t.rotation),l.scale(c,h));const d=l.multiply(a.invert());this._nodes.forEach(u=>{var f;if(!u.getStage())return;const p=u.getParent().getAbsoluteTransform(),_=u.getTransform().copy();_.translate(u.offsetX(),u.offsetY());const b=new ne;b.multiply(p.copy().invert()).multiply(d).multiply(p).multiply(_);const S=b.decompose();u.setAttrs(S),(f=u.getLayer())===null||f===void 0||f.batchDraw()}),this.rotation(E._getRotation(t.rotation)),this._nodes.forEach(u=>{this._fire("transform",{evt:i,target:u}),u._fire("transform",{evt:i,target:u})}),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,i){this.findOne(t).setAttrs(i)}update(){var t;const i=this._getNodeRect();this.rotation(E._getRotation(i.rotation));const n=i.width,s=i.height,r=this.enabledAnchors(),o=this.resizeEnabled(),a=this.padding(),l=this.anchorSize(),c=this.find("._anchor");c.forEach(d=>{d.setAttrs({width:l,height:l,offsetX:l/2,offsetY:l/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:l/2+a,offsetY:l/2+a,visible:o&&r.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:n/2,y:0,offsetY:l/2+a,visible:o&&r.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:n,y:0,offsetX:l/2-a,offsetY:l/2+a,visible:o&&r.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:s/2,offsetX:l/2+a,visible:o&&r.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:n,y:s/2,offsetX:l/2-a,visible:o&&r.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:s,offsetX:l/2+a,offsetY:l/2-a,visible:o&&r.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:n/2,y:s,offsetY:l/2-a,visible:o&&r.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:n,y:s,offsetX:l/2-a,offsetY:l/2-a,visible:o&&r.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:n/2,y:-this.rotateAnchorOffset()*E._sign(s)-a,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:n,height:s,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),draggable:this.nodes().some(d=>d.draggable()),x:0,y:0});const h=this.anchorStyleFunc();h&&c.forEach(d=>{h(d)}),(t=this.getLayer())===null||t===void 0||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();const t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),Yi.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return G.prototype.toObject.call(this)}clone(t){return G.prototype.clone.call(this,t)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}lt.isTransforming=()=>Oo>0;function r1(e){return e instanceof Array||E.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){tr.indexOf(t)===-1&&E.warn("Unknown anchor name: "+t+". Available names are: "+tr.join(", "))}),e||[]}lt.prototype.className="Transformer",kt(lt),m.addGetterSetter(lt,"enabledAnchors",tr,r1),m.addGetterSetter(lt,"flipEnabled",!0,_e()),m.addGetterSetter(lt,"resizeEnabled",!0),m.addGetterSetter(lt,"anchorSize",10,$()),m.addGetterSetter(lt,"rotateEnabled",!0),m.addGetterSetter(lt,"rotateLineVisible",!0),m.addGetterSetter(lt,"rotationSnaps",[]),m.addGetterSetter(lt,"rotateAnchorOffset",50,$()),m.addGetterSetter(lt,"rotateAnchorCursor","crosshair"),m.addGetterSetter(lt,"rotationSnapTolerance",5,$()),m.addGetterSetter(lt,"borderEnabled",!0),m.addGetterSetter(lt,"anchorStroke","rgb(0, 161, 255)"),m.addGetterSetter(lt,"anchorStrokeWidth",1,$()),m.addGetterSetter(lt,"anchorFill","white"),m.addGetterSetter(lt,"anchorCornerRadius",0,$()),m.addGetterSetter(lt,"borderStroke","rgb(0, 161, 255)"),m.addGetterSetter(lt,"borderStrokeWidth",1,$()),m.addGetterSetter(lt,"borderDash"),m.addGetterSetter(lt,"keepRatio",!0),m.addGetterSetter(lt,"shiftBehavior","default"),m.addGetterSetter(lt,"centeredScaling",!1),m.addGetterSetter(lt,"ignoreStroke",!1),m.addGetterSetter(lt,"padding",0,$()),m.addGetterSetter(lt,"nodes"),m.addGetterSetter(lt,"node"),m.addGetterSetter(lt,"boundBoxFunc"),m.addGetterSetter(lt,"anchorDragBoundFunc"),m.addGetterSetter(lt,"anchorStyleFunc"),m.addGetterSetter(lt,"shouldOverdrawWholeArea",!1),m.addGetterSetter(lt,"useSingleNodeRotation",!0),m.backCompat(lt,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class Ue extends V{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,X.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Ue.prototype.className="Wedge",Ue.prototype._centroid=!0,Ue.prototype._attrsAffectingSize=["radius"],kt(Ue),m.addGetterSetter(Ue,"radius",0,$()),m.addGetterSetter(Ue,"angle",0,$()),m.addGetterSetter(Ue,"clockwise",!1),m.backCompat(Ue,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function oh(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}const o1=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],a1=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function l1(e,t){const i=e.data,n=e.width,s=e.height;let r,o,a,l,c,h,d,u,f,p,_,b,S,y,C,N,T,O,w,x;const P=t+t+1,B=n-1,K=s-1,z=t+1,Z=z*(z+1)/2,J=new oh,A=o1[t],L=a1[t];let H=null,D=J,nt=null,ct=null;for(let ot=1;ot<P;ot++)D=D.next=new oh,ot===z&&(H=D);D.next=J,a=o=0;for(let ot=0;ot<s;ot++){b=S=y=C=l=c=h=d=0,u=z*(N=i[o]),f=z*(T=i[o+1]),p=z*(O=i[o+2]),_=z*(w=i[o+3]),l+=Z*N,c+=Z*T,h+=Z*O,d+=Z*w,D=J;for(let gt=0;gt<z;gt++)D.r=N,D.g=T,D.b=O,D.a=w,D=D.next;for(let gt=1;gt<z;gt++)r=o+((B<gt?B:gt)<<2),l+=(D.r=N=i[r])*(x=z-gt),c+=(D.g=T=i[r+1])*x,h+=(D.b=O=i[r+2])*x,d+=(D.a=w=i[r+3])*x,b+=N,S+=T,y+=O,C+=w,D=D.next;nt=J,ct=H;for(let gt=0;gt<n;gt++)i[o+3]=w=d*A>>L,w!==0?(w=255/w,i[o]=(l*A>>L)*w,i[o+1]=(c*A>>L)*w,i[o+2]=(h*A>>L)*w):i[o]=i[o+1]=i[o+2]=0,l-=u,c-=f,h-=p,d-=_,u-=nt.r,f-=nt.g,p-=nt.b,_-=nt.a,r=a+((r=gt+t+1)<B?r:B)<<2,b+=nt.r=i[r],S+=nt.g=i[r+1],y+=nt.b=i[r+2],C+=nt.a=i[r+3],l+=b,c+=S,h+=y,d+=C,nt=nt.next,u+=N=ct.r,f+=T=ct.g,p+=O=ct.b,_+=w=ct.a,b-=N,S-=T,y-=O,C-=w,ct=ct.next,o+=4;a+=n}for(let ot=0;ot<n;ot++){S=y=C=b=c=h=d=l=0,o=ot<<2,u=z*(N=i[o]),f=z*(T=i[o+1]),p=z*(O=i[o+2]),_=z*(w=i[o+3]),l+=Z*N,c+=Z*T,h+=Z*O,d+=Z*w,D=J;for(let Ot=0;Ot<z;Ot++)D.r=N,D.g=T,D.b=O,D.a=w,D=D.next;let gt=n;for(let Ot=1;Ot<=t;Ot++)o=gt+ot<<2,l+=(D.r=N=i[o])*(x=z-Ot),c+=(D.g=T=i[o+1])*x,h+=(D.b=O=i[o+2])*x,d+=(D.a=w=i[o+3])*x,b+=N,S+=T,y+=O,C+=w,D=D.next,Ot<K&&(gt+=n);o=ot,nt=J,ct=H;for(let Ot=0;Ot<s;Ot++)r=o<<2,i[r+3]=w=d*A>>L,w>0?(w=255/w,i[r]=(l*A>>L)*w,i[r+1]=(c*A>>L)*w,i[r+2]=(h*A>>L)*w):i[r]=i[r+1]=i[r+2]=0,l-=u,c-=f,h-=p,d-=_,u-=nt.r,f-=nt.g,p-=nt.b,_-=nt.a,r=ot+((r=Ot+z)<K?r:K)*n<<2,l+=b+=nt.r=i[r],c+=S+=nt.g=i[r+1],h+=y+=nt.b=i[r+2],d+=C+=nt.a=i[r+3],nt=nt.next,u+=N=ct.r,f+=T=ct.g,p+=O=ct.b,_+=w=ct.a,b-=N,S-=T,y-=O,C-=w,ct=ct.next,o+=n}}const c1=function(t){const i=Math.round(this.blurRadius());i>0&&l1(t,i)};m.addGetterSetter(G,"blurRadius",0,$(),m.afterSetFilter);const h1=function(e){const t=this.brightness()*255,i=e.data,n=i.length;for(let s=0;s<n;s+=4)i[s]+=t,i[s+1]+=t,i[s+2]+=t};m.addGetterSetter(G,"brightness",0,$(),m.afterSetFilter);const d1=function(e){const t=this.brightness(),i=e.data,n=i.length;for(let s=0;s<n;s+=4)i[s]=Math.min(255,i[s]*t),i[s+1]=Math.min(255,i[s+1]*t),i[s+2]=Math.min(255,i[s+2]*t)},u1=function(e){const t=Math.pow((this.contrast()+100)/100,2),i=e.data,n=i.length;let s=150,r=150,o=150;for(let a=0;a<n;a+=4)s=i[a],r=i[a+1],o=i[a+2],s/=255,s-=.5,s*=t,s+=.5,s*=255,r/=255,r-=.5,r*=t,r+=.5,r*=255,o/=255,o-=.5,o*=t,o+=.5,o*=255,s=s<0?0:s>255?255:s,r=r<0?0:r>255?255:r,o=o<0?0:o>255?255:o,i[a]=s,i[a+1]=r,i[a+2]=o};m.addGetterSetter(G,"contrast",0,$(),m.afterSetFilter);const f1=function(e){var t,i,n,s,r,o,a,l,c;const h=e.data,d=e.width,u=e.height,f=Math.min(1,Math.max(0,(i=(t=this.embossStrength)===null||t===void 0?void 0:t.call(this))!==null&&i!==void 0?i:.5)),p=Math.min(1,Math.max(0,(s=(n=this.embossWhiteLevel)===null||n===void 0?void 0:n.call(this))!==null&&s!==void 0?s:.5)),b=(a={"top-left":315,top:270,"top-right":225,right:180,"bottom-right":135,bottom:90,"bottom-left":45,left:0}[(o=(r=this.embossDirection)===null||r===void 0?void 0:r.call(this))!==null&&o!==void 0?o:"top-left"])!==null&&a!==void 0?a:315,S=!!((c=(l=this.embossBlend)===null||l===void 0?void 0:l.call(this))!==null&&c!==void 0&&c),y=f*10,C=p*255,N=b*Math.PI/180,T=Math.cos(N),O=Math.sin(N),w=128/1020*y,x=new Uint8ClampedArray(h),P=new Float32Array(d*u);for(let J=0,A=0;A<h.length;A+=4,J++)P[J]=.2126*x[A]+.7152*x[A+1]+.0722*x[A+2];const B=[-1,0,1,-2,0,2,-1,0,1],K=[-1,-2,-1,0,0,0,1,2,1],z=[-d-1,-d,-d+1,-1,0,1,d-1,d,d+1],Z=J=>J<0?0:J>255?255:J;for(let J=1;J<u-1;J++)for(let A=1;A<d-1;A++){const L=J*d+A;let H=0,D=0;H+=P[L+z[0]]*B[0],D+=P[L+z[0]]*K[0],H+=P[L+z[1]]*B[1],D+=P[L+z[1]]*K[1],H+=P[L+z[2]]*B[2],D+=P[L+z[2]]*K[2],H+=P[L+z[3]]*B[3],D+=P[L+z[3]]*K[3],H+=P[L+z[5]]*B[5],D+=P[L+z[5]]*K[5],H+=P[L+z[6]]*B[6],D+=P[L+z[6]]*K[6],H+=P[L+z[7]]*B[7],D+=P[L+z[7]]*K[7],H+=P[L+z[8]]*B[8],D+=P[L+z[8]]*K[8];const nt=T*H+O*D,ct=Z(C+nt*w),ot=L*4;if(S){const gt=ct-C;h[ot]=Z(x[ot]+gt),h[ot+1]=Z(x[ot+1]+gt),h[ot+2]=Z(x[ot+2]+gt),h[ot+3]=x[ot+3]}else h[ot]=h[ot+1]=h[ot+2]=ct,h[ot+3]=x[ot+3]}for(let J=0;J<d;J++){let A=J*4,L=((u-1)*d+J)*4;h[A]=x[A],h[A+1]=x[A+1],h[A+2]=x[A+2],h[A+3]=x[A+3],h[L]=x[L],h[L+1]=x[L+1],h[L+2]=x[L+2],h[L+3]=x[L+3]}for(let J=1;J<u-1;J++){let A=J*d*4,L=(J*d+(d-1))*4;h[A]=x[A],h[A+1]=x[A+1],h[A+2]=x[A+2],h[A+3]=x[A+3],h[L]=x[L],h[L+1]=x[L+1],h[L+2]=x[L+2],h[L+3]=x[L+3]}return e};m.addGetterSetter(G,"embossStrength",.5,$(),m.afterSetFilter),m.addGetterSetter(G,"embossWhiteLevel",.5,$(),m.afterSetFilter),m.addGetterSetter(G,"embossDirection","top-left",void 0,m.afterSetFilter),m.addGetterSetter(G,"embossBlend",!1,void 0,m.afterSetFilter);function Po(e,t,i,n,s){const r=i-t,o=s-n;if(r===0)return n+o/2;if(o===0)return n;let a=(e-t)/r;return a=o*a+n,a}const p1=function(e){const t=e.data,i=t.length;let n=t[0],s=n,r,o=t[1],a=o,l,c=t[2],h=c,d;const u=this.enhance();if(u===0)return;for(let C=0;C<i;C+=4)r=t[C+0],r<n?n=r:r>s&&(s=r),l=t[C+1],l<o?o=l:l>a&&(a=l),d=t[C+2],d<c?c=d:d>h&&(h=d);s===n&&(s=255,n=0),a===o&&(a=255,o=0),h===c&&(h=255,c=0);let f,p,_,b,S,y;if(u>0)f=s+u*(255-s),p=n-u*(n-0),_=a+u*(255-a),b=o-u*(o-0),S=h+u*(255-h),y=c-u*(c-0);else{const C=(s+n)*.5;f=s+u*(s-C),p=n+u*(n-C);const N=(a+o)*.5;_=a+u*(a-N),b=o+u*(o-N);const T=(h+c)*.5;S=h+u*(h-T),y=c+u*(c-T)}for(let C=0;C<i;C+=4)t[C+0]=Po(t[C+0],n,s,p,f),t[C+1]=Po(t[C+1],o,a,b,_),t[C+2]=Po(t[C+2],c,h,y,S)};m.addGetterSetter(G,"enhance",0,$(),m.afterSetFilter);const g1=function(e){const t=e.data,i=t.length;for(let n=0;n<i;n+=4){const s=.34*t[n]+.5*t[n+1]+.16*t[n+2];t[n]=s,t[n+1]=s,t[n+2]=s}};m.addGetterSetter(G,"hue",0,$(),m.afterSetFilter),m.addGetterSetter(G,"saturation",0,$(),m.afterSetFilter),m.addGetterSetter(G,"luminance",0,$(),m.afterSetFilter);const m1=function(e){const t=e.data,i=t.length,n=1,s=Math.pow(2,this.saturation()),r=Math.abs(this.hue()+360)%360,o=this.luminance()*127,a=n*s*Math.cos(r*Math.PI/180),l=n*s*Math.sin(r*Math.PI/180),c=.299*n+.701*a+.167*l,h=.587*n-.587*a+.33*l,d=.114*n-.114*a-.497*l,u=.299*n-.299*a-.328*l,f=.587*n+.413*a+.035*l,p=.114*n-.114*a+.293*l,_=.299*n-.3*a+1.25*l,b=.587*n-.586*a-1.05*l,S=.114*n+.886*a-.2*l;let y,C,N,T;for(let O=0;O<i;O+=4)y=t[O+0],C=t[O+1],N=t[O+2],T=t[O+3],t[O+0]=c*y+h*C+d*N+o,t[O+1]=u*y+f*C+p*N+o,t[O+2]=_*y+b*C+S*N+o,t[O+3]=T},_1=function(e){const t=e.data,i=t.length,n=Math.pow(2,this.value()),s=Math.pow(2,this.saturation()),r=Math.abs(this.hue()+360)%360,o=n*s*Math.cos(r*Math.PI/180),a=n*s*Math.sin(r*Math.PI/180),l=.299*n+.701*o+.167*a,c=.587*n-.587*o+.33*a,h=.114*n-.114*o-.497*a,d=.299*n-.299*o-.328*a,u=.587*n+.413*o+.035*a,f=.114*n-.114*o+.293*a,p=.299*n-.3*o+1.25*a,_=.587*n-.586*o-1.05*a,b=.114*n+.886*o-.2*a;for(let S=0;S<i;S+=4){const y=t[S+0],C=t[S+1],N=t[S+2],T=t[S+3];t[S+0]=l*y+c*C+h*N,t[S+1]=d*y+u*C+f*N,t[S+2]=p*y+_*C+b*N,t[S+3]=T}};m.addGetterSetter(G,"hue",0,$(),m.afterSetFilter),m.addGetterSetter(G,"saturation",0,$(),m.afterSetFilter),m.addGetterSetter(G,"value",0,$(),m.afterSetFilter);const v1=function(e){const t=e.data,i=t.length;for(let n=0;n<i;n+=4)t[n]=255-t[n],t[n+1]=255-t[n+1],t[n+2]=255-t[n+2]},b1=function(e,t,i){const n=e.data,s=t.data,r=e.width,o=e.height,a=i.polarCenterX||r/2,l=i.polarCenterY||o/2;let c=Math.sqrt(a*a+l*l),h=r-a,d=o-l;const u=Math.sqrt(h*h+d*d);c=u>c?u:c;const f=o,p=r,_=360/p*Math.PI/180;for(let b=0;b<p;b+=1){const S=Math.sin(b*_),y=Math.cos(b*_);for(let C=0;C<f;C+=1){h=Math.floor(a+c*C/f*y),d=Math.floor(l+c*C/f*S);let N=(d*r+h)*4;const T=n[N+0],O=n[N+1],w=n[N+2],x=n[N+3];N=(b+C*r)*4,s[N+0]=T,s[N+1]=O,s[N+2]=w,s[N+3]=x}}},y1=function(e,t,i){const n=e.data,s=t.data,r=e.width,o=e.height,a=i.polarCenterX||r/2,l=i.polarCenterY||o/2;let c=Math.sqrt(a*a+l*l),h=r-a,d=o-l;const u=Math.sqrt(h*h+d*d);c=u>c?u:c;const f=o,p=r,_=0;let b,S;for(h=0;h<r;h+=1)for(d=0;d<o;d+=1){const y=h-a,C=d-l,N=Math.sqrt(y*y+C*C)*f/c;let T=(Math.atan2(C,y)*180/Math.PI+360+_)%360;T=T*p/360,b=Math.floor(T),S=Math.floor(N);let O=(S*r+b)*4;const w=n[O+0],x=n[O+1],P=n[O+2],B=n[O+3];O=(d*r+h)*4,s[O+0]=w,s[O+1]=x,s[O+2]=P,s[O+3]=B}},E1=function(e){const t=e.width,i=e.height;let n,s,r,o,a,l,c,h,d,u,f=Math.round(this.kaleidoscopePower());const p=Math.round(this.kaleidoscopeAngle()),_=Math.floor(t*(p%360)/360);if(f<1)return;const b=E.createCanvasElement();b.width=t,b.height=i;const S=b.getContext("2d").getImageData(0,0,t,i);E.releaseCanvas(b),b1(e,S,{polarCenterX:t/2,polarCenterY:i/2});let y=t/Math.pow(2,f);for(;y<=8;)y=y*2,f-=1;y=Math.ceil(y);let C=y,N=0,T=C,O=1;for(_+y>t&&(N=C,T=0,O=-1),s=0;s<i;s+=1)for(n=N;n!==T;n+=O)r=Math.round(n+_)%t,d=(t*s+r)*4,a=S.data[d+0],l=S.data[d+1],c=S.data[d+2],h=S.data[d+3],u=(t*s+n)*4,S.data[u+0]=a,S.data[u+1]=l,S.data[u+2]=c,S.data[u+3]=h;for(s=0;s<i;s+=1)for(C=Math.floor(y),o=0;o<f;o+=1){for(n=0;n<C+1;n+=1)d=(t*s+n)*4,a=S.data[d+0],l=S.data[d+1],c=S.data[d+2],h=S.data[d+3],u=(t*s+C*2-n-1)*4,S.data[u+0]=a,S.data[u+1]=l,S.data[u+2]=c,S.data[u+3]=h;C*=2}y1(S,e,{})};m.addGetterSetter(G,"kaleidoscopePower",2,$(),m.afterSetFilter),m.addGetterSetter(G,"kaleidoscopeAngle",0,$(),m.afterSetFilter);function er(e,t,i){let n=(i*e.width+t)*4;const s=[];return s.push(e.data[n++],e.data[n++],e.data[n++],e.data[n++]),s}function Xn(e,t){return Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)+Math.pow(e[2]-t[2],2))}function S1(e){const t=[0,0,0];for(let i=0;i<e.length;i++)t[0]+=e[i][0],t[1]+=e[i][1],t[2]+=e[i][2];return t[0]/=e.length,t[1]/=e.length,t[2]/=e.length,t}function w1(e,t){const i=er(e,0,0),n=er(e,e.width-1,0),s=er(e,0,e.height-1),r=er(e,e.width-1,e.height-1),o=t||10;if(Xn(i,n)<o&&Xn(n,r)<o&&Xn(r,s)<o&&Xn(s,i)<o){const a=S1([n,i,r,s]),l=[];for(let c=0;c<e.width*e.height;c++){const h=Xn(a,[e.data[c*4],e.data[c*4+1],e.data[c*4+2]]);l[c]=h<o?0:255}return l}}function x1(e,t){for(let i=0;i<e.width*e.height;i++)e.data[4*i+3]=t[i]}function C1(e,t,i){const n=[1,1,1,1,0,1,1,1,1],s=Math.round(Math.sqrt(n.length)),r=Math.floor(s/2),o=[];for(let a=0;a<i;a++)for(let l=0;l<t;l++){const c=a*t+l;let h=0;for(let d=0;d<s;d++)for(let u=0;u<s;u++){const f=a+d-r,p=l+u-r;if(f>=0&&f<i&&p>=0&&p<t){const _=f*t+p,b=n[d*s+u];h+=e[_]*b}}o[c]=h===2040?255:0}return o}function N1(e,t,i){const n=[1,1,1,1,1,1,1,1,1],s=Math.round(Math.sqrt(n.length)),r=Math.floor(s/2),o=[];for(let a=0;a<i;a++)for(let l=0;l<t;l++){const c=a*t+l;let h=0;for(let d=0;d<s;d++)for(let u=0;u<s;u++){const f=a+d-r,p=l+u-r;if(f>=0&&f<i&&p>=0&&p<t){const _=f*t+p,b=n[d*s+u];h+=e[_]*b}}o[c]=h>=1020?255:0}return o}function T1(e,t,i){const n=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],s=Math.round(Math.sqrt(n.length)),r=Math.floor(s/2),o=[];for(let a=0;a<i;a++)for(let l=0;l<t;l++){const c=a*t+l;let h=0;for(let d=0;d<s;d++)for(let u=0;u<s;u++){const f=a+d-r,p=l+u-r;if(f>=0&&f<i&&p>=0&&p<t){const _=f*t+p,b=n[d*s+u];h+=e[_]*b}}o[c]=h}return o}const k1=function(e){const t=this.threshold();let i=w1(e,t);return i&&(i=C1(i,e.width,e.height),i=N1(i,e.width,e.height),i=T1(i,e.width,e.height),x1(e,i)),e};m.addGetterSetter(G,"threshold",0,$(),m.afterSetFilter);const O1=function(e){const t=this.noise()*255,i=e.data,n=i.length,s=t/2;for(let r=0;r<n;r+=4)i[r+0]+=s-2*s*Math.random(),i[r+1]+=s-2*s*Math.random(),i[r+2]+=s-2*s*Math.random()};m.addGetterSetter(G,"noise",.2,$(),m.afterSetFilter);const P1=function(e){let t=Math.ceil(this.pixelSize()),i=e.width,n=e.height,s=Math.ceil(i/t),r=Math.ceil(n/t),o=e.data;if(t<=0){E.error("pixelSize value can not be <= 0");return}for(let a=0;a<s;a+=1)for(let l=0;l<r;l+=1){let c=0,h=0,d=0,u=0;const f=a*t,p=f+t,_=l*t,b=_+t;let S=0;for(let y=f;y<p;y+=1)if(!(y>=i))for(let C=_;C<b;C+=1){if(C>=n)continue;const N=(i*C+y)*4;c+=o[N+0],h+=o[N+1],d+=o[N+2],u+=o[N+3],S+=1}c=c/S,h=h/S,d=d/S,u=u/S;for(let y=f;y<p;y+=1)if(!(y>=i))for(let C=_;C<b;C+=1){if(C>=n)continue;const N=(i*C+y)*4;o[N+0]=c,o[N+1]=h,o[N+2]=d,o[N+3]=u}}};m.addGetterSetter(G,"pixelSize",8,$(),m.afterSetFilter);const A1=function(e){const t=Math.round(this.levels()*254)+1,i=e.data,n=i.length,s=255/t;for(let r=0;r<n;r+=1)i[r]=Math.floor(i[r]/s)*s};m.addGetterSetter(G,"levels",.5,$(),m.afterSetFilter);const R1=function(e){const t=e.data,i=t.length,n=this.red(),s=this.green(),r=this.blue();for(let o=0;o<i;o+=4){const a=(.34*t[o]+.5*t[o+1]+.16*t[o+2])/255;t[o]=a*n,t[o+1]=a*s,t[o+2]=a*r,t[o+3]=t[o+3]}};m.addGetterSetter(G,"red",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)}),m.addGetterSetter(G,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)}),m.addGetterSetter(G,"blue",0,cc,m.afterSetFilter);const M1=function(e){const t=e.data,i=t.length,n=this.red(),s=this.green(),r=this.blue(),o=this.alpha();for(let a=0;a<i;a+=4){const l=1-o;t[a]=n*o+t[a]*l,t[a+1]=s*o+t[a+1]*l,t[a+2]=r*o+t[a+2]*l}};m.addGetterSetter(G,"red",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)}),m.addGetterSetter(G,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)}),m.addGetterSetter(G,"blue",0,cc,m.afterSetFilter),m.addGetterSetter(G,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});const L1=function(e){const t=e.data,i=t.length;for(let n=0;n<i;n+=4){const s=t[n+0],r=t[n+1],o=t[n+2];t[n+0]=Math.min(255,s*.393+r*.769+o*.189),t[n+1]=Math.min(255,s*.349+r*.686+o*.168),t[n+2]=Math.min(255,s*.272+r*.534+o*.131)}},I1=function(e){const i=e.data;for(let n=0;n<i.length;n+=4){const s=i[n],r=i[n+1],o=i[n+2];.2126*s+.7152*r+.0722*o>=128&&(i[n]=255-s,i[n+1]=255-r,i[n+2]=255-o)}return e},D1=function(e){const t=this.threshold()*255,i=e.data,n=i.length;for(let s=0;s<n;s+=1)i[s]=i[s]<t?0:255};m.addGetterSetter(G,"threshold",.5,$(),m.afterSetFilter);const zn=Gc.Util._assign(Gc,{Arc:$e,Arrow:ki,Circle:qi,Ellipse:si,Image:re,Label:No,Tag:Oi,Line:We,Path:St,Rect:Un,RegularPolygon:ri,Ring:Pi,Sprite:ke,Star:oi,Text:wt,TextPath:Dt,Transformer:lt,Wedge:Ue,Filters:{Blur:c1,Brightness:d1,Brighten:h1,Contrast:u1,Emboss:f1,Enhance:p1,Grayscale:g1,HSL:m1,HSV:_1,Invert:v1,Kaleidoscope:E1,Mask:k1,Noise:O1,Pixelate:P1,Posterize:A1,RGB:R1,RGBA:M1,Sepia:L1,Solarize:I1,Threshold:D1}});function ir(e){if(!zn.autoDrawEnabled){const t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const ah={key:!0,style:!0,elm:!0,isRootInsert:!0},Ao=".vue-konva-event";function lh(e,t,i,n){const s=e.__konvaNode,r={};let o=!1;for(let a in i){if(ah.hasOwnProperty(a))continue;const l=a.slice(0,2)==="on",c=i[a]!==t[a];if(l&&c){let h=a.slice(2).toLowerCase();h.slice(0,7)==="content"&&(h="content"+h.slice(7,1).toUpperCase()+h.slice(8)),s?.off(h+Ao,i[a])}!t.hasOwnProperty(a)&&s?.setAttr(a,void 0)}for(let a in t){if(ah.hasOwnProperty(a))continue;let l=a.slice(0,2)==="on";const c=i[a]!==t[a];if(l&&c){let h=a.slice(2).toLowerCase();h.slice(0,7)==="content"&&(h="content"+h.slice(7,1).toUpperCase()+h.slice(8)),t[a]&&(s?.off(h+Ao),s?.on(h+Ao,t[a]))}!l&&(t[a]!==i[a]||n&&t[a]!==s?.getAttr(a))&&(o=!0,r[a]=t[a])}o&&s&&(s.setAttrs(r),ir(s))}const V1="v";function F1(e){function t(i){return i?.__konvaNode?i:i?.parent?t(i.parent):(console.error("vue-konva error: Can not find parent node"),null)}return t(e.parent)}function ch(e){return e.component?e.component.__konvaNode||ch(e.component.subTree):null}function G1(e){const{el:t,component:i}=e,n=ch(e);if(t?.tagName&&i&&!n){const s=t.tagName.toLowerCase();return console.error(`vue-konva error: You are trying to render "${s}" inside your component tree. Looks like it is not a Konva node. You can render only Konva components inside the Stage.`),null}return n}function B1(e){const t=s=>!!s&&typeof s=="object"&&"component"in s,i=s=>Array.isArray(s),n=s=>t(s)?[s,...n(s.children)]:i(s)?s.flatMap(n):[];return n(e.children)}function hh(e,t){const i=B1(e),n=[];i.forEach(r=>{const o=G1(r);o&&n.push(o)});let s=!1;n.forEach((r,o)=>{r.getZIndex()!==o&&(r.setZIndex(o),s=!0)}),s&&ir(t)}const H1=zn.default?.Stage||zn.Stage,$1=Le({name:"Stage",props:{config:{type:Object,default:function(){return{}}},__useStrictMode:{type:Boolean}},inheritAttrs:!1,setup(e,{attrs:t,slots:i,expose:n}){const s=Ps();if(!s)return;const r=cn({}),o=Xt(null),a=new H1({width:e.config.width,height:e.config.height,container:document.createElement("div")});s.__konvaNode=a,h();function l(){return s?.__konvaNode}function c(){return s?.__konvaNode}function h(){if(!s)return;const d=r||{},u={...t,...e.config};lh(s,u,d,e.__useStrictMode),Object.assign(r,u)}return Rr(()=>{o.value&&(o.value.innerHTML="",a.container(o.value)),h()}),Mr(()=>{h(),hh(s.subTree,a)}),Ca(()=>{a.destroy()}),bi(()=>e.config,h,{deep:!0}),n({getStage:c,getNode:l}),()=>ul("div",{ref:o,style:t?.style},i.default?.())}}),W1=".vue-konva-event",U1={Group:!0,Layer:!0,FastLayer:!0,Label:!0};function j1(e,t){return Le({name:e,props:{config:{type:Object,default:function(){return{}}},__useStrictMode:{type:Boolean}},setup(i,{attrs:n,slots:s,expose:r}){const o=Ps();if(!o)return;const a=cn({}),l=new t;o.__konvaNode=l,o.vnode.__konvaNode=l,d();function c(){return o?.__konvaNode}function h(){return o?.__konvaNode}function d(){if(!o)return;const f={};for(const b in o?.vnode.props)b.slice(0,2)==="on"&&(f[b]=o.vnode.props[b]);const p=a||{},_={...n,...i.config,...f};lh(o,_,p,i.__useStrictMode),Object.assign(a,_)}Rr(()=>{const f=F1(o)?.__konvaNode;f&&"add"in f&&f.add(l),ir(l)}),Lr(()=>{ir(l),l.destroy(),l.off(W1)}),Mr(()=>{d(),hh(o.subTree,l)}),bi(()=>i.config,d,{deep:!0}),r({getStage:h,getNode:c});const u=U1.hasOwnProperty(e);return()=>u?ul("template",{},s.default?.()):null}})}const dh={install:(e,t)=>{const i=t?.prefix||V1,n=zn.default||zn,s={Arc:n.Arc,Arrow:n.Arrow,Circle:n.Circle,Ellipse:n.Ellipse,FastLayer:n.FastLayer,Group:n.Group,Image:n.Image,Label:n.Label,Layer:n.Layer,Line:n.Line,Path:n.Path,Rect:n.Rect,RegularPolygon:n.RegularPolygon,Ring:n.Ring,Shape:n.Shape,Sprite:n.Sprite,Star:n.Star,Tag:n.Tag,Text:n.Text,TextPath:n.TextPath,Transformer:n.Transformer,Wedge:n.Wedge,...t?.customNodes};[$1,...Object.entries(s).map(([r,o])=>j1(r,o))].forEach(r=>{e.component(`${i}${r.name}`,r)})}},uh='@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-font-weight:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-yellow-200:oklch(94.5% .129 101.54);--color-gray-100:oklch(96.7% .003 264.542);--color-white:#fff;--spacing:.25rem;--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--font-weight-medium:500;--font-weight-bold:700;--radius-lg:.5rem;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-ott-accent:#68a691;--color-ott-text-primary:#2f2f2f;--color-ott-text-secondary:#a1a1a1;--color-ott-text-white:#fff;--color-ott-bg-primary:#fff;--color-ott-bg-secondary:#f3f3f3;--color-ott-bg-dark:#d3d3d3;--color-ott-error:#cd3c3c}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.visible{visibility:visible}.static{position:static}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-10{margin-bottom:calc(var(--spacing)*10)}.block{display:block}.flex{display:flex}.h-75{height:calc(var(--spacing)*75)}.h-full{height:100%}.w-1\\/3{width:33.3333%}.w-50{width:calc(var(--spacing)*50)}.w-fit{width:fit-content}.w-full{width:100%}.min-w-\\[150px\\]{min-width:150px}.flex-1{flex:1}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-2{gap:calc(var(--spacing)*2)}.gap-10{gap:calc(var(--spacing)*10)}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-ott-bg-dark{border-color:var(--color-ott-bg-dark)}.border-ott-error\\!{border-color:var(--color-ott-error)!important}.border-b-ott-bg-dark{border-bottom-color:var(--color-ott-bg-dark)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-ott-accent{background-color:var(--color-ott-accent)}.bg-ott-bg-primary{background-color:var(--color-ott-bg-primary)}.bg-white{background-color:var(--color-white)}.bg-yellow-200{background-color:var(--color-yellow-200)}.p-4{padding:calc(var(--spacing)*4)}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.text-ott-accent{color:var(--color-ott-accent)}.text-ott-error\\!{color:var(--color-ott-error)!important}.text-white{color:var(--color-white)}}html,body,#app,#__nuxt,:host{background-color:var(--color-ott-bg-secondary);width:100%;height:100%;color:var(--color-ott-text-primary);font-family:Poppins,sans-serif;font-style:normal;font-weight:400}button{cursor:pointer}h2{margin-block:calc(var(--spacing)*4);font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height));--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}main{width:100%;height:100%;max-height:100vh;display:block;overflow:auto}.ott-button{cursor:pointer;justify-content:center;align-items:center;gap:calc(var(--spacing)*5);border-radius:var(--radius-lg);border-style:var(--tw-border-style);border-width:2px;border-color:var(--color-ott-text-primary);height:fit-content;padding-inline:calc(var(--spacing)*4);padding-block:calc(var(--spacing)*1);--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium);color:var(--color-ott-text-primary);display:flex}.ott-button:disabled{cursor:default;border-color:var(--color-ott-bg-dark);color:var(--color-ott-bg-dark)}.ott-button-action{cursor:pointer;align-items:center;gap:calc(var(--spacing)*5);border-radius:var(--radius-lg);border-color:var(--color-ott-accent);background-color:var(--color-ott-accent);width:100%;height:fit-content;padding-inline:calc(var(--spacing)*4);padding-block:calc(var(--spacing)*1);--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium);color:var(--color-ott-text-white);display:flex}.ott-button-action:disabled{cursor:default;background-color:var(--color-ott-text-secondary)}input{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-ott-bg-dark);padding-inline:calc(var(--spacing)*3);padding-block:calc(var(--spacing)*1);border-radius:.25rem}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}',fh=kl(pp,{shadowRoot:!0,styles:[uh],configureApp(e){e.use(dh)}}),ph=kl(ic,{shadowRoot:!0,styles:[uh],configureApp(e){e.use(dh)}});return typeof customElements<"u"&&(customElements.get("deckplan-editor")||customElements.define("deckplan-editor",fh),customElements.get("deck-visualization")||customElements.define("deck-visualization",ph)),{DeckplanEditorElement:fh,DeckVisualizationElement:ph,parseNeTEx:nc}}));
|
|
29
|
+
`,sc=()=>{if(typeof document>"u")throw new Error(_p)};class ne{constructor(t=[1,0,0,1,0,0]){this.dirty=!1,this.m=t&&t.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new ne(this.m)}copyInto(t){t.m[0]=this.m[0],t.m[1]=this.m[1],t.m[2]=this.m[2],t.m[3]=this.m[3],t.m[4]=this.m[4],t.m[5]=this.m[5]}point(t){const i=this.m;return{x:i[0]*t.x+i[2]*t.y+i[4],y:i[1]*t.x+i[3]*t.y+i[5]}}translate(t,i){return this.m[4]+=this.m[0]*t+this.m[2]*i,this.m[5]+=this.m[1]*t+this.m[3]*i,this}scale(t,i){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=i,this.m[3]*=i,this}rotate(t){const i=Math.cos(t),n=Math.sin(t),s=this.m[0]*i+this.m[2]*n,r=this.m[1]*i+this.m[3]*n,o=this.m[0]*-n+this.m[2]*i,a=this.m[1]*-n+this.m[3]*i;return this.m[0]=s,this.m[1]=r,this.m[2]=o,this.m[3]=a,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(t,i){const n=this.m[0]+this.m[2]*i,s=this.m[1]+this.m[3]*i,r=this.m[2]+this.m[0]*t,o=this.m[3]+this.m[1]*t;return this.m[0]=n,this.m[1]=s,this.m[2]=r,this.m[3]=o,this}multiply(t){const i=this.m[0]*t.m[0]+this.m[2]*t.m[1],n=this.m[1]*t.m[0]+this.m[3]*t.m[1],s=this.m[0]*t.m[2]+this.m[2]*t.m[3],r=this.m[1]*t.m[2]+this.m[3]*t.m[3],o=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],a=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=i,this.m[1]=n,this.m[2]=s,this.m[3]=r,this.m[4]=o,this.m[5]=a,this}invert(){const t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),i=this.m[3]*t,n=-this.m[1]*t,s=-this.m[2]*t,r=this.m[0]*t,o=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),a=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=i,this.m[1]=n,this.m[2]=s,this.m[3]=r,this.m[4]=o,this.m[5]=a,this}getMatrix(){return this.m}decompose(){const t=this.m[0],i=this.m[1],n=this.m[2],s=this.m[3],r=this.m[4],o=this.m[5],a=t*s-i*n,l={x:r,y:o,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(t!=0||i!=0){const c=Math.sqrt(t*t+i*i);l.rotation=i>0?Math.acos(t/c):-Math.acos(t/c),l.scaleX=c,l.scaleY=a/c,l.skewX=(t*n+i*s)/a,l.skewY=0}else if(n!=0||s!=0){const c=Math.sqrt(n*n+s*s);l.rotation=Math.PI/2-(s>0?Math.acos(-n/c):-Math.acos(n/c)),l.scaleX=a/c,l.scaleY=c,l.skewX=0,l.skewY=(t*n+i*s)/a}return l.rotation=E._getRotation(l.rotation),l}}const vp="[object Array]",bp="[object Number]",yp="[object String]",Ep="[object Boolean]",Sp=Math.PI/180,wp=180/Math.PI,Pn="#",xp="",Cp="0",Np="Konva warning: ",rc="Konva error: ",Tp="rgb(",so={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},kp=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/;let Gs=[],An=null;const Op=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(e){setTimeout(e,60)},E={_isElement(e){return!!(e&&e.nodeType==1)},_isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},_isPlainObject(e){return!!e&&e.constructor===Object},_isArray(e){return Object.prototype.toString.call(e)===vp},_isNumber(e){return Object.prototype.toString.call(e)===bp&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===yp},_isBoolean(e){return Object.prototype.toString.call(e)===Ep},isObject(e){return e instanceof Object},isValidSelector(e){if(typeof e!="string")return!1;const t=e[0];return t==="#"||t==="."||t===t.toUpperCase()},_sign(e){return e===0||e>0?1:-1},requestAnimFrame(e){Gs.push(e),Gs.length===1&&Op(function(){const t=Gs;Gs=[],t.forEach(function(i){i()})})},createCanvasElement(){sc();const e=document.createElement("canvas");try{e.style=e.style||{}}catch{}return e},createImageElement(){return sc(),document.createElement("img")},_isInDocument(e){for(;e=e.parentNode;)if(e==document)return!0;return!1},_urlToImage(e,t){const i=E.createImageElement();i.onload=function(){t(i)},i.src=e},_rgbToHex(e,t,i){return((1<<24)+(e<<16)+(t<<8)+i).toString(16).slice(1)},_hexToRgb(e){e=e.replace(Pn,xp);const t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}},getRandomColor(){let e=(Math.random()*16777215<<0).toString(16);for(;e.length<6;)e=Cp+e;return Pn+e},isCanvasFarblingActive(){if(An!==null)return An;if(typeof document>"u")return An=!1,!1;const e=this.createCanvasElement();e.width=10,e.height=10;const t=e.getContext("2d",{willReadFrequently:!0});t.clearRect(0,0,10,10),t.fillStyle="#282828",t.fillRect(0,0,10,10);const i=t.getImageData(0,0,10,10).data;let n=!1;for(let s=0;s<100;s++)if(i[s*4]!==40||i[s*4+1]!==40||i[s*4+2]!==40||i[s*4+3]!==255){n=!0;break}return An=n,this.releaseCanvas(e),An},getHitColor(){const e=this.getRandomColor();return this.isCanvasFarblingActive()?this.getSnappedHexColor(e):e},getHitColorKey(e,t,i){return this.isCanvasFarblingActive()&&(e=Math.round(e/5)*5,t=Math.round(t/5)*5,i=Math.round(i/5)*5),Pn+this._rgbToHex(e,t,i)},getSnappedHexColor(e){const t=this._hexToRgb(e);return Pn+this._rgbToHex(Math.round(t.r/5)*5,Math.round(t.g/5)*5,Math.round(t.b/5)*5)},getRGB(e){let t;return e in so?(t=so[e],{r:t[0],g:t[1],b:t[2]}):e[0]===Pn?this._hexToRgb(e.substring(1)):e.substr(0,4)===Tp?(t=kp.exec(e.replace(/ /g,"")),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA(e){return e=e||"black",E._namedColorToRBA(e)||E._hex3ColorToRGBA(e)||E._hex4ColorToRGBA(e)||E._hex6ColorToRGBA(e)||E._hex8ColorToRGBA(e)||E._rgbColorToRGBA(e)||E._rgbaColorToRGBA(e)||E._hslColorToRGBA(e)},_namedColorToRBA(e){const t=so[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(e){if(e.indexOf("rgb(")===0){e=e.match(/rgb\(([^)]+)\)/)[1];const t=e.split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(e){if(e.indexOf("rgba(")===0){e=e.match(/rgba\(([^)]+)\)/)[1];const t=e.split(/ *, */).map((i,n)=>i.slice(-1)==="%"?n===3?parseInt(i)/100:parseInt(i)/100*255:Number(i));return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex8ColorToRGBA(e){if(e[0]==="#"&&e.length===9)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:parseInt(e.slice(7,9),16)/255}},_hex6ColorToRGBA(e){if(e[0]==="#"&&e.length===7)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:1}},_hex4ColorToRGBA(e){if(e[0]==="#"&&e.length===5)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:parseInt(e[4]+e[4],16)/255}},_hex3ColorToRGBA(e){if(e[0]==="#"&&e.length===4)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:1}},_hslColorToRGBA(e){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(e)){const[t,...i]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e),n=Number(i[0])/360,s=Number(i[1])/100,r=Number(i[2])/100;let o,a,l;if(s===0)return l=r*255,{r:Math.round(l),g:Math.round(l),b:Math.round(l),a:1};r<.5?o=r*(1+s):o=r+s-r*s;const c=2*r-o,h=[0,0,0];for(let d=0;d<3;d++)a=n+1/3*-(d-1),a<0&&a++,a>1&&a--,6*a<1?l=c+(o-c)*6*a:2*a<1?l=o:3*a<2?l=c+(o-c)*(2/3-a)*6:l=c,h[d]=l*255;return{r:Math.round(h[0]),g:Math.round(h[1]),b:Math.round(h[2]),a:1}}},haveIntersection(e,t){return!(t.x>e.x+e.width||t.x+t.width<e.x||t.y>e.y+e.height||t.y+t.height<e.y)},cloneObject(e){const t={};for(const i in e)this._isPlainObject(e[i])?t[i]=this.cloneObject(e[i]):this._isArray(e[i])?t[i]=this.cloneArray(e[i]):t[i]=e[i];return t},cloneArray(e){return e.slice(0)},degToRad(e){return e*Sp},radToDeg(e){return e*wp},_degToRad(e){return E.warn("Util._degToRad is removed. Please use public Util.degToRad instead."),E.degToRad(e)},_radToDeg(e){return E.warn("Util._radToDeg is removed. Please use public Util.radToDeg instead."),E.radToDeg(e)},_getRotation(e){return X.angleDeg?E.radToDeg(e):e},_capitalize(e){return e.charAt(0).toUpperCase()+e.slice(1)},throw(e){throw new Error(rc+e)},error(e){console.error(rc+e)},warn(e){X.showWarnings&&console.warn(Np+e)},each(e,t){for(const i in e)t(i,e[i])},_inRange(e,t,i){return t<=e&&e<i},_getProjectionToSegment(e,t,i,n,s,r){let o,a,l;const c=(e-i)*(e-i)+(t-n)*(t-n);if(c==0)o=e,a=t,l=(s-i)*(s-i)+(r-n)*(r-n);else{const h=((s-e)*(i-e)+(r-t)*(n-t))/c;h<0?(o=e,a=t,l=(e-s)*(e-s)+(t-r)*(t-r)):h>1?(o=i,a=n,l=(i-s)*(i-s)+(n-r)*(n-r)):(o=e+h*(i-e),a=t+h*(n-t),l=(o-s)*(o-s)+(a-r)*(a-r))}return[o,a,l]},_getProjectionToLine(e,t,i){const n=E.cloneObject(e);let s=Number.MAX_VALUE;return t.forEach(function(r,o){if(!i&&o===t.length-1)return;const a=t[(o+1)%t.length],l=E._getProjectionToSegment(r.x,r.y,a.x,a.y,e.x,e.y),c=l[0],h=l[1],d=l[2];d<s&&(n.x=c,n.y=h,s=d)}),n},_prepareArrayForTween(e,t,i){const n=[],s=[];if(e.length>t.length){const o=t;t=e,e=o}for(let o=0;o<e.length;o+=2)n.push({x:e[o],y:e[o+1]});for(let o=0;o<t.length;o+=2)s.push({x:t[o],y:t[o+1]});const r=[];return s.forEach(function(o){const a=E._getProjectionToLine(o,n,i);r.push(a.x),r.push(a.y)}),r},_prepareToStringify(e){let t;e.visitedByCircularReferenceRemoval=!0;for(const i in e)if(e.hasOwnProperty(i)&&e[i]&&typeof e[i]=="object"){if(t=Object.getOwnPropertyDescriptor(e,i),e[i].visitedByCircularReferenceRemoval||E._isElement(e[i]))if(t.configurable)delete e[i];else return null;else if(E._prepareToStringify(e[i])===null)if(t.configurable)delete e[i];else return null}return delete e.visitedByCircularReferenceRemoval,e},_assign(e,t){for(const i in t)e[i]=t[i];return e},_getFirstPointerId(e){return e.touches?e.changedTouches[0].identifier:e.pointerId||999},releaseCanvas(...e){X.releaseCanvasOnDestroy&&e.forEach(t=>{t.width=0,t.height=0})},drawRoundedRectPath(e,t,i,n){let s=t<0?t:0,r=i<0?i:0;t=Math.abs(t),i=Math.abs(i);let o=0,a=0,l=0,c=0;typeof n=="number"?o=a=l=c=Math.min(n,t/2,i/2):(o=Math.min(n[0]||0,t/2,i/2),a=Math.min(n[1]||0,t/2,i/2),c=Math.min(n[2]||0,t/2,i/2),l=Math.min(n[3]||0,t/2,i/2)),e.moveTo(s+o,r),e.lineTo(s+t-a,r),e.arc(s+t-a,r+a,a,Math.PI*3/2,0,!1),e.lineTo(s+t,r+i-c),e.arc(s+t-c,r+i-c,c,0,Math.PI/2,!1),e.lineTo(s+l,r+i),e.arc(s+l,r+i-l,l,Math.PI/2,Math.PI,!1),e.lineTo(s,r+o),e.arc(s+o,r+o,o,Math.PI,Math.PI*3/2,!1)},drawRoundedPolygonPath(e,t,i,n,s){n=Math.abs(n);for(let r=0;r<i;r++){const o=t[(r-1+i)%i],a=t[r],l=t[(r+1)%i],c={x:a.x-o.x,y:a.y-o.y},h={x:l.x-a.x,y:l.y-a.y},d=Math.hypot(c.x,c.y),u=Math.hypot(h.x,h.y);let f;typeof s=="number"?f=s:f=r<s.length?s[r]:0,f=n*Math.cos(Math.PI/i)*Math.min(1,f/n*2);const _={x:c.x/d,y:c.y/d},b={x:h.x/u,y:h.y/u},S={x:a.x-_.x*f,y:a.y-_.y*f},y={x:a.x+b.x*f,y:a.y+b.y*f};r===0?e.moveTo(S.x,S.y):e.lineTo(S.x,S.y),e.arcTo(a.x,a.y,y.x,y.y,f)}}};function Pp(e){const t=[],i=e.length,n=E;for(let s=0;s<i;s++){let r=e[s];n._isNumber(r)?r=Math.round(r*1e3)/1e3:n._isString(r)||(r=r+""),t.push(r)}return t}const oc=",",Ap="(",Rp=")",Mp="([",Lp="])",Ip=";",Dp="()",Vp="=",ac=["arc","arcTo","beginPath","bezierCurveTo","clearRect","clip","closePath","createLinearGradient","createPattern","createRadialGradient","drawImage","ellipse","fill","fillText","getImageData","createImageData","lineTo","moveTo","putImageData","quadraticCurveTo","rect","roundRect","restore","rotate","save","scale","setLineDash","setTransform","stroke","strokeText","transform","translate"],Fp=["fillStyle","strokeStyle","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","letterSpacing","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","direction","font","textAlign","textBaseline","globalAlpha","globalCompositeOperation","imageSmoothingEnabled","filter"],Gp=100;let Bs=null;function lc(){if(Bs!==null)return Bs;try{const t=E.createCanvasElement().getContext("2d");return t?!!t&&"filter"in t:(Bs=!1,!1)}catch{return Bs=!1,!1}}class Hs{constructor(t){this.canvas=t,X.enableTrace&&(this.traceArr=[],this._enableTrace())}fillShape(t){t.fillEnabled()&&this._fill(t)}_fill(t){}strokeShape(t){t.hasStroke()&&this._stroke(t)}_stroke(t){}fillStrokeShape(t){t.attrs.fillAfterStrokeEnabled?(this.strokeShape(t),this.fillShape(t)):(this.fillShape(t),this.strokeShape(t))}getTrace(t,i){let n=this.traceArr,s=n.length,r="",o,a,l,c;for(o=0;o<s;o++)a=n[o],l=a.method,l?(c=a.args,r+=l,t?r+=Dp:E._isArray(c[0])?r+=Mp+c.join(oc)+Lp:(i&&(c=c.map(h=>typeof h=="number"?Math.floor(h):h)),r+=Ap+c.join(oc)+Rp)):(r+=a.property,t||(r+=Vp+a.val)),r+=Ip;return r}clearTrace(){this.traceArr=[]}_trace(t){let i=this.traceArr,n;i.push(t),n=i.length,n>=Gp&&i.shift()}reset(){const t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){const i=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,i.getWidth()/i.pixelRatio,i.getHeight()/i.pixelRatio)}_applyLineCap(t){const i=t.attrs.lineCap;i&&this.setAttr("lineCap",i)}_applyOpacity(t){const i=t.getAbsoluteOpacity();i!==1&&this.setAttr("globalAlpha",i)}_applyLineJoin(t){const i=t.attrs.lineJoin;i&&this.setAttr("lineJoin",i)}_applyMiterLimit(t){const i=t.attrs.miterLimit;i!=null&&this.setAttr("miterLimit",i)}setAttr(t,i){this._context[t]=i}arc(t,i,n,s,r,o){this._context.arc(t,i,n,s,r,o)}arcTo(t,i,n,s,r){this._context.arcTo(t,i,n,s,r)}beginPath(){this._context.beginPath()}bezierCurveTo(t,i,n,s,r,o){this._context.bezierCurveTo(t,i,n,s,r,o)}clearRect(t,i,n,s){this._context.clearRect(t,i,n,s)}clip(...t){this._context.clip.apply(this._context,t)}closePath(){this._context.closePath()}createImageData(t,i){const n=arguments;if(n.length===2)return this._context.createImageData(t,i);if(n.length===1)return this._context.createImageData(t)}createLinearGradient(t,i,n,s){return this._context.createLinearGradient(t,i,n,s)}createPattern(t,i){return this._context.createPattern(t,i)}createRadialGradient(t,i,n,s,r,o){return this._context.createRadialGradient(t,i,n,s,r,o)}drawImage(t,i,n,s,r,o,a,l,c){const h=arguments,d=this._context;h.length===3?d.drawImage(t,i,n):h.length===5?d.drawImage(t,i,n,s,r):h.length===9&&d.drawImage(t,i,n,s,r,o,a,l,c)}ellipse(t,i,n,s,r,o,a,l){this._context.ellipse(t,i,n,s,r,o,a,l)}isPointInPath(t,i,n,s){return n?this._context.isPointInPath(n,t,i,s):this._context.isPointInPath(t,i,s)}fill(...t){this._context.fill.apply(this._context,t)}fillRect(t,i,n,s){this._context.fillRect(t,i,n,s)}strokeRect(t,i,n,s){this._context.strokeRect(t,i,n,s)}fillText(t,i,n,s){s?this._context.fillText(t,i,n,s):this._context.fillText(t,i,n)}measureText(t){return this._context.measureText(t)}getImageData(t,i,n,s){return this._context.getImageData(t,i,n,s)}lineTo(t,i){this._context.lineTo(t,i)}moveTo(t,i){this._context.moveTo(t,i)}rect(t,i,n,s){this._context.rect(t,i,n,s)}roundRect(t,i,n,s,r){this._context.roundRect(t,i,n,s,r)}putImageData(t,i,n){this._context.putImageData(t,i,n)}quadraticCurveTo(t,i,n,s){this._context.quadraticCurveTo(t,i,n,s)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,i){this._context.scale(t,i)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,i,n,s,r,o){this._context.setTransform(t,i,n,s,r,o)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,i,n,s){this._context.strokeText(t,i,n,s)}transform(t,i,n,s,r,o){this._context.transform(t,i,n,s,r,o)}translate(t,i){this._context.translate(t,i)}_enableTrace(){let t=this,i=ac.length,n=this.setAttr,s,r;const o=function(a){let l=t[a],c;t[a]=function(){return r=Pp(Array.prototype.slice.call(arguments,0)),c=l.apply(t,arguments),t._trace({method:a,args:r}),c}};for(s=0;s<i;s++)o(ac[s]);t.setAttr=function(){n.apply(t,arguments);const a=arguments[0];let l=arguments[1];(a==="shadowOffsetX"||a==="shadowOffsetY"||a==="shadowBlur")&&(l=l/this.canvas.getPixelRatio()),t._trace({property:a,val:l})}}_applyGlobalCompositeOperation(t){const i=t.attrs.globalCompositeOperation;!i||i==="source-over"||this.setAttr("globalCompositeOperation",i)}}Fp.forEach(function(e){Object.defineProperty(Hs.prototype,e,{get(){return this._context[e]},set(t){this._context[e]=t}})});class Bp extends Hs{constructor(t,{willReadFrequently:i=!1}={}){super(t),this._context=t._canvas.getContext("2d",{willReadFrequently:i})}_fillColor(t){const i=t.fill();this.setAttr("fillStyle",i),t._fillFunc(this)}_fillPattern(t){this.setAttr("fillStyle",t._getFillPattern()),t._fillFunc(this)}_fillLinearGradient(t){const i=t._getLinearGradient();i&&(this.setAttr("fillStyle",i),t._fillFunc(this))}_fillRadialGradient(t){const i=t._getRadialGradient();i&&(this.setAttr("fillStyle",i),t._fillFunc(this))}_fill(t){const i=t.fill(),n=t.getFillPriority();if(i&&n==="color"){this._fillColor(t);return}const s=t.getFillPatternImage();if(s&&n==="pattern"){this._fillPattern(t);return}const r=t.getFillLinearGradientColorStops();if(r&&n==="linear-gradient"){this._fillLinearGradient(t);return}const o=t.getFillRadialGradientColorStops();if(o&&n==="radial-gradient"){this._fillRadialGradient(t);return}i?this._fillColor(t):s?this._fillPattern(t):r?this._fillLinearGradient(t):o&&this._fillRadialGradient(t)}_strokeLinearGradient(t){const i=t.getStrokeLinearGradientStartPoint(),n=t.getStrokeLinearGradientEndPoint(),s=t.getStrokeLinearGradientColorStops(),r=this.createLinearGradient(i.x,i.y,n.x,n.y);if(s){for(let o=0;o<s.length;o+=2)r.addColorStop(s[o],s[o+1]);this.setAttr("strokeStyle",r)}}_stroke(t){const i=t.dash(),n=t.getStrokeScaleEnabled();if(t.hasStroke()){if(!n){this.save();const r=this.getCanvas().getPixelRatio();this.setTransform(r,0,0,r,0,0)}this._applyLineCap(t),i&&t.dashEnabled()&&(this.setLineDash(i),this.setAttr("lineDashOffset",t.dashOffset())),this.setAttr("lineWidth",t.strokeWidth()),t.getShadowForStrokeEnabled()||this.setAttr("shadowColor","rgba(0,0,0,0)"),t.getStrokeLinearGradientColorStops()?this._strokeLinearGradient(t):this.setAttr("strokeStyle",t.stroke()),t._strokeFunc(this),n||this.restore()}}_applyShadow(t){var i,n,s;const r=(i=t.getShadowRGBA())!==null&&i!==void 0?i:"black",o=(n=t.getShadowBlur())!==null&&n!==void 0?n:5,a=(s=t.getShadowOffset())!==null&&s!==void 0?s:{x:0,y:0},l=t.getAbsoluteScale(),c=this.canvas.getPixelRatio(),h=l.x*c,d=l.y*c;this.setAttr("shadowColor",r),this.setAttr("shadowBlur",o*Math.min(Math.abs(h),Math.abs(d))),this.setAttr("shadowOffsetX",a.x*h),this.setAttr("shadowOffsetY",a.y*d)}}class Hp extends Hs{constructor(t){super(t),this._context=t._canvas.getContext("2d",{willReadFrequently:!0})}_fill(t){this.save(),this.setAttr("fillStyle",t.colorKey),t._fillFuncHit(this),this.restore()}strokeShape(t){t.hasHitStroke()&&this._stroke(t)}_stroke(t){if(t.hasHitStroke()){const i=t.getStrokeScaleEnabled();if(!i){this.save();const r=this.getCanvas().getPixelRatio();this.setTransform(r,0,0,r,0,0)}this._applyLineCap(t);const n=t.hitStrokeWidth(),s=n==="auto"?t.strokeWidth():n;this.setAttr("lineWidth",s),this.setAttr("strokeStyle",t.colorKey),t._strokeFuncHit(this),i||this.restore()}}}let $s;function $p(){if($s)return $s;const e=E.createCanvasElement(),t=e.getContext("2d");return $s=(function(){const i=X._global.devicePixelRatio||1,n=t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return i/n})(),E.releaseCanvas(e),$s}class ro{constructor(t){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;const n=(t||{}).pixelRatio||X.pixelRatio||$p();this.pixelRatio=n,this._canvas=E.createCanvasElement(),this._canvas.style.padding="0",this._canvas.style.margin="0",this._canvas.style.border="0",this._canvas.style.background="transparent",this._canvas.style.position="absolute",this._canvas.style.top="0",this._canvas.style.left="0"}getContext(){return this.context}getPixelRatio(){return this.pixelRatio}setPixelRatio(t){const i=this.pixelRatio;this.pixelRatio=t,this.setSize(this.getWidth()/i,this.getHeight()/i)}setWidth(t){this.width=this._canvas.width=t*this.pixelRatio,this._canvas.style.width=t+"px";const i=this.pixelRatio;this.getContext()._context.scale(i,i)}setHeight(t){this.height=this._canvas.height=t*this.pixelRatio,this._canvas.style.height=t+"px";const i=this.pixelRatio;this.getContext()._context.scale(i,i)}getWidth(){return this.width}getHeight(){return this.height}setSize(t,i){this.setWidth(t||0),this.setHeight(i||0)}toDataURL(t,i){try{return this._canvas.toDataURL(t,i)}catch{try{return this._canvas.toDataURL()}catch(s){return E.error("Unable to get data URL. "+s.message+" For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html."),""}}}}class ei extends ro{constructor(t={width:0,height:0,willReadFrequently:!1}){super(t),this.context=new Bp(this,{willReadFrequently:t.willReadFrequently}),this.setSize(t.width,t.height)}}class oo extends ro{constructor(t={width:0,height:0}){super(t),this.hitCanvas=!0,this.context=new Hp(this),this.setSize(t.width,t.height)}}const pt={get isDragging(){let e=!1;return pt._dragElements.forEach(t=>{t.dragStatus==="dragging"&&(e=!0)}),e},justDragged:!1,get node(){let e;return pt._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){const t=[];pt._dragElements.forEach((i,n)=>{const{node:s}=i,r=s.getStage();r.setPointersPositions(e),i.pointerId===void 0&&(i.pointerId=E._getFirstPointerId(e));const o=r._changedPointerPositions.find(a=>a.id===i.pointerId);if(o){if(i.dragStatus!=="dragging"){const a=s.dragDistance();if(Math.max(Math.abs(o.x-i.startPointerPos.x),Math.abs(o.y-i.startPointerPos.y))<a||(s.startDrag({evt:e}),!s.isDragging()))return}s._setDragPosition(e,i),t.push(s)}}),t.forEach(i=>{i.fire("dragmove",{type:"dragmove",target:i,evt:e},!0)})},_endDragBefore(e){const t=[];pt._dragElements.forEach(i=>{const{node:n}=i,s=n.getStage();if(e&&s.setPointersPositions(e),!s._changedPointerPositions.find(a=>a.id===i.pointerId))return;(i.dragStatus==="dragging"||i.dragStatus==="stopped")&&(pt.justDragged=!0,X._mouseListenClick=!1,X._touchListenClick=!1,X._pointerListenClick=!1,i.dragStatus="stopped");const o=i.node.getLayer()||i.node instanceof X.Stage&&i.node;o&&t.indexOf(o)===-1&&t.push(o)}),t.forEach(i=>{i.draw()})},_endDragAfter(e){pt._dragElements.forEach((t,i)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),t.dragStatus!=="dragging"&&pt._dragElements.delete(i)})}};X.isBrowser&&(window.addEventListener("mouseup",pt._endDragBefore,!0),window.addEventListener("touchend",pt._endDragBefore,!0),window.addEventListener("touchcancel",pt._endDragBefore,!0),window.addEventListener("mousemove",pt._drag),window.addEventListener("touchmove",pt._drag),window.addEventListener("mouseup",pt._endDragAfter,!1),window.addEventListener("touchend",pt._endDragAfter,!1),window.addEventListener("touchcancel",pt._endDragAfter,!1));function ii(e){return E._isString(e)?'"'+e+'"':Object.prototype.toString.call(e)==="[object Number]"||E._isBoolean(e)?e:Object.prototype.toString.call(e)}function cc(e){return e>255?255:e<0?0:Math.round(e)}function $(){if(X.isUnminified)return function(e,t){return E._isNumber(e)||E.warn(ii(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function Ws(e){if(X.isUnminified)return function(t,i){let n=E._isNumber(t),s=E._isArray(t)&&t.length==e;return!n&&!s&&E.warn(ii(t)+' is a not valid value for "'+i+'" attribute. The value should be a number or Array<number>('+e+")"),t}}function ao(){if(X.isUnminified)return function(e,t){return E._isNumber(e)||e==="auto"||E.warn(ii(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function Ci(){if(X.isUnminified)return function(e,t){return E._isString(e)||E.warn(ii(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function hc(){if(X.isUnminified)return function(e,t){const i=E._isString(e),n=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return i||n||E.warn(ii(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function Wp(){if(X.isUnminified)return function(e,t){const i=Int8Array?Object.getPrototypeOf(Int8Array):null;return i&&e instanceof i||(E._isArray(e)?e.forEach(function(n){E._isNumber(n)||E.warn('"'+t+'" attribute has non numeric element '+n+". Make sure that all elements are numbers.")}):E.warn(ii(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}function _e(){if(X.isUnminified)return function(e,t){return e===!0||e===!1||E.warn(ii(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}function Up(e){if(X.isUnminified)return function(t,i){return t==null||E.isObject(t)||E.warn(ii(t)+' is a not valid value for "'+i+'" attribute. The value should be an object with properties '+e),t}}const Rn="get",Mn="set",m={addGetterSetter(e,t,i,n,s){m.addGetter(e,t,i),m.addSetter(e,t,n,s),m.addOverloadedGetterSetter(e,t)},addGetter(e,t,i){const n=Rn+E._capitalize(t);e.prototype[n]=e.prototype[n]||function(){const s=this.attrs[t];return s===void 0?i:s}},addSetter(e,t,i,n){const s=Mn+E._capitalize(t);e.prototype[s]||m.overWriteSetter(e,t,i,n)},overWriteSetter(e,t,i,n){const s=Mn+E._capitalize(t);e.prototype[s]=function(r){return i&&r!==void 0&&r!==null&&(r=i.call(this,r,t)),this._setAttr(t,r),n&&n.call(this),this}},addComponentsGetterSetter(e,t,i,n,s){const r=i.length,o=E._capitalize,a=Rn+o(t),l=Mn+o(t);e.prototype[a]=function(){const h={};for(let d=0;d<r;d++){const u=i[d];h[u]=this.getAttr(t+o(u))}return h};const c=Up(i);e.prototype[l]=function(h){const d=this.attrs[t];n&&(h=n.call(this,h,t)),c&&c.call(this,h,t);for(const u in h)h.hasOwnProperty(u)&&this._setAttr(t+o(u),h[u]);return h||i.forEach(u=>{this._setAttr(t+o(u),void 0)}),this._fireChangeEvent(t,d,h),s&&s.call(this),this},m.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){const i=E._capitalize(t),n=Mn+i,s=Rn+i;e.prototype[t]=function(){return arguments.length?(this[n](arguments[0]),this):this[s]()}},addDeprecatedGetterSetter(e,t,i,n){E.error("Adding deprecated "+t);const s=Rn+E._capitalize(t),r=t+" property is deprecated and will be removed soon. Look at Konva change log for more information.";e.prototype[s]=function(){E.error(r);const o=this.attrs[t];return o===void 0?i:o},m.addSetter(e,t,n,function(){E.error(r)}),m.addOverloadedGetterSetter(e,t)},backCompat(e,t){E.each(t,function(i,n){const s=e.prototype[n],r=Rn+E._capitalize(i),o=Mn+E._capitalize(i);function a(){s.apply(this,arguments),E.error('"'+i+'" method is deprecated and will be removed soon. Use ""'+n+'" instead.')}e.prototype[i]=a,e.prototype[r]=a,e.prototype[o]=a})},afterSetFilter(){this._filterUpToDate=!1}};function jp(e){const t=/(\w+)\(([^)]+)\)/g;let i;for(;(i=t.exec(e))!==null;){const[,n,s]=i;switch(n){case"blur":{const r=parseFloat(s.replace("px",""));return function(o){this.blurRadius(r*.5);const a=X.Filters;a&&a.Blur&&a.Blur.call(this,o)}}case"brightness":{const r=s.includes("%")?parseFloat(s)/100:parseFloat(s);return function(o){this.brightness(r);const a=X.Filters;a&&a.Brightness&&a.Brightness.call(this,o)}}case"contrast":{const r=parseFloat(s);return function(o){const a=100*(Math.sqrt(r)-1);this.contrast(a);const l=X.Filters;l&&l.Contrast&&l.Contrast.call(this,o)}}case"grayscale":return function(r){const o=X.Filters;o&&o.Grayscale&&o.Grayscale.call(this,r)};case"sepia":return function(r){const o=X.Filters;o&&o.Sepia&&o.Sepia.call(this,r)};case"invert":return function(r){const o=X.Filters;o&&o.Invert&&o.Invert.call(this,r)};default:E.warn(`CSS filter "${n}" is not supported in fallback mode. Consider using function filters for better compatibility.`);break}}return()=>{}}const Us="absoluteOpacity",js="allEventListeners",He="absoluteTransform",dc="absoluteScale",Ni="canvas",Xp="Change",zp="children",Yp="konva",lo="listening",qp="mouseenter",Kp="mouseleave",Jp="pointerenter",Qp="pointerleave",Zp="touchenter",tg="touchleave",uc="set",fc="Shape",Xs=" ",pc="stage",ni="transform",eg="Stage",co="visible",ig=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(Xs);let ng=1;class G{constructor(t){this._id=ng++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===ni||t===He)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,i){let n=this._cache.get(t);return(n===void 0||(t===ni||t===He)&&n.dirty===!0)&&(n=i.call(this),this._cache.set(t,n)),n}_calculate(t,i,n){if(!this._attachedDepsListeners.get(t)){const s=i.map(r=>r+"Change.konva").join(Xs);this.on(s,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,n)}_getCanvasCache(){return this._cache.get(Ni)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===He&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(Ni)){const{scene:t,filter:i,hit:n,buffer:s}=this._cache.get(Ni);E.releaseCanvas(t,i,n,s),this._cache.delete(Ni)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){const i=t||{};let n={};(i.x===void 0||i.y===void 0||i.width===void 0||i.height===void 0)&&(n=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()||void 0}));let s=Math.ceil(i.width||n.width),r=Math.ceil(i.height||n.height),o=i.pixelRatio,a=i.x===void 0?Math.floor(n.x):i.x,l=i.y===void 0?Math.floor(n.y):i.y,c=i.offset||0,h=i.drawBorder||!1,d=i.hitCanvasPixelRatio||1;if(!s||!r){E.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}const u=Math.abs(Math.round(n.x)-a)>.5?1:0,f=Math.abs(Math.round(n.y)-l)>.5?1:0;s+=c*2+u,r+=c*2+f,a-=c,l-=c;const p=new ei({pixelRatio:o,width:s,height:r}),_=new ei({pixelRatio:o,width:0,height:0,willReadFrequently:!0}),b=new oo({pixelRatio:d,width:s,height:r}),S=p.getContext(),y=b.getContext(),C=new ei({width:p.width/p.pixelRatio+Math.abs(a),height:p.height/p.pixelRatio+Math.abs(l),pixelRatio:p.pixelRatio}),N=C.getContext();return b.isCache=!0,p.isCache=!0,this._cache.delete(Ni),this._filterUpToDate=!1,i.imageSmoothingEnabled===!1&&(p.getContext()._context.imageSmoothingEnabled=!1,_.getContext()._context.imageSmoothingEnabled=!1),S.save(),y.save(),N.save(),S.translate(-a,-l),y.translate(-a,-l),N.translate(-a,-l),C.x=a,C.y=l,this._isUnderCache=!0,this._clearSelfAndDescendantCache(Us),this._clearSelfAndDescendantCache(dc),this.drawScene(p,this,C),this.drawHit(b,this),this._isUnderCache=!1,S.restore(),y.restore(),h&&(S.save(),S.beginPath(),S.rect(0,0,s,r),S.closePath(),S.setAttr("strokeStyle","red"),S.setAttr("lineWidth",5),S.stroke(),S.restore()),this._cache.set(Ni,{scene:p,filter:_,hit:b,buffer:C,x:a,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(Ni)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,i){const n=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}];let s=1/0,r=1/0,o=-1/0,a=-1/0;const l=this.getAbsoluteTransform(i);return n.forEach(function(c){const h=l.point(c);s===void 0&&(s=o=h.x,r=a=h.y),s=Math.min(s,h.x),r=Math.min(r,h.y),o=Math.max(o,h.x),a=Math.max(a,h.y)}),{x:s,y:r,width:o-s,height:a-r}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const i=this._getCanvasCache();t.translate(i.x,i.y);const n=this._getCachedSceneCanvas(),s=n.pixelRatio;t.drawImage(n._canvas,0,0,n.width/s,n.height/s),t.restore()}_drawCachedHitCanvas(t){const i=this._getCanvasCache(),n=i.hit;t.save(),t.translate(i.x,i.y),t.drawImage(n._canvas,0,0,n.width/n.pixelRatio,n.height/n.pixelRatio),t.restore()}_getCachedSceneCanvas(){let t=this.filters(),i=this._getCanvasCache(),n=i.scene,s=i.filter,r=s.getContext(),o,a,l,c;if(!t||t.length===0)return n;if(this._filterUpToDate)return s;let h=!0;for(let u=0;u<t.length;u++)if(typeof t[u]=="string"&&lc(),typeof t[u]!="string"||!lc()){h=!1;break}const d=n.pixelRatio;if(s.setSize(n.width/n.pixelRatio,n.height/n.pixelRatio),h){const u=t.join(" ");return r.save(),r.setAttr("filter",u),r.drawImage(n._canvas,0,0,n.getWidth()/d,n.getHeight()/d),r.restore(),this._filterUpToDate=!0,s}try{for(o=t.length,r.clear(),r.drawImage(n._canvas,0,0,n.getWidth()/d,n.getHeight()/d),a=r.getImageData(0,0,s.getWidth(),s.getHeight()),l=0;l<o;l++)c=t[l],typeof c=="string"&&(c=jp(c)),c.call(this,a),r.putImageData(a,0,0)}catch(u){E.error("Unable to apply filter. "+u.message+" This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.")}return this._filterUpToDate=!0,s}on(t,i){if(this._cache&&this._cache.delete(js),arguments.length===3)return this._delegate.apply(this,arguments);const n=t.split(Xs);for(let s=0;s<n.length;s++){const o=n[s].split("."),a=o[0],l=o[1]||"";this.eventListeners[a]||(this.eventListeners[a]=[]),this.eventListeners[a].push({name:l,handler:i})}return this}off(t,i){let n=(t||"").split(Xs),s=n.length,r,o,a,l,c,h;if(this._cache&&this._cache.delete(js),!t)for(o in this.eventListeners)this._off(o);for(r=0;r<s;r++)if(a=n[r],l=a.split("."),c=l[0],h=l[1],c)this.eventListeners[c]&&this._off(c,h,i);else for(o in this.eventListeners)this._off(o,h,i);return this}dispatchEvent(t){const i={target:this,type:t.type,evt:t};return this.fire(t.type,i),this}addEventListener(t,i){return this.on(t,function(n){i.call(this,n.evt)}),this}removeEventListener(t){return this.off(t),this}_delegate(t,i,n){const s=this;this.on(t,function(r){const o=r.target.findAncestors(i,!0,s);for(let a=0;a<o.length;a++)r=E.cloneObject(r),r.currentTarget=o[a],n.call(o[a],r)})}remove(){return this.isDragging()&&this.stopDrag(),pt._dragElements.delete(this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(He),this._clearSelfAndDescendantCache(Us),this._clearSelfAndDescendantCache(dc),this._clearSelfAndDescendantCache(pc),this._clearSelfAndDescendantCache(co),this._clearSelfAndDescendantCache(lo)}_remove(){this._clearCaches();const t=this.getParent();t&&t.children&&(t.children.splice(this.index,1),t._setChildrenIndices(),this.parent=null)}destroy(){return this.remove(),this.clearCache(),this}getAttr(t){const i="get"+E._capitalize(t);return E._isFunction(this[i])?this[i]():this.attrs[t]}getAncestors(){let t=this.getParent(),i=[];for(;t;)i.push(t),t=t.getParent();return i}getAttrs(){return this.attrs||{}}setAttrs(t){return this._batchTransformChanges(()=>{let i,n;if(!t)return this;for(i in t)i!==zp&&(n=uc+E._capitalize(i),E._isFunction(this[n])?this[n](t[i]):this._setAttr(i,t[i]))}),this}isListening(){return this._getCache(lo,this._isListening)}_isListening(t){if(!this.listening())return!1;const n=this.getParent();return n&&n!==t&&this!==t?n._isListening(t):!0}isVisible(){return this._getCache(co,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const n=this.getParent();return n&&n!==t&&this!==t?n._isVisible(t):!0}shouldDrawHit(t,i=!1){if(t)return this._isVisible(t)&&this._isListening(t);const n=this.getLayer();let s=!1;pt._dragElements.forEach(o=>{o.dragStatus==="dragging"&&(o.node.nodeType==="Stage"||o.node.getLayer()===n)&&(s=!0)});const r=!i&&!X.hitOnDragEnabled&&(s||X.isTransforming());return this.isListening()&&this.isVisible()&&!r}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){let t=this.getDepth(),i=this,n=0,s,r,o,a;function l(h){for(s=[],r=h.length,o=0;o<r;o++)a=h[o],n++,a.nodeType!==fc&&(s=s.concat(a.getChildren().slice())),a._id===i._id&&(o=r);s.length>0&&s[0].getDepth()<=t&&l(s)}const c=this.getStage();return i.nodeType!==eg&&c&&l(c.getChildren()),n}getDepth(){let t=0,i=this.parent;for(;i;)t++,i=i.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(ni),this._clearSelfAndDescendantCache(He)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){const t=this.getStage();if(!t)return null;const i=t.getPointerPosition();if(!i)return null;const n=this.getAbsoluteTransform().copy();return n.invert(),n.point(i)}getAbsolutePosition(t){let i=!1,n=this.parent;for(;n;){if(n.isCached()){i=!0;break}n=n.parent}i&&!t&&(t=!0);const s=this.getAbsoluteTransform(t).getMatrix(),r=new ne,o=this.offset();return r.m=s.slice(),r.translate(o.x,o.y),r.getTranslation()}setAbsolutePosition(t){const{x:i,y:n,...s}=this._clearTransform();this.attrs.x=i,this.attrs.y=n,this._clearCache(ni);const r=this._getAbsoluteTransform().copy();return r.invert(),r.translate(t.x,t.y),t={x:this.attrs.x+r.getTranslation().x,y:this.attrs.y+r.getTranslation().y},this._setTransform(s),this.setPosition({x:t.x,y:t.y}),this._clearCache(ni),this._clearSelfAndDescendantCache(He),this}_setTransform(t){let i;for(i in t)this.attrs[i]=t[i]}_clearTransform(){const t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){let i=t.x,n=t.y,s=this.x(),r=this.y();return i!==void 0&&(s+=i),n!==void 0&&(r+=n),this.setPosition({x:s,y:r}),this}_eachAncestorReverse(t,i){let n=[],s=this.getParent(),r,o;if(!(i&&i._id===this._id)){for(n.unshift(this);s&&(!i||s._id!==i._id);)n.unshift(s),s=s.parent;for(r=n.length,o=0;o<r;o++)t(n[o])}}rotate(t){return this.rotation(this.rotation()+t),this}moveToTop(){if(!this.parent)return E.warn("Node has no parent. moveToTop function is ignored."),!1;const t=this.index,i=this.parent.getChildren().length;return t<i-1?(this.parent.children.splice(t,1),this.parent.children.push(this),this.parent._setChildrenIndices(),!0):!1}moveUp(){if(!this.parent)return E.warn("Node has no parent. moveUp function is ignored."),!1;const t=this.index,i=this.parent.getChildren().length;return t<i-1?(this.parent.children.splice(t,1),this.parent.children.splice(t+1,0,this),this.parent._setChildrenIndices(),!0):!1}moveDown(){if(!this.parent)return E.warn("Node has no parent. moveDown function is ignored."),!1;const t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return E.warn("Node has no parent. moveToBottom function is ignored."),!1;const t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return E.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&E.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");const i=this.index;return this.parent.children.splice(i,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(Us,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){let t=this.opacity();const i=this.getParent();return i&&!i._isUnderCache&&(t*=i.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){let t=this.getAttrs(),i,n,s,r,o;const a={attrs:{},className:this.getClassName()};for(i in t)n=t[i],o=E.isObject(n)&&!E._isPlainObject(n)&&!E._isArray(n),!o&&(s=typeof this[i]=="function"&&this[i],delete t[i],r=s?s.call(this):null,t[i]=n,r!==n&&(a.attrs[i]=n));return E._prepareToStringify(a)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,i,n){const s=[];i&&this._isMatch(t)&&s.push(this);let r=this.parent;for(;r;){if(r===n)return s;r._isMatch(t)&&s.push(r),r=r.parent}return s}isAncestorOf(t){return!1}findAncestor(t,i,n){return this.findAncestors(t,i,n)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);let i=t.replace(/ /g,"").split(","),n=i.length,s,r;for(s=0;s<n;s++)if(r=i[s],E.isValidSelector(r)||(E.warn('Selector "'+r+'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'),E.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'),E.warn("Konva is awesome, right?")),r.charAt(0)==="#"){if(this.id()===r.slice(1))return!0}else if(r.charAt(0)==="."){if(this.hasName(r.slice(1)))return!0}else if(this.className===r||this.nodeType===r)return!0;return!1}getLayer(){const t=this.getParent();return t?t.getLayer():null}getStage(){return this._getCache(pc,this._getStage)}_getStage(){const t=this.getParent();return t?t.getStage():null}fire(t,i={},n){return i.target=i.target||this,n?this._fireAndBubble(t,i):this._fire(t,i),this}getAbsoluteTransform(t){return t?this._getAbsoluteTransform(t):this._getCache(He,this._getAbsoluteTransform)}_getAbsoluteTransform(t){let i;if(t)return i=new ne,this._eachAncestorReverse(function(n){const s=n.transformsEnabled();s==="all"?i.multiply(n.getTransform()):s==="position"&&i.translate(n.x()-n.offsetX(),n.y()-n.offsetY())},t),i;{i=this._cache.get(He)||new ne,this.parent?this.parent.getAbsoluteTransform().copyInto(i):i.reset();const n=this.transformsEnabled();if(n==="all")i.multiply(this.getTransform());else if(n==="position"){const s=this.attrs.x||0,r=this.attrs.y||0,o=this.attrs.offsetX||0,a=this.attrs.offsetY||0;i.translate(s-o,r-a)}return i.dirty=!1,i}}getAbsoluteScale(t){let i=this;for(;i;)i._isUnderCache&&(t=i),i=i.getParent();const s=this.getAbsoluteTransform(t).decompose();return{x:s.scaleX,y:s.scaleY}}getAbsoluteRotation(){return this.getAbsoluteTransform().decompose().rotation}getTransform(){return this._getCache(ni,this._getTransform)}_getTransform(){var t,i;const n=this._cache.get(ni)||new ne;n.reset();const s=this.x(),r=this.y(),o=X.getAngle(this.rotation()),a=(t=this.attrs.scaleX)!==null&&t!==void 0?t:1,l=(i=this.attrs.scaleY)!==null&&i!==void 0?i:1,c=this.attrs.skewX||0,h=this.attrs.skewY||0,d=this.attrs.offsetX||0,u=this.attrs.offsetY||0;return(s!==0||r!==0)&&n.translate(s,r),o!==0&&n.rotate(o),(c!==0||h!==0)&&n.skew(c,h),(a!==1||l!==1)&&n.scale(a,l),(d!==0||u!==0)&&n.translate(-1*d,-1*u),n.dirty=!1,n}clone(t){let i=E.cloneObject(this.attrs),n,s,r,o,a;for(n in t)i[n]=t[n];const l=new this.constructor(i);for(n in this.eventListeners)for(s=this.eventListeners[n],r=s.length,o=0;o<r;o++)a=s[o],a.name.indexOf(Yp)<0&&(l.eventListeners[n]||(l.eventListeners[n]=[]),l.eventListeners[n].push(a));return l}_toKonvaCanvas(t){t=t||{};const i=this.getClientRect(),n=this.getStage(),s=t.x!==void 0?t.x:Math.floor(i.x),r=t.y!==void 0?t.y:Math.floor(i.y),o=t.pixelRatio||1,a=new ei({width:t.width||Math.ceil(i.width)||(n?n.width():0),height:t.height||Math.ceil(i.height)||(n?n.height():0),pixelRatio:o}),l=a.getContext(),c=new ei({width:a.width/a.pixelRatio+Math.abs(s),height:a.height/a.pixelRatio+Math.abs(r),pixelRatio:a.pixelRatio});return t.imageSmoothingEnabled===!1&&(l._context.imageSmoothingEnabled=!1),l.save(),(s||r)&&l.translate(-1*s,-1*r),this.drawScene(a,void 0,c),l.restore(),a}toCanvas(t){return this._toKonvaCanvas(t)._canvas}toDataURL(t){t=t||{};const i=t.mimeType||null,n=t.quality||null,s=this._toKonvaCanvas(t).toDataURL(i,n);return t.callback&&t.callback(s),s}toImage(t){return new Promise((i,n)=>{try{const s=t?.callback;s&&delete t.callback,E._urlToImage(this.toDataURL(t),function(r){i(r),s?.(r)})}catch(s){n(s)}})}toBlob(t){return new Promise((i,n)=>{try{const s=t?.callback;s&&delete t.callback,this.toCanvas(t).toBlob(r=>{i(r),s?.(r)},t?.mimeType,t?.quality)}catch(s){n(s)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():X.dragDistance}_off(t,i,n){let s=this.eventListeners[t],r,o,a;for(r=0;r<s.length;r++)if(o=s[r].name,a=s[r].handler,(o!=="konva"||i==="konva")&&(!i||o===i)&&(!n||n===a)){if(s.splice(r,1),s.length===0){delete this.eventListeners[t];break}r--}}_fireChangeEvent(t,i,n){this._fire(t+Xp,{oldVal:i,newVal:n})}addName(t){if(!this.hasName(t)){const i=this.name(),n=i?i+" "+t:t;this.name(n)}return this}hasName(t){if(!t)return!1;const i=this.name();return i?(i||"").split(/\s/g).indexOf(t)!==-1:!1}removeName(t){const i=(this.name()||"").split(/\s/g),n=i.indexOf(t);return n!==-1&&(i.splice(n,1),this.name(i.join(" "))),this}setAttr(t,i){const n=this[uc+E._capitalize(t)];return E._isFunction(n)?n.call(this,i):this._setAttr(t,i),this}_requestDraw(){if(X.autoDrawEnabled){const t=this.getLayer()||this.getStage();t?.batchDraw()}}_setAttr(t,i){const n=this.attrs[t];n===i&&!E.isObject(i)||(i==null?delete this.attrs[t]:this.attrs[t]=i,this._shouldFireChangeEvents&&this._fireChangeEvent(t,n,i),this._requestDraw())}_setComponentAttr(t,i,n){let s;n!==void 0&&(s=this.attrs[t],s||(this.attrs[t]=this.getAttr(t)),this.attrs[t][i]=n,this._fireChangeEvent(t,s,n))}_fireAndBubble(t,i,n){i&&this.nodeType===fc&&(i.target=this);const s=[qp,Kp,Jp,Qp,Zp,tg];if(!(s.indexOf(t)!==-1&&(n&&(this===n||this.isAncestorOf&&this.isAncestorOf(n))||this.nodeType==="Stage"&&!n))){this._fire(t,i);const o=s.indexOf(t)!==-1&&n&&n.isAncestorOf&&n.isAncestorOf(this)&&!n.isAncestorOf(this.parent);(i&&!i.cancelBubble||!i)&&this.parent&&this.parent.isListening()&&!o&&(n&&n.parent?this._fireAndBubble.call(this.parent,t,i,n):this._fireAndBubble.call(this.parent,t,i))}}_getProtoListeners(t){var i,n,s;const r=(i=this._cache.get(js))!==null&&i!==void 0?i:{};let o=r?.[t];if(o===void 0){o=[];let a=Object.getPrototypeOf(this);for(;a;){const l=(s=(n=a.eventListeners)===null||n===void 0?void 0:n[t])!==null&&s!==void 0?s:[];o.push(...l),a=Object.getPrototypeOf(a)}r[t]=o,this._cache.set(js,r)}return o}_fire(t,i){i=i||{},i.currentTarget=this,i.type=t;const n=this._getProtoListeners(t);if(n)for(let r=0;r<n.length;r++)n[r].handler.call(this,i);const s=this.eventListeners[t];if(s)for(let r=0;r<s.length;r++)s[r].handler.call(this,i)}draw(){return this.drawScene(),this.drawHit(),this}_createDragElement(t){const i=t?t.pointerId:void 0,n=this.getStage(),s=this.getAbsolutePosition();if(!n)return;const r=n._getPointerById(i)||n._changedPointerPositions[0]||s;pt._dragElements.set(this._id,{node:this,startPointerPos:r,offset:{x:r.x-s.x,y:r.y-s.y},dragStatus:"ready",pointerId:i})}startDrag(t,i=!0){pt._dragElements.has(this._id)||this._createDragElement(t);const n=pt._dragElements.get(this._id);n.dragStatus="dragging",this.fire("dragstart",{type:"dragstart",target:this,evt:t&&t.evt},i)}_setDragPosition(t,i){const n=this.getStage()._getPointerById(i.pointerId);if(!n)return;let s={x:n.x-i.offset.x,y:n.y-i.offset.y};const r=this.dragBoundFunc();if(r!==void 0){const o=r.call(this,s,t);o?s=o:E.warn("dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.")}(!this._lastPos||this._lastPos.x!==s.x||this._lastPos.y!==s.y)&&(this.setAbsolutePosition(s),this._requestDraw()),this._lastPos=s}stopDrag(t){const i=pt._dragElements.get(this._id);i&&(i.dragStatus="stopped"),pt._endDragBefore(t),pt._endDragAfter(t)}setDraggable(t){this._setAttr("draggable",t),this._dragChange()}isDragging(){const t=pt._dragElements.get(this._id);return t?t.dragStatus==="dragging":!1}_listenDrag(){this._dragCleanup(),this.on("mousedown.konva touchstart.konva",function(t){if(!(!(t.evt.button!==void 0)||X.dragButtons.indexOf(t.evt.button)>=0)||this.isDragging())return;let s=!1;pt._dragElements.forEach(r=>{this.isAncestorOf(r.node)&&(s=!0)}),s||this._createDragElement(t)})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{if(this._dragCleanup(),!this.getStage())return;const i=pt._dragElements.get(this._id),n=i&&i.dragStatus==="dragging",s=i&&i.dragStatus==="ready";n?this.stopDrag():s&&pt._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const i=this.getStage();if(!i)return!1;const n={x:-t.x,y:-t.y,width:i.width()+2*t.x,height:i.height()+2*t.y};return E.haveIntersection(n,this.getClientRect())}static create(t,i){return E._isString(t)&&(t=JSON.parse(t)),this._createNode(t,i)}static _createNode(t,i){let n=G.prototype.getClassName.call(t),s=t.children,r,o,a;i&&(t.attrs.container=i),X[n]||(E.warn('Can not find a node with class name "'+n+'". Fallback to "Shape".'),n="Shape");const l=X[n];if(r=new l(t.attrs),s)for(o=s.length,a=0;a<o;a++)r.add(G._createNode(s[a]));return r}}G.prototype.nodeType="Node",G.prototype._attrsAffectingSize=[],G.prototype.eventListeners={},G.prototype.on.call(G.prototype,ig,function(){if(this._batchingTransformChange){this._needClearTransformCache=!0;return}this._clearCache(ni),this._clearSelfAndDescendantCache(He)}),G.prototype.on.call(G.prototype,"visibleChange.konva",function(){this._clearSelfAndDescendantCache(co)}),G.prototype.on.call(G.prototype,"listeningChange.konva",function(){this._clearSelfAndDescendantCache(lo)}),G.prototype.on.call(G.prototype,"opacityChange.konva",function(){this._clearSelfAndDescendantCache(Us)});const vt=m.addGetterSetter;vt(G,"zIndex"),vt(G,"absolutePosition"),vt(G,"position"),vt(G,"x",0,$()),vt(G,"y",0,$()),vt(G,"globalCompositeOperation","source-over",Ci()),vt(G,"opacity",1,$()),vt(G,"name","",Ci()),vt(G,"id","",Ci()),vt(G,"rotation",0,$()),m.addComponentsGetterSetter(G,"scale",["x","y"]),vt(G,"scaleX",1,$()),vt(G,"scaleY",1,$()),m.addComponentsGetterSetter(G,"skew",["x","y"]),vt(G,"skewX",0,$()),vt(G,"skewY",0,$()),m.addComponentsGetterSetter(G,"offset",["x","y"]),vt(G,"offsetX",0,$()),vt(G,"offsetY",0,$()),vt(G,"dragDistance",void 0,$()),vt(G,"width",0,$()),vt(G,"height",0,$()),vt(G,"listening",!0,_e()),vt(G,"preventDefault",!0,_e()),vt(G,"filters",void 0,function(e){return this._filterUpToDate=!1,e}),vt(G,"visible",!0,_e()),vt(G,"transformsEnabled","all",Ci()),vt(G,"size"),vt(G,"dragBoundFunc"),vt(G,"draggable",!1,_e()),m.backCompat(G,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"});class se extends G{constructor(){super(...arguments),this.children=[]}getChildren(t){const i=this.children||[];return t?i.filter(t):i}hasChildren(){return this.getChildren().length>0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(t.length===0)return this;if(t.length>1){for(let n=0;n<t.length;n++)this.add(t[n]);return this}const i=t[0];return i.getParent()?(i.moveTo(this),this):(this._validateAdd(i),i.index=this.getChildren().length,i.parent=this,i._clearCaches(),this.getChildren().push(i),this._fire("add",{child:i}),this._requestDraw(),this)}destroy(){return this.hasChildren()&&this.destroyChildren(),super.destroy(),this}find(t){return this._generalFind(t,!1)}findOne(t){const i=this._generalFind(t,!0);return i.length>0?i[0]:void 0}_generalFind(t,i){const n=[];return this._descendants(s=>{const r=s._isMatch(t);return r&&n.push(s),!!(r&&i)}),n}_descendants(t){let i=!1;const n=this.getChildren();for(const s of n){if(i=t(s),i)return!0;if(s.hasChildren()&&(i=s._descendants(t),i))return!0}return!1}toObject(){const t=G.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(i=>{t.children.push(i.toObject())}),t}isAncestorOf(t){let i=t.getParent();for(;i;){if(i._id===this._id)return!0;i=i.getParent()}return!1}clone(t){const i=G.prototype.clone.call(this,t);return this.getChildren().forEach(function(n){i.add(n.clone())}),i}getAllIntersections(t){const i=[];return this.find("Shape").forEach(n=>{n.isVisible()&&n.intersects(t)&&i.push(n)}),i}_clearSelfAndDescendantCache(t){var i;super._clearSelfAndDescendantCache(t),!this.isCached()&&((i=this.children)===null||i===void 0||i.forEach(function(n){n._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(i,n){i.index=n}),this._requestDraw()}drawScene(t,i,n){const s=this.getLayer(),r=t||s&&s.getCanvas(),o=r&&r.getContext(),a=this._getCanvasCache(),l=a&&a.scene,c=r&&r.isCache;if(!this.isVisible()&&!c)return this;if(l){o.save();const h=this.getAbsoluteTransform(i).getMatrix();o.transform(h[0],h[1],h[2],h[3],h[4],h[5]),this._drawCachedSceneCanvas(o),o.restore()}else this._drawChildren("drawScene",r,i,n);return this}drawHit(t,i){if(!this.shouldDrawHit(i))return this;const n=this.getLayer(),s=t||n&&n.hitCanvas,r=s&&s.getContext(),o=this._getCanvasCache();if(o&&o.hit){r.save();const l=this.getAbsoluteTransform(i).getMatrix();r.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedHitCanvas(r),r.restore()}else this._drawChildren("drawHit",s,i);return this}_drawChildren(t,i,n,s){var r;const o=i&&i.getContext(),a=this.clipWidth(),l=this.clipHeight(),c=this.clipFunc(),h=typeof a=="number"&&typeof l=="number"||c,d=n===this;if(h){o.save();const f=this.getAbsoluteTransform(n);let p=f.getMatrix();o.transform(p[0],p[1],p[2],p[3],p[4],p[5]),o.beginPath();let _;if(c)_=c.call(this,o,this);else{const b=this.clipX(),S=this.clipY();o.rect(b||0,S||0,a,l)}o.clip.apply(o,_),p=f.copy().invert().getMatrix(),o.transform(p[0],p[1],p[2],p[3],p[4],p[5])}const u=!d&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";u&&(o.save(),o._applyGlobalCompositeOperation(this)),(r=this.children)===null||r===void 0||r.forEach(function(f){f[t](i,n,s)}),u&&o.restore(),h&&o.restore()}getClientRect(t={}){var i;const n=t.skipTransform,s=t.relativeTo;let r,o,a,l,c={x:1/0,y:1/0,width:0,height:0};const h=this;(i=this.children)===null||i===void 0||i.forEach(function(f){if(!f.visible())return;const p=f.getClientRect({relativeTo:h,skipShadow:t.skipShadow,skipStroke:t.skipStroke});p.width===0&&p.height===0||(r===void 0?(r=p.x,o=p.y,a=p.x+p.width,l=p.y+p.height):(r=Math.min(r,p.x),o=Math.min(o,p.y),a=Math.max(a,p.x+p.width),l=Math.max(l,p.y+p.height)))});const d=this.find("Shape");let u=!1;for(let f=0;f<d.length;f++)if(d[f]._isVisible(this)){u=!0;break}return u&&r!==void 0?c={x:r,y:o,width:a-r,height:l-o}:c={x:0,y:0,width:0,height:0},n?c:this._transformedRect(c,s)}}m.addComponentsGetterSetter(se,"clip",["x","y","width","height"]),m.addGetterSetter(se,"clipX",void 0,$()),m.addGetterSetter(se,"clipY",void 0,$()),m.addGetterSetter(se,"clipWidth",void 0,$()),m.addGetterSetter(se,"clipHeight",void 0,$()),m.addGetterSetter(se,"clipFunc");const Ln=new Map,gc=X._global.PointerEvent!==void 0;function ho(e){return Ln.get(e)}function uo(e){return{evt:e,pointerId:e.pointerId}}function mc(e,t){return Ln.get(e)===t}function _c(e,t){In(e),t.getStage()&&(Ln.set(e,t),gc&&t._fire("gotpointercapture",uo(new PointerEvent("gotpointercapture"))))}function In(e,t){const i=Ln.get(e);if(!i)return;const n=i.getStage();n&&n.content,Ln.delete(e),gc&&i._fire("lostpointercapture",uo(new PointerEvent("lostpointercapture")))}const sg="Stage",rg="string",vc="px",og="mouseout",bc="mouseleave",yc="mouseover",Ec="mouseenter",Sc="mousemove",wc="mousedown",xc="mouseup",Dn="pointermove",Vn="pointerdown",Xi="pointerup",Fn="pointercancel",ag="lostpointercapture",zs="pointerout",Gn="pointerleave",Ys="pointerover",qs="pointerenter",fo="contextmenu",Cc="touchstart",Nc="touchend",Tc="touchmove",kc="touchcancel",po="wheel",lg=5,cg=[[Ec,"_pointerenter"],[wc,"_pointerdown"],[Sc,"_pointermove"],[xc,"_pointerup"],[bc,"_pointerleave"],[Cc,"_pointerdown"],[Tc,"_pointermove"],[Nc,"_pointerup"],[kc,"_pointercancel"],[yc,"_pointerover"],[po,"_wheel"],[fo,"_contextmenu"],[Vn,"_pointerdown"],[Dn,"_pointermove"],[Xi,"_pointerup"],[Fn,"_pointercancel"],[Gn,"_pointerleave"],[ag,"_lostpointercapture"]],go={mouse:{[zs]:og,[Gn]:bc,[Ys]:yc,[qs]:Ec,[Dn]:Sc,[Vn]:wc,[Xi]:xc,[Fn]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},touch:{[zs]:"touchout",[Gn]:"touchleave",[Ys]:"touchover",[qs]:"touchenter",[Dn]:Tc,[Vn]:Cc,[Xi]:Nc,[Fn]:kc,pointerclick:"tap",pointerdblclick:"dbltap"},pointer:{[zs]:zs,[Gn]:Gn,[Ys]:Ys,[qs]:qs,[Dn]:Dn,[Vn]:Vn,[Xi]:Xi,[Fn]:Fn,pointerclick:"pointerclick",pointerdblclick:"pointerdblclick"}},Bn=e=>e.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",zi=e=>{const t=Bn(e);if(t==="pointer")return X.pointerEventsEnabled&&go.pointer;if(t==="touch")return go.touch;if(t==="mouse")return go.mouse};function Oc(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&E.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const hg="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);",Hn=[];class Ks extends se{constructor(t){super(Oc(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),Hn.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{Oc(this.attrs)}),this._checkVisibility()}_validateAdd(t){const i=t.getType()==="Layer",n=t.getType()==="FastLayer";i||n||E.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const t=this.visible()?"":"none";this.content.style.display=t}setContainer(t){if(typeof t===rg){let i;if(t.charAt(0)==="."){const n=t.slice(1);t=document.getElementsByClassName(n)[0]}else t.charAt(0)!=="#"?i=t:i=t.slice(1),t=document.getElementById(i);if(!t)throw"Can not find container in document with id "+i}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){const t=this.children,i=t.length;for(let n=0;n<i;n++)t[n].clear();return this}clone(t){return t||(t={}),t.container=typeof document<"u"&&document.createElement("div"),se.prototype.clone.call(this,t)}destroy(){super.destroy();const t=this.content;t&&E._isInDocument(t)&&this.container().removeChild(t);const i=Hn.indexOf(this);return i>-1&&Hn.splice(i,1),E.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(E.warn(hg),null)}_getPointerById(t){return this._pointerPositions.find(i=>i.id===t)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(t){t={...t},t.x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();const i=new ei({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),n=i.getContext()._context,s=this.children;return(t.x||t.y)&&n.translate(-1*t.x,-1*t.y),s.forEach(function(r){if(!r.isVisible())return;const o=r._toKonvaCanvas(t);n.drawImage(o._canvas,t.x,t.y,o.getWidth()/o.getPixelRatio(),o.getHeight()/o.getPixelRatio())}),i}getIntersection(t){if(!t)return null;const i=this.children,n=i.length,s=n-1;for(let r=s;r>=0;r--){const o=i[r].getIntersection(t);if(o)return o}return null}_resizeDOM(){const t=this.width(),i=this.height();this.content&&(this.content.style.width=t+vc,this.content.style.height=i+vc),this.bufferCanvas.setSize(t,i),this.bufferHitCanvas.setSize(t,i),this.children.forEach(n=>{n.setSize({width:t,height:i}),n.draw()})}add(t,...i){if(arguments.length>1){for(let s=0;s<arguments.length;s++)this.add(arguments[s]);return this}super.add(t);const n=this.children.length;return n>lg&&E.warn("The stage has "+n+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),t.setSize({width:this.width(),height:this.height()}),t.draw(),X.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return mc(t,this)}setPointerCapture(t){_c(t,this)}releaseCapture(t){In(t)}getLayers(){return this.children}_bindContentEvents(){X.isBrowser&&cg.forEach(([t,i])=>{this.content.addEventListener(t,n=>{this[i](n)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const i=zi(t.type);i&&this._fire(i.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const i=zi(t.type);i&&this._fire(i.pointerover,{evt:t,target:this,currentTarget:this})}_getTargetShape(t){let i=this[t+"targetShape"];return i&&!i.getStage()&&(i=null),i}_pointerleave(t){const i=zi(t.type),n=Bn(t.type);if(!i)return;this.setPointersPositions(t);const s=this._getTargetShape(n),r=!(X.isDragging()||X.isTransforming())||X.hitOnDragEnabled;s&&r?(s._fireAndBubble(i.pointerout,{evt:t}),s._fireAndBubble(i.pointerleave,{evt:t}),this._fire(i.pointerleave,{evt:t,target:this,currentTarget:this}),this[n+"targetShape"]=null):r&&(this._fire(i.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(i.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=null,this._pointerPositions=[]}_pointerdown(t){const i=zi(t.type),n=Bn(t.type);if(!i)return;this.setPointersPositions(t);let s=!1;this._changedPointerPositions.forEach(r=>{const o=this.getIntersection(r);if(pt.justDragged=!1,X["_"+n+"ListenClick"]=!0,!o||!o.isListening()){this[n+"ClickStartShape"]=void 0;return}X.capturePointerEventsEnabled&&o.setPointerCapture(r.id),this[n+"ClickStartShape"]=o,o._fireAndBubble(i.pointerdown,{evt:t,pointerId:r.id}),s=!0;const a=t.type.indexOf("touch")>=0;o.preventDefault()&&t.cancelable&&a&&t.preventDefault()}),s||this._fire(i.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}_pointermove(t){const i=zi(t.type),n=Bn(t.type);if(!i)return;const s=t.type.indexOf("touch")>=0||t.pointerType==="touch";if(X.isDragging()&&pt.node.preventDefault()&&t.cancelable&&s&&t.preventDefault(),this.setPointersPositions(t),!(!(X.isDragging()||X.isTransforming())||X.hitOnDragEnabled))return;const o={};let a=!1;const l=this._getTargetShape(n);this._changedPointerPositions.forEach(c=>{const h=ho(c.id)||this.getIntersection(c),d=c.id,u={evt:t,pointerId:d},f=l!==h;if(f&&l&&(l._fireAndBubble(i.pointerout,{...u},h),l._fireAndBubble(i.pointerleave,{...u},h)),h){if(o[h._id])return;o[h._id]=!0}h&&h.isListening()?(a=!0,f&&(h._fireAndBubble(i.pointerover,{...u},l),h._fireAndBubble(i.pointerenter,{...u},l),this[n+"targetShape"]=h),h._fireAndBubble(i.pointermove,{...u})):l&&(this._fire(i.pointerover,{evt:t,target:this,currentTarget:this,pointerId:d}),this[n+"targetShape"]=null)}),a||this._fire(i.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const i=zi(t.type),n=Bn(t.type);if(!i)return;this.setPointersPositions(t);const s=this[n+"ClickStartShape"],r=this[n+"ClickEndShape"],o={};let a=!1;this._changedPointerPositions.forEach(l=>{const c=ho(l.id)||this.getIntersection(l);if(c){if(c.releaseCapture(l.id),o[c._id])return;o[c._id]=!0}const h=l.id,d={evt:t,pointerId:h};let u=!1;X["_"+n+"InDblClickWindow"]?(u=!0,clearTimeout(this[n+"DblTimeout"])):pt.justDragged||(X["_"+n+"InDblClickWindow"]=!0,clearTimeout(this[n+"DblTimeout"])),this[n+"DblTimeout"]=setTimeout(function(){X["_"+n+"InDblClickWindow"]=!1},X.dblClickWindow),c&&c.isListening()?(a=!0,this[n+"ClickEndShape"]=c,c._fireAndBubble(i.pointerup,{...d}),X["_"+n+"ListenClick"]&&s&&s===c&&(c._fireAndBubble(i.pointerclick,{...d}),u&&r&&r===c&&c._fireAndBubble(i.pointerdblclick,{...d}))):(this[n+"ClickEndShape"]=null,a||(this._fire(i.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),a=!0),X["_"+n+"ListenClick"]&&this._fire(i.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:h}),u&&this._fire(i.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:h}))}),a||this._fire(i.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),X["_"+n+"ListenClick"]=!1,t.cancelable&&n!=="touch"&&n!=="pointer"&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);const i=this.getIntersection(this.getPointerPosition());i&&i.isListening()?i._fireAndBubble(fo,{evt:t}):this._fire(fo,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);const i=this.getIntersection(this.getPointerPosition());i&&i.isListening()?i._fireAndBubble(po,{evt:t}):this._fire(po,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const i=ho(t.pointerId)||this.getIntersection(this.getPointerPosition());i&&i._fireAndBubble(Xi,uo(t)),In(t.pointerId)}_lostpointercapture(t){In(t.pointerId)}setPointersPositions(t){const i=this._getContentPosition();let n=null,s=null;t=t||window.event,t.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(t.touches,r=>{this._pointerPositions.push({id:r.identifier,x:(r.clientX-i.left)/i.scaleX,y:(r.clientY-i.top)/i.scaleY})}),Array.prototype.forEach.call(t.changedTouches||t.touches,r=>{this._changedPointerPositions.push({id:r.identifier,x:(r.clientX-i.left)/i.scaleX,y:(r.clientY-i.top)/i.scaleY})})):(n=(t.clientX-i.left)/i.scaleX,s=(t.clientY-i.top)/i.scaleY,this.pointerPos={x:n,y:s},this._pointerPositions=[{x:n,y:s,id:E._getFirstPointerId(t)}],this._changedPointerPositions=[{x:n,y:s,id:E._getFirstPointerId(t)}])}_setPointerPosition(t){E.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(t)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};const t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new ei({width:this.width(),height:this.height()}),this.bufferHitCanvas=new oo({pixelRatio:1,width:this.width(),height:this.height()}),!X.isBrowser)return;const t=this.container();if(!t)throw"Stage has no container. A container is required.";t.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),this._resizeDOM()}cache(){return E.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(t){t.batchDraw()}),this}}Ks.prototype.nodeType=sg,kt(Ks),m.addGetterSetter(Ks,"container"),X.isBrowser&&document.addEventListener("visibilitychange",()=>{Hn.forEach(e=>{e.batchDraw()})});const Pc="hasShadow",Ac="shadowRGBA",Rc="patternImage",Mc="linearGradient",Lc="radialGradient";let Js;function mo(){return Js||(Js=E.createCanvasElement().getContext("2d"),Js)}const $n={};function dg(e){const t=this.attrs.fillRule;t?e.fill(t):e.fill()}function ug(e){e.stroke()}function fg(e){const t=this.attrs.fillRule;t?e.fill(t):e.fill()}function pg(e){e.stroke()}function gg(){this._clearCache(Pc)}function mg(){this._clearCache(Ac)}function _g(){this._clearCache(Rc)}function vg(){this._clearCache(Mc)}function bg(){this._clearCache(Lc)}class V extends G{constructor(t){super(t);let i,n=0;for(;i=E.getHitColor(),!(i&&!(i in $n));)if(n++,n>=1e4){E.warn("Failed to find a unique color key for a shape. Konva may work incorrectly. Most likely your browser is using canvas farbling. Consider disabling it."),i=E.getRandomColor();break}this.colorKey=i,$n[i]=this}getContext(){return E.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return E.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(Pc,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(Rc,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){const i=mo().createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(i&&i.setTransform){const n=new ne;n.translate(this.fillPatternX(),this.fillPatternY()),n.rotate(X.getAngle(this.fillPatternRotation())),n.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),n.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const s=n.getMatrix(),r=typeof DOMMatrix>"u"?{a:s[0],b:s[1],c:s[2],d:s[3],e:s[4],f:s[5]}:new DOMMatrix(s);i.setTransform(r)}return i}}_getLinearGradient(){return this._getCache(Mc,this.__getLinearGradient)}__getLinearGradient(){const t=this.fillLinearGradientColorStops();if(t){const i=mo(),n=this.fillLinearGradientStartPoint(),s=this.fillLinearGradientEndPoint(),r=i.createLinearGradient(n.x,n.y,s.x,s.y);for(let o=0;o<t.length;o+=2)r.addColorStop(t[o],t[o+1]);return r}}_getRadialGradient(){return this._getCache(Lc,this.__getRadialGradient)}__getRadialGradient(){const t=this.fillRadialGradientColorStops();if(t){const i=mo(),n=this.fillRadialGradientStartPoint(),s=this.fillRadialGradientEndPoint(),r=i.createRadialGradient(n.x,n.y,this.fillRadialGradientStartRadius(),s.x,s.y,this.fillRadialGradientEndRadius());for(let o=0;o<t.length;o+=2)r.addColorStop(t[o],t[o+1]);return r}}getShadowRGBA(){return this._getCache(Ac,this._getShadowRGBA)}_getShadowRGBA(){if(!this.hasShadow())return;const t=E.colorToRGBA(this.shadowColor());if(t)return"rgba("+t.r+","+t.g+","+t.b+","+t.a*(this.shadowOpacity()||1)+")"}hasFill(){return this._calculate("hasFill",["fillEnabled","fill","fillPatternImage","fillLinearGradientColorStops","fillRadialGradientColorStops"],()=>this.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const t=this.hitStrokeWidth();return t==="auto"?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){const i=this.getStage();if(!i)return!1;const n=i.bufferHitCanvas;return n.getContext().clear(),this.drawHit(n,void 0,!0),n.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data[3]>0}destroy(){return G.prototype.destroy.call(this),delete $n[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var i;if(!((i=this.attrs.perfectDrawEnabled)!==null&&i!==void 0?i:!0))return!1;const s=t||this.hasFill(),r=this.hasStroke(),o=this.getAbsoluteOpacity()!==1;if(s&&r&&o)return!0;const a=this.hasShadow(),l=this.shadowForStrokeEnabled();return!!(s&&r&&a&&l)}setStrokeHitEnabled(t){E.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){const t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}getClientRect(t={}){let i=!1,n=this.getParent();for(;n;){if(n.isCached()){i=!0;break}n=n.getParent()}const s=t.skipTransform,r=t.relativeTo||i&&this.getStage()||void 0,o=this.getSelfRect(),l=!t.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,c=o.width+l,h=o.height+l,d=!t.skipShadow&&this.hasShadow(),u=d?this.shadowOffsetX():0,f=d?this.shadowOffsetY():0,p=c+Math.abs(u),_=h+Math.abs(f),b=d&&this.shadowBlur()||0,S=p+b*2,y=_+b*2,C={width:S,height:y,x:-(l/2+b)+Math.min(u,0)+o.x,y:-(l/2+b)+Math.min(f,0)+o.y};return s?C:this._transformedRect(C,r)}drawScene(t,i,n){const s=this.getLayer(),r=t||s.getCanvas(),o=r.getContext(),a=this._getCanvasCache(),l=this.getSceneFunc(),c=this.hasShadow();let h;const d=i===this;if(!this.isVisible()&&!d)return this;if(a){o.save();const u=this.getAbsoluteTransform(i).getMatrix();return o.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedSceneCanvas(o),o.restore(),this}if(!l)return this;if(o.save(),this._useBufferCanvas()){h=this.getStage();const u=n||h.bufferCanvas,f=u.getContext();f.clear(),f.save(),f._applyLineJoin(this),f._applyMiterLimit(this);const p=this.getAbsoluteTransform(i).getMatrix();f.transform(p[0],p[1],p[2],p[3],p[4],p[5]),l.call(this,f,this),f.restore();const _=u.pixelRatio;c&&o._applyShadow(this),d||(o._applyOpacity(this),o._applyGlobalCompositeOperation(this)),o.drawImage(u._canvas,u.x||0,u.y||0,u.width/_,u.height/_)}else{if(o._applyLineJoin(this),o._applyMiterLimit(this),!d){const u=this.getAbsoluteTransform(i).getMatrix();o.transform(u[0],u[1],u[2],u[3],u[4],u[5]),o._applyOpacity(this),o._applyGlobalCompositeOperation(this)}c&&o._applyShadow(this),l.call(this,o,this)}return o.restore(),this}drawHit(t,i,n=!1){if(!this.shouldDrawHit(i,n))return this;const s=this.getLayer(),r=t||s.hitCanvas,o=r&&r.getContext(),a=this.hitFunc()||this.sceneFunc(),l=this._getCanvasCache(),c=l&&l.hit;if(this.colorKey||E.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),c){o.save();const d=this.getAbsoluteTransform(i).getMatrix();return o.transform(d[0],d[1],d[2],d[3],d[4],d[5]),this._drawCachedHitCanvas(o),o.restore(),this}if(!a)return this;if(o.save(),o._applyLineJoin(this),o._applyMiterLimit(this),!(this===i)){const d=this.getAbsoluteTransform(i).getMatrix();o.transform(d[0],d[1],d[2],d[3],d[4],d[5])}return a.call(this,o,this),o.restore(),this}drawHitFromCache(t=0){const i=this._getCanvasCache(),n=this._getCachedSceneCanvas(),s=i.hit,r=s.getContext(),o=s.getWidth(),a=s.getHeight();r.clear(),r.drawImage(n._canvas,0,0,o,a);try{const l=r.getImageData(0,0,o,a),c=l.data,h=c.length,d=E._hexToRgb(this.colorKey);for(let u=0;u<h;u+=4)c[u+3]>t?(c[u]=d.r,c[u+1]=d.g,c[u+2]=d.b,c[u+3]=255):c[u+3]=0;r.putImageData(l,0,0)}catch(l){E.error("Unable to draw hit graph from cached scene canvas. "+l.message)}return this}hasPointerCapture(t){return mc(t,this)}setPointerCapture(t){_c(t,this)}releaseCapture(t){In(t)}}V.prototype._fillFunc=dg,V.prototype._strokeFunc=ug,V.prototype._fillFuncHit=fg,V.prototype._strokeFuncHit=pg,V.prototype._centroid=!1,V.prototype.nodeType="Shape",kt(V),V.prototype.eventListeners={},V.prototype.on.call(V.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",gg),V.prototype.on.call(V.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",mg),V.prototype.on.call(V.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",_g),V.prototype.on.call(V.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",vg),V.prototype.on.call(V.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",bg),m.addGetterSetter(V,"stroke",void 0,hc()),m.addGetterSetter(V,"strokeWidth",2,$()),m.addGetterSetter(V,"fillAfterStrokeEnabled",!1),m.addGetterSetter(V,"hitStrokeWidth","auto",ao()),m.addGetterSetter(V,"strokeHitEnabled",!0,_e()),m.addGetterSetter(V,"perfectDrawEnabled",!0,_e()),m.addGetterSetter(V,"shadowForStrokeEnabled",!0,_e()),m.addGetterSetter(V,"lineJoin"),m.addGetterSetter(V,"lineCap"),m.addGetterSetter(V,"miterLimit"),m.addGetterSetter(V,"sceneFunc"),m.addGetterSetter(V,"hitFunc"),m.addGetterSetter(V,"dash"),m.addGetterSetter(V,"dashOffset",0,$()),m.addGetterSetter(V,"shadowColor",void 0,Ci()),m.addGetterSetter(V,"shadowBlur",0,$()),m.addGetterSetter(V,"shadowOpacity",1,$()),m.addComponentsGetterSetter(V,"shadowOffset",["x","y"]),m.addGetterSetter(V,"shadowOffsetX",0,$()),m.addGetterSetter(V,"shadowOffsetY",0,$()),m.addGetterSetter(V,"fillPatternImage"),m.addGetterSetter(V,"fill",void 0,hc()),m.addGetterSetter(V,"fillPatternX",0,$()),m.addGetterSetter(V,"fillPatternY",0,$()),m.addGetterSetter(V,"fillLinearGradientColorStops"),m.addGetterSetter(V,"strokeLinearGradientColorStops"),m.addGetterSetter(V,"fillRadialGradientStartRadius",0),m.addGetterSetter(V,"fillRadialGradientEndRadius",0),m.addGetterSetter(V,"fillRadialGradientColorStops"),m.addGetterSetter(V,"fillPatternRepeat","repeat"),m.addGetterSetter(V,"fillEnabled",!0),m.addGetterSetter(V,"strokeEnabled",!0),m.addGetterSetter(V,"shadowEnabled",!0),m.addGetterSetter(V,"dashEnabled",!0),m.addGetterSetter(V,"strokeScaleEnabled",!0),m.addGetterSetter(V,"fillPriority","color"),m.addComponentsGetterSetter(V,"fillPatternOffset",["x","y"]),m.addGetterSetter(V,"fillPatternOffsetX",0,$()),m.addGetterSetter(V,"fillPatternOffsetY",0,$()),m.addComponentsGetterSetter(V,"fillPatternScale",["x","y"]),m.addGetterSetter(V,"fillPatternScaleX",1,$()),m.addGetterSetter(V,"fillPatternScaleY",1,$()),m.addComponentsGetterSetter(V,"fillLinearGradientStartPoint",["x","y"]),m.addComponentsGetterSetter(V,"strokeLinearGradientStartPoint",["x","y"]),m.addGetterSetter(V,"fillLinearGradientStartPointX",0),m.addGetterSetter(V,"strokeLinearGradientStartPointX",0),m.addGetterSetter(V,"fillLinearGradientStartPointY",0),m.addGetterSetter(V,"strokeLinearGradientStartPointY",0),m.addComponentsGetterSetter(V,"fillLinearGradientEndPoint",["x","y"]),m.addComponentsGetterSetter(V,"strokeLinearGradientEndPoint",["x","y"]),m.addGetterSetter(V,"fillLinearGradientEndPointX",0),m.addGetterSetter(V,"strokeLinearGradientEndPointX",0),m.addGetterSetter(V,"fillLinearGradientEndPointY",0),m.addGetterSetter(V,"strokeLinearGradientEndPointY",0),m.addComponentsGetterSetter(V,"fillRadialGradientStartPoint",["x","y"]),m.addGetterSetter(V,"fillRadialGradientStartPointX",0),m.addGetterSetter(V,"fillRadialGradientStartPointY",0),m.addComponentsGetterSetter(V,"fillRadialGradientEndPoint",["x","y"]),m.addGetterSetter(V,"fillRadialGradientEndPointX",0),m.addGetterSetter(V,"fillRadialGradientEndPointY",0),m.addGetterSetter(V,"fillPatternRotation",0),m.addGetterSetter(V,"fillRule",void 0,Ci()),m.backCompat(V,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});const yg="beforeDraw",Eg="draw",Ic=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],Sg=Ic.length;class Ti extends se{constructor(t){super(t),this.canvas=new ei,this.hitCanvas=new oo({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);const i=this.getStage();return i&&i.content&&(i.content.removeChild(this.getNativeCanvasElement()),t<i.children.length-1?i.content.insertBefore(this.getNativeCanvasElement(),i.children[t+1].getCanvas()._canvas):i.content.appendChild(this.getNativeCanvasElement())),this}moveToTop(){G.prototype.moveToTop.call(this);const t=this.getStage();return t&&t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.appendChild(this.getNativeCanvasElement())),!0}moveUp(){if(!G.prototype.moveUp.call(this))return!1;const i=this.getStage();return!i||!i.content?!1:(i.content.removeChild(this.getNativeCanvasElement()),this.index<i.children.length-1?i.content.insertBefore(this.getNativeCanvasElement(),i.children[this.index+1].getCanvas()._canvas):i.content.appendChild(this.getNativeCanvasElement()),!0)}moveDown(){if(G.prototype.moveDown.call(this)){const t=this.getStage();if(t){const i=t.children;t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.insertBefore(this.getNativeCanvasElement(),i[this.index+1].getCanvas()._canvas))}return!0}return!1}moveToBottom(){if(G.prototype.moveToBottom.call(this)){const t=this.getStage();if(t){const i=t.children;t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.insertBefore(this.getNativeCanvasElement(),i[1].getCanvas()._canvas))}return!0}return!1}getLayer(){return this}remove(){const t=this.getNativeCanvasElement();return G.prototype.remove.call(this),t&&t.parentNode&&E._isInDocument(t)&&t.parentNode.removeChild(t),this}getStage(){return this.parent}setSize({width:t,height:i}){return this.canvas.setSize(t,i),this.hitCanvas.setSize(t,i),this._setSmoothEnabled(),this}_validateAdd(t){const i=t.getType();i!=="Group"&&i!=="Shape"&&E.throw("You may only add groups and shapes to a layer.")}_toKonvaCanvas(t){return t={...t},t.width=t.width||this.getWidth(),t.height=t.height||this.getHeight(),t.x=t.x!==void 0?t.x:this.x(),t.y=t.y!==void 0?t.y:this.y(),G.prototype._toKonvaCanvas.call(this,t)}_checkVisibility(){this.visible()?this.canvas._canvas.style.display="block":this.canvas._canvas.style.display="none"}_setSmoothEnabled(){this.getContext()._context.imageSmoothingEnabled=this.imageSmoothingEnabled()}getWidth(){if(this.parent)return this.parent.width()}setWidth(){E.warn('Can not change width of layer. Use "stage.width(value)" function instead.')}getHeight(){if(this.parent)return this.parent.height()}setHeight(){E.warn('Can not change height of layer. Use "stage.height(value)" function instead.')}batchDraw(){return this._waitingForDraw||(this._waitingForDraw=!0,E.requestAnimFrame(()=>{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;let i=1,n=!1;for(;;){for(let s=0;s<Sg;s++){const r=Ic[s],o=this._getIntersection({x:t.x+r.x*i,y:t.y+r.y*i}),a=o.shape;if(a)return a;if(n=!!o.antialiased,!o.antialiased)break}if(n)i+=1;else return null}}_getIntersection(t){const i=this.hitCanvas.pixelRatio,n=this.hitCanvas.context.getImageData(Math.round(t.x*i),Math.round(t.y*i),1,1).data,s=n[3];if(s===255){const r=E.getHitColorKey(n[0],n[1],n[2]),o=$n[r];return o?{shape:o}:{antialiased:!0}}else if(s>0)return{antialiased:!0};return{}}drawScene(t,i,n){const s=this.getLayer(),r=t||s&&s.getCanvas();return this._fire(yg,{node:this}),this.clearBeforeDraw()&&r.getContext().clear(),se.prototype.drawScene.call(this,r,i,n),this._fire(Eg,{node:this}),this}drawHit(t,i){const n=this.getLayer(),s=t||n&&n.hitCanvas;return n&&n.clearBeforeDraw()&&n.getHitCanvas().getContext().clear(),se.prototype.drawHit.call(this,s,i),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){E.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return E.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!this.parent||!this.parent.content)return;const t=this.parent;!!this.hitCanvas._canvas.parentNode?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}destroy(){return E.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}}Ti.prototype.nodeType="Layer",kt(Ti),m.addGetterSetter(Ti,"imageSmoothingEnabled",!0),m.addGetterSetter(Ti,"clearBeforeDraw",!0),m.addGetterSetter(Ti,"hitGraphEnabled",!0,_e());class _o extends Ti{constructor(t){super(t),this.listening(!1),E.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}_o.prototype.nodeType="FastLayer",kt(_o);class Yi extends se{_validateAdd(t){const i=t.getType();i!=="Group"&&i!=="Shape"&&E.throw("You may only add groups and shapes to groups.")}}Yi.prototype.nodeType="Group",kt(Yi);const vo=(function(){return xi.performance&&xi.performance.now?function(){return xi.performance.now()}:function(){return new Date().getTime()}})();class ae{constructor(t,i){this.id=ae.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:vo(),frameRate:0},this.func=t,this.setLayers(i)}setLayers(t){let i=[];return t&&(i=Array.isArray(t)?t:[t]),this.layers=i,this}getLayers(){return this.layers}addLayer(t){const i=this.layers,n=i.length;for(let s=0;s<n;s++)if(i[s]._id===t._id)return!1;return this.layers.push(t),!0}isRunning(){const i=ae.animations,n=i.length;for(let s=0;s<n;s++)if(i[s].id===this.id)return!0;return!1}start(){return this.stop(),this.frame.timeDiff=0,this.frame.lastTime=vo(),ae._addAnimation(this),this}stop(){return ae._removeAnimation(this),this}_updateFrameObject(t){this.frame.timeDiff=t-this.frame.lastTime,this.frame.lastTime=t,this.frame.time+=this.frame.timeDiff,this.frame.frameRate=1e3/this.frame.timeDiff}static _addAnimation(t){this.animations.push(t),this._handleAnimation()}static _removeAnimation(t){const i=t.id,n=this.animations,s=n.length;for(let r=0;r<s;r++)if(n[r].id===i){this.animations.splice(r,1);break}}static _runFrames(){const t={},i=this.animations;for(let n=0;n<i.length;n++){const s=i[n],r=s.layers,o=s.func;s._updateFrameObject(vo());const a=r.length;let l;if(o?l=o.call(s,s.frame)!==!1:l=!0,!!l)for(let c=0;c<a;c++){const h=r[c];h._id!==void 0&&(t[h._id]=h)}}for(const n in t)t.hasOwnProperty(n)&&t[n].batchDraw()}static _animationLoop(){const t=ae;t.animations.length?(t._runFrames(),E.requestAnimFrame(t._animationLoop)):t.animRunning=!1}static _handleAnimation(){this.animRunning||(this.animRunning=!0,E.requestAnimFrame(this._animationLoop))}}ae.animations=[],ae.animIdCounter=0,ae.animRunning=!1;const wg={node:1,duration:1,easing:1,onFinish:1,yoyo:1},xg=1,Dc=2,Vc=3,Fc=["fill","stroke","shadowColor"];let Cg=0;class Ng{constructor(t,i,n,s,r,o,a){this.prop=t,this.propFunc=i,this.begin=s,this._pos=s,this.duration=o,this._change=0,this.prevPos=0,this.yoyo=a,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=n,this._change=r-this.begin,this.pause()}fire(t){const i=this[t];i&&i()}setTime(t){t>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())}getTime(){return this._time}setPosition(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}getPosition(t){return t===void 0&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}play(){this.state=Dc,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=Vc,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){const t=this.getTimer()-this._startTime;this.state===Dc?this.setTime(t):this.state===Vc&&this.setTime(this.duration-t)}pause(){this.state=xg,this.fire("onPause")}getTimer(){return new Date().getTime()}}class Et{constructor(t){const i=this,n=t.node,s=n._id,r=t.easing||Wn.Linear,o=!!t.yoyo;let a,l;typeof t.duration>"u"?a=.3:t.duration===0?a=.001:a=t.duration,this.node=n,this._id=Cg++;const c=n.getLayer()||(n instanceof X.Stage?n.getLayers():null);c||E.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new ae(function(){i.tween.onEnterFrame()},c),this.tween=new Ng(l,function(h){i._tweenFunc(h)},r,0,1,a*1e3,o),this._addListeners(),Et.attrs[s]||(Et.attrs[s]={}),Et.attrs[s][this._id]||(Et.attrs[s][this._id]={}),Et.tweens[s]||(Et.tweens[s]={});for(l in t)wg[l]===void 0&&this._addAttr(l,t[l]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,i){const n=this.node,s=n._id;let r,o,a,l,c;const h=Et.tweens[s][t];h&&delete Et.attrs[s][h][t];let d=n.getAttr(t);if(E._isArray(i))if(r=[],o=Math.max(i.length,d.length),t==="points"&&i.length!==d.length&&(i.length>d.length?(l=d,d=E._prepareArrayForTween(d,i,n.closed())):(a=i,i=E._prepareArrayForTween(i,d,n.closed()))),t.indexOf("fill")===0)for(let u=0;u<o;u++)if(u%2===0)r.push(i[u]-d[u]);else{const f=E.colorToRGBA(d[u]);c=E.colorToRGBA(i[u]),d[u]=f,r.push({r:c.r-f.r,g:c.g-f.g,b:c.b-f.b,a:c.a-f.a})}else for(let u=0;u<o;u++)r.push(i[u]-d[u]);else Fc.indexOf(t)!==-1?(d=E.colorToRGBA(d),c=E.colorToRGBA(i),r={r:c.r-d.r,g:c.g-d.g,b:c.b-d.b,a:c.a-d.a}):r=i-d;Et.attrs[s][this._id][t]={start:d,diff:r,end:i,trueEnd:a,trueStart:l},Et.tweens[s][t]=this._id}_tweenFunc(t){const i=this.node,n=Et.attrs[i._id][this._id];let s,r,o,a,l,c,h,d;for(s in n){if(r=n[s],o=r.start,a=r.diff,d=r.end,E._isArray(o))if(l=[],h=Math.max(o.length,d.length),s.indexOf("fill")===0)for(c=0;c<h;c++)c%2===0?l.push((o[c]||0)+a[c]*t):l.push("rgba("+Math.round(o[c].r+a[c].r*t)+","+Math.round(o[c].g+a[c].g*t)+","+Math.round(o[c].b+a[c].b*t)+","+(o[c].a+a[c].a*t)+")");else for(c=0;c<h;c++)l.push((o[c]||0)+a[c]*t);else Fc.indexOf(s)!==-1?l="rgba("+Math.round(o.r+a.r*t)+","+Math.round(o.g+a.g*t)+","+Math.round(o.b+a.b*t)+","+(o.a+a.a*t)+")":l=o+a*t;i.setAttr(s,l)}}_addListeners(){this.tween.onPlay=()=>{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{const t=this.node,i=Et.attrs[t._id][this._id];i.points&&i.points.trueEnd&&t.setAttr("points",i.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{const t=this.node,i=Et.attrs[t._id][this._id];i.points&&i.points.trueStart&&t.points(i.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(t){return this.tween.seek(t*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){const t=this.node._id,i=this._id,n=Et.tweens[t];this.pause(),this.anim&&this.anim.stop();for(const s in n)delete Et.tweens[t][s];delete Et.attrs[t][i],Et.tweens[t]&&(Object.keys(Et.tweens[t]).length===0&&delete Et.tweens[t],Object.keys(Et.attrs[t]).length===0&&delete Et.attrs[t])}}Et.attrs={},Et.tweens={},G.prototype.to=function(e){const t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()},new Et(e).play()};const Wn={BackEaseIn(e,t,i,n){return i*(e/=n)*e*((1.70158+1)*e-1.70158)+t},BackEaseOut(e,t,i,n){return i*((e=e/n-1)*e*((1.70158+1)*e+1.70158)+1)+t},BackEaseInOut(e,t,i,n){let s=1.70158;return(e/=n/2)<1?i/2*(e*e*(((s*=1.525)+1)*e-s))+t:i/2*((e-=2)*e*(((s*=1.525)+1)*e+s)+2)+t},ElasticEaseIn(e,t,i,n,s,r){let o=0;return e===0?t:(e/=n)===1?t+i:(r||(r=n*.3),!s||s<Math.abs(i)?(s=i,o=r/4):o=r/(2*Math.PI)*Math.asin(i/s),-(s*Math.pow(2,10*(e-=1))*Math.sin((e*n-o)*(2*Math.PI)/r))+t)},ElasticEaseOut(e,t,i,n,s,r){let o=0;return e===0?t:(e/=n)===1?t+i:(r||(r=n*.3),!s||s<Math.abs(i)?(s=i,o=r/4):o=r/(2*Math.PI)*Math.asin(i/s),s*Math.pow(2,-10*e)*Math.sin((e*n-o)*(2*Math.PI)/r)+i+t)},ElasticEaseInOut(e,t,i,n,s,r){let o=0;return e===0?t:(e/=n/2)===2?t+i:(r||(r=n*(.3*1.5)),!s||s<Math.abs(i)?(s=i,o=r/4):o=r/(2*Math.PI)*Math.asin(i/s),e<1?-.5*(s*Math.pow(2,10*(e-=1))*Math.sin((e*n-o)*(2*Math.PI)/r))+t:s*Math.pow(2,-10*(e-=1))*Math.sin((e*n-o)*(2*Math.PI)/r)*.5+i+t)},BounceEaseOut(e,t,i,n){return(e/=n)<1/2.75?i*(7.5625*e*e)+t:e<2/2.75?i*(7.5625*(e-=1.5/2.75)*e+.75)+t:e<2.5/2.75?i*(7.5625*(e-=2.25/2.75)*e+.9375)+t:i*(7.5625*(e-=2.625/2.75)*e+.984375)+t},BounceEaseIn(e,t,i,n){return i-Wn.BounceEaseOut(n-e,0,i,n)+t},BounceEaseInOut(e,t,i,n){return e<n/2?Wn.BounceEaseIn(e*2,0,i,n)*.5+t:Wn.BounceEaseOut(e*2-n,0,i,n)*.5+i*.5+t},EaseIn(e,t,i,n){return i*(e/=n)*e+t},EaseOut(e,t,i,n){return-i*(e/=n)*(e-2)+t},EaseInOut(e,t,i,n){return(e/=n/2)<1?i/2*e*e+t:-i/2*(--e*(e-2)-1)+t},StrongEaseIn(e,t,i,n){return i*(e/=n)*e*e*e*e+t},StrongEaseOut(e,t,i,n){return i*((e=e/n-1)*e*e*e*e+1)+t},StrongEaseInOut(e,t,i,n){return(e/=n/2)<1?i/2*e*e*e*e*e+t:i/2*((e-=2)*e*e*e*e+2)+t},Linear(e,t,i,n){return i*e/n+t}},Gc=E._assign(X,{Util:E,Transform:ne,Node:G,Container:se,Stage:Ks,stages:Hn,Layer:Ti,FastLayer:_o,Group:Yi,DD:pt,Shape:V,shapes:$n,Animation:ae,Tween:Et,Easings:Wn,Context:Hs,Canvas:ro});class $e extends V{_sceneFunc(t){const i=X.getAngle(this.angle()),n=this.clockwise();t.beginPath(),t.arc(0,0,this.outerRadius(),0,i,n),t.arc(0,0,this.innerRadius(),i,0,!n),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}getSelfRect(){const t=this.innerRadius(),i=this.outerRadius(),n=this.clockwise(),s=X.getAngle(n?360-this.angle():this.angle()),r=Math.cos(Math.min(s,Math.PI)),o=1,a=Math.sin(Math.min(Math.max(Math.PI,s),3*Math.PI/2)),l=Math.sin(Math.min(s,Math.PI/2)),c=r*(r>0?t:i),h=o*i,d=a*(a>0?t:i),u=l*(l>0?i:t);return{x:c,y:n?-1*u:d,width:h-c,height:u-d}}}$e.prototype._centroid=!0,$e.prototype.className="Arc",$e.prototype._attrsAffectingSize=["innerRadius","outerRadius","angle","clockwise"],kt($e),m.addGetterSetter($e,"innerRadius",0,$()),m.addGetterSetter($e,"outerRadius",0,$()),m.addGetterSetter($e,"angle",0,$()),m.addGetterSetter($e,"clockwise",!1,_e());function bo(e,t,i,n,s,r,o){const a=Math.sqrt(Math.pow(i-e,2)+Math.pow(n-t,2)),l=Math.sqrt(Math.pow(s-i,2)+Math.pow(r-n,2)),c=o*a/(a+l),h=o*l/(a+l),d=i-c*(s-e),u=n-c*(r-t),f=i+h*(s-e),p=n+h*(r-t);return[d,u,f,p]}function Bc(e,t){const i=e.length,n=[];for(let s=2;s<i-2;s+=2){const r=bo(e[s-2],e[s-1],e[s],e[s+1],e[s+2],e[s+3],t);isNaN(r[0])||(n.push(r[0]),n.push(r[1]),n.push(e[s]),n.push(e[s+1]),n.push(r[2]),n.push(r[3]))}return n}class We extends V{constructor(t){super(t),this.on("pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva",function(){this._clearCache("tensionPoints")})}_sceneFunc(t){const i=this.points(),n=i.length,s=this.tension(),r=this.closed(),o=this.bezier();if(!n)return;let a=0;if(t.beginPath(),t.moveTo(i[0],i[1]),s!==0&&n>4){const l=this.getTensionPoints(),c=l.length;for(a=r?0:4,r||t.quadraticCurveTo(l[0],l[1],l[2],l[3]);a<c-2;)t.bezierCurveTo(l[a++],l[a++],l[a++],l[a++],l[a++],l[a++]);r||t.quadraticCurveTo(l[c-2],l[c-1],i[n-2],i[n-1])}else if(o)for(a=2;a<n;)t.bezierCurveTo(i[a++],i[a++],i[a++],i[a++],i[a++],i[a++]);else for(a=2;a<n;a+=2)t.lineTo(i[a],i[a+1]);r?(t.closePath(),t.fillStrokeShape(this)):t.strokeShape(this)}getTensionPoints(){return this._getCache("tensionPoints",this._getTensionPoints)}_getTensionPoints(){return this.closed()?this._getTensionPointsClosed():Bc(this.points(),this.tension())}_getTensionPointsClosed(){const t=this.points(),i=t.length,n=this.tension(),s=bo(t[i-2],t[i-1],t[0],t[1],t[2],t[3],n),r=bo(t[i-4],t[i-3],t[i-2],t[i-1],t[0],t[1],n),o=Bc(t,n);return[s[2],s[3]].concat(o).concat([r[0],r[1],t[i-2],t[i-1],r[2],r[3],s[0],s[1],t[0],t[1]])}getWidth(){return this.getSelfRect().width}getHeight(){return this.getSelfRect().height}getSelfRect(){let t=this.points();if(t.length<4)return{x:t[0]||0,y:t[1]||0,width:0,height:0};this.tension()!==0?t=[t[0],t[1],...this._getTensionPoints(),t[t.length-2],t[t.length-1]]:t=this.points();let i=t[0],n=t[0],s=t[1],r=t[1],o,a;for(let l=0;l<t.length/2;l++)o=t[l*2],a=t[l*2+1],i=Math.min(i,o),n=Math.max(n,o),s=Math.min(s,a),r=Math.max(r,a);return{x:i,y:s,width:n-i,height:r-s}}}We.prototype.className="Line",We.prototype._attrsAffectingSize=["points","bezier","tension"],kt(We),m.addGetterSetter(We,"closed",!1),m.addGetterSetter(We,"bezier",!1),m.addGetterSetter(We,"tension",0,$()),m.addGetterSetter(We,"points",[],Wp());const Tg=[[],[],[-.5773502691896257,.5773502691896257],[0,-.7745966692414834,.7745966692414834],[-.33998104358485626,.33998104358485626,-.8611363115940526,.8611363115940526],[0,-.5384693101056831,.5384693101056831,-.906179845938664,.906179845938664],[.6612093864662645,-.6612093864662645,-.2386191860831969,.2386191860831969,-.932469514203152,.932469514203152],[0,.4058451513773972,-.4058451513773972,-.7415311855993945,.7415311855993945,-.9491079123427585,.9491079123427585],[-.1834346424956498,.1834346424956498,-.525532409916329,.525532409916329,-.7966664774136267,.7966664774136267,-.9602898564975363,.9602898564975363],[0,-.8360311073266358,.8360311073266358,-.9681602395076261,.9681602395076261,-.3242534234038089,.3242534234038089,-.6133714327005904,.6133714327005904],[-.14887433898163122,.14887433898163122,-.4333953941292472,.4333953941292472,-.6794095682990244,.6794095682990244,-.8650633666889845,.8650633666889845,-.9739065285171717,.9739065285171717],[0,-.26954315595234496,.26954315595234496,-.5190961292068118,.5190961292068118,-.7301520055740494,.7301520055740494,-.8870625997680953,.8870625997680953,-.978228658146057,.978228658146057],[-.1252334085114689,.1252334085114689,-.3678314989981802,.3678314989981802,-.5873179542866175,.5873179542866175,-.7699026741943047,.7699026741943047,-.9041172563704749,.9041172563704749,-.9815606342467192,.9815606342467192],[0,-.2304583159551348,.2304583159551348,-.44849275103644687,.44849275103644687,-.6423493394403402,.6423493394403402,-.8015780907333099,.8015780907333099,-.9175983992229779,.9175983992229779,-.9841830547185881,.9841830547185881],[-.10805494870734367,.10805494870734367,-.31911236892788974,.31911236892788974,-.5152486363581541,.5152486363581541,-.6872929048116855,.6872929048116855,-.827201315069765,.827201315069765,-.9284348836635735,.9284348836635735,-.9862838086968123,.9862838086968123],[0,-.20119409399743451,.20119409399743451,-.3941513470775634,.3941513470775634,-.5709721726085388,.5709721726085388,-.7244177313601701,.7244177313601701,-.8482065834104272,.8482065834104272,-.937273392400706,.937273392400706,-.9879925180204854,.9879925180204854],[-.09501250983763744,.09501250983763744,-.2816035507792589,.2816035507792589,-.45801677765722737,.45801677765722737,-.6178762444026438,.6178762444026438,-.755404408355003,.755404408355003,-.8656312023878318,.8656312023878318,-.9445750230732326,.9445750230732326,-.9894009349916499,.9894009349916499],[0,-.17848418149584785,.17848418149584785,-.3512317634538763,.3512317634538763,-.5126905370864769,.5126905370864769,-.6576711592166907,.6576711592166907,-.7815140038968014,.7815140038968014,-.8802391537269859,.8802391537269859,-.9506755217687678,.9506755217687678,-.9905754753144174,.9905754753144174],[-.0847750130417353,.0847750130417353,-.2518862256915055,.2518862256915055,-.41175116146284263,.41175116146284263,-.5597708310739475,.5597708310739475,-.6916870430603532,.6916870430603532,-.8037049589725231,.8037049589725231,-.8926024664975557,.8926024664975557,-.9558239495713977,.9558239495713977,-.9915651684209309,.9915651684209309],[0,-.16035864564022537,.16035864564022537,-.31656409996362983,.31656409996362983,-.46457074137596094,.46457074137596094,-.600545304661681,.600545304661681,-.7209661773352294,.7209661773352294,-.8227146565371428,.8227146565371428,-.9031559036148179,.9031559036148179,-.96020815213483,.96020815213483,-.9924068438435844,.9924068438435844],[-.07652652113349734,.07652652113349734,-.22778585114164507,.22778585114164507,-.37370608871541955,.37370608871541955,-.5108670019508271,.5108670019508271,-.636053680726515,.636053680726515,-.7463319064601508,.7463319064601508,-.8391169718222188,.8391169718222188,-.912234428251326,.912234428251326,-.9639719272779138,.9639719272779138,-.9931285991850949,.9931285991850949],[0,-.1455618541608951,.1455618541608951,-.2880213168024011,.2880213168024011,-.4243421202074388,.4243421202074388,-.5516188358872198,.5516188358872198,-.6671388041974123,.6671388041974123,-.7684399634756779,.7684399634756779,-.8533633645833173,.8533633645833173,-.9200993341504008,.9200993341504008,-.9672268385663063,.9672268385663063,-.9937521706203895,.9937521706203895],[-.06973927331972223,.06973927331972223,-.20786042668822127,.20786042668822127,-.34193582089208424,.34193582089208424,-.469355837986757,.469355837986757,-.5876404035069116,.5876404035069116,-.6944872631866827,.6944872631866827,-.7878168059792081,.7878168059792081,-.8658125777203002,.8658125777203002,-.926956772187174,.926956772187174,-.9700604978354287,.9700604978354287,-.9942945854823992,.9942945854823992],[0,-.1332568242984661,.1332568242984661,-.26413568097034495,.26413568097034495,-.3903010380302908,.3903010380302908,-.5095014778460075,.5095014778460075,-.6196098757636461,.6196098757636461,-.7186613631319502,.7186613631319502,-.8048884016188399,.8048884016188399,-.8767523582704416,.8767523582704416,-.9329710868260161,.9329710868260161,-.9725424712181152,.9725424712181152,-.9947693349975522,.9947693349975522],[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213]],kg=[[],[],[1,1],[.8888888888888888,.5555555555555556,.5555555555555556],[.6521451548625461,.6521451548625461,.34785484513745385,.34785484513745385],[.5688888888888889,.47862867049936647,.47862867049936647,.23692688505618908,.23692688505618908],[.3607615730481386,.3607615730481386,.46791393457269104,.46791393457269104,.17132449237917036,.17132449237917036],[.4179591836734694,.3818300505051189,.3818300505051189,.27970539148927664,.27970539148927664,.1294849661688697,.1294849661688697],[.362683783378362,.362683783378362,.31370664587788727,.31370664587788727,.22238103445337448,.22238103445337448,.10122853629037626,.10122853629037626],[.3302393550012598,.1806481606948574,.1806481606948574,.08127438836157441,.08127438836157441,.31234707704000286,.31234707704000286,.26061069640293544,.26061069640293544],[.29552422471475287,.29552422471475287,.26926671930999635,.26926671930999635,.21908636251598204,.21908636251598204,.1494513491505806,.1494513491505806,.06667134430868814,.06667134430868814],[.2729250867779006,.26280454451024665,.26280454451024665,.23319376459199048,.23319376459199048,.18629021092773426,.18629021092773426,.1255803694649046,.1255803694649046,.05566856711617366,.05566856711617366],[.24914704581340277,.24914704581340277,.2334925365383548,.2334925365383548,.20316742672306592,.20316742672306592,.16007832854334622,.16007832854334622,.10693932599531843,.10693932599531843,.04717533638651183,.04717533638651183],[.2325515532308739,.22628318026289723,.22628318026289723,.2078160475368885,.2078160475368885,.17814598076194574,.17814598076194574,.13887351021978725,.13887351021978725,.09212149983772845,.09212149983772845,.04048400476531588,.04048400476531588],[.2152638534631578,.2152638534631578,.2051984637212956,.2051984637212956,.18553839747793782,.18553839747793782,.15720316715819355,.15720316715819355,.12151857068790319,.12151857068790319,.08015808715976021,.08015808715976021,.03511946033175186,.03511946033175186],[.2025782419255613,.19843148532711158,.19843148532711158,.1861610000155622,.1861610000155622,.16626920581699392,.16626920581699392,.13957067792615432,.13957067792615432,.10715922046717194,.10715922046717194,.07036604748810812,.07036604748810812,.03075324199611727,.03075324199611727],[.1894506104550685,.1894506104550685,.18260341504492358,.18260341504492358,.16915651939500254,.16915651939500254,.14959598881657674,.14959598881657674,.12462897125553388,.12462897125553388,.09515851168249279,.09515851168249279,.062253523938647894,.062253523938647894,.027152459411754096,.027152459411754096],[.17944647035620653,.17656270536699264,.17656270536699264,.16800410215645004,.16800410215645004,.15404576107681028,.15404576107681028,.13513636846852548,.13513636846852548,.11188384719340397,.11188384719340397,.08503614831717918,.08503614831717918,.0554595293739872,.0554595293739872,.02414830286854793,.02414830286854793],[.1691423829631436,.1691423829631436,.16427648374583273,.16427648374583273,.15468467512626524,.15468467512626524,.14064291467065065,.14064291467065065,.12255520671147846,.12255520671147846,.10094204410628717,.10094204410628717,.07642573025488905,.07642573025488905,.0497145488949698,.0497145488949698,.02161601352648331,.02161601352648331],[.1610544498487837,.15896884339395434,.15896884339395434,.15276604206585967,.15276604206585967,.1426067021736066,.1426067021736066,.12875396253933621,.12875396253933621,.11156664554733399,.11156664554733399,.09149002162245,.09149002162245,.06904454273764123,.06904454273764123,.0448142267656996,.0448142267656996,.019461788229726478,.019461788229726478],[.15275338713072584,.15275338713072584,.14917298647260374,.14917298647260374,.14209610931838204,.14209610931838204,.13168863844917664,.13168863844917664,.11819453196151841,.11819453196151841,.10193011981724044,.10193011981724044,.08327674157670475,.08327674157670475,.06267204833410907,.06267204833410907,.04060142980038694,.04060142980038694,.017614007139152118,.017614007139152118],[.14608113364969041,.14452440398997005,.14452440398997005,.13988739479107315,.13988739479107315,.13226893863333747,.13226893863333747,.12183141605372853,.12183141605372853,.10879729916714838,.10879729916714838,.09344442345603386,.09344442345603386,.0761001136283793,.0761001136283793,.057134425426857205,.057134425426857205,.036953789770852494,.036953789770852494,.016017228257774335,.016017228257774335],[.13925187285563198,.13925187285563198,.13654149834601517,.13654149834601517,.13117350478706238,.13117350478706238,.12325237681051242,.12325237681051242,.11293229608053922,.11293229608053922,.10041414444288096,.10041414444288096,.08594160621706773,.08594160621706773,.06979646842452049,.06979646842452049,.052293335152683286,.052293335152683286,.03377490158481415,.03377490158481415,.0146279952982722,.0146279952982722],[.13365457218610619,.1324620394046966,.1324620394046966,.12890572218808216,.12890572218808216,.12304908430672953,.12304908430672953,.11499664022241136,.11499664022241136,.10489209146454141,.10489209146454141,.09291576606003515,.09291576606003515,.07928141177671895,.07928141177671895,.06423242140852585,.06423242140852585,.04803767173108467,.04803767173108467,.030988005856979445,.030988005856979445,.013411859487141771,.013411859487141771],[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872]],Og=[[1],[1,1],[1,2,1],[1,3,3,1]],Hc=(e,t,i)=>{let n,s;const o=i/2;n=0;for(let a=0;a<20;a++)s=o*Tg[20][a]+o,n+=kg[20][a]*Pg(e,t,s);return o*n},$c=(e,t,i)=>{i===void 0&&(i=1);const n=e[0]-2*e[1]+e[2],s=t[0]-2*t[1]+t[2],r=2*e[1]-2*e[0],o=2*t[1]-2*t[0],a=4*(n*n+s*s),l=4*(n*r+s*o),c=r*r+o*o;if(a===0)return i*Math.sqrt(Math.pow(e[2]-e[0],2)+Math.pow(t[2]-t[0],2));const h=l/(2*a),d=c/a,u=i+h,f=d-h*h,p=u*u+f>0?Math.sqrt(u*u+f):0,_=h*h+f>0?Math.sqrt(h*h+f):0,b=h+Math.sqrt(h*h+f)!==0?f*Math.log(Math.abs((u+p)/(h+_))):0;return Math.sqrt(a)/2*(u*p-h*_+b)};function Pg(e,t,i){const n=yo(1,i,e),s=yo(1,i,t),r=n*n+s*s;return Math.sqrt(r)}const yo=(e,t,i)=>{const n=i.length-1;let s,r;if(n===0)return 0;if(e===0){r=0;for(let o=0;o<=n;o++)r+=Og[n][o]*Math.pow(1-t,n-o)*Math.pow(t,o)*i[o];return r}else{s=new Array(n);for(let o=0;o<n;o++)s[o]=n*(i[o+1]-i[o]);return yo(e-1,t,s)}},Wc=(e,t,i)=>{let n=1,s=e/t,r=(e-i(s))/t,o=0;for(;n>.001;){const a=i(s+r),l=Math.abs(e-a)/t;if(l<n)n=l,s+=r;else{const c=i(s-r),h=Math.abs(e-c)/t;h<n?(n=h,s-=r):r/=2}if(o++,o>500)break}return s};class St extends V{constructor(t){super(t),this.dataArray=[],this.pathLength=0,this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute()})}_readDataAttribute(){this.dataArray=St.parsePathData(this.data()),this.pathLength=St.getPathLength(this.dataArray)}_sceneFunc(t){const i=this.dataArray;t.beginPath();let n=!1;for(let s=0;s<i.length;s++){const r=i[s].command,o=i[s].points;switch(r){case"L":t.lineTo(o[0],o[1]);break;case"M":t.moveTo(o[0],o[1]);break;case"C":t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"Q":t.quadraticCurveTo(o[0],o[1],o[2],o[3]);break;case"A":const a=o[0],l=o[1],c=o[2],h=o[3],d=o[4],u=o[5],f=o[6],p=o[7],_=c>h?c:h,b=c>h?1:c/h,S=c>h?h/c:1;t.translate(a,l),t.rotate(f),t.scale(b,S),t.arc(0,0,_,d,d+u,1-p),t.scale(1/b,1/S),t.rotate(-f),t.translate(-a,-l);break;case"z":n=!0,t.closePath();break}}!n&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){let t=[];this.dataArray.forEach(function(l){if(l.command==="A"){const c=l.points[4],h=l.points[5],d=l.points[4]+h;let u=Math.PI/180;if(Math.abs(c-d)<u&&(u=Math.abs(c-d)),h<0)for(let f=c-u;f>d;f-=u){const p=St.getPointOnEllipticalArc(l.points[0],l.points[1],l.points[2],l.points[3],f,0);t.push(p.x,p.y)}else for(let f=c+u;f<d;f+=u){const p=St.getPointOnEllipticalArc(l.points[0],l.points[1],l.points[2],l.points[3],f,0);t.push(p.x,p.y)}}else if(l.command==="C")for(let c=0;c<=1;c+=.01){const h=St.getPointOnCubicBezier(c,l.start.x,l.start.y,l.points[0],l.points[1],l.points[2],l.points[3],l.points[4],l.points[5]);t.push(h.x,h.y)}else t=t.concat(l.points)});let i=t[0],n=t[0],s=t[1],r=t[1],o,a;for(let l=0;l<t.length/2;l++)o=t[l*2],a=t[l*2+1],isNaN(o)||(i=Math.min(i,o),n=Math.max(n,o)),isNaN(a)||(s=Math.min(s,a),r=Math.max(r,a));return{x:i,y:s,width:n-i,height:r-s}}getLength(){return this.pathLength}getPointAtLength(t){return St.getPointAtLengthOfDataArray(t,this.dataArray)}static getLineLength(t,i,n,s){return Math.sqrt((n-t)*(n-t)+(s-i)*(s-i))}static getPathLength(t){let i=0;for(let n=0;n<t.length;++n)i+=t[n].pathLength;return i}static getPointAtLengthOfDataArray(t,i){let n,s=0,r=i.length;if(!r)return null;for(;s<r&&t>i[s].pathLength;)t-=i[s].pathLength,++s;if(s===r)return n=i[s-1].points.slice(-2),{x:n[0],y:n[1]};if(t<.01)return i[s].command==="M"?(n=i[s].points.slice(0,2),{x:n[0],y:n[1]}):{x:i[s].start.x,y:i[s].start.y};const o=i[s],a=o.points;switch(o.command){case"L":return St.getPointOnLine(t,o.start.x,o.start.y,a[0],a[1]);case"C":return St.getPointOnCubicBezier(Wc(t,St.getPathLength(i),_=>Hc([o.start.x,a[0],a[2],a[4]],[o.start.y,a[1],a[3],a[5]],_)),o.start.x,o.start.y,a[0],a[1],a[2],a[3],a[4],a[5]);case"Q":return St.getPointOnQuadraticBezier(Wc(t,St.getPathLength(i),_=>$c([o.start.x,a[0],a[2]],[o.start.y,a[1],a[3]],_)),o.start.x,o.start.y,a[0],a[1],a[2],a[3]);case"A":const l=a[0],c=a[1],h=a[2],d=a[3],u=a[5],f=a[6];let p=a[4];return p+=u*t/o.pathLength,St.getPointOnEllipticalArc(l,c,h,d,p,f)}return null}static getPointOnLine(t,i,n,s,r,o,a){o=o??i,a=a??n;const l=this.getLineLength(i,n,s,r);if(l<1e-10)return{x:i,y:n};if(s===i)return{x:o,y:a+(r>n?t:-t)};const c=(r-n)/(s-i),h=Math.sqrt(t*t/(1+c*c))*(s<i?-1:1),d=c*h;if(Math.abs(a-n-c*(o-i))<1e-10)return{x:o+h,y:a+d};const u=((o-i)*(s-i)+(a-n)*(r-n))/(l*l),f=i+u*(s-i),p=n+u*(r-n),_=this.getLineLength(o,a,f,p),b=Math.sqrt(t*t-_*_),S=Math.sqrt(b*b/(1+c*c))*(s<i?-1:1),y=c*S;return{x:f+S,y:p+y}}static getPointOnCubicBezier(t,i,n,s,r,o,a,l,c){function h(b){return b*b*b}function d(b){return 3*b*b*(1-b)}function u(b){return 3*b*(1-b)*(1-b)}function f(b){return(1-b)*(1-b)*(1-b)}const p=l*h(t)+o*d(t)+s*u(t)+i*f(t),_=c*h(t)+a*d(t)+r*u(t)+n*f(t);return{x:p,y:_}}static getPointOnQuadraticBezier(t,i,n,s,r,o,a){function l(f){return f*f}function c(f){return 2*f*(1-f)}function h(f){return(1-f)*(1-f)}const d=o*l(t)+s*c(t)+i*h(t),u=a*l(t)+r*c(t)+n*h(t);return{x:d,y:u}}static getPointOnEllipticalArc(t,i,n,s,r,o){const a=Math.cos(o),l=Math.sin(o),c={x:n*Math.cos(r),y:s*Math.sin(r)};return{x:t+(c.x*a-c.y*l),y:i+(c.x*l+c.y*a)}}static parsePathData(t){if(!t)return[];let i=t;const n=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"];i=i.replace(new RegExp(" ","g"),",");for(let d=0;d<n.length;d++)i=i.replace(new RegExp(n[d],"g"),"|"+n[d]);const s=i.split("|"),r=[],o=[];let a=0,l=0;const c=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi;let h;for(let d=1;d<s.length;d++){let u=s[d],f=u.charAt(0);for(u=u.slice(1),o.length=0;h=c.exec(u);)o.push(h[0]);let p=[],_=f==="A"||f==="a"?0:-1;for(let b=0,S=o.length;b<S;b++){const y=o[b];if(y==="00"){p.push(0,0),_>=0&&(_+=2,_>=7&&(_-=7));continue}if(_>=0){if(_===3){if(/^[01]{2}\d+(?:\.\d+)?$/.test(y)){p.push(parseInt(y[0],10)),p.push(parseInt(y[1],10)),p.push(parseFloat(y.slice(2))),_+=3,_>=7&&(_-=7);continue}if(y==="11"||y==="10"||y==="01"){p.push(parseInt(y[0],10)),p.push(parseInt(y[1],10)),_+=2,_>=7&&(_-=7);continue}if(y==="0"||y==="1"){p.push(parseInt(y,10)),_+=1,_>=7&&(_-=7);continue}}else if(_===4){if(/^[01]\d+(?:\.\d+)?$/.test(y)){p.push(parseInt(y[0],10)),p.push(parseFloat(y.slice(1))),_+=2,_>=7&&(_-=7);continue}if(y==="0"||y==="1"){p.push(parseInt(y,10)),_+=1,_>=7&&(_-=7);continue}}const C=parseFloat(y);isNaN(C)?p.push(0):p.push(C),_+=1,_>=7&&(_-=7)}else{const C=parseFloat(y);isNaN(C)?p.push(0):p.push(C)}}for(;p.length>0&&!isNaN(p[0]);){let b="",S=[];const y=a,C=l;let N,T,O,w,x,P,B,K,z,Z;switch(f){case"l":a+=p.shift(),l+=p.shift(),b="L",S.push(a,l);break;case"L":a=p.shift(),l=p.shift(),S.push(a,l);break;case"m":const J=p.shift(),A=p.shift();if(a+=J,l+=A,b="M",r.length>2&&r[r.length-1].command==="z"){for(let L=r.length-2;L>=0;L--)if(r[L].command==="M"){a=r[L].points[0]+J,l=r[L].points[1]+A;break}}S.push(a,l),f="l";break;case"M":a=p.shift(),l=p.shift(),b="M",S.push(a,l),f="L";break;case"h":a+=p.shift(),b="L",S.push(a,l);break;case"H":a=p.shift(),b="L",S.push(a,l);break;case"v":l+=p.shift(),b="L",S.push(a,l);break;case"V":l=p.shift(),b="L",S.push(a,l);break;case"C":S.push(p.shift(),p.shift(),p.shift(),p.shift()),a=p.shift(),l=p.shift(),S.push(a,l);break;case"c":S.push(a+p.shift(),l+p.shift(),a+p.shift(),l+p.shift()),a+=p.shift(),l+=p.shift(),b="C",S.push(a,l);break;case"S":T=a,O=l,N=r[r.length-1],N.command==="C"&&(T=a+(a-N.points[2]),O=l+(l-N.points[3])),S.push(T,O,p.shift(),p.shift()),a=p.shift(),l=p.shift(),b="C",S.push(a,l);break;case"s":T=a,O=l,N=r[r.length-1],N.command==="C"&&(T=a+(a-N.points[2]),O=l+(l-N.points[3])),S.push(T,O,a+p.shift(),l+p.shift()),a+=p.shift(),l+=p.shift(),b="C",S.push(a,l);break;case"Q":S.push(p.shift(),p.shift()),a=p.shift(),l=p.shift(),S.push(a,l);break;case"q":S.push(a+p.shift(),l+p.shift()),a+=p.shift(),l+=p.shift(),b="Q",S.push(a,l);break;case"T":T=a,O=l,N=r[r.length-1],N.command==="Q"&&(T=a+(a-N.points[0]),O=l+(l-N.points[1])),a=p.shift(),l=p.shift(),b="Q",S.push(T,O,a,l);break;case"t":T=a,O=l,N=r[r.length-1],N.command==="Q"&&(T=a+(a-N.points[0]),O=l+(l-N.points[1])),a+=p.shift(),l+=p.shift(),b="Q",S.push(T,O,a,l);break;case"A":w=p.shift(),x=p.shift(),P=p.shift(),B=p.shift(),K=p.shift(),z=a,Z=l,a=p.shift(),l=p.shift(),b="A",S=this.convertEndpointToCenterParameterization(z,Z,a,l,B,K,w,x,P);break;case"a":w=p.shift(),x=p.shift(),P=p.shift(),B=p.shift(),K=p.shift(),z=a,Z=l,a+=p.shift(),l+=p.shift(),b="A",S=this.convertEndpointToCenterParameterization(z,Z,a,l,B,K,w,x,P);break}r.push({command:b||f,points:S,start:{x:y,y:C},pathLength:this.calcLength(y,C,b||f,S)})}(f==="z"||f==="Z")&&r.push({command:"z",points:[],start:void 0,pathLength:0})}return r}static calcLength(t,i,n,s){let r,o,a,l;const c=St;switch(n){case"L":return c.getLineLength(t,i,s[0],s[1]);case"C":return Hc([t,s[0],s[2],s[4]],[i,s[1],s[3],s[5]],1);case"Q":return $c([t,s[0],s[2]],[i,s[1],s[3]],1);case"A":r=0;const h=s[4],d=s[5],u=s[4]+d;let f=Math.PI/180;if(Math.abs(h-u)<f&&(f=Math.abs(h-u)),o=c.getPointOnEllipticalArc(s[0],s[1],s[2],s[3],h,0),d<0)for(l=h-f;l>u;l-=f)a=c.getPointOnEllipticalArc(s[0],s[1],s[2],s[3],l,0),r+=c.getLineLength(o.x,o.y,a.x,a.y),o=a;else for(l=h+f;l<u;l+=f)a=c.getPointOnEllipticalArc(s[0],s[1],s[2],s[3],l,0),r+=c.getLineLength(o.x,o.y,a.x,a.y),o=a;return a=c.getPointOnEllipticalArc(s[0],s[1],s[2],s[3],u,0),r+=c.getLineLength(o.x,o.y,a.x,a.y),r}return 0}static convertEndpointToCenterParameterization(t,i,n,s,r,o,a,l,c){const h=c*(Math.PI/180),d=Math.cos(h)*(t-n)/2+Math.sin(h)*(i-s)/2,u=-1*Math.sin(h)*(t-n)/2+Math.cos(h)*(i-s)/2,f=d*d/(a*a)+u*u/(l*l);f>1&&(a*=Math.sqrt(f),l*=Math.sqrt(f));let p=Math.sqrt((a*a*(l*l)-a*a*(u*u)-l*l*(d*d))/(a*a*(u*u)+l*l*(d*d)));r===o&&(p*=-1),isNaN(p)&&(p=0);const _=p*a*u/l,b=p*-l*d/a,S=(t+n)/2+Math.cos(h)*_-Math.sin(h)*b,y=(i+s)/2+Math.sin(h)*_+Math.cos(h)*b,C=function(B){return Math.sqrt(B[0]*B[0]+B[1]*B[1])},N=function(B,K){return(B[0]*K[0]+B[1]*K[1])/(C(B)*C(K))},T=function(B,K){return(B[0]*K[1]<B[1]*K[0]?-1:1)*Math.acos(N(B,K))},O=T([1,0],[(d-_)/a,(u-b)/l]),w=[(d-_)/a,(u-b)/l],x=[(-1*d-_)/a,(-1*u-b)/l];let P=T(w,x);return N(w,x)<=-1&&(P=Math.PI),N(w,x)>=1&&(P=0),o===0&&P>0&&(P=P-2*Math.PI),o===1&&P<0&&(P=P+2*Math.PI),[S,y,a,l,O,P,h,o]}}St.prototype.className="Path",St.prototype._attrsAffectingSize=["data"],kt(St),m.addGetterSetter(St,"data");class ki extends We{_sceneFunc(t){super._sceneFunc(t);const i=Math.PI*2,n=this.points();let s=n;const r=this.tension()!==0&&n.length>4;r&&(s=this.getTensionPoints());const o=this.pointerLength(),a=n.length;let l,c;if(r){const u=[s[s.length-4],s[s.length-3],s[s.length-2],s[s.length-1],n[a-2],n[a-1]],f=St.calcLength(s[s.length-4],s[s.length-3],"C",u),p=St.getPointOnQuadraticBezier(Math.min(1,1-o/f),u[0],u[1],u[2],u[3],u[4],u[5]);l=n[a-2]-p.x,c=n[a-1]-p.y}else l=n[a-2]-n[a-4],c=n[a-1]-n[a-3];const h=(Math.atan2(c,l)+i)%i,d=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(n[a-2],n[a-1]),t.rotate(h),t.moveTo(0,0),t.lineTo(-o,d/2),t.lineTo(-o,-d/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(n[0],n[1]),r?(l=(s[0]+s[2])/2-n[0],c=(s[1]+s[3])/2-n[1]):(l=n[2]-n[0],c=n[3]-n[1]),t.rotate((Math.atan2(-c,-l)+i)%i),t.moveTo(0,0),t.lineTo(-o,d/2),t.lineTo(-o,-d/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){const i=this.dashEnabled();i&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),i&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),i=this.pointerWidth()/2;return{x:t.x,y:t.y-i,width:t.width,height:t.height+i*2}}}ki.prototype.className="Arrow",kt(ki),m.addGetterSetter(ki,"pointerLength",10,$()),m.addGetterSetter(ki,"pointerWidth",10,$()),m.addGetterSetter(ki,"pointerAtBeginning",!1),m.addGetterSetter(ki,"pointerAtEnding",!0);class qi extends V{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}}qi.prototype._centroid=!0,qi.prototype.className="Circle",qi.prototype._attrsAffectingSize=["radius"],kt(qi),m.addGetterSetter(qi,"radius",0,$());class si extends V{_sceneFunc(t){const i=this.radiusX(),n=this.radiusY();t.beginPath(),t.save(),i!==n&&t.scale(1,n/i),t.arc(0,0,i,0,Math.PI*2,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}si.prototype.className="Ellipse",si.prototype._centroid=!0,si.prototype._attrsAffectingSize=["radiusX","radiusY"],kt(si),m.addComponentsGetterSetter(si,"radius",["x","y"]),m.addGetterSetter(si,"radiusX",0,$()),m.addGetterSetter(si,"radiusY",0,$());class re extends V{constructor(t){super(t),this._loadListener=()=>{this._requestDraw()},this.on("imageChange.konva",i=>{this._removeImageLoad(i.oldVal),this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",this._loadListener)}_removeImageLoad(t){t&&t.removeEventListener&&t.removeEventListener("load",this._loadListener)}destroy(){return this._removeImageLoad(this.image()),super.destroy(),this}_useBufferCanvas(){const t=!!this.cornerRadius(),i=this.hasShadow();return t&&i?!0:super._useBufferCanvas(!0)}_sceneFunc(t){const i=this.getWidth(),n=this.getHeight(),s=this.cornerRadius(),r=this.attrs.image;let o;if(r){const a=this.attrs.cropWidth,l=this.attrs.cropHeight;a&&l?o=[r,this.cropX(),this.cropY(),a,l,0,0,i,n]:o=[r,0,0,i,n]}(this.hasFill()||this.hasStroke()||s)&&(t.beginPath(),s?E.drawRoundedRectPath(t,i,n,s):t.rect(0,0,i,n),t.closePath(),t.fillStrokeShape(this)),r&&(s&&t.clip(),t.drawImage.apply(t,o))}_hitFunc(t){const i=this.width(),n=this.height(),s=this.cornerRadius();t.beginPath(),s?E.drawRoundedRectPath(t,i,n,s):t.rect(0,0,i,n),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,i,n;return(n=(t=this.attrs.width)!==null&&t!==void 0?t:(i=this.image())===null||i===void 0?void 0:i.width)!==null&&n!==void 0?n:0}getHeight(){var t,i,n;return(n=(t=this.attrs.height)!==null&&t!==void 0?t:(i=this.image())===null||i===void 0?void 0:i.height)!==null&&n!==void 0?n:0}static fromURL(t,i,n=null){const s=E.createImageElement();s.onload=function(){const r=new re({image:s});i(r)},s.onerror=n,s.crossOrigin="Anonymous",s.src=t}}re.prototype.className="Image",re.prototype._attrsAffectingSize=["image"],kt(re),m.addGetterSetter(re,"cornerRadius",0,Ws(4)),m.addGetterSetter(re,"image"),m.addComponentsGetterSetter(re,"crop",["x","y","width","height"]),m.addGetterSetter(re,"cropX",0,$()),m.addGetterSetter(re,"cropY",0,$()),m.addGetterSetter(re,"cropWidth",0,$()),m.addGetterSetter(re,"cropHeight",0,$());const Uc=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],Ag="Change.konva",Rg="none",Eo="up",So="right",wo="down",xo="left",Mg=Uc.length;class Co extends Yi{constructor(t){super(t),this.on("add.konva",function(i){this._addListeners(i.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){let i=this,n;const s=function(){i._sync()};for(n=0;n<Mg;n++)t.on(Uc[n]+Ag,s)}getWidth(){return this.getText().width()}getHeight(){return this.getText().height()}_sync(){let t=this.getText(),i=this.getTag(),n,s,r,o,a,l,c;if(t&&i){switch(n=t.width(),s=t.height(),r=i.pointerDirection(),o=i.pointerWidth(),c=i.pointerHeight(),a=0,l=0,r){case Eo:a=n/2,l=-1*c;break;case So:a=n+o,l=s/2;break;case wo:a=n/2,l=s+c;break;case xo:a=-1*o,l=s/2;break}i.setAttrs({x:-1*a,y:-1*l,width:n,height:s}),t.setAttrs({x:-1*a,y:-1*l})}}}Co.prototype.className="Label",kt(Co);class Oi extends V{_sceneFunc(t){const i=this.width(),n=this.height(),s=this.pointerDirection(),r=this.pointerWidth(),o=this.pointerHeight(),a=this.cornerRadius();let l=0,c=0,h=0,d=0;typeof a=="number"?l=c=h=d=Math.min(a,i/2,n/2):(l=Math.min(a[0]||0,i/2,n/2),c=Math.min(a[1]||0,i/2,n/2),d=Math.min(a[2]||0,i/2,n/2),h=Math.min(a[3]||0,i/2,n/2)),t.beginPath(),t.moveTo(l,0),s===Eo&&(t.lineTo((i-r)/2,0),t.lineTo(i/2,-1*o),t.lineTo((i+r)/2,0)),t.lineTo(i-c,0),t.arc(i-c,c,c,Math.PI*3/2,0,!1),s===So&&(t.lineTo(i,(n-o)/2),t.lineTo(i+r,n/2),t.lineTo(i,(n+o)/2)),t.lineTo(i,n-d),t.arc(i-d,n-d,d,0,Math.PI/2,!1),s===wo&&(t.lineTo((i+r)/2,n),t.lineTo(i/2,n+o),t.lineTo((i-r)/2,n)),t.lineTo(h,n),t.arc(h,n-h,h,Math.PI/2,Math.PI,!1),s===xo&&(t.lineTo(0,(n+o)/2),t.lineTo(-1*r,n/2),t.lineTo(0,(n-o)/2)),t.lineTo(0,l),t.arc(l,l,l,Math.PI,Math.PI*3/2,!1),t.closePath(),t.fillStrokeShape(this)}getSelfRect(){let t=0,i=0,n=this.pointerWidth(),s=this.pointerHeight(),r=this.pointerDirection(),o=this.width(),a=this.height();return r===Eo?(i-=s,a+=s):r===wo?a+=s:r===xo?(t-=n*1.5,o+=n):r===So&&(o+=n*1.5),{x:t,y:i,width:o,height:a}}}Oi.prototype.className="Tag",kt(Oi),m.addGetterSetter(Oi,"pointerDirection",Rg),m.addGetterSetter(Oi,"pointerWidth",0,$()),m.addGetterSetter(Oi,"pointerHeight",0,$()),m.addGetterSetter(Oi,"cornerRadius",0,Ws(4));class Un extends V{_sceneFunc(t){const i=this.cornerRadius(),n=this.width(),s=this.height();t.beginPath(),i?E.drawRoundedRectPath(t,n,s,i):t.rect(0,0,n,s),t.closePath(),t.fillStrokeShape(this)}}Un.prototype.className="Rect",kt(Un),m.addGetterSetter(Un,"cornerRadius",0,Ws(4));class ri extends V{_sceneFunc(t){const i=this._getPoints(),n=this.radius(),s=this.sides(),r=this.cornerRadius();if(t.beginPath(),r)E.drawRoundedPolygonPath(t,i,s,n,r);else{t.moveTo(i[0].x,i[0].y);for(let o=1;o<i.length;o++)t.lineTo(i[o].x,i[o].y)}t.closePath(),t.fillStrokeShape(this)}_getPoints(){const t=this.attrs.sides,i=this.attrs.radius||0,n=[];for(let s=0;s<t;s++)n.push({x:i*Math.sin(s*2*Math.PI/t),y:-1*i*Math.cos(s*2*Math.PI/t)});return n}getSelfRect(){const t=this._getPoints();let i=t[0].x,n=t[0].x,s=t[0].y,r=t[0].y;return t.forEach(o=>{i=Math.min(i,o.x),n=Math.max(n,o.x),s=Math.min(s,o.y),r=Math.max(r,o.y)}),{x:i,y:s,width:n-i,height:r-s}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}ri.prototype.className="RegularPolygon",ri.prototype._centroid=!0,ri.prototype._attrsAffectingSize=["radius"],kt(ri),m.addGetterSetter(ri,"radius",0,$()),m.addGetterSetter(ri,"sides",0,$()),m.addGetterSetter(ri,"cornerRadius",0,Ws(4));const jc=Math.PI*2;class Pi extends V{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,jc,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),jc,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}Pi.prototype.className="Ring",Pi.prototype._centroid=!0,Pi.prototype._attrsAffectingSize=["innerRadius","outerRadius"],kt(Pi),m.addGetterSetter(Pi,"innerRadius",0,$()),m.addGetterSetter(Pi,"outerRadius",0,$());class ke extends V{constructor(t){super(t),this._updated=!0,this.anim=new ae(()=>{const i=this._updated;return this._updated=!1,i}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){this.anim.isRunning()&&(clearInterval(this.interval),this._setInterval())})}_sceneFunc(t){const i=this.animation(),n=this.frameIndex(),s=n*4,r=this.animations()[i],o=this.frameOffsets(),a=r[s+0],l=r[s+1],c=r[s+2],h=r[s+3],d=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,c,h),t.closePath(),t.fillStrokeShape(this)),d)if(o){const u=o[i],f=n*2;t.drawImage(d,a,l,c,h,u[f+0],u[f+1],c,h)}else t.drawImage(d,a,l,c,h,0,0,c,h)}_hitFunc(t){const i=this.animation(),n=this.frameIndex(),s=n*4,r=this.animations()[i],o=this.frameOffsets(),a=r[s+2],l=r[s+3];if(t.beginPath(),o){const c=o[i],h=n*2;t.rect(c[h+0],c[h+1],a,l)}else t.rect(0,0,a,l);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){const t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(this.isRunning())return;const t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){const t=this.frameIndex(),i=this.animation(),n=this.animations(),s=n[i],r=s.length/4;t<r-1?this.frameIndex(t+1):this.frameIndex(0)}}ke.prototype.className="Sprite",kt(ke),m.addGetterSetter(ke,"animation"),m.addGetterSetter(ke,"animations"),m.addGetterSetter(ke,"frameOffsets"),m.addGetterSetter(ke,"image"),m.addGetterSetter(ke,"frameIndex",0,$()),m.addGetterSetter(ke,"frameRate",17,$()),m.backCompat(ke,{index:"frameIndex",getIndex:"getFrameIndex",setIndex:"setFrameIndex"});class oi extends V{_sceneFunc(t){const i=this.innerRadius(),n=this.outerRadius(),s=this.numPoints();t.beginPath(),t.moveTo(0,0-n);for(let r=1;r<s*2;r++){const o=r%2===0?n:i,a=o*Math.sin(r*Math.PI/s),l=-1*o*Math.cos(r*Math.PI/s);t.lineTo(a,l)}t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}oi.prototype.className="Star",oi.prototype._centroid=!0,oi.prototype._attrsAffectingSize=["innerRadius","outerRadius"],kt(oi),m.addGetterSetter(oi,"numPoints",5,$()),m.addGetterSetter(oi,"innerRadius",0,$()),m.addGetterSetter(oi,"outerRadius",0,$());function ai(e){return[...e].reduce((t,i,n,s)=>{if(new RegExp("\\p{Emoji}","u").test(i)){const r=s[n+1];r&&new RegExp("\\p{Emoji_Modifier}|\\u200D","u").test(r)?(t.push(i+r),s[n+1]=""):t.push(i)}else new RegExp("\\p{Regional_Indicator}{2}","u").test(i+(s[n+1]||""))?t.push(i+s[n+1]):n>0&&new RegExp("\\p{Mn}|\\p{Me}|\\p{Mc}","u").test(i)?t[t.length-1]+=i:i&&t.push(i);return t},[])}const Ki="auto",Lg="center",Xc="inherit",jn="justify",Ig="Change.konva",Dg="2d",zc="-",Yc="left",Vg="text",Fg="Text",Gg="top",Bg="bottom",qc="middle",Kc="normal",Hg="px ",Qs=" ",$g="right",Jc="rtl",Wg="word",Ug="char",Qc="none",No="…",Zc=["direction","fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],jg=Zc.length;function Xg(e){return e.split(",").map(t=>{t=t.trim();const i=t.indexOf(" ")>=0,n=t.indexOf('"')>=0||t.indexOf("'")>=0;return i&&!n&&(t=`"${t}"`),t}).join(", ")}let Zs;function To(){return Zs||(Zs=E.createCanvasElement().getContext(Dg),Zs)}function zg(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function Yg(e){e.setAttr("miterLimit",2),e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function qg(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class wt extends V{constructor(t){super(qg(t)),this._partialTextX=0,this._partialTextY=0;for(let i=0;i<jg;i++)this.on(Zc[i]+Ig,this._setTextData);this._setTextData()}_sceneFunc(t){var i,n;const s=this.textArr,r=s.length;if(!this.text())return;let o=this.padding(),a=this.fontSize(),l=this.lineHeight()*a,c=this.verticalAlign(),h=this.direction(),d=0,u=this.align(),f=this.getWidth(),p=this.letterSpacing(),_=this.charRenderFunc(),b=this.fill(),S=this.textDecoration(),y=S.indexOf("underline")!==-1,C=S.indexOf("line-through")!==-1,N;h=h===Xc?t.direction:h;let T=l/2,O=qc;if(!X.legacyTextRendering){const w=this.measureSize("M");O="alphabetic";const x=(i=w.fontBoundingBoxAscent)!==null&&i!==void 0?i:w.actualBoundingBoxAscent,P=(n=w.fontBoundingBoxDescent)!==null&&n!==void 0?n:w.actualBoundingBoxDescent;T=(x-P)/2+l/2}for(h===Jc&&t.setAttr("direction",h),t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",O),t.setAttr("textAlign",Yc),c===qc?d=(this.getHeight()-r*l-o*2)/2:c===Bg&&(d=this.getHeight()-r*l-o*2),t.translate(o,d+o),N=0;N<r;N++){let w=0,x=0;const P=s[N],B=P.text,K=P.width,z=P.lastInParagraph;if(t.save(),u===$g?w+=f-K-o*2:u===Lg&&(w+=(f-K-o*2)/2),y){t.save(),t.beginPath();const J=X.legacyTextRendering?Math.round(a/2):Math.round(a/4),A=w,L=T+x+J;t.moveTo(A,L);const H=u===jn&&!z?f-o*2:K;t.lineTo(A+Math.round(H),L),t.lineWidth=a/15;const D=this._getLinearGradient();t.strokeStyle=D||b,t.stroke(),t.restore()}const Z=w;if(h!==Jc&&(p!==0||u===jn||_)){const J=B.split(" ").length-1,A=ai(B);for(let L=0;L<A.length;L++){const H=A[L];if(H===" "&&!z&&u===jn&&(w+=(f-o*2-K)/J),this._partialTextX=w,this._partialTextY=T+x,this._partialText=H,_){t.save();const nt=s.slice(0,N).reduce((ot,gt)=>ot+ai(gt.text).length,0),ct=L+nt;_({char:H,index:ct,x:w,y:T+x,lineIndex:N,column:L,isLastInLine:z,width:this.measureSize(H).width,context:t})}t.fillStrokeShape(this),_&&t.restore(),w+=this.measureSize(H).width+p}}else p!==0&&t.setAttr("letterSpacing",`${p}px`),this._partialTextX=w,this._partialTextY=T+x,this._partialText=B,t.fillStrokeShape(this);if(C){t.save(),t.beginPath();const J=X.legacyTextRendering?0:-Math.round(a/4),A=Z;t.moveTo(A,T+x+J);const L=u===jn&&!z?f-o*2:K;t.lineTo(A+Math.round(L),T+x+J),t.lineWidth=a/15;const H=this._getLinearGradient();t.strokeStyle=H||b,t.stroke(),t.restore()}t.restore(),r>1&&(T+=l)}}_hitFunc(t){const i=this.getWidth(),n=this.getHeight();t.beginPath(),t.rect(0,0,i,n),t.closePath(),t.fillStrokeShape(this)}setText(t){const i=E._isString(t)?t:t==null?"":t+"";return this._setAttr(Vg,i),this}getWidth(){return this.attrs.width===Ki||this.attrs.width===void 0?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){return this.attrs.height===Ki||this.attrs.height===void 0?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return E.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var i,n,s,r,o,a,l,c,h,d,u;let f=To(),p=this.fontSize(),_;f.save(),f.font=this._getContextFont(),_=f.measureText(t),f.restore();const b=p/100;return{actualBoundingBoxAscent:(i=_.actualBoundingBoxAscent)!==null&&i!==void 0?i:71.58203125*b,actualBoundingBoxDescent:(n=_.actualBoundingBoxDescent)!==null&&n!==void 0?n:0,actualBoundingBoxLeft:(s=_.actualBoundingBoxLeft)!==null&&s!==void 0?s:-7.421875*b,actualBoundingBoxRight:(r=_.actualBoundingBoxRight)!==null&&r!==void 0?r:75.732421875*b,alphabeticBaseline:(o=_.alphabeticBaseline)!==null&&o!==void 0?o:0,emHeightAscent:(a=_.emHeightAscent)!==null&&a!==void 0?a:100*b,emHeightDescent:(l=_.emHeightDescent)!==null&&l!==void 0?l:-20*b,fontBoundingBoxAscent:(c=_.fontBoundingBoxAscent)!==null&&c!==void 0?c:91*b,fontBoundingBoxDescent:(h=_.fontBoundingBoxDescent)!==null&&h!==void 0?h:21*b,hangingBaseline:(d=_.hangingBaseline)!==null&&d!==void 0?d:72.80000305175781*b,ideographicBaseline:(u=_.ideographicBaseline)!==null&&u!==void 0?u:-21*b,width:_.width,height:p}}_getContextFont(){return this.fontStyle()+Qs+this.fontVariant()+Qs+(this.fontSize()+Hg)+Xg(this.fontFamily())}_addTextLine(t){this.align()===jn&&(t=t.trim());const n=this._getTextWidth(t);return this.textArr.push({text:t,width:n,lastInParagraph:!1})}_getTextWidth(t){const i=this.letterSpacing(),n=t.length;return To().measureText(t).width+i*n}_setTextData(){let t=this.text().split(`
|
|
30
|
+
`),i=+this.fontSize(),n=0,s=this.lineHeight()*i,r=this.attrs.width,o=this.attrs.height,a=r!==Ki&&r!==void 0,l=o!==Ki&&o!==void 0,c=this.padding(),h=r-c*2,d=o-c*2,u=0,f=this.wrap(),p=f!==Qc,_=f!==Ug&&p,b=this.ellipsis();this.textArr=[],To().font=this._getContextFont();const S=b?this._getTextWidth(No):0;for(let y=0,C=t.length;y<C;++y){let N=t[y],T=this._getTextWidth(N);if(a&&T>h)for(;N.length>0;){let O=0,w=ai(N).length,x="",P=0;for(;O<w;){const B=O+w>>>1,K=ai(N),z=K.slice(0,B+1).join(""),Z=this._getTextWidth(z);(b&&l&&u+s>d?Z+S:Z)<=h?(O=B+1,x=z,P=Z):w=B}if(x){if(_){const z=ai(N),Z=ai(x),J=z[Z.length],A=J===Qs||J===zc;let L;if(A&&P<=h)L=Z.length;else{const H=Z.lastIndexOf(Qs),D=Z.lastIndexOf(zc);L=Math.max(H,D)+1}L>0&&(O=L,x=z.slice(0,O).join(""),P=this._getTextWidth(x))}if(x=x.trimRight(),this._addTextLine(x),n=Math.max(n,P),u+=s,this._shouldHandleEllipsis(u)){this._tryToAddEllipsisToLastLine();break}if(N=ai(N).slice(O).join("").trimLeft(),N.length>0&&(T=this._getTextWidth(N),T<=h)){this._addTextLine(N),u+=s,n=Math.max(n,T);break}}else break}else this._addTextLine(N),u+=s,n=Math.max(n,T),this._shouldHandleEllipsis(u)&&y<C-1&&this._tryToAddEllipsisToLastLine();if(this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0),l&&u+s>d)break}this.textHeight=i,this.textWidth=n}_shouldHandleEllipsis(t){const i=+this.fontSize(),n=this.lineHeight()*i,s=this.attrs.height,r=s!==Ki&&s!==void 0,o=this.padding(),a=s-o*2;return!(this.wrap()!==Qc)||r&&t+n>a}_tryToAddEllipsisToLastLine(){const t=this.attrs.width,i=t!==Ki&&t!==void 0,n=this.padding(),s=t-n*2,r=this.ellipsis(),o=this.textArr[this.textArr.length-1];!o||!r||(i&&(this._getTextWidth(o.text+No)<s||(o.text=o.text.slice(0,o.text.length-3))),this.textArr.splice(this.textArr.length-1,1),this._addTextLine(o.text+No))}getStrokeScaleEnabled(){return!0}_useBufferCanvas(){const t=this.textDecoration().indexOf("underline")!==-1||this.textDecoration().indexOf("line-through")!==-1,i=this.hasShadow();return t&&i?!0:super._useBufferCanvas()}}wt.prototype._fillFunc=zg,wt.prototype._strokeFunc=Yg,wt.prototype.className=Fg,wt.prototype._attrsAffectingSize=["text","fontSize","padding","wrap","lineHeight","letterSpacing"],kt(wt),m.overWriteSetter(wt,"width",ao()),m.overWriteSetter(wt,"height",ao()),m.addGetterSetter(wt,"direction",Xc),m.addGetterSetter(wt,"fontFamily","Arial"),m.addGetterSetter(wt,"fontSize",12,$()),m.addGetterSetter(wt,"fontStyle",Kc),m.addGetterSetter(wt,"fontVariant",Kc),m.addGetterSetter(wt,"padding",0,$()),m.addGetterSetter(wt,"align",Yc),m.addGetterSetter(wt,"verticalAlign",Gg),m.addGetterSetter(wt,"lineHeight",1,$()),m.addGetterSetter(wt,"wrap",Wg),m.addGetterSetter(wt,"ellipsis",!1,_e()),m.addGetterSetter(wt,"letterSpacing",0,$()),m.addGetterSetter(wt,"text","",Ci()),m.addGetterSetter(wt,"textDecoration",""),m.addGetterSetter(wt,"charRenderFunc",void 0);const Kg="",th="normal";function eh(e){e.fillText(this.partialText,0,0)}function ih(e){e.strokeText(this.partialText,0,0)}class Dt extends V{constructor(t){super(t),this.dummyCanvas=E.createCanvasElement(),this.dataArray=[],this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute(),this._setTextData()}),this.on("textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncChange.konva fontSizeChange.konva fontFamilyChange.konva",this._setTextData),this._setTextData()}_getTextPathLength(){return St.getPathLength(this.dataArray)}_getPointAtLength(t){if(!this.attrs.data)return null;const i=this.pathLength;return t>i?null:St.getPointAtLengthOfDataArray(t,this.dataArray)}_readDataAttribute(){this.dataArray=St.parsePathData(this.attrs.data),this.pathLength=this._getTextPathLength()}_sceneFunc(t){t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",this.textBaseline()),t.setAttr("textAlign","left"),t.save();const i=this.textDecoration(),n=this.fill(),s=this.fontSize(),r=this.glyphInfo,o=i.indexOf("underline")!==-1,a=i.indexOf("line-through")!==-1;o&&t.beginPath();for(let l=0;l<r.length;l++){t.save();const c=r[l].p0;t.translate(c.x,c.y),t.rotate(r[l].rotation),this.partialText=r[l].text,t.fillStrokeShape(this),o&&(l===0&&t.moveTo(0,s/2+1),t.lineTo(r[l].width,s/2+1)),t.restore()}if(o&&(t.strokeStyle=n,t.lineWidth=s/20,t.stroke()),a){t.beginPath();for(let l=0;l<r.length;l++){t.save();const c=r[l].p0;t.translate(c.x,c.y),t.rotate(r[l].rotation),l===0&&t.moveTo(0,0),t.lineTo(r[l].width,0),t.restore()}t.strokeStyle=n,t.lineWidth=s/20,t.stroke()}t.restore()}_hitFunc(t){t.beginPath();const i=this.glyphInfo;if(i.length>=1){const n=i[0].p0;t.moveTo(n.x,n.y)}for(let n=0;n<i.length;n++){const s=i[n].p1;t.lineTo(s.x,s.y)}t.setAttr("lineWidth",this.fontSize()),t.setAttr("strokeStyle",this.colorKey),t.stroke()}getTextWidth(){return this.textWidth}getTextHeight(){return E.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}setText(t){return wt.prototype.setText.call(this,t)}_getContextFont(){return wt.prototype._getContextFont.call(this)}_getTextSize(t){const n=this.dummyCanvas.getContext("2d");n.save(),n.font=this._getContextFont();const s=n.measureText(t);return n.restore(),{width:s.width,height:parseInt(`${this.fontSize()}`,10)}}_setTextData(){const t=ai(this.text()),i=[];let n=0;for(let d=0;d<t.length;d++)i.push({char:t[d],width:this._getTextSize(t[d]).width}),n+=i[d].width;const{height:s}=this._getTextSize(this.attrs.text);if(this.textWidth=n,this.textHeight=s,this.glyphInfo=[],!this.attrs.data)return null;const r=this.letterSpacing(),o=this.align(),a=this.kerningFunc(),l=Math.max(this.textWidth+((this.attrs.text||"").length-1)*r,0);let c=0;o==="center"&&(c=Math.max(0,this.pathLength/2-l/2)),o==="right"&&(c=Math.max(0,this.pathLength-l));let h=c;for(let d=0;d<i.length;d++){const u=this._getPointAtLength(h);if(!u)return;const f=i[d].char;let p=i[d].width+r;if(f===" "&&o==="justify"){const N=this.text().split(" ").length-1;p+=(this.pathLength-l)/N}const _=this._getPointAtLength(h+p);if(!_)return;const b=St.getLineLength(u.x,u.y,_.x,_.y);let S=0;if(a)try{S=a(i[d-1].char,f)*this.fontSize()}catch{S=0}u.x+=S,_.x+=S,this.textWidth+=S;const y=St.getPointOnLine(S+b/2,u.x,u.y,_.x,_.y),C=Math.atan2(_.y-u.y,_.x-u.x);this.glyphInfo.push({transposeX:y.x,transposeY:y.y,text:t[d],rotation:C,p0:u,p1:_,width:b}),h+=p}}getSelfRect(){if(!this.glyphInfo.length)return{x:0,y:0,width:0,height:0};const t=[];this.glyphInfo.forEach(function(c){t.push(c.p0.x),t.push(c.p0.y),t.push(c.p1.x),t.push(c.p1.y)});let i=t[0]||0,n=t[0]||0,s=t[1]||0,r=t[1]||0,o,a;for(let c=0;c<t.length/2;c++)o=t[c*2],a=t[c*2+1],i=Math.min(i,o),n=Math.max(n,o),s=Math.min(s,a),r=Math.max(r,a);const l=this.fontSize();return{x:i-l/2,y:s-l/2,width:n-i+l,height:r-s+l}}destroy(){return E.releaseCanvas(this.dummyCanvas),super.destroy()}}Dt.prototype._fillFunc=eh,Dt.prototype._strokeFunc=ih,Dt.prototype._fillFuncHit=eh,Dt.prototype._strokeFuncHit=ih,Dt.prototype.className="TextPath",Dt.prototype._attrsAffectingSize=["text","fontSize","data"],kt(Dt),m.addGetterSetter(Dt,"data"),m.addGetterSetter(Dt,"fontFamily","Arial"),m.addGetterSetter(Dt,"fontSize",12,$()),m.addGetterSetter(Dt,"fontStyle",th),m.addGetterSetter(Dt,"align","left"),m.addGetterSetter(Dt,"letterSpacing",0,$()),m.addGetterSetter(Dt,"textBaseline","middle"),m.addGetterSetter(Dt,"fontVariant",th),m.addGetterSetter(Dt,"text",Kg),m.addGetterSetter(Dt,"textDecoration",""),m.addGetterSetter(Dt,"kerningFunc",void 0);const nh="tr-konva",Jg=["resizeEnabledChange","rotateAnchorOffsetChange","rotateEnabledChange","enabledAnchorsChange","anchorSizeChange","borderEnabledChange","borderStrokeChange","borderStrokeWidthChange","borderDashChange","anchorStrokeChange","anchorStrokeWidthChange","anchorFillChange","anchorCornerRadiusChange","ignoreStrokeChange","anchorStyleFuncChange"].map(e=>e+`.${nh}`).join(" "),sh="nodesRect",Qg=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange","draggableChange"],Zg={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135},t1="ontouchstart"in X._global;function e1(e,t,i){if(e==="rotater")return i;t+=E.degToRad(Zg[e]||0);const n=(E.radToDeg(t)%360+360)%360;return E._inRange(n,315+22.5,360)||E._inRange(n,0,22.5)?"ns-resize":E._inRange(n,45-22.5,45+22.5)?"nesw-resize":E._inRange(n,90-22.5,90+22.5)?"ew-resize":E._inRange(n,135-22.5,135+22.5)?"nwse-resize":E._inRange(n,180-22.5,180+22.5)?"ns-resize":E._inRange(n,225-22.5,225+22.5)?"nesw-resize":E._inRange(n,270-22.5,270+22.5)?"ew-resize":E._inRange(n,315-22.5,315+22.5)?"nwse-resize":(E.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}const tr=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"];function i1(e){return{x:e.x+e.width/2*Math.cos(e.rotation)+e.height/2*Math.sin(-e.rotation),y:e.y+e.height/2*Math.cos(e.rotation)+e.width/2*Math.sin(e.rotation)}}function rh(e,t,i){const n=i.x+(e.x-i.x)*Math.cos(t)-(e.y-i.y)*Math.sin(t),s=i.y+(e.x-i.x)*Math.sin(t)+(e.y-i.y)*Math.cos(t);return{...e,rotation:e.rotation+t,x:n,y:s}}function n1(e,t){const i=i1(e);return rh(e,t,i)}function s1(e,t,i){let n=t;for(let s=0;s<e.length;s++){const r=X.getAngle(e[s]),o=Math.abs(r-t)%(Math.PI*2);Math.min(o,Math.PI*2-o)<i&&(n=r)}return n}let ko=0;class lt extends Yi{constructor(t){super(t),this._movingAnchorName=null,this._transforming=!1,this._createElements(),this._handleMouseMove=this._handleMouseMove.bind(this),this._handleMouseUp=this._handleMouseUp.bind(this),this.update=this.update.bind(this),this.on(Jg,this.update),this.getNode()&&this.update()}attachTo(t){return this.setNode(t),this}setNode(t){return E.warn("tr.setNode(shape), tr.node(shape) and tr.attachTo(shape) methods are deprecated. Please use tr.nodes(nodesArray) instead."),this.setNodes([t])}getNode(){return this._nodes&&this._nodes[0]}_getEventNamespace(){return nh+this._id}setNodes(t=[]){this._nodes&&this._nodes.length&&this.detach();const i=t.filter(s=>s.isAncestorOf(this)?(E.error("Konva.Transformer cannot be an a child of the node you are trying to attach"),!1):!0);return this._nodes=t=i,t.length===1&&this.useSingleNodeRotation()?this.rotation(t[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach(s=>{const r=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()};if(s._attrsAffectingSize.length){const o=s._attrsAffectingSize.map(a=>a+"Change."+this._getEventNamespace()).join(" ");s.on(o,r)}s.on(Qg.map(o=>o+`.${this._getEventNamespace()}`).join(" "),r),s.on(`absoluteTransformChange.${this._getEventNamespace()}`,r),this._proxyDrag(s)}),this._resetTransformCache(),!!this.findOne(".top-left")&&this.update(),this}_proxyDrag(t){let i;t.on(`dragstart.${this._getEventNamespace()}`,n=>{i=t.getAbsolutePosition(),!this.isDragging()&&t!==this.findOne(".back")&&this.startDrag(n,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,n=>{if(!i)return;const s=t.getAbsolutePosition(),r=s.x-i.x,o=s.y-i.y;this.nodes().forEach(a=>{if(a===t||a.isDragging())return;const l=a.getAbsolutePosition();a.setAbsolutePosition({x:l.x+r,y:l.y+o}),a.startDrag(n)}),i=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(sh),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(sh,this.__getNodeRect)}__getNodeShape(t,i=this.rotation(),n){const s=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),r=t.getAbsoluteScale(n),o=t.getAbsolutePosition(n),a=s.x*r.x-t.offsetX()*r.x,l=s.y*r.y-t.offsetY()*r.y,c=(X.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),h={x:o.x+a*Math.cos(c)+l*Math.sin(-c),y:o.y+l*Math.cos(c)+a*Math.sin(c),width:s.width*r.x,height:s.height*r.y,rotation:c};return rh(h,-X.getAngle(i),{x:0,y:0})}__getNodeRect(){if(!this.getNode())return{x:-1e8,y:-1e8,width:0,height:0,rotation:0};const i=[];this.nodes().map(c=>{const h=c.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),d=[{x:h.x,y:h.y},{x:h.x+h.width,y:h.y},{x:h.x+h.width,y:h.y+h.height},{x:h.x,y:h.y+h.height}],u=c.getAbsoluteTransform();d.forEach(function(f){const p=u.point(f);i.push(p)})});const n=new ne;n.rotate(-X.getAngle(this.rotation()));let s=1/0,r=1/0,o=-1/0,a=-1/0;i.forEach(function(c){const h=n.point(c);s===void 0&&(s=o=h.x,r=a=h.y),s=Math.min(s,h.x),r=Math.min(r,h.y),o=Math.max(o,h.x),a=Math.max(a,h.y)}),n.invert();const l=n.point({x:s,y:r});return{x:l.x,y:l.y,width:o-s,height:a-r,rotation:X.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),tr.forEach(t=>{this._createAnchor(t)}),this._createAnchor("rotater")}_createAnchor(t){const i=new Un({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:t1?10:"auto"}),n=this;i.on("mousedown touchstart",function(s){n._handleMouseDown(s)}),i.on("dragstart",s=>{i.stopDrag(),s.cancelBubble=!0}),i.on("dragend",s=>{s.cancelBubble=!0}),i.on("mouseenter",()=>{const s=X.getAngle(this.rotation()),r=this.rotateAnchorCursor(),o=e1(t,s,r);i.getStage().content&&(i.getStage().content.style.cursor=o),this._cursorChange=!0}),i.on("mouseout",()=>{i.getStage().content&&(i.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(i)}_createBack(){const t=new V({name:"back",width:0,height:0,sceneFunc(i,n){const s=n.getParent(),r=s.padding();i.beginPath(),i.rect(-r,-r,n.width()+r*2,n.height()+r*2),i.moveTo(n.width()/2,-r),s.rotateEnabled()&&s.rotateLineVisible()&&i.lineTo(n.width()/2,-s.rotateAnchorOffset()*E._sign(n.height())-r),i.fillStrokeShape(n)},hitFunc:(i,n)=>{if(!this.shouldOverdrawWholeArea())return;const s=this.padding();i.beginPath(),i.rect(-s,-s,n.width()+s*2,n.height()+s*2),i.fillStrokeShape(n)}});this.add(t),this._proxyDrag(t),t.on("dragstart",i=>{i.cancelBubble=!0}),t.on("dragmove",i=>{i.cancelBubble=!0}),t.on("dragend",i=>{i.cancelBubble=!0}),this.on("dragmove",i=>{this.update()})}_handleMouseDown(t){if(this._transforming)return;this._movingAnchorName=t.target.name().split(" ")[0];const i=this._getNodeRect(),n=i.width,s=i.height,r=Math.sqrt(Math.pow(n,2)+Math.pow(s,2));this.sin=Math.abs(s/r),this.cos=Math.abs(n/r),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;const o=t.target.getAbsolutePosition(),a=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:a.x-o.x,y:a.y-o.y},ko++,this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(l=>{l._fire("transformstart",{evt:t.evt,target:l})})}_handleMouseMove(t){let i,n,s;const r=this.findOne("."+this._movingAnchorName),o=r.getStage();o.setPointersPositions(t);const a=o.getPointerPosition();let l={x:a.x-this._anchorDragOffset.x,y:a.y-this._anchorDragOffset.y};const c=r.getAbsolutePosition();this.anchorDragBoundFunc()&&(l=this.anchorDragBoundFunc()(c,l,t)),r.setAbsolutePosition(l);const h=r.getAbsolutePosition();if(c.x===h.x&&c.y===h.y)return;if(this._movingAnchorName==="rotater"){const y=this._getNodeRect();i=r.x()-y.width/2,n=-r.y()+y.height/2;let C=Math.atan2(-n,i)+Math.PI/2;y.height<0&&(C-=Math.PI);const T=X.getAngle(this.rotation())+C,O=X.getAngle(this.rotationSnapTolerance()),x=s1(this.rotationSnaps(),T,O)-y.rotation,P=n1(y,x);this._fitNodesInto(P,t);return}const d=this.shiftBehavior();let u;d==="inverted"?u=this.keepRatio()&&!t.shiftKey:d==="none"?u=this.keepRatio():u=this.keepRatio()||t.shiftKey;let f=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(u){const y=f?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};s=Math.sqrt(Math.pow(y.x-r.x(),2)+Math.pow(y.y-r.y(),2));const C=this.findOne(".top-left").x()>y.x?-1:1,N=this.findOne(".top-left").y()>y.y?-1:1;i=s*this.cos*C,n=s*this.sin*N,this.findOne(".top-left").x(y.x-i),this.findOne(".top-left").y(y.y-n)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(r.y());else if(this._movingAnchorName==="top-right"){if(u){const y=f?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};s=Math.sqrt(Math.pow(r.x()-y.x,2)+Math.pow(y.y-r.y(),2));const C=this.findOne(".top-right").x()<y.x?-1:1,N=this.findOne(".top-right").y()>y.y?-1:1;i=s*this.cos*C,n=s*this.sin*N,this.findOne(".top-right").x(y.x+i),this.findOne(".top-right").y(y.y-n)}var p=r.position();this.findOne(".top-left").y(p.y),this.findOne(".bottom-right").x(p.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(r.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(r.x());else if(this._movingAnchorName==="bottom-left"){if(u){const y=f?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};s=Math.sqrt(Math.pow(y.x-r.x(),2)+Math.pow(r.y()-y.y,2));const C=y.x<r.x()?-1:1,N=r.y()<y.y?-1:1;i=s*this.cos*C,n=s*this.sin*N,r.x(y.x-i),r.y(y.y+n)}p=r.position(),this.findOne(".top-left").x(p.x),this.findOne(".bottom-right").y(p.y)}else if(this._movingAnchorName==="bottom-center")this.findOne(".bottom-right").y(r.y());else if(this._movingAnchorName==="bottom-right"){if(u){const y=f?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-left").x(),y:this.findOne(".top-left").y()};s=Math.sqrt(Math.pow(r.x()-y.x,2)+Math.pow(r.y()-y.y,2));const C=this.findOne(".bottom-right").x()<y.x?-1:1,N=this.findOne(".bottom-right").y()<y.y?-1:1;i=s*this.cos*C,n=s*this.sin*N,this.findOne(".bottom-right").x(y.x+i),this.findOne(".bottom-right").y(y.y+n)}}else console.error(new Error("Wrong position argument of selection resizer: "+this._movingAnchorName));if(f=this.centeredScaling()||t.altKey,f){const y=this.findOne(".top-left"),C=this.findOne(".bottom-right"),N=y.x(),T=y.y(),O=this.getWidth()-C.x(),w=this.getHeight()-C.y();C.move({x:-N,y:-T}),y.move({x:O,y:w})}const _=this.findOne(".top-left").getAbsolutePosition();i=_.x,n=_.y;const b=this.findOne(".bottom-right").x()-this.findOne(".top-left").x(),S=this.findOne(".bottom-right").y()-this.findOne(".top-left").y();this._fitNodesInto({x:i,y:n,width:b,height:S,rotation:X.getAngle(this.rotation())},t)}_handleMouseUp(t){this._removeEvents(t)}getAbsoluteTransform(){return this.getTransform()}_removeEvents(t){var i;if(this._transforming){this._transforming=!1,typeof window<"u"&&(window.removeEventListener("mousemove",this._handleMouseMove),window.removeEventListener("touchmove",this._handleMouseMove),window.removeEventListener("mouseup",this._handleMouseUp,!0),window.removeEventListener("touchend",this._handleMouseUp,!0));const n=this.getNode();ko--,this._fire("transformend",{evt:t,target:n}),(i=this.getLayer())===null||i===void 0||i.batchDraw(),n&&this._nodes.forEach(s=>{var r;s._fire("transformend",{evt:t,target:s}),(r=s.getLayer())===null||r===void 0||r.batchDraw()}),this._movingAnchorName=null}}_fitNodesInto(t,i){const n=this._getNodeRect(),s=1;if(E._inRange(t.width,-this.padding()*2-s,s)){this.update();return}if(E._inRange(t.height,-this.padding()*2-s,s)){this.update();return}const r=new ne;if(r.rotate(X.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const u=r.point({x:-this.padding()*2,y:0});t.x+=u.x,t.y+=u.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=u.x,this._anchorDragOffset.y-=u.y}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const u=r.point({x:this.padding()*2,y:0});this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=u.x,this._anchorDragOffset.y-=u.y,t.width+=this.padding()*2}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const u=r.point({x:0,y:-this.padding()*2});t.x+=u.x,t.y+=u.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=u.x,this._anchorDragOffset.y-=u.y,t.height+=this.padding()*2}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const u=r.point({x:0,y:this.padding()*2});this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=u.x,this._anchorDragOffset.y-=u.y,t.height+=this.padding()*2}if(this.boundBoxFunc()){const u=this.boundBoxFunc()(n,t);u?t=u:E.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const o=1e7,a=new ne;a.translate(n.x,n.y),a.rotate(n.rotation),a.scale(n.width/o,n.height/o);const l=new ne,c=t.width/o,h=t.height/o;this.flipEnabled()===!1?(l.translate(t.x,t.y),l.rotate(t.rotation),l.translate(t.width<0?t.width:0,t.height<0?t.height:0),l.scale(Math.abs(c),Math.abs(h))):(l.translate(t.x,t.y),l.rotate(t.rotation),l.scale(c,h));const d=l.multiply(a.invert());this._nodes.forEach(u=>{var f;if(!u.getStage())return;const p=u.getParent().getAbsoluteTransform(),_=u.getTransform().copy();_.translate(u.offsetX(),u.offsetY());const b=new ne;b.multiply(p.copy().invert()).multiply(d).multiply(p).multiply(_);const S=b.decompose();u.setAttrs(S),(f=u.getLayer())===null||f===void 0||f.batchDraw()}),this.rotation(E._getRotation(t.rotation)),this._nodes.forEach(u=>{this._fire("transform",{evt:i,target:u}),u._fire("transform",{evt:i,target:u})}),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,i){this.findOne(t).setAttrs(i)}update(){var t;const i=this._getNodeRect();this.rotation(E._getRotation(i.rotation));const n=i.width,s=i.height,r=this.enabledAnchors(),o=this.resizeEnabled(),a=this.padding(),l=this.anchorSize(),c=this.find("._anchor");c.forEach(d=>{d.setAttrs({width:l,height:l,offsetX:l/2,offsetY:l/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:l/2+a,offsetY:l/2+a,visible:o&&r.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:n/2,y:0,offsetY:l/2+a,visible:o&&r.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:n,y:0,offsetX:l/2-a,offsetY:l/2+a,visible:o&&r.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:s/2,offsetX:l/2+a,visible:o&&r.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:n,y:s/2,offsetX:l/2-a,visible:o&&r.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:s,offsetX:l/2+a,offsetY:l/2-a,visible:o&&r.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:n/2,y:s,offsetY:l/2-a,visible:o&&r.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:n,y:s,offsetX:l/2-a,offsetY:l/2-a,visible:o&&r.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:n/2,y:-this.rotateAnchorOffset()*E._sign(s)-a,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:n,height:s,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),draggable:this.nodes().some(d=>d.draggable()),x:0,y:0});const h=this.anchorStyleFunc();h&&c.forEach(d=>{h(d)}),(t=this.getLayer())===null||t===void 0||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();const t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),Yi.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return G.prototype.toObject.call(this)}clone(t){return G.prototype.clone.call(this,t)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}lt.isTransforming=()=>ko>0;function r1(e){return e instanceof Array||E.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){tr.indexOf(t)===-1&&E.warn("Unknown anchor name: "+t+". Available names are: "+tr.join(", "))}),e||[]}lt.prototype.className="Transformer",kt(lt),m.addGetterSetter(lt,"enabledAnchors",tr,r1),m.addGetterSetter(lt,"flipEnabled",!0,_e()),m.addGetterSetter(lt,"resizeEnabled",!0),m.addGetterSetter(lt,"anchorSize",10,$()),m.addGetterSetter(lt,"rotateEnabled",!0),m.addGetterSetter(lt,"rotateLineVisible",!0),m.addGetterSetter(lt,"rotationSnaps",[]),m.addGetterSetter(lt,"rotateAnchorOffset",50,$()),m.addGetterSetter(lt,"rotateAnchorCursor","crosshair"),m.addGetterSetter(lt,"rotationSnapTolerance",5,$()),m.addGetterSetter(lt,"borderEnabled",!0),m.addGetterSetter(lt,"anchorStroke","rgb(0, 161, 255)"),m.addGetterSetter(lt,"anchorStrokeWidth",1,$()),m.addGetterSetter(lt,"anchorFill","white"),m.addGetterSetter(lt,"anchorCornerRadius",0,$()),m.addGetterSetter(lt,"borderStroke","rgb(0, 161, 255)"),m.addGetterSetter(lt,"borderStrokeWidth",1,$()),m.addGetterSetter(lt,"borderDash"),m.addGetterSetter(lt,"keepRatio",!0),m.addGetterSetter(lt,"shiftBehavior","default"),m.addGetterSetter(lt,"centeredScaling",!1),m.addGetterSetter(lt,"ignoreStroke",!1),m.addGetterSetter(lt,"padding",0,$()),m.addGetterSetter(lt,"nodes"),m.addGetterSetter(lt,"node"),m.addGetterSetter(lt,"boundBoxFunc"),m.addGetterSetter(lt,"anchorDragBoundFunc"),m.addGetterSetter(lt,"anchorStyleFunc"),m.addGetterSetter(lt,"shouldOverdrawWholeArea",!1),m.addGetterSetter(lt,"useSingleNodeRotation",!0),m.backCompat(lt,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class Ue extends V{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,X.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Ue.prototype.className="Wedge",Ue.prototype._centroid=!0,Ue.prototype._attrsAffectingSize=["radius"],kt(Ue),m.addGetterSetter(Ue,"radius",0,$()),m.addGetterSetter(Ue,"angle",0,$()),m.addGetterSetter(Ue,"clockwise",!1),m.backCompat(Ue,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function oh(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}const o1=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],a1=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function l1(e,t){const i=e.data,n=e.width,s=e.height;let r,o,a,l,c,h,d,u,f,p,_,b,S,y,C,N,T,O,w,x;const P=t+t+1,B=n-1,K=s-1,z=t+1,Z=z*(z+1)/2,J=new oh,A=o1[t],L=a1[t];let H=null,D=J,nt=null,ct=null;for(let ot=1;ot<P;ot++)D=D.next=new oh,ot===z&&(H=D);D.next=J,a=o=0;for(let ot=0;ot<s;ot++){b=S=y=C=l=c=h=d=0,u=z*(N=i[o]),f=z*(T=i[o+1]),p=z*(O=i[o+2]),_=z*(w=i[o+3]),l+=Z*N,c+=Z*T,h+=Z*O,d+=Z*w,D=J;for(let gt=0;gt<z;gt++)D.r=N,D.g=T,D.b=O,D.a=w,D=D.next;for(let gt=1;gt<z;gt++)r=o+((B<gt?B:gt)<<2),l+=(D.r=N=i[r])*(x=z-gt),c+=(D.g=T=i[r+1])*x,h+=(D.b=O=i[r+2])*x,d+=(D.a=w=i[r+3])*x,b+=N,S+=T,y+=O,C+=w,D=D.next;nt=J,ct=H;for(let gt=0;gt<n;gt++)i[o+3]=w=d*A>>L,w!==0?(w=255/w,i[o]=(l*A>>L)*w,i[o+1]=(c*A>>L)*w,i[o+2]=(h*A>>L)*w):i[o]=i[o+1]=i[o+2]=0,l-=u,c-=f,h-=p,d-=_,u-=nt.r,f-=nt.g,p-=nt.b,_-=nt.a,r=a+((r=gt+t+1)<B?r:B)<<2,b+=nt.r=i[r],S+=nt.g=i[r+1],y+=nt.b=i[r+2],C+=nt.a=i[r+3],l+=b,c+=S,h+=y,d+=C,nt=nt.next,u+=N=ct.r,f+=T=ct.g,p+=O=ct.b,_+=w=ct.a,b-=N,S-=T,y-=O,C-=w,ct=ct.next,o+=4;a+=n}for(let ot=0;ot<n;ot++){S=y=C=b=c=h=d=l=0,o=ot<<2,u=z*(N=i[o]),f=z*(T=i[o+1]),p=z*(O=i[o+2]),_=z*(w=i[o+3]),l+=Z*N,c+=Z*T,h+=Z*O,d+=Z*w,D=J;for(let Ot=0;Ot<z;Ot++)D.r=N,D.g=T,D.b=O,D.a=w,D=D.next;let gt=n;for(let Ot=1;Ot<=t;Ot++)o=gt+ot<<2,l+=(D.r=N=i[o])*(x=z-Ot),c+=(D.g=T=i[o+1])*x,h+=(D.b=O=i[o+2])*x,d+=(D.a=w=i[o+3])*x,b+=N,S+=T,y+=O,C+=w,D=D.next,Ot<K&&(gt+=n);o=ot,nt=J,ct=H;for(let Ot=0;Ot<s;Ot++)r=o<<2,i[r+3]=w=d*A>>L,w>0?(w=255/w,i[r]=(l*A>>L)*w,i[r+1]=(c*A>>L)*w,i[r+2]=(h*A>>L)*w):i[r]=i[r+1]=i[r+2]=0,l-=u,c-=f,h-=p,d-=_,u-=nt.r,f-=nt.g,p-=nt.b,_-=nt.a,r=ot+((r=Ot+z)<K?r:K)*n<<2,l+=b+=nt.r=i[r],c+=S+=nt.g=i[r+1],h+=y+=nt.b=i[r+2],d+=C+=nt.a=i[r+3],nt=nt.next,u+=N=ct.r,f+=T=ct.g,p+=O=ct.b,_+=w=ct.a,b-=N,S-=T,y-=O,C-=w,ct=ct.next,o+=n}}const c1=function(t){const i=Math.round(this.blurRadius());i>0&&l1(t,i)};m.addGetterSetter(G,"blurRadius",0,$(),m.afterSetFilter);const h1=function(e){const t=this.brightness()*255,i=e.data,n=i.length;for(let s=0;s<n;s+=4)i[s]+=t,i[s+1]+=t,i[s+2]+=t};m.addGetterSetter(G,"brightness",0,$(),m.afterSetFilter);const d1=function(e){const t=this.brightness(),i=e.data,n=i.length;for(let s=0;s<n;s+=4)i[s]=Math.min(255,i[s]*t),i[s+1]=Math.min(255,i[s+1]*t),i[s+2]=Math.min(255,i[s+2]*t)},u1=function(e){const t=Math.pow((this.contrast()+100)/100,2),i=e.data,n=i.length;let s=150,r=150,o=150;for(let a=0;a<n;a+=4)s=i[a],r=i[a+1],o=i[a+2],s/=255,s-=.5,s*=t,s+=.5,s*=255,r/=255,r-=.5,r*=t,r+=.5,r*=255,o/=255,o-=.5,o*=t,o+=.5,o*=255,s=s<0?0:s>255?255:s,r=r<0?0:r>255?255:r,o=o<0?0:o>255?255:o,i[a]=s,i[a+1]=r,i[a+2]=o};m.addGetterSetter(G,"contrast",0,$(),m.afterSetFilter);const f1=function(e){var t,i,n,s,r,o,a,l,c;const h=e.data,d=e.width,u=e.height,f=Math.min(1,Math.max(0,(i=(t=this.embossStrength)===null||t===void 0?void 0:t.call(this))!==null&&i!==void 0?i:.5)),p=Math.min(1,Math.max(0,(s=(n=this.embossWhiteLevel)===null||n===void 0?void 0:n.call(this))!==null&&s!==void 0?s:.5)),b=(a={"top-left":315,top:270,"top-right":225,right:180,"bottom-right":135,bottom:90,"bottom-left":45,left:0}[(o=(r=this.embossDirection)===null||r===void 0?void 0:r.call(this))!==null&&o!==void 0?o:"top-left"])!==null&&a!==void 0?a:315,S=!!((c=(l=this.embossBlend)===null||l===void 0?void 0:l.call(this))!==null&&c!==void 0&&c),y=f*10,C=p*255,N=b*Math.PI/180,T=Math.cos(N),O=Math.sin(N),w=128/1020*y,x=new Uint8ClampedArray(h),P=new Float32Array(d*u);for(let J=0,A=0;A<h.length;A+=4,J++)P[J]=.2126*x[A]+.7152*x[A+1]+.0722*x[A+2];const B=[-1,0,1,-2,0,2,-1,0,1],K=[-1,-2,-1,0,0,0,1,2,1],z=[-d-1,-d,-d+1,-1,0,1,d-1,d,d+1],Z=J=>J<0?0:J>255?255:J;for(let J=1;J<u-1;J++)for(let A=1;A<d-1;A++){const L=J*d+A;let H=0,D=0;H+=P[L+z[0]]*B[0],D+=P[L+z[0]]*K[0],H+=P[L+z[1]]*B[1],D+=P[L+z[1]]*K[1],H+=P[L+z[2]]*B[2],D+=P[L+z[2]]*K[2],H+=P[L+z[3]]*B[3],D+=P[L+z[3]]*K[3],H+=P[L+z[5]]*B[5],D+=P[L+z[5]]*K[5],H+=P[L+z[6]]*B[6],D+=P[L+z[6]]*K[6],H+=P[L+z[7]]*B[7],D+=P[L+z[7]]*K[7],H+=P[L+z[8]]*B[8],D+=P[L+z[8]]*K[8];const nt=T*H+O*D,ct=Z(C+nt*w),ot=L*4;if(S){const gt=ct-C;h[ot]=Z(x[ot]+gt),h[ot+1]=Z(x[ot+1]+gt),h[ot+2]=Z(x[ot+2]+gt),h[ot+3]=x[ot+3]}else h[ot]=h[ot+1]=h[ot+2]=ct,h[ot+3]=x[ot+3]}for(let J=0;J<d;J++){let A=J*4,L=((u-1)*d+J)*4;h[A]=x[A],h[A+1]=x[A+1],h[A+2]=x[A+2],h[A+3]=x[A+3],h[L]=x[L],h[L+1]=x[L+1],h[L+2]=x[L+2],h[L+3]=x[L+3]}for(let J=1;J<u-1;J++){let A=J*d*4,L=(J*d+(d-1))*4;h[A]=x[A],h[A+1]=x[A+1],h[A+2]=x[A+2],h[A+3]=x[A+3],h[L]=x[L],h[L+1]=x[L+1],h[L+2]=x[L+2],h[L+3]=x[L+3]}return e};m.addGetterSetter(G,"embossStrength",.5,$(),m.afterSetFilter),m.addGetterSetter(G,"embossWhiteLevel",.5,$(),m.afterSetFilter),m.addGetterSetter(G,"embossDirection","top-left",void 0,m.afterSetFilter),m.addGetterSetter(G,"embossBlend",!1,void 0,m.afterSetFilter);function Oo(e,t,i,n,s){const r=i-t,o=s-n;if(r===0)return n+o/2;if(o===0)return n;let a=(e-t)/r;return a=o*a+n,a}const p1=function(e){const t=e.data,i=t.length;let n=t[0],s=n,r,o=t[1],a=o,l,c=t[2],h=c,d;const u=this.enhance();if(u===0)return;for(let C=0;C<i;C+=4)r=t[C+0],r<n?n=r:r>s&&(s=r),l=t[C+1],l<o?o=l:l>a&&(a=l),d=t[C+2],d<c?c=d:d>h&&(h=d);s===n&&(s=255,n=0),a===o&&(a=255,o=0),h===c&&(h=255,c=0);let f,p,_,b,S,y;if(u>0)f=s+u*(255-s),p=n-u*(n-0),_=a+u*(255-a),b=o-u*(o-0),S=h+u*(255-h),y=c-u*(c-0);else{const C=(s+n)*.5;f=s+u*(s-C),p=n+u*(n-C);const N=(a+o)*.5;_=a+u*(a-N),b=o+u*(o-N);const T=(h+c)*.5;S=h+u*(h-T),y=c+u*(c-T)}for(let C=0;C<i;C+=4)t[C+0]=Oo(t[C+0],n,s,p,f),t[C+1]=Oo(t[C+1],o,a,b,_),t[C+2]=Oo(t[C+2],c,h,y,S)};m.addGetterSetter(G,"enhance",0,$(),m.afterSetFilter);const g1=function(e){const t=e.data,i=t.length;for(let n=0;n<i;n+=4){const s=.34*t[n]+.5*t[n+1]+.16*t[n+2];t[n]=s,t[n+1]=s,t[n+2]=s}};m.addGetterSetter(G,"hue",0,$(),m.afterSetFilter),m.addGetterSetter(G,"saturation",0,$(),m.afterSetFilter),m.addGetterSetter(G,"luminance",0,$(),m.afterSetFilter);const m1=function(e){const t=e.data,i=t.length,n=1,s=Math.pow(2,this.saturation()),r=Math.abs(this.hue()+360)%360,o=this.luminance()*127,a=n*s*Math.cos(r*Math.PI/180),l=n*s*Math.sin(r*Math.PI/180),c=.299*n+.701*a+.167*l,h=.587*n-.587*a+.33*l,d=.114*n-.114*a-.497*l,u=.299*n-.299*a-.328*l,f=.587*n+.413*a+.035*l,p=.114*n-.114*a+.293*l,_=.299*n-.3*a+1.25*l,b=.587*n-.586*a-1.05*l,S=.114*n+.886*a-.2*l;let y,C,N,T;for(let O=0;O<i;O+=4)y=t[O+0],C=t[O+1],N=t[O+2],T=t[O+3],t[O+0]=c*y+h*C+d*N+o,t[O+1]=u*y+f*C+p*N+o,t[O+2]=_*y+b*C+S*N+o,t[O+3]=T},_1=function(e){const t=e.data,i=t.length,n=Math.pow(2,this.value()),s=Math.pow(2,this.saturation()),r=Math.abs(this.hue()+360)%360,o=n*s*Math.cos(r*Math.PI/180),a=n*s*Math.sin(r*Math.PI/180),l=.299*n+.701*o+.167*a,c=.587*n-.587*o+.33*a,h=.114*n-.114*o-.497*a,d=.299*n-.299*o-.328*a,u=.587*n+.413*o+.035*a,f=.114*n-.114*o+.293*a,p=.299*n-.3*o+1.25*a,_=.587*n-.586*o-1.05*a,b=.114*n+.886*o-.2*a;for(let S=0;S<i;S+=4){const y=t[S+0],C=t[S+1],N=t[S+2],T=t[S+3];t[S+0]=l*y+c*C+h*N,t[S+1]=d*y+u*C+f*N,t[S+2]=p*y+_*C+b*N,t[S+3]=T}};m.addGetterSetter(G,"hue",0,$(),m.afterSetFilter),m.addGetterSetter(G,"saturation",0,$(),m.afterSetFilter),m.addGetterSetter(G,"value",0,$(),m.afterSetFilter);const v1=function(e){const t=e.data,i=t.length;for(let n=0;n<i;n+=4)t[n]=255-t[n],t[n+1]=255-t[n+1],t[n+2]=255-t[n+2]},b1=function(e,t,i){const n=e.data,s=t.data,r=e.width,o=e.height,a=i.polarCenterX||r/2,l=i.polarCenterY||o/2;let c=Math.sqrt(a*a+l*l),h=r-a,d=o-l;const u=Math.sqrt(h*h+d*d);c=u>c?u:c;const f=o,p=r,_=360/p*Math.PI/180;for(let b=0;b<p;b+=1){const S=Math.sin(b*_),y=Math.cos(b*_);for(let C=0;C<f;C+=1){h=Math.floor(a+c*C/f*y),d=Math.floor(l+c*C/f*S);let N=(d*r+h)*4;const T=n[N+0],O=n[N+1],w=n[N+2],x=n[N+3];N=(b+C*r)*4,s[N+0]=T,s[N+1]=O,s[N+2]=w,s[N+3]=x}}},y1=function(e,t,i){const n=e.data,s=t.data,r=e.width,o=e.height,a=i.polarCenterX||r/2,l=i.polarCenterY||o/2;let c=Math.sqrt(a*a+l*l),h=r-a,d=o-l;const u=Math.sqrt(h*h+d*d);c=u>c?u:c;const f=o,p=r,_=0;let b,S;for(h=0;h<r;h+=1)for(d=0;d<o;d+=1){const y=h-a,C=d-l,N=Math.sqrt(y*y+C*C)*f/c;let T=(Math.atan2(C,y)*180/Math.PI+360+_)%360;T=T*p/360,b=Math.floor(T),S=Math.floor(N);let O=(S*r+b)*4;const w=n[O+0],x=n[O+1],P=n[O+2],B=n[O+3];O=(d*r+h)*4,s[O+0]=w,s[O+1]=x,s[O+2]=P,s[O+3]=B}},E1=function(e){const t=e.width,i=e.height;let n,s,r,o,a,l,c,h,d,u,f=Math.round(this.kaleidoscopePower());const p=Math.round(this.kaleidoscopeAngle()),_=Math.floor(t*(p%360)/360);if(f<1)return;const b=E.createCanvasElement();b.width=t,b.height=i;const S=b.getContext("2d").getImageData(0,0,t,i);E.releaseCanvas(b),b1(e,S,{polarCenterX:t/2,polarCenterY:i/2});let y=t/Math.pow(2,f);for(;y<=8;)y=y*2,f-=1;y=Math.ceil(y);let C=y,N=0,T=C,O=1;for(_+y>t&&(N=C,T=0,O=-1),s=0;s<i;s+=1)for(n=N;n!==T;n+=O)r=Math.round(n+_)%t,d=(t*s+r)*4,a=S.data[d+0],l=S.data[d+1],c=S.data[d+2],h=S.data[d+3],u=(t*s+n)*4,S.data[u+0]=a,S.data[u+1]=l,S.data[u+2]=c,S.data[u+3]=h;for(s=0;s<i;s+=1)for(C=Math.floor(y),o=0;o<f;o+=1){for(n=0;n<C+1;n+=1)d=(t*s+n)*4,a=S.data[d+0],l=S.data[d+1],c=S.data[d+2],h=S.data[d+3],u=(t*s+C*2-n-1)*4,S.data[u+0]=a,S.data[u+1]=l,S.data[u+2]=c,S.data[u+3]=h;C*=2}y1(S,e,{})};m.addGetterSetter(G,"kaleidoscopePower",2,$(),m.afterSetFilter),m.addGetterSetter(G,"kaleidoscopeAngle",0,$(),m.afterSetFilter);function er(e,t,i){let n=(i*e.width+t)*4;const s=[];return s.push(e.data[n++],e.data[n++],e.data[n++],e.data[n++]),s}function Xn(e,t){return Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)+Math.pow(e[2]-t[2],2))}function S1(e){const t=[0,0,0];for(let i=0;i<e.length;i++)t[0]+=e[i][0],t[1]+=e[i][1],t[2]+=e[i][2];return t[0]/=e.length,t[1]/=e.length,t[2]/=e.length,t}function w1(e,t){const i=er(e,0,0),n=er(e,e.width-1,0),s=er(e,0,e.height-1),r=er(e,e.width-1,e.height-1),o=t||10;if(Xn(i,n)<o&&Xn(n,r)<o&&Xn(r,s)<o&&Xn(s,i)<o){const a=S1([n,i,r,s]),l=[];for(let c=0;c<e.width*e.height;c++){const h=Xn(a,[e.data[c*4],e.data[c*4+1],e.data[c*4+2]]);l[c]=h<o?0:255}return l}}function x1(e,t){for(let i=0;i<e.width*e.height;i++)e.data[4*i+3]=t[i]}function C1(e,t,i){const n=[1,1,1,1,0,1,1,1,1],s=Math.round(Math.sqrt(n.length)),r=Math.floor(s/2),o=[];for(let a=0;a<i;a++)for(let l=0;l<t;l++){const c=a*t+l;let h=0;for(let d=0;d<s;d++)for(let u=0;u<s;u++){const f=a+d-r,p=l+u-r;if(f>=0&&f<i&&p>=0&&p<t){const _=f*t+p,b=n[d*s+u];h+=e[_]*b}}o[c]=h===2040?255:0}return o}function N1(e,t,i){const n=[1,1,1,1,1,1,1,1,1],s=Math.round(Math.sqrt(n.length)),r=Math.floor(s/2),o=[];for(let a=0;a<i;a++)for(let l=0;l<t;l++){const c=a*t+l;let h=0;for(let d=0;d<s;d++)for(let u=0;u<s;u++){const f=a+d-r,p=l+u-r;if(f>=0&&f<i&&p>=0&&p<t){const _=f*t+p,b=n[d*s+u];h+=e[_]*b}}o[c]=h>=1020?255:0}return o}function T1(e,t,i){const n=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],s=Math.round(Math.sqrt(n.length)),r=Math.floor(s/2),o=[];for(let a=0;a<i;a++)for(let l=0;l<t;l++){const c=a*t+l;let h=0;for(let d=0;d<s;d++)for(let u=0;u<s;u++){const f=a+d-r,p=l+u-r;if(f>=0&&f<i&&p>=0&&p<t){const _=f*t+p,b=n[d*s+u];h+=e[_]*b}}o[c]=h}return o}const k1=function(e){const t=this.threshold();let i=w1(e,t);return i&&(i=C1(i,e.width,e.height),i=N1(i,e.width,e.height),i=T1(i,e.width,e.height),x1(e,i)),e};m.addGetterSetter(G,"threshold",0,$(),m.afterSetFilter);const O1=function(e){const t=this.noise()*255,i=e.data,n=i.length,s=t/2;for(let r=0;r<n;r+=4)i[r+0]+=s-2*s*Math.random(),i[r+1]+=s-2*s*Math.random(),i[r+2]+=s-2*s*Math.random()};m.addGetterSetter(G,"noise",.2,$(),m.afterSetFilter);const P1=function(e){let t=Math.ceil(this.pixelSize()),i=e.width,n=e.height,s=Math.ceil(i/t),r=Math.ceil(n/t),o=e.data;if(t<=0){E.error("pixelSize value can not be <= 0");return}for(let a=0;a<s;a+=1)for(let l=0;l<r;l+=1){let c=0,h=0,d=0,u=0;const f=a*t,p=f+t,_=l*t,b=_+t;let S=0;for(let y=f;y<p;y+=1)if(!(y>=i))for(let C=_;C<b;C+=1){if(C>=n)continue;const N=(i*C+y)*4;c+=o[N+0],h+=o[N+1],d+=o[N+2],u+=o[N+3],S+=1}c=c/S,h=h/S,d=d/S,u=u/S;for(let y=f;y<p;y+=1)if(!(y>=i))for(let C=_;C<b;C+=1){if(C>=n)continue;const N=(i*C+y)*4;o[N+0]=c,o[N+1]=h,o[N+2]=d,o[N+3]=u}}};m.addGetterSetter(G,"pixelSize",8,$(),m.afterSetFilter);const A1=function(e){const t=Math.round(this.levels()*254)+1,i=e.data,n=i.length,s=255/t;for(let r=0;r<n;r+=1)i[r]=Math.floor(i[r]/s)*s};m.addGetterSetter(G,"levels",.5,$(),m.afterSetFilter);const R1=function(e){const t=e.data,i=t.length,n=this.red(),s=this.green(),r=this.blue();for(let o=0;o<i;o+=4){const a=(.34*t[o]+.5*t[o+1]+.16*t[o+2])/255;t[o]=a*n,t[o+1]=a*s,t[o+2]=a*r,t[o+3]=t[o+3]}};m.addGetterSetter(G,"red",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)}),m.addGetterSetter(G,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)}),m.addGetterSetter(G,"blue",0,cc,m.afterSetFilter);const M1=function(e){const t=e.data,i=t.length,n=this.red(),s=this.green(),r=this.blue(),o=this.alpha();for(let a=0;a<i;a+=4){const l=1-o;t[a]=n*o+t[a]*l,t[a+1]=s*o+t[a+1]*l,t[a+2]=r*o+t[a+2]*l}};m.addGetterSetter(G,"red",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)}),m.addGetterSetter(G,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)}),m.addGetterSetter(G,"blue",0,cc,m.afterSetFilter),m.addGetterSetter(G,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});const L1=function(e){const t=e.data,i=t.length;for(let n=0;n<i;n+=4){const s=t[n+0],r=t[n+1],o=t[n+2];t[n+0]=Math.min(255,s*.393+r*.769+o*.189),t[n+1]=Math.min(255,s*.349+r*.686+o*.168),t[n+2]=Math.min(255,s*.272+r*.534+o*.131)}},I1=function(e){const i=e.data;for(let n=0;n<i.length;n+=4){const s=i[n],r=i[n+1],o=i[n+2];.2126*s+.7152*r+.0722*o>=128&&(i[n]=255-s,i[n+1]=255-r,i[n+2]=255-o)}return e},D1=function(e){const t=this.threshold()*255,i=e.data,n=i.length;for(let s=0;s<n;s+=1)i[s]=i[s]<t?0:255};m.addGetterSetter(G,"threshold",.5,$(),m.afterSetFilter);const zn=Gc.Util._assign(Gc,{Arc:$e,Arrow:ki,Circle:qi,Ellipse:si,Image:re,Label:Co,Tag:Oi,Line:We,Path:St,Rect:Un,RegularPolygon:ri,Ring:Pi,Sprite:ke,Star:oi,Text:wt,TextPath:Dt,Transformer:lt,Wedge:Ue,Filters:{Blur:c1,Brightness:d1,Brighten:h1,Contrast:u1,Emboss:f1,Enhance:p1,Grayscale:g1,HSL:m1,HSV:_1,Invert:v1,Kaleidoscope:E1,Mask:k1,Noise:O1,Pixelate:P1,Posterize:A1,RGB:R1,RGBA:M1,Sepia:L1,Solarize:I1,Threshold:D1}});function ir(e){if(!zn.autoDrawEnabled){const t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const ah={key:!0,style:!0,elm:!0,isRootInsert:!0},Po=".vue-konva-event";function lh(e,t,i,n){const s=e.__konvaNode,r={};let o=!1;for(let a in i){if(ah.hasOwnProperty(a))continue;const l=a.slice(0,2)==="on",c=i[a]!==t[a];if(l&&c){let h=a.slice(2).toLowerCase();h.slice(0,7)==="content"&&(h="content"+h.slice(7,1).toUpperCase()+h.slice(8)),s?.off(h+Po,i[a])}!t.hasOwnProperty(a)&&s?.setAttr(a,void 0)}for(let a in t){if(ah.hasOwnProperty(a))continue;let l=a.slice(0,2)==="on";const c=i[a]!==t[a];if(l&&c){let h=a.slice(2).toLowerCase();h.slice(0,7)==="content"&&(h="content"+h.slice(7,1).toUpperCase()+h.slice(8)),t[a]&&(s?.off(h+Po),s?.on(h+Po,t[a]))}!l&&(t[a]!==i[a]||n&&t[a]!==s?.getAttr(a))&&(o=!0,r[a]=t[a])}o&&s&&(s.setAttrs(r),ir(s))}const V1="v";function F1(e){function t(i){return i?.__konvaNode?i:i?.parent?t(i.parent):(console.error("vue-konva error: Can not find parent node"),null)}return t(e.parent)}function ch(e){return e.component?e.component.__konvaNode||ch(e.component.subTree):null}function G1(e){const{el:t,component:i}=e,n=ch(e);if(t?.tagName&&i&&!n){const s=t.tagName.toLowerCase();return console.error(`vue-konva error: You are trying to render "${s}" inside your component tree. Looks like it is not a Konva node. You can render only Konva components inside the Stage.`),null}return n}function B1(e){const t=s=>!!s&&typeof s=="object"&&"component"in s,i=s=>Array.isArray(s),n=s=>t(s)?[s,...n(s.children)]:i(s)?s.flatMap(n):[];return n(e.children)}function hh(e,t){const i=B1(e),n=[];i.forEach(r=>{const o=G1(r);o&&n.push(o)});let s=!1;n.forEach((r,o)=>{r.getZIndex()!==o&&(r.setZIndex(o),s=!0)}),s&&ir(t)}const H1=zn.default?.Stage||zn.Stage,$1=Le({name:"Stage",props:{config:{type:Object,default:function(){return{}}},__useStrictMode:{type:Boolean}},inheritAttrs:!1,setup(e,{attrs:t,slots:i,expose:n}){const s=Ps();if(!s)return;const r=cn({}),o=Xt(null),a=new H1({width:e.config.width,height:e.config.height,container:document.createElement("div")});s.__konvaNode=a,h();function l(){return s?.__konvaNode}function c(){return s?.__konvaNode}function h(){if(!s)return;const d=r||{},u={...t,...e.config};lh(s,u,d,e.__useStrictMode),Object.assign(r,u)}return Rr(()=>{o.value&&(o.value.innerHTML="",a.container(o.value)),h()}),Mr(()=>{h(),hh(s.subTree,a)}),xa(()=>{a.destroy()}),bi(()=>e.config,h,{deep:!0}),n({getStage:c,getNode:l}),()=>dl("div",{ref:o,style:t?.style},i.default?.())}}),W1=".vue-konva-event",U1={Group:!0,Layer:!0,FastLayer:!0,Label:!0};function j1(e,t){return Le({name:e,props:{config:{type:Object,default:function(){return{}}},__useStrictMode:{type:Boolean}},setup(i,{attrs:n,slots:s,expose:r}){const o=Ps();if(!o)return;const a=cn({}),l=new t;o.__konvaNode=l,o.vnode.__konvaNode=l,d();function c(){return o?.__konvaNode}function h(){return o?.__konvaNode}function d(){if(!o)return;const f={};for(const b in o?.vnode.props)b.slice(0,2)==="on"&&(f[b]=o.vnode.props[b]);const p=a||{},_={...n,...i.config,...f};lh(o,_,p,i.__useStrictMode),Object.assign(a,_)}Rr(()=>{const f=F1(o)?.__konvaNode;f&&"add"in f&&f.add(l),ir(l)}),Lr(()=>{ir(l),l.destroy(),l.off(W1)}),Mr(()=>{d(),hh(o.subTree,l)}),bi(()=>i.config,d,{deep:!0}),r({getStage:h,getNode:c});const u=U1.hasOwnProperty(e);return()=>u?dl("template",{},s.default?.()):null}})}const dh={install:(e,t)=>{const i=t?.prefix||V1,n=zn.default||zn,s={Arc:n.Arc,Arrow:n.Arrow,Circle:n.Circle,Ellipse:n.Ellipse,FastLayer:n.FastLayer,Group:n.Group,Image:n.Image,Label:n.Label,Layer:n.Layer,Line:n.Line,Path:n.Path,Rect:n.Rect,RegularPolygon:n.RegularPolygon,Ring:n.Ring,Shape:n.Shape,Sprite:n.Sprite,Star:n.Star,Tag:n.Tag,Text:n.Text,TextPath:n.TextPath,Transformer:n.Transformer,Wedge:n.Wedge,...t?.customNodes};[$1,...Object.entries(s).map(([r,o])=>j1(r,o))].forEach(r=>{e.component(`${i}${r.name}`,r)})}},uh='@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-font-weight:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-yellow-200:oklch(94.5% .129 101.54);--color-gray-100:oklch(96.7% .003 264.542);--color-white:#fff;--spacing:.25rem;--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--font-weight-medium:500;--font-weight-bold:700;--radius-lg:.5rem;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-ott-accent:#68a691;--color-ott-text-primary:#2f2f2f;--color-ott-text-secondary:#a1a1a1;--color-ott-text-white:#fff;--color-ott-bg-primary:#fff;--color-ott-bg-secondary:#f3f3f3;--color-ott-bg-dark:#d3d3d3;--color-ott-error:#cd3c3c}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.visible{visibility:visible}.static{position:static}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-10{margin-bottom:calc(var(--spacing)*10)}.block{display:block}.flex{display:flex}.h-75{height:calc(var(--spacing)*75)}.h-full{height:100%}.w-1\\/3{width:33.3333%}.w-50{width:calc(var(--spacing)*50)}.w-fit{width:fit-content}.w-full{width:100%}.min-w-\\[150px\\]{min-width:150px}.flex-1{flex:1}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-2{gap:calc(var(--spacing)*2)}.gap-10{gap:calc(var(--spacing)*10)}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-ott-bg-dark{border-color:var(--color-ott-bg-dark)}.border-ott-error\\!{border-color:var(--color-ott-error)!important}.border-b-ott-bg-dark{border-bottom-color:var(--color-ott-bg-dark)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-ott-accent{background-color:var(--color-ott-accent)}.bg-ott-bg-primary{background-color:var(--color-ott-bg-primary)}.bg-white{background-color:var(--color-white)}.bg-yellow-200{background-color:var(--color-yellow-200)}.p-4{padding:calc(var(--spacing)*4)}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.text-ott-accent{color:var(--color-ott-accent)}.text-ott-error\\!{color:var(--color-ott-error)!important}.text-white{color:var(--color-white)}}html,body,#app,#__nuxt,:host{background-color:var(--color-ott-bg-secondary);width:100%;height:100%;color:var(--color-ott-text-primary);font-family:Poppins,sans-serif;font-style:normal;font-weight:400}button{cursor:pointer}h2{margin-block:calc(var(--spacing)*4);font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height));--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}main{width:100%;height:100%;max-height:100vh;display:block;overflow:auto}.ott-button{cursor:pointer;justify-content:center;align-items:center;gap:calc(var(--spacing)*5);border-radius:var(--radius-lg);border-style:var(--tw-border-style);border-width:2px;border-color:var(--color-ott-text-primary);height:fit-content;padding-inline:calc(var(--spacing)*4);padding-block:calc(var(--spacing)*1);--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium);color:var(--color-ott-text-primary);display:flex}.ott-button:disabled{cursor:default;border-color:var(--color-ott-bg-dark);color:var(--color-ott-bg-dark)}.ott-button-action{cursor:pointer;align-items:center;gap:calc(var(--spacing)*5);border-radius:var(--radius-lg);border-color:var(--color-ott-accent);background-color:var(--color-ott-accent);width:100%;height:fit-content;padding-inline:calc(var(--spacing)*4);padding-block:calc(var(--spacing)*1);--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium);color:var(--color-ott-text-white);display:flex}.ott-button-action:disabled{cursor:default;background-color:var(--color-ott-text-secondary)}input{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-ott-bg-dark);padding-inline:calc(var(--spacing)*3);padding-block:calc(var(--spacing)*1);border-radius:.25rem}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}',fh=Tl(pp,{shadowRoot:!0,styles:[uh],configureApp(e){e.use(dh)}}),ph=Tl(ic,{shadowRoot:!0,styles:[uh],configureApp(e){e.use(dh)}});return typeof customElements<"u"&&(customElements.get("deckplan-editor")||customElements.define("deckplan-editor",fh),customElements.get("deck-visualization")||customElements.define("deck-visualization",ph)),{DeckplanEditorElement:fh,DeckVisualizationElement:ph,parseNeTEx:nc}}));
|