@zyzgroup/core-vue 0.0.7 → 0.0.9

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.
@@ -1,4 +1,4 @@
1
- (function(kn,De){typeof exports=="object"&&typeof module<"u"?De(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],De):(kn=typeof globalThis<"u"?globalThis:kn||self,De(kn.ZYZGroupCoreVue={},kn.Vue))})(this,function(kn,De){"use strict";var FO=Object.defineProperty;var NO=(kn,De,Vn)=>De in kn?FO(kn,De,{enumerable:!0,configurable:!0,writable:!0,value:Vn}):kn[De]=Vn;var Tt=(kn,De,Vn)=>(NO(kn,typeof De!="symbol"?De+"":De,Vn),Vn);const Vn=/^[a-z0-9]+(-[a-z0-9]+)*$/,fo=(n,t,e,r="")=>{const i=n.split(":");if(n.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const o=i.pop(),h=i.pop(),l={provider:i.length>0?i[0]:r,prefix:h,name:o};return t&&!po(l)?null:l}const s=i[0],a=s.split("-");if(a.length>1){const o={provider:r,prefix:a.shift(),name:a.join("-")};return t&&!po(o)?null:o}if(e&&r===""){const o={provider:r,prefix:"",name:s};return t&&!po(o,e)?null:o}return null},po=(n,t)=>n?!!((n.provider===""||n.provider.match(Vn))&&(t&&n.prefix===""||n.prefix.match(Vn))&&n.name.match(Vn)):!1,Ad=Object.freeze({left:0,top:0,width:16,height:16}),go=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),mo=Object.freeze({...Ad,...go}),Hl=Object.freeze({...mo,body:"",hidden:!1});function Yv(n,t){const e={};!n.hFlip!=!t.hFlip&&(e.hFlip=!0),!n.vFlip!=!t.vFlip&&(e.vFlip=!0);const r=((n.rotate||0)+(t.rotate||0))%4;return r&&(e.rotate=r),e}function Od(n,t){const e=Yv(n,t);for(const r in Hl)r in go?r in n&&!(r in e)&&(e[r]=go[r]):r in t?e[r]=t[r]:r in n&&(e[r]=n[r]);return e}function Xv(n,t){const e=n.icons,r=n.aliases||Object.create(null),i=Object.create(null);function s(a){if(e[a])return i[a]=[];if(!(a in i)){i[a]=null;const o=r[a]&&r[a].parent,h=o&&s(o);h&&(i[a]=[o].concat(h))}return i[a]}return Object.keys(e).concat(Object.keys(r)).forEach(s),i}function Jv(n,t,e){const r=n.icons,i=n.aliases||Object.create(null);let s={};function a(o){s=Od(r[o]||i[o],s)}return a(t),e.forEach(a),Od(n,s)}function $d(n,t){const e=[];if(typeof n!="object"||typeof n.icons!="object")return e;n.not_found instanceof Array&&n.not_found.forEach(i=>{t(i,null),e.push(i)});const r=Xv(n);for(const i in r){const s=r[i];s&&(t(i,Jv(n,i,s)),e.push(i))}return e}const Qv={provider:"",aliases:{},not_found:{},...Ad};function ql(n,t){for(const e in t)if(e in n&&typeof n[e]!=typeof t[e])return!1;return!0}function Fd(n){if(typeof n!="object"||n===null)return null;const t=n;if(typeof t.prefix!="string"||!n.icons||typeof n.icons!="object"||!ql(n,Qv))return null;const e=t.icons;for(const i in e){const s=e[i];if(!i.match(Vn)||typeof s.body!="string"||!ql(s,Hl))return null}const r=t.aliases||Object.create(null);for(const i in r){const s=r[i],a=s.parent;if(!i.match(Vn)||typeof a!="string"||!e[a]&&!r[a]||!ql(s,Hl))return null}return t}const Nd=Object.create(null);function Zv(n,t){return{provider:n,prefix:t,icons:Object.create(null),missing:new Set}}function fi(n,t){const e=Nd[n]||(Nd[n]=Object.create(null));return e[t]||(e[t]=Zv(n,t))}function Kl(n,t){return Fd(t)?$d(t,(e,r)=>{r?n.icons[e]=r:n.missing.add(e)}):[]}function Wv(n,t,e){try{if(typeof e.body=="string")return n.icons[t]={...e},!0}catch{}return!1}let Ss=!1;function Rd(n){return typeof n=="boolean"&&(Ss=n),Ss}function t2(n){const t=typeof n=="string"?fo(n,!0,Ss):n;if(t){const e=fi(t.provider,t.prefix),r=t.name;return e.icons[r]||(e.missing.has(r)?null:void 0)}}function e2(n,t){const e=fo(n,!0,Ss);if(!e)return!1;const r=fi(e.provider,e.prefix);return Wv(r,e.name,t)}function n2(n,t){if(typeof n!="object")return!1;if(typeof t!="string"&&(t=n.provider||""),Ss&&!t&&!n.prefix){let i=!1;return Fd(n)&&(n.prefix="",$d(n,(s,a)=>{a&&e2(s,a)&&(i=!0)})),i}const e=n.prefix;if(!po({provider:t,prefix:e,name:"a"}))return!1;const r=fi(t,e);return!!Kl(r,n)}const Dd=Object.freeze({width:null,height:null}),Md=Object.freeze({...Dd,...go}),r2=/(-?[0-9.]*[0-9]+[0-9.]*)/g,i2=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Id(n,t,e){if(t===1)return n;if(e=e||100,typeof n=="number")return Math.ceil(n*t*e)/e;if(typeof n!="string")return n;const r=n.split(r2);if(r===null||!r.length)return n;const i=[];let s=r.shift(),a=i2.test(s);for(;;){if(a){const o=parseFloat(s);isNaN(o)?i.push(s):i.push(Math.ceil(o*t*e)/e)}else i.push(s);if(s=r.shift(),s===void 0)return i.join("");a=!a}}function s2(n,t="defs"){let e="";const r=n.indexOf("<"+t);for(;r>=0;){const i=n.indexOf(">",r),s=n.indexOf("</"+t);if(i===-1||s===-1)break;const a=n.indexOf(">",s);if(a===-1)break;e+=n.slice(i+1,s).trim(),n=n.slice(0,r).trim()+n.slice(a+1)}return{defs:e,content:n}}function a2(n,t){return n?"<defs>"+n+"</defs>"+t:t}function o2(n,t,e){const r=s2(n);return a2(r.defs,t+r.content+e)}const l2=n=>n==="unset"||n==="undefined"||n==="none";function h2(n,t){const e={...mo,...n},r={...Md,...t},i={left:e.left,top:e.top,width:e.width,height:e.height};let s=e.body;[e,r].forEach(v=>{const _=[],S=v.hFlip,x=v.vFlip;let m=v.rotate;S?x?m+=2:(_.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),_.push("scale(-1 1)"),i.top=i.left=0):x&&(_.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),_.push("scale(1 -1)"),i.top=i.left=0);let k;switch(m<0&&(m-=Math.floor(m/4)*4),m=m%4,m){case 1:k=i.height/2+i.top,_.unshift("rotate(90 "+k.toString()+" "+k.toString()+")");break;case 2:_.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:k=i.width/2+i.left,_.unshift("rotate(-90 "+k.toString()+" "+k.toString()+")");break}m%2===1&&(i.left!==i.top&&(k=i.left,i.left=i.top,i.top=k),i.width!==i.height&&(k=i.width,i.width=i.height,i.height=k)),_.length&&(s=o2(s,'<g transform="'+_.join(" ")+'">',"</g>"))});const a=r.width,o=r.height,h=i.width,l=i.height;let c,f;a===null?(f=o===null?"1em":o==="auto"?l:o,c=Id(f,h/l)):(c=a==="auto"?h:a,f=o===null?Id(c,l/h):o==="auto"?l:o);const d={},u=(v,_)=>{l2(_)||(d[v]=_.toString())};u("width",c),u("height",f);const p=[i.left,i.top,h,l];return d.viewBox=p.join(" "),{attributes:d,viewBox:p,body:s}}const c2=/\sid="(\S+)"/g,u2="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let d2=0;function f2(n,t=u2){const e=[];let r;for(;r=c2.exec(n);)e.push(r[1]);if(!e.length)return n;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return e.forEach(s=>{const a=typeof t=="function"?t(s):t+(d2++).toString(),o=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");n=n.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),n=n.replace(new RegExp(i,"g"),""),n}const Yl=Object.create(null);function p2(n,t){Yl[n]=t}function Xl(n){return Yl[n]||Yl[""]}function Jl(n){let t;if(typeof n.resources=="string")t=[n.resources];else if(t=n.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:n.path||"/",maxURL:n.maxURL||500,rotate:n.rotate||750,timeout:n.timeout||5e3,random:n.random===!0,index:n.index||0,dataAfterTimeout:n.dataAfterTimeout!==!1}}const Ql=Object.create(null),ks=["https://api.simplesvg.com","https://api.unisvg.com"],yo=[];for(;ks.length>0;)ks.length===1||Math.random()>.5?yo.push(ks.shift()):yo.push(ks.pop());Ql[""]=Jl({resources:["https://api.iconify.design"].concat(yo)});function g2(n,t){const e=Jl(t);return e===null?!1:(Ql[n]=e,!0)}function Zl(n){return Ql[n]}let jd=(()=>{let n;try{if(n=fetch,typeof n=="function")return n}catch{}})();function m2(n,t){const e=Zl(n);if(!e)return 0;let r;if(!e.maxURL)r=0;else{let i=0;e.resources.forEach(a=>{i=Math.max(i,a.length)});const s=t+".json?icons=";r=e.maxURL-i-e.path.length-s.length}return r}function y2(n){return n===404}const v2=(n,t,e)=>{const r=[],i=m2(n,t),s="icons";let a={type:s,provider:n,prefix:t,icons:[]},o=0;return e.forEach((h,l)=>{o+=h.length+1,o>=i&&l>0&&(r.push(a),a={type:s,provider:n,prefix:t,icons:[]},o=h.length),a.icons.push(h)}),r.push(a),r};function _2(n){if(typeof n=="string"){const t=Zl(n);if(t)return t.path}return"/"}const w2={prepare:v2,send:(n,t,e)=>{if(!jd){e("abort",424);return}let r=_2(t.provider);switch(t.type){case"icons":{const s=t.prefix,o=t.icons.join(","),h=new URLSearchParams({icons:o});r+=s+".json?"+h.toString();break}case"custom":{const s=t.uri;r+=s.slice(0,1)==="/"?s.slice(1):s;break}default:e("abort",400);return}let i=503;jd(n+r).then(s=>{const a=s.status;if(a!==200){setTimeout(()=>{e(y2(a)?"abort":"next",a)});return}return i=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?e("abort",s):e("next",i)});return}setTimeout(()=>{e("success",s)})}).catch(()=>{e("next",i)})}};function x2(n){const t={loaded:[],missing:[],pending:[]},e=Object.create(null);n.sort((i,s)=>i.provider!==s.provider?i.provider.localeCompare(s.provider):i.prefix!==s.prefix?i.prefix.localeCompare(s.prefix):i.name.localeCompare(s.name));let r={provider:"",prefix:"",name:""};return n.forEach(i=>{if(r.name===i.name&&r.prefix===i.prefix&&r.provider===i.provider)return;r=i;const s=i.provider,a=i.prefix,o=i.name,h=e[s]||(e[s]=Object.create(null)),l=h[a]||(h[a]=fi(s,a));let c;o in l.icons?c=t.loaded:a===""||l.missing.has(o)?c=t.missing:c=t.pending;const f={provider:s,prefix:a,name:o};c.push(f)}),t}function Ld(n,t){n.forEach(e=>{const r=e.loaderCallbacks;r&&(e.loaderCallbacks=r.filter(i=>i.id!==t))})}function b2(n){n.pendingCallbacksFlag||(n.pendingCallbacksFlag=!0,setTimeout(()=>{n.pendingCallbacksFlag=!1;const t=n.loaderCallbacks?n.loaderCallbacks.slice(0):[];if(!t.length)return;let e=!1;const r=n.provider,i=n.prefix;t.forEach(s=>{const a=s.icons,o=a.pending.length;a.pending=a.pending.filter(h=>{if(h.prefix!==i)return!0;const l=h.name;if(n.icons[l])a.loaded.push({provider:r,prefix:i,name:l});else if(n.missing.has(l))a.missing.push({provider:r,prefix:i,name:l});else return e=!0,!0;return!1}),a.pending.length!==o&&(e||Ld([n],s.id),s.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),s.abort))})}))}let S2=0;function k2(n,t,e){const r=S2++,i=Ld.bind(null,e,r);if(!t.pending.length)return i;const s={id:r,icons:t,callback:n,abort:i};return e.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(s)}),i}function C2(n,t=!0,e=!1){const r=[];return n.forEach(i=>{const s=typeof i=="string"?fo(i,t,e):i;s&&r.push(s)}),r}var T2={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function P2(n,t,e,r){const i=n.resources.length,s=n.random?Math.floor(Math.random()*i):n.index;let a;if(n.random){let P=n.resources.slice(0);for(a=[];P.length>1;){const N=Math.floor(Math.random()*P.length);a.push(P[N]),P=P.slice(0,N).concat(P.slice(N+1))}a=a.concat(P)}else a=n.resources.slice(s).concat(n.resources.slice(0,s));const o=Date.now();let h="pending",l=0,c,f=null,d=[],u=[];typeof r=="function"&&u.push(r);function p(){f&&(clearTimeout(f),f=null)}function v(){h==="pending"&&(h="aborted"),p(),d.forEach(P=>{P.status==="pending"&&(P.status="aborted")}),d=[]}function _(P,N){N&&(u=[]),typeof P=="function"&&u.push(P)}function S(){return{startTime:o,payload:t,status:h,queriesSent:l,queriesPending:d.length,subscribe:_,abort:v}}function x(){h="failed",u.forEach(P=>{P(void 0,c)})}function m(){d.forEach(P=>{P.status==="pending"&&(P.status="aborted")}),d=[]}function k(P,N,R){const L=N!=="success";switch(d=d.filter(U=>U!==P),h){case"pending":break;case"failed":if(L||!n.dataAfterTimeout)return;break;default:return}if(N==="abort"){c=R,x();return}if(L){c=R,d.length||(a.length?F():x());return}if(p(),m(),!n.random){const U=n.resources.indexOf(P.resource);U!==-1&&U!==n.index&&(n.index=U)}h="completed",u.forEach(U=>{U(R)})}function F(){if(h!=="pending")return;p();const P=a.shift();if(P===void 0){if(d.length){f=setTimeout(()=>{p(),h==="pending"&&(m(),x())},n.timeout);return}x();return}const N={status:"pending",resource:P,callback:(R,L)=>{k(N,R,L)}};d.push(N),l++,f=setTimeout(F,n.rotate),e(P,t,N.callback)}return setTimeout(F),S}function Ud(n){const t={...T2,...n};let e=[];function r(){e=e.filter(o=>o().status==="pending")}function i(o,h,l){const c=P2(t,o,h,(f,d)=>{r(),l&&l(f,d)});return e.push(c),c}function s(o){return e.find(h=>o(h))||null}return{query:i,find:s,setIndex:o=>{t.index=o},getIndex:()=>t.index,cleanup:r}}function Gd(){}const Wl=Object.create(null);function E2(n){if(!Wl[n]){const t=Zl(n);if(!t)return;const e=Ud(t),r={config:t,redundancy:e};Wl[n]=r}return Wl[n]}function A2(n,t,e){let r,i;if(typeof n=="string"){const s=Xl(n);if(!s)return e(void 0,424),Gd;i=s.send;const a=E2(n);a&&(r=a.redundancy)}else{const s=Jl(n);if(s){r=Ud(s);const a=n.resources?n.resources[0]:"",o=Xl(a);o&&(i=o.send)}}return!r||!i?(e(void 0,424),Gd):r.query(t,i,e)().abort}const zd="iconify2",Cs="iconify",Vd=Cs+"-count",Bd=Cs+"-version",Hd=36e5,O2=168,$2=50;function th(n,t){try{return n.getItem(t)}catch{}}function eh(n,t,e){try{return n.setItem(t,e),!0}catch{}}function qd(n,t){try{n.removeItem(t)}catch{}}function nh(n,t){return eh(n,Vd,t.toString())}function rh(n){return parseInt(th(n,Vd))||0}const vo={local:!0,session:!0},Kd={local:new Set,session:new Set};let ih=!1;function F2(n){ih=n}let _o=typeof window>"u"?{}:window;function Yd(n){const t=n+"Storage";try{if(_o&&_o[t]&&typeof _o[t].length=="number")return _o[t]}catch{}vo[n]=!1}function Xd(n,t){const e=Yd(n);if(!e)return;const r=th(e,Bd);if(r!==zd){if(r){const o=rh(e);for(let h=0;h<o;h++)qd(e,Cs+h.toString())}eh(e,Bd,zd),nh(e,0);return}const i=Math.floor(Date.now()/Hd)-O2,s=o=>{const h=Cs+o.toString(),l=th(e,h);if(typeof l=="string"){try{const c=JSON.parse(l);if(typeof c=="object"&&typeof c.cached=="number"&&c.cached>i&&typeof c.provider=="string"&&typeof c.data=="object"&&typeof c.data.prefix=="string"&&t(c,o))return!0}catch{}qd(e,h)}};let a=rh(e);for(let o=a-1;o>=0;o--)s(o)||(o===a-1?(a--,nh(e,a)):Kd[n].add(o))}function Jd(){if(!ih){F2(!0);for(const n in vo)Xd(n,t=>{const e=t.data,r=t.provider,i=e.prefix,s=fi(r,i);if(!Kl(s,e).length)return!1;const a=e.lastModified||-1;return s.lastModifiedCached=s.lastModifiedCached?Math.min(s.lastModifiedCached,a):a,!0})}}function N2(n,t){const e=n.lastModifiedCached;if(e&&e>=t)return e===t;if(n.lastModifiedCached=t,e)for(const r in vo)Xd(r,i=>{const s=i.data;return i.provider!==n.provider||s.prefix!==n.prefix||s.lastModified===t});return!0}function R2(n,t){ih||Jd();function e(r){let i;if(!vo[r]||!(i=Yd(r)))return;const s=Kd[r];let a;if(s.size)s.delete(a=Array.from(s).shift());else if(a=rh(i),a>=$2||!nh(i,a+1))return;const o={cached:Math.floor(Date.now()/Hd),provider:n.provider,data:t};return eh(i,Cs+a.toString(),JSON.stringify(o))}t.lastModified&&!N2(n,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),e("local")||e("session"))}function Qd(){}function D2(n){n.iconsLoaderFlag||(n.iconsLoaderFlag=!0,setTimeout(()=>{n.iconsLoaderFlag=!1,b2(n)}))}function M2(n,t){n.iconsToLoad?n.iconsToLoad=n.iconsToLoad.concat(t).sort():n.iconsToLoad=t,n.iconsQueueFlag||(n.iconsQueueFlag=!0,setTimeout(()=>{n.iconsQueueFlag=!1;const{provider:e,prefix:r}=n,i=n.iconsToLoad;delete n.iconsToLoad;let s;if(!i||!(s=Xl(e)))return;s.prepare(e,r,i).forEach(o=>{A2(e,o,h=>{if(typeof h!="object")o.icons.forEach(l=>{n.missing.add(l)});else try{const l=Kl(n,h);if(!l.length)return;const c=n.pendingIcons;c&&l.forEach(f=>{c.delete(f)}),R2(n,h)}catch(l){console.error(l)}D2(n)})})}))}const I2=(n,t)=>{const e=C2(n,!0,Rd()),r=x2(e);if(!r.pending.length){let h=!0;return t&&setTimeout(()=>{h&&t(r.loaded,r.missing,r.pending,Qd)}),()=>{h=!1}}const i=Object.create(null),s=[];let a,o;return r.pending.forEach(h=>{const{provider:l,prefix:c}=h;if(c===o&&l===a)return;a=l,o=c,s.push(fi(l,c));const f=i[l]||(i[l]=Object.create(null));f[c]||(f[c]=[])}),r.pending.forEach(h=>{const{provider:l,prefix:c,name:f}=h,d=fi(l,c),u=d.pendingIcons||(d.pendingIcons=new Set);u.has(f)||(u.add(f),i[l][c].push(f))}),s.forEach(h=>{const{provider:l,prefix:c}=h;i[l][c].length&&M2(h,i[l][c])}),t?k2(t,r,s):Qd};function j2(n,t){const e={...n};for(const r in t){const i=t[r],s=typeof i;r in Dd?(i===null||i&&(s==="string"||s==="number"))&&(e[r]=i):s===typeof e[r]&&(e[r]=r==="rotate"?i%4:i)}return e}const L2=/[\s,]+/;function U2(n,t){t.split(L2).forEach(e=>{switch(e.trim()){case"horizontal":n.hFlip=!0;break;case"vertical":n.vFlip=!0;break}})}function G2(n,t=0){const e=n.replace(/^-?[0-9.]*/,"");function r(i){for(;i<0;)i+=4;return i%4}if(e===""){const i=parseInt(n);return isNaN(i)?0:r(i)}else if(e!==n){let i=0;switch(e){case"%":i=25;break;case"deg":i=90}if(i){let s=parseFloat(n.slice(0,n.length-e.length));return isNaN(s)?0:(s=s/i,s%1===0?r(s):0)}}return t}function z2(n,t){let e=n.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)e+=" "+r+'="'+t[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+e+">"+n+"</svg>"}function V2(n){return n.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function B2(n){return"data:image/svg+xml,"+V2(n)}function H2(n){return'url("'+B2(n)+'")'}const Zd={...Md,inline:!1},q2={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},K2={display:"inline-block"},sh={backgroundColor:"currentColor"},Wd={backgroundColor:"transparent"},tf={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},ef={webkitMask:sh,mask:sh,background:Wd};for(const n in ef){const t=ef[n];for(const e in tf)t[n+e]=tf[e]}const wo={};["horizontal","vertical"].forEach(n=>{const t=n.slice(0,1)+"Flip";wo[n+"-flip"]=t,wo[n.slice(0,1)+"-flip"]=t,wo[n+"Flip"]=t});function nf(n){return n+(n.match(/^[-0-9.]+$/)?"px":"")}const rf=(n,t)=>{const e=j2(Zd,t),r={...q2},i=t.mode||"svg",s={},a=t.style,o=typeof a=="object"&&!(a instanceof Array)?a:{};for(let v in t){const _=t[v];if(_!==void 0)switch(v){case"icon":case"style":case"onLoad":case"mode":break;case"inline":case"hFlip":case"vFlip":e[v]=_===!0||_==="true"||_===1;break;case"flip":typeof _=="string"&&U2(e,_);break;case"color":s.color=_;break;case"rotate":typeof _=="string"?e[v]=G2(_):typeof _=="number"&&(e[v]=_);break;case"ariaHidden":case"aria-hidden":_!==!0&&_!=="true"&&delete r["aria-hidden"];break;default:{const S=wo[v];S?(_===!0||_==="true"||_===1)&&(e[S]=!0):Zd[v]===void 0&&(r[v]=_)}}}const h=h2(n,e),l=h.attributes;if(e.inline&&(s.verticalAlign="-0.125em"),i==="svg"){r.style={...s,...o},Object.assign(r,l);let v=0,_=t.id;return typeof _=="string"&&(_=_.replace(/-/g,"_")),r.innerHTML=f2(h.body,_?()=>_+"ID"+v++:"iconifyVue"),De.h("svg",r)}const{body:c,width:f,height:d}=n,u=i==="mask"||(i==="bg"?!1:c.indexOf("currentColor")!==-1),p=z2(c,{...l,width:f+"",height:d+""});return r.style={...s,"--svg":H2(p),width:nf(l.width),height:nf(l.height),...K2,...u?sh:Wd,...o},De.h("span",r)};if(Rd(!0),p2("",w2),typeof document<"u"&&typeof window<"u"){Jd();const n=window;if(n.IconifyPreload!==void 0){const t=n.IconifyPreload,e="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!n2(r))&&console.error(e)}catch{console.error(e)}})}if(n.IconifyProviders!==void 0){const t=n.IconifyProviders;if(typeof t=="object"&&t!==null)for(let e in t){const r="IconifyProviders["+e+"] is invalid.";try{const i=t[e];if(typeof i!="object"||!i||i.resources===void 0)continue;g2(e,i)||console.error(r)}catch{console.error(r)}}}}const Y2={...mo,body:""},X2=De.defineComponent({inheritAttrs:!1,data(){return{_name:"",_loadingIcon:null,iconMounted:!1,counter:0}},mounted(){this.iconMounted=!0},unmounted(){this.abortLoading()},methods:{abortLoading(){this._loadingIcon&&(this._loadingIcon.abort(),this._loadingIcon=null)},getIcon(n,t){if(typeof n=="object"&&n!==null&&typeof n.body=="string")return this._name="",this.abortLoading(),{data:n};let e;if(typeof n!="string"||(e=fo(n,!1,!0))===null)return this.abortLoading(),null;const r=t2(e);if(!r)return(!this._loadingIcon||this._loadingIcon.name!==n)&&(this.abortLoading(),this._name="",r!==null&&(this._loadingIcon={name:n,abort:I2([e],()=>{this.counter++})})),null;this.abortLoading(),this._name!==n&&(this._name=n,t&&t(n));const i=["iconify"];return e.prefix!==""&&i.push("iconify--"+e.prefix),e.provider!==""&&i.push("iconify--"+e.provider),{data:r,classes:i}}},render(){this.counter;const n=this.$attrs,t=this.iconMounted||n.ssr?this.getIcon(n.icon,n.onLoad):null;if(!t)return rf(Y2,n);let e=n;return t.classes&&(e={...n,class:(typeof n.class=="string"?n.class+" ":"")+t.classes.join(" ")}),rf({...mo,...t.data},e)}});function Rt(n,t){for(var e=0;e<t.length;e++){const r=t[e];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in n)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(n,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}function Pt(n,t){for(var e=0;e<t.length;e++){const r=t[e];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in n)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(n,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}const xo=typeof window=="object"&&typeof document=="object";typeof process<"u"&&process.versions!=null&&process.versions.node!=null;const J2=n=>{let t=null;switch(n){case"bin":t=/^[0-1]+$/;break;case"oct":t=/^(0b)?[0-8]+$/i;break;case"hex":t=/^(0x)?[0-9a-fA-F]+$/i;break;case"int":t=/^[-+]?[0-9]+$/;break;case"number":t=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;break;case"email":t=/^[A-Za-z0-9_!#$%&'*+/=?`{|}~^.-]+@[A-Za-z0-9._-]+$/gm;break;case"ip":t=/^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/;break;case"base64-data":t=/^\s*data:(?:[a-z]+\/[a-z0-9-+.]+(?:;[a-z-]+=[a-z0-9-]+)?)?(?:;base64)?,([a-z0-9!$&',()*+;=\-._~:@/?%\s]*?)\s*$/i;break;case"var-name":t=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/;break;case"hex-color":t=/^#([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i;break;case"chinese-name":t=/^(?:[\u4e00-\u9fa5·]{2,16})$/;break;case"chinese":t=new RegExp(String.raw`
1
+ (function(en,nt){typeof exports=="object"&&typeof module<"u"?nt(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],nt):(en=typeof globalThis<"u"?globalThis:en||self,nt(en.ZYZGroupCoreVue={},en.Vue))})(this,function(en,nt){"use strict";var a$=Object.defineProperty;var o$=(en,nt,qn)=>nt in en?a$(en,nt,{enumerable:!0,configurable:!0,writable:!0,value:qn}):en[nt]=qn;var Et=(en,nt,qn)=>(o$(en,typeof nt!="symbol"?nt+"":nt,qn),qn);const qn=/^[a-z0-9]+(-[a-z0-9]+)*$/,_o=(n,t,e,r="")=>{const i=n.split(":");if(n.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const o=i.pop(),l=i.pop(),c={provider:i.length>0?i[0]:r,prefix:l,name:o};return t&&!bo(c)?null:c}const s=i[0],a=s.split("-");if(a.length>1){const o={provider:r,prefix:a.shift(),name:a.join("-")};return t&&!bo(o)?null:o}if(e&&r===""){const o={provider:r,prefix:"",name:s};return t&&!bo(o,e)?null:o}return null},bo=(n,t)=>n?!!((n.provider===""||n.provider.match(qn))&&(t&&n.prefix===""||n.prefix.match(qn))&&n.name.match(qn)):!1,Ld=Object.freeze({left:0,top:0,width:16,height:16}),wo=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),xo=Object.freeze({...Ld,...wo}),tc=Object.freeze({...xo,body:"",hidden:!1});function s2(n,t){const e={};!n.hFlip!=!t.hFlip&&(e.hFlip=!0),!n.vFlip!=!t.vFlip&&(e.vFlip=!0);const r=((n.rotate||0)+(t.rotate||0))%4;return r&&(e.rotate=r),e}function Ud(n,t){const e=s2(n,t);for(const r in tc)r in wo?r in n&&!(r in e)&&(e[r]=wo[r]):r in t?e[r]=t[r]:r in n&&(e[r]=n[r]);return e}function a2(n,t){const e=n.icons,r=n.aliases||Object.create(null),i=Object.create(null);function s(a){if(e[a])return i[a]=[];if(!(a in i)){i[a]=null;const o=r[a]&&r[a].parent,l=o&&s(o);l&&(i[a]=[o].concat(l))}return i[a]}return Object.keys(e).concat(Object.keys(r)).forEach(s),i}function o2(n,t,e){const r=n.icons,i=n.aliases||Object.create(null);let s={};function a(o){s=Ud(r[o]||i[o],s)}return a(t),e.forEach(a),Ud(n,s)}function Gd(n,t){const e=[];if(typeof n!="object"||typeof n.icons!="object")return e;n.not_found instanceof Array&&n.not_found.forEach(i=>{t(i,null),e.push(i)});const r=a2(n);for(const i in r){const s=r[i];s&&(t(i,o2(n,i,s)),e.push(i))}return e}const l2={provider:"",aliases:{},not_found:{},...Ld};function ec(n,t){for(const e in t)if(e in n&&typeof n[e]!=typeof t[e])return!1;return!0}function zd(n){if(typeof n!="object"||n===null)return null;const t=n;if(typeof t.prefix!="string"||!n.icons||typeof n.icons!="object"||!ec(n,l2))return null;const e=t.icons;for(const i in e){const s=e[i];if(!i.match(qn)||typeof s.body!="string"||!ec(s,tc))return null}const r=t.aliases||Object.create(null);for(const i in r){const s=r[i],a=s.parent;if(!i.match(qn)||typeof a!="string"||!e[a]&&!r[a]||!ec(s,tc))return null}return t}const Vd=Object.create(null);function c2(n,t){return{provider:n,prefix:t,icons:Object.create(null),missing:new Set}}function vi(n,t){const e=Vd[n]||(Vd[n]=Object.create(null));return e[t]||(e[t]=c2(n,t))}function nc(n,t){return zd(t)?Gd(t,(e,r)=>{r?n.icons[e]=r:n.missing.add(e)}):[]}function h2(n,t,e){try{if(typeof e.body=="string")return n.icons[t]={...e},!0}catch{}return!1}let Es=!1;function Bd(n){return typeof n=="boolean"&&(Es=n),Es}function u2(n){const t=typeof n=="string"?_o(n,!0,Es):n;if(t){const e=vi(t.provider,t.prefix),r=t.name;return e.icons[r]||(e.missing.has(r)?null:void 0)}}function d2(n,t){const e=_o(n,!0,Es);if(!e)return!1;const r=vi(e.provider,e.prefix);return h2(r,e.name,t)}function f2(n,t){if(typeof n!="object")return!1;if(typeof t!="string"&&(t=n.provider||""),Es&&!t&&!n.prefix){let i=!1;return zd(n)&&(n.prefix="",Gd(n,(s,a)=>{a&&d2(s,a)&&(i=!0)})),i}const e=n.prefix;if(!bo({provider:t,prefix:e,name:"a"}))return!1;const r=vi(t,e);return!!nc(r,n)}const Hd=Object.freeze({width:null,height:null}),qd=Object.freeze({...Hd,...wo}),p2=/(-?[0-9.]*[0-9]+[0-9.]*)/g,g2=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Yd(n,t,e){if(t===1)return n;if(e=e||100,typeof n=="number")return Math.ceil(n*t*e)/e;if(typeof n!="string")return n;const r=n.split(p2);if(r===null||!r.length)return n;const i=[];let s=r.shift(),a=g2.test(s);for(;;){if(a){const o=parseFloat(s);isNaN(o)?i.push(s):i.push(Math.ceil(o*t*e)/e)}else i.push(s);if(s=r.shift(),s===void 0)return i.join("");a=!a}}function m2(n,t="defs"){let e="";const r=n.indexOf("<"+t);for(;r>=0;){const i=n.indexOf(">",r),s=n.indexOf("</"+t);if(i===-1||s===-1)break;const a=n.indexOf(">",s);if(a===-1)break;e+=n.slice(i+1,s).trim(),n=n.slice(0,r).trim()+n.slice(a+1)}return{defs:e,content:n}}function v2(n,t){return n?"<defs>"+n+"</defs>"+t:t}function y2(n,t,e){const r=m2(n);return v2(r.defs,t+r.content+e)}const _2=n=>n==="unset"||n==="undefined"||n==="none";function b2(n,t){const e={...xo,...n},r={...qd,...t},i={left:e.left,top:e.top,width:e.width,height:e.height};let s=e.body;[e,r].forEach(v=>{const _=[],x=v.hFlip,b=v.vFlip;let m=v.rotate;x?b?m+=2:(_.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),_.push("scale(-1 1)"),i.top=i.left=0):b&&(_.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),_.push("scale(1 -1)"),i.top=i.left=0);let k;switch(m<0&&(m-=Math.floor(m/4)*4),m=m%4,m){case 1:k=i.height/2+i.top,_.unshift("rotate(90 "+k.toString()+" "+k.toString()+")");break;case 2:_.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:k=i.width/2+i.left,_.unshift("rotate(-90 "+k.toString()+" "+k.toString()+")");break}m%2===1&&(i.left!==i.top&&(k=i.left,i.left=i.top,i.top=k),i.width!==i.height&&(k=i.width,i.width=i.height,i.height=k)),_.length&&(s=y2(s,'<g transform="'+_.join(" ")+'">',"</g>"))});const a=r.width,o=r.height,l=i.width,c=i.height;let h,f;a===null?(f=o===null?"1em":o==="auto"?c:o,h=Yd(f,l/c)):(h=a==="auto"?l:a,f=o===null?Yd(h,c/l):o==="auto"?c:o);const d={},u=(v,_)=>{_2(_)||(d[v]=_.toString())};u("width",h),u("height",f);const p=[i.left,i.top,l,c];return d.viewBox=p.join(" "),{attributes:d,viewBox:p,body:s}}const w2=/\sid="(\S+)"/g,x2="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let S2=0;function k2(n,t=x2){const e=[];let r;for(;r=w2.exec(n);)e.push(r[1]);if(!e.length)return n;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return e.forEach(s=>{const a=typeof t=="function"?t(s):t+(S2++).toString(),o=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");n=n.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),n=n.replace(new RegExp(i,"g"),""),n}const rc=Object.create(null);function C2(n,t){rc[n]=t}function ic(n){return rc[n]||rc[""]}function sc(n){let t;if(typeof n.resources=="string")t=[n.resources];else if(t=n.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:n.path||"/",maxURL:n.maxURL||500,rotate:n.rotate||750,timeout:n.timeout||5e3,random:n.random===!0,index:n.index||0,dataAfterTimeout:n.dataAfterTimeout!==!1}}const ac=Object.create(null),Ps=["https://api.simplesvg.com","https://api.unisvg.com"],So=[];for(;Ps.length>0;)Ps.length===1||Math.random()>.5?So.push(Ps.shift()):So.push(Ps.pop());ac[""]=sc({resources:["https://api.iconify.design"].concat(So)});function T2(n,t){const e=sc(t);return e===null?!1:(ac[n]=e,!0)}function oc(n){return ac[n]}let Kd=(()=>{let n;try{if(n=fetch,typeof n=="function")return n}catch{}})();function E2(n,t){const e=oc(n);if(!e)return 0;let r;if(!e.maxURL)r=0;else{let i=0;e.resources.forEach(a=>{i=Math.max(i,a.length)});const s=t+".json?icons=";r=e.maxURL-i-e.path.length-s.length}return r}function P2(n){return n===404}const A2=(n,t,e)=>{const r=[],i=E2(n,t),s="icons";let a={type:s,provider:n,prefix:t,icons:[]},o=0;return e.forEach((l,c)=>{o+=l.length+1,o>=i&&c>0&&(r.push(a),a={type:s,provider:n,prefix:t,icons:[]},o=l.length),a.icons.push(l)}),r.push(a),r};function O2(n){if(typeof n=="string"){const t=oc(n);if(t)return t.path}return"/"}const $2={prepare:A2,send:(n,t,e)=>{if(!Kd){e("abort",424);return}let r=O2(t.provider);switch(t.type){case"icons":{const s=t.prefix,o=t.icons.join(","),l=new URLSearchParams({icons:o});r+=s+".json?"+l.toString();break}case"custom":{const s=t.uri;r+=s.slice(0,1)==="/"?s.slice(1):s;break}default:e("abort",400);return}let i=503;Kd(n+r).then(s=>{const a=s.status;if(a!==200){setTimeout(()=>{e(P2(a)?"abort":"next",a)});return}return i=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?e("abort",s):e("next",i)});return}setTimeout(()=>{e("success",s)})}).catch(()=>{e("next",i)})}};function N2(n){const t={loaded:[],missing:[],pending:[]},e=Object.create(null);n.sort((i,s)=>i.provider!==s.provider?i.provider.localeCompare(s.provider):i.prefix!==s.prefix?i.prefix.localeCompare(s.prefix):i.name.localeCompare(s.name));let r={provider:"",prefix:"",name:""};return n.forEach(i=>{if(r.name===i.name&&r.prefix===i.prefix&&r.provider===i.provider)return;r=i;const s=i.provider,a=i.prefix,o=i.name,l=e[s]||(e[s]=Object.create(null)),c=l[a]||(l[a]=vi(s,a));let h;o in c.icons?h=t.loaded:a===""||c.missing.has(o)?h=t.missing:h=t.pending;const f={provider:s,prefix:a,name:o};h.push(f)}),t}function Xd(n,t){n.forEach(e=>{const r=e.loaderCallbacks;r&&(e.loaderCallbacks=r.filter(i=>i.id!==t))})}function F2(n){n.pendingCallbacksFlag||(n.pendingCallbacksFlag=!0,setTimeout(()=>{n.pendingCallbacksFlag=!1;const t=n.loaderCallbacks?n.loaderCallbacks.slice(0):[];if(!t.length)return;let e=!1;const r=n.provider,i=n.prefix;t.forEach(s=>{const a=s.icons,o=a.pending.length;a.pending=a.pending.filter(l=>{if(l.prefix!==i)return!0;const c=l.name;if(n.icons[c])a.loaded.push({provider:r,prefix:i,name:c});else if(n.missing.has(c))a.missing.push({provider:r,prefix:i,name:c});else return e=!0,!0;return!1}),a.pending.length!==o&&(e||Xd([n],s.id),s.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),s.abort))})}))}let R2=0;function M2(n,t,e){const r=R2++,i=Xd.bind(null,e,r);if(!t.pending.length)return i;const s={id:r,icons:t,callback:n,abort:i};return e.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(s)}),i}function D2(n,t=!0,e=!1){const r=[];return n.forEach(i=>{const s=typeof i=="string"?_o(i,t,e):i;s&&r.push(s)}),r}var I2={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function j2(n,t,e,r){const i=n.resources.length,s=n.random?Math.floor(Math.random()*i):n.index;let a;if(n.random){let T=n.resources.slice(0);for(a=[];T.length>1;){const F=Math.floor(Math.random()*T.length);a.push(T[F]),T=T.slice(0,F).concat(T.slice(F+1))}a=a.concat(T)}else a=n.resources.slice(s).concat(n.resources.slice(0,s));const o=Date.now();let l="pending",c=0,h,f=null,d=[],u=[];typeof r=="function"&&u.push(r);function p(){f&&(clearTimeout(f),f=null)}function v(){l==="pending"&&(l="aborted"),p(),d.forEach(T=>{T.status==="pending"&&(T.status="aborted")}),d=[]}function _(T,F){F&&(u=[]),typeof T=="function"&&u.push(T)}function x(){return{startTime:o,payload:t,status:l,queriesSent:c,queriesPending:d.length,subscribe:_,abort:v}}function b(){l="failed",u.forEach(T=>{T(void 0,h)})}function m(){d.forEach(T=>{T.status==="pending"&&(T.status="aborted")}),d=[]}function k(T,F,R){const L=F!=="success";switch(d=d.filter(U=>U!==T),l){case"pending":break;case"failed":if(L||!n.dataAfterTimeout)return;break;default:return}if(F==="abort"){h=R,b();return}if(L){h=R,d.length||(a.length?O():b());return}if(p(),m(),!n.random){const U=n.resources.indexOf(T.resource);U!==-1&&U!==n.index&&(n.index=U)}l="completed",u.forEach(U=>{U(R)})}function O(){if(l!=="pending")return;p();const T=a.shift();if(T===void 0){if(d.length){f=setTimeout(()=>{p(),l==="pending"&&(m(),b())},n.timeout);return}b();return}const F={status:"pending",resource:T,callback:(R,L)=>{k(F,R,L)}};d.push(F),c++,f=setTimeout(O,n.rotate),e(T,t,F.callback)}return setTimeout(O),x}function Jd(n){const t={...I2,...n};let e=[];function r(){e=e.filter(o=>o().status==="pending")}function i(o,l,c){const h=j2(t,o,l,(f,d)=>{r(),c&&c(f,d)});return e.push(h),h}function s(o){return e.find(l=>o(l))||null}return{query:i,find:s,setIndex:o=>{t.index=o},getIndex:()=>t.index,cleanup:r}}function Qd(){}const lc=Object.create(null);function L2(n){if(!lc[n]){const t=oc(n);if(!t)return;const e=Jd(t),r={config:t,redundancy:e};lc[n]=r}return lc[n]}function U2(n,t,e){let r,i;if(typeof n=="string"){const s=ic(n);if(!s)return e(void 0,424),Qd;i=s.send;const a=L2(n);a&&(r=a.redundancy)}else{const s=sc(n);if(s){r=Jd(s);const a=n.resources?n.resources[0]:"",o=ic(a);o&&(i=o.send)}}return!r||!i?(e(void 0,424),Qd):r.query(t,i,e)().abort}const Zd="iconify2",As="iconify",Wd=As+"-count",tf=As+"-version",ef=36e5,G2=168,z2=50;function cc(n,t){try{return n.getItem(t)}catch{}}function hc(n,t,e){try{return n.setItem(t,e),!0}catch{}}function nf(n,t){try{n.removeItem(t)}catch{}}function uc(n,t){return hc(n,Wd,t.toString())}function dc(n){return parseInt(cc(n,Wd))||0}const ko={local:!0,session:!0},rf={local:new Set,session:new Set};let fc=!1;function V2(n){fc=n}let Co=typeof window>"u"?{}:window;function sf(n){const t=n+"Storage";try{if(Co&&Co[t]&&typeof Co[t].length=="number")return Co[t]}catch{}ko[n]=!1}function af(n,t){const e=sf(n);if(!e)return;const r=cc(e,tf);if(r!==Zd){if(r){const o=dc(e);for(let l=0;l<o;l++)nf(e,As+l.toString())}hc(e,tf,Zd),uc(e,0);return}const i=Math.floor(Date.now()/ef)-G2,s=o=>{const l=As+o.toString(),c=cc(e,l);if(typeof c=="string"){try{const h=JSON.parse(c);if(typeof h=="object"&&typeof h.cached=="number"&&h.cached>i&&typeof h.provider=="string"&&typeof h.data=="object"&&typeof h.data.prefix=="string"&&t(h,o))return!0}catch{}nf(e,l)}};let a=dc(e);for(let o=a-1;o>=0;o--)s(o)||(o===a-1?(a--,uc(e,a)):rf[n].add(o))}function of(){if(!fc){V2(!0);for(const n in ko)af(n,t=>{const e=t.data,r=t.provider,i=e.prefix,s=vi(r,i);if(!nc(s,e).length)return!1;const a=e.lastModified||-1;return s.lastModifiedCached=s.lastModifiedCached?Math.min(s.lastModifiedCached,a):a,!0})}}function B2(n,t){const e=n.lastModifiedCached;if(e&&e>=t)return e===t;if(n.lastModifiedCached=t,e)for(const r in ko)af(r,i=>{const s=i.data;return i.provider!==n.provider||s.prefix!==n.prefix||s.lastModified===t});return!0}function H2(n,t){fc||of();function e(r){let i;if(!ko[r]||!(i=sf(r)))return;const s=rf[r];let a;if(s.size)s.delete(a=Array.from(s).shift());else if(a=dc(i),a>=z2||!uc(i,a+1))return;const o={cached:Math.floor(Date.now()/ef),provider:n.provider,data:t};return hc(i,As+a.toString(),JSON.stringify(o))}t.lastModified&&!B2(n,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),e("local")||e("session"))}function lf(){}function q2(n){n.iconsLoaderFlag||(n.iconsLoaderFlag=!0,setTimeout(()=>{n.iconsLoaderFlag=!1,F2(n)}))}function Y2(n,t){n.iconsToLoad?n.iconsToLoad=n.iconsToLoad.concat(t).sort():n.iconsToLoad=t,n.iconsQueueFlag||(n.iconsQueueFlag=!0,setTimeout(()=>{n.iconsQueueFlag=!1;const{provider:e,prefix:r}=n,i=n.iconsToLoad;delete n.iconsToLoad;let s;if(!i||!(s=ic(e)))return;s.prepare(e,r,i).forEach(o=>{U2(e,o,l=>{if(typeof l!="object")o.icons.forEach(c=>{n.missing.add(c)});else try{const c=nc(n,l);if(!c.length)return;const h=n.pendingIcons;h&&c.forEach(f=>{h.delete(f)}),H2(n,l)}catch(c){console.error(c)}q2(n)})})}))}const K2=(n,t)=>{const e=D2(n,!0,Bd()),r=N2(e);if(!r.pending.length){let l=!0;return t&&setTimeout(()=>{l&&t(r.loaded,r.missing,r.pending,lf)}),()=>{l=!1}}const i=Object.create(null),s=[];let a,o;return r.pending.forEach(l=>{const{provider:c,prefix:h}=l;if(h===o&&c===a)return;a=c,o=h,s.push(vi(c,h));const f=i[c]||(i[c]=Object.create(null));f[h]||(f[h]=[])}),r.pending.forEach(l=>{const{provider:c,prefix:h,name:f}=l,d=vi(c,h),u=d.pendingIcons||(d.pendingIcons=new Set);u.has(f)||(u.add(f),i[c][h].push(f))}),s.forEach(l=>{const{provider:c,prefix:h}=l;i[c][h].length&&Y2(l,i[c][h])}),t?M2(t,r,s):lf};function X2(n,t){const e={...n};for(const r in t){const i=t[r],s=typeof i;r in Hd?(i===null||i&&(s==="string"||s==="number"))&&(e[r]=i):s===typeof e[r]&&(e[r]=r==="rotate"?i%4:i)}return e}const J2=/[\s,]+/;function Q2(n,t){t.split(J2).forEach(e=>{switch(e.trim()){case"horizontal":n.hFlip=!0;break;case"vertical":n.vFlip=!0;break}})}function Z2(n,t=0){const e=n.replace(/^-?[0-9.]*/,"");function r(i){for(;i<0;)i+=4;return i%4}if(e===""){const i=parseInt(n);return isNaN(i)?0:r(i)}else if(e!==n){let i=0;switch(e){case"%":i=25;break;case"deg":i=90}if(i){let s=parseFloat(n.slice(0,n.length-e.length));return isNaN(s)?0:(s=s/i,s%1===0?r(s):0)}}return t}function W2(n,t){let e=n.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)e+=" "+r+'="'+t[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+e+">"+n+"</svg>"}function t_(n){return n.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function e_(n){return"data:image/svg+xml,"+t_(n)}function n_(n){return'url("'+e_(n)+'")'}const cf={...qd,inline:!1},r_={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},i_={display:"inline-block"},pc={backgroundColor:"currentColor"},hf={backgroundColor:"transparent"},uf={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},df={webkitMask:pc,mask:pc,background:hf};for(const n in df){const t=df[n];for(const e in uf)t[n+e]=uf[e]}const To={};["horizontal","vertical"].forEach(n=>{const t=n.slice(0,1)+"Flip";To[n+"-flip"]=t,To[n.slice(0,1)+"-flip"]=t,To[n+"Flip"]=t});function ff(n){return n+(n.match(/^[-0-9.]+$/)?"px":"")}const pf=(n,t)=>{const e=X2(cf,t),r={...r_},i=t.mode||"svg",s={},a=t.style,o=typeof a=="object"&&!(a instanceof Array)?a:{};for(let v in t){const _=t[v];if(_!==void 0)switch(v){case"icon":case"style":case"onLoad":case"mode":break;case"inline":case"hFlip":case"vFlip":e[v]=_===!0||_==="true"||_===1;break;case"flip":typeof _=="string"&&Q2(e,_);break;case"color":s.color=_;break;case"rotate":typeof _=="string"?e[v]=Z2(_):typeof _=="number"&&(e[v]=_);break;case"ariaHidden":case"aria-hidden":_!==!0&&_!=="true"&&delete r["aria-hidden"];break;default:{const x=To[v];x?(_===!0||_==="true"||_===1)&&(e[x]=!0):cf[v]===void 0&&(r[v]=_)}}}const l=b2(n,e),c=l.attributes;if(e.inline&&(s.verticalAlign="-0.125em"),i==="svg"){r.style={...s,...o},Object.assign(r,c);let v=0,_=t.id;return typeof _=="string"&&(_=_.replace(/-/g,"_")),r.innerHTML=k2(l.body,_?()=>_+"ID"+v++:"iconifyVue"),nt.h("svg",r)}const{body:h,width:f,height:d}=n,u=i==="mask"||(i==="bg"?!1:h.indexOf("currentColor")!==-1),p=W2(h,{...c,width:f+"",height:d+""});return r.style={...s,"--svg":n_(p),width:ff(c.width),height:ff(c.height),...i_,...u?pc:hf,...o},nt.h("span",r)};if(Bd(!0),C2("",$2),typeof document<"u"&&typeof window<"u"){of();const n=window;if(n.IconifyPreload!==void 0){const t=n.IconifyPreload,e="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!f2(r))&&console.error(e)}catch{console.error(e)}})}if(n.IconifyProviders!==void 0){const t=n.IconifyProviders;if(typeof t=="object"&&t!==null)for(let e in t){const r="IconifyProviders["+e+"] is invalid.";try{const i=t[e];if(typeof i!="object"||!i||i.resources===void 0)continue;T2(e,i)||console.error(r)}catch{console.error(r)}}}}const s_={...xo,body:""},a_=nt.defineComponent({inheritAttrs:!1,data(){return{_name:"",_loadingIcon:null,iconMounted:!1,counter:0}},mounted(){this.iconMounted=!0},unmounted(){this.abortLoading()},methods:{abortLoading(){this._loadingIcon&&(this._loadingIcon.abort(),this._loadingIcon=null)},getIcon(n,t){if(typeof n=="object"&&n!==null&&typeof n.body=="string")return this._name="",this.abortLoading(),{data:n};let e;if(typeof n!="string"||(e=_o(n,!1,!0))===null)return this.abortLoading(),null;const r=u2(e);if(!r)return(!this._loadingIcon||this._loadingIcon.name!==n)&&(this.abortLoading(),this._name="",r!==null&&(this._loadingIcon={name:n,abort:K2([e],()=>{this.counter++})})),null;this.abortLoading(),this._name!==n&&(this._name=n,t&&t(n));const i=["iconify"];return e.prefix!==""&&i.push("iconify--"+e.prefix),e.provider!==""&&i.push("iconify--"+e.provider),{data:r,classes:i}}},render(){this.counter;const n=this.$attrs,t=this.iconMounted||n.ssr?this.getIcon(n.icon,n.onLoad):null;if(!t)return pf(s_,n);let e=n;return t.classes&&(e={...n,class:(typeof n.class=="string"?n.class+" ":"")+t.classes.join(" ")}),pf({...xo,...t.data},e)}});function Mt(n,t){for(var e=0;e<t.length;e++){const r=t[e];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in n)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(n,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}function Pt(n,t){for(var e=0;e<t.length;e++){const r=t[e];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in n)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(n,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}const Eo=typeof window=="object"&&typeof document=="object";typeof process<"u"&&process.versions!=null&&process.versions.node!=null;const o_=n=>{let t=null;switch(n){case"bin":t=/^[0-1]+$/;break;case"oct":t=/^(0b)?[0-7]+$/i;break;case"hex":t=/^(0x)?[0-9a-fA-F]+$/i;break;case"int":t=/^[-+]?[0-9]+$/;break;case"number":t=/[-+]?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;break;case"email":t=/^[A-Za-z0-9_!#$%&'*+/=?`{|}~^.-]+@[A-Za-z0-9._-]+$/gm;break;case"ip":t=/^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/;break;case"base64-data":t=/^\s*data:(?:[a-z]+\/[a-z0-9-+.]+(?:;[a-z-]+=[a-z0-9-]+)?)?(?:;base64)?,([a-z0-9!$&',()*+;=\-._~:@/?%\s]*?)\s*$/i;break;case"var-name":t=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/;break;case"hex-color":t=/^#([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i;break;case"chinese-name":t=/^(?:[\u4e00-\u9fa5·]{2,16})$/;break;case"chinese":t=new RegExp(String.raw`
2
2
  [\u{FA0E}\u{FA0F}\u{FA11}\u{FA13}\u{FA14}\u{FA1F}\u{FA21}\u{FA23}\u{FA24}\u{FA27}-\u{FA29}]
3
3
  |[\u{4E00}-\u{9FCC}]
4
4
  |[\u{3400}-\u{4DB5}]
@@ -7,37 +7,37 @@
7
7
  |[\u{2B740}-\u{2B81D}]
8
8
  |[\u{2B820}-\u{2CEAF}]
9
9
  |[\u{2CEB0}-\u{2EBEF}]
10
- `.replace(/\s+/g,""),"u");break;case"mime-image":t=/^image\//;break;case"mime-video":t=/^video\//;break;case"mime-audio":t=/^audio\//;break;case"mime-document-word":t=/^application\/(?:vnd\.openxmlformats-officedocument\.wordprocessingml\.document|msword|vnd\.ms-word\.document\.macroenabled\.12|vnd\.openxmlformats-officedocument\.wordprocessingml\.template|vnd\.ms-word\.template\.macroenabled\.12)$/;break;case"mime-document-excel":t=/^application\/(?:vnd\.openxmlformats-officedocument\.spreadsheetml\.sheet|vnd\.ms-excel|vnd\.ms-excel\.sheet\.macroenabled\.12|vnd\.openxmlformats-officedocument\.spreadsheetml\.template|vnd\.ms-excel\.template\.macroenabled\.12)$/;break;case"mime-document-ppt":t=/^application\/(?:vnd\.ms-powerpoint|vnd\.openxmlformats-officedocument\.presentationml\.presentation|vnd\.ms-powerpoint\.presentation\.macroenabled\.12|vnd\.openxmlformats-officedocument\.presentationml\.template|vnd\.ms-powerpoint\.template\.macroenabled\.12)$/;break;case"mime-document-json":t=/^application\/json$/;break;case"mime-document-xml":t=/^(?:application|text)\/(?:xml|xhtml\+xml)$/;break}return t};function Q2(n){const t={matchIndex:-1,fullMatch:null,groupMatchs:[]};if(n){t.matchIndex=typeof n.index=="number"?n.index:-1;for(let e=0,r=n.length;e<r;e++)e==0?t.fullMatch=n[e]:t.groupMatchs.push(n[e])}return t}const sf=(n,t)=>{typeof n=="string"&&(n=J2(n)||new RegExp(n));const e=[],r=t.matchAll(n);for(const i of r)e.push(Q2(i));return e};function Z2(n){const t=typeof n;return t!=="object"?t:Object.prototype.toString.call(n).replace(/^\[object (\S+)\]$/,"$1").toLowerCase()}function W2(n){return Z2(n)==="object"}function af(n,t=new WeakMap){if(n==null)return n;if(n.constructor===Date)return new Date(n);if(n.constructor===RegExp)return new RegExp(n);if(typeof n!="object")return n;if(t.has(n))return t.get(n);const e=Object.getOwnPropertyDescriptors(n),r=Object.create(Object.getPrototypeOf(n),e);t.set(n,r);for(const i of Reflect.ownKeys(n))r[i]=W2(n[i])?af(n[i],t):n[i];return r}function of(n,t=12){return+n.toPrecision(t)}function lf(n,t){return function(){return n.apply(t,arguments)}}const{toString:t_}=Object.prototype,{getPrototypeOf:ah}=Object,bo=(n=>t=>{const e=t_.call(t);return n[e]||(n[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),ar=n=>(n=n.toLowerCase(),t=>bo(t)===n),So=n=>t=>typeof t===n,{isArray:qi}=Array,Ts=So("undefined");function e_(n){return n!==null&&!Ts(n)&&n.constructor!==null&&!Ts(n.constructor)&&Nn(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const hf=ar("ArrayBuffer");function n_(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&hf(n.buffer),t}const r_=So("string"),Nn=So("function"),cf=So("number"),ko=n=>n!==null&&typeof n=="object",i_=n=>n===!0||n===!1,Co=n=>{if(bo(n)!=="object")return!1;const t=ah(n);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)},s_=ar("Date"),a_=ar("File"),o_=ar("Blob"),l_=ar("FileList"),h_=n=>ko(n)&&Nn(n.pipe),c_=n=>{let t;return n&&(typeof FormData=="function"&&n instanceof FormData||Nn(n.append)&&((t=bo(n))==="formdata"||t==="object"&&Nn(n.toString)&&n.toString()==="[object FormData]"))},u_=ar("URLSearchParams"),d_=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ps(n,t,{allOwnKeys:e=!1}={}){if(n===null||typeof n>"u")return;let r,i;if(typeof n!="object"&&(n=[n]),qi(n))for(r=0,i=n.length;r<i;r++)t.call(null,n[r],r,n);else{const s=e?Object.getOwnPropertyNames(n):Object.keys(n),a=s.length;let o;for(r=0;r<a;r++)o=s[r],t.call(null,n[o],o,n)}}function uf(n,t){t=t.toLowerCase();const e=Object.keys(n);let r=e.length,i;for(;r-- >0;)if(i=e[r],t===i.toLowerCase())return i;return null}const df=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,ff=n=>!Ts(n)&&n!==df;function oh(){const{caseless:n}=ff(this)&&this||{},t={},e=(r,i)=>{const s=n&&uf(t,i)||i;Co(t[s])&&Co(r)?t[s]=oh(t[s],r):Co(r)?t[s]=oh({},r):qi(r)?t[s]=r.slice():t[s]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&Ps(arguments[r],e);return t}const f_=(n,t,e,{allOwnKeys:r}={})=>(Ps(t,(i,s)=>{e&&Nn(i)?n[s]=lf(i,e):n[s]=i},{allOwnKeys:r}),n),p_=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),g_=(n,t,e,r)=>{n.prototype=Object.create(t.prototype,r),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:t.prototype}),e&&Object.assign(n.prototype,e)},m_=(n,t,e,r)=>{let i,s,a;const o={};if(t=t||{},n==null)return t;do{for(i=Object.getOwnPropertyNames(n),s=i.length;s-- >0;)a=i[s],(!r||r(a,n,t))&&!o[a]&&(t[a]=n[a],o[a]=!0);n=e!==!1&&ah(n)}while(n&&(!e||e(n,t))&&n!==Object.prototype);return t},y_=(n,t,e)=>{n=String(n),(e===void 0||e>n.length)&&(e=n.length),e-=t.length;const r=n.indexOf(t,e);return r!==-1&&r===e},v_=n=>{if(!n)return null;if(qi(n))return n;let t=n.length;if(!cf(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=n[t];return e},__=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&ah(Uint8Array)),w_=(n,t)=>{const e=(n&&n[Symbol.iterator]).call(n);let r;for(;(r=e.next())&&!r.done;){const i=r.value;t.call(n,i[0],i[1])}},x_=(n,t)=>{let e;const r=[];for(;(e=n.exec(t))!==null;)r.push(e);return r},b_=ar("HTMLFormElement"),S_=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,e,r){return e.toUpperCase()+r}),pf=(({hasOwnProperty:n})=>(t,e)=>n.call(t,e))(Object.prototype),k_=ar("RegExp"),gf=(n,t)=>{const e=Object.getOwnPropertyDescriptors(n),r={};Ps(e,(i,s)=>{let a;(a=t(i,s,n))!==!1&&(r[s]=a||i)}),Object.defineProperties(n,r)},C_=n=>{gf(n,(t,e)=>{if(Nn(n)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const r=n[e];if(Nn(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},T_=(n,t)=>{const e={},r=i=>{i.forEach(s=>{e[s]=!0})};return qi(n)?r(n):r(String(n).split(t)),e},P_=()=>{},E_=(n,t)=>(n=+n,Number.isFinite(n)?n:t),lh="abcdefghijklmnopqrstuvwxyz",mf="0123456789",yf={DIGIT:mf,ALPHA:lh,ALPHA_DIGIT:lh+lh.toUpperCase()+mf},A_=(n=16,t=yf.ALPHA_DIGIT)=>{let e="";const{length:r}=t;for(;n--;)e+=t[Math.random()*r|0];return e};function O_(n){return!!(n&&Nn(n.append)&&n[Symbol.toStringTag]==="FormData"&&n[Symbol.iterator])}const $_=n=>{const t=new Array(10),e=(r,i)=>{if(ko(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const s=qi(r)?[]:{};return Ps(r,(a,o)=>{const h=e(a,i+1);!Ts(h)&&(s[o]=h)}),t[i]=void 0,s}}return r};return e(n,0)},F_=ar("AsyncFunction"),N_=n=>n&&(ko(n)||Nn(n))&&Nn(n.then)&&Nn(n.catch),ft={isArray:qi,isArrayBuffer:hf,isBuffer:e_,isFormData:c_,isArrayBufferView:n_,isString:r_,isNumber:cf,isBoolean:i_,isObject:ko,isPlainObject:Co,isUndefined:Ts,isDate:s_,isFile:a_,isBlob:o_,isRegExp:k_,isFunction:Nn,isStream:h_,isURLSearchParams:u_,isTypedArray:__,isFileList:l_,forEach:Ps,merge:oh,extend:f_,trim:d_,stripBOM:p_,inherits:g_,toFlatObject:m_,kindOf:bo,kindOfTest:ar,endsWith:y_,toArray:v_,forEachEntry:w_,matchAll:x_,isHTMLForm:b_,hasOwnProperty:pf,hasOwnProp:pf,reduceDescriptors:gf,freezeMethods:C_,toObjectSet:T_,toCamelCase:S_,noop:P_,toFiniteNumber:E_,findKey:uf,global:df,isContextDefined:ff,ALPHABET:yf,generateString:A_,isSpecCompliantForm:O_,toJSONObject:$_,isAsyncFn:F_,isThenable:N_};function se(n,t,e,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",t&&(this.code=t),e&&(this.config=e),r&&(this.request=r),i&&(this.response=i)}ft.inherits(se,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ft.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const vf=se.prototype,_f={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(n=>{_f[n]={value:n}}),Object.defineProperties(se,_f),Object.defineProperty(vf,"isAxiosError",{value:!0}),se.from=(n,t,e,r,i,s)=>{const a=Object.create(vf);return ft.toFlatObject(n,a,function(o){return o!==Error.prototype},o=>o!=="isAxiosError"),se.call(a,n.message,t,e,r,i),a.cause=n,a.name=n.name,s&&Object.assign(a,s),a};const R_=null;function hh(n){return ft.isPlainObject(n)||ft.isArray(n)}function wf(n){return ft.endsWith(n,"[]")?n.slice(0,-2):n}function xf(n,t,e){return n?n.concat(t).map(function(r,i){return r=wf(r),!e&&i?"["+r+"]":r}).join(e?".":""):t}function D_(n){return ft.isArray(n)&&!n.some(hh)}const M_=ft.toFlatObject(ft,{},null,function(n){return/^is[A-Z]/.test(n)});function To(n,t,e){if(!ft.isObject(n))throw new TypeError("target must be an object");t=t||new FormData,e=ft.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(u,p){return!ft.isUndefined(p[u])});const r=e.metaTokens,i=e.visitor||l,s=e.dots,a=e.indexes,o=(e.Blob||typeof Blob<"u"&&Blob)&&ft.isSpecCompliantForm(t);if(!ft.isFunction(i))throw new TypeError("visitor must be a function");function h(u){if(u===null)return"";if(ft.isDate(u))return u.toISOString();if(!o&&ft.isBlob(u))throw new se("Blob is not supported. Use a Buffer instead.");return ft.isArrayBuffer(u)||ft.isTypedArray(u)?o&&typeof Blob=="function"?new Blob([u]):Buffer.from(u):u}function l(u,p,v){let _=u;if(u&&!v&&typeof u=="object"){if(ft.endsWith(p,"{}"))p=r?p:p.slice(0,-2),u=JSON.stringify(u);else if(ft.isArray(u)&&D_(u)||(ft.isFileList(u)||ft.endsWith(p,"[]"))&&(_=ft.toArray(u)))return p=wf(p),_.forEach(function(S,x){!(ft.isUndefined(S)||S===null)&&t.append(a===!0?xf([p],x,s):a===null?p:p+"[]",h(S))}),!1}return hh(u)?!0:(t.append(xf(v,p,s),h(u)),!1)}const c=[],f=Object.assign(M_,{defaultVisitor:l,convertValue:h,isVisitable:hh});function d(u,p){if(!ft.isUndefined(u)){if(c.indexOf(u)!==-1)throw Error("Circular reference detected in "+p.join("."));c.push(u),ft.forEach(u,function(v,_){(!(ft.isUndefined(v)||v===null)&&i.call(t,v,ft.isString(_)?_.trim():_,p,f))===!0&&d(v,p?p.concat(_):[_])}),c.pop()}}if(!ft.isObject(n))throw new TypeError("data must be an object");return d(n),t}function bf(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function ch(n,t){this._pairs=[],n&&To(n,this,t)}const Sf=ch.prototype;Sf.append=function(n,t){this._pairs.push([n,t])},Sf.toString=function(n){const t=n?function(e){return n.call(this,e,bf)}:bf;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};function I_(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function kf(n,t,e){if(!t)return n;const r=e&&e.encode||I_,i=e&&e.serialize;let s;if(i?s=i(t,e):s=ft.isURLSearchParams(t)?t.toString():new ch(t,e).toString(r),s){const a=n.indexOf("#");a!==-1&&(n=n.slice(0,a)),n+=(n.indexOf("?")===-1?"?":"&")+s}return n}class j_{constructor(){this.handlers=[]}use(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){ft.forEach(this.handlers,function(e){e!==null&&t(e)})}}const Cf=j_,Tf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},L_=typeof URLSearchParams<"u"?URLSearchParams:ch,U_=typeof FormData<"u"?FormData:null,G_=typeof Blob<"u"?Blob:null,z_=(()=>{let n;return typeof navigator<"u"&&((n=navigator.product)==="ReactNative"||n==="NativeScript"||n==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),V_=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",or={isBrowser:!0,classes:{URLSearchParams:L_,FormData:U_,Blob:G_},isStandardBrowserEnv:z_,isStandardBrowserWebWorkerEnv:V_,protocols:["http","https","file","blob","url","data"]};function B_(n,t){return To(n,new or.classes.URLSearchParams,Object.assign({visitor:function(e,r,i,s){return or.isNode&&ft.isBuffer(e)?(this.append(r,e.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function H_(n){return ft.matchAll(/\w+|\[(\w*)]/g,n).map(t=>t[0]==="[]"?"":t[1]||t[0])}function q_(n){const t={},e=Object.keys(n);let r;const i=e.length;let s;for(r=0;r<i;r++)s=e[r],t[s]=n[s];return t}function Pf(n){function t(e,r,i,s){let a=e[s++];const o=Number.isFinite(+a),h=s>=e.length;return a=!a&&ft.isArray(i)?i.length:a,h?(ft.hasOwnProp(i,a)?i[a]=[i[a],r]:i[a]=r,!o):((!i[a]||!ft.isObject(i[a]))&&(i[a]=[]),t(e,r,i[a],s)&&ft.isArray(i[a])&&(i[a]=q_(i[a])),!o)}if(ft.isFormData(n)&&ft.isFunction(n.entries)){const e={};return ft.forEachEntry(n,(r,i)=>{t(H_(r),i,e,0)}),e}return null}function K_(n,t,e){if(ft.isString(n))try{return(t||JSON.parse)(n),ft.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(e||JSON.stringify)(n)}const uh={transitional:Tf,adapter:["xhr","http"],transformRequest:[function(n,t){const e=t.getContentType()||"",r=e.indexOf("application/json")>-1,i=ft.isObject(n);if(i&&ft.isHTMLForm(n)&&(n=new FormData(n)),ft.isFormData(n))return r&&r?JSON.stringify(Pf(n)):n;if(ft.isArrayBuffer(n)||ft.isBuffer(n)||ft.isStream(n)||ft.isFile(n)||ft.isBlob(n))return n;if(ft.isArrayBufferView(n))return n.buffer;if(ft.isURLSearchParams(n))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let s;if(i){if(e.indexOf("application/x-www-form-urlencoded")>-1)return B_(n,this.formSerializer).toString();if((s=ft.isFileList(n))||e.indexOf("multipart/form-data")>-1){const a=this.env&&this.env.FormData;return To(s?{"files[]":n}:n,a&&new a,this.formSerializer)}}return i||r?(t.setContentType("application/json",!1),K_(n)):n}],transformResponse:[function(n){const t=this.transitional||uh.transitional,e=t&&t.forcedJSONParsing,r=this.responseType==="json";if(n&&ft.isString(n)&&(e&&!this.responseType||r)){const i=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(n)}catch(s){if(i)throw s.name==="SyntaxError"?se.from(s,se.ERR_BAD_RESPONSE,this,null,this.response):s}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:or.classes.FormData,Blob:or.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ft.forEach(["delete","get","head","post","put","patch"],n=>{uh.headers[n]={}});const dh=uh,Y_=ft.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),X_=n=>{const t={};let e,r,i;return n&&n.split(`
11
- `).forEach(function(s){i=s.indexOf(":"),e=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!e||t[e]&&Y_[e])&&(e==="set-cookie"?t[e]?t[e].push(r):t[e]=[r]:t[e]=t[e]?t[e]+", "+r:r)}),t},Ef=Symbol("internals");function Es(n){return n&&String(n).trim().toLowerCase()}function Po(n){return n===!1||n==null?n:ft.isArray(n)?n.map(Po):String(n)}function J_(n){const t=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=e.exec(n);)t[r[1]]=r[2];return t}const Q_=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function fh(n,t,e,r,i){if(ft.isFunction(r))return r.call(this,t,e);if(i&&(t=e),!!ft.isString(t)){if(ft.isString(r))return t.indexOf(r)!==-1;if(ft.isRegExp(r))return r.test(t)}}function Z_(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,r)=>e.toUpperCase()+r)}function W_(n,t){const e=ft.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(n,r+e,{value:function(i,s,a){return this[r].call(this,t,i,s,a)},configurable:!0})})}class Eo{constructor(t){t&&this.set(t)}set(t,e,r){const i=this;function s(o,h,l){const c=Es(h);if(!c)throw new Error("header name must be a non-empty string");const f=ft.findKey(i,c);(!f||i[f]===void 0||l===!0||l===void 0&&i[f]!==!1)&&(i[f||h]=Po(o))}const a=(o,h)=>ft.forEach(o,(l,c)=>s(l,c,h));return ft.isPlainObject(t)||t instanceof this.constructor?a(t,e):ft.isString(t)&&(t=t.trim())&&!Q_(t)?a(X_(t),e):t!=null&&s(e,t,r),this}get(t,e){if(t=Es(t),t){const r=ft.findKey(this,t);if(r){const i=this[r];if(!e)return i;if(e===!0)return J_(i);if(ft.isFunction(e))return e.call(this,i,r);if(ft.isRegExp(e))return e.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Es(t),t){const r=ft.findKey(this,t);return!!(r&&this[r]!==void 0&&(!e||fh(this,this[r],r,e)))}return!1}delete(t,e){const r=this;let i=!1;function s(a){if(a=Es(a),a){const o=ft.findKey(r,a);o&&(!e||fh(r,r[o],o,e))&&(delete r[o],i=!0)}}return ft.isArray(t)?t.forEach(s):s(t),i}clear(t){const e=Object.keys(this);let r=e.length,i=!1;for(;r--;){const s=e[r];(!t||fh(this,this[s],s,t,!0))&&(delete this[s],i=!0)}return i}normalize(t){const e=this,r={};return ft.forEach(this,(i,s)=>{const a=ft.findKey(r,s);if(a){e[a]=Po(i),delete e[s];return}const o=t?Z_(s):String(s).trim();o!==s&&delete e[s],e[o]=Po(i),r[o]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return ft.forEach(this,(r,i)=>{r!=null&&r!==!1&&(e[i]=t&&ft.isArray(r)?r.join(", "):r)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
12
- `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const r=new this(t);return e.forEach(i=>r.set(i)),r}static accessor(t){const e=(this[Ef]=this[Ef]={accessors:{}}).accessors,r=this.prototype;function i(s){const a=Es(s);e[a]||(W_(r,s),e[a]=!0)}return ft.isArray(t)?t.forEach(i):i(t),this}}Eo.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ft.reduceDescriptors(Eo.prototype,({value:n},t)=>{let e=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(r){this[e]=r}}}),ft.freezeMethods(Eo);const wr=Eo;function ph(n,t){const e=this||dh,r=t||e,i=wr.from(r.headers);let s=r.data;return ft.forEach(n,function(a){s=a.call(e,s,i.normalize(),t?t.status:void 0)}),i.normalize(),s}function Af(n){return!!(n&&n.__CANCEL__)}function As(n,t,e){se.call(this,n??"canceled",se.ERR_CANCELED,t,e),this.name="CanceledError"}ft.inherits(As,se,{__CANCEL__:!0});function tw(n,t,e){const r=e.config.validateStatus;!e.status||!r||r(e.status)?n(e):t(new se("Request failed with status code "+e.status,[se.ERR_BAD_REQUEST,se.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}const ew=or.isStandardBrowserEnv?function(){return{write:function(n,t,e,r,i,s){const a=[];a.push(n+"="+encodeURIComponent(t)),ft.isNumber(e)&&a.push("expires="+new Date(e).toGMTString()),ft.isString(r)&&a.push("path="+r),ft.isString(i)&&a.push("domain="+i),s===!0&&a.push("secure"),document.cookie=a.join("; ")},read:function(n){const t=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function nw(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function rw(n,t){return t?n.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):n}function Of(n,t){return n&&!nw(t)?rw(n,t):t}const iw=or.isStandardBrowserEnv?function(){const n=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let e;function r(i){let s=i;return n&&(t.setAttribute("href",s),s=t.href),t.setAttribute("href",s),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:t.pathname.charAt(0)==="/"?t.pathname:"/"+t.pathname}}return e=r(window.location.href),function(i){const s=ft.isString(i)?r(i):i;return s.protocol===e.protocol&&s.host===e.host}}():function(){return function(){return!0}}();function sw(n){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return t&&t[1]||""}function aw(n,t){n=n||10;const e=new Array(n),r=new Array(n);let i=0,s=0,a;return t=t!==void 0?t:1e3,function(o){const h=Date.now(),l=r[s];a||(a=h),e[i]=o,r[i]=h;let c=s,f=0;for(;c!==i;)f+=e[c++],c=c%n;if(i=(i+1)%n,i===s&&(s=(s+1)%n),h-a<t)return;const d=l&&h-l;return d?Math.round(f*1e3/d):void 0}}function $f(n,t){let e=0;const r=aw(50,250);return i=>{const s=i.loaded,a=i.lengthComputable?i.total:void 0,o=s-e,h=r(o),l=s<=a;e=s;const c={loaded:s,total:a,progress:a?s/a:void 0,bytes:o,rate:h||void 0,estimated:h&&a&&l?(a-s)/h:void 0,event:i};c[t?"download":"upload"]=!0,n(c)}}const ow=typeof XMLHttpRequest<"u",lw=ow&&function(n){return new Promise(function(t,e){let r=n.data;const i=wr.from(n.headers).normalize(),s=n.responseType;let a;function o(){n.cancelToken&&n.cancelToken.unsubscribe(a),n.signal&&n.signal.removeEventListener("abort",a)}let h;ft.isFormData(r)&&(or.isStandardBrowserEnv||or.isStandardBrowserWebWorkerEnv?i.setContentType(!1):i.getContentType(/^\s*multipart\/form-data/)?ft.isString(h=i.getContentType())&&i.setContentType(h.replace(/^\s*(multipart\/form-data);+/,"$1")):i.setContentType("multipart/form-data"));let l=new XMLHttpRequest;if(n.auth){const u=n.auth.username||"",p=n.auth.password?unescape(encodeURIComponent(n.auth.password)):"";i.set("Authorization","Basic "+btoa(u+":"+p))}const c=Of(n.baseURL,n.url);l.open(n.method.toUpperCase(),kf(c,n.params,n.paramsSerializer),!0),l.timeout=n.timeout;function f(){if(!l)return;const u=wr.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),p={data:!s||s==="text"||s==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:u,config:n,request:l};tw(function(v){t(v),o()},function(v){e(v),o()},p),l=null}if("onloadend"in l?l.onloadend=f:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(f)},l.onabort=function(){l&&(e(new se("Request aborted",se.ECONNABORTED,n,l)),l=null)},l.onerror=function(){e(new se("Network Error",se.ERR_NETWORK,n,l)),l=null},l.ontimeout=function(){let u=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const p=n.transitional||Tf;n.timeoutErrorMessage&&(u=n.timeoutErrorMessage),e(new se(u,p.clarifyTimeoutError?se.ETIMEDOUT:se.ECONNABORTED,n,l)),l=null},or.isStandardBrowserEnv){const u=(n.withCredentials||iw(c))&&n.xsrfCookieName&&ew.read(n.xsrfCookieName);u&&i.set(n.xsrfHeaderName,u)}r===void 0&&i.setContentType(null),"setRequestHeader"in l&&ft.forEach(i.toJSON(),function(u,p){l.setRequestHeader(p,u)}),ft.isUndefined(n.withCredentials)||(l.withCredentials=!!n.withCredentials),s&&s!=="json"&&(l.responseType=n.responseType),typeof n.onDownloadProgress=="function"&&l.addEventListener("progress",$f(n.onDownloadProgress,!0)),typeof n.onUploadProgress=="function"&&l.upload&&l.upload.addEventListener("progress",$f(n.onUploadProgress)),(n.cancelToken||n.signal)&&(a=u=>{l&&(e(!u||u.type?new As(null,n,l):u),l.abort(),l=null)},n.cancelToken&&n.cancelToken.subscribe(a),n.signal&&(n.signal.aborted?a():n.signal.addEventListener("abort",a)));const d=sw(c);if(d&&or.protocols.indexOf(d)===-1){e(new se("Unsupported protocol "+d+":",se.ERR_BAD_REQUEST,n));return}l.send(r||null)})},gh={http:R_,xhr:lw};ft.forEach(gh,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{value:t})}catch{}Object.defineProperty(n,"adapterName",{value:t})}});const Ff=n=>`- ${n}`,hw=n=>ft.isFunction(n)||n===null||n===!1,Nf={getAdapter:n=>{n=ft.isArray(n)?n:[n];const{length:t}=n;let e,r;const i={};for(let s=0;s<t;s++){e=n[s];let a;if(r=e,!hw(e)&&(r=gh[(a=String(e)).toLowerCase()],r===void 0))throw new se(`Unknown adapter '${a}'`);if(r)break;i[a||"#"+s]=r}if(!r){const s=Object.entries(i).map(([o,h])=>`adapter ${o} `+(h===!1?"is not supported by the environment":"is not available in the build"));let a=t?s.length>1?`since :
13
- `+s.map(Ff).join(`
14
- `):" "+Ff(s[0]):"as no adapter specified";throw new se("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:gh};function mh(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new As(null,n)}function Rf(n){return mh(n),n.headers=wr.from(n.headers),n.data=ph.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Nf.getAdapter(n.adapter||dh.adapter)(n).then(function(t){return mh(n),t.data=ph.call(n,n.transformResponse,t),t.headers=wr.from(t.headers),t},function(t){return Af(t)||(mh(n),t&&t.response&&(t.response.data=ph.call(n,n.transformResponse,t.response),t.response.headers=wr.from(t.response.headers))),Promise.reject(t)})}const Df=n=>n instanceof wr?n.toJSON():n;function Ki(n,t){t=t||{};const e={};function r(l,c,f){return ft.isPlainObject(l)&&ft.isPlainObject(c)?ft.merge.call({caseless:f},l,c):ft.isPlainObject(c)?ft.merge({},c):ft.isArray(c)?c.slice():c}function i(l,c,f){if(ft.isUndefined(c)){if(!ft.isUndefined(l))return r(void 0,l,f)}else return r(l,c,f)}function s(l,c){if(!ft.isUndefined(c))return r(void 0,c)}function a(l,c){if(ft.isUndefined(c)){if(!ft.isUndefined(l))return r(void 0,l)}else return r(void 0,c)}function o(l,c,f){if(f in t)return r(l,c);if(f in n)return r(void 0,l)}const h={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:o,headers:(l,c)=>i(Df(l),Df(c),!0)};return ft.forEach(Object.keys(Object.assign({},n,t)),function(l){const c=h[l]||i,f=c(n[l],t[l],l);ft.isUndefined(f)&&c!==o||(e[l]=f)}),e}const Mf="1.5.1",yh={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{yh[n]=function(e){return typeof e===n||"a"+(t<1?"n ":" ")+n}});const If={};yh.transitional=function(n,t,e){function r(i,s){return"[Axios v"+Mf+"] Transitional option '"+i+"'"+s+(e?". "+e:"")}return(i,s,a)=>{if(n===!1)throw new se(r(s," has been removed"+(t?" in "+t:"")),se.ERR_DEPRECATED);return t&&!If[s]&&(If[s]=!0,console.warn(r(s," has been deprecated since v"+t+" and will be removed in the near future"))),n?n(i,s,a):!0}};function cw(n,t,e){if(typeof n!="object")throw new se("options must be an object",se.ERR_BAD_OPTION_VALUE);const r=Object.keys(n);let i=r.length;for(;i-- >0;){const s=r[i],a=t[s];if(a){const o=n[s],h=o===void 0||a(o,s,n);if(h!==!0)throw new se("option "+s+" must be "+h,se.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new se("Unknown option "+s,se.ERR_BAD_OPTION)}}const vh={assertOptions:cw,validators:yh},qr=vh.validators;class Ao{constructor(t){this.defaults=t,this.interceptors={request:new Cf,response:new Cf}}request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=Ki(this.defaults,e);const{transitional:r,paramsSerializer:i,headers:s}=e;r!==void 0&&vh.assertOptions(r,{silentJSONParsing:qr.transitional(qr.boolean),forcedJSONParsing:qr.transitional(qr.boolean),clarifyTimeoutError:qr.transitional(qr.boolean)},!1),i!=null&&(ft.isFunction(i)?e.paramsSerializer={serialize:i}:vh.assertOptions(i,{encode:qr.function,serialize:qr.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let a=s&&ft.merge(s.common,s[e.method]);s&&ft.forEach(["delete","get","head","post","put","patch","common"],p=>{delete s[p]}),e.headers=wr.concat(a,s);const o=[];let h=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(e)===!1||(h=h&&p.synchronous,o.unshift(p.fulfilled,p.rejected))});const l=[];this.interceptors.response.forEach(function(p){l.push(p.fulfilled,p.rejected)});let c,f=0,d;if(!h){const p=[Rf.bind(this),void 0];for(p.unshift.apply(p,o),p.push.apply(p,l),d=p.length,c=Promise.resolve(e);f<d;)c=c.then(p[f++],p[f++]);return c}d=o.length;let u=e;for(f=0;f<d;){const p=o[f++],v=o[f++];try{u=p(u)}catch(_){v.call(this,_);break}}try{c=Rf.call(this,u)}catch(p){return Promise.reject(p)}for(f=0,d=l.length;f<d;)c=c.then(l[f++],l[f++]);return c}getUri(t){t=Ki(this.defaults,t);const e=Of(t.baseURL,t.url);return kf(e,t.params,t.paramsSerializer)}}ft.forEach(["delete","get","head","options"],function(n){Ao.prototype[n]=function(t,e){return this.request(Ki(e||{},{method:n,url:t,data:(e||{}).data}))}}),ft.forEach(["post","put","patch"],function(n){function t(e){return function(r,i,s){return this.request(Ki(s||{},{method:n,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:i}))}}Ao.prototype[n]=t(),Ao.prototype[n+"Form"]=t(!0)});const Oo=Ao;class _h{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(i){e=i});const r=this;this.promise.then(i=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](i);r._listeners=null}),this.promise.then=i=>{let s;const a=new Promise(o=>{r.subscribe(o),s=o}).then(i);return a.cancel=function(){r.unsubscribe(s)},a},t(function(i,s,a){r.reason||(r.reason=new As(i,s,a),e(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);e!==-1&&this._listeners.splice(e,1)}static source(){let t;return{token:new _h(function(e){t=e}),cancel:t}}}const uw=_h;function dw(n){return function(t){return n.apply(null,t)}}function fw(n){return ft.isObject(n)&&n.isAxiosError===!0}const wh={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(wh).forEach(([n,t])=>{wh[t]=n});const pw=wh;function jf(n){const t=new Oo(n),e=lf(Oo.prototype.request,t);return ft.extend(e,Oo.prototype,t,{allOwnKeys:!0}),ft.extend(e,t,null,{allOwnKeys:!0}),e.create=function(r){return jf(Ki(n,r))},e}const Ve=jf(dh);Ve.Axios=Oo,Ve.CanceledError=As,Ve.CancelToken=uw,Ve.isCancel=Af,Ve.VERSION=Mf,Ve.toFormData=To,Ve.AxiosError=se,Ve.Cancel=Ve.CanceledError,Ve.all=function(n){return Promise.all(n)},Ve.spread=dw,Ve.isAxiosError=fw,Ve.mergeConfig=Ki,Ve.AxiosHeaders=wr,Ve.formToJSON=n=>Pf(ft.isHTMLForm(n)?new FormData(n):n),Ve.getAdapter=Nf.getAdapter,Ve.HttpStatusCode=pw,Ve.default=Ve;var xh=function(n,t){return xh=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])},xh(n,t)};function Kr(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");xh(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function bh(n){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&n[t],r=0;if(e)return e.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&r>=n.length&&(n=void 0),{value:n&&n[r++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Os(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),i,s=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(a)throw a.error}}return s}function $s(n,t,e){if(arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return n.concat(s||Array.prototype.slice.call(t))}function xr(n){return typeof n=="function"}function Sh(n){var t=function(r){Error.call(r),r.stack=new Error().stack},e=n(t);return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var kh=Sh(function(n){return function(t){n(this),this.message=t?t.length+` errors occurred during unsubscription:
10
+ `.replace(/\s+/g,""),"u");break;case"mime-image":t=/^image\//;break;case"mime-video":t=/^video\//;break;case"mime-audio":t=/^audio\//;break;case"mime-document-word":t=/^application\/(?:vnd\.openxmlformats-officedocument\.wordprocessingml\.document|msword|vnd\.ms-word\.document\.macroenabled\.12|vnd\.openxmlformats-officedocument\.wordprocessingml\.template|vnd\.ms-word\.template\.macroenabled\.12)$/;break;case"mime-document-excel":t=/^application\/(?:vnd\.openxmlformats-officedocument\.spreadsheetml\.sheet|vnd\.ms-excel|vnd\.ms-excel\.sheet\.macroenabled\.12|vnd\.openxmlformats-officedocument\.spreadsheetml\.template|vnd\.ms-excel\.template\.macroenabled\.12)$/;break;case"mime-document-ppt":t=/^application\/(?:vnd\.ms-powerpoint|vnd\.openxmlformats-officedocument\.presentationml\.presentation|vnd\.ms-powerpoint\.presentation\.macroenabled\.12|vnd\.openxmlformats-officedocument\.presentationml\.template|vnd\.ms-powerpoint\.template\.macroenabled\.12)$/;break;case"mime-document-json":t=/^application\/json$/;break;case"mime-document-xml":t=/^(?:application|text)\/(?:xml|xhtml\+xml)$/;break}return t};function l_(n){const t={matchIndex:-1,fullMatch:null,groupMatchs:[]};if(n){t.matchIndex=typeof n.index=="number"?n.index:-1;for(let e=0,r=n.length;e<r;e++)e==0?t.fullMatch=n[e]:t.groupMatchs.push(n[e])}return t}const gf=(n,t)=>{typeof n=="string"&&(n=o_(n)||new RegExp(n));const e=[],r=t.matchAll(n);for(const i of r)e.push(l_(i));return e};function c_(n){const t=typeof n;return t!=="object"?t:Object.prototype.toString.call(n).replace(/^\[object (\S+)\]$/,"$1").toLowerCase()}function h_(n){return c_(n)==="object"}function mf(n,t=new WeakMap){if(n==null)return n;if(n.constructor===Date)return new Date(n);if(n.constructor===RegExp)return new RegExp(n);if(typeof n!="object")return n;if(t.has(n))return t.get(n);const e=Object.getOwnPropertyDescriptors(n),r=Object.create(Object.getPrototypeOf(n),e);t.set(n,r);for(const i of Reflect.ownKeys(n))r[i]=h_(n[i])?mf(n[i],t):n[i];return r}function vf(n,t=12){return+n.toPrecision(t)}function yf(n,t){return function(){return n.apply(t,arguments)}}const{toString:u_}=Object.prototype,{getPrototypeOf:gc}=Object,Po=(n=>t=>{const e=u_.call(t);return n[e]||(n[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),cr=n=>(n=n.toLowerCase(),t=>Po(t)===n),Ao=n=>t=>typeof t===n,{isArray:Ji}=Array,Os=Ao("undefined");function d_(n){return n!==null&&!Os(n)&&n.constructor!==null&&!Os(n.constructor)&&Dn(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const _f=cr("ArrayBuffer");function f_(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&_f(n.buffer),t}const p_=Ao("string"),Dn=Ao("function"),bf=Ao("number"),Oo=n=>n!==null&&typeof n=="object",g_=n=>n===!0||n===!1,$o=n=>{if(Po(n)!=="object")return!1;const t=gc(n);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)},m_=cr("Date"),v_=cr("File"),y_=cr("Blob"),__=cr("FileList"),b_=n=>Oo(n)&&Dn(n.pipe),w_=n=>{let t;return n&&(typeof FormData=="function"&&n instanceof FormData||Dn(n.append)&&((t=Po(n))==="formdata"||t==="object"&&Dn(n.toString)&&n.toString()==="[object FormData]"))},x_=cr("URLSearchParams"),S_=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function $s(n,t,{allOwnKeys:e=!1}={}){if(n===null||typeof n>"u")return;let r,i;if(typeof n!="object"&&(n=[n]),Ji(n))for(r=0,i=n.length;r<i;r++)t.call(null,n[r],r,n);else{const s=e?Object.getOwnPropertyNames(n):Object.keys(n),a=s.length;let o;for(r=0;r<a;r++)o=s[r],t.call(null,n[o],o,n)}}function wf(n,t){t=t.toLowerCase();const e=Object.keys(n);let r=e.length,i;for(;r-- >0;)if(i=e[r],t===i.toLowerCase())return i;return null}const xf=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Sf=n=>!Os(n)&&n!==xf;function mc(){const{caseless:n}=Sf(this)&&this||{},t={},e=(r,i)=>{const s=n&&wf(t,i)||i;$o(t[s])&&$o(r)?t[s]=mc(t[s],r):$o(r)?t[s]=mc({},r):Ji(r)?t[s]=r.slice():t[s]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&$s(arguments[r],e);return t}const k_=(n,t,e,{allOwnKeys:r}={})=>($s(t,(i,s)=>{e&&Dn(i)?n[s]=yf(i,e):n[s]=i},{allOwnKeys:r}),n),C_=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),T_=(n,t,e,r)=>{n.prototype=Object.create(t.prototype,r),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:t.prototype}),e&&Object.assign(n.prototype,e)},E_=(n,t,e,r)=>{let i,s,a;const o={};if(t=t||{},n==null)return t;do{for(i=Object.getOwnPropertyNames(n),s=i.length;s-- >0;)a=i[s],(!r||r(a,n,t))&&!o[a]&&(t[a]=n[a],o[a]=!0);n=e!==!1&&gc(n)}while(n&&(!e||e(n,t))&&n!==Object.prototype);return t},P_=(n,t,e)=>{n=String(n),(e===void 0||e>n.length)&&(e=n.length),e-=t.length;const r=n.indexOf(t,e);return r!==-1&&r===e},A_=n=>{if(!n)return null;if(Ji(n))return n;let t=n.length;if(!bf(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=n[t];return e},O_=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&gc(Uint8Array)),$_=(n,t)=>{const e=(n&&n[Symbol.iterator]).call(n);let r;for(;(r=e.next())&&!r.done;){const i=r.value;t.call(n,i[0],i[1])}},N_=(n,t)=>{let e;const r=[];for(;(e=n.exec(t))!==null;)r.push(e);return r},F_=cr("HTMLFormElement"),R_=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,e,r){return e.toUpperCase()+r}),kf=(({hasOwnProperty:n})=>(t,e)=>n.call(t,e))(Object.prototype),M_=cr("RegExp"),Cf=(n,t)=>{const e=Object.getOwnPropertyDescriptors(n),r={};$s(e,(i,s)=>{let a;(a=t(i,s,n))!==!1&&(r[s]=a||i)}),Object.defineProperties(n,r)},D_=n=>{Cf(n,(t,e)=>{if(Dn(n)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const r=n[e];if(Dn(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},I_=(n,t)=>{const e={},r=i=>{i.forEach(s=>{e[s]=!0})};return Ji(n)?r(n):r(String(n).split(t)),e},j_=()=>{},L_=(n,t)=>(n=+n,Number.isFinite(n)?n:t),vc="abcdefghijklmnopqrstuvwxyz",Tf="0123456789",Ef={DIGIT:Tf,ALPHA:vc,ALPHA_DIGIT:vc+vc.toUpperCase()+Tf},U_=(n=16,t=Ef.ALPHA_DIGIT)=>{let e="";const{length:r}=t;for(;n--;)e+=t[Math.random()*r|0];return e};function G_(n){return!!(n&&Dn(n.append)&&n[Symbol.toStringTag]==="FormData"&&n[Symbol.iterator])}const z_=n=>{const t=new Array(10),e=(r,i)=>{if(Oo(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const s=Ji(r)?[]:{};return $s(r,(a,o)=>{const l=e(a,i+1);!Os(l)&&(s[o]=l)}),t[i]=void 0,s}}return r};return e(n,0)},V_=cr("AsyncFunction"),B_=n=>n&&(Oo(n)||Dn(n))&&Dn(n.then)&&Dn(n.catch),pt={isArray:Ji,isArrayBuffer:_f,isBuffer:d_,isFormData:w_,isArrayBufferView:f_,isString:p_,isNumber:bf,isBoolean:g_,isObject:Oo,isPlainObject:$o,isUndefined:Os,isDate:m_,isFile:v_,isBlob:y_,isRegExp:M_,isFunction:Dn,isStream:b_,isURLSearchParams:x_,isTypedArray:O_,isFileList:__,forEach:$s,merge:mc,extend:k_,trim:S_,stripBOM:C_,inherits:T_,toFlatObject:E_,kindOf:Po,kindOfTest:cr,endsWith:P_,toArray:A_,forEachEntry:$_,matchAll:N_,isHTMLForm:F_,hasOwnProperty:kf,hasOwnProp:kf,reduceDescriptors:Cf,freezeMethods:D_,toObjectSet:I_,toCamelCase:R_,noop:j_,toFiniteNumber:L_,findKey:wf,global:xf,isContextDefined:Sf,ALPHABET:Ef,generateString:U_,isSpecCompliantForm:G_,toJSONObject:z_,isAsyncFn:V_,isThenable:B_};function oe(n,t,e,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",t&&(this.code=t),e&&(this.config=e),r&&(this.request=r),i&&(this.response=i)}pt.inherits(oe,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:pt.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Pf=oe.prototype,Af={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(n=>{Af[n]={value:n}}),Object.defineProperties(oe,Af),Object.defineProperty(Pf,"isAxiosError",{value:!0}),oe.from=(n,t,e,r,i,s)=>{const a=Object.create(Pf);return pt.toFlatObject(n,a,function(o){return o!==Error.prototype},o=>o!=="isAxiosError"),oe.call(a,n.message,t,e,r,i),a.cause=n,a.name=n.name,s&&Object.assign(a,s),a};const H_=null;function yc(n){return pt.isPlainObject(n)||pt.isArray(n)}function Of(n){return pt.endsWith(n,"[]")?n.slice(0,-2):n}function $f(n,t,e){return n?n.concat(t).map(function(r,i){return r=Of(r),!e&&i?"["+r+"]":r}).join(e?".":""):t}function q_(n){return pt.isArray(n)&&!n.some(yc)}const Y_=pt.toFlatObject(pt,{},null,function(n){return/^is[A-Z]/.test(n)});function No(n,t,e){if(!pt.isObject(n))throw new TypeError("target must be an object");t=t||new FormData,e=pt.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(u,p){return!pt.isUndefined(p[u])});const r=e.metaTokens,i=e.visitor||c,s=e.dots,a=e.indexes,o=(e.Blob||typeof Blob<"u"&&Blob)&&pt.isSpecCompliantForm(t);if(!pt.isFunction(i))throw new TypeError("visitor must be a function");function l(u){if(u===null)return"";if(pt.isDate(u))return u.toISOString();if(!o&&pt.isBlob(u))throw new oe("Blob is not supported. Use a Buffer instead.");return pt.isArrayBuffer(u)||pt.isTypedArray(u)?o&&typeof Blob=="function"?new Blob([u]):Buffer.from(u):u}function c(u,p,v){let _=u;if(u&&!v&&typeof u=="object"){if(pt.endsWith(p,"{}"))p=r?p:p.slice(0,-2),u=JSON.stringify(u);else if(pt.isArray(u)&&q_(u)||(pt.isFileList(u)||pt.endsWith(p,"[]"))&&(_=pt.toArray(u)))return p=Of(p),_.forEach(function(x,b){!(pt.isUndefined(x)||x===null)&&t.append(a===!0?$f([p],b,s):a===null?p:p+"[]",l(x))}),!1}return yc(u)?!0:(t.append($f(v,p,s),l(u)),!1)}const h=[],f=Object.assign(Y_,{defaultVisitor:c,convertValue:l,isVisitable:yc});function d(u,p){if(!pt.isUndefined(u)){if(h.indexOf(u)!==-1)throw Error("Circular reference detected in "+p.join("."));h.push(u),pt.forEach(u,function(v,_){(!(pt.isUndefined(v)||v===null)&&i.call(t,v,pt.isString(_)?_.trim():_,p,f))===!0&&d(v,p?p.concat(_):[_])}),h.pop()}}if(!pt.isObject(n))throw new TypeError("data must be an object");return d(n),t}function Nf(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function _c(n,t){this._pairs=[],n&&No(n,this,t)}const Ff=_c.prototype;Ff.append=function(n,t){this._pairs.push([n,t])},Ff.toString=function(n){const t=n?function(e){return n.call(this,e,Nf)}:Nf;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};function K_(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Rf(n,t,e){if(!t)return n;const r=e&&e.encode||K_,i=e&&e.serialize;let s;if(i?s=i(t,e):s=pt.isURLSearchParams(t)?t.toString():new _c(t,e).toString(r),s){const a=n.indexOf("#");a!==-1&&(n=n.slice(0,a)),n+=(n.indexOf("?")===-1?"?":"&")+s}return n}class X_{constructor(){this.handlers=[]}use(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){pt.forEach(this.handlers,function(e){e!==null&&t(e)})}}const Mf=X_,Df={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},J_=typeof URLSearchParams<"u"?URLSearchParams:_c,Q_=typeof FormData<"u"?FormData:null,Z_=typeof Blob<"u"?Blob:null,W_=(()=>{let n;return typeof navigator<"u"&&((n=navigator.product)==="ReactNative"||n==="NativeScript"||n==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),tb=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",hr={isBrowser:!0,classes:{URLSearchParams:J_,FormData:Q_,Blob:Z_},isStandardBrowserEnv:W_,isStandardBrowserWebWorkerEnv:tb,protocols:["http","https","file","blob","url","data"]};function eb(n,t){return No(n,new hr.classes.URLSearchParams,Object.assign({visitor:function(e,r,i,s){return hr.isNode&&pt.isBuffer(e)?(this.append(r,e.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function nb(n){return pt.matchAll(/\w+|\[(\w*)]/g,n).map(t=>t[0]==="[]"?"":t[1]||t[0])}function rb(n){const t={},e=Object.keys(n);let r;const i=e.length;let s;for(r=0;r<i;r++)s=e[r],t[s]=n[s];return t}function If(n){function t(e,r,i,s){let a=e[s++];const o=Number.isFinite(+a),l=s>=e.length;return a=!a&&pt.isArray(i)?i.length:a,l?(pt.hasOwnProp(i,a)?i[a]=[i[a],r]:i[a]=r,!o):((!i[a]||!pt.isObject(i[a]))&&(i[a]=[]),t(e,r,i[a],s)&&pt.isArray(i[a])&&(i[a]=rb(i[a])),!o)}if(pt.isFormData(n)&&pt.isFunction(n.entries)){const e={};return pt.forEachEntry(n,(r,i)=>{t(nb(r),i,e,0)}),e}return null}function ib(n,t,e){if(pt.isString(n))try{return(t||JSON.parse)(n),pt.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(e||JSON.stringify)(n)}const bc={transitional:Df,adapter:["xhr","http"],transformRequest:[function(n,t){const e=t.getContentType()||"",r=e.indexOf("application/json")>-1,i=pt.isObject(n);if(i&&pt.isHTMLForm(n)&&(n=new FormData(n)),pt.isFormData(n))return r&&r?JSON.stringify(If(n)):n;if(pt.isArrayBuffer(n)||pt.isBuffer(n)||pt.isStream(n)||pt.isFile(n)||pt.isBlob(n))return n;if(pt.isArrayBufferView(n))return n.buffer;if(pt.isURLSearchParams(n))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let s;if(i){if(e.indexOf("application/x-www-form-urlencoded")>-1)return eb(n,this.formSerializer).toString();if((s=pt.isFileList(n))||e.indexOf("multipart/form-data")>-1){const a=this.env&&this.env.FormData;return No(s?{"files[]":n}:n,a&&new a,this.formSerializer)}}return i||r?(t.setContentType("application/json",!1),ib(n)):n}],transformResponse:[function(n){const t=this.transitional||bc.transitional,e=t&&t.forcedJSONParsing,r=this.responseType==="json";if(n&&pt.isString(n)&&(e&&!this.responseType||r)){const i=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(n)}catch(s){if(i)throw s.name==="SyntaxError"?oe.from(s,oe.ERR_BAD_RESPONSE,this,null,this.response):s}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:hr.classes.FormData,Blob:hr.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};pt.forEach(["delete","get","head","post","put","patch"],n=>{bc.headers[n]={}});const wc=bc,sb=pt.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ab=n=>{const t={};let e,r,i;return n&&n.split(`
11
+ `).forEach(function(s){i=s.indexOf(":"),e=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!e||t[e]&&sb[e])&&(e==="set-cookie"?t[e]?t[e].push(r):t[e]=[r]:t[e]=t[e]?t[e]+", "+r:r)}),t},jf=Symbol("internals");function Ns(n){return n&&String(n).trim().toLowerCase()}function Fo(n){return n===!1||n==null?n:pt.isArray(n)?n.map(Fo):String(n)}function ob(n){const t=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=e.exec(n);)t[r[1]]=r[2];return t}const lb=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function xc(n,t,e,r,i){if(pt.isFunction(r))return r.call(this,t,e);if(i&&(t=e),!!pt.isString(t)){if(pt.isString(r))return t.indexOf(r)!==-1;if(pt.isRegExp(r))return r.test(t)}}function cb(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,r)=>e.toUpperCase()+r)}function hb(n,t){const e=pt.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(n,r+e,{value:function(i,s,a){return this[r].call(this,t,i,s,a)},configurable:!0})})}class Ro{constructor(t){t&&this.set(t)}set(t,e,r){const i=this;function s(o,l,c){const h=Ns(l);if(!h)throw new Error("header name must be a non-empty string");const f=pt.findKey(i,h);(!f||i[f]===void 0||c===!0||c===void 0&&i[f]!==!1)&&(i[f||l]=Fo(o))}const a=(o,l)=>pt.forEach(o,(c,h)=>s(c,h,l));return pt.isPlainObject(t)||t instanceof this.constructor?a(t,e):pt.isString(t)&&(t=t.trim())&&!lb(t)?a(ab(t),e):t!=null&&s(e,t,r),this}get(t,e){if(t=Ns(t),t){const r=pt.findKey(this,t);if(r){const i=this[r];if(!e)return i;if(e===!0)return ob(i);if(pt.isFunction(e))return e.call(this,i,r);if(pt.isRegExp(e))return e.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Ns(t),t){const r=pt.findKey(this,t);return!!(r&&this[r]!==void 0&&(!e||xc(this,this[r],r,e)))}return!1}delete(t,e){const r=this;let i=!1;function s(a){if(a=Ns(a),a){const o=pt.findKey(r,a);o&&(!e||xc(r,r[o],o,e))&&(delete r[o],i=!0)}}return pt.isArray(t)?t.forEach(s):s(t),i}clear(t){const e=Object.keys(this);let r=e.length,i=!1;for(;r--;){const s=e[r];(!t||xc(this,this[s],s,t,!0))&&(delete this[s],i=!0)}return i}normalize(t){const e=this,r={};return pt.forEach(this,(i,s)=>{const a=pt.findKey(r,s);if(a){e[a]=Fo(i),delete e[s];return}const o=t?cb(s):String(s).trim();o!==s&&delete e[s],e[o]=Fo(i),r[o]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return pt.forEach(this,(r,i)=>{r!=null&&r!==!1&&(e[i]=t&&pt.isArray(r)?r.join(", "):r)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
12
+ `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const r=new this(t);return e.forEach(i=>r.set(i)),r}static accessor(t){const e=(this[jf]=this[jf]={accessors:{}}).accessors,r=this.prototype;function i(s){const a=Ns(s);e[a]||(hb(r,s),e[a]=!0)}return pt.isArray(t)?t.forEach(i):i(t),this}}Ro.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),pt.reduceDescriptors(Ro.prototype,({value:n},t)=>{let e=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(r){this[e]=r}}}),pt.freezeMethods(Ro);const Sr=Ro;function Sc(n,t){const e=this||wc,r=t||e,i=Sr.from(r.headers);let s=r.data;return pt.forEach(n,function(a){s=a.call(e,s,i.normalize(),t?t.status:void 0)}),i.normalize(),s}function Lf(n){return!!(n&&n.__CANCEL__)}function Fs(n,t,e){oe.call(this,n??"canceled",oe.ERR_CANCELED,t,e),this.name="CanceledError"}pt.inherits(Fs,oe,{__CANCEL__:!0});function ub(n,t,e){const r=e.config.validateStatus;!e.status||!r||r(e.status)?n(e):t(new oe("Request failed with status code "+e.status,[oe.ERR_BAD_REQUEST,oe.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}const db=hr.isStandardBrowserEnv?function(){return{write:function(n,t,e,r,i,s){const a=[];a.push(n+"="+encodeURIComponent(t)),pt.isNumber(e)&&a.push("expires="+new Date(e).toGMTString()),pt.isString(r)&&a.push("path="+r),pt.isString(i)&&a.push("domain="+i),s===!0&&a.push("secure"),document.cookie=a.join("; ")},read:function(n){const t=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function fb(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function pb(n,t){return t?n.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):n}function Uf(n,t){return n&&!fb(t)?pb(n,t):t}const gb=hr.isStandardBrowserEnv?function(){const n=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let e;function r(i){let s=i;return n&&(t.setAttribute("href",s),s=t.href),t.setAttribute("href",s),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:t.pathname.charAt(0)==="/"?t.pathname:"/"+t.pathname}}return e=r(window.location.href),function(i){const s=pt.isString(i)?r(i):i;return s.protocol===e.protocol&&s.host===e.host}}():function(){return function(){return!0}}();function mb(n){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return t&&t[1]||""}function vb(n,t){n=n||10;const e=new Array(n),r=new Array(n);let i=0,s=0,a;return t=t!==void 0?t:1e3,function(o){const l=Date.now(),c=r[s];a||(a=l),e[i]=o,r[i]=l;let h=s,f=0;for(;h!==i;)f+=e[h++],h=h%n;if(i=(i+1)%n,i===s&&(s=(s+1)%n),l-a<t)return;const d=c&&l-c;return d?Math.round(f*1e3/d):void 0}}function Gf(n,t){let e=0;const r=vb(50,250);return i=>{const s=i.loaded,a=i.lengthComputable?i.total:void 0,o=s-e,l=r(o),c=s<=a;e=s;const h={loaded:s,total:a,progress:a?s/a:void 0,bytes:o,rate:l||void 0,estimated:l&&a&&c?(a-s)/l:void 0,event:i};h[t?"download":"upload"]=!0,n(h)}}const yb=typeof XMLHttpRequest<"u",_b=yb&&function(n){return new Promise(function(t,e){let r=n.data;const i=Sr.from(n.headers).normalize(),s=n.responseType;let a;function o(){n.cancelToken&&n.cancelToken.unsubscribe(a),n.signal&&n.signal.removeEventListener("abort",a)}let l;pt.isFormData(r)&&(hr.isStandardBrowserEnv||hr.isStandardBrowserWebWorkerEnv?i.setContentType(!1):i.getContentType(/^\s*multipart\/form-data/)?pt.isString(l=i.getContentType())&&i.setContentType(l.replace(/^\s*(multipart\/form-data);+/,"$1")):i.setContentType("multipart/form-data"));let c=new XMLHttpRequest;if(n.auth){const u=n.auth.username||"",p=n.auth.password?unescape(encodeURIComponent(n.auth.password)):"";i.set("Authorization","Basic "+btoa(u+":"+p))}const h=Uf(n.baseURL,n.url);c.open(n.method.toUpperCase(),Rf(h,n.params,n.paramsSerializer),!0),c.timeout=n.timeout;function f(){if(!c)return;const u=Sr.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),p={data:!s||s==="text"||s==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:u,config:n,request:c};ub(function(v){t(v),o()},function(v){e(v),o()},p),c=null}if("onloadend"in c?c.onloadend=f:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(f)},c.onabort=function(){c&&(e(new oe("Request aborted",oe.ECONNABORTED,n,c)),c=null)},c.onerror=function(){e(new oe("Network Error",oe.ERR_NETWORK,n,c)),c=null},c.ontimeout=function(){let u=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const p=n.transitional||Df;n.timeoutErrorMessage&&(u=n.timeoutErrorMessage),e(new oe(u,p.clarifyTimeoutError?oe.ETIMEDOUT:oe.ECONNABORTED,n,c)),c=null},hr.isStandardBrowserEnv){const u=(n.withCredentials||gb(h))&&n.xsrfCookieName&&db.read(n.xsrfCookieName);u&&i.set(n.xsrfHeaderName,u)}r===void 0&&i.setContentType(null),"setRequestHeader"in c&&pt.forEach(i.toJSON(),function(u,p){c.setRequestHeader(p,u)}),pt.isUndefined(n.withCredentials)||(c.withCredentials=!!n.withCredentials),s&&s!=="json"&&(c.responseType=n.responseType),typeof n.onDownloadProgress=="function"&&c.addEventListener("progress",Gf(n.onDownloadProgress,!0)),typeof n.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",Gf(n.onUploadProgress)),(n.cancelToken||n.signal)&&(a=u=>{c&&(e(!u||u.type?new Fs(null,n,c):u),c.abort(),c=null)},n.cancelToken&&n.cancelToken.subscribe(a),n.signal&&(n.signal.aborted?a():n.signal.addEventListener("abort",a)));const d=mb(h);if(d&&hr.protocols.indexOf(d)===-1){e(new oe("Unsupported protocol "+d+":",oe.ERR_BAD_REQUEST,n));return}c.send(r||null)})},kc={http:H_,xhr:_b};pt.forEach(kc,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{value:t})}catch{}Object.defineProperty(n,"adapterName",{value:t})}});const zf=n=>`- ${n}`,bb=n=>pt.isFunction(n)||n===null||n===!1,Vf={getAdapter:n=>{n=pt.isArray(n)?n:[n];const{length:t}=n;let e,r;const i={};for(let s=0;s<t;s++){e=n[s];let a;if(r=e,!bb(e)&&(r=kc[(a=String(e)).toLowerCase()],r===void 0))throw new oe(`Unknown adapter '${a}'`);if(r)break;i[a||"#"+s]=r}if(!r){const s=Object.entries(i).map(([o,l])=>`adapter ${o} `+(l===!1?"is not supported by the environment":"is not available in the build"));let a=t?s.length>1?`since :
13
+ `+s.map(zf).join(`
14
+ `):" "+zf(s[0]):"as no adapter specified";throw new oe("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:kc};function Cc(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new Fs(null,n)}function Bf(n){return Cc(n),n.headers=Sr.from(n.headers),n.data=Sc.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Vf.getAdapter(n.adapter||wc.adapter)(n).then(function(t){return Cc(n),t.data=Sc.call(n,n.transformResponse,t),t.headers=Sr.from(t.headers),t},function(t){return Lf(t)||(Cc(n),t&&t.response&&(t.response.data=Sc.call(n,n.transformResponse,t.response),t.response.headers=Sr.from(t.response.headers))),Promise.reject(t)})}const Hf=n=>n instanceof Sr?n.toJSON():n;function Qi(n,t){t=t||{};const e={};function r(c,h,f){return pt.isPlainObject(c)&&pt.isPlainObject(h)?pt.merge.call({caseless:f},c,h):pt.isPlainObject(h)?pt.merge({},h):pt.isArray(h)?h.slice():h}function i(c,h,f){if(pt.isUndefined(h)){if(!pt.isUndefined(c))return r(void 0,c,f)}else return r(c,h,f)}function s(c,h){if(!pt.isUndefined(h))return r(void 0,h)}function a(c,h){if(pt.isUndefined(h)){if(!pt.isUndefined(c))return r(void 0,c)}else return r(void 0,h)}function o(c,h,f){if(f in t)return r(c,h);if(f in n)return r(void 0,c)}const l={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:o,headers:(c,h)=>i(Hf(c),Hf(h),!0)};return pt.forEach(Object.keys(Object.assign({},n,t)),function(c){const h=l[c]||i,f=h(n[c],t[c],c);pt.isUndefined(f)&&h!==o||(e[c]=f)}),e}const qf="1.5.1",Tc={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{Tc[n]=function(e){return typeof e===n||"a"+(t<1?"n ":" ")+n}});const Yf={};Tc.transitional=function(n,t,e){function r(i,s){return"[Axios v"+qf+"] Transitional option '"+i+"'"+s+(e?". "+e:"")}return(i,s,a)=>{if(n===!1)throw new oe(r(s," has been removed"+(t?" in "+t:"")),oe.ERR_DEPRECATED);return t&&!Yf[s]&&(Yf[s]=!0,console.warn(r(s," has been deprecated since v"+t+" and will be removed in the near future"))),n?n(i,s,a):!0}};function wb(n,t,e){if(typeof n!="object")throw new oe("options must be an object",oe.ERR_BAD_OPTION_VALUE);const r=Object.keys(n);let i=r.length;for(;i-- >0;){const s=r[i],a=t[s];if(a){const o=n[s],l=o===void 0||a(o,s,n);if(l!==!0)throw new oe("option "+s+" must be "+l,oe.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new oe("Unknown option "+s,oe.ERR_BAD_OPTION)}}const Ec={assertOptions:wb,validators:Tc},Jr=Ec.validators;class Mo{constructor(t){this.defaults=t,this.interceptors={request:new Mf,response:new Mf}}request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=Qi(this.defaults,e);const{transitional:r,paramsSerializer:i,headers:s}=e;r!==void 0&&Ec.assertOptions(r,{silentJSONParsing:Jr.transitional(Jr.boolean),forcedJSONParsing:Jr.transitional(Jr.boolean),clarifyTimeoutError:Jr.transitional(Jr.boolean)},!1),i!=null&&(pt.isFunction(i)?e.paramsSerializer={serialize:i}:Ec.assertOptions(i,{encode:Jr.function,serialize:Jr.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let a=s&&pt.merge(s.common,s[e.method]);s&&pt.forEach(["delete","get","head","post","put","patch","common"],p=>{delete s[p]}),e.headers=Sr.concat(a,s);const o=[];let l=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(e)===!1||(l=l&&p.synchronous,o.unshift(p.fulfilled,p.rejected))});const c=[];this.interceptors.response.forEach(function(p){c.push(p.fulfilled,p.rejected)});let h,f=0,d;if(!l){const p=[Bf.bind(this),void 0];for(p.unshift.apply(p,o),p.push.apply(p,c),d=p.length,h=Promise.resolve(e);f<d;)h=h.then(p[f++],p[f++]);return h}d=o.length;let u=e;for(f=0;f<d;){const p=o[f++],v=o[f++];try{u=p(u)}catch(_){v.call(this,_);break}}try{h=Bf.call(this,u)}catch(p){return Promise.reject(p)}for(f=0,d=c.length;f<d;)h=h.then(c[f++],c[f++]);return h}getUri(t){t=Qi(this.defaults,t);const e=Uf(t.baseURL,t.url);return Rf(e,t.params,t.paramsSerializer)}}pt.forEach(["delete","get","head","options"],function(n){Mo.prototype[n]=function(t,e){return this.request(Qi(e||{},{method:n,url:t,data:(e||{}).data}))}}),pt.forEach(["post","put","patch"],function(n){function t(e){return function(r,i,s){return this.request(Qi(s||{},{method:n,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:i}))}}Mo.prototype[n]=t(),Mo.prototype[n+"Form"]=t(!0)});const Do=Mo;class Pc{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(i){e=i});const r=this;this.promise.then(i=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](i);r._listeners=null}),this.promise.then=i=>{let s;const a=new Promise(o=>{r.subscribe(o),s=o}).then(i);return a.cancel=function(){r.unsubscribe(s)},a},t(function(i,s,a){r.reason||(r.reason=new Fs(i,s,a),e(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);e!==-1&&this._listeners.splice(e,1)}static source(){let t;return{token:new Pc(function(e){t=e}),cancel:t}}}const xb=Pc;function Sb(n){return function(t){return n.apply(null,t)}}function kb(n){return pt.isObject(n)&&n.isAxiosError===!0}const Ac={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ac).forEach(([n,t])=>{Ac[t]=n});const Cb=Ac;function Kf(n){const t=new Do(n),e=yf(Do.prototype.request,t);return pt.extend(e,Do.prototype,t,{allOwnKeys:!0}),pt.extend(e,t,null,{allOwnKeys:!0}),e.create=function(r){return Kf(Qi(n,r))},e}const He=Kf(wc);He.Axios=Do,He.CanceledError=Fs,He.CancelToken=xb,He.isCancel=Lf,He.VERSION=qf,He.toFormData=No,He.AxiosError=oe,He.Cancel=He.CanceledError,He.all=function(n){return Promise.all(n)},He.spread=Sb,He.isAxiosError=kb,He.mergeConfig=Qi,He.AxiosHeaders=Sr,He.formToJSON=n=>If(pt.isHTMLForm(n)?new FormData(n):n),He.getAdapter=Vf.getAdapter,He.HttpStatusCode=Cb,He.default=He;var Oc=function(n,t){return Oc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])},Oc(n,t)};function Qr(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Oc(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function $c(n){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&n[t],r=0;if(e)return e.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&r>=n.length&&(n=void 0),{value:n&&n[r++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Rs(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),i,s=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(a)throw a.error}}return s}function Ms(n,t,e){if(arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return n.concat(s||Array.prototype.slice.call(t))}function kr(n){return typeof n=="function"}function Nc(n){var t=function(r){Error.call(r),r.stack=new Error().stack},e=n(t);return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var Fc=Nc(function(n){return function(t){n(this),this.message=t?t.length+` errors occurred during unsubscription:
15
15
  `+t.map(function(e,r){return r+1+") "+e.toString()}).join(`
16
- `):"",this.name="UnsubscriptionError",this.errors=t}});function $o(n,t){if(n){var e=n.indexOf(t);0<=e&&n.splice(e,1)}}var Fs=function(){function n(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return n.prototype.unsubscribe=function(){var t,e,r,i,s;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var o=bh(a),h=o.next();!h.done;h=o.next()){var l=h.value;l.remove(this)}}catch(v){t={error:v}}finally{try{h&&!h.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}else a.remove(this);var c=this.initialTeardown;if(xr(c))try{c()}catch(v){s=v instanceof kh?v.errors:[v]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var d=bh(f),u=d.next();!u.done;u=d.next()){var p=u.value;try{Gf(p)}catch(v){s=s??[],v instanceof kh?s=$s($s([],Os(s)),Os(v.errors)):s.push(v)}}}catch(v){r={error:v}}finally{try{u&&!u.done&&(i=d.return)&&i.call(d)}finally{if(r)throw r.error}}}if(s)throw new kh(s)}},n.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)Gf(t);else{if(t instanceof n){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}},n.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},n.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},n.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&$o(e,t)},n.prototype.remove=function(t){var e=this._finalizers;e&&$o(e,t),t instanceof n&&t._removeParent(this)},n.EMPTY=function(){var t=new n;return t.closed=!0,t}(),n}(),Lf=Fs.EMPTY;function Uf(n){return n instanceof Fs||n&&"closed"in n&&xr(n.remove)&&xr(n.add)&&xr(n.unsubscribe)}function Gf(n){xr(n)?n():n.unsubscribe()}var zf={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},gw={setTimeout:function(n,t){for(var e=[],r=2;r<arguments.length;r++)e[r-2]=arguments[r];return setTimeout.apply(void 0,$s([n,t],Os(e)))},clearTimeout:function(n){return clearTimeout(n)},delegate:void 0};function mw(n){gw.setTimeout(function(){throw n})}function Vf(){}function Fo(n){n()}var Ch=function(n){Kr(t,n);function t(e){var r=n.call(this)||this;return r.isStopped=!1,e?(r.destination=e,Uf(e)&&e.add(r)):r.destination=ww,r}return t.create=function(e,r,i){return new Ph(e,r,i)},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,n.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(Fs),yw=Function.prototype.bind;function Th(n,t){return yw.call(n,t)}var vw=function(){function n(t){this.partialObserver=t}return n.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(r){No(r)}},n.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(r){No(r)}else No(t)},n.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(e){No(e)}},n}(),Ph=function(n){Kr(t,n);function t(e,r,i){var s=n.call(this)||this,a;if(xr(e)||!e)a={next:e??void 0,error:r??void 0,complete:i??void 0};else{var o;s&&zf.useDeprecatedNextContext?(o=Object.create(e),o.unsubscribe=function(){return s.unsubscribe()},a={next:e.next&&Th(e.next,o),error:e.error&&Th(e.error,o),complete:e.complete&&Th(e.complete,o)}):a=e}return s.destination=new vw(a),s}return t}(Ch);function No(n){mw(n)}function _w(n){throw n}var ww={closed:!0,next:Vf,error:_w,complete:Vf},xw=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function bw(n){return n}function Sw(n){return n.length===0?bw:n.length===1?n[0]:function(t){return n.reduce(function(e,r){return r(e)},t)}}var Bf=function(){function n(t){t&&(this._subscribe=t)}return n.prototype.lift=function(t){var e=new n;return e.source=this,e.operator=t,e},n.prototype.subscribe=function(t,e,r){var i=this,s=Cw(t)?t:new Ph(t,e,r);return Fo(function(){var a=i,o=a.operator,h=a.source;s.add(o?o.call(s,h):h?i._subscribe(s):i._trySubscribe(s))}),s},n.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},n.prototype.forEach=function(t,e){var r=this;return e=Hf(e),new e(function(i,s){var a=new Ph({next:function(o){try{t(o)}catch(h){s(h),a.unsubscribe()}},error:s,complete:i});r.subscribe(a)})},n.prototype._subscribe=function(t){var e;return(e=this.source)===null||e===void 0?void 0:e.subscribe(t)},n.prototype[xw]=function(){return this},n.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Sw(t)(this)},n.prototype.toPromise=function(t){var e=this;return t=Hf(t),new t(function(r,i){var s;e.subscribe(function(a){return s=a},function(a){return i(a)},function(){return r(s)})})},n.create=function(t){return new n(t)},n}();function Hf(n){var t;return(t=n??zf.Promise)!==null&&t!==void 0?t:Promise}function kw(n){return n&&xr(n.next)&&xr(n.error)&&xr(n.complete)}function Cw(n){return n&&n instanceof Ch||kw(n)&&Uf(n)}(function(n){Kr(t,n);function t(e,r,i,s,a,o){var h=n.call(this,e)||this;return h.onFinalize=a,h.shouldUnsubscribe=o,h._next=r?function(l){try{r(l)}catch(c){e.error(c)}}:n.prototype._next,h._error=s?function(l){try{s(l)}catch(c){e.error(c)}finally{this.unsubscribe()}}:n.prototype._error,h._complete=i?function(){try{i()}catch(l){e.error(l)}finally{this.unsubscribe()}}:n.prototype._complete,h}return t.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;n.prototype.unsubscribe.call(this),!r&&((e=this.onFinalize)===null||e===void 0||e.call(this))}},t})(Ch);var Tw=Sh(function(n){return function(){n(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Pw=function(n){Kr(t,n);function t(){var e=n.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return t.prototype.lift=function(e){var r=new qf(this,this);return r.operator=e,r},t.prototype._throwIfClosed=function(){if(this.closed)throw new Tw},t.prototype.next=function(e){var r=this;Fo(function(){var i,s;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=bh(r.currentObservers),o=a.next();!o.done;o=a.next()){var h=o.value;h.next(e)}}catch(l){i={error:l}}finally{try{o&&!o.done&&(s=a.return)&&s.call(a)}finally{if(i)throw i.error}}}})},t.prototype.error=function(e){var r=this;Fo(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=e;for(var i=r.observers;i.length;)i.shift().error(e)}})},t.prototype.complete=function(){var e=this;Fo(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var r=e.observers;r.length;)r.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return((e=this.observers)===null||e===void 0?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(e){return this._throwIfClosed(),n.prototype._trySubscribe.call(this,e)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var r=this,i=this,s=i.hasError,a=i.isStopped,o=i.observers;return s||a?Lf:(this.currentObservers=null,o.push(e),new Fs(function(){r.currentObservers=null,$o(o,e)}))},t.prototype._checkFinalizedStatuses=function(e){var r=this,i=r.hasError,s=r.thrownError,a=r.isStopped;i?e.error(s):a&&e.complete()},t.prototype.asObservable=function(){var e=new Bf;return e.source=this,e},t.create=function(e,r){return new qf(e,r)},t}(Bf),qf=function(n){Kr(t,n);function t(e,r){var i=n.call(this)||this;return i.destination=e,i.source=r,i}return t.prototype.next=function(e){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,e)},t.prototype.error=function(e){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,e)},t.prototype.complete=function(){var e,r;(r=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||r===void 0||r.call(e)},t.prototype._subscribe=function(e){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(e))!==null&&i!==void 0?i:Lf},t}(Pw),Ew={now:function(){return Date.now()},delegate:void 0},Aw=function(n){Kr(t,n);function t(e,r){return n.call(this)||this}return t.prototype.schedule=function(e,r){return this},t}(Fs),Eh={setInterval:function(n,t){for(var e=[],r=2;r<arguments.length;r++)e[r-2]=arguments[r];var i=Eh.delegate;return i!=null&&i.setInterval?i.setInterval.apply(i,$s([n,t],Os(e))):setInterval.apply(void 0,$s([n,t],Os(e)))},clearInterval:function(n){return clearInterval(n)},delegate:void 0},Ow=function(n){Kr(t,n);function t(e,r){var i=n.call(this,e,r)||this;return i.scheduler=e,i.work=r,i.pending=!1,i}return t.prototype.schedule=function(e,r){var i;if(r===void 0&&(r=0),this.closed)return this;this.state=e;var s=this.id,a=this.scheduler;return s!=null&&(this.id=this.recycleAsyncId(a,s,r)),this.pending=!0,this.delay=r,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(a,this.id,r),this},t.prototype.requestAsyncId=function(e,r,i){return i===void 0&&(i=0),Eh.setInterval(e.flush.bind(e,this),i)},t.prototype.recycleAsyncId=function(e,r,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return r;r!=null&&Eh.clearInterval(r)},t.prototype.execute=function(e,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(e,r);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,r){var i=!1,s;try{this.work(e)}catch(a){i=!0,s=a||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),s},t.prototype.unsubscribe=function(){if(!this.closed){var e=this,r=e.id,i=e.scheduler,s=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,$o(s,this),r!=null&&(this.id=this.recycleAsyncId(i,r,null)),this.delay=null,n.prototype.unsubscribe.call(this)}},t}(Aw),Kf=function(){function n(t,e){e===void 0&&(e=n.now),this.schedulerActionCtor=t,this.now=e}return n.prototype.schedule=function(t,e,r){return e===void 0&&(e=0),new this.schedulerActionCtor(this,t).schedule(r,e)},n.now=Ew.now,n}(),$w=function(n){Kr(t,n);function t(e,r){r===void 0&&(r=Kf.now);var i=n.call(this,e,r)||this;return i.actions=[],i._active=!1,i}return t.prototype.flush=function(e){var r=this.actions;if(this._active){r.push(e);return}var i;this._active=!0;do if(i=e.execute(e.state,e.delay))break;while(e=r.shift());if(this._active=!1,i){for(;e=r.shift();)e.unsubscribe();throw i}},t}(Kf);new $w(Ow);function Fw(n){switch(n.responseType){case"json":{if("response"in n)return n.response;var t=n;return JSON.parse(t.responseText)}case"document":return n.responseXML;case"text":default:{if("response"in n)return n.response;var t=n;return t.responseText}}}var Yf=Sh(function(n){return function(t,e,r){this.message=t,this.name="AjaxError",this.xhr=e,this.request=r,this.status=e.status,this.responseType=e.responseType;var i;try{i=Fw(e)}catch{i=e.responseText}this.response=i}});(function(){function n(t,e){return Yf.call(this,"ajax timeout",t,e),this.name="AjaxTimeoutError",this}return n.prototype=Object.create(Yf.prototype),n})();var Nw=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function pn(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function Et(n){if(n.__esModule)return n;var t=n.default;if(typeof t=="function"){var e=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};e.prototype=t.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(n).forEach(function(r){var i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(e,r,i.get?i:{enumerable:!0,get:function(){return n[r]}})}),e}var Ah={exports:{}},Yi=typeof Reflect=="object"?Reflect:null,Xf=Yi&&typeof Yi.apply=="function"?Yi.apply:function(n,t,e){return Function.prototype.apply.call(n,t,e)},Ro;Yi&&typeof Yi.ownKeys=="function"?Ro=Yi.ownKeys:Object.getOwnPropertySymbols?Ro=function(n){return Object.getOwnPropertyNames(n).concat(Object.getOwnPropertySymbols(n))}:Ro=function(n){return Object.getOwnPropertyNames(n)};function Rw(n){console&&console.warn&&console.warn(n)}var Jf=Number.isNaN||function(n){return n!==n};function ye(){ye.init.call(this)}Ah.exports=ye,Ah.exports.once=jw,ye.EventEmitter=ye,ye.prototype._events=void 0,ye.prototype._eventsCount=0,ye.prototype._maxListeners=void 0;var Qf=10;function Do(n){if(typeof n!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof n)}Object.defineProperty(ye,"defaultMaxListeners",{enumerable:!0,get:function(){return Qf},set:function(n){if(typeof n!="number"||n<0||Jf(n))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+n+".");Qf=n}}),ye.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},ye.prototype.setMaxListeners=function(n){if(typeof n!="number"||n<0||Jf(n))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+n+".");return this._maxListeners=n,this};function Zf(n){return n._maxListeners===void 0?ye.defaultMaxListeners:n._maxListeners}ye.prototype.getMaxListeners=function(){return Zf(this)},ye.prototype.emit=function(n){for(var t=[],e=1;e<arguments.length;e++)t.push(arguments[e]);var r=n==="error",i=this._events;if(i!==void 0)r=r&&i.error===void 0;else if(!r)return!1;if(r){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var o=i[n];if(o===void 0)return!1;if(typeof o=="function")Xf(o,this,t);else for(var h=o.length,l=r0(o,h),e=0;e<h;++e)Xf(l[e],this,t);return!0};function Wf(n,t,e,r){var i,s,a;if(Do(e),s=n._events,s===void 0?(s=n._events=Object.create(null),n._eventsCount=0):(s.newListener!==void 0&&(n.emit("newListener",t,e.listener?e.listener:e),s=n._events),a=s[t]),a===void 0)a=s[t]=e,++n._eventsCount;else if(typeof a=="function"?a=s[t]=r?[e,a]:[a,e]:r?a.unshift(e):a.push(e),i=Zf(n),i>0&&a.length>i&&!a.warned){a.warned=!0;var o=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");o.name="MaxListenersExceededWarning",o.emitter=n,o.type=t,o.count=a.length,Rw(o)}return n}ye.prototype.addListener=function(n,t){return Wf(this,n,t,!1)},ye.prototype.on=ye.prototype.addListener,ye.prototype.prependListener=function(n,t){return Wf(this,n,t,!0)};function Dw(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function t0(n,t,e){var r={fired:!1,wrapFn:void 0,target:n,type:t,listener:e},i=Dw.bind(r);return i.listener=e,r.wrapFn=i,i}ye.prototype.once=function(n,t){return Do(t),this.on(n,t0(this,n,t)),this},ye.prototype.prependOnceListener=function(n,t){return Do(t),this.prependListener(n,t0(this,n,t)),this},ye.prototype.removeListener=function(n,t){var e,r,i,s,a;if(Do(t),r=this._events,r===void 0)return this;if(e=r[n],e===void 0)return this;if(e===t||e.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete r[n],r.removeListener&&this.emit("removeListener",n,e.listener||t));else if(typeof e!="function"){for(i=-1,s=e.length-1;s>=0;s--)if(e[s]===t||e[s].listener===t){a=e[s].listener,i=s;break}if(i<0)return this;i===0?e.shift():Mw(e,i),e.length===1&&(r[n]=e[0]),r.removeListener!==void 0&&this.emit("removeListener",n,a||t)}return this},ye.prototype.off=ye.prototype.removeListener,ye.prototype.removeAllListeners=function(n){var t,e,r;if(e=this._events,e===void 0)return this;if(e.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):e[n]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete e[n]),this;if(arguments.length===0){var i=Object.keys(e),s;for(r=0;r<i.length;++r)s=i[r],s!=="removeListener"&&this.removeAllListeners(s);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(t=e[n],typeof t=="function")this.removeListener(n,t);else if(t!==void 0)for(r=t.length-1;r>=0;r--)this.removeListener(n,t[r]);return this};function e0(n,t,e){var r=n._events;if(r===void 0)return[];var i=r[t];return i===void 0?[]:typeof i=="function"?e?[i.listener||i]:[i]:e?Iw(i):r0(i,i.length)}ye.prototype.listeners=function(n){return e0(this,n,!0)},ye.prototype.rawListeners=function(n){return e0(this,n,!1)},ye.listenerCount=function(n,t){return typeof n.listenerCount=="function"?n.listenerCount(t):n0.call(n,t)},ye.prototype.listenerCount=n0;function n0(n){var t=this._events;if(t!==void 0){var e=t[n];if(typeof e=="function")return 1;if(e!==void 0)return e.length}return 0}ye.prototype.eventNames=function(){return this._eventsCount>0?Ro(this._events):[]};function r0(n,t){for(var e=new Array(t),r=0;r<t;++r)e[r]=n[r];return e}function Mw(n,t){for(;t+1<n.length;t++)n[t]=n[t+1];n.pop()}function Iw(n){for(var t=new Array(n.length),e=0;e<t.length;++e)t[e]=n[e].listener||n[e];return t}function jw(n,t){return new Promise(function(e,r){function i(a){n.removeListener(t,s),r(a)}function s(){typeof n.removeListener=="function"&&n.removeListener("error",i),e([].slice.call(arguments))}i0(n,t,s,{once:!0}),t!=="error"&&Lw(n,i,{once:!0})})}function Lw(n,t,e){typeof n.on=="function"&&i0(n,"error",t,e)}function i0(n,t,e,r){if(typeof n.on=="function")r.once?n.once(t,e):n.on(t,e);else if(typeof n.addEventListener=="function")n.addEventListener(t,function i(s){r.once&&n.removeEventListener(t,i),e(s)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof n)}var Uw=Ah.exports;class MO extends Uw.EventEmitter{constructor(){super()}on(t,e){return super.on(t,e)}addListener(t,e){return this.on(t,e)}prependListener(t,e){return super.prependListener(t,e)}once(t,e){return super.once(t,e)}prependOnceListener(t,e){return super.prependOnceListener(t,e)}removeListener(t,e){return super.removeListener(t,e)}off(t,e){return super.off(t,e)}removeAllListeners(t){return super.removeAllListeners(t)}emit(t,...e){return super.emit(t,...e)}listeners(t){return super.listeners(t)}rawListeners(t){return super.rawListeners(t)}listenerCount(t){return super.listenerCount(t)}}var s0=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function Gw(n,t={}){var e=1,r=1;function i(it){var Y=it.match(/\n/g);Y&&(e+=Y.length);var O=it.lastIndexOf(`
17
- `);r=~O?it.length-O:r+it.length}function s(){var it={line:e,column:r};return function(Y){return Y.position=new a(it),p(),Y}}function a(it){this.start=it,this.end={line:e,column:r},this.source=t.source}a.prototype.content=n;var o=[];function h(it){var Y=new Error(t.source+":"+e+":"+r+": "+it);if(Y.reason=it,Y.filename=t.source,Y.line=e,Y.column=r,Y.source=n,t.silent)o.push(Y);else throw Y}function l(){var it=d();return{type:"stylesheet",stylesheet:{source:t.source,rules:it,parsingErrors:o}}}function c(){return u(/^{\s*/)}function f(){return u(/^}/)}function d(){var it,Y=[];for(p(),v(Y);n.length&&n.charAt(0)!="}"&&(it=bt()||xt());)it!==!1&&(Y.push(it),v(Y));return Y}function u(it){var Y=it.exec(n);if(Y){var O=Y[0];return i(O),n=n.slice(O.length),Y}}function p(){u(/^\s*/)}function v(it){var Y;for(it=it||[];Y=_();)Y!==!1&&it.push(Y);return it}function _(){var it=s();if(!(n.charAt(0)!="/"||n.charAt(1)!="*")){for(var Y=2;n.charAt(Y)!=""&&(n.charAt(Y)!="*"||n.charAt(Y+1)!="/");)++Y;if(Y+=2,n.charAt(Y-1)==="")return h("End of comment missing");var O=n.slice(2,Y-2);return r+=2,i(O),n=n.slice(Y),r+=2,it({type:"comment",comment:O})}}function S(){var it=u(/^([^{]+)/);if(it)return br(it[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(Y){return Y.replace(/,/g,"‌")}).split(/\s*(?![^(]*\)),\s*/).map(function(Y){return Y.replace(/\u200C/g,",")})}function x(){var it=s(),Y=u(/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(Y){if(Y=br(Y[0]),!u(/^:\s*/))return h("property missing ':'");var O=u(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/),E=it({type:"declaration",property:Y.replace(s0,""),value:O?br(O[0]).replace(s0,""):""});return u(/^[;\s]*/),E}}function m(){var it=[];if(!c())return h("missing '{'");v(it);for(var Y;Y=x();)Y!==!1&&(it.push(Y),v(it));return f()?it:h("missing '}'")}function k(){for(var it,Y=[],O=s();it=u(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)Y.push(it[1]),u(/^,\s*/);if(Y.length)return O({type:"keyframe",values:Y,declarations:m()})}function F(){var it=s(),Y=u(/^@([-\w]+)?keyframes\s*/);if(Y){var O=Y[1];if(Y=u(/^([-\w]+)\s*/),!Y)return h("@keyframes missing name");var E=Y[1];if(!c())return h("@keyframes missing '{'");for(var T,C=v();T=k();)C.push(T),C=C.concat(v());return f()?it({type:"keyframes",name:E,vendor:O,keyframes:C}):h("@keyframes missing '}'")}}function P(){var it=s(),Y=u(/^@supports *([^{]+)/);if(Y){var O=br(Y[1]);if(!c())return h("@supports missing '{'");var E=v().concat(d());return f()?it({type:"supports",supports:O,rules:E}):h("@supports missing '}'")}}function N(){var it=s(),Y=u(/^@host\s*/);if(Y){if(!c())return h("@host missing '{'");var O=v().concat(d());return f()?it({type:"host",rules:O}):h("@host missing '}'")}}function R(){var it=s(),Y=u(/^@media *([^{]+)/);if(Y){var O=br(Y[1]);if(!c())return h("@media missing '{'");var E=v().concat(d());return f()?it({type:"media",media:O,rules:E}):h("@media missing '}'")}}function L(){var it=s(),Y=u(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(Y)return it({type:"custom-media",name:br(Y[1]),media:br(Y[2])})}function U(){var it=s(),Y=u(/^@page */);if(Y){var O=S()||[];if(!c())return h("@page missing '{'");for(var E=v(),T;T=x();)E.push(T),E=E.concat(v());return f()?it({type:"page",selectors:O,declarations:E}):h("@page missing '}'")}}function B(){var it=s(),Y=u(/^@([-\w]+)?document *([^{]+)/);if(Y){var O=br(Y[1]),E=br(Y[2]);if(!c())return h("@document missing '{'");var T=v().concat(d());return f()?it({type:"document",document:E,vendor:O,rules:T}):h("@document missing '}'")}}function K(){var it=s(),Y=u(/^@font-face\s*/);if(Y){if(!c())return h("@font-face missing '{'");for(var O=v(),E;E=x();)O.push(E),O=O.concat(v());return f()?it({type:"font-face",declarations:O}):h("@font-face missing '}'")}}var tt=wt("import"),W=wt("charset"),lt=wt("namespace");function wt(it){var Y=new RegExp("^@"+it+"\\s*([^;]+);");return function(){var O=s(),E=u(Y);if(E){var T={type:it};return T[it]=E[1].trim(),O(T)}}}function bt(){if(n[0]=="@")return F()||R()||L()||P()||tt()||W()||lt()||B()||U()||N()||K()}function xt(){var it=s(),Y=S();return Y?(v(),it({type:"rule",selectors:Y,declarations:m()})):h("selector missing")}return Oh(l())}function br(n){return n?n.replace(/^\s+|\s+$/g,""):""}function Oh(n,t){var e=n&&typeof n.type=="string",r=e?n:t;for(var i in n){var s=n[i];Array.isArray(s)?s.forEach(function(a){Oh(a,r)}):s&&typeof s=="object"&&Oh(s,r)}return e&&Object.defineProperty(n,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),n}var $h={exports:{}},Fh={},Sr={},pi={},Nh={},Rh={},Dh={};(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.regexpCode=n.getEsmExportName=n.getProperty=n.safeStringify=n.stringify=n.strConcat=n.addCodeArg=n.str=n._=n.nil=n._Code=n.Name=n.IDENTIFIER=n._CodeOrName=void 0;class t{}n._CodeOrName=t,n.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class e extends t{constructor(x){if(super(),!n.IDENTIFIER.test(x))throw new Error("CodeGen: name must be a valid identifier");this.str=x}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}n.Name=e;class r extends t{constructor(x){super(),this._items=typeof x=="string"?[x]:x}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const x=this._items[0];return x===""||x==='""'}get str(){var x;return(x=this._str)!==null&&x!==void 0?x:this._str=this._items.reduce((m,k)=>`${m}${k}`,"")}get names(){var x;return(x=this._names)!==null&&x!==void 0?x:this._names=this._items.reduce((m,k)=>(k instanceof e&&(m[k.str]=(m[k.str]||0)+1),m),{})}}n._Code=r,n.nil=new r("");function i(S,...x){const m=[S[0]];let k=0;for(;k<x.length;)o(m,x[k]),m.push(S[++k]);return new r(m)}n._=i;const s=new r("+");function a(S,...x){const m=[u(S[0])];let k=0;for(;k<x.length;)m.push(s),o(m,x[k]),m.push(s,u(S[++k]));return h(m),new r(m)}n.str=a;function o(S,x){x instanceof r?S.push(...x._items):x instanceof e?S.push(x):S.push(f(x))}n.addCodeArg=o;function h(S){let x=1;for(;x<S.length-1;){if(S[x]===s){const m=l(S[x-1],S[x+1]);if(m!==void 0){S.splice(x-1,3,m);continue}S[x++]="+"}x++}}function l(S,x){if(x==='""')return S;if(S==='""')return x;if(typeof S=="string")return x instanceof e||S[S.length-1]!=='"'?void 0:typeof x!="string"?`${S.slice(0,-1)}${x}"`:x[0]==='"'?S.slice(0,-1)+x.slice(1):void 0;if(typeof x=="string"&&x[0]==='"'&&!(S instanceof e))return`"${S}${x.slice(1)}`}function c(S,x){return x.emptyStr()?S:S.emptyStr()?x:a`${S}${x}`}n.strConcat=c;function f(S){return typeof S=="number"||typeof S=="boolean"||S===null?S:u(Array.isArray(S)?S.join(","):S)}function d(S){return new r(u(S))}n.stringify=d;function u(S){return JSON.stringify(S).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}n.safeStringify=u;function p(S){return typeof S=="string"&&n.IDENTIFIER.test(S)?new r(`.${S}`):i`[${S}]`}n.getProperty=p;function v(S){if(typeof S=="string"&&n.IDENTIFIER.test(S))return new r(`${S}`);throw new Error(`CodeGen: invalid export name: ${S}, use explicit $id name mapping`)}n.getEsmExportName=v;function _(S){return new r(S.toString())}n.regexpCode=_})(Dh);const zw=pn(Dh),Vw=Pt({__proto__:null,default:zw},[Dh]),Ns=Et(Vw);var Mh={};(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.ValueScope=n.ValueScopeName=n.Scope=n.varKinds=n.UsedValueState=void 0;const t=Ns;class e extends Error{constructor(l){super(`CodeGen: "code" for ${l} not defined`),this.value=l.value}}var r;(function(h){h[h.Started=0]="Started",h[h.Completed=1]="Completed"})(r=n.UsedValueState||(n.UsedValueState={})),n.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class i{constructor({prefixes:l,parent:c}={}){this._names={},this._prefixes=l,this._parent=c}toName(l){return l instanceof t.Name?l:this.name(l)}name(l){return new t.Name(this._newName(l))}_newName(l){const c=this._names[l]||this._nameGroup(l);return`${l}${c.index++}`}_nameGroup(l){var c,f;if(!((f=(c=this._parent)===null||c===void 0?void 0:c._prefixes)===null||f===void 0)&&f.has(l)||this._prefixes&&!this._prefixes.has(l))throw new Error(`CodeGen: prefix "${l}" is not allowed in this scope`);return this._names[l]={prefix:l,index:0}}}n.Scope=i;class s extends t.Name{constructor(l,c){super(c),this.prefix=l}setValue(l,{property:c,itemIndex:f}){this.value=l,this.scopePath=(0,t._)`.${new t.Name(c)}[${f}]`}}n.ValueScopeName=s;const a=(0,t._)`\n`;class o extends i{constructor(l){super(l),this._values={},this._scope=l.scope,this.opts={...l,_n:l.lines?a:t.nil}}get(){return this._scope}name(l){return new s(l,this._newName(l))}value(l,c){var f;if(c.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const d=this.toName(l),{prefix:u}=d,p=(f=c.key)!==null&&f!==void 0?f:c.ref;let v=this._values[u];if(v){const x=v.get(p);if(x)return x}else v=this._values[u]=new Map;v.set(p,d);const _=this._scope[u]||(this._scope[u]=[]),S=_.length;return _[S]=c.ref,d.setValue(c,{property:u,itemIndex:S}),d}getValue(l,c){const f=this._values[l];if(f)return f.get(c)}scopeRefs(l,c=this._values){return this._reduceValues(c,f=>{if(f.scopePath===void 0)throw new Error(`CodeGen: name "${f}" has no value`);return(0,t._)`${l}${f.scopePath}`})}scopeCode(l=this._values,c,f){return this._reduceValues(l,d=>{if(d.value===void 0)throw new Error(`CodeGen: name "${d}" has no value`);return d.value.code},c,f)}_reduceValues(l,c,f={},d){let u=t.nil;for(const p in l){const v=l[p];if(!v)continue;const _=f[p]=f[p]||new Map;v.forEach(S=>{if(_.has(S))return;_.set(S,r.Started);let x=c(S);if(x){const m=this.opts.es5?n.varKinds.var:n.varKinds.const;u=(0,t._)`${u}${m} ${S} = ${x};${this.opts._n}`}else if(x=d==null?void 0:d(S))u=(0,t._)`${u}${x}${this.opts._n}`;else throw new e(S);_.set(S,r.Completed)})}return u}}n.ValueScope=o})(Mh);const Bw=pn(Mh),Hw=Pt({__proto__:null,default:Bw},[Mh]),a0=Et(Hw);(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.or=n.and=n.not=n.CodeGen=n.operators=n.varKinds=n.ValueScopeName=n.ValueScope=n.Scope=n.Name=n.regexpCode=n.stringify=n.getProperty=n.nil=n.strConcat=n.str=n._=void 0;const t=Ns,e=a0;var r=Ns;Object.defineProperty(n,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(n,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(n,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(n,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(n,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(n,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(n,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(n,"Name",{enumerable:!0,get:function(){return r.Name}});var i=a0;Object.defineProperty(n,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(n,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(n,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(n,"varKinds",{enumerable:!0,get:function(){return i.varKinds}}),n.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class s{optimizeNodes(){return this}optimizeNames(C,D){return this}}class a extends s{constructor(C,D,G){super(),this.varKind=C,this.name=D,this.rhs=G}render({es5:C,_n:D}){const G=C?e.varKinds.var:this.varKind,M=this.rhs===void 0?"":` = ${this.rhs}`;return`${G} ${this.name}${M};`+D}optimizeNames(C,D){if(C[this.name.str])return this.rhs&&(this.rhs=W(this.rhs,C,D)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class o extends s{constructor(C,D,G){super(),this.lhs=C,this.rhs=D,this.sideEffects=G}render({_n:C}){return`${this.lhs} = ${this.rhs};`+C}optimizeNames(C,D){if(!(this.lhs instanceof t.Name&&!C[this.lhs.str]&&!this.sideEffects))return this.rhs=W(this.rhs,C,D),this}get names(){const C=this.lhs instanceof t.Name?{}:{...this.lhs.names};return tt(C,this.rhs)}}class h extends o{constructor(C,D,G,M){super(C,G,M),this.op=D}render({_n:C}){return`${this.lhs} ${this.op}= ${this.rhs};`+C}}class l extends s{constructor(C){super(),this.label=C,this.names={}}render({_n:C}){return`${this.label}:`+C}}class c extends s{constructor(C){super(),this.label=C,this.names={}}render({_n:C}){return`break${this.label?` ${this.label}`:""};`+C}}class f extends s{constructor(C){super(),this.error=C}render({_n:C}){return`throw ${this.error};`+C}get names(){return this.error.names}}class d extends s{constructor(C){super(),this.code=C}render({_n:C}){return`${this.code};`+C}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(C,D){return this.code=W(this.code,C,D),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class u extends s{constructor(C=[]){super(),this.nodes=C}render(C){return this.nodes.reduce((D,G)=>D+G.render(C),"")}optimizeNodes(){const{nodes:C}=this;let D=C.length;for(;D--;){const G=C[D].optimizeNodes();Array.isArray(G)?C.splice(D,1,...G):G?C[D]=G:C.splice(D,1)}return C.length>0?this:void 0}optimizeNames(C,D){const{nodes:G}=this;let M=G.length;for(;M--;){const V=G[M];V.optimizeNames(C,D)||(lt(C,V.names),G.splice(M,1))}return G.length>0?this:void 0}get names(){return this.nodes.reduce((C,D)=>K(C,D.names),{})}}class p extends u{render(C){return"{"+C._n+super.render(C)+"}"+C._n}}class v extends u{}class _ extends p{}_.kind="else";class S extends p{constructor(C,D){super(D),this.condition=C}render(C){let D=`if(${this.condition})`+super.render(C);return this.else&&(D+="else "+this.else.render(C)),D}optimizeNodes(){super.optimizeNodes();const C=this.condition;if(C===!0)return this.nodes;let D=this.else;if(D){const G=D.optimizeNodes();D=this.else=Array.isArray(G)?new _(G):G}if(D)return C===!1?D instanceof S?D:D.nodes:this.nodes.length?this:new S(wt(C),D instanceof S?[D]:D.nodes);if(!(C===!1||!this.nodes.length))return this}optimizeNames(C,D){var G;if(this.else=(G=this.else)===null||G===void 0?void 0:G.optimizeNames(C,D),!!(super.optimizeNames(C,D)||this.else))return this.condition=W(this.condition,C,D),this}get names(){const C=super.names;return tt(C,this.condition),this.else&&K(C,this.else.names),C}}S.kind="if";class x extends p{}x.kind="for";class m extends x{constructor(C){super(),this.iteration=C}render(C){return`for(${this.iteration})`+super.render(C)}optimizeNames(C,D){if(super.optimizeNames(C,D))return this.iteration=W(this.iteration,C,D),this}get names(){return K(super.names,this.iteration.names)}}class k extends x{constructor(C,D,G,M){super(),this.varKind=C,this.name=D,this.from=G,this.to=M}render(C){const D=C.es5?e.varKinds.var:this.varKind,{name:G,from:M,to:V}=this;return`for(${D} ${G}=${M}; ${G}<${V}; ${G}++)`+super.render(C)}get names(){const C=tt(super.names,this.from);return tt(C,this.to)}}class F extends x{constructor(C,D,G,M){super(),this.loop=C,this.varKind=D,this.name=G,this.iterable=M}render(C){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(C)}optimizeNames(C,D){if(super.optimizeNames(C,D))return this.iterable=W(this.iterable,C,D),this}get names(){return K(super.names,this.iterable.names)}}class P extends p{constructor(C,D,G){super(),this.name=C,this.args=D,this.async=G}render(C){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(C)}}P.kind="func";class N extends u{render(C){return"return "+super.render(C)}}N.kind="return";class R extends p{render(C){let D="try"+super.render(C);return this.catch&&(D+=this.catch.render(C)),this.finally&&(D+=this.finally.render(C)),D}optimizeNodes(){var C,D;return super.optimizeNodes(),(C=this.catch)===null||C===void 0||C.optimizeNodes(),(D=this.finally)===null||D===void 0||D.optimizeNodes(),this}optimizeNames(C,D){var G,M;return super.optimizeNames(C,D),(G=this.catch)===null||G===void 0||G.optimizeNames(C,D),(M=this.finally)===null||M===void 0||M.optimizeNames(C,D),this}get names(){const C=super.names;return this.catch&&K(C,this.catch.names),this.finally&&K(C,this.finally.names),C}}class L extends p{constructor(C){super(),this.error=C}render(C){return`catch(${this.error})`+super.render(C)}}L.kind="catch";class U extends p{render(C){return"finally"+super.render(C)}}U.kind="finally";class B{constructor(C,D={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...D,_n:D.lines?`
18
- `:""},this._extScope=C,this._scope=new e.Scope({parent:C}),this._nodes=[new v]}toString(){return this._root.render(this.opts)}name(C){return this._scope.name(C)}scopeName(C){return this._extScope.name(C)}scopeValue(C,D){const G=this._extScope.value(C,D);return(this._values[G.prefix]||(this._values[G.prefix]=new Set)).add(G),G}getScopeValue(C,D){return this._extScope.getValue(C,D)}scopeRefs(C){return this._extScope.scopeRefs(C,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(C,D,G,M){const V=this._scope.toName(D);return G!==void 0&&M&&(this._constants[V.str]=G),this._leafNode(new a(C,V,G)),V}const(C,D,G){return this._def(e.varKinds.const,C,D,G)}let(C,D,G){return this._def(e.varKinds.let,C,D,G)}var(C,D,G){return this._def(e.varKinds.var,C,D,G)}assign(C,D,G){return this._leafNode(new o(C,D,G))}add(C,D){return this._leafNode(new h(C,n.operators.ADD,D))}code(C){return typeof C=="function"?C():C!==t.nil&&this._leafNode(new d(C)),this}object(...C){const D=["{"];for(const[G,M]of C)D.length>1&&D.push(","),D.push(G),(G!==M||this.opts.es5)&&(D.push(":"),(0,t.addCodeArg)(D,M));return D.push("}"),new t._Code(D)}if(C,D,G){if(this._blockNode(new S(C)),D&&G)this.code(D).else().code(G).endIf();else if(D)this.code(D).endIf();else if(G)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(C){return this._elseNode(new S(C))}else(){return this._elseNode(new _)}endIf(){return this._endBlockNode(S,_)}_for(C,D){return this._blockNode(C),D&&this.code(D).endFor(),this}for(C,D){return this._for(new m(C),D)}forRange(C,D,G,M,V=this.opts.es5?e.varKinds.var:e.varKinds.let){const q=this._scope.toName(C);return this._for(new k(V,q,D,G),()=>M(q))}forOf(C,D,G,M=e.varKinds.const){const V=this._scope.toName(C);if(this.opts.es5){const q=D instanceof t.Name?D:this.var("_arr",D);return this.forRange("_i",0,(0,t._)`${q}.length`,Z=>{this.var(V,(0,t._)`${q}[${Z}]`),G(V)})}return this._for(new F("of",M,V,D),()=>G(V))}forIn(C,D,G,M=this.opts.es5?e.varKinds.var:e.varKinds.const){if(this.opts.ownProperties)return this.forOf(C,(0,t._)`Object.keys(${D})`,G);const V=this._scope.toName(C);return this._for(new F("in",M,V,D),()=>G(V))}endFor(){return this._endBlockNode(x)}label(C){return this._leafNode(new l(C))}break(C){return this._leafNode(new c(C))}return(C){const D=new N;if(this._blockNode(D),this.code(C),D.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(N)}try(C,D,G){if(!D&&!G)throw new Error('CodeGen: "try" without "catch" and "finally"');const M=new R;if(this._blockNode(M),this.code(C),D){const V=this.name("e");this._currNode=M.catch=new L(V),D(V)}return G&&(this._currNode=M.finally=new U,this.code(G)),this._endBlockNode(L,U)}throw(C){return this._leafNode(new f(C))}block(C,D){return this._blockStarts.push(this._nodes.length),C&&this.code(C).endBlock(D),this}endBlock(C){const D=this._blockStarts.pop();if(D===void 0)throw new Error("CodeGen: not in self-balancing block");const G=this._nodes.length-D;if(G<0||C!==void 0&&G!==C)throw new Error(`CodeGen: wrong number of nodes: ${G} vs ${C} expected`);return this._nodes.length=D,this}func(C,D=t.nil,G,M){return this._blockNode(new P(C,D,G)),M&&this.code(M).endFunc(),this}endFunc(){return this._endBlockNode(P)}optimize(C=1){for(;C-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(C){return this._currNode.nodes.push(C),this}_blockNode(C){this._currNode.nodes.push(C),this._nodes.push(C)}_endBlockNode(C,D){const G=this._currNode;if(G instanceof C||D&&G instanceof D)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${D?`${C.kind}/${D.kind}`:C.kind}"`)}_elseNode(C){const D=this._currNode;if(!(D instanceof S))throw new Error('CodeGen: "else" without "if"');return this._currNode=D.else=C,this}get _root(){return this._nodes[0]}get _currNode(){const C=this._nodes;return C[C.length-1]}set _currNode(C){const D=this._nodes;D[D.length-1]=C}}n.CodeGen=B;function K(T,C){for(const D in C)T[D]=(T[D]||0)+(C[D]||0);return T}function tt(T,C){return C instanceof t._CodeOrName?K(T,C.names):T}function W(T,C,D){if(T instanceof t.Name)return G(T);if(!M(T))return T;return new t._Code(T._items.reduce((V,q)=>(q instanceof t.Name&&(q=G(q)),q instanceof t._Code?V.push(...q._items):V.push(q),V),[]));function G(V){const q=D[V.str];return q===void 0||C[V.str]!==1?V:(delete C[V.str],q)}function M(V){return V instanceof t._Code&&V._items.some(q=>q instanceof t.Name&&C[q.str]===1&&D[q.str]!==void 0)}}function lt(T,C){for(const D in C)T[D]=(T[D]||0)-(C[D]||0)}function wt(T){return typeof T=="boolean"||typeof T=="number"||T===null?!T:(0,t._)`!${E(T)}`}n.not=wt;const bt=O(n.operators.AND);function xt(...T){return T.reduce(bt)}n.and=xt;const it=O(n.operators.OR);function Y(...T){return T.reduce(it)}n.or=Y;function O(T){return(C,D)=>C===t.nil?D:D===t.nil?C:(0,t._)`${E(C)} ${T} ${E(D)}`}function E(T){return T instanceof t.Name?T:(0,t._)`(${T})`}})(Rh);const qw=pn(Rh),Kw=Pt({__proto__:null,default:qw},[Rh]),Zt=Et(Kw);var Ih={};(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.checkStrictMode=n.getErrorPath=n.Type=n.useFunc=n.setEvaluated=n.evaluatedPropsToName=n.mergeEvaluated=n.eachItem=n.unescapeJsonPointer=n.escapeJsonPointer=n.escapeFragment=n.unescapeFragment=n.schemaRefOrVal=n.schemaHasRulesButRef=n.schemaHasRules=n.checkUnknownRules=n.alwaysValidSchema=n.toHash=void 0;const t=Zt,e=Ns;function r(P){const N={};for(const R of P)N[R]=!0;return N}n.toHash=r;function i(P,N){return typeof N=="boolean"?N:Object.keys(N).length===0?!0:(s(P,N),!a(N,P.self.RULES.all))}n.alwaysValidSchema=i;function s(P,N=P.schema){const{opts:R,self:L}=P;if(!R.strictSchema||typeof N=="boolean")return;const U=L.RULES.keywords;for(const B in N)U[B]||F(P,`unknown keyword: "${B}"`)}n.checkUnknownRules=s;function a(P,N){if(typeof P=="boolean")return!P;for(const R in P)if(N[R])return!0;return!1}n.schemaHasRules=a;function o(P,N){if(typeof P=="boolean")return!P;for(const R in P)if(R!=="$ref"&&N.all[R])return!0;return!1}n.schemaHasRulesButRef=o;function h({topSchemaRef:P,schemaPath:N},R,L,U){if(!U){if(typeof R=="number"||typeof R=="boolean")return R;if(typeof R=="string")return(0,t._)`${R}`}return(0,t._)`${P}${N}${(0,t.getProperty)(L)}`}n.schemaRefOrVal=h;function l(P){return d(decodeURIComponent(P))}n.unescapeFragment=l;function c(P){return encodeURIComponent(f(P))}n.escapeFragment=c;function f(P){return typeof P=="number"?`${P}`:P.replace(/~/g,"~0").replace(/\//g,"~1")}n.escapeJsonPointer=f;function d(P){return P.replace(/~1/g,"/").replace(/~0/g,"~")}n.unescapeJsonPointer=d;function u(P,N){if(Array.isArray(P))for(const R of P)N(R);else N(P)}n.eachItem=u;function p({mergeNames:P,mergeToName:N,mergeValues:R,resultToName:L}){return(U,B,K,tt)=>{const W=K===void 0?B:K instanceof t.Name?(B instanceof t.Name?P(U,B,K):N(U,B,K),K):B instanceof t.Name?(N(U,K,B),B):R(B,K);return tt===t.Name&&!(W instanceof t.Name)?L(U,W):W}}n.mergeEvaluated={props:p({mergeNames:(P,N,R)=>P.if((0,t._)`${R} !== true && ${N} !== undefined`,()=>{P.if((0,t._)`${N} === true`,()=>P.assign(R,!0),()=>P.assign(R,(0,t._)`${R} || {}`).code((0,t._)`Object.assign(${R}, ${N})`))}),mergeToName:(P,N,R)=>P.if((0,t._)`${R} !== true`,()=>{N===!0?P.assign(R,!0):(P.assign(R,(0,t._)`${R} || {}`),_(P,R,N))}),mergeValues:(P,N)=>P===!0?!0:{...P,...N},resultToName:v}),items:p({mergeNames:(P,N,R)=>P.if((0,t._)`${R} !== true && ${N} !== undefined`,()=>P.assign(R,(0,t._)`${N} === true ? true : ${R} > ${N} ? ${R} : ${N}`)),mergeToName:(P,N,R)=>P.if((0,t._)`${R} !== true`,()=>P.assign(R,N===!0?!0:(0,t._)`${R} > ${N} ? ${R} : ${N}`)),mergeValues:(P,N)=>P===!0?!0:Math.max(P,N),resultToName:(P,N)=>P.var("items",N)})};function v(P,N){if(N===!0)return P.var("props",!0);const R=P.var("props",(0,t._)`{}`);return N!==void 0&&_(P,R,N),R}n.evaluatedPropsToName=v;function _(P,N,R){Object.keys(R).forEach(L=>P.assign((0,t._)`${N}${(0,t.getProperty)(L)}`,!0))}n.setEvaluated=_;const S={};function x(P,N){return P.scopeValue("func",{ref:N,code:S[N.code]||(S[N.code]=new e._Code(N.code))})}n.useFunc=x;var m;(function(P){P[P.Num=0]="Num",P[P.Str=1]="Str"})(m=n.Type||(n.Type={}));function k(P,N,R){if(P instanceof t.Name){const L=N===m.Num;return R?L?(0,t._)`"[" + ${P} + "]"`:(0,t._)`"['" + ${P} + "']"`:L?(0,t._)`"/" + ${P}`:(0,t._)`"/" + ${P}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return R?(0,t.getProperty)(P).toString():"/"+f(P)}n.getErrorPath=k;function F(P,N,R=P.opts.strictSchema){if(R){if(N=`strict mode: ${N}`,R===!0)throw new Error(N);P.self.logger.warn(N)}}n.checkStrictMode=F})(Ih);const Yw=pn(Ih),Xw=Pt({__proto__:null,default:Yw},[Ih]),ce=Et(Xw);var jh={};Object.defineProperty(jh,"__esModule",{value:!0});const nn=Zt,Jw={data:new nn.Name("data"),valCxt:new nn.Name("valCxt"),instancePath:new nn.Name("instancePath"),parentData:new nn.Name("parentData"),parentDataProperty:new nn.Name("parentDataProperty"),rootData:new nn.Name("rootData"),dynamicAnchors:new nn.Name("dynamicAnchors"),vErrors:new nn.Name("vErrors"),errors:new nn.Name("errors"),this:new nn.Name("this"),self:new nn.Name("self"),scope:new nn.Name("scope"),json:new nn.Name("json"),jsonPos:new nn.Name("jsonPos"),jsonLen:new nn.Name("jsonLen"),jsonPart:new nn.Name("jsonPart")};var Qw=jh.default=Jw;const Zw=Pt({__proto__:null,default:Qw},[jh]),kr=Et(Zw);(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.extendErrors=n.resetErrorsCount=n.reportExtraError=n.reportError=n.keyword$DataError=n.keywordError=void 0;const t=Zt,e=ce,r=kr;n.keywordError={message:({keyword:_})=>(0,t.str)`must pass "${_}" keyword validation`},n.keyword$DataError={message:({keyword:_,schemaType:S})=>S?(0,t.str)`"${_}" keyword must be ${S} ($data)`:(0,t.str)`"${_}" keyword is invalid ($data)`};function i(_,S=n.keywordError,x,m){const{it:k}=_,{gen:F,compositeRule:P,allErrors:N}=k,R=f(_,S,x);m??(P||N)?h(F,R):l(k,(0,t._)`[${R}]`)}n.reportError=i;function s(_,S=n.keywordError,x){const{it:m}=_,{gen:k,compositeRule:F,allErrors:P}=m,N=f(_,S,x);h(k,N),F||P||l(m,r.default.vErrors)}n.reportExtraError=s;function a(_,S){_.assign(r.default.errors,S),_.if((0,t._)`${r.default.vErrors} !== null`,()=>_.if(S,()=>_.assign((0,t._)`${r.default.vErrors}.length`,S),()=>_.assign(r.default.vErrors,null)))}n.resetErrorsCount=a;function o({gen:_,keyword:S,schemaValue:x,data:m,errsCount:k,it:F}){if(k===void 0)throw new Error("ajv implementation error");const P=_.name("err");_.forRange("i",k,r.default.errors,N=>{_.const(P,(0,t._)`${r.default.vErrors}[${N}]`),_.if((0,t._)`${P}.instancePath === undefined`,()=>_.assign((0,t._)`${P}.instancePath`,(0,t.strConcat)(r.default.instancePath,F.errorPath))),_.assign((0,t._)`${P}.schemaPath`,(0,t.str)`${F.errSchemaPath}/${S}`),F.opts.verbose&&(_.assign((0,t._)`${P}.schema`,x),_.assign((0,t._)`${P}.data`,m))})}n.extendErrors=o;function h(_,S){const x=_.const("err",S);_.if((0,t._)`${r.default.vErrors} === null`,()=>_.assign(r.default.vErrors,(0,t._)`[${x}]`),(0,t._)`${r.default.vErrors}.push(${x})`),_.code((0,t._)`${r.default.errors}++`)}function l(_,S){const{gen:x,validateName:m,schemaEnv:k}=_;k.$async?x.throw((0,t._)`new ${_.ValidationError}(${S})`):(x.assign((0,t._)`${m}.errors`,S),x.return(!1))}const c={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function f(_,S,x){const{createErrors:m}=_.it;return m===!1?(0,t._)`{}`:d(_,S,x)}function d(_,S,x={}){const{gen:m,it:k}=_,F=[u(k,x),p(_,x)];return v(_,S,F),m.object(...F)}function u({errorPath:_},{instancePath:S}){const x=S?(0,t.str)`${_}${(0,e.getErrorPath)(S,e.Type.Str)}`:_;return[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,x)]}function p({keyword:_,it:{errSchemaPath:S}},{schemaPath:x,parentSchema:m}){let k=m?S:(0,t.str)`${S}/${_}`;return x&&(k=(0,t.str)`${k}${(0,e.getErrorPath)(x,e.Type.Str)}`),[c.schemaPath,k]}function v(_,{params:S,message:x},m){const{keyword:k,data:F,schemaValue:P,it:N}=_,{opts:R,propertyName:L,topSchemaRef:U,schemaPath:B}=N;m.push([c.keyword,k],[c.params,typeof S=="function"?S(_):S||(0,t._)`{}`]),R.messages&&m.push([c.message,typeof x=="function"?x(_):x]),R.verbose&&m.push([c.schema,P],[c.parentSchema,(0,t._)`${U}${B}`],[r.default.data,F]),L&&m.push([c.propertyName,L])}})(Nh);const Ww=pn(Nh),tx=Pt({__proto__:null,default:Ww},[Nh]),Rs=Et(tx);Object.defineProperty(pi,"__esModule",{value:!0});var o0=pi.boolOrEmptySchema=l0=pi.topBoolOrEmptySchema=void 0;const ex=Rs,nx=Zt,rx=kr,ix={message:"boolean schema is false"};function sx(n){const{gen:t,schema:e,validateName:r}=n;e===!1?h0(n,!1):typeof e=="object"&&e.$async===!0?t.return(rx.default.data):(t.assign((0,nx._)`${r}.errors`,null),t.return(!0))}var l0=pi.topBoolOrEmptySchema=sx;function ax(n,t){const{gen:e,schema:r}=n;r===!1?(e.var(t,!1),h0(n)):e.var(t,!0)}o0=pi.boolOrEmptySchema=ax;function h0(n,t){const{gen:e,data:r}=n,i={gen:e,keyword:"false schema",data:r,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:n};(0,ex.reportError)(i,ix,void 0,t)}const ox=Pt({__proto__:null,get boolOrEmptySchema(){return o0},default:pi,get topBoolOrEmptySchema(){return l0}},[pi]),lx=Et(ox);var Lh={},gi={};Object.defineProperty(gi,"__esModule",{value:!0});var c0=gi.getRules=u0=gi.isJSONType=void 0;const hx=["string","number","integer","boolean","null","object","array"],cx=new Set(hx);function ux(n){return typeof n=="string"&&cx.has(n)}var u0=gi.isJSONType=ux;function dx(){const n={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...n,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},n.number,n.string,n.array,n.object],post:{rules:[]},all:{},keywords:{}}}c0=gi.getRules=dx;const fx=Pt({__proto__:null,default:gi,get getRules(){return c0},get isJSONType(){return u0}},[gi]),d0=Et(fx);var Cr={};Object.defineProperty(Cr,"__esModule",{value:!0});var f0=Cr.shouldUseRule=m0=Cr.shouldUseGroup=p0=Cr.schemaHasRulesForType=void 0;function px({schema:n,self:t},e){const r=t.RULES.types[e];return r&&r!==!0&&g0(n,r)}var p0=Cr.schemaHasRulesForType=px;function g0(n,t){return t.rules.some(e=>y0(n,e))}var m0=Cr.shouldUseGroup=g0;function y0(n,t){var e;return n[t.keyword]!==void 0||((e=t.definition.implements)===null||e===void 0?void 0:e.some(r=>n[r]!==void 0))}f0=Cr.shouldUseRule=y0;const gx=Pt({__proto__:null,default:Cr,get schemaHasRulesForType(){return p0},get shouldUseGroup(){return m0},get shouldUseRule(){return f0}},[Cr]),v0=Et(gx);(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.reportTypeError=n.checkDataTypes=n.checkDataType=n.coerceAndCheckDataType=n.getJSONTypes=n.getSchemaTypes=n.DataType=void 0;const t=d0,e=v0,r=Rs,i=Zt,s=ce;var a;(function(m){m[m.Correct=0]="Correct",m[m.Wrong=1]="Wrong"})(a=n.DataType||(n.DataType={}));function o(m){const k=h(m.type);if(k.includes("null")){if(m.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!k.length&&m.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');m.nullable===!0&&k.push("null")}return k}n.getSchemaTypes=o;function h(m){const k=Array.isArray(m)?m:m?[m]:[];if(k.every(t.isJSONType))return k;throw new Error("type must be JSONType or JSONType[]: "+k.join(","))}n.getJSONTypes=h;function l(m,k){const{gen:F,data:P,opts:N}=m,R=f(k,N.coerceTypes),L=k.length>0&&!(R.length===0&&k.length===1&&(0,e.schemaHasRulesForType)(m,k[0]));if(L){const U=v(k,P,N.strictNumbers,a.Wrong);F.if(U,()=>{R.length?d(m,k,R):S(m)})}return L}n.coerceAndCheckDataType=l;const c=new Set(["string","number","integer","boolean","null"]);function f(m,k){return k?m.filter(F=>c.has(F)||k==="array"&&F==="array"):[]}function d(m,k,F){const{gen:P,data:N,opts:R}=m,L=P.let("dataType",(0,i._)`typeof ${N}`),U=P.let("coerced",(0,i._)`undefined`);R.coerceTypes==="array"&&P.if((0,i._)`${L} == 'object' && Array.isArray(${N}) && ${N}.length == 1`,()=>P.assign(N,(0,i._)`${N}[0]`).assign(L,(0,i._)`typeof ${N}`).if(v(k,N,R.strictNumbers),()=>P.assign(U,N))),P.if((0,i._)`${U} !== undefined`);for(const K of F)(c.has(K)||K==="array"&&R.coerceTypes==="array")&&B(K);P.else(),S(m),P.endIf(),P.if((0,i._)`${U} !== undefined`,()=>{P.assign(N,U),u(m,U)});function B(K){switch(K){case"string":P.elseIf((0,i._)`${L} == "number" || ${L} == "boolean"`).assign(U,(0,i._)`"" + ${N}`).elseIf((0,i._)`${N} === null`).assign(U,(0,i._)`""`);return;case"number":P.elseIf((0,i._)`${L} == "boolean" || ${N} === null
19
- || (${L} == "string" && ${N} && ${N} == +${N})`).assign(U,(0,i._)`+${N}`);return;case"integer":P.elseIf((0,i._)`${L} === "boolean" || ${N} === null
20
- || (${L} === "string" && ${N} && ${N} == +${N} && !(${N} % 1))`).assign(U,(0,i._)`+${N}`);return;case"boolean":P.elseIf((0,i._)`${N} === "false" || ${N} === 0 || ${N} === null`).assign(U,!1).elseIf((0,i._)`${N} === "true" || ${N} === 1`).assign(U,!0);return;case"null":P.elseIf((0,i._)`${N} === "" || ${N} === 0 || ${N} === false`),P.assign(U,null);return;case"array":P.elseIf((0,i._)`${L} === "string" || ${L} === "number"
21
- || ${L} === "boolean" || ${N} === null`).assign(U,(0,i._)`[${N}]`)}}}function u({gen:m,parentData:k,parentDataProperty:F},P){m.if((0,i._)`${k} !== undefined`,()=>m.assign((0,i._)`${k}[${F}]`,P))}function p(m,k,F,P=a.Correct){const N=P===a.Correct?i.operators.EQ:i.operators.NEQ;let R;switch(m){case"null":return(0,i._)`${k} ${N} null`;case"array":R=(0,i._)`Array.isArray(${k})`;break;case"object":R=(0,i._)`${k} && typeof ${k} == "object" && !Array.isArray(${k})`;break;case"integer":R=L((0,i._)`!(${k} % 1) && !isNaN(${k})`);break;case"number":R=L();break;default:return(0,i._)`typeof ${k} ${N} ${m}`}return P===a.Correct?R:(0,i.not)(R);function L(U=i.nil){return(0,i.and)((0,i._)`typeof ${k} == "number"`,U,F?(0,i._)`isFinite(${k})`:i.nil)}}n.checkDataType=p;function v(m,k,F,P){if(m.length===1)return p(m[0],k,F,P);let N;const R=(0,s.toHash)(m);if(R.array&&R.object){const L=(0,i._)`typeof ${k} != "object"`;N=R.null?L:(0,i._)`!${k} || ${L}`,delete R.null,delete R.array,delete R.object}else N=i.nil;R.number&&delete R.integer;for(const L in R)N=(0,i.and)(N,p(L,k,F,P));return N}n.checkDataTypes=v;const _={message:({schema:m})=>`must be ${m}`,params:({schema:m,schemaValue:k})=>typeof m=="string"?(0,i._)`{type: ${m}}`:(0,i._)`{type: ${k}}`};function S(m){const k=x(m);(0,r.reportError)(k,_)}n.reportTypeError=S;function x(m){const{gen:k,data:F,schema:P}=m,N=(0,s.schemaRefOrVal)(m,P,"type");return{gen:k,keyword:"type",data:F,schema:P.type,schemaCode:N,schemaValue:N,parentSchema:P,params:{},it:m}}})(Lh);const mx=pn(Lh),yx=Pt({__proto__:null,default:mx},[Lh]),Mo=Et(yx);var Ds={};Object.defineProperty(Ds,"__esModule",{value:!0});var _0=Ds.assignDefaults=void 0;const Xi=Zt,vx=ce;function _x(n,t){const{properties:e,items:r}=n.schema;if(t==="object"&&e)for(const i in e)w0(n,i,e[i].default);else t==="array"&&Array.isArray(r)&&r.forEach((i,s)=>w0(n,s,i.default))}_0=Ds.assignDefaults=_x;function w0(n,t,e){const{gen:r,compositeRule:i,data:s,opts:a}=n;if(e===void 0)return;const o=(0,Xi._)`${s}${(0,Xi.getProperty)(t)}`;if(i){(0,vx.checkStrictMode)(n,`default is ignored for: ${o}`);return}let h=(0,Xi._)`${o} === undefined`;a.useDefaults==="empty"&&(h=(0,Xi._)`${h} || ${o} === null || ${o} === ""`),r.if(h,(0,Xi._)`${o} = ${(0,Xi.stringify)(e)}`)}const wx=Pt({__proto__:null,get assignDefaults(){return _0},default:Ds},[Ds]),xx=Et(wx);var Bn={},me={};Object.defineProperty(me,"__esModule",{value:!0});var x0=me.validateUnion=D0=me.validateArray=R0=me.usePattern=N0=me.callValidateCode=F0=me.schemaProperties=$0=me.allSchemaProperties=A0=me.noPropertyInData=E0=me.propertyInData=P0=me.isOwnProperty=T0=me.hasPropFunc=k0=me.reportMissingProp=S0=me.checkMissingProp=b0=me.checkReportMissingProp=void 0;const be=Zt,Uh=ce,Yr=kr,bx=ce;function Sx(n,t){const{gen:e,data:r,it:i}=n;e.if(zh(e,r,t,i.opts.ownProperties),()=>{n.setParams({missingProperty:(0,be._)`${t}`},!0),n.error()})}var b0=me.checkReportMissingProp=Sx;function kx({gen:n,data:t,it:{opts:e}},r,i){return(0,be.or)(...r.map(s=>(0,be.and)(zh(n,t,s,e.ownProperties),(0,be._)`${i} = ${s}`)))}var S0=me.checkMissingProp=kx;function Cx(n,t){n.setParams({missingProperty:t},!0),n.error()}var k0=me.reportMissingProp=Cx;function C0(n){return n.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,be._)`Object.prototype.hasOwnProperty`})}var T0=me.hasPropFunc=C0;function Gh(n,t,e){return(0,be._)`${C0(n)}.call(${t}, ${e})`}var P0=me.isOwnProperty=Gh;function Tx(n,t,e,r){const i=(0,be._)`${t}${(0,be.getProperty)(e)} !== undefined`;return r?(0,be._)`${i} && ${Gh(n,t,e)}`:i}var E0=me.propertyInData=Tx;function zh(n,t,e,r){const i=(0,be._)`${t}${(0,be.getProperty)(e)} === undefined`;return r?(0,be.or)(i,(0,be.not)(Gh(n,t,e))):i}var A0=me.noPropertyInData=zh;function O0(n){return n?Object.keys(n).filter(t=>t!=="__proto__"):[]}var $0=me.allSchemaProperties=O0;function Px(n,t){return O0(t).filter(e=>!(0,Uh.alwaysValidSchema)(n,t[e]))}var F0=me.schemaProperties=Px;function Ex({schemaCode:n,data:t,it:{gen:e,topSchemaRef:r,schemaPath:i,errorPath:s},it:a},o,h,l){const c=l?(0,be._)`${n}, ${t}, ${r}${i}`:t,f=[[Yr.default.instancePath,(0,be.strConcat)(Yr.default.instancePath,s)],[Yr.default.parentData,a.parentData],[Yr.default.parentDataProperty,a.parentDataProperty],[Yr.default.rootData,Yr.default.rootData]];a.opts.dynamicRef&&f.push([Yr.default.dynamicAnchors,Yr.default.dynamicAnchors]);const d=(0,be._)`${c}, ${e.object(...f)}`;return h!==be.nil?(0,be._)`${o}.call(${h}, ${d})`:(0,be._)`${o}(${d})`}var N0=me.callValidateCode=Ex;const Ax=(0,be._)`new RegExp`;function Ox({gen:n,it:{opts:t}},e){const r=t.unicodeRegExp?"u":"",{regExp:i}=t.code,s=i(e,r);return n.scopeValue("pattern",{key:s.toString(),ref:s,code:(0,be._)`${i.code==="new RegExp"?Ax:(0,bx.useFunc)(n,i)}(${e}, ${r})`})}var R0=me.usePattern=Ox;function $x(n){const{gen:t,data:e,keyword:r,it:i}=n,s=t.name("valid");if(i.allErrors){const o=t.let("valid",!0);return a(()=>t.assign(o,!1)),o}return t.var(s,!0),a(()=>t.break()),s;function a(o){const h=t.const("len",(0,be._)`${e}.length`);t.forRange("i",0,h,l=>{n.subschema({keyword:r,dataProp:l,dataPropType:Uh.Type.Num},s),t.if((0,be.not)(s),o)})}}var D0=me.validateArray=$x;function Fx(n){const{gen:t,schema:e,keyword:r,it:i}=n;if(!Array.isArray(e))throw new Error("ajv implementation error");if(e.some(o=>(0,Uh.alwaysValidSchema)(i,o))&&!i.opts.unevaluated)return;const s=t.let("valid",!1),a=t.name("_valid");t.block(()=>e.forEach((o,h)=>{const l=n.subschema({keyword:r,schemaProp:h,compositeRule:!0},a);t.assign(s,(0,be._)`${s} || ${a}`),n.mergeValidEvaluated(l,a)||t.if((0,be.not)(s))})),n.result(s,()=>n.reset(),()=>n.error(!0))}x0=me.validateUnion=Fx;const Nx=Pt({__proto__:null,get allSchemaProperties(){return $0},get callValidateCode(){return N0},get checkMissingProp(){return S0},get checkReportMissingProp(){return b0},default:me,get hasPropFunc(){return T0},get isOwnProperty(){return P0},get noPropertyInData(){return A0},get propertyInData(){return E0},get reportMissingProp(){return k0},get schemaProperties(){return F0},get usePattern(){return R0},get validateArray(){return D0},get validateUnion(){return x0}},[me]),Hn=Et(Nx);Object.defineProperty(Bn,"__esModule",{value:!0});var M0=Bn.validateKeywordUsage=G0=Bn.validSchemaType=j0=Bn.funcKeywordCode=I0=Bn.macroKeywordCode=void 0;const ln=Zt,mi=kr,Rx=Hn,Dx=Rs;function Mx(n,t){const{gen:e,keyword:r,schema:i,parentSchema:s,it:a}=n,o=t.macro.call(a.self,i,s,a),h=U0(e,r,o);a.opts.validateSchema!==!1&&a.self.validateSchema(o,!0);const l=e.name("valid");n.subschema({schema:o,schemaPath:ln.nil,errSchemaPath:`${a.errSchemaPath}/${r}`,topSchemaRef:h,compositeRule:!0},l),n.pass(l,()=>n.error(!0))}var I0=Bn.macroKeywordCode=Mx;function Ix(n,t){var e;const{gen:r,keyword:i,schema:s,parentSchema:a,$data:o,it:h}=n;Lx(h,t);const l=!o&&t.compile?t.compile.call(h.self,s,a,h):t.validate,c=U0(r,i,l),f=r.let("valid");n.block$data(f,d),n.ok((e=t.valid)!==null&&e!==void 0?e:f);function d(){if(t.errors===!1)v(),t.modifying&&L0(n),_(()=>n.error());else{const S=t.async?u():p();t.modifying&&L0(n),_(()=>jx(n,S))}}function u(){const S=r.let("ruleErrs",null);return r.try(()=>v((0,ln._)`await `),x=>r.assign(f,!1).if((0,ln._)`${x} instanceof ${h.ValidationError}`,()=>r.assign(S,(0,ln._)`${x}.errors`),()=>r.throw(x))),S}function p(){const S=(0,ln._)`${c}.errors`;return r.assign(S,null),v(ln.nil),S}function v(S=t.async?(0,ln._)`await `:ln.nil){const x=h.opts.passContext?mi.default.this:mi.default.self,m=!("compile"in t&&!o||t.schema===!1);r.assign(f,(0,ln._)`${S}${(0,Rx.callValidateCode)(n,c,x,m)}`,t.modifying)}function _(S){var x;r.if((0,ln.not)((x=t.valid)!==null&&x!==void 0?x:f),S)}}var j0=Bn.funcKeywordCode=Ix;function L0(n){const{gen:t,data:e,it:r}=n;t.if(r.parentData,()=>t.assign(e,(0,ln._)`${r.parentData}[${r.parentDataProperty}]`))}function jx(n,t){const{gen:e}=n;e.if((0,ln._)`Array.isArray(${t})`,()=>{e.assign(mi.default.vErrors,(0,ln._)`${mi.default.vErrors} === null ? ${t} : ${mi.default.vErrors}.concat(${t})`).assign(mi.default.errors,(0,ln._)`${mi.default.vErrors}.length`),(0,Dx.extendErrors)(n)},()=>n.error())}function Lx({schemaEnv:n},t){if(t.async&&!n.$async)throw new Error("async keyword in sync schema")}function U0(n,t,e){if(e===void 0)throw new Error(`keyword "${t}" failed to compile`);return n.scopeValue("keyword",typeof e=="function"?{ref:e}:{ref:e,code:(0,ln.stringify)(e)})}function Ux(n,t,e=!1){return!t.length||t.some(r=>r==="array"?Array.isArray(n):r==="object"?n&&typeof n=="object"&&!Array.isArray(n):typeof n==r||e&&typeof n>"u")}var G0=Bn.validSchemaType=Ux;function Gx({schema:n,opts:t,self:e,errSchemaPath:r},i,s){if(Array.isArray(i.keyword)?!i.keyword.includes(s):i.keyword!==s)throw new Error("ajv implementation error");const a=i.dependencies;if(a!=null&&a.some(o=>!Object.prototype.hasOwnProperty.call(n,o)))throw new Error(`parent schema must have dependencies of ${s}: ${a.join(",")}`);if(i.validateSchema&&!i.validateSchema(n[s])){const o=`keyword "${s}" value is invalid at path "${r}": `+e.errorsText(i.validateSchema.errors);if(t.validateSchema==="log")e.logger.error(o);else throw new Error(o)}}M0=Bn.validateKeywordUsage=Gx;const zx=Pt({__proto__:null,default:Bn,get funcKeywordCode(){return j0},get macroKeywordCode(){return I0},get validSchemaType(){return G0},get validateKeywordUsage(){return M0}},[Bn]),Vx=Et(zx);var Tr={};Object.defineProperty(Tr,"__esModule",{value:!0});var z0=Tr.extendSubschemaMode=H0=Tr.extendSubschemaData=B0=Tr.getSubschema=void 0;const lr=Zt,V0=ce;function Bx(n,{keyword:t,schemaProp:e,schema:r,schemaPath:i,errSchemaPath:s,topSchemaRef:a}){if(t!==void 0&&r!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){const o=n.schema[t];return e===void 0?{schema:o,schemaPath:(0,lr._)`${n.schemaPath}${(0,lr.getProperty)(t)}`,errSchemaPath:`${n.errSchemaPath}/${t}`}:{schema:o[e],schemaPath:(0,lr._)`${n.schemaPath}${(0,lr.getProperty)(t)}${(0,lr.getProperty)(e)}`,errSchemaPath:`${n.errSchemaPath}/${t}/${(0,V0.escapeFragment)(e)}`}}if(r!==void 0){if(i===void 0||s===void 0||a===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:r,schemaPath:i,topSchemaRef:a,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')}var B0=Tr.getSubschema=Bx;function Hx(n,t,{dataProp:e,dataPropType:r,data:i,dataTypes:s,propertyName:a}){if(i!==void 0&&e!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:o}=t;if(e!==void 0){const{errorPath:l,dataPathArr:c,opts:f}=t,d=o.let("data",(0,lr._)`${t.data}${(0,lr.getProperty)(e)}`,!0);h(d),n.errorPath=(0,lr.str)`${l}${(0,V0.getErrorPath)(e,r,f.jsPropertySyntax)}`,n.parentDataProperty=(0,lr._)`${e}`,n.dataPathArr=[...c,n.parentDataProperty]}if(i!==void 0){const l=i instanceof lr.Name?i:o.let("data",i,!0);h(l),a!==void 0&&(n.propertyName=a)}s&&(n.dataTypes=s);function h(l){n.data=l,n.dataLevel=t.dataLevel+1,n.dataTypes=[],t.definedProperties=new Set,n.parentData=t.data,n.dataNames=[...t.dataNames,l]}}var H0=Tr.extendSubschemaData=Hx;function qx(n,{jtdDiscriminator:t,jtdMetadata:e,compositeRule:r,createErrors:i,allErrors:s}){r!==void 0&&(n.compositeRule=r),i!==void 0&&(n.createErrors=i),s!==void 0&&(n.allErrors=s),n.jtdDiscriminator=t,n.jtdMetadata=e}z0=Tr.extendSubschemaMode=qx;const Kx=Pt({__proto__:null,default:Tr,get extendSubschemaData(){return H0},get extendSubschemaMode(){return z0},get getSubschema(){return B0}},[Tr]),Yx=Et(Kx);var hn={},q0=function n(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var r,i,s;if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(i=r;i--!==0;)if(!n(t[i],e[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();if(s=Object.keys(t),r=s.length,r!==Object.keys(e).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(e,s[i]))return!1;for(i=r;i--!==0;){var a=s[i];if(!n(t[a],e[a]))return!1}return!0}return t!==t&&e!==e};const Xx=pn(q0),Jx=Pt({__proto__:null,default:Xx},[q0]),K0=Et(Jx);var Y0={exports:{}},Xr=Y0.exports=function(n,t,e){typeof t=="function"&&(e=t,t={}),e=t.cb||e;var r=typeof e=="function"?e:e.pre||function(){},i=e.post||function(){};Io(t,r,i,n,"",n)};Xr.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},Xr.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},Xr.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},Xr.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function Io(n,t,e,r,i,s,a,o,h,l){if(r&&typeof r=="object"&&!Array.isArray(r)){t(r,i,s,a,o,h,l);for(var c in r){var f=r[c];if(Array.isArray(f)){if(c in Xr.arrayKeywords)for(var d=0;d<f.length;d++)Io(n,t,e,f[d],i+"/"+c+"/"+d,s,i,c,r,d)}else if(c in Xr.propsKeywords){if(f&&typeof f=="object")for(var u in f)Io(n,t,e,f[u],i+"/"+c+"/"+Qx(u),s,i,c,r,u)}else(c in Xr.keywords||n.allKeys&&!(c in Xr.skipKeywords))&&Io(n,t,e,f,i+"/"+c,s,i,c,r)}e(r,i,s,a,o,h,l)}}function Qx(n){return n.replace(/~/g,"~0").replace(/\//g,"~1")}var X0=Y0.exports;const Zx=pn(X0),Wx=Pt({__proto__:null,default:Zx},[X0]),tb=Et(Wx);Object.defineProperty(hn,"__esModule",{value:!0});var J0=hn.getSchemaRefs=ip=hn.resolveUrl=rp=hn.normalizeId=np=hn._getFullPath=tp=hn.getFullPath=Q0=hn.inlineRef=void 0;const eb=ce,nb=K0,rb=tb,ib=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function sb(n,t=!0){return typeof n=="boolean"?!0:t===!0?!Vh(n):t?Z0(n)<=t:!1}var Q0=hn.inlineRef=sb;const ab=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Vh(n){for(const t in n){if(ab.has(t))return!0;const e=n[t];if(Array.isArray(e)&&e.some(Vh)||typeof e=="object"&&Vh(e))return!0}return!1}function Z0(n){let t=0;for(const e in n)if(e==="$ref"||(t++,!ib.has(e)&&(typeof n[e]=="object"&&(0,eb.eachItem)(n[e],r=>t+=Z0(r)),t===1/0)))return 1/0;return t}function W0(n,t="",e){e!==!1&&(t=Ji(t));const r=n.parse(t);return ep(n,r)}var tp=hn.getFullPath=W0;function ep(n,t){return n.serialize(t).split("#")[0]+"#"}var np=hn._getFullPath=ep;const ob=/#\/?$/;function Ji(n){return n?n.replace(ob,""):""}var rp=hn.normalizeId=Ji;function lb(n,t,e){return e=Ji(e),n.resolve(t,e)}var ip=hn.resolveUrl=lb;const hb=/^[a-z_][-a-z0-9._]*$/i;function cb(n,t){if(typeof n=="boolean")return{};const{schemaId:e,uriResolver:r}=this.opts,i=Ji(n[e]||t),s={"":i},a=W0(r,i,!1),o={},h=new Set;return rb(n,{allKeys:!0},(f,d,u,p)=>{if(p===void 0)return;const v=a+d;let _=s[p];typeof f[e]=="string"&&(_=S.call(this,f[e])),x.call(this,f.$anchor),x.call(this,f.$dynamicAnchor),s[d]=_;function S(m){const k=this.opts.uriResolver.resolve;if(m=Ji(_?k(_,m):m),h.has(m))throw c(m);h.add(m);let F=this.refs[m];return typeof F=="string"&&(F=this.refs[F]),typeof F=="object"?l(f,F.schema,m):m!==Ji(v)&&(m[0]==="#"?(l(f,o[m],m),o[m]=f):this.refs[m]=v),m}function x(m){if(typeof m=="string"){if(!hb.test(m))throw new Error(`invalid anchor "${m}"`);S.call(this,`#${m}`)}}}),o;function l(f,d,u){if(d!==void 0&&!nb(f,d))throw c(u)}function c(f){return new Error(`reference "${f}" resolves to more than one schema`)}}J0=hn.getSchemaRefs=cb;const ub=Pt({__proto__:null,get _getFullPath(){return np},default:hn,get getFullPath(){return tp},get getSchemaRefs(){return J0},get inlineRef(){return Q0},get normalizeId(){return rp},get resolveUrl(){return ip}},[hn]),jo=Et(ub);Object.defineProperty(Sr,"__esModule",{value:!0});var sp=Sr.getData=wp=Sr.KeywordCxt=lp=Sr.validateFunctionCode=void 0;const ap=lx,op=Mo,Bh=v0,Lo=Mo,db=xx,Ms=Vx,Hh=Yx,$t=Zt,Vt=kr,fb=jo,Pr=ce,Is=Rs;function pb(n){if(dp(n)&&(fp(n),up(n))){yb(n);return}hp(n,()=>(0,ap.topBoolOrEmptySchema)(n))}var lp=Sr.validateFunctionCode=pb;function hp({gen:n,validateName:t,schema:e,schemaEnv:r,opts:i},s){i.code.es5?n.func(t,(0,$t._)`${Vt.default.data}, ${Vt.default.valCxt}`,r.$async,()=>{n.code((0,$t._)`"use strict"; ${cp(e,i)}`),mb(n,i),n.code(s)}):n.func(t,(0,$t._)`${Vt.default.data}, ${gb(i)}`,r.$async,()=>n.code(cp(e,i)).code(s))}function gb(n){return(0,$t._)`{${Vt.default.instancePath}="", ${Vt.default.parentData}, ${Vt.default.parentDataProperty}, ${Vt.default.rootData}=${Vt.default.data}${n.dynamicRef?(0,$t._)`, ${Vt.default.dynamicAnchors}={}`:$t.nil}}={}`}function mb(n,t){n.if(Vt.default.valCxt,()=>{n.var(Vt.default.instancePath,(0,$t._)`${Vt.default.valCxt}.${Vt.default.instancePath}`),n.var(Vt.default.parentData,(0,$t._)`${Vt.default.valCxt}.${Vt.default.parentData}`),n.var(Vt.default.parentDataProperty,(0,$t._)`${Vt.default.valCxt}.${Vt.default.parentDataProperty}`),n.var(Vt.default.rootData,(0,$t._)`${Vt.default.valCxt}.${Vt.default.rootData}`),t.dynamicRef&&n.var(Vt.default.dynamicAnchors,(0,$t._)`${Vt.default.valCxt}.${Vt.default.dynamicAnchors}`)},()=>{n.var(Vt.default.instancePath,(0,$t._)`""`),n.var(Vt.default.parentData,(0,$t._)`undefined`),n.var(Vt.default.parentDataProperty,(0,$t._)`undefined`),n.var(Vt.default.rootData,Vt.default.data),t.dynamicRef&&n.var(Vt.default.dynamicAnchors,(0,$t._)`{}`)})}function yb(n){const{schema:t,opts:e,gen:r}=n;hp(n,()=>{e.$comment&&t.$comment&&gp(n),bb(n),r.let(Vt.default.vErrors,null),r.let(Vt.default.errors,0),e.unevaluated&&vb(n),pp(n),Cb(n)})}function vb(n){const{gen:t,validateName:e}=n;n.evaluated=t.const("evaluated",(0,$t._)`${e}.evaluated`),t.if((0,$t._)`${n.evaluated}.dynamicProps`,()=>t.assign((0,$t._)`${n.evaluated}.props`,(0,$t._)`undefined`)),t.if((0,$t._)`${n.evaluated}.dynamicItems`,()=>t.assign((0,$t._)`${n.evaluated}.items`,(0,$t._)`undefined`))}function cp(n,t){const e=typeof n=="object"&&n[t.schemaId];return e&&(t.code.source||t.code.process)?(0,$t._)`/*# sourceURL=${e} */`:$t.nil}function _b(n,t){if(dp(n)&&(fp(n),up(n))){wb(n,t);return}(0,ap.boolOrEmptySchema)(n,t)}function up({schema:n,self:t}){if(typeof n=="boolean")return!n;for(const e in n)if(t.RULES.all[e])return!0;return!1}function dp(n){return typeof n.schema!="boolean"}function wb(n,t){const{schema:e,gen:r,opts:i}=n;i.$comment&&e.$comment&&gp(n),Sb(n),kb(n);const s=r.const("_errs",Vt.default.errors);pp(n,s),r.var(t,(0,$t._)`${s} === ${Vt.default.errors}`)}function fp(n){(0,Pr.checkUnknownRules)(n),xb(n)}function pp(n,t){if(n.opts.jtd)return mp(n,[],!1,t);const e=(0,op.getSchemaTypes)(n.schema),r=(0,op.coerceAndCheckDataType)(n,e);mp(n,e,!r,t)}function xb(n){const{schema:t,errSchemaPath:e,opts:r,self:i}=n;t.$ref&&r.ignoreKeywordsWithRef&&(0,Pr.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${e}"`)}function bb(n){const{schema:t,opts:e}=n;t.default!==void 0&&e.useDefaults&&e.strictSchema&&(0,Pr.checkStrictMode)(n,"default is ignored in the schema root")}function Sb(n){const t=n.schema[n.opts.schemaId];t&&(n.baseId=(0,fb.resolveUrl)(n.opts.uriResolver,n.baseId,t))}function kb(n){if(n.schema.$async&&!n.schemaEnv.$async)throw new Error("async schema in sync schema")}function gp({gen:n,schemaEnv:t,schema:e,errSchemaPath:r,opts:i}){const s=e.$comment;if(i.$comment===!0)n.code((0,$t._)`${Vt.default.self}.logger.log(${s})`);else if(typeof i.$comment=="function"){const a=(0,$t.str)`${r}/$comment`,o=n.scopeValue("root",{ref:t.root});n.code((0,$t._)`${Vt.default.self}.opts.$comment(${s}, ${a}, ${o}.schema)`)}}function Cb(n){const{gen:t,schemaEnv:e,validateName:r,ValidationError:i,opts:s}=n;e.$async?t.if((0,$t._)`${Vt.default.errors} === 0`,()=>t.return(Vt.default.data),()=>t.throw((0,$t._)`new ${i}(${Vt.default.vErrors})`)):(t.assign((0,$t._)`${r}.errors`,Vt.default.vErrors),s.unevaluated&&Tb(n),t.return((0,$t._)`${Vt.default.errors} === 0`))}function Tb({gen:n,evaluated:t,props:e,items:r}){e instanceof $t.Name&&n.assign((0,$t._)`${t}.props`,e),r instanceof $t.Name&&n.assign((0,$t._)`${t}.items`,r)}function mp(n,t,e,r){const{gen:i,schema:s,data:a,allErrors:o,opts:h,self:l}=n,{RULES:c}=l;if(s.$ref&&(h.ignoreKeywordsWithRef||!(0,Pr.schemaHasRulesButRef)(s,c))){i.block(()=>xp(n,"$ref",c.all.$ref.definition));return}h.jtd||Pb(n,t),i.block(()=>{for(const d of c.rules)f(d);f(c.post)});function f(d){(0,Bh.shouldUseGroup)(s,d)&&(d.type?(i.if((0,Lo.checkDataType)(d.type,a,h.strictNumbers)),yp(n,d),t.length===1&&t[0]===d.type&&e&&(i.else(),(0,Lo.reportTypeError)(n)),i.endIf()):yp(n,d),o||i.if((0,$t._)`${Vt.default.errors} === ${r||0}`))}}function yp(n,t){const{gen:e,schema:r,opts:{useDefaults:i}}=n;i&&(0,db.assignDefaults)(n,t.type),e.block(()=>{for(const s of t.rules)(0,Bh.shouldUseRule)(r,s)&&xp(n,s.keyword,s.definition,t.type)})}function Pb(n,t){n.schemaEnv.meta||!n.opts.strictTypes||(Eb(n,t),n.opts.allowUnionTypes||Ab(n,t),Ob(n,n.dataTypes))}function Eb(n,t){if(t.length){if(!n.dataTypes.length){n.dataTypes=t;return}t.forEach(e=>{vp(n.dataTypes,e)||qh(n,`type "${e}" not allowed by context "${n.dataTypes.join(",")}"`)}),Fb(n,t)}}function Ab(n,t){t.length>1&&!(t.length===2&&t.includes("null"))&&qh(n,"use allowUnionTypes to allow union type keyword")}function Ob(n,t){const e=n.self.RULES.all;for(const r in e){const i=e[r];if(typeof i=="object"&&(0,Bh.shouldUseRule)(n.schema,i)){const{type:s}=i.definition;s.length&&!s.some(a=>$b(t,a))&&qh(n,`missing type "${s.join(",")}" for keyword "${r}"`)}}}function $b(n,t){return n.includes(t)||t==="number"&&n.includes("integer")}function vp(n,t){return n.includes(t)||t==="integer"&&n.includes("number")}function Fb(n,t){const e=[];for(const r of n.dataTypes)vp(t,r)?e.push(r):t.includes("integer")&&r==="number"&&e.push("integer");n.dataTypes=e}function qh(n,t){const e=n.schemaEnv.baseId+n.errSchemaPath;t+=` at "${e}" (strictTypes)`,(0,Pr.checkStrictMode)(n,t,n.opts.strictTypes)}class _p{constructor(t,e,r){if((0,Ms.validateKeywordUsage)(t,e,r),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=r,this.data=t.data,this.schema=t.schema[r],this.$data=e.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Pr.schemaRefOrVal)(t,this.schema,r,this.$data),this.schemaType=e.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=e,this.$data)this.schemaCode=t.gen.const("vSchema",bp(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,Ms.validSchemaType)(this.schema,e.schemaType,e.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(e.schemaType)}`);("code"in e?e.trackErrors:e.errors!==!1)&&(this.errsCount=t.gen.const("_errs",Vt.default.errors))}result(t,e,r){this.failResult((0,$t.not)(t),e,r)}failResult(t,e,r){this.gen.if(t),r?r():this.error(),e?(this.gen.else(),e(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,e){this.failResult((0,$t.not)(t),void 0,e)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);const{schemaCode:e}=this;this.fail((0,$t._)`${e} !== undefined && (${(0,$t.or)(this.invalid$data(),t)})`)}error(t,e,r){if(e){this.setParams(e),this._error(t,r),this.setParams({});return}this._error(t,r)}_error(t,e){(t?Is.reportExtraError:Is.reportError)(this,this.def.error,e)}$dataError(){(0,Is.reportError)(this,this.def.$dataError||Is.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Is.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,e){e?Object.assign(this.params,t):this.params=t}block$data(t,e,r=$t.nil){this.gen.block(()=>{this.check$data(t,r),e()})}check$data(t=$t.nil,e=$t.nil){if(!this.$data)return;const{gen:r,schemaCode:i,schemaType:s,def:a}=this;r.if((0,$t.or)((0,$t._)`${i} === undefined`,e)),t!==$t.nil&&r.assign(t,!0),(s.length||a.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),t!==$t.nil&&r.assign(t,!1)),r.else()}invalid$data(){const{gen:t,schemaCode:e,schemaType:r,def:i,it:s}=this;return(0,$t.or)(a(),o());function a(){if(r.length){if(!(e instanceof $t.Name))throw new Error("ajv implementation error");const h=Array.isArray(r)?r:[r];return(0,$t._)`${(0,Lo.checkDataTypes)(h,e,s.opts.strictNumbers,Lo.DataType.Wrong)}`}return $t.nil}function o(){if(i.validateSchema){const h=t.scopeValue("validate$data",{ref:i.validateSchema});return(0,$t._)`!${h}(${e})`}return $t.nil}}subschema(t,e){const r=(0,Hh.getSubschema)(this.it,t);(0,Hh.extendSubschemaData)(r,this.it,t),(0,Hh.extendSubschemaMode)(r,t);const i={...this.it,...r,items:void 0,props:void 0};return _b(i,e),i}mergeEvaluated(t,e){const{it:r,gen:i}=this;r.opts.unevaluated&&(r.props!==!0&&t.props!==void 0&&(r.props=Pr.mergeEvaluated.props(i,t.props,r.props,e)),r.items!==!0&&t.items!==void 0&&(r.items=Pr.mergeEvaluated.items(i,t.items,r.items,e)))}mergeValidEvaluated(t,e){const{it:r,gen:i}=this;if(r.opts.unevaluated&&(r.props!==!0||r.items!==!0))return i.if(e,()=>this.mergeEvaluated(t,$t.Name)),!0}}var wp=Sr.KeywordCxt=_p;function xp(n,t,e,r){const i=new _p(n,e,t);"code"in e?e.code(i,r):i.$data&&e.validate?(0,Ms.funcKeywordCode)(i,e):"macro"in e?(0,Ms.macroKeywordCode)(i,e):(e.compile||e.validate)&&(0,Ms.funcKeywordCode)(i,e)}const Nb=/^\/(?:[^~]|~0|~1)*$/,Rb=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function bp(n,{dataLevel:t,dataNames:e,dataPathArr:r}){let i,s;if(n==="")return Vt.default.rootData;if(n[0]==="/"){if(!Nb.test(n))throw new Error(`Invalid JSON-pointer: ${n}`);i=n,s=Vt.default.rootData}else{const l=Rb.exec(n);if(!l)throw new Error(`Invalid JSON-pointer: ${n}`);const c=+l[1];if(i=l[2],i==="#"){if(c>=t)throw new Error(h("property/index",c));return r[t-c]}if(c>t)throw new Error(h("data",c));if(s=e[t-c],!i)return s}let a=s;const o=i.split("/");for(const l of o)l&&(s=(0,$t._)`${s}${(0,$t.getProperty)((0,Pr.unescapeJsonPointer)(l))}`,a=(0,$t._)`${a} && ${s}`);return a;function h(l,c){return`Cannot access ${l} ${c} levels up, current level is ${t}`}}sp=Sr.getData=bp;const Db=Pt({__proto__:null,get KeywordCxt(){return wp},default:Sr,get getData(){return sp},get validateFunctionCode(){return lp}},[Sr]),js=Et(Db);var Kh={};Object.defineProperty(Kh,"__esModule",{value:!0});class Mb extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}}var Ib=Kh.default=Mb;const jb=Pt({__proto__:null,default:Ib},[Kh]),Yh=Et(jb);var Xh={};Object.defineProperty(Xh,"__esModule",{value:!0});const Jh=jo;class Lb extends Error{constructor(t,e,r,i){super(i||`can't resolve reference ${r} from id ${e}`),this.missingRef=(0,Jh.resolveUrl)(t,e,r),this.missingSchema=(0,Jh.normalizeId)((0,Jh.getFullPath)(t,this.missingRef))}}var Ub=Xh.default=Lb;const Gb=Pt({__proto__:null,default:Ub},[Xh]),Qh=Et(Gb);var Cn={};Object.defineProperty(Cn,"__esModule",{value:!0});var Sp=Cn.resolveSchema=Ap=Cn.getCompilingSchema=Pp=Cn.resolveRef=Tp=Cn.compileSchema=Cp=Cn.SchemaEnv=void 0;const qn=Zt,zb=Yh,yi=kr,Kn=jo,kp=ce,Vb=js;class Uo{constructor(t){var e;this.refs={},this.dynamicAnchors={};let r;typeof t.schema=="object"&&(r=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(e=t.baseId)!==null&&e!==void 0?e:(0,Kn.normalizeId)(r==null?void 0:r[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=r==null?void 0:r.$async,this.refs={}}}var Cp=Cn.SchemaEnv=Uo;function Zh(n){const t=Ep.call(this,n);if(t)return t;const e=(0,Kn.getFullPath)(this.opts.uriResolver,n.root.baseId),{es5:r,lines:i}=this.opts.code,{ownProperties:s}=this.opts,a=new qn.CodeGen(this.scope,{es5:r,lines:i,ownProperties:s});let o;n.$async&&(o=a.scopeValue("Error",{ref:zb.default,code:(0,qn._)`require("ajv/dist/runtime/validation_error").default`}));const h=a.scopeName("validate");n.validateName=h;const l={gen:a,allErrors:this.opts.allErrors,data:yi.default.data,parentData:yi.default.parentData,parentDataProperty:yi.default.parentDataProperty,dataNames:[yi.default.data],dataPathArr:[qn.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:n.schema,code:(0,qn.stringify)(n.schema)}:{ref:n.schema}),validateName:h,ValidationError:o,schema:n.schema,schemaEnv:n,rootId:e,baseId:n.baseId||e,schemaPath:qn.nil,errSchemaPath:n.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,qn._)`""`,opts:this.opts,self:this};let c;try{this._compilations.add(n),(0,Vb.validateFunctionCode)(l),a.optimize(this.opts.code.optimize);const f=a.toString();c=`${a.scopeRefs(yi.default.scope)}return ${f}`,this.opts.code.process&&(c=this.opts.code.process(c,n));const d=new Function(`${yi.default.self}`,`${yi.default.scope}`,c)(this,this.scope.get());if(this.scope.value(h,{ref:d}),d.errors=null,d.schema=n.schema,d.schemaEnv=n,n.$async&&(d.$async=!0),this.opts.code.source===!0&&(d.source={validateName:h,validateCode:f,scopeValues:a._values}),this.opts.unevaluated){const{props:u,items:p}=l;d.evaluated={props:u instanceof qn.Name?void 0:u,items:p instanceof qn.Name?void 0:p,dynamicProps:u instanceof qn.Name,dynamicItems:p instanceof qn.Name},d.source&&(d.source.evaluated=(0,qn.stringify)(d.evaluated))}return n.validate=d,n}catch(f){throw delete n.validate,delete n.validateName,c&&this.logger.error("Error compiling schema, function code:",c),f}finally{this._compilations.delete(n)}}var Tp=Cn.compileSchema=Zh;function Bb(n,t,e){var r;e=(0,Kn.resolveUrl)(this.opts.uriResolver,t,e);const i=n.refs[e];if(i)return i;let s=Kb.call(this,n,e);if(s===void 0){const a=(r=n.localRefs)===null||r===void 0?void 0:r[e],{schemaId:o}=this.opts;a&&(s=new Uo({schema:a,schemaId:o,root:n,baseId:t}))}if(s!==void 0)return n.refs[e]=Hb.call(this,s)}var Pp=Cn.resolveRef=Bb;function Hb(n){return(0,Kn.inlineRef)(n.schema,this.opts.inlineRefs)?n.schema:n.validate?n:Zh.call(this,n)}function Ep(n){for(const t of this._compilations)if(qb(t,n))return t}var Ap=Cn.getCompilingSchema=Ep;function qb(n,t){return n.schema===t.schema&&n.root===t.root&&n.baseId===t.baseId}function Kb(n,t){let e;for(;typeof(e=this.refs[t])=="string";)t=e;return e||this.schemas[t]||Go.call(this,n,t)}function Go(n,t){const e=this.opts.uriResolver.parse(t),r=(0,Kn._getFullPath)(this.opts.uriResolver,e);let i=(0,Kn.getFullPath)(this.opts.uriResolver,n.baseId,void 0);if(Object.keys(n.schema).length>0&&r===i)return Wh.call(this,e,n);const s=(0,Kn.normalizeId)(r),a=this.refs[s]||this.schemas[s];if(typeof a=="string"){const o=Go.call(this,n,a);return typeof(o==null?void 0:o.schema)!="object"?void 0:Wh.call(this,e,o)}if(typeof(a==null?void 0:a.schema)=="object"){if(a.validate||Zh.call(this,a),s===(0,Kn.normalizeId)(t)){const{schema:o}=a,{schemaId:h}=this.opts,l=o[h];return l&&(i=(0,Kn.resolveUrl)(this.opts.uriResolver,i,l)),new Uo({schema:o,schemaId:h,root:n,baseId:i})}return Wh.call(this,e,a)}}Sp=Cn.resolveSchema=Go;const Yb=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Wh(n,{baseId:t,schema:e,root:r}){var i;if(((i=n.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(const o of n.fragment.slice(1).split("/")){if(typeof e=="boolean")return;const h=e[(0,kp.unescapeFragment)(o)];if(h===void 0)return;e=h;const l=typeof e=="object"&&e[this.opts.schemaId];!Yb.has(o)&&l&&(t=(0,Kn.resolveUrl)(this.opts.uriResolver,t,l))}let s;if(typeof e!="boolean"&&e.$ref&&!(0,kp.schemaHasRulesButRef)(e,this.RULES)){const o=(0,Kn.resolveUrl)(this.opts.uriResolver,t,e.$ref);s=Go.call(this,r,o)}const{schemaId:a}=this.opts;if(s=s||new Uo({schema:e,schemaId:a,root:r,baseId:t}),s.schema!==s.root.schema)return s}const Xb=Pt({__proto__:null,get SchemaEnv(){return Cp},get compileSchema(){return Tp},default:Cn,get getCompilingSchema(){return Ap},get resolveRef(){return Pp},get resolveSchema(){return Sp}},[Cn]),tc=Et(Xb),Jb="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",Qb="Meta-schema for $data reference (JSON AnySchema extension proposal)",Zb="object",Wb=["$data"],t5={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},e5=!1,n5={$id:Jb,description:Qb,type:Zb,required:Wb,properties:t5,additionalProperties:e5};var ec={},nc={exports:{}};/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */(function(n,t){(function(e,r){r(t)})(Nw,function(e){function r(){for(var H=arguments.length,J=Array(H),Q=0;Q<H;Q++)J[Q]=arguments[Q];if(J.length>1){J[0]=J[0].slice(0,-1);for(var at=J.length-1,ot=1;ot<at;++ot)J[ot]=J[ot].slice(1,-1);return J[at]=J[at].slice(1),J.join("")}else return J[0]}function i(H){return"(?:"+H+")"}function s(H){return H===void 0?"undefined":H===null?"null":Object.prototype.toString.call(H).split(" ").pop().split("]").shift().toLowerCase()}function a(H){return H.toUpperCase()}function o(H){return H!=null?H instanceof Array?H:typeof H.length!="number"||H.split||H.setInterval||H.call?[H]:Array.prototype.slice.call(H):[]}function h(H,J){var Q=H;if(J)for(var at in J)Q[at]=J[at];return Q}function l(H){var J="[A-Za-z]",Q="[0-9]",at=r(Q,"[A-Fa-f]"),ot=i(i("%[EFef]"+at+"%"+at+at+"%"+at+at)+"|"+i("%[89A-Fa-f]"+at+"%"+at+at)+"|"+i("%"+at+at)),Mt="[\\:\\/\\?\\#\\[\\]\\@]",Nt="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",re=r(Mt,Nt),Ce=H?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",he=H?"[\\uE000-\\uF8FF]":"[]",Yt=r(J,Q,"[\\-\\.\\_\\~]",Ce);i(J+r(J,Q,"[\\+\\-\\.]")+"*"),i(i(ot+"|"+r(Yt,Nt,"[\\:]"))+"*");var Qt=i(i("25[0-5]")+"|"+i("2[0-4]"+Q)+"|"+i("1"+Q+Q)+"|"+i("0?[1-9]"+Q)+"|0?0?"+Q),fe=i(Qt+"\\."+Qt+"\\."+Qt+"\\."+Qt),Ut=i(at+"{1,4}"),It=i(i(Ut+"\\:"+Ut)+"|"+fe),pe=i(i(Ut+"\\:")+"{6}"+It),Ue=i("\\:\\:"+i(Ut+"\\:")+"{5}"+It),xn=i(i(Ut)+"?\\:\\:"+i(Ut+"\\:")+"{4}"+It),_e=i(i(i(Ut+"\\:")+"{0,1}"+Ut)+"?\\:\\:"+i(Ut+"\\:")+"{3}"+It),Ge=i(i(i(Ut+"\\:")+"{0,2}"+Ut)+"?\\:\\:"+i(Ut+"\\:")+"{2}"+It),qe=i(i(i(Ut+"\\:")+"{0,3}"+Ut)+"?\\:\\:"+Ut+"\\:"+It),ze=i(i(i(Ut+"\\:")+"{0,4}"+Ut)+"?\\:\\:"+It),Re=i(i(i(Ut+"\\:")+"{0,5}"+Ut)+"?\\:\\:"+Ut),ae=i(i(i(Ut+"\\:")+"{0,6}"+Ut)+"?\\:\\:"),Lt=i([pe,Ue,xn,_e,Ge,qe,ze,Re,ae].join("|")),on=i(i(Yt+"|"+ot)+"+");i("[vV]"+at+"+\\."+r(Yt,Nt,"[\\:]")+"+"),i(i(ot+"|"+r(Yt,Nt))+"*");var rr=i(ot+"|"+r(Yt,Nt,"[\\:\\@]"));return i(i(ot+"|"+r(Yt,Nt,"[\\@]"))+"+"),i(i(rr+"|"+r("[\\/\\?]",he))+"*"),{NOT_SCHEME:new RegExp(r("[^]",J,Q,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(r("[^\\%\\:]",Yt,Nt),"g"),NOT_HOST:new RegExp(r("[^\\%\\[\\]\\:]",Yt,Nt),"g"),NOT_PATH:new RegExp(r("[^\\%\\/\\:\\@]",Yt,Nt),"g"),NOT_PATH_NOSCHEME:new RegExp(r("[^\\%\\/\\@]",Yt,Nt),"g"),NOT_QUERY:new RegExp(r("[^\\%]",Yt,Nt,"[\\:\\@\\/\\?]",he),"g"),NOT_FRAGMENT:new RegExp(r("[^\\%]",Yt,Nt,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(r("[^]",Yt,Nt),"g"),UNRESERVED:new RegExp(Yt,"g"),OTHER_CHARS:new RegExp(r("[^\\%]",Yt,re),"g"),PCT_ENCODED:new RegExp(ot,"g"),IPV4ADDRESS:new RegExp("^("+fe+")$"),IPV6ADDRESS:new RegExp("^\\[?("+Lt+")"+i(i("\\%25|\\%(?!"+at+"{2})")+"("+on+")")+"?\\]?$")}}var c=l(!1),f=l(!0),d=function(){function H(J,Q){var at=[],ot=!0,Mt=!1,Nt=void 0;try{for(var re=J[Symbol.iterator](),Ce;!(ot=(Ce=re.next()).done)&&(at.push(Ce.value),!(Q&&at.length===Q));ot=!0);}catch(he){Mt=!0,Nt=he}finally{try{!ot&&re.return&&re.return()}finally{if(Mt)throw Nt}}return at}return function(J,Q){if(Array.isArray(J))return J;if(Symbol.iterator in Object(J))return H(J,Q);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(H){if(Array.isArray(H)){for(var J=0,Q=Array(H.length);J<H.length;J++)Q[J]=H[J];return Q}else return Array.from(H)},p=2147483647,v=36,_=1,S=26,x=38,m=700,k=72,F=128,P="-",N=/^xn--/,R=/[^\0-\x7E]/,L=/[\x2E\u3002\uFF0E\uFF61]/g,U={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},B=v-_,K=Math.floor,tt=String.fromCharCode;function W(H){throw new RangeError(U[H])}function lt(H,J){for(var Q=[],at=H.length;at--;)Q[at]=J(H[at]);return Q}function wt(H,J){var Q=H.split("@"),at="";Q.length>1&&(at=Q[0]+"@",H=Q[1]),H=H.replace(L,".");var ot=H.split("."),Mt=lt(ot,J).join(".");return at+Mt}function bt(H){for(var J=[],Q=0,at=H.length;Q<at;){var ot=H.charCodeAt(Q++);if(ot>=55296&&ot<=56319&&Q<at){var Mt=H.charCodeAt(Q++);(Mt&64512)==56320?J.push(((ot&1023)<<10)+(Mt&1023)+65536):(J.push(ot),Q--)}else J.push(ot)}return J}var xt=function(H){return String.fromCodePoint.apply(String,u(H))},it=function(H){return H-48<10?H-22:H-65<26?H-65:H-97<26?H-97:v},Y=function(H,J){return H+22+75*(H<26)-((J!=0)<<5)},O=function(H,J,Q){var at=0;for(H=Q?K(H/m):H>>1,H+=K(H/J);H>B*S>>1;at+=v)H=K(H/B);return K(at+(B+1)*H/(H+x))},E=function(H){var J=[],Q=H.length,at=0,ot=F,Mt=k,Nt=H.lastIndexOf(P);Nt<0&&(Nt=0);for(var re=0;re<Nt;++re)H.charCodeAt(re)>=128&&W("not-basic"),J.push(H.charCodeAt(re));for(var Ce=Nt>0?Nt+1:0;Ce<Q;){for(var he=at,Yt=1,Qt=v;;Qt+=v){Ce>=Q&&W("invalid-input");var fe=it(H.charCodeAt(Ce++));(fe>=v||fe>K((p-at)/Yt))&&W("overflow"),at+=fe*Yt;var Ut=Qt<=Mt?_:Qt>=Mt+S?S:Qt-Mt;if(fe<Ut)break;var It=v-Ut;Yt>K(p/It)&&W("overflow"),Yt*=It}var pe=J.length+1;Mt=O(at-he,pe,he==0),K(at/pe)>p-ot&&W("overflow"),ot+=K(at/pe),at%=pe,J.splice(at++,0,ot)}return String.fromCodePoint.apply(String,J)},T=function(H){var J=[];H=bt(H);var Q=H.length,at=F,ot=0,Mt=k,Nt=!0,re=!1,Ce=void 0;try{for(var he=H[Symbol.iterator](),Yt;!(Nt=(Yt=he.next()).done);Nt=!0){var Qt=Yt.value;Qt<128&&J.push(tt(Qt))}}catch(Gn){re=!0,Ce=Gn}finally{try{!Nt&&he.return&&he.return()}finally{if(re)throw Ce}}var fe=J.length,Ut=fe;for(fe&&J.push(P);Ut<Q;){var It=p,pe=!0,Ue=!1,xn=void 0;try{for(var _e=H[Symbol.iterator](),Ge;!(pe=(Ge=_e.next()).done);pe=!0){var qe=Ge.value;qe>=at&&qe<It&&(It=qe)}}catch(Gn){Ue=!0,xn=Gn}finally{try{!pe&&_e.return&&_e.return()}finally{if(Ue)throw xn}}var ze=Ut+1;It-at>K((p-ot)/ze)&&W("overflow"),ot+=(It-at)*ze,at=It;var Re=!0,ae=!1,Lt=void 0;try{for(var on=H[Symbol.iterator](),rr;!(Re=(rr=on.next()).done);Re=!0){var ir=rr.value;if(ir<at&&++ot>p&&W("overflow"),ir==at){for(var Ze=ot,Ke=v;;Ke+=v){var bn=Ke<=Mt?_:Ke>=Mt+S?S:Ke-Mt;if(Ze<bn)break;var Vr=Ze-bn,Br=v-bn;J.push(tt(Y(bn+Vr%Br,0))),Ze=K(Vr/Br)}J.push(tt(Y(Ze,0))),Mt=O(ot,ze,Ut==fe),ot=0,++Ut}}}catch(Gn){ae=!0,Lt=Gn}finally{try{!Re&&on.return&&on.return()}finally{if(ae)throw Lt}}++ot,++at}return J.join("")},C=function(H){return wt(H,function(J){return N.test(J)?E(J.slice(4).toLowerCase()):J})},D=function(H){return wt(H,function(J){return R.test(J)?"xn--"+T(J):J})},G={version:"2.1.0",ucs2:{decode:bt,encode:xt},decode:E,encode:T,toASCII:D,toUnicode:C},M={};function V(H){var J=H.charCodeAt(0),Q=void 0;return J<16?Q="%0"+J.toString(16).toUpperCase():J<128?Q="%"+J.toString(16).toUpperCase():J<2048?Q="%"+(J>>6|192).toString(16).toUpperCase()+"%"+(J&63|128).toString(16).toUpperCase():Q="%"+(J>>12|224).toString(16).toUpperCase()+"%"+(J>>6&63|128).toString(16).toUpperCase()+"%"+(J&63|128).toString(16).toUpperCase(),Q}function q(H){for(var J="",Q=0,at=H.length;Q<at;){var ot=parseInt(H.substr(Q+1,2),16);if(ot<128)J+=String.fromCharCode(ot),Q+=3;else if(ot>=194&&ot<224){if(at-Q>=6){var Mt=parseInt(H.substr(Q+4,2),16);J+=String.fromCharCode((ot&31)<<6|Mt&63)}else J+=H.substr(Q,6);Q+=6}else if(ot>=224){if(at-Q>=9){var Nt=parseInt(H.substr(Q+4,2),16),re=parseInt(H.substr(Q+7,2),16);J+=String.fromCharCode((ot&15)<<12|(Nt&63)<<6|re&63)}else J+=H.substr(Q,9);Q+=9}else J+=H.substr(Q,3),Q+=3}return J}function Z(H,J){function Q(at){var ot=q(at);return ot.match(J.UNRESERVED)?ot:at}return H.scheme&&(H.scheme=String(H.scheme).replace(J.PCT_ENCODED,Q).toLowerCase().replace(J.NOT_SCHEME,"")),H.userinfo!==void 0&&(H.userinfo=String(H.userinfo).replace(J.PCT_ENCODED,Q).replace(J.NOT_USERINFO,V).replace(J.PCT_ENCODED,a)),H.host!==void 0&&(H.host=String(H.host).replace(J.PCT_ENCODED,Q).toLowerCase().replace(J.NOT_HOST,V).replace(J.PCT_ENCODED,a)),H.path!==void 0&&(H.path=String(H.path).replace(J.PCT_ENCODED,Q).replace(H.scheme?J.NOT_PATH:J.NOT_PATH_NOSCHEME,V).replace(J.PCT_ENCODED,a)),H.query!==void 0&&(H.query=String(H.query).replace(J.PCT_ENCODED,Q).replace(J.NOT_QUERY,V).replace(J.PCT_ENCODED,a)),H.fragment!==void 0&&(H.fragment=String(H.fragment).replace(J.PCT_ENCODED,Q).replace(J.NOT_FRAGMENT,V).replace(J.PCT_ENCODED,a)),H}function nt(H){return H.replace(/^0*(.*)/,"$1")||"0"}function pt(H,J){var Q=H.match(J.IPV4ADDRESS)||[],at=d(Q,2),ot=at[1];return ot?ot.split(".").map(nt).join("."):H}function kt(H,J){var Q=H.match(J.IPV6ADDRESS)||[],at=d(Q,3),ot=at[1],Mt=at[2];if(ot){for(var Nt=ot.toLowerCase().split("::").reverse(),re=d(Nt,2),Ce=re[0],he=re[1],Yt=he?he.split(":").map(nt):[],Qt=Ce.split(":").map(nt),fe=J.IPV4ADDRESS.test(Qt[Qt.length-1]),Ut=fe?7:8,It=Qt.length-Ut,pe=Array(Ut),Ue=0;Ue<Ut;++Ue)pe[Ue]=Yt[Ue]||Qt[It+Ue]||"";fe&&(pe[Ut-1]=pt(pe[Ut-1],J));var xn=pe.reduce(function(Re,ae,Lt){if(!ae||ae==="0"){var on=Re[Re.length-1];on&&on.index+on.length===Lt?on.length++:Re.push({index:Lt,length:1})}return Re},[]),_e=xn.sort(function(Re,ae){return ae.length-Re.length})[0],Ge=void 0;if(_e&&_e.length>1){var qe=pe.slice(0,_e.index),ze=pe.slice(_e.index+_e.length);Ge=qe.join(":")+"::"+ze.join(":")}else Ge=pe.join(":");return Mt&&(Ge+="%"+Mt),Ge}else return H}var Ft=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,St="".match(/(){0}/)[1]===void 0;function At(H){var J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Q={},at=J.iri!==!1?f:c;J.reference==="suffix"&&(H=(J.scheme?J.scheme+":":"")+"//"+H);var ot=H.match(Ft);if(ot){St?(Q.scheme=ot[1],Q.userinfo=ot[3],Q.host=ot[4],Q.port=parseInt(ot[5],10),Q.path=ot[6]||"",Q.query=ot[7],Q.fragment=ot[8],isNaN(Q.port)&&(Q.port=ot[5])):(Q.scheme=ot[1]||void 0,Q.userinfo=H.indexOf("@")!==-1?ot[3]:void 0,Q.host=H.indexOf("//")!==-1?ot[4]:void 0,Q.port=parseInt(ot[5],10),Q.path=ot[6]||"",Q.query=H.indexOf("?")!==-1?ot[7]:void 0,Q.fragment=H.indexOf("#")!==-1?ot[8]:void 0,isNaN(Q.port)&&(Q.port=H.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?ot[4]:void 0)),Q.host&&(Q.host=kt(pt(Q.host,at),at)),Q.scheme===void 0&&Q.userinfo===void 0&&Q.host===void 0&&Q.port===void 0&&!Q.path&&Q.query===void 0?Q.reference="same-document":Q.scheme===void 0?Q.reference="relative":Q.fragment===void 0?Q.reference="absolute":Q.reference="uri",J.reference&&J.reference!=="suffix"&&J.reference!==Q.reference&&(Q.error=Q.error||"URI is not a "+J.reference+" reference.");var Mt=M[(J.scheme||Q.scheme||"").toLowerCase()];if(!J.unicodeSupport&&(!Mt||!Mt.unicodeSupport)){if(Q.host&&(J.domainHost||Mt&&Mt.domainHost))try{Q.host=G.toASCII(Q.host.replace(at.PCT_ENCODED,q).toLowerCase())}catch(Nt){Q.error=Q.error||"Host's domain name can not be converted to ASCII via punycode: "+Nt}Z(Q,c)}else Z(Q,at);Mt&&Mt.parse&&Mt.parse(Q,J)}else Q.error=Q.error||"URI can not be parsed.";return Q}function jt(H,J){var Q=J.iri!==!1?f:c,at=[];return H.userinfo!==void 0&&(at.push(H.userinfo),at.push("@")),H.host!==void 0&&at.push(kt(pt(String(H.host),Q),Q).replace(Q.IPV6ADDRESS,function(ot,Mt,Nt){return"["+Mt+(Nt?"%25"+Nt:"")+"]"})),(typeof H.port=="number"||typeof H.port=="string")&&(at.push(":"),at.push(String(H.port))),at.length?at.join(""):void 0}var zt=/^\.\.?\//,Ot=/^\/\.(\/|$)/,le=/^\/\.\.(\/|$)/,Jt=/^\/?(?:.|\n)*?(?=\/|$)/;function ue(H){for(var J=[];H.length;)if(H.match(zt))H=H.replace(zt,"");else if(H.match(Ot))H=H.replace(Ot,"/");else if(H.match(le))H=H.replace(le,"/"),J.pop();else if(H==="."||H==="..")H="";else{var Q=H.match(Jt);if(Q){var at=Q[0];H=H.slice(at.length),J.push(at)}else throw new Error("Unexpected dot segment condition")}return J.join("")}function Bt(H){var J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Q=J.iri?f:c,at=[],ot=M[(J.scheme||H.scheme||"").toLowerCase()];if(ot&&ot.serialize&&ot.serialize(H,J),H.host&&!Q.IPV6ADDRESS.test(H.host)&&(J.domainHost||ot&&ot.domainHost))try{H.host=J.iri?G.toUnicode(H.host):G.toASCII(H.host.replace(Q.PCT_ENCODED,q).toLowerCase())}catch(re){H.error=H.error||"Host's domain name can not be converted to "+(J.iri?"Unicode":"ASCII")+" via punycode: "+re}Z(H,Q),J.reference!=="suffix"&&H.scheme&&(at.push(H.scheme),at.push(":"));var Mt=jt(H,J);if(Mt!==void 0&&(J.reference!=="suffix"&&at.push("//"),at.push(Mt),H.path&&H.path.charAt(0)!=="/"&&at.push("/")),H.path!==void 0){var Nt=H.path;!J.absolutePath&&(!ot||!ot.absolutePath)&&(Nt=ue(Nt)),Mt===void 0&&(Nt=Nt.replace(/^\/\//,"/%2F")),at.push(Nt)}return H.query!==void 0&&(at.push("?"),at.push(H.query)),H.fragment!==void 0&&(at.push("#"),at.push(H.fragment)),at.join("")}function Fe(H,J){var Q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},at=arguments[3],ot={};return at||(H=At(Bt(H,Q),Q),J=At(Bt(J,Q),Q)),Q=Q||{},!Q.tolerant&&J.scheme?(ot.scheme=J.scheme,ot.userinfo=J.userinfo,ot.host=J.host,ot.port=J.port,ot.path=ue(J.path||""),ot.query=J.query):(J.userinfo!==void 0||J.host!==void 0||J.port!==void 0?(ot.userinfo=J.userinfo,ot.host=J.host,ot.port=J.port,ot.path=ue(J.path||""),ot.query=J.query):(J.path?(J.path.charAt(0)==="/"?ot.path=ue(J.path):((H.userinfo!==void 0||H.host!==void 0||H.port!==void 0)&&!H.path?ot.path="/"+J.path:H.path?ot.path=H.path.slice(0,H.path.lastIndexOf("/")+1)+J.path:ot.path=J.path,ot.path=ue(ot.path)),ot.query=J.query):(ot.path=H.path,J.query!==void 0?ot.query=J.query:ot.query=H.query),ot.userinfo=H.userinfo,ot.host=H.host,ot.port=H.port),ot.scheme=H.scheme),ot.fragment=J.fragment,ot}function Pe(H,J,Q){var at=h({scheme:"null"},Q);return Bt(Fe(At(H,at),At(J,at),at,!0),at)}function Qe(H,J){return typeof H=="string"?H=Bt(At(H,J),J):s(H)==="object"&&(H=At(Bt(H,J),J)),H}function vn(H,J,Q){return typeof H=="string"?H=Bt(At(H,Q),Q):s(H)==="object"&&(H=Bt(H,Q)),typeof J=="string"?J=Bt(At(J,Q),Q):s(J)==="object"&&(J=Bt(J,Q)),H===J}function an(H,J){return H&&H.toString().replace(!J||!J.iri?c.ESCAPE:f.ESCAPE,V)}function Ne(H,J){return H&&H.toString().replace(!J||!J.iri?c.PCT_ENCODED:f.PCT_ENCODED,q)}var en={scheme:"http",domainHost:!0,parse:function(H,J){return H.host||(H.error=H.error||"HTTP URIs must have a host."),H},serialize:function(H,J){var Q=String(H.scheme).toLowerCase()==="https";return(H.port===(Q?443:80)||H.port==="")&&(H.port=void 0),H.path||(H.path="/"),H}},On={scheme:"https",domainHost:en.domainHost,parse:en.parse,serialize:en.serialize};function $n(H){return typeof H.secure=="boolean"?H.secure:String(H.scheme).toLowerCase()==="wss"}var jn={scheme:"ws",domainHost:!0,parse:function(H,J){var Q=H;return Q.secure=$n(Q),Q.resourceName=(Q.path||"/")+(Q.query?"?"+Q.query:""),Q.path=void 0,Q.query=void 0,Q},serialize:function(H,J){if((H.port===($n(H)?443:80)||H.port==="")&&(H.port=void 0),typeof H.secure=="boolean"&&(H.scheme=H.secure?"wss":"ws",H.secure=void 0),H.resourceName){var Q=H.resourceName.split("?"),at=d(Q,2),ot=at[0],Mt=at[1];H.path=ot&&ot!=="/"?ot:void 0,H.query=Mt,H.resourceName=void 0}return H.fragment=void 0,H}},Le={scheme:"wss",domainHost:jn.domainHost,parse:jn.parse,serialize:jn.serialize},Ln={},Zn="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ke="[0-9A-Fa-f]",Fn=i(i("%[EFef]"+ke+"%"+ke+ke+"%"+ke+ke)+"|"+i("%[89A-Fa-f]"+ke+"%"+ke+ke)+"|"+i("%"+ke+ke)),fn="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Lr="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",Wn=r(Lr,'[\\"\\\\]'),vr="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",_n=new RegExp(Zn,"g"),Ee=new RegExp(Fn,"g"),vs=new RegExp(r("[^]",fn,"[\\.]",'[\\"]',Wn),"g"),tr=new RegExp(r("[^]",Zn,vr),"g"),er=tr;function wn(H){var J=q(H);return J.match(_n)?J:H}var Ur={scheme:"mailto",parse:function(H,J){var Q=H,at=Q.to=Q.path?Q.path.split(","):[];if(Q.path=void 0,Q.query){for(var ot=!1,Mt={},Nt=Q.query.split("&"),re=0,Ce=Nt.length;re<Ce;++re){var he=Nt[re].split("=");switch(he[0]){case"to":for(var Yt=he[1].split(","),Qt=0,fe=Yt.length;Qt<fe;++Qt)at.push(Yt[Qt]);break;case"subject":Q.subject=Ne(he[1],J);break;case"body":Q.body=Ne(he[1],J);break;default:ot=!0,Mt[Ne(he[0],J)]=Ne(he[1],J);break}}ot&&(Q.headers=Mt)}Q.query=void 0;for(var Ut=0,It=at.length;Ut<It;++Ut){var pe=at[Ut].split("@");if(pe[0]=Ne(pe[0]),J.unicodeSupport)pe[1]=Ne(pe[1],J).toLowerCase();else try{pe[1]=G.toASCII(Ne(pe[1],J).toLowerCase())}catch(Ue){Q.error=Q.error||"Email address's domain name can not be converted to ASCII via punycode: "+Ue}at[Ut]=pe.join("@")}return Q},serialize:function(H,J){var Q=H,at=o(H.to);if(at){for(var ot=0,Mt=at.length;ot<Mt;++ot){var Nt=String(at[ot]),re=Nt.lastIndexOf("@"),Ce=Nt.slice(0,re).replace(Ee,wn).replace(Ee,a).replace(vs,V),he=Nt.slice(re+1);try{he=J.iri?G.toUnicode(he):G.toASCII(Ne(he,J).toLowerCase())}catch(Ut){Q.error=Q.error||"Email address's domain name can not be converted to "+(J.iri?"Unicode":"ASCII")+" via punycode: "+Ut}at[ot]=Ce+"@"+he}Q.path=at.join(",")}var Yt=H.headers=H.headers||{};H.subject&&(Yt.subject=H.subject),H.body&&(Yt.body=H.body);var Qt=[];for(var fe in Yt)Yt[fe]!==Ln[fe]&&Qt.push(fe.replace(Ee,wn).replace(Ee,a).replace(tr,V)+"="+Yt[fe].replace(Ee,wn).replace(Ee,a).replace(er,V));return Qt.length&&(Q.query=Qt.join("&")),Q}},nr=/^([^\:]+)\:(.*)/,Un={scheme:"urn",parse:function(H,J){var Q=H.path&&H.path.match(nr),at=H;if(Q){var ot=J.scheme||at.scheme||"urn",Mt=Q[1].toLowerCase(),Nt=Q[2],re=ot+":"+(J.nid||Mt),Ce=M[re];at.nid=Mt,at.nss=Nt,at.path=void 0,Ce&&(at=Ce.parse(at,J))}else at.error=at.error||"URN can not be parsed.";return at},serialize:function(H,J){var Q=J.scheme||H.scheme||"urn",at=H.nid,ot=Q+":"+(J.nid||at),Mt=M[ot];Mt&&(H=Mt.serialize(H,J));var Nt=H,re=H.nss;return Nt.path=(at||J.nid)+":"+re,Nt}},Gr=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,zr={scheme:"urn:uuid",parse:function(H,J){var Q=H;return Q.uuid=Q.nss,Q.nss=void 0,!J.tolerant&&(!Q.uuid||!Q.uuid.match(Gr))&&(Q.error=Q.error||"UUID is not valid."),Q},serialize:function(H,J){var Q=H;return Q.nss=(H.uuid||"").toLowerCase(),Q}};M[en.scheme]=en,M[On.scheme]=On,M[jn.scheme]=jn,M[Le.scheme]=Le,M[Ur.scheme]=Ur,M[Un.scheme]=Un,M[zr.scheme]=zr,e.SCHEMES=M,e.pctEncChar=V,e.pctDecChars=q,e.parse=At,e.removeDotSegments=ue,e.serialize=Bt,e.resolveComponents=Fe,e.resolve=Pe,e.normalize=Qe,e.equal=vn,e.escapeComponent=an,e.unescapeComponent=Ne,Object.defineProperty(e,"__esModule",{value:!0})})})(nc,nc.exports);var Op=nc.exports;const r5=pn(Op),i5=Pt({__proto__:null,default:r5},[Op]),s5=Et(i5);Object.defineProperty(ec,"__esModule",{value:!0});const $p=s5;$p.code='require("ajv/dist/runtime/uri").default';var a5=ec.default=$p;const o5=Pt({__proto__:null,default:a5},[ec]),l5=Et(o5);(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.CodeGen=n.Name=n.nil=n.stringify=n.str=n._=n.KeywordCxt=void 0;var t=js;Object.defineProperty(n,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var e=Zt;Object.defineProperty(n,"_",{enumerable:!0,get:function(){return e._}}),Object.defineProperty(n,"str",{enumerable:!0,get:function(){return e.str}}),Object.defineProperty(n,"stringify",{enumerable:!0,get:function(){return e.stringify}}),Object.defineProperty(n,"nil",{enumerable:!0,get:function(){return e.nil}}),Object.defineProperty(n,"Name",{enumerable:!0,get:function(){return e.Name}}),Object.defineProperty(n,"CodeGen",{enumerable:!0,get:function(){return e.CodeGen}});const r=Yh,i=Qh,s=d0,a=tc,o=Zt,h=jo,l=Mo,c=ce,f=n5,d=l5,u=(Y,O)=>new RegExp(Y,O);u.code="new RegExp";const p=["removeAdditional","useDefaults","coerceTypes"],v=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),_={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},S={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},x=200;function m(Y){var O,E,T,C,D,G,M,V,q,Z,nt,pt,kt,Ft,St,At,jt,zt,Ot,le,Jt,ue,Bt,Fe,Pe;const Qe=Y.strict,vn=(O=Y.code)===null||O===void 0?void 0:O.optimize,an=vn===!0||vn===void 0?1:vn||0,Ne=(T=(E=Y.code)===null||E===void 0?void 0:E.regExp)!==null&&T!==void 0?T:u,en=(C=Y.uriResolver)!==null&&C!==void 0?C:d.default;return{strictSchema:(G=(D=Y.strictSchema)!==null&&D!==void 0?D:Qe)!==null&&G!==void 0?G:!0,strictNumbers:(V=(M=Y.strictNumbers)!==null&&M!==void 0?M:Qe)!==null&&V!==void 0?V:!0,strictTypes:(Z=(q=Y.strictTypes)!==null&&q!==void 0?q:Qe)!==null&&Z!==void 0?Z:"log",strictTuples:(pt=(nt=Y.strictTuples)!==null&&nt!==void 0?nt:Qe)!==null&&pt!==void 0?pt:"log",strictRequired:(Ft=(kt=Y.strictRequired)!==null&&kt!==void 0?kt:Qe)!==null&&Ft!==void 0?Ft:!1,code:Y.code?{...Y.code,optimize:an,regExp:Ne}:{optimize:an,regExp:Ne},loopRequired:(St=Y.loopRequired)!==null&&St!==void 0?St:x,loopEnum:(At=Y.loopEnum)!==null&&At!==void 0?At:x,meta:(jt=Y.meta)!==null&&jt!==void 0?jt:!0,messages:(zt=Y.messages)!==null&&zt!==void 0?zt:!0,inlineRefs:(Ot=Y.inlineRefs)!==null&&Ot!==void 0?Ot:!0,schemaId:(le=Y.schemaId)!==null&&le!==void 0?le:"$id",addUsedSchema:(Jt=Y.addUsedSchema)!==null&&Jt!==void 0?Jt:!0,validateSchema:(ue=Y.validateSchema)!==null&&ue!==void 0?ue:!0,validateFormats:(Bt=Y.validateFormats)!==null&&Bt!==void 0?Bt:!0,unicodeRegExp:(Fe=Y.unicodeRegExp)!==null&&Fe!==void 0?Fe:!0,int32range:(Pe=Y.int32range)!==null&&Pe!==void 0?Pe:!0,uriResolver:en}}class k{constructor(O={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,O=this.opts={...O,...m(O)};const{es5:E,lines:T}=this.opts.code;this.scope=new o.ValueScope({scope:{},prefixes:v,es5:E,lines:T}),this.logger=K(O.logger);const C=O.validateFormats;O.validateFormats=!1,this.RULES=(0,s.getRules)(),F.call(this,_,O,"NOT SUPPORTED"),F.call(this,S,O,"DEPRECATED","warn"),this._metaOpts=U.call(this),O.formats&&R.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),O.keywords&&L.call(this,O.keywords),typeof O.meta=="object"&&this.addMetaSchema(O.meta),N.call(this),O.validateFormats=C}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:O,meta:E,schemaId:T}=this.opts;let C=f;T==="id"&&(C={...f},C.id=C.$id,delete C.$id),E&&O&&this.addMetaSchema(C,C[T],!1)}defaultMeta(){const{meta:O,schemaId:E}=this.opts;return this.opts.defaultMeta=typeof O=="object"?O[E]||O:void 0}validate(O,E){let T;if(typeof O=="string"){if(T=this.getSchema(O),!T)throw new Error(`no schema with key or ref "${O}"`)}else T=this.compile(O);const C=T(E);return"$async"in T||(this.errors=T.errors),C}compile(O,E){const T=this._addSchema(O,E);return T.validate||this._compileSchemaEnv(T)}compileAsync(O,E){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:T}=this.opts;return C.call(this,O,E);async function C(Z,nt){await D.call(this,Z.$schema);const pt=this._addSchema(Z,nt);return pt.validate||G.call(this,pt)}async function D(Z){Z&&!this.getSchema(Z)&&await C.call(this,{$ref:Z},!0)}async function G(Z){try{return this._compileSchemaEnv(Z)}catch(nt){if(!(nt instanceof i.default))throw nt;return M.call(this,nt),await V.call(this,nt.missingSchema),G.call(this,Z)}}function M({missingSchema:Z,missingRef:nt}){if(this.refs[Z])throw new Error(`AnySchema ${Z} is loaded but ${nt} cannot be resolved`)}async function V(Z){const nt=await q.call(this,Z);this.refs[Z]||await D.call(this,nt.$schema),this.refs[Z]||this.addSchema(nt,Z,E)}async function q(Z){const nt=this._loading[Z];if(nt)return nt;try{return await(this._loading[Z]=T(Z))}finally{delete this._loading[Z]}}}addSchema(O,E,T,C=this.opts.validateSchema){if(Array.isArray(O)){for(const G of O)this.addSchema(G,void 0,T,C);return this}let D;if(typeof O=="object"){const{schemaId:G}=this.opts;if(D=O[G],D!==void 0&&typeof D!="string")throw new Error(`schema ${G} must be string`)}return E=(0,h.normalizeId)(E||D),this._checkUnique(E),this.schemas[E]=this._addSchema(O,T,E,C,!0),this}addMetaSchema(O,E,T=this.opts.validateSchema){return this.addSchema(O,E,!0,T),this}validateSchema(O,E){if(typeof O=="boolean")return!0;let T;if(T=O.$schema,T!==void 0&&typeof T!="string")throw new Error("$schema must be a string");if(T=T||this.opts.defaultMeta||this.defaultMeta(),!T)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const C=this.validate(T,O);if(!C&&E){const D="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(D);else throw new Error(D)}return C}getSchema(O){let E;for(;typeof(E=P.call(this,O))=="string";)O=E;if(E===void 0){const{schemaId:T}=this.opts,C=new a.SchemaEnv({schema:{},schemaId:T});if(E=a.resolveSchema.call(this,C,O),!E)return;this.refs[O]=E}return E.validate||this._compileSchemaEnv(E)}removeSchema(O){if(O instanceof RegExp)return this._removeAllSchemas(this.schemas,O),this._removeAllSchemas(this.refs,O),this;switch(typeof O){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const E=P.call(this,O);return typeof E=="object"&&this._cache.delete(E.schema),delete this.schemas[O],delete this.refs[O],this}case"object":{const E=O;this._cache.delete(E);let T=O[this.opts.schemaId];return T&&(T=(0,h.normalizeId)(T),delete this.schemas[T],delete this.refs[T]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(O){for(const E of O)this.addKeyword(E);return this}addKeyword(O,E){let T;if(typeof O=="string")T=O,typeof E=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),E.keyword=T);else if(typeof O=="object"&&E===void 0){if(E=O,T=E.keyword,Array.isArray(T)&&!T.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(W.call(this,T,E),!E)return(0,c.eachItem)(T,D=>lt.call(this,D)),this;bt.call(this,E);const C={...E,type:(0,l.getJSONTypes)(E.type),schemaType:(0,l.getJSONTypes)(E.schemaType)};return(0,c.eachItem)(T,C.type.length===0?D=>lt.call(this,D,C):D=>C.type.forEach(G=>lt.call(this,D,C,G))),this}getKeyword(O){const E=this.RULES.all[O];return typeof E=="object"?E.definition:!!E}removeKeyword(O){const{RULES:E}=this;delete E.keywords[O],delete E.all[O];for(const T of E.rules){const C=T.rules.findIndex(D=>D.keyword===O);C>=0&&T.rules.splice(C,1)}return this}addFormat(O,E){return typeof E=="string"&&(E=new RegExp(E)),this.formats[O]=E,this}errorsText(O=this.errors,{separator:E=", ",dataVar:T="data"}={}){return!O||O.length===0?"No errors":O.map(C=>`${T}${C.instancePath} ${C.message}`).reduce((C,D)=>C+E+D)}$dataMetaSchema(O,E){const T=this.RULES.all;O=JSON.parse(JSON.stringify(O));for(const C of E){const D=C.split("/").slice(1);let G=O;for(const M of D)G=G[M];for(const M in T){const V=T[M];if(typeof V!="object")continue;const{$data:q}=V.definition,Z=G[M];q&&Z&&(G[M]=it(Z))}}return O}_removeAllSchemas(O,E){for(const T in O){const C=O[T];(!E||E.test(T))&&(typeof C=="string"?delete O[T]:C&&!C.meta&&(this._cache.delete(C.schema),delete O[T]))}}_addSchema(O,E,T,C=this.opts.validateSchema,D=this.opts.addUsedSchema){let G;const{schemaId:M}=this.opts;if(typeof O=="object")G=O[M];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof O!="boolean")throw new Error("schema must be object or boolean")}let V=this._cache.get(O);if(V!==void 0)return V;T=(0,h.normalizeId)(G||T);const q=h.getSchemaRefs.call(this,O,T);return V=new a.SchemaEnv({schema:O,schemaId:M,meta:E,baseId:T,localRefs:q}),this._cache.set(V.schema,V),D&&!T.startsWith("#")&&(T&&this._checkUnique(T),this.refs[T]=V),C&&this.validateSchema(O,!0),V}_checkUnique(O){if(this.schemas[O]||this.refs[O])throw new Error(`schema with key or id "${O}" already exists`)}_compileSchemaEnv(O){if(O.meta?this._compileMetaSchema(O):a.compileSchema.call(this,O),!O.validate)throw new Error("ajv implementation error");return O.validate}_compileMetaSchema(O){const E=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,O)}finally{this.opts=E}}}n.default=k,k.ValidationError=r.default,k.MissingRefError=i.default;function F(Y,O,E,T="error"){for(const C in Y){const D=C;D in O&&this.logger[T](`${E}: option ${C}. ${Y[D]}`)}}function P(Y){return Y=(0,h.normalizeId)(Y),this.schemas[Y]||this.refs[Y]}function N(){const Y=this.opts.schemas;if(Y)if(Array.isArray(Y))this.addSchema(Y);else for(const O in Y)this.addSchema(Y[O],O)}function R(){for(const Y in this.opts.formats){const O=this.opts.formats[Y];O&&this.addFormat(Y,O)}}function L(Y){if(Array.isArray(Y)){this.addVocabulary(Y);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const O in Y){const E=Y[O];E.keyword||(E.keyword=O),this.addKeyword(E)}}function U(){const Y={...this.opts};for(const O of p)delete Y[O];return Y}const B={log(){},warn(){},error(){}};function K(Y){if(Y===!1)return B;if(Y===void 0)return console;if(Y.log&&Y.warn&&Y.error)return Y;throw new Error("logger must implement log, warn and error methods")}const tt=/^[a-z_$][a-z0-9_$:-]*$/i;function W(Y,O){const{RULES:E}=this;if((0,c.eachItem)(Y,T=>{if(E.keywords[T])throw new Error(`Keyword ${T} is already defined`);if(!tt.test(T))throw new Error(`Keyword ${T} has invalid name`)}),!!O&&O.$data&&!("code"in O||"validate"in O))throw new Error('$data keyword must have "code" or "validate" function')}function lt(Y,O,E){var T;const C=O==null?void 0:O.post;if(E&&C)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:D}=this;let G=C?D.post:D.rules.find(({type:V})=>V===E);if(G||(G={type:E,rules:[]},D.rules.push(G)),D.keywords[Y]=!0,!O)return;const M={keyword:Y,definition:{...O,type:(0,l.getJSONTypes)(O.type),schemaType:(0,l.getJSONTypes)(O.schemaType)}};O.before?wt.call(this,G,M,O.before):G.rules.push(M),D.all[Y]=M,(T=O.implements)===null||T===void 0||T.forEach(V=>this.addKeyword(V))}function wt(Y,O,E){const T=Y.rules.findIndex(C=>C.keyword===E);T>=0?Y.rules.splice(T,0,O):(Y.rules.push(O),this.logger.warn(`rule ${E} is not defined`))}function bt(Y){let{metaSchema:O}=Y;O!==void 0&&(Y.$data&&this.opts.$data&&(O=it(O)),Y.validateSchema=this.compile(O,!0))}const xt={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function it(Y){return{anyOf:[Y,xt]}}})(Fh);const h5=pn(Fh),c5=Pt({__proto__:null,default:h5},[Fh]),u5=Et(c5);var rc={},ic={},sc={};Object.defineProperty(sc,"__esModule",{value:!0});const d5={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};var f5=sc.default=d5;const p5=Pt({__proto__:null,default:f5},[sc]),g5=Et(p5);var vi={};Object.defineProperty(vi,"__esModule",{value:!0});var Fp=vi.callRef=Mp=vi.getValidate=void 0;const m5=Qh,Np=Hn,gn=Zt,Qi=kr,Rp=tc,zo=ce,y5={keyword:"$ref",schemaType:"string",code(n){const{gen:t,schema:e,it:r}=n,{baseId:i,schemaEnv:s,validateName:a,opts:o,self:h}=r,{root:l}=s;if((e==="#"||e==="#/")&&i===l.baseId)return f();const c=Rp.resolveRef.call(h,l,i,e);if(c===void 0)throw new m5.default(r.opts.uriResolver,i,e);if(c instanceof Rp.SchemaEnv)return d(c);return u(c);function f(){if(s===l)return Vo(n,a,s,s.$async);const p=t.scopeValue("root",{ref:l});return Vo(n,(0,gn._)`${p}.validate`,l,l.$async)}function d(p){const v=Dp(n,p);Vo(n,v,p,p.$async)}function u(p){const v=t.scopeValue("schema",o.code.source===!0?{ref:p,code:(0,gn.stringify)(p)}:{ref:p}),_=t.name("valid"),S=n.subschema({schema:p,dataTypes:[],schemaPath:gn.nil,topSchemaRef:v,errSchemaPath:e},_);n.mergeEvaluated(S),n.ok(_)}}};function Dp(n,t){const{gen:e}=n;return t.validate?e.scopeValue("validate",{ref:t.validate}):(0,gn._)`${e.scopeValue("wrapper",{ref:t})}.validate`}var Mp=vi.getValidate=Dp;function Vo(n,t,e,r){const{gen:i,it:s}=n,{allErrors:a,schemaEnv:o,opts:h}=s,l=h.passContext?Qi.default.this:gn.nil;r?c():f();function c(){if(!o.$async)throw new Error("async schema referenced by sync schema");const p=i.let("valid");i.try(()=>{i.code((0,gn._)`await ${(0,Np.callValidateCode)(n,t,l)}`),u(t),a||i.assign(p,!0)},v=>{i.if((0,gn._)`!(${v} instanceof ${s.ValidationError})`,()=>i.throw(v)),d(v),a||i.assign(p,!1)}),n.ok(p)}function f(){n.result((0,Np.callValidateCode)(n,t,l),()=>u(t),()=>d(t))}function d(p){const v=(0,gn._)`${p}.errors`;i.assign(Qi.default.vErrors,(0,gn._)`${Qi.default.vErrors} === null ? ${v} : ${Qi.default.vErrors}.concat(${v})`),i.assign(Qi.default.errors,(0,gn._)`${Qi.default.vErrors}.length`)}function u(p){var v;if(!s.opts.unevaluated)return;const _=(v=e==null?void 0:e.validate)===null||v===void 0?void 0:v.evaluated;if(s.props!==!0)if(_&&!_.dynamicProps)_.props!==void 0&&(s.props=zo.mergeEvaluated.props(i,_.props,s.props));else{const S=i.var("props",(0,gn._)`${p}.evaluated.props`);s.props=zo.mergeEvaluated.props(i,S,s.props,gn.Name)}if(s.items!==!0)if(_&&!_.dynamicItems)_.items!==void 0&&(s.items=zo.mergeEvaluated.items(i,_.items,s.items));else{const S=i.var("items",(0,gn._)`${p}.evaluated.items`);s.items=zo.mergeEvaluated.items(i,S,s.items,gn.Name)}}}Fp=vi.callRef=Vo;var v5=vi.default=y5;const _5=Pt({__proto__:null,get callRef(){return Fp},default:v5,get getValidate(){return Mp}},[vi]),w5=Et(_5);Object.defineProperty(ic,"__esModule",{value:!0});const x5=g5,b5=w5,S5=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",x5.default,b5.default];var k5=ic.default=S5;const C5=Pt({__proto__:null,default:k5},[ic]),T5=Et(C5);var ac={},oc={};Object.defineProperty(oc,"__esModule",{value:!0});const Bo=Zt,Jr=Bo.operators,Ho={maximum:{okStr:"<=",ok:Jr.LTE,fail:Jr.GT},minimum:{okStr:">=",ok:Jr.GTE,fail:Jr.LT},exclusiveMaximum:{okStr:"<",ok:Jr.LT,fail:Jr.GTE},exclusiveMinimum:{okStr:">",ok:Jr.GT,fail:Jr.LTE}},P5={message:({keyword:n,schemaCode:t})=>(0,Bo.str)`must be ${Ho[n].okStr} ${t}`,params:({keyword:n,schemaCode:t})=>(0,Bo._)`{comparison: ${Ho[n].okStr}, limit: ${t}}`},E5={keyword:Object.keys(Ho),type:"number",schemaType:"number",$data:!0,error:P5,code(n){const{keyword:t,data:e,schemaCode:r}=n;n.fail$data((0,Bo._)`${e} ${Ho[t].fail} ${r} || isNaN(${e})`)}};var A5=oc.default=E5;const O5=Pt({__proto__:null,default:A5},[oc]),$5=Et(O5);var lc={};Object.defineProperty(lc,"__esModule",{value:!0});const Ls=Zt,F5={message:({schemaCode:n})=>(0,Ls.str)`must be multiple of ${n}`,params:({schemaCode:n})=>(0,Ls._)`{multipleOf: ${n}}`},N5={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:F5,code(n){const{gen:t,data:e,schemaCode:r,it:i}=n,s=i.opts.multipleOfPrecision,a=t.let("res"),o=s?(0,Ls._)`Math.abs(Math.round(${a}) - ${a}) > 1e-${s}`:(0,Ls._)`${a} !== parseInt(${a})`;n.fail$data((0,Ls._)`(${r} === 0 || (${a} = ${e}/${r}, ${o}))`)}};var R5=lc.default=N5;const D5=Pt({__proto__:null,default:R5},[lc]),M5=Et(D5);var hc={},cc={};Object.defineProperty(cc,"__esModule",{value:!0});function Ip(n){const t=n.length;let e=0,r=0,i;for(;r<t;)e++,i=n.charCodeAt(r++),i>=55296&&i<=56319&&r<t&&(i=n.charCodeAt(r),(i&64512)===56320&&r++);return e}var I5=cc.default=Ip;Ip.code='require("ajv/dist/runtime/ucs2length").default';const j5=Pt({__proto__:null,default:I5},[cc]),L5=Et(j5);Object.defineProperty(hc,"__esModule",{value:!0});const _i=Zt,U5=ce,G5=L5,z5={message({keyword:n,schemaCode:t}){const e=n==="maxLength"?"more":"fewer";return(0,_i.str)`must NOT have ${e} than ${t} characters`},params:({schemaCode:n})=>(0,_i._)`{limit: ${n}}`},V5={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:z5,code(n){const{keyword:t,data:e,schemaCode:r,it:i}=n,s=t==="maxLength"?_i.operators.GT:_i.operators.LT,a=i.opts.unicode===!1?(0,_i._)`${e}.length`:(0,_i._)`${(0,U5.useFunc)(n.gen,G5.default)}(${e})`;n.fail$data((0,_i._)`${a} ${s} ${r}`)}};var B5=hc.default=V5;const H5=Pt({__proto__:null,default:B5},[hc]),q5=Et(H5);var uc={};Object.defineProperty(uc,"__esModule",{value:!0});const K5=Hn,qo=Zt,Y5={message:({schemaCode:n})=>(0,qo.str)`must match pattern "${n}"`,params:({schemaCode:n})=>(0,qo._)`{pattern: ${n}}`},X5={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:Y5,code(n){const{data:t,$data:e,schema:r,schemaCode:i,it:s}=n,a=s.opts.unicodeRegExp?"u":"",o=e?(0,qo._)`(new RegExp(${i}, ${a}))`:(0,K5.usePattern)(n,r);n.fail$data((0,qo._)`!${o}.test(${t})`)}};var J5=uc.default=X5;const Q5=Pt({__proto__:null,default:J5},[uc]),Z5=Et(Q5);var dc={};Object.defineProperty(dc,"__esModule",{value:!0});const Us=Zt,W5={message({keyword:n,schemaCode:t}){const e=n==="maxProperties"?"more":"fewer";return(0,Us.str)`must NOT have ${e} than ${t} properties`},params:({schemaCode:n})=>(0,Us._)`{limit: ${n}}`},t3={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:W5,code(n){const{keyword:t,data:e,schemaCode:r}=n,i=t==="maxProperties"?Us.operators.GT:Us.operators.LT;n.fail$data((0,Us._)`Object.keys(${e}).length ${i} ${r}`)}};var e3=dc.default=t3;const n3=Pt({__proto__:null,default:e3},[dc]),r3=Et(n3);var fc={};Object.defineProperty(fc,"__esModule",{value:!0});const Gs=Hn,zs=Zt,i3=ce,s3={message:({params:{missingProperty:n}})=>(0,zs.str)`must have required property '${n}'`,params:({params:{missingProperty:n}})=>(0,zs._)`{missingProperty: ${n}}`},a3={keyword:"required",type:"object",schemaType:"array",$data:!0,error:s3,code(n){const{gen:t,schema:e,schemaCode:r,data:i,$data:s,it:a}=n,{opts:o}=a;if(!s&&e.length===0)return;const h=e.length>=o.loopRequired;if(a.allErrors?l():c(),o.strictRequired){const u=n.parentSchema.properties,{definedProperties:p}=n.it;for(const v of e)if((u==null?void 0:u[v])===void 0&&!p.has(v)){const _=a.schemaEnv.baseId+a.errSchemaPath,S=`required property "${v}" is not defined at "${_}" (strictRequired)`;(0,i3.checkStrictMode)(a,S,a.opts.strictRequired)}}function l(){if(h||s)n.block$data(zs.nil,f);else for(const u of e)(0,Gs.checkReportMissingProp)(n,u)}function c(){const u=t.let("missing");if(h||s){const p=t.let("valid",!0);n.block$data(p,()=>d(u,p)),n.ok(p)}else t.if((0,Gs.checkMissingProp)(n,e,u)),(0,Gs.reportMissingProp)(n,u),t.else()}function f(){t.forOf("prop",r,u=>{n.setParams({missingProperty:u}),t.if((0,Gs.noPropertyInData)(t,i,u,o.ownProperties),()=>n.error())})}function d(u,p){n.setParams({missingProperty:u}),t.forOf(u,r,()=>{t.assign(p,(0,Gs.propertyInData)(t,i,u,o.ownProperties)),t.if((0,zs.not)(p),()=>{n.error(),t.break()})},zs.nil)}}};var o3=fc.default=a3;const l3=Pt({__proto__:null,default:o3},[fc]),h3=Et(l3);var pc={};Object.defineProperty(pc,"__esModule",{value:!0});const Vs=Zt,c3={message({keyword:n,schemaCode:t}){const e=n==="maxItems"?"more":"fewer";return(0,Vs.str)`must NOT have ${e} than ${t} items`},params:({schemaCode:n})=>(0,Vs._)`{limit: ${n}}`},u3={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:c3,code(n){const{keyword:t,data:e,schemaCode:r}=n,i=t==="maxItems"?Vs.operators.GT:Vs.operators.LT;n.fail$data((0,Vs._)`${e}.length ${i} ${r}`)}};var d3=pc.default=u3;const f3=Pt({__proto__:null,default:d3},[pc]),p3=Et(f3);var gc={},mc={};Object.defineProperty(mc,"__esModule",{value:!0});const jp=K0;jp.code='require("ajv/dist/runtime/equal").default';var g3=mc.default=jp;const m3=Pt({__proto__:null,default:g3},[mc]),yc=Et(m3);Object.defineProperty(gc,"__esModule",{value:!0});const vc=Mo,We=Zt,y3=ce,v3=yc,_3={message:({params:{i:n,j:t}})=>(0,We.str)`must NOT have duplicate items (items ## ${t} and ${n} are identical)`,params:({params:{i:n,j:t}})=>(0,We._)`{i: ${n}, j: ${t}}`},w3={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:_3,code(n){const{gen:t,data:e,$data:r,schema:i,parentSchema:s,schemaCode:a,it:o}=n;if(!r&&!i)return;const h=t.let("valid"),l=s.items?(0,vc.getSchemaTypes)(s.items):[];n.block$data(h,c,(0,We._)`${a} === false`),n.ok(h);function c(){const p=t.let("i",(0,We._)`${e}.length`),v=t.let("j");n.setParams({i:p,j:v}),t.assign(h,!0),t.if((0,We._)`${p} > 1`,()=>(f()?d:u)(p,v))}function f(){return l.length>0&&!l.some(p=>p==="object"||p==="array")}function d(p,v){const _=t.name("item"),S=(0,vc.checkDataTypes)(l,_,o.opts.strictNumbers,vc.DataType.Wrong),x=t.const("indices",(0,We._)`{}`);t.for((0,We._)`;${p}--;`,()=>{t.let(_,(0,We._)`${e}[${p}]`),t.if(S,(0,We._)`continue`),l.length>1&&t.if((0,We._)`typeof ${_} == "string"`,(0,We._)`${_} += "_"`),t.if((0,We._)`typeof ${x}[${_}] == "number"`,()=>{t.assign(v,(0,We._)`${x}[${_}]`),n.error(),t.assign(h,!1).break()}).code((0,We._)`${x}[${_}] = ${p}`)})}function u(p,v){const _=(0,y3.useFunc)(t,v3.default),S=t.name("outer");t.label(S).for((0,We._)`;${p}--;`,()=>t.for((0,We._)`${v} = ${p}; ${v}--;`,()=>t.if((0,We._)`${_}(${e}[${p}], ${e}[${v}])`,()=>{n.error(),t.assign(h,!1).break(S)})))}}};var x3=gc.default=w3;const b3=Pt({__proto__:null,default:x3},[gc]),S3=Et(b3);var _c={};Object.defineProperty(_c,"__esModule",{value:!0});const wc=Zt,k3=ce,C3=yc,T3={message:"must be equal to constant",params:({schemaCode:n})=>(0,wc._)`{allowedValue: ${n}}`},P3={keyword:"const",$data:!0,error:T3,code(n){const{gen:t,data:e,$data:r,schemaCode:i,schema:s}=n;r||s&&typeof s=="object"?n.fail$data((0,wc._)`!${(0,k3.useFunc)(t,C3.default)}(${e}, ${i})`):n.fail((0,wc._)`${s} !== ${e}`)}};var E3=_c.default=P3;const A3=Pt({__proto__:null,default:E3},[_c]),O3=Et(A3);var xc={};Object.defineProperty(xc,"__esModule",{value:!0});const Bs=Zt,$3=ce,F3=yc,N3={message:"must be equal to one of the allowed values",params:({schemaCode:n})=>(0,Bs._)`{allowedValues: ${n}}`},R3={keyword:"enum",schemaType:"array",$data:!0,error:N3,code(n){const{gen:t,data:e,$data:r,schema:i,schemaCode:s,it:a}=n;if(!r&&i.length===0)throw new Error("enum must have non-empty array");const o=i.length>=a.opts.loopEnum;let h;const l=()=>h??(h=(0,$3.useFunc)(t,F3.default));let c;if(o||r)c=t.let("valid"),n.block$data(c,f);else{if(!Array.isArray(i))throw new Error("ajv implementation error");const u=t.const("vSchema",s);c=(0,Bs.or)(...i.map((p,v)=>d(u,v)))}n.pass(c);function f(){t.assign(c,!1),t.forOf("v",s,u=>t.if((0,Bs._)`${l()}(${e}, ${u})`,()=>t.assign(c,!0).break()))}function d(u,p){const v=i[p];return typeof v=="object"&&v!==null?(0,Bs._)`${l()}(${e}, ${u}[${p}])`:(0,Bs._)`${e} === ${v}`}}};var D3=xc.default=R3;const M3=Pt({__proto__:null,default:D3},[xc]),I3=Et(M3);Object.defineProperty(ac,"__esModule",{value:!0});const j3=$5,L3=M5,U3=q5,G3=Z5,z3=r3,V3=h3,B3=p3,H3=S3,q3=O3,K3=I3,Y3=[j3.default,L3.default,U3.default,G3.default,z3.default,V3.default,B3.default,H3.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},q3.default,K3.default];var X3=ac.default=Y3;const J3=Pt({__proto__:null,default:X3},[ac]),Q3=Et(J3);var bc={},Hs={};Object.defineProperty(Hs,"__esModule",{value:!0});var Lp=Hs.validateAdditionalItems=void 0;const wi=Zt,Sc=ce,Z3={message:({params:{len:n}})=>(0,wi.str)`must NOT have more than ${n} items`,params:({params:{len:n}})=>(0,wi._)`{limit: ${n}}`},W3={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:Z3,code(n){const{parentSchema:t,it:e}=n,{items:r}=t;if(!Array.isArray(r)){(0,Sc.checkStrictMode)(e,'"additionalItems" is ignored when "items" is not an array of schemas');return}Up(n,r)}};function Up(n,t){const{gen:e,schema:r,data:i,keyword:s,it:a}=n;a.items=!0;const o=e.const("len",(0,wi._)`${i}.length`);if(r===!1)n.setParams({len:t.length}),n.pass((0,wi._)`${o} <= ${t.length}`);else if(typeof r=="object"&&!(0,Sc.alwaysValidSchema)(a,r)){const l=e.var("valid",(0,wi._)`${o} <= ${t.length}`);e.if((0,wi.not)(l),()=>h(l)),n.ok(l)}function h(l){e.forRange("i",t.length,o,c=>{n.subschema({keyword:s,dataProp:c,dataPropType:Sc.Type.Num},l),a.allErrors||e.if((0,wi.not)(l),()=>e.break())})}}Lp=Hs.validateAdditionalItems=Up;var t4=Hs.default=W3;const e4=Pt({__proto__:null,default:t4,get validateAdditionalItems(){return Lp}},[Hs]),Gp=Et(e4);var kc={},qs={};Object.defineProperty(qs,"__esModule",{value:!0});var zp=qs.validateTuple=void 0;const Vp=Zt,Ko=ce,n4=Hn,r4={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(n){const{schema:t,it:e}=n;if(Array.isArray(t))return Bp(n,"additionalItems",t);e.items=!0,!(0,Ko.alwaysValidSchema)(e,t)&&n.ok((0,n4.validateArray)(n))}};function Bp(n,t,e=n.schema){const{gen:r,parentSchema:i,data:s,keyword:a,it:o}=n;c(i),o.opts.unevaluated&&e.length&&o.items!==!0&&(o.items=Ko.mergeEvaluated.items(r,e.length,o.items));const h=r.name("valid"),l=r.const("len",(0,Vp._)`${s}.length`);e.forEach((f,d)=>{(0,Ko.alwaysValidSchema)(o,f)||(r.if((0,Vp._)`${l} > ${d}`,()=>n.subschema({keyword:a,schemaProp:d,dataProp:d},h)),n.ok(h))});function c(f){const{opts:d,errSchemaPath:u}=o,p=e.length,v=p===f.minItems&&(p===f.maxItems||f[t]===!1);if(d.strictTuples&&!v){const _=`"${a}" is ${p}-tuple, but minItems or maxItems/${t} are not specified or different at path "${u}"`;(0,Ko.checkStrictMode)(o,_,d.strictTuples)}}}zp=qs.validateTuple=Bp;var i4=qs.default=r4;const s4=Pt({__proto__:null,default:i4,get validateTuple(){return zp}},[qs]),Hp=Et(s4);Object.defineProperty(kc,"__esModule",{value:!0});const a4=Hp,o4={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:n=>(0,a4.validateTuple)(n,"items")};var l4=kc.default=o4;const h4=Pt({__proto__:null,default:l4},[kc]),c4=Et(h4);var Cc={};Object.defineProperty(Cc,"__esModule",{value:!0});const qp=Zt,u4=ce,d4=Hn,f4=Gp,p4={message:({params:{len:n}})=>(0,qp.str)`must NOT have more than ${n} items`,params:({params:{len:n}})=>(0,qp._)`{limit: ${n}}`},g4={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:p4,code(n){const{schema:t,parentSchema:e,it:r}=n,{prefixItems:i}=e;r.items=!0,!(0,u4.alwaysValidSchema)(r,t)&&(i?(0,f4.validateAdditionalItems)(n,i):n.ok((0,d4.validateArray)(n)))}};var m4=Cc.default=g4;const y4=Pt({__proto__:null,default:m4},[Cc]),v4=Et(y4);var Tc={};Object.defineProperty(Tc,"__esModule",{value:!0});const Rn=Zt,Yo=ce,_4={message:({params:{min:n,max:t}})=>t===void 0?(0,Rn.str)`must contain at least ${n} valid item(s)`:(0,Rn.str)`must contain at least ${n} and no more than ${t} valid item(s)`,params:({params:{min:n,max:t}})=>t===void 0?(0,Rn._)`{minContains: ${n}}`:(0,Rn._)`{minContains: ${n}, maxContains: ${t}}`},w4={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:_4,code(n){const{gen:t,schema:e,parentSchema:r,data:i,it:s}=n;let a,o;const{minContains:h,maxContains:l}=r;s.opts.next?(a=h===void 0?1:h,o=l):a=1;const c=t.const("len",(0,Rn._)`${i}.length`);if(n.setParams({min:a,max:o}),o===void 0&&a===0){(0,Yo.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(o!==void 0&&a>o){(0,Yo.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),n.fail();return}if((0,Yo.alwaysValidSchema)(s,e)){let v=(0,Rn._)`${c} >= ${a}`;o!==void 0&&(v=(0,Rn._)`${v} && ${c} <= ${o}`),n.pass(v);return}s.items=!0;const f=t.name("valid");o===void 0&&a===1?u(f,()=>t.if(f,()=>t.break())):a===0?(t.let(f,!0),o!==void 0&&t.if((0,Rn._)`${i}.length > 0`,d)):(t.let(f,!1),d()),n.result(f,()=>n.reset());function d(){const v=t.name("_valid"),_=t.let("count",0);u(v,()=>t.if(v,()=>p(_)))}function u(v,_){t.forRange("i",0,c,S=>{n.subschema({keyword:"contains",dataProp:S,dataPropType:Yo.Type.Num,compositeRule:!0},v),_()})}function p(v){t.code((0,Rn._)`${v}++`),o===void 0?t.if((0,Rn._)`${v} >= ${a}`,()=>t.assign(f,!0).break()):(t.if((0,Rn._)`${v} > ${o}`,()=>t.assign(f,!1).break()),a===1?t.assign(f,!0):t.if((0,Rn._)`${v} >= ${a}`,()=>t.assign(f,!0)))}}};var x4=Tc.default=w4;const b4=Pt({__proto__:null,default:x4},[Tc]),S4=Et(b4);var Pc={};(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.validateSchemaDeps=n.validatePropertyDeps=n.error=void 0;const t=Zt,e=ce,r=Hn;n.error={message:({params:{property:h,depsCount:l,deps:c}})=>{const f=l===1?"property":"properties";return(0,t.str)`must have ${f} ${c} when property ${h} is present`},params:({params:{property:h,depsCount:l,deps:c,missingProperty:f}})=>(0,t._)`{property: ${h},
16
+ `):"",this.name="UnsubscriptionError",this.errors=t}});function Io(n,t){if(n){var e=n.indexOf(t);0<=e&&n.splice(e,1)}}var Ds=function(){function n(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return n.prototype.unsubscribe=function(){var t,e,r,i,s;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var o=$c(a),l=o.next();!l.done;l=o.next()){var c=l.value;c.remove(this)}}catch(v){t={error:v}}finally{try{l&&!l.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}else a.remove(this);var h=this.initialTeardown;if(kr(h))try{h()}catch(v){s=v instanceof Fc?v.errors:[v]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var d=$c(f),u=d.next();!u.done;u=d.next()){var p=u.value;try{Qf(p)}catch(v){s=s??[],v instanceof Fc?s=Ms(Ms([],Rs(s)),Rs(v.errors)):s.push(v)}}}catch(v){r={error:v}}finally{try{u&&!u.done&&(i=d.return)&&i.call(d)}finally{if(r)throw r.error}}}if(s)throw new Fc(s)}},n.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)Qf(t);else{if(t instanceof n){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}},n.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},n.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},n.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&Io(e,t)},n.prototype.remove=function(t){var e=this._finalizers;e&&Io(e,t),t instanceof n&&t._removeParent(this)},n.EMPTY=function(){var t=new n;return t.closed=!0,t}(),n}(),Xf=Ds.EMPTY;function Jf(n){return n instanceof Ds||n&&"closed"in n&&kr(n.remove)&&kr(n.add)&&kr(n.unsubscribe)}function Qf(n){kr(n)?n():n.unsubscribe()}var Zf={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Tb={setTimeout:function(n,t){for(var e=[],r=2;r<arguments.length;r++)e[r-2]=arguments[r];return setTimeout.apply(void 0,Ms([n,t],Rs(e)))},clearTimeout:function(n){return clearTimeout(n)},delegate:void 0};function Eb(n){Tb.setTimeout(function(){throw n})}function Wf(){}function jo(n){n()}var Rc=function(n){Qr(t,n);function t(e){var r=n.call(this)||this;return r.isStopped=!1,e?(r.destination=e,Jf(e)&&e.add(r)):r.destination=$b,r}return t.create=function(e,r,i){return new Dc(e,r,i)},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,n.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(Ds),Pb=Function.prototype.bind;function Mc(n,t){return Pb.call(n,t)}var Ab=function(){function n(t){this.partialObserver=t}return n.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(r){Lo(r)}},n.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(r){Lo(r)}else Lo(t)},n.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(e){Lo(e)}},n}(),Dc=function(n){Qr(t,n);function t(e,r,i){var s=n.call(this)||this,a;if(kr(e)||!e)a={next:e??void 0,error:r??void 0,complete:i??void 0};else{var o;s&&Zf.useDeprecatedNextContext?(o=Object.create(e),o.unsubscribe=function(){return s.unsubscribe()},a={next:e.next&&Mc(e.next,o),error:e.error&&Mc(e.error,o),complete:e.complete&&Mc(e.complete,o)}):a=e}return s.destination=new Ab(a),s}return t}(Rc);function Lo(n){Eb(n)}function Ob(n){throw n}var $b={closed:!0,next:Wf,error:Ob,complete:Wf},Nb=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Fb(n){return n}function Rb(n){return n.length===0?Fb:n.length===1?n[0]:function(t){return n.reduce(function(e,r){return r(e)},t)}}var t0=function(){function n(t){t&&(this._subscribe=t)}return n.prototype.lift=function(t){var e=new n;return e.source=this,e.operator=t,e},n.prototype.subscribe=function(t,e,r){var i=this,s=Db(t)?t:new Dc(t,e,r);return jo(function(){var a=i,o=a.operator,l=a.source;s.add(o?o.call(s,l):l?i._subscribe(s):i._trySubscribe(s))}),s},n.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},n.prototype.forEach=function(t,e){var r=this;return e=e0(e),new e(function(i,s){var a=new Dc({next:function(o){try{t(o)}catch(l){s(l),a.unsubscribe()}},error:s,complete:i});r.subscribe(a)})},n.prototype._subscribe=function(t){var e;return(e=this.source)===null||e===void 0?void 0:e.subscribe(t)},n.prototype[Nb]=function(){return this},n.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Rb(t)(this)},n.prototype.toPromise=function(t){var e=this;return t=e0(t),new t(function(r,i){var s;e.subscribe(function(a){return s=a},function(a){return i(a)},function(){return r(s)})})},n.create=function(t){return new n(t)},n}();function e0(n){var t;return(t=n??Zf.Promise)!==null&&t!==void 0?t:Promise}function Mb(n){return n&&kr(n.next)&&kr(n.error)&&kr(n.complete)}function Db(n){return n&&n instanceof Rc||Mb(n)&&Jf(n)}(function(n){Qr(t,n);function t(e,r,i,s,a,o){var l=n.call(this,e)||this;return l.onFinalize=a,l.shouldUnsubscribe=o,l._next=r?function(c){try{r(c)}catch(h){e.error(h)}}:n.prototype._next,l._error=s?function(c){try{s(c)}catch(h){e.error(h)}finally{this.unsubscribe()}}:n.prototype._error,l._complete=i?function(){try{i()}catch(c){e.error(c)}finally{this.unsubscribe()}}:n.prototype._complete,l}return t.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;n.prototype.unsubscribe.call(this),!r&&((e=this.onFinalize)===null||e===void 0||e.call(this))}},t})(Rc);var Ib=Nc(function(n){return function(){n(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),jb=function(n){Qr(t,n);function t(){var e=n.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return t.prototype.lift=function(e){var r=new n0(this,this);return r.operator=e,r},t.prototype._throwIfClosed=function(){if(this.closed)throw new Ib},t.prototype.next=function(e){var r=this;jo(function(){var i,s;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=$c(r.currentObservers),o=a.next();!o.done;o=a.next()){var l=o.value;l.next(e)}}catch(c){i={error:c}}finally{try{o&&!o.done&&(s=a.return)&&s.call(a)}finally{if(i)throw i.error}}}})},t.prototype.error=function(e){var r=this;jo(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=e;for(var i=r.observers;i.length;)i.shift().error(e)}})},t.prototype.complete=function(){var e=this;jo(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var r=e.observers;r.length;)r.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return((e=this.observers)===null||e===void 0?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(e){return this._throwIfClosed(),n.prototype._trySubscribe.call(this,e)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var r=this,i=this,s=i.hasError,a=i.isStopped,o=i.observers;return s||a?Xf:(this.currentObservers=null,o.push(e),new Ds(function(){r.currentObservers=null,Io(o,e)}))},t.prototype._checkFinalizedStatuses=function(e){var r=this,i=r.hasError,s=r.thrownError,a=r.isStopped;i?e.error(s):a&&e.complete()},t.prototype.asObservable=function(){var e=new t0;return e.source=this,e},t.create=function(e,r){return new n0(e,r)},t}(t0),n0=function(n){Qr(t,n);function t(e,r){var i=n.call(this)||this;return i.destination=e,i.source=r,i}return t.prototype.next=function(e){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,e)},t.prototype.error=function(e){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,e)},t.prototype.complete=function(){var e,r;(r=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||r===void 0||r.call(e)},t.prototype._subscribe=function(e){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(e))!==null&&i!==void 0?i:Xf},t}(jb),Lb={now:function(){return Date.now()},delegate:void 0},Ub=function(n){Qr(t,n);function t(e,r){return n.call(this)||this}return t.prototype.schedule=function(e,r){return this},t}(Ds),Ic={setInterval:function(n,t){for(var e=[],r=2;r<arguments.length;r++)e[r-2]=arguments[r];var i=Ic.delegate;return i!=null&&i.setInterval?i.setInterval.apply(i,Ms([n,t],Rs(e))):setInterval.apply(void 0,Ms([n,t],Rs(e)))},clearInterval:function(n){return clearInterval(n)},delegate:void 0},Gb=function(n){Qr(t,n);function t(e,r){var i=n.call(this,e,r)||this;return i.scheduler=e,i.work=r,i.pending=!1,i}return t.prototype.schedule=function(e,r){var i;if(r===void 0&&(r=0),this.closed)return this;this.state=e;var s=this.id,a=this.scheduler;return s!=null&&(this.id=this.recycleAsyncId(a,s,r)),this.pending=!0,this.delay=r,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(a,this.id,r),this},t.prototype.requestAsyncId=function(e,r,i){return i===void 0&&(i=0),Ic.setInterval(e.flush.bind(e,this),i)},t.prototype.recycleAsyncId=function(e,r,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return r;r!=null&&Ic.clearInterval(r)},t.prototype.execute=function(e,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(e,r);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,r){var i=!1,s;try{this.work(e)}catch(a){i=!0,s=a||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),s},t.prototype.unsubscribe=function(){if(!this.closed){var e=this,r=e.id,i=e.scheduler,s=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,Io(s,this),r!=null&&(this.id=this.recycleAsyncId(i,r,null)),this.delay=null,n.prototype.unsubscribe.call(this)}},t}(Ub),r0=function(){function n(t,e){e===void 0&&(e=n.now),this.schedulerActionCtor=t,this.now=e}return n.prototype.schedule=function(t,e,r){return e===void 0&&(e=0),new this.schedulerActionCtor(this,t).schedule(r,e)},n.now=Lb.now,n}(),zb=function(n){Qr(t,n);function t(e,r){r===void 0&&(r=r0.now);var i=n.call(this,e,r)||this;return i.actions=[],i._active=!1,i}return t.prototype.flush=function(e){var r=this.actions;if(this._active){r.push(e);return}var i;this._active=!0;do if(i=e.execute(e.state,e.delay))break;while(e=r.shift());if(this._active=!1,i){for(;e=r.shift();)e.unsubscribe();throw i}},t}(r0);new zb(Gb);function Vb(n){switch(n.responseType){case"json":{if("response"in n)return n.response;var t=n;return JSON.parse(t.responseText)}case"document":return n.responseXML;case"text":default:{if("response"in n)return n.response;var t=n;return t.responseText}}}var i0=Nc(function(n){return function(t,e,r){this.message=t,this.name="AjaxError",this.xhr=e,this.request=r,this.status=e.status,this.responseType=e.responseType;var i;try{i=Vb(e)}catch{i=e.responseText}this.response=i}});(function(){function n(t,e){return i0.call(this,"ajax timeout",t,e),this.name="AjaxTimeoutError",this}return n.prototype=Object.create(i0.prototype),n})();var Bb=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function vn(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function At(n){if(n.__esModule)return n;var t=n.default;if(typeof t=="function"){var e=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};e.prototype=t.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(n).forEach(function(r){var i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(e,r,i.get?i:{enumerable:!0,get:function(){return n[r]}})}),e}var jc={exports:{}},Zi=typeof Reflect=="object"?Reflect:null,s0=Zi&&typeof Zi.apply=="function"?Zi.apply:function(n,t,e){return Function.prototype.apply.call(n,t,e)},Uo;Zi&&typeof Zi.ownKeys=="function"?Uo=Zi.ownKeys:Object.getOwnPropertySymbols?Uo=function(n){return Object.getOwnPropertyNames(n).concat(Object.getOwnPropertySymbols(n))}:Uo=function(n){return Object.getOwnPropertyNames(n)};function Hb(n){console&&console.warn&&console.warn(n)}var a0=Number.isNaN||function(n){return n!==n};function _e(){_e.init.call(this)}jc.exports=_e,jc.exports.once=Xb,_e.EventEmitter=_e,_e.prototype._events=void 0,_e.prototype._eventsCount=0,_e.prototype._maxListeners=void 0;var o0=10;function Go(n){if(typeof n!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof n)}Object.defineProperty(_e,"defaultMaxListeners",{enumerable:!0,get:function(){return o0},set:function(n){if(typeof n!="number"||n<0||a0(n))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+n+".");o0=n}}),_e.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},_e.prototype.setMaxListeners=function(n){if(typeof n!="number"||n<0||a0(n))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+n+".");return this._maxListeners=n,this};function l0(n){return n._maxListeners===void 0?_e.defaultMaxListeners:n._maxListeners}_e.prototype.getMaxListeners=function(){return l0(this)},_e.prototype.emit=function(n){for(var t=[],e=1;e<arguments.length;e++)t.push(arguments[e]);var r=n==="error",i=this._events;if(i!==void 0)r=r&&i.error===void 0;else if(!r)return!1;if(r){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var o=i[n];if(o===void 0)return!1;if(typeof o=="function")s0(o,this,t);else for(var l=o.length,c=f0(o,l),e=0;e<l;++e)s0(c[e],this,t);return!0};function c0(n,t,e,r){var i,s,a;if(Go(e),s=n._events,s===void 0?(s=n._events=Object.create(null),n._eventsCount=0):(s.newListener!==void 0&&(n.emit("newListener",t,e.listener?e.listener:e),s=n._events),a=s[t]),a===void 0)a=s[t]=e,++n._eventsCount;else if(typeof a=="function"?a=s[t]=r?[e,a]:[a,e]:r?a.unshift(e):a.push(e),i=l0(n),i>0&&a.length>i&&!a.warned){a.warned=!0;var o=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");o.name="MaxListenersExceededWarning",o.emitter=n,o.type=t,o.count=a.length,Hb(o)}return n}_e.prototype.addListener=function(n,t){return c0(this,n,t,!1)},_e.prototype.on=_e.prototype.addListener,_e.prototype.prependListener=function(n,t){return c0(this,n,t,!0)};function qb(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h0(n,t,e){var r={fired:!1,wrapFn:void 0,target:n,type:t,listener:e},i=qb.bind(r);return i.listener=e,r.wrapFn=i,i}_e.prototype.once=function(n,t){return Go(t),this.on(n,h0(this,n,t)),this},_e.prototype.prependOnceListener=function(n,t){return Go(t),this.prependListener(n,h0(this,n,t)),this},_e.prototype.removeListener=function(n,t){var e,r,i,s,a;if(Go(t),r=this._events,r===void 0)return this;if(e=r[n],e===void 0)return this;if(e===t||e.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete r[n],r.removeListener&&this.emit("removeListener",n,e.listener||t));else if(typeof e!="function"){for(i=-1,s=e.length-1;s>=0;s--)if(e[s]===t||e[s].listener===t){a=e[s].listener,i=s;break}if(i<0)return this;i===0?e.shift():Yb(e,i),e.length===1&&(r[n]=e[0]),r.removeListener!==void 0&&this.emit("removeListener",n,a||t)}return this},_e.prototype.off=_e.prototype.removeListener,_e.prototype.removeAllListeners=function(n){var t,e,r;if(e=this._events,e===void 0)return this;if(e.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):e[n]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete e[n]),this;if(arguments.length===0){var i=Object.keys(e),s;for(r=0;r<i.length;++r)s=i[r],s!=="removeListener"&&this.removeAllListeners(s);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(t=e[n],typeof t=="function")this.removeListener(n,t);else if(t!==void 0)for(r=t.length-1;r>=0;r--)this.removeListener(n,t[r]);return this};function u0(n,t,e){var r=n._events;if(r===void 0)return[];var i=r[t];return i===void 0?[]:typeof i=="function"?e?[i.listener||i]:[i]:e?Kb(i):f0(i,i.length)}_e.prototype.listeners=function(n){return u0(this,n,!0)},_e.prototype.rawListeners=function(n){return u0(this,n,!1)},_e.listenerCount=function(n,t){return typeof n.listenerCount=="function"?n.listenerCount(t):d0.call(n,t)},_e.prototype.listenerCount=d0;function d0(n){var t=this._events;if(t!==void 0){var e=t[n];if(typeof e=="function")return 1;if(e!==void 0)return e.length}return 0}_e.prototype.eventNames=function(){return this._eventsCount>0?Uo(this._events):[]};function f0(n,t){for(var e=new Array(t),r=0;r<t;++r)e[r]=n[r];return e}function Yb(n,t){for(;t+1<n.length;t++)n[t]=n[t+1];n.pop()}function Kb(n){for(var t=new Array(n.length),e=0;e<t.length;++e)t[e]=n[e].listener||n[e];return t}function Xb(n,t){return new Promise(function(e,r){function i(a){n.removeListener(t,s),r(a)}function s(){typeof n.removeListener=="function"&&n.removeListener("error",i),e([].slice.call(arguments))}p0(n,t,s,{once:!0}),t!=="error"&&Jb(n,i,{once:!0})})}function Jb(n,t,e){typeof n.on=="function"&&p0(n,"error",t,e)}function p0(n,t,e,r){if(typeof n.on=="function")r.once?n.once(t,e):n.on(t,e);else if(typeof n.addEventListener=="function")n.addEventListener(t,function i(s){r.once&&n.removeEventListener(t,i),e(s)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof n)}var Qb=jc.exports;class h$ extends Qb.EventEmitter{constructor(){super()}on(t,e){return super.on(t,e)}addListener(t,e){return this.on(t,e)}prependListener(t,e){return super.prependListener(t,e)}once(t,e){return super.once(t,e)}prependOnceListener(t,e){return super.prependOnceListener(t,e)}removeListener(t,e){return super.removeListener(t,e)}off(t,e){return super.off(t,e)}removeAllListeners(t){return super.removeAllListeners(t)}emit(t,...e){return super.emit(t,...e)}listeners(t){return super.listeners(t)}rawListeners(t){return super.rawListeners(t)}listenerCount(t){return super.listenerCount(t)}}var g0=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function Zb(n,t={}){var e=1,r=1;function i(st){var K=st.match(/\n/g);K&&(e+=K.length);var $=st.lastIndexOf(`
17
+ `);r=~$?st.length-$:r+st.length}function s(){var st={line:e,column:r};return function(K){return K.position=new a(st),p(),K}}function a(st){this.start=st,this.end={line:e,column:r},this.source=t.source}a.prototype.content=n;var o=[];function l(st){var K=new Error(t.source+":"+e+":"+r+": "+st);if(K.reason=st,K.filename=t.source,K.line=e,K.column=r,K.source=n,t.silent)o.push(K);else throw K}function c(){var st=d();return{type:"stylesheet",stylesheet:{source:t.source,rules:st,parsingErrors:o}}}function h(){return u(/^{\s*/)}function f(){return u(/^}/)}function d(){var st,K=[];for(p(),v(K);n.length&&n.charAt(0)!="}"&&(st=St()||xt());)st!==!1&&(K.push(st),v(K));return K}function u(st){var K=st.exec(n);if(K){var $=K[0];return i($),n=n.slice($.length),K}}function p(){u(/^\s*/)}function v(st){var K;for(st=st||[];K=_();)K!==!1&&st.push(K);return st}function _(){var st=s();if(!(n.charAt(0)!="/"||n.charAt(1)!="*")){for(var K=2;n.charAt(K)!=""&&(n.charAt(K)!="*"||n.charAt(K+1)!="/");)++K;if(K+=2,n.charAt(K-1)==="")return l("End of comment missing");var $=n.slice(2,K-2);return r+=2,i($),n=n.slice(K),r+=2,st({type:"comment",comment:$})}}function x(){var st=u(/^([^{]+)/);if(st)return Cr(st[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(K){return K.replace(/,/g,"‌")}).split(/\s*(?![^(]*\)),\s*/).map(function(K){return K.replace(/\u200C/g,",")})}function b(){var st=s(),K=u(/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(K){if(K=Cr(K[0]),!u(/^:\s*/))return l("property missing ':'");var $=u(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/),P=st({type:"declaration",property:K.replace(g0,""),value:$?Cr($[0]).replace(g0,""):""});return u(/^[;\s]*/),P}}function m(){var st=[];if(!h())return l("missing '{'");v(st);for(var K;K=b();)K!==!1&&(st.push(K),v(st));return f()?st:l("missing '}'")}function k(){for(var st,K=[],$=s();st=u(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)K.push(st[1]),u(/^,\s*/);if(K.length)return $({type:"keyframe",values:K,declarations:m()})}function O(){var st=s(),K=u(/^@([-\w]+)?keyframes\s*/);if(K){var $=K[1];if(K=u(/^([-\w]+)\s*/),!K)return l("@keyframes missing name");var P=K[1];if(!h())return l("@keyframes missing '{'");for(var E,C=v();E=k();)C.push(E),C=C.concat(v());return f()?st({type:"keyframes",name:P,vendor:$,keyframes:C}):l("@keyframes missing '}'")}}function T(){var st=s(),K=u(/^@supports *([^{]+)/);if(K){var $=Cr(K[1]);if(!h())return l("@supports missing '{'");var P=v().concat(d());return f()?st({type:"supports",supports:$,rules:P}):l("@supports missing '}'")}}function F(){var st=s(),K=u(/^@host\s*/);if(K){if(!h())return l("@host missing '{'");var $=v().concat(d());return f()?st({type:"host",rules:$}):l("@host missing '}'")}}function R(){var st=s(),K=u(/^@media *([^{]+)/);if(K){var $=Cr(K[1]);if(!h())return l("@media missing '{'");var P=v().concat(d());return f()?st({type:"media",media:$,rules:P}):l("@media missing '}'")}}function L(){var st=s(),K=u(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(K)return st({type:"custom-media",name:Cr(K[1]),media:Cr(K[2])})}function U(){var st=s(),K=u(/^@page */);if(K){var $=x()||[];if(!h())return l("@page missing '{'");for(var P=v(),E;E=b();)P.push(E),P=P.concat(v());return f()?st({type:"page",selectors:$,declarations:P}):l("@page missing '}'")}}function B(){var st=s(),K=u(/^@([-\w]+)?document *([^{]+)/);if(K){var $=Cr(K[1]),P=Cr(K[2]);if(!h())return l("@document missing '{'");var E=v().concat(d());return f()?st({type:"document",document:P,vendor:$,rules:E}):l("@document missing '}'")}}function Y(){var st=s(),K=u(/^@font-face\s*/);if(K){if(!h())return l("@font-face missing '{'");for(var $=v(),P;P=b();)$.push(P),$=$.concat(v());return f()?st({type:"font-face",declarations:$}):l("@font-face missing '}'")}}var tt=wt("import"),W=wt("charset"),ct=wt("namespace");function wt(st){var K=new RegExp("^@"+st+"\\s*([^;]+);");return function(){var $=s(),P=u(K);if(P){var E={type:st};return E[st]=P[1].trim(),$(E)}}}function St(){if(n[0]=="@")return O()||R()||L()||T()||tt()||W()||ct()||B()||U()||F()||Y()}function xt(){var st=s(),K=x();return K?(v(),st({type:"rule",selectors:K,declarations:m()})):l("selector missing")}return Lc(c())}function Cr(n){return n?n.replace(/^\s+|\s+$/g,""):""}function Lc(n,t){var e=n&&typeof n.type=="string",r=e?n:t;for(var i in n){var s=n[i];Array.isArray(s)?s.forEach(function(a){Lc(a,r)}):s&&typeof s=="object"&&Lc(s,r)}return e&&Object.defineProperty(n,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),n}var Uc={exports:{}},Gc={},Tr={},yi={},zc={},Vc={},Bc={};(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.regexpCode=n.getEsmExportName=n.getProperty=n.safeStringify=n.stringify=n.strConcat=n.addCodeArg=n.str=n._=n.nil=n._Code=n.Name=n.IDENTIFIER=n._CodeOrName=void 0;class t{}n._CodeOrName=t,n.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class e extends t{constructor(b){if(super(),!n.IDENTIFIER.test(b))throw new Error("CodeGen: name must be a valid identifier");this.str=b}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}n.Name=e;class r extends t{constructor(b){super(),this._items=typeof b=="string"?[b]:b}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const b=this._items[0];return b===""||b==='""'}get str(){var b;return(b=this._str)!==null&&b!==void 0?b:this._str=this._items.reduce((m,k)=>`${m}${k}`,"")}get names(){var b;return(b=this._names)!==null&&b!==void 0?b:this._names=this._items.reduce((m,k)=>(k instanceof e&&(m[k.str]=(m[k.str]||0)+1),m),{})}}n._Code=r,n.nil=new r("");function i(x,...b){const m=[x[0]];let k=0;for(;k<b.length;)o(m,b[k]),m.push(x[++k]);return new r(m)}n._=i;const s=new r("+");function a(x,...b){const m=[u(x[0])];let k=0;for(;k<b.length;)m.push(s),o(m,b[k]),m.push(s,u(x[++k]));return l(m),new r(m)}n.str=a;function o(x,b){b instanceof r?x.push(...b._items):b instanceof e?x.push(b):x.push(f(b))}n.addCodeArg=o;function l(x){let b=1;for(;b<x.length-1;){if(x[b]===s){const m=c(x[b-1],x[b+1]);if(m!==void 0){x.splice(b-1,3,m);continue}x[b++]="+"}b++}}function c(x,b){if(b==='""')return x;if(x==='""')return b;if(typeof x=="string")return b instanceof e||x[x.length-1]!=='"'?void 0:typeof b!="string"?`${x.slice(0,-1)}${b}"`:b[0]==='"'?x.slice(0,-1)+b.slice(1):void 0;if(typeof b=="string"&&b[0]==='"'&&!(x instanceof e))return`"${x}${b.slice(1)}`}function h(x,b){return b.emptyStr()?x:x.emptyStr()?b:a`${x}${b}`}n.strConcat=h;function f(x){return typeof x=="number"||typeof x=="boolean"||x===null?x:u(Array.isArray(x)?x.join(","):x)}function d(x){return new r(u(x))}n.stringify=d;function u(x){return JSON.stringify(x).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}n.safeStringify=u;function p(x){return typeof x=="string"&&n.IDENTIFIER.test(x)?new r(`.${x}`):i`[${x}]`}n.getProperty=p;function v(x){if(typeof x=="string"&&n.IDENTIFIER.test(x))return new r(`${x}`);throw new Error(`CodeGen: invalid export name: ${x}, use explicit $id name mapping`)}n.getEsmExportName=v;function _(x){return new r(x.toString())}n.regexpCode=_})(Bc);const Wb=vn(Bc),tw=Pt({__proto__:null,default:Wb},[Bc]),Is=At(tw);var Hc={};(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.ValueScope=n.ValueScopeName=n.Scope=n.varKinds=n.UsedValueState=void 0;const t=Is;class e extends Error{constructor(c){super(`CodeGen: "code" for ${c} not defined`),this.value=c.value}}var r;(function(l){l[l.Started=0]="Started",l[l.Completed=1]="Completed"})(r=n.UsedValueState||(n.UsedValueState={})),n.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class i{constructor({prefixes:c,parent:h}={}){this._names={},this._prefixes=c,this._parent=h}toName(c){return c instanceof t.Name?c:this.name(c)}name(c){return new t.Name(this._newName(c))}_newName(c){const h=this._names[c]||this._nameGroup(c);return`${c}${h.index++}`}_nameGroup(c){var h,f;if(!((f=(h=this._parent)===null||h===void 0?void 0:h._prefixes)===null||f===void 0)&&f.has(c)||this._prefixes&&!this._prefixes.has(c))throw new Error(`CodeGen: prefix "${c}" is not allowed in this scope`);return this._names[c]={prefix:c,index:0}}}n.Scope=i;class s extends t.Name{constructor(c,h){super(h),this.prefix=c}setValue(c,{property:h,itemIndex:f}){this.value=c,this.scopePath=(0,t._)`.${new t.Name(h)}[${f}]`}}n.ValueScopeName=s;const a=(0,t._)`\n`;class o extends i{constructor(c){super(c),this._values={},this._scope=c.scope,this.opts={...c,_n:c.lines?a:t.nil}}get(){return this._scope}name(c){return new s(c,this._newName(c))}value(c,h){var f;if(h.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const d=this.toName(c),{prefix:u}=d,p=(f=h.key)!==null&&f!==void 0?f:h.ref;let v=this._values[u];if(v){const b=v.get(p);if(b)return b}else v=this._values[u]=new Map;v.set(p,d);const _=this._scope[u]||(this._scope[u]=[]),x=_.length;return _[x]=h.ref,d.setValue(h,{property:u,itemIndex:x}),d}getValue(c,h){const f=this._values[c];if(f)return f.get(h)}scopeRefs(c,h=this._values){return this._reduceValues(h,f=>{if(f.scopePath===void 0)throw new Error(`CodeGen: name "${f}" has no value`);return(0,t._)`${c}${f.scopePath}`})}scopeCode(c=this._values,h,f){return this._reduceValues(c,d=>{if(d.value===void 0)throw new Error(`CodeGen: name "${d}" has no value`);return d.value.code},h,f)}_reduceValues(c,h,f={},d){let u=t.nil;for(const p in c){const v=c[p];if(!v)continue;const _=f[p]=f[p]||new Map;v.forEach(x=>{if(_.has(x))return;_.set(x,r.Started);let b=h(x);if(b){const m=this.opts.es5?n.varKinds.var:n.varKinds.const;u=(0,t._)`${u}${m} ${x} = ${b};${this.opts._n}`}else if(b=d==null?void 0:d(x))u=(0,t._)`${u}${b}${this.opts._n}`;else throw new e(x);_.set(x,r.Completed)})}return u}}n.ValueScope=o})(Hc);const ew=vn(Hc),nw=Pt({__proto__:null,default:ew},[Hc]),m0=At(nw);(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.or=n.and=n.not=n.CodeGen=n.operators=n.varKinds=n.ValueScopeName=n.ValueScope=n.Scope=n.Name=n.regexpCode=n.stringify=n.getProperty=n.nil=n.strConcat=n.str=n._=void 0;const t=Is,e=m0;var r=Is;Object.defineProperty(n,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(n,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(n,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(n,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(n,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(n,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(n,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(n,"Name",{enumerable:!0,get:function(){return r.Name}});var i=m0;Object.defineProperty(n,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(n,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(n,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(n,"varKinds",{enumerable:!0,get:function(){return i.varKinds}}),n.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class s{optimizeNodes(){return this}optimizeNames(C,M){return this}}class a extends s{constructor(C,M,G){super(),this.varKind=C,this.name=M,this.rhs=G}render({es5:C,_n:M}){const G=C?e.varKinds.var:this.varKind,D=this.rhs===void 0?"":` = ${this.rhs}`;return`${G} ${this.name}${D};`+M}optimizeNames(C,M){if(C[this.name.str])return this.rhs&&(this.rhs=W(this.rhs,C,M)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class o extends s{constructor(C,M,G){super(),this.lhs=C,this.rhs=M,this.sideEffects=G}render({_n:C}){return`${this.lhs} = ${this.rhs};`+C}optimizeNames(C,M){if(!(this.lhs instanceof t.Name&&!C[this.lhs.str]&&!this.sideEffects))return this.rhs=W(this.rhs,C,M),this}get names(){const C=this.lhs instanceof t.Name?{}:{...this.lhs.names};return tt(C,this.rhs)}}class l extends o{constructor(C,M,G,D){super(C,G,D),this.op=M}render({_n:C}){return`${this.lhs} ${this.op}= ${this.rhs};`+C}}class c extends s{constructor(C){super(),this.label=C,this.names={}}render({_n:C}){return`${this.label}:`+C}}class h extends s{constructor(C){super(),this.label=C,this.names={}}render({_n:C}){return`break${this.label?` ${this.label}`:""};`+C}}class f extends s{constructor(C){super(),this.error=C}render({_n:C}){return`throw ${this.error};`+C}get names(){return this.error.names}}class d extends s{constructor(C){super(),this.code=C}render({_n:C}){return`${this.code};`+C}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(C,M){return this.code=W(this.code,C,M),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class u extends s{constructor(C=[]){super(),this.nodes=C}render(C){return this.nodes.reduce((M,G)=>M+G.render(C),"")}optimizeNodes(){const{nodes:C}=this;let M=C.length;for(;M--;){const G=C[M].optimizeNodes();Array.isArray(G)?C.splice(M,1,...G):G?C[M]=G:C.splice(M,1)}return C.length>0?this:void 0}optimizeNames(C,M){const{nodes:G}=this;let D=G.length;for(;D--;){const V=G[D];V.optimizeNames(C,M)||(ct(C,V.names),G.splice(D,1))}return G.length>0?this:void 0}get names(){return this.nodes.reduce((C,M)=>Y(C,M.names),{})}}class p extends u{render(C){return"{"+C._n+super.render(C)+"}"+C._n}}class v extends u{}class _ extends p{}_.kind="else";class x extends p{constructor(C,M){super(M),this.condition=C}render(C){let M=`if(${this.condition})`+super.render(C);return this.else&&(M+="else "+this.else.render(C)),M}optimizeNodes(){super.optimizeNodes();const C=this.condition;if(C===!0)return this.nodes;let M=this.else;if(M){const G=M.optimizeNodes();M=this.else=Array.isArray(G)?new _(G):G}if(M)return C===!1?M instanceof x?M:M.nodes:this.nodes.length?this:new x(wt(C),M instanceof x?[M]:M.nodes);if(!(C===!1||!this.nodes.length))return this}optimizeNames(C,M){var G;if(this.else=(G=this.else)===null||G===void 0?void 0:G.optimizeNames(C,M),!!(super.optimizeNames(C,M)||this.else))return this.condition=W(this.condition,C,M),this}get names(){const C=super.names;return tt(C,this.condition),this.else&&Y(C,this.else.names),C}}x.kind="if";class b extends p{}b.kind="for";class m extends b{constructor(C){super(),this.iteration=C}render(C){return`for(${this.iteration})`+super.render(C)}optimizeNames(C,M){if(super.optimizeNames(C,M))return this.iteration=W(this.iteration,C,M),this}get names(){return Y(super.names,this.iteration.names)}}class k extends b{constructor(C,M,G,D){super(),this.varKind=C,this.name=M,this.from=G,this.to=D}render(C){const M=C.es5?e.varKinds.var:this.varKind,{name:G,from:D,to:V}=this;return`for(${M} ${G}=${D}; ${G}<${V}; ${G}++)`+super.render(C)}get names(){const C=tt(super.names,this.from);return tt(C,this.to)}}class O extends b{constructor(C,M,G,D){super(),this.loop=C,this.varKind=M,this.name=G,this.iterable=D}render(C){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(C)}optimizeNames(C,M){if(super.optimizeNames(C,M))return this.iterable=W(this.iterable,C,M),this}get names(){return Y(super.names,this.iterable.names)}}class T extends p{constructor(C,M,G){super(),this.name=C,this.args=M,this.async=G}render(C){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(C)}}T.kind="func";class F extends u{render(C){return"return "+super.render(C)}}F.kind="return";class R extends p{render(C){let M="try"+super.render(C);return this.catch&&(M+=this.catch.render(C)),this.finally&&(M+=this.finally.render(C)),M}optimizeNodes(){var C,M;return super.optimizeNodes(),(C=this.catch)===null||C===void 0||C.optimizeNodes(),(M=this.finally)===null||M===void 0||M.optimizeNodes(),this}optimizeNames(C,M){var G,D;return super.optimizeNames(C,M),(G=this.catch)===null||G===void 0||G.optimizeNames(C,M),(D=this.finally)===null||D===void 0||D.optimizeNames(C,M),this}get names(){const C=super.names;return this.catch&&Y(C,this.catch.names),this.finally&&Y(C,this.finally.names),C}}class L extends p{constructor(C){super(),this.error=C}render(C){return`catch(${this.error})`+super.render(C)}}L.kind="catch";class U extends p{render(C){return"finally"+super.render(C)}}U.kind="finally";class B{constructor(C,M={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...M,_n:M.lines?`
18
+ `:""},this._extScope=C,this._scope=new e.Scope({parent:C}),this._nodes=[new v]}toString(){return this._root.render(this.opts)}name(C){return this._scope.name(C)}scopeName(C){return this._extScope.name(C)}scopeValue(C,M){const G=this._extScope.value(C,M);return(this._values[G.prefix]||(this._values[G.prefix]=new Set)).add(G),G}getScopeValue(C,M){return this._extScope.getValue(C,M)}scopeRefs(C){return this._extScope.scopeRefs(C,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(C,M,G,D){const V=this._scope.toName(M);return G!==void 0&&D&&(this._constants[V.str]=G),this._leafNode(new a(C,V,G)),V}const(C,M,G){return this._def(e.varKinds.const,C,M,G)}let(C,M,G){return this._def(e.varKinds.let,C,M,G)}var(C,M,G){return this._def(e.varKinds.var,C,M,G)}assign(C,M,G){return this._leafNode(new o(C,M,G))}add(C,M){return this._leafNode(new l(C,n.operators.ADD,M))}code(C){return typeof C=="function"?C():C!==t.nil&&this._leafNode(new d(C)),this}object(...C){const M=["{"];for(const[G,D]of C)M.length>1&&M.push(","),M.push(G),(G!==D||this.opts.es5)&&(M.push(":"),(0,t.addCodeArg)(M,D));return M.push("}"),new t._Code(M)}if(C,M,G){if(this._blockNode(new x(C)),M&&G)this.code(M).else().code(G).endIf();else if(M)this.code(M).endIf();else if(G)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(C){return this._elseNode(new x(C))}else(){return this._elseNode(new _)}endIf(){return this._endBlockNode(x,_)}_for(C,M){return this._blockNode(C),M&&this.code(M).endFor(),this}for(C,M){return this._for(new m(C),M)}forRange(C,M,G,D,V=this.opts.es5?e.varKinds.var:e.varKinds.let){const q=this._scope.toName(C);return this._for(new k(V,q,M,G),()=>D(q))}forOf(C,M,G,D=e.varKinds.const){const V=this._scope.toName(C);if(this.opts.es5){const q=M instanceof t.Name?M:this.var("_arr",M);return this.forRange("_i",0,(0,t._)`${q}.length`,Z=>{this.var(V,(0,t._)`${q}[${Z}]`),G(V)})}return this._for(new O("of",D,V,M),()=>G(V))}forIn(C,M,G,D=this.opts.es5?e.varKinds.var:e.varKinds.const){if(this.opts.ownProperties)return this.forOf(C,(0,t._)`Object.keys(${M})`,G);const V=this._scope.toName(C);return this._for(new O("in",D,V,M),()=>G(V))}endFor(){return this._endBlockNode(b)}label(C){return this._leafNode(new c(C))}break(C){return this._leafNode(new h(C))}return(C){const M=new F;if(this._blockNode(M),this.code(C),M.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(F)}try(C,M,G){if(!M&&!G)throw new Error('CodeGen: "try" without "catch" and "finally"');const D=new R;if(this._blockNode(D),this.code(C),M){const V=this.name("e");this._currNode=D.catch=new L(V),M(V)}return G&&(this._currNode=D.finally=new U,this.code(G)),this._endBlockNode(L,U)}throw(C){return this._leafNode(new f(C))}block(C,M){return this._blockStarts.push(this._nodes.length),C&&this.code(C).endBlock(M),this}endBlock(C){const M=this._blockStarts.pop();if(M===void 0)throw new Error("CodeGen: not in self-balancing block");const G=this._nodes.length-M;if(G<0||C!==void 0&&G!==C)throw new Error(`CodeGen: wrong number of nodes: ${G} vs ${C} expected`);return this._nodes.length=M,this}func(C,M=t.nil,G,D){return this._blockNode(new T(C,M,G)),D&&this.code(D).endFunc(),this}endFunc(){return this._endBlockNode(T)}optimize(C=1){for(;C-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(C){return this._currNode.nodes.push(C),this}_blockNode(C){this._currNode.nodes.push(C),this._nodes.push(C)}_endBlockNode(C,M){const G=this._currNode;if(G instanceof C||M&&G instanceof M)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${M?`${C.kind}/${M.kind}`:C.kind}"`)}_elseNode(C){const M=this._currNode;if(!(M instanceof x))throw new Error('CodeGen: "else" without "if"');return this._currNode=M.else=C,this}get _root(){return this._nodes[0]}get _currNode(){const C=this._nodes;return C[C.length-1]}set _currNode(C){const M=this._nodes;M[M.length-1]=C}}n.CodeGen=B;function Y(E,C){for(const M in C)E[M]=(E[M]||0)+(C[M]||0);return E}function tt(E,C){return C instanceof t._CodeOrName?Y(E,C.names):E}function W(E,C,M){if(E instanceof t.Name)return G(E);if(!D(E))return E;return new t._Code(E._items.reduce((V,q)=>(q instanceof t.Name&&(q=G(q)),q instanceof t._Code?V.push(...q._items):V.push(q),V),[]));function G(V){const q=M[V.str];return q===void 0||C[V.str]!==1?V:(delete C[V.str],q)}function D(V){return V instanceof t._Code&&V._items.some(q=>q instanceof t.Name&&C[q.str]===1&&M[q.str]!==void 0)}}function ct(E,C){for(const M in C)E[M]=(E[M]||0)-(C[M]||0)}function wt(E){return typeof E=="boolean"||typeof E=="number"||E===null?!E:(0,t._)`!${P(E)}`}n.not=wt;const St=$(n.operators.AND);function xt(...E){return E.reduce(St)}n.and=xt;const st=$(n.operators.OR);function K(...E){return E.reduce(st)}n.or=K;function $(E){return(C,M)=>C===t.nil?M:M===t.nil?C:(0,t._)`${P(C)} ${E} ${P(M)}`}function P(E){return E instanceof t.Name?E:(0,t._)`(${E})`}})(Vc);const rw=vn(Vc),iw=Pt({__proto__:null,default:rw},[Vc]),te=At(iw);var qc={};(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.checkStrictMode=n.getErrorPath=n.Type=n.useFunc=n.setEvaluated=n.evaluatedPropsToName=n.mergeEvaluated=n.eachItem=n.unescapeJsonPointer=n.escapeJsonPointer=n.escapeFragment=n.unescapeFragment=n.schemaRefOrVal=n.schemaHasRulesButRef=n.schemaHasRules=n.checkUnknownRules=n.alwaysValidSchema=n.toHash=void 0;const t=te,e=Is;function r(T){const F={};for(const R of T)F[R]=!0;return F}n.toHash=r;function i(T,F){return typeof F=="boolean"?F:Object.keys(F).length===0?!0:(s(T,F),!a(F,T.self.RULES.all))}n.alwaysValidSchema=i;function s(T,F=T.schema){const{opts:R,self:L}=T;if(!R.strictSchema||typeof F=="boolean")return;const U=L.RULES.keywords;for(const B in F)U[B]||O(T,`unknown keyword: "${B}"`)}n.checkUnknownRules=s;function a(T,F){if(typeof T=="boolean")return!T;for(const R in T)if(F[R])return!0;return!1}n.schemaHasRules=a;function o(T,F){if(typeof T=="boolean")return!T;for(const R in T)if(R!=="$ref"&&F.all[R])return!0;return!1}n.schemaHasRulesButRef=o;function l({topSchemaRef:T,schemaPath:F},R,L,U){if(!U){if(typeof R=="number"||typeof R=="boolean")return R;if(typeof R=="string")return(0,t._)`${R}`}return(0,t._)`${T}${F}${(0,t.getProperty)(L)}`}n.schemaRefOrVal=l;function c(T){return d(decodeURIComponent(T))}n.unescapeFragment=c;function h(T){return encodeURIComponent(f(T))}n.escapeFragment=h;function f(T){return typeof T=="number"?`${T}`:T.replace(/~/g,"~0").replace(/\//g,"~1")}n.escapeJsonPointer=f;function d(T){return T.replace(/~1/g,"/").replace(/~0/g,"~")}n.unescapeJsonPointer=d;function u(T,F){if(Array.isArray(T))for(const R of T)F(R);else F(T)}n.eachItem=u;function p({mergeNames:T,mergeToName:F,mergeValues:R,resultToName:L}){return(U,B,Y,tt)=>{const W=Y===void 0?B:Y instanceof t.Name?(B instanceof t.Name?T(U,B,Y):F(U,B,Y),Y):B instanceof t.Name?(F(U,Y,B),B):R(B,Y);return tt===t.Name&&!(W instanceof t.Name)?L(U,W):W}}n.mergeEvaluated={props:p({mergeNames:(T,F,R)=>T.if((0,t._)`${R} !== true && ${F} !== undefined`,()=>{T.if((0,t._)`${F} === true`,()=>T.assign(R,!0),()=>T.assign(R,(0,t._)`${R} || {}`).code((0,t._)`Object.assign(${R}, ${F})`))}),mergeToName:(T,F,R)=>T.if((0,t._)`${R} !== true`,()=>{F===!0?T.assign(R,!0):(T.assign(R,(0,t._)`${R} || {}`),_(T,R,F))}),mergeValues:(T,F)=>T===!0?!0:{...T,...F},resultToName:v}),items:p({mergeNames:(T,F,R)=>T.if((0,t._)`${R} !== true && ${F} !== undefined`,()=>T.assign(R,(0,t._)`${F} === true ? true : ${R} > ${F} ? ${R} : ${F}`)),mergeToName:(T,F,R)=>T.if((0,t._)`${R} !== true`,()=>T.assign(R,F===!0?!0:(0,t._)`${R} > ${F} ? ${R} : ${F}`)),mergeValues:(T,F)=>T===!0?!0:Math.max(T,F),resultToName:(T,F)=>T.var("items",F)})};function v(T,F){if(F===!0)return T.var("props",!0);const R=T.var("props",(0,t._)`{}`);return F!==void 0&&_(T,R,F),R}n.evaluatedPropsToName=v;function _(T,F,R){Object.keys(R).forEach(L=>T.assign((0,t._)`${F}${(0,t.getProperty)(L)}`,!0))}n.setEvaluated=_;const x={};function b(T,F){return T.scopeValue("func",{ref:F,code:x[F.code]||(x[F.code]=new e._Code(F.code))})}n.useFunc=b;var m;(function(T){T[T.Num=0]="Num",T[T.Str=1]="Str"})(m=n.Type||(n.Type={}));function k(T,F,R){if(T instanceof t.Name){const L=F===m.Num;return R?L?(0,t._)`"[" + ${T} + "]"`:(0,t._)`"['" + ${T} + "']"`:L?(0,t._)`"/" + ${T}`:(0,t._)`"/" + ${T}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return R?(0,t.getProperty)(T).toString():"/"+f(T)}n.getErrorPath=k;function O(T,F,R=T.opts.strictSchema){if(R){if(F=`strict mode: ${F}`,R===!0)throw new Error(F);T.self.logger.warn(F)}}n.checkStrictMode=O})(qc);const sw=vn(qc),aw=Pt({__proto__:null,default:sw},[qc]),de=At(aw);var Yc={};Object.defineProperty(Yc,"__esModule",{value:!0});const on=te,ow={data:new on.Name("data"),valCxt:new on.Name("valCxt"),instancePath:new on.Name("instancePath"),parentData:new on.Name("parentData"),parentDataProperty:new on.Name("parentDataProperty"),rootData:new on.Name("rootData"),dynamicAnchors:new on.Name("dynamicAnchors"),vErrors:new on.Name("vErrors"),errors:new on.Name("errors"),this:new on.Name("this"),self:new on.Name("self"),scope:new on.Name("scope"),json:new on.Name("json"),jsonPos:new on.Name("jsonPos"),jsonLen:new on.Name("jsonLen"),jsonPart:new on.Name("jsonPart")};var lw=Yc.default=ow;const cw=Pt({__proto__:null,default:lw},[Yc]),Er=At(cw);(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.extendErrors=n.resetErrorsCount=n.reportExtraError=n.reportError=n.keyword$DataError=n.keywordError=void 0;const t=te,e=de,r=Er;n.keywordError={message:({keyword:_})=>(0,t.str)`must pass "${_}" keyword validation`},n.keyword$DataError={message:({keyword:_,schemaType:x})=>x?(0,t.str)`"${_}" keyword must be ${x} ($data)`:(0,t.str)`"${_}" keyword is invalid ($data)`};function i(_,x=n.keywordError,b,m){const{it:k}=_,{gen:O,compositeRule:T,allErrors:F}=k,R=f(_,x,b);m??(T||F)?l(O,R):c(k,(0,t._)`[${R}]`)}n.reportError=i;function s(_,x=n.keywordError,b){const{it:m}=_,{gen:k,compositeRule:O,allErrors:T}=m,F=f(_,x,b);l(k,F),O||T||c(m,r.default.vErrors)}n.reportExtraError=s;function a(_,x){_.assign(r.default.errors,x),_.if((0,t._)`${r.default.vErrors} !== null`,()=>_.if(x,()=>_.assign((0,t._)`${r.default.vErrors}.length`,x),()=>_.assign(r.default.vErrors,null)))}n.resetErrorsCount=a;function o({gen:_,keyword:x,schemaValue:b,data:m,errsCount:k,it:O}){if(k===void 0)throw new Error("ajv implementation error");const T=_.name("err");_.forRange("i",k,r.default.errors,F=>{_.const(T,(0,t._)`${r.default.vErrors}[${F}]`),_.if((0,t._)`${T}.instancePath === undefined`,()=>_.assign((0,t._)`${T}.instancePath`,(0,t.strConcat)(r.default.instancePath,O.errorPath))),_.assign((0,t._)`${T}.schemaPath`,(0,t.str)`${O.errSchemaPath}/${x}`),O.opts.verbose&&(_.assign((0,t._)`${T}.schema`,b),_.assign((0,t._)`${T}.data`,m))})}n.extendErrors=o;function l(_,x){const b=_.const("err",x);_.if((0,t._)`${r.default.vErrors} === null`,()=>_.assign(r.default.vErrors,(0,t._)`[${b}]`),(0,t._)`${r.default.vErrors}.push(${b})`),_.code((0,t._)`${r.default.errors}++`)}function c(_,x){const{gen:b,validateName:m,schemaEnv:k}=_;k.$async?b.throw((0,t._)`new ${_.ValidationError}(${x})`):(b.assign((0,t._)`${m}.errors`,x),b.return(!1))}const h={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function f(_,x,b){const{createErrors:m}=_.it;return m===!1?(0,t._)`{}`:d(_,x,b)}function d(_,x,b={}){const{gen:m,it:k}=_,O=[u(k,b),p(_,b)];return v(_,x,O),m.object(...O)}function u({errorPath:_},{instancePath:x}){const b=x?(0,t.str)`${_}${(0,e.getErrorPath)(x,e.Type.Str)}`:_;return[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,b)]}function p({keyword:_,it:{errSchemaPath:x}},{schemaPath:b,parentSchema:m}){let k=m?x:(0,t.str)`${x}/${_}`;return b&&(k=(0,t.str)`${k}${(0,e.getErrorPath)(b,e.Type.Str)}`),[h.schemaPath,k]}function v(_,{params:x,message:b},m){const{keyword:k,data:O,schemaValue:T,it:F}=_,{opts:R,propertyName:L,topSchemaRef:U,schemaPath:B}=F;m.push([h.keyword,k],[h.params,typeof x=="function"?x(_):x||(0,t._)`{}`]),R.messages&&m.push([h.message,typeof b=="function"?b(_):b]),R.verbose&&m.push([h.schema,T],[h.parentSchema,(0,t._)`${U}${B}`],[r.default.data,O]),L&&m.push([h.propertyName,L])}})(zc);const hw=vn(zc),uw=Pt({__proto__:null,default:hw},[zc]),js=At(uw);Object.defineProperty(yi,"__esModule",{value:!0});var v0=yi.boolOrEmptySchema=y0=yi.topBoolOrEmptySchema=void 0;const dw=js,fw=te,pw=Er,gw={message:"boolean schema is false"};function mw(n){const{gen:t,schema:e,validateName:r}=n;e===!1?_0(n,!1):typeof e=="object"&&e.$async===!0?t.return(pw.default.data):(t.assign((0,fw._)`${r}.errors`,null),t.return(!0))}var y0=yi.topBoolOrEmptySchema=mw;function vw(n,t){const{gen:e,schema:r}=n;r===!1?(e.var(t,!1),_0(n)):e.var(t,!0)}v0=yi.boolOrEmptySchema=vw;function _0(n,t){const{gen:e,data:r}=n,i={gen:e,keyword:"false schema",data:r,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:n};(0,dw.reportError)(i,gw,void 0,t)}const yw=Pt({__proto__:null,get boolOrEmptySchema(){return v0},default:yi,get topBoolOrEmptySchema(){return y0}},[yi]),_w=At(yw);var Kc={},_i={};Object.defineProperty(_i,"__esModule",{value:!0});var b0=_i.getRules=w0=_i.isJSONType=void 0;const bw=["string","number","integer","boolean","null","object","array"],ww=new Set(bw);function xw(n){return typeof n=="string"&&ww.has(n)}var w0=_i.isJSONType=xw;function Sw(){const n={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...n,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},n.number,n.string,n.array,n.object],post:{rules:[]},all:{},keywords:{}}}b0=_i.getRules=Sw;const kw=Pt({__proto__:null,default:_i,get getRules(){return b0},get isJSONType(){return w0}},[_i]),x0=At(kw);var Pr={};Object.defineProperty(Pr,"__esModule",{value:!0});var S0=Pr.shouldUseRule=T0=Pr.shouldUseGroup=k0=Pr.schemaHasRulesForType=void 0;function Cw({schema:n,self:t},e){const r=t.RULES.types[e];return r&&r!==!0&&C0(n,r)}var k0=Pr.schemaHasRulesForType=Cw;function C0(n,t){return t.rules.some(e=>E0(n,e))}var T0=Pr.shouldUseGroup=C0;function E0(n,t){var e;return n[t.keyword]!==void 0||((e=t.definition.implements)===null||e===void 0?void 0:e.some(r=>n[r]!==void 0))}S0=Pr.shouldUseRule=E0;const Tw=Pt({__proto__:null,default:Pr,get schemaHasRulesForType(){return k0},get shouldUseGroup(){return T0},get shouldUseRule(){return S0}},[Pr]),P0=At(Tw);(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.reportTypeError=n.checkDataTypes=n.checkDataType=n.coerceAndCheckDataType=n.getJSONTypes=n.getSchemaTypes=n.DataType=void 0;const t=x0,e=P0,r=js,i=te,s=de;var a;(function(m){m[m.Correct=0]="Correct",m[m.Wrong=1]="Wrong"})(a=n.DataType||(n.DataType={}));function o(m){const k=l(m.type);if(k.includes("null")){if(m.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!k.length&&m.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');m.nullable===!0&&k.push("null")}return k}n.getSchemaTypes=o;function l(m){const k=Array.isArray(m)?m:m?[m]:[];if(k.every(t.isJSONType))return k;throw new Error("type must be JSONType or JSONType[]: "+k.join(","))}n.getJSONTypes=l;function c(m,k){const{gen:O,data:T,opts:F}=m,R=f(k,F.coerceTypes),L=k.length>0&&!(R.length===0&&k.length===1&&(0,e.schemaHasRulesForType)(m,k[0]));if(L){const U=v(k,T,F.strictNumbers,a.Wrong);O.if(U,()=>{R.length?d(m,k,R):x(m)})}return L}n.coerceAndCheckDataType=c;const h=new Set(["string","number","integer","boolean","null"]);function f(m,k){return k?m.filter(O=>h.has(O)||k==="array"&&O==="array"):[]}function d(m,k,O){const{gen:T,data:F,opts:R}=m,L=T.let("dataType",(0,i._)`typeof ${F}`),U=T.let("coerced",(0,i._)`undefined`);R.coerceTypes==="array"&&T.if((0,i._)`${L} == 'object' && Array.isArray(${F}) && ${F}.length == 1`,()=>T.assign(F,(0,i._)`${F}[0]`).assign(L,(0,i._)`typeof ${F}`).if(v(k,F,R.strictNumbers),()=>T.assign(U,F))),T.if((0,i._)`${U} !== undefined`);for(const Y of O)(h.has(Y)||Y==="array"&&R.coerceTypes==="array")&&B(Y);T.else(),x(m),T.endIf(),T.if((0,i._)`${U} !== undefined`,()=>{T.assign(F,U),u(m,U)});function B(Y){switch(Y){case"string":T.elseIf((0,i._)`${L} == "number" || ${L} == "boolean"`).assign(U,(0,i._)`"" + ${F}`).elseIf((0,i._)`${F} === null`).assign(U,(0,i._)`""`);return;case"number":T.elseIf((0,i._)`${L} == "boolean" || ${F} === null
19
+ || (${L} == "string" && ${F} && ${F} == +${F})`).assign(U,(0,i._)`+${F}`);return;case"integer":T.elseIf((0,i._)`${L} === "boolean" || ${F} === null
20
+ || (${L} === "string" && ${F} && ${F} == +${F} && !(${F} % 1))`).assign(U,(0,i._)`+${F}`);return;case"boolean":T.elseIf((0,i._)`${F} === "false" || ${F} === 0 || ${F} === null`).assign(U,!1).elseIf((0,i._)`${F} === "true" || ${F} === 1`).assign(U,!0);return;case"null":T.elseIf((0,i._)`${F} === "" || ${F} === 0 || ${F} === false`),T.assign(U,null);return;case"array":T.elseIf((0,i._)`${L} === "string" || ${L} === "number"
21
+ || ${L} === "boolean" || ${F} === null`).assign(U,(0,i._)`[${F}]`)}}}function u({gen:m,parentData:k,parentDataProperty:O},T){m.if((0,i._)`${k} !== undefined`,()=>m.assign((0,i._)`${k}[${O}]`,T))}function p(m,k,O,T=a.Correct){const F=T===a.Correct?i.operators.EQ:i.operators.NEQ;let R;switch(m){case"null":return(0,i._)`${k} ${F} null`;case"array":R=(0,i._)`Array.isArray(${k})`;break;case"object":R=(0,i._)`${k} && typeof ${k} == "object" && !Array.isArray(${k})`;break;case"integer":R=L((0,i._)`!(${k} % 1) && !isNaN(${k})`);break;case"number":R=L();break;default:return(0,i._)`typeof ${k} ${F} ${m}`}return T===a.Correct?R:(0,i.not)(R);function L(U=i.nil){return(0,i.and)((0,i._)`typeof ${k} == "number"`,U,O?(0,i._)`isFinite(${k})`:i.nil)}}n.checkDataType=p;function v(m,k,O,T){if(m.length===1)return p(m[0],k,O,T);let F;const R=(0,s.toHash)(m);if(R.array&&R.object){const L=(0,i._)`typeof ${k} != "object"`;F=R.null?L:(0,i._)`!${k} || ${L}`,delete R.null,delete R.array,delete R.object}else F=i.nil;R.number&&delete R.integer;for(const L in R)F=(0,i.and)(F,p(L,k,O,T));return F}n.checkDataTypes=v;const _={message:({schema:m})=>`must be ${m}`,params:({schema:m,schemaValue:k})=>typeof m=="string"?(0,i._)`{type: ${m}}`:(0,i._)`{type: ${k}}`};function x(m){const k=b(m);(0,r.reportError)(k,_)}n.reportTypeError=x;function b(m){const{gen:k,data:O,schema:T}=m,F=(0,s.schemaRefOrVal)(m,T,"type");return{gen:k,keyword:"type",data:O,schema:T.type,schemaCode:F,schemaValue:F,parentSchema:T,params:{},it:m}}})(Kc);const Ew=vn(Kc),Pw=Pt({__proto__:null,default:Ew},[Kc]),zo=At(Pw);var Ls={};Object.defineProperty(Ls,"__esModule",{value:!0});var A0=Ls.assignDefaults=void 0;const Wi=te,Aw=de;function Ow(n,t){const{properties:e,items:r}=n.schema;if(t==="object"&&e)for(const i in e)O0(n,i,e[i].default);else t==="array"&&Array.isArray(r)&&r.forEach((i,s)=>O0(n,s,i.default))}A0=Ls.assignDefaults=Ow;function O0(n,t,e){const{gen:r,compositeRule:i,data:s,opts:a}=n;if(e===void 0)return;const o=(0,Wi._)`${s}${(0,Wi.getProperty)(t)}`;if(i){(0,Aw.checkStrictMode)(n,`default is ignored for: ${o}`);return}let l=(0,Wi._)`${o} === undefined`;a.useDefaults==="empty"&&(l=(0,Wi._)`${l} || ${o} === null || ${o} === ""`),r.if(l,(0,Wi._)`${o} = ${(0,Wi.stringify)(e)}`)}const $w=Pt({__proto__:null,get assignDefaults(){return A0},default:Ls},[Ls]),Nw=At($w);var Yn={},ye={};Object.defineProperty(ye,"__esModule",{value:!0});var $0=ye.validateUnion=H0=ye.validateArray=B0=ye.usePattern=V0=ye.callValidateCode=z0=ye.schemaProperties=G0=ye.allSchemaProperties=L0=ye.noPropertyInData=j0=ye.propertyInData=I0=ye.isOwnProperty=D0=ye.hasPropFunc=R0=ye.reportMissingProp=F0=ye.checkMissingProp=N0=ye.checkReportMissingProp=void 0;const ke=te,Xc=de,Zr=Er,Fw=de;function Rw(n,t){const{gen:e,data:r,it:i}=n;e.if(Qc(e,r,t,i.opts.ownProperties),()=>{n.setParams({missingProperty:(0,ke._)`${t}`},!0),n.error()})}var N0=ye.checkReportMissingProp=Rw;function Mw({gen:n,data:t,it:{opts:e}},r,i){return(0,ke.or)(...r.map(s=>(0,ke.and)(Qc(n,t,s,e.ownProperties),(0,ke._)`${i} = ${s}`)))}var F0=ye.checkMissingProp=Mw;function Dw(n,t){n.setParams({missingProperty:t},!0),n.error()}var R0=ye.reportMissingProp=Dw;function M0(n){return n.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,ke._)`Object.prototype.hasOwnProperty`})}var D0=ye.hasPropFunc=M0;function Jc(n,t,e){return(0,ke._)`${M0(n)}.call(${t}, ${e})`}var I0=ye.isOwnProperty=Jc;function Iw(n,t,e,r){const i=(0,ke._)`${t}${(0,ke.getProperty)(e)} !== undefined`;return r?(0,ke._)`${i} && ${Jc(n,t,e)}`:i}var j0=ye.propertyInData=Iw;function Qc(n,t,e,r){const i=(0,ke._)`${t}${(0,ke.getProperty)(e)} === undefined`;return r?(0,ke.or)(i,(0,ke.not)(Jc(n,t,e))):i}var L0=ye.noPropertyInData=Qc;function U0(n){return n?Object.keys(n).filter(t=>t!=="__proto__"):[]}var G0=ye.allSchemaProperties=U0;function jw(n,t){return U0(t).filter(e=>!(0,Xc.alwaysValidSchema)(n,t[e]))}var z0=ye.schemaProperties=jw;function Lw({schemaCode:n,data:t,it:{gen:e,topSchemaRef:r,schemaPath:i,errorPath:s},it:a},o,l,c){const h=c?(0,ke._)`${n}, ${t}, ${r}${i}`:t,f=[[Zr.default.instancePath,(0,ke.strConcat)(Zr.default.instancePath,s)],[Zr.default.parentData,a.parentData],[Zr.default.parentDataProperty,a.parentDataProperty],[Zr.default.rootData,Zr.default.rootData]];a.opts.dynamicRef&&f.push([Zr.default.dynamicAnchors,Zr.default.dynamicAnchors]);const d=(0,ke._)`${h}, ${e.object(...f)}`;return l!==ke.nil?(0,ke._)`${o}.call(${l}, ${d})`:(0,ke._)`${o}(${d})`}var V0=ye.callValidateCode=Lw;const Uw=(0,ke._)`new RegExp`;function Gw({gen:n,it:{opts:t}},e){const r=t.unicodeRegExp?"u":"",{regExp:i}=t.code,s=i(e,r);return n.scopeValue("pattern",{key:s.toString(),ref:s,code:(0,ke._)`${i.code==="new RegExp"?Uw:(0,Fw.useFunc)(n,i)}(${e}, ${r})`})}var B0=ye.usePattern=Gw;function zw(n){const{gen:t,data:e,keyword:r,it:i}=n,s=t.name("valid");if(i.allErrors){const o=t.let("valid",!0);return a(()=>t.assign(o,!1)),o}return t.var(s,!0),a(()=>t.break()),s;function a(o){const l=t.const("len",(0,ke._)`${e}.length`);t.forRange("i",0,l,c=>{n.subschema({keyword:r,dataProp:c,dataPropType:Xc.Type.Num},s),t.if((0,ke.not)(s),o)})}}var H0=ye.validateArray=zw;function Vw(n){const{gen:t,schema:e,keyword:r,it:i}=n;if(!Array.isArray(e))throw new Error("ajv implementation error");if(e.some(o=>(0,Xc.alwaysValidSchema)(i,o))&&!i.opts.unevaluated)return;const s=t.let("valid",!1),a=t.name("_valid");t.block(()=>e.forEach((o,l)=>{const c=n.subschema({keyword:r,schemaProp:l,compositeRule:!0},a);t.assign(s,(0,ke._)`${s} || ${a}`),n.mergeValidEvaluated(c,a)||t.if((0,ke.not)(s))})),n.result(s,()=>n.reset(),()=>n.error(!0))}$0=ye.validateUnion=Vw;const Bw=Pt({__proto__:null,get allSchemaProperties(){return G0},get callValidateCode(){return V0},get checkMissingProp(){return F0},get checkReportMissingProp(){return N0},default:ye,get hasPropFunc(){return D0},get isOwnProperty(){return I0},get noPropertyInData(){return L0},get propertyInData(){return j0},get reportMissingProp(){return R0},get schemaProperties(){return z0},get usePattern(){return B0},get validateArray(){return H0},get validateUnion(){return $0}},[ye]),Kn=At(Bw);Object.defineProperty(Yn,"__esModule",{value:!0});var q0=Yn.validateKeywordUsage=Q0=Yn.validSchemaType=K0=Yn.funcKeywordCode=Y0=Yn.macroKeywordCode=void 0;const un=te,bi=Er,Hw=Kn,qw=js;function Yw(n,t){const{gen:e,keyword:r,schema:i,parentSchema:s,it:a}=n,o=t.macro.call(a.self,i,s,a),l=J0(e,r,o);a.opts.validateSchema!==!1&&a.self.validateSchema(o,!0);const c=e.name("valid");n.subschema({schema:o,schemaPath:un.nil,errSchemaPath:`${a.errSchemaPath}/${r}`,topSchemaRef:l,compositeRule:!0},c),n.pass(c,()=>n.error(!0))}var Y0=Yn.macroKeywordCode=Yw;function Kw(n,t){var e;const{gen:r,keyword:i,schema:s,parentSchema:a,$data:o,it:l}=n;Jw(l,t);const c=!o&&t.compile?t.compile.call(l.self,s,a,l):t.validate,h=J0(r,i,c),f=r.let("valid");n.block$data(f,d),n.ok((e=t.valid)!==null&&e!==void 0?e:f);function d(){if(t.errors===!1)v(),t.modifying&&X0(n),_(()=>n.error());else{const x=t.async?u():p();t.modifying&&X0(n),_(()=>Xw(n,x))}}function u(){const x=r.let("ruleErrs",null);return r.try(()=>v((0,un._)`await `),b=>r.assign(f,!1).if((0,un._)`${b} instanceof ${l.ValidationError}`,()=>r.assign(x,(0,un._)`${b}.errors`),()=>r.throw(b))),x}function p(){const x=(0,un._)`${h}.errors`;return r.assign(x,null),v(un.nil),x}function v(x=t.async?(0,un._)`await `:un.nil){const b=l.opts.passContext?bi.default.this:bi.default.self,m=!("compile"in t&&!o||t.schema===!1);r.assign(f,(0,un._)`${x}${(0,Hw.callValidateCode)(n,h,b,m)}`,t.modifying)}function _(x){var b;r.if((0,un.not)((b=t.valid)!==null&&b!==void 0?b:f),x)}}var K0=Yn.funcKeywordCode=Kw;function X0(n){const{gen:t,data:e,it:r}=n;t.if(r.parentData,()=>t.assign(e,(0,un._)`${r.parentData}[${r.parentDataProperty}]`))}function Xw(n,t){const{gen:e}=n;e.if((0,un._)`Array.isArray(${t})`,()=>{e.assign(bi.default.vErrors,(0,un._)`${bi.default.vErrors} === null ? ${t} : ${bi.default.vErrors}.concat(${t})`).assign(bi.default.errors,(0,un._)`${bi.default.vErrors}.length`),(0,qw.extendErrors)(n)},()=>n.error())}function Jw({schemaEnv:n},t){if(t.async&&!n.$async)throw new Error("async keyword in sync schema")}function J0(n,t,e){if(e===void 0)throw new Error(`keyword "${t}" failed to compile`);return n.scopeValue("keyword",typeof e=="function"?{ref:e}:{ref:e,code:(0,un.stringify)(e)})}function Qw(n,t,e=!1){return!t.length||t.some(r=>r==="array"?Array.isArray(n):r==="object"?n&&typeof n=="object"&&!Array.isArray(n):typeof n==r||e&&typeof n>"u")}var Q0=Yn.validSchemaType=Qw;function Zw({schema:n,opts:t,self:e,errSchemaPath:r},i,s){if(Array.isArray(i.keyword)?!i.keyword.includes(s):i.keyword!==s)throw new Error("ajv implementation error");const a=i.dependencies;if(a!=null&&a.some(o=>!Object.prototype.hasOwnProperty.call(n,o)))throw new Error(`parent schema must have dependencies of ${s}: ${a.join(",")}`);if(i.validateSchema&&!i.validateSchema(n[s])){const o=`keyword "${s}" value is invalid at path "${r}": `+e.errorsText(i.validateSchema.errors);if(t.validateSchema==="log")e.logger.error(o);else throw new Error(o)}}q0=Yn.validateKeywordUsage=Zw;const Ww=Pt({__proto__:null,default:Yn,get funcKeywordCode(){return K0},get macroKeywordCode(){return Y0},get validSchemaType(){return Q0},get validateKeywordUsage(){return q0}},[Yn]),tx=At(Ww);var Ar={};Object.defineProperty(Ar,"__esModule",{value:!0});var Z0=Ar.extendSubschemaMode=ep=Ar.extendSubschemaData=tp=Ar.getSubschema=void 0;const ur=te,W0=de;function ex(n,{keyword:t,schemaProp:e,schema:r,schemaPath:i,errSchemaPath:s,topSchemaRef:a}){if(t!==void 0&&r!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){const o=n.schema[t];return e===void 0?{schema:o,schemaPath:(0,ur._)`${n.schemaPath}${(0,ur.getProperty)(t)}`,errSchemaPath:`${n.errSchemaPath}/${t}`}:{schema:o[e],schemaPath:(0,ur._)`${n.schemaPath}${(0,ur.getProperty)(t)}${(0,ur.getProperty)(e)}`,errSchemaPath:`${n.errSchemaPath}/${t}/${(0,W0.escapeFragment)(e)}`}}if(r!==void 0){if(i===void 0||s===void 0||a===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:r,schemaPath:i,topSchemaRef:a,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')}var tp=Ar.getSubschema=ex;function nx(n,t,{dataProp:e,dataPropType:r,data:i,dataTypes:s,propertyName:a}){if(i!==void 0&&e!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:o}=t;if(e!==void 0){const{errorPath:c,dataPathArr:h,opts:f}=t,d=o.let("data",(0,ur._)`${t.data}${(0,ur.getProperty)(e)}`,!0);l(d),n.errorPath=(0,ur.str)`${c}${(0,W0.getErrorPath)(e,r,f.jsPropertySyntax)}`,n.parentDataProperty=(0,ur._)`${e}`,n.dataPathArr=[...h,n.parentDataProperty]}if(i!==void 0){const c=i instanceof ur.Name?i:o.let("data",i,!0);l(c),a!==void 0&&(n.propertyName=a)}s&&(n.dataTypes=s);function l(c){n.data=c,n.dataLevel=t.dataLevel+1,n.dataTypes=[],t.definedProperties=new Set,n.parentData=t.data,n.dataNames=[...t.dataNames,c]}}var ep=Ar.extendSubschemaData=nx;function rx(n,{jtdDiscriminator:t,jtdMetadata:e,compositeRule:r,createErrors:i,allErrors:s}){r!==void 0&&(n.compositeRule=r),i!==void 0&&(n.createErrors=i),s!==void 0&&(n.allErrors=s),n.jtdDiscriminator=t,n.jtdMetadata=e}Z0=Ar.extendSubschemaMode=rx;const ix=Pt({__proto__:null,default:Ar,get extendSubschemaData(){return ep},get extendSubschemaMode(){return Z0},get getSubschema(){return tp}},[Ar]),sx=At(ix);var dn={},np=function n(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var r,i,s;if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(i=r;i--!==0;)if(!n(t[i],e[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();if(s=Object.keys(t),r=s.length,r!==Object.keys(e).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(e,s[i]))return!1;for(i=r;i--!==0;){var a=s[i];if(!n(t[a],e[a]))return!1}return!0}return t!==t&&e!==e};const ax=vn(np),ox=Pt({__proto__:null,default:ax},[np]),rp=At(ox);var ip={exports:{}},Wr=ip.exports=function(n,t,e){typeof t=="function"&&(e=t,t={}),e=t.cb||e;var r=typeof e=="function"?e:e.pre||function(){},i=e.post||function(){};Vo(t,r,i,n,"",n)};Wr.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},Wr.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},Wr.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},Wr.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function Vo(n,t,e,r,i,s,a,o,l,c){if(r&&typeof r=="object"&&!Array.isArray(r)){t(r,i,s,a,o,l,c);for(var h in r){var f=r[h];if(Array.isArray(f)){if(h in Wr.arrayKeywords)for(var d=0;d<f.length;d++)Vo(n,t,e,f[d],i+"/"+h+"/"+d,s,i,h,r,d)}else if(h in Wr.propsKeywords){if(f&&typeof f=="object")for(var u in f)Vo(n,t,e,f[u],i+"/"+h+"/"+lx(u),s,i,h,r,u)}else(h in Wr.keywords||n.allKeys&&!(h in Wr.skipKeywords))&&Vo(n,t,e,f,i+"/"+h,s,i,h,r)}e(r,i,s,a,o,l,c)}}function lx(n){return n.replace(/~/g,"~0").replace(/\//g,"~1")}var sp=ip.exports;const cx=vn(sp),hx=Pt({__proto__:null,default:cx},[sp]),ux=At(hx);Object.defineProperty(dn,"__esModule",{value:!0});var ap=dn.getSchemaRefs=pp=dn.resolveUrl=fp=dn.normalizeId=dp=dn._getFullPath=hp=dn.getFullPath=op=dn.inlineRef=void 0;const dx=de,fx=rp,px=ux,gx=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function mx(n,t=!0){return typeof n=="boolean"?!0:t===!0?!Zc(n):t?lp(n)<=t:!1}var op=dn.inlineRef=mx;const vx=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Zc(n){for(const t in n){if(vx.has(t))return!0;const e=n[t];if(Array.isArray(e)&&e.some(Zc)||typeof e=="object"&&Zc(e))return!0}return!1}function lp(n){let t=0;for(const e in n)if(e==="$ref"||(t++,!gx.has(e)&&(typeof n[e]=="object"&&(0,dx.eachItem)(n[e],r=>t+=lp(r)),t===1/0)))return 1/0;return t}function cp(n,t="",e){e!==!1&&(t=ts(t));const r=n.parse(t);return up(n,r)}var hp=dn.getFullPath=cp;function up(n,t){return n.serialize(t).split("#")[0]+"#"}var dp=dn._getFullPath=up;const yx=/#\/?$/;function ts(n){return n?n.replace(yx,""):""}var fp=dn.normalizeId=ts;function _x(n,t,e){return e=ts(e),n.resolve(t,e)}var pp=dn.resolveUrl=_x;const bx=/^[a-z_][-a-z0-9._]*$/i;function wx(n,t){if(typeof n=="boolean")return{};const{schemaId:e,uriResolver:r}=this.opts,i=ts(n[e]||t),s={"":i},a=cp(r,i,!1),o={},l=new Set;return px(n,{allKeys:!0},(f,d,u,p)=>{if(p===void 0)return;const v=a+d;let _=s[p];typeof f[e]=="string"&&(_=x.call(this,f[e])),b.call(this,f.$anchor),b.call(this,f.$dynamicAnchor),s[d]=_;function x(m){const k=this.opts.uriResolver.resolve;if(m=ts(_?k(_,m):m),l.has(m))throw h(m);l.add(m);let O=this.refs[m];return typeof O=="string"&&(O=this.refs[O]),typeof O=="object"?c(f,O.schema,m):m!==ts(v)&&(m[0]==="#"?(c(f,o[m],m),o[m]=f):this.refs[m]=v),m}function b(m){if(typeof m=="string"){if(!bx.test(m))throw new Error(`invalid anchor "${m}"`);x.call(this,`#${m}`)}}}),o;function c(f,d,u){if(d!==void 0&&!fx(f,d))throw h(u)}function h(f){return new Error(`reference "${f}" resolves to more than one schema`)}}ap=dn.getSchemaRefs=wx;const xx=Pt({__proto__:null,get _getFullPath(){return dp},default:dn,get getFullPath(){return hp},get getSchemaRefs(){return ap},get inlineRef(){return op},get normalizeId(){return fp},get resolveUrl(){return pp}},[dn]),Bo=At(xx);Object.defineProperty(Tr,"__esModule",{value:!0});var gp=Tr.getData=Op=Tr.KeywordCxt=yp=Tr.validateFunctionCode=void 0;const mp=_w,vp=zo,Wc=P0,Ho=zo,Sx=Nw,Us=tx,th=sx,Nt=te,Ht=Er,kx=Bo,Or=de,Gs=js;function Cx(n){if(xp(n)&&(Sp(n),wp(n))){Px(n);return}_p(n,()=>(0,mp.topBoolOrEmptySchema)(n))}var yp=Tr.validateFunctionCode=Cx;function _p({gen:n,validateName:t,schema:e,schemaEnv:r,opts:i},s){i.code.es5?n.func(t,(0,Nt._)`${Ht.default.data}, ${Ht.default.valCxt}`,r.$async,()=>{n.code((0,Nt._)`"use strict"; ${bp(e,i)}`),Ex(n,i),n.code(s)}):n.func(t,(0,Nt._)`${Ht.default.data}, ${Tx(i)}`,r.$async,()=>n.code(bp(e,i)).code(s))}function Tx(n){return(0,Nt._)`{${Ht.default.instancePath}="", ${Ht.default.parentData}, ${Ht.default.parentDataProperty}, ${Ht.default.rootData}=${Ht.default.data}${n.dynamicRef?(0,Nt._)`, ${Ht.default.dynamicAnchors}={}`:Nt.nil}}={}`}function Ex(n,t){n.if(Ht.default.valCxt,()=>{n.var(Ht.default.instancePath,(0,Nt._)`${Ht.default.valCxt}.${Ht.default.instancePath}`),n.var(Ht.default.parentData,(0,Nt._)`${Ht.default.valCxt}.${Ht.default.parentData}`),n.var(Ht.default.parentDataProperty,(0,Nt._)`${Ht.default.valCxt}.${Ht.default.parentDataProperty}`),n.var(Ht.default.rootData,(0,Nt._)`${Ht.default.valCxt}.${Ht.default.rootData}`),t.dynamicRef&&n.var(Ht.default.dynamicAnchors,(0,Nt._)`${Ht.default.valCxt}.${Ht.default.dynamicAnchors}`)},()=>{n.var(Ht.default.instancePath,(0,Nt._)`""`),n.var(Ht.default.parentData,(0,Nt._)`undefined`),n.var(Ht.default.parentDataProperty,(0,Nt._)`undefined`),n.var(Ht.default.rootData,Ht.default.data),t.dynamicRef&&n.var(Ht.default.dynamicAnchors,(0,Nt._)`{}`)})}function Px(n){const{schema:t,opts:e,gen:r}=n;_p(n,()=>{e.$comment&&t.$comment&&Cp(n),Fx(n),r.let(Ht.default.vErrors,null),r.let(Ht.default.errors,0),e.unevaluated&&Ax(n),kp(n),Dx(n)})}function Ax(n){const{gen:t,validateName:e}=n;n.evaluated=t.const("evaluated",(0,Nt._)`${e}.evaluated`),t.if((0,Nt._)`${n.evaluated}.dynamicProps`,()=>t.assign((0,Nt._)`${n.evaluated}.props`,(0,Nt._)`undefined`)),t.if((0,Nt._)`${n.evaluated}.dynamicItems`,()=>t.assign((0,Nt._)`${n.evaluated}.items`,(0,Nt._)`undefined`))}function bp(n,t){const e=typeof n=="object"&&n[t.schemaId];return e&&(t.code.source||t.code.process)?(0,Nt._)`/*# sourceURL=${e} */`:Nt.nil}function Ox(n,t){if(xp(n)&&(Sp(n),wp(n))){$x(n,t);return}(0,mp.boolOrEmptySchema)(n,t)}function wp({schema:n,self:t}){if(typeof n=="boolean")return!n;for(const e in n)if(t.RULES.all[e])return!0;return!1}function xp(n){return typeof n.schema!="boolean"}function $x(n,t){const{schema:e,gen:r,opts:i}=n;i.$comment&&e.$comment&&Cp(n),Rx(n),Mx(n);const s=r.const("_errs",Ht.default.errors);kp(n,s),r.var(t,(0,Nt._)`${s} === ${Ht.default.errors}`)}function Sp(n){(0,Or.checkUnknownRules)(n),Nx(n)}function kp(n,t){if(n.opts.jtd)return Tp(n,[],!1,t);const e=(0,vp.getSchemaTypes)(n.schema),r=(0,vp.coerceAndCheckDataType)(n,e);Tp(n,e,!r,t)}function Nx(n){const{schema:t,errSchemaPath:e,opts:r,self:i}=n;t.$ref&&r.ignoreKeywordsWithRef&&(0,Or.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${e}"`)}function Fx(n){const{schema:t,opts:e}=n;t.default!==void 0&&e.useDefaults&&e.strictSchema&&(0,Or.checkStrictMode)(n,"default is ignored in the schema root")}function Rx(n){const t=n.schema[n.opts.schemaId];t&&(n.baseId=(0,kx.resolveUrl)(n.opts.uriResolver,n.baseId,t))}function Mx(n){if(n.schema.$async&&!n.schemaEnv.$async)throw new Error("async schema in sync schema")}function Cp({gen:n,schemaEnv:t,schema:e,errSchemaPath:r,opts:i}){const s=e.$comment;if(i.$comment===!0)n.code((0,Nt._)`${Ht.default.self}.logger.log(${s})`);else if(typeof i.$comment=="function"){const a=(0,Nt.str)`${r}/$comment`,o=n.scopeValue("root",{ref:t.root});n.code((0,Nt._)`${Ht.default.self}.opts.$comment(${s}, ${a}, ${o}.schema)`)}}function Dx(n){const{gen:t,schemaEnv:e,validateName:r,ValidationError:i,opts:s}=n;e.$async?t.if((0,Nt._)`${Ht.default.errors} === 0`,()=>t.return(Ht.default.data),()=>t.throw((0,Nt._)`new ${i}(${Ht.default.vErrors})`)):(t.assign((0,Nt._)`${r}.errors`,Ht.default.vErrors),s.unevaluated&&Ix(n),t.return((0,Nt._)`${Ht.default.errors} === 0`))}function Ix({gen:n,evaluated:t,props:e,items:r}){e instanceof Nt.Name&&n.assign((0,Nt._)`${t}.props`,e),r instanceof Nt.Name&&n.assign((0,Nt._)`${t}.items`,r)}function Tp(n,t,e,r){const{gen:i,schema:s,data:a,allErrors:o,opts:l,self:c}=n,{RULES:h}=c;if(s.$ref&&(l.ignoreKeywordsWithRef||!(0,Or.schemaHasRulesButRef)(s,h))){i.block(()=>$p(n,"$ref",h.all.$ref.definition));return}l.jtd||jx(n,t),i.block(()=>{for(const d of h.rules)f(d);f(h.post)});function f(d){(0,Wc.shouldUseGroup)(s,d)&&(d.type?(i.if((0,Ho.checkDataType)(d.type,a,l.strictNumbers)),Ep(n,d),t.length===1&&t[0]===d.type&&e&&(i.else(),(0,Ho.reportTypeError)(n)),i.endIf()):Ep(n,d),o||i.if((0,Nt._)`${Ht.default.errors} === ${r||0}`))}}function Ep(n,t){const{gen:e,schema:r,opts:{useDefaults:i}}=n;i&&(0,Sx.assignDefaults)(n,t.type),e.block(()=>{for(const s of t.rules)(0,Wc.shouldUseRule)(r,s)&&$p(n,s.keyword,s.definition,t.type)})}function jx(n,t){n.schemaEnv.meta||!n.opts.strictTypes||(Lx(n,t),n.opts.allowUnionTypes||Ux(n,t),Gx(n,n.dataTypes))}function Lx(n,t){if(t.length){if(!n.dataTypes.length){n.dataTypes=t;return}t.forEach(e=>{Pp(n.dataTypes,e)||eh(n,`type "${e}" not allowed by context "${n.dataTypes.join(",")}"`)}),Vx(n,t)}}function Ux(n,t){t.length>1&&!(t.length===2&&t.includes("null"))&&eh(n,"use allowUnionTypes to allow union type keyword")}function Gx(n,t){const e=n.self.RULES.all;for(const r in e){const i=e[r];if(typeof i=="object"&&(0,Wc.shouldUseRule)(n.schema,i)){const{type:s}=i.definition;s.length&&!s.some(a=>zx(t,a))&&eh(n,`missing type "${s.join(",")}" for keyword "${r}"`)}}}function zx(n,t){return n.includes(t)||t==="number"&&n.includes("integer")}function Pp(n,t){return n.includes(t)||t==="integer"&&n.includes("number")}function Vx(n,t){const e=[];for(const r of n.dataTypes)Pp(t,r)?e.push(r):t.includes("integer")&&r==="number"&&e.push("integer");n.dataTypes=e}function eh(n,t){const e=n.schemaEnv.baseId+n.errSchemaPath;t+=` at "${e}" (strictTypes)`,(0,Or.checkStrictMode)(n,t,n.opts.strictTypes)}class Ap{constructor(t,e,r){if((0,Us.validateKeywordUsage)(t,e,r),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=r,this.data=t.data,this.schema=t.schema[r],this.$data=e.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Or.schemaRefOrVal)(t,this.schema,r,this.$data),this.schemaType=e.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=e,this.$data)this.schemaCode=t.gen.const("vSchema",Np(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,Us.validSchemaType)(this.schema,e.schemaType,e.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(e.schemaType)}`);("code"in e?e.trackErrors:e.errors!==!1)&&(this.errsCount=t.gen.const("_errs",Ht.default.errors))}result(t,e,r){this.failResult((0,Nt.not)(t),e,r)}failResult(t,e,r){this.gen.if(t),r?r():this.error(),e?(this.gen.else(),e(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,e){this.failResult((0,Nt.not)(t),void 0,e)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);const{schemaCode:e}=this;this.fail((0,Nt._)`${e} !== undefined && (${(0,Nt.or)(this.invalid$data(),t)})`)}error(t,e,r){if(e){this.setParams(e),this._error(t,r),this.setParams({});return}this._error(t,r)}_error(t,e){(t?Gs.reportExtraError:Gs.reportError)(this,this.def.error,e)}$dataError(){(0,Gs.reportError)(this,this.def.$dataError||Gs.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Gs.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,e){e?Object.assign(this.params,t):this.params=t}block$data(t,e,r=Nt.nil){this.gen.block(()=>{this.check$data(t,r),e()})}check$data(t=Nt.nil,e=Nt.nil){if(!this.$data)return;const{gen:r,schemaCode:i,schemaType:s,def:a}=this;r.if((0,Nt.or)((0,Nt._)`${i} === undefined`,e)),t!==Nt.nil&&r.assign(t,!0),(s.length||a.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),t!==Nt.nil&&r.assign(t,!1)),r.else()}invalid$data(){const{gen:t,schemaCode:e,schemaType:r,def:i,it:s}=this;return(0,Nt.or)(a(),o());function a(){if(r.length){if(!(e instanceof Nt.Name))throw new Error("ajv implementation error");const l=Array.isArray(r)?r:[r];return(0,Nt._)`${(0,Ho.checkDataTypes)(l,e,s.opts.strictNumbers,Ho.DataType.Wrong)}`}return Nt.nil}function o(){if(i.validateSchema){const l=t.scopeValue("validate$data",{ref:i.validateSchema});return(0,Nt._)`!${l}(${e})`}return Nt.nil}}subschema(t,e){const r=(0,th.getSubschema)(this.it,t);(0,th.extendSubschemaData)(r,this.it,t),(0,th.extendSubschemaMode)(r,t);const i={...this.it,...r,items:void 0,props:void 0};return Ox(i,e),i}mergeEvaluated(t,e){const{it:r,gen:i}=this;r.opts.unevaluated&&(r.props!==!0&&t.props!==void 0&&(r.props=Or.mergeEvaluated.props(i,t.props,r.props,e)),r.items!==!0&&t.items!==void 0&&(r.items=Or.mergeEvaluated.items(i,t.items,r.items,e)))}mergeValidEvaluated(t,e){const{it:r,gen:i}=this;if(r.opts.unevaluated&&(r.props!==!0||r.items!==!0))return i.if(e,()=>this.mergeEvaluated(t,Nt.Name)),!0}}var Op=Tr.KeywordCxt=Ap;function $p(n,t,e,r){const i=new Ap(n,e,t);"code"in e?e.code(i,r):i.$data&&e.validate?(0,Us.funcKeywordCode)(i,e):"macro"in e?(0,Us.macroKeywordCode)(i,e):(e.compile||e.validate)&&(0,Us.funcKeywordCode)(i,e)}const Bx=/^\/(?:[^~]|~0|~1)*$/,Hx=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Np(n,{dataLevel:t,dataNames:e,dataPathArr:r}){let i,s;if(n==="")return Ht.default.rootData;if(n[0]==="/"){if(!Bx.test(n))throw new Error(`Invalid JSON-pointer: ${n}`);i=n,s=Ht.default.rootData}else{const c=Hx.exec(n);if(!c)throw new Error(`Invalid JSON-pointer: ${n}`);const h=+c[1];if(i=c[2],i==="#"){if(h>=t)throw new Error(l("property/index",h));return r[t-h]}if(h>t)throw new Error(l("data",h));if(s=e[t-h],!i)return s}let a=s;const o=i.split("/");for(const c of o)c&&(s=(0,Nt._)`${s}${(0,Nt.getProperty)((0,Or.unescapeJsonPointer)(c))}`,a=(0,Nt._)`${a} && ${s}`);return a;function l(c,h){return`Cannot access ${c} ${h} levels up, current level is ${t}`}}gp=Tr.getData=Np;const qx=Pt({__proto__:null,get KeywordCxt(){return Op},default:Tr,get getData(){return gp},get validateFunctionCode(){return yp}},[Tr]),zs=At(qx);var nh={};Object.defineProperty(nh,"__esModule",{value:!0});class Yx extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}}var Kx=nh.default=Yx;const Xx=Pt({__proto__:null,default:Kx},[nh]),rh=At(Xx);var ih={};Object.defineProperty(ih,"__esModule",{value:!0});const sh=Bo;class Jx extends Error{constructor(t,e,r,i){super(i||`can't resolve reference ${r} from id ${e}`),this.missingRef=(0,sh.resolveUrl)(t,e,r),this.missingSchema=(0,sh.normalizeId)((0,sh.getFullPath)(t,this.missingRef))}}var Qx=ih.default=Jx;const Zx=Pt({__proto__:null,default:Qx},[ih]),ah=At(Zx);var Pn={};Object.defineProperty(Pn,"__esModule",{value:!0});var Fp=Pn.resolveSchema=Lp=Pn.getCompilingSchema=Ip=Pn.resolveRef=Dp=Pn.compileSchema=Mp=Pn.SchemaEnv=void 0;const Xn=te,Wx=rh,wi=Er,Jn=Bo,Rp=de,t5=zs;class qo{constructor(t){var e;this.refs={},this.dynamicAnchors={};let r;typeof t.schema=="object"&&(r=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(e=t.baseId)!==null&&e!==void 0?e:(0,Jn.normalizeId)(r==null?void 0:r[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=r==null?void 0:r.$async,this.refs={}}}var Mp=Pn.SchemaEnv=qo;function oh(n){const t=jp.call(this,n);if(t)return t;const e=(0,Jn.getFullPath)(this.opts.uriResolver,n.root.baseId),{es5:r,lines:i}=this.opts.code,{ownProperties:s}=this.opts,a=new Xn.CodeGen(this.scope,{es5:r,lines:i,ownProperties:s});let o;n.$async&&(o=a.scopeValue("Error",{ref:Wx.default,code:(0,Xn._)`require("ajv/dist/runtime/validation_error").default`}));const l=a.scopeName("validate");n.validateName=l;const c={gen:a,allErrors:this.opts.allErrors,data:wi.default.data,parentData:wi.default.parentData,parentDataProperty:wi.default.parentDataProperty,dataNames:[wi.default.data],dataPathArr:[Xn.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:n.schema,code:(0,Xn.stringify)(n.schema)}:{ref:n.schema}),validateName:l,ValidationError:o,schema:n.schema,schemaEnv:n,rootId:e,baseId:n.baseId||e,schemaPath:Xn.nil,errSchemaPath:n.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Xn._)`""`,opts:this.opts,self:this};let h;try{this._compilations.add(n),(0,t5.validateFunctionCode)(c),a.optimize(this.opts.code.optimize);const f=a.toString();h=`${a.scopeRefs(wi.default.scope)}return ${f}`,this.opts.code.process&&(h=this.opts.code.process(h,n));const d=new Function(`${wi.default.self}`,`${wi.default.scope}`,h)(this,this.scope.get());if(this.scope.value(l,{ref:d}),d.errors=null,d.schema=n.schema,d.schemaEnv=n,n.$async&&(d.$async=!0),this.opts.code.source===!0&&(d.source={validateName:l,validateCode:f,scopeValues:a._values}),this.opts.unevaluated){const{props:u,items:p}=c;d.evaluated={props:u instanceof Xn.Name?void 0:u,items:p instanceof Xn.Name?void 0:p,dynamicProps:u instanceof Xn.Name,dynamicItems:p instanceof Xn.Name},d.source&&(d.source.evaluated=(0,Xn.stringify)(d.evaluated))}return n.validate=d,n}catch(f){throw delete n.validate,delete n.validateName,h&&this.logger.error("Error compiling schema, function code:",h),f}finally{this._compilations.delete(n)}}var Dp=Pn.compileSchema=oh;function e5(n,t,e){var r;e=(0,Jn.resolveUrl)(this.opts.uriResolver,t,e);const i=n.refs[e];if(i)return i;let s=i5.call(this,n,e);if(s===void 0){const a=(r=n.localRefs)===null||r===void 0?void 0:r[e],{schemaId:o}=this.opts;a&&(s=new qo({schema:a,schemaId:o,root:n,baseId:t}))}if(s!==void 0)return n.refs[e]=n5.call(this,s)}var Ip=Pn.resolveRef=e5;function n5(n){return(0,Jn.inlineRef)(n.schema,this.opts.inlineRefs)?n.schema:n.validate?n:oh.call(this,n)}function jp(n){for(const t of this._compilations)if(r5(t,n))return t}var Lp=Pn.getCompilingSchema=jp;function r5(n,t){return n.schema===t.schema&&n.root===t.root&&n.baseId===t.baseId}function i5(n,t){let e;for(;typeof(e=this.refs[t])=="string";)t=e;return e||this.schemas[t]||Yo.call(this,n,t)}function Yo(n,t){const e=this.opts.uriResolver.parse(t),r=(0,Jn._getFullPath)(this.opts.uriResolver,e);let i=(0,Jn.getFullPath)(this.opts.uriResolver,n.baseId,void 0);if(Object.keys(n.schema).length>0&&r===i)return lh.call(this,e,n);const s=(0,Jn.normalizeId)(r),a=this.refs[s]||this.schemas[s];if(typeof a=="string"){const o=Yo.call(this,n,a);return typeof(o==null?void 0:o.schema)!="object"?void 0:lh.call(this,e,o)}if(typeof(a==null?void 0:a.schema)=="object"){if(a.validate||oh.call(this,a),s===(0,Jn.normalizeId)(t)){const{schema:o}=a,{schemaId:l}=this.opts,c=o[l];return c&&(i=(0,Jn.resolveUrl)(this.opts.uriResolver,i,c)),new qo({schema:o,schemaId:l,root:n,baseId:i})}return lh.call(this,e,a)}}Fp=Pn.resolveSchema=Yo;const s5=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function lh(n,{baseId:t,schema:e,root:r}){var i;if(((i=n.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(const o of n.fragment.slice(1).split("/")){if(typeof e=="boolean")return;const l=e[(0,Rp.unescapeFragment)(o)];if(l===void 0)return;e=l;const c=typeof e=="object"&&e[this.opts.schemaId];!s5.has(o)&&c&&(t=(0,Jn.resolveUrl)(this.opts.uriResolver,t,c))}let s;if(typeof e!="boolean"&&e.$ref&&!(0,Rp.schemaHasRulesButRef)(e,this.RULES)){const o=(0,Jn.resolveUrl)(this.opts.uriResolver,t,e.$ref);s=Yo.call(this,r,o)}const{schemaId:a}=this.opts;if(s=s||new qo({schema:e,schemaId:a,root:r,baseId:t}),s.schema!==s.root.schema)return s}const a5=Pt({__proto__:null,get SchemaEnv(){return Mp},get compileSchema(){return Dp},default:Pn,get getCompilingSchema(){return Lp},get resolveRef(){return Ip},get resolveSchema(){return Fp}},[Pn]),ch=At(a5),o5="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",l5="Meta-schema for $data reference (JSON AnySchema extension proposal)",c5="object",h5=["$data"],u5={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},d5=!1,f5={$id:o5,description:l5,type:c5,required:h5,properties:u5,additionalProperties:d5};var hh={},uh={exports:{}};/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */(function(n,t){(function(e,r){r(t)})(Bb,function(e){function r(){for(var H=arguments.length,J=Array(H),Q=0;Q<H;Q++)J[Q]=arguments[Q];if(J.length>1){J[0]=J[0].slice(0,-1);for(var ot=J.length-1,lt=1;lt<ot;++lt)J[lt]=J[lt].slice(1,-1);return J[ot]=J[ot].slice(1),J.join("")}else return J[0]}function i(H){return"(?:"+H+")"}function s(H){return H===void 0?"undefined":H===null?"null":Object.prototype.toString.call(H).split(" ").pop().split("]").shift().toLowerCase()}function a(H){return H.toUpperCase()}function o(H){return H!=null?H instanceof Array?H:typeof H.length!="number"||H.split||H.setInterval||H.call?[H]:Array.prototype.slice.call(H):[]}function l(H,J){var Q=H;if(J)for(var ot in J)Q[ot]=J[ot];return Q}function c(H){var J="[A-Za-z]",Q="[0-9]",ot=r(Q,"[A-Fa-f]"),lt=i(i("%[EFef]"+ot+"%"+ot+ot+"%"+ot+ot)+"|"+i("%[89A-Fa-f]"+ot+"%"+ot+ot)+"|"+i("%"+ot+ot)),It="[\\:\\/\\?\\#\\[\\]\\@]",Rt="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",se=r(It,Rt),Ee=H?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",ue=H?"[\\uE000-\\uF8FF]":"[]",Jt=r(J,Q,"[\\-\\.\\_\\~]",Ee);i(J+r(J,Q,"[\\+\\-\\.]")+"*"),i(i(lt+"|"+r(Jt,Rt,"[\\:]"))+"*");var Wt=i(i("25[0-5]")+"|"+i("2[0-4]"+Q)+"|"+i("1"+Q+Q)+"|"+i("0?[1-9]"+Q)+"|0?0?"+Q),ge=i(Wt+"\\."+Wt+"\\."+Wt+"\\."+Wt),Gt=i(ot+"{1,4}"),jt=i(i(Gt+"\\:"+Gt)+"|"+ge),me=i(i(Gt+"\\:")+"{6}"+jt),Ge=i("\\:\\:"+i(Gt+"\\:")+"{5}"+jt),Cn=i(i(Gt)+"?\\:\\:"+i(Gt+"\\:")+"{4}"+jt),we=i(i(i(Gt+"\\:")+"{0,1}"+Gt)+"?\\:\\:"+i(Gt+"\\:")+"{3}"+jt),Ve=i(i(i(Gt+"\\:")+"{0,2}"+Gt)+"?\\:\\:"+i(Gt+"\\:")+"{2}"+jt),Ke=i(i(i(Gt+"\\:")+"{0,3}"+Gt)+"?\\:\\:"+Gt+"\\:"+jt),Be=i(i(i(Gt+"\\:")+"{0,4}"+Gt)+"?\\:\\:"+jt),De=i(i(i(Gt+"\\:")+"{0,5}"+Gt)+"?\\:\\:"+Gt),le=i(i(i(Gt+"\\:")+"{0,6}"+Gt)+"?\\:\\:"),Ut=i([me,Ge,Cn,we,Ve,Ke,Be,De,le].join("|")),hn=i(i(Jt+"|"+lt)+"+");i("[vV]"+ot+"+\\."+r(Jt,Rt,"[\\:]")+"+"),i(i(lt+"|"+r(Jt,Rt))+"*");var ar=i(lt+"|"+r(Jt,Rt,"[\\:\\@]"));return i(i(lt+"|"+r(Jt,Rt,"[\\@]"))+"+"),i(i(ar+"|"+r("[\\/\\?]",ue))+"*"),{NOT_SCHEME:new RegExp(r("[^]",J,Q,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(r("[^\\%\\:]",Jt,Rt),"g"),NOT_HOST:new RegExp(r("[^\\%\\[\\]\\:]",Jt,Rt),"g"),NOT_PATH:new RegExp(r("[^\\%\\/\\:\\@]",Jt,Rt),"g"),NOT_PATH_NOSCHEME:new RegExp(r("[^\\%\\/\\@]",Jt,Rt),"g"),NOT_QUERY:new RegExp(r("[^\\%]",Jt,Rt,"[\\:\\@\\/\\?]",ue),"g"),NOT_FRAGMENT:new RegExp(r("[^\\%]",Jt,Rt,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(r("[^]",Jt,Rt),"g"),UNRESERVED:new RegExp(Jt,"g"),OTHER_CHARS:new RegExp(r("[^\\%]",Jt,se),"g"),PCT_ENCODED:new RegExp(lt,"g"),IPV4ADDRESS:new RegExp("^("+ge+")$"),IPV6ADDRESS:new RegExp("^\\[?("+Ut+")"+i(i("\\%25|\\%(?!"+ot+"{2})")+"("+hn+")")+"?\\]?$")}}var h=c(!1),f=c(!0),d=function(){function H(J,Q){var ot=[],lt=!0,It=!1,Rt=void 0;try{for(var se=J[Symbol.iterator](),Ee;!(lt=(Ee=se.next()).done)&&(ot.push(Ee.value),!(Q&&ot.length===Q));lt=!0);}catch(ue){It=!0,Rt=ue}finally{try{!lt&&se.return&&se.return()}finally{if(It)throw Rt}}return ot}return function(J,Q){if(Array.isArray(J))return J;if(Symbol.iterator in Object(J))return H(J,Q);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(H){if(Array.isArray(H)){for(var J=0,Q=Array(H.length);J<H.length;J++)Q[J]=H[J];return Q}else return Array.from(H)},p=2147483647,v=36,_=1,x=26,b=38,m=700,k=72,O=128,T="-",F=/^xn--/,R=/[^\0-\x7E]/,L=/[\x2E\u3002\uFF0E\uFF61]/g,U={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},B=v-_,Y=Math.floor,tt=String.fromCharCode;function W(H){throw new RangeError(U[H])}function ct(H,J){for(var Q=[],ot=H.length;ot--;)Q[ot]=J(H[ot]);return Q}function wt(H,J){var Q=H.split("@"),ot="";Q.length>1&&(ot=Q[0]+"@",H=Q[1]),H=H.replace(L,".");var lt=H.split("."),It=ct(lt,J).join(".");return ot+It}function St(H){for(var J=[],Q=0,ot=H.length;Q<ot;){var lt=H.charCodeAt(Q++);if(lt>=55296&&lt<=56319&&Q<ot){var It=H.charCodeAt(Q++);(It&64512)==56320?J.push(((lt&1023)<<10)+(It&1023)+65536):(J.push(lt),Q--)}else J.push(lt)}return J}var xt=function(H){return String.fromCodePoint.apply(String,u(H))},st=function(H){return H-48<10?H-22:H-65<26?H-65:H-97<26?H-97:v},K=function(H,J){return H+22+75*(H<26)-((J!=0)<<5)},$=function(H,J,Q){var ot=0;for(H=Q?Y(H/m):H>>1,H+=Y(H/J);H>B*x>>1;ot+=v)H=Y(H/B);return Y(ot+(B+1)*H/(H+b))},P=function(H){var J=[],Q=H.length,ot=0,lt=O,It=k,Rt=H.lastIndexOf(T);Rt<0&&(Rt=0);for(var se=0;se<Rt;++se)H.charCodeAt(se)>=128&&W("not-basic"),J.push(H.charCodeAt(se));for(var Ee=Rt>0?Rt+1:0;Ee<Q;){for(var ue=ot,Jt=1,Wt=v;;Wt+=v){Ee>=Q&&W("invalid-input");var ge=st(H.charCodeAt(Ee++));(ge>=v||ge>Y((p-ot)/Jt))&&W("overflow"),ot+=ge*Jt;var Gt=Wt<=It?_:Wt>=It+x?x:Wt-It;if(ge<Gt)break;var jt=v-Gt;Jt>Y(p/jt)&&W("overflow"),Jt*=jt}var me=J.length+1;It=$(ot-ue,me,ue==0),Y(ot/me)>p-lt&&W("overflow"),lt+=Y(ot/me),ot%=me,J.splice(ot++,0,lt)}return String.fromCodePoint.apply(String,J)},E=function(H){var J=[];H=St(H);var Q=H.length,ot=O,lt=0,It=k,Rt=!0,se=!1,Ee=void 0;try{for(var ue=H[Symbol.iterator](),Jt;!(Rt=(Jt=ue.next()).done);Rt=!0){var Wt=Jt.value;Wt<128&&J.push(tt(Wt))}}catch(Bn){se=!0,Ee=Bn}finally{try{!Rt&&ue.return&&ue.return()}finally{if(se)throw Ee}}var ge=J.length,Gt=ge;for(ge&&J.push(T);Gt<Q;){var jt=p,me=!0,Ge=!1,Cn=void 0;try{for(var we=H[Symbol.iterator](),Ve;!(me=(Ve=we.next()).done);me=!0){var Ke=Ve.value;Ke>=ot&&Ke<jt&&(jt=Ke)}}catch(Bn){Ge=!0,Cn=Bn}finally{try{!me&&we.return&&we.return()}finally{if(Ge)throw Cn}}var Be=Gt+1;jt-ot>Y((p-lt)/Be)&&W("overflow"),lt+=(jt-ot)*Be,ot=jt;var De=!0,le=!1,Ut=void 0;try{for(var hn=H[Symbol.iterator](),ar;!(De=(ar=hn.next()).done);De=!0){var or=ar.value;if(or<ot&&++lt>p&&W("overflow"),or==ot){for(var tn=lt,Xe=v;;Xe+=v){var Tn=Xe<=It?_:Xe>=It+x?x:Xe-It;if(tn<Tn)break;var Yr=tn-Tn,Kr=v-Tn;J.push(tt(K(Tn+Yr%Kr,0))),tn=Y(Yr/Kr)}J.push(tt(K(tn,0))),It=$(lt,Be,Gt==ge),lt=0,++Gt}}}catch(Bn){le=!0,Ut=Bn}finally{try{!De&&hn.return&&hn.return()}finally{if(le)throw Ut}}++lt,++ot}return J.join("")},C=function(H){return wt(H,function(J){return F.test(J)?P(J.slice(4).toLowerCase()):J})},M=function(H){return wt(H,function(J){return R.test(J)?"xn--"+E(J):J})},G={version:"2.1.0",ucs2:{decode:St,encode:xt},decode:P,encode:E,toASCII:M,toUnicode:C},D={};function V(H){var J=H.charCodeAt(0),Q=void 0;return J<16?Q="%0"+J.toString(16).toUpperCase():J<128?Q="%"+J.toString(16).toUpperCase():J<2048?Q="%"+(J>>6|192).toString(16).toUpperCase()+"%"+(J&63|128).toString(16).toUpperCase():Q="%"+(J>>12|224).toString(16).toUpperCase()+"%"+(J>>6&63|128).toString(16).toUpperCase()+"%"+(J&63|128).toString(16).toUpperCase(),Q}function q(H){for(var J="",Q=0,ot=H.length;Q<ot;){var lt=parseInt(H.substr(Q+1,2),16);if(lt<128)J+=String.fromCharCode(lt),Q+=3;else if(lt>=194&&lt<224){if(ot-Q>=6){var It=parseInt(H.substr(Q+4,2),16);J+=String.fromCharCode((lt&31)<<6|It&63)}else J+=H.substr(Q,6);Q+=6}else if(lt>=224){if(ot-Q>=9){var Rt=parseInt(H.substr(Q+4,2),16),se=parseInt(H.substr(Q+7,2),16);J+=String.fromCharCode((lt&15)<<12|(Rt&63)<<6|se&63)}else J+=H.substr(Q,9);Q+=9}else J+=H.substr(Q,3),Q+=3}return J}function Z(H,J){function Q(ot){var lt=q(ot);return lt.match(J.UNRESERVED)?lt:ot}return H.scheme&&(H.scheme=String(H.scheme).replace(J.PCT_ENCODED,Q).toLowerCase().replace(J.NOT_SCHEME,"")),H.userinfo!==void 0&&(H.userinfo=String(H.userinfo).replace(J.PCT_ENCODED,Q).replace(J.NOT_USERINFO,V).replace(J.PCT_ENCODED,a)),H.host!==void 0&&(H.host=String(H.host).replace(J.PCT_ENCODED,Q).toLowerCase().replace(J.NOT_HOST,V).replace(J.PCT_ENCODED,a)),H.path!==void 0&&(H.path=String(H.path).replace(J.PCT_ENCODED,Q).replace(H.scheme?J.NOT_PATH:J.NOT_PATH_NOSCHEME,V).replace(J.PCT_ENCODED,a)),H.query!==void 0&&(H.query=String(H.query).replace(J.PCT_ENCODED,Q).replace(J.NOT_QUERY,V).replace(J.PCT_ENCODED,a)),H.fragment!==void 0&&(H.fragment=String(H.fragment).replace(J.PCT_ENCODED,Q).replace(J.NOT_FRAGMENT,V).replace(J.PCT_ENCODED,a)),H}function rt(H){return H.replace(/^0*(.*)/,"$1")||"0"}function gt(H,J){var Q=H.match(J.IPV4ADDRESS)||[],ot=d(Q,2),lt=ot[1];return lt?lt.split(".").map(rt).join("."):H}function Ct(H,J){var Q=H.match(J.IPV6ADDRESS)||[],ot=d(Q,3),lt=ot[1],It=ot[2];if(lt){for(var Rt=lt.toLowerCase().split("::").reverse(),se=d(Rt,2),Ee=se[0],ue=se[1],Jt=ue?ue.split(":").map(rt):[],Wt=Ee.split(":").map(rt),ge=J.IPV4ADDRESS.test(Wt[Wt.length-1]),Gt=ge?7:8,jt=Wt.length-Gt,me=Array(Gt),Ge=0;Ge<Gt;++Ge)me[Ge]=Jt[Ge]||Wt[jt+Ge]||"";ge&&(me[Gt-1]=gt(me[Gt-1],J));var Cn=me.reduce(function(De,le,Ut){if(!le||le==="0"){var hn=De[De.length-1];hn&&hn.index+hn.length===Ut?hn.length++:De.push({index:Ut,length:1})}return De},[]),we=Cn.sort(function(De,le){return le.length-De.length})[0],Ve=void 0;if(we&&we.length>1){var Ke=me.slice(0,we.index),Be=me.slice(we.index+we.length);Ve=Ke.join(":")+"::"+Be.join(":")}else Ve=me.join(":");return It&&(Ve+="%"+It),Ve}else return H}var Ft=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,kt="".match(/(){0}/)[1]===void 0;function Ot(H){var J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Q={},ot=J.iri!==!1?f:h;J.reference==="suffix"&&(H=(J.scheme?J.scheme+":":"")+"//"+H);var lt=H.match(Ft);if(lt){kt?(Q.scheme=lt[1],Q.userinfo=lt[3],Q.host=lt[4],Q.port=parseInt(lt[5],10),Q.path=lt[6]||"",Q.query=lt[7],Q.fragment=lt[8],isNaN(Q.port)&&(Q.port=lt[5])):(Q.scheme=lt[1]||void 0,Q.userinfo=H.indexOf("@")!==-1?lt[3]:void 0,Q.host=H.indexOf("//")!==-1?lt[4]:void 0,Q.port=parseInt(lt[5],10),Q.path=lt[6]||"",Q.query=H.indexOf("?")!==-1?lt[7]:void 0,Q.fragment=H.indexOf("#")!==-1?lt[8]:void 0,isNaN(Q.port)&&(Q.port=H.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?lt[4]:void 0)),Q.host&&(Q.host=Ct(gt(Q.host,ot),ot)),Q.scheme===void 0&&Q.userinfo===void 0&&Q.host===void 0&&Q.port===void 0&&!Q.path&&Q.query===void 0?Q.reference="same-document":Q.scheme===void 0?Q.reference="relative":Q.fragment===void 0?Q.reference="absolute":Q.reference="uri",J.reference&&J.reference!=="suffix"&&J.reference!==Q.reference&&(Q.error=Q.error||"URI is not a "+J.reference+" reference.");var It=D[(J.scheme||Q.scheme||"").toLowerCase()];if(!J.unicodeSupport&&(!It||!It.unicodeSupport)){if(Q.host&&(J.domainHost||It&&It.domainHost))try{Q.host=G.toASCII(Q.host.replace(ot.PCT_ENCODED,q).toLowerCase())}catch(Rt){Q.error=Q.error||"Host's domain name can not be converted to ASCII via punycode: "+Rt}Z(Q,h)}else Z(Q,ot);It&&It.parse&&It.parse(Q,J)}else Q.error=Q.error||"URI can not be parsed.";return Q}function Lt(H,J){var Q=J.iri!==!1?f:h,ot=[];return H.userinfo!==void 0&&(ot.push(H.userinfo),ot.push("@")),H.host!==void 0&&ot.push(Ct(gt(String(H.host),Q),Q).replace(Q.IPV6ADDRESS,function(lt,It,Rt){return"["+It+(Rt?"%25"+Rt:"")+"]"})),(typeof H.port=="number"||typeof H.port=="string")&&(ot.push(":"),ot.push(String(H.port))),ot.length?ot.join(""):void 0}var Vt=/^\.\.?\//,$t=/^\/\.(\/|$)/,he=/^\/\.\.(\/|$)/,Zt=/^\/?(?:.|\n)*?(?=\/|$)/;function fe(H){for(var J=[];H.length;)if(H.match(Vt))H=H.replace(Vt,"");else if(H.match($t))H=H.replace($t,"/");else if(H.match(he))H=H.replace(he,"/"),J.pop();else if(H==="."||H==="..")H="";else{var Q=H.match(Zt);if(Q){var ot=Q[0];H=H.slice(ot.length),J.push(ot)}else throw new Error("Unexpected dot segment condition")}return J.join("")}function qt(H){var J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Q=J.iri?f:h,ot=[],lt=D[(J.scheme||H.scheme||"").toLowerCase()];if(lt&&lt.serialize&&lt.serialize(H,J),H.host&&!Q.IPV6ADDRESS.test(H.host)&&(J.domainHost||lt&&lt.domainHost))try{H.host=J.iri?G.toUnicode(H.host):G.toASCII(H.host.replace(Q.PCT_ENCODED,q).toLowerCase())}catch(se){H.error=H.error||"Host's domain name can not be converted to "+(J.iri?"Unicode":"ASCII")+" via punycode: "+se}Z(H,Q),J.reference!=="suffix"&&H.scheme&&(ot.push(H.scheme),ot.push(":"));var It=Lt(H,J);if(It!==void 0&&(J.reference!=="suffix"&&ot.push("//"),ot.push(It),H.path&&H.path.charAt(0)!=="/"&&ot.push("/")),H.path!==void 0){var Rt=H.path;!J.absolutePath&&(!lt||!lt.absolutePath)&&(Rt=fe(Rt)),It===void 0&&(Rt=Rt.replace(/^\/\//,"/%2F")),ot.push(Rt)}return H.query!==void 0&&(ot.push("?"),ot.push(H.query)),H.fragment!==void 0&&(ot.push("#"),ot.push(H.fragment)),ot.join("")}function Re(H,J){var Q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ot=arguments[3],lt={};return ot||(H=Ot(qt(H,Q),Q),J=Ot(qt(J,Q),Q)),Q=Q||{},!Q.tolerant&&J.scheme?(lt.scheme=J.scheme,lt.userinfo=J.userinfo,lt.host=J.host,lt.port=J.port,lt.path=fe(J.path||""),lt.query=J.query):(J.userinfo!==void 0||J.host!==void 0||J.port!==void 0?(lt.userinfo=J.userinfo,lt.host=J.host,lt.port=J.port,lt.path=fe(J.path||""),lt.query=J.query):(J.path?(J.path.charAt(0)==="/"?lt.path=fe(J.path):((H.userinfo!==void 0||H.host!==void 0||H.port!==void 0)&&!H.path?lt.path="/"+J.path:H.path?lt.path=H.path.slice(0,H.path.lastIndexOf("/")+1)+J.path:lt.path=J.path,lt.path=fe(lt.path)),lt.query=J.query):(lt.path=H.path,J.query!==void 0?lt.query=J.query:lt.query=H.query),lt.userinfo=H.userinfo,lt.host=H.host,lt.port=H.port),lt.scheme=H.scheme),lt.fragment=J.fragment,lt}function Ae(H,J,Q){var ot=l({scheme:"null"},Q);return qt(Re(Ot(H,ot),Ot(J,ot),ot,!0),ot)}function We(H,J){return typeof H=="string"?H=qt(Ot(H,J),J):s(H)==="object"&&(H=Ot(qt(H,J),J)),H}function xn(H,J,Q){return typeof H=="string"?H=qt(Ot(H,Q),Q):s(H)==="object"&&(H=qt(H,Q)),typeof J=="string"?J=qt(Ot(J,Q),Q):s(J)==="object"&&(J=qt(J,Q)),H===J}function cn(H,J){return H&&H.toString().replace(!J||!J.iri?h.ESCAPE:f.ESCAPE,V)}function Me(H,J){return H&&H.toString().replace(!J||!J.iri?h.PCT_ENCODED:f.PCT_ENCODED,q)}var an={scheme:"http",domainHost:!0,parse:function(H,J){return H.host||(H.error=H.error||"HTTP URIs must have a host."),H},serialize:function(H,J){var Q=String(H.scheme).toLowerCase()==="https";return(H.port===(Q?443:80)||H.port==="")&&(H.port=void 0),H.path||(H.path="/"),H}},Fn={scheme:"https",domainHost:an.domainHost,parse:an.parse,serialize:an.serialize};function Rn(H){return typeof H.secure=="boolean"?H.secure:String(H.scheme).toLowerCase()==="wss"}var Gn={scheme:"ws",domainHost:!0,parse:function(H,J){var Q=H;return Q.secure=Rn(Q),Q.resourceName=(Q.path||"/")+(Q.query?"?"+Q.query:""),Q.path=void 0,Q.query=void 0,Q},serialize:function(H,J){if((H.port===(Rn(H)?443:80)||H.port==="")&&(H.port=void 0),typeof H.secure=="boolean"&&(H.scheme=H.secure?"wss":"ws",H.secure=void 0),H.resourceName){var Q=H.resourceName.split("?"),ot=d(Q,2),lt=ot[0],It=ot[1];H.path=lt&&lt!=="/"?lt:void 0,H.query=It,H.resourceName=void 0}return H.fragment=void 0,H}},Ue={scheme:"wss",domainHost:Gn.domainHost,parse:Gn.parse,serialize:Gn.serialize},zn={},er="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Te="[0-9A-Fa-f]",Mn=i(i("%[EFef]"+Te+"%"+Te+Te+"%"+Te+Te)+"|"+i("%[89A-Fa-f]"+Te+"%"+Te+Te)+"|"+i("%"+Te+Te)),mn="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Vr="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",nr=r(Vr,'[\\"\\\\]'),wr="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Sn=new RegExp(er,"g"),Oe=new RegExp(Mn,"g"),xs=new RegExp(r("[^]",mn,"[\\.]",'[\\"]',nr),"g"),rr=new RegExp(r("[^]",er,wr),"g"),ir=rr;function kn(H){var J=q(H);return J.match(Sn)?J:H}var Br={scheme:"mailto",parse:function(H,J){var Q=H,ot=Q.to=Q.path?Q.path.split(","):[];if(Q.path=void 0,Q.query){for(var lt=!1,It={},Rt=Q.query.split("&"),se=0,Ee=Rt.length;se<Ee;++se){var ue=Rt[se].split("=");switch(ue[0]){case"to":for(var Jt=ue[1].split(","),Wt=0,ge=Jt.length;Wt<ge;++Wt)ot.push(Jt[Wt]);break;case"subject":Q.subject=Me(ue[1],J);break;case"body":Q.body=Me(ue[1],J);break;default:lt=!0,It[Me(ue[0],J)]=Me(ue[1],J);break}}lt&&(Q.headers=It)}Q.query=void 0;for(var Gt=0,jt=ot.length;Gt<jt;++Gt){var me=ot[Gt].split("@");if(me[0]=Me(me[0]),J.unicodeSupport)me[1]=Me(me[1],J).toLowerCase();else try{me[1]=G.toASCII(Me(me[1],J).toLowerCase())}catch(Ge){Q.error=Q.error||"Email address's domain name can not be converted to ASCII via punycode: "+Ge}ot[Gt]=me.join("@")}return Q},serialize:function(H,J){var Q=H,ot=o(H.to);if(ot){for(var lt=0,It=ot.length;lt<It;++lt){var Rt=String(ot[lt]),se=Rt.lastIndexOf("@"),Ee=Rt.slice(0,se).replace(Oe,kn).replace(Oe,a).replace(xs,V),ue=Rt.slice(se+1);try{ue=J.iri?G.toUnicode(ue):G.toASCII(Me(ue,J).toLowerCase())}catch(Gt){Q.error=Q.error||"Email address's domain name can not be converted to "+(J.iri?"Unicode":"ASCII")+" via punycode: "+Gt}ot[lt]=Ee+"@"+ue}Q.path=ot.join(",")}var Jt=H.headers=H.headers||{};H.subject&&(Jt.subject=H.subject),H.body&&(Jt.body=H.body);var Wt=[];for(var ge in Jt)Jt[ge]!==zn[ge]&&Wt.push(ge.replace(Oe,kn).replace(Oe,a).replace(rr,V)+"="+Jt[ge].replace(Oe,kn).replace(Oe,a).replace(ir,V));return Wt.length&&(Q.query=Wt.join("&")),Q}},sr=/^([^\:]+)\:(.*)/,Vn={scheme:"urn",parse:function(H,J){var Q=H.path&&H.path.match(sr),ot=H;if(Q){var lt=J.scheme||ot.scheme||"urn",It=Q[1].toLowerCase(),Rt=Q[2],se=lt+":"+(J.nid||It),Ee=D[se];ot.nid=It,ot.nss=Rt,ot.path=void 0,Ee&&(ot=Ee.parse(ot,J))}else ot.error=ot.error||"URN can not be parsed.";return ot},serialize:function(H,J){var Q=J.scheme||H.scheme||"urn",ot=H.nid,lt=Q+":"+(J.nid||ot),It=D[lt];It&&(H=It.serialize(H,J));var Rt=H,se=H.nss;return Rt.path=(ot||J.nid)+":"+se,Rt}},Hr=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,qr={scheme:"urn:uuid",parse:function(H,J){var Q=H;return Q.uuid=Q.nss,Q.nss=void 0,!J.tolerant&&(!Q.uuid||!Q.uuid.match(Hr))&&(Q.error=Q.error||"UUID is not valid."),Q},serialize:function(H,J){var Q=H;return Q.nss=(H.uuid||"").toLowerCase(),Q}};D[an.scheme]=an,D[Fn.scheme]=Fn,D[Gn.scheme]=Gn,D[Ue.scheme]=Ue,D[Br.scheme]=Br,D[Vn.scheme]=Vn,D[qr.scheme]=qr,e.SCHEMES=D,e.pctEncChar=V,e.pctDecChars=q,e.parse=Ot,e.removeDotSegments=fe,e.serialize=qt,e.resolveComponents=Re,e.resolve=Ae,e.normalize=We,e.equal=xn,e.escapeComponent=cn,e.unescapeComponent=Me,Object.defineProperty(e,"__esModule",{value:!0})})})(uh,uh.exports);var Up=uh.exports;const p5=vn(Up),g5=Pt({__proto__:null,default:p5},[Up]),m5=At(g5);Object.defineProperty(hh,"__esModule",{value:!0});const Gp=m5;Gp.code='require("ajv/dist/runtime/uri").default';var v5=hh.default=Gp;const y5=Pt({__proto__:null,default:v5},[hh]),_5=At(y5);(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.CodeGen=n.Name=n.nil=n.stringify=n.str=n._=n.KeywordCxt=void 0;var t=zs;Object.defineProperty(n,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var e=te;Object.defineProperty(n,"_",{enumerable:!0,get:function(){return e._}}),Object.defineProperty(n,"str",{enumerable:!0,get:function(){return e.str}}),Object.defineProperty(n,"stringify",{enumerable:!0,get:function(){return e.stringify}}),Object.defineProperty(n,"nil",{enumerable:!0,get:function(){return e.nil}}),Object.defineProperty(n,"Name",{enumerable:!0,get:function(){return e.Name}}),Object.defineProperty(n,"CodeGen",{enumerable:!0,get:function(){return e.CodeGen}});const r=rh,i=ah,s=x0,a=ch,o=te,l=Bo,c=zo,h=de,f=f5,d=_5,u=(K,$)=>new RegExp(K,$);u.code="new RegExp";const p=["removeAdditional","useDefaults","coerceTypes"],v=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),_={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},x={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},b=200;function m(K){var $,P,E,C,M,G,D,V,q,Z,rt,gt,Ct,Ft,kt,Ot,Lt,Vt,$t,he,Zt,fe,qt,Re,Ae;const We=K.strict,xn=($=K.code)===null||$===void 0?void 0:$.optimize,cn=xn===!0||xn===void 0?1:xn||0,Me=(E=(P=K.code)===null||P===void 0?void 0:P.regExp)!==null&&E!==void 0?E:u,an=(C=K.uriResolver)!==null&&C!==void 0?C:d.default;return{strictSchema:(G=(M=K.strictSchema)!==null&&M!==void 0?M:We)!==null&&G!==void 0?G:!0,strictNumbers:(V=(D=K.strictNumbers)!==null&&D!==void 0?D:We)!==null&&V!==void 0?V:!0,strictTypes:(Z=(q=K.strictTypes)!==null&&q!==void 0?q:We)!==null&&Z!==void 0?Z:"log",strictTuples:(gt=(rt=K.strictTuples)!==null&&rt!==void 0?rt:We)!==null&&gt!==void 0?gt:"log",strictRequired:(Ft=(Ct=K.strictRequired)!==null&&Ct!==void 0?Ct:We)!==null&&Ft!==void 0?Ft:!1,code:K.code?{...K.code,optimize:cn,regExp:Me}:{optimize:cn,regExp:Me},loopRequired:(kt=K.loopRequired)!==null&&kt!==void 0?kt:b,loopEnum:(Ot=K.loopEnum)!==null&&Ot!==void 0?Ot:b,meta:(Lt=K.meta)!==null&&Lt!==void 0?Lt:!0,messages:(Vt=K.messages)!==null&&Vt!==void 0?Vt:!0,inlineRefs:($t=K.inlineRefs)!==null&&$t!==void 0?$t:!0,schemaId:(he=K.schemaId)!==null&&he!==void 0?he:"$id",addUsedSchema:(Zt=K.addUsedSchema)!==null&&Zt!==void 0?Zt:!0,validateSchema:(fe=K.validateSchema)!==null&&fe!==void 0?fe:!0,validateFormats:(qt=K.validateFormats)!==null&&qt!==void 0?qt:!0,unicodeRegExp:(Re=K.unicodeRegExp)!==null&&Re!==void 0?Re:!0,int32range:(Ae=K.int32range)!==null&&Ae!==void 0?Ae:!0,uriResolver:an}}class k{constructor($={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,$=this.opts={...$,...m($)};const{es5:P,lines:E}=this.opts.code;this.scope=new o.ValueScope({scope:{},prefixes:v,es5:P,lines:E}),this.logger=Y($.logger);const C=$.validateFormats;$.validateFormats=!1,this.RULES=(0,s.getRules)(),O.call(this,_,$,"NOT SUPPORTED"),O.call(this,x,$,"DEPRECATED","warn"),this._metaOpts=U.call(this),$.formats&&R.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),$.keywords&&L.call(this,$.keywords),typeof $.meta=="object"&&this.addMetaSchema($.meta),F.call(this),$.validateFormats=C}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:$,meta:P,schemaId:E}=this.opts;let C=f;E==="id"&&(C={...f},C.id=C.$id,delete C.$id),P&&$&&this.addMetaSchema(C,C[E],!1)}defaultMeta(){const{meta:$,schemaId:P}=this.opts;return this.opts.defaultMeta=typeof $=="object"?$[P]||$:void 0}validate($,P){let E;if(typeof $=="string"){if(E=this.getSchema($),!E)throw new Error(`no schema with key or ref "${$}"`)}else E=this.compile($);const C=E(P);return"$async"in E||(this.errors=E.errors),C}compile($,P){const E=this._addSchema($,P);return E.validate||this._compileSchemaEnv(E)}compileAsync($,P){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:E}=this.opts;return C.call(this,$,P);async function C(Z,rt){await M.call(this,Z.$schema);const gt=this._addSchema(Z,rt);return gt.validate||G.call(this,gt)}async function M(Z){Z&&!this.getSchema(Z)&&await C.call(this,{$ref:Z},!0)}async function G(Z){try{return this._compileSchemaEnv(Z)}catch(rt){if(!(rt instanceof i.default))throw rt;return D.call(this,rt),await V.call(this,rt.missingSchema),G.call(this,Z)}}function D({missingSchema:Z,missingRef:rt}){if(this.refs[Z])throw new Error(`AnySchema ${Z} is loaded but ${rt} cannot be resolved`)}async function V(Z){const rt=await q.call(this,Z);this.refs[Z]||await M.call(this,rt.$schema),this.refs[Z]||this.addSchema(rt,Z,P)}async function q(Z){const rt=this._loading[Z];if(rt)return rt;try{return await(this._loading[Z]=E(Z))}finally{delete this._loading[Z]}}}addSchema($,P,E,C=this.opts.validateSchema){if(Array.isArray($)){for(const G of $)this.addSchema(G,void 0,E,C);return this}let M;if(typeof $=="object"){const{schemaId:G}=this.opts;if(M=$[G],M!==void 0&&typeof M!="string")throw new Error(`schema ${G} must be string`)}return P=(0,l.normalizeId)(P||M),this._checkUnique(P),this.schemas[P]=this._addSchema($,E,P,C,!0),this}addMetaSchema($,P,E=this.opts.validateSchema){return this.addSchema($,P,!0,E),this}validateSchema($,P){if(typeof $=="boolean")return!0;let E;if(E=$.$schema,E!==void 0&&typeof E!="string")throw new Error("$schema must be a string");if(E=E||this.opts.defaultMeta||this.defaultMeta(),!E)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const C=this.validate(E,$);if(!C&&P){const M="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(M);else throw new Error(M)}return C}getSchema($){let P;for(;typeof(P=T.call(this,$))=="string";)$=P;if(P===void 0){const{schemaId:E}=this.opts,C=new a.SchemaEnv({schema:{},schemaId:E});if(P=a.resolveSchema.call(this,C,$),!P)return;this.refs[$]=P}return P.validate||this._compileSchemaEnv(P)}removeSchema($){if($ instanceof RegExp)return this._removeAllSchemas(this.schemas,$),this._removeAllSchemas(this.refs,$),this;switch(typeof $){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const P=T.call(this,$);return typeof P=="object"&&this._cache.delete(P.schema),delete this.schemas[$],delete this.refs[$],this}case"object":{const P=$;this._cache.delete(P);let E=$[this.opts.schemaId];return E&&(E=(0,l.normalizeId)(E),delete this.schemas[E],delete this.refs[E]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary($){for(const P of $)this.addKeyword(P);return this}addKeyword($,P){let E;if(typeof $=="string")E=$,typeof P=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),P.keyword=E);else if(typeof $=="object"&&P===void 0){if(P=$,E=P.keyword,Array.isArray(E)&&!E.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(W.call(this,E,P),!P)return(0,h.eachItem)(E,M=>ct.call(this,M)),this;St.call(this,P);const C={...P,type:(0,c.getJSONTypes)(P.type),schemaType:(0,c.getJSONTypes)(P.schemaType)};return(0,h.eachItem)(E,C.type.length===0?M=>ct.call(this,M,C):M=>C.type.forEach(G=>ct.call(this,M,C,G))),this}getKeyword($){const P=this.RULES.all[$];return typeof P=="object"?P.definition:!!P}removeKeyword($){const{RULES:P}=this;delete P.keywords[$],delete P.all[$];for(const E of P.rules){const C=E.rules.findIndex(M=>M.keyword===$);C>=0&&E.rules.splice(C,1)}return this}addFormat($,P){return typeof P=="string"&&(P=new RegExp(P)),this.formats[$]=P,this}errorsText($=this.errors,{separator:P=", ",dataVar:E="data"}={}){return!$||$.length===0?"No errors":$.map(C=>`${E}${C.instancePath} ${C.message}`).reduce((C,M)=>C+P+M)}$dataMetaSchema($,P){const E=this.RULES.all;$=JSON.parse(JSON.stringify($));for(const C of P){const M=C.split("/").slice(1);let G=$;for(const D of M)G=G[D];for(const D in E){const V=E[D];if(typeof V!="object")continue;const{$data:q}=V.definition,Z=G[D];q&&Z&&(G[D]=st(Z))}}return $}_removeAllSchemas($,P){for(const E in $){const C=$[E];(!P||P.test(E))&&(typeof C=="string"?delete $[E]:C&&!C.meta&&(this._cache.delete(C.schema),delete $[E]))}}_addSchema($,P,E,C=this.opts.validateSchema,M=this.opts.addUsedSchema){let G;const{schemaId:D}=this.opts;if(typeof $=="object")G=$[D];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof $!="boolean")throw new Error("schema must be object or boolean")}let V=this._cache.get($);if(V!==void 0)return V;E=(0,l.normalizeId)(G||E);const q=l.getSchemaRefs.call(this,$,E);return V=new a.SchemaEnv({schema:$,schemaId:D,meta:P,baseId:E,localRefs:q}),this._cache.set(V.schema,V),M&&!E.startsWith("#")&&(E&&this._checkUnique(E),this.refs[E]=V),C&&this.validateSchema($,!0),V}_checkUnique($){if(this.schemas[$]||this.refs[$])throw new Error(`schema with key or id "${$}" already exists`)}_compileSchemaEnv($){if($.meta?this._compileMetaSchema($):a.compileSchema.call(this,$),!$.validate)throw new Error("ajv implementation error");return $.validate}_compileMetaSchema($){const P=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,$)}finally{this.opts=P}}}n.default=k,k.ValidationError=r.default,k.MissingRefError=i.default;function O(K,$,P,E="error"){for(const C in K){const M=C;M in $&&this.logger[E](`${P}: option ${C}. ${K[M]}`)}}function T(K){return K=(0,l.normalizeId)(K),this.schemas[K]||this.refs[K]}function F(){const K=this.opts.schemas;if(K)if(Array.isArray(K))this.addSchema(K);else for(const $ in K)this.addSchema(K[$],$)}function R(){for(const K in this.opts.formats){const $=this.opts.formats[K];$&&this.addFormat(K,$)}}function L(K){if(Array.isArray(K)){this.addVocabulary(K);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const $ in K){const P=K[$];P.keyword||(P.keyword=$),this.addKeyword(P)}}function U(){const K={...this.opts};for(const $ of p)delete K[$];return K}const B={log(){},warn(){},error(){}};function Y(K){if(K===!1)return B;if(K===void 0)return console;if(K.log&&K.warn&&K.error)return K;throw new Error("logger must implement log, warn and error methods")}const tt=/^[a-z_$][a-z0-9_$:-]*$/i;function W(K,$){const{RULES:P}=this;if((0,h.eachItem)(K,E=>{if(P.keywords[E])throw new Error(`Keyword ${E} is already defined`);if(!tt.test(E))throw new Error(`Keyword ${E} has invalid name`)}),!!$&&$.$data&&!("code"in $||"validate"in $))throw new Error('$data keyword must have "code" or "validate" function')}function ct(K,$,P){var E;const C=$==null?void 0:$.post;if(P&&C)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:M}=this;let G=C?M.post:M.rules.find(({type:V})=>V===P);if(G||(G={type:P,rules:[]},M.rules.push(G)),M.keywords[K]=!0,!$)return;const D={keyword:K,definition:{...$,type:(0,c.getJSONTypes)($.type),schemaType:(0,c.getJSONTypes)($.schemaType)}};$.before?wt.call(this,G,D,$.before):G.rules.push(D),M.all[K]=D,(E=$.implements)===null||E===void 0||E.forEach(V=>this.addKeyword(V))}function wt(K,$,P){const E=K.rules.findIndex(C=>C.keyword===P);E>=0?K.rules.splice(E,0,$):(K.rules.push($),this.logger.warn(`rule ${P} is not defined`))}function St(K){let{metaSchema:$}=K;$!==void 0&&(K.$data&&this.opts.$data&&($=st($)),K.validateSchema=this.compile($,!0))}const xt={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function st(K){return{anyOf:[K,xt]}}})(Gc);const b5=vn(Gc),w5=Pt({__proto__:null,default:b5},[Gc]),x5=At(w5);var dh={},fh={},ph={};Object.defineProperty(ph,"__esModule",{value:!0});const S5={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};var k5=ph.default=S5;const C5=Pt({__proto__:null,default:k5},[ph]),T5=At(C5);var xi={};Object.defineProperty(xi,"__esModule",{value:!0});var zp=xi.callRef=qp=xi.getValidate=void 0;const E5=ah,Vp=Kn,yn=te,es=Er,Bp=ch,Ko=de,P5={keyword:"$ref",schemaType:"string",code(n){const{gen:t,schema:e,it:r}=n,{baseId:i,schemaEnv:s,validateName:a,opts:o,self:l}=r,{root:c}=s;if((e==="#"||e==="#/")&&i===c.baseId)return f();const h=Bp.resolveRef.call(l,c,i,e);if(h===void 0)throw new E5.default(r.opts.uriResolver,i,e);if(h instanceof Bp.SchemaEnv)return d(h);return u(h);function f(){if(s===c)return Xo(n,a,s,s.$async);const p=t.scopeValue("root",{ref:c});return Xo(n,(0,yn._)`${p}.validate`,c,c.$async)}function d(p){const v=Hp(n,p);Xo(n,v,p,p.$async)}function u(p){const v=t.scopeValue("schema",o.code.source===!0?{ref:p,code:(0,yn.stringify)(p)}:{ref:p}),_=t.name("valid"),x=n.subschema({schema:p,dataTypes:[],schemaPath:yn.nil,topSchemaRef:v,errSchemaPath:e},_);n.mergeEvaluated(x),n.ok(_)}}};function Hp(n,t){const{gen:e}=n;return t.validate?e.scopeValue("validate",{ref:t.validate}):(0,yn._)`${e.scopeValue("wrapper",{ref:t})}.validate`}var qp=xi.getValidate=Hp;function Xo(n,t,e,r){const{gen:i,it:s}=n,{allErrors:a,schemaEnv:o,opts:l}=s,c=l.passContext?es.default.this:yn.nil;r?h():f();function h(){if(!o.$async)throw new Error("async schema referenced by sync schema");const p=i.let("valid");i.try(()=>{i.code((0,yn._)`await ${(0,Vp.callValidateCode)(n,t,c)}`),u(t),a||i.assign(p,!0)},v=>{i.if((0,yn._)`!(${v} instanceof ${s.ValidationError})`,()=>i.throw(v)),d(v),a||i.assign(p,!1)}),n.ok(p)}function f(){n.result((0,Vp.callValidateCode)(n,t,c),()=>u(t),()=>d(t))}function d(p){const v=(0,yn._)`${p}.errors`;i.assign(es.default.vErrors,(0,yn._)`${es.default.vErrors} === null ? ${v} : ${es.default.vErrors}.concat(${v})`),i.assign(es.default.errors,(0,yn._)`${es.default.vErrors}.length`)}function u(p){var v;if(!s.opts.unevaluated)return;const _=(v=e==null?void 0:e.validate)===null||v===void 0?void 0:v.evaluated;if(s.props!==!0)if(_&&!_.dynamicProps)_.props!==void 0&&(s.props=Ko.mergeEvaluated.props(i,_.props,s.props));else{const x=i.var("props",(0,yn._)`${p}.evaluated.props`);s.props=Ko.mergeEvaluated.props(i,x,s.props,yn.Name)}if(s.items!==!0)if(_&&!_.dynamicItems)_.items!==void 0&&(s.items=Ko.mergeEvaluated.items(i,_.items,s.items));else{const x=i.var("items",(0,yn._)`${p}.evaluated.items`);s.items=Ko.mergeEvaluated.items(i,x,s.items,yn.Name)}}}zp=xi.callRef=Xo;var A5=xi.default=P5;const O5=Pt({__proto__:null,get callRef(){return zp},default:A5,get getValidate(){return qp}},[xi]),$5=At(O5);Object.defineProperty(fh,"__esModule",{value:!0});const N5=T5,F5=$5,R5=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",N5.default,F5.default];var M5=fh.default=R5;const D5=Pt({__proto__:null,default:M5},[fh]),I5=At(D5);var gh={},mh={};Object.defineProperty(mh,"__esModule",{value:!0});const Jo=te,ti=Jo.operators,Qo={maximum:{okStr:"<=",ok:ti.LTE,fail:ti.GT},minimum:{okStr:">=",ok:ti.GTE,fail:ti.LT},exclusiveMaximum:{okStr:"<",ok:ti.LT,fail:ti.GTE},exclusiveMinimum:{okStr:">",ok:ti.GT,fail:ti.LTE}},j5={message:({keyword:n,schemaCode:t})=>(0,Jo.str)`must be ${Qo[n].okStr} ${t}`,params:({keyword:n,schemaCode:t})=>(0,Jo._)`{comparison: ${Qo[n].okStr}, limit: ${t}}`},L5={keyword:Object.keys(Qo),type:"number",schemaType:"number",$data:!0,error:j5,code(n){const{keyword:t,data:e,schemaCode:r}=n;n.fail$data((0,Jo._)`${e} ${Qo[t].fail} ${r} || isNaN(${e})`)}};var U5=mh.default=L5;const G5=Pt({__proto__:null,default:U5},[mh]),z5=At(G5);var vh={};Object.defineProperty(vh,"__esModule",{value:!0});const Vs=te,V5={message:({schemaCode:n})=>(0,Vs.str)`must be multiple of ${n}`,params:({schemaCode:n})=>(0,Vs._)`{multipleOf: ${n}}`},B5={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:V5,code(n){const{gen:t,data:e,schemaCode:r,it:i}=n,s=i.opts.multipleOfPrecision,a=t.let("res"),o=s?(0,Vs._)`Math.abs(Math.round(${a}) - ${a}) > 1e-${s}`:(0,Vs._)`${a} !== parseInt(${a})`;n.fail$data((0,Vs._)`(${r} === 0 || (${a} = ${e}/${r}, ${o}))`)}};var H5=vh.default=B5;const q5=Pt({__proto__:null,default:H5},[vh]),Y5=At(q5);var yh={},_h={};Object.defineProperty(_h,"__esModule",{value:!0});function Yp(n){const t=n.length;let e=0,r=0,i;for(;r<t;)e++,i=n.charCodeAt(r++),i>=55296&&i<=56319&&r<t&&(i=n.charCodeAt(r),(i&64512)===56320&&r++);return e}var K5=_h.default=Yp;Yp.code='require("ajv/dist/runtime/ucs2length").default';const X5=Pt({__proto__:null,default:K5},[_h]),J5=At(X5);Object.defineProperty(yh,"__esModule",{value:!0});const Si=te,Q5=de,Z5=J5,W5={message({keyword:n,schemaCode:t}){const e=n==="maxLength"?"more":"fewer";return(0,Si.str)`must NOT have ${e} than ${t} characters`},params:({schemaCode:n})=>(0,Si._)`{limit: ${n}}`},t3={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:W5,code(n){const{keyword:t,data:e,schemaCode:r,it:i}=n,s=t==="maxLength"?Si.operators.GT:Si.operators.LT,a=i.opts.unicode===!1?(0,Si._)`${e}.length`:(0,Si._)`${(0,Q5.useFunc)(n.gen,Z5.default)}(${e})`;n.fail$data((0,Si._)`${a} ${s} ${r}`)}};var e3=yh.default=t3;const n3=Pt({__proto__:null,default:e3},[yh]),r3=At(n3);var bh={};Object.defineProperty(bh,"__esModule",{value:!0});const i3=Kn,Zo=te,s3={message:({schemaCode:n})=>(0,Zo.str)`must match pattern "${n}"`,params:({schemaCode:n})=>(0,Zo._)`{pattern: ${n}}`},a3={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:s3,code(n){const{data:t,$data:e,schema:r,schemaCode:i,it:s}=n,a=s.opts.unicodeRegExp?"u":"",o=e?(0,Zo._)`(new RegExp(${i}, ${a}))`:(0,i3.usePattern)(n,r);n.fail$data((0,Zo._)`!${o}.test(${t})`)}};var o3=bh.default=a3;const l3=Pt({__proto__:null,default:o3},[bh]),c3=At(l3);var wh={};Object.defineProperty(wh,"__esModule",{value:!0});const Bs=te,h3={message({keyword:n,schemaCode:t}){const e=n==="maxProperties"?"more":"fewer";return(0,Bs.str)`must NOT have ${e} than ${t} properties`},params:({schemaCode:n})=>(0,Bs._)`{limit: ${n}}`},u3={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:h3,code(n){const{keyword:t,data:e,schemaCode:r}=n,i=t==="maxProperties"?Bs.operators.GT:Bs.operators.LT;n.fail$data((0,Bs._)`Object.keys(${e}).length ${i} ${r}`)}};var d3=wh.default=u3;const f3=Pt({__proto__:null,default:d3},[wh]),p3=At(f3);var xh={};Object.defineProperty(xh,"__esModule",{value:!0});const Hs=Kn,qs=te,g3=de,m3={message:({params:{missingProperty:n}})=>(0,qs.str)`must have required property '${n}'`,params:({params:{missingProperty:n}})=>(0,qs._)`{missingProperty: ${n}}`},v3={keyword:"required",type:"object",schemaType:"array",$data:!0,error:m3,code(n){const{gen:t,schema:e,schemaCode:r,data:i,$data:s,it:a}=n,{opts:o}=a;if(!s&&e.length===0)return;const l=e.length>=o.loopRequired;if(a.allErrors?c():h(),o.strictRequired){const u=n.parentSchema.properties,{definedProperties:p}=n.it;for(const v of e)if((u==null?void 0:u[v])===void 0&&!p.has(v)){const _=a.schemaEnv.baseId+a.errSchemaPath,x=`required property "${v}" is not defined at "${_}" (strictRequired)`;(0,g3.checkStrictMode)(a,x,a.opts.strictRequired)}}function c(){if(l||s)n.block$data(qs.nil,f);else for(const u of e)(0,Hs.checkReportMissingProp)(n,u)}function h(){const u=t.let("missing");if(l||s){const p=t.let("valid",!0);n.block$data(p,()=>d(u,p)),n.ok(p)}else t.if((0,Hs.checkMissingProp)(n,e,u)),(0,Hs.reportMissingProp)(n,u),t.else()}function f(){t.forOf("prop",r,u=>{n.setParams({missingProperty:u}),t.if((0,Hs.noPropertyInData)(t,i,u,o.ownProperties),()=>n.error())})}function d(u,p){n.setParams({missingProperty:u}),t.forOf(u,r,()=>{t.assign(p,(0,Hs.propertyInData)(t,i,u,o.ownProperties)),t.if((0,qs.not)(p),()=>{n.error(),t.break()})},qs.nil)}}};var y3=xh.default=v3;const _3=Pt({__proto__:null,default:y3},[xh]),b3=At(_3);var Sh={};Object.defineProperty(Sh,"__esModule",{value:!0});const Ys=te,w3={message({keyword:n,schemaCode:t}){const e=n==="maxItems"?"more":"fewer";return(0,Ys.str)`must NOT have ${e} than ${t} items`},params:({schemaCode:n})=>(0,Ys._)`{limit: ${n}}`},x3={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:w3,code(n){const{keyword:t,data:e,schemaCode:r}=n,i=t==="maxItems"?Ys.operators.GT:Ys.operators.LT;n.fail$data((0,Ys._)`${e}.length ${i} ${r}`)}};var S3=Sh.default=x3;const k3=Pt({__proto__:null,default:S3},[Sh]),C3=At(k3);var kh={},Ch={};Object.defineProperty(Ch,"__esModule",{value:!0});const Kp=rp;Kp.code='require("ajv/dist/runtime/equal").default';var T3=Ch.default=Kp;const E3=Pt({__proto__:null,default:T3},[Ch]),Th=At(E3);Object.defineProperty(kh,"__esModule",{value:!0});const Eh=zo,nn=te,P3=de,A3=Th,O3={message:({params:{i:n,j:t}})=>(0,nn.str)`must NOT have duplicate items (items ## ${t} and ${n} are identical)`,params:({params:{i:n,j:t}})=>(0,nn._)`{i: ${n}, j: ${t}}`},$3={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:O3,code(n){const{gen:t,data:e,$data:r,schema:i,parentSchema:s,schemaCode:a,it:o}=n;if(!r&&!i)return;const l=t.let("valid"),c=s.items?(0,Eh.getSchemaTypes)(s.items):[];n.block$data(l,h,(0,nn._)`${a} === false`),n.ok(l);function h(){const p=t.let("i",(0,nn._)`${e}.length`),v=t.let("j");n.setParams({i:p,j:v}),t.assign(l,!0),t.if((0,nn._)`${p} > 1`,()=>(f()?d:u)(p,v))}function f(){return c.length>0&&!c.some(p=>p==="object"||p==="array")}function d(p,v){const _=t.name("item"),x=(0,Eh.checkDataTypes)(c,_,o.opts.strictNumbers,Eh.DataType.Wrong),b=t.const("indices",(0,nn._)`{}`);t.for((0,nn._)`;${p}--;`,()=>{t.let(_,(0,nn._)`${e}[${p}]`),t.if(x,(0,nn._)`continue`),c.length>1&&t.if((0,nn._)`typeof ${_} == "string"`,(0,nn._)`${_} += "_"`),t.if((0,nn._)`typeof ${b}[${_}] == "number"`,()=>{t.assign(v,(0,nn._)`${b}[${_}]`),n.error(),t.assign(l,!1).break()}).code((0,nn._)`${b}[${_}] = ${p}`)})}function u(p,v){const _=(0,P3.useFunc)(t,A3.default),x=t.name("outer");t.label(x).for((0,nn._)`;${p}--;`,()=>t.for((0,nn._)`${v} = ${p}; ${v}--;`,()=>t.if((0,nn._)`${_}(${e}[${p}], ${e}[${v}])`,()=>{n.error(),t.assign(l,!1).break(x)})))}}};var N3=kh.default=$3;const F3=Pt({__proto__:null,default:N3},[kh]),R3=At(F3);var Ph={};Object.defineProperty(Ph,"__esModule",{value:!0});const Ah=te,M3=de,D3=Th,I3={message:"must be equal to constant",params:({schemaCode:n})=>(0,Ah._)`{allowedValue: ${n}}`},j3={keyword:"const",$data:!0,error:I3,code(n){const{gen:t,data:e,$data:r,schemaCode:i,schema:s}=n;r||s&&typeof s=="object"?n.fail$data((0,Ah._)`!${(0,M3.useFunc)(t,D3.default)}(${e}, ${i})`):n.fail((0,Ah._)`${s} !== ${e}`)}};var L3=Ph.default=j3;const U3=Pt({__proto__:null,default:L3},[Ph]),G3=At(U3);var Oh={};Object.defineProperty(Oh,"__esModule",{value:!0});const Ks=te,z3=de,V3=Th,B3={message:"must be equal to one of the allowed values",params:({schemaCode:n})=>(0,Ks._)`{allowedValues: ${n}}`},H3={keyword:"enum",schemaType:"array",$data:!0,error:B3,code(n){const{gen:t,data:e,$data:r,schema:i,schemaCode:s,it:a}=n;if(!r&&i.length===0)throw new Error("enum must have non-empty array");const o=i.length>=a.opts.loopEnum;let l;const c=()=>l??(l=(0,z3.useFunc)(t,V3.default));let h;if(o||r)h=t.let("valid"),n.block$data(h,f);else{if(!Array.isArray(i))throw new Error("ajv implementation error");const u=t.const("vSchema",s);h=(0,Ks.or)(...i.map((p,v)=>d(u,v)))}n.pass(h);function f(){t.assign(h,!1),t.forOf("v",s,u=>t.if((0,Ks._)`${c()}(${e}, ${u})`,()=>t.assign(h,!0).break()))}function d(u,p){const v=i[p];return typeof v=="object"&&v!==null?(0,Ks._)`${c()}(${e}, ${u}[${p}])`:(0,Ks._)`${e} === ${v}`}}};var q3=Oh.default=H3;const Y3=Pt({__proto__:null,default:q3},[Oh]),K3=At(Y3);Object.defineProperty(gh,"__esModule",{value:!0});const X3=z5,J3=Y5,Q3=r3,Z3=c3,W3=p3,t4=b3,e4=C3,n4=R3,r4=G3,i4=K3,s4=[X3.default,J3.default,Q3.default,Z3.default,W3.default,t4.default,e4.default,n4.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},r4.default,i4.default];var a4=gh.default=s4;const o4=Pt({__proto__:null,default:a4},[gh]),l4=At(o4);var $h={},Xs={};Object.defineProperty(Xs,"__esModule",{value:!0});var Xp=Xs.validateAdditionalItems=void 0;const ki=te,Nh=de,c4={message:({params:{len:n}})=>(0,ki.str)`must NOT have more than ${n} items`,params:({params:{len:n}})=>(0,ki._)`{limit: ${n}}`},h4={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:c4,code(n){const{parentSchema:t,it:e}=n,{items:r}=t;if(!Array.isArray(r)){(0,Nh.checkStrictMode)(e,'"additionalItems" is ignored when "items" is not an array of schemas');return}Jp(n,r)}};function Jp(n,t){const{gen:e,schema:r,data:i,keyword:s,it:a}=n;a.items=!0;const o=e.const("len",(0,ki._)`${i}.length`);if(r===!1)n.setParams({len:t.length}),n.pass((0,ki._)`${o} <= ${t.length}`);else if(typeof r=="object"&&!(0,Nh.alwaysValidSchema)(a,r)){const c=e.var("valid",(0,ki._)`${o} <= ${t.length}`);e.if((0,ki.not)(c),()=>l(c)),n.ok(c)}function l(c){e.forRange("i",t.length,o,h=>{n.subschema({keyword:s,dataProp:h,dataPropType:Nh.Type.Num},c),a.allErrors||e.if((0,ki.not)(c),()=>e.break())})}}Xp=Xs.validateAdditionalItems=Jp;var u4=Xs.default=h4;const d4=Pt({__proto__:null,default:u4,get validateAdditionalItems(){return Xp}},[Xs]),Qp=At(d4);var Fh={},Js={};Object.defineProperty(Js,"__esModule",{value:!0});var Zp=Js.validateTuple=void 0;const Wp=te,Wo=de,f4=Kn,p4={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(n){const{schema:t,it:e}=n;if(Array.isArray(t))return tg(n,"additionalItems",t);e.items=!0,!(0,Wo.alwaysValidSchema)(e,t)&&n.ok((0,f4.validateArray)(n))}};function tg(n,t,e=n.schema){const{gen:r,parentSchema:i,data:s,keyword:a,it:o}=n;h(i),o.opts.unevaluated&&e.length&&o.items!==!0&&(o.items=Wo.mergeEvaluated.items(r,e.length,o.items));const l=r.name("valid"),c=r.const("len",(0,Wp._)`${s}.length`);e.forEach((f,d)=>{(0,Wo.alwaysValidSchema)(o,f)||(r.if((0,Wp._)`${c} > ${d}`,()=>n.subschema({keyword:a,schemaProp:d,dataProp:d},l)),n.ok(l))});function h(f){const{opts:d,errSchemaPath:u}=o,p=e.length,v=p===f.minItems&&(p===f.maxItems||f[t]===!1);if(d.strictTuples&&!v){const _=`"${a}" is ${p}-tuple, but minItems or maxItems/${t} are not specified or different at path "${u}"`;(0,Wo.checkStrictMode)(o,_,d.strictTuples)}}}Zp=Js.validateTuple=tg;var g4=Js.default=p4;const m4=Pt({__proto__:null,default:g4,get validateTuple(){return Zp}},[Js]),eg=At(m4);Object.defineProperty(Fh,"__esModule",{value:!0});const v4=eg,y4={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:n=>(0,v4.validateTuple)(n,"items")};var _4=Fh.default=y4;const b4=Pt({__proto__:null,default:_4},[Fh]),w4=At(b4);var Rh={};Object.defineProperty(Rh,"__esModule",{value:!0});const ng=te,x4=de,S4=Kn,k4=Qp,C4={message:({params:{len:n}})=>(0,ng.str)`must NOT have more than ${n} items`,params:({params:{len:n}})=>(0,ng._)`{limit: ${n}}`},T4={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:C4,code(n){const{schema:t,parentSchema:e,it:r}=n,{prefixItems:i}=e;r.items=!0,!(0,x4.alwaysValidSchema)(r,t)&&(i?(0,k4.validateAdditionalItems)(n,i):n.ok((0,S4.validateArray)(n)))}};var E4=Rh.default=T4;const P4=Pt({__proto__:null,default:E4},[Rh]),A4=At(P4);var Mh={};Object.defineProperty(Mh,"__esModule",{value:!0});const In=te,tl=de,O4={message:({params:{min:n,max:t}})=>t===void 0?(0,In.str)`must contain at least ${n} valid item(s)`:(0,In.str)`must contain at least ${n} and no more than ${t} valid item(s)`,params:({params:{min:n,max:t}})=>t===void 0?(0,In._)`{minContains: ${n}}`:(0,In._)`{minContains: ${n}, maxContains: ${t}}`},$4={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:O4,code(n){const{gen:t,schema:e,parentSchema:r,data:i,it:s}=n;let a,o;const{minContains:l,maxContains:c}=r;s.opts.next?(a=l===void 0?1:l,o=c):a=1;const h=t.const("len",(0,In._)`${i}.length`);if(n.setParams({min:a,max:o}),o===void 0&&a===0){(0,tl.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(o!==void 0&&a>o){(0,tl.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),n.fail();return}if((0,tl.alwaysValidSchema)(s,e)){let v=(0,In._)`${h} >= ${a}`;o!==void 0&&(v=(0,In._)`${v} && ${h} <= ${o}`),n.pass(v);return}s.items=!0;const f=t.name("valid");o===void 0&&a===1?u(f,()=>t.if(f,()=>t.break())):a===0?(t.let(f,!0),o!==void 0&&t.if((0,In._)`${i}.length > 0`,d)):(t.let(f,!1),d()),n.result(f,()=>n.reset());function d(){const v=t.name("_valid"),_=t.let("count",0);u(v,()=>t.if(v,()=>p(_)))}function u(v,_){t.forRange("i",0,h,x=>{n.subschema({keyword:"contains",dataProp:x,dataPropType:tl.Type.Num,compositeRule:!0},v),_()})}function p(v){t.code((0,In._)`${v}++`),o===void 0?t.if((0,In._)`${v} >= ${a}`,()=>t.assign(f,!0).break()):(t.if((0,In._)`${v} > ${o}`,()=>t.assign(f,!1).break()),a===1?t.assign(f,!0):t.if((0,In._)`${v} >= ${a}`,()=>t.assign(f,!0)))}}};var N4=Mh.default=$4;const F4=Pt({__proto__:null,default:N4},[Mh]),R4=At(F4);var Dh={};(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.validateSchemaDeps=n.validatePropertyDeps=n.error=void 0;const t=te,e=de,r=Kn;n.error={message:({params:{property:l,depsCount:c,deps:h}})=>{const f=c===1?"property":"properties";return(0,t.str)`must have ${f} ${h} when property ${l} is present`},params:({params:{property:l,depsCount:c,deps:h,missingProperty:f}})=>(0,t._)`{property: ${l},
22
22
  missingProperty: ${f},
23
- depsCount: ${l},
24
- deps: ${c}}`};const i={keyword:"dependencies",type:"object",schemaType:"object",error:n.error,code(h){const[l,c]=s(h);a(h,l),o(h,c)}};function s({schema:h}){const l={},c={};for(const f in h){if(f==="__proto__")continue;const d=Array.isArray(h[f])?l:c;d[f]=h[f]}return[l,c]}function a(h,l=h.schema){const{gen:c,data:f,it:d}=h;if(Object.keys(l).length===0)return;const u=c.let("missing");for(const p in l){const v=l[p];if(v.length===0)continue;const _=(0,r.propertyInData)(c,f,p,d.opts.ownProperties);h.setParams({property:p,depsCount:v.length,deps:v.join(", ")}),d.allErrors?c.if(_,()=>{for(const S of v)(0,r.checkReportMissingProp)(h,S)}):(c.if((0,t._)`${_} && (${(0,r.checkMissingProp)(h,v,u)})`),(0,r.reportMissingProp)(h,u),c.else())}}n.validatePropertyDeps=a;function o(h,l=h.schema){const{gen:c,data:f,keyword:d,it:u}=h,p=c.name("valid");for(const v in l)(0,e.alwaysValidSchema)(u,l[v])||(c.if((0,r.propertyInData)(c,f,v,u.opts.ownProperties),()=>{const _=h.subschema({keyword:d,schemaProp:v},p);h.mergeValidEvaluated(_,p)},()=>c.var(p,!0)),h.ok(p))}n.validateSchemaDeps=o,n.default=i})(Pc);const k4=pn(Pc),C4=Pt({__proto__:null,default:k4},[Pc]),T4=Et(C4);var Ec={};Object.defineProperty(Ec,"__esModule",{value:!0});const Kp=Zt,P4=ce,E4={message:"property name must be valid",params:({params:n})=>(0,Kp._)`{propertyName: ${n.propertyName}}`},A4={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:E4,code(n){const{gen:t,schema:e,data:r,it:i}=n;if((0,P4.alwaysValidSchema)(i,e))return;const s=t.name("valid");t.forIn("key",r,a=>{n.setParams({propertyName:a}),n.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},s),t.if((0,Kp.not)(s),()=>{n.error(!0),i.allErrors||t.break()})}),n.ok(s)}};var O4=Ec.default=A4;const $4=Pt({__proto__:null,default:O4},[Ec]),F4=Et($4);var Ac={};Object.defineProperty(Ac,"__esModule",{value:!0});const Xo=Hn,Yn=Zt,N4=kr,Jo=ce,R4={message:"must NOT have additional properties",params:({params:n})=>(0,Yn._)`{additionalProperty: ${n.additionalProperty}}`},D4={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:R4,code(n){const{gen:t,schema:e,parentSchema:r,data:i,errsCount:s,it:a}=n;if(!s)throw new Error("ajv implementation error");const{allErrors:o,opts:h}=a;if(a.props=!0,h.removeAdditional!=="all"&&(0,Jo.alwaysValidSchema)(a,e))return;const l=(0,Xo.allSchemaProperties)(r.properties),c=(0,Xo.allSchemaProperties)(r.patternProperties);f(),n.ok((0,Yn._)`${s} === ${N4.default.errors}`);function f(){t.forIn("key",i,_=>{!l.length&&!c.length?p(_):t.if(d(_),()=>p(_))})}function d(_){let S;if(l.length>8){const x=(0,Jo.schemaRefOrVal)(a,r.properties,"properties");S=(0,Xo.isOwnProperty)(t,x,_)}else l.length?S=(0,Yn.or)(...l.map(x=>(0,Yn._)`${_} === ${x}`)):S=Yn.nil;return c.length&&(S=(0,Yn.or)(S,...c.map(x=>(0,Yn._)`${(0,Xo.usePattern)(n,x)}.test(${_})`))),(0,Yn.not)(S)}function u(_){t.code((0,Yn._)`delete ${i}[${_}]`)}function p(_){if(h.removeAdditional==="all"||h.removeAdditional&&e===!1){u(_);return}if(e===!1){n.setParams({additionalProperty:_}),n.error(),o||t.break();return}if(typeof e=="object"&&!(0,Jo.alwaysValidSchema)(a,e)){const S=t.name("valid");h.removeAdditional==="failing"?(v(_,S,!1),t.if((0,Yn.not)(S),()=>{n.reset(),u(_)})):(v(_,S),o||t.if((0,Yn.not)(S),()=>t.break()))}}function v(_,S,x){const m={keyword:"additionalProperties",dataProp:_,dataPropType:Jo.Type.Str};x===!1&&Object.assign(m,{compositeRule:!0,createErrors:!1,allErrors:!1}),n.subschema(m,S)}}};var M4=Ac.default=D4;const I4=Pt({__proto__:null,default:M4},[Ac]),Yp=Et(I4);var Oc={};Object.defineProperty(Oc,"__esModule",{value:!0});const j4=js,Xp=Hn,$c=ce,Jp=Yp,L4={keyword:"properties",type:"object",schemaType:"object",code(n){const{gen:t,schema:e,parentSchema:r,data:i,it:s}=n;s.opts.removeAdditional==="all"&&r.additionalProperties===void 0&&Jp.default.code(new j4.KeywordCxt(s,Jp.default,"additionalProperties"));const a=(0,Xp.allSchemaProperties)(e);for(const f of a)s.definedProperties.add(f);s.opts.unevaluated&&a.length&&s.props!==!0&&(s.props=$c.mergeEvaluated.props(t,(0,$c.toHash)(a),s.props));const o=a.filter(f=>!(0,$c.alwaysValidSchema)(s,e[f]));if(o.length===0)return;const h=t.name("valid");for(const f of o)l(f)?c(f):(t.if((0,Xp.propertyInData)(t,i,f,s.opts.ownProperties)),c(f),s.allErrors||t.else().var(h,!0),t.endIf()),n.it.definedProperties.add(f),n.ok(h);function l(f){return s.opts.useDefaults&&!s.compositeRule&&e[f].default!==void 0}function c(f){n.subschema({keyword:"properties",schemaProp:f,dataProp:f},h)}}};var U4=Oc.default=L4;const G4=Pt({__proto__:null,default:U4},[Oc]),z4=Et(G4);var Fc={};Object.defineProperty(Fc,"__esModule",{value:!0});const Qp=Hn,Qo=Zt,Zp=ce,Wp=ce,V4={keyword:"patternProperties",type:"object",schemaType:"object",code(n){const{gen:t,schema:e,data:r,parentSchema:i,it:s}=n,{opts:a}=s,o=(0,Qp.allSchemaProperties)(e),h=o.filter(v=>(0,Zp.alwaysValidSchema)(s,e[v]));if(o.length===0||h.length===o.length&&(!s.opts.unevaluated||s.props===!0))return;const l=a.strictSchema&&!a.allowMatchingProperties&&i.properties,c=t.name("valid");s.props!==!0&&!(s.props instanceof Qo.Name)&&(s.props=(0,Wp.evaluatedPropsToName)(t,s.props));const{props:f}=s;d();function d(){for(const v of o)l&&u(v),s.allErrors?p(v):(t.var(c,!0),p(v),t.if(c))}function u(v){for(const _ in l)new RegExp(v).test(_)&&(0,Zp.checkStrictMode)(s,`property ${_} matches pattern ${v} (use allowMatchingProperties)`)}function p(v){t.forIn("key",r,_=>{t.if((0,Qo._)`${(0,Qp.usePattern)(n,v)}.test(${_})`,()=>{const S=h.includes(v);S||n.subschema({keyword:"patternProperties",schemaProp:v,dataProp:_,dataPropType:Wp.Type.Str},c),s.opts.unevaluated&&f!==!0?t.assign((0,Qo._)`${f}[${_}]`,!0):!S&&!s.allErrors&&t.if((0,Qo.not)(c),()=>t.break())})})}}};var B4=Fc.default=V4;const H4=Pt({__proto__:null,default:B4},[Fc]),q4=Et(H4);var Nc={};Object.defineProperty(Nc,"__esModule",{value:!0});const K4=ce,Y4={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(n){const{gen:t,schema:e,it:r}=n;if((0,K4.alwaysValidSchema)(r,e)){n.fail();return}const i=t.name("valid");n.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),n.failResult(i,()=>n.reset(),()=>n.error())},error:{message:"must NOT be valid"}};var X4=Nc.default=Y4;const J4=Pt({__proto__:null,default:X4},[Nc]),Q4=Et(J4);var Rc={};Object.defineProperty(Rc,"__esModule",{value:!0});const Z4=Hn,W4={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Z4.validateUnion,error:{message:"must match a schema in anyOf"}};var t6=Rc.default=W4;const e6=Pt({__proto__:null,default:t6},[Rc]),n6=Et(e6);var Dc={};Object.defineProperty(Dc,"__esModule",{value:!0});const Zo=Zt,r6=ce,i6={message:"must match exactly one schema in oneOf",params:({params:n})=>(0,Zo._)`{passingSchemas: ${n.passing}}`},s6={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:i6,code(n){const{gen:t,schema:e,parentSchema:r,it:i}=n;if(!Array.isArray(e))throw new Error("ajv implementation error");if(i.opts.discriminator&&r.discriminator)return;const s=e,a=t.let("valid",!1),o=t.let("passing",null),h=t.name("_valid");n.setParams({passing:o}),t.block(l),n.result(a,()=>n.reset(),()=>n.error(!0));function l(){s.forEach((c,f)=>{let d;(0,r6.alwaysValidSchema)(i,c)?t.var(h,!0):d=n.subschema({keyword:"oneOf",schemaProp:f,compositeRule:!0},h),f>0&&t.if((0,Zo._)`${h} && ${a}`).assign(a,!1).assign(o,(0,Zo._)`[${o}, ${f}]`).else(),t.if(h,()=>{t.assign(a,!0),t.assign(o,f),d&&n.mergeEvaluated(d,Zo.Name)})})}}};var a6=Dc.default=s6;const o6=Pt({__proto__:null,default:a6},[Dc]),l6=Et(o6);var Mc={};Object.defineProperty(Mc,"__esModule",{value:!0});const h6=ce,c6={keyword:"allOf",schemaType:"array",code(n){const{gen:t,schema:e,it:r}=n;if(!Array.isArray(e))throw new Error("ajv implementation error");const i=t.name("valid");e.forEach((s,a)=>{if((0,h6.alwaysValidSchema)(r,s))return;const o=n.subschema({keyword:"allOf",schemaProp:a},i);n.ok(i),n.mergeEvaluated(o)})}};var u6=Mc.default=c6;const d6=Pt({__proto__:null,default:u6},[Mc]),f6=Et(d6);var Ic={};Object.defineProperty(Ic,"__esModule",{value:!0});const Wo=Zt,tg=ce,p6={message:({params:n})=>(0,Wo.str)`must match "${n.ifClause}" schema`,params:({params:n})=>(0,Wo._)`{failingKeyword: ${n.ifClause}}`},g6={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:p6,code(n){const{gen:t,parentSchema:e,it:r}=n;e.then===void 0&&e.else===void 0&&(0,tg.checkStrictMode)(r,'"if" without "then" and "else" is ignored');const i=eg(r,"then"),s=eg(r,"else");if(!i&&!s)return;const a=t.let("valid",!0),o=t.name("_valid");if(h(),n.reset(),i&&s){const c=t.let("ifClause");n.setParams({ifClause:c}),t.if(o,l("then",c),l("else",c))}else i?t.if(o,l("then")):t.if((0,Wo.not)(o),l("else"));n.pass(a,()=>n.error(!0));function h(){const c=n.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},o);n.mergeEvaluated(c)}function l(c,f){return()=>{const d=n.subschema({keyword:c},o);t.assign(a,o),n.mergeValidEvaluated(d,a),f?t.assign(f,(0,Wo._)`${c}`):n.setParams({ifClause:c})}}}};function eg(n,t){const e=n.schema[t];return e!==void 0&&!(0,tg.alwaysValidSchema)(n,e)}var m6=Ic.default=g6;const y6=Pt({__proto__:null,default:m6},[Ic]),v6=Et(y6);var jc={};Object.defineProperty(jc,"__esModule",{value:!0});const _6=ce,w6={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:n,parentSchema:t,it:e}){t.if===void 0&&(0,_6.checkStrictMode)(e,`"${n}" without "if" is ignored`)}};var x6=jc.default=w6;const b6=Pt({__proto__:null,default:x6},[jc]),S6=Et(b6);Object.defineProperty(bc,"__esModule",{value:!0});const k6=Gp,C6=c4,T6=Hp,P6=v4,E6=S4,A6=T4,O6=F4,$6=Yp,F6=z4,N6=q4,R6=Q4,D6=n6,M6=l6,I6=f6,j6=v6,L6=S6;function U6(n=!1){const t=[R6.default,D6.default,M6.default,I6.default,j6.default,L6.default,O6.default,$6.default,A6.default,F6.default,N6.default];return n?t.push(C6.default,P6.default):t.push(k6.default,T6.default),t.push(E6.default),t}var G6=bc.default=U6;const z6=Pt({__proto__:null,default:G6},[bc]),V6=Et(z6);var Lc={},Uc={};Object.defineProperty(Uc,"__esModule",{value:!0});const Me=Zt,B6={message:({schemaCode:n})=>(0,Me.str)`must match format "${n}"`,params:({schemaCode:n})=>(0,Me._)`{format: ${n}}`},H6={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:B6,code(n,t){const{gen:e,data:r,$data:i,schema:s,schemaCode:a,it:o}=n,{opts:h,errSchemaPath:l,schemaEnv:c,self:f}=o;if(!h.validateFormats)return;i?d():u();function d(){const p=e.scopeValue("formats",{ref:f.formats,code:h.code.formats}),v=e.const("fDef",(0,Me._)`${p}[${a}]`),_=e.let("fType"),S=e.let("format");e.if((0,Me._)`typeof ${v} == "object" && !(${v} instanceof RegExp)`,()=>e.assign(_,(0,Me._)`${v}.type || "string"`).assign(S,(0,Me._)`${v}.validate`),()=>e.assign(_,(0,Me._)`"string"`).assign(S,v)),n.fail$data((0,Me.or)(x(),m()));function x(){return h.strictSchema===!1?Me.nil:(0,Me._)`${a} && !${S}`}function m(){const k=c.$async?(0,Me._)`(${v}.async ? await ${S}(${r}) : ${S}(${r}))`:(0,Me._)`${S}(${r})`,F=(0,Me._)`(typeof ${S} == "function" ? ${k} : ${S}.test(${r}))`;return(0,Me._)`${S} && ${S} !== true && ${_} === ${t} && !${F}`}}function u(){const p=f.formats[s];if(!p){x();return}if(p===!0)return;const[v,_,S]=m(p);v===t&&n.pass(k());function x(){if(h.strictSchema===!1){f.logger.warn(F());return}throw new Error(F());function F(){return`unknown format "${s}" ignored in schema at path "${l}"`}}function m(F){const P=F instanceof RegExp?(0,Me.regexpCode)(F):h.code.formats?(0,Me._)`${h.code.formats}${(0,Me.getProperty)(s)}`:void 0,N=e.scopeValue("formats",{key:s,ref:F,code:P});return typeof F=="object"&&!(F instanceof RegExp)?[F.type||"string",F.validate,(0,Me._)`${N}.validate`]:["string",F,N]}function k(){if(typeof p=="object"&&!(p instanceof RegExp)&&p.async){if(!c.$async)throw new Error("async format in sync schema");return(0,Me._)`await ${S}(${r})`}return typeof _=="function"?(0,Me._)`${S}(${r})`:(0,Me._)`${S}.test(${r})`}}}};var q6=Uc.default=H6;const K6=Pt({__proto__:null,default:q6},[Uc]),Y6=Et(K6);Object.defineProperty(Lc,"__esModule",{value:!0});const X6=Y6,J6=[X6.default];var Q6=Lc.default=J6;const Z6=Pt({__proto__:null,default:Q6},[Lc]),W6=Et(Z6);var xi={};Object.defineProperty(xi,"__esModule",{value:!0});var ng=xi.contentVocabulary=rg=xi.metadataVocabulary=void 0,rg=xi.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];ng=xi.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"];const t8=Pt({__proto__:null,get contentVocabulary(){return ng},default:xi,get metadataVocabulary(){return rg}},[xi]),e8=Et(t8);Object.defineProperty(rc,"__esModule",{value:!0});const n8=T5,r8=Q3,i8=V6,s8=W6,ig=e8,a8=[n8.default,r8.default,(0,i8.default)(),s8.default,ig.metadataVocabulary,ig.contentVocabulary];var o8=rc.default=a8;const l8=Pt({__proto__:null,default:o8},[rc]),h8=Et(l8);var Gc={},zc={};(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.DiscrError=void 0,function(t){t.Tag="tag",t.Mapping="mapping"}(n.DiscrError||(n.DiscrError={}))})(zc);const c8=pn(zc),u8=Pt({__proto__:null,default:c8},[zc]),d8=Et(u8);Object.defineProperty(Gc,"__esModule",{value:!0});const Zi=Zt,Vc=d8,sg=tc,f8=ce,p8={message:({params:{discrError:n,tagName:t}})=>n===Vc.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:n,tag:t,tagName:e}})=>(0,Zi._)`{error: ${n}, tag: ${e}, tagValue: ${t}}`},g8={keyword:"discriminator",type:"object",schemaType:"object",error:p8,code(n){const{gen:t,data:e,schema:r,parentSchema:i,it:s}=n,{oneOf:a}=i;if(!s.opts.discriminator)throw new Error("discriminator: requires discriminator option");const o=r.propertyName;if(typeof o!="string")throw new Error("discriminator: requires propertyName");if(r.mapping)throw new Error("discriminator: mapping is not supported");if(!a)throw new Error("discriminator: requires oneOf keyword");const h=t.let("valid",!1),l=t.const("tag",(0,Zi._)`${e}${(0,Zi.getProperty)(o)}`);t.if((0,Zi._)`typeof ${l} == "string"`,()=>c(),()=>n.error(!1,{discrError:Vc.DiscrError.Tag,tag:l,tagName:o})),n.ok(h);function c(){const u=d();t.if(!1);for(const p in u)t.elseIf((0,Zi._)`${l} === ${p}`),t.assign(h,f(u[p]));t.else(),n.error(!1,{discrError:Vc.DiscrError.Mapping,tag:l,tagName:o}),t.endIf()}function f(u){const p=t.name("valid"),v=n.subschema({keyword:"oneOf",schemaProp:u},p);return n.mergeEvaluated(v,Zi.Name),p}function d(){var u;const p={},v=S(i);let _=!0;for(let k=0;k<a.length;k++){let F=a[k];F!=null&&F.$ref&&!(0,f8.schemaHasRulesButRef)(F,s.self.RULES)&&(F=sg.resolveRef.call(s.self,s.schemaEnv.root,s.baseId,F==null?void 0:F.$ref),F instanceof sg.SchemaEnv&&(F=F.schema));const P=(u=F==null?void 0:F.properties)===null||u===void 0?void 0:u[o];if(typeof P!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${o}"`);_=_&&(v||S(F)),x(P,k)}if(!_)throw new Error(`discriminator: "${o}" must be required`);return p;function S({required:k}){return Array.isArray(k)&&k.includes(o)}function x(k,F){if(k.const)m(k.const,F);else if(k.enum)for(const P of k.enum)m(P,F);else throw new Error(`discriminator: "properties/${o}" must have "const" or "enum"`)}function m(k,F){if(typeof k!="string"||k in p)throw new Error(`discriminator: "${o}" values must be unique strings`);p[k]=F}}}};var m8=Gc.default=g8;const y8=Pt({__proto__:null,default:m8},[Gc]),v8=Et(y8),_8="http://json-schema.org/draft-07/schema#",w8="http://json-schema.org/draft-07/schema#",x8="Core schema meta-schema",b8={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},S8=["object","boolean"],k8={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},C8={$schema:_8,$id:w8,title:x8,definitions:b8,type:S8,properties:k8,default:!0};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const e=u5,r=h8,i=v8,s=C8,a=["/properties"],o="http://json-schema.org/draft-07/schema";class h extends e.default{_addVocabularies(){super._addVocabularies(),r.default.forEach(p=>this.addVocabulary(p)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const p=this.opts.$data?this.$dataMetaSchema(s,a):s;this.addMetaSchema(p,o,!1),this.refs["http://json-schema.org/schema"]=o}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(o)?o:void 0)}}n.exports=t=h,Object.defineProperty(t,"__esModule",{value:!0}),t.default=h;var l=js;Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var c=Zt;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return c._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return c.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return c.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return c.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return c.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return c.CodeGen}});var f=Yh;Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return f.default}});var d=Qh;Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return d.default}})})($h,$h.exports);var ag=$h.exports;const og=pn(ag),T8=Pt({__proto__:null,default:og},[ag]);var Bc={exports:{}};const P8=Et(T8);(function(n,t){Object.defineProperty(t,"__esModule",{value:!0});const e=P8,r=Zt,i=Ns,s=js,a=Rs,o=kr,h="errorMessage",l=new e.Name("emUsed"),c={required:"missingProperty",dependencies:"property",dependentRequired:"property"},f=/\$\{[^}]+\}/,d=/\$\{([^}]+)\}/g,u=/^""\s*\+\s*|\s*\+\s*""$/g;function p(_){return{keyword:h,schemaType:["string","object"],post:!0,code(S){const{gen:x,data:m,schema:k,schemaValue:F,it:P}=S;if(P.createErrors===!1)return;const N=k,R=r.strConcat(o.default.instancePath,P.errorPath);x.if(e._`${o.default.errors} > 0`,()=>{if(typeof N=="object"){const[T,C]=U(N);C&&B(C),T&&K(T),tt(L(N))}const E=typeof N=="string"?N:N._;E&&W(E),_.keepErrors||lt()});function L({properties:E,items:T}){const C={};if(E){C.props={};for(const D in E)C.props[D]=[]}if(T){C.items={};for(let D=0;D<T.length;D++)C.items[D]=[]}return C}function U(E){let T,C;for(const D in E){if(D==="properties"||D==="items")continue;const G=E[D];if(typeof G=="object"){T||(T={});const M=T[D]={};for(const V in G)M[V]=[]}else C||(C={}),C[D]=[]}return[T,C]}function B(E){const T=x.const("emErrors",e.stringify(E)),C=x.const("templates",it(E,k));x.forOf("err",o.default.vErrors,V=>x.if(wt(V,T),()=>x.code(e._`${T}[${V}.keyword].push(${V})`).assign(e._`${V}.${l}`,!0)));const{singleError:D}=_;if(D){const V=x.let("message",e._`""`),q=x.let("paramsErrors",e._`[]`);G(Z=>{x.if(V,()=>x.code(e._`${V} += ${typeof D=="string"?D:";"}`)),x.code(e._`${V} += ${M(Z)}`),x.assign(q,e._`${q}.concat(${T}[${Z}])`)}),a.reportError(S,{message:V,params:e._`{errors: ${q}}`})}else G(V=>a.reportError(S,{message:M(V),params:e._`{errors: ${T}[${V}]}`}));function G(V){x.forIn("key",T,q=>x.if(e._`${T}[${q}].length`,()=>V(q)))}function M(V){return e._`${V} in ${C} ? ${C}[${V}]() : ${F}[${V}]`}}function K(E){const T=x.const("emErrors",e.stringify(E)),C=[];for(const q in E)C.push([q,it(E[q],k[q])]);const D=x.const("templates",x.object(...C)),G=x.scopeValue("obj",{ref:c,code:e.stringify(c)}),M=x.let("emPropParams"),V=x.let("emParamsErrors");x.forOf("err",o.default.vErrors,q=>x.if(wt(q,T),()=>{x.assign(M,e._`${G}[${q}.keyword]`),x.assign(V,e._`${T}[${q}.keyword][${q}.params[${M}]]`),x.if(V,()=>x.code(e._`${V}.push(${q})`).assign(e._`${q}.${l}`,!0))})),x.forIn("key",T,q=>x.forIn("keyProp",e._`${T}[${q}]`,Z=>{x.assign(V,e._`${T}[${q}][${Z}]`),x.if(e._`${V}.length`,()=>{const nt=x.const("tmpl",e._`${D}[${q}] && ${D}[${q}][${Z}]`);a.reportError(S,{message:e._`${nt} ? ${nt}() : ${F}[${q}][${Z}]`,params:e._`{errors: ${V}}`})})}))}function tt(E){const{props:T,items:C}=E;if(!T&&!C)return;const D=e._`typeof ${m} == "object"`,G=e._`Array.isArray(${m})`,M=x.let("emErrors");let V,q;const Z=x.let("templates");T&&C?(V=x.let("emChildKwd"),x.if(D),x.if(G,()=>{nt(C,k.items),x.assign(V,e.str`items`)},()=>{nt(T,k.properties),x.assign(V,e.str`properties`)}),q=e._`[${V}]`):C?(x.if(G),nt(C,k.items),q=e._`.items`):T&&(x.if(r.and(D,r.not(G))),nt(T,k.properties),q=e._`.properties`),x.forOf("err",o.default.vErrors,pt=>bt(pt,M,kt=>x.code(e._`${M}[${kt}].push(${pt})`).assign(e._`${pt}.${l}`,!0))),x.forIn("key",M,pt=>x.if(e._`${M}[${pt}].length`,()=>{a.reportError(S,{message:e._`${pt} in ${Z} ? ${Z}[${pt}]() : ${F}${q}[${pt}]`,params:e._`{errors: ${M}[${pt}]}`}),x.assign(e._`${o.default.vErrors}[${o.default.errors}-1].instancePath`,e._`${R} + "/" + ${pt}.replace(/~/g, "~0").replace(/\\//g, "~1")`)})),x.endIf();function nt(pt,kt){x.assign(M,e.stringify(pt)),x.assign(Z,it(pt,kt))}}function W(E){const T=x.const("emErrs",e._`[]`);x.forOf("err",o.default.vErrors,C=>x.if(xt(C),()=>x.code(e._`${T}.push(${C})`).assign(e._`${C}.${l}`,!0))),x.if(e._`${T}.length`,()=>a.reportError(S,{message:Y(E),params:e._`{errors: ${T}}`}))}function lt(){const E=x.const("emErrs",e._`[]`);x.forOf("err",o.default.vErrors,T=>x.if(e._`!${T}.${l}`,()=>x.code(e._`${E}.push(${T})`))),x.assign(o.default.vErrors,E).assign(o.default.errors,e._`${E}.length`)}function wt(E,T){return r.and(e._`${E}.keyword !== ${h}`,e._`!${E}.${l}`,e._`${E}.instancePath === ${R}`,e._`${E}.keyword in ${T}`,e._`${E}.schemaPath.indexOf(${P.errSchemaPath}) === 0`,e._`/^\\/[^\\/]*$/.test(${E}.schemaPath.slice(${P.errSchemaPath.length}))`)}function bt(E,T,C){x.if(r.and(e._`${E}.keyword !== ${h}`,e._`!${E}.${l}`,e._`${E}.instancePath.indexOf(${R}) === 0`),()=>{const D=x.scopeValue("pattern",{ref:/^\/([^/]*)(?:\/|$)/,code:e._`new RegExp("^\\\/([^/]*)(?:\\\/|$)")`}),G=x.const("emMatches",e._`${D}.exec(${E}.instancePath.slice(${R}.length))`),M=x.const("emChild",e._`${G} && ${G}[1].replace(/~1/g, "/").replace(/~0/g, "~")`);x.if(e._`${M} !== undefined && ${M} in ${T}`,()=>C(M))})}function xt(E){return r.and(e._`${E}.keyword !== ${h}`,e._`!${E}.${l}`,r.or(e._`${E}.instancePath === ${R}`,r.and(e._`${E}.instancePath.indexOf(${R}) === 0`,e._`${E}.instancePath[${R}.length] === "/"`)),e._`${E}.schemaPath.indexOf(${P.errSchemaPath}) === 0`,e._`${E}.schemaPath[${P.errSchemaPath}.length] === "/"`)}function it(E,T){const C=[];for(const D in E){const G=T[D];f.test(G)&&C.push([D,O(G)])}return x.object(...C)}function Y(E){return f.test(E)?new i._Code(i.safeStringify(E).replace(d,(T,C)=>`" + JSON.stringify(${s.getData(C,P)}) + "`).replace(u,"")):e.stringify(E)}function O(E){return e._`function(){return ${Y(E)}}`}},metaSchema:{anyOf:[{type:"string"},{type:"object",properties:{properties:{$ref:"#/$defs/stringMap"},items:{$ref:"#/$defs/stringList"},required:{$ref:"#/$defs/stringOrMap"},dependencies:{$ref:"#/$defs/stringOrMap"}},additionalProperties:{type:"string"}}],$defs:{stringMap:{type:"object",additionalProperties:{type:"string"}},stringOrMap:{anyOf:[{type:"string"},{$ref:"#/$defs/stringMap"}]},stringList:{type:"array",items:{type:"string"}}}}}}const v=(_,S={})=>{if(!_.opts.allErrors)throw new Error("ajv-errors: Ajv option allErrors must be true");if(_.opts.jsPropertySyntax)throw new Error("ajv-errors: ajv option jsPropertySyntax is not supported");return _.addKeyword(p(S))};t.default=v,n.exports=v,n.exports.default=v})(Bc,Bc.exports);var E8=Bc.exports;const A8=pn(E8),O8=new og({allErrors:!0});A8(O8);const lg=(n,t="image/svg+xml",e="utf-8")=>new Blob([n],{type:`${t};charset=${e}`}),$8=n=>new XMLSerializer().serializeToString(n),F8=(n,t="image/svg+xml",e="utf-8")=>lg($8(n),t,e),hg=(n,t)=>{const e=document.createElement("a");e.style.visibility="hidden",document.body.appendChild(e),e.download=t,typeof n=="string"?e.href=n:e.href=window.URL.createObjectURL(n),e.click(),document.body.removeChild(e),window.URL.revokeObjectURL(e.href)};function cg(){return document.compatMode=="BackCompat"?document.body:document.documentElement}function ug(){const n=cg();return{scrollTop:n.scrollTop,scrollLeft:n.scrollLeft,scrollWidth:n.scrollWidth,scrollHeight:n.scrollHeight}}function N8(){const n=cg();return{clientTop:n.clientTop,clientLeft:n.clientLeft,clientWidth:n.clientWidth,clientHeight:n.clientHeight}}function R8(){const{clientWidth:n,clientHeight:t}=N8();return{width:window.innerWidth||n,height:window.innerHeight||t}}function D8(n){const{top:t,left:e}=n.getBoundingClientRect(),r=ug();return{x:e+r.scrollLeft,y:t+r.scrollTop}}function M8(n){if(n.pageX&&n.pageY)return{x:n.pageX,y:n.pageY};const t=ug();return{x:n.clientX+t.scrollLeft,y:n.clientY+t.scrollTop}}function dg(n,t){const e=M8(t),r=D8(n);return{x:e.x-r.x,y:e.y-r.y}}function I8(){const n=window.navigator.userAgent,t=n.indexOf("MSIE ");if(t>0)return parseInt(n.substring(t+5,n.indexOf(".",t)),10);if(n.indexOf("Trident/")>0){const r=n.indexOf("rv:");return parseInt(n.substring(r+3,n.indexOf(".",r)),10)}const e=n.indexOf("Edge/");return e>0?parseInt(n.substring(e+5,n.indexOf(".",e)),10):-1}I8();class rn{static onDocumentReady(t){function e(){document.readyState!=="loading"&&(t(),document.removeEventListener("DOMContentLoaded",e))}typeof document<"u"&&(document.addEventListener("DOMContentLoaded",e),e())}static getCSSVar(t){return getComputedStyle(document.documentElement).getPropertyValue(t)}static setCSSVar(t,e){document.documentElement.style.setProperty(t,e)}static compileTemplate(t){return t=t.replace(/<%=(.+?)%>/g,"`); \n echo( $1 ); \n echo(`").replace(/<%([\s\S]+?)%>/g,"`); \n $1 \n echo(`"),t="echo(`"+t+"`);",`(function parse(data){
23
+ depsCount: ${c},
24
+ deps: ${h}}`};const i={keyword:"dependencies",type:"object",schemaType:"object",error:n.error,code(l){const[c,h]=s(l);a(l,c),o(l,h)}};function s({schema:l}){const c={},h={};for(const f in l){if(f==="__proto__")continue;const d=Array.isArray(l[f])?c:h;d[f]=l[f]}return[c,h]}function a(l,c=l.schema){const{gen:h,data:f,it:d}=l;if(Object.keys(c).length===0)return;const u=h.let("missing");for(const p in c){const v=c[p];if(v.length===0)continue;const _=(0,r.propertyInData)(h,f,p,d.opts.ownProperties);l.setParams({property:p,depsCount:v.length,deps:v.join(", ")}),d.allErrors?h.if(_,()=>{for(const x of v)(0,r.checkReportMissingProp)(l,x)}):(h.if((0,t._)`${_} && (${(0,r.checkMissingProp)(l,v,u)})`),(0,r.reportMissingProp)(l,u),h.else())}}n.validatePropertyDeps=a;function o(l,c=l.schema){const{gen:h,data:f,keyword:d,it:u}=l,p=h.name("valid");for(const v in c)(0,e.alwaysValidSchema)(u,c[v])||(h.if((0,r.propertyInData)(h,f,v,u.opts.ownProperties),()=>{const _=l.subschema({keyword:d,schemaProp:v},p);l.mergeValidEvaluated(_,p)},()=>h.var(p,!0)),l.ok(p))}n.validateSchemaDeps=o,n.default=i})(Dh);const M4=vn(Dh),D4=Pt({__proto__:null,default:M4},[Dh]),I4=At(D4);var Ih={};Object.defineProperty(Ih,"__esModule",{value:!0});const rg=te,j4=de,L4={message:"property name must be valid",params:({params:n})=>(0,rg._)`{propertyName: ${n.propertyName}}`},U4={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:L4,code(n){const{gen:t,schema:e,data:r,it:i}=n;if((0,j4.alwaysValidSchema)(i,e))return;const s=t.name("valid");t.forIn("key",r,a=>{n.setParams({propertyName:a}),n.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},s),t.if((0,rg.not)(s),()=>{n.error(!0),i.allErrors||t.break()})}),n.ok(s)}};var G4=Ih.default=U4;const z4=Pt({__proto__:null,default:G4},[Ih]),V4=At(z4);var jh={};Object.defineProperty(jh,"__esModule",{value:!0});const el=Kn,Qn=te,B4=Er,nl=de,H4={message:"must NOT have additional properties",params:({params:n})=>(0,Qn._)`{additionalProperty: ${n.additionalProperty}}`},q4={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:H4,code(n){const{gen:t,schema:e,parentSchema:r,data:i,errsCount:s,it:a}=n;if(!s)throw new Error("ajv implementation error");const{allErrors:o,opts:l}=a;if(a.props=!0,l.removeAdditional!=="all"&&(0,nl.alwaysValidSchema)(a,e))return;const c=(0,el.allSchemaProperties)(r.properties),h=(0,el.allSchemaProperties)(r.patternProperties);f(),n.ok((0,Qn._)`${s} === ${B4.default.errors}`);function f(){t.forIn("key",i,_=>{!c.length&&!h.length?p(_):t.if(d(_),()=>p(_))})}function d(_){let x;if(c.length>8){const b=(0,nl.schemaRefOrVal)(a,r.properties,"properties");x=(0,el.isOwnProperty)(t,b,_)}else c.length?x=(0,Qn.or)(...c.map(b=>(0,Qn._)`${_} === ${b}`)):x=Qn.nil;return h.length&&(x=(0,Qn.or)(x,...h.map(b=>(0,Qn._)`${(0,el.usePattern)(n,b)}.test(${_})`))),(0,Qn.not)(x)}function u(_){t.code((0,Qn._)`delete ${i}[${_}]`)}function p(_){if(l.removeAdditional==="all"||l.removeAdditional&&e===!1){u(_);return}if(e===!1){n.setParams({additionalProperty:_}),n.error(),o||t.break();return}if(typeof e=="object"&&!(0,nl.alwaysValidSchema)(a,e)){const x=t.name("valid");l.removeAdditional==="failing"?(v(_,x,!1),t.if((0,Qn.not)(x),()=>{n.reset(),u(_)})):(v(_,x),o||t.if((0,Qn.not)(x),()=>t.break()))}}function v(_,x,b){const m={keyword:"additionalProperties",dataProp:_,dataPropType:nl.Type.Str};b===!1&&Object.assign(m,{compositeRule:!0,createErrors:!1,allErrors:!1}),n.subschema(m,x)}}};var Y4=jh.default=q4;const K4=Pt({__proto__:null,default:Y4},[jh]),ig=At(K4);var Lh={};Object.defineProperty(Lh,"__esModule",{value:!0});const X4=zs,sg=Kn,Uh=de,ag=ig,J4={keyword:"properties",type:"object",schemaType:"object",code(n){const{gen:t,schema:e,parentSchema:r,data:i,it:s}=n;s.opts.removeAdditional==="all"&&r.additionalProperties===void 0&&ag.default.code(new X4.KeywordCxt(s,ag.default,"additionalProperties"));const a=(0,sg.allSchemaProperties)(e);for(const f of a)s.definedProperties.add(f);s.opts.unevaluated&&a.length&&s.props!==!0&&(s.props=Uh.mergeEvaluated.props(t,(0,Uh.toHash)(a),s.props));const o=a.filter(f=>!(0,Uh.alwaysValidSchema)(s,e[f]));if(o.length===0)return;const l=t.name("valid");for(const f of o)c(f)?h(f):(t.if((0,sg.propertyInData)(t,i,f,s.opts.ownProperties)),h(f),s.allErrors||t.else().var(l,!0),t.endIf()),n.it.definedProperties.add(f),n.ok(l);function c(f){return s.opts.useDefaults&&!s.compositeRule&&e[f].default!==void 0}function h(f){n.subschema({keyword:"properties",schemaProp:f,dataProp:f},l)}}};var Q4=Lh.default=J4;const Z4=Pt({__proto__:null,default:Q4},[Lh]),W4=At(Z4);var Gh={};Object.defineProperty(Gh,"__esModule",{value:!0});const og=Kn,rl=te,lg=de,cg=de,tS={keyword:"patternProperties",type:"object",schemaType:"object",code(n){const{gen:t,schema:e,data:r,parentSchema:i,it:s}=n,{opts:a}=s,o=(0,og.allSchemaProperties)(e),l=o.filter(v=>(0,lg.alwaysValidSchema)(s,e[v]));if(o.length===0||l.length===o.length&&(!s.opts.unevaluated||s.props===!0))return;const c=a.strictSchema&&!a.allowMatchingProperties&&i.properties,h=t.name("valid");s.props!==!0&&!(s.props instanceof rl.Name)&&(s.props=(0,cg.evaluatedPropsToName)(t,s.props));const{props:f}=s;d();function d(){for(const v of o)c&&u(v),s.allErrors?p(v):(t.var(h,!0),p(v),t.if(h))}function u(v){for(const _ in c)new RegExp(v).test(_)&&(0,lg.checkStrictMode)(s,`property ${_} matches pattern ${v} (use allowMatchingProperties)`)}function p(v){t.forIn("key",r,_=>{t.if((0,rl._)`${(0,og.usePattern)(n,v)}.test(${_})`,()=>{const x=l.includes(v);x||n.subschema({keyword:"patternProperties",schemaProp:v,dataProp:_,dataPropType:cg.Type.Str},h),s.opts.unevaluated&&f!==!0?t.assign((0,rl._)`${f}[${_}]`,!0):!x&&!s.allErrors&&t.if((0,rl.not)(h),()=>t.break())})})}}};var eS=Gh.default=tS;const nS=Pt({__proto__:null,default:eS},[Gh]),rS=At(nS);var zh={};Object.defineProperty(zh,"__esModule",{value:!0});const iS=de,sS={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(n){const{gen:t,schema:e,it:r}=n;if((0,iS.alwaysValidSchema)(r,e)){n.fail();return}const i=t.name("valid");n.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),n.failResult(i,()=>n.reset(),()=>n.error())},error:{message:"must NOT be valid"}};var aS=zh.default=sS;const oS=Pt({__proto__:null,default:aS},[zh]),lS=At(oS);var Vh={};Object.defineProperty(Vh,"__esModule",{value:!0});const cS=Kn,hS={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:cS.validateUnion,error:{message:"must match a schema in anyOf"}};var uS=Vh.default=hS;const dS=Pt({__proto__:null,default:uS},[Vh]),fS=At(dS);var Bh={};Object.defineProperty(Bh,"__esModule",{value:!0});const il=te,pS=de,gS={message:"must match exactly one schema in oneOf",params:({params:n})=>(0,il._)`{passingSchemas: ${n.passing}}`},mS={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:gS,code(n){const{gen:t,schema:e,parentSchema:r,it:i}=n;if(!Array.isArray(e))throw new Error("ajv implementation error");if(i.opts.discriminator&&r.discriminator)return;const s=e,a=t.let("valid",!1),o=t.let("passing",null),l=t.name("_valid");n.setParams({passing:o}),t.block(c),n.result(a,()=>n.reset(),()=>n.error(!0));function c(){s.forEach((h,f)=>{let d;(0,pS.alwaysValidSchema)(i,h)?t.var(l,!0):d=n.subschema({keyword:"oneOf",schemaProp:f,compositeRule:!0},l),f>0&&t.if((0,il._)`${l} && ${a}`).assign(a,!1).assign(o,(0,il._)`[${o}, ${f}]`).else(),t.if(l,()=>{t.assign(a,!0),t.assign(o,f),d&&n.mergeEvaluated(d,il.Name)})})}}};var vS=Bh.default=mS;const yS=Pt({__proto__:null,default:vS},[Bh]),_S=At(yS);var Hh={};Object.defineProperty(Hh,"__esModule",{value:!0});const bS=de,wS={keyword:"allOf",schemaType:"array",code(n){const{gen:t,schema:e,it:r}=n;if(!Array.isArray(e))throw new Error("ajv implementation error");const i=t.name("valid");e.forEach((s,a)=>{if((0,bS.alwaysValidSchema)(r,s))return;const o=n.subschema({keyword:"allOf",schemaProp:a},i);n.ok(i),n.mergeEvaluated(o)})}};var xS=Hh.default=wS;const SS=Pt({__proto__:null,default:xS},[Hh]),kS=At(SS);var qh={};Object.defineProperty(qh,"__esModule",{value:!0});const sl=te,hg=de,CS={message:({params:n})=>(0,sl.str)`must match "${n.ifClause}" schema`,params:({params:n})=>(0,sl._)`{failingKeyword: ${n.ifClause}}`},TS={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:CS,code(n){const{gen:t,parentSchema:e,it:r}=n;e.then===void 0&&e.else===void 0&&(0,hg.checkStrictMode)(r,'"if" without "then" and "else" is ignored');const i=ug(r,"then"),s=ug(r,"else");if(!i&&!s)return;const a=t.let("valid",!0),o=t.name("_valid");if(l(),n.reset(),i&&s){const h=t.let("ifClause");n.setParams({ifClause:h}),t.if(o,c("then",h),c("else",h))}else i?t.if(o,c("then")):t.if((0,sl.not)(o),c("else"));n.pass(a,()=>n.error(!0));function l(){const h=n.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},o);n.mergeEvaluated(h)}function c(h,f){return()=>{const d=n.subschema({keyword:h},o);t.assign(a,o),n.mergeValidEvaluated(d,a),f?t.assign(f,(0,sl._)`${h}`):n.setParams({ifClause:h})}}}};function ug(n,t){const e=n.schema[t];return e!==void 0&&!(0,hg.alwaysValidSchema)(n,e)}var ES=qh.default=TS;const PS=Pt({__proto__:null,default:ES},[qh]),AS=At(PS);var Yh={};Object.defineProperty(Yh,"__esModule",{value:!0});const OS=de,$S={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:n,parentSchema:t,it:e}){t.if===void 0&&(0,OS.checkStrictMode)(e,`"${n}" without "if" is ignored`)}};var NS=Yh.default=$S;const FS=Pt({__proto__:null,default:NS},[Yh]),RS=At(FS);Object.defineProperty($h,"__esModule",{value:!0});const MS=Qp,DS=w4,IS=eg,jS=A4,LS=R4,US=I4,GS=V4,zS=ig,VS=W4,BS=rS,HS=lS,qS=fS,YS=_S,KS=kS,XS=AS,JS=RS;function QS(n=!1){const t=[HS.default,qS.default,YS.default,KS.default,XS.default,JS.default,GS.default,zS.default,US.default,VS.default,BS.default];return n?t.push(DS.default,jS.default):t.push(MS.default,IS.default),t.push(LS.default),t}var ZS=$h.default=QS;const WS=Pt({__proto__:null,default:ZS},[$h]),t6=At(WS);var Kh={},Xh={};Object.defineProperty(Xh,"__esModule",{value:!0});const Ie=te,e6={message:({schemaCode:n})=>(0,Ie.str)`must match format "${n}"`,params:({schemaCode:n})=>(0,Ie._)`{format: ${n}}`},n6={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:e6,code(n,t){const{gen:e,data:r,$data:i,schema:s,schemaCode:a,it:o}=n,{opts:l,errSchemaPath:c,schemaEnv:h,self:f}=o;if(!l.validateFormats)return;i?d():u();function d(){const p=e.scopeValue("formats",{ref:f.formats,code:l.code.formats}),v=e.const("fDef",(0,Ie._)`${p}[${a}]`),_=e.let("fType"),x=e.let("format");e.if((0,Ie._)`typeof ${v} == "object" && !(${v} instanceof RegExp)`,()=>e.assign(_,(0,Ie._)`${v}.type || "string"`).assign(x,(0,Ie._)`${v}.validate`),()=>e.assign(_,(0,Ie._)`"string"`).assign(x,v)),n.fail$data((0,Ie.or)(b(),m()));function b(){return l.strictSchema===!1?Ie.nil:(0,Ie._)`${a} && !${x}`}function m(){const k=h.$async?(0,Ie._)`(${v}.async ? await ${x}(${r}) : ${x}(${r}))`:(0,Ie._)`${x}(${r})`,O=(0,Ie._)`(typeof ${x} == "function" ? ${k} : ${x}.test(${r}))`;return(0,Ie._)`${x} && ${x} !== true && ${_} === ${t} && !${O}`}}function u(){const p=f.formats[s];if(!p){b();return}if(p===!0)return;const[v,_,x]=m(p);v===t&&n.pass(k());function b(){if(l.strictSchema===!1){f.logger.warn(O());return}throw new Error(O());function O(){return`unknown format "${s}" ignored in schema at path "${c}"`}}function m(O){const T=O instanceof RegExp?(0,Ie.regexpCode)(O):l.code.formats?(0,Ie._)`${l.code.formats}${(0,Ie.getProperty)(s)}`:void 0,F=e.scopeValue("formats",{key:s,ref:O,code:T});return typeof O=="object"&&!(O instanceof RegExp)?[O.type||"string",O.validate,(0,Ie._)`${F}.validate`]:["string",O,F]}function k(){if(typeof p=="object"&&!(p instanceof RegExp)&&p.async){if(!h.$async)throw new Error("async format in sync schema");return(0,Ie._)`await ${x}(${r})`}return typeof _=="function"?(0,Ie._)`${x}(${r})`:(0,Ie._)`${x}.test(${r})`}}}};var r6=Xh.default=n6;const i6=Pt({__proto__:null,default:r6},[Xh]),s6=At(i6);Object.defineProperty(Kh,"__esModule",{value:!0});const a6=s6,o6=[a6.default];var l6=Kh.default=o6;const c6=Pt({__proto__:null,default:l6},[Kh]),h6=At(c6);var Ci={};Object.defineProperty(Ci,"__esModule",{value:!0});var dg=Ci.contentVocabulary=fg=Ci.metadataVocabulary=void 0,fg=Ci.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];dg=Ci.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"];const u6=Pt({__proto__:null,get contentVocabulary(){return dg},default:Ci,get metadataVocabulary(){return fg}},[Ci]),d6=At(u6);Object.defineProperty(dh,"__esModule",{value:!0});const f6=I5,p6=l4,g6=t6,m6=h6,pg=d6,v6=[f6.default,p6.default,(0,g6.default)(),m6.default,pg.metadataVocabulary,pg.contentVocabulary];var y6=dh.default=v6;const _6=Pt({__proto__:null,default:y6},[dh]),b6=At(_6);var Jh={},Qh={};(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.DiscrError=void 0,function(t){t.Tag="tag",t.Mapping="mapping"}(n.DiscrError||(n.DiscrError={}))})(Qh);const w6=vn(Qh),x6=Pt({__proto__:null,default:w6},[Qh]),S6=At(x6);Object.defineProperty(Jh,"__esModule",{value:!0});const ns=te,Zh=S6,gg=ch,k6=de,C6={message:({params:{discrError:n,tagName:t}})=>n===Zh.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:n,tag:t,tagName:e}})=>(0,ns._)`{error: ${n}, tag: ${e}, tagValue: ${t}}`},T6={keyword:"discriminator",type:"object",schemaType:"object",error:C6,code(n){const{gen:t,data:e,schema:r,parentSchema:i,it:s}=n,{oneOf:a}=i;if(!s.opts.discriminator)throw new Error("discriminator: requires discriminator option");const o=r.propertyName;if(typeof o!="string")throw new Error("discriminator: requires propertyName");if(r.mapping)throw new Error("discriminator: mapping is not supported");if(!a)throw new Error("discriminator: requires oneOf keyword");const l=t.let("valid",!1),c=t.const("tag",(0,ns._)`${e}${(0,ns.getProperty)(o)}`);t.if((0,ns._)`typeof ${c} == "string"`,()=>h(),()=>n.error(!1,{discrError:Zh.DiscrError.Tag,tag:c,tagName:o})),n.ok(l);function h(){const u=d();t.if(!1);for(const p in u)t.elseIf((0,ns._)`${c} === ${p}`),t.assign(l,f(u[p]));t.else(),n.error(!1,{discrError:Zh.DiscrError.Mapping,tag:c,tagName:o}),t.endIf()}function f(u){const p=t.name("valid"),v=n.subschema({keyword:"oneOf",schemaProp:u},p);return n.mergeEvaluated(v,ns.Name),p}function d(){var u;const p={},v=x(i);let _=!0;for(let k=0;k<a.length;k++){let O=a[k];O!=null&&O.$ref&&!(0,k6.schemaHasRulesButRef)(O,s.self.RULES)&&(O=gg.resolveRef.call(s.self,s.schemaEnv.root,s.baseId,O==null?void 0:O.$ref),O instanceof gg.SchemaEnv&&(O=O.schema));const T=(u=O==null?void 0:O.properties)===null||u===void 0?void 0:u[o];if(typeof T!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${o}"`);_=_&&(v||x(O)),b(T,k)}if(!_)throw new Error(`discriminator: "${o}" must be required`);return p;function x({required:k}){return Array.isArray(k)&&k.includes(o)}function b(k,O){if(k.const)m(k.const,O);else if(k.enum)for(const T of k.enum)m(T,O);else throw new Error(`discriminator: "properties/${o}" must have "const" or "enum"`)}function m(k,O){if(typeof k!="string"||k in p)throw new Error(`discriminator: "${o}" values must be unique strings`);p[k]=O}}}};var E6=Jh.default=T6;const P6=Pt({__proto__:null,default:E6},[Jh]),A6=At(P6),O6="http://json-schema.org/draft-07/schema#",$6="http://json-schema.org/draft-07/schema#",N6="Core schema meta-schema",F6={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},R6=["object","boolean"],M6={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},D6={$schema:O6,$id:$6,title:N6,definitions:F6,type:R6,properties:M6,default:!0};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const e=x5,r=b6,i=A6,s=D6,a=["/properties"],o="http://json-schema.org/draft-07/schema";class l extends e.default{_addVocabularies(){super._addVocabularies(),r.default.forEach(p=>this.addVocabulary(p)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const p=this.opts.$data?this.$dataMetaSchema(s,a):s;this.addMetaSchema(p,o,!1),this.refs["http://json-schema.org/schema"]=o}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(o)?o:void 0)}}n.exports=t=l,Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var c=zs;Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var h=te;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return h._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return h.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return h.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return h.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return h.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return h.CodeGen}});var f=rh;Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return f.default}});var d=ah;Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return d.default}})})(Uc,Uc.exports);var mg=Uc.exports;const vg=vn(mg),I6=Pt({__proto__:null,default:vg},[mg]);var Wh={exports:{}};const j6=At(I6);(function(n,t){Object.defineProperty(t,"__esModule",{value:!0});const e=j6,r=te,i=Is,s=zs,a=js,o=Er,l="errorMessage",c=new e.Name("emUsed"),h={required:"missingProperty",dependencies:"property",dependentRequired:"property"},f=/\$\{[^}]+\}/,d=/\$\{([^}]+)\}/g,u=/^""\s*\+\s*|\s*\+\s*""$/g;function p(_){return{keyword:l,schemaType:["string","object"],post:!0,code(x){const{gen:b,data:m,schema:k,schemaValue:O,it:T}=x;if(T.createErrors===!1)return;const F=k,R=r.strConcat(o.default.instancePath,T.errorPath);b.if(e._`${o.default.errors} > 0`,()=>{if(typeof F=="object"){const[E,C]=U(F);C&&B(C),E&&Y(E),tt(L(F))}const P=typeof F=="string"?F:F._;P&&W(P),_.keepErrors||ct()});function L({properties:P,items:E}){const C={};if(P){C.props={};for(const M in P)C.props[M]=[]}if(E){C.items={};for(let M=0;M<E.length;M++)C.items[M]=[]}return C}function U(P){let E,C;for(const M in P){if(M==="properties"||M==="items")continue;const G=P[M];if(typeof G=="object"){E||(E={});const D=E[M]={};for(const V in G)D[V]=[]}else C||(C={}),C[M]=[]}return[E,C]}function B(P){const E=b.const("emErrors",e.stringify(P)),C=b.const("templates",st(P,k));b.forOf("err",o.default.vErrors,V=>b.if(wt(V,E),()=>b.code(e._`${E}[${V}.keyword].push(${V})`).assign(e._`${V}.${c}`,!0)));const{singleError:M}=_;if(M){const V=b.let("message",e._`""`),q=b.let("paramsErrors",e._`[]`);G(Z=>{b.if(V,()=>b.code(e._`${V} += ${typeof M=="string"?M:";"}`)),b.code(e._`${V} += ${D(Z)}`),b.assign(q,e._`${q}.concat(${E}[${Z}])`)}),a.reportError(x,{message:V,params:e._`{errors: ${q}}`})}else G(V=>a.reportError(x,{message:D(V),params:e._`{errors: ${E}[${V}]}`}));function G(V){b.forIn("key",E,q=>b.if(e._`${E}[${q}].length`,()=>V(q)))}function D(V){return e._`${V} in ${C} ? ${C}[${V}]() : ${O}[${V}]`}}function Y(P){const E=b.const("emErrors",e.stringify(P)),C=[];for(const q in P)C.push([q,st(P[q],k[q])]);const M=b.const("templates",b.object(...C)),G=b.scopeValue("obj",{ref:h,code:e.stringify(h)}),D=b.let("emPropParams"),V=b.let("emParamsErrors");b.forOf("err",o.default.vErrors,q=>b.if(wt(q,E),()=>{b.assign(D,e._`${G}[${q}.keyword]`),b.assign(V,e._`${E}[${q}.keyword][${q}.params[${D}]]`),b.if(V,()=>b.code(e._`${V}.push(${q})`).assign(e._`${q}.${c}`,!0))})),b.forIn("key",E,q=>b.forIn("keyProp",e._`${E}[${q}]`,Z=>{b.assign(V,e._`${E}[${q}][${Z}]`),b.if(e._`${V}.length`,()=>{const rt=b.const("tmpl",e._`${M}[${q}] && ${M}[${q}][${Z}]`);a.reportError(x,{message:e._`${rt} ? ${rt}() : ${O}[${q}][${Z}]`,params:e._`{errors: ${V}}`})})}))}function tt(P){const{props:E,items:C}=P;if(!E&&!C)return;const M=e._`typeof ${m} == "object"`,G=e._`Array.isArray(${m})`,D=b.let("emErrors");let V,q;const Z=b.let("templates");E&&C?(V=b.let("emChildKwd"),b.if(M),b.if(G,()=>{rt(C,k.items),b.assign(V,e.str`items`)},()=>{rt(E,k.properties),b.assign(V,e.str`properties`)}),q=e._`[${V}]`):C?(b.if(G),rt(C,k.items),q=e._`.items`):E&&(b.if(r.and(M,r.not(G))),rt(E,k.properties),q=e._`.properties`),b.forOf("err",o.default.vErrors,gt=>St(gt,D,Ct=>b.code(e._`${D}[${Ct}].push(${gt})`).assign(e._`${gt}.${c}`,!0))),b.forIn("key",D,gt=>b.if(e._`${D}[${gt}].length`,()=>{a.reportError(x,{message:e._`${gt} in ${Z} ? ${Z}[${gt}]() : ${O}${q}[${gt}]`,params:e._`{errors: ${D}[${gt}]}`}),b.assign(e._`${o.default.vErrors}[${o.default.errors}-1].instancePath`,e._`${R} + "/" + ${gt}.replace(/~/g, "~0").replace(/\\//g, "~1")`)})),b.endIf();function rt(gt,Ct){b.assign(D,e.stringify(gt)),b.assign(Z,st(gt,Ct))}}function W(P){const E=b.const("emErrs",e._`[]`);b.forOf("err",o.default.vErrors,C=>b.if(xt(C),()=>b.code(e._`${E}.push(${C})`).assign(e._`${C}.${c}`,!0))),b.if(e._`${E}.length`,()=>a.reportError(x,{message:K(P),params:e._`{errors: ${E}}`}))}function ct(){const P=b.const("emErrs",e._`[]`);b.forOf("err",o.default.vErrors,E=>b.if(e._`!${E}.${c}`,()=>b.code(e._`${P}.push(${E})`))),b.assign(o.default.vErrors,P).assign(o.default.errors,e._`${P}.length`)}function wt(P,E){return r.and(e._`${P}.keyword !== ${l}`,e._`!${P}.${c}`,e._`${P}.instancePath === ${R}`,e._`${P}.keyword in ${E}`,e._`${P}.schemaPath.indexOf(${T.errSchemaPath}) === 0`,e._`/^\\/[^\\/]*$/.test(${P}.schemaPath.slice(${T.errSchemaPath.length}))`)}function St(P,E,C){b.if(r.and(e._`${P}.keyword !== ${l}`,e._`!${P}.${c}`,e._`${P}.instancePath.indexOf(${R}) === 0`),()=>{const M=b.scopeValue("pattern",{ref:/^\/([^/]*)(?:\/|$)/,code:e._`new RegExp("^\\\/([^/]*)(?:\\\/|$)")`}),G=b.const("emMatches",e._`${M}.exec(${P}.instancePath.slice(${R}.length))`),D=b.const("emChild",e._`${G} && ${G}[1].replace(/~1/g, "/").replace(/~0/g, "~")`);b.if(e._`${D} !== undefined && ${D} in ${E}`,()=>C(D))})}function xt(P){return r.and(e._`${P}.keyword !== ${l}`,e._`!${P}.${c}`,r.or(e._`${P}.instancePath === ${R}`,r.and(e._`${P}.instancePath.indexOf(${R}) === 0`,e._`${P}.instancePath[${R}.length] === "/"`)),e._`${P}.schemaPath.indexOf(${T.errSchemaPath}) === 0`,e._`${P}.schemaPath[${T.errSchemaPath}.length] === "/"`)}function st(P,E){const C=[];for(const M in P){const G=E[M];f.test(G)&&C.push([M,$(G)])}return b.object(...C)}function K(P){return f.test(P)?new i._Code(i.safeStringify(P).replace(d,(E,C)=>`" + JSON.stringify(${s.getData(C,T)}) + "`).replace(u,"")):e.stringify(P)}function $(P){return e._`function(){return ${K(P)}}`}},metaSchema:{anyOf:[{type:"string"},{type:"object",properties:{properties:{$ref:"#/$defs/stringMap"},items:{$ref:"#/$defs/stringList"},required:{$ref:"#/$defs/stringOrMap"},dependencies:{$ref:"#/$defs/stringOrMap"}},additionalProperties:{type:"string"}}],$defs:{stringMap:{type:"object",additionalProperties:{type:"string"}},stringOrMap:{anyOf:[{type:"string"},{$ref:"#/$defs/stringMap"}]},stringList:{type:"array",items:{type:"string"}}}}}}const v=(_,x={})=>{if(!_.opts.allErrors)throw new Error("ajv-errors: Ajv option allErrors must be true");if(_.opts.jsPropertySyntax)throw new Error("ajv-errors: ajv option jsPropertySyntax is not supported");return _.addKeyword(p(x))};t.default=v,n.exports=v,n.exports.default=v})(Wh,Wh.exports);var L6=Wh.exports;const U6=vn(L6),G6=new vg({allErrors:!0});U6(G6);const yg=(n,t="image/svg+xml",e="utf-8")=>new Blob([n],{type:`${t};charset=${e}`}),z6=n=>new XMLSerializer().serializeToString(n),V6=(n,t="image/svg+xml",e="utf-8")=>yg(z6(n),t,e),_g=(n,t)=>{const e=document.createElement("a");e.style.visibility="hidden",document.body.appendChild(e),e.download=t,typeof n=="string"?e.href=n:e.href=window.URL.createObjectURL(n),e.click(),document.body.removeChild(e),window.URL.revokeObjectURL(e.href)};function bg(){return document.compatMode=="BackCompat"?document.body:document.documentElement}function wg(){const n=bg();return{scrollTop:n.scrollTop,scrollLeft:n.scrollLeft,scrollWidth:n.scrollWidth,scrollHeight:n.scrollHeight}}function B6(){const n=bg();return{clientTop:n.clientTop,clientLeft:n.clientLeft,clientWidth:n.clientWidth,clientHeight:n.clientHeight}}function H6(){const{clientWidth:n,clientHeight:t}=B6();return{width:window.innerWidth||n,height:window.innerHeight||t}}function q6(n){const{top:t,left:e}=n.getBoundingClientRect(),r=wg();return{x:e+r.scrollLeft,y:t+r.scrollTop}}function Y6(n){if(n.pageX&&n.pageY)return{x:n.pageX,y:n.pageY};const t=wg();return{x:n.clientX+t.scrollLeft,y:n.clientY+t.scrollTop}}function xg(n,t){const e=Y6(t),r=q6(n);return{x:e.x-r.x,y:e.y-r.y}}function K6(){const n=window.navigator.userAgent,t=n.indexOf("MSIE ");if(t>0)return parseInt(n.substring(t+5,n.indexOf(".",t)),10);if(n.indexOf("Trident/")>0){const r=n.indexOf("rv:");return parseInt(n.substring(r+3,n.indexOf(".",r)),10)}const e=n.indexOf("Edge/");return e>0?parseInt(n.substring(e+5,n.indexOf(".",e)),10):-1}K6();function X6(n){var t=document.documentElement,e=window.top===window.self?window.devicePixelRatio:1;t.dataset.dpr=e;var r=100,i=function(){var s=Math.min(t.clientWidth,n);t.dataset.width=s,t.dataset.rem=r=Math.round(100*(s/n)),t.style.fontSize=r+"px"};i(),window.rem2px=function(s){return s=parseFloat(s),s*r},window.px2rem=function(s){return s=parseFloat(s),s/r},window.addEventListener&&window.addEventListener("orientationchange"in window?"orientationchange":"resize",i,!1)}class Bt{static onDocumentReady(t){function e(){document.readyState!=="loading"&&(t(),document.removeEventListener("DOMContentLoaded",e))}typeof document<"u"&&(document.addEventListener("DOMContentLoaded",e),e())}static getCSSVar(t){return getComputedStyle(document.documentElement).getPropertyValue(t)}static setCSSVar(t,e){document.documentElement.style.setProperty(t,e)}static compileTemplate(t){return t=t.replace(/<%=(.+?)%>/g,"`); \n echo( $1 ); \n echo(`").replace(/<%([\s\S]+?)%>/g,"`); \n $1 \n echo(`"),t="echo(`"+t+"`);",`(function parse(data){
25
25
  let output = "";
26
26
  function echo(html){
27
27
  output += html;
28
28
  }
29
29
  ${t}
30
30
  return output;
31
- })`}static safeHtml(t,e="encode"){const r={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"};for(const i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t=t.replace(new RegExp(e=="decode"?i:r[i],"g"),e=="decode"?r[i]:i));return t}static loadScript(t){const e=document.createElement("script");e.type="text/javascript",e.src=t,e.async=!1,document.body.appendChild(e),e.onload=()=>{},e.onerror=()=>{}}static loadStyle(t){const e=document.createElement("link");e.rel="stylesheet",e.href=t,document.head.insertBefore(e,document.head.childNodes[document.head.childNodes.length-1].nextSibling)}static lazyloadImages(){const t=document.getElementsByTagName("img"),e=R8().height;let r=0;return()=>{for(let i=r;i<t.length;i++)t[i].getBoundingClientRect().top<e&&(t[i].src=t[i].getAttribute("data-src")??"",r=i+1)}}static iframePostMessage(t,e="http://test.com/localstorage.html"){const r=document.createElement("iframe");r.src=e,document.body.append(r),setTimeout(function(){var i;(i=r.contentWindow)==null||i.postMessage(t,e)},4e3),setTimeout(function(){r.remove()},6e3)}static getLocation(){return new Promise((t,e)=>{navigator.geolocation?navigator.geolocation.getCurrentPosition(r=>{t(r.coords)}):e("Geolocation is not supported by this browser")})}static vibrate(t=200){"vibrate"in navigator?window.navigator.vibrate(t):console.error("Your device is not support vibrate on this browser.")}}Tt(rn,"dom",new Proxy({},{get(t,e){return function(r={},...i){const s=document.createElement(e);for(const a of Object.keys(r))s.setAttribute(a,r[a]);for(const a of i)typeof a=="string"?s.appendChild(document.createTextNode(a)):s.appendChild(a);return s}}})),Tt(rn,"waitForStyleSheetsLoaded",()=>new Promise(t=>{const e=Array.from(document.querySelectorAll("link[rel=stylesheet]"));let r=document.styleSheets.length??0;const i=()=>r>=e.length?(t(),!0):!1;i()||e.forEach(s=>{s.onload=()=>{r+=1,i()}})})),Tt(rn,"getTextWidth",(t,e,r=400)=>{const i=document.createElement("span");i.style.visibility="hidden",i.style.padding="0",i.style.whiteSpace="nowrap",i.style.overflow="visible",i.style.fontSize=e>12?e+"px":"12px",i.style.fontWeight=r.toString(),i.innerText=t,document.body.appendChild(i);const s=i.offsetWidth;return document.body.removeChild(i),s}),Tt(rn,"getFixedWidthText",(t,e,r=12,i=400,s=!0)=>{let a="",o="",h="";if(!t||e<r||typeof t!="string")return a;const l=t.split(""),c=document.createElement("span");c.style.visibility="hidden",c.style.padding="0",c.style.whiteSpace="nowrap",c.style.overflow="visible",c.style.fontSize=r>12?r+"px":"12px",c.style.fontWeight=i.toString(),document.body.appendChild(c);for(let f=0,d=l.length;f<d;f++){const u=l[f];if(o=h,h+=u,a=h,c.innerText=h,c.offsetWidth>e){s?a=o+"...":a=o;break}}return document.body.removeChild(c),a}),Tt(rn,"copyToClipboard",t=>navigator.clipboard.writeText(t)),Tt(rn,"getSelectedText",()=>{var t;return(t=window.getSelection())==null?void 0:t.toString()}),Tt(rn,"siblings",t=>{var e;return Array.prototype.slice.call((e=t.parentNode)==null?void 0:e.children).filter(r=>r!==t)}),Tt(rn,"isElementFocus",t=>t===document.activeElement),Tt(rn,"isTabInView",()=>!document.hidden),Tt(rn,"navigateBack",()=>history.back()),Tt(rn,"navigateBack2",()=>history.go(-1));function Hc(n){return n%360*Math.PI/180}function j8(n){return n*180/Math.PI%360}function L8(n,t,e,r){const i=n-e,s=t-r;return Math.sqrt(i*i+s*s)}function U8(n,t,e,r){const i=e-n,s=r-t;return Math.atan2(s,i)}function qc(n){return n[0]*n[0]+n[1]*n[1]}function fg(n){const t=Math.sqrt(qc(n));n[0]&&(n[0]/=t),n[1]&&(n[1]/=t)}class Ks{constructor(t){Tt(this,"x");Tt(this,"y");Tt(this,"vx");Tt(this,"vy");Tt(this,"ax");Tt(this,"ay");Tt(this,"mass");this.x=t.x,this.y=t.y,this.vx=(t==null?void 0:t.vx)||0,this.vy=(t==null?void 0:t.vy)||0,this.ax=(t==null?void 0:t.ax)||0,this.ay=(t==null?void 0:t.ay)||0,this.mass=(t==null?void 0:t.mass)||0}fromAngleAndLength(t,e){return new Ks({x:Math.cos(t)*e,y:Math.sin(t)*e})}distanceTo(t){return L8(this.x,this.y,t.x,t.y)}angleTo(t){return U8(this.x,this.y,t.x,t.y)}followTo(t,e=3){const r=this.angleTo(t),{x:i,y:s}=this.fromAngleAndLength(r,e);this.vx=i,this.vy=s,this.nextFrame()}followAccelerationTo(t,e=.05){const r=this.angleTo(t),{x:i,y:s}=this.fromAngleAndLength(r,e);this.ax=i,this.ay=s,this.nextFrame()}nextFrame(t){const e=(t==null?void 0:t.gravity)??0,r=(t==null?void 0:t.friction)??0;if(this.vx+=this.ax,this.vy+=this.ay,this.vy+=e,r>0){const i=Math.atan2(this.vy,this.vx);let s=Math.sqrt(this.vx*this.vx+this.vy*this.vy);s>r?s-=r:s=0,this.vx=Math.cos(i)*s,this.vy=Math.sin(i)*s}this.x+=this.vx,this.y+=this.vy}nextFrameEaseTo(t,e){const r=(e==null?void 0:e.gravity)??0,i=(e==null?void 0:e.friction)??1,s=(e==null?void 0:e.easing)??.05,a=t.x-this.x,o=t.y-this.y;this.vx=a*s,this.vy=o*s,this.vy+=r,this.vx*=i,this.vy*=i,this.x+=this.vx,this.y+=this.vy}nextFrameSpringTo(t,e){const r=(e==null?void 0:e.gravity)??0,i=(e==null?void 0:e.friction)??.95,s=(e==null?void 0:e.spring)??.03;(Array.isArray(t)?t:[t]).forEach(a=>{const o=a.x-this.x,h=a.y-this.y,l=o*s,c=h*s;this.vx+=l,this.vy+=c}),this.vy+=r,this.vx*=i,this.vy*=i,this.x+=this.vx,this.y+=this.vy}nextFrameSpringConnect(t,e){const r=(e==null?void 0:e.gravity)??0,i=(e==null?void 0:e.friction)??.95,s=(e==null?void 0:e.spring)??.03,a=(e==null?void 0:e.springLength)??100,o=this.angleTo(t);this.nextFrameSpringTo(new Ks({x:t.x-Math.cos(o)*a,y:t.y-Math.sin(o)*a}),{spring:s,friction:i,gravity:r})}}let G8=class extends Ks{constructor(t){super(t);Tt(this,"width");Tt(this,"height");this.width=t.width,this.height=t.height}eq(t){return this.x===t.x&&this.y===t.y&&this.width===t.width&&this.height===t.height}isIntersectRect(t){return!(this.x+this.width<t.x||t.x+t.width<this.x||this.y+this.height<t.y||t.y+t.height<this.y)}isContainPoint(t){return!(t.x<this.x||t.x>this.x+this.width||t.y<this.y||t.y>this.y+this.height)}toArray(){return[this.x,this.y,this.width,this.height]}clone(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height}};class bi extends Ks{constructor(e){super(e);Tt(this,"radius");this.radius=(e==null?void 0:e.radius)??0}toSVGPathData(){return[this.x,this.y]}toSVGPathD(){return`${this.x},${this.y}`}setX(e){this.x=e}setY(e){this.y=e}setXY(e,r){this.x=e,this.y=r}eq(e){return this.x===e.x&&this.y===e.y}midPointBtw(e){return new bi({x:this.x+(e.x-this.x)/2,y:this.y+(e.y-this.y)/2})}toArray(){return[this.x,this.y]}clone(e){this.setXY(e.x,e.y)}getBounds(){return new G8({x:this.x-this.radius,y:this.y-this.radius,width:this.radius*2,height:this.radius*2})}nextFrameCollisionTo(e){const r=e.x-this.x,i=e.y-this.y;if(Math.sqrt(r*r+i*i)<this.radius+e.radius){const a=Math.atan2(i,r),o=Math.sin(a),h=Math.cos(a),l={x:0,y:0},c=s(r,i,o,h,!0),f=s(this.vx,this.vy,o,h,!0),d=s(e.vx,e.vy,o,h,!0),u=f.x-d.x;f.x=((this.mass-e.mass)*f.x+2*e.mass*d.x)/(this.mass+e.mass),d.x=u+f.x;const p=Math.abs(f.x)+Math.abs(d.x),v=this.radius+e.radius-Math.abs(l.x-c.x);l.x+=f.x/p*v,c.x+=d.x/p*v;const _=s(l.x,l.y,o,h,!1),S=s(c.x,c.y,o,h,!1);e.x=this.x+S.x,e.y=this.y+S.y,this.x=this.x+_.x,this.y=this.y+_.y;const x=s(f.x,f.y,o,h,!1),m=s(d.x,d.y,o,h,!1);this.vx=x.x,this.vy=x.y,e.vx=m.x,e.vy=m.y}function s(a,o,h,l,c=!1){return{x:c?a*l+o*h:a*l-o*h,y:c?o*l-a*h:o*l+a*h}}}nextFrameBounce(e){const r=e.left,i=e.top,s=e.right,a=e.bottom,o=(e==null?void 0:e.bounce)??-1;this.x+this.radius>s?(this.x=s-this.radius,this.vx*=o):this.x-this.radius<r&&(this.x=r+this.radius,this.vx*=o),this.y+this.radius>a?(this.y=a-this.radius,this.vy*=o):this.y-this.radius<i&&(this.y=i+this.radius,this.vy*=o)}}var Kc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Tn(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function Dt(n){if(n.__esModule)return n;var t=n.default;if(typeof t=="function"){var e=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};e.prototype=t.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(n).forEach(function(r){var i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(e,r,i.get?i:{enumerable:!0,get:function(){return n[r]}})}),e}var z8={exports:{}};/*! Hammer.JS - v2.0.7 - 2016-04-22
31
+ })`}static safeHtml(t,e="encode"){const r={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"};for(const i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t=t.replace(new RegExp(e=="decode"?i:r[i],"g"),e=="decode"?r[i]:i));return t}static loadScript(t){const e=document.createElement("script");e.type="text/javascript",e.src=t,e.async=!1,document.body.appendChild(e),e.onload=()=>{},e.onerror=()=>{}}static loadStyle(t){const e=document.createElement("link");e.rel="stylesheet",e.href=t,document.head.insertBefore(e,document.head.childNodes[document.head.childNodes.length-1].nextSibling)}static lazyloadImages(){const t=document.getElementsByTagName("img"),e=H6().height;let r=0;return()=>{for(let i=r;i<t.length;i++)t[i].getBoundingClientRect().top<e&&(t[i].src=t[i].getAttribute("data-src")??"",r=i+1)}}static iframePostMessage(t,e="http://test.com/localstorage.html"){const r=document.createElement("iframe");r.src=e,document.body.append(r),setTimeout(function(){var i;(i=r.contentWindow)==null||i.postMessage(t,e)},4e3),setTimeout(function(){r.remove()},6e3)}static getLocation(){return new Promise((t,e)=>{navigator.geolocation?navigator.geolocation.getCurrentPosition(r=>{t(r.coords)}):e("Geolocation is not supported by this browser")})}static vibrate(t=200){"vibrate"in navigator?window.navigator.vibrate(t):console.error("Your device is not support vibrate on this browser.")}}Et(Bt,"dom",new Proxy({},{get(t,e){return function(r={},...i){const s=document.createElement(e);for(const a of Object.keys(r))s.setAttribute(a,r[a]);for(const a of i)typeof a=="string"?s.appendChild(document.createTextNode(a)):s.appendChild(a);return s}}})),Et(Bt,"waitForStyleSheetsLoaded",()=>new Promise(t=>{const e=Array.from(document.querySelectorAll("link[rel=stylesheet]"));let r=document.styleSheets.length??0;const i=()=>r>=e.length?(t(),!0):!1;i()||e.forEach(s=>{s.onload=()=>{r+=1,i()}})})),Et(Bt,"getTextWidth",(t,e,r=400)=>{const i=document.createElement("span");i.style.visibility="hidden",i.style.padding="0",i.style.whiteSpace="nowrap",i.style.overflow="visible",i.style.fontSize=e>12?e+"px":"12px",i.style.fontWeight=r.toString(),i.innerText=t,document.body.appendChild(i);const s=i.offsetWidth;return document.body.removeChild(i),s}),Et(Bt,"getFixedWidthText",(t,e,r=12,i=400,s=!0)=>{let a="",o="",l="";if(!t||e<r||typeof t!="string")return a;const c=t.split(""),h=document.createElement("span");h.style.visibility="hidden",h.style.padding="0",h.style.whiteSpace="nowrap",h.style.overflow="visible",h.style.fontSize=r>12?r+"px":"12px",h.style.fontWeight=i.toString(),document.body.appendChild(h);for(let f=0,d=c.length;f<d;f++){const u=c[f];if(o=l,l+=u,a=l,h.innerText=l,h.offsetWidth>e){s?a=o+"...":a=o;break}}return document.body.removeChild(h),a}),Et(Bt,"copyToClipboard",t=>navigator.clipboard.writeText(t)),Et(Bt,"getSelectedText",()=>{var t;return(t=window.getSelection())==null?void 0:t.toString()}),Et(Bt,"siblings",t=>{var e;return Array.prototype.slice.call((e=t.parentNode)==null?void 0:e.children).filter(r=>r!==t)}),Et(Bt,"isElementFocus",t=>t===document.activeElement),Et(Bt,"isTabInView",()=>!document.hidden),Et(Bt,"navigateBack",()=>history.back()),Et(Bt,"navigateBack2",()=>history.go(-1));function $r(n,t=document){return new ze(n,t)}class ze{constructor(t,e=document){Et(this,"context");Et(this,"nodes");Et(this,"prefixs",["moz","o","ms","webkit"]);if(this.context=e,typeof t=="string"?this.nodes=Array.from(this.context.querySelectorAll(t)):t instanceof HTMLElement?this.nodes=[t]:this.nodes=t,this.nodes.length===0)throw new Error(`can not find ${t}`);this.each((r,i)=>{r instanceof HTMLInputElement&&r.addEventListener("change",s=>{this.changeRadioChecked(s.currentTarget.value)}),r instanceof HTMLSelectElement&&r.addEventListener("change",s=>{this.changeSelectSelected(s.currentTarget.value)})})}get(t){return t<0&&(t=this.nodes.length+t),this.nodes[t]}concat(t){return new ze(this.nodes.concat(t.nodes),this.context)}then(t){return t(this)??this}each(t){return this.nodes.forEach((e,r)=>{t(e,r)}),this}_save(t,e,r){t._mQuery||(t._mQuery={}),Array.isArray(r)?(t._mQuery[e]=t._mQuery[e]??[],t._mQuery[e].push(...r)):r!=null?t._mQuery[e]=r:delete t._mQuery[e]}on(t,e,r){return this.nodes.forEach(i=>{this._save(i,"events",[{event:t,callback:e,options:r}]),i.addEventListener(t,e,r)}),this}off(t,e,r){return this.nodes.forEach(i=>{i.removeEventListener(t,e,r)}),this}dispatchEvent(t,e){let r;const i=["click","dblclick","mousedown","mouseup","mousemove"],s=["keydown","keyup","keypress"];return typeof t=="string"?i.includes(t)?r=new MouseEvent(t,e):s.includes(t)?r=new KeyboardEvent(t,e):r=new Event(t,e):r=t,this.nodes.forEach(a=>{a.dispatchEvent(r)}),this}change(){return this.dispatchEvent("change")}click(){return this.dispatchEvent("click")}static hasEvent(t,e){return"on"+e in t}static _fragment(t){const e=document.createElement("template");return e.innerHTML=t,e.content.childNodes.forEach(r=>{const i=ze._scriptConvert(r);i!=r&&e.content.replaceChild(i,r)}),e.content}static _scriptConvert(t){const e=r=>{const i=r.ownerDocument.createElement("script");i.text=r.text;const s=r.attributes;for(let a=0;a<s.length;a++)i.setAttribute(s[a].name,s[a].value);return i};return t.tagName=="SCRIPT"&&(t=e(t)),t.querySelectorAll&&t.querySelectorAll("script").forEach(r=>{var i;(i=r.parentNode)==null||i.replaceChild(e(r),r)}),t}static _fixProp(t){const e={cellpadding:"cellPadding",cellspacing:"cellSpacing",class:"className",colspan:"colSpan",contenteditable:"contentEditable",for:"htmlFor",frameborder:"frameBorder",maxlength:"maxLength",readonly:"readOnly",rowspan:"rowSpan",tabindex:"tabIndex",usemap:"useMap"};return e[t]?e[t]:t}static isSVG(t){return(t||document.documentElement).nodeName.toLowerCase()==="svg"}static createElement(t){return ze.isSVG()?document.createElementNS.call(document,"http://www.w3.org/2000/svg",t):document.createElement.call(document,t)}static createTextNode(t){return document.createTextNode.call(document,t)}static createDocumentFragment(){return document.createDocumentFragment.call(document)}_insert(t,e){const r=this.nodes.length;if(r<1)return this;const i=[];if(typeof e=="string")this.nodes.forEach(s=>{const a=ze._fragment(e);i.push(...a.children),s[t](a)});else if(e instanceof HTMLElement)this.each(s=>{const a=r===1?e:ze._fragment(e.outerHTML);i.push(...r===1?[e]:a.children),s[t](a)}),r>1&&e.remove();else if(e instanceof ze){const s=r==1;e.each(a=>{this.each(o=>{const l=s?a:a.cloneNode(!0);i.push(l),o[t](l),ze._scriptConvert(l)})}),s||e.remove()}return t=="replaceWith"&&(this.nodes=i),this}append(t){return this._insert("append",t)}prepend(t){return this._insert("prepend",t)}after(t){return this._insert("after",t)}before(t){return this._insert("before",t)}replace(t){return this._insert("replaceWith",t)}remove(){return this.nodes.forEach(t=>{t.remove()}),this}static removeChild(t){var e;(e=t.parentElement)==null||e.removeChild(t)}find(t){const e=[];return this.nodes.forEach(r=>{e.push(...Array.from(r.querySelectorAll(t)))}),new ze(e,this.context)}filter(t){const e=[];return this.nodes.forEach(r=>{(r===t||typeof t=="string"&&r.matches&&r.matches(t))&&e.push(r)}),new ze(e,this.context)}next(){const t=[];return this.nodes.forEach(e=>{const r=e.nextElementSibling;r&&t.push(r)}),new ze(t,this.context)}prev(){const t=[];return this.nodes.forEach(e=>{const r=e.previousElementSibling;r&&t.push(r)}),new ze(t,this.context)}closest(t){const e=[];return this.nodes.forEach(r=>{const i=r.closest(t);i&&e.push(i)}),new ze(e,this.context)}shadow(t){const e=[];this.nodes.forEach(i=>{i.shadowRoot&&e.push(i.shadowRoot)});const r=new ze(e,this.context);return t!==void 0?r.find(t):r}parent(t){return this.parents(t,!0)}parents(t,e=!1){const r=[],i=a=>{if(r.indexOf(a)==-1&&r.push(a),!e&&a.parentElement)return i(a.parentElement)};this.nodes.forEach(a=>{a.parentElement&&i(a.parentElement)});const s=new ze(r,this.context);return t!==void 0?s.filter(t):s}static getComputedStyle(t,e,r){let i;const s=t.style.getPropertyPriority(e);return"getComputedStyle"in window?(i=getComputedStyle.call(window,t,r),i=i.getPropertyValue(e)):i=t.style.getPropertyValue(e),i+(s?"!"+s:"")}css(t,e){if((t===void 0||typeof t=="string")&&e===void 0){const r=this.nodes[0].style;if(typeof t=="string"){const i=r.getPropertyPriority(t),s=r.getPropertyValue(t).trim();return s?s+(i?"!"+i:""):ze.getComputedStyle(this.nodes[0],t)}else{const i=Object.fromEntries(this.nodes[0].style.cssText.split(";").filter(s=>!!s).map(s=>s.split(":").map(a=>a.trim())));return Object.assign(i,getComputedStyle.call(window,this.nodes[0])),i}}else{let r={};return typeof t=="string"&&e!==void 0?r[t]=e:typeof t=="object"&&(r=t),this.nodes.forEach(i=>{Object.keys(r).forEach(s=>{const a=String(r[s]).toLowerCase().includes("!important")?"important":"";i.style.setProperty(s,String(r[s]).replace(/!important/i,""),a)})}),this}}addClass(t){return this.toggleClass(t,!0)}removeClass(t){return this.toggleClass(t,!1)}toggleClass(t,e){const r=t.split(/[,\s]+/);return this.nodes.forEach(i=>{r.forEach(s=>{if(s.trim()!==""){let a="toggle";e!==void 0&&(a=e?"add":"remove"),i.classList[a](s.trim())}})}),this}hasClass(t){const e=t.split(/[,\s]+/);let r=!1;return this.nodes.forEach(i=>{r=r||e.every(s=>Array.from(i.classList??[]).includes(s.trim()))}),r}attr(t,e){if(e===void 0&&typeof t=="string")return this.nodes[0].getAttribute(t);let r={};return typeof t=="object"?r=t:e!==void 0&&(r[t]=e),this.nodes.forEach(i=>{Object.entries(r).forEach(([s,a])=>{i.setAttribute(s,a)})}),this}removeAttr(t){const e=t.split(/[,\s]+/);return this.nodes.forEach(r=>{e.forEach(i=>{r.removeAttribute(i)})}),this}prop(t,e){if(e===void 0&&typeof t=="string")return this.nodes[0][t];{let r={};return typeof t=="object"?r=t:typeof t=="string"&&e!==void 0&&(r[t]=e),this.nodes.forEach(i=>{Object.entries(r).forEach(([s,a])=>{const o=ze._fixProp(s);i[o]=a,o=="innerHTML"&&ze._scriptConvert(i)})}),this}}removeProp(t){const e=t.split(/[,\s]+/);return this.nodes.forEach(r=>{e.forEach(i=>{delete r[ze._fixProp(i)]})}),this}changeSelectSelected(t){this.nodes.forEach(e=>{if(e instanceof HTMLSelectElement){const r=e.options;for(let i=0,s=r.length;i<s;i++)r[i].value==t?r[i].selected=!0:r[i].selected=!1}})}changeRadioChecked(t){this.nodes.forEach(e=>{e instanceof HTMLInputElement&&(e.value==t?e.checked=!0:e.checked=!1)})}data(t,e){if(typeof t=="string"&&t.indexOf("-")!=-1)throw new Error(`Key "${t}" contains "-" (dash). Dashes are not allowed in property names. Use camelCase instead.`);if((typeof t=="string"||t===void 0)&&e===void 0){const r=Object.assign({},this.nodes[0].dataset);return Object.keys(r).forEach(i=>{var s,a;if((s=r[i])!=null&&s.startsWith("[")||(a=r[i])!=null&&a.startsWith("{"))try{r[i]=JSON.parse(r[i]??"")}catch{}}),typeof t=="string"?r[t]:r}else{let r={};return typeof t=="object"?r=t:typeof t=="string"&&(r[t]=e),this.nodes.forEach(i=>{Object.entries(r).forEach(([s,a])=>{a!=null?i.dataset[s]=a instanceof Object?JSON.stringify(a):a:delete i.dataset[s]})}),this}}removeData(t){const e=t.split(/[,\s]+/);return this.nodes.forEach(r=>{e.forEach(i=>{delete r.dataset[i]})}),this}show(){return this.toggle(!0)}hide(){return this.toggle(!1)}toggle(t){return this.nodes.forEach(e=>{var a;const r=e.style.display,i=getComputedStyle(e).display,s=r=="none"||i=="none";if(s&&(t===void 0||t===!0)){const o=e instanceof HTMLTableRowElement?"table-row":e instanceof HTMLTableCellElement?"table-cell":"block";e.style.display=((a=e._mQuery)==null?void 0:a.prevDisplay)??(r==i&&i!="none"?"":o),this._save(e,"prevDisplay",null)}!s&&(t==null||t===!1)&&(i!="none"&&this._save(e,"prevDisplay",i),e.style.setProperty("display","none"))})}empty(){return this.html("")}html(t){return t instanceof HTMLElement?this.empty().append(t.innerHTML):this.prop("innerHTML",t)}text(t){return this.prop("textContent",t)}val(t){return this.prop("value",t)}}function tu(n){return n*Math.PI/180}function J6(n){return n*180/Math.PI}function Q6(n,t,e,r){const i=n-e,s=t-r;return Math.sqrt(i*i+s*s)}function Z6(n,t,e,r){const i=e-n,s=r-t;return Math.atan2(s,i)}function eu(n){return n[0]*n[0]+n[1]*n[1]}function Sg(n){const t=Math.sqrt(eu(n));n[0]&&(n[0]/=t),n[1]&&(n[1]/=t)}class Qs{constructor(t){Et(this,"x");Et(this,"y");Et(this,"vx");Et(this,"vy");Et(this,"ax");Et(this,"ay");Et(this,"mass");this.x=t.x,this.y=t.y,this.vx=(t==null?void 0:t.vx)||0,this.vy=(t==null?void 0:t.vy)||0,this.ax=(t==null?void 0:t.ax)||0,this.ay=(t==null?void 0:t.ay)||0,this.mass=(t==null?void 0:t.mass)||0}fromAngleAndLength(t,e){return new Qs({x:Math.cos(t)*e,y:Math.sin(t)*e})}distanceTo(t){return Q6(this.x,this.y,t.x,t.y)}angleTo(t){return Z6(this.x,this.y,t.x,t.y)}followTo(t,e=3){const r=this.angleTo(t),{x:i,y:s}=this.fromAngleAndLength(r,e);this.vx=i,this.vy=s,this.nextFrame()}followAccelerationTo(t,e=.05){const r=this.angleTo(t),{x:i,y:s}=this.fromAngleAndLength(r,e);this.ax=i,this.ay=s,this.nextFrame()}nextFrame(t){const e=(t==null?void 0:t.gravity)??0,r=(t==null?void 0:t.friction)??0;if(this.vx+=this.ax,this.vy+=this.ay,this.vy+=e,r>0){const i=Math.atan2(this.vy,this.vx);let s=Math.sqrt(this.vx*this.vx+this.vy*this.vy);s>r?s-=r:s=0,this.vx=Math.cos(i)*s,this.vy=Math.sin(i)*s}this.x+=this.vx,this.y+=this.vy}nextFrameEaseTo(t,e){const r=(e==null?void 0:e.gravity)??0,i=(e==null?void 0:e.friction)??1,s=(e==null?void 0:e.easing)??.05,a=t.x-this.x,o=t.y-this.y;this.vx=a*s,this.vy=o*s,this.vy+=r,this.vx*=i,this.vy*=i,this.x+=this.vx,this.y+=this.vy}nextFrameSpringTo(t,e){const r=(e==null?void 0:e.gravity)??0,i=(e==null?void 0:e.friction)??.95,s=(e==null?void 0:e.spring)??.03;(Array.isArray(t)?t:[t]).forEach(a=>{const o=a.x-this.x,l=a.y-this.y,c=o*s,h=l*s;this.vx+=c,this.vy+=h}),this.vy+=r,this.vx*=i,this.vy*=i,this.x+=this.vx,this.y+=this.vy}nextFrameSpringConnect(t,e){const r=(e==null?void 0:e.gravity)??0,i=(e==null?void 0:e.friction)??.95,s=(e==null?void 0:e.spring)??.03,a=(e==null?void 0:e.springLength)??100,o=this.angleTo(t);this.nextFrameSpringTo(new Qs({x:t.x-Math.cos(o)*a,y:t.y-Math.sin(o)*a}),{spring:s,friction:i,gravity:r})}}let W6=class extends Qs{constructor(t){super(t);Et(this,"width");Et(this,"height");this.width=t.width,this.height=t.height}eq(t){return this.x===t.x&&this.y===t.y&&this.width===t.width&&this.height===t.height}isIntersectRect(t){return!(this.x+this.width<t.x||t.x+t.width<this.x||this.y+this.height<t.y||t.y+t.height<this.y)}isContainPoint(t){return!(t.x<this.x||t.x>this.x+this.width||t.y<this.y||t.y>this.y+this.height)}toArray(){return[this.x,this.y,this.width,this.height]}clone(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height}};class Ti extends Qs{constructor(e){super(e);Et(this,"radius");this.radius=(e==null?void 0:e.radius)??0}toSVGPathData(){return[this.x,this.y]}toSVGPathD(){return`${this.x},${this.y}`}setX(e){this.x=e}setY(e){this.y=e}setXY(e,r){this.x=e,this.y=r}eq(e){return this.x===e.x&&this.y===e.y}midPointBtw(e){return new Ti({x:this.x+(e.x-this.x)/2,y:this.y+(e.y-this.y)/2})}toArray(){return[this.x,this.y]}clone(e){this.setXY(e.x,e.y)}getBounds(){return new W6({x:this.x-this.radius,y:this.y-this.radius,width:this.radius*2,height:this.radius*2})}nextFrameCollisionTo(e){const r=e.x-this.x,i=e.y-this.y;if(Math.sqrt(r*r+i*i)<this.radius+e.radius){const a=Math.atan2(i,r),o=Math.sin(a),l=Math.cos(a),c={x:0,y:0},h=s(r,i,o,l,!0),f=s(this.vx,this.vy,o,l,!0),d=s(e.vx,e.vy,o,l,!0),u=f.x-d.x;f.x=((this.mass-e.mass)*f.x+2*e.mass*d.x)/(this.mass+e.mass),d.x=u+f.x;const p=Math.abs(f.x)+Math.abs(d.x),v=this.radius+e.radius-Math.abs(c.x-h.x);c.x+=f.x/p*v,h.x+=d.x/p*v;const _=s(c.x,c.y,o,l,!1),x=s(h.x,h.y,o,l,!1);e.x=this.x+x.x,e.y=this.y+x.y,this.x=this.x+_.x,this.y=this.y+_.y;const b=s(f.x,f.y,o,l,!1),m=s(d.x,d.y,o,l,!1);this.vx=b.x,this.vy=b.y,e.vx=m.x,e.vy=m.y}function s(a,o,l,c,h=!1){return{x:h?a*c+o*l:a*c-o*l,y:h?o*c-a*l:o*c+a*l}}}nextFrameBounce(e){const r=e.left,i=e.top,s=e.right,a=e.bottom,o=(e==null?void 0:e.bounce)??-1;this.x+this.radius>s?(this.x=s-this.radius,this.vx*=o):this.x-this.radius<r&&(this.x=r+this.radius,this.vx*=o),this.y+this.radius>a?(this.y=a-this.radius,this.vy*=o):this.y-this.radius<i&&(this.y=i+this.radius,this.vy*=o)}}var nu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function An(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function Dt(n){if(n.__esModule)return n;var t=n.default;if(typeof t=="function"){var e=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};e.prototype=t.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(n).forEach(function(r){var i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(e,r,i.get?i:{enumerable:!0,get:function(){return n[r]}})}),e}var t8={exports:{}};/*! Hammer.JS - v2.0.7 - 2016-04-22
32
32
  * http://hammerjs.github.io/
33
33
  *
34
34
  * Copyright (c) 2016 Jorik Tangelder;
35
- * Licensed under the MIT license */(function(n){(function(t,e,r,i){var s=["","webkit","Moz","MS","ms","o"],a=e.createElement("div"),o="function",h=Math.round,l=Math.abs,c=Date.now;function f(g,w,$){return setTimeout(m(g,$),w)}function d(g,w,$){return Array.isArray(g)?(u(g,$[w],$),!0):!1}function u(g,w,$){var I;if(g)if(g.forEach)g.forEach(w,$);else if(g.length!==i)for(I=0;I<g.length;)w.call($,g[I],I,g),I++;else for(I in g)g.hasOwnProperty(I)&&w.call($,g[I],I,g)}function p(g,w,$){var I="DEPRECATED METHOD: "+w+`
36
- `+$+` AT
37
- `;return function(){var j=new Error("get-stack-trace"),z=j&&j.stack?j.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",X=t.console&&(t.console.warn||t.console.log);return X&&X.call(t.console,I,z),g.apply(this,arguments)}}var v;typeof Object.assign!="function"?v=function(g){if(g===i||g===null)throw new TypeError("Cannot convert undefined or null to object");for(var w=Object(g),$=1;$<arguments.length;$++){var I=arguments[$];if(I!==i&&I!==null)for(var j in I)I.hasOwnProperty(j)&&(w[j]=I[j])}return w}:v=Object.assign;var _=p(function(g,w,$){for(var I=Object.keys(w),j=0;j<I.length;)(!$||$&&g[I[j]]===i)&&(g[I[j]]=w[I[j]]),j++;return g},"extend","Use `assign`."),S=p(function(g,w){return _(g,w,!0)},"merge","Use `assign`.");function x(g,w,$){var I=w.prototype,j;j=g.prototype=Object.create(I),j.constructor=g,j._super=I,$&&v(j,$)}function m(g,w){return function(){return g.apply(w,arguments)}}function k(g,w){return typeof g==o?g.apply(w&&w[0]||i,w):g}function F(g,w){return g===i?w:g}function P(g,w,$){u(U(w),function(I){g.addEventListener(I,$,!1)})}function N(g,w,$){u(U(w),function(I){g.removeEventListener(I,$,!1)})}function R(g,w){for(;g;){if(g==w)return!0;g=g.parentNode}return!1}function L(g,w){return g.indexOf(w)>-1}function U(g){return g.trim().split(/\s+/g)}function B(g,w,$){if(g.indexOf&&!$)return g.indexOf(w);for(var I=0;I<g.length;){if($&&g[I][$]==w||!$&&g[I]===w)return I;I++}return-1}function K(g){return Array.prototype.slice.call(g,0)}function tt(g,w,$){for(var I=[],j=[],z=0;z<g.length;){var X=g[z][w];B(j,X)<0&&I.push(g[z]),j[z]=X,z++}return I=I.sort(function(et,ct){return et[w]>ct[w]}),I}function W(g,w){for(var $,I,j=w[0].toUpperCase()+w.slice(1),z=0;z<s.length;){if($=s[z],I=$?$+j:w,I in g)return I;z++}return i}var lt=1;function wt(){return lt++}function bt(g){var w=g.ownerDocument||g;return w.defaultView||w.parentWindow||t}var xt=/mobile|tablet|ip(ad|hone|od)|android/i,it="ontouchstart"in t,Y=W(t,"PointerEvent")!==i,O=it&&xt.test(navigator.userAgent),E="touch",T="pen",C="mouse",D="kinect",G=25,M=1,V=2,q=4,Z=8,nt=1,pt=2,kt=4,Ft=8,St=16,At=pt|kt,jt=Ft|St,zt=At|jt,Ot=["x","y"],le=["clientX","clientY"];function Jt(g,w){var $=this;this.manager=g,this.callback=w,this.element=g.element,this.target=g.options.inputTarget,this.domHandler=function(I){k(g.options.enable,[g])&&$.handler(I)},this.init()}Jt.prototype={handler:function(){},init:function(){this.evEl&&P(this.element,this.evEl,this.domHandler),this.evTarget&&P(this.target,this.evTarget,this.domHandler),this.evWin&&P(bt(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&N(this.element,this.evEl,this.domHandler),this.evTarget&&N(this.target,this.evTarget,this.domHandler),this.evWin&&N(bt(this.element),this.evWin,this.domHandler)}};function ue(g){var w,$=g.options.inputClass;return $?w=$:Y?w=_n:O?w=Un:it?w=J:w=Fn,new w(g,Bt)}function Bt(g,w,$){var I=$.pointers.length,j=$.changedPointers.length,z=w&M&&I-j===0,X=w&(q|Z)&&I-j===0;$.isFirst=!!z,$.isFinal=!!X,z&&(g.session={}),$.eventType=w,Fe(g,$),g.emit("hammer.input",$),g.recognize($),g.session.prevInput=$}function Fe(g,w){var $=g.session,I=w.pointers,j=I.length;$.firstInput||($.firstInput=vn(w)),j>1&&!$.firstMultiple?$.firstMultiple=vn(w):j===1&&($.firstMultiple=!1);var z=$.firstInput,X=$.firstMultiple,et=X?X.center:z.center,ct=w.center=an(I);w.timeStamp=c(),w.deltaTime=w.timeStamp-z.timeStamp,w.angle=$n(et,ct),w.distance=On(et,ct),Pe($,w),w.offsetDirection=en(w.deltaX,w.deltaY);var st=Ne(w.deltaTime,w.deltaX,w.deltaY);w.overallVelocityX=st.x,w.overallVelocityY=st.y,w.overallVelocity=l(st.x)>l(st.y)?st.x:st.y,w.scale=X?Le(X.pointers,I):1,w.rotation=X?jn(X.pointers,I):0,w.maxPointers=$.prevInput?w.pointers.length>$.prevInput.maxPointers?w.pointers.length:$.prevInput.maxPointers:w.pointers.length,Qe($,w);var rt=g.element;R(w.srcEvent.target,rt)&&(rt=w.srcEvent.target),w.target=rt}function Pe(g,w){var $=w.center,I=g.offsetDelta||{},j=g.prevDelta||{},z=g.prevInput||{};(w.eventType===M||z.eventType===q)&&(j=g.prevDelta={x:z.deltaX||0,y:z.deltaY||0},I=g.offsetDelta={x:$.x,y:$.y}),w.deltaX=j.x+($.x-I.x),w.deltaY=j.y+($.y-I.y)}function Qe(g,w){var $=g.lastInterval||w,I=w.timeStamp-$.timeStamp,j,z,X,et;if(w.eventType!=Z&&(I>G||$.velocity===i)){var ct=w.deltaX-$.deltaX,st=w.deltaY-$.deltaY,rt=Ne(I,ct,st);z=rt.x,X=rt.y,j=l(rt.x)>l(rt.y)?rt.x:rt.y,et=en(ct,st),g.lastInterval=w}else j=$.velocity,z=$.velocityX,X=$.velocityY,et=$.direction;w.velocity=j,w.velocityX=z,w.velocityY=X,w.direction=et}function vn(g){for(var w=[],$=0;$<g.pointers.length;)w[$]={clientX:h(g.pointers[$].clientX),clientY:h(g.pointers[$].clientY)},$++;return{timeStamp:c(),pointers:w,center:an(w),deltaX:g.deltaX,deltaY:g.deltaY}}function an(g){var w=g.length;if(w===1)return{x:h(g[0].clientX),y:h(g[0].clientY)};for(var $=0,I=0,j=0;j<w;)$+=g[j].clientX,I+=g[j].clientY,j++;return{x:h($/w),y:h(I/w)}}function Ne(g,w,$){return{x:w/g||0,y:$/g||0}}function en(g,w){return g===w?nt:l(g)>=l(w)?g<0?pt:kt:w<0?Ft:St}function On(g,w,$){$||($=Ot);var I=w[$[0]]-g[$[0]],j=w[$[1]]-g[$[1]];return Math.sqrt(I*I+j*j)}function $n(g,w,$){$||($=Ot);var I=w[$[0]]-g[$[0]],j=w[$[1]]-g[$[1]];return Math.atan2(j,I)*180/Math.PI}function jn(g,w){return $n(w[1],w[0],le)+$n(g[1],g[0],le)}function Le(g,w){return On(w[0],w[1],le)/On(g[0],g[1],le)}var Ln={mousedown:M,mousemove:V,mouseup:q},Zn="mousedown",ke="mousemove mouseup";function Fn(){this.evEl=Zn,this.evWin=ke,this.pressed=!1,Jt.apply(this,arguments)}x(Fn,Jt,{handler:function(g){var w=Ln[g.type];w&M&&g.button===0&&(this.pressed=!0),w&V&&g.which!==1&&(w=q),this.pressed&&(w&q&&(this.pressed=!1),this.callback(this.manager,w,{pointers:[g],changedPointers:[g],pointerType:C,srcEvent:g}))}});var fn={pointerdown:M,pointermove:V,pointerup:q,pointercancel:Z,pointerout:Z},Lr={2:E,3:T,4:C,5:D},Wn="pointerdown",vr="pointermove pointerup pointercancel";t.MSPointerEvent&&!t.PointerEvent&&(Wn="MSPointerDown",vr="MSPointerMove MSPointerUp MSPointerCancel");function _n(){this.evEl=Wn,this.evWin=vr,Jt.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}x(_n,Jt,{handler:function(g){var w=this.store,$=!1,I=g.type.toLowerCase().replace("ms",""),j=fn[I],z=Lr[g.pointerType]||g.pointerType,X=z==E,et=B(w,g.pointerId,"pointerId");j&M&&(g.button===0||X)?et<0&&(w.push(g),et=w.length-1):j&(q|Z)&&($=!0),!(et<0)&&(w[et]=g,this.callback(this.manager,j,{pointers:w,changedPointers:[g],pointerType:z,srcEvent:g}),$&&w.splice(et,1))}});var Ee={touchstart:M,touchmove:V,touchend:q,touchcancel:Z},vs="touchstart",tr="touchstart touchmove touchend touchcancel";function er(){this.evTarget=vs,this.evWin=tr,this.started=!1,Jt.apply(this,arguments)}x(er,Jt,{handler:function(g){var w=Ee[g.type];if(w===M&&(this.started=!0),!!this.started){var $=wn.call(this,g,w);w&(q|Z)&&$[0].length-$[1].length===0&&(this.started=!1),this.callback(this.manager,w,{pointers:$[0],changedPointers:$[1],pointerType:E,srcEvent:g})}}});function wn(g,w){var $=K(g.touches),I=K(g.changedTouches);return w&(q|Z)&&($=tt($.concat(I),"identifier")),[$,I]}var Ur={touchstart:M,touchmove:V,touchend:q,touchcancel:Z},nr="touchstart touchmove touchend touchcancel";function Un(){this.evTarget=nr,this.targetIds={},Jt.apply(this,arguments)}x(Un,Jt,{handler:function(g){var w=Ur[g.type],$=Gr.call(this,g,w);$&&this.callback(this.manager,w,{pointers:$[0],changedPointers:$[1],pointerType:E,srcEvent:g})}});function Gr(g,w){var $=K(g.touches),I=this.targetIds;if(w&(M|V)&&$.length===1)return I[$[0].identifier]=!0,[$,$];var j,z,X=K(g.changedTouches),et=[],ct=this.target;if(z=$.filter(function(st){return R(st.target,ct)}),w===M)for(j=0;j<z.length;)I[z[j].identifier]=!0,j++;for(j=0;j<X.length;)I[X[j].identifier]&&et.push(X[j]),w&(q|Z)&&delete I[X[j].identifier],j++;if(et.length)return[tt(z.concat(et),"identifier"),et]}var zr=2500,H=25;function J(){Jt.apply(this,arguments);var g=m(this.handler,this);this.touch=new Un(this.manager,g),this.mouse=new Fn(this.manager,g),this.primaryTouch=null,this.lastTouches=[]}x(J,Jt,{handler:function(g,w,$){var I=$.pointerType==E,j=$.pointerType==C;if(!(j&&$.sourceCapabilities&&$.sourceCapabilities.firesTouchEvents)){if(I)Q.call(this,w,$);else if(j&&ot.call(this,$))return;this.callback(g,w,$)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});function Q(g,w){g&M?(this.primaryTouch=w.changedPointers[0].identifier,at.call(this,w)):g&(q|Z)&&at.call(this,w)}function at(g){var w=g.changedPointers[0];if(w.identifier===this.primaryTouch){var $={x:w.clientX,y:w.clientY};this.lastTouches.push($);var I=this.lastTouches,j=function(){var z=I.indexOf($);z>-1&&I.splice(z,1)};setTimeout(j,zr)}}function ot(g){for(var w=g.srcEvent.clientX,$=g.srcEvent.clientY,I=0;I<this.lastTouches.length;I++){var j=this.lastTouches[I],z=Math.abs(w-j.x),X=Math.abs($-j.y);if(z<=H&&X<=H)return!0}return!1}var Mt=W(a.style,"touchAction"),Nt=Mt!==i,re="compute",Ce="auto",he="manipulation",Yt="none",Qt="pan-x",fe="pan-y",Ut=Ue();function It(g,w){this.manager=g,this.set(w)}It.prototype={set:function(g){g==re&&(g=this.compute()),Nt&&this.manager.element.style&&Ut[g]&&(this.manager.element.style[Mt]=g),this.actions=g.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var g=[];return u(this.manager.recognizers,function(w){k(w.options.enable,[w])&&(g=g.concat(w.getTouchAction()))}),pe(g.join(" "))},preventDefaults:function(g){var w=g.srcEvent,$=g.offsetDirection;if(this.manager.session.prevented){w.preventDefault();return}var I=this.actions,j=L(I,Yt)&&!Ut[Yt],z=L(I,fe)&&!Ut[fe],X=L(I,Qt)&&!Ut[Qt];if(j){var et=g.pointers.length===1,ct=g.distance<2,st=g.deltaTime<250;if(et&&ct&&st)return}if(!(X&&z)&&(j||z&&$&At||X&&$&jt))return this.preventSrc(w)},preventSrc:function(g){this.manager.session.prevented=!0,g.preventDefault()}};function pe(g){if(L(g,Yt))return Yt;var w=L(g,Qt),$=L(g,fe);return w&&$?Yt:w||$?w?Qt:fe:L(g,he)?he:Ce}function Ue(){if(!Nt)return!1;var g={},w=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function($){g[$]=w?t.CSS.supports("touch-action",$):!0}),g}var xn=1,_e=2,Ge=4,qe=8,ze=qe,Re=16,ae=32;function Lt(g){this.options=v({},this.defaults,g||{}),this.id=wt(),this.manager=null,this.options.enable=F(this.options.enable,!0),this.state=xn,this.simultaneous={},this.requireFail=[]}Lt.prototype={defaults:{},set:function(g){return v(this.options,g),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(g){if(d(g,"recognizeWith",this))return this;var w=this.simultaneous;return g=ir(g,this),w[g.id]||(w[g.id]=g,g.recognizeWith(this)),this},dropRecognizeWith:function(g){return d(g,"dropRecognizeWith",this)?this:(g=ir(g,this),delete this.simultaneous[g.id],this)},requireFailure:function(g){if(d(g,"requireFailure",this))return this;var w=this.requireFail;return g=ir(g,this),B(w,g)===-1&&(w.push(g),g.requireFailure(this)),this},dropRequireFailure:function(g){if(d(g,"dropRequireFailure",this))return this;g=ir(g,this);var w=B(this.requireFail,g);return w>-1&&this.requireFail.splice(w,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(g){return!!this.simultaneous[g.id]},emit:function(g){var w=this,$=this.state;function I(j){w.manager.emit(j,g)}$<qe&&I(w.options.event+on($)),I(w.options.event),g.additionalEvent&&I(g.additionalEvent),$>=qe&&I(w.options.event+on($))},tryEmit:function(g){if(this.canEmit())return this.emit(g);this.state=ae},canEmit:function(){for(var g=0;g<this.requireFail.length;){if(!(this.requireFail[g].state&(ae|xn)))return!1;g++}return!0},recognize:function(g){var w=v({},g);if(!k(this.options.enable,[this,w])){this.reset(),this.state=ae;return}this.state&(ze|Re|ae)&&(this.state=xn),this.state=this.process(w),this.state&(_e|Ge|qe|Re)&&this.tryEmit(w)},process:function(g){},getTouchAction:function(){},reset:function(){}};function on(g){return g&Re?"cancel":g&qe?"end":g&Ge?"move":g&_e?"start":""}function rr(g){return g==St?"down":g==Ft?"up":g==pt?"left":g==kt?"right":""}function ir(g,w){var $=w.manager;return $?$.get(g):g}function Ze(){Lt.apply(this,arguments)}x(Ze,Lt,{defaults:{pointers:1},attrTest:function(g){var w=this.options.pointers;return w===0||g.pointers.length===w},process:function(g){var w=this.state,$=g.eventType,I=w&(_e|Ge),j=this.attrTest(g);return I&&($&Z||!j)?w|Re:I||j?$&q?w|qe:w&_e?w|Ge:_e:ae}});function Ke(){Ze.apply(this,arguments),this.pX=null,this.pY=null}x(Ke,Ze,{defaults:{event:"pan",threshold:10,pointers:1,direction:zt},getTouchAction:function(){var g=this.options.direction,w=[];return g&At&&w.push(fe),g&jt&&w.push(Qt),w},directionTest:function(g){var w=this.options,$=!0,I=g.distance,j=g.direction,z=g.deltaX,X=g.deltaY;return j&w.direction||(w.direction&At?(j=z===0?nt:z<0?pt:kt,$=z!=this.pX,I=Math.abs(g.deltaX)):(j=X===0?nt:X<0?Ft:St,$=X!=this.pY,I=Math.abs(g.deltaY))),g.direction=j,$&&I>w.threshold&&j&w.direction},attrTest:function(g){return Ze.prototype.attrTest.call(this,g)&&(this.state&_e||!(this.state&_e)&&this.directionTest(g))},emit:function(g){this.pX=g.deltaX,this.pY=g.deltaY;var w=rr(g.direction);w&&(g.additionalEvent=this.options.event+w),this._super.emit.call(this,g)}});function bn(){Ze.apply(this,arguments)}x(bn,Ze,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Yt]},attrTest:function(g){return this._super.attrTest.call(this,g)&&(Math.abs(g.scale-1)>this.options.threshold||this.state&_e)},emit:function(g){if(g.scale!==1){var w=g.scale<1?"in":"out";g.additionalEvent=this.options.event+w}this._super.emit.call(this,g)}});function Vr(){Lt.apply(this,arguments),this._timer=null,this._input=null}x(Vr,Lt,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Ce]},process:function(g){var w=this.options,$=g.pointers.length===w.pointers,I=g.distance<w.threshold,j=g.deltaTime>w.time;if(this._input=g,!I||!$||g.eventType&(q|Z)&&!j)this.reset();else if(g.eventType&M)this.reset(),this._timer=f(function(){this.state=ze,this.tryEmit()},w.time,this);else if(g.eventType&q)return ze;return ae},reset:function(){clearTimeout(this._timer)},emit:function(g){this.state===ze&&(g&&g.eventType&q?this.manager.emit(this.options.event+"up",g):(this._input.timeStamp=c(),this.manager.emit(this.options.event,this._input)))}});function Br(){Ze.apply(this,arguments)}x(Br,Ze,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Yt]},attrTest:function(g){return this._super.attrTest.call(this,g)&&(Math.abs(g.rotation)>this.options.threshold||this.state&_e)}});function Gn(){Ze.apply(this,arguments)}x(Gn,Ze,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:At|jt,pointers:1},getTouchAction:function(){return Ke.prototype.getTouchAction.call(this)},attrTest:function(g){var w=this.options.direction,$;return w&(At|jt)?$=g.overallVelocity:w&At?$=g.overallVelocityX:w&jt&&($=g.overallVelocityY),this._super.attrTest.call(this,g)&&w&g.offsetDirection&&g.distance>this.options.threshold&&g.maxPointers==this.options.pointers&&l($)>this.options.velocity&&g.eventType&q},emit:function(g){var w=rr(g.offsetDirection);w&&this.manager.emit(this.options.event+w,g),this.manager.emit(this.options.event,g)}});function zn(){Lt.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}x(zn,Lt,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[he]},process:function(g){var w=this.options,$=g.pointers.length===w.pointers,I=g.distance<w.threshold,j=g.deltaTime<w.time;if(this.reset(),g.eventType&M&&this.count===0)return this.failTimeout();if(I&&j&&$){if(g.eventType!=q)return this.failTimeout();var z=this.pTime?g.timeStamp-this.pTime<w.interval:!0,X=!this.pCenter||On(this.pCenter,g.center)<w.posThreshold;this.pTime=g.timeStamp,this.pCenter=g.center,!X||!z?this.count=1:this.count+=1,this._input=g;var et=this.count%w.taps;if(et===0)return this.hasRequireFailures()?(this._timer=f(function(){this.state=ze,this.tryEmit()},w.interval,this),_e):ze}return ae},failTimeout:function(){return this._timer=f(function(){this.state=ae},this.options.interval,this),ae},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==ze&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}});function sr(g,w){return w=w||{},w.recognizers=F(w.recognizers,sr.defaults.preset),new Bi(g,w)}sr.VERSION="2.0.7",sr.defaults={domEvents:!1,touchAction:re,enable:!0,inputTarget:null,inputClass:null,preset:[[Br,{enable:!1}],[bn,{enable:!1},["rotate"]],[Gn,{direction:At}],[Ke,{direction:At},["swipe"]],[zn],[zn,{event:"doubletap",taps:2},["tap"]],[Vr]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var Vi=1,Ye=2;function Bi(g,w){this.options=v({},sr.defaults,w||{}),this.options.inputTarget=this.options.inputTarget||g,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=g,this.input=ue(this),this.touchAction=new It(this,this.options.touchAction),y(this,!0),u(this.options.recognizers,function($){var I=this.add(new $[0]($[1]));$[2]&&I.recognizeWith($[2]),$[3]&&I.requireFailure($[3])},this)}Bi.prototype={set:function(g){return v(this.options,g),g.touchAction&&this.touchAction.update(),g.inputTarget&&(this.input.destroy(),this.input.target=g.inputTarget,this.input.init()),this},stop:function(g){this.session.stopped=g?Ye:Vi},recognize:function(g){var w=this.session;if(!w.stopped){this.touchAction.preventDefaults(g);var $,I=this.recognizers,j=w.curRecognizer;(!j||j&&j.state&ze)&&(j=w.curRecognizer=null);for(var z=0;z<I.length;)$=I[z],w.stopped!==Ye&&(!j||$==j||$.canRecognizeWith(j))?$.recognize(g):$.reset(),!j&&$.state&(_e|Ge|qe)&&(j=w.curRecognizer=$),z++}},get:function(g){if(g instanceof Lt)return g;for(var w=this.recognizers,$=0;$<w.length;$++)if(w[$].options.event==g)return w[$];return null},add:function(g){if(d(g,"add",this))return this;var w=this.get(g.options.event);return w&&this.remove(w),this.recognizers.push(g),g.manager=this,this.touchAction.update(),g},remove:function(g){if(d(g,"remove",this))return this;if(g=this.get(g),g){var w=this.recognizers,$=B(w,g);$!==-1&&(w.splice($,1),this.touchAction.update())}return this},on:function(g,w){if(g!==i&&w!==i){var $=this.handlers;return u(U(g),function(I){$[I]=$[I]||[],$[I].push(w)}),this}},off:function(g,w){if(g!==i){var $=this.handlers;return u(U(g),function(I){w?$[I]&&$[I].splice(B($[I],w),1):delete $[I]}),this}},emit:function(g,w){this.options.domEvents&&b(g,w);var $=this.handlers[g]&&this.handlers[g].slice();if(!(!$||!$.length)){w.type=g,w.preventDefault=function(){w.srcEvent.preventDefault()};for(var I=0;I<$.length;)$[I](w),I++}},destroy:function(){this.element&&y(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}};function y(g,w){var $=g.element;if($.style){var I;u(g.options.cssProps,function(j,z){I=W($.style,z),w?(g.oldCssProps[I]=$.style[I],$.style[I]=j):$.style[I]=g.oldCssProps[I]||""}),w||(g.oldCssProps={})}}function b(g,w){var $=e.createEvent("Event");$.initEvent(g,!0,!0),$.gesture=w,w.target.dispatchEvent($)}v(sr,{INPUT_START:M,INPUT_MOVE:V,INPUT_END:q,INPUT_CANCEL:Z,STATE_POSSIBLE:xn,STATE_BEGAN:_e,STATE_CHANGED:Ge,STATE_ENDED:qe,STATE_RECOGNIZED:ze,STATE_CANCELLED:Re,STATE_FAILED:ae,DIRECTION_NONE:nt,DIRECTION_LEFT:pt,DIRECTION_RIGHT:kt,DIRECTION_UP:Ft,DIRECTION_DOWN:St,DIRECTION_HORIZONTAL:At,DIRECTION_VERTICAL:jt,DIRECTION_ALL:zt,Manager:Bi,Input:Jt,TouchAction:It,TouchInput:Un,MouseInput:Fn,PointerEventInput:_n,TouchMouseInput:J,SingleTouchInput:er,Recognizer:Lt,AttrRecognizer:Ze,Tap:zn,Pan:Ke,Swipe:Gn,Pinch:bn,Rotate:Br,Press:Vr,on:P,off:N,each:u,merge:S,extend:_,assign:v,inherit:x,bindFn:m,prefixed:W});var A=typeof t<"u"?t:typeof self<"u"?self:{};A.Hammer=sr,n.exports?n.exports=sr:t[r]=sr})(window,document,"Hammer")})(z8);const pg=[1,0,0,1,0,0],gg=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];class cn{constructor(t=pg){Tt(this,"value");Tt(this,"matrix3d");Tt(this,"isEverTo3d",!1);Tt(this,"_prev_rotatex",0);Tt(this,"_prev_rotatey",0);this.value=Array.from(t),this.matrix3d=this.toMatrix3D()}unit(){return this.value=Array.from(pg),this.matrix3d=this.toMatrix3D(),this}transformPoint(t,e,r=0,i=0){const s=t-r,a=e-i;return t=s*this.value[0]+a*this.value[2]+this.value[4],e=s*this.value[1]+a*this.value[3]+this.value[5],[t+r,e+i]}fromString(t){const e=sf("number",t);return e.length===6?e.forEach((r,i)=>{r.fullMatch&&(this.value[i]=parseFloat(r.fullMatch))}):this.unit(),this}toMatrix3D(t=this.matrix3d){const e=[this.value[0],this.value[1],0,0,this.value[2],this.value[3],0,0,0,0,1,0,this.value[4],this.value[5],0,1];return t?(t.value=e,t):new Wi(e)}offset(t=0,e=0){return[t-this.value[4],e-this.value[5]]}clone(){return new cn(this.value)}multiply(t){const e=this.value;let r;t instanceof cn?r=t.value:r=t;const i=e[0]*r[0]+e[2]*r[1],s=e[1]*r[0]+e[3]*r[1],a=e[0]*r[2]+e[2]*r[3],o=e[1]*r[2]+e[3]*r[3],h=e[0]*r[4]+e[2]*r[5]+e[4],l=e[1]*r[4]+e[3]*r[5]+e[5];return e[0]=i,e[1]=s,e[2]=a,e[3]=o,e[4]=h,e[5]=l,this}inverse(){const t=new cn(this.value),e=t.value,r=1/(e[0]*e[3]-e[1]*e[2]),i=e[3]*r,s=-e[1]*r,a=-e[2]*r,o=e[0]*r,h=r*(e[2]*e[5]-e[3]*e[4]),l=r*(e[1]*e[4]-e[0]*e[5]);return e[0]=i,e[1]=s,e[2]=a,e[3]=o,e[4]=h,e[5]=l,t}translate(t,e){return this.matrix3d.translate(t,e,0),this.multiply([1,0,0,1,t,e])}translateTo(t,e){const r=this.offset(t,e);return this.translate(r[0],r[1])}translateX(t){return this.translate(t,0)}translateY(t){return this.translate(0,t)}translateZ(t){return this.isEverTo3d=!0,this.matrix3d.translate(0,0,t)}translate3d(t,e,r){return this.isEverTo3d=!0,this.matrix3d.translate(t,e,r)}rotate(t,e=0,r=0){const i=Hc(t),s=+Math.cos(i).toFixed(9),a=+Math.sin(i).toFixed(9);return this.multiply([s,a,-a,s,e,r]),this.translate(-e,-r),this}rotateX(t){return this._prev_rotatex=t,this.isEverTo3d=!0,this.matrix3d.rotate("x",t)}rotateXTo(t){return this.rotateX(t-this._prev_rotatex)}rotateY(t){return this._prev_rotatey=t,this.isEverTo3d=!0,this.matrix3d.rotate("y",t)}rotateYTo(t){return this.rotateY(t-this._prev_rotatey)}rotateZ(t){return this.isEverTo3d=!0,this.matrix3d.rotate("z",t)}rotate3d(t,e,r){return this.isEverTo3d=!0,this.matrix3d.rotate("x",t).rotate("y",e).rotate("z",r)}scale(t,e=t,r=0,i=0){return this.matrix3d.scale(t,e,1),this.translate(r,i),this.multiply([t,0,0,e,0,0]),this.translate(-r,-i),this}scaleTo(t,e=t){return this.scale(t/this.value[0],e/this.value[3]),this}scaleX(t){return this.scale(t,1)}scaleY(t){return this.scale(1,t)}scaleZ(t){return this.isEverTo3d=!0,this.matrix3d.scale(1,1,t)}scale3d(t,e,r){return this.isEverTo3d=!0,this.matrix3d.scale(t,e,r)}skew(t,e=0){const r=t*Math.PI/180,i=e*Math.PI/180,s=Math.tan(r),a=Math.tan(i);return this.multiply([1,a,s,1,0,0])}skewX(t){return this.skew(t,0)}skewY(t){return this.skew(0,t)}skewZ(t){return this}skew3d(t,e,r){return this}split(){const t={dx:0,dy:0,scalex:1,scaley:1,shear:1,rotate:0,isSimple:!0,isSuperSimple:!0,noRotation:!1};t.dx=this.value[4],t.dy=this.value[5];const e=[[this.value[0],this.value[2]],[this.value[1],this.value[3]]];t.scalex=Math.sqrt(qc(e[0])),fg(e[0]),t.shear=e[0][0]*e[1][0]+e[0][1]*e[1][1],e[1]=[e[1][0]-e[0][0]*t.shear,e[1][1]-e[0][1]*t.shear],t.scaley=Math.sqrt(qc(e[1])),fg(e[1]),t.shear/=t.scaley;const r=-e[0][1],i=e[1][1];return i<0?(t.rotate=j8(Math.acos(i)),r<0&&(t.rotate=360-t.rotate)):t.rotate=Hc(Math.asin(r)),t.isSimple=!+t.shear.toFixed(9)&&(t.scalex.toFixed(9)==t.scaley.toFixed(9)||!t.rotate),t.isSuperSimple=!+t.shear.toFixed(9)&&t.scalex.toFixed(9)==t.scaley.toFixed(9)&&!t.rotate,t.noRotation=!+t.shear.toFixed(9)&&!t.rotate,t}toTransformString(){const t=this.split();return t.isSimple?(t.scalex=+t.scalex.toFixed(4),t.scaley=+t.scaley.toFixed(4),t.rotate=+t.rotate.toFixed(4),(t.dx&&t.dy?"t"+[t.dx,t.dy]:"")+(t.scalex!=1||t.scaley!=1?"s"+[t.scalex,t.scaley,0,0]:"")+(t.rotate?"r"+[t.rotate,0,0]:"")):"matrix"+[this.value[0],this.value[1],this.value[2],this.value[3],this.value[4],this.value[5]]}toString(){return this.isEverTo3d?this.toMatrix3DString():`matrix(${this.value.map(t=>of(t,6)).join(",")})`}toMatrix3DString(){return this.matrix3d.toString()}toFilter(){return"progid:DXImageTransform.Microsoft.Matrix(M11="+this.value[0]+", M12="+this.value[2]+", M21="+this.value[1]+", M22="+this.value[3]+", Dx="+this.value[4]+", Dy="+this.value[5]+", sizingmethod='auto expand')"}}class Wi{constructor(t=gg){Tt(this,"value");this.value=Array.from(t)}unit(){return this.value=Array.from(gg),this}fromString(t){const e=sf("number",t);return e.length===16?e.forEach((r,i)=>{r.fullMatch&&(this.value[i]=parseFloat(r.fullMatch))}):this.unit(),this}toMatrix(t){const e=[this.value[0],this.value[1],this.value[4],this.value[5],this.value[12],this.value[13]];return t?(t.value=e,t):new cn(e)}multiplyMatrix(t){const e=this.value[0],r=this.value[1],i=this.value[2],s=this.value[3],a=this.value[4],o=this.value[5],h=this.value[6],l=this.value[7],c=this.value[8],f=this.value[9],d=this.value[10],u=this.value[11],p=this.value[12],v=this.value[13],_=this.value[14],S=this.value[15],x=t.value[0],m=t.value[1],k=t.value[2],F=t.value[3],P=x*e+m*a+k*c+F*p,N=x*r+m*o+k*f+F*v,R=x*i+m*h+k*d+F*_,L=x*s+m*l+k*u+F*S;return new cn([P,N,R,L,0,0])}multiply(t){const e=new cn([t.value[0],t.value[1],t.value[2],t.value[3],0,0]),r=new cn([t.value[4],t.value[5],t.value[6],t.value[7],0,0]),i=new cn([t.value[8],t.value[9],t.value[10],t.value[11],0,0]),s=new cn([t.value[12],t.value[13],t.value[14],t.value[15],0,0]),a=this.multiplyMatrix(e),o=this.multiplyMatrix(r),h=this.multiplyMatrix(i),l=this.multiplyMatrix(s);return this.value[0]=a.value[0],this.value[1]=a.value[1],this.value[2]=a.value[2],this.value[3]=a.value[3],this.value[4]=o.value[0],this.value[5]=o.value[1],this.value[6]=o.value[2],this.value[7]=o.value[3],this.value[8]=h.value[0],this.value[9]=h.value[1],this.value[10]=h.value[2],this.value[11]=h.value[3],this.value[12]=l.value[0],this.value[13]=l.value[1],this.value[14]=l.value[2],this.value[15]=l.value[3],this}translate(t=0,e=0,r=0){return this.multiply(new Wi([1,0,0,0,0,1,0,0,0,0,1,0,t,e,r,1]))}scale(t=1,e=1,r=1){return this.multiply(new Wi([t,0,0,0,0,e,0,0,0,0,r,0,0,0,0,1]))}rotate(t,e){const r=Hc(e),i=Math.sin,s=Math.cos;let a;switch(t){case"x":a=[1,0,0,0,0,s(r),i(r),0,0,-i(r),s(r),0,0,0,0,1];break;case"y":a=[s(r),0,-i(r),0,0,1,0,0,i(r),0,s(r),0,0,0,0,1];break;case"z":a=[s(r),i(r),0,0,-i(r),s(r),0,0,0,0,1,0,0,0,0,1];break}return this.multiply(new Wi(a))}toString(){return`matrix3d(${this.value.map(t=>of(t,6)).join(",")})`}}function mg(n){const t=new cn;return n.replace(/([a-z0-9]+)\s*\(?\s*((-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)*[a-z%]*\s*,?\s*)+)\)?/gi,function(e,r,i){i.indexOf(",")>=0?i=i.split(/\s*,\s*/):i=i.split(/\s+/);const s=[];for(let a=0,o=i.length;a<o;a++)i[a].trim()&&s.push(parseFloat(""+i[a]));switch(r.toLowerCase()){case"t":case"translate":t.translate(s[0],s[1]);break;case"translatex":t.translateX(s[0]);break;case"translatey":t.translateY(s[0]);break;case"translatez":t.translateZ(s[0]);break;case"translate3d":t.translate3d(s[0],s[1],s[2]);break;case"r":case"rotate":t.rotate(s[0],s[1]??0,s[2]??0);break;case"rotatex":t.rotateX(s[0]);break;case"rotatey":t.rotateY(s[0]);break;case"rotatez":t.rotateZ(s[0]);break;case"rotate3d":t.rotate3d(s[0],s[1],s[2]);break;case"s":case"scale":t.scale(s[0],s[1]??s[0]);break;case"scalex":t.scaleX(s[0]);break;case"scaley":t.scaleY(s[0]);break;case"scalez":t.scaleZ(s[0]);break;case"scale3d":t.scale3d(s[0],s[1],s[2]);break;case"skew":t.skew(s[0],s[1]??0);break;case"skewx":t.skewX(s[0]);break;case"skewy":t.skewY(s[0]);break;case"skewz":t.skewZ(s[0]);break;case"skew3d":t.skew3d(s[0],s[1],s[2]);break;case"m":case"matrix":t.multiply([s[0],s[1],s[2],s[3],s[4],s[5]]);break;case"matrix3d":t.matrix3d.multiply(new Wi(s));break}return""}),t}function V8(n){return typeof n!="string"?!1:(n=n.trim(),/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(n)&&/[\dz]$/i.test(n)&&n.length>4)}const Yc={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},B8=/([astvzqmhlc])([^astvzqmhlc]*)/gi,H8=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;function q8(n){const t=n.match(H8);return t?t.map(Number):[]}function Xc(n){const t=[];return n.replace(B8,function(e,r,i){let s=r.toLowerCase();for(i=q8(i),s=="m"&&i.length>2&&(t.push([r].concat(i.splice(0,2))),s="l",r=r=="m"?"l":"L");;){if(i.length==Yc[s])return i.unshift(r),t.push(i);if(i.length<Yc[s])throw new Error("malformed path data");t.push([r].concat(i.splice(0,Yc[s])))}}),t}function Jc(n){var t=0,e=0,r=0,i=0;return n.map(function(s){s=s.slice();var a=s[0],o=a.toUpperCase();if(a!=o)switch(s[0]=o,a){case"a":s[6]+=r,s[7]+=i;break;case"v":s[1]+=i;break;case"h":s[1]+=r;break;default:for(var h=1;h<s.length;)s[h++]+=r,s[h++]+=i}switch(o){case"Z":r=t,i=e;break;case"H":r=s[1];break;case"V":i=s[1];break;case"M":r=t=s[1],i=e=s[2];break;default:r=s[s.length-2],i=s[s.length-1]}return s})}const Ys=Math.PI*2;function yg(n,t,e,r){const i=n*r-t*e<0?-1:1;let s=n*e+t*r;return s>1&&(s=1),s<-1&&(s=-1),i*Math.acos(s)}function K8(n,t,e,r,i,s,a,o,h,l){const c=l*(n-e)/2+h*(t-r)/2,f=-h*(n-e)/2+l*(t-r)/2,d=a*a,u=o*o,p=c*c,v=f*f;let _=d*u-d*v-u*p;_<0&&(_=0),_/=d*v+u*p,_=Math.sqrt(_)*(i===s?-1:1);const S=_*a/o*f,x=_*-o/a*c,m=l*S-h*x+(n+e)/2,k=h*S+l*x+(t+r)/2,F=(c-S)/a,P=(f-x)/o,N=(-c-S)/a,R=(-f-x)/o,L=yg(1,0,F,P);let U=yg(F,P,N,R);return s===0&&U>0&&(U-=Ys),s===1&&U<0&&(U+=Ys),[m,k,L,U]}function Y8(n,t){const e=1.3333333333333333*Math.tan(t/4),r=Math.cos(n),i=Math.sin(n),s=Math.cos(n+t),a=Math.sin(n+t);return[r,i,r-i*e,i+r*e,s+a*e,a-s*e,s,a]}function X8(n,t,e,r,i,s,a,o,h){const l=Math.sin(h*Ys/360),c=Math.cos(h*Ys/360),f=c*(n-e)/2+l*(t-r)/2,d=-l*(n-e)/2+c*(t-r)/2;if(f===0&&d===0)return[];if(a===0||o===0)return[];a=Math.abs(a),o=Math.abs(o);const u=f*f/(a*a)+d*d/(o*o);u>1&&(a*=Math.sqrt(u),o*=Math.sqrt(u));const p=K8(n,t,e,r,i,s,a,o,l,c),v=[];let _=p[2],S=p[3];const x=Math.max(Math.ceil(Math.abs(S)/(Ys/4)),1);S/=x;for(let m=0;m<x;m++)v.push(Y8(_,S)),_+=S;return v.map(m=>{for(let k=0;k<m.length;k+=2){let F=m[k+0],P=m[k+1];F*=a,P*=o;const N=c*F-l*P,R=l*F+c*P;m[k+0]=N+p[0],m[k+1]=R+p[1]}return m})}function Qc(n){for(var t,e=[],r=0,i=0,s=0,a=0,o=null,h=null,l=0,c=0,f=0,d=n.length;f<d;f++){var u=n[f],p=u[0];switch(p){case"M":s=u[1],a=u[2];break;case"A":var v=X8(l,c,u[6],u[7],u[4],u[5],u[1],u[2],u[3]);if(!v.length)continue;v=v.map(k=>{const[F,P,N,R,L,U,B,K]=k;return{x1:N,y1:R,x2:L,y2:U,x:B,y:K}});for(var _=0,S;_<v.length;_++)S=v[_],u=["C",S.x1,S.y1,S.x2,S.y2,S.x,S.y],_<v.length-1&&e.push(u);break;case"S":var x=l,m=c;(t=="C"||t=="S")&&(x+=x-r,m+=m-i),u=["C",x,m,u[1],u[2],u[3],u[4]];break;case"T":t=="Q"||t=="T"?(o=l*2-o,h=c*2-h):(o=l,h=c),u=vg(l,c,o,h,u[1],u[2]);break;case"Q":o=u[1],h=u[2],u=vg(l,c,u[1],u[2],u[3],u[4]);break;case"L":u=tl(l,c,u[1],u[2]);break;case"H":u=tl(l,c,u[1],c);break;case"V":u=tl(l,c,l,u[1]);break;case"Z":u=tl(l,c,s,a);break}t=p,l=u[u.length-2],c=u[u.length-1],u.length>4?(r=u[u.length-4],i=u[u.length-3]):(r=l,i=c),e.push(u)}return e}function tl(n,t,e,r){return["C",n,t,e,r,e,r]}function vg(n,t,e,r,i,s){return["C",n/3+2/3*e,t/3+2/3*r,i/3+2/3*e,s/3+2/3*r,i,s]}const J8=n=>Array.isArray(n);function ts(n){if(!(this instanceof ts))return new ts(n);this._path=J8(n)?n:Xc(n),this._path=Jc(this._path),this._path=Z8(this._path),this._path=Q8(this._path)}ts.prototype.at=function(n,t){return this._walk(n,t).pos},ts.prototype.length=function(){return this._walk(null).length},ts.prototype._walk=function(n,t){let e=[0,0],r=[0,0,0],i=[0,0],s=0;for(let c=0;c<this._path.length;c++){let f=this._path[c];if(f[0]==="M"){if(e[0]=f[1],e[1]=f[2],n===0)return{length:s,pos:e}}else if(f[0]==="C"){r[0]=i[0]=e[0],r[1]=i[1]=e[1],r[2]=s;let d=100;for(let u=0;u<=d;u++){let p=u/d,v=a(f,p),_=o(f,p);if(s+=Zc(e[0],e[1],v,_),e[0]=v,e[1]=_,typeof n=="number"&&s>=n){let S=(s-n)/(s-r[2]),x=[e[0]*(1-S)+r[0]*S,e[1]*(1-S)+r[1]*S];return{length:s,pos:x}}r[0]=e[0],r[1]=e[1],r[2]=s}}else if(f[0]==="Q"){r[0]=i[0]=e[0],r[1]=i[1]=e[1],r[2]=s;let d=100;for(let u=0;u<=d;u++){let p=u/d,v=h(f,p),_=l(f,p);if(s+=Zc(e[0],e[1],v,_),e[0]=v,e[1]=_,typeof n=="number"&&s>=n){let S=(s-n)/(s-r[2]),x=[e[0]*(1-S)+r[0]*S,e[1]*(1-S)+r[1]*S];return{length:s,pos:x}}r[0]=e[0],r[1]=e[1],r[2]=s}}else if(f[0]==="L"){if(r[0]=e[0],r[1]=e[1],r[2]=s,s+=Zc(e[0],e[1],f[1],f[2]),e[0]=f[1],e[1]=f[2],typeof n=="number"&&s>=n){let d=(s-n)/(s-r[2]),u=[e[0]*(1-d)+r[0]*d,e[1]*(1-d)+r[1]*d];return{length:s,pos:u}}r[0]=e[0],r[1]=e[1],r[2]=s}}return{length:s,pos:e};function a(c,f){return Math.pow(1-f,3)*i[0]+3*Math.pow(1-f,2)*f*c[1]+3*(1-f)*Math.pow(f,2)*c[3]+Math.pow(f,3)*c[5]}function o(c,f){return Math.pow(1-f,3)*i[1]+3*Math.pow(1-f,2)*f*c[2]+3*(1-f)*Math.pow(f,2)*c[4]+Math.pow(f,3)*c[6]}function h(c,f){return Math.pow(1-f,2)*i[0]+2*(1-f)*f*c[1]+Math.pow(f,2)*c[3]}function l(c,f){return Math.pow(1-f,2)*i[1]+2*(1-f)*f*c[2]+Math.pow(f,2)*c[4]}};function Zc(n,t,e,r){let i=n-e,s=t-r;return Math.sqrt(i*i+s*s)}function Q8(n){let t,e=0,r=0,i={S:{to:"C",x:3},T:{to:"Q",x:1}};for(let s=0,a=n.length;s<a;s++){let o=n[s],h=i[o[0]];h&&(o[0]=h.to,t&&(t[0]===h.to?(e=2*t[h.x+2]-t[h.x],r=2*t[h.x+3]-t[h.x+1]):(e=t[t.length-2],r=t[t.length-1])),o.splice(1,0,e,r)),t=o}return n}function Z8(n){let t=[],e=["L",0,0],r;for(let i=0,s=n.length;i<s;i++){let a=n[i];switch(a[0]){case"M":e=["L",a[1],a[2]],t.push(a);break;case"Z":t.push(e);break;case"H":r=t[t.length-1]||["L",0,0],t.push(["L",a[1],r[r.length-1]]);break;case"V":r=t[t.length-1]||["L",0,0],t.push(["L",r[r.length-2],a[1]]);break;default:t.push(a)}}return t}const Wc=n=>{if(typeof n=="function"||Object(n)!==n)return n;const t=new n.constructor;for(const e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=Wc(n[e]));return t};function tu(n){const t=tu.ps=tu.ps||{};return t[n]?t[n].sleep=100:t[n]={sleep:100},setTimeout(()=>{for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&e!==n&&(t[e].sleep--,t[e].sleep||delete t[e])}),t[n]}function Xs(n,t,e,r){return n==null&&(n=t=e=r=0),t==null&&(t=n.y,e=n.width,r=n.height,n=n.x),{x:n,y:t,width:e,w:e,height:r,h:r,x2:n+e,y2:t+r,cx:n+e/2,cy:t+r/2,r1:Math.min(e,r)/2,r2:Math.max(e,r)/2,r0:Math.sqrt(e*e+r*r)/2,path:sS(n,t,e,r),vb:[n,t,e,r].join(" ")}}function _g(n,t,e,r,i,s,a,o,h){const l=1-h,c=l**3,f=l**2,d=h*h,u=d*h,p=c*n+f*3*h*e+l*3*h*h*i+u*a,v=c*t+f*3*h*r+l*3*h*h*s+u*o,_=n+2*h*(e-n)+d*(i-2*e+n),S=t+2*h*(r-t)+d*(s-2*r+t),x=e+2*h*(i-e)+d*(a-2*i+e),m=r+2*h*(s-r)+d*(o-2*s+r),k=l*n+h*e,F=l*t+h*r,P=l*i+h*a,N=l*s+h*o,R=90-Math.atan2(_-x,S-m)*180/Math.PI;return{x:p,y:v,m:{x:_,y:S},n:{x,y:m},start:{x:k,y:F},end:{x:P,y:N},alpha:R}}function wg(n,t,e,r,i,s,a,o){Array.isArray(n)||(n=[n,t,e,r,i,s,a,o]);const h=Sg(...n);return Xs(h.min.x,h.min.y,h.max.x-h.min.x,h.max.y-h.min.y)}function W8(n,t,e){return t>=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height}function tS(n,t){n=Xs(n),t=Xs(t);const{x:e,y:r,width:i,height:s}=n,{x:a,y:o,width:h,height:l}=t,c=e+i/2,f=r+s/2,d=a+h/2,u=o+l/2;return Math.abs(c-d)<=(i+h)/2||Math.abs(f-u)<=(s+l)/2}function xg(n,t,e,r,i){const s=-3*t+9*e-9*r+3*i,a=n*s+6*t-12*e+6*r;return n*a-3*t+3*e}function bg(n,t,e,r,i,s,a,o,h){h==null&&(h=1),h=Math.max(0,Math.min(h,1));const l=h/2,c=12,f=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],d=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472];let u=0;for(let p=0;p<c;p++){const v=l*f[p]+l,_=xg(v,n,e,i,a),S=xg(v,t,r,s,o),x=_*_+S*S;u+=d[p]*Math.sqrt(x)}return l*u}function eS(n,t,e,r,i,s,a,o){if(Math.max(n,e)<Math.min(i,a)||Math.min(n,e)>Math.max(i,a)||Math.max(t,r)<Math.min(s,o)||Math.min(t,r)>Math.max(s,o))return;const h=(n*r-t*e)*(i-a)-(n-e)*(i*o-s*a),l=(n*r-t*e)*(s-o)-(t-r)*(i*o-s*a),c=(n-e)*(s-o)-(t-r)*(i-a);if(!c)return;const f=h/c,d=l/c,u=Number(f.toFixed(2)),p=Number(d.toFixed(2));if(!(u<Number(Math.min(n,e).toFixed(2))||u>Number(Math.max(n,e).toFixed(2))||u<Number(Math.min(i,a).toFixed(2))||u>Number(Math.max(i,a).toFixed(2))||p<Number(Math.min(t,r).toFixed(2))||p>Number(Math.max(t,r).toFixed(2))||p<Number(Math.min(s,o).toFixed(2))||p>Number(Math.max(s,o).toFixed(2))))return{x:f,y:d}}function nS(n,t,e){const r=wg(n),i=wg(t);if(!tS(r,i))return e?0:[];const s=bg.apply(0,n),a=bg.apply(0,t),o=Math.ceil(s/8),h=Math.ceil(a/8),l=[],c=[],f={};let d=e?0:[];for(let u=0;u<o+1;u++){const p=_g.apply(0,n.concat(u/o));l.push({x:p.x,y:p.y,t:u/o})}for(let u=0;u<h+1;u++){const p=_g.apply(0,t.concat(u/h));c.push({x:p.x,y:p.y,t:u/h})}for(let u=0;u<o;u++)for(let p=0;p<h;p++){const v=l[u],_=l[u+1],S=c[p],x=c[p+1],m=Math.abs(_.x-v.x)<.001?"y":"x",k=Math.abs(x.x-S.x)<.001?"y":"x",F=eS(v.x,v.y,_.x,_.y,S.x,S.y,x.x,x.y);if(F&&f[F.x.toFixed(4)]!==F.y.toFixed(4)){f[F.x.toFixed(4)]=F.y.toFixed(4);const P=v.t+Math.abs((F[m]-v[m])/(_[m]-v[m]))*(_.t-v.t),N=S.t+Math.abs((F[k]-S[k])/(x[k]-S[k]))*(x.t-S.t);P>=0&&P<=1&&N>=0&&N<=1&&(e?d++:d.push({x:F.x,y:F.y,t1:P,t2:N}))}}return d}function rS(n,t,e){let r,i,s,a,o,h,l,c,f,d,u=e?0:[];for(let p=0,v=n.length;p<v;p++){const _=n[p];if(_[0]==="M")r=o=_[1],i=h=_[2];else{_[0]==="C"?(f=[r,i].concat(_.slice(1)),r=f[6],i=f[7]):(f=[r,i,r,i,o,h,o,h],r=o,i=h);for(let S=0,x=t.length;S<x;S++){const m=t[S];if(m[0]==="M")s=l=m[1],a=c=m[2];else{m[0]==="C"?(d=[s,a].concat(m.slice(1)),s=d[6],a=d[7]):(d=[s,a,s,a,l,c,l,c],s=l,a=c);const k=nS(f,d,e);if(e)u+=k;else{for(let F=0,P=k.length;F<P;F++)k[F].segment1=p,k[F].segment2=S,k[F].bez1=f,k[F].bez2=d;u=u.concat(k)}}}}}return u}function iS(n){const t=tu(n);if(t.bbox)return Wc(t.bbox);if(!n)return Xs();let e=0,r=0,i=[],s=[],a=[];for(let d=0,u=n.length;d<u;d++)if(a=n[d],a[0]==="M")e=a[1],r=a[2],i.push(e),s.push(r);else{const p=Sg(e,r,a[1],a[2],a[3],a[4],a[5],a[6]);i=i.concat(p.min.x,p.max.x),s=s.concat(p.min.y,p.max.y),e=a[5],r=a[6]}const o=Math.min.apply(0,i),h=Math.min.apply(0,s),l=Math.max.apply(0,i),c=Math.max.apply(0,s),f=Xs(o,h,l-o,c-h);return t.bbox=Wc(f),f}function sS(n,t,e,r,i){return i?[["M",Number(n)+Number(i),t],["l",e-i*2,0],["a",i,i,0,0,1,i,i],["l",0,r-i*2],["a",i,i,0,0,1,-i,i],["l",i*2-e,0],["a",i,i,0,0,1,-i,-i],["l",0,i*2-r],["a",i,i,0,0,1,i,-i],["z"]]:[["M",n,t],["l",e,0],["l",0,r],["l",-e,0],["z"]]}function Sg(n,t,e,r,i,s,a,o){const h=[],l=[[],[]];let c,f,d,u,p,v,_,S;for(let F=0;F<2;++F){if(F===0?(f=6*n-12*e+6*i,c=-3*n+9*e-9*i+3*a,d=3*e-3*n):(f=6*t-12*r+6*s,c=-3*t+9*r-9*s+3*o,d=3*r-3*t),Math.abs(c)<1e-12){if(Math.abs(f)<1e-12)continue;u=-d/f,u>0&&u<1&&h.push(u);continue}_=f*f-4*d*c,S=Math.sqrt(_),!(_<0)&&(p=(-f+S)/(2*c),p>0&&p<1&&h.push(p),v=(-f-S)/(2*c),v>0&&v<1&&h.push(v))}let x=h.length,m;const k=x;for(;x--;)u=h[x],m=1-u,l[0][x]=m*m*m*n+3*m*m*u*e+3*m*u*u*i+u*u*u*a,l[1][x]=m*m*m*t+3*m*m*u*r+3*m*u*u*s+u*u*u*o;return l[0][k]=n,l[1][k]=t,l[0][k+1]=a,l[1][k+1]=o,l[0].length=l[1].length=k+2,{min:{x:Math.min.apply(0,l[0]),y:Math.min.apply(0,l[1])},max:{x:Math.max.apply(0,l[0]),y:Math.max.apply(0,l[1])}}}function aS(n,t,e){const r=iS(n);return!(!W8(r,t,e)||rS(n,Qc([["M",t,e],["H",r.x2+10]]),1)%2!==1)}const eu=new Map;function kg(n){if(eu.has(n))return eu.get(n);const t=ts(n);return eu.set(n,t),t}function Cg(n){const t=document.createElementNS("http://www.w3.org/2000/svg","path");return t.setAttribute("d",n),t}function oS(n,t){return xo?Cg(n).getTotalLength(t):kg(n).length()}function lS(n,t){if(xo)return Cg(n).getPointAtLength(t);{const e=kg(n),[r,i]=e.at(t);return{x:r,y:i}}}let Dn=null;function hS(n,t,e){if(xo){Dn||(Dn=document.createElement("canvas").getContext("2d"));const r=new Path2D(n);return Dn.isPointInPath(r,t,e)}else return aS(n,t,e)}function cS(n,t,e,{lineWidth:r=1,lineCap:i="butt",lineJoin:s="miter"}){if(xo){if(Dn||(Dn=document.createElement("canvas").getContext("2d")),Dn.isPointInStroke){Dn.save(),Dn.lineWidth=r,Dn.lineCap=i,Dn.lineJoin=s;const a=new Path2D(n),o=Dn.isPointInStroke(a,t,e);return Dn.restore(),o}}else return null}function uS(n){throw new Error('Could not dynamically require "'+n+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Tg={},Pg={exports:{}},Eg;function dS(){return Eg||(Eg=1,function(n){(function(t){var e="0.4.0",r="hasOwnProperty",i=/[\.\/]/,s="*",a=function(){},o=function(d,u){return d-u},h,l,c={n:{}},f=function(d,u){var p=l,v=Array.prototype.slice.call(arguments,2),_=f.listeners(d),S=0,x,m=[],k={},F=[];h=d,l=0;for(var P=0,N=_.length;P<N;P++)"zIndex"in _[P]&&(m.push(_[P].zIndex),_[P].zIndex<0&&(k[_[P].zIndex]=_[P]));for(m.sort(o);m[S]<0;)if(x=k[m[S++]],F.push(x.apply(u,v)),l)return l=p,F;for(P=0;P<N;P++)if(x=_[P],"zIndex"in x)if(x.zIndex==m[S]){if(F.push(x.apply(u,v)),l)return l=p,F;do if(S++,x=k[m[S]],x&&F.push(x.apply(u,v)),l)return l=p,F;while(x)}else k[x.zIndex]=x;else if(F.push(x.apply(u,v)),l)return l=p,F;return l=p,F.length?F:null};f.listeners=function(d){var u=d.split(i),p=c,v,_,S,x,m,k,F,P,N=[p],R=[];for(x=0,m=u.length;x<m;x++){for(P=[],k=0,F=N.length;k<F;k++)for(p=N[k].n,_=[p[u[x]],p[s]],S=2;S--;)v=_[S],v&&(P.push(v),R=R.concat(v.f||[]));N=P}return R},f.on=function(d,u){for(var p=d.split(i),v=c,_=0,S=p.length;_<S;_++)v=v.n,!v[p[_]]&&(v[p[_]]={n:{}}),v=v[p[_]];for(v.f=v.f||[],_=0,S=v.f.length;_<S;_++)if(v.f[_]==u)return a;return v.f.push(u),function(x){+x==+x&&(u.zIndex=+x)}},f.stop=function(){l=1},f.nt=function(d){return d?new RegExp("(?:\\.|\\/|^)"+d+"(?:\\.|\\/|$)").test(h):h},f.unbind=function(d,u){var p=d.split(i),v,_,S,x,m,k,F,P=[c];for(x=0,m=p.length;x<m;x++)for(k=0;k<P.length;k+=S.length-2){if(S=[k,1],v=P[k].n,p[x]!=s)v[p[x]]&&S.push(v[p[x]]);else for(_ in v)v[r](_)&&S.push(v[_]);P.splice.apply(P,S)}for(x=0,m=P.length;x<m;x++)for(v=P[x];v.n;){if(u){if(v.f){for(k=0,F=v.f.length;k<F;k++)if(v.f[k]==u){v.f.splice(k,1);break}!v.f.length&&delete v.f}for(_ in v.n)if(v.n[r](_)&&v.n[_].f){var N=v.n[_].f;for(k=0,F=N.length;k<F;k++)if(N[k]==u){N.splice(k,1);break}!N.length&&delete v.n[_].f}}else{delete v.f;for(_ in v.n)v.n[r](_)&&v.n[_].f&&delete v.n[_].f}v=v.n}},f.once=function(d,u){var p=function(){u.apply(this,arguments),f.unbind(d,p)};return f.on(d,p)},f.version=e,f.toString=function(){return"You are running Eve "+e},n.exports?n.exports=f:t.eve=f})(Kc)}(Pg)),Pg.exports}(function(n){if(typeof uS=="function")var t=dS();(function(){function e(d){var u=function(p){u.parse(p)};return u.mode="text",u.type=String(d||"html").toLowerCase(),u.textchunk="",u.raw="",u.parse=h,u.on=a,u.event=s,u.end=i,u}function r(d,u,p){d==`
38
- `&&this.event("newline"),f[this.mode].call(this,d,u,p)}function i(){r.call(this,"eof"),this.event("eof")}function s(d,u,p){typeof t=="function"&&t("elemental."+d+"."+u,null,u,p||"",this.raw);for(var v=this.events&&this.events[d],_=v&&v.length;_--;)try{this.events[d][_](u,p||"",this.raw)}catch{}this.raw=""}function a(d,u){this.events=this.events||{},this.events[d]=this.events[d]||[],this.events[d].push(u)}function o(d,u){return d&&(d.charAt?d.charAt(u):d[u])}function h(d){d=d||Object(d);for(var u=1,p=d.length+1,v,_,S=o(d,0);u<p;u++)v=_,_=S,S=o(d,u),this.raw+=_,r.call(this,_,S,v);this._beforeEnd=function(){r.call(this,"","",_)}}var l=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000]/,c=function(){for(var d in this.attr)this.attr.hasOwnProperty(d)&&this.event("attr",d,{value:this.attr[d],tagname:this.tagname,attr:this.attr})},f={text:function(d,u,p){switch(d){case"<":case"eof":this.nodename="",this.attr={},this.mode="tag name start",this.raw=this.raw.slice(0,-1),this.textchunk&&this.event("text",this.textchunk),this.raw+=d,this.textchunk="";break;default:this.textchunk+=d}},special:function(d,u,p){if(p=="!"&&d=="-"&&u=="-")this.mode="comment start";else{if(this.textchunk=="[CDATA"&&d=="["){this.mode="cdata",this.textchunk="";return}if(d==">"||d=="eof"){this.event("special",this.textchunk),this.mode="text",this.textchunk="";return}this.textchunk+=d}},cdata:function(d,u,p){p=="]"&&d=="]"&&u==">"?(this.mode="cdata end",this.textchunk=this.textchunk.slice(0,-1)):(d=="eof"&&f["cdata end"].call(this),this.textchunk+=d)},"cdata end":function(d,u,p){this.event("cdata",this.textchunk),this.textchunk="",this.mode="text"},"comment start":function(d,u,p){u==">"||d=="eof"?(this.event("comment",""),this.mode="comment instant end"):this.mode="comment"},"comment instant end":function(d,u,p){this.mode="text"},comment:function(d,u,p){d=="-"&&p=="-"&&u==">"?(this.mode="comment end",this.textchunk=this.textchunk.slice(0,-1)):d=="eof"?this.event("comment",this.textchunk):this.textchunk+=d},"comment end":function(d,u,p){this.event("comment",this.textchunk),this.textchunk="",this.mode="text"},declaration:function(d,u,p){d=="?"&&u==">"?this.mode="declaration end":(d=="eof"&&this.event("comment",this.textchunk),this.textchunk+=d)},"declaration end":function(d,u,p){this.event("comment",this.textchunk),this.textchunk="",this.mode="text"},"tag name start":function(d,u,p){if(d=="eof")this.event("text","<");else if(!l.test(d)){if(this.mode="tag name",d=="/"){this.mode="close tag name start";return}if(d=="!"){this.mode="special",this.textchunk="";return}if(d=="?"){this.mode="declaration";return}f[this.mode].call(this,d,u,p)}},"close tag name start":function(d,u,p){l.test(d)||(this.mode="close tag name",this.tagname="",this.nodename="",f[this.mode].call(this,d,u,p))},"close tag name":function(d,u,p){if(l.test(d))this.tagname=this.nodename;else switch(d){case">":this.event("/tag",this.tagname||this.nodename),this.mode="text";break;default:!this.tagname&&(this.nodename+=d)}},"tag name":function(d,u,p){if(l.test(d))this.tagname=this.nodename,this.nodename="",this.mode="attr start";else switch(d){case">":this.event("tag",this.nodename),this.mode="text";break;default:this.nodename+=d}},"attr start":function(d,u,p){l.test(d)||(this.mode="attr",this.nodename="",f[this.mode].call(this,d,u,p))},attr:function(d,u,p){if(l.test(d)||d=="=")this.attr[this.nodename]="",this.mode="attr value start";else switch(d){case">":this.nodename=="/"?(delete this.attr["/"],this.event("tag",this.tagname,this.attr),c.call(this),this.event("/tag",this.tagname,!0)):(this.nodename&&(this.attr[this.nodename]=""),this.event("tag",this.tagname,this.attr),c.call(this)),this.mode="text";break;default:this.nodename+=d}},"attr value start":function(d,u,p){if(!l.test(d)){if(this.mode="attr value",this.quote=!1,d=="'"||d=='"'){this.quote=d;return}f[this.mode].call(this,d,u,p)}},"attr value":function(d,u,p){if(l.test(d)&&!this.quote)this.mode="attr start";else if(d==">"&&!this.quote)this.event("tag",this.tagname,this.attr),this.mode="text";else switch(d){case'"':case"'":this.quote==d&&p!="\\"&&(this.mode="attr start");break;default:this.attr[this.nodename]+=d}}};e.version="0.2.1",n.elemental=e,n.eve=t})()})(Tg);const Ag=Tn(Tg);function nu(n,t,e,r,i,s){if(typeof i>"u"||typeof s>"u"){const a=n-e,o=t-r;return!a&&!o?0:(180+Math.atan2(-o,-a)*180/Math.PI+360)%360}else return nu(n,t,i,s)-nu(e,r,i,s)}const Kt=Ag.eve,fS=Ag.elemental,el={cursor:1,cx:0,cy:0,fill:1,"fill-opacity":0,font:1,"font-family":1,"font-size":0,"font-style":1,"font-weight":1,height:0,"letter-spacing":0,opacity:0,r:0,rx:0,ry:0,src:1,stroke:1,"stroke-linecap":1,"stroke-linejoin":1,"stroke-miterlimit":0,"stroke-opacity":0,"stroke-width":0,"text-anchor":1,width:0,x:0,y:0};function ru(n,t,e){for(var r=(n+"").split(";"),i=/^\s+|\s+$/g,s,a=0,o=r.length;a<o;a++){var h=r[a].split(":");s=h[0].replace(i,"").replace(/[A-Z]/g,function(l){return"-"+l.toLowerCase()}),(!e||s in e)&&(t[s]=h[1].replace(i,""),e&&!e[s]&&(t[s]=parseFloat(t[s])))}}function pS(n){const t=fS(),e=[],r=[],i={};let s,a,o;const h={};function l(c,f){return function(d,u){const p={type:f||c};e.push(p);for(let v in u)Object.prototype.hasOwnProperty.call(u,v)&&Kt("rappar."+c+".attr."+v,p,u[v],v);Kt("rappar."+c+".attrend",p,u)}}return Kt.on("rappar.polygon.attr.points",function(c){this.path="M"+c+"z",Kt.stop()}),Kt.on("rappar.image.attr.xlink:href",function(c){this.src=c,Kt.stop()}),Kt.on("rappar.path.attr.d",function(c){this.path=c,Kt.stop()}),Kt.on("rappar.*.attr.transform",function(c){this.transform=mg(c).toTransformString(),Kt.stop()}),Kt.on("rappar.*.attr.fill",function(c){var f=c.match(/url\(#([^)]+)\)/),d=this;f&&(f=f[1],i[f]?this.fill=i[f]:Kt.on("rappar.found."+f,function(u){d.fill=u}),Kt.stop())}),Kt.on("rappar.line.attrend",function(c){this.path="M"+[c.x1,c.y1,c.x2,c.y2]}),Kt.on("rappar.*.attrend",function(){for(var c=r.length;c--;)if(r[c]!=this){let d="",u="";for(var f in r[c])f=="transform"?d=r[c].transform:f=="class"&&h["."+r[c][f]]?u=h["."+r[c][f]].join(";")+";"+u:f=="id"&&h["#"+r[c][f]]?u=h["#"+r[c][f]].join(";")+";"+u:typeof this[f]>"u"&&(this[f]=r[c][f]);this.type&&(typeof this.transform>"u"?this.transform=d:this.transform+=d,typeof this.style>"u"?this.style=u:this.style=u+this.style,ru(this.style,this,el))}}),Kt.on("rappar.*.attr.style",function(c){var f=function(){ru(c,this,el),Kt.unbind("rappar.*.attrend",f)};Kt.on("rappar.*.attrend",f),Kt.stop()}),Kt.on("rappar.*.attr.*",function(c,f){f in el&&(this[f]=el[f]?c:parseFloat(c))}),Kt.on("elemental.tag.circle",l("circle")),Kt.on("elemental.tag.ellipse",l("ellipse")),Kt.on("elemental.tag.polygon",l("polygon","path")),Kt.on("elemental.tag.path",l("path")),Kt.on("elemental.tag.line",l("line","path")),Kt.on("elemental.tag.rect",l("rect")),Kt.on("elemental.tag.image",l("image")),Kt.on("elemental.tag.text",l("text")),Kt.on("elemental.text",function(c){try{const f=Gw(c);for(let d of f.stylesheet.rules){for(let u of d.selectors)h[u]=[];for(let u of d.declarations)for(let p of d.selectors)h[p].push(`${u.property}:${u.value}`)}}catch{}}),Kt.on("elemental.tag.svg",function(c,f){let d=f.width||0,u=f.height||0;if(!d||!u){const p=f.viewBox.split(/\s+/gi);d=parseFloat(p[2])-parseFloat(p[0]),u=parseFloat(p[3])-parseFloat(p[1])}e.push({type:"viewbox",width:d,height:u})}),Kt.on("rappar.text.attrend",function(){s="",a=this,this["text-anchor"]=this["text-anchor"]||"start"}),Kt.on("elemental.text",function(c,f,d){a&&(s+=d)}),Kt.on("elemental./tag.text",function(){a.text=s,a=null}),Kt.on("elemental.tag.g",function(c,f){var d={};r.push(d);for(var u in f)Object.prototype.hasOwnProperty.call(f,u)&&(d[u]=f[u],Kt("rappar.g.attr."+u,d,f[u],u));Kt("rappar.g.attrend",d)}),Kt.on("elemental./tag.g",function(c,f){r.pop()}),Kt.on("elemental.tag.linearGradient",function(c,f){o={id:f.id,angle:+(360+nu(f.x1,f.y1,f.x2,f.y2,f.x1+100,f.y1)).toFixed(2),stops:[]}}),Kt.on("elemental./tag.linearGradient",function(){for(var c=[o.angle],f,d=0,u=o.stops.length;d<u;d++)f=o.stops[d],d&&d!=u-1?c.push(f.color+":"+f.offset):c.push(f.color);i[o.id]=c.join("-"),Kt("rappar.found."+o.id,null,i[o.id])}),Kt.on("elemental.tag.radialGradient",function(c,f){o={id:f.id,stops:[]}}),Kt.on("elemental./tag.radialGradient",function(){for(var c=[],f,d=0,u=o.stops.length;d<u;d++)f=o.stops[d],d&&d!=u-1?c.push(f.color+":"+f.offset):c.push(f.color);i[o.id]="r"+c.join("-"),Kt("rappar.found."+o.id,null,i[o.id])}),Kt.on("elemental.tag.stop",function(c,f){var d={};f.style&&ru(f.style,d),d.offset=d.offset||f.offset,d.color=d["stop-color"]||f["stop-color"],d.opacity=d["stop-opacity"]||f["stop-opacity"],~(d.offset+"").indexOf("%")?d.offset=parseFloat(d.offset):d.offset=parseFloat(d.offset)*100,d.offset=+d.offset.toFixed(2),o.stops.push(d)}),t(n),t.end(),e}const Og=gS("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);function gS(n,t=10){const e={},r=n.split(",");for(let i=0;i<r.length;i+=2){const s="&"+r[i+1]+";",a=parseInt(r[i],t);e[s]="&#"+a+";"}return e["\\xa0"]="&#160;",e}function un(n,t){const e=Object.keys(t);for(let r=0;r<e.length;r++)n=n.replace(new RegExp("{"+e[r]+"}","gi"),""+t[e[r]]);return n}function nl(n){let t,e;if(!n)throw new Error("cannot create a random attribute name for an undefined object");const r="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";t="";do for(t="",e=0;e<12;e++)t+=r[Math.floor(Math.random()*r.length)];while(n[t]);return t}function mS(n){const t={left:"start",right:"end",center:"middle",start:"start",end:"end"};return t[n]||t.start}function yS(n){const t={alphabetic:"alphabetic",hanging:"hanging",top:"text-before-edge",bottom:"text-after-edge",middle:"central"};return t[n]||t.alphabetic}const Js={strokeStyle:{svgAttr:"stroke",canvas:"#000000",svg:"none",apply:"stroke"},fillStyle:{svgAttr:"fill",canvas:"#000000",svg:null,apply:"fill"},lineCap:{svgAttr:"stroke-linecap",canvas:"butt",svg:"butt",apply:"stroke"},lineJoin:{svgAttr:"stroke-linejoin",canvas:"miter",svg:"miter",apply:"stroke"},miterLimit:{svgAttr:"stroke-miterlimit",canvas:10,svg:4,apply:"stroke"},lineWidth:{svgAttr:"stroke-width",canvas:1,svg:1,apply:"stroke"},globalAlpha:{svgAttr:"opacity",canvas:1,svg:1,apply:"fill stroke"},font:{canvas:"10px sans-serif"},shadowColor:{canvas:"#000000"},shadowOffsetX:{canvas:0},shadowOffsetY:{canvas:0},shadowBlur:{canvas:0},textAlign:{canvas:"start"},textBaseline:{canvas:"alphabetic"},lineDash:{svgAttr:"stroke-dasharray",canvas:[],svg:null,apply:"stroke"}};class iu{constructor(t,e){Tt(this,"__root");Tt(this,"__ctx");this.__root=t,this.__ctx=e}addColorStop(t,e){const r=this.__ctx.__createElement("stop");if(r.setAttribute("offset",""+t),e.indexOf("rgba")!==-1){const i=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(e);i&&(r.setAttribute("stop-color",un("rgb({r},{g},{b})",{r:i[1],g:i[2],b:i[3]})),r.setAttribute("stop-opacity",i[4]))}else r.setAttribute("stop-color",e);this.__root.appendChild(r)}}class $g{constructor(t,e){Tt(this,"__root");Tt(this,"__ctx");this.__root=t,this.__ctx=e}}class rl{constructor({canvas:t,width:e=500,height:r=500,enableMirroring:i=!1}){Tt(this,"__document",document);Tt(this,"__canvas");Tt(this,"__ctx");Tt(this,"width");Tt(this,"height");Tt(this,"__styleStack");Tt(this,"__groupStack");Tt(this,"__rootSVG");Tt(this,"__ids");Tt(this,"__SVGdefs");Tt(this,"__currentElement");Tt(this,"__currentElementsToStyle",null);this.enableMirroring=i,t?(this.__canvas=t,this.__ctx=t.getContext("2d"),this.width=t.width,this.height=t.height):(this.__canvas=this.__document.createElement("canvas"),this.__ctx=this.__canvas.getContext("2d"),this.width=e,this.height=r),this.__setDefaultStyles(),this.__styleStack=[this.__getStyleState()],this.__groupStack=[],this.__rootSVG=this.__document.createElementNS("http://www.w3.org/2000/svg","svg"),this.__rootSVG.setAttribute("version","1.1"),this.__rootSVG.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.__rootSVG.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),this.__rootSVG.setAttribute("width",""+this.width),this.__rootSVG.setAttribute("height",""+this.height),this.__ids={},this.__SVGdefs=this.__document.createElementNS("http://www.w3.org/2000/svg","defs"),this.__rootSVG.appendChild(this.__SVGdefs),this.__currentElement=this.__document.createElementNS("http://www.w3.org/2000/svg","g"),this.__rootSVG.appendChild(this.__currentElement)}__setDefaultStyles(){const t=Object.keys(Js);for(let e=0,r=t.length;e<r;e++){const i=t[e];this[i]=Js[i].canvas}}__getStyleState(){const t={},e=Object.keys(Js);for(let r=0,i=e.length;r<i;r++){const s=e[r];t[s]=this[s]}return t}__applyStyleState(t){const e=Object.keys(t);for(let r=0,i=e.length;r<i;r++){const s=e[r];this[s]=t[s]}}__createElement(t,e={},r=!1){const i=this.__document.createElementNS("http://www.w3.org/2000/svg",t),s=Object.keys(e);r&&(i.setAttribute("fill","none"),i.setAttribute("stroke","none"));for(let a=0;a<s.length;a++){const o=s[a];i.setAttribute(o,e[o])}return i}__applyStyleToCurrentElement(t){let e=this.__currentElement;const r=this.__currentElementsToStyle;r&&(e.setAttribute(t,""),e=r.element,r.children.forEach(s=>{s.setAttribute(t,"")}));const i=Object.keys(Js);for(let s=0;s<i.length;s++){const a=Js[i[s]],o=this[i[s]];if(a.apply){if(o instanceof $g){if(o.__ctx)for(;o.__ctx.__SVGdefs.childNodes.length;){const h=o.__ctx.__SVGdefs.childNodes[0].getAttribute("id");this.__ids[h]=h,this.__SVGdefs.appendChild(o.__ctx.__SVGdefs.childNodes[0])}e.setAttribute(a.apply,un("url(#{id})",{id:o.__root.getAttribute("id")}))}else if(o instanceof iu)e.setAttribute(a.apply,un("url(#{id})",{id:o.__root.getAttribute("id")}));else if(a.apply.indexOf(t)!==-1&&a.svg!==o)if((a.svgAttr==="stroke"||a.svgAttr==="fill")&&o.indexOf("rgba")!==-1){const h=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(o);e.setAttribute(a.svgAttr,un("rgb({r},{g},{b})",{r:h[1],g:h[2],b:h[3]}));let l=parseFloat(h[4]);const c=this.globalAlpha;c!=null&&(l*=c),e.setAttribute(a.svgAttr+"-opacity",""+l)}else{let h=a.svgAttr;if(i[s]==="globalAlpha"&&(h=t+"-"+a.svgAttr,e.getAttribute(h)))continue;h&&e.setAttribute(h,o)}}}}__closestGroupOrSvg(t){return t=t||this.__currentElement,t.nodeName==="g"||t.nodeName==="svg"?t:this.__closestGroupOrSvg(t.parentNode)}getSerializedSvg(t){let e=new XMLSerializer().serializeToString(this.__rootSVG);if(/xmlns="http:\/\/www\.w3\.org\/2000\/svg".+xmlns="http:\/\/www\.w3\.org\/2000\/svg/gi.test(e)&&(e=e.replace('xmlns="http://www.w3.org/2000/svg','xmlns:xlink="http://www.w3.org/1999/xlink')),t){const r=Object.keys(Og);for(let i=0,s=r.length;i<s;i++){const a=r[i],o=Og[a],h=new RegExp(a,"gi");h.test(e)&&(e=e.replace(h,o))}}return e}getSvg(){return this.__rootSVG}save(){const t=this.__createElement("g"),e=this.__closestGroupOrSvg();this.__groupStack.push(e),e.appendChild(t),this.__currentElement=t,this.__styleStack.push(this.__getStyleState())}restore(){this.__currentElementsToStyle=null;const t=this.__groupStack.pop();t?this.__currentElement=t:this.__currentElement=this.__rootSVG.childNodes[1];const e=this.__styleStack.pop();e&&this.__applyStyleState(e)}__addTransform(t){const e=this.__closestGroupOrSvg();if(e.childNodes.length>0){this.__currentElement.nodeName==="path"&&(this.__currentElementsToStyle||(this.__currentElementsToStyle={element:e,children:[]}),this.__currentElementsToStyle.children.push(this.__currentElement),this.__applyCurrentDefaultPath());const i=this.__createElement("g");e.appendChild(i),this.__currentElement=i}let r=this.__currentElement.getAttribute("transform");r?r+=" ":r="",r+=t,this.__currentElement.setAttribute("transform",r)}scale(t,e){e===void 0&&(e=t),this.__addTransform(un("scale({x},{y})",{x:t,y:e}))}rotate(t){const e=t*180/Math.PI;this.__addTransform(un("rotate({angle},{cx},{cy})",{angle:e,cx:0,cy:0}))}translate(t,e){this.__addTransform(un("translate({x},{y})",{x:t,y:e}))}transform(t,e,r,i,s,a){this.__addTransform(un("matrix({a},{b},{c},{d},{e},{f})",{a:t,b:e,c:r,d:i,e:s,f:a}))}beginPath(){this.__currentDefaultPath="",this.__currentPosition={};const t=this.__createElement("path",{},!0);this.__closestGroupOrSvg().appendChild(t),this.__currentElement=t}__applyCurrentDefaultPath(){const t=this.__currentElement;t.nodeName==="path"?t.setAttribute("d",this.__currentDefaultPath):console.error("Attempted to apply path command to node",t.nodeName)}__addPathCommand(t){this.__currentDefaultPath+=" ",this.__currentDefaultPath+=t}moveTo(t,e){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.__currentPosition={x:t,y:e},this.__addPathCommand(un("M {x} {y}",this.__currentPosition))}closePath(){this.__currentDefaultPath&&this.__addPathCommand("Z")}lineTo(t,e){this.__currentPosition={x:t,y:e},this.__currentDefaultPath.indexOf("M")>-1?this.__addPathCommand(un("L {x} {y}",this.__currentPosition)):this.__addPathCommand(un("M {x} {y}",this.__currentPosition))}bezierCurveTo(t,e,r,i,s,a){this.__currentPosition={x:s,y:a},this.__addPathCommand(un("C {cp1x} {cp1y} {cp2x} {cp2y} {x} {y}",{cp1x:t,cp1y:e,cp2x:r,cp2y:i,x:s,y:a}))}quadraticCurveTo(t,e,r,i){this.__currentPosition={x:r,y:i},this.__addPathCommand(un("Q {cpx} {cpy} {x} {y}",{cpx:t,cpy:e,x:r,y:i}))}normalize(t){const e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]}arcTo(t,e,r,i,s){const a=this.__currentPosition&&this.__currentPosition.x,o=this.__currentPosition&&this.__currentPosition.y;if(typeof a>"u"||typeof o>"u")return;if(s<0)throw new Error("IndexSizeError: The radius provided ("+s+") is negative.");if(a===t&&o===e||t===r&&e===i||s===0){this.lineTo(t,e);return}const h=this.normalize([a-t,o-e]),l=this.normalize([r-t,i-e]);if(h[0]*l[1]===h[1]*l[0]){this.lineTo(t,e);return}const c=h[0]*l[0]+h[1]*l[1],f=Math.acos(Math.abs(c)),d=this.normalize([h[0]+l[0],h[1]+l[1]]),u=s/Math.sin(f/2),p=t+u*d[0],v=e+u*d[1],_=[-h[1],h[0]],S=[l[1],-l[0]],x=function(F){const P=F[0];return F[1]>=0?Math.acos(P):-Math.acos(P)},m=x(_),k=x(S);this.lineTo(p+_[0]*s,v+_[1]*s),this.arc(p,v,s,m,k)}stroke(){this.__currentElement.nodeName==="path"&&this.__currentElement.setAttribute("paint-order","fill stroke markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("stroke")}fill(){this.__currentElement.nodeName==="path"&&this.__currentElement.setAttribute("paint-order","stroke fill markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("fill")}rect(t,e,r,i){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.moveTo(t,e),this.lineTo(t+r,e),this.lineTo(t+r,e+i),this.lineTo(t,e+i),this.lineTo(t,e),this.closePath()}fillRect(t,e,r,i){const s=this.__createElement("rect",{x:t,y:e,width:r,height:i},!0);this.__closestGroupOrSvg().appendChild(s),this.__currentElement=s,this.__applyStyleToCurrentElement("fill")}strokeRect(t,e,r,i){const s=this.__createElement("rect",{x:t,y:e,width:r,height:i},!0);this.__closestGroupOrSvg().appendChild(s),this.__currentElement=s,this.__applyStyleToCurrentElement("stroke")}__clearCanvas(){const t=this.__closestGroupOrSvg().getAttribute("transform"),e=this.__rootSVG.childNodes[1],r=e.childNodes;for(let i=r.length-1;i>=0;i--)r[i]&&e.removeChild(r[i]);this.__currentElement=e,this.__groupStack=[],t&&this.__addTransform(t)}clearRect(t,e,r,i){if(t===0&&e===0&&r===this.width&&i===this.height){this.__clearCanvas();return}const s=this.__closestGroupOrSvg(),a=this.__createElement("rect",{x:t,y:e,width:r,height:i,fill:"#FFFFFF"},!0);s.appendChild(a)}createLinearGradient(t,e,r,i){const s=this.__createElement("linearGradient",{id:nl(this.__ids),x1:t+"px",x2:r+"px",y1:e+"px",y2:i+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(s),new iu(s,this)}createRadialGradient(t,e,r,i,s,a){const o=this.__createElement("radialGradient",{id:nl(this.__ids),cx:i+"px",cy:s+"px",r:a+"px",fx:t+"px",fy:e+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(o),new iu(o,this)}__parseFont(){const t=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:%|in|[cem]m|ex|p[CustomCanvasContext]))(?:\s*\/\s*(normal|[.\d]+(?:%|in|[cem]m|ex|p[CustomCanvasContext])))?\s*([-,'"\sa-z0-9]+?)\s*$/i.exec(this.font),e={style:t[1]||"normal",size:t[4]||"10px",family:t[6]||"sans-serif",weight:t[3]||"normal",decoration:t[2]||"normal",href:null};return this.__fontUnderline==="underline"&&(e.decoration="underline"),this.__fontHref&&(e.href=this.__fontHref),e}__wrapTextLink(t,e){if(t.href){const r=this.__createElement("a");return r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.href),r.appendChild(e),r}return e}__applyText(t,e,r,i){const s=this.__parseFont(),a=this.__closestGroupOrSvg(),o=this.__createElement("text",{"font-family":s.family,"font-size":s.size,"font-style":s.style,"font-weight":s.weight,"text-decoration":s.decoration,x:e,y:r,"text-anchor":mS(this.textAlign),"dominant-baseline":yS(this.textBaseline)},!0);o.appendChild(this.__document.createTextNode(t)),this.__currentElement=o,this.__applyStyleToCurrentElement(i),a.appendChild(this.__wrapTextLink(s,o))}fillText(t,e,r){this.__applyText(t,e,r,"fill")}strokeText(t,e,r){this.__applyText(t,e,r,"stroke")}measureText(t){return this.__ctx.font=this.font,this.__ctx.measureText(t)}arc(t,e,r,i,s,a){if(i===s)return;i=i%(2*Math.PI),s=s%(2*Math.PI),i===s&&(s=(s+2*Math.PI-.001*(a?-1:1))%(2*Math.PI));const o=t+r*Math.cos(s),h=e+r*Math.sin(s),l=t+r*Math.cos(i),c=e+r*Math.sin(i),f=a?0:1;let d=0,u=s-i;u<0&&(u+=2*Math.PI),a?d=u>Math.PI?0:1:d=u>Math.PI?1:0,this.lineTo(l,c),this.__addPathCommand(un("A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}",{rx:r,ry:r,xAxisRotation:0,largeArcFlag:d,sweepFlag:f,endX:o,endY:h})),this.__currentPosition={x:o,y:h}}clip(){const t=this.__closestGroupOrSvg(),e=this.__createElement("clipPath"),r=nl(this.__ids),i=this.__createElement("g");this.__applyCurrentDefaultPath(),t.removeChild(this.__currentElement),e.setAttribute("id",r),e.appendChild(this.__currentElement),this.__SVGdefs.appendChild(e),t.setAttribute("clip-path",un("url(#{id})",{id:r})),t.appendChild(i),this.__currentElement=i}drawImage(...t){var m;let e=t[0],r,i,s,a,o=0,h=0,l,c,f,d,u,p,v,_;if(t.length===3)r=t[1],i=t[2],l=e.width,c=e.height,s=l,a=c;else if(t.length===5)r=t[1],i=t[2],s=t[3],a=t[4],l=e.width,c=e.height;else if(t.length===9)o=t[1],h=t[2],l=t[3],c=t[4],r=t[5],i=t[6],s=t[7],a=t[8];else throw new Error("Invalid number of arguments passed to drawImage: "+arguments.length);const S=this.__closestGroupOrSvg();this.__currentElement;const x="translate("+r+", "+i+")";if(e instanceof rl){if(f=e.getSvg().cloneNode(!0),f.childNodes&&f.childNodes.length>1){for(d=f.childNodes[0];d.childNodes.length;)_=d.childNodes[0].getAttribute("id"),this.__ids[_]=_,this.__SVGdefs.appendChild(d.childNodes[0]);if(u=f.childNodes[1],u){const k=u.getAttribute("transform");let F;k?F=k+" "+x:F=x,u.setAttribute("transform",F),S.appendChild(u)}}}else(e.nodeName==="CANVAS"||e.nodeName==="IMG")&&(p=this.__createElement("image"),p.setAttribute("width",s),p.setAttribute("height",a),p.setAttribute("preserveAspectRatio","none"),(o||h||l!==e.width||c!==e.height)&&(v=this.__document.createElement("canvas"),v.width=s,v.height=a,(m=v.getContext("2d"))==null||m.drawImage(e,o,h,l,c,0,0,s,a),e=v),p.setAttribute("transform",x),p.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e.nodeName==="CANVAS"?e.toDataURL():e.getAttribute("src")),S.appendChild(p))}createPattern(t,e){const r=this.__document.createElementNS("http://www.w3.org/2000/svg","pattern"),i=nl(this.__ids);let s;return r.setAttribute("id",i),t.nodeName==="CANVAS"||t.nodeName==="IMG"?(s=this.__document.createElementNS("http://www.w3.org/2000/svg","image"),s.setAttribute("width",""+t.width),s.setAttribute("height",""+t.height),s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.nodeName==="CANVAS"?t.toDataURL():t.getAttribute("src")),r.appendChild(s),this.__SVGdefs.appendChild(r)):t instanceof rl&&(r.setAttribute("width",""+t.width),r.setAttribute("height",""+t.height),r.appendChild(t.__rootSVG.childNodes[1]),this.__SVGdefs.appendChild(r)),new $g(r,this)}setLineDash(t){t&&t.length>0?this.lineDash=t.join(","):this.lineDash=null}drawFocusRing(){}createImageData(){}getImageData(){}putImageData(){}globalCompositeOperation(){}setTransform(){}}let Fg=class Hv{constructor(t){Tt(this,"point");this.point=new bi(t)}static fromSVGPathData(t){if(t.length<3)throw new Error("Line 参数个数错误");if(t[0].toUpperCase()!=="L")throw new Error("Line command 错误");return new Hv({x:t[1],y:t[2]})}toSVGPathData(){return["L",this.point.x,this.point.y]}toSVGPathD(){return"L "+this.point.toSVGPathD()}},Ng=class qv extends Fg{constructor(e){super(e);Tt(this,"rx");Tt(this,"ry");Tt(this,"xAxisRotate");Tt(this,"largeArcFlag");Tt(this,"sweepFlag");this.rx=e.rx,this.ry=e.ry,this.xAxisRotate=(e==null?void 0:e.xAxisRotate)??0,this.largeArcFlag=(e==null?void 0:e.largeArcFlag)??1,this.sweepFlag=(e==null?void 0:e.sweepFlag)??1}static fromSVGPathData(e){if(e.length<8)throw new Error("Arc 参数个数错误");if(e[0].toUpperCase()!=="A")throw new Error("Arc command 错误");return new qv({x:e[6],y:e[7],rx:e[1],ry:e[2],xAxisRotate:e[3],largeArcFlag:e[4],sweepFlag:e[5]})}toSVGPathData(){return["A",this.rx,this.ry,this.xAxisRotate,this.largeArcFlag,this.sweepFlag,this.point.x,this.point.y]}toSVGPathD(){return`A ${this.rx},${this.ry} ${this.xAxisRotate} ${this.largeArcFlag},${this.sweepFlag} ${this.point.toSVGPathD()}`}};class Qs extends Fg{constructor(e){super(e);Tt(this,"ctrlPoints",[]);this.ctrlPoints.push(new bi({x:e.c1x,y:e.c1y})),this.ctrlPoints.push(new bi({x:e.c2x,y:e.c2y}))}static fromSVGPathData(e){if(e.length<7)throw new Error("CubicBezier 参数个数错误");if(e[0].toUpperCase()!=="C")throw new Error("CubicBezier command 错误");return new Qs({c1x:e[1],c1y:e[2],c2x:e[3],c2y:e[4],x:e[5],y:e[6]})}toSVGPathData(){return["C",this.ctrlPoints[0].x,this.ctrlPoints[0].y,this.ctrlPoints[1].x,this.ctrlPoints[1].y,this.point.x,this.point.y]}toSVGPathD(){return`C ${this.ctrlPoints.map(e=>e.toSVGPathD()).join(" ")} ${this.point.toSVGPathD()}`}}class es{constructor(t){Tt(this,"startPoint");Tt(this,"isClosed",!1);Tt(this,"lines",[]);Tt(this,"normalizedLines",[]);var e;this.startPoint=(t==null?void 0:t.startPoint)??null,this.isClosed=(t==null?void 0:t.isClosed)??!1,(e=t==null?void 0:t.lines)==null||e.forEach(this.addLine),this.normalize()}setStartPoint(t,e){return this.startPoint=new bi({x:t,y:e}),this}addLine(t){return this.lines.push(t),this}normalize(){let t=this.lines.reduce((r,i)=>(r+=i.toSVGPathD(),r),"");this.startPoint&&(t="M "+this.startPoint.toSVGPathD()+t),this.isClosed&&(t+="Z"),this.normalizedLines=[];const e=Qc(Jc(Xc(t)));for(let r=0,i=e.length;r<i;r++){const s=e[r];if(r==0&&s[0]=="M"){this.setStartPoint(s[1],s[2]);continue}if(r==i-1&&s[0]=="Z"){this.isClosed=!0;continue}this.normalizedLines.push(Qs.fromSVGPathData(s))}return this}static fromSVGPathD(t,e){if(!V8(t))throw new Error("Not an SVG path!");const r=Qc(Jc(Xc(t)));return es.fromSVGPathData(r,e)}static fromSVGPathData(t,e){const r=new es;for(let s=0,a=t.length;s<a;s++){const o=t[s],h=o[0];if(s==0&&h=="M"){r.setStartPoint(o[1],o[2]);continue}if(s==a-1&&h=="Z"){r.isClosed=!0;continue}r.addLine(new Qs({c1x:o[1],c1y:o[2],c2x:o[3],c2y:o[4],x:o[5],y:o[6]}))}r.normalize();const i=mg(e??"");return r.transform(i)}toSVGPathD(){let t="";this.startPoint&&(t+="M "+this.startPoint.toSVGPathD());for(let e=0,r=this.normalizedLines.length;e<r;e++)t+=this.normalizedLines[e].toSVGPathD();return this.isClosed&&(t+="Z"),t}toSVGPathData(){const t=[];this.startPoint&&t.push(["M",...this.startPoint.toSVGPathData()]);for(let e=0,r=this.normalizedLines.length;e<r;e++)t.push(this.normalizedLines[e].toSVGPathData());return this.isClosed&&t.push(["Z"]),t}toCanvas(t){const e=this.normalizedLines;e.length&&(this.startPoint&&(t.beginPath(),t.moveTo(this.startPoint.x,this.startPoint.y)),e.forEach(r=>{const[i,...s]=r.toSVGPathData();i==="M"?t.moveTo(s[0],s[1]):i==="Z"?t.closePath():t.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5])}),this.isClosed&&t.closePath())}get bounds(){let t=[0,0,0,0];if(this.normalizedLines.length){t=[1/0,1/0,-1/0,-1/0];for(let e=0,r=this.normalizedLines.length;e<r;e++){const i=this.normalizedLines[e],s=[...i.ctrlPoints,i.point];for(let a=0;a<s.length;a++){const o=s[a].x,h=s[a].y;o<t[0]&&(t[0]=o),h<t[1]&&(t[1]=h),o>t[2]&&(t[2]=o),h>t[3]&&(t[3]=h)}}}return t}get size(){const t=this.bounds;return[t[2]-t[0],t[3]-t[1]]}get center(){const[t,e,r,i]=this.bounds;return[(t+r)/2,(e+i)/2]}getTotalLength(){return oS(this.toSVGPathD())}getPointAtLength(t){return lS(this.toSVGPathD(),t)}isPointInPath(t,e){return hS(this.toSVGPathD(),t,e)}isPointInStroke(t,e,r={lineWidth:1,lineCap:"butt",lineJoin:"miter"}){return cS(this.toSVGPathD(),t,e,r)}transform(t){if(this.startPoint){const[e,r]=t.transformPoint(this.startPoint.x,this.startPoint.y);this.setStartPoint(e,r)}return this.normalizedLines=this.normalizedLines.map(e=>{const[r,...i]=e.toSVGPathData(),s=[r];for(let a=0,o=i.length;a<o;a+=2){const h=i[a],l=i[a+1],[c,f]=t.transformPoint(h,l);s.push(c,f)}return Qs.fromSVGPathData(s)}),this}translate(t,e){const r=new cn().translate(t,e);return this.transform(r)}rotate(t,e=0,r=0){const i=new cn().rotate(t,e,r);return this.transform(i)}scale(t,e=t,r=0,i=0){const s=new cn().scale(t,e,r,i);return this.transform(s)}skew(t,e=0){const r=new cn().skew(t,e);return this.transform(r)}trim(){const[t,e]=this.bounds;return this.translate(-t,-e),this}static generateRosetta(t,e,r,i,s){if(s==0)throw new Error("no dividing by zero, please");const a=new es;a.setStartPoint(t,e);const o=360/s;for(let h=0;h<s;h+=1){const l=o*h*Math.PI/180,c=t+2*r*Math.cos(l),f=e+2*r*Math.sin(l);a.addLine(new Ng({x:c,y:f,rx:r,ry:i,xAxisRotate:o*h,largeArcFlag:1,sweepFlag:1})),a.addLine(new Ng({x:t,y:e,rx:r,ry:i,xAxisRotate:o*h,largeArcFlag:1,sweepFlag:1}))}return a.normalize(),a}}var Rg={exports:{}};(function(n,t){(function(e,r){n.exports=r()})(window,function(){return function(e){var r={};function i(s){if(r[s])return r[s].exports;var a=r[s]={i:s,l:!1,exports:{}};return e[s].call(a.exports,a,a.exports,i),a.l=!0,a.exports}return i.m=e,i.c=r,i.d=function(s,a,o){i.o(s,a)||Object.defineProperty(s,a,{enumerable:!0,get:o})},i.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},i.t=function(s,a){if(1&a&&(s=i(s)),8&a||4&a&&typeof s=="object"&&s&&s.__esModule)return s;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:s}),2&a&&typeof s!="string")for(var h in s)i.d(o,h,(function(l){return s[l]}).bind(null,h));return o},i.n=function(s){var a=s&&s.__esModule?function(){return s.default}:function(){return s};return i.d(a,"a",a),a},i.o=function(s,a){return Object.prototype.hasOwnProperty.call(s,a)},i.p="",i(i.s=1)}([function(e,r,i){var s,a;s=[i(2)],(a=(function(o){function h(y){if(h.is(y,"function"))return l?y():o.on("raphael.DOMload",y);if(h.is(y,it))return h._engine.create[x](h,y.splice(0,3+h.is(y[0],xt))).add(y);var b=Array.prototype.slice.call(arguments,0);if(h.is(b[b.length-1],"function")){var A=b.pop();return l?A.call(h._engine.create[x](h,b)):o.on("raphael.DOMload",function(){A.call(h._engine.create[x](h,b))})}return h._engine.create[x](h,arguments)}h.version="2.3.0",h.eve=o;var l,c,f=/[, ]+/,d={circle:1,rect:1,path:1,ellipse:1,text:1,image:1},u=/\{(\d+)\}/g,p="hasOwnProperty",v={doc:document,win:window},_={was:Object.prototype[p].call(v.win,"Raphael"),is:v.win.Raphael},S=function(){this.ca=this.customAttributes={}},x="apply",m="concat",k="ontouchstart"in window||window.TouchEvent||window.DocumentTouch&&document instanceof DocumentTouch,F="",P=" ",N=String,R="split",L="click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel"[R](P),U={mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},B=N.prototype.toLowerCase,K=Math,tt=K.max,W=K.min,lt=K.abs,wt=K.pow,bt=K.PI,xt="number",it="array",Y=Object.prototype.toString,O=(h._ISURL=/^url\(['"]?(.+?)['"]?\)$/i,/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i),E={NaN:1,Infinity:1,"-Infinity":1},T=/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,C=K.round,D=parseFloat,G=parseInt,M=N.prototype.toUpperCase,V=h._availableAttrs={"arrow-end":"none","arrow-start":"none",blur:0,"clip-rect":"0 0 1e9 1e9",cursor:"default",cx:0,cy:0,fill:"#fff","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:0,height:0,href:"http://raphaeljs.com/","letter-spacing":0,opacity:1,path:"M0,0",r:0,rx:0,ry:0,src:"",stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank","text-anchor":"middle",title:"Raphael",transform:"",width:0,x:0,y:0,class:""},q=h._availableAnimAttrs={blur:xt,"clip-rect":"csv",cx:xt,cy:xt,fill:"colour","fill-opacity":xt,"font-size":xt,height:xt,opacity:xt,path:"path",r:xt,rx:xt,ry:xt,stroke:"colour","stroke-opacity":xt,"stroke-width":xt,transform:"transform",width:xt,x:xt,y:xt},Z=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/,nt={hs:1,rg:1},pt=/,?([achlmqrstvxz]),?/gi,kt=/([achlmrqstvz])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,Ft=/([rstm])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,St=/(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/gi,At=(h._radial_gradient=/^r(?:\(([^,]+?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*([^\)]+?)\))?/,{}),jt=function(y,b){return D(y)-D(b)},zt=function(y){return y},Ot=h._rectPath=function(y,b,A,g,w){return w?[["M",y+w,b],["l",A-2*w,0],["a",w,w,0,0,1,w,w],["l",0,g-2*w],["a",w,w,0,0,1,-w,w],["l",2*w-A,0],["a",w,w,0,0,1,-w,-w],["l",0,2*w-g],["a",w,w,0,0,1,w,-w],["z"]]:[["M",y,b],["l",A,0],["l",0,g],["l",-A,0],["z"]]},le=function(y,b,A,g){return g==null&&(g=A),[["M",y,b],["m",0,-g],["a",A,g,0,1,1,0,2*g],["a",A,g,0,1,1,0,-2*g],["z"]]},Jt=h._getPath={path:function(y){return y.attr("path")},circle:function(y){var b=y.attrs;return le(b.cx,b.cy,b.r)},ellipse:function(y){var b=y.attrs;return le(b.cx,b.cy,b.rx,b.ry)},rect:function(y){var b=y.attrs;return Ot(b.x,b.y,b.width,b.height,b.r)},image:function(y){var b=y.attrs;return Ot(b.x,b.y,b.width,b.height)},text:function(y){var b=y._getBBox();return Ot(b.x,b.y,b.width,b.height)},set:function(y){var b=y._getBBox();return Ot(b.x,b.y,b.width,b.height)}},ue=h.mapPath=function(y,b){if(!b)return y;var A,g,w,$,I,j,z;for(w=0,I=(y=Gr(y)).length;w<I;w++)for($=1,j=(z=y[w]).length;$<j;$+=2)A=b.x(z[$],z[$+1]),g=b.y(z[$],z[$+1]),z[$]=A,z[$+1]=g;return y};if(h._g=v,h.type=v.win.SVGAngle||v.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML",h.type=="VML"){var Bt,Fe=v.doc.createElement("div");if(Fe.innerHTML='<v:shape adj="1"/>',(Bt=Fe.firstChild).style.behavior="url(#default#VML)",!Bt||typeof Bt.adj!="object")return h.type=F;Fe=null}function Pe(y){if(typeof y=="function"||Object(y)!==y)return y;var b=new y.constructor;for(var A in y)y[p](A)&&(b[A]=Pe(y[A]));return b}h.svg=!(h.vml=h.type=="VML"),h._Paper=S,h.fn=c=S.prototype=h.prototype,h._id=0,h.is=function(y,b){return(b=B.call(b))=="finite"?!E[p](+y):b=="array"?y instanceof Array:b=="null"&&y===null||b==typeof y&&y!==null||b=="object"&&y===Object(y)||b=="array"&&Array.isArray&&Array.isArray(y)||Y.call(y).slice(8,-1).toLowerCase()==b},h.angle=function(y,b,A,g,w,$){if(w==null){var I=y-A,j=b-g;return I||j?(180+180*K.atan2(-j,-I)/bt+360)%360:0}return h.angle(y,b,w,$)-h.angle(A,g,w,$)},h.rad=function(y){return y%360*bt/180},h.deg=function(y){return Math.round(180*y/bt%360*1e3)/1e3},h.snapTo=function(y,b,A){if(A=h.is(A,"finite")?A:10,h.is(y,it)){for(var g=y.length;g--;)if(lt(y[g]-b)<=A)return y[g]}else{var w=b%(y=+y);if(w<A)return b-w;if(w>y-A)return b-w+y}return b};var Qe,vn;h.createUUID=(Qe=/[xy]/g,vn=function(y){var b=16*K.random()|0;return(y=="x"?b:3&b|8).toString(16)},function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(Qe,vn).toUpperCase()}),h.setWindow=function(y){o("raphael.setWindow",h,v.win,y),v.win=y,v.doc=v.win.document,h._engine.initWin&&h._engine.initWin(v.win)};var an=function(y){if(h.vml){var b,A=/^\s+|\s+$/g;try{var g=new ActiveXObject("htmlfile");g.write("<body>"),g.close(),b=g.body}catch{b=createPopup().document.body}var w=b.createTextRange();an=Le(function(I){try{b.style.color=N(I).replace(A,F);var j=w.queryCommandValue("ForeColor");return"#"+("000000"+(j=(255&j)<<16|65280&j|(16711680&j)>>>16).toString(16)).slice(-6)}catch{return"none"}})}else{var $=v.doc.createElement("i");$.title="Raphaël Colour Picker",$.style.display="none",v.doc.body.appendChild($),an=Le(function(I){return $.style.color=I,v.doc.defaultView.getComputedStyle($,F).getPropertyValue("color")})}return an(y)},Ne=function(){return"hsb("+[this.h,this.s,this.b]+")"},en=function(){return"hsl("+[this.h,this.s,this.l]+")"},On=function(){return this.hex},$n=function(y,b,A){if(b==null&&h.is(y,"object")&&"r"in y&&"g"in y&&"b"in y&&(A=y.b,b=y.g,y=y.r),b==null&&h.is(y,"string")){var g=h.getRGB(y);y=g.r,b=g.g,A=g.b}return(y>1||b>1||A>1)&&(y/=255,b/=255,A/=255),[y,b,A]},jn=function(y,b,A,g){var w={r:y*=255,g:b*=255,b:A*=255,hex:h.rgb(y,b,A),toString:On};return h.is(g,"finite")&&(w.opacity=g),w};function Le(y,b,A){return function g(){var w=Array.prototype.slice.call(arguments,0),$=w.join("␀"),I=g.cache=g.cache||{},j=g.count=g.count||[];return I[p]($)?(function(z,X){for(var et=0,ct=z.length;et<ct;et++)if(z[et]===X)return z.push(z.splice(et,1)[0])}(j,$),A?A(I[$]):I[$]):(j.length>=1e3&&delete I[j.shift()],j.push($),I[$]=y[x](b,w),A?A(I[$]):I[$])}}h.color=function(y){var b;return h.is(y,"object")&&"h"in y&&"s"in y&&"b"in y?(b=h.hsb2rgb(y),y.r=b.r,y.g=b.g,y.b=b.b,y.hex=b.hex):h.is(y,"object")&&"h"in y&&"s"in y&&"l"in y?(b=h.hsl2rgb(y),y.r=b.r,y.g=b.g,y.b=b.b,y.hex=b.hex):(h.is(y,"string")&&(y=h.getRGB(y)),h.is(y,"object")&&"r"in y&&"g"in y&&"b"in y?(b=h.rgb2hsl(y),y.h=b.h,y.s=b.s,y.l=b.l,b=h.rgb2hsb(y),y.v=b.b):(y={hex:"none"}).r=y.g=y.b=y.h=y.s=y.v=y.l=-1),y.toString=On,y},h.hsb2rgb=function(y,b,A,g){var w,$,I,j,z;return this.is(y,"object")&&"h"in y&&"s"in y&&"b"in y&&(A=y.b,b=y.s,g=y.o,y=y.h),j=(z=A*b)*(1-lt((y=(y*=360)%360/60)%2-1)),w=$=I=A-z,jn(w+=[z,j,0,0,j,z][y=~~y],$+=[j,z,z,j,0,0][y],I+=[0,0,j,z,z,j][y],g)},h.hsl2rgb=function(y,b,A,g){var w,$,I,j,z;return this.is(y,"object")&&"h"in y&&"s"in y&&"l"in y&&(A=y.l,b=y.s,y=y.h),(y>1||b>1||A>1)&&(y/=360,b/=100,A/=100),j=(z=2*b*(A<.5?A:1-A))*(1-lt((y=(y*=360)%360/60)%2-1)),w=$=I=A-z/2,jn(w+=[z,j,0,0,j,z][y=~~y],$+=[j,z,z,j,0,0][y],I+=[0,0,j,z,z,j][y],g)},h.rgb2hsb=function(y,b,A){var g,w;return y=(A=$n(y,b,A))[0],b=A[1],A=A[2],{h:(((w=(g=tt(y,b,A))-W(y,b,A))==0?null:g==y?(b-A)/w:g==b?(A-y)/w+2:(y-b)/w+4)+360)%6*60/360,s:w==0?0:w/g,b:g,toString:Ne}},h.rgb2hsl=function(y,b,A){var g,w,$,I;return y=(A=$n(y,b,A))[0],b=A[1],A=A[2],g=((w=tt(y,b,A))+($=W(y,b,A)))/2,{h:(((I=w-$)==0?null:w==y?(b-A)/I:w==b?(A-y)/I+2:(y-b)/I+4)+360)%6*60/360,s:I==0?0:g<.5?I/(2*g):I/(2-2*g),l:g,toString:en}},h._path2string=function(){return this.join(",").replace(pt,"$1")},h._preload=function(y,b){var A=v.doc.createElement("img");A.style.cssText="position:absolute;left:-9999em;top:-9999em",A.onload=function(){b.call(this),this.onload=null,v.doc.body.removeChild(this)},A.onerror=function(){v.doc.body.removeChild(this)},v.doc.body.appendChild(A),A.src=y};function Ln(){return this.hex}function Zn(y,b){for(var A=[],g=0,w=y.length;w-2*!b>g;g+=2){var $=[{x:+y[g-2],y:+y[g-1]},{x:+y[g],y:+y[g+1]},{x:+y[g+2],y:+y[g+3]},{x:+y[g+4],y:+y[g+5]}];b?g?w-4==g?$[3]={x:+y[0],y:+y[1]}:w-2==g&&($[2]={x:+y[0],y:+y[1]},$[3]={x:+y[2],y:+y[3]}):$[0]={x:+y[w-2],y:+y[w-1]}:w-4==g?$[3]=$[2]:g||($[0]={x:+y[g],y:+y[g+1]}),A.push(["C",(-$[0].x+6*$[1].x+$[2].x)/6,(-$[0].y+6*$[1].y+$[2].y)/6,($[1].x+6*$[2].x-$[3].x)/6,($[1].y+6*$[2].y-$[3].y)/6,$[2].x,$[2].y])}return A}h.getRGB=Le(function(y){if(!y||(y=N(y)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:Ln};if(y=="none")return{r:-1,g:-1,b:-1,hex:"none",toString:Ln};!nt[p](y.toLowerCase().substring(0,2))&&y.charAt()!="#"&&(y=an(y));var b,A,g,w,$,I,j=y.match(O);return j?(j[2]&&(g=G(j[2].substring(5),16),A=G(j[2].substring(3,5),16),b=G(j[2].substring(1,3),16)),j[3]&&(g=G(($=j[3].charAt(3))+$,16),A=G(($=j[3].charAt(2))+$,16),b=G(($=j[3].charAt(1))+$,16)),j[4]&&(I=j[4][R](Z),b=D(I[0]),I[0].slice(-1)=="%"&&(b*=2.55),A=D(I[1]),I[1].slice(-1)=="%"&&(A*=2.55),g=D(I[2]),I[2].slice(-1)=="%"&&(g*=2.55),j[1].toLowerCase().slice(0,4)=="rgba"&&(w=D(I[3])),I[3]&&I[3].slice(-1)=="%"&&(w/=100)),j[5]?(I=j[5][R](Z),b=D(I[0]),I[0].slice(-1)=="%"&&(b*=2.55),A=D(I[1]),I[1].slice(-1)=="%"&&(A*=2.55),g=D(I[2]),I[2].slice(-1)=="%"&&(g*=2.55),(I[0].slice(-3)=="deg"||I[0].slice(-1)=="°")&&(b/=360),j[1].toLowerCase().slice(0,4)=="hsba"&&(w=D(I[3])),I[3]&&I[3].slice(-1)=="%"&&(w/=100),h.hsb2rgb(b,A,g,w)):j[6]?(I=j[6][R](Z),b=D(I[0]),I[0].slice(-1)=="%"&&(b*=2.55),A=D(I[1]),I[1].slice(-1)=="%"&&(A*=2.55),g=D(I[2]),I[2].slice(-1)=="%"&&(g*=2.55),(I[0].slice(-3)=="deg"||I[0].slice(-1)=="°")&&(b/=360),j[1].toLowerCase().slice(0,4)=="hsla"&&(w=D(I[3])),I[3]&&I[3].slice(-1)=="%"&&(w/=100),h.hsl2rgb(b,A,g,w)):((j={r:b,g:A,b:g,toString:Ln}).hex="#"+(16777216|g|A<<8|b<<16).toString(16).slice(1),h.is(w,"finite")&&(j.opacity=w),j)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:Ln}},h),h.hsb=Le(function(y,b,A){return h.hsb2rgb(y,b,A).hex}),h.hsl=Le(function(y,b,A){return h.hsl2rgb(y,b,A).hex}),h.rgb=Le(function(y,b,A){function g(w){return w+.5|0}return"#"+(16777216|g(A)|g(b)<<8|g(y)<<16).toString(16).slice(1)}),h.getColor=function(y){var b=this.getColor.start=this.getColor.start||{h:0,s:1,b:y||.75},A=this.hsb2rgb(b.h,b.s,b.b);return b.h+=.075,b.h>1&&(b.h=0,b.s-=.2,b.s<=0&&(this.getColor.start={h:0,s:1,b:b.b})),A.hex},h.getColor.reset=function(){delete this.start},h.parsePathString=function(y){if(!y)return null;var b=ke(y);if(b.arr)return Ee(b.arr);var A={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},g=[];return h.is(y,it)&&h.is(y[0],it)&&(g=Ee(y)),g.length||N(y).replace(kt,function(w,$,I){var j=[],z=$.toLowerCase();if(I.replace(St,function(X,et){et&&j.push(+et)}),z=="m"&&j.length>2&&(g.push([$][m](j.splice(0,2))),z="l",$=$=="m"?"l":"L"),z=="r")g.push([$][m](j));else for(;j.length>=A[z]&&(g.push([$][m](j.splice(0,A[z]))),A[z]););}),g.toString=h._path2string,b.arr=Ee(g),g},h.parseTransformString=Le(function(y){if(!y)return null;var b=[];return h.is(y,it)&&h.is(y[0],it)&&(b=Ee(y)),b.length||N(y).replace(Ft,function(A,g,w){var $=[];B.call(g),w.replace(St,function(I,j){j&&$.push(+j)}),b.push([g][m]($))}),b.toString=h._path2string,b},this,function(y){if(!y)return y;for(var b=[],A=0;A<y.length;A++){for(var g=[],w=0;w<y[A].length;w++)g.push(y[A][w]);b.push(g)}return b});var ke=function(y){var b=ke.ps=ke.ps||{};return b[y]?b[y].sleep=100:b[y]={sleep:100},setTimeout(function(){for(var A in b)b[p](A)&&A!=y&&(b[A].sleep--,!b[A].sleep&&delete b[A])}),b[y]};function Fn(y,b,A,g,w){return y*(y*(-3*b+9*A-9*g+3*w)+6*b-12*A+6*g)-3*b+3*A}function fn(y,b,A,g,w,$,I,j,z){z==null&&(z=1);for(var X=(z=z>1?1:z<0?0:z)/2,et=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],ct=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],st=0,rt=0;rt<12;rt++){var ut=X*et[rt]+X,gt=Fn(ut,y,A,w,I),dt=Fn(ut,b,g,$,j),ht=gt*gt+dt*dt;st+=ct[rt]*K.sqrt(ht)}return X*st}function Lr(y,b,A,g,w,$,I,j){if(!(tt(y,A)<W(w,I)||W(y,A)>tt(w,I)||tt(b,g)<W($,j)||W(b,g)>tt($,j))){var z=(y-A)*($-j)-(b-g)*(w-I);if(z){var X=((y*g-b*A)*(w-I)-(y-A)*(w*j-$*I))/z,et=((y*g-b*A)*($-j)-(b-g)*(w*j-$*I))/z,ct=+X.toFixed(2),st=+et.toFixed(2);if(!(ct<+W(y,A).toFixed(2)||ct>+tt(y,A).toFixed(2)||ct<+W(w,I).toFixed(2)||ct>+tt(w,I).toFixed(2)||st<+W(b,g).toFixed(2)||st>+tt(b,g).toFixed(2)||st<+W($,j).toFixed(2)||st>+tt($,j).toFixed(2)))return{x:X,y:et}}}}function Wn(y,b,A){var g=h.bezierBBox(y),w=h.bezierBBox(b);if(!h.isBBoxIntersect(g,w))return A?0:[];for(var $=fn.apply(0,y),I=fn.apply(0,b),j=tt(~~($/5),1),z=tt(~~(I/5),1),X=[],et=[],ct={},st=A?0:[],rt=0;rt<j+1;rt++){var ut=h.findDotsAtSegment.apply(h,y.concat(rt/j));X.push({x:ut.x,y:ut.y,t:rt/j})}for(rt=0;rt<z+1;rt++)ut=h.findDotsAtSegment.apply(h,b.concat(rt/z)),et.push({x:ut.x,y:ut.y,t:rt/z});for(rt=0;rt<j;rt++)for(var gt=0;gt<z;gt++){var dt=X[rt],ht=X[rt+1],Ct=et[gt],mt=et[gt+1],_t=lt(ht.x-dt.x)<.001?"y":"x",yt=lt(mt.x-Ct.x)<.001?"y":"x",Ht=Lr(dt.x,dt.y,ht.x,ht.y,Ct.x,Ct.y,mt.x,mt.y);if(Ht){if(ct[Ht.x.toFixed(4)]==Ht.y.toFixed(4))continue;ct[Ht.x.toFixed(4)]=Ht.y.toFixed(4);var Gt=dt.t+lt((Ht[_t]-dt[_t])/(ht[_t]-dt[_t]))*(ht.t-dt.t),qt=Ct.t+lt((Ht[yt]-Ct[yt])/(mt[yt]-Ct[yt]))*(mt.t-Ct.t);Gt>=0&&Gt<=1.001&&qt>=0&&qt<=1.001&&(A?st++:st.push({x:Ht.x,y:Ht.y,t1:W(Gt,1),t2:W(qt,1)}))}}return st}function vr(y,b,A){y=h._path2curve(y),b=h._path2curve(b);for(var g,w,$,I,j,z,X,et,ct,st,rt=A?0:[],ut=0,gt=y.length;ut<gt;ut++){var dt=y[ut];if(dt[0]=="M")g=j=dt[1],w=z=dt[2];else{dt[0]=="C"?(ct=[g,w].concat(dt.slice(1)),g=ct[6],w=ct[7]):(ct=[g,w,g,w,j,z,j,z],g=j,w=z);for(var ht=0,Ct=b.length;ht<Ct;ht++){var mt=b[ht];if(mt[0]=="M")$=X=mt[1],I=et=mt[2];else{mt[0]=="C"?(st=[$,I].concat(mt.slice(1)),$=st[6],I=st[7]):(st=[$,I,$,I,X,et,X,et],$=X,I=et);var _t=Wn(ct,st,A);if(A)rt+=_t;else{for(var yt=0,Ht=_t.length;yt<Ht;yt++)_t[yt].segment1=ut,_t[yt].segment2=ht,_t[yt].bez1=ct,_t[yt].bez2=st;rt=rt.concat(_t)}}}}}return rt}h.findDotsAtSegment=function(y,b,A,g,w,$,I,j,z){var X=1-z,et=wt(X,3),ct=wt(X,2),st=z*z,rt=st*z,ut=et*y+3*ct*z*A+3*X*z*z*w+rt*I,gt=et*b+3*ct*z*g+3*X*z*z*$+rt*j,dt=y+2*z*(A-y)+st*(w-2*A+y),ht=b+2*z*(g-b)+st*($-2*g+b),Ct=A+2*z*(w-A)+st*(I-2*w+A),mt=g+2*z*($-g)+st*(j-2*$+g),_t=X*y+z*A,yt=X*b+z*g,Ht=X*w+z*I,Gt=X*$+z*j,qt=90-180*K.atan2(dt-Ct,ht-mt)/bt;return(dt>Ct||ht<mt)&&(qt+=180),{x:ut,y:gt,m:{x:dt,y:ht},n:{x:Ct,y:mt},start:{x:_t,y:yt},end:{x:Ht,y:Gt},alpha:qt}},h.bezierBBox=function(y,b,A,g,w,$,I,j){h.is(y,"array")||(y=[y,b,A,g,w,$,I,j]);var z=Un.apply(null,y);return{x:z.min.x,y:z.min.y,x2:z.max.x,y2:z.max.y,width:z.max.x-z.min.x,height:z.max.y-z.min.y}},h.isPointInsideBBox=function(y,b,A){return b>=y.x&&b<=y.x2&&A>=y.y&&A<=y.y2},h.isBBoxIntersect=function(y,b){var A=h.isPointInsideBBox;return A(b,y.x,y.y)||A(b,y.x2,y.y)||A(b,y.x,y.y2)||A(b,y.x2,y.y2)||A(y,b.x,b.y)||A(y,b.x2,b.y)||A(y,b.x,b.y2)||A(y,b.x2,b.y2)||(y.x<b.x2&&y.x>b.x||b.x<y.x2&&b.x>y.x)&&(y.y<b.y2&&y.y>b.y||b.y<y.y2&&b.y>y.y)},h.pathIntersection=function(y,b){return vr(y,b)},h.pathIntersectionNumber=function(y,b){return vr(y,b,1)},h.isPointInsidePath=function(y,b,A){var g=h.pathBBox(y);return h.isPointInsideBBox(g,b,A)&&vr(y,[["M",b,A],["H",g.x2+10]],1)%2==1},h._removedFactory=function(y){return function(){o("raphael.log",null,"Raphaël: you are calling to method “"+y+"” of removed object",y)}};var _n=h.pathBBox=function(y){var b=ke(y);if(b.bbox)return Pe(b.bbox);if(!y)return{x:0,y:0,width:0,height:0,x2:0,y2:0};for(var A,g=0,w=0,$=[],I=[],j=0,z=(y=Gr(y)).length;j<z;j++)if((A=y[j])[0]=="M")g=A[1],w=A[2],$.push(g),I.push(w);else{var X=Un(g,w,A[1],A[2],A[3],A[4],A[5],A[6]);$=$[m](X.min.x,X.max.x),I=I[m](X.min.y,X.max.y),g=A[5],w=A[6]}var et=W[x](0,$),ct=W[x](0,I),st=tt[x](0,$),rt=tt[x](0,I),ut=st-et,gt=rt-ct,dt={x:et,y:ct,x2:st,y2:rt,width:ut,height:gt,cx:et+ut/2,cy:ct+gt/2};return b.bbox=Pe(dt),dt},Ee=function(y){var b=Pe(y);return b.toString=h._path2string,b},vs=h._pathToRelative=function(y){var b=ke(y);if(b.rel)return Ee(b.rel);h.is(y,it)&&h.is(y&&y[0],it)||(y=h.parsePathString(y));var A=[],g=0,w=0,$=0,I=0,j=0;y[0][0]=="M"&&($=g=y[0][1],I=w=y[0][2],j++,A.push(["M",g,w]));for(var z=j,X=y.length;z<X;z++){var et=A[z]=[],ct=y[z];if(ct[0]!=B.call(ct[0]))switch(et[0]=B.call(ct[0]),et[0]){case"a":et[1]=ct[1],et[2]=ct[2],et[3]=ct[3],et[4]=ct[4],et[5]=ct[5],et[6]=+(ct[6]-g).toFixed(3),et[7]=+(ct[7]-w).toFixed(3);break;case"v":et[1]=+(ct[1]-w).toFixed(3);break;case"m":$=ct[1],I=ct[2];default:for(var st=1,rt=ct.length;st<rt;st++)et[st]=+(ct[st]-(st%2?g:w)).toFixed(3)}else{et=A[z]=[],ct[0]=="m"&&($=ct[1]+g,I=ct[2]+w);for(var ut=0,gt=ct.length;ut<gt;ut++)A[z][ut]=ct[ut]}var dt=A[z].length;switch(A[z][0]){case"z":g=$,w=I;break;case"h":g+=+A[z][dt-1];break;case"v":w+=+A[z][dt-1];break;default:g+=+A[z][dt-2],w+=+A[z][dt-1]}}return A.toString=h._path2string,b.rel=Ee(A),A},tr=h._pathToAbsolute=function(y){var b=ke(y);if(b.abs)return Ee(b.abs);if(h.is(y,it)&&h.is(y&&y[0],it)||(y=h.parsePathString(y)),!y||!y.length)return[["M",0,0]];var A=[],g=0,w=0,$=0,I=0,j=0;y[0][0]=="M"&&($=g=+y[0][1],I=w=+y[0][2],j++,A[0]=["M",g,w]);for(var z,X,et=y.length==3&&y[0][0]=="M"&&y[1][0].toUpperCase()=="R"&&y[2][0].toUpperCase()=="Z",ct=j,st=y.length;ct<st;ct++){if(A.push(z=[]),(X=y[ct])[0]!=M.call(X[0]))switch(z[0]=M.call(X[0]),z[0]){case"A":z[1]=X[1],z[2]=X[2],z[3]=X[3],z[4]=X[4],z[5]=X[5],z[6]=+(X[6]+g),z[7]=+(X[7]+w);break;case"V":z[1]=+X[1]+w;break;case"H":z[1]=+X[1]+g;break;case"R":for(var rt=[g,w][m](X.slice(1)),ut=2,gt=rt.length;ut<gt;ut++)rt[ut]=+rt[ut]+g,rt[++ut]=+rt[ut]+w;A.pop(),A=A[m](Zn(rt,et));break;case"M":$=+X[1]+g,I=+X[2]+w;default:for(ut=1,gt=X.length;ut<gt;ut++)z[ut]=+X[ut]+(ut%2?g:w)}else if(X[0]=="R")rt=[g,w][m](X.slice(1)),A.pop(),A=A[m](Zn(rt,et)),z=["R"][m](X.slice(-2));else for(var dt=0,ht=X.length;dt<ht;dt++)z[dt]=X[dt];switch(z[0]){case"Z":g=$,w=I;break;case"H":g=z[1];break;case"V":w=z[1];break;case"M":$=z[z.length-2],I=z[z.length-1];default:g=z[z.length-2],w=z[z.length-1]}}return A.toString=h._path2string,b.abs=Ee(A),A},er=function(y,b,A,g){return[y,b,A,g,A,g]},wn=function(y,b,A,g,w,$){return[1/3*y+2/3*A,1/3*b+2/3*g,1/3*w+2/3*A,1/3*$+2/3*g,w,$]},Ur=function(y,b,A,g,w,$,I,j,z,X){var et,ct=120*bt/180,st=bt/180*(+w||0),rt=[],ut=Le(function(Vv,Bv,Bl){return{x:Vv*K.cos(Bl)-Bv*K.sin(Bl),y:Vv*K.sin(Bl)+Bv*K.cos(Bl)}});if(X)Gt=X[0],qt=X[1],yt=X[2],Ht=X[3];else{y=(et=ut(y,b,-st)).x,b=et.y,j=(et=ut(j,z,-st)).x,z=et.y;var gt=(y-j)/2,dt=(b-z)/2,ht=gt*gt/(A*A)+dt*dt/(g*g);ht>1&&(A*=ht=K.sqrt(ht),g*=ht);var Ct=A*A,mt=g*g,_t=($==I?-1:1)*K.sqrt(lt((Ct*mt-Ct*dt*dt-mt*gt*gt)/(Ct*dt*dt+mt*gt*gt))),yt=_t*A*dt/g+(y+j)/2,Ht=_t*-g*gt/A+(b+z)/2,Gt=K.asin(((b-Ht)/g).toFixed(9)),qt=K.asin(((z-Ht)/g).toFixed(9));(Gt=y<yt?bt-Gt:Gt)<0&&(Gt=2*bt+Gt),(qt=j<yt?bt-qt:qt)<0&&(qt=2*bt+qt),I&&Gt>qt&&(Gt-=2*bt),!I&&qt>Gt&&(qt-=2*bt)}var _s=qt-Gt;if(lt(_s)>ct){var uo=qt,Sn=j,_r=z;qt=Gt+ct*(I&&qt>Gt?1:-1),j=yt+A*K.cos(qt),z=Ht+g*K.sin(qt),rt=Ur(j,z,A,g,w,0,I,Sn,_r,[qt,uo,yt,Ht])}_s=qt-Gt;var ws=K.cos(Gt),xs=K.sin(Gt),zl=K.cos(qt),Hr=K.sin(qt),Hi=K.tan(_s/4),Vl=4/3*A*Hi,jv=4/3*g*Hi,Lv=[y,b],bs=[y+Vl*xs,b-jv*ws],Uv=[j+Vl*Hr,z-jv*zl],Gv=[j,z];if(bs[0]=2*Lv[0]-bs[0],bs[1]=2*Lv[1]-bs[1],X)return[bs,Uv,Gv][m](rt);for(var zv=[],di=0,$O=(rt=[bs,Uv,Gv][m](rt).join()[R](",")).length;di<$O;di++)zv[di]=di%2?ut(rt[di-1],rt[di],st).y:ut(rt[di],rt[di+1],st).x;return zv},nr=function(y,b,A,g,w,$,I,j,z){var X=1-z;return{x:wt(X,3)*y+3*wt(X,2)*z*A+3*X*z*z*w+wt(z,3)*I,y:wt(X,3)*b+3*wt(X,2)*z*g+3*X*z*z*$+wt(z,3)*j}},Un=Le(function(y,b,A,g,w,$,I,j){var z,X=w-2*A+y-(I-2*w+A),et=2*(A-y)-2*(w-A),ct=y-A,st=(-et+K.sqrt(et*et-4*X*ct))/2/X,rt=(-et-K.sqrt(et*et-4*X*ct))/2/X,ut=[b,j],gt=[y,I];return lt(st)>"1e12"&&(st=.5),lt(rt)>"1e12"&&(rt=.5),st>0&&st<1&&(z=nr(y,b,A,g,w,$,I,j,st),gt.push(z.x),ut.push(z.y)),rt>0&&rt<1&&(z=nr(y,b,A,g,w,$,I,j,rt),gt.push(z.x),ut.push(z.y)),X=$-2*g+b-(j-2*$+g),ct=b-g,st=(-(et=2*(g-b)-2*($-g))+K.sqrt(et*et-4*X*ct))/2/X,rt=(-et-K.sqrt(et*et-4*X*ct))/2/X,lt(st)>"1e12"&&(st=.5),lt(rt)>"1e12"&&(rt=.5),st>0&&st<1&&(z=nr(y,b,A,g,w,$,I,j,st),gt.push(z.x),ut.push(z.y)),rt>0&&rt<1&&(z=nr(y,b,A,g,w,$,I,j,rt),gt.push(z.x),ut.push(z.y)),{min:{x:W[x](0,gt),y:W[x](0,ut)},max:{x:tt[x](0,gt),y:tt[x](0,ut)}}}),Gr=h._path2curve=Le(function(y,b){var A=!b&&ke(y);if(!b&&A.curve)return Ee(A.curve);for(var g=tr(y),w=b&&tr(b),$={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},I={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},j=function(_t,yt,Ht){var Gt,qt;if(!_t)return["C",yt.x,yt.y,yt.x,yt.y,yt.x,yt.y];switch(!(_t[0]in{T:1,Q:1})&&(yt.qx=yt.qy=null),_t[0]){case"M":yt.X=_t[1],yt.Y=_t[2];break;case"A":_t=["C"][m](Ur[x](0,[yt.x,yt.y][m](_t.slice(1))));break;case"S":Ht=="C"||Ht=="S"?(Gt=2*yt.x-yt.bx,qt=2*yt.y-yt.by):(Gt=yt.x,qt=yt.y),_t=["C",Gt,qt][m](_t.slice(1));break;case"T":Ht=="Q"||Ht=="T"?(yt.qx=2*yt.x-yt.qx,yt.qy=2*yt.y-yt.qy):(yt.qx=yt.x,yt.qy=yt.y),_t=["C"][m](wn(yt.x,yt.y,yt.qx,yt.qy,_t[1],_t[2]));break;case"Q":yt.qx=_t[1],yt.qy=_t[2],_t=["C"][m](wn(yt.x,yt.y,_t[1],_t[2],_t[3],_t[4]));break;case"L":_t=["C"][m](er(yt.x,yt.y,_t[1],_t[2]));break;case"H":_t=["C"][m](er(yt.x,yt.y,_t[1],yt.y));break;case"V":_t=["C"][m](er(yt.x,yt.y,yt.x,_t[1]));break;case"Z":_t=["C"][m](er(yt.x,yt.y,yt.X,yt.Y))}return _t},z=function(_t,yt){if(_t[yt].length>7){_t[yt].shift();for(var Ht=_t[yt];Ht.length;)et[yt]="A",w&&(ct[yt]="A"),_t.splice(yt++,0,["C"][m](Ht.splice(0,6)));_t.splice(yt,1),gt=tt(g.length,w&&w.length||0)}},X=function(_t,yt,Ht,Gt,qt){_t&&yt&&_t[qt][0]=="M"&&yt[qt][0]!="M"&&(yt.splice(qt,0,["M",Gt.x,Gt.y]),Ht.bx=0,Ht.by=0,Ht.x=_t[qt][1],Ht.y=_t[qt][2],gt=tt(g.length,w&&w.length||0))},et=[],ct=[],st="",rt="",ut=0,gt=tt(g.length,w&&w.length||0);ut<gt;ut++){g[ut]&&(st=g[ut][0]),st!="C"&&(et[ut]=st,ut&&(rt=et[ut-1])),g[ut]=j(g[ut],$,rt),et[ut]!="A"&&st=="C"&&(et[ut]="C"),z(g,ut),w&&(w[ut]&&(st=w[ut][0]),st!="C"&&(ct[ut]=st,ut&&(rt=ct[ut-1])),w[ut]=j(w[ut],I,rt),ct[ut]!="A"&&st=="C"&&(ct[ut]="C"),z(w,ut)),X(g,w,$,I,ut),X(w,g,I,$,ut);var dt=g[ut],ht=w&&w[ut],Ct=dt.length,mt=w&&ht.length;$.x=dt[Ct-2],$.y=dt[Ct-1],$.bx=D(dt[Ct-4])||$.x,$.by=D(dt[Ct-3])||$.y,I.bx=w&&(D(ht[mt-4])||I.x),I.by=w&&(D(ht[mt-3])||I.y),I.x=w&&ht[mt-2],I.y=w&&ht[mt-1]}return w||(A.curve=Ee(g)),w?[g,w]:g},null,Ee),zr=(h._parseDots=Le(function(y){for(var b=[],A=0,g=y.length;A<g;A++){var w={},$=y[A].match(/^([^:]*):?([\d\.]*)/);if(w.color=h.getRGB($[1]),w.color.error)return null;w.opacity=w.color.opacity,w.color=w.color.hex,$[2]&&(w.offset=$[2]+"%"),b.push(w)}for(A=1,g=b.length-1;A<g;A++)if(!b[A].offset){for(var I=D(b[A-1].offset||0),j=0,z=A+1;z<g;z++)if(b[z].offset){j=b[z].offset;break}j||(j=100,z=g);for(var X=((j=D(j))-I)/(z-A+1);A<z;A++)I+=X,b[A].offset=I+"%"}return b}),h._tear=function(y,b){y==b.top&&(b.top=y.prev),y==b.bottom&&(b.bottom=y.next),y.next&&(y.next.prev=y.prev),y.prev&&(y.prev.next=y.next)}),H=(h._tofront=function(y,b){b.top!==y&&(zr(y,b),y.next=null,y.prev=b.top,b.top.next=y,b.top=y)},h._toback=function(y,b){b.bottom!==y&&(zr(y,b),y.next=b.bottom,y.prev=null,b.bottom.prev=y,b.bottom=y)},h._insertafter=function(y,b,A){zr(y,A),b==A.top&&(A.top=y),b.next&&(b.next.prev=y),y.next=b.next,y.prev=b,b.next=y},h._insertbefore=function(y,b,A){zr(y,A),b==A.bottom&&(A.bottom=y),b.prev&&(b.prev.next=y),y.prev=b.prev,b.prev=y,y.next=b},h.toMatrix=function(y,b){var A=_n(y),g={_:{transform:F},getBBox:function(){return A}};return J(g,b),g.matrix}),J=(h.transformPath=function(y,b){return ue(y,H(y,b))},h._extractTransform=function(y,b){if(b==null)return y._.transform;b=N(b).replace(/\.{3}|\u2026/g,y._.transform||F);var A,g,w=h.parseTransformString(b),$=0,I=1,j=1,z=y._,X=new ot;if(z.transform=w||[],w)for(var et=0,ct=w.length;et<ct;et++){var st,rt,ut,gt,dt,ht=w[et],Ct=ht.length,mt=N(ht[0]).toLowerCase(),_t=ht[0]!=mt,yt=_t?X.invert():0;mt=="t"&&Ct==3?_t?(st=yt.x(0,0),rt=yt.y(0,0),ut=yt.x(ht[1],ht[2]),gt=yt.y(ht[1],ht[2]),X.translate(ut-st,gt-rt)):X.translate(ht[1],ht[2]):mt=="r"?Ct==2?(dt=dt||y.getBBox(1),X.rotate(ht[1],dt.x+dt.width/2,dt.y+dt.height/2),$+=ht[1]):Ct==4&&(_t?(ut=yt.x(ht[2],ht[3]),gt=yt.y(ht[2],ht[3]),X.rotate(ht[1],ut,gt)):X.rotate(ht[1],ht[2],ht[3]),$+=ht[1]):mt=="s"?Ct==2||Ct==3?(dt=dt||y.getBBox(1),X.scale(ht[1],ht[Ct-1],dt.x+dt.width/2,dt.y+dt.height/2),I*=ht[1],j*=ht[Ct-1]):Ct==5&&(_t?(ut=yt.x(ht[3],ht[4]),gt=yt.y(ht[3],ht[4]),X.scale(ht[1],ht[2],ut,gt)):X.scale(ht[1],ht[2],ht[3],ht[4]),I*=ht[1],j*=ht[2]):mt=="m"&&Ct==7&&X.add(ht[1],ht[2],ht[3],ht[4],ht[5],ht[6]),z.dirtyT=1,y.matrix=X}y.matrix=X,z.sx=I,z.sy=j,z.deg=$,z.dx=A=X.e,z.dy=g=X.f,I==1&&j==1&&!$&&z.bbox?(z.bbox.x+=+A,z.bbox.y+=+g):z.dirtyT=1}),Q=function(y){var b=y[0];switch(b.toLowerCase()){case"t":return[b,0,0];case"m":return[b,1,0,0,1,0,0];case"r":return y.length==4?[b,0,y[2],y[3]]:[b,0];case"s":return y.length==5?[b,1,1,y[3],y[4]]:y.length==3?[b,1,1]:[b,1]}},at=h._equaliseTransform=function(y,b){b=N(b).replace(/\.{3}|\u2026/g,y),y=h.parseTransformString(y)||[],b=h.parseTransformString(b)||[];for(var A,g,w,$,I=tt(y.length,b.length),j=[],z=[],X=0;X<I;X++){if(w=y[X]||Q(b[X]),$=b[X]||Q(w),w[0]!=$[0]||w[0].toLowerCase()=="r"&&(w[2]!=$[2]||w[3]!=$[3])||w[0].toLowerCase()=="s"&&(w[3]!=$[3]||w[4]!=$[4]))return;for(j[X]=[],z[X]=[],A=0,g=tt(w.length,$.length);A<g;A++)A in w&&(j[X][A]=w[A]),A in $&&(z[X][A]=$[A])}return{from:j,to:z}};function ot(y,b,A,g,w,$){y!=null?(this.a=+y,this.b=+b,this.c=+A,this.d=+g,this.e=+w,this.f=+$):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0)}h._getContainer=function(y,b,A,g){var w;if((w=g!=null||h.is(y,"object")?y:v.doc.getElementById(y))!=null)return w.tagName?b==null?{container:w,width:w.style.pixelWidth||w.offsetWidth,height:w.style.pixelHeight||w.offsetHeight}:{container:w,width:b,height:A}:{container:1,x:y,y:b,width:A,height:g}},h.pathToRelative=vs,h._engine={},h.path2curve=Gr,h.matrix=function(y,b,A,g,w,$){return new ot(y,b,A,g,w,$)},function(y){function b(g){return g[0]*g[0]+g[1]*g[1]}function A(g){var w=K.sqrt(b(g));g[0]&&(g[0]/=w),g[1]&&(g[1]/=w)}y.add=function(g,w,$,I,j,z){var X,et,ct,st,rt=[[],[],[]],ut=[[this.a,this.c,this.e],[this.b,this.d,this.f],[0,0,1]],gt=[[g,$,j],[w,I,z],[0,0,1]];for(g&&g instanceof ot&&(gt=[[g.a,g.c,g.e],[g.b,g.d,g.f],[0,0,1]]),X=0;X<3;X++)for(et=0;et<3;et++){for(st=0,ct=0;ct<3;ct++)st+=ut[X][ct]*gt[ct][et];rt[X][et]=st}this.a=rt[0][0],this.b=rt[1][0],this.c=rt[0][1],this.d=rt[1][1],this.e=rt[0][2],this.f=rt[1][2]},y.invert=function(){var g=this,w=g.a*g.d-g.b*g.c;return new ot(g.d/w,-g.b/w,-g.c/w,g.a/w,(g.c*g.f-g.d*g.e)/w,(g.b*g.e-g.a*g.f)/w)},y.clone=function(){return new ot(this.a,this.b,this.c,this.d,this.e,this.f)},y.translate=function(g,w){this.add(1,0,0,1,g,w)},y.scale=function(g,w,$,I){w==null&&(w=g),($||I)&&this.add(1,0,0,1,$,I),this.add(g,0,0,w,0,0),($||I)&&this.add(1,0,0,1,-$,-I)},y.rotate=function(g,w,$){g=h.rad(g),w=w||0,$=$||0;var I=+K.cos(g).toFixed(9),j=+K.sin(g).toFixed(9);this.add(I,j,-j,I,w,$),this.add(1,0,0,1,-w,-$)},y.x=function(g,w){return g*this.a+w*this.c+this.e},y.y=function(g,w){return g*this.b+w*this.d+this.f},y.get=function(g){return+this[N.fromCharCode(97+g)].toFixed(4)},y.toString=function(){return h.svg?"matrix("+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)].join()+")":[this.get(0),this.get(2),this.get(1),this.get(3),0,0].join()},y.toFilter=function(){return"progid:DXImageTransform.Microsoft.Matrix(M11="+this.get(0)+", M12="+this.get(2)+", M21="+this.get(1)+", M22="+this.get(3)+", Dx="+this.get(4)+", Dy="+this.get(5)+", sizingmethod='auto expand')"},y.offset=function(){return[this.e.toFixed(4),this.f.toFixed(4)]},y.split=function(){var g={};g.dx=this.e,g.dy=this.f;var w=[[this.a,this.c],[this.b,this.d]];g.scalex=K.sqrt(b(w[0])),A(w[0]),g.shear=w[0][0]*w[1][0]+w[0][1]*w[1][1],w[1]=[w[1][0]-w[0][0]*g.shear,w[1][1]-w[0][1]*g.shear],g.scaley=K.sqrt(b(w[1])),A(w[1]),g.shear/=g.scaley;var $=-w[0][1],I=w[1][1];return I<0?(g.rotate=h.deg(K.acos(I)),$<0&&(g.rotate=360-g.rotate)):g.rotate=h.deg(K.asin($)),g.isSimple=!(+g.shear.toFixed(9)||g.scalex.toFixed(9)!=g.scaley.toFixed(9)&&g.rotate),g.isSuperSimple=!+g.shear.toFixed(9)&&g.scalex.toFixed(9)==g.scaley.toFixed(9)&&!g.rotate,g.noRotation=!+g.shear.toFixed(9)&&!g.rotate,g},y.toTransformString=function(g){var w=g||this[R]();return w.isSimple?(w.scalex=+w.scalex.toFixed(4),w.scaley=+w.scaley.toFixed(4),w.rotate=+w.rotate.toFixed(4),(w.dx||w.dy?"t"+[w.dx,w.dy]:F)+(w.scalex!=1||w.scaley!=1?"s"+[w.scalex,w.scaley,0,0]:F)+(w.rotate?"r"+[w.rotate,0,0]:F)):"m"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)]}}(ot.prototype);for(var Mt=function(){this.returnValue=!1},Nt=function(){return this.originalEvent.preventDefault()},re=function(){this.cancelBubble=!0},Ce=function(){return this.originalEvent.stopPropagation()},he=function(y){var b=v.doc.documentElement.scrollTop||v.doc.body.scrollTop,A=v.doc.documentElement.scrollLeft||v.doc.body.scrollLeft;return{x:y.clientX+A,y:y.clientY+b}},Yt=v.doc.addEventListener?function(y,b,A,g){var w=function(I){var j=he(I);return A.call(g,I,j.x,j.y)};if(y.addEventListener(b,w,!1),k&&U[b]){var $=function(I){for(var j=he(I),z=I,X=0,et=I.targetTouches&&I.targetTouches.length;X<et;X++)if(I.targetTouches[X].target==y){(I=I.targetTouches[X]).originalEvent=z,I.preventDefault=Nt,I.stopPropagation=Ce;break}return A.call(g,I,j.x,j.y)};y.addEventListener(U[b],$,!1)}return function(){return y.removeEventListener(b,w,!1),k&&U[b]&&y.removeEventListener(U[b],$,!1),!0}}:v.doc.attachEvent?function(y,b,A,g){var w=function($){$=$||v.win.event;var I=v.doc.documentElement.scrollTop||v.doc.body.scrollTop,j=v.doc.documentElement.scrollLeft||v.doc.body.scrollLeft,z=$.clientX+j,X=$.clientY+I;return $.preventDefault=$.preventDefault||Mt,$.stopPropagation=$.stopPropagation||re,A.call(g,$,z,X)};return y.attachEvent("on"+b,w),function(){return y.detachEvent("on"+b,w),!0}}:void 0,Qt=[],fe=function(y){for(var b,A=y.clientX,g=y.clientY,w=v.doc.documentElement.scrollTop||v.doc.body.scrollTop,$=v.doc.documentElement.scrollLeft||v.doc.body.scrollLeft,I=Qt.length;I--;){if(b=Qt[I],k&&y.touches){for(var j,z=y.touches.length;z--;)if((j=y.touches[z]).identifier==b.el._drag.id){A=j.clientX,g=j.clientY,(y.originalEvent?y.originalEvent:y).preventDefault();break}}else y.preventDefault();var X,et=b.el.node,ct=et.nextSibling,st=et.parentNode,rt=et.style.display;v.win.opera&&st.removeChild(et),et.style.display="none",X=b.el.paper.getElementByPoint(A,g),et.style.display=rt,v.win.opera&&(ct?st.insertBefore(et,ct):st.appendChild(et)),X&&o("raphael.drag.over."+b.el.id,b.el,X),A+=$,g+=w,o("raphael.drag.move."+b.el.id,b.move_scope||b.el,A-b.el._drag.x,g-b.el._drag.y,A,g,y)}},Ut=function(y){h.unmousemove(fe).unmouseup(Ut);for(var b,A=Qt.length;A--;)(b=Qt[A]).el._drag={},o("raphael.drag.end."+b.el.id,b.end_scope||b.start_scope||b.move_scope||b.el,y);Qt=[]},It=h.el={},pe=L.length;pe--;)(function(y){h[y]=It[y]=function(b,A){return h.is(b,"function")&&(this.events=this.events||[],this.events.push({name:y,f:b,unbind:Yt(this.shape||this.node||v.doc,y,b,A||this)})),this},h["un"+y]=It["un"+y]=function(b){for(var A=this.events||[],g=A.length;g--;)A[g].name!=y||!h.is(b,"undefined")&&A[g].f!=b||(A[g].unbind(),A.splice(g,1),!A.length&&delete this.events);return this}})(L[pe]);It.data=function(y,b){var A=At[this.id]=At[this.id]||{};if(arguments.length==0)return A;if(arguments.length==1){if(h.is(y,"object")){for(var g in y)y[p](g)&&this.data(g,y[g]);return this}return o("raphael.data.get."+this.id,this,A[y],y),A[y]}return A[y]=b,o("raphael.data.set."+this.id,this,b,y),this},It.removeData=function(y){return y==null?delete At[this.id]:At[this.id]&&delete At[this.id][y],this},It.getData=function(){return Pe(At[this.id]||{})},It.hover=function(y,b,A,g){return this.mouseover(y,A).mouseout(b,g||A)},It.unhover=function(y,b){return this.unmouseover(y).unmouseout(b)};var Ue=[];It.drag=function(y,b,A,g,w,$){function I(j){(j.originalEvent||j).preventDefault();var z=j.clientX,X=j.clientY,et=v.doc.documentElement.scrollTop||v.doc.body.scrollTop,ct=v.doc.documentElement.scrollLeft||v.doc.body.scrollLeft;if(this._drag.id=j.identifier,k&&j.touches){for(var st,rt=j.touches.length;rt--;)if(st=j.touches[rt],this._drag.id=st.identifier,st.identifier==this._drag.id){z=st.clientX,X=st.clientY;break}}this._drag.x=z+ct,this._drag.y=X+et,!Qt.length&&h.mousemove(fe).mouseup(Ut),Qt.push({el:this,move_scope:g,start_scope:w,end_scope:$}),b&&o.on("raphael.drag.start."+this.id,b),y&&o.on("raphael.drag.move."+this.id,y),A&&o.on("raphael.drag.end."+this.id,A),o("raphael.drag.start."+this.id,w||g||this,this._drag.x,this._drag.y,j)}return this._drag={},Ue.push({el:this,start:I}),this.mousedown(I),this},It.onDragOver=function(y){y?o.on("raphael.drag.over."+this.id,y):o.unbind("raphael.drag.over."+this.id)},It.undrag=function(){for(var y=Ue.length;y--;)Ue[y].el==this&&(this.unmousedown(Ue[y].start),Ue.splice(y,1),o.unbind("raphael.drag.*."+this.id));!Ue.length&&h.unmousemove(fe).unmouseup(Ut),Qt=[]},c.circle=function(y,b,A){var g=h._engine.circle(this,y||0,b||0,A||0);return this.__set__&&this.__set__.push(g),g},c.rect=function(y,b,A,g,w){var $=h._engine.rect(this,y||0,b||0,A||0,g||0,w||0);return this.__set__&&this.__set__.push($),$},c.ellipse=function(y,b,A,g){var w=h._engine.ellipse(this,y||0,b||0,A||0,g||0);return this.__set__&&this.__set__.push(w),w},c.path=function(y){y&&!h.is(y,"string")&&!h.is(y[0],it)&&(y+=F);var b=h._engine.path(h.format[x](h,arguments),this);return this.__set__&&this.__set__.push(b),b},c.image=function(y,b,A,g,w){var $=h._engine.image(this,y||"about:blank",b||0,A||0,g||0,w||0);return this.__set__&&this.__set__.push($),$},c.text=function(y,b,A){var g=h._engine.text(this,y||0,b||0,N(A));return this.__set__&&this.__set__.push(g),g},c.set=function(y){!h.is(y,"array")&&(y=Array.prototype.splice.call(arguments,0,arguments.length));var b=new Vi(y);return this.__set__&&this.__set__.push(b),b.paper=this,b.type="set",b},c.setStart=function(y){this.__set__=y||this.set()},c.setFinish=function(y){var b=this.__set__;return delete this.__set__,b},c.getSize=function(){var y=this.canvas.parentNode;return{width:y.offsetWidth,height:y.offsetHeight}},c.setSize=function(y,b){return h._engine.setSize.call(this,y,b)},c.setViewBox=function(y,b,A,g,w){return h._engine.setViewBox.call(this,y,b,A,g,w)},c.top=c.bottom=null,c.raphael=h;function xn(){return this.x+P+this.y+P+this.width+" × "+this.height}c.getElementByPoint=function(y,b){var A,g,w,$,I,j,z,X=this.canvas,et=v.doc.elementFromPoint(y,b);if(v.win.opera&&et.tagName=="svg"){var ct=(g=(A=X).getBoundingClientRect(),w=A.ownerDocument,$=w.body,I=w.documentElement,j=I.clientTop||$.clientTop||0,z=I.clientLeft||$.clientLeft||0,{y:g.top+(v.win.pageYOffset||I.scrollTop||$.scrollTop)-j,x:g.left+(v.win.pageXOffset||I.scrollLeft||$.scrollLeft)-z}),st=X.createSVGRect();st.x=y-ct.x,st.y=b-ct.y,st.width=st.height=1;var rt=X.getIntersectionList(st,null);rt.length&&(et=rt[rt.length-1])}if(!et)return null;for(;et.parentNode&&et!=X.parentNode&&!et.raphael;)et=et.parentNode;return et==this.canvas.parentNode&&(et=X),et=et&&et.raphael?this.getById(et.raphaelid):null},c.getElementsByBBox=function(y){var b=this.set();return this.forEach(function(A){h.isBBoxIntersect(A.getBBox(),y)&&b.push(A)}),b},c.getById=function(y){for(var b=this.bottom;b;){if(b.id==y)return b;b=b.next}return null},c.forEach=function(y,b){for(var A=this.bottom;A;){if(y.call(b,A)===!1)return this;A=A.next}return this},c.getElementsByPoint=function(y,b){var A=this.set();return this.forEach(function(g){g.isPointInside(y,b)&&A.push(g)}),A},It.isPointInside=function(y,b){var A=this.realPath=Jt[this.type](this);return this.attr("transform")&&this.attr("transform").length&&(A=h.transformPath(A,this.attr("transform"))),h.isPointInsidePath(A,y,b)},It.getBBox=function(y){if(this.removed)return{};var b=this._;return y?(!b.dirty&&b.bboxwt||(this.realPath=Jt[this.type](this),b.bboxwt=_n(this.realPath),b.bboxwt.toString=xn,b.dirty=0),b.bboxwt):((b.dirty||b.dirtyT||!b.bbox)&&(!b.dirty&&this.realPath||(b.bboxwt=0,this.realPath=Jt[this.type](this)),b.bbox=_n(ue(this.realPath,this.matrix)),b.bbox.toString=xn,b.dirty=b.dirtyT=0),b.bbox)},It.clone=function(){if(this.removed)return null;var y=this.paper[this.type]().attr(this.attr());return this.__set__&&this.__set__.push(y),y},It.glow=function(y){if(this.type=="text")return null;var b={width:((y=y||{}).width||10)+(+this.attr("stroke-width")||1),fill:y.fill||!1,opacity:y.opacity==null?.5:y.opacity,offsetx:y.offsetx||0,offsety:y.offsety||0,color:y.color||"#000"},A=b.width/2,g=this.paper,w=g.set(),$=this.realPath||Jt[this.type](this);$=this.matrix?ue($,this.matrix):$;for(var I=1;I<A+1;I++)w.push(g.path($).attr({stroke:b.color,fill:b.fill?b.color:"none","stroke-linejoin":"round","stroke-linecap":"round","stroke-width":+(b.width/A*I).toFixed(3),opacity:+(b.opacity/A).toFixed(3)}));return w.insertBefore(this).translate(b.offsetx,b.offsety)};var _e=function(y,b,A,g,w,$,I,j,z){return z==null?fn(y,b,A,g,w,$,I,j):h.findDotsAtSegment(y,b,A,g,w,$,I,j,function(X,et,ct,st,rt,ut,gt,dt,ht){if(!(ht<0||fn(X,et,ct,st,rt,ut,gt,dt)<ht)){var Ct,mt=.5,_t=1-mt;for(Ct=fn(X,et,ct,st,rt,ut,gt,dt,_t);lt(Ct-ht)>.01;)Ct=fn(X,et,ct,st,rt,ut,gt,dt,_t+=(Ct<ht?1:-1)*(mt/=2));return _t}}(y,b,A,g,w,$,I,j,z))},Ge=function(y,b){return function(A,g,w){for(var $,I,j,z,X,et="",ct={},st=0,rt=0,ut=(A=Gr(A)).length;rt<ut;rt++){if((j=A[rt])[0]=="M")$=+j[1],I=+j[2];else{if(st+(z=_e($,I,j[1],j[2],j[3],j[4],j[5],j[6]))>g){if(b&&!ct.start){if(et+=["C"+(X=_e($,I,j[1],j[2],j[3],j[4],j[5],j[6],g-st)).start.x,X.start.y,X.m.x,X.m.y,X.x,X.y],w)return et;ct.start=et,et=["M"+X.x,X.y+"C"+X.n.x,X.n.y,X.end.x,X.end.y,j[5],j[6]].join(),st+=z,$=+j[5],I=+j[6];continue}if(!y&&!b)return{x:(X=_e($,I,j[1],j[2],j[3],j[4],j[5],j[6],g-st)).x,y:X.y,alpha:X.alpha}}st+=z,$=+j[5],I=+j[6]}et+=j.shift()+j}return ct.end=et,(X=y?st:b?ct:h.findDotsAtSegment($,I,j[0],j[1],j[2],j[3],j[4],j[5],1)).alpha&&(X={x:X.x,y:X.y,alpha:X.alpha}),X}},qe=Ge(1),ze=Ge(),Re=Ge(0,1);h.getTotalLength=qe,h.getPointAtLength=ze,h.getSubpath=function(y,b,A){if(this.getTotalLength(y)-A<1e-6)return Re(y,b).end;var g=Re(y,A,1);return b?Re(g,b).end:g},It.getTotalLength=function(){var y=this.getPath();if(y)return this.node.getTotalLength?this.node.getTotalLength():qe(y)},It.getPointAtLength=function(y){var b=this.getPath();if(b)return ze(b,y)},It.getPath=function(){var y,b=h._getPath[this.type];if(this.type!="text"&&this.type!="set")return b&&(y=b(this)),y},It.getSubpath=function(y,b){var A=this.getPath();if(A)return h.getSubpath(A,y,b)};var ae=h.easing_formulas={linear:function(y){return y},"<":function(y){return wt(y,1.7)},">":function(y){return wt(y,.48)},"<>":function(y){var b=.48-y/1.04,A=K.sqrt(.1734+b*b),g=A-b,w=-A-b,$=wt(lt(g),1/3)*(g<0?-1:1)+wt(lt(w),1/3)*(w<0?-1:1)+.5;return 3*(1-$)*$*$+$*$*$},backIn:function(y){var b=1.70158;return y*y*((b+1)*y-b)},backOut:function(y){var b=1.70158;return(y-=1)*y*((b+1)*y+b)+1},elastic:function(y){return y==!!y?y:wt(2,-10*y)*K.sin(2*bt*(y-.075)/.3)+1},bounce:function(y){var b=7.5625,A=2.75;return y<1/A?b*y*y:y<2/A?b*(y-=1.5/A)*y+.75:y<2.5/A?b*(y-=2.25/A)*y+.9375:b*(y-=2.625/A)*y+.984375}};ae.easeIn=ae["ease-in"]=ae["<"],ae.easeOut=ae["ease-out"]=ae[">"],ae.easeInOut=ae["ease-in-out"]=ae["<>"],ae["back-in"]=ae.backIn,ae["back-out"]=ae.backOut;var Lt=[],on=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(y){setTimeout(y,16)},rr=function(){for(var y=+new Date,b=0;b<Lt.length;b++){var A=Lt[b];if(!A.el.removed&&!A.paused){var g,w,$=y-A.start,I=A.ms,j=A.easing,z=A.from,X=A.diff,et=A.to,ct=(A.t,A.el),st={},rt={};if(A.initstatus?($=(A.initstatus*A.anim.top-A.prev)/(A.percent-A.prev)*I,A.status=A.initstatus,delete A.initstatus,A.stop&&Lt.splice(b--,1)):A.status=(A.prev+(A.percent-A.prev)*($/I))/A.anim.top,!($<0))if($<I){var ut=j($/I);for(var gt in z)if(z[p](gt)){switch(q[gt]){case xt:g=+z[gt]+ut*I*X[gt];break;case"colour":g="rgb("+[ir(C(z[gt].r+ut*I*X[gt].r)),ir(C(z[gt].g+ut*I*X[gt].g)),ir(C(z[gt].b+ut*I*X[gt].b))].join(",")+")";break;case"path":g=[];for(var dt=0,ht=z[gt].length;dt<ht;dt++){g[dt]=[z[gt][dt][0]];for(var Ct=1,mt=z[gt][dt].length;Ct<mt;Ct++)g[dt][Ct]=+z[gt][dt][Ct]+ut*I*X[gt][dt][Ct];g[dt]=g[dt].join(P)}g=g.join(P);break;case"transform":if(X[gt].real)for(g=[],dt=0,ht=z[gt].length;dt<ht;dt++)for(g[dt]=[z[gt][dt][0]],Ct=1,mt=z[gt][dt].length;Ct<mt;Ct++)g[dt][Ct]=z[gt][dt][Ct]+ut*I*X[gt][dt][Ct];else{var _t=function(Ht){return+z[gt][Ht]+ut*I*X[gt][Ht]};g=[["m",_t(0),_t(1),_t(2),_t(3),_t(4),_t(5)]]}break;case"csv":if(gt=="clip-rect")for(g=[],dt=4;dt--;)g[dt]=+z[gt][dt]+ut*I*X[gt][dt];break;default:var yt=[][m](z[gt]);for(g=[],dt=ct.paper.customAttributes[gt].length;dt--;)g[dt]=+yt[dt]+ut*I*X[gt][dt]}st[gt]=g}ct.attr(st),function(Ht,Gt,qt){setTimeout(function(){o("raphael.anim.frame."+Ht,Gt,qt)})}(ct.id,ct,A.anim)}else{if(function(Ht,Gt,qt){setTimeout(function(){o("raphael.anim.frame."+Gt.id,Gt,qt),o("raphael.anim.finish."+Gt.id,Gt,qt),h.is(Ht,"function")&&Ht.call(Gt)})}(A.callback,ct,A.anim),ct.attr(et),Lt.splice(b--,1),A.repeat>1&&!A.next){for(w in et)et[p](w)&&(rt[w]=A.totalOrigin[w]);A.el.attr(rt),bn(A.anim,A.el,A.anim.percents[0],null,A.totalOrigin,A.repeat-1)}A.next&&!A.stop&&bn(A.anim,A.el,A.next,null,A.totalOrigin,A.repeat)}}}Lt.length&&on(rr)},ir=function(y){return y>255?255:y<0?0:y};function Ze(y,b,A,g,w,$){var I=3*b,j=3*(g-b)-I,z=1-I-j,X=3*A,et=3*(w-A)-X,ct=1-X-et;function st(rt){return((z*rt+j)*rt+I)*rt}return function(rt,ut){var gt=function(dt,ht){var Ct,mt,_t,yt,Ht,Gt;for(_t=dt,Gt=0;Gt<8;Gt++){if(yt=st(_t)-dt,lt(yt)<ht)return _t;if(lt(Ht=(3*z*_t+2*j)*_t+I)<1e-6)break;_t-=yt/Ht}if(mt=1,(_t=dt)<(Ct=0))return Ct;if(_t>mt)return mt;for(;Ct<mt;){if(yt=st(_t),lt(yt-dt)<ht)return _t;dt>yt?Ct=_t:mt=_t,_t=(mt-Ct)/2+Ct}return _t}(rt,ut);return((ct*gt+et)*gt+X)*gt}(y,1/(200*$))}function Ke(y,b){var A=[],g={};if(this.ms=b,this.times=1,y){for(var w in y)y[p](w)&&(g[D(w)]=y[w],A.push(D(w)));A.sort(jt)}this.anim=g,this.top=A[A.length-1],this.percents=A}function bn(y,b,A,g,w,$){A=D(A);var I,j,z,X,et,ct,st=y.ms,rt={},ut={},gt={};if(g)for(ht=0,Ct=Lt.length;ht<Ct;ht++){var dt=Lt[ht];if(dt.el.id==b.id&&dt.anim==y){dt.percent!=A?(Lt.splice(ht,1),z=1):j=dt,b.attr(dt.totalOrigin);break}}else g=+ut;for(var ht=0,Ct=y.percents.length;ht<Ct;ht++){if(y.percents[ht]==A||y.percents[ht]>g*y.top){A=y.percents[ht],et=y.percents[ht-1]||0,st=st/y.top*(A-et),X=y.percents[ht+1],I=y.anim[A];break}g&&b.attr(y.anim[y.percents[ht]])}if(I){if(j)j.initstatus=g,j.start=new Date-j.ms*g;else{for(var mt in I)if(I[p](mt)&&(q[p](mt)||b.paper.customAttributes[p](mt)))switch(rt[mt]=b.attr(mt),rt[mt]==null&&(rt[mt]=V[mt]),ut[mt]=I[mt],q[mt]){case xt:gt[mt]=(ut[mt]-rt[mt])/st;break;case"colour":rt[mt]=h.getRGB(rt[mt]);var _t=h.getRGB(ut[mt]);gt[mt]={r:(_t.r-rt[mt].r)/st,g:(_t.g-rt[mt].g)/st,b:(_t.b-rt[mt].b)/st};break;case"path":var yt=Gr(rt[mt],ut[mt]),Ht=yt[1];for(rt[mt]=yt[0],gt[mt]=[],ht=0,Ct=rt[mt].length;ht<Ct;ht++){gt[mt][ht]=[0];for(var Gt=1,qt=rt[mt][ht].length;Gt<qt;Gt++)gt[mt][ht][Gt]=(Ht[ht][Gt]-rt[mt][ht][Gt])/st}break;case"transform":var _s=b._,uo=at(_s[mt],ut[mt]);if(uo)for(rt[mt]=uo.from,ut[mt]=uo.to,gt[mt]=[],gt[mt].real=!0,ht=0,Ct=rt[mt].length;ht<Ct;ht++)for(gt[mt][ht]=[rt[mt][ht][0]],Gt=1,qt=rt[mt][ht].length;Gt<qt;Gt++)gt[mt][ht][Gt]=(ut[mt][ht][Gt]-rt[mt][ht][Gt])/st;else{var Sn=b.matrix||new ot,_r={_:{transform:_s.transform},getBBox:function(){return b.getBBox(1)}};rt[mt]=[Sn.a,Sn.b,Sn.c,Sn.d,Sn.e,Sn.f],J(_r,ut[mt]),ut[mt]=_r._.transform,gt[mt]=[(_r.matrix.a-Sn.a)/st,(_r.matrix.b-Sn.b)/st,(_r.matrix.c-Sn.c)/st,(_r.matrix.d-Sn.d)/st,(_r.matrix.e-Sn.e)/st,(_r.matrix.f-Sn.f)/st]}break;case"csv":var ws=N(I[mt])[R](f),xs=N(rt[mt])[R](f);if(mt=="clip-rect")for(rt[mt]=xs,gt[mt]=[],ht=xs.length;ht--;)gt[mt][ht]=(ws[ht]-rt[mt][ht])/st;ut[mt]=ws;break;default:for(ws=[][m](I[mt]),xs=[][m](rt[mt]),gt[mt]=[],ht=b.paper.customAttributes[mt].length;ht--;)gt[mt][ht]=((ws[ht]||0)-(xs[ht]||0))/st}var zl=I.easing,Hr=h.easing_formulas[zl];if(!Hr)if((Hr=N(zl).match(T))&&Hr.length==5){var Hi=Hr;Hr=function(Vl){return Ze(Vl,+Hi[1],+Hi[2],+Hi[3],+Hi[4],st)}}else Hr=zt;if(dt={anim:y,percent:A,timestamp:ct=I.start||y.start||+new Date,start:ct+(y.del||0),status:0,initstatus:g||0,stop:!1,ms:st,easing:Hr,from:rt,diff:gt,to:ut,el:b,callback:I.callback,prev:et,next:X,repeat:$||y.times,origin:b.attr(),totalOrigin:w},Lt.push(dt),g&&!j&&!z&&(dt.stop=!0,dt.start=new Date-st*g,Lt.length==1))return rr();z&&(dt.start=new Date-dt.ms*g),Lt.length==1&&on(rr)}o("raphael.anim.start."+b.id,b,y)}}function Vr(y){for(var b=0;b<Lt.length;b++)Lt[b].el.paper==y&&Lt.splice(b--,1)}It.animateWith=function(y,b,A,g,w,$){if(this.removed)return $&&$.call(this),this;var I=A instanceof Ke?A:h.animation(A,g,w,$);bn(I,this,I.percents[0],null,this.attr());for(var j=0,z=Lt.length;j<z;j++)if(Lt[j].anim==b&&Lt[j].el==y){Lt[z-1].start=Lt[j].start;break}return this},It.onAnimation=function(y){return y?o.on("raphael.anim.frame."+this.id,y):o.unbind("raphael.anim.frame."+this.id),this},Ke.prototype.delay=function(y){var b=new Ke(this.anim,this.ms);return b.times=this.times,b.del=+y||0,b},Ke.prototype.repeat=function(y){var b=new Ke(this.anim,this.ms);return b.del=this.del,b.times=K.floor(tt(y,0))||1,b},h.animation=function(y,b,A,g){if(y instanceof Ke)return y;!h.is(A,"function")&&A||(g=g||A||null,A=null),y=Object(y),b=+b||0;var w,$,I={};for($ in y)y[p]($)&&D($)!=$&&D($)+"%"!=$&&(w=!0,I[$]=y[$]);if(w)return A&&(I.easing=A),g&&(I.callback=g),new Ke({100:I},b);if(g){var j=0;for(var z in y){var X=G(z);y[p](z)&&X>j&&(j=X)}!y[j+="%"].callback&&(y[j].callback=g)}return new Ke(y,b)},It.animate=function(y,b,A,g){if(this.removed)return g&&g.call(this),this;var w=y instanceof Ke?y:h.animation(y,b,A,g);return bn(w,this,w.percents[0],null,this.attr()),this},It.setTime=function(y,b){return y&&b!=null&&this.status(y,W(b,y.ms)/y.ms),this},It.status=function(y,b){var A,g,w=[],$=0;if(b!=null)return bn(y,this,-1,W(b,1)),this;for(A=Lt.length;$<A;$++)if((g=Lt[$]).el.id==this.id&&(!y||g.anim==y)){if(y)return g.status;w.push({anim:g.anim,status:g.status})}return y?0:w},It.pause=function(y){for(var b=0;b<Lt.length;b++)Lt[b].el.id!=this.id||y&&Lt[b].anim!=y||o("raphael.anim.pause."+this.id,this,Lt[b].anim)!==!1&&(Lt[b].paused=!0);return this},It.resume=function(y){for(var b=0;b<Lt.length;b++)if(Lt[b].el.id==this.id&&(!y||Lt[b].anim==y)){var A=Lt[b];o("raphael.anim.resume."+this.id,this,A.anim)!==!1&&(delete A.paused,this.status(A.anim,A.status))}return this},It.stop=function(y){for(var b=0;b<Lt.length;b++)Lt[b].el.id!=this.id||y&&Lt[b].anim!=y||o("raphael.anim.stop."+this.id,this,Lt[b].anim)!==!1&&Lt.splice(b--,1);return this},o.on("raphael.remove",Vr),o.on("raphael.clear",Vr),It.toString=function(){return"Raphaël’s object"};var Br,Gn,zn,sr,Vi=function(y){if(this.items=[],this.length=0,this.type="set",y)for(var b=0,A=y.length;b<A;b++)!y[b]||y[b].constructor!=It.constructor&&y[b].constructor!=Vi||(this[this.items.length]=this.items[this.items.length]=y[b],this.length++)},Ye=Vi.prototype;for(var Bi in Ye.push=function(){for(var y,b,A=0,g=arguments.length;A<g;A++)!(y=arguments[A])||y.constructor!=It.constructor&&y.constructor!=Vi||(this[b=this.items.length]=this.items[b]=y,this.length++);return this},Ye.pop=function(){return this.length&&delete this[this.length--],this.items.pop()},Ye.forEach=function(y,b){for(var A=0,g=this.items.length;A<g;A++)if(y.call(b,this.items[A],A)===!1)return this;return this},It)It[p](Bi)&&(Ye[Bi]=function(y){return function(){var b=arguments;return this.forEach(function(A){A[y][x](A,b)})}}(Bi));return Ye.attr=function(y,b){if(y&&h.is(y,it)&&h.is(y[0],"object"))for(var A=0,g=y.length;A<g;A++)this.items[A].attr(y[A]);else for(var w=0,$=this.items.length;w<$;w++)this.items[w].attr(y,b);return this},Ye.clear=function(){for(;this.length;)this.pop()},Ye.splice=function(y,b,A){y=y<0?tt(this.length+y,0):y,b=tt(0,W(this.length-y,b));var g,w=[],$=[],I=[];for(g=2;g<arguments.length;g++)I.push(arguments[g]);for(g=0;g<b;g++)$.push(this[y+g]);for(;g<this.length-y;g++)w.push(this[y+g]);var j=I.length;for(g=0;g<j+w.length;g++)this.items[y+g]=this[y+g]=g<j?I[g]:w[g-j];for(g=this.items.length=this.length-=b-j;this[g];)delete this[g++];return new Vi($)},Ye.exclude=function(y){for(var b=0,A=this.length;b<A;b++)if(this[b]==y)return this.splice(b,1),!0},Ye.animate=function(y,b,A,g){(h.is(A,"function")||!A)&&(g=A||null);var w,$,I=this.items.length,j=I,z=this;if(!I)return this;g&&($=function(){!--I&&g.call(z)}),A=h.is(A,"string")?A:$;var X=h.animation(y,b,A,$);for(w=this.items[--j].animate(X);j--;)this.items[j]&&!this.items[j].removed&&this.items[j].animateWith(w,X,X),this.items[j]&&!this.items[j].removed||I--;return this},Ye.insertAfter=function(y){for(var b=this.items.length;b--;)this.items[b].insertAfter(y);return this},Ye.getBBox=function(){for(var y=[],b=[],A=[],g=[],w=this.items.length;w--;)if(!this.items[w].removed){var $=this.items[w].getBBox();y.push($.x),b.push($.y),A.push($.x+$.width),g.push($.y+$.height)}return{x:y=W[x](0,y),y:b=W[x](0,b),x2:A=tt[x](0,A),y2:g=tt[x](0,g),width:A-y,height:g-b}},Ye.clone=function(y){y=this.paper.set();for(var b=0,A=this.items.length;b<A;b++)y.push(this.items[b].clone());return y},Ye.toString=function(){return"Raphaël‘s set"},Ye.glow=function(y){var b=this.paper.set();return this.forEach(function(A,g){var w=A.glow(y);w==null||w.forEach(function($,I){b.push($)})}),b},Ye.isPointInside=function(y,b){var A=!1;return this.forEach(function(g){if(g.isPointInside(y,b))return A=!0,!1}),A},h.registerFont=function(y){if(!y.face)return y;this.fonts=this.fonts||{};var b={w:y.w,face:{},glyphs:{}},A=y.face["font-family"];for(var g in y.face)y.face[p](g)&&(b.face[g]=y.face[g]);if(this.fonts[A]?this.fonts[A].push(b):this.fonts[A]=[b],!y.svg){for(var w in b.face["units-per-em"]=G(y.face["units-per-em"],10),y.glyphs)if(y.glyphs[p](w)){var $=y.glyphs[w];if(b.glyphs[w]={w:$.w,k:{},d:$.d&&"M"+$.d.replace(/[mlcxtrv]/g,function(j){return{l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"}[j]||"M"})+"z"},$.k)for(var I in $.k)$[p](I)&&(b.glyphs[w].k[I]=$.k[I])}}return y},c.getFont=function(y,b,A,g){if(g=g||"normal",A=A||"normal",b=+b||{normal:400,bold:700,lighter:300,bolder:800}[b]||400,h.fonts){var w,$=h.fonts[y];if(!$){var I=new RegExp("(^|\\s)"+y.replace(/[^\w\d\s+!~.:_-]/g,F)+"(\\s|$)","i");for(var j in h.fonts)if(h.fonts[p](j)&&I.test(j)){$=h.fonts[j];break}}if($)for(var z=0,X=$.length;z<X&&((w=$[z]).face["font-weight"]!=b||w.face["font-style"]!=A&&w.face["font-style"]||w.face["font-stretch"]!=g);z++);return w}},c.print=function(y,b,A,g,w,$,I,j){$=$||"middle",I=tt(W(I||0,1),-1),j=tt(W(j||1,3),1);var z,X=N(A)[R](F),et=0,ct=0,st=F;if(h.is(g,"string")&&(g=this.getFont(g)),g){z=(w||16)/g.face["units-per-em"];for(var rt=g.face.bbox[R](f),ut=+rt[0],gt=rt[3]-rt[1],dt=0,ht=+rt[1]+($=="baseline"?gt+ +g.face.descent:gt/2),Ct=0,mt=X.length;Ct<mt;Ct++){if(X[Ct]==`
39
- `)et=0,yt=0,ct=0,dt+=gt*j;else{var _t=ct&&g.glyphs[X[Ct-1]]||{},yt=g.glyphs[X[Ct]];et+=ct?(_t.w||g.w)+(_t.k&&_t.k[X[Ct]]||0)+g.w*I:0,ct=1}yt&&yt.d&&(st+=h.transformPath(yt.d,["t",et*z,dt*z,"s",z,z,ut,ht,"t",(y-ut)/z,(b-ht)/z]))}}return this.path(st).attr({fill:"#000",stroke:"none"})},c.add=function(y){if(h.is(y,"array"))for(var b,A=this.set(),g=0,w=y.length;g<w;g++)b=y[g]||{},d[p](b.type)&&A.push(this[b.type]().attr(b));return A},h.format=function(y,b){var A=h.is(b,it)?[0][m](b):arguments;return y&&h.is(y,"string")&&A.length-1&&(y=y.replace(u,function(g,w){return A[++w]==null?F:A[w]})),y||F},h.fullfill=(Br=/\{([^\}]+)\}/g,Gn=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g,function(y,b){return String(y).replace(Br,function(A,g){return function(w,$,I){var j=I;return $.replace(Gn,function(z,X,et,ct,st){X=X||ct,j&&(X in j&&(j=j[X]),typeof j=="function"&&st&&(j=j()))}),j=(j==null||j==I?w:j)+""}(A,g,b)})}),h.ninja=function(){if(_.was)v.win.Raphael=_.is;else{window.Raphael=void 0;try{delete window.Raphael}catch{}}return h},h.st=Ye,o.on("raphael.DOMload",function(){l=!0}),(zn=document).readyState==null&&zn.addEventListener&&(zn.addEventListener("DOMContentLoaded",sr=function(){zn.removeEventListener("DOMContentLoaded",sr,!1),zn.readyState="complete"},!1),zn.readyState="loading"),function y(){/in/.test(zn.readyState)?setTimeout(y,9):h.eve("raphael.DOMload")}(),h}).apply(r,s))===void 0||(e.exports=a)},function(e,r,i){var s,a;s=[i(0),i(3),i(4)],(a=(function(o){return o}).apply(r,s))===void 0||(e.exports=a)},function(e,r,i){var s,a,o,h,l,c,f,d,u,p,v,_,S,x;h="hasOwnProperty",l=/[\.\/]/,c=/\s*,\s*/,f=function(m,k){return m-k},d={n:{}},u=function(){for(var m=0,k=this.length;m<k;m++)if(this[m]!==void 0)return this[m]},p=function(){for(var m=this.length;--m;)if(this[m]!==void 0)return this[m]},v=Object.prototype.toString,_=String,S=Array.isArray||function(m){return m instanceof Array||v.call(m)=="[object Array]"},(x=function(m,k){var F,P=o,N=Array.prototype.slice.call(arguments,2),R=x.listeners(m),L=0,U=[],B={},K=[],tt=a;K.firstDefined=u,K.lastDefined=p,a=m,o=0;for(var W=0,lt=R.length;W<lt;W++)"zIndex"in R[W]&&(U.push(R[W].zIndex),R[W].zIndex<0&&(B[R[W].zIndex]=R[W]));for(U.sort(f);U[L]<0;)if(F=B[U[L++]],K.push(F.apply(k,N)),o)return o=P,K;for(W=0;W<lt;W++)if("zIndex"in(F=R[W]))if(F.zIndex==U[L]){if(K.push(F.apply(k,N)),o)break;do if((F=B[U[++L]])&&K.push(F.apply(k,N)),o)break;while(F)}else B[F.zIndex]=F;else if(K.push(F.apply(k,N)),o)break;return o=P,a=tt,K})._events=d,x.listeners=function(m){var k,F,P,N,R,L,U,B,K=S(m)?m:m.split(l),tt=d,W=[tt],lt=[];for(N=0,R=K.length;N<R;N++){for(B=[],L=0,U=W.length;L<U;L++)for(F=[(tt=W[L].n)[K[N]],tt["*"]],P=2;P--;)(k=F[P])&&(B.push(k),lt=lt.concat(k.f||[]));W=B}return lt},x.separator=function(m){m?(m="["+(m=_(m).replace(/(?=[\.\^\]\[\-])/g,"\\"))+"]",l=new RegExp(m)):l=/[\.\/]/},x.on=function(m,k){if(typeof k!="function")return function(){};for(var F=S(m)?S(m[0])?m:[m]:_(m).split(c),P=0,N=F.length;P<N;P++)(function(R){for(var L,U=S(R)?R:_(R).split(l),B=d,K=0,tt=U.length;K<tt;K++)B=(B=B.n).hasOwnProperty(U[K])&&B[U[K]]||(B[U[K]]={n:{}});for(B.f=B.f||[],K=0,tt=B.f.length;K<tt;K++)if(B.f[K]==k){L=!0;break}!L&&B.f.push(k)})(F[P]);return function(R){+R==+R&&(k.zIndex=+R)}},x.f=function(m){var k=[].slice.call(arguments,1);return function(){x.apply(null,[m,null].concat(k).concat([].slice.call(arguments,0)))}},x.stop=function(){o=1},x.nt=function(m){var k=S(a)?a.join("."):a;return m?new RegExp("(?:\\.|\\/|^)"+m+"(?:\\.|\\/|$)").test(k):k},x.nts=function(){return S(a)?a:a.split(l)},x.off=x.unbind=function(m,k){if(m){var F=S(m)?S(m[0])?m:[m]:_(m).split(c);if(F.length>1)for(var P=0,N=F.length;P<N;P++)x.off(F[P],k);else{F=S(m)?m:_(m).split(l);var R,L,U,B,K,tt=[d];for(P=0,N=F.length;P<N;P++)for(B=0;B<tt.length;B+=U.length-2){if(U=[B,1],R=tt[B].n,F[P]!="*")R[F[P]]&&U.push(R[F[P]]);else for(L in R)R[h](L)&&U.push(R[L]);tt.splice.apply(tt,U)}for(P=0,N=tt.length;P<N;P++)for(R=tt[P];R.n;){if(k){if(R.f){for(B=0,K=R.f.length;B<K;B++)if(R.f[B]==k){R.f.splice(B,1);break}!R.f.length&&delete R.f}for(L in R.n)if(R.n[h](L)&&R.n[L].f){var W=R.n[L].f;for(B=0,K=W.length;B<K;B++)if(W[B]==k){W.splice(B,1);break}!W.length&&delete R.n[L].f}}else for(L in delete R.f,R.n)R.n[h](L)&&R.n[L].f&&delete R.n[L].f;R=R.n}}}else x._events=d={n:{}}},x.once=function(m,k){var F=function(){return x.off(m,F),k.apply(this,arguments)};return x.on(m,F)},x.version="0.5.0",x.toString=function(){return"You are running Eve 0.5.0"},e.exports?e.exports=x:(s=(function(){return x}).apply(r,[]))===void 0||(e.exports=s)},function(e,r,i){var s,a;s=[i(0)],(a=(function(o){if(!o||o.svg){var h="hasOwnProperty",l=String,c=parseFloat,f=parseInt,d=Math,u=d.max,p=d.abs,v=d.pow,_=/[, ]+/,S=o.eve,x="",m=" ",k="http://www.w3.org/1999/xlink",F={block:"M5,0 0,2.5 5,5z",classic:"M5,0 0,2.5 5,5 3.5,3 3.5,2z",diamond:"M2.5,0 5,2.5 2.5,5 0,2.5z",open:"M6,1 1,3.5 6,6",oval:"M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z"},P={};o.toString=function(){return`Your browser supports SVG.
40
- You are running Raphaël `+this.version};var N=function(O,E){if(E)for(var T in typeof O=="string"&&(O=N(O)),E)E[h](T)&&(T.substring(0,6)=="xlink:"?O.setAttributeNS(k,T.substring(6),l(E[T])):O.setAttribute(T,l(E[T])));else(O=o._g.doc.createElementNS("http://www.w3.org/2000/svg",O)).style&&(O.style.webkitTapHighlightColor="rgba(0,0,0,0)");return O},R=function(O,E){var T="linear",C=O.id+E,D=.5,G=.5,M=O.node,V=O.paper,q=M.style,Z=o._g.doc.getElementById(C);if(!Z){if(E=(E=l(E).replace(o._radial_gradient,function(jt,zt,Ot){if(T="radial",zt&&Ot){D=c(zt);var le=2*((G=c(Ot))>.5)-1;v(D-.5,2)+v(G-.5,2)>.25&&(G=d.sqrt(.25-v(D-.5,2))*le+.5)&&G!=.5&&(G=G.toFixed(5)-1e-5*le)}return x})).split(/\s*\-\s*/),T=="linear"){var nt=E.shift();if(nt=-c(nt),isNaN(nt))return null;var pt=[0,0,d.cos(o.rad(nt)),d.sin(o.rad(nt))],kt=1/(u(p(pt[2]),p(pt[3]))||1);pt[2]*=kt,pt[3]*=kt,pt[2]<0&&(pt[0]=-pt[2],pt[2]=0),pt[3]<0&&(pt[1]=-pt[3],pt[3]=0)}var Ft=o._parseDots(E);if(!Ft)return null;if(C=C.replace(/[\(\)\s,\xb0#]/g,"_"),O.gradient&&C!=O.gradient.id&&(V.defs.removeChild(O.gradient),delete O.gradient),!O.gradient){Z=N(T+"Gradient",{id:C}),O.gradient=Z,N(Z,T=="radial"?{fx:D,fy:G}:{x1:pt[0],y1:pt[1],x2:pt[2],y2:pt[3],gradientTransform:O.matrix.invert()}),V.defs.appendChild(Z);for(var St=0,At=Ft.length;St<At;St++)Z.appendChild(N("stop",{offset:Ft[St].offset?Ft[St].offset:St?"100%":"0%","stop-color":Ft[St].color||"#fff","stop-opacity":isFinite(Ft[St].opacity)?Ft[St].opacity:1}))}}return N(M,{fill:L(C),opacity:1,"fill-opacity":1}),q.fill=x,q.opacity=1,q.fillOpacity=1,1},L=function(O){if((E=document.documentMode)&&(E===9||E===10))return"url('#"+O+"')";var E,T=document.location;return"url('"+(T.protocol+"//"+T.host+T.pathname+T.search)+"#"+O+"')"},U=function(O){var E=O.getBBox(1);N(O.pattern,{patternTransform:O.matrix.invert()+" translate("+E.x+","+E.y+")"})},B=function(O,E,T){if(O.type=="path"){for(var C,D,G,M,V,q=l(E).toLowerCase().split("-"),Z=O.paper,nt=T?"end":"start",pt=O.node,kt=O.attrs,Ft=kt["stroke-width"],St=q.length,At="classic",jt=3,zt=3,Ot=5;St--;)switch(q[St]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":At=q[St];break;case"wide":zt=5;break;case"narrow":zt=2;break;case"long":jt=5;break;case"short":jt=2}if(At=="open"?(jt+=2,zt+=2,Ot+=2,G=1,M=T?4:1,V={fill:"none",stroke:kt.stroke}):(M=G=jt/2,V={fill:kt.stroke,stroke:"none"}),O._.arrows?T?(O._.arrows.endPath&&P[O._.arrows.endPath]--,O._.arrows.endMarker&&P[O._.arrows.endMarker]--):(O._.arrows.startPath&&P[O._.arrows.startPath]--,O._.arrows.startMarker&&P[O._.arrows.startMarker]--):O._.arrows={},At!="none"){var le="raphael-marker-"+At,Jt="raphael-marker-"+nt+At+jt+zt+"-obj"+O.id;o._g.doc.getElementById(le)?P[le]++:(Z.defs.appendChild(N(N("path"),{"stroke-linecap":"round",d:F[At],id:le})),P[le]=1);var ue,Bt=o._g.doc.getElementById(Jt);Bt?(P[Jt]++,ue=Bt.getElementsByTagName("use")[0]):(Bt=N(N("marker"),{id:Jt,markerHeight:zt,markerWidth:jt,orient:"auto",refX:M,refY:zt/2}),ue=N(N("use"),{"xlink:href":"#"+le,transform:(T?"rotate(180 "+jt/2+" "+zt/2+") ":x)+"scale("+jt/Ot+","+zt/Ot+")","stroke-width":(1/((jt/Ot+zt/Ot)/2)).toFixed(4)}),Bt.appendChild(ue),Z.defs.appendChild(Bt),P[Jt]=1),N(ue,V);var Fe=G*(At!="diamond"&&At!="oval");T?(C=O._.arrows.startdx*Ft||0,D=o.getTotalLength(kt.path)-Fe*Ft):(C=Fe*Ft,D=o.getTotalLength(kt.path)-(O._.arrows.enddx*Ft||0)),(V={})["marker-"+nt]="url(#"+Jt+")",(D||C)&&(V.d=o.getSubpath(kt.path,C,D)),N(pt,V),O._.arrows[nt+"Path"]=le,O._.arrows[nt+"Marker"]=Jt,O._.arrows[nt+"dx"]=Fe,O._.arrows[nt+"Type"]=At,O._.arrows[nt+"String"]=E}else T?(C=O._.arrows.startdx*Ft||0,D=o.getTotalLength(kt.path)-C):(C=0,D=o.getTotalLength(kt.path)-(O._.arrows.enddx*Ft||0)),O._.arrows[nt+"Path"]&&N(pt,{d:o.getSubpath(kt.path,C,D)}),delete O._.arrows[nt+"Path"],delete O._.arrows[nt+"Marker"],delete O._.arrows[nt+"dx"],delete O._.arrows[nt+"Type"],delete O._.arrows[nt+"String"];for(V in P)if(P[h](V)&&!P[V]){var Pe=o._g.doc.getElementById(V);Pe&&Pe.parentNode.removeChild(Pe)}}},K={"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,1,1,1,1],". ":[1,3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]},tt=function(O,E,T){if(E=K[l(E).toLowerCase()]){for(var C=O.attrs["stroke-width"]||"1",D={round:C,square:C,butt:0}[O.attrs["stroke-linecap"]||T["stroke-linecap"]]||0,G=[],M=E.length;M--;)G[M]=E[M]*C+(M%2?1:-1)*D;N(O.node,{"stroke-dasharray":G.join(",")})}else N(O.node,{"stroke-dasharray":"none"})},W=function(O,E){var T=O.node,C=O.attrs,D=T.style.visibility;for(var G in T.style.visibility="hidden",E)if(E[h](G)){if(!o._availableAttrs[h](G))continue;var M=E[G];switch(C[G]=M,G){case"blur":O.blur(M);break;case"title":var V=T.getElementsByTagName("title");if(V.length&&(V=V[0]))V.firstChild.nodeValue=M;else{V=N("title");var q=o._g.doc.createTextNode(M);V.appendChild(q),T.appendChild(V)}break;case"href":case"target":var Z=T.parentNode;if(Z.tagName.toLowerCase()!="a"){var nt=N("a");Z.insertBefore(nt,T),nt.appendChild(T),Z=nt}G=="target"?Z.setAttributeNS(k,"show",M=="blank"?"new":M):Z.setAttributeNS(k,G,M);break;case"cursor":T.style.cursor=M;break;case"transform":O.transform(M);break;case"arrow-start":B(O,M);break;case"arrow-end":B(O,M,1);break;case"clip-rect":var pt=l(M).split(_);if(pt.length==4){O.clip&&O.clip.parentNode.parentNode.removeChild(O.clip.parentNode);var kt=N("clipPath"),Ft=N("rect");kt.id=o.createUUID(),N(Ft,{x:pt[0],y:pt[1],width:pt[2],height:pt[3]}),kt.appendChild(Ft),O.paper.defs.appendChild(kt),N(T,{"clip-path":"url(#"+kt.id+")"}),O.clip=Ft}if(!M){var St=T.getAttribute("clip-path");if(St){var At=o._g.doc.getElementById(St.replace(/(^url\(#|\)$)/g,x));At&&At.parentNode.removeChild(At),N(T,{"clip-path":x}),delete O.clip}}break;case"path":O.type=="path"&&(N(T,{d:M?C.path=o._pathToAbsolute(M):"M0,0"}),O._.dirty=1,O._.arrows&&("startString"in O._.arrows&&B(O,O._.arrows.startString),"endString"in O._.arrows&&B(O,O._.arrows.endString,1)));break;case"width":if(T.setAttribute(G,M),O._.dirty=1,!C.fx)break;G="x",M=C.x;case"x":C.fx&&(M=-C.x-(C.width||0));case"rx":if(G=="rx"&&O.type=="rect")break;case"cx":T.setAttribute(G,M),O.pattern&&U(O),O._.dirty=1;break;case"height":if(T.setAttribute(G,M),O._.dirty=1,!C.fy)break;G="y",M=C.y;case"y":C.fy&&(M=-C.y-(C.height||0));case"ry":if(G=="ry"&&O.type=="rect")break;case"cy":T.setAttribute(G,M),O.pattern&&U(O),O._.dirty=1;break;case"r":O.type=="rect"?N(T,{rx:M,ry:M}):T.setAttribute(G,M),O._.dirty=1;break;case"src":O.type=="image"&&T.setAttributeNS(k,"href",M);break;case"stroke-width":O._.sx==1&&O._.sy==1||(M/=u(p(O._.sx),p(O._.sy))||1),T.setAttribute(G,M),C["stroke-dasharray"]&&tt(O,C["stroke-dasharray"],E),O._.arrows&&("startString"in O._.arrows&&B(O,O._.arrows.startString),"endString"in O._.arrows&&B(O,O._.arrows.endString,1));break;case"stroke-dasharray":tt(O,M,E);break;case"fill":var jt=l(M).match(o._ISURL);if(jt){kt=N("pattern");var zt=N("image");kt.id=o.createUUID(),N(kt,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1}),N(zt,{x:0,y:0,"xlink:href":jt[1]}),kt.appendChild(zt),function(Bt){o._preload(jt[1],function(){var Fe=this.offsetWidth,Pe=this.offsetHeight;N(Bt,{width:Fe,height:Pe}),N(zt,{width:Fe,height:Pe})})}(kt),O.paper.defs.appendChild(kt),N(T,{fill:"url(#"+kt.id+")"}),O.pattern=kt,O.pattern&&U(O);break}var Ot=o.getRGB(M);if(Ot.error){if((O.type=="circle"||O.type=="ellipse"||l(M).charAt()!="r")&&R(O,M)){if("opacity"in C||"fill-opacity"in C){var le=o._g.doc.getElementById(T.getAttribute("fill").replace(/^url\(#|\)$/g,x));if(le){var Jt=le.getElementsByTagName("stop");N(Jt[Jt.length-1],{"stop-opacity":("opacity"in C?C.opacity:1)*("fill-opacity"in C?C["fill-opacity"]:1)})}}C.gradient=M,C.fill="none";break}}else delete E.gradient,delete C.gradient,!o.is(C.opacity,"undefined")&&o.is(E.opacity,"undefined")&&N(T,{opacity:C.opacity}),!o.is(C["fill-opacity"],"undefined")&&o.is(E["fill-opacity"],"undefined")&&N(T,{"fill-opacity":C["fill-opacity"]});Ot[h]("opacity")&&N(T,{"fill-opacity":Ot.opacity>1?Ot.opacity/100:Ot.opacity});case"stroke":Ot=o.getRGB(M),T.setAttribute(G,Ot.hex),G=="stroke"&&Ot[h]("opacity")&&N(T,{"stroke-opacity":Ot.opacity>1?Ot.opacity/100:Ot.opacity}),G=="stroke"&&O._.arrows&&("startString"in O._.arrows&&B(O,O._.arrows.startString),"endString"in O._.arrows&&B(O,O._.arrows.endString,1));break;case"gradient":(O.type=="circle"||O.type=="ellipse"||l(M).charAt()!="r")&&R(O,M);break;case"opacity":C.gradient&&!C[h]("stroke-opacity")&&N(T,{"stroke-opacity":M>1?M/100:M});case"fill-opacity":if(C.gradient){(le=o._g.doc.getElementById(T.getAttribute("fill").replace(/^url\(#|\)$/g,x)))&&(Jt=le.getElementsByTagName("stop"),N(Jt[Jt.length-1],{"stop-opacity":M}));break}default:G=="font-size"&&(M=f(M,10)+"px");var ue=G.replace(/(\-.)/g,function(Bt){return Bt.substring(1).toUpperCase()});T.style[ue]=M,O._.dirty=1,T.setAttribute(G,M)}}lt(O,E),T.style.visibility=D},lt=function(O,E){if(O.type=="text"&&(E[h]("text")||E[h]("font")||E[h]("font-size")||E[h]("x")||E[h]("y"))){var T=O.attrs,C=O.node,D=C.firstChild?f(o._g.doc.defaultView.getComputedStyle(C.firstChild,x).getPropertyValue("font-size"),10):10;if(E[h]("text")){for(T.text=E.text;C.firstChild;)C.removeChild(C.firstChild);for(var G,M=l(E.text).split(`
41
- `),V=[],q=0,Z=M.length;q<Z;q++)G=N("tspan"),q&&N(G,{dy:1.2*D,x:T.x}),G.appendChild(o._g.doc.createTextNode(M[q])),C.appendChild(G),V[q]=G}else for(q=0,Z=(V=C.getElementsByTagName("tspan")).length;q<Z;q++)q?N(V[q],{dy:1.2*D,x:T.x}):N(V[0],{dy:0});N(C,{x:T.x,y:T.y}),O._.dirty=1;var nt=O._getBBox(),pt=T.y-(nt.y+nt.height/2);pt&&o.is(pt,"finite")&&N(V[0],{dy:pt})}},wt=function(O){return O.parentNode&&O.parentNode.tagName.toLowerCase()==="a"?O.parentNode:O},bt=function(O,E){this[0]=this.node=O,O.raphael=!0,this.id=("0000"+(Math.random()*Math.pow(36,5)<<0).toString(36)).slice(-5),O.raphaelid=this.id,this.matrix=o.matrix(),this.realPath=null,this.paper=E,this.attrs=this.attrs||{},this._={transform:[],sx:1,sy:1,deg:0,dx:0,dy:0,dirty:1},!E.bottom&&(E.bottom=this),this.prev=E.top,E.top&&(E.top.next=this),E.top=this,this.next=null},xt=o.el;bt.prototype=xt,xt.constructor=bt,o._engine.path=function(O,E){var T=N("path");E.canvas&&E.canvas.appendChild(T);var C=new bt(T,E);return C.type="path",W(C,{fill:"none",stroke:"#000",path:O}),C},xt.rotate=function(O,E,T){if(this.removed)return this;if((O=l(O).split(_)).length-1&&(E=c(O[1]),T=c(O[2])),O=c(O[0]),T==null&&(E=T),E==null||T==null){var C=this.getBBox(1);E=C.x+C.width/2,T=C.y+C.height/2}return this.transform(this._.transform.concat([["r",O,E,T]])),this},xt.scale=function(O,E,T,C){if(this.removed)return this;if((O=l(O).split(_)).length-1&&(E=c(O[1]),T=c(O[2]),C=c(O[3])),O=c(O[0]),E==null&&(E=O),C==null&&(T=C),T==null||C==null)var D=this.getBBox(1);return T=T??D.x+D.width/2,C=C??D.y+D.height/2,this.transform(this._.transform.concat([["s",O,E,T,C]])),this},xt.translate=function(O,E){return this.removed?this:((O=l(O).split(_)).length-1&&(E=c(O[1])),O=c(O[0])||0,E=+E||0,this.transform(this._.transform.concat([["t",O,E]])),this)},xt.transform=function(O){var E=this._;if(O==null)return E.transform;if(o._extractTransform(this,O),this.clip&&N(this.clip,{transform:this.matrix.invert()}),this.pattern&&U(this),this.node&&N(this.node,{transform:this.matrix}),E.sx!=1||E.sy!=1){var T=this.attrs[h]("stroke-width")?this.attrs["stroke-width"]:1;this.attr({"stroke-width":T})}return this},xt.hide=function(){return this.removed||(this.node.style.display="none"),this},xt.show=function(){return this.removed||(this.node.style.display=""),this},xt.remove=function(){var O=wt(this.node);if(!this.removed&&O.parentNode){var E=this.paper;for(var T in E.__set__&&E.__set__.exclude(this),S.unbind("raphael.*.*."+this.id),this.gradient&&E.defs.removeChild(this.gradient),o._tear(this,E),O.parentNode.removeChild(O),this.removeData(),this)this[T]=typeof this[T]=="function"?o._removedFactory(T):null;this.removed=!0}},xt._getBBox=function(){if(this.node.style.display=="none"){this.show();var O=!0}var E,T=!1;this.paper.canvas.parentElement?E=this.paper.canvas.parentElement.style:this.paper.canvas.parentNode&&(E=this.paper.canvas.parentNode.style),E&&E.display=="none"&&(T=!0,E.display="");var C={};try{C=this.node.getBBox()}catch{C={x:this.node.clientLeft,y:this.node.clientTop,width:this.node.clientWidth,height:this.node.clientHeight}}finally{C=C||{},T&&(E.display="none")}return O&&this.hide(),C},xt.attr=function(O,E){if(this.removed)return this;if(O==null){var T={};for(var C in this.attrs)this.attrs[h](C)&&(T[C]=this.attrs[C]);return T.gradient&&T.fill=="none"&&(T.fill=T.gradient)&&delete T.gradient,T.transform=this._.transform,T}if(E==null&&o.is(O,"string")){if(O=="fill"&&this.attrs.fill=="none"&&this.attrs.gradient)return this.attrs.gradient;if(O=="transform")return this._.transform;for(var D=O.split(_),G={},M=0,V=D.length;M<V;M++)(O=D[M])in this.attrs?G[O]=this.attrs[O]:o.is(this.paper.customAttributes[O],"function")?G[O]=this.paper.customAttributes[O].def:G[O]=o._availableAttrs[O];return V-1?G:G[D[0]]}if(E==null&&o.is(O,"array")){for(G={},M=0,V=O.length;M<V;M++)G[O[M]]=this.attr(O[M]);return G}if(E!=null){var q={};q[O]=E}else O!=null&&o.is(O,"object")&&(q=O);for(var Z in q)S("raphael.attr."+Z+"."+this.id,this,q[Z]);for(Z in this.paper.customAttributes)if(this.paper.customAttributes[h](Z)&&q[h](Z)&&o.is(this.paper.customAttributes[Z],"function")){var nt=this.paper.customAttributes[Z].apply(this,[].concat(q[Z]));for(var pt in this.attrs[Z]=q[Z],nt)nt[h](pt)&&(q[pt]=nt[pt])}return W(this,q),this},xt.toFront=function(){if(this.removed)return this;var O=wt(this.node);O.parentNode.appendChild(O);var E=this.paper;return E.top!=this&&o._tofront(this,E),this},xt.toBack=function(){if(this.removed)return this;var O=wt(this.node),E=O.parentNode;return E.insertBefore(O,E.firstChild),o._toback(this,this.paper),this.paper,this},xt.insertAfter=function(O){if(this.removed||!O)return this;var E=wt(this.node),T=wt(O.node||O[O.length-1].node);return T.nextSibling?T.parentNode.insertBefore(E,T.nextSibling):T.parentNode.appendChild(E),o._insertafter(this,O,this.paper),this},xt.insertBefore=function(O){if(this.removed||!O)return this;var E=wt(this.node),T=wt(O.node||O[0].node);return T.parentNode.insertBefore(E,T),o._insertbefore(this,O,this.paper),this},xt.blur=function(O){var E=this;if(+O!=0){var T=N("filter"),C=N("feGaussianBlur");E.attrs.blur=O,T.id=o.createUUID(),N(C,{stdDeviation:+O||1.5}),T.appendChild(C),E.paper.defs.appendChild(T),E._blur=T,N(E.node,{filter:"url(#"+T.id+")"})}else E._blur&&(E._blur.parentNode.removeChild(E._blur),delete E._blur,delete E.attrs.blur),E.node.removeAttribute("filter");return E},o._engine.circle=function(O,E,T,C){var D=N("circle");O.canvas&&O.canvas.appendChild(D);var G=new bt(D,O);return G.attrs={cx:E,cy:T,r:C,fill:"none",stroke:"#000"},G.type="circle",N(D,G.attrs),G},o._engine.rect=function(O,E,T,C,D,G){var M=N("rect");O.canvas&&O.canvas.appendChild(M);var V=new bt(M,O);return V.attrs={x:E,y:T,width:C,height:D,rx:G||0,ry:G||0,fill:"none",stroke:"#000"},V.type="rect",N(M,V.attrs),V},o._engine.ellipse=function(O,E,T,C,D){var G=N("ellipse");O.canvas&&O.canvas.appendChild(G);var M=new bt(G,O);return M.attrs={cx:E,cy:T,rx:C,ry:D,fill:"none",stroke:"#000"},M.type="ellipse",N(G,M.attrs),M},o._engine.image=function(O,E,T,C,D,G){var M=N("image");N(M,{x:T,y:C,width:D,height:G,preserveAspectRatio:"none"}),M.setAttributeNS(k,"href",E),O.canvas&&O.canvas.appendChild(M);var V=new bt(M,O);return V.attrs={x:T,y:C,width:D,height:G,src:E},V.type="image",V},o._engine.text=function(O,E,T,C){var D=N("text");O.canvas&&O.canvas.appendChild(D);var G=new bt(D,O);return G.attrs={x:E,y:T,"text-anchor":"middle",text:C,"font-family":o._availableAttrs["font-family"],"font-size":o._availableAttrs["font-size"],stroke:"none",fill:"#000"},G.type="text",W(G,G.attrs),G},o._engine.setSize=function(O,E){return this.width=O||this.width,this.height=E||this.height,this.canvas.setAttribute("width",this.width),this.canvas.setAttribute("height",this.height),this._viewBox&&this.setViewBox.apply(this,this._viewBox),this},o._engine.create=function(){var O=o._getContainer.apply(0,arguments),E=O&&O.container;if(!E)throw new Error("SVG container not found.");var T,C=O.x,D=O.y,G=O.width,M=O.height,V=N("svg"),q="overflow:hidden;";return C=C||0,D=D||0,N(V,{height:M=M||342,version:1.1,width:G=G||512,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}),E==1?(V.style.cssText=q+"position:absolute;left:"+C+"px;top:"+D+"px",o._g.doc.body.appendChild(V),T=1):(V.style.cssText=q+"position:relative",E.firstChild?E.insertBefore(V,E.firstChild):E.appendChild(V)),(E=new o._Paper).width=G,E.height=M,E.canvas=V,E.clear(),E._left=E._top=0,T&&(E.renderfix=function(){}),E.renderfix(),E},o._engine.setViewBox=function(O,E,T,C,D){S("raphael.setViewBox",this,this._viewBox,[O,E,T,C,D]);var G,M,V=this.getSize(),q=u(T/V.width,C/V.height),Z=this.top,nt=D?"xMidYMid meet":"xMinYMin";for(O==null?(this._vbSize&&(q=1),delete this._vbSize,G="0 0 "+this.width+m+this.height):(this._vbSize=q,G=O+m+E+m+T+m+C),N(this.canvas,{viewBox:G,preserveAspectRatio:nt});q&&Z;)M="stroke-width"in Z.attrs?Z.attrs["stroke-width"]:1,Z.attr({"stroke-width":M}),Z._.dirty=1,Z._.dirtyT=1,Z=Z.prev;return this._viewBox=[O,E,T,C,!!D],this},o.prototype.renderfix=function(){var O,E=this.canvas,T=E.style;try{O=E.getScreenCTM()||E.createSVGMatrix()}catch{O=E.createSVGMatrix()}var C=-O.e%1,D=-O.f%1;(C||D)&&(C&&(this._left=(this._left+C)%1,T.left=this._left+"px"),D&&(this._top=(this._top+D)%1,T.top=this._top+"px"))},o.prototype.clear=function(){o.eve("raphael.clear",this);for(var O=this.canvas;O.firstChild;)O.removeChild(O.firstChild);this.bottom=this.top=null,(this.desc=N("desc")).appendChild(o._g.doc.createTextNode("Created with Raphaël "+o.version)),O.appendChild(this.desc),O.appendChild(this.defs=N("defs"))},o.prototype.remove=function(){for(var O in S("raphael.remove",this),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas),this)this[O]=typeof this[O]=="function"?o._removedFactory(O):null};var it=o.st;for(var Y in xt)xt[h](Y)&&!it[h](Y)&&(it[Y]=function(O){return function(){var E=arguments;return this.forEach(function(T){T[O].apply(T,E)})}}(Y))}}).apply(r,s))===void 0||(e.exports=a)},function(e,r,i){var s,a;s=[i(0)],(a=(function(o){if(!o||o.vml){var h="hasOwnProperty",l=String,c=parseFloat,f=Math,d=f.round,u=f.max,p=f.min,v=f.abs,_=/[, ]+/,S=o.eve,x=" ",m="",k={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},F=/([clmz]),?([^clmz]*)/gi,P=/ progid:\S+Blur\([^\)]+\)/g,N=/-?[^,\s-]+/g,R="position:absolute;left:0;top:0;width:1px;height:1px;behavior:url(#default#VML)",L=21600,U={path:1,rect:1,image:1},B={circle:1,ellipse:1},K=function(E,T,C){var D=o.matrix();return D.rotate(-E,.5,.5),{dx:D.x(T,C),dy:D.y(T,C)}},tt=function(E,T,C,D,G,M){var V=E._,q=E.matrix,Z=V.fillpos,nt=E.node,pt=nt.style,kt=1,Ft="",St=L/T,At=L/C;if(pt.visibility="hidden",T&&C){if(nt.coordsize=v(St)+x+v(At),pt.rotation=M*(T*C<0?-1:1),M){var jt=K(M,D,G);D=jt.dx,G=jt.dy}if(T<0&&(Ft+="x"),C<0&&(Ft+=" y")&&(kt=-1),pt.flip=Ft,nt.coordorigin=D*-St+x+G*-At,Z||V.fillsize){var zt=nt.getElementsByTagName("fill");zt=zt&&zt[0],nt.removeChild(zt),Z&&(jt=K(M,q.x(Z[0],Z[1]),q.y(Z[0],Z[1])),zt.position=jt.dx*kt+x+jt.dy*kt),V.fillsize&&(zt.size=V.fillsize[0]*v(T)+x+V.fillsize[1]*v(C)),nt.appendChild(zt)}pt.visibility="visible"}};o.toString=function(){return`Your browser doesn’t support SVG. Falling down to VML.
42
- You are running Raphaël `+this.version};var W,lt=function(E,T,C){for(var D=l(T).toLowerCase().split("-"),G=C?"end":"start",M=D.length,V="classic",q="medium",Z="medium";M--;)switch(D[M]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":V=D[M];break;case"wide":case"narrow":Z=D[M];break;case"long":case"short":q=D[M]}var nt=E.node.getElementsByTagName("stroke")[0];nt[G+"arrow"]=V,nt[G+"arrowlength"]=q,nt[G+"arrowwidth"]=Z},wt=function(E,T){E.attrs=E.attrs||{};var C=E.node,D=E.attrs,G=C.style,M=U[E.type]&&(T.x!=D.x||T.y!=D.y||T.width!=D.width||T.height!=D.height||T.cx!=D.cx||T.cy!=D.cy||T.rx!=D.rx||T.ry!=D.ry||T.r!=D.r),V=B[E.type]&&(D.cx!=T.cx||D.cy!=T.cy||D.r!=T.r||D.rx!=T.rx||D.ry!=T.ry),q=E;for(var Z in T)T[h](Z)&&(D[Z]=T[Z]);if(M&&(D.path=o._getPath[E.type](E),E._.dirty=1),T.href&&(C.href=T.href),T.title&&(C.title=T.title),T.target&&(C.target=T.target),T.cursor&&(G.cursor=T.cursor),"blur"in T&&E.blur(T.blur),(T.path&&E.type=="path"||M)&&(C.path=function(Le){var Ln=/[ahqstv]/gi,Zn=o._pathToAbsolute;if(l(Le).match(Ln)&&(Zn=o._path2curve),Ln=/[clmz]/g,Zn==o._pathToAbsolute&&!l(Le).match(Ln)){var ke=l(Le).replace(F,function(vs,tr,er){var wn=[],Ur=tr.toLowerCase()=="m",nr=k[tr];return er.replace(N,function(Un){Ur&&wn.length==2&&(nr+=wn+k[tr=="m"?"l":"L"],wn=[]),wn.push(d(Un*L))}),nr+wn});return ke}var Fn,fn,Lr=Zn(Le);ke=[];for(var Wn=0,vr=Lr.length;Wn<vr;Wn++){Fn=Lr[Wn],(fn=Lr[Wn][0].toLowerCase())=="z"&&(fn="x");for(var _n=1,Ee=Fn.length;_n<Ee;_n++)fn+=d(Fn[_n]*L)+(_n!=Ee-1?",":m);ke.push(fn)}return ke.join(x)}(~l(D.path).toLowerCase().indexOf("r")?o._pathToAbsolute(D.path):D.path),E._.dirty=1,E.type=="image"&&(E._.fillpos=[D.x,D.y],E._.fillsize=[D.width,D.height],tt(E,1,1,0,0,0))),"transform"in T&&E.transform(T.transform),V){var nt=+D.cx,pt=+D.cy,kt=+D.rx||+D.r||0,Ft=+D.ry||+D.r||0;C.path=o.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x",d((nt-kt)*L),d((pt-Ft)*L),d((nt+kt)*L),d((pt+Ft)*L),d(nt*L)),E._.dirty=1}if("clip-rect"in T){var St=l(T["clip-rect"]).split(_);if(St.length==4){St[2]=+St[2]+ +St[0],St[3]=+St[3]+ +St[1];var At=C.clipRect||o._g.doc.createElement("div"),jt=At.style;jt.clip=o.format("rect({1}px {2}px {3}px {0}px)",St),C.clipRect||(jt.position="absolute",jt.top=0,jt.left=0,jt.width=E.paper.width+"px",jt.height=E.paper.height+"px",C.parentNode.insertBefore(At,C),At.appendChild(C),C.clipRect=At)}T["clip-rect"]||C.clipRect&&(C.clipRect.style.clip="auto")}if(E.textpath){var zt=E.textpath.style;T.font&&(zt.font=T.font),T["font-family"]&&(zt.fontFamily='"'+T["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g,m)+'"'),T["font-size"]&&(zt.fontSize=T["font-size"]),T["font-weight"]&&(zt.fontWeight=T["font-weight"]),T["font-style"]&&(zt.fontStyle=T["font-style"])}if("arrow-start"in T&&lt(q,T["arrow-start"]),"arrow-end"in T&&lt(q,T["arrow-end"],1),T.opacity!=null||T.fill!=null||T.src!=null||T.stroke!=null||T["stroke-width"]!=null||T["stroke-opacity"]!=null||T["fill-opacity"]!=null||T["stroke-dasharray"]!=null||T["stroke-miterlimit"]!=null||T["stroke-linejoin"]!=null||T["stroke-linecap"]!=null){var Ot=C.getElementsByTagName("fill");if(!(Ot=Ot&&Ot[0])&&(Ot=W("fill")),E.type=="image"&&T.src&&(Ot.src=T.src),T.fill&&(Ot.on=!0),Ot.on!=null&&T.fill!="none"&&T.fill!==null||(Ot.on=!1),Ot.on&&T.fill){var le=l(T.fill).match(o._ISURL);if(le){Ot.parentNode==C&&C.removeChild(Ot),Ot.rotate=!0,Ot.src=le[1],Ot.type="tile";var Jt=E.getBBox(1);Ot.position=Jt.x+x+Jt.y,E._.fillpos=[Jt.x,Jt.y],o._preload(le[1],function(){E._.fillsize=[this.offsetWidth,this.offsetHeight]})}else Ot.color=o.getRGB(T.fill).hex,Ot.src=m,Ot.type="solid",o.getRGB(T.fill).error&&(q.type in{circle:1,ellipse:1}||l(T.fill).charAt()!="r")&&bt(q,T.fill,Ot)&&(D.fill="none",D.gradient=T.fill,Ot.rotate=!1)}if("fill-opacity"in T||"opacity"in T){var ue=((+D["fill-opacity"]+1||2)-1)*((+D.opacity+1||2)-1)*((+o.getRGB(T.fill).o+1||2)-1);ue=p(u(ue,0),1),Ot.opacity=ue,Ot.src&&(Ot.color="none")}C.appendChild(Ot);var Bt=C.getElementsByTagName("stroke")&&C.getElementsByTagName("stroke")[0],Fe=!1;!Bt&&(Fe=Bt=W("stroke")),(T.stroke&&T.stroke!="none"||T["stroke-width"]||T["stroke-opacity"]!=null||T["stroke-dasharray"]||T["stroke-miterlimit"]||T["stroke-linejoin"]||T["stroke-linecap"])&&(Bt.on=!0),(T.stroke=="none"||T.stroke===null||Bt.on==null||T.stroke==0||T["stroke-width"]==0)&&(Bt.on=!1);var Pe=o.getRGB(T.stroke);Bt.on&&T.stroke&&(Bt.color=Pe.hex),ue=((+D["stroke-opacity"]+1||2)-1)*((+D.opacity+1||2)-1)*((+Pe.o+1||2)-1);var Qe=.75*(c(T["stroke-width"])||1);if(ue=p(u(ue,0),1),T["stroke-width"]==null&&(Qe=D["stroke-width"]),T["stroke-width"]&&(Bt.weight=Qe),Qe&&Qe<1&&(ue*=Qe)&&(Bt.weight=1),Bt.opacity=ue,T["stroke-linejoin"]&&(Bt.joinstyle=T["stroke-linejoin"]||"miter"),Bt.miterlimit=T["stroke-miterlimit"]||8,T["stroke-linecap"]&&(Bt.endcap=T["stroke-linecap"]=="butt"?"flat":T["stroke-linecap"]=="square"?"square":"round"),"stroke-dasharray"in T){var vn={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};Bt.dashstyle=vn[h](T["stroke-dasharray"])?vn[T["stroke-dasharray"]]:m}Fe&&C.appendChild(Bt)}if(q.type=="text"){q.paper.canvas.style.display=m;var an=q.paper.span,Ne=D.font&&D.font.match(/\d+(?:\.\d*)?(?=px)/);G=an.style,D.font&&(G.font=D.font),D["font-family"]&&(G.fontFamily=D["font-family"]),D["font-weight"]&&(G.fontWeight=D["font-weight"]),D["font-style"]&&(G.fontStyle=D["font-style"]),Ne=c(D["font-size"]||Ne&&Ne[0])||10,G.fontSize=100*Ne+"px",q.textpath.string&&(an.innerHTML=l(q.textpath.string).replace(/</g,"&#60;").replace(/&/g,"&#38;").replace(/\n/g,"<br>"));var en=an.getBoundingClientRect();q.W=D.w=(en.right-en.left)/100,q.H=D.h=(en.bottom-en.top)/100,q.X=D.x,q.Y=D.y+q.H/2,("x"in T||"y"in T)&&(q.path.v=o.format("m{0},{1}l{2},{1}",d(D.x*L),d(D.y*L),d(D.x*L)+1));for(var On=["x","y","text","font","font-family","font-weight","font-style","font-size"],$n=0,jn=On.length;$n<jn;$n++)if(On[$n]in T){q._.dirty=1;break}switch(D["text-anchor"]){case"start":q.textpath.style["v-text-align"]="left",q.bbx=q.W/2;break;case"end":q.textpath.style["v-text-align"]="right",q.bbx=-q.W/2;break;default:q.textpath.style["v-text-align"]="center",q.bbx=0}q.textpath.style["v-text-kern"]=!0}},bt=function(E,T,C){E.attrs=E.attrs||{},E.attrs;var D=Math.pow,G="linear",M=".5 .5";if(E.attrs.gradient=T,T=(T=l(T).replace(o._radial_gradient,function(kt,Ft,St){return G="radial",Ft&&St&&(Ft=c(Ft),St=c(St),D(Ft-.5,2)+D(St-.5,2)>.25&&(St=f.sqrt(.25-D(Ft-.5,2))*(2*(St>.5)-1)+.5),M=Ft+x+St),m})).split(/\s*\-\s*/),G=="linear"){var V=T.shift();if(V=-c(V),isNaN(V))return null}var q=o._parseDots(T);if(!q)return null;if(E=E.shape||E.node,q.length){E.removeChild(C),C.on=!0,C.method="none",C.color=q[0].color,C.color2=q[q.length-1].color;for(var Z=[],nt=0,pt=q.length;nt<pt;nt++)q[nt].offset&&Z.push(q[nt].offset+x+q[nt].color);C.colors=Z.length?Z.join():"0% "+C.color,G=="radial"?(C.type="gradientTitle",C.focus="100%",C.focussize="0 0",C.focusposition=M,C.angle=0):(C.type="gradient",C.angle=(270-V)%360),E.appendChild(C)}return 1},xt=function(E,T){this[0]=this.node=E,E.raphael=!0,this.id=o._oid++,E.raphaelid=this.id,this.X=0,this.Y=0,this.attrs={},this.paper=T,this.matrix=o.matrix(),this._={transform:[],sx:1,sy:1,dx:0,dy:0,deg:0,dirty:1,dirtyT:1},!T.bottom&&(T.bottom=this),this.prev=T.top,T.top&&(T.top.next=this),T.top=this,this.next=null},it=o.el;xt.prototype=it,it.constructor=xt,it.transform=function(E){if(E==null)return this._.transform;var T,C=this.paper._viewBoxShift,D=C?"s"+[C.scale,C.scale]+"-1-1t"+[C.dx,C.dy]:m;C&&(T=E=l(E).replace(/\.{3}|\u2026/g,this._.transform||m)),o._extractTransform(this,D+E);var G,M=this.matrix.clone(),V=this.skew,q=this.node,Z=~l(this.attrs.fill).indexOf("-"),nt=!l(this.attrs.fill).indexOf("url(");if(M.translate(1,1),nt||Z||this.type=="image")if(V.matrix="1 0 0 1",V.offset="0 0",G=M.split(),Z&&G.noRotation||!G.isSimple){q.style.filter=M.toFilter();var pt=this.getBBox(),kt=this.getBBox(1),Ft=pt.x-kt.x,St=pt.y-kt.y;q.coordorigin=Ft*-L+x+St*-L,tt(this,1,1,Ft,St,0)}else q.style.filter=m,tt(this,G.scalex,G.scaley,G.dx,G.dy,G.rotate);else q.style.filter=m,V.matrix=l(M),V.offset=M.offset();return T!==null&&(this._.transform=T,o._extractTransform(this,T)),this},it.rotate=function(E,T,C){if(this.removed)return this;if(E!=null){if((E=l(E).split(_)).length-1&&(T=c(E[1]),C=c(E[2])),E=c(E[0]),C==null&&(T=C),T==null||C==null){var D=this.getBBox(1);T=D.x+D.width/2,C=D.y+D.height/2}return this._.dirtyT=1,this.transform(this._.transform.concat([["r",E,T,C]])),this}},it.translate=function(E,T){return this.removed?this:((E=l(E).split(_)).length-1&&(T=c(E[1])),E=c(E[0])||0,T=+T||0,this._.bbox&&(this._.bbox.x+=E,this._.bbox.y+=T),this.transform(this._.transform.concat([["t",E,T]])),this)},it.scale=function(E,T,C,D){if(this.removed)return this;if((E=l(E).split(_)).length-1&&(T=c(E[1]),C=c(E[2]),D=c(E[3]),isNaN(C)&&(C=null),isNaN(D)&&(D=null)),E=c(E[0]),T==null&&(T=E),D==null&&(C=D),C==null||D==null)var G=this.getBBox(1);return C=C??G.x+G.width/2,D=D??G.y+G.height/2,this.transform(this._.transform.concat([["s",E,T,C,D]])),this._.dirtyT=1,this},it.hide=function(){return!this.removed&&(this.node.style.display="none"),this},it.show=function(){return!this.removed&&(this.node.style.display=m),this},it.auxGetBBox=o.el.getBBox,it.getBBox=function(){var E=this.auxGetBBox();if(this.paper&&this.paper._viewBoxShift){var T={},C=1/this.paper._viewBoxShift.scale;return T.x=E.x-this.paper._viewBoxShift.dx,T.x*=C,T.y=E.y-this.paper._viewBoxShift.dy,T.y*=C,T.width=E.width*C,T.height=E.height*C,T.x2=T.x+T.width,T.y2=T.y+T.height,T}return E},it._getBBox=function(){return this.removed?{}:{x:this.X+(this.bbx||0)-this.W/2,y:this.Y-this.H,width:this.W,height:this.H}},it.remove=function(){if(!this.removed&&this.node.parentNode){for(var E in this.paper.__set__&&this.paper.__set__.exclude(this),o.eve.unbind("raphael.*.*."+this.id),o._tear(this,this.paper),this.node.parentNode.removeChild(this.node),this.shape&&this.shape.parentNode.removeChild(this.shape),this)this[E]=typeof this[E]=="function"?o._removedFactory(E):null;this.removed=!0}},it.attr=function(E,T){if(this.removed)return this;if(E==null){var C={};for(var D in this.attrs)this.attrs[h](D)&&(C[D]=this.attrs[D]);return C.gradient&&C.fill=="none"&&(C.fill=C.gradient)&&delete C.gradient,C.transform=this._.transform,C}if(T==null&&o.is(E,"string")){if(E=="fill"&&this.attrs.fill=="none"&&this.attrs.gradient)return this.attrs.gradient;for(var G=E.split(_),M={},V=0,q=G.length;V<q;V++)(E=G[V])in this.attrs?M[E]=this.attrs[E]:o.is(this.paper.customAttributes[E],"function")?M[E]=this.paper.customAttributes[E].def:M[E]=o._availableAttrs[E];return q-1?M:M[G[0]]}if(this.attrs&&T==null&&o.is(E,"array")){for(M={},V=0,q=E.length;V<q;V++)M[E[V]]=this.attr(E[V]);return M}var Z;for(var nt in T!=null&&((Z={})[E]=T),T==null&&o.is(E,"object")&&(Z=E),Z)S("raphael.attr."+nt+"."+this.id,this,Z[nt]);if(Z){for(nt in this.paper.customAttributes)if(this.paper.customAttributes[h](nt)&&Z[h](nt)&&o.is(this.paper.customAttributes[nt],"function")){var pt=this.paper.customAttributes[nt].apply(this,[].concat(Z[nt]));for(var kt in this.attrs[nt]=Z[nt],pt)pt[h](kt)&&(Z[kt]=pt[kt])}Z.text&&this.type=="text"&&(this.textpath.string=Z.text),wt(this,Z)}return this},it.toFront=function(){return!this.removed&&this.node.parentNode.appendChild(this.node),this.paper&&this.paper.top!=this&&o._tofront(this,this.paper),this},it.toBack=function(){return this.removed?this:(this.node.parentNode.firstChild!=this.node&&(this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild),o._toback(this,this.paper)),this)},it.insertAfter=function(E){return this.removed?this:(E.constructor==o.st.constructor&&(E=E[E.length-1]),E.node.nextSibling?E.node.parentNode.insertBefore(this.node,E.node.nextSibling):E.node.parentNode.appendChild(this.node),o._insertafter(this,E,this.paper),this)},it.insertBefore=function(E){return this.removed?this:(E.constructor==o.st.constructor&&(E=E[0]),E.node.parentNode.insertBefore(this.node,E.node),o._insertbefore(this,E,this.paper),this)},it.blur=function(E){var T=this.node.runtimeStyle,C=T.filter;return C=C.replace(P,m),+E!=0?(this.attrs.blur=E,T.filter=C+x+" progid:DXImageTransform.Microsoft.Blur(pixelradius="+(+E||1.5)+")",T.margin=o.format("-{0}px 0 0 -{0}px",d(+E||1.5))):(T.filter=C,T.margin=0,delete this.attrs.blur),this},o._engine.path=function(E,T){var C=W("shape");C.style.cssText=R,C.coordsize=L+x+L,C.coordorigin=T.coordorigin;var D=new xt(C,T),G={fill:"none",stroke:"#000"};E&&(G.path=E),D.type="path",D.path=[],D.Path=m,wt(D,G),T.canvas&&T.canvas.appendChild(C);var M=W("skew");return M.on=!0,C.appendChild(M),D.skew=M,D.transform(m),D},o._engine.rect=function(E,T,C,D,G,M){var V=o._rectPath(T,C,D,G,M),q=E.path(V),Z=q.attrs;return q.X=Z.x=T,q.Y=Z.y=C,q.W=Z.width=D,q.H=Z.height=G,Z.r=M,Z.path=V,q.type="rect",q},o._engine.ellipse=function(E,T,C,D,G){var M=E.path();return M.attrs,M.X=T-D,M.Y=C-G,M.W=2*D,M.H=2*G,M.type="ellipse",wt(M,{cx:T,cy:C,rx:D,ry:G}),M},o._engine.circle=function(E,T,C,D){var G=E.path();return G.attrs,G.X=T-D,G.Y=C-D,G.W=G.H=2*D,G.type="circle",wt(G,{cx:T,cy:C,r:D}),G},o._engine.image=function(E,T,C,D,G,M){var V=o._rectPath(C,D,G,M),q=E.path(V).attr({stroke:"none"}),Z=q.attrs,nt=q.node,pt=nt.getElementsByTagName("fill")[0];return Z.src=T,q.X=Z.x=C,q.Y=Z.y=D,q.W=Z.width=G,q.H=Z.height=M,Z.path=V,q.type="image",pt.parentNode==nt&&nt.removeChild(pt),pt.rotate=!0,pt.src=T,pt.type="tile",q._.fillpos=[C,D],q._.fillsize=[G,M],nt.appendChild(pt),tt(q,1,1,0,0,0),q},o._engine.text=function(E,T,C,D){var G=W("shape"),M=W("path"),V=W("textpath");T=T||0,C=C||0,D=D||"",M.v=o.format("m{0},{1}l{2},{1}",d(T*L),d(C*L),d(T*L)+1),M.textpathok=!0,V.string=l(D),V.on=!0,G.style.cssText=R,G.coordsize=L+x+L,G.coordorigin="0 0";var q=new xt(G,E),Z={fill:"#000",stroke:"none",font:o._availableAttrs.font,text:D};q.shape=G,q.path=M,q.textpath=V,q.type="text",q.attrs.text=l(D),q.attrs.x=T,q.attrs.y=C,q.attrs.w=1,q.attrs.h=1,wt(q,Z),G.appendChild(V),G.appendChild(M),E.canvas.appendChild(G);var nt=W("skew");return nt.on=!0,G.appendChild(nt),q.skew=nt,q.transform(m),q},o._engine.setSize=function(E,T){var C=this.canvas.style;return this.width=E,this.height=T,E==+E&&(E+="px"),T==+T&&(T+="px"),C.width=E,C.height=T,C.clip="rect(0 "+E+" "+T+" 0)",this._viewBox&&o._engine.setViewBox.apply(this,this._viewBox),this},o._engine.setViewBox=function(E,T,C,D,G){o.eve("raphael.setViewBox",this,this._viewBox,[E,T,C,D,G]);var M,V,q=this.getSize(),Z=q.width,nt=q.height;return G&&(C*(M=nt/D)<Z&&(E-=(Z-C*M)/2/M),D*(V=Z/C)<nt&&(T-=(nt-D*V)/2/V)),this._viewBox=[E,T,C,D,!!G],this._viewBoxShift={dx:-E,dy:-T,scale:q},this.forEach(function(pt){pt.transform("...")}),this},o._engine.initWin=function(E){var T=E.document;T.styleSheets.length<31?T.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)"):T.styleSheets[0].addRule(".rvml","behavior:url(#default#VML)");try{!T.namespaces.rvml&&T.namespaces.add("rvml","urn:schemas-microsoft-com:vml"),W=function(C){return T.createElement("<rvml:"+C+' class="rvml">')}}catch{W=function(C){return T.createElement("<"+C+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},o._engine.initWin(o._g.win),o._engine.create=function(){var E=o._getContainer.apply(0,arguments),T=E.container,C=E.height,D=E.width,G=E.x,M=E.y;if(!T)throw new Error("VML container not found.");var V=new o._Paper,q=V.canvas=o._g.doc.createElement("div"),Z=q.style;return G=G||0,M=M||0,D=D||512,C=C||342,V.width=D,V.height=C,D==+D&&(D+="px"),C==+C&&(C+="px"),V.coordsize=216e5+x+216e5,V.coordorigin="0 0",V.span=o._g.doc.createElement("span"),V.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",q.appendChild(V.span),Z.cssText=o.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",D,C),T==1?(o._g.doc.body.appendChild(q),Z.left=G+"px",Z.top=M+"px",Z.position="absolute"):T.firstChild?T.insertBefore(q,T.firstChild):T.appendChild(q),V.renderfix=function(){},V},o.prototype.clear=function(){o.eve("raphael.clear",this),this.canvas.innerHTML=m,this.span=o._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},o.prototype.remove=function(){for(var E in o.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas),this)this[E]=typeof this[E]=="function"?o._removedFactory(E):null;return!0};var Y=o.st;for(var O in it)it[h](O)&&!Y[h](O)&&(Y[O]=function(E){return function(){var T=arguments;return this.forEach(function(C){C[E].apply(C,T)})}}(O))}}).apply(r,s))===void 0||(e.exports=a)}])})})(Rg);var vS=Rg.exports;const mn=Tn(vS);class il{constructor(t=[]){Tt(this,"points");this.points=t}toSVGPathData(){const t=[];for(let e=0,r=this.length;e<r;e++)t.push([e===0?"M":"L",this.points[e].x,this.points[e].y]);return t}toSVGPathD(){let t="";for(let e=0,r=this.length;e<r;e++)t+=(e===0?"M":"L")+this.points[e].x+","+this.points[e].y;return t}get length(){return this.points.length}addPoint(t){this.points.push(t)}getPoint(t){return this.points[t]}isContainPoint(t){const e=t.x,r=t.y,i=this.length;let s=!1;const a=2e-10;for(let o=0,h=i-1;o<i;h=o,o++){const l=this.points[o].x,c=this.points[o].y,f=this.points[h].x,d=this.points[h].y;if(l===e&&c===r||f===e&&d===r||r===c&&r===d)return!0;if(r>=c&&r<d||r<c&&r>=d){const u=(f-l)/(d-c),p=l+u*(r-c);if(p===e||Math.abs(p-e)<a)return!0;p>e&&(s=!s)}}return s}[Symbol.iterator](){let t=0;return{next:()=>({value:t>=this.length-1?this.points[++t]:void 0,done:t>=this.length})}}static generateInMultiplePoint(t,e,r,i,s=1){const a=new il;for(let o=0;o<=s*r;o+=1){const h=Math.floor(o/s)/r*2*Math.PI,l=t+Math.cos(h)*i,c=e+Math.sin(h)*i;a.addPoint(new bi({x:l,y:c}))}return a}}mn.easing_formulas.swing=function(n){return n+Math.sin(n*Math.PI*2)/2},mn.easing_formulas.may_cause_seizures=function(n){return n+.2*Math.random()-.1},mn.fn.importSVG=function(n,t){const e=_S.fromRawSVG(n);return e.toRaphael(this,(r,i)=>{e.save(),t&&t(r),i(),e.restore()}),this},mn.fn.NPolygonPath=function(n,t,e,r,i=2){return{shape:this.path(il.generateInMultiplePoint(n,t,e,r,i).toSVGPathD()),afterPath:il.generateInMultiplePoint(n,t,e*i,r,1).toSVGPathD()}},mn.fn.zoom=function(n=1){return this.setViewBox(0,0,this.width/n,this.height/n),this},mn.fn.brickwall=function(n,t,e,r,i){for(var s=r/i,a=e/3,o={fill:"firebrick",stroke:"#CCC"},h=0;h<i;h+=1){var l=this.rect(0,0,a,s).attr(o),c=this.rect(0,0,2*a,s).attr(o);h%2?(l.transform("T"+n+","+(t+h*s)),c.transform("T"+(n+a)+","+(t+h*s))):(c.transform("T"+n+","+(t+h*s)),l.transform("T"+(n+2*a)+","+(t+h*s)))}},mn.fn.rosetta=function(n,t,e,r,i){const s=es.generateRosetta(n,t,e,r,i);return s.center,this.path(s.toSVGPathD())},mn.fn.moon=function(n){n=n||{},n.r=typeof n.r=="number"?n.r:100,n.phase=typeof n.phase=="number"?n.phase:.25,n.x=typeof n.x=="number"?n.x:0,n.y=typeof n.y=="number"?n.y:0,this.circle(n.r+n.x,n.r+n.y,n.r).attr({"stroke-width":0,fill:"#999"});function t(r){r=typeof r=="number"?r:.25,r=Math.max(0,Math.min(1,r)),r=(r-.5)*2;let i="M"+n.r+",0";i+="a"+n.r+","+n.r+" 0 0,0 0,"+n.r*2;let s=r>0?0:1;return r=Math.abs(r),r=r||1e-4,n.inner_r=n.r/Math.pow(r,.5),i+="M"+n.r+","+n.r*2,i+="a"+n.inner_r+","+n.inner_r+" 0 0,"+s+" 0,"+n.r*-2,i}var e=this.path(t(n.phase)).attr({"stroke-width":0,stroke:"#999",fill:"#FF9"}).transform("T"+n.x+","+n.y);return{setPhase:function(r){e.attr("path",t(r))}}},mn.fn.star=function(n,t,e){let r="M"+n+","+(t-e);for(var i=0;i<6;i+=1){const s=270+i*144,a=n+e*Math.cos(s*Math.PI/180),o=t+e*Math.sin(s*Math.PI/180);r+="L"+a+","+o}return this.path(r).attr("stroke-width",0).attr("fill","red")},mn.fn.heart=function(n=150,t=300){let e="M"+n+","+t;return e+="l120,-175a50,50 0 0,0 -120,-75a50,50 0 0,0 -120,75l120,175",this.path(e).attr("stroke","red").attr("fill","pink")},mn.el.redder=function(){const n=mn.getRGB(this.attr("fill"));n.r+=51,this.attr("fill","rgb("+n.r+","+n.g+","+n.b+")")},mn.installCustomAttributes=function(n){n.customAttributes.redness=function(t){const e=255*(1-t/100);return{fill:"rgb(255,"+e+", "+e+")"}},n.customAttributes.progress=function(t){const e=this.data("progresspath"),r=this.attr(),i={x:0,y:0},s=this.data("progresstrail");if(!e)return{transform:"t0,0"};Object.prototype.hasOwnProperty.call(r,"width")&&(i.x=-this.attr("width")/2,i.y=-this.attr("height")/2);const a=e.getTotalLength(),o=e.getPointAtLength(t*a);return s&&s.attr("path",e.getSubpath(0,t*a)),{transform:"t"+(o.x+i.x)+","+(o.y+i.y)+"r"+o.alpha}}};const Dg=mn;class Si{constructor(){Tt(this,"pgs",[]);Tt(this,"history",[])}save(){this.history.push(af(this.pgs))}restore(){const t=this.history.pop();t&&(this.pgs=t)}get size(){let t=0,e=0;return this.pgs.forEach(r=>{const i=r.pg;if(i){const[s,a,o,h]=i.bounds,[l,c]=i.size;t=Math.max(t,s,s+l,o),e=Math.max(e,a,a+c,h)}}),[Math.ceil(t),Math.ceil(e)]}static fromRawSVG(t){return Si.fromRawSVGUseRappar(t)}static fromRawSVGUseRappar(t){const e=new Si,r=pS(t);for(let i=0,s=r.length;i<s;i++){const a=r[i];if(a.type=="viewbox"&&a.width&&a.height)continue;const o={attrs:{}};for(const h in a)h==="type"||h==="path"||h==="transform"||(o.attrs[h]=a[h]);switch(a.type){case"path":o.d=a.path,o.pg=es.fromSVGPathD(a.path,a.transform);break}e.pgs.push(o)}return e}toRaphael(t,e){let r;t instanceof HTMLElement?r=Dg(HTMLElement):typeof t=="string"?r=Dg(document.getElementById(t)):r=t;const[i,s]=this.size;r.setSize(i,s);const a=(o=!1)=>{var h,l;for(let c=0,f=this.pgs.length;c<f;c++){const d=this.pgs[c];if(d.pg&&(d.raphaelPath?d.raphaelPath.attr("path",d.pg.toSVGPathD()):d.raphaelPath=r.path(d.pg.toSVGPathD()),d.raphaelPath.attr(d.attrs)),o&&e){const u=p=>{const{x:v,y:_}=dg(r.canvas,p),S=this.pgs.find(x=>{var m;return(m=x.raphaelPath)==null?void 0:m.isPointInside(v,_)});S&&(e==null||e(S,a))};(h=d.raphaelPath)==null||h.unclick(u),(l=d.raphaelPath)==null||l.click(u)}}};return a(!0),r}toCanvasOperation(t,e){let r;typeof t=="string"?r=document.getElementById(t):r=t;const[i,s]=this.size;r.width=i,r.height=s;const a=new wS(r),o=()=>{a.clearRect(0,0,i,s);for(let l=0,c=this.pgs.length;l<c;l++){const f=this.pgs[l];f.pg&&(a.save(),this.toCanvasAttrs(a,f.attrs),f.pg.toCanvas(a),f.attrs.stroke!=="none"&&a.stroke(),f.attrs.fill!=="none"&&a.fill(),a.restore())}};o();const h=l=>{const{x:c,y:f}=dg(a.canvas,l),d=this.pgs.find(u=>{var p;return(p=u.pg)==null?void 0:p.isPointInPath(c,f)});d&&(e==null||e(d,o))};return r.removeEventListener("click",h),r.addEventListener("click",h),a}toCanvasAttrs(t,e){for(const r in e){const i=e[r];switch(r){case"fill":t.fillStyle=String(i);break;case"stroke":t.strokeStyle=String(i);break;case"stroke-width":t.lineWidth=Number(i);break;case"stroke-linecap":t.lineCap=i;break;case"stroke-linejoin":t.lineJoin=i;break}}}static toDownloadSVGElement(t,e="shape"){hg(F8(t),`${e}.svg`)}toDownloadSVGElement(t,e="shape"){return Si.toDownloadSVGElement(t,e),this}static toDownloadSVGString(t,e="shape"){hg(lg(t),`${e}.svg`)}toDownloadSVGString(t,e="shape"){return Si.toDownloadSVGString(t,e),this}static getSVGDOM(t){if(t instanceof HTMLObjectElement||t instanceof HTMLIFrameElement)return t.contentDocument;if(t instanceof HTMLEmbedElement)return t.getSVGDocument()}}const _S=Si;class wS{constructor(t){Tt(this,"canvas");Tt(this,"context");Tt(this,"customContext");this.canvas=t,this.context=t.getContext("2d",{willReadFrequently:!0}),this.customContext=new rl({canvas:this.canvas,width:this.canvas.width,height:this.canvas.height})}set lineWidth(t){this.context.lineWidth=t,this.customContext.lineWidth=t}get lineWidth(){return this.context.lineWidth}set lineCap(t){this.context.lineCap=t,this.customContext.lineCap=t}get lineCap(){return this.context.lineCap}set lineJoin(t){this.context.lineJoin=t,this.customContext.lineCap=t}get lineJoin(){return this.context.lineJoin}set lineDashOffset(t){this.context.lineDashOffset=t,this.customContext.lineDashOffset=t}get lineDashOffset(){return this.context.lineDashOffset}set miterLimit(t){this.context.miterLimit=t,this.customContext.miterLimit=t}get miterLimit(){return this.context.miterLimit}set globalAlpha(t){this.context.globalAlpha=t,this.customContext.globalAlpha=t}get globalAlpha(){return this.context.globalAlpha}set fillStyle(t){typeof t=="string"||t instanceof CanvasGradient||t instanceof CanvasPattern?(this.context.fillStyle=t,this.customContext.fillStyle=t):(this.context.fillStyle=t.gradient,this.customContext.fillStyle=t.gradientCustom)}get fillStyle(){return this.context.fillStyle}set strokeStyle(t){typeof t=="string"||t instanceof CanvasGradient||t instanceof CanvasPattern?(this.context.strokeStyle=t,this.customContext.strokeStyle=t):(this.context.strokeStyle=t.gradient,this.customContext.strokeStyle=t.gradientCustom)}get strokeStyle(){return this.context.strokeStyle}set font(t){this.context.font=t,this.customContext.font=t}get font(){return this.context.font}fill(){return this.context.fill(),this.customContext.fill(),this}fillRect(t,e,r,i){return this.context.fillRect(t,e,r,i),this.customContext.fillRect(t,e,r,i),this}fillText(t,e,r,i){return this.context.fillText(t,e,r,i),this.customContext.fillText(t,e,r),this}setLineDash(t){return this.context.setLineDash(t),this.customContext.setLineDash(t),this}stroke(){return this.context.stroke(),this.customContext.stroke(),this}strokeText(t,e,r,i){return this.context.strokeText(t,e,r,i),this.customContext.strokeText(t,e,r),this}strokeRect(t,e,r,i){return this.context.strokeRect(t,e,r,i),this.customContext.strokeRect(t,e,r,i),this}clearRect(t=0,e=0,r=this.canvas.width,i=this.canvas.height){return this.context.clearRect(t,e,r,i),this.customContext.clearRect(t,e,r,i),this}save(){return this.context.save(),this.customContext.save(),this}restore(){return this.context.restore(),this.customContext.restore(),this}beginPath(){return this.context.beginPath(),this.customContext.beginPath(),this}closePath(){return this.context.closePath(),this.customContext.closePath(),this}moveTo(t,e){return this.context.moveTo(t,e),this.customContext.moveTo(t,e),this}lineTo(t,e){return this.context.lineTo(t,e),this.customContext.lineTo(t,e),this}arc(t,e,r,i,s,a){return this.context.arc(t,e,r,i,s,a),this.customContext.arc(t,e,r,i,s,a?-1:1),this}arcTo(t,e,r,i,s){return this.context.arcTo(t,e,r,i,s),this.customContext.arcTo(t,e,r,i,s),this}quadraticCurveTo(t,e,r,i){return this.context.quadraticCurveTo(t,e,r,i),this.customContext.quadraticCurveTo(t,e,r,i),this}bezierCurveTo(t,e,r,i,s,a){return this.context.bezierCurveTo(t,e,r,i,s,a),this.customContext.bezierCurveTo(t,e,r,i,s,a),this}rect(t,e,r,i){return this.context.rect(t,e,r,i),this.customContext.rect(t,e,r,i),this}translate(t,e){return this.context.translate(t,e),this.customContext.translate(t,e),this}rotate(t){return this.context.rotate(t),this.customContext.rotate(t),this}scale(t,e){return this.context.scale(t,e),this.customContext.scale(t,e),this}createLinearGradient(t,e,r,i,s){const a=this.context.createLinearGradient(t,e,r,i),o=this.customContext.createLinearGradient(t,e,r,i);return s&&Object.keys(s).forEach(h=>{const l=parseFloat(h);a.addColorStop(l,s[l]),o.addColorStop(l,s[l])}),{gradient:a,gradientCustom:o}}createRadialGradient(t,e,r,i,s,a,o){const h=this.context.createRadialGradient(t,e,r,i,s,a),l=this.customContext.createRadialGradient(t,e,r,i,s,a);return o&&Object.keys(o).forEach(c=>{const f=parseFloat(c);h.addColorStop(f,o[f]),l.addColorStop(f,o[f])}),{gradient:h,gradientCustom:l}}drawImage(t,e=0,r=0){return this.context.drawImage(t,e,r),this.customContext.drawImage(t,e,r),this}getImageData(t,e,r,i,s){return this.context.getImageData(t,e,r,i,s)}putImageData(t,e=0,r=0){return this.context.putImageData(t,e,r)}toRawSVG(){const t=this.customContext.getSerializedSvg(!0),e=this.customContext.getSvg();return{raw:t,element:e}}toSVGOperation(){const{raw:t}=this.toRawSVG();return Si.fromRawSVG(t)}}(function(){let n=0;window.requestAnimationFrame||(window.requestAnimationFrame=function(t){const e=new Date().getTime(),r=Math.max(0,16-(e-n)),i=window.setTimeout(function(){t(e+r)},r);return n=e+r,i}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)})})();const xS={colorPrimary:rn.getCSSVar("--color-primary"),colorRed:rn.getCSSVar("--color-red"),colorOrange:rn.getCSSVar("--color-orange"),colorYellow:rn.getCSSVar("--color-yellow"),colorGray3:rn.getCSSVar("--color-gray-3")};var Mg={exports:{}};(function(n){var t={};n.exports=t,t.parse=function(e,r){for(var i=t.bin.readUshort,s=t.bin.readUint,l=0,a={},o=new Uint8Array(e),h=o.length-4;s(o,h)!=101010256;)h--;var l=h;l+=4,l+=4;var c=i(o,l);l+=2,i(o,l),l+=2;var f=s(o,l);l+=4;var d=s(o,l);l+=4,l=d;for(var u=0;u<c;u++){s(o,l),l+=4,l+=4,l+=4,l+=4,s(o,l),l+=4;var f=s(o,l);l+=4;var p=s(o,l);l+=4;var v=i(o,l),_=i(o,l+2),S=i(o,l+4);l+=6,l+=8;var x=s(o,l);l+=4,l+=v+_+S,t._readLocal(o,x,a,f,p,r)}return a},t._readLocal=function(e,r,i,s,a,o){var h=t.bin.readUshort,l=t.bin.readUint;l(e,r),r+=4,h(e,r),r+=2,h(e,r),r+=2;var c=h(e,r);r+=2,l(e,r),r+=4,l(e,r),r+=4,r+=8;var f=h(e,r);r+=2;var d=h(e,r);r+=2;var u=t.bin.readUTF8(e,r,f);if(r+=f,r+=d,o){i[u]={size:a,csize:s};return}var p=new Uint8Array(e.buffer,r);if(c==0)i[u]=new Uint8Array(p.buffer.slice(r,r+s));else if(c==8){var v=new Uint8Array(a);t.inflateRaw(p,v),i[u]=v}else throw"unknown compression method: "+c},t.inflateRaw=function(e,r){return t.F.inflate(e,r)},t.inflate=function(e,r){return e[0],e[1],t.inflateRaw(new Uint8Array(e.buffer,e.byteOffset+2,e.length-6),r)},t.deflate=function(e,r){r==null&&(r={level:6});var i=0,s=new Uint8Array(50+Math.floor(e.length*1.1));s[i]=120,s[i+1]=156,i+=2,i=t.F.deflateRaw(e,s,i,r.level);var a=t.adler(e,0,e.length);return s[i+0]=a>>>24&255,s[i+1]=a>>>16&255,s[i+2]=a>>>8&255,s[i+3]=a>>>0&255,new Uint8Array(s.buffer,0,i+4)},t.deflateRaw=function(e,r){r==null&&(r={level:6});var i=new Uint8Array(50+Math.floor(e.length*1.1)),s=t.F.deflateRaw(e,i,s,r.level);return new Uint8Array(i.buffer,0,s)},t.encode=function(e,r){r==null&&(r=!1);var i=0,s=t.bin.writeUint,a=t.bin.writeUshort,o={};for(var h in e){var l=!t._noNeed(h)&&!r,c=e[h],f=t.crc.crc(c,0,c.length);o[h]={cpr:l,usize:c.length,crc:f,file:l?t.deflateRaw(c):c}}for(var h in o)i+=o[h].file.length+30+46+2*t.bin.sizeUTF8(h);i+=22;var d=new Uint8Array(i),u=0,p=[];for(var h in o){var v=o[h];p.push(u),u=t._writeHeader(d,u,h,v,0)}var _=0,S=u;for(var h in o){var v=o[h];p.push(u),u=t._writeHeader(d,u,h,v,1,p[_++])}var x=u-S;return s(d,u,101010256),u+=4,u+=4,a(d,u,_),u+=2,a(d,u,_),u+=2,s(d,u,x),u+=4,s(d,u,S),u+=4,u+=2,d.buffer},t._noNeed=function(e){var r=e.split(".").pop().toLowerCase();return"png,jpg,jpeg,zip".indexOf(r)!=-1},t._writeHeader=function(e,r,i,s,a,o){var h=t.bin.writeUint,l=t.bin.writeUshort,c=s.file;h(e,r,a==0?67324752:33639248),r+=4,a==1&&(r+=2),l(e,r,20),r+=2,l(e,r,0),r+=2,l(e,r,s.cpr?8:0),r+=2,h(e,r,0),r+=4,h(e,r,s.crc),r+=4,h(e,r,c.length),r+=4,h(e,r,s.usize),r+=4,l(e,r,t.bin.sizeUTF8(i)),r+=2,l(e,r,0),r+=2,a==1&&(r+=2,r+=2,r+=6,h(e,r,o),r+=4);var f=t.bin.writeUTF8(e,r,i);return r+=f,a==0&&(e.set(c,r),r+=c.length),r},t.crc={table:function(){for(var e=new Uint32Array(256),r=0;r<256;r++){for(var i=r,s=0;s<8;s++)i&1?i=3988292384^i>>>1:i=i>>>1;e[r]=i}return e}(),update:function(e,r,i,s){for(var a=0;a<s;a++)e=t.crc.table[(e^r[i+a])&255]^e>>>8;return e},crc:function(e,r,i){return t.crc.update(4294967295,e,r,i)^4294967295}},t.adler=function(e,r,i){for(var s=1,a=0,o=r,h=r+i;o<h;){for(var l=Math.min(o+5552,h);o<l;)s+=e[o++],a+=s;s=s%65521,a=a%65521}return a<<16|s},t.bin={readUshort:function(e,r){return e[r]|e[r+1]<<8},writeUshort:function(e,r,i){e[r]=i&255,e[r+1]=i>>8&255},readUint:function(e,r){return e[r+3]*(256*256*256)+(e[r+2]<<16|e[r+1]<<8|e[r])},writeUint:function(e,r,i){e[r]=i&255,e[r+1]=i>>8&255,e[r+2]=i>>16&255,e[r+3]=i>>24&255},readASCII:function(e,r,i){for(var s="",a=0;a<i;a++)s+=String.fromCharCode(e[r+a]);return s},writeASCII:function(e,r,i){for(var s=0;s<i.length;s++)e[r+s]=i.charCodeAt(s)},pad:function(e){return e.length<2?"0"+e:e},readUTF8:function(e,r,i){for(var s="",a,o=0;o<i;o++)s+="%"+t.bin.pad(e[r+o].toString(16));try{a=decodeURIComponent(s)}catch{return t.bin.readASCII(e,r,i)}return a},writeUTF8:function(e,r,i){for(var s=i.length,a=0,o=0;o<s;o++){var h=i.charCodeAt(o);if(!(h&4294967168))e[r+a]=h,a++;else if(!(h&4294965248))e[r+a]=192|h>>6,e[r+a+1]=128|h>>0&63,a+=2;else if(!(h&4294901760))e[r+a]=224|h>>12,e[r+a+1]=128|h>>6&63,e[r+a+2]=128|h>>0&63,a+=3;else if(!(h&4294967295-(1<<21)+1))e[r+a]=240|h>>18,e[r+a+1]=128|h>>12&63,e[r+a+2]=128|h>>6&63,e[r+a+3]=128|h>>0&63,a+=4;else throw"e"}return a},sizeUTF8:function(e){for(var r=e.length,i=0,s=0;s<r;s++){var a=e.charCodeAt(s);if(!(a&4294967168))i++;else if(!(a&4294965248))i+=2;else if(!(a&4294901760))i+=3;else if(!(a&4294967295-(1<<21)+1))i+=4;else throw"e"}return i}},t.F={},t.F.deflateRaw=function(e,r,i,s){var a=[[0,0,0,0,0],[4,4,8,4,0],[4,5,16,8,0],[4,6,16,16,0],[4,10,16,32,0],[8,16,32,32,0],[8,16,128,128,0],[8,32,128,256,0],[32,128,258,1024,1],[32,258,258,4096,1]],o=a[s],h=t.F.U,l=t.F._goodIndex;t.F._hash;var c=t.F._putsE,f=0,d=i<<3,u=0,p=e.length;if(s==0){for(;f<p;){var v=Math.min(65535,p-f);c(r,d,f+v==p?1:0),d=t.F._copyExact(e,f,v,r,d+8),f+=v}return d>>>3}var _=h.lits,S=h.strt,x=h.prev,m=0,k=0,F=0,P=0,N=0,R=0;for(p>2&&(R=t.F._hash(e,0),S[R]=0),f=0;f<p;f++){if(N=R,f+1<p-2){R=t.F._hash(e,f+1);var L=f+1&32767;x[L]=S[R],S[R]=L}if(u<=f){(m>14e3||k>26697)&&p-f>100&&(u<f&&(_[m]=f-u,m+=2,u=f),d=t.F._writeBlock(f==p-1||u==p?1:0,_,m,P,e,F,f-F,r,d),m=k=P=0,F=f);var U=0;f<p-2&&(U=t.F._bestMatch(e,f,x,N,Math.min(o[2],p-f),o[3]));var v=U>>>16,B=U&65535;if(U!=0){var v=U>>>16,B=U&65535,K=l(v,h.of0);h.lhst[257+K]++;var tt=l(B,h.df0);h.dhst[tt]++,P+=h.exb[K]+h.dxb[tt],_[m]=v<<23|f-u,_[m+1]=B<<16|K<<8|tt,m+=2,u=f+v}else h.lhst[e[f]]++;k++}}for((F!=f||e.length==0)&&(u<f&&(_[m]=f-u,m+=2,u=f),d=t.F._writeBlock(1,_,m,P,e,F,f-F,r,d),m=0,k=0,m=k=P=0,F=f);d&7;)d++;return d>>>3},t.F._bestMatch=function(e,r,i,s,a,o){var h=r&32767,l=i[h],c=h-l+32768&32767;if(l==h||s!=t.F._hash(e,r-c))return 0;for(var f=0,d=0,u=Math.min(32767,r);c<=u&&--o!=0&&l!=h;){if(f==0||e[r+f]==e[r+f-c]){var p=t.F._howLong(e,r,c);if(p>f){if(f=p,d=c,f>=a)break;c+2<p&&(p=c+2);for(var v=0,_=0;_<p-2;_++){var S=r-c+_+32768&32767,x=i[S],m=S-x+32768&32767;m>v&&(v=m,l=S)}}}h=l,l=i[h],c+=h-l+32768&32767}return f<<16|d},t.F._howLong=function(e,r,i){if(e[r]!=e[r-i]||e[r+1]!=e[r+1-i]||e[r+2]!=e[r+2-i])return 0;var s=r,a=Math.min(e.length,r+258);for(r+=3;r<a&&e[r]==e[r-i];)r++;return r-s},t.F._hash=function(e,r){return(e[r]<<8|e[r+1])+(e[r+2]<<4)&65535},t.saved=0,t.F._writeBlock=function(e,r,i,s,a,o,h,l,c){var f=t.F.U,d=t.F._putsF,u=t.F._putsE,p,v,_,S,x,m,k,F,P;f.lhst[256]++,p=t.F.getTrees(),v=p[0],_=p[1],S=p[2],x=p[3],m=p[4],k=p[5],F=p[6],P=p[7];var N=(c+3&7?8-(c+3&7):0)+32+(h<<3),R=s+t.F.contSize(f.fltree,f.lhst)+t.F.contSize(f.fdtree,f.dhst),L=s+t.F.contSize(f.ltree,f.lhst)+t.F.contSize(f.dtree,f.dhst);L+=14+3*k+t.F.contSize(f.itree,f.ihst)+(f.ihst[16]*2+f.ihst[17]*3+f.ihst[18]*7);for(var U=0;U<286;U++)f.lhst[U]=0;for(var U=0;U<30;U++)f.dhst[U]=0;for(var U=0;U<19;U++)f.ihst[U]=0;var B=N<R&&N<L?0:R<L?1:2;if(d(l,c,e),d(l,c+1,B),c+=3,B==0){for(;c&7;)c++;c=t.F._copyExact(a,o,h,l,c)}else{var K,tt;if(B==1&&(K=f.fltree,tt=f.fdtree),B==2){t.F.makeCodes(f.ltree,v),t.F.revCodes(f.ltree,v),t.F.makeCodes(f.dtree,_),t.F.revCodes(f.dtree,_),t.F.makeCodes(f.itree,S),t.F.revCodes(f.itree,S),K=f.ltree,tt=f.dtree,u(l,c,x-257),c+=5,u(l,c,m-1),c+=5,u(l,c,k-4),c+=4;for(var W=0;W<k;W++)u(l,c+W*3,f.itree[(f.ordr[W]<<1)+1]);c+=3*k,c=t.F._codeTiny(F,f.itree,l,c),c=t.F._codeTiny(P,f.itree,l,c)}for(var lt=o,wt=0;wt<i;wt+=2){for(var bt=r[wt],xt=bt>>>23,it=lt+(bt&(1<<23)-1);lt<it;)c=t.F._writeLit(a[lt++],K,l,c);if(xt!=0){var Y=r[wt+1],O=Y>>16,E=Y>>8&255,T=Y&255;c=t.F._writeLit(257+E,K,l,c),u(l,c,xt-f.of0[E]),c+=f.exb[E],c=t.F._writeLit(T,tt,l,c),d(l,c,O-f.df0[T]),c+=f.dxb[T],lt+=xt}}c=t.F._writeLit(256,K,l,c)}return c},t.F._copyExact=function(e,r,i,s,a){var o=a>>>3;return s[o]=i,s[o+1]=i>>>8,s[o+2]=255-s[o],s[o+3]=255-s[o+1],o+=4,s.set(new Uint8Array(e.buffer,r,i),o),a+(i+4<<3)},t.F.getTrees=function(){for(var e=t.F.U,r=t.F._hufTree(e.lhst,e.ltree,15),i=t.F._hufTree(e.dhst,e.dtree,15),s=[],a=t.F._lenCodes(e.ltree,s),o=[],h=t.F._lenCodes(e.dtree,o),l=0;l<s.length;l+=2)e.ihst[s[l]]++;for(var l=0;l<o.length;l+=2)e.ihst[o[l]]++;for(var c=t.F._hufTree(e.ihst,e.itree,7),f=19;f>4&&e.itree[(e.ordr[f-1]<<1)+1]==0;)f--;return[r,i,c,a,h,f,s,o]},t.F.getSecond=function(e){for(var r=[],i=0;i<e.length;i+=2)r.push(e[i+1]);return r},t.F.nonZero=function(e){for(var r="",i=0;i<e.length;i+=2)e[i+1]!=0&&(r+=(i>>1)+",");return r},t.F.contSize=function(e,r){for(var i=0,s=0;s<r.length;s++)i+=r[s]*e[(s<<1)+1];return i},t.F._codeTiny=function(e,r,i,s){for(var a=0;a<e.length;a+=2){var o=e[a],h=e[a+1];s=t.F._writeLit(o,r,i,s);var l=o==16?2:o==17?3:7;o>15&&(t.F._putsE(i,s,h,l),s+=l)}return s},t.F._lenCodes=function(e,r){for(var i=e.length;i!=2&&e[i-1]==0;)i-=2;for(var s=0;s<i;s+=2){var a=e[s+1],o=s+3<i?e[s+3]:-1,h=s+5<i?e[s+5]:-1,l=s==0?-1:e[s-1];if(a==0&&o==a&&h==a){for(var c=s+5;c+2<i&&e[c+2]==a;)c+=2;var f=Math.min(c+1-s>>>1,138);f<11?r.push(17,f-3):r.push(18,f-11),s+=f*2-2}else if(a==l&&o==a&&h==a){for(var c=s+5;c+2<i&&e[c+2]==a;)c+=2;var f=Math.min(c+1-s>>>1,6);r.push(16,f-3),s+=f*2-2}else r.push(a,0)}return i>>>1},t.F._hufTree=function(e,r,i){var s=[],a=e.length,o=r.length,h=0;for(h=0;h<o;h+=2)r[h]=0,r[h+1]=0;for(h=0;h<a;h++)e[h]!=0&&s.push({lit:h,f:e[h]});var l=s.length,c=s.slice(0);if(l==0)return 0;if(l==1){var f=s[0].lit,c=f==0?1:0;return r[(f<<1)+1]=1,r[(c<<1)+1]=1,1}s.sort(function(x,m){return x.f-m.f});var d=s[0],u=s[1],p=0,v=1,_=2;for(s[0]={lit:-1,f:d.f+u.f,l:d,r:u,d:0};v!=l-1;)p!=v&&(_==l||s[p].f<s[_].f)?d=s[p++]:d=s[_++],p!=v&&(_==l||s[p].f<s[_].f)?u=s[p++]:u=s[_++],s[v++]={lit:-1,f:d.f+u.f,l:d,r:u};var S=t.F.setDepth(s[v-1],0);for(S>i&&(t.F.restrictDepth(c,i,S),S=i),h=0;h<l;h++)r[(c[h].lit<<1)+1]=c[h].d;return S},t.F.setDepth=function(e,r){return e.lit!=-1?(e.d=r,r):Math.max(t.F.setDepth(e.l,r+1),t.F.setDepth(e.r,r+1))},t.F.restrictDepth=function(e,r,i){var s=0,a=1<<i-r,o=0;for(e.sort(function(l,c){return c.d==l.d?l.f-c.f:c.d-l.d}),s=0;s<e.length&&e[s].d>r;s++){var h=e[s].d;e[s].d=r,o+=a-(1<<i-h)}for(o=o>>>i-r;o>0;){var h=e[s].d;h<r?(e[s].d++,o-=1<<r-h-1):s++}for(;s>=0;s--)e[s].d==r&&o<0&&(e[s].d--,o++);o!=0&&console.log("debt left")},t.F._goodIndex=function(e,r){var i=0;return r[i|16]<=e&&(i|=16),r[i|8]<=e&&(i|=8),r[i|4]<=e&&(i|=4),r[i|2]<=e&&(i|=2),r[i|1]<=e&&(i|=1),i},t.F._writeLit=function(e,r,i,s){return t.F._putsF(i,s,r[e<<1]),s+r[(e<<1)+1]},t.F.inflate=function(e,r){var i=Uint8Array;if(e[0]==3&&e[1]==0)return r||new i(0);var s=t.F,a=s._bitsF,o=s._bitsE,h=s._decodeTiny,l=s.makeCodes,c=s.codes2map,f=s._get17,d=s.U,u=r==null;u&&(r=new i(e.length>>>2<<3));for(var p=0,v=0,_=0,S=0,x=0,m=0,k=0,F=0,P=0,N,R;p==0;){if(p=a(e,P,1),v=a(e,P+1,2),P+=3,v==0){P&7&&(P+=8-(P&7));var L=(P>>>3)+4,U=e[L-4]|e[L-3]<<8;u&&(r=t.F._check(r,F+U)),r.set(new i(e.buffer,e.byteOffset+L,U),F),P=L+U<<3,F+=U;continue}if(u&&(r=t.F._check(r,F+(1<<17))),v==1&&(N=d.flmap,R=d.fdmap,m=511,k=31),v==2){_=o(e,P,5)+257,S=o(e,P+5,5)+1,x=o(e,P+10,4)+4,P+=14;for(var B=0;B<38;B+=2)d.itree[B]=0,d.itree[B+1]=0;for(var K=1,B=0;B<x;B++){var tt=o(e,P+B*3,3);d.itree[(d.ordr[B]<<1)+1]=tt,tt>K&&(K=tt)}P+=3*x,l(d.itree,K),c(d.itree,K,d.imap),N=d.lmap,R=d.dmap,P=h(d.imap,(1<<K)-1,_+S,e,P,d.ttree);var W=s._copyOut(d.ttree,0,_,d.ltree);m=(1<<W)-1;var lt=s._copyOut(d.ttree,_,S,d.dtree);k=(1<<lt)-1,l(d.ltree,W),c(d.ltree,W,N),l(d.dtree,lt),c(d.dtree,lt,R)}for(;;){var wt=N[f(e,P)&m];P+=wt&15;var bt=wt>>>4;if(!(bt>>>8))r[F++]=bt;else{if(bt==256)break;var xt=F+bt-254;if(bt>264){var it=d.ldef[bt-257];xt=F+(it>>>3)+o(e,P,it&7),P+=it&7}var Y=R[f(e,P)&k];P+=Y&15;var O=Y>>>4,E=d.ddef[O],T=(E>>>4)+a(e,P,E&15);for(P+=E&15,u&&(r=t.F._check(r,F+(1<<17)));F<xt;)r[F]=r[F++-T],r[F]=r[F++-T],r[F]=r[F++-T],r[F]=r[F++-T];F=xt}}}return r.length==F?r:r.slice(0,F)},t.F._check=function(e,r){var i=e.length;if(r<=i)return e;var s=new Uint8Array(Math.max(i<<1,r));return s.set(e,0),s},t.F._decodeTiny=function(e,r,i,s,a,o){for(var h=t.F._bitsE,l=t.F._get17,c=0;c<i;){var f=e[l(s,a)&r];a+=f&15;var d=f>>>4;if(d<=15)o[c]=d,c++;else{var u=0,p=0;d==16?(p=3+h(s,a,2),a+=2,u=o[c-1]):d==17?(p=3+h(s,a,3),a+=3):d==18&&(p=11+h(s,a,7),a+=7);for(var v=c+p;c<v;)o[c]=u,c++}}return a},t.F._copyOut=function(e,r,i,s){for(var a=0,o=0,h=s.length>>>1;o<i;){var l=e[o+r];s[o<<1]=0,s[(o<<1)+1]=l,l>a&&(a=l),o++}for(;o<h;)s[o<<1]=0,s[(o<<1)+1]=0,o++;return a},t.F.makeCodes=function(e,r){for(var i=t.F.U,s=e.length,a,o,h,f,l,c=i.bl_count,f=0;f<=r;f++)c[f]=0;for(f=1;f<s;f+=2)c[e[f]]++;var d=i.next_code;for(a=0,c[0]=0,o=1;o<=r;o++)a=a+c[o-1]<<1,d[o]=a;for(h=0;h<s;h+=2)l=e[h+1],l!=0&&(e[h]=d[l],d[l]++)},t.F.codes2map=function(e,r,i){for(var s=e.length,a=t.F.U,o=a.rev15,h=0;h<s;h+=2)if(e[h+1]!=0)for(var l=h>>1,c=e[h+1],f=l<<4|c,d=r-c,u=e[h]<<d,p=u+(1<<d);u!=p;){var v=o[u]>>>15-r;i[v]=f,u++}},t.F.revCodes=function(e,r){for(var i=t.F.U.rev15,s=15-r,a=0;a<e.length;a+=2){var o=e[a]<<r-e[a+1];e[a]=i[o]>>>s}},t.F._putsE=function(e,r,i){i=i<<(r&7);var s=r>>>3;e[s]|=i,e[s+1]|=i>>>8},t.F._putsF=function(e,r,i){i=i<<(r&7);var s=r>>>3;e[s]|=i,e[s+1]|=i>>>8,e[s+2]|=i>>>16},t.F._bitsE=function(e,r,i){return(e[r>>>3]|e[(r>>>3)+1]<<8)>>>(r&7)&(1<<i)-1},t.F._bitsF=function(e,r,i){return(e[r>>>3]|e[(r>>>3)+1]<<8|e[(r>>>3)+2]<<16)>>>(r&7)&(1<<i)-1},t.F._get17=function(e,r){return(e[r>>>3]|e[(r>>>3)+1]<<8|e[(r>>>3)+2]<<16)>>>(r&7)},t.F._get25=function(e,r){return(e[r>>>3]|e[(r>>>3)+1]<<8|e[(r>>>3)+2]<<16|e[(r>>>3)+3]<<24)>>>(r&7)},t.F.U=function(){var e=Uint16Array,r=Uint32Array;return{next_code:new e(16),bl_count:new e(16),ordr:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],of0:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],exb:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],ldef:new e(32),df0:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],dxb:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],ddef:new r(32),flmap:new e(512),fltree:[],fdmap:new e(32),fdtree:[],lmap:new e(32768),ltree:[],ttree:[],dmap:new e(32768),dtree:[],imap:new e(512),itree:[],rev15:new e(32768),lhst:new r(286),dhst:new r(30),ihst:new r(19),lits:new r(15e3),strt:new e(65536),prev:new e(32768)}}(),function(){for(var e=t.F.U,r=32768,i=0;i<r;i++){var s=i;s=(s&2863311530)>>>1|(s&1431655765)<<1,s=(s&3435973836)>>>2|(s&858993459)<<2,s=(s&4042322160)>>>4|(s&252645135)<<4,s=(s&4278255360)>>>8|(s&16711935)<<8,e.rev15[i]=(s>>>16|s<<16)>>>17}function a(o,h,l){for(;h--!=0;)o.push(0,l)}for(var i=0;i<32;i++)e.ldef[i]=e.of0[i]<<3|e.exb[i],e.ddef[i]=e.df0[i]<<4|e.dxb[i];a(e.fltree,144,8),a(e.fltree,112,9),a(e.fltree,24,7),a(e.fltree,8,8),t.F.makeCodes(e.fltree,9),t.F.codes2map(e.fltree,9,e.flmap),t.F.revCodes(e.fltree,9),a(e.fdtree,32,5),t.F.makeCodes(e.fdtree,5),t.F.codes2map(e.fdtree,5,e.fdmap),t.F.revCodes(e.fdtree,5),a(e.itree,19,0),a(e.ltree,286,0),a(e.dtree,30,0),a(e.ttree,320,0)}()})(Mg);var bS=Mg.exports;const Ig=Tn(bS);/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */const SS=4,jg=0,Lg=1,kS=2;function ns(n){let t=n.length;for(;--t>=0;)n[t]=0}const CS=0,Ug=1,TS=2,PS=3,ES=258,su=29,Zs=256,Ws=Zs+1+su,rs=30,au=19,Gg=2*Ws+1,ki=15,ou=16,AS=7,lu=256,zg=16,Vg=17,Bg=18,hu=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),sl=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),OS=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),Hg=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),$S=512,Er=new Array((Ws+2)*2);ns(Er);const ta=new Array(rs*2);ns(ta);const ea=new Array($S);ns(ea);const na=new Array(ES-PS+1);ns(na);const cu=new Array(su);ns(cu);const al=new Array(rs);ns(al);function uu(n,t,e,r,i){this.static_tree=n,this.extra_bits=t,this.extra_base=e,this.elems=r,this.max_length=i,this.has_stree=n&&n.length}let qg,Kg,Yg;function du(n,t){this.dyn_tree=n,this.max_code=0,this.stat_desc=t}const Xg=n=>n<256?ea[n]:ea[256+(n>>>7)],ra=(n,t)=>{n.pending_buf[n.pending++]=t&255,n.pending_buf[n.pending++]=t>>>8&255},yn=(n,t,e)=>{n.bi_valid>ou-e?(n.bi_buf|=t<<n.bi_valid&65535,ra(n,n.bi_buf),n.bi_buf=t>>ou-n.bi_valid,n.bi_valid+=e-ou):(n.bi_buf|=t<<n.bi_valid&65535,n.bi_valid+=e)},hr=(n,t,e)=>{yn(n,e[t*2],e[t*2+1])},Jg=(n,t)=>{let e=0;do e|=n&1,n>>>=1,e<<=1;while(--t>0);return e>>>1},FS=n=>{n.bi_valid===16?(ra(n,n.bi_buf),n.bi_buf=0,n.bi_valid=0):n.bi_valid>=8&&(n.pending_buf[n.pending++]=n.bi_buf&255,n.bi_buf>>=8,n.bi_valid-=8)},NS=(n,t)=>{const e=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,s=t.stat_desc.has_stree,a=t.stat_desc.extra_bits,o=t.stat_desc.extra_base,h=t.stat_desc.max_length;let l,c,f,d,u,p,v=0;for(d=0;d<=ki;d++)n.bl_count[d]=0;for(e[n.heap[n.heap_max]*2+1]=0,l=n.heap_max+1;l<Gg;l++)c=n.heap[l],d=e[e[c*2+1]*2+1]+1,d>h&&(d=h,v++),e[c*2+1]=d,!(c>r)&&(n.bl_count[d]++,u=0,c>=o&&(u=a[c-o]),p=e[c*2],n.opt_len+=p*(d+u),s&&(n.static_len+=p*(i[c*2+1]+u)));if(v!==0){do{for(d=h-1;n.bl_count[d]===0;)d--;n.bl_count[d]--,n.bl_count[d+1]+=2,n.bl_count[h]--,v-=2}while(v>0);for(d=h;d!==0;d--)for(c=n.bl_count[d];c!==0;)f=n.heap[--l],!(f>r)&&(e[f*2+1]!==d&&(n.opt_len+=(d-e[f*2+1])*e[f*2],e[f*2+1]=d),c--)}},Qg=(n,t,e)=>{const r=new Array(ki+1);let i=0,s,a;for(s=1;s<=ki;s++)i=i+e[s-1]<<1,r[s]=i;for(a=0;a<=t;a++){let o=n[a*2+1];o!==0&&(n[a*2]=Jg(r[o]++,o))}},RS=()=>{let n,t,e,r,i;const s=new Array(ki+1);for(e=0,r=0;r<su-1;r++)for(cu[r]=e,n=0;n<1<<hu[r];n++)na[e++]=r;for(na[e-1]=r,i=0,r=0;r<16;r++)for(al[r]=i,n=0;n<1<<sl[r];n++)ea[i++]=r;for(i>>=7;r<rs;r++)for(al[r]=i<<7,n=0;n<1<<sl[r]-7;n++)ea[256+i++]=r;for(t=0;t<=ki;t++)s[t]=0;for(n=0;n<=143;)Er[n*2+1]=8,n++,s[8]++;for(;n<=255;)Er[n*2+1]=9,n++,s[9]++;for(;n<=279;)Er[n*2+1]=7,n++,s[7]++;for(;n<=287;)Er[n*2+1]=8,n++,s[8]++;for(Qg(Er,Ws+1,s),n=0;n<rs;n++)ta[n*2+1]=5,ta[n*2]=Jg(n,5);qg=new uu(Er,hu,Zs+1,Ws,ki),Kg=new uu(ta,sl,0,rs,ki),Yg=new uu(new Array(0),OS,0,au,AS)},Zg=n=>{let t;for(t=0;t<Ws;t++)n.dyn_ltree[t*2]=0;for(t=0;t<rs;t++)n.dyn_dtree[t*2]=0;for(t=0;t<au;t++)n.bl_tree[t*2]=0;n.dyn_ltree[lu*2]=1,n.opt_len=n.static_len=0,n.sym_next=n.matches=0},Wg=n=>{n.bi_valid>8?ra(n,n.bi_buf):n.bi_valid>0&&(n.pending_buf[n.pending++]=n.bi_buf),n.bi_buf=0,n.bi_valid=0},tm=(n,t,e,r)=>{const i=t*2,s=e*2;return n[i]<n[s]||n[i]===n[s]&&r[t]<=r[e]},fu=(n,t,e)=>{const r=n.heap[e];let i=e<<1;for(;i<=n.heap_len&&(i<n.heap_len&&tm(t,n.heap[i+1],n.heap[i],n.depth)&&i++,!tm(t,r,n.heap[i],n.depth));)n.heap[e]=n.heap[i],e=i,i<<=1;n.heap[e]=r},em=(n,t,e)=>{let r,i,s=0,a,o;if(n.sym_next!==0)do r=n.pending_buf[n.sym_buf+s++]&255,r+=(n.pending_buf[n.sym_buf+s++]&255)<<8,i=n.pending_buf[n.sym_buf+s++],r===0?hr(n,i,t):(a=na[i],hr(n,a+Zs+1,t),o=hu[a],o!==0&&(i-=cu[a],yn(n,i,o)),r--,a=Xg(r),hr(n,a,e),o=sl[a],o!==0&&(r-=al[a],yn(n,r,o)));while(s<n.sym_next);hr(n,lu,t)},pu=(n,t)=>{const e=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,s=t.stat_desc.elems;let a,o,h=-1,l;for(n.heap_len=0,n.heap_max=Gg,a=0;a<s;a++)e[a*2]!==0?(n.heap[++n.heap_len]=h=a,n.depth[a]=0):e[a*2+1]=0;for(;n.heap_len<2;)l=n.heap[++n.heap_len]=h<2?++h:0,e[l*2]=1,n.depth[l]=0,n.opt_len--,i&&(n.static_len-=r[l*2+1]);for(t.max_code=h,a=n.heap_len>>1;a>=1;a--)fu(n,e,a);l=s;do a=n.heap[1],n.heap[1]=n.heap[n.heap_len--],fu(n,e,1),o=n.heap[1],n.heap[--n.heap_max]=a,n.heap[--n.heap_max]=o,e[l*2]=e[a*2]+e[o*2],n.depth[l]=(n.depth[a]>=n.depth[o]?n.depth[a]:n.depth[o])+1,e[a*2+1]=e[o*2+1]=l,n.heap[1]=l++,fu(n,e,1);while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],NS(n,t),Qg(e,h,n.bl_count)},nm=(n,t,e)=>{let r,i=-1,s,a=t[0*2+1],o=0,h=7,l=4;for(a===0&&(h=138,l=3),t[(e+1)*2+1]=65535,r=0;r<=e;r++)s=a,a=t[(r+1)*2+1],!(++o<h&&s===a)&&(o<l?n.bl_tree[s*2]+=o:s!==0?(s!==i&&n.bl_tree[s*2]++,n.bl_tree[zg*2]++):o<=10?n.bl_tree[Vg*2]++:n.bl_tree[Bg*2]++,o=0,i=s,a===0?(h=138,l=3):s===a?(h=6,l=3):(h=7,l=4))},rm=(n,t,e)=>{let r,i=-1,s,a=t[0*2+1],o=0,h=7,l=4;for(a===0&&(h=138,l=3),r=0;r<=e;r++)if(s=a,a=t[(r+1)*2+1],!(++o<h&&s===a)){if(o<l)do hr(n,s,n.bl_tree);while(--o!==0);else s!==0?(s!==i&&(hr(n,s,n.bl_tree),o--),hr(n,zg,n.bl_tree),yn(n,o-3,2)):o<=10?(hr(n,Vg,n.bl_tree),yn(n,o-3,3)):(hr(n,Bg,n.bl_tree),yn(n,o-11,7));o=0,i=s,a===0?(h=138,l=3):s===a?(h=6,l=3):(h=7,l=4)}},DS=n=>{let t;for(nm(n,n.dyn_ltree,n.l_desc.max_code),nm(n,n.dyn_dtree,n.d_desc.max_code),pu(n,n.bl_desc),t=au-1;t>=3&&n.bl_tree[Hg[t]*2+1]===0;t--);return n.opt_len+=3*(t+1)+5+5+4,t},MS=(n,t,e,r)=>{let i;for(yn(n,t-257,5),yn(n,e-1,5),yn(n,r-4,4),i=0;i<r;i++)yn(n,n.bl_tree[Hg[i]*2+1],3);rm(n,n.dyn_ltree,t-1),rm(n,n.dyn_dtree,e-1)},IS=n=>{let t=4093624447,e;for(e=0;e<=31;e++,t>>>=1)if(t&1&&n.dyn_ltree[e*2]!==0)return jg;if(n.dyn_ltree[9*2]!==0||n.dyn_ltree[10*2]!==0||n.dyn_ltree[13*2]!==0)return Lg;for(e=32;e<Zs;e++)if(n.dyn_ltree[e*2]!==0)return Lg;return jg};let im=!1;const jS=n=>{im||(RS(),im=!0),n.l_desc=new du(n.dyn_ltree,qg),n.d_desc=new du(n.dyn_dtree,Kg),n.bl_desc=new du(n.bl_tree,Yg),n.bi_buf=0,n.bi_valid=0,Zg(n)},sm=(n,t,e,r)=>{yn(n,(CS<<1)+(r?1:0),3),Wg(n),ra(n,e),ra(n,~e),e&&n.pending_buf.set(n.window.subarray(t,t+e),n.pending),n.pending+=e},LS=n=>{yn(n,Ug<<1,3),hr(n,lu,Er),FS(n)},US=(n,t,e,r)=>{let i,s,a=0;n.level>0?(n.strm.data_type===kS&&(n.strm.data_type=IS(n)),pu(n,n.l_desc),pu(n,n.d_desc),a=DS(n),i=n.opt_len+3+7>>>3,s=n.static_len+3+7>>>3,s<=i&&(i=s)):i=s=e+5,e+4<=i&&t!==-1?sm(n,t,e,r):n.strategy===SS||s===i?(yn(n,(Ug<<1)+(r?1:0),3),em(n,Er,ta)):(yn(n,(TS<<1)+(r?1:0),3),MS(n,n.l_desc.max_code+1,n.d_desc.max_code+1,a+1),em(n,n.dyn_ltree,n.dyn_dtree)),Zg(n),r&&Wg(n)},GS=(n,t,e)=>(n.pending_buf[n.sym_buf+n.sym_next++]=t,n.pending_buf[n.sym_buf+n.sym_next++]=t>>8,n.pending_buf[n.sym_buf+n.sym_next++]=e,t===0?n.dyn_ltree[e*2]++:(n.matches++,t--,n.dyn_ltree[(na[e]+Zs+1)*2]++,n.dyn_dtree[Xg(t)*2]++),n.sym_next===n.sym_end);var zS=jS,VS=sm,BS=US,HS=GS,qS=LS,KS={_tr_init:zS,_tr_stored_block:VS,_tr_flush_block:BS,_tr_tally:HS,_tr_align:qS},ia=(n,t,e,r)=>{let i=n&65535|0,s=n>>>16&65535|0,a=0;for(;e!==0;){a=e>2e3?2e3:e,e-=a;do i=i+t[r++]|0,s=s+i|0;while(--a);i%=65521,s%=65521}return i|s<<16|0};const YS=()=>{let n,t=[];for(var e=0;e<256;e++){n=e;for(var r=0;r<8;r++)n=n&1?3988292384^n>>>1:n>>>1;t[e]=n}return t},XS=new Uint32Array(YS());var Xe=(n,t,e,r)=>{const i=XS,s=r+e;n^=-1;for(let a=r;a<s;a++)n=n>>>8^i[(n^t[a])&255];return n^-1},Ci={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},Ti={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:JS,_tr_stored_block:gu,_tr_flush_block:QS,_tr_tally:Qr,_tr_align:ZS}=KS,{Z_NO_FLUSH:Zr,Z_PARTIAL_FLUSH:WS,Z_FULL_FLUSH:tk,Z_FINISH:Mn,Z_BLOCK:am,Z_OK:tn,Z_STREAM_END:om,Z_STREAM_ERROR:cr,Z_DATA_ERROR:ek,Z_BUF_ERROR:mu,Z_DEFAULT_COMPRESSION:nk,Z_FILTERED:rk,Z_HUFFMAN_ONLY:ol,Z_RLE:ik,Z_FIXED:sk,Z_DEFAULT_STRATEGY:ak,Z_UNKNOWN:ok,Z_DEFLATED:ll}=Ti,lk=9,hk=15,ck=8,uk=29,dk=256,yu=dk+1+uk,fk=30,pk=19,gk=2*yu+1,mk=15,ie=3,Wr=258,ur=Wr+ie+1,yk=32,is=42,vu=57,_u=69,wu=73,xu=91,bu=103,Pi=113,sa=666,dn=1,ss=2,Ei=3,as=4,vk=3,Ai=(n,t)=>(n.msg=Ci[t],t),lm=n=>n*2-(n>4?9:0),ti=n=>{let t=n.length;for(;--t>=0;)n[t]=0},_k=n=>{let t,e,r,i=n.w_size;t=n.hash_size,r=t;do e=n.head[--r],n.head[r]=e>=i?e-i:0;while(--t);t=i,r=t;do e=n.prev[--r],n.prev[r]=e>=i?e-i:0;while(--t)};let wk=(n,t,e)=>(t<<n.hash_shift^e)&n.hash_mask,ei=wk;const Pn=n=>{const t=n.state;let e=t.pending;e>n.avail_out&&(e=n.avail_out),e!==0&&(n.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+e),n.next_out),n.next_out+=e,t.pending_out+=e,n.total_out+=e,n.avail_out-=e,t.pending-=e,t.pending===0&&(t.pending_out=0))},En=(n,t)=>{QS(n,n.block_start>=0?n.block_start:-1,n.strstart-n.block_start,t),n.block_start=n.strstart,Pn(n.strm)},de=(n,t)=>{n.pending_buf[n.pending++]=t},aa=(n,t)=>{n.pending_buf[n.pending++]=t>>>8&255,n.pending_buf[n.pending++]=t&255},Su=(n,t,e,r)=>{let i=n.avail_in;return i>r&&(i=r),i===0?0:(n.avail_in-=i,t.set(n.input.subarray(n.next_in,n.next_in+i),e),n.state.wrap===1?n.adler=ia(n.adler,t,i,e):n.state.wrap===2&&(n.adler=Xe(n.adler,t,i,e)),n.next_in+=i,n.total_in+=i,i)},hm=(n,t)=>{let e=n.max_chain_length,r=n.strstart,i,s,a=n.prev_length,o=n.nice_match;const h=n.strstart>n.w_size-ur?n.strstart-(n.w_size-ur):0,l=n.window,c=n.w_mask,f=n.prev,d=n.strstart+Wr;let u=l[r+a-1],p=l[r+a];n.prev_length>=n.good_match&&(e>>=2),o>n.lookahead&&(o=n.lookahead);do if(i=t,!(l[i+a]!==p||l[i+a-1]!==u||l[i]!==l[r]||l[++i]!==l[r+1])){r+=2,i++;do;while(l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&r<d);if(s=Wr-(d-r),r=d-Wr,s>a){if(n.match_start=t,a=s,s>=o)break;u=l[r+a-1],p=l[r+a]}}while((t=f[t&c])>h&&--e!==0);return a<=n.lookahead?a:n.lookahead},os=n=>{const t=n.w_size;let e,r,i;do{if(r=n.window_size-n.lookahead-n.strstart,n.strstart>=t+(t-ur)&&(n.window.set(n.window.subarray(t,t+t-r),0),n.match_start-=t,n.strstart-=t,n.block_start-=t,n.insert>n.strstart&&(n.insert=n.strstart),_k(n),r+=t),n.strm.avail_in===0)break;if(e=Su(n.strm,n.window,n.strstart+n.lookahead,r),n.lookahead+=e,n.lookahead+n.insert>=ie)for(i=n.strstart-n.insert,n.ins_h=n.window[i],n.ins_h=ei(n,n.ins_h,n.window[i+1]);n.insert&&(n.ins_h=ei(n,n.ins_h,n.window[i+ie-1]),n.prev[i&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=i,i++,n.insert--,!(n.lookahead+n.insert<ie)););}while(n.lookahead<ur&&n.strm.avail_in!==0)},cm=(n,t)=>{let e=n.pending_buf_size-5>n.w_size?n.w_size:n.pending_buf_size-5,r,i,s,a=0,o=n.strm.avail_in;do{if(r=65535,s=n.bi_valid+42>>3,n.strm.avail_out<s||(s=n.strm.avail_out-s,i=n.strstart-n.block_start,r>i+n.strm.avail_in&&(r=i+n.strm.avail_in),r>s&&(r=s),r<e&&(r===0&&t!==Mn||t===Zr||r!==i+n.strm.avail_in)))break;a=t===Mn&&r===i+n.strm.avail_in?1:0,gu(n,0,0,a),n.pending_buf[n.pending-4]=r,n.pending_buf[n.pending-3]=r>>8,n.pending_buf[n.pending-2]=~r,n.pending_buf[n.pending-1]=~r>>8,Pn(n.strm),i&&(i>r&&(i=r),n.strm.output.set(n.window.subarray(n.block_start,n.block_start+i),n.strm.next_out),n.strm.next_out+=i,n.strm.avail_out-=i,n.strm.total_out+=i,n.block_start+=i,r-=i),r&&(Su(n.strm,n.strm.output,n.strm.next_out,r),n.strm.next_out+=r,n.strm.avail_out-=r,n.strm.total_out+=r)}while(a===0);return o-=n.strm.avail_in,o&&(o>=n.w_size?(n.matches=2,n.window.set(n.strm.input.subarray(n.strm.next_in-n.w_size,n.strm.next_in),0),n.strstart=n.w_size,n.insert=n.strstart):(n.window_size-n.strstart<=o&&(n.strstart-=n.w_size,n.window.set(n.window.subarray(n.w_size,n.w_size+n.strstart),0),n.matches<2&&n.matches++,n.insert>n.strstart&&(n.insert=n.strstart)),n.window.set(n.strm.input.subarray(n.strm.next_in-o,n.strm.next_in),n.strstart),n.strstart+=o,n.insert+=o>n.w_size-n.insert?n.w_size-n.insert:o),n.block_start=n.strstart),n.high_water<n.strstart&&(n.high_water=n.strstart),a?as:t!==Zr&&t!==Mn&&n.strm.avail_in===0&&n.strstart===n.block_start?ss:(s=n.window_size-n.strstart,n.strm.avail_in>s&&n.block_start>=n.w_size&&(n.block_start-=n.w_size,n.strstart-=n.w_size,n.window.set(n.window.subarray(n.w_size,n.w_size+n.strstart),0),n.matches<2&&n.matches++,s+=n.w_size,n.insert>n.strstart&&(n.insert=n.strstart)),s>n.strm.avail_in&&(s=n.strm.avail_in),s&&(Su(n.strm,n.window,n.strstart,s),n.strstart+=s,n.insert+=s>n.w_size-n.insert?n.w_size-n.insert:s),n.high_water<n.strstart&&(n.high_water=n.strstart),s=n.bi_valid+42>>3,s=n.pending_buf_size-s>65535?65535:n.pending_buf_size-s,e=s>n.w_size?n.w_size:s,i=n.strstart-n.block_start,(i>=e||(i||t===Mn)&&t!==Zr&&n.strm.avail_in===0&&i<=s)&&(r=i>s?s:i,a=t===Mn&&n.strm.avail_in===0&&r===i?1:0,gu(n,n.block_start,r,a),n.block_start+=r,Pn(n.strm)),a?Ei:dn)},ku=(n,t)=>{let e,r;for(;;){if(n.lookahead<ur){if(os(n),n.lookahead<ur&&t===Zr)return dn;if(n.lookahead===0)break}if(e=0,n.lookahead>=ie&&(n.ins_h=ei(n,n.ins_h,n.window[n.strstart+ie-1]),e=n.prev[n.strstart&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=n.strstart),e!==0&&n.strstart-e<=n.w_size-ur&&(n.match_length=hm(n,e)),n.match_length>=ie)if(r=Qr(n,n.strstart-n.match_start,n.match_length-ie),n.lookahead-=n.match_length,n.match_length<=n.max_lazy_match&&n.lookahead>=ie){n.match_length--;do n.strstart++,n.ins_h=ei(n,n.ins_h,n.window[n.strstart+ie-1]),e=n.prev[n.strstart&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=n.strstart;while(--n.match_length!==0);n.strstart++}else n.strstart+=n.match_length,n.match_length=0,n.ins_h=n.window[n.strstart],n.ins_h=ei(n,n.ins_h,n.window[n.strstart+1]);else r=Qr(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++;if(r&&(En(n,!1),n.strm.avail_out===0))return dn}return n.insert=n.strstart<ie-1?n.strstart:ie-1,t===Mn?(En(n,!0),n.strm.avail_out===0?Ei:as):n.sym_next&&(En(n,!1),n.strm.avail_out===0)?dn:ss},ls=(n,t)=>{let e,r,i;for(;;){if(n.lookahead<ur){if(os(n),n.lookahead<ur&&t===Zr)return dn;if(n.lookahead===0)break}if(e=0,n.lookahead>=ie&&(n.ins_h=ei(n,n.ins_h,n.window[n.strstart+ie-1]),e=n.prev[n.strstart&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=n.strstart),n.prev_length=n.match_length,n.prev_match=n.match_start,n.match_length=ie-1,e!==0&&n.prev_length<n.max_lazy_match&&n.strstart-e<=n.w_size-ur&&(n.match_length=hm(n,e),n.match_length<=5&&(n.strategy===rk||n.match_length===ie&&n.strstart-n.match_start>4096)&&(n.match_length=ie-1)),n.prev_length>=ie&&n.match_length<=n.prev_length){i=n.strstart+n.lookahead-ie,r=Qr(n,n.strstart-1-n.prev_match,n.prev_length-ie),n.lookahead-=n.prev_length-1,n.prev_length-=2;do++n.strstart<=i&&(n.ins_h=ei(n,n.ins_h,n.window[n.strstart+ie-1]),e=n.prev[n.strstart&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=n.strstart);while(--n.prev_length!==0);if(n.match_available=0,n.match_length=ie-1,n.strstart++,r&&(En(n,!1),n.strm.avail_out===0))return dn}else if(n.match_available){if(r=Qr(n,0,n.window[n.strstart-1]),r&&En(n,!1),n.strstart++,n.lookahead--,n.strm.avail_out===0)return dn}else n.match_available=1,n.strstart++,n.lookahead--}return n.match_available&&(r=Qr(n,0,n.window[n.strstart-1]),n.match_available=0),n.insert=n.strstart<ie-1?n.strstart:ie-1,t===Mn?(En(n,!0),n.strm.avail_out===0?Ei:as):n.sym_next&&(En(n,!1),n.strm.avail_out===0)?dn:ss},xk=(n,t)=>{let e,r,i,s;const a=n.window;for(;;){if(n.lookahead<=Wr){if(os(n),n.lookahead<=Wr&&t===Zr)return dn;if(n.lookahead===0)break}if(n.match_length=0,n.lookahead>=ie&&n.strstart>0&&(i=n.strstart-1,r=a[i],r===a[++i]&&r===a[++i]&&r===a[++i])){s=n.strstart+Wr;do;while(r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&i<s);n.match_length=Wr-(s-i),n.match_length>n.lookahead&&(n.match_length=n.lookahead)}if(n.match_length>=ie?(e=Qr(n,1,n.match_length-ie),n.lookahead-=n.match_length,n.strstart+=n.match_length,n.match_length=0):(e=Qr(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++),e&&(En(n,!1),n.strm.avail_out===0))return dn}return n.insert=0,t===Mn?(En(n,!0),n.strm.avail_out===0?Ei:as):n.sym_next&&(En(n,!1),n.strm.avail_out===0)?dn:ss},bk=(n,t)=>{let e;for(;;){if(n.lookahead===0&&(os(n),n.lookahead===0)){if(t===Zr)return dn;break}if(n.match_length=0,e=Qr(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++,e&&(En(n,!1),n.strm.avail_out===0))return dn}return n.insert=0,t===Mn?(En(n,!0),n.strm.avail_out===0?Ei:as):n.sym_next&&(En(n,!1),n.strm.avail_out===0)?dn:ss};function dr(n,t,e,r,i){this.good_length=n,this.max_lazy=t,this.nice_length=e,this.max_chain=r,this.func=i}const oa=[new dr(0,0,0,0,cm),new dr(4,4,8,4,ku),new dr(4,5,16,8,ku),new dr(4,6,32,32,ku),new dr(4,4,16,16,ls),new dr(8,16,32,32,ls),new dr(8,16,128,128,ls),new dr(8,32,128,256,ls),new dr(32,128,258,1024,ls),new dr(32,258,258,4096,ls)],Sk=n=>{n.window_size=2*n.w_size,ti(n.head),n.max_lazy_match=oa[n.level].max_lazy,n.good_match=oa[n.level].good_length,n.nice_match=oa[n.level].nice_length,n.max_chain_length=oa[n.level].max_chain,n.strstart=0,n.block_start=0,n.lookahead=0,n.insert=0,n.match_length=n.prev_length=ie-1,n.match_available=0,n.ins_h=0};function kk(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ll,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(gk*2),this.dyn_dtree=new Uint16Array((2*fk+1)*2),this.bl_tree=new Uint16Array((2*pk+1)*2),ti(this.dyn_ltree),ti(this.dyn_dtree),ti(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(mk+1),this.heap=new Uint16Array(2*yu+1),ti(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*yu+1),ti(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const la=n=>{if(!n)return 1;const t=n.state;return!t||t.strm!==n||t.status!==is&&t.status!==vu&&t.status!==_u&&t.status!==wu&&t.status!==xu&&t.status!==bu&&t.status!==Pi&&t.status!==sa?1:0},um=n=>{if(la(n))return Ai(n,cr);n.total_in=n.total_out=0,n.data_type=ok;const t=n.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap===2?vu:t.wrap?is:Pi,n.adler=t.wrap===2?0:1,t.last_flush=-2,JS(t),tn},dm=n=>{const t=um(n);return t===tn&&Sk(n.state),t},Ck=(n,t)=>la(n)||n.state.wrap!==2?cr:(n.state.gzhead=t,tn),fm=(n,t,e,r,i,s)=>{if(!n)return cr;let a=1;if(t===nk&&(t=6),r<0?(a=0,r=-r):r>15&&(a=2,r-=16),i<1||i>lk||e!==ll||r<8||r>15||t<0||t>9||s<0||s>sk||r===8&&a!==1)return Ai(n,cr);r===8&&(r=9);const o=new kk;return n.state=o,o.strm=n,o.status=is,o.wrap=a,o.gzhead=null,o.w_bits=r,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=i+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+ie-1)/ie),o.window=new Uint8Array(o.w_size*2),o.head=new Uint16Array(o.hash_size),o.prev=new Uint16Array(o.w_size),o.lit_bufsize=1<<i+6,o.pending_buf_size=o.lit_bufsize*4,o.pending_buf=new Uint8Array(o.pending_buf_size),o.sym_buf=o.lit_bufsize,o.sym_end=(o.lit_bufsize-1)*3,o.level=t,o.strategy=s,o.method=e,dm(n)},Tk=(n,t)=>fm(n,t,ll,hk,ck,ak),Pk=(n,t)=>{if(la(n)||t>am||t<0)return n?Ai(n,cr):cr;const e=n.state;if(!n.output||n.avail_in!==0&&!n.input||e.status===sa&&t!==Mn)return Ai(n,n.avail_out===0?mu:cr);const r=e.last_flush;if(e.last_flush=t,e.pending!==0){if(Pn(n),n.avail_out===0)return e.last_flush=-1,tn}else if(n.avail_in===0&&lm(t)<=lm(r)&&t!==Mn)return Ai(n,mu);if(e.status===sa&&n.avail_in!==0)return Ai(n,mu);if(e.status===is&&e.wrap===0&&(e.status=Pi),e.status===is){let i=ll+(e.w_bits-8<<4)<<8,s=-1;if(e.strategy>=ol||e.level<2?s=0:e.level<6?s=1:e.level===6?s=2:s=3,i|=s<<6,e.strstart!==0&&(i|=yk),i+=31-i%31,aa(e,i),e.strstart!==0&&(aa(e,n.adler>>>16),aa(e,n.adler&65535)),n.adler=1,e.status=Pi,Pn(n),e.pending!==0)return e.last_flush=-1,tn}if(e.status===vu){if(n.adler=0,de(e,31),de(e,139),de(e,8),e.gzhead)de(e,(e.gzhead.text?1:0)+(e.gzhead.hcrc?2:0)+(e.gzhead.extra?4:0)+(e.gzhead.name?8:0)+(e.gzhead.comment?16:0)),de(e,e.gzhead.time&255),de(e,e.gzhead.time>>8&255),de(e,e.gzhead.time>>16&255),de(e,e.gzhead.time>>24&255),de(e,e.level===9?2:e.strategy>=ol||e.level<2?4:0),de(e,e.gzhead.os&255),e.gzhead.extra&&e.gzhead.extra.length&&(de(e,e.gzhead.extra.length&255),de(e,e.gzhead.extra.length>>8&255)),e.gzhead.hcrc&&(n.adler=Xe(n.adler,e.pending_buf,e.pending,0)),e.gzindex=0,e.status=_u;else if(de(e,0),de(e,0),de(e,0),de(e,0),de(e,0),de(e,e.level===9?2:e.strategy>=ol||e.level<2?4:0),de(e,vk),e.status=Pi,Pn(n),e.pending!==0)return e.last_flush=-1,tn}if(e.status===_u){if(e.gzhead.extra){let i=e.pending,s=(e.gzhead.extra.length&65535)-e.gzindex;for(;e.pending+s>e.pending_buf_size;){let o=e.pending_buf_size-e.pending;if(e.pending_buf.set(e.gzhead.extra.subarray(e.gzindex,e.gzindex+o),e.pending),e.pending=e.pending_buf_size,e.gzhead.hcrc&&e.pending>i&&(n.adler=Xe(n.adler,e.pending_buf,e.pending-i,i)),e.gzindex+=o,Pn(n),e.pending!==0)return e.last_flush=-1,tn;i=0,s-=o}let a=new Uint8Array(e.gzhead.extra);e.pending_buf.set(a.subarray(e.gzindex,e.gzindex+s),e.pending),e.pending+=s,e.gzhead.hcrc&&e.pending>i&&(n.adler=Xe(n.adler,e.pending_buf,e.pending-i,i)),e.gzindex=0}e.status=wu}if(e.status===wu){if(e.gzhead.name){let i=e.pending,s;do{if(e.pending===e.pending_buf_size){if(e.gzhead.hcrc&&e.pending>i&&(n.adler=Xe(n.adler,e.pending_buf,e.pending-i,i)),Pn(n),e.pending!==0)return e.last_flush=-1,tn;i=0}e.gzindex<e.gzhead.name.length?s=e.gzhead.name.charCodeAt(e.gzindex++)&255:s=0,de(e,s)}while(s!==0);e.gzhead.hcrc&&e.pending>i&&(n.adler=Xe(n.adler,e.pending_buf,e.pending-i,i)),e.gzindex=0}e.status=xu}if(e.status===xu){if(e.gzhead.comment){let i=e.pending,s;do{if(e.pending===e.pending_buf_size){if(e.gzhead.hcrc&&e.pending>i&&(n.adler=Xe(n.adler,e.pending_buf,e.pending-i,i)),Pn(n),e.pending!==0)return e.last_flush=-1,tn;i=0}e.gzindex<e.gzhead.comment.length?s=e.gzhead.comment.charCodeAt(e.gzindex++)&255:s=0,de(e,s)}while(s!==0);e.gzhead.hcrc&&e.pending>i&&(n.adler=Xe(n.adler,e.pending_buf,e.pending-i,i))}e.status=bu}if(e.status===bu){if(e.gzhead.hcrc){if(e.pending+2>e.pending_buf_size&&(Pn(n),e.pending!==0))return e.last_flush=-1,tn;de(e,n.adler&255),de(e,n.adler>>8&255),n.adler=0}if(e.status=Pi,Pn(n),e.pending!==0)return e.last_flush=-1,tn}if(n.avail_in!==0||e.lookahead!==0||t!==Zr&&e.status!==sa){let i=e.level===0?cm(e,t):e.strategy===ol?bk(e,t):e.strategy===ik?xk(e,t):oa[e.level].func(e,t);if((i===Ei||i===as)&&(e.status=sa),i===dn||i===Ei)return n.avail_out===0&&(e.last_flush=-1),tn;if(i===ss&&(t===WS?ZS(e):t!==am&&(gu(e,0,0,!1),t===tk&&(ti(e.head),e.lookahead===0&&(e.strstart=0,e.block_start=0,e.insert=0))),Pn(n),n.avail_out===0))return e.last_flush=-1,tn}return t!==Mn?tn:e.wrap<=0?om:(e.wrap===2?(de(e,n.adler&255),de(e,n.adler>>8&255),de(e,n.adler>>16&255),de(e,n.adler>>24&255),de(e,n.total_in&255),de(e,n.total_in>>8&255),de(e,n.total_in>>16&255),de(e,n.total_in>>24&255)):(aa(e,n.adler>>>16),aa(e,n.adler&65535)),Pn(n),e.wrap>0&&(e.wrap=-e.wrap),e.pending!==0?tn:om)},Ek=n=>{if(la(n))return cr;const t=n.state.status;return n.state=null,t===Pi?Ai(n,ek):tn},Ak=(n,t)=>{let e=t.length;if(la(n))return cr;const r=n.state,i=r.wrap;if(i===2||i===1&&r.status!==is||r.lookahead)return cr;if(i===1&&(n.adler=ia(n.adler,t,e,0)),r.wrap=0,e>=r.w_size){i===0&&(ti(r.head),r.strstart=0,r.block_start=0,r.insert=0);let h=new Uint8Array(r.w_size);h.set(t.subarray(e-r.w_size,e),0),t=h,e=r.w_size}const s=n.avail_in,a=n.next_in,o=n.input;for(n.avail_in=e,n.next_in=0,n.input=t,os(r);r.lookahead>=ie;){let h=r.strstart,l=r.lookahead-(ie-1);do r.ins_h=ei(r,r.ins_h,r.window[h+ie-1]),r.prev[h&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=h,h++;while(--l);r.strstart=h,r.lookahead=ie-1,os(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=ie-1,r.match_available=0,n.next_in=a,n.input=o,n.avail_in=s,r.wrap=i,tn};var Ok=Tk,$k=fm,Fk=dm,Nk=um,Rk=Ck,Dk=Pk,Mk=Ek,Ik=Ak,jk="pako deflate (from Nodeca project)",ha={deflateInit:Ok,deflateInit2:$k,deflateReset:Fk,deflateResetKeep:Nk,deflateSetHeader:Rk,deflate:Dk,deflateEnd:Mk,deflateSetDictionary:Ik,deflateInfo:jk};const Lk=(n,t)=>Object.prototype.hasOwnProperty.call(n,t);var Uk=function(n){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const e=t.shift();if(e){if(typeof e!="object")throw new TypeError(e+"must be non-object");for(const r in e)Lk(e,r)&&(n[r]=e[r])}}return n},Gk=n=>{let t=0;for(let r=0,i=n.length;r<i;r++)t+=n[r].length;const e=new Uint8Array(t);for(let r=0,i=0,s=n.length;r<s;r++){let a=n[r];e.set(a,i),i+=a.length}return e},hl={assign:Uk,flattenChunks:Gk};let pm=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{pm=!1}const ca=new Uint8Array(256);for(let n=0;n<256;n++)ca[n]=n>=252?6:n>=248?5:n>=240?4:n>=224?3:n>=192?2:1;ca[254]=ca[254]=1;var zk=n=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(n);let t,e,r,i,s,a=n.length,o=0;for(i=0;i<a;i++)e=n.charCodeAt(i),(e&64512)===55296&&i+1<a&&(r=n.charCodeAt(i+1),(r&64512)===56320&&(e=65536+(e-55296<<10)+(r-56320),i++)),o+=e<128?1:e<2048?2:e<65536?3:4;for(t=new Uint8Array(o),s=0,i=0;s<o;i++)e=n.charCodeAt(i),(e&64512)===55296&&i+1<a&&(r=n.charCodeAt(i+1),(r&64512)===56320&&(e=65536+(e-55296<<10)+(r-56320),i++)),e<128?t[s++]=e:e<2048?(t[s++]=192|e>>>6,t[s++]=128|e&63):e<65536?(t[s++]=224|e>>>12,t[s++]=128|e>>>6&63,t[s++]=128|e&63):(t[s++]=240|e>>>18,t[s++]=128|e>>>12&63,t[s++]=128|e>>>6&63,t[s++]=128|e&63);return t};const Vk=(n,t)=>{if(t<65534&&n.subarray&&pm)return String.fromCharCode.apply(null,n.length===t?n:n.subarray(0,t));let e="";for(let r=0;r<t;r++)e+=String.fromCharCode(n[r]);return e};var Bk=(n,t)=>{const e=t||n.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(n.subarray(0,t));let r,i;const s=new Array(e*2);for(i=0,r=0;r<e;){let a=n[r++];if(a<128){s[i++]=a;continue}let o=ca[a];if(o>4){s[i++]=65533,r+=o-1;continue}for(a&=o===2?31:o===3?15:7;o>1&&r<e;)a=a<<6|n[r++]&63,o--;if(o>1){s[i++]=65533;continue}a<65536?s[i++]=a:(a-=65536,s[i++]=55296|a>>10&1023,s[i++]=56320|a&1023)}return Vk(s,i)},Hk=(n,t)=>{t=t||n.length,t>n.length&&(t=n.length);let e=t-1;for(;e>=0&&(n[e]&192)===128;)e--;return e<0||e===0?t:e+ca[n[e]]>t?e:t},ua={string2buf:zk,buf2string:Bk,utf8border:Hk};function qk(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var gm=qk;const mm=Object.prototype.toString,{Z_NO_FLUSH:Kk,Z_SYNC_FLUSH:Yk,Z_FULL_FLUSH:Xk,Z_FINISH:Jk,Z_OK:cl,Z_STREAM_END:Qk,Z_DEFAULT_COMPRESSION:Zk,Z_DEFAULT_STRATEGY:Wk,Z_DEFLATED:tC}=Ti;function da(n){this.options=hl.assign({level:Zk,method:tC,chunkSize:16384,windowBits:15,memLevel:8,strategy:Wk},n||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new gm,this.strm.avail_out=0;let e=ha.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(e!==cl)throw new Error(Ci[e]);if(t.header&&ha.deflateSetHeader(this.strm,t.header),t.dictionary){let r;if(typeof t.dictionary=="string"?r=ua.string2buf(t.dictionary):mm.call(t.dictionary)==="[object ArrayBuffer]"?r=new Uint8Array(t.dictionary):r=t.dictionary,e=ha.deflateSetDictionary(this.strm,r),e!==cl)throw new Error(Ci[e]);this._dict_set=!0}}da.prototype.push=function(n,t){const e=this.strm,r=this.options.chunkSize;let i,s;if(this.ended)return!1;for(t===~~t?s=t:s=t===!0?Jk:Kk,typeof n=="string"?e.input=ua.string2buf(n):mm.call(n)==="[object ArrayBuffer]"?e.input=new Uint8Array(n):e.input=n,e.next_in=0,e.avail_in=e.input.length;;){if(e.avail_out===0&&(e.output=new Uint8Array(r),e.next_out=0,e.avail_out=r),(s===Yk||s===Xk)&&e.avail_out<=6){this.onData(e.output.subarray(0,e.next_out)),e.avail_out=0;continue}if(i=ha.deflate(e,s),i===Qk)return e.next_out>0&&this.onData(e.output.subarray(0,e.next_out)),i=ha.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===cl;if(e.avail_out===0){this.onData(e.output);continue}if(s>0&&e.next_out>0){this.onData(e.output.subarray(0,e.next_out)),e.avail_out=0;continue}if(e.avail_in===0)break}return!0},da.prototype.onData=function(n){this.chunks.push(n)},da.prototype.onEnd=function(n){n===cl&&(this.result=hl.flattenChunks(this.chunks)),this.chunks=[],this.err=n,this.msg=this.strm.msg};function Cu(n,t){const e=new da(t);if(e.push(n,!0),e.err)throw e.msg||Ci[e.err];return e.result}function eC(n,t){return t=t||{},t.raw=!0,Cu(n,t)}function nC(n,t){return t=t||{},t.gzip=!0,Cu(n,t)}var rC=da,iC=Cu,sC=eC,aC=nC,oC=Ti,lC={Deflate:rC,deflate:iC,deflateRaw:sC,gzip:aC,constants:oC};const ul=16209,hC=16191;var cC=function(n,t){let e,r,i,s,a,o,h,l,c,f,d,u,p,v,_,S,x,m,k,F,P,N,R,L;const U=n.state;e=n.next_in,R=n.input,r=e+(n.avail_in-5),i=n.next_out,L=n.output,s=i-(t-n.avail_out),a=i+(n.avail_out-257),o=U.dmax,h=U.wsize,l=U.whave,c=U.wnext,f=U.window,d=U.hold,u=U.bits,p=U.lencode,v=U.distcode,_=(1<<U.lenbits)-1,S=(1<<U.distbits)-1;t:do{u<15&&(d+=R[e++]<<u,u+=8,d+=R[e++]<<u,u+=8),x=p[d&_];e:for(;;){if(m=x>>>24,d>>>=m,u-=m,m=x>>>16&255,m===0)L[i++]=x&65535;else if(m&16){k=x&65535,m&=15,m&&(u<m&&(d+=R[e++]<<u,u+=8),k+=d&(1<<m)-1,d>>>=m,u-=m),u<15&&(d+=R[e++]<<u,u+=8,d+=R[e++]<<u,u+=8),x=v[d&S];n:for(;;){if(m=x>>>24,d>>>=m,u-=m,m=x>>>16&255,m&16){if(F=x&65535,m&=15,u<m&&(d+=R[e++]<<u,u+=8,u<m&&(d+=R[e++]<<u,u+=8)),F+=d&(1<<m)-1,F>o){n.msg="invalid distance too far back",U.mode=ul;break t}if(d>>>=m,u-=m,m=i-s,F>m){if(m=F-m,m>l&&U.sane){n.msg="invalid distance too far back",U.mode=ul;break t}if(P=0,N=f,c===0){if(P+=h-m,m<k){k-=m;do L[i++]=f[P++];while(--m);P=i-F,N=L}}else if(c<m){if(P+=h+c-m,m-=c,m<k){k-=m;do L[i++]=f[P++];while(--m);if(P=0,c<k){m=c,k-=m;do L[i++]=f[P++];while(--m);P=i-F,N=L}}}else if(P+=c-m,m<k){k-=m;do L[i++]=f[P++];while(--m);P=i-F,N=L}for(;k>2;)L[i++]=N[P++],L[i++]=N[P++],L[i++]=N[P++],k-=3;k&&(L[i++]=N[P++],k>1&&(L[i++]=N[P++]))}else{P=i-F;do L[i++]=L[P++],L[i++]=L[P++],L[i++]=L[P++],k-=3;while(k>2);k&&(L[i++]=L[P++],k>1&&(L[i++]=L[P++]))}}else if(m&64){n.msg="invalid distance code",U.mode=ul;break t}else{x=v[(x&65535)+(d&(1<<m)-1)];continue n}break}}else if(m&64)if(m&32){U.mode=hC;break t}else{n.msg="invalid literal/length code",U.mode=ul;break t}else{x=p[(x&65535)+(d&(1<<m)-1)];continue e}break}}while(e<r&&i<a);k=u>>3,e-=k,u-=k<<3,d&=(1<<u)-1,n.next_in=e,n.next_out=i,n.avail_in=e<r?5+(r-e):5-(e-r),n.avail_out=i<a?257+(a-i):257-(i-a),U.hold=d,U.bits=u};const hs=15,ym=852,vm=592,_m=0,Tu=1,wm=2,uC=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),dC=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),fC=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),pC=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var fa=(n,t,e,r,i,s,a,o)=>{const h=o.bits;let l=0,c=0,f=0,d=0,u=0,p=0,v=0,_=0,S=0,x=0,m,k,F,P,N,R=null,L;const U=new Uint16Array(hs+1),B=new Uint16Array(hs+1);let K=null,tt,W,lt;for(l=0;l<=hs;l++)U[l]=0;for(c=0;c<r;c++)U[t[e+c]]++;for(u=h,d=hs;d>=1&&U[d]===0;d--);if(u>d&&(u=d),d===0)return i[s++]=1<<24|64<<16|0,i[s++]=1<<24|64<<16|0,o.bits=1,0;for(f=1;f<d&&U[f]===0;f++);for(u<f&&(u=f),_=1,l=1;l<=hs;l++)if(_<<=1,_-=U[l],_<0)return-1;if(_>0&&(n===_m||d!==1))return-1;for(B[1]=0,l=1;l<hs;l++)B[l+1]=B[l]+U[l];for(c=0;c<r;c++)t[e+c]!==0&&(a[B[t[e+c]]++]=c);if(n===_m?(R=K=a,L=20):n===Tu?(R=uC,K=dC,L=257):(R=fC,K=pC,L=0),x=0,c=0,l=f,N=s,p=u,v=0,F=-1,S=1<<u,P=S-1,n===Tu&&S>ym||n===wm&&S>vm)return 1;for(;;){tt=l-v,a[c]+1<L?(W=0,lt=a[c]):a[c]>=L?(W=K[a[c]-L],lt=R[a[c]-L]):(W=96,lt=0),m=1<<l-v,k=1<<p,f=k;do k-=m,i[N+(x>>v)+k]=tt<<24|W<<16|lt|0;while(k!==0);for(m=1<<l-1;x&m;)m>>=1;if(m!==0?(x&=m-1,x+=m):x=0,c++,--U[l]===0){if(l===d)break;l=t[e+a[c]]}if(l>u&&(x&P)!==F){for(v===0&&(v=u),N+=f,p=l-v,_=1<<p;p+v<d&&(_-=U[p+v],!(_<=0));)p++,_<<=1;if(S+=1<<p,n===Tu&&S>ym||n===wm&&S>vm)return 1;F=x&P,i[F]=u<<24|p<<16|N-s|0}}return x!==0&&(i[N+x]=l-v<<24|64<<16|0),o.bits=u,0};const gC=0,xm=1,bm=2,{Z_FINISH:Sm,Z_BLOCK:mC,Z_TREES:dl,Z_OK:Oi,Z_STREAM_END:yC,Z_NEED_DICT:vC,Z_STREAM_ERROR:Xn,Z_DATA_ERROR:km,Z_MEM_ERROR:Cm,Z_BUF_ERROR:_C,Z_DEFLATED:Tm}=Ti,fl=16180,Pm=16181,Em=16182,Am=16183,Om=16184,$m=16185,Fm=16186,Nm=16187,Rm=16188,Dm=16189,pl=16190,Ar=16191,Pu=16192,Mm=16193,Eu=16194,Im=16195,jm=16196,Lm=16197,Um=16198,gl=16199,ml=16200,Gm=16201,zm=16202,Vm=16203,Bm=16204,Hm=16205,Au=16206,qm=16207,Km=16208,Te=16209,Ym=16210,Xm=16211,wC=852,xC=592,bC=15,SC=bC,Jm=n=>(n>>>24&255)+(n>>>8&65280)+((n&65280)<<8)+((n&255)<<24);function kC(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const $i=n=>{if(!n)return 1;const t=n.state;return!t||t.strm!==n||t.mode<fl||t.mode>Xm?1:0},Qm=n=>{if($i(n))return Xn;const t=n.state;return n.total_in=n.total_out=t.total=0,n.msg="",t.wrap&&(n.adler=t.wrap&1),t.mode=fl,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(wC),t.distcode=t.distdyn=new Int32Array(xC),t.sane=1,t.back=-1,Oi},Zm=n=>{if($i(n))return Xn;const t=n.state;return t.wsize=0,t.whave=0,t.wnext=0,Qm(n)},Wm=(n,t)=>{let e;if($i(n))return Xn;const r=n.state;return t<0?(e=0,t=-t):(e=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?Xn:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=e,r.wbits=t,Zm(n))},t1=(n,t)=>{if(!n)return Xn;const e=new kC;n.state=e,e.strm=n,e.window=null,e.mode=fl;const r=Wm(n,t);return r!==Oi&&(n.state=null),r},CC=n=>t1(n,SC);let e1=!0,Ou,$u;const TC=n=>{if(e1){Ou=new Int32Array(512),$u=new Int32Array(32);let t=0;for(;t<144;)n.lens[t++]=8;for(;t<256;)n.lens[t++]=9;for(;t<280;)n.lens[t++]=7;for(;t<288;)n.lens[t++]=8;for(fa(xm,n.lens,0,288,Ou,0,n.work,{bits:9}),t=0;t<32;)n.lens[t++]=5;fa(bm,n.lens,0,32,$u,0,n.work,{bits:5}),e1=!1}n.lencode=Ou,n.lenbits=9,n.distcode=$u,n.distbits=5},n1=(n,t,e,r)=>{let i;const s=n.state;return s.window===null&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new Uint8Array(s.wsize)),r>=s.wsize?(s.window.set(t.subarray(e-s.wsize,e),0),s.wnext=0,s.whave=s.wsize):(i=s.wsize-s.wnext,i>r&&(i=r),s.window.set(t.subarray(e-r,e-r+i),s.wnext),r-=i,r?(s.window.set(t.subarray(e-r,e),0),s.wnext=r,s.whave=s.wsize):(s.wnext+=i,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=i))),0},PC=(n,t)=>{let e,r,i,s,a,o,h,l,c,f,d,u,p,v,_=0,S,x,m,k,F,P,N,R;const L=new Uint8Array(4);let U,B;const K=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if($i(n)||!n.output||!n.input&&n.avail_in!==0)return Xn;e=n.state,e.mode===Ar&&(e.mode=Pu),a=n.next_out,i=n.output,h=n.avail_out,s=n.next_in,r=n.input,o=n.avail_in,l=e.hold,c=e.bits,f=o,d=h,R=Oi;t:for(;;)switch(e.mode){case fl:if(e.wrap===0){e.mode=Pu;break}for(;c<16;){if(o===0)break t;o--,l+=r[s++]<<c,c+=8}if(e.wrap&2&&l===35615){e.wbits===0&&(e.wbits=15),e.check=0,L[0]=l&255,L[1]=l>>>8&255,e.check=Xe(e.check,L,2,0),l=0,c=0,e.mode=Pm;break}if(e.head&&(e.head.done=!1),!(e.wrap&1)||(((l&255)<<8)+(l>>8))%31){n.msg="incorrect header check",e.mode=Te;break}if((l&15)!==Tm){n.msg="unknown compression method",e.mode=Te;break}if(l>>>=4,c-=4,N=(l&15)+8,e.wbits===0&&(e.wbits=N),N>15||N>e.wbits){n.msg="invalid window size",e.mode=Te;break}e.dmax=1<<e.wbits,e.flags=0,n.adler=e.check=1,e.mode=l&512?Dm:Ar,l=0,c=0;break;case Pm:for(;c<16;){if(o===0)break t;o--,l+=r[s++]<<c,c+=8}if(e.flags=l,(e.flags&255)!==Tm){n.msg="unknown compression method",e.mode=Te;break}if(e.flags&57344){n.msg="unknown header flags set",e.mode=Te;break}e.head&&(e.head.text=l>>8&1),e.flags&512&&e.wrap&4&&(L[0]=l&255,L[1]=l>>>8&255,e.check=Xe(e.check,L,2,0)),l=0,c=0,e.mode=Em;case Em:for(;c<32;){if(o===0)break t;o--,l+=r[s++]<<c,c+=8}e.head&&(e.head.time=l),e.flags&512&&e.wrap&4&&(L[0]=l&255,L[1]=l>>>8&255,L[2]=l>>>16&255,L[3]=l>>>24&255,e.check=Xe(e.check,L,4,0)),l=0,c=0,e.mode=Am;case Am:for(;c<16;){if(o===0)break t;o--,l+=r[s++]<<c,c+=8}e.head&&(e.head.xflags=l&255,e.head.os=l>>8),e.flags&512&&e.wrap&4&&(L[0]=l&255,L[1]=l>>>8&255,e.check=Xe(e.check,L,2,0)),l=0,c=0,e.mode=Om;case Om:if(e.flags&1024){for(;c<16;){if(o===0)break t;o--,l+=r[s++]<<c,c+=8}e.length=l,e.head&&(e.head.extra_len=l),e.flags&512&&e.wrap&4&&(L[0]=l&255,L[1]=l>>>8&255,e.check=Xe(e.check,L,2,0)),l=0,c=0}else e.head&&(e.head.extra=null);e.mode=$m;case $m:if(e.flags&1024&&(u=e.length,u>o&&(u=o),u&&(e.head&&(N=e.head.extra_len-e.length,e.head.extra||(e.head.extra=new Uint8Array(e.head.extra_len)),e.head.extra.set(r.subarray(s,s+u),N)),e.flags&512&&e.wrap&4&&(e.check=Xe(e.check,r,u,s)),o-=u,s+=u,e.length-=u),e.length))break t;e.length=0,e.mode=Fm;case Fm:if(e.flags&2048){if(o===0)break t;u=0;do N=r[s+u++],e.head&&N&&e.length<65536&&(e.head.name+=String.fromCharCode(N));while(N&&u<o);if(e.flags&512&&e.wrap&4&&(e.check=Xe(e.check,r,u,s)),o-=u,s+=u,N)break t}else e.head&&(e.head.name=null);e.length=0,e.mode=Nm;case Nm:if(e.flags&4096){if(o===0)break t;u=0;do N=r[s+u++],e.head&&N&&e.length<65536&&(e.head.comment+=String.fromCharCode(N));while(N&&u<o);if(e.flags&512&&e.wrap&4&&(e.check=Xe(e.check,r,u,s)),o-=u,s+=u,N)break t}else e.head&&(e.head.comment=null);e.mode=Rm;case Rm:if(e.flags&512){for(;c<16;){if(o===0)break t;o--,l+=r[s++]<<c,c+=8}if(e.wrap&4&&l!==(e.check&65535)){n.msg="header crc mismatch",e.mode=Te;break}l=0,c=0}e.head&&(e.head.hcrc=e.flags>>9&1,e.head.done=!0),n.adler=e.check=0,e.mode=Ar;break;case Dm:for(;c<32;){if(o===0)break t;o--,l+=r[s++]<<c,c+=8}n.adler=e.check=Jm(l),l=0,c=0,e.mode=pl;case pl:if(e.havedict===0)return n.next_out=a,n.avail_out=h,n.next_in=s,n.avail_in=o,e.hold=l,e.bits=c,vC;n.adler=e.check=1,e.mode=Ar;case Ar:if(t===mC||t===dl)break t;case Pu:if(e.last){l>>>=c&7,c-=c&7,e.mode=Au;break}for(;c<3;){if(o===0)break t;o--,l+=r[s++]<<c,c+=8}switch(e.last=l&1,l>>>=1,c-=1,l&3){case 0:e.mode=Mm;break;case 1:if(TC(e),e.mode=gl,t===dl){l>>>=2,c-=2;break t}break;case 2:e.mode=jm;break;case 3:n.msg="invalid block type",e.mode=Te}l>>>=2,c-=2;break;case Mm:for(l>>>=c&7,c-=c&7;c<32;){if(o===0)break t;o--,l+=r[s++]<<c,c+=8}if((l&65535)!==(l>>>16^65535)){n.msg="invalid stored block lengths",e.mode=Te;break}if(e.length=l&65535,l=0,c=0,e.mode=Eu,t===dl)break t;case Eu:e.mode=Im;case Im:if(u=e.length,u){if(u>o&&(u=o),u>h&&(u=h),u===0)break t;i.set(r.subarray(s,s+u),a),o-=u,s+=u,h-=u,a+=u,e.length-=u;break}e.mode=Ar;break;case jm:for(;c<14;){if(o===0)break t;o--,l+=r[s++]<<c,c+=8}if(e.nlen=(l&31)+257,l>>>=5,c-=5,e.ndist=(l&31)+1,l>>>=5,c-=5,e.ncode=(l&15)+4,l>>>=4,c-=4,e.nlen>286||e.ndist>30){n.msg="too many length or distance symbols",e.mode=Te;break}e.have=0,e.mode=Lm;case Lm:for(;e.have<e.ncode;){for(;c<3;){if(o===0)break t;o--,l+=r[s++]<<c,c+=8}e.lens[K[e.have++]]=l&7,l>>>=3,c-=3}for(;e.have<19;)e.lens[K[e.have++]]=0;if(e.lencode=e.lendyn,e.lenbits=7,U={bits:e.lenbits},R=fa(gC,e.lens,0,19,e.lencode,0,e.work,U),e.lenbits=U.bits,R){n.msg="invalid code lengths set",e.mode=Te;break}e.have=0,e.mode=Um;case Um:for(;e.have<e.nlen+e.ndist;){for(;_=e.lencode[l&(1<<e.lenbits)-1],S=_>>>24,x=_>>>16&255,m=_&65535,!(S<=c);){if(o===0)break t;o--,l+=r[s++]<<c,c+=8}if(m<16)l>>>=S,c-=S,e.lens[e.have++]=m;else{if(m===16){for(B=S+2;c<B;){if(o===0)break t;o--,l+=r[s++]<<c,c+=8}if(l>>>=S,c-=S,e.have===0){n.msg="invalid bit length repeat",e.mode=Te;break}N=e.lens[e.have-1],u=3+(l&3),l>>>=2,c-=2}else if(m===17){for(B=S+3;c<B;){if(o===0)break t;o--,l+=r[s++]<<c,c+=8}l>>>=S,c-=S,N=0,u=3+(l&7),l>>>=3,c-=3}else{for(B=S+7;c<B;){if(o===0)break t;o--,l+=r[s++]<<c,c+=8}l>>>=S,c-=S,N=0,u=11+(l&127),l>>>=7,c-=7}if(e.have+u>e.nlen+e.ndist){n.msg="invalid bit length repeat",e.mode=Te;break}for(;u--;)e.lens[e.have++]=N}}if(e.mode===Te)break;if(e.lens[256]===0){n.msg="invalid code -- missing end-of-block",e.mode=Te;break}if(e.lenbits=9,U={bits:e.lenbits},R=fa(xm,e.lens,0,e.nlen,e.lencode,0,e.work,U),e.lenbits=U.bits,R){n.msg="invalid literal/lengths set",e.mode=Te;break}if(e.distbits=6,e.distcode=e.distdyn,U={bits:e.distbits},R=fa(bm,e.lens,e.nlen,e.ndist,e.distcode,0,e.work,U),e.distbits=U.bits,R){n.msg="invalid distances set",e.mode=Te;break}if(e.mode=gl,t===dl)break t;case gl:e.mode=ml;case ml:if(o>=6&&h>=258){n.next_out=a,n.avail_out=h,n.next_in=s,n.avail_in=o,e.hold=l,e.bits=c,cC(n,d),a=n.next_out,i=n.output,h=n.avail_out,s=n.next_in,r=n.input,o=n.avail_in,l=e.hold,c=e.bits,e.mode===Ar&&(e.back=-1);break}for(e.back=0;_=e.lencode[l&(1<<e.lenbits)-1],S=_>>>24,x=_>>>16&255,m=_&65535,!(S<=c);){if(o===0)break t;o--,l+=r[s++]<<c,c+=8}if(x&&!(x&240)){for(k=S,F=x,P=m;_=e.lencode[P+((l&(1<<k+F)-1)>>k)],S=_>>>24,x=_>>>16&255,m=_&65535,!(k+S<=c);){if(o===0)break t;o--,l+=r[s++]<<c,c+=8}l>>>=k,c-=k,e.back+=k}if(l>>>=S,c-=S,e.back+=S,e.length=m,x===0){e.mode=Hm;break}if(x&32){e.back=-1,e.mode=Ar;break}if(x&64){n.msg="invalid literal/length code",e.mode=Te;break}e.extra=x&15,e.mode=Gm;case Gm:if(e.extra){for(B=e.extra;c<B;){if(o===0)break t;o--,l+=r[s++]<<c,c+=8}e.length+=l&(1<<e.extra)-1,l>>>=e.extra,c-=e.extra,e.back+=e.extra}e.was=e.length,e.mode=zm;case zm:for(;_=e.distcode[l&(1<<e.distbits)-1],S=_>>>24,x=_>>>16&255,m=_&65535,!(S<=c);){if(o===0)break t;o--,l+=r[s++]<<c,c+=8}if(!(x&240)){for(k=S,F=x,P=m;_=e.distcode[P+((l&(1<<k+F)-1)>>k)],S=_>>>24,x=_>>>16&255,m=_&65535,!(k+S<=c);){if(o===0)break t;o--,l+=r[s++]<<c,c+=8}l>>>=k,c-=k,e.back+=k}if(l>>>=S,c-=S,e.back+=S,x&64){n.msg="invalid distance code",e.mode=Te;break}e.offset=m,e.extra=x&15,e.mode=Vm;case Vm:if(e.extra){for(B=e.extra;c<B;){if(o===0)break t;o--,l+=r[s++]<<c,c+=8}e.offset+=l&(1<<e.extra)-1,l>>>=e.extra,c-=e.extra,e.back+=e.extra}if(e.offset>e.dmax){n.msg="invalid distance too far back",e.mode=Te;break}e.mode=Bm;case Bm:if(h===0)break t;if(u=d-h,e.offset>u){if(u=e.offset-u,u>e.whave&&e.sane){n.msg="invalid distance too far back",e.mode=Te;break}u>e.wnext?(u-=e.wnext,p=e.wsize-u):p=e.wnext-u,u>e.length&&(u=e.length),v=e.window}else v=i,p=a-e.offset,u=e.length;u>h&&(u=h),h-=u,e.length-=u;do i[a++]=v[p++];while(--u);e.length===0&&(e.mode=ml);break;case Hm:if(h===0)break t;i[a++]=e.length,h--,e.mode=ml;break;case Au:if(e.wrap){for(;c<32;){if(o===0)break t;o--,l|=r[s++]<<c,c+=8}if(d-=h,n.total_out+=d,e.total+=d,e.wrap&4&&d&&(n.adler=e.check=e.flags?Xe(e.check,i,d,a-d):ia(e.check,i,d,a-d)),d=h,e.wrap&4&&(e.flags?l:Jm(l))!==e.check){n.msg="incorrect data check",e.mode=Te;break}l=0,c=0}e.mode=qm;case qm:if(e.wrap&&e.flags){for(;c<32;){if(o===0)break t;o--,l+=r[s++]<<c,c+=8}if(e.wrap&4&&l!==(e.total&4294967295)){n.msg="incorrect length check",e.mode=Te;break}l=0,c=0}e.mode=Km;case Km:R=yC;break t;case Te:R=km;break t;case Ym:return Cm;case Xm:default:return Xn}return n.next_out=a,n.avail_out=h,n.next_in=s,n.avail_in=o,e.hold=l,e.bits=c,(e.wsize||d!==n.avail_out&&e.mode<Te&&(e.mode<Au||t!==Sm))&&n1(n,n.output,n.next_out,d-n.avail_out),f-=n.avail_in,d-=n.avail_out,n.total_in+=f,n.total_out+=d,e.total+=d,e.wrap&4&&d&&(n.adler=e.check=e.flags?Xe(e.check,i,d,n.next_out-d):ia(e.check,i,d,n.next_out-d)),n.data_type=e.bits+(e.last?64:0)+(e.mode===Ar?128:0)+(e.mode===gl||e.mode===Eu?256:0),(f===0&&d===0||t===Sm)&&R===Oi&&(R=_C),R},EC=n=>{if($i(n))return Xn;let t=n.state;return t.window&&(t.window=null),n.state=null,Oi},AC=(n,t)=>{if($i(n))return Xn;const e=n.state;return e.wrap&2?(e.head=t,t.done=!1,Oi):Xn},OC=(n,t)=>{const e=t.length;let r,i,s;return $i(n)||(r=n.state,r.wrap!==0&&r.mode!==pl)?Xn:r.mode===pl&&(i=1,i=ia(i,t,e,0),i!==r.check)?km:(s=n1(n,t,e,e),s?(r.mode=Ym,Cm):(r.havedict=1,Oi))};var $C=Zm,FC=Wm,NC=Qm,RC=CC,DC=t1,MC=PC,IC=EC,jC=AC,LC=OC,UC="pako inflate (from Nodeca project)",Or={inflateReset:$C,inflateReset2:FC,inflateResetKeep:NC,inflateInit:RC,inflateInit2:DC,inflate:MC,inflateEnd:IC,inflateGetHeader:jC,inflateSetDictionary:LC,inflateInfo:UC};function GC(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var zC=GC;const r1=Object.prototype.toString,{Z_NO_FLUSH:VC,Z_FINISH:BC,Z_OK:pa,Z_STREAM_END:Fu,Z_NEED_DICT:Nu,Z_STREAM_ERROR:HC,Z_DATA_ERROR:i1,Z_MEM_ERROR:qC}=Ti;function ga(n){this.options=hl.assign({chunkSize:1024*64,windowBits:15,to:""},n||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(n&&n.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new gm,this.strm.avail_out=0;let e=Or.inflateInit2(this.strm,t.windowBits);if(e!==pa)throw new Error(Ci[e]);if(this.header=new zC,Or.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=ua.string2buf(t.dictionary):r1.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(e=Or.inflateSetDictionary(this.strm,t.dictionary),e!==pa)))throw new Error(Ci[e])}ga.prototype.push=function(n,t){const e=this.strm,r=this.options.chunkSize,i=this.options.dictionary;let s,a,o;if(this.ended)return!1;for(t===~~t?a=t:a=t===!0?BC:VC,r1.call(n)==="[object ArrayBuffer]"?e.input=new Uint8Array(n):e.input=n,e.next_in=0,e.avail_in=e.input.length;;){for(e.avail_out===0&&(e.output=new Uint8Array(r),e.next_out=0,e.avail_out=r),s=Or.inflate(e,a),s===Nu&&i&&(s=Or.inflateSetDictionary(e,i),s===pa?s=Or.inflate(e,a):s===i1&&(s=Nu));e.avail_in>0&&s===Fu&&e.state.wrap>0&&n[e.next_in]!==0;)Or.inflateReset(e),s=Or.inflate(e,a);switch(s){case HC:case i1:case Nu:case qC:return this.onEnd(s),this.ended=!0,!1}if(o=e.avail_out,e.next_out&&(e.avail_out===0||s===Fu))if(this.options.to==="string"){let h=ua.utf8border(e.output,e.next_out),l=e.next_out-h,c=ua.buf2string(e.output,h);e.next_out=l,e.avail_out=r-l,l&&e.output.set(e.output.subarray(h,h+l),0),this.onData(c)}else this.onData(e.output.length===e.next_out?e.output:e.output.subarray(0,e.next_out));if(!(s===pa&&o===0)){if(s===Fu)return s=Or.inflateEnd(this.strm),this.onEnd(s),this.ended=!0,!0;if(e.avail_in===0)break}}return!0},ga.prototype.onData=function(n){this.chunks.push(n)},ga.prototype.onEnd=function(n){n===pa&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=hl.flattenChunks(this.chunks)),this.chunks=[],this.err=n,this.msg=this.strm.msg};function Ru(n,t){const e=new ga(t);if(e.push(n),e.err)throw e.msg||Ci[e.err];return e.result}function KC(n,t){return t=t||{},t.raw=!0,Ru(n,t)}var YC=ga,XC=Ru,JC=KC,QC=Ru,ZC=Ti,WC={Inflate:YC,inflate:XC,inflateRaw:JC,ungzip:QC,constants:ZC};const{Deflate:t9,deflate:e9,deflateRaw:n9,gzip:r9}=lC,{Inflate:i9,inflate:s9,inflateRaw:a9,ungzip:o9}=WC;var l9=t9,h9=e9,c9=n9,u9=r9,d9=i9,f9=s9,p9=a9,g9=o9,m9=Ti,y9={Deflate:l9,deflate:h9,deflateRaw:c9,gzip:u9,Inflate:d9,inflate:f9,inflateRaw:p9,ungzip:g9,constants:m9};const vt={};vt.toRGBA8=function(n){const t=n.width,e=n.height;if(n.tabs.acTL===null)return[vt.toRGBA8.decodeImage(n.data,t,e,n).buffer];const r=[];n.frames[0].data===null&&(n.frames[0].data=n.data);const i=t*e*4,s=new Uint8Array(i),a=new Uint8Array(i),o=new Uint8Array(i);for(let h=0;h<n.frames.length;h++){const l=n.frames[h],c=l.rect.x,f=l.rect.y,d=l.rect.width,u=l.rect.height,p=vt.toRGBA8.decodeImage(l.data,d,u,n);if(h!==0)for(let v=0;v<i;v++)o[v]=s[v];if(l.blend===0?vt._copyTile(p,d,u,s,t,e,c,f,0):l.blend===1&&vt._copyTile(p,d,u,s,t,e,c,f,1),r.push(s.buffer.slice(0)),l.dispose===1)vt._copyTile(a,d,u,s,t,e,c,f,0);else if(l.dispose===2)for(let v=0;v<i;v++)s[v]=o[v]}return r},vt.toRGBA8.decodeImage=function(n,t,e,r){const i=t*e,s=vt.decode._getBPP(r),a=Math.ceil(t*s/8),o=new Uint8Array(i*4),h=new Uint32Array(o.buffer),l=r.ctype,c=r.depth,f=vt._bin.readUshort;if(l===6){const d=i<<2;if(c===8)for(let u=0;u<d;u+=4)o[u]=n[u],o[u+1]=n[u+1],o[u+2]=n[u+2],o[u+3]=n[u+3];if(c===16)for(let u=0;u<d;u++)o[u]=n[u<<1]}else if(l===2){const d=r.tabs.tRNS;if(d===null){if(c===8)for(let u=0;u<i;u++){const p=u*3;h[u]=255<<24|n[p+2]<<16|n[p+1]<<8|n[p]}if(c===16)for(let u=0;u<i;u++){const p=u*6;h[u]=255<<24|n[p+4]<<16|n[p+2]<<8|n[p]}}else{const u=d[0],p=d[1],v=d[2];if(c===8)for(let _=0;_<i;_++){const S=_<<2,x=_*3;h[_]=255<<24|n[x+2]<<16|n[x+1]<<8|n[x],n[x]===u&&n[x+1]===p&&n[x+2]===v&&(o[S+3]=0)}if(c===16)for(let _=0;_<i;_++){const S=_<<2,x=_*6;h[_]=255<<24|n[x+4]<<16|n[x+2]<<8|n[x],f(n,x)===u&&f(n,x+2)===p&&f(n,x+4)===v&&(o[S+3]=0)}}}else if(l===3){const d=r.tabs.PLTE,u=r.tabs.tRNS,p=u?u.length:0;if(c===1)for(let v=0;v<e;v++){const _=v*a,S=v*t;for(let x=0;x<t;x++){const m=S+x<<2,k=n[_+(x>>3)]>>7-((x&7)<<0)&1,F=3*k;o[m]=d[F],o[m+1]=d[F+1],o[m+2]=d[F+2],o[m+3]=k<p?u[k]:255}}if(c===2)for(let v=0;v<e;v++){const _=v*a,S=v*t;for(let x=0;x<t;x++){const m=S+x<<2,k=n[_+(x>>2)]>>6-((x&3)<<1)&3,F=3*k;o[m]=d[F],o[m+1]=d[F+1],o[m+2]=d[F+2],o[m+3]=k<p?u[k]:255}}if(c===4)for(let v=0;v<e;v++){const _=v*a,S=v*t;for(let x=0;x<t;x++){const m=S+x<<2,k=n[_+(x>>1)]>>4-((x&1)<<2)&15,F=3*k;o[m]=d[F],o[m+1]=d[F+1],o[m+2]=d[F+2],o[m+3]=k<p?u[k]:255}}if(c===8)for(let v=0;v<i;v++){const _=v<<2,S=n[v],x=3*S;o[_]=d[x],o[_+1]=d[x+1],o[_+2]=d[x+2],o[_+3]=S<p?u[S]:255}}else if(l===4){if(c===8)for(let d=0;d<i;d++){const u=d<<2,p=d<<1,v=n[p];o[u]=v,o[u+1]=v,o[u+2]=v,o[u+3]=n[p+1]}if(c===16)for(let d=0;d<i;d++){const u=d<<2,p=d<<2,v=n[p];o[u]=v,o[u+1]=v,o[u+2]=v,o[u+3]=n[p+2]}}else if(l===0){const d=r.tabs.tRNS?r.tabs.tRNS:-1;for(let u=0;u<e;u++){const p=u*a,v=u*t;if(c===1)for(let _=0;_<t;_++){const S=255*(n[p+(_>>>3)]>>>7-(_&7)&1),x=S===d*255?0:255;h[v+_]=x<<24|S<<16|S<<8|S}else if(c===2)for(let _=0;_<t;_++){const S=85*(n[p+(_>>>2)]>>>6-((_&3)<<1)&3),x=S===d*85?0:255;h[v+_]=x<<24|S<<16|S<<8|S}else if(c===4)for(let _=0;_<t;_++){const S=17*(n[p+(_>>>1)]>>>4-((_&1)<<2)&15),x=S===d*17?0:255;h[v+_]=x<<24|S<<16|S<<8|S}else if(c===8)for(let _=0;_<t;_++){const S=n[p+_],x=S===d?0:255;h[v+_]=x<<24|S<<16|S<<8|S}else if(c===16)for(let _=0;_<t;_++){const S=n[p+(_<<1)],x=f(n,p+(_<<1))===d?0:255;h[v+_]=x<<24|S<<16|S<<8|S}}}return o},vt.decode=function(n){const t=new Uint8Array(n);let e=8;const r=vt._bin,i=r.readUshort,s=r.readUint,a={tabs:{},frames:[]},o=new Uint8Array(t.length);let h=0,l,c=0;const f=[137,80,78,71,13,10,26,10];for(let d=0;d<8;d++)if(t[d]!==f[d])throw"The input is not a PNG file!";for(;e<t.length;){const d=r.readUint(t,e);e+=4;const u=r.readASCII(t,e,4);if(e+=4,u==="IHDR")vt.decode._IHDR(t,e,a);else if(u==="CgBI")a.tabs[u]=t.slice(e,e+4);else if(u==="IDAT"){for(let p=0;p<d;p++)o[h+p]=t[e+p];h+=d}else if(u==="acTL")a.tabs[u]={num_frames:s(t,e),num_plays:s(t,e+4)},l=new Uint8Array(t.length);else if(u==="fcTL"){if(c!==0){const S=a.frames[a.frames.length-1];S.data=vt.decode._decompress(a,l.slice(0,c),S.rect.width,S.rect.height),c=0}const p={x:s(t,e+12),y:s(t,e+16),width:s(t,e+4),height:s(t,e+8)};let v=i(t,e+22);v=i(t,e+20)/(v===0?100:v);const _={rect:p,delay:Math.round(v*1e3),dispose:t[e+24],blend:t[e+25]};a.frames.push(_)}else if(u==="fdAT"){for(let p=0;p<d-4;p++)l[c+p]=t[e+p+4];c+=d-4}else if(u==="pHYs")a.tabs[u]=[r.readUint(t,e),r.readUint(t,e+4),t[e+8]];else if(u==="cHRM"){a.tabs[u]=[];for(let p=0;p<8;p++)a.tabs[u].push(r.readUint(t,e+p*4))}else if(u==="tEXt"||u==="zTXt"){a.tabs[u]===null&&(a.tabs[u]={});const p=r.nextZero(t,e),v=r.readASCII(t,e,p-e);let _;const S=e+d-p-1;if(u==="tEXt")_=r.readASCII(t,p+1,S);else{const x=vt.decode._inflate(t.slice(p+2,p+2+S));_=r.readUTF8(x,0,x.length)}a.tabs[u][v]=_}else if(u==="iTXt"){a.tabs[u]==null&&(a.tabs[u]={});let p=0,v=e;p=r.nextZero(t,v);const _=r.readASCII(t,v,p-v);v=p+1;const S=t[v];v+=2,p=r.nextZero(t,v),v=p+1,p=r.nextZero(t,v),v=p+1;let x;const m=d-(v-e);if(S===0)x=r.readUTF8(t,v,m);else{const k=vt.decode._inflate(t.slice(v,v+m));x=r.readUTF8(k,0,k.length)}a.tabs[u][_]=x}else if(u==="PLTE")a.tabs[u]=r.readBytes(t,e,d);else if(u==="hIST"){const p=a.tabs.PLTE.length/3;a.tabs[u]=[];for(let v=0;v<p;v++)a.tabs[u].push(i(t,e+v*2))}else if(u==="tRNS")a.ctype===3?a.tabs[u]=r.readBytes(t,e,d):a.ctype===0?a.tabs[u]=i(t,e):a.ctype===2&&(a.tabs[u]=[i(t,e),i(t,e+2),i(t,e+4)]);else if(u==="gAMA")a.tabs[u]=r.readUint(t,e)/1e5;else if(u==="sRGB")a.tabs[u]=t[e];else if(u==="bKGD")a.ctype===0||a.ctype===4?a.tabs[u]=[i(t,e)]:a.ctype===2||a.ctype===6?a.tabs[u]=[i(t,e),i(t,e+2),i(t,e+4)]:a.ctype===3&&(a.tabs[u]=t[e]);else if(u==="IEND")break;e+=d,e+=4}if(c!==0){const d=a.frames[a.frames.length-1];d.data=vt.decode._decompress(a,l.slice(0,c),d.rect.width,d.rect.height),c=0}return a.data=vt.decode._decompress(a,o,a.width,a.height),delete a.compress,delete a.interlace,delete a.filter,a},vt.decode._decompress=function(n,t,e,r){const i=vt.decode._getBPP(n),s=Math.ceil(e*i/8),a=new Uint8Array((s+1+n.interlace)*r);return n.tabs.CgBI?t=vt.inflateRaw(t,a):t=vt.decode._inflate(t,a),n.interlace===0?t=vt.decode._filterZero(t,n,0,e,r):n.interlace===1&&(t=vt.decode._readInterlace(t,n)),t},vt.decode._inflate=function(n,t){return vt.inflateRaw(new Uint8Array(n.buffer,2,n.length-6),t)},vt.inflateRaw=function(){const n={};return n.H={},n.H.N=function(t,e){const r=Uint8Array;let i=0,s=0,a=0,o=0,h=0,l=0,c=0,f=0,d=0,u,p;if(t[0]===3&&t[1]===0)return e||new r(0);const v=n.H,_=v.b,S=v.e,x=v.R,m=v.n,k=v.A,F=v.Z,P=v.m,N=e===null;for(N&&(e=new r(t.length>>>2<<3));i===0;){if(i=_(t,d,1),s=_(t,d+1,2),d+=3,s===0){d&7&&(d+=8-(d&7));const R=(d>>>3)+4,L=t[R-4]|t[R-3]<<8;N&&(e=n.H.W(e,f+L)),e.set(new r(t.buffer,t.byteOffset+R,L),f),d=R+L<<3,f+=L;continue}if(N&&(e=n.H.W(e,f+(1<<17))),s===1&&(u=P.J,p=P.h,l=511,c=31),s===2){a=S(t,d,5)+257,o=S(t,d+5,5)+1,h=S(t,d+10,4)+4,d+=14;let R=1;for(let B=0;B<38;B+=2)P.Q[B]=0,P.Q[B+1]=0;for(let B=0;B<h;B++){const K=S(t,d+B*3,3);P.Q[(P.X[B]<<1)+1]=K,K>R&&(R=K)}d+=3*h,m(P.Q,R),k(P.Q,R,P.u),u=P.w,p=P.d,d=x(P.u,(1<<R)-1,a+o,t,d,P.v);const L=v.V(P.v,0,a,P.C);l=(1<<L)-1;const U=v.V(P.v,a,o,P.D);c=(1<<U)-1,m(P.C,L),k(P.C,L,u),m(P.D,U),k(P.D,U,p)}for(;;){const R=u[F(t,d)&l];d+=R&15;const L=R>>>4;if(!(L>>>8))e[f++]=L;else{if(L===256)break;{let U=f+L-254;if(L>264){const lt=P.q[L-257];U=f+(lt>>>3)+S(t,d,lt&7),d+=lt&7}const B=p[F(t,d)&c];d+=B&15;const K=B>>>4,tt=P.c[K],W=(tt>>>4)+_(t,d,tt&15);for(d+=tt&15;f<U;)e[f]=e[f++-W],e[f]=e[f++-W],e[f]=e[f++-W],e[f]=e[f++-W];f=U}}}}return e.length===f?e:e.slice(0,f)},n.H.W=function(t,e){const r=t.length;if(e<=r)return t;const i=new Uint8Array(r<<1);return i.set(t,0),i},n.H.R=function(t,e,r,i,s,a){const o=n.H.e,h=n.H.Z;let l=0;for(;l<r;){const c=t[h(i,s)&e];s+=c&15;const f=c>>>4;if(f<=15)a[l]=f,l++;else{let d=0,u=0;f===16?(u=3+o(i,s,2),s+=2,d=a[l-1]):f===17?(u=3+o(i,s,3),s+=3):f===18&&(u=11+o(i,s,7),s+=7);const p=l+u;for(;l<p;)a[l]=d,l++}}return s},n.H.V=function(t,e,r,i){let s=0,a=0;const o=i.length>>>1;for(;a<r;){const h=t[a+e];i[a<<1]=0,i[(a<<1)+1]=h,h>s&&(s=h),a++}for(;a<o;)i[a<<1]=0,i[(a<<1)+1]=0,a++;return s},n.H.n=function(t,e){const r=n.H.m,i=t.length;let s,a,o,h,l;const c=r.j;for(let d=0;d<=e;d++)c[d]=0;for(h=1;h<i;h+=2)c[t[h]]++;const f=r.K;for(s=0,c[0]=0,a=1;a<=e;a++)s=s+c[a-1]<<1,f[a]=s;for(o=0;o<i;o+=2)l=t[o+1],l!==0&&(t[o]=f[l],f[l]++)},n.H.A=function(t,e,r){const i=t.length,s=n.H.m.r;for(let a=0;a<i;a+=2)if(t[a+1]!==0){const o=a>>1,h=t[a+1],l=o<<4|h,c=e-h;let f=t[a]<<c;const d=f+(1<<c);for(;f!==d;){const u=s[f]>>>15-e;r[u]=l,f++}}},n.H.l=function(t,e){const r=n.H.m.r,i=15-e;for(let s=0;s<t.length;s+=2){const a=t[s]<<e-t[s+1];t[s]=r[a]>>>i}},n.H.M=function(t,e,r){r=r<<(e&7);const i=e>>>3;t[i]|=r,t[i+1]|=r>>>8},n.H.I=function(t,e,r){r=r<<(e&7);const i=e>>>3;t[i]|=r,t[i+1]|=r>>>8,t[i+2]|=r>>>16},n.H.e=function(t,e,r){return(t[e>>>3]|t[(e>>>3)+1]<<8)>>>(e&7)&(1<<r)-1},n.H.b=function(t,e,r){return(t[e>>>3]|t[(e>>>3)+1]<<8|t[(e>>>3)+2]<<16)>>>(e&7)&(1<<r)-1},n.H.Z=function(t,e){return(t[e>>>3]|t[(e>>>3)+1]<<8|t[(e>>>3)+2]<<16)>>>(e&7)},n.H.i=function(t,e){return(t[e>>>3]|t[(e>>>3)+1]<<8|t[(e>>>3)+2]<<16|t[(e>>>3)+3]<<24)>>>(e&7)},n.H.m=function(){const t=Uint16Array,e=Uint32Array;return{K:new t(16),j:new t(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new t(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new e(32),J:new t(512),_:[],h:new t(32),$:[],w:new t(32768),C:[],v:[],d:new t(32768),D:[],u:new t(512),Q:[],r:new t(32768),s:new e(286),Y:new e(30),a:new e(19),t:new e(15e3),k:new t(65536),g:new t(32768)}}(),function(){const t=n.H.m,e=32768;for(let i=0;i<e;i++){let s=i;s=(s&2863311530)>>>1|(s&1431655765)<<1,s=(s&3435973836)>>>2|(s&858993459)<<2,s=(s&4042322160)>>>4|(s&252645135)<<4,s=(s&4278255360)>>>8|(s&16711935)<<8,t.r[i]=(s>>>16|s<<16)>>>17}function r(i,s,a){for(;s--!==0;)i.push(0,a)}for(let i=0;i<32;i++)t.q[i]=t.S[i]<<3|t.T[i],t.c[i]=t.p[i]<<4|t.z[i];r(t._,144,8),r(t._,112,9),r(t._,24,7),r(t._,8,8),n.H.n(t._,9),n.H.A(t._,9,t.J),n.H.l(t._,9),r(t.$,32,5),n.H.n(t.$,5),n.H.A(t.$,5,t.h),n.H.l(t.$,5),r(t.Q,19,0),r(t.C,286,0),r(t.D,30,0),r(t.v,320,0)}(),n.H.N}(),vt.decode._readInterlace=function(n,t){const e=t.width,r=t.height,i=vt.decode._getBPP(t),s=i>>3,a=Math.ceil(e*i/8),o=new Uint8Array(r*a);let h=0;const l=[0,0,4,0,2,0,1],c=[0,4,0,2,0,1,0],f=[8,8,8,4,4,2,2],d=[8,8,4,4,2,2,1];let u=0;for(;u<7;){const p=f[u],v=d[u];let _=0,S=0,x=l[u];for(;x<r;)x+=p,S++;let m=c[u];for(;m<e;)m+=v,_++;const k=Math.ceil(_*i/8);vt.decode._filterZero(n,t,h,_,S);let F=0,P=l[u];for(;P<r;){let N=c[u],R=h+F*k<<3;for(;N<e;){if(i===1){let L=n[R>>3];L=L>>7-(R&7)&1,o[P*a+(N>>3)]|=L<<7-((N&7)<<0)}if(i===2){let L=n[R>>3];L=L>>6-(R&7)&3,o[P*a+(N>>2)]|=L<<6-((N&3)<<1)}if(i===4){let L=n[R>>3];L=L>>4-(R&7)&15,o[P*a+(N>>1)]|=L<<4-((N&1)<<2)}if(i>=8){const L=P*a+N*s;for(let U=0;U<s;U++)o[L+U]=n[(R>>3)+U]}R+=i,N+=v}F++,P+=p}_*S!==0&&(h+=S*(1+k)),u=u+1}return o},vt.decode._getBPP=function(n){return[1,null,3,1,2,null,4][n.ctype]*n.depth},vt.decode._filterZero=function(n,t,e,r,i){let s=vt.decode._getBPP(t);const a=Math.ceil(r*s/8),o=vt.decode._paeth;s=Math.ceil(s/8);let h=0,l=1,c=n[e],f=0;if(c>1&&(n[e]=[0,0,1][c-2]),c===3)for(f=s;f<a;f++)n[f+1]=n[f+1]+(n[f+1-s]>>>1)&255;for(let d=0;d<i;d++)if(h=e+d*a,l=h+d+1,c=n[l-1],f=0,c===0)for(;f<a;f++)n[h+f]=n[l+f];else if(c===1){for(;f<s;f++)n[h+f]=n[l+f];for(;f<a;f++)n[h+f]=n[l+f]+n[h+f-s]}else if(c===2)for(;f<a;f++)n[h+f]=n[l+f]+n[h+f-a];else if(c===3){for(;f<s;f++)n[h+f]=n[l+f]+(n[h+f-a]>>>1);for(;f<a;f++)n[h+f]=n[l+f]+(n[h+f-a]+n[h+f-s]>>>1)}else{for(;f<s;f++)n[h+f]=n[l+f]+o(0,n[h+f-a],0);for(;f<a;f++)n[h+f]=n[l+f]+o(n[h+f-s],n[h+f-a],n[h+f-s-a])}return n},vt.decode._paeth=function(n,t,e){const r=n+t-e,i=r-n,s=r-t,a=r-e;return i*i<=s*s&&i*i<=a*a?n:s*s<=a*a?t:e},vt.decode._IHDR=function(n,t,e){const r=vt._bin;e.width=r.readUint(n,t),t+=4,e.height=r.readUint(n,t),t+=4,e.depth=n[t],t++,e.ctype=n[t],t++,e.compress=n[t],t++,e.filter=n[t],t++,e.interlace=n[t],t++},vt._bin={nextZero:function(n,t){for(;n[t]!==0;)t++;return t},readUshort:function(n,t){return n[t]<<8|n[t+1]},writeUshort:function(n,t,e){n[t]=e>>8&255,n[t+1]=e&255},readUint:function(n,t){return n[t]*(256*256*256)+(n[t+1]<<16|n[t+2]<<8|n[t+3])},writeUint:function(n,t,e){n[t]=e>>24&255,n[t+1]=e>>16&255,n[t+2]=e>>8&255,n[t+3]=e&255},readASCII:function(n,t,e){let r="";for(let i=0;i<e;i++)r+=String.fromCharCode(n[t+i]);return r},writeASCII:function(n,t,e){for(let r=0;r<e.length;r++)n[t+r]=e.charCodeAt(r)},readBytes:function(n,t,e){const r=[];for(let i=0;i<e;i++)r.push(n[t+i]);return r},pad:function(n){return n.length<2?"0"+n:n},readUTF8:function(n,t,e){let r="",i;for(let s=0;s<e;s++)r+="%"+vt._bin.pad(n[t+s].toString(16));try{i=decodeURIComponent(r)}catch{return vt._bin.readASCII(n,t,e)}return i}},vt._copyTile=function(n,t,e,r,i,s,a,o,h){const l=Math.min(t,i),c=Math.min(e,s);let f=0,d=0;for(let u=0;u<c;u++)for(let p=0;p<l;p++)if(a>=0&&o>=0?(f=u*t+p<<2,d=(o+u)*i+a+p<<2):(f=(-o+u)*t-a+p<<2,d=u*i+p<<2),h===0)r[d]=n[f],r[d+1]=n[f+1],r[d+2]=n[f+2],r[d+3]=n[f+3];else if(h===1){const v=n[f+3]*.00392156862745098,_=n[f]*v,S=n[f+1]*v,x=n[f+2]*v,m=r[d+3]*(1/255),k=r[d]*m,F=r[d+1]*m,P=r[d+2]*m,N=1-v,R=v+m*N,L=R===0?0:1/R;r[d+3]=255*R,r[d+0]=(_+k*N)*L,r[d+1]=(S+F*N)*L,r[d+2]=(x+P*N)*L}else if(h===2){const v=n[f+3],_=n[f],S=n[f+1],x=n[f+2],m=r[d+3],k=r[d],F=r[d+1],P=r[d+2];v===m&&_===k&&S===F&&x===P?(r[d]=0,r[d+1]=0,r[d+2]=0,r[d+3]=0):(r[d]=_,r[d+1]=S,r[d+2]=x,r[d+3]=v)}else if(h===3){const v=n[f+3],_=n[f],S=n[f+1],x=n[f+2],m=r[d+3],k=r[d],F=r[d+1],P=r[d+2];if(v===m&&_===k&&S===F&&x===P)continue;if(v<220&&m>20)return!1}return!0},vt.encode=function(n,t,e,r,i,s,a){r===null&&(r=0),a===null&&(a=!1);const o=vt.encode.compress(n,t,e,r,[!1,!1,!1,0,a]);return vt.encode.compressPNG(o,-1),vt.encode._main(o,t,e,i,s)},vt.encodeLL=function(n,t,e,r,i,s,a,o){const h={ctype:0+(r===1?0:2)+(i===0?0:4),depth:s,frames:[]},l=(r+i)*s,c=l*t;for(let f=0;f<n.length;f++)h.frames.push({rect:{x:0,y:0,width:t,height:e},img:new Uint8Array(n[f]),blend:0,dispose:1,bpp:Math.ceil(l/8),bpl:Math.ceil(c/8)});return vt.encode.compressPNG(h,0,!0),vt.encode._main(h,t,e,a,o)},vt.encode._main=function(n,t,e,r,i){i||(i={});const s=vt.crc.crc,a=vt._bin.writeUint,o=vt._bin.writeUshort,h=vt._bin.writeASCII;let l=8;const c=n.frames.length>1;let f=!1,d=33+(c?20:0);if(i.sRGB!==null&&i.sRGB!==void 0&&(d+=13),i.pHYs!==null&&i.pHYs!==void 0&&(d+=21),n.ctype===3){const _=n.plte.length;for(let S=0;S<_;S++)n.plte[S]>>>24!==255&&(f=!0);d+=8+_*3+4+(f?8+_*1+4:0)}for(let _=0;_<n.frames.length;_++){const S=n.frames[_];c&&(d+=38),d+=S.cimg.length+12,_!==0&&(d+=4)}d+=12;const u=new Uint8Array(d),p=[137,80,78,71,13,10,26,10];for(let _=0;_<8;_++)u[_]=p[_];if(a(u,l,13),l+=4,h(u,l,"IHDR"),l+=4,a(u,l,t),l+=4,a(u,l,e),l+=4,u[l]=n.depth,l++,u[l]=n.ctype,l++,u[l]=0,l++,u[l]=0,l++,u[l]=0,l++,a(u,l,s(u,l-17,17)),l+=4,i.sRGB!==null&&i.sRGB!==void 0&&(a(u,l,1),l+=4,h(u,l,"sRGB"),l+=4,u[l]=i.sRGB,l++,a(u,l,s(u,l-5,5)),l+=4),i.pHYs!==null&&i.pHYs!==void 0&&(a(u,l,9),l+=4,h(u,l,"pHYs"),l+=4,a(u,l,i.pHYs[0]),l+=4,a(u,l,i.pHYs[1]),l+=4,u[l]=i.pHYs[2],l++,a(u,l,s(u,l-13,13)),l+=4),c&&(a(u,l,8),l+=4,h(u,l,"acTL"),l+=4,a(u,l,n.frames.length),l+=4,a(u,l,i.loop!=null?i.loop:0),l+=4,a(u,l,s(u,l-12,12)),l+=4),n.ctype===3){const _=n.plte.length;a(u,l,_*3),l+=4,h(u,l,"PLTE"),l+=4;for(let S=0;S<_;S++){const x=S*3,m=n.plte[S],k=m&255,F=m>>>8&255,P=m>>>16&255;u[l+x+0]=k,u[l+x+1]=F,u[l+x+2]=P}if(l+=_*3,a(u,l,s(u,l-_*3-4,_*3+4)),l+=4,f){a(u,l,_),l+=4,h(u,l,"tRNS"),l+=4;for(let S=0;S<_;S++)u[l+S]=n.plte[S]>>>24&255;l+=_,a(u,l,s(u,l-_-4,_+4)),l+=4}}let v=0;for(let _=0;_<n.frames.length;_++){const S=n.frames[_];c&&(a(u,l,26),l+=4,h(u,l,"fcTL"),l+=4,a(u,l,v++),l+=4,a(u,l,S.rect.width),l+=4,a(u,l,S.rect.height),l+=4,a(u,l,S.rect.x),l+=4,a(u,l,S.rect.y),l+=4,o(u,l,r[_]),l+=2,o(u,l,1e3),l+=2,u[l]=S.dispose,l++,u[l]=S.blend,l++,a(u,l,s(u,l-30,30)),l+=4);const x=S.cimg,m=x.length;a(u,l,m+(_===0?0:4)),l+=4;const k=l;h(u,l,_===0?"IDAT":"fdAT"),l+=4,_!==0&&(a(u,l,v++),l+=4),u.set(x,l),l+=m,a(u,l,s(u,k,l-k)),l+=4}return a(u,l,0),l+=4,h(u,l,"IEND"),l+=4,a(u,l,s(u,l-4,4)),l+=4,u.buffer},vt.encode.compressPNG=function(n,t,e){for(let r=0;r<n.frames.length;r++){const i=n.frames[r],s=i.rect.height,a=new Uint8Array(s*i.bpl+s);i.cimg=vt.encode._filterZero(i.img,s,i.bpp,i.bpl,a,t,e)}},vt.encode.compress=function(n,t,e,r,i){const s=i[0],a=i[1],o=i[2],h=i[3],l=i[4];let c=6,f=8,d=255;for(let m=0;m<n.length;m++){const k=new Uint8Array(n[m]),F=k.length;for(let P=0;P<F;P+=4)d&=k[P+3]}const u=d!==255,p=vt.encode.framize(n,t,e,s,a,o),v={},_=[],S=[];if(r!==0){const m=[];for(let R=0;R<p.length;R++)m.push(p[R].img.buffer);const k=vt.encode.concatRGBA(m),F=vt.quantize(k,r);let P=0;const N=new Uint8Array(F.abuf);for(let R=0;R<p.length;R++){const L=p[R].img,U=L.length;S.push(new Uint8Array(F.inds.buffer,P>>2,U>>2));for(let B=0;B<U;B+=4)L[B]=N[P+B],L[B+1]=N[P+B+1],L[B+2]=N[P+B+2],L[B+3]=N[P+B+3];P+=U}for(let R=0;R<F.plte.length;R++)_.push(F.plte[R].est.rgba)}else for(let m=0;m<p.length;m++){const k=p[m],F=new Uint32Array(k.img.buffer),P=k.rect.width,N=F.length,R=new Uint8Array(N);S.push(R);for(let L=0;L<N;L++){const U=F[L];if(L!==0&&U===F[L-1])R[L]=R[L-1];else if(L>P&&U===F[L-P])R[L]=R[L-P];else{let B=v[U];if(B===null&&(v[U]=B=_.length,_.push(U),_.length>=300))break;R[L]=B}}}const x=_.length;x<=256&&l===!1&&(x<=2?f=1:x<=4?f=2:x<=16?f=4:f=8,f=Math.max(f,h));for(let m=0;m<p.length;m++){const k=p[m],F=k.rect.width,P=k.rect.height;let N=k.img,R=4*F,L=4;if(x<=256&&l===!1){R=Math.ceil(f*F/8);const U=new Uint8Array(R*P),B=S[m];for(let K=0;K<P;K++){const tt=K*R,W=K*F;if(f===8)for(let lt=0;lt<F;lt++)U[tt+lt]=B[W+lt];else if(f===4)for(let lt=0;lt<F;lt++)U[tt+(lt>>1)]|=B[W+lt]<<4-(lt&1)*4;else if(f===2)for(let lt=0;lt<F;lt++)U[tt+(lt>>2)]|=B[W+lt]<<6-(lt&3)*2;else if(f===1)for(let lt=0;lt<F;lt++)U[tt+(lt>>3)]|=B[W+lt]<<7-(lt&7)*1}N=U,c=3,L=1}else if(u===!1&&p.length===1){const U=new Uint8Array(F*P*3),B=F*P;for(let K=0;K<B;K++){const tt=K*3,W=K*4;U[tt]=N[W],U[tt+1]=N[W+1],U[tt+2]=N[W+2]}N=U,c=2,L=3,R=3*F}k.img=N,k.bpl=R,k.bpp=L}return{ctype:c,depth:f,plte:_,frames:p}},vt.encode.framize=function(n,t,e,r,i,s){const a=[];for(let o=0;o<n.length;o++){const h=new Uint8Array(n[o]),l=new Uint32Array(h.buffer);let c,f=0,d=0,u=t,p=e,v=r?1:0;if(o!==0){const _=s||r||o===1||a[o-2].dispose!==0?1:2;let S=0,x=1e9;for(let k=0;k<_;k++){const F=new Uint32Array(n[o-1-k]);let P=t,N=e,R=-1,L=-1;for(let B=0;B<e;B++)for(let K=0;K<t;K++){const tt=B*t+K;l[tt]!==F[tt]&&(K<P&&(P=K),K>R&&(R=K),B<N&&(N=B),B>L&&(L=B))}R===-1&&(P=N=R=L=0),i&&((P&1)===1&&P--,(N&1)===1&&N--);const U=(R-P+1)*(L-N+1);U<x&&(x=U,S=k,f=P,d=N,u=R-P+1,p=L-N+1)}const m=new Uint8Array(n[o-1-S]);S===1&&(a[o-1].dispose=2),c=new Uint8Array(u*p*4),vt._copyTile(m,t,e,c,u,p,-f,-d,0),v=vt._copyTile(h,t,e,c,u,p,-f,-d,3)?1:0,v===1?vt.encode._prepareDiff(h,t,e,c,{x:f,y:d,width:u,height:p}):vt._copyTile(h,t,e,c,u,p,-f,-d,0)}else c=h.slice(0);a.push({rect:{x:f,y:d,width:u,height:p},img:c,blend:v,dispose:0})}if(r)for(let o=0;o<a.length;o++){const h=a[o];if(h.blend===1)continue;const l=h.rect,c=a[o-1].rect,f=Math.min(l.x,c.x),d=Math.min(l.y,c.y),u=Math.max(l.x+l.width,c.x+c.width),p=Math.max(l.y+l.height,c.y+c.height),v={x:f,y:d,width:u-f,height:p-d};a[o-1].dispose=1,o-1!==0&&vt.encode._updateFrame(n,t,e,a,o-1,v,i),vt.encode._updateFrame(n,t,e,a,o,v,i)}return a},vt.encode._updateFrame=function(n,t,e,r,i,s,a){const o=Uint8Array,h=Uint32Array,l=new o(n[i-1]),c=new h(n[i-1]),f=i+1<n.length?new o(n[i+1]):null,d=new o(n[i]),u=new h(d.buffer);let p=t,v=e,_=-1,S=-1;for(let m=0;m<s.height;m++)for(let k=0;k<s.width;k++){const F=s.x+k,P=s.y+m,N=P*t+F,R=u[N];R===0||r[i-1].dispose===0&&c[N]===R&&(f===null||f[N*4+3]!==0)||(F<p&&(p=F),F>_&&(_=F),P<v&&(v=P),P>S&&(S=P))}_===-1&&(p=v=_=S=0),a&&((p&1)===1&&p--,(v&1)===1&&v--),s={x:p,y:v,width:_-p+1,height:S-v+1};const x=r[i];x.rect=s,x.blend=1,x.img=new Uint8Array(s.width*s.height*4),r[i-1].dispose===0?(vt._copyTile(l,t,e,x.img,s.width,s.height,-s.x,-s.y,0),vt.encode._prepareDiff(d,t,e,x.img,s)):vt._copyTile(d,t,e,x.img,s.width,s.height,-s.x,-s.y,0)},vt.encode._prepareDiff=function(n,t,e,r,i){vt._copyTile(n,t,e,r,i.width,i.height,-i.x,-i.y,2)},vt.encode._filterZero=function(n,t,e,r,i,s,a){const o=[];let h=[0,1,2,3,4];s!==-1?h=[s]:(t*r>5e5||e===1)&&(h=[0]);let l;a&&(l={level:0});const c=i.length>1e7&&Ig!=null?Ig:y9;for(let u=0;u<h.length;u++){for(let p=0;p<t;p++)vt.encode._filterLine(i,n,p,r,e,h[u]);o.push(c.deflate(i,l))}let f,d=1e9;for(let u=0;u<o.length;u++)o[u].length<d&&(f=u,d=o[u].length);return o[f]},vt.encode._filterLine=function(n,t,e,r,i,s){const a=e*r;let o=a+e;const h=vt.decode._paeth;if(n[o]=s,o++,s===0)if(r<500)for(let l=0;l<r;l++)n[o+l]=t[a+l];else n.set(new Uint8Array(t.buffer,a,r),o);else if(s===1){for(let l=0;l<i;l++)n[o+l]=t[a+l];for(let l=i;l<r;l++)n[o+l]=t[a+l]-t[a+l-i]+256&255}else if(e===0){for(let l=0;l<i;l++)n[o+l]=t[a+l];if(s===2)for(let l=i;l<r;l++)n[o+l]=t[a+l];if(s===3)for(let l=i;l<r;l++)n[o+l]=t[a+l]-(t[a+l-i]>>1)+256&255;if(s===4)for(let l=i;l<r;l++)n[o+l]=t[a+l]-h(t[a+l-i],0,0)+256&255}else{if(s===2)for(let l=0;l<r;l++)n[o+l]=t[a+l]+256-t[a+l-r]&255;if(s===3){for(let l=0;l<i;l++)n[o+l]=t[a+l]+256-(t[a+l-r]>>1)&255;for(let l=i;l<r;l++)n[o+l]=t[a+l]+256-(t[a+l-r]+t[a+l-i]>>1)&255}if(s===4){for(let l=0;l<i;l++)n[o+l]=t[a+l]+256-h(0,t[a+l-r],0)&255;for(let l=i;l<r;l++)n[o+l]=t[a+l]+256-h(t[a+l-i],t[a+l-r],t[a+l-i-r])&255}}},vt.crc={table:function(){const n=new Uint32Array(256);for(let t=0;t<256;t++){let e=t;for(let r=0;r<8;r++)e&1?e=3988292384^e>>>1:e=e>>>1;n[t]=e}return n}(),update:function(n,t,e,r){for(let i=0;i<r;i++)n=vt.crc.table[(n^t[e+i])&255]^n>>>8;return n},crc:function(n,t,e){return vt.crc.update(4294967295,n,t,e)^4294967295}},vt.quantize=function(n,t){const e=new Uint8Array(n),r=e.slice(0),i=new Uint32Array(r.buffer),s=vt.quantize.getKDtree(r,t),a=s[0],o=s[1],h=vt.quantize.planeDst,l=e,c=i,f=l.length,d=new Uint8Array(e.length>>2);let u;if(e.length<2e7)for(let p=0;p<f;p+=4){const v=l[p]*.00392156862745098,_=l[p+1]*(1/255),S=l[p+2]*(1/255),x=l[p+3]*(1/255);u=vt.quantize.getNearest(a,v,_,S,x),d[p>>2]=u.ind,c[p>>2]=u.est.rgba}else for(let p=0;p<f;p+=4){const v=l[p]*.00392156862745098,_=l[p+1]*(1/255),S=l[p+2]*(1/255),x=l[p+3]*(1/255);for(u=a;u.left;)u=h(u.est,v,_,S,x)<=0?u.left:u.right;d[p>>2]=u.ind,c[p>>2]=u.est.rgba}return{abuf:r.buffer,inds:d,plte:o}},vt.quantize.getKDtree=function(n,t,e){e===null&&(e=1e-4);const r=new Uint32Array(n.buffer),i={i0:0,i1:n.length,bst:null,est:null,tdst:0,left:null,right:null};i.bst=vt.quantize.stats(n,i.i0,i.i1),i.est=vt.quantize.estats(i.bst);const s=[i];for(;s.length<t;){let a=0,o=0;for(let d=0;d<s.length;d++)s[d].est.L>a&&(a=s[d].est.L,o=d);if(a<e)break;const h=s[o],l=vt.quantize.splitPixels(n,r,h.i0,h.i1,h.est.e,h.est.eMq255);if(h.i0>=l||h.i1<=l){h.est.L=0;continue}const c={i0:h.i0,i1:l,bst:null,est:null,tdst:0,left:null,right:null};c.bst=vt.quantize.stats(n,c.i0,c.i1),c.est=vt.quantize.estats(c.bst);const f={i0:l,i1:h.i1,bst:null,est:null,tdst:0,left:null,right:null};f.bst={R:[],m:[],N:h.bst.N-c.bst.N};for(let d=0;d<16;d++)f.bst.R[d]=h.bst.R[d]-c.bst.R[d];for(let d=0;d<4;d++)f.bst.m[d]=h.bst.m[d]-c.bst.m[d];f.est=vt.quantize.estats(f.bst),h.left=c,h.right=f,s[o]=c,s.push(f)}s.sort(function(a,o){return o.bst.N-a.bst.N});for(let a=0;a<s.length;a++)s[a].ind=a;return[i,s]},vt.quantize.getNearest=function(n,t,e,r,i){if(n.left==null)return n.tdst=vt.quantize.dist(n.est.q,t,e,r,i),n;const s=vt.quantize.planeDst(n.est,t,e,r,i);let a=n.left,o=n.right;s>0&&(a=n.right,o=n.left);const h=vt.quantize.getNearest(a,t,e,r,i);if(h.tdst<=s*s)return h;const l=vt.quantize.getNearest(o,t,e,r,i);return l.tdst<h.tdst?l:h},vt.quantize.planeDst=function(n,t,e,r,i){const s=n.e;return s[0]*t+s[1]*e+s[2]*r+s[3]*i-n.eMq},vt.quantize.dist=function(n,t,e,r,i){const s=t-n[0],a=e-n[1],o=r-n[2],h=i-n[3];return s*s+a*a+o*o+h*h},vt.quantize.splitPixels=function(n,t,e,r,i,s){const a=vt.quantize.vecDot;for(r-=4;e<r;){for(;a(n,e,i)<=s;)e+=4;for(;a(n,r,i)>s;)r-=4;if(e>=r)break;const o=t[e>>2];t[e>>2]=t[r>>2],t[r>>2]=o,e+=4,r-=4}for(;a(n,e,i)>s;)e-=4;return e+4},vt.quantize.vecDot=function(n,t,e){return n[t]*e[0]+n[t+1]*e[1]+n[t+2]*e[2]+n[t+3]*e[3]},vt.quantize.stats=function(n,t,e){const r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],i=[0,0,0,0],s=e-t>>2;for(let a=t;a<e;a+=4){const o=n[a]*.00392156862745098,h=n[a+1]*(1/255),l=n[a+2]*(1/255),c=n[a+3]*(1/255);i[0]+=o,i[1]+=h,i[2]+=l,i[3]+=c,r[0]+=o*o,r[1]+=o*h,r[2]+=o*l,r[3]+=o*c,r[5]+=h*h,r[6]+=h*l,r[7]+=h*c,r[10]+=l*l,r[11]+=l*c,r[15]+=c*c}return r[4]=r[1],r[8]=r[2],r[9]=r[6],r[12]=r[3],r[13]=r[7],r[14]=r[11],{R:r,m:i,N:s}},vt.quantize.estats=function(n){const t=n.R,e=n.m,r=n.N,i=e[0],s=e[1],a=e[2],o=e[3],h=r===0?0:1/r,l=[t[0]-i*i*h,t[1]-i*s*h,t[2]-i*a*h,t[3]-i*o*h,t[4]-s*i*h,t[5]-s*s*h,t[6]-s*a*h,t[7]-s*o*h,t[8]-a*i*h,t[9]-a*s*h,t[10]-a*a*h,t[11]-a*o*h,t[12]-o*i*h,t[13]-o*s*h,t[14]-o*a*h,t[15]-o*o*h],c=l,f=vt.M4;let d=[Math.random(),Math.random(),Math.random(),Math.random()],u=0,p=0;if(r!==0)for(let S=0;S<16&&(d=f.multVec(c,d),p=Math.sqrt(f.dot(d,d)),d=f.sml(1/p,d),!(S!==0&&Math.abs(p-u)<1e-9));S++)u=p;const v=[i*h,s*h,a*h,o*h],_=f.dot(f.sml(255,v),d);return{Cov:l,q:v,e:d,L:u,eMq255:_,eMq:f.dot(d,v),rgba:(Math.round(255*v[3])<<24|Math.round(255*v[2])<<16|Math.round(255*v[1])<<8|Math.round(255*v[0])<<0)>>>0}},vt.M4={multVec:function(n,t){return[n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]*t[3],n[4]*t[0]+n[5]*t[1]+n[6]*t[2]+n[7]*t[3],n[8]*t[0]+n[9]*t[1]+n[10]*t[2]+n[11]*t[3],n[12]*t[0]+n[13]*t[1]+n[14]*t[2]+n[15]*t[3]]},dot:function(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]*t[3]},sml:function(n,t){return[n*t[0],n*t[1],n*t[2],n*t[3]]}},vt.encode.concatRGBA=function(n){let t=0;for(let i=0;i<n.length;i++)t+=n[i].byteLength;const e=new Uint8Array(t);let r=0;for(let i=0;i<n.length;i++){const s=new Uint8Array(n[i]),a=s.length;for(let o=0;o<a;o+=4){let h=s[o],l=s[o+1],c=s[o+2];const f=s[o+3];f===0&&(h=l=c=0),e[r+o]=h,e[r+o+1]=l,e[r+o+2]=c,e[r+o+3]=f}r+=a}return e.buffer};const fr={glog:function(n){if(n<1)throw new Error("glog("+n+")");return fr.LOG_TABLE[n]},gexp:function(n){for(;n<0;)n+=255;for(;n>=256;)n-=255;return fr.EXP_TABLE[n]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)};for(let n=0;n<8;n++)fr.EXP_TABLE[n]=1<<n;for(let n=8;n<256;n++)fr.EXP_TABLE[n]=fr.EXP_TABLE[n-4]^fr.EXP_TABLE[n-5]^fr.EXP_TABLE[n-6]^fr.EXP_TABLE[n-8];for(let n=0;n<255;n++)fr.LOG_TABLE[fr.EXP_TABLE[n]]=n;let ma;typeof self>"u"&&typeof process<"u"&&process.hrtime?ma=function(){const n=process.hrtime();return n[0]*1e3+n[1]/1e6}:typeof self<"u"&&self.performance!==void 0&&self.performance.now!==void 0?ma=self.performance.now.bind(self.performance):Date.now!==void 0?ma=Date.now:ma=function(){return new Date().getTime()};const v9=ma;let _9=class{constructor(){Tt(this,"_tweens",{});Tt(this,"_tweensAddedDuringUpdate",{})}getAll(){return Object.keys(this._tweens).map(n=>this._tweens[n])}removeAll(){this._tweens={}}add(n){this._tweens[n.getId()]=n,this._tweensAddedDuringUpdate[n.getId()]=n}remove(n){delete this._tweens[n.getId()],delete this._tweensAddedDuringUpdate[n.getId()]}update(n=v9(),t=!1){let e=Object.keys(this._tweens);if(e.length===0)return!1;for(;e.length>0;){this._tweensAddedDuringUpdate={};for(let r=0;r<e.length;r++){const i=this._tweens[e[r]],s=!t;i&&i.update(n,s)===!1&&!t&&delete this._tweens[e[r]]}e=Object.keys(this._tweensAddedDuringUpdate)}return!0}};const pr=new _9;pr.getAll.bind(pr),pr.removeAll.bind(pr),pr.add.bind(pr),pr.remove.bind(pr),pr.update.bind(pr);var s1=null;if(navigator.mozGetUserMedia)window.webrtcDetectedBrowser="firefox",window.webrtcDetectedVersion=parseInt(navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1],10),RTCSessionDescription=mozRTCSessionDescription,RTCIceCandidate=mozRTCIceCandidate,window.getUserMedia=navigator.mozGetUserMedia.bind(navigator),navigator.getUserMedia=s1,window.createIceServer=function(n,t,e){var r=null,i=n.split(":");if(i[0].indexOf("stun")===0)r={url:n};else if(i[0].indexOf("turn")===0){var s=n.split("?");(s.length===1||s[1].indexOf("transport=udp")===0)&&(r={url:s[0],credential:e,username:t})}return r},window.createIceServers=function(n,t,e){for(var r=[],i=0;i<n.length;i++){var s=createIceServer(n[i],t,e);s!==null&&r.push(s)}return r},window.attachMediaStream=function(n,t){n.mozSrcObject=t,n.play()},window.reattachMediaStream=function(n,t){n.mozSrcObject=t.mozSrcObject,n.play()};else if(navigator.webkitGetUserMedia){window.webrtcDetectedBrowser="chrome";var a1=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);a1!==null?window.webrtcDetectedVersion=parseInt(a1[2],10):window.webrtcDetectedVersion=999,window.createIceServer=function(n,t,e){var r=null,i=n.split(":");return i[0].indexOf("stun")===0?r={url:n}:i[0].indexOf("turn")===0&&(r={url:n,credential:e,username:t}),r},window.createIceServers=function(n,t,e){for(var r=[],i=0;i<n.length;i++){var s=createIceServer(n[i],t,e);s!==null&&r.push(s)}return r},window.getUserMedia=navigator.webkitGetUserMedia.bind(navigator),navigator.getUserMedia=s1,window.attachMediaStream=function(n,t){typeof n.srcObject<"u"?n.srcObject=t:typeof n.mozSrcObject<"u"?n.mozSrcObject=t:typeof n.src<"u"&&(n.src=URL.createObjectURL(t))},window.reattachMediaStream=function(n,t){n.src=t.src}}var Du={exports:{}},ya={},Mu={},Iu={};(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n._registerNode=n.Konva=n.glob=void 0;const t=Math.PI/180;function e(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}n.glob=typeof Kc<"u"?Kc:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},n.Konva={_global:n.glob,version:"9.2.2",isBrowser:e(),isUnminified:/param/.test((function(i){}).toString()),dblClickWindow:400,getAngle(i){return n.Konva.angleDeg?i*t:i},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,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return n.Konva.DD.isDragging},isDragReady(){return!!n.Konva.DD.node},releaseCanvasOnDestroy:!0,document:n.glob.document,_injectGlobal(i){n.glob.Konva=i}};const r=i=>{n.Konva[i.prototype.getClassName()]=i};n._registerNode=r,n.Konva._injectGlobal(n.Konva)})(Iu);const w9=Tn(Iu),x9=Rt({__proto__:null,default:w9},[Iu]),te=Dt(x9);var ju={};(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.Util=n.Transform=void 0;const t=te;class e{constructor(k=[1,0,0,1,0,0]){this.dirty=!1,this.m=k&&k.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 e(this.m)}copyInto(k){k.m[0]=this.m[0],k.m[1]=this.m[1],k.m[2]=this.m[2],k.m[3]=this.m[3],k.m[4]=this.m[4],k.m[5]=this.m[5]}point(k){var F=this.m;return{x:F[0]*k.x+F[2]*k.y+F[4],y:F[1]*k.x+F[3]*k.y+F[5]}}translate(k,F){return this.m[4]+=this.m[0]*k+this.m[2]*F,this.m[5]+=this.m[1]*k+this.m[3]*F,this}scale(k,F){return this.m[0]*=k,this.m[1]*=k,this.m[2]*=F,this.m[3]*=F,this}rotate(k){var F=Math.cos(k),P=Math.sin(k),N=this.m[0]*F+this.m[2]*P,R=this.m[1]*F+this.m[3]*P,L=this.m[0]*-P+this.m[2]*F,U=this.m[1]*-P+this.m[3]*F;return this.m[0]=N,this.m[1]=R,this.m[2]=L,this.m[3]=U,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(k,F){var P=this.m[0]+this.m[2]*F,N=this.m[1]+this.m[3]*F,R=this.m[2]+this.m[0]*k,L=this.m[3]+this.m[1]*k;return this.m[0]=P,this.m[1]=N,this.m[2]=R,this.m[3]=L,this}multiply(k){var F=this.m[0]*k.m[0]+this.m[2]*k.m[1],P=this.m[1]*k.m[0]+this.m[3]*k.m[1],N=this.m[0]*k.m[2]+this.m[2]*k.m[3],R=this.m[1]*k.m[2]+this.m[3]*k.m[3],L=this.m[0]*k.m[4]+this.m[2]*k.m[5]+this.m[4],U=this.m[1]*k.m[4]+this.m[3]*k.m[5]+this.m[5];return this.m[0]=F,this.m[1]=P,this.m[2]=N,this.m[3]=R,this.m[4]=L,this.m[5]=U,this}invert(){var k=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),F=this.m[3]*k,P=-this.m[1]*k,N=-this.m[2]*k,R=this.m[0]*k,L=k*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),U=k*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=F,this.m[1]=P,this.m[2]=N,this.m[3]=R,this.m[4]=L,this.m[5]=U,this}getMatrix(){return this.m}decompose(){var k=this.m[0],F=this.m[1],P=this.m[2],N=this.m[3],R=this.m[4],L=this.m[5],U=k*N-F*P;let B={x:R,y:L,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(k!=0||F!=0){var K=Math.sqrt(k*k+F*F);B.rotation=F>0?Math.acos(k/K):-Math.acos(k/K),B.scaleX=K,B.scaleY=U/K,B.skewX=(k*P+F*N)/U,B.skewY=0}else if(P!=0||N!=0){var tt=Math.sqrt(P*P+N*N);B.rotation=Math.PI/2-(N>0?Math.acos(-P/tt):-Math.acos(P/tt)),B.scaleX=U/tt,B.scaleY=tt,B.skewX=0,B.skewY=(k*P+F*N)/U}return B.rotation=n.Util._getRotation(B.rotation),B}}n.Transform=e;var r="[object Array]",i="[object Number]",s="[object String]",a="[object Boolean]",o=Math.PI/180,h=180/Math.PI,l="#",c="",f="0",d="Konva warning: ",u="Konva error: ",p="rgb(",v={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]},_=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,S=[];const x=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(m){setTimeout(m,60)};n.Util={_isElement(m){return!!(m&&m.nodeType==1)},_isFunction(m){return!!(m&&m.constructor&&m.call&&m.apply)},_isPlainObject(m){return!!m&&m.constructor===Object},_isArray(m){return Object.prototype.toString.call(m)===r},_isNumber(m){return Object.prototype.toString.call(m)===i&&!isNaN(m)&&isFinite(m)},_isString(m){return Object.prototype.toString.call(m)===s},_isBoolean(m){return Object.prototype.toString.call(m)===a},isObject(m){return m instanceof Object},isValidSelector(m){if(typeof m!="string")return!1;var k=m[0];return k==="#"||k==="."||k===k.toUpperCase()},_sign(m){return m===0||m>0?1:-1},requestAnimFrame(m){S.push(m),S.length===1&&x(function(){const k=S;S=[],k.forEach(function(F){F()})})},createCanvasElement(){var m=document.createElement("canvas");try{m.style=m.style||{}}catch{}return m},createImageElement(){return document.createElement("img")},_isInDocument(m){for(;m=m.parentNode;)if(m==document)return!0;return!1},_urlToImage(m,k){var F=n.Util.createImageElement();F.onload=function(){k(F)},F.src=m},_rgbToHex(m,k,F){return((1<<24)+(m<<16)+(k<<8)+F).toString(16).slice(1)},_hexToRgb(m){m=m.replace(l,c);var k=parseInt(m,16);return{r:k>>16&255,g:k>>8&255,b:k&255}},getRandomColor(){for(var m=(Math.random()*16777215<<0).toString(16);m.length<6;)m=f+m;return l+m},getRGB(m){var k;return m in v?(k=v[m],{r:k[0],g:k[1],b:k[2]}):m[0]===l?this._hexToRgb(m.substring(1)):m.substr(0,4)===p?(k=_.exec(m.replace(/ /g,"")),{r:parseInt(k[1],10),g:parseInt(k[2],10),b:parseInt(k[3],10)}):{r:0,g:0,b:0}},colorToRGBA(m){return m=m||"black",n.Util._namedColorToRBA(m)||n.Util._hex3ColorToRGBA(m)||n.Util._hex4ColorToRGBA(m)||n.Util._hex6ColorToRGBA(m)||n.Util._hex8ColorToRGBA(m)||n.Util._rgbColorToRGBA(m)||n.Util._rgbaColorToRGBA(m)||n.Util._hslColorToRGBA(m)},_namedColorToRBA(m){var k=v[m.toLowerCase()];return k?{r:k[0],g:k[1],b:k[2],a:1}:null},_rgbColorToRGBA(m){if(m.indexOf("rgb(")===0){m=m.match(/rgb\(([^)]+)\)/)[1];var k=m.split(/ *, */).map(Number);return{r:k[0],g:k[1],b:k[2],a:1}}},_rgbaColorToRGBA(m){if(m.indexOf("rgba(")===0){m=m.match(/rgba\(([^)]+)\)/)[1];var k=m.split(/ *, */).map((F,P)=>F.slice(-1)==="%"?P===3?parseInt(F)/100:parseInt(F)/100*255:Number(F));return{r:k[0],g:k[1],b:k[2],a:k[3]}}},_hex8ColorToRGBA(m){if(m[0]==="#"&&m.length===9)return{r:parseInt(m.slice(1,3),16),g:parseInt(m.slice(3,5),16),b:parseInt(m.slice(5,7),16),a:parseInt(m.slice(7,9),16)/255}},_hex6ColorToRGBA(m){if(m[0]==="#"&&m.length===7)return{r:parseInt(m.slice(1,3),16),g:parseInt(m.slice(3,5),16),b:parseInt(m.slice(5,7),16),a:1}},_hex4ColorToRGBA(m){if(m[0]==="#"&&m.length===5)return{r:parseInt(m[1]+m[1],16),g:parseInt(m[2]+m[2],16),b:parseInt(m[3]+m[3],16),a:parseInt(m[4]+m[4],16)/255}},_hex3ColorToRGBA(m){if(m[0]==="#"&&m.length===4)return{r:parseInt(m[1]+m[1],16),g:parseInt(m[2]+m[2],16),b:parseInt(m[3]+m[3],16),a:1}},_hslColorToRGBA(m){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(m)){const[k,...F]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(m),P=Number(F[0])/360,N=Number(F[1])/100,R=Number(F[2])/100;let L,U,B;if(N===0)return B=R*255,{r:Math.round(B),g:Math.round(B),b:Math.round(B),a:1};R<.5?L=R*(1+N):L=R+N-R*N;const K=2*R-L,tt=[0,0,0];for(let W=0;W<3;W++)U=P+1/3*-(W-1),U<0&&U++,U>1&&U--,6*U<1?B=K+(L-K)*6*U:2*U<1?B=L:3*U<2?B=K+(L-K)*(2/3-U)*6:B=K,tt[W]=B*255;return{r:Math.round(tt[0]),g:Math.round(tt[1]),b:Math.round(tt[2]),a:1}}},haveIntersection(m,k){return!(k.x>m.x+m.width||k.x+k.width<m.x||k.y>m.y+m.height||k.y+k.height<m.y)},cloneObject(m){var k={};for(var F in m)this._isPlainObject(m[F])?k[F]=this.cloneObject(m[F]):this._isArray(m[F])?k[F]=this.cloneArray(m[F]):k[F]=m[F];return k},cloneArray(m){return m.slice(0)},degToRad(m){return m*o},radToDeg(m){return m*h},_degToRad(m){return n.Util.warn("Util._degToRad is removed. Please use public Util.degToRad instead."),n.Util.degToRad(m)},_radToDeg(m){return n.Util.warn("Util._radToDeg is removed. Please use public Util.radToDeg instead."),n.Util.radToDeg(m)},_getRotation(m){return t.Konva.angleDeg?n.Util.radToDeg(m):m},_capitalize(m){return m.charAt(0).toUpperCase()+m.slice(1)},throw(m){throw new Error(u+m)},error(m){console.error(u+m)},warn(m){t.Konva.showWarnings&&console.warn(d+m)},each(m,k){for(var F in m)k(F,m[F])},_inRange(m,k,F){return k<=m&&m<F},_getProjectionToSegment(m,k,F,P,N,R){var L,U,B,K=(m-F)*(m-F)+(k-P)*(k-P);if(K==0)L=m,U=k,B=(N-F)*(N-F)+(R-P)*(R-P);else{var tt=((N-m)*(F-m)+(R-k)*(P-k))/K;tt<0?(L=m,U=k,B=(m-N)*(m-N)+(k-R)*(k-R)):tt>1?(L=F,U=P,B=(F-N)*(F-N)+(P-R)*(P-R)):(L=m+tt*(F-m),U=k+tt*(P-k),B=(L-N)*(L-N)+(U-R)*(U-R))}return[L,U,B]},_getProjectionToLine(m,k,F){var P=n.Util.cloneObject(m),N=Number.MAX_VALUE;return k.forEach(function(R,L){if(!(!F&&L===k.length-1)){var U=k[(L+1)%k.length],B=n.Util._getProjectionToSegment(R.x,R.y,U.x,U.y,m.x,m.y),K=B[0],tt=B[1],W=B[2];W<N&&(P.x=K,P.y=tt,N=W)}}),P},_prepareArrayForTween(m,k,F){var P,N=[],R=[];if(m.length>k.length){var L=k;k=m,m=L}for(P=0;P<m.length;P+=2)N.push({x:m[P],y:m[P+1]});for(P=0;P<k.length;P+=2)R.push({x:k[P],y:k[P+1]});var U=[];return R.forEach(function(B){var K=n.Util._getProjectionToLine(B,N,F);U.push(K.x),U.push(K.y)}),U},_prepareToStringify(m){var k;m.visitedByCircularReferenceRemoval=!0;for(var F in m)if(m.hasOwnProperty(F)&&m[F]&&typeof m[F]=="object"){if(k=Object.getOwnPropertyDescriptor(m,F),m[F].visitedByCircularReferenceRemoval||n.Util._isElement(m[F]))if(k.configurable)delete m[F];else return null;else if(n.Util._prepareToStringify(m[F])===null)if(k.configurable)delete m[F];else return null}return delete m.visitedByCircularReferenceRemoval,m},_assign(m,k){for(var F in k)m[F]=k[F];return m},_getFirstPointerId(m){return m.touches?m.changedTouches[0].identifier:m.pointerId||999},releaseCanvas(...m){t.Konva.releaseCanvasOnDestroy&&m.forEach(k=>{k.width=0,k.height=0})},drawRoundedRectPath(m,k,F,P){let N=0,R=0,L=0,U=0;typeof P=="number"?N=R=L=U=Math.min(P,k/2,F/2):(N=Math.min(P[0]||0,k/2,F/2),R=Math.min(P[1]||0,k/2,F/2),U=Math.min(P[2]||0,k/2,F/2),L=Math.min(P[3]||0,k/2,F/2)),m.moveTo(N,0),m.lineTo(k-R,0),m.arc(k-R,R,R,Math.PI*3/2,0,!1),m.lineTo(k,F-U),m.arc(k-U,F-U,U,0,Math.PI/2,!1),m.lineTo(L,F),m.arc(L,F-L,L,Math.PI/2,Math.PI,!1),m.lineTo(0,N),m.arc(N,N,N,Math.PI,Math.PI*3/2,!1)}}})(ju);const b9=Tn(ju),S9=Rt({__proto__:null,default:b9},[ju]),Ae=Dt(S9);var va={},Lu={},Se={};Object.defineProperty(Se,"__esModule",{value:!0});var o1=Se.getComponentValidator=y1=Se.getBooleanValidator=m1=Se.getNumberArrayValidator=g1=Se.getFunctionValidator=p1=Se.getStringOrGradientValidator=f1=Se.getStringValidator=d1=Se.getNumberOrAutoValidator=u1=Se.getNumberOrArrayOfNumbersValidator=c1=Se.getNumberValidator=h1=Se.alphaComponent=l1=Se.RGBComponent=void 0;const $r=te,Oe=Ae;function Fr(n){return Oe.Util._isString(n)?'"'+n+'"':Object.prototype.toString.call(n)==="[object Number]"||Oe.Util._isBoolean(n)?n:Object.prototype.toString.call(n)}function k9(n){return n>255?255:n<0?0:Math.round(n)}var l1=Se.RGBComponent=k9;function C9(n){return n>1?1:n<1e-4?1e-4:n}var h1=Se.alphaComponent=C9;function T9(){if($r.Konva.isUnminified)return function(n,t){return Oe.Util._isNumber(n)||Oe.Util.warn(Fr(n)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),n}}var c1=Se.getNumberValidator=T9;function P9(n){if($r.Konva.isUnminified)return function(t,e){let r=Oe.Util._isNumber(t),i=Oe.Util._isArray(t)&&t.length==n;return!r&&!i&&Oe.Util.warn(Fr(t)+' is a not valid value for "'+e+'" attribute. The value should be a number or Array<number>('+n+")"),t}}var u1=Se.getNumberOrArrayOfNumbersValidator=P9;function E9(){if($r.Konva.isUnminified)return function(n,t){var e=Oe.Util._isNumber(n),r=n==="auto";return e||r||Oe.Util.warn(Fr(n)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),n}}var d1=Se.getNumberOrAutoValidator=E9;function A9(){if($r.Konva.isUnminified)return function(n,t){return Oe.Util._isString(n)||Oe.Util.warn(Fr(n)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),n}}var f1=Se.getStringValidator=A9;function O9(){if($r.Konva.isUnminified)return function(n,t){const e=Oe.Util._isString(n),r=Object.prototype.toString.call(n)==="[object CanvasGradient]"||n&&n.addColorStop;return e||r||Oe.Util.warn(Fr(n)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),n}}var p1=Se.getStringOrGradientValidator=O9;function $9(){if($r.Konva.isUnminified)return function(n,t){return Oe.Util._isFunction(n)||Oe.Util.warn(Fr(n)+' is a not valid value for "'+t+'" attribute. The value should be a function.'),n}}var g1=Se.getFunctionValidator=$9;function F9(){if($r.Konva.isUnminified)return function(n,t){const e=Int8Array?Object.getPrototypeOf(Int8Array):null;return e&&n instanceof e||(Oe.Util._isArray(n)?n.forEach(function(r){Oe.Util._isNumber(r)||Oe.Util.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):Oe.Util.warn(Fr(n)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),n}}var m1=Se.getNumberArrayValidator=F9;function N9(){if($r.Konva.isUnminified)return function(n,t){var e=n===!0||n===!1;return e||Oe.Util.warn(Fr(n)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),n}}var y1=Se.getBooleanValidator=N9;function R9(n){if($r.Konva.isUnminified)return function(t,e){return t==null||Oe.Util.isObject(t)||Oe.Util.warn(Fr(t)+' is a not valid value for "'+e+'" attribute. The value should be an object with properties '+n),t}}o1=Se.getComponentValidator=R9;const D9=Rt({__proto__:null,get RGBComponent(){return l1},get alphaComponent(){return h1},default:Se,get getBooleanValidator(){return y1},get getComponentValidator(){return o1},get getFunctionValidator(){return g1},get getNumberArrayValidator(){return m1},get getNumberOrArrayOfNumbersValidator(){return u1},get getNumberOrAutoValidator(){return d1},get getNumberValidator(){return c1},get getStringOrGradientValidator(){return p1},get getStringValidator(){return f1}},[Se]),ee=Dt(D9);(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.Factory=void 0;const t=Ae,e=ee;var r="get",i="set";n.Factory={addGetterSetter(s,a,o,h,l){n.Factory.addGetter(s,a,o),n.Factory.addSetter(s,a,h,l),n.Factory.addOverloadedGetterSetter(s,a)},addGetter(s,a,o){var h=r+t.Util._capitalize(a);s.prototype[h]=s.prototype[h]||function(){var l=this.attrs[a];return l===void 0?o:l}},addSetter(s,a,o,h){var l=i+t.Util._capitalize(a);s.prototype[l]||n.Factory.overWriteSetter(s,a,o,h)},overWriteSetter(s,a,o,h){var l=i+t.Util._capitalize(a);s.prototype[l]=function(c){return o&&c!==void 0&&c!==null&&(c=o.call(this,c,a)),this._setAttr(a,c),h&&h.call(this),this}},addComponentsGetterSetter(s,a,o,h,l){var c=o.length,f=t.Util._capitalize,d=r+f(a),u=i+f(a),p,v;s.prototype[d]=function(){var S={};for(p=0;p<c;p++)v=o[p],S[v]=this.getAttr(a+f(v));return S};var _=(0,e.getComponentValidator)(o);s.prototype[u]=function(S){var x=this.attrs[a],m;h&&(S=h.call(this,S)),_&&_.call(this,S,a);for(m in S)S.hasOwnProperty(m)&&this._setAttr(a+f(m),S[m]);return S||o.forEach(k=>{this._setAttr(a+f(k),void 0)}),this._fireChangeEvent(a,x,S),l&&l.call(this),this},n.Factory.addOverloadedGetterSetter(s,a)},addOverloadedGetterSetter(s,a){var o=t.Util._capitalize(a),h=i+o,l=r+o;s.prototype[a]=function(){return arguments.length?(this[h](arguments[0]),this):this[l]()}},addDeprecatedGetterSetter(s,a,o,h){t.Util.error("Adding deprecated "+a);var l=r+t.Util._capitalize(a),c=a+" property is deprecated and will be removed soon. Look at Konva change log for more information.";s.prototype[l]=function(){t.Util.error(c);var f=this.attrs[a];return f===void 0?o:f},n.Factory.addSetter(s,a,h,function(){t.Util.error(c)}),n.Factory.addOverloadedGetterSetter(s,a)},backCompat(s,a){t.Util.each(a,function(o,h){var l=s.prototype[h],c=r+t.Util._capitalize(o),f=i+t.Util._capitalize(o);function d(){l.apply(this,arguments),t.Util.error('"'+o+'" method is deprecated and will be removed soon. Use ""'+h+'" instead.')}s.prototype[o]=d,s.prototype[c]=d,s.prototype[f]=d})},afterSetFilter(){this._filterUpToDate=!1}}})(Lu);const M9=Tn(Lu),I9=Rt({__proto__:null,default:M9},[Lu]),Wt=Dt(I9);var Nr={},Rr={};Object.defineProperty(Rr,"__esModule",{value:!0});var v1=Rr.HitContext=S1=Rr.SceneContext=b1=Rr.Context=void 0;const _1=Ae,j9=te;function L9(n){var t=[],e=n.length,r=_1.Util,i,s;for(i=0;i<e;i++)s=n[i],r._isNumber(s)?s=Math.round(s*1e3)/1e3:r._isString(s)||(s=s+""),t.push(s);return t}var w1=",",U9="(",G9=")",z9="([",V9="])",B9=";",H9="()",q9="=",x1=["arc","arcTo","beginPath","bezierCurveTo","clearRect","clip","closePath","createLinearGradient","createPattern","createRadialGradient","drawImage","ellipse","fill","fillText","getImageData","createImageData","lineTo","moveTo","putImageData","quadraticCurveTo","rect","restore","rotate","save","scale","setLineDash","setTransform","stroke","strokeText","transform","translate"],K9=["fillStyle","strokeStyle","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","letterSpacing","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","direction","font","textAlign","textBaseline","globalAlpha","globalCompositeOperation","imageSmoothingEnabled"];const Y9=100;class yl{constructor(t){this.canvas=t,j9.Konva.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,e){var r=this.traceArr,i=r.length,s="",a,o,h,l;for(a=0;a<i;a++)o=r[a],h=o.method,h?(l=o.args,s+=h,t?s+=H9:_1.Util._isArray(l[0])?s+=z9+l.join(w1)+V9:(e&&(l=l.map(c=>typeof c=="number"?Math.floor(c):c)),s+=U9+l.join(w1)+G9)):(s+=o.property,t||(s+=q9+o.val)),s+=B9;return s}clearTrace(){this.traceArr=[]}_trace(t){var e=this.traceArr,r;e.push(t),r=e.length,r>=Y9&&e.shift()}reset(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){var e=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,e.getWidth()/e.pixelRatio,e.getHeight()/e.pixelRatio)}_applyLineCap(t){const e=t.attrs.lineCap;e&&this.setAttr("lineCap",e)}_applyOpacity(t){var e=t.getAbsoluteOpacity();e!==1&&this.setAttr("globalAlpha",e)}_applyLineJoin(t){const e=t.attrs.lineJoin;e&&this.setAttr("lineJoin",e)}setAttr(t,e){this._context[t]=e}arc(t,e,r,i,s,a){this._context.arc(t,e,r,i,s,a)}arcTo(t,e,r,i,s){this._context.arcTo(t,e,r,i,s)}beginPath(){this._context.beginPath()}bezierCurveTo(t,e,r,i,s,a){this._context.bezierCurveTo(t,e,r,i,s,a)}clearRect(t,e,r,i){this._context.clearRect(t,e,r,i)}clip(...t){this._context.clip.apply(this._context,t)}closePath(){this._context.closePath()}createImageData(t,e){var r=arguments;if(r.length===2)return this._context.createImageData(t,e);if(r.length===1)return this._context.createImageData(t)}createLinearGradient(t,e,r,i){return this._context.createLinearGradient(t,e,r,i)}createPattern(t,e){return this._context.createPattern(t,e)}createRadialGradient(t,e,r,i,s,a){return this._context.createRadialGradient(t,e,r,i,s,a)}drawImage(t,e,r,i,s,a,o,h,l){var c=arguments,f=this._context;c.length===3?f.drawImage(t,e,r):c.length===5?f.drawImage(t,e,r,i,s):c.length===9&&f.drawImage(t,e,r,i,s,a,o,h,l)}ellipse(t,e,r,i,s,a,o,h){this._context.ellipse(t,e,r,i,s,a,o,h)}isPointInPath(t,e,r,i){return r?this._context.isPointInPath(r,t,e,i):this._context.isPointInPath(t,e,i)}fill(...t){this._context.fill.apply(this._context,t)}fillRect(t,e,r,i){this._context.fillRect(t,e,r,i)}strokeRect(t,e,r,i){this._context.strokeRect(t,e,r,i)}fillText(t,e,r,i){i?this._context.fillText(t,e,r,i):this._context.fillText(t,e,r)}measureText(t){return this._context.measureText(t)}getImageData(t,e,r,i){return this._context.getImageData(t,e,r,i)}lineTo(t,e){this._context.lineTo(t,e)}moveTo(t,e){this._context.moveTo(t,e)}rect(t,e,r,i){this._context.rect(t,e,r,i)}putImageData(t,e,r){this._context.putImageData(t,e,r)}quadraticCurveTo(t,e,r,i){this._context.quadraticCurveTo(t,e,r,i)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,e){this._context.scale(t,e)}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,e,r,i,s,a){this._context.setTransform(t,e,r,i,s,a)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,e,r,i){this._context.strokeText(t,e,r,i)}transform(t,e,r,i,s,a){this._context.transform(t,e,r,i,s,a)}translate(t,e){this._context.translate(t,e)}_enableTrace(){var t=this,e=x1.length,r=this.setAttr,i,s,a=function(o){var h=t[o],l;t[o]=function(){return s=L9(Array.prototype.slice.call(arguments,0)),l=h.apply(t,arguments),t._trace({method:o,args:s}),l}};for(i=0;i<e;i++)a(x1[i]);t.setAttr=function(){r.apply(t,arguments);var o=arguments[0],h=arguments[1];(o==="shadowOffsetX"||o==="shadowOffsetY"||o==="shadowBlur")&&(h=h/this.canvas.getPixelRatio()),t._trace({property:o,val:h})}}_applyGlobalCompositeOperation(t){const e=t.attrs.globalCompositeOperation;var r=!e||e==="source-over";r||this.setAttr("globalCompositeOperation",e)}}var b1=Rr.Context=yl;K9.forEach(function(n){Object.defineProperty(yl.prototype,n,{get(){return this._context[n]},set(t){this._context[n]=t}})});class X9 extends yl{constructor(t,{willReadFrequently:e=!1}={}){super(t),this._context=t._canvas.getContext("2d",{willReadFrequently:e})}_fillColor(t){var e=t.fill();this.setAttr("fillStyle",e),t._fillFunc(this)}_fillPattern(t){this.setAttr("fillStyle",t._getFillPattern()),t._fillFunc(this)}_fillLinearGradient(t){var e=t._getLinearGradient();e&&(this.setAttr("fillStyle",e),t._fillFunc(this))}_fillRadialGradient(t){const e=t._getRadialGradient();e&&(this.setAttr("fillStyle",e),t._fillFunc(this))}_fill(t){const e=t.fill(),r=t.getFillPriority();if(e&&r==="color"){this._fillColor(t);return}const i=t.getFillPatternImage();if(i&&r==="pattern"){this._fillPattern(t);return}const s=t.getFillLinearGradientColorStops();if(s&&r==="linear-gradient"){this._fillLinearGradient(t);return}const a=t.getFillRadialGradientColorStops();if(a&&r==="radial-gradient"){this._fillRadialGradient(t);return}e?this._fillColor(t):i?this._fillPattern(t):s?this._fillLinearGradient(t):a&&this._fillRadialGradient(t)}_strokeLinearGradient(t){const e=t.getStrokeLinearGradientStartPoint(),r=t.getStrokeLinearGradientEndPoint(),i=t.getStrokeLinearGradientColorStops(),s=this.createLinearGradient(e.x,e.y,r.x,r.y);if(i){for(var a=0;a<i.length;a+=2)s.addColorStop(i[a],i[a+1]);this.setAttr("strokeStyle",s)}}_stroke(t){var e=t.dash(),r=t.getStrokeScaleEnabled();if(t.hasStroke()){if(!r){this.save();var i=this.getCanvas().getPixelRatio();this.setTransform(i,0,0,i,0,0)}this._applyLineCap(t),e&&t.dashEnabled()&&(this.setLineDash(e),this.setAttr("lineDashOffset",t.dashOffset())),this.setAttr("lineWidth",t.strokeWidth()),t.getShadowForStrokeEnabled()||this.setAttr("shadowColor","rgba(0,0,0,0)");var s=t.getStrokeLinearGradientColorStops();s?this._strokeLinearGradient(t):this.setAttr("strokeStyle",t.stroke()),t._strokeFunc(this),r||this.restore()}}_applyShadow(t){var e,r,i,s=(e=t.getShadowRGBA())!==null&&e!==void 0?e:"black",a=(r=t.getShadowBlur())!==null&&r!==void 0?r:5,o=(i=t.getShadowOffset())!==null&&i!==void 0?i:{x:0,y:0},h=t.getAbsoluteScale(),l=this.canvas.getPixelRatio(),c=h.x*l,f=h.y*l;this.setAttr("shadowColor",s),this.setAttr("shadowBlur",a*Math.min(Math.abs(c),Math.abs(f))),this.setAttr("shadowOffsetX",o.x*c),this.setAttr("shadowOffsetY",o.y*f)}}var S1=Rr.SceneContext=X9;class J9 extends yl{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 s=t.getStrokeScaleEnabled();if(!s){this.save();var e=this.getCanvas().getPixelRatio();this.setTransform(e,0,0,e,0,0)}this._applyLineCap(t);var r=t.hitStrokeWidth(),i=r==="auto"?t.strokeWidth():r;this.setAttr("lineWidth",i),this.setAttr("strokeStyle",t.colorKey),t._strokeFuncHit(this),s||this.restore()}}}v1=Rr.HitContext=J9;const Q9=Rt({__proto__:null,get Context(){return b1},get HitContext(){return v1},get SceneContext(){return S1},default:Rr},[Rr]),k1=Dt(Q9);Object.defineProperty(Nr,"__esModule",{value:!0});var C1=Nr.HitCanvas=A1=Nr.SceneCanvas=E1=Nr.Canvas=void 0;const vl=Ae,T1=k1,P1=te,Z9=Wt,W9=ee;var _l;function t7(){if(_l)return _l;var n=vl.Util.createCanvasElement(),t=n.getContext("2d");return _l=function(){var e=P1.Konva._global.devicePixelRatio||1,r=t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return e/r}(),vl.Util.releaseCanvas(n),_l}class wl{constructor(t){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;var e=t||{},r=e.pixelRatio||P1.Konva.pixelRatio||t7();this.pixelRatio=r,this._canvas=vl.Util.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){var e=this.pixelRatio;this.pixelRatio=t,this.setSize(this.getWidth()/e,this.getHeight()/e)}setWidth(t){this.width=this._canvas.width=t*this.pixelRatio,this._canvas.style.width=t+"px";var e=this.pixelRatio,r=this.getContext()._context;r.scale(e,e)}setHeight(t){this.height=this._canvas.height=t*this.pixelRatio,this._canvas.style.height=t+"px";var e=this.pixelRatio,r=this.getContext()._context;r.scale(e,e)}getWidth(){return this.width}getHeight(){return this.height}setSize(t,e){this.setWidth(t||0),this.setHeight(e||0)}toDataURL(t,e){try{return this._canvas.toDataURL(t,e)}catch{try{return this._canvas.toDataURL()}catch(r){return vl.Util.error("Unable to get data URL. "+r.message+" For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html."),""}}}}var E1=Nr.Canvas=wl;Z9.Factory.addGetterSetter(wl,"pixelRatio",void 0,(0,W9.getNumberValidator)());class e7 extends wl{constructor(t={width:0,height:0,willReadFrequently:!1}){super(t),this.context=new T1.SceneContext(this,{willReadFrequently:t.willReadFrequently}),this.setSize(t.width,t.height)}}var A1=Nr.SceneCanvas=e7;class n7 extends wl{constructor(t={width:0,height:0}){super(t),this.hitCanvas=!0,this.context=new T1.HitContext(this),this.setSize(t.width,t.height)}}C1=Nr.HitCanvas=n7;const r7=Rt({__proto__:null,get Canvas(){return E1},get HitCanvas(){return C1},get SceneCanvas(){return A1},default:Nr},[Nr]),xl=Dt(r7);var Uu={};(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.DD=void 0;const t=te,e=Ae;n.DD={get isDragging(){var r=!1;return n.DD._dragElements.forEach(i=>{i.dragStatus==="dragging"&&(r=!0)}),r},justDragged:!1,get node(){var r;return n.DD._dragElements.forEach(i=>{r=i.node}),r},_dragElements:new Map,_drag(r){const i=[];n.DD._dragElements.forEach((s,a)=>{const{node:o}=s,h=o.getStage();h.setPointersPositions(r),s.pointerId===void 0&&(s.pointerId=e.Util._getFirstPointerId(r));const l=h._changedPointerPositions.find(d=>d.id===s.pointerId);if(l){if(s.dragStatus!=="dragging"){var c=o.dragDistance(),f=Math.max(Math.abs(l.x-s.startPointerPos.x),Math.abs(l.y-s.startPointerPos.y));if(f<c||(o.startDrag({evt:r}),!o.isDragging()))return}o._setDragPosition(r,s),i.push(o)}}),i.forEach(s=>{s.fire("dragmove",{type:"dragmove",target:s,evt:r},!0)})},_endDragBefore(r){const i=[];n.DD._dragElements.forEach(s=>{const{node:a}=s,o=a.getStage();if(r&&o.setPointersPositions(r),!o._changedPointerPositions.find(l=>l.id===s.pointerId))return;(s.dragStatus==="dragging"||s.dragStatus==="stopped")&&(n.DD.justDragged=!0,t.Konva._mouseListenClick=!1,t.Konva._touchListenClick=!1,t.Konva._pointerListenClick=!1,s.dragStatus="stopped");const h=s.node.getLayer()||s.node instanceof t.Konva.Stage&&s.node;h&&i.indexOf(h)===-1&&i.push(h)}),i.forEach(s=>{s.draw()})},_endDragAfter(r){n.DD._dragElements.forEach((i,s)=>{i.dragStatus==="stopped"&&i.node.fire("dragend",{type:"dragend",target:i.node,evt:r},!0),i.dragStatus!=="dragging"&&n.DD._dragElements.delete(s)})}},t.Konva.isBrowser&&(window.addEventListener("mouseup",n.DD._endDragBefore,!0),window.addEventListener("touchend",n.DD._endDragBefore,!0),window.addEventListener("mousemove",n.DD._drag),window.addEventListener("touchmove",n.DD._drag),window.addEventListener("mouseup",n.DD._endDragAfter,!1),window.addEventListener("touchend",n.DD._endDragAfter,!1))})(Uu);const i7=Tn(Uu),s7=Rt({__proto__:null,default:i7},[Uu]),Gu=Dt(s7);Object.defineProperty(va,"__esModule",{value:!0});var O1=va.Node=void 0;const ne=Ae,_a=Wt,bl=xl,Fi=te,In=Gu,Ie=ee;var Sl="absoluteOpacity",kl="allEventListeners",Dr="absoluteTransform",$1="absoluteScale",Ni="canvas",a7="Change",o7="children",l7="konva",zu="listening",F1="mouseenter",N1="mouseleave",R1="set",D1="Shape",Cl=" ",M1="stage",ni="transform",h7="Stage",Vu="visible",c7=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(Cl);let u7=1,Xt=class Ed{constructor(t){this._id=u7++,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===Dr)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,e){var r=this._cache.get(t),i=t===ni||t===Dr,s=r===void 0||i&&r.dirty===!0;return s&&(r=e.call(this),this._cache.set(t,r)),r}_calculate(t,e,r){if(!this._attachedDepsListeners.get(t)){const i=e.map(s=>s+"Change.konva").join(Cl);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(Ni)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===Dr&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(Ni)){const{scene:t,filter:e,hit:r}=this._cache.get(Ni);ne.Util.releaseCanvas(t,e,r),this._cache.delete(Ni)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var e=t||{},r={};(e.x===void 0||e.y===void 0||e.width===void 0||e.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()||void 0}));var i=Math.ceil(e.width||r.width),s=Math.ceil(e.height||r.height),a=e.pixelRatio,o=e.x===void 0?Math.floor(r.x):e.x,h=e.y===void 0?Math.floor(r.y):e.y,l=e.offset||0,c=e.drawBorder||!1,f=e.hitCanvasPixelRatio||1;if(!i||!s){ne.Util.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}i+=l*2+1,s+=l*2+1,o-=l,h-=l;var d=new bl.SceneCanvas({pixelRatio:a,width:i,height:s}),u=new bl.SceneCanvas({pixelRatio:a,width:0,height:0,willReadFrequently:!0}),p=new bl.HitCanvas({pixelRatio:f,width:i,height:s}),v=d.getContext(),_=p.getContext();return p.isCache=!0,d.isCache=!0,this._cache.delete(Ni),this._filterUpToDate=!1,e.imageSmoothingEnabled===!1&&(d.getContext()._context.imageSmoothingEnabled=!1,u.getContext()._context.imageSmoothingEnabled=!1),v.save(),_.save(),v.translate(-o,-h),_.translate(-o,-h),this._isUnderCache=!0,this._clearSelfAndDescendantCache(Sl),this._clearSelfAndDescendantCache($1),this.drawScene(d,this),this.drawHit(p,this),this._isUnderCache=!1,v.restore(),_.restore(),c&&(v.save(),v.beginPath(),v.rect(0,0,i,s),v.closePath(),v.setAttr("strokeStyle","red"),v.setAttr("lineWidth",5),v.stroke(),v.restore()),this._cache.set(Ni,{scene:d,filter:u,hit:p,x:o,y:h}),this._requestDraw(),this}isCached(){return this._cache.has(Ni)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,e){var r=[{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}],i=1/0,s=1/0,a=-1/0,o=-1/0,h=this.getAbsoluteTransform(e);return r.forEach(function(l){var c=h.point(l);i===void 0&&(i=a=c.x,s=o=c.y),i=Math.min(i,c.x),s=Math.min(s,c.y),a=Math.max(a,c.x),o=Math.max(o,c.y)}),{x:i,y:s,width:a-i,height:o-s}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const e=this._getCanvasCache();t.translate(e.x,e.y);var r=this._getCachedSceneCanvas(),i=r.pixelRatio;t.drawImage(r._canvas,0,0,r.width/i,r.height/i),t.restore()}_drawCachedHitCanvas(t){var e=this._getCanvasCache(),r=e.hit;t.save(),t.translate(e.x,e.y),t.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),t.restore()}_getCachedSceneCanvas(){var t=this.filters(),e=this._getCanvasCache(),r=e.scene,i=e.filter,s=i.getContext(),a,o,h,l;if(t){if(!this._filterUpToDate){var c=r.pixelRatio;i.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(a=t.length,s.clear(),s.drawImage(r._canvas,0,0,r.getWidth()/c,r.getHeight()/c),o=s.getImageData(0,0,i.getWidth(),i.getHeight()),h=0;h<a;h++){if(l=t[h],typeof l!="function"){ne.Util.error("Filter should be type of function, but got "+typeof l+" instead. Please check correct filters");continue}l.call(this,o),s.putImageData(o,0,0)}}catch(f){ne.Util.error("Unable to apply filter. "+f.message+" This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.")}this._filterUpToDate=!0}return i}return r}on(t,e){if(this._cache&&this._cache.delete(kl),arguments.length===3)return this._delegate.apply(this,arguments);var r=t.split(Cl),i=r.length,s,a,o,h,l;for(s=0;s<i;s++)a=r[s],o=a.split("."),h=o[0],l=o[1]||"",this.eventListeners[h]||(this.eventListeners[h]=[]),this.eventListeners[h].push({name:l,handler:e});return this}off(t,e){var r=(t||"").split(Cl),i=r.length,s,a,o,h,l,c;if(this._cache&&this._cache.delete(kl),!t)for(a in this.eventListeners)this._off(a);for(s=0;s<i;s++)if(o=r[s],h=o.split("."),l=h[0],c=h[1],l)this.eventListeners[l]&&this._off(l,c,e);else for(a in this.eventListeners)this._off(a,c,e);return this}dispatchEvent(t){var e={target:this,type:t.type,evt:t};return this.fire(t.type,e),this}addEventListener(t,e){return this.on(t,function(r){e.call(this,r.evt)}),this}removeEventListener(t){return this.off(t),this}_delegate(t,e,r){var i=this;this.on(t,function(s){for(var a=s.target.findAncestors(e,!0,i),o=0;o<a.length;o++)s=ne.Util.cloneObject(s),s.currentTarget=a[o],r.call(a[o],s)})}remove(){return this.isDragging()&&this.stopDrag(),In.DD._dragElements.delete(this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(Dr),this._clearSelfAndDescendantCache(Sl),this._clearSelfAndDescendantCache($1),this._clearSelfAndDescendantCache(M1),this._clearSelfAndDescendantCache(Vu),this._clearSelfAndDescendantCache(zu)}_remove(){this._clearCaches();var 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){var e="get"+ne.Util._capitalize(t);return ne.Util._isFunction(this[e])?this[e]():this.attrs[t]}getAncestors(){for(var t=this.getParent(),e=[];t;)e.push(t),t=t.getParent();return e}getAttrs(){return this.attrs||{}}setAttrs(t){return this._batchTransformChanges(()=>{var e,r;if(!t)return this;for(e in t)e!==o7&&(r=R1+ne.Util._capitalize(e),ne.Util._isFunction(this[r])?this[r](t[e]):this._setAttr(e,t[e]))}),this}isListening(){return this._getCache(zu,this._isListening)}_isListening(t){if(!this.listening())return!1;const e=this.getParent();return e&&e!==t&&this!==t?e._isListening(t):!0}isVisible(){return this._getCache(Vu,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const e=this.getParent();return e&&e!==t&&this!==t?e._isVisible(t):!0}shouldDrawHit(t,e=!1){if(t)return this._isVisible(t)&&this._isListening(t);var r=this.getLayer(),i=!1;In.DD._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===r)&&(i=!0)});var s=!e&&!Fi.Konva.hitOnDragEnabled&&i;return this.isListening()&&this.isVisible()&&!s}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t=this.getDepth(),e=this,r=0,i,s,a,o;function h(c){for(i=[],s=c.length,a=0;a<s;a++)o=c[a],r++,o.nodeType!==D1&&(i=i.concat(o.getChildren().slice())),o._id===e._id&&(a=s);i.length>0&&i[0].getDepth()<=t&&h(i)}const l=this.getStage();return e.nodeType!==h7&&l&&h(l.getChildren()),r}getDepth(){for(var t=0,e=this.parent;e;)t++,e=e.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(ni),this._clearSelfAndDescendantCache(Dr)),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;var e=t.getPointerPosition();if(!e)return null;var r=this.getAbsoluteTransform().copy();return r.invert(),r.point(e)}getAbsolutePosition(t){let e=!1,r=this.parent;for(;r;){if(r.isCached()){e=!0;break}r=r.parent}e&&!t&&(t=!0);var i=this.getAbsoluteTransform(t).getMatrix(),s=new ne.Transform,a=this.offset();return s.m=i.slice(),s.translate(a.x,a.y),s.getTranslation()}setAbsolutePosition(t){const{x:e,y:r,...i}=this._clearTransform();this.attrs.x=e,this.attrs.y=r,this._clearCache(ni);var s=this._getAbsoluteTransform().copy();return s.invert(),s.translate(t.x,t.y),t={x:this.attrs.x+s.getTranslation().x,y:this.attrs.y+s.getTranslation().y},this._setTransform(i),this.setPosition({x:t.x,y:t.y}),this._clearCache(ni),this._clearSelfAndDescendantCache(Dr),this}_setTransform(t){var e;for(e in t)this.attrs[e]=t[e]}_clearTransform(){var 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){var e=t.x,r=t.y,i=this.x(),s=this.y();return e!==void 0&&(i+=e),r!==void 0&&(s+=r),this.setPosition({x:i,y:s}),this}_eachAncestorReverse(t,e){var r=[],i=this.getParent(),s,a;if(!(e&&e._id===this._id)){for(r.unshift(this);i&&(!e||i._id!==e._id);)r.unshift(i),i=i.parent;for(s=r.length,a=0;a<s;a++)t(r[a])}}rotate(t){return this.rotation(this.rotation()+t),this}moveToTop(){if(!this.parent)return ne.Util.warn("Node has no parent. moveToTop function is ignored."),!1;var t=this.index,e=this.parent.getChildren().length;return t<e-1?(this.parent.children.splice(t,1),this.parent.children.push(this),this.parent._setChildrenIndices(),!0):!1}moveUp(){if(!this.parent)return ne.Util.warn("Node has no parent. moveUp function is ignored."),!1;var t=this.index,e=this.parent.getChildren().length;return t<e-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 ne.Util.warn("Node has no parent. moveDown function is ignored."),!1;var 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 ne.Util.warn("Node has no parent. moveToBottom function is ignored."),!1;var 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 ne.Util.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&ne.Util.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)+".");var e=this.index;return this.parent.children.splice(e,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(Sl,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),e=this.getParent();return e&&!e._isUnderCache&&(t*=e.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t={},e=this.getAttrs(),r,i,s,a,o;t.attrs={};for(r in e)i=e[r],o=ne.Util.isObject(i)&&!ne.Util._isPlainObject(i)&&!ne.Util._isArray(i),!o&&(s=typeof this[r]=="function"&&this[r],delete e[r],a=s?s.call(this):null,e[r]=i,a!==i&&(t.attrs[r]=i));return t.className=this.getClassName(),ne.Util._prepareToStringify(t)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,e,r){var i=[];e&&this._isMatch(t)&&i.push(this);for(var s=this.parent;s;){if(s===r)return i;s._isMatch(t)&&i.push(s),s=s.parent}return i}isAncestorOf(t){return!1}findAncestor(t,e,r){return this.findAncestors(t,e,r)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);var e=t.replace(/ /g,"").split(","),r=e.length,i,s;for(i=0;i<r;i++)if(s=e[i],ne.Util.isValidSelector(s)||(ne.Util.warn('Selector "'+s+'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'),ne.Util.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'),ne.Util.warn("Konva is awesome, right?")),s.charAt(0)==="#"){if(this.id()===s.slice(1))return!0}else if(s.charAt(0)==="."){if(this.hasName(s.slice(1)))return!0}else if(this.className===s||this.nodeType===s)return!0;return!1}getLayer(){var t=this.getParent();return t?t.getLayer():null}getStage(){return this._getCache(M1,this._getStage)}_getStage(){var t=this.getParent();return t?t.getStage():null}fire(t,e={},r){return e.target=e.target||this,r?this._fireAndBubble(t,e):this._fire(t,e),this}getAbsoluteTransform(t){return t?this._getAbsoluteTransform(t):this._getCache(Dr,this._getAbsoluteTransform)}_getAbsoluteTransform(t){var e;if(t)return e=new ne.Transform,this._eachAncestorReverse(function(i){var s=i.transformsEnabled();s==="all"?e.multiply(i.getTransform()):s==="position"&&e.translate(i.x()-i.offsetX(),i.y()-i.offsetY())},t),e;e=this._cache.get(Dr)||new ne.Transform,this.parent?this.parent.getAbsoluteTransform().copyInto(e):e.reset();var r=this.transformsEnabled();if(r==="all")e.multiply(this.getTransform());else if(r==="position"){const i=this.attrs.x||0,s=this.attrs.y||0,a=this.attrs.offsetX||0,o=this.attrs.offsetY||0;e.translate(i-a,s-o)}return e.dirty=!1,e}getAbsoluteScale(t){for(var e=this;e;)e._isUnderCache&&(t=e),e=e.getParent();const r=this.getAbsoluteTransform(t).decompose();return{x:r.scaleX,y:r.scaleY}}getAbsoluteRotation(){return this.getAbsoluteTransform().decompose().rotation}getTransform(){return this._getCache(ni,this._getTransform)}_getTransform(){var t,e,r=this._cache.get(ni)||new ne.Transform;r.reset();var i=this.x(),s=this.y(),a=Fi.Konva.getAngle(this.rotation()),o=(t=this.attrs.scaleX)!==null&&t!==void 0?t:1,h=(e=this.attrs.scaleY)!==null&&e!==void 0?e:1,l=this.attrs.skewX||0,c=this.attrs.skewY||0,f=this.attrs.offsetX||0,d=this.attrs.offsetY||0;return(i!==0||s!==0)&&r.translate(i,s),a!==0&&r.rotate(a),(l!==0||c!==0)&&r.skew(l,c),(o!==1||h!==1)&&r.scale(o,h),(f!==0||d!==0)&&r.translate(-1*f,-1*d),r.dirty=!1,r}clone(t){var e=ne.Util.cloneObject(this.attrs),r,i,s,a,o;for(r in t)e[r]=t[r];var h=new this.constructor(e);for(r in this.eventListeners)for(i=this.eventListeners[r],s=i.length,a=0;a<s;a++)o=i[a],o.name.indexOf(l7)<0&&(h.eventListeners[r]||(h.eventListeners[r]=[]),h.eventListeners[r].push(o));return h}_toKonvaCanvas(t){t=t||{};var e=this.getClientRect(),r=this.getStage(),i=t.x!==void 0?t.x:Math.floor(e.x),s=t.y!==void 0?t.y:Math.floor(e.y),a=t.pixelRatio||1,o=new bl.SceneCanvas({width:t.width||Math.ceil(e.width)||(r?r.width():0),height:t.height||Math.ceil(e.height)||(r?r.height():0),pixelRatio:a}),h=o.getContext();return t.imageSmoothingEnabled===!1&&(h._context.imageSmoothingEnabled=!1),h.save(),(i||s)&&h.translate(-1*i,-1*s),this.drawScene(o),h.restore(),o}toCanvas(t){return this._toKonvaCanvas(t)._canvas}toDataURL(t){t=t||{};var e=t.mimeType||null,r=t.quality||null,i=this._toKonvaCanvas(t).toDataURL(e,r);return t.callback&&t.callback(i),i}toImage(t){return new Promise((e,r)=>{try{const i=t==null?void 0:t.callback;i&&delete t.callback,ne.Util._urlToImage(this.toDataURL(t),function(s){e(s),i==null||i(s)})}catch(i){r(i)}})}toBlob(t){return new Promise((e,r)=>{try{const i=t==null?void 0:t.callback;i&&delete t.callback,this.toCanvas(t).toBlob(s=>{e(s),i==null||i(s)})}catch(i){r(i)}})}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():Fi.Konva.dragDistance}_off(t,e,r){var i=this.eventListeners[t],s,a,o;for(s=0;s<i.length;s++)if(a=i[s].name,o=i[s].handler,(a!=="konva"||e==="konva")&&(!e||a===e)&&(!r||r===o)){if(i.splice(s,1),i.length===0){delete this.eventListeners[t];break}s--}}_fireChangeEvent(t,e,r){this._fire(t+a7,{oldVal:e,newVal:r})}addName(t){if(!this.hasName(t)){var e=this.name(),r=e?e+" "+t:t;this.name(r)}return this}hasName(t){if(!t)return!1;const e=this.name();if(!e)return!1;var r=(e||"").split(/\s/g);return r.indexOf(t)!==-1}removeName(t){var e=(this.name()||"").split(/\s/g),r=e.indexOf(t);return r!==-1&&(e.splice(r,1),this.name(e.join(" "))),this}setAttr(t,e){var r=this[R1+ne.Util._capitalize(t)];return ne.Util._isFunction(r)?r.call(this,e):this._setAttr(t,e),this}_requestDraw(){if(Fi.Konva.autoDrawEnabled){const t=this.getLayer()||this.getStage();t==null||t.batchDraw()}}_setAttr(t,e){var r=this.attrs[t];r===e&&!ne.Util.isObject(e)||(e==null?delete this.attrs[t]:this.attrs[t]=e,this._shouldFireChangeEvents&&this._fireChangeEvent(t,r,e),this._requestDraw())}_setComponentAttr(t,e,r){var i;r!==void 0&&(i=this.attrs[t],i||(this.attrs[t]=this.getAttr(t)),this.attrs[t][e]=r,this._fireChangeEvent(t,i,r))}_fireAndBubble(t,e,r){e&&this.nodeType===D1&&(e.target=this);var i=(t===F1||t===N1)&&(r&&(this===r||this.isAncestorOf&&this.isAncestorOf(r))||this.nodeType==="Stage"&&!r);if(!i){this._fire(t,e);var s=(t===F1||t===N1)&&r&&r.isAncestorOf&&r.isAncestorOf(this)&&!r.isAncestorOf(this.parent);(e&&!e.cancelBubble||!e)&&this.parent&&this.parent.isListening()&&!s&&(r&&r.parent?this._fireAndBubble.call(this.parent,t,e,r):this._fireAndBubble.call(this.parent,t,e))}}_getProtoListeners(t){var e,r,i;const s=(e=this._cache.get(kl))!==null&&e!==void 0?e:{};let a=s==null?void 0:s[t];if(a===void 0){a=[];let o=Object.getPrototypeOf(this);for(;o;){const h=(i=(r=o.eventListeners)===null||r===void 0?void 0:r[t])!==null&&i!==void 0?i:[];a.push(...h),o=Object.getPrototypeOf(o)}s[t]=a,this._cache.set(kl,s)}return a}_fire(t,e){e=e||{},e.currentTarget=this,e.type=t;const r=this._getProtoListeners(t);if(r)for(var i=0;i<r.length;i++)r[i].handler.call(this,e);const s=this.eventListeners[t];if(s)for(var i=0;i<s.length;i++)s[i].handler.call(this,e)}draw(){return this.drawScene(),this.drawHit(),this}_createDragElement(t){var e=t?t.pointerId:void 0,r=this.getStage(),i=this.getAbsolutePosition();if(r){var s=r._getPointerById(e)||r._changedPointerPositions[0]||i;In.DD._dragElements.set(this._id,{node:this,startPointerPos:s,offset:{x:s.x-i.x,y:s.y-i.y},dragStatus:"ready",pointerId:e})}}startDrag(t,e=!0){In.DD._dragElements.has(this._id)||this._createDragElement(t);const r=In.DD._dragElements.get(this._id);r.dragStatus="dragging",this.fire("dragstart",{type:"dragstart",target:this,evt:t&&t.evt},e)}_setDragPosition(t,e){const r=this.getStage()._getPointerById(e.pointerId);if(r){var i={x:r.x-e.offset.x,y:r.y-e.offset.y},s=this.dragBoundFunc();if(s!==void 0){const a=s.call(this,i,t);a?i=a:ne.Util.warn("dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.")}(!this._lastPos||this._lastPos.x!==i.x||this._lastPos.y!==i.y)&&(this.setAbsolutePosition(i),this._requestDraw()),this._lastPos=i}}stopDrag(t){const e=In.DD._dragElements.get(this._id);e&&(e.dragStatus="stopped"),In.DD._endDragBefore(t),In.DD._endDragAfter(t)}setDraggable(t){this._setAttr("draggable",t),this._dragChange()}isDragging(){const t=In.DD._dragElements.get(this._id);return t?t.dragStatus==="dragging":!1}_listenDrag(){this._dragCleanup(),this.on("mousedown.konva touchstart.konva",function(t){var e=t.evt.button!==void 0,r=!e||Fi.Konva.dragButtons.indexOf(t.evt.button)>=0;if(r&&!this.isDragging()){var i=!1;In.DD._dragElements.forEach(s=>{this.isAncestorOf(s.node)&&(i=!0)}),i||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage();if(!t)return;const e=In.DD._dragElements.get(this._id),r=e&&e.dragStatus==="dragging",i=e&&e.dragStatus==="ready";r?this.stopDrag():i&&In.DD._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const e=this.getStage();if(!e)return!1;const r={x:-t.x,y:-t.y,width:e.width()+2*t.x,height:e.height()+2*t.y};return ne.Util.haveIntersection(r,this.getClientRect())}static create(t,e){return ne.Util._isString(t)&&(t=JSON.parse(t)),this._createNode(t,e)}static _createNode(t,e){var r=Ed.prototype.getClassName.call(t),i=t.children,s,a,o;e&&(t.attrs.container=e),Fi.Konva[r]||(ne.Util.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const h=Fi.Konva[r];if(s=new h(t.attrs),i)for(a=i.length,o=0;o<a;o++)s.add(Ed._createNode(i[o]));return s}};O1=va.Node=Xt,Xt.prototype.nodeType="Node",Xt.prototype._attrsAffectingSize=[],Xt.prototype.eventListeners={},Xt.prototype.on.call(Xt.prototype,c7,function(){if(this._batchingTransformChange){this._needClearTransformCache=!0;return}this._clearCache(ni),this._clearSelfAndDescendantCache(Dr)}),Xt.prototype.on.call(Xt.prototype,"visibleChange.konva",function(){this._clearSelfAndDescendantCache(Vu)}),Xt.prototype.on.call(Xt.prototype,"listeningChange.konva",function(){this._clearSelfAndDescendantCache(zu)}),Xt.prototype.on.call(Xt.prototype,"opacityChange.konva",function(){this._clearSelfAndDescendantCache(Sl)});const we=_a.Factory.addGetterSetter;we(Xt,"zIndex"),we(Xt,"absolutePosition"),we(Xt,"position"),we(Xt,"x",0,(0,Ie.getNumberValidator)()),we(Xt,"y",0,(0,Ie.getNumberValidator)()),we(Xt,"globalCompositeOperation","source-over",(0,Ie.getStringValidator)()),we(Xt,"opacity",1,(0,Ie.getNumberValidator)()),we(Xt,"name","",(0,Ie.getStringValidator)()),we(Xt,"id","",(0,Ie.getStringValidator)()),we(Xt,"rotation",0,(0,Ie.getNumberValidator)()),_a.Factory.addComponentsGetterSetter(Xt,"scale",["x","y"]),we(Xt,"scaleX",1,(0,Ie.getNumberValidator)()),we(Xt,"scaleY",1,(0,Ie.getNumberValidator)()),_a.Factory.addComponentsGetterSetter(Xt,"skew",["x","y"]),we(Xt,"skewX",0,(0,Ie.getNumberValidator)()),we(Xt,"skewY",0,(0,Ie.getNumberValidator)()),_a.Factory.addComponentsGetterSetter(Xt,"offset",["x","y"]),we(Xt,"offsetX",0,(0,Ie.getNumberValidator)()),we(Xt,"offsetY",0,(0,Ie.getNumberValidator)()),we(Xt,"dragDistance",null,(0,Ie.getNumberValidator)()),we(Xt,"width",0,(0,Ie.getNumberValidator)()),we(Xt,"height",0,(0,Ie.getNumberValidator)()),we(Xt,"listening",!0,(0,Ie.getBooleanValidator)()),we(Xt,"preventDefault",!0,(0,Ie.getBooleanValidator)()),we(Xt,"filters",null,function(n){return this._filterUpToDate=!1,n}),we(Xt,"visible",!0,(0,Ie.getBooleanValidator)()),we(Xt,"transformsEnabled","all",(0,Ie.getStringValidator)()),we(Xt,"size"),we(Xt,"dragBoundFunc"),we(Xt,"draggable",!1,(0,Ie.getBooleanValidator)()),_a.Factory.backCompat(Xt,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"});const d7=Rt({__proto__:null,get Node(){return O1},default:va},[va]),je=Dt(d7);var wa={};Object.defineProperty(wa,"__esModule",{value:!0});var I1=wa.Container=void 0;const cs=Wt,Bu=je,Tl=ee;class Ri extends Bu.Node{constructor(){super(...arguments),this.children=[]}getChildren(t){if(!t)return this.children||[];const e=this.children||[];var r=[];return e.forEach(function(i){t(i)&&r.push(i)}),r}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(var e=0;e<t.length;e++)this.add(t[e]);return this}const r=t[0];return r.getParent()?(r.moveTo(this),this):(this._validateAdd(r),r.index=this.getChildren().length,r.parent=this,r._clearCaches(),this.getChildren().push(r),this._fire("add",{child:r}),this._requestDraw(),this)}destroy(){return this.hasChildren()&&this.destroyChildren(),super.destroy(),this}find(t){return this._generalFind(t,!1)}findOne(t){var e=this._generalFind(t,!0);return e.length>0?e[0]:void 0}_generalFind(t,e){var r=[];return this._descendants(i=>{const s=i._isMatch(t);return s&&r.push(i),!!(s&&e)}),r}_descendants(t){let e=!1;const r=this.getChildren();for(const i of r)if(e=t(i),e||i.hasChildren()&&(e=i._descendants(t),e))return!0;return!1}toObject(){var t=Bu.Node.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(e=>{t.children.push(e.toObject())}),t}isAncestorOf(t){for(var e=t.getParent();e;){if(e._id===this._id)return!0;e=e.getParent()}return!1}clone(t){var e=Bu.Node.prototype.clone.call(this,t);return this.getChildren().forEach(function(r){e.add(r.clone())}),e}getAllIntersections(t){var e=[];return this.find("Shape").forEach(r=>{r.isVisible()&&r.intersects(t)&&e.push(r)}),e}_clearSelfAndDescendantCache(t){var e;super._clearSelfAndDescendantCache(t),!this.isCached()&&((e=this.children)===null||e===void 0||e.forEach(function(r){r._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(e,r){e.index=r}),this._requestDraw()}drawScene(t,e){var r=this.getLayer(),i=t||r&&r.getCanvas(),s=i&&i.getContext(),a=this._getCanvasCache(),o=a&&a.scene,h=i&&i.isCache;if(!this.isVisible()&&!h)return this;if(o){s.save();var l=this.getAbsoluteTransform(e).getMatrix();s.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedSceneCanvas(s),s.restore()}else this._drawChildren("drawScene",i,e);return this}drawHit(t,e){if(!this.shouldDrawHit(e))return this;var r=this.getLayer(),i=t||r&&r.hitCanvas,s=i&&i.getContext(),a=this._getCanvasCache(),o=a&&a.hit;if(o){s.save();var h=this.getAbsoluteTransform(e).getMatrix();s.transform(h[0],h[1],h[2],h[3],h[4],h[5]),this._drawCachedHitCanvas(s),s.restore()}else this._drawChildren("drawHit",i,e);return this}_drawChildren(t,e,r){var i,s=e&&e.getContext(),a=this.clipWidth(),o=this.clipHeight(),h=this.clipFunc(),l=a&&o||h;const c=r===this;if(l){s.save();var f=this.getAbsoluteTransform(r),d=f.getMatrix();s.transform(d[0],d[1],d[2],d[3],d[4],d[5]),s.beginPath();let _;if(h)_=h.call(this,s,this);else{var u=this.clipX(),p=this.clipY();s.rect(u,p,a,o)}s.clip.apply(s,_),d=f.copy().invert().getMatrix(),s.transform(d[0],d[1],d[2],d[3],d[4],d[5])}var v=!c&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";v&&(s.save(),s._applyGlobalCompositeOperation(this)),(i=this.children)===null||i===void 0||i.forEach(function(_){_[t](e,r)}),v&&s.restore(),l&&s.restore()}getClientRect(t={}){var e,r=t.skipTransform,i=t.relativeTo,s,a,o,h,l={x:1/0,y:1/0,width:0,height:0},c=this;(e=this.children)===null||e===void 0||e.forEach(function(v){if(v.visible()){var _=v.getClientRect({relativeTo:c,skipShadow:t.skipShadow,skipStroke:t.skipStroke});_.width===0&&_.height===0||(s===void 0?(s=_.x,a=_.y,o=_.x+_.width,h=_.y+_.height):(s=Math.min(s,_.x),a=Math.min(a,_.y),o=Math.max(o,_.x+_.width),h=Math.max(h,_.y+_.height)))}});for(var f=this.find("Shape"),d=!1,u=0;u<f.length;u++){var p=f[u];if(p._isVisible(this)){d=!0;break}}return d&&s!==void 0?l={x:s,y:a,width:o-s,height:h-a}:l={x:0,y:0,width:0,height:0},r?l:this._transformedRect(l,i)}}I1=wa.Container=Ri,cs.Factory.addComponentsGetterSetter(Ri,"clip",["x","y","width","height"]),cs.Factory.addGetterSetter(Ri,"clipX",void 0,(0,Tl.getNumberValidator)()),cs.Factory.addGetterSetter(Ri,"clipY",void 0,(0,Tl.getNumberValidator)()),cs.Factory.addGetterSetter(Ri,"clipWidth",void 0,(0,Tl.getNumberValidator)()),cs.Factory.addGetterSetter(Ri,"clipHeight",void 0,(0,Tl.getNumberValidator)()),cs.Factory.addGetterSetter(Ri,"clipFunc");const f7=Rt({__proto__:null,get Container(){return I1},default:wa},[wa]),Pl=Dt(f7);var Hu={},An={};Object.defineProperty(An,"__esModule",{value:!0});var j1=An.releaseCapture=V1=An.setPointerCapture=z1=An.hasPointerCapture=G1=An.createEvent=U1=An.getCapturedShape=void 0;const p7=te,xa=new Map,L1=p7.Konva._global.PointerEvent!==void 0;function g7(n){return xa.get(n)}var U1=An.getCapturedShape=g7;function qu(n){return{evt:n,pointerId:n.pointerId}}var G1=An.createEvent=qu;function m7(n,t){return xa.get(n)===t}var z1=An.hasPointerCapture=m7;function y7(n,t){B1(n),t.getStage()&&(xa.set(n,t),L1&&t._fire("gotpointercapture",qu(new PointerEvent("gotpointercapture"))))}var V1=An.setPointerCapture=y7;function B1(n,t){const e=xa.get(n);if(!e)return;const r=e.getStage();r&&r.content,xa.delete(n),L1&&e._fire("lostpointercapture",qu(new PointerEvent("lostpointercapture")))}j1=An.releaseCapture=B1;const v7=Rt({__proto__:null,get createEvent(){return G1},default:An,get getCapturedShape(){return U1},get hasPointerCapture(){return z1},get releaseCapture(){return j1},get setPointerCapture(){return V1}},[An]),H1=Dt(v7);(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.Stage=n.stages=void 0;const t=Ae,e=Wt,r=Pl,i=te,s=xl,a=Gu,o=te,h=H1;var l="Stage",c="string",f="px",d="mouseout",u="mouseleave",p="mouseover",v="mouseenter",_="mousemove",S="mousedown",x="mouseup",m="pointermove",k="pointerdown",F="pointerup",P="pointercancel",N="lostpointercapture",R="pointerout",L="pointerleave",U="pointerover",B="pointerenter",K="contextmenu",tt="touchstart",W="touchend",lt="touchmove",wt="touchcancel",bt="wheel",xt=5,it=[[v,"_pointerenter"],[S,"_pointerdown"],[_,"_pointermove"],[x,"_pointerup"],[u,"_pointerleave"],[tt,"_pointerdown"],[lt,"_pointermove"],[W,"_pointerup"],[wt,"_pointercancel"],[p,"_pointerover"],[bt,"_wheel"],[K,"_contextmenu"],[k,"_pointerdown"],[m,"_pointermove"],[F,"_pointerup"],[P,"_pointercancel"],[N,"_lostpointercapture"]];const Y={mouse:{[R]:d,[L]:u,[U]:p,[B]:v,[m]:_,[k]:S,[F]:x,[P]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},touch:{[R]:"touchout",[L]:"touchleave",[U]:"touchover",[B]:"touchenter",[m]:lt,[k]:tt,[F]:W,[P]:wt,pointerclick:"tap",pointerdblclick:"dbltap"},pointer:{[R]:R,[L]:L,[U]:U,[B]:B,[m]:m,[k]:k,[F]:F,[P]:P,pointerclick:"pointerclick",pointerdblclick:"pointerdblclick"}},O=G=>G.indexOf("pointer")>=0?"pointer":G.indexOf("touch")>=0?"touch":"mouse",E=G=>{const M=O(G);if(M==="pointer")return i.Konva.pointerEventsEnabled&&Y.pointer;if(M==="touch")return Y.touch;if(M==="mouse")return Y.mouse};function T(G={}){return(G.clipFunc||G.clipWidth||G.clipHeight)&&t.Util.warn("Stage does not support clipping. Please use clip for Layers or Groups."),G}const C="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);";n.stages=[];class D extends r.Container{constructor(M){super(T(M)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),n.stages.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{T(this.attrs)}),this._checkVisibility()}_validateAdd(M){const V=M.getType()==="Layer",q=M.getType()==="FastLayer";V||q||t.Util.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const M=this.visible()?"":"none";this.content.style.display=M}setContainer(M){if(typeof M===c){if(M.charAt(0)==="."){var V=M.slice(1);M=document.getElementsByClassName(V)[0]}else{var q;M.charAt(0)!=="#"?q=M:q=M.slice(1),M=document.getElementById(q)}if(!M)throw"Can not find container in document with id "+q}return this._setAttr("container",M),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),M.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var M=this.children,V=M.length,q;for(q=0;q<V;q++)M[q].clear();return this}clone(M){return M||(M={}),M.container=typeof document<"u"&&document.createElement("div"),r.Container.prototype.clone.call(this,M)}destroy(){super.destroy();var M=this.content;M&&t.Util._isInDocument(M)&&this.container().removeChild(M);var V=n.stages.indexOf(this);return V>-1&&n.stages.splice(V,1),t.Util.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const M=this._pointerPositions[0]||this._changedPointerPositions[0];return M?{x:M.x,y:M.y}:(t.Util.warn(C),null)}_getPointerById(M){return this._pointerPositions.find(V=>V.id===M)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(M){M=M||{},M.x=M.x||0,M.y=M.y||0,M.width=M.width||this.width(),M.height=M.height||this.height();var V=new s.SceneCanvas({width:M.width,height:M.height,pixelRatio:M.pixelRatio||1}),q=V.getContext()._context,Z=this.children;return(M.x||M.y)&&q.translate(-1*M.x,-1*M.y),Z.forEach(function(nt){if(nt.isVisible()){var pt=nt._toKonvaCanvas(M);q.drawImage(pt._canvas,M.x,M.y,pt.getWidth()/pt.getPixelRatio(),pt.getHeight()/pt.getPixelRatio())}}),V}getIntersection(M){if(!M)return null;var V=this.children,q=V.length,Z=q-1,nt;for(nt=Z;nt>=0;nt--){const pt=V[nt].getIntersection(M);if(pt)return pt}return null}_resizeDOM(){var M=this.width(),V=this.height();this.content&&(this.content.style.width=M+f,this.content.style.height=V+f),this.bufferCanvas.setSize(M,V),this.bufferHitCanvas.setSize(M,V),this.children.forEach(q=>{q.setSize({width:M,height:V}),q.draw()})}add(M,...V){if(arguments.length>1){for(var q=0;q<arguments.length;q++)this.add(arguments[q]);return this}super.add(M);var Z=this.children.length;return Z>xt&&t.Util.warn("The stage has "+Z+" 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."),M.setSize({width:this.width(),height:this.height()}),M.draw(),i.Konva.isBrowser&&this.content.appendChild(M.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(M){return h.hasPointerCapture(M,this)}setPointerCapture(M){h.setPointerCapture(M,this)}releaseCapture(M){h.releaseCapture(M,this)}getLayers(){return this.children}_bindContentEvents(){i.Konva.isBrowser&&it.forEach(([M,V])=>{this.content.addEventListener(M,q=>{this[V](q)},{passive:!1})})}_pointerenter(M){this.setPointersPositions(M);const V=E(M.type);V&&this._fire(V.pointerenter,{evt:M,target:this,currentTarget:this})}_pointerover(M){this.setPointersPositions(M);const V=E(M.type);V&&this._fire(V.pointerover,{evt:M,target:this,currentTarget:this})}_getTargetShape(M){let V=this[M+"targetShape"];return V&&!V.getStage()&&(V=null),V}_pointerleave(M){const V=E(M.type),q=O(M.type);if(V){this.setPointersPositions(M);var Z=this._getTargetShape(q),nt=!a.DD.isDragging||i.Konva.hitOnDragEnabled;Z&&nt?(Z._fireAndBubble(V.pointerout,{evt:M}),Z._fireAndBubble(V.pointerleave,{evt:M}),this._fire(V.pointerleave,{evt:M,target:this,currentTarget:this}),this[q+"targetShape"]=null):nt&&(this._fire(V.pointerleave,{evt:M,target:this,currentTarget:this}),this._fire(V.pointerout,{evt:M,target:this,currentTarget:this})),this.pointerPos=null,this._pointerPositions=[]}}_pointerdown(M){const V=E(M.type),q=O(M.type);if(V){this.setPointersPositions(M);var Z=!1;this._changedPointerPositions.forEach(nt=>{var pt=this.getIntersection(nt);if(a.DD.justDragged=!1,i.Konva["_"+q+"ListenClick"]=!0,!pt||!pt.isListening())return;i.Konva.capturePointerEventsEnabled&&pt.setPointerCapture(nt.id),this[q+"ClickStartShape"]=pt,pt._fireAndBubble(V.pointerdown,{evt:M,pointerId:nt.id}),Z=!0;const kt=M.type.indexOf("touch")>=0;pt.preventDefault()&&M.cancelable&&kt&&M.preventDefault()}),Z||this._fire(V.pointerdown,{evt:M,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(M){const V=E(M.type),q=O(M.type);if(!V)return;a.DD.isDragging&&a.DD.node.preventDefault()&&M.cancelable&&M.preventDefault(),this.setPointersPositions(M);var Z=!a.DD.isDragging||i.Konva.hitOnDragEnabled;if(!Z)return;var nt={};let pt=!1;var kt=this._getTargetShape(q);this._changedPointerPositions.forEach(Ft=>{const St=h.getCapturedShape(Ft.id)||this.getIntersection(Ft),At=Ft.id,jt={evt:M,pointerId:At};var zt=kt!==St;if(zt&&kt&&(kt._fireAndBubble(V.pointerout,{...jt},St),kt._fireAndBubble(V.pointerleave,{...jt},St)),St){if(nt[St._id])return;nt[St._id]=!0}St&&St.isListening()?(pt=!0,zt&&(St._fireAndBubble(V.pointerover,{...jt},kt),St._fireAndBubble(V.pointerenter,{...jt},kt),this[q+"targetShape"]=St),St._fireAndBubble(V.pointermove,{...jt})):kt&&(this._fire(V.pointerover,{evt:M,target:this,currentTarget:this,pointerId:At}),this[q+"targetShape"]=null)}),pt||this._fire(V.pointermove,{evt:M,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(M){const V=E(M.type),q=O(M.type);if(!V)return;this.setPointersPositions(M);const Z=this[q+"ClickStartShape"],nt=this[q+"ClickEndShape"];var pt={};let kt=!1;this._changedPointerPositions.forEach(Ft=>{const St=h.getCapturedShape(Ft.id)||this.getIntersection(Ft);if(St){if(St.releaseCapture(Ft.id),pt[St._id])return;pt[St._id]=!0}const At=Ft.id,jt={evt:M,pointerId:At};let zt=!1;i.Konva["_"+q+"InDblClickWindow"]?(zt=!0,clearTimeout(this[q+"DblTimeout"])):a.DD.justDragged||(i.Konva["_"+q+"InDblClickWindow"]=!0,clearTimeout(this[q+"DblTimeout"])),this[q+"DblTimeout"]=setTimeout(function(){i.Konva["_"+q+"InDblClickWindow"]=!1},i.Konva.dblClickWindow),St&&St.isListening()?(kt=!0,this[q+"ClickEndShape"]=St,St._fireAndBubble(V.pointerup,{...jt}),i.Konva["_"+q+"ListenClick"]&&Z&&Z===St&&(St._fireAndBubble(V.pointerclick,{...jt}),zt&&nt&&nt===St&&St._fireAndBubble(V.pointerdblclick,{...jt}))):(this[q+"ClickEndShape"]=null,i.Konva["_"+q+"ListenClick"]&&this._fire(V.pointerclick,{evt:M,target:this,currentTarget:this,pointerId:At}),zt&&this._fire(V.pointerdblclick,{evt:M,target:this,currentTarget:this,pointerId:At}))}),kt||this._fire(V.pointerup,{evt:M,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),i.Konva["_"+q+"ListenClick"]=!1,M.cancelable&&q!=="touch"&&M.preventDefault()}_contextmenu(M){this.setPointersPositions(M);var V=this.getIntersection(this.getPointerPosition());V&&V.isListening()?V._fireAndBubble(K,{evt:M}):this._fire(K,{evt:M,target:this,currentTarget:this})}_wheel(M){this.setPointersPositions(M);var V=this.getIntersection(this.getPointerPosition());V&&V.isListening()?V._fireAndBubble(bt,{evt:M}):this._fire(bt,{evt:M,target:this,currentTarget:this})}_pointercancel(M){this.setPointersPositions(M);const V=h.getCapturedShape(M.pointerId)||this.getIntersection(this.getPointerPosition());V&&V._fireAndBubble(F,h.createEvent(M)),h.releaseCapture(M.pointerId)}_lostpointercapture(M){h.releaseCapture(M.pointerId)}setPointersPositions(M){var V=this._getContentPosition(),q=null,Z=null;M=M||window.event,M.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(M.touches,nt=>{this._pointerPositions.push({id:nt.identifier,x:(nt.clientX-V.left)/V.scaleX,y:(nt.clientY-V.top)/V.scaleY})}),Array.prototype.forEach.call(M.changedTouches||M.touches,nt=>{this._changedPointerPositions.push({id:nt.identifier,x:(nt.clientX-V.left)/V.scaleX,y:(nt.clientY-V.top)/V.scaleY})})):(q=(M.clientX-V.left)/V.scaleX,Z=(M.clientY-V.top)/V.scaleY,this.pointerPos={x:q,y:Z},this._pointerPositions=[{x:q,y:Z,id:t.Util._getFirstPointerId(M)}],this._changedPointerPositions=[{x:q,y:Z,id:t.Util._getFirstPointerId(M)}])}_setPointerPosition(M){t.Util.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(M)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var M=this.content.getBoundingClientRect();return{top:M.top,left:M.left,scaleX:M.width/this.content.clientWidth||1,scaleY:M.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new s.SceneCanvas({width:this.width(),height:this.height()}),this.bufferHitCanvas=new s.HitCanvas({pixelRatio:1,width:this.width(),height:this.height()}),!!i.Konva.isBrowser){var M=this.container();if(!M)throw"Stage has no container. A container is required.";M.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"),M.appendChild(this.content),this._resizeDOM()}}cache(){return t.Util.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(M){M.batchDraw()}),this}}n.Stage=D,D.prototype.nodeType=l,(0,o._registerNode)(D),e.Factory.addGetterSetter(D,"container")})(Hu);const _7=Tn(Hu),w7=Rt({__proto__:null,default:_7},[Hu]),x7=Dt(w7);var ba={},Ku={};(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.Shape=n.shapes=void 0;const t=te,e=Ae,r=Wt,i=je,s=ee,a=te,o=H1;var h="hasShadow",l="shadowRGBA",c="patternImage",f="linearGradient",d="radialGradient";let u;function p(){return u||(u=e.Util.createCanvasElement().getContext("2d"),u)}n.shapes={};function v(L){const U=this.attrs.fillRule;U?L.fill(U):L.fill()}function _(L){L.stroke()}function S(L){L.fill()}function x(L){L.stroke()}function m(){this._clearCache(h)}function k(){this._clearCache(l)}function F(){this._clearCache(c)}function P(){this._clearCache(f)}function N(){this._clearCache(d)}class R extends i.Node{constructor(U){super(U);let B;for(;B=e.Util.getRandomColor(),!(B&&!(B in n.shapes)););this.colorKey=B,n.shapes[B]=this}getContext(){return e.Util.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return e.Util.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(h,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(c,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var U=p();const B=U.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(B&&B.setTransform){const K=new e.Transform;K.translate(this.fillPatternX(),this.fillPatternY()),K.rotate(t.Konva.getAngle(this.fillPatternRotation())),K.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),K.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const tt=K.getMatrix(),W=typeof DOMMatrix>"u"?{a:tt[0],b:tt[1],c:tt[2],d:tt[3],e:tt[4],f:tt[5]}:new DOMMatrix(tt);B.setTransform(W)}return B}}_getLinearGradient(){return this._getCache(f,this.__getLinearGradient)}__getLinearGradient(){var U=this.fillLinearGradientColorStops();if(U){for(var B=p(),K=this.fillLinearGradientStartPoint(),tt=this.fillLinearGradientEndPoint(),W=B.createLinearGradient(K.x,K.y,tt.x,tt.y),lt=0;lt<U.length;lt+=2)W.addColorStop(U[lt],U[lt+1]);return W}}_getRadialGradient(){return this._getCache(d,this.__getRadialGradient)}__getRadialGradient(){var U=this.fillRadialGradientColorStops();if(U){for(var B=p(),K=this.fillRadialGradientStartPoint(),tt=this.fillRadialGradientEndPoint(),W=B.createRadialGradient(K.x,K.y,this.fillRadialGradientStartRadius(),tt.x,tt.y,this.fillRadialGradientEndRadius()),lt=0;lt<U.length;lt+=2)W.addColorStop(U[lt],U[lt+1]);return W}}getShadowRGBA(){return this._getCache(l,this._getShadowRGBA)}_getShadowRGBA(){if(this.hasShadow()){var U=e.Util.colorToRGBA(this.shadowColor());if(U)return"rgba("+U.r+","+U.g+","+U.b+","+U.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 U=this.hitStrokeWidth();return U==="auto"?this.hasStroke():this.strokeEnabled()&&!!U}intersects(U){var B=this.getStage();if(!B)return!1;const K=B.bufferHitCanvas;return K.getContext().clear(),this.drawHit(K,void 0,!0),K.context.getImageData(Math.round(U.x),Math.round(U.y),1,1).data[3]>0}destroy(){return i.Node.prototype.destroy.call(this),delete n.shapes[this.colorKey],delete this.colorKey,this}_useBufferCanvas(U){var B;if(!this.getStage()||!(!((B=this.attrs.perfectDrawEnabled)!==null&&B!==void 0)||B))return!1;const K=U||this.hasFill(),tt=this.hasStroke(),W=this.getAbsoluteOpacity()!==1;if(K&&tt&&W)return!0;const lt=this.hasShadow(),wt=this.shadowForStrokeEnabled();return!!(K&&tt&&lt&&wt)}setStrokeHitEnabled(U){e.Util.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),U?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var U=this.size();return{x:this._centroid?-U.width/2:0,y:this._centroid?-U.height/2:0,width:U.width,height:U.height}}getClientRect(U={}){const B=U.skipTransform,K=U.relativeTo,tt=this.getSelfRect(),W=!U.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,lt=tt.width+W,wt=tt.height+W,bt=!U.skipShadow&&this.hasShadow(),xt=bt?this.shadowOffsetX():0,it=bt?this.shadowOffsetY():0,Y=lt+Math.abs(xt),O=wt+Math.abs(it),E=bt&&this.shadowBlur()||0,T=Y+E*2,C=O+E*2,D={width:T,height:C,x:-(W/2+E)+Math.min(xt,0)+tt.x,y:-(W/2+E)+Math.min(it,0)+tt.y};return B?D:this._transformedRect(D,K)}drawScene(U,B){var K=this.getLayer(),tt=U||K.getCanvas(),W=tt.getContext(),lt=this._getCanvasCache(),wt=this.getSceneFunc(),bt=this.hasShadow(),xt,it,Y,O=tt.isCache,E=B===this;if(!this.isVisible()&&!E)return this;if(lt){W.save();var T=this.getAbsoluteTransform(B).getMatrix();return W.transform(T[0],T[1],T[2],T[3],T[4],T[5]),this._drawCachedSceneCanvas(W),W.restore(),this}if(!wt)return this;if(W.save(),this._useBufferCanvas()&&!O){xt=this.getStage(),it=xt.bufferCanvas,Y=it.getContext(),Y.clear(),Y.save(),Y._applyLineJoin(this);var C=this.getAbsoluteTransform(B).getMatrix();Y.transform(C[0],C[1],C[2],C[3],C[4],C[5]),wt.call(this,Y,this),Y.restore();var D=it.pixelRatio;bt&&W._applyShadow(this),W._applyOpacity(this),W._applyGlobalCompositeOperation(this),W.drawImage(it._canvas,0,0,it.width/D,it.height/D)}else{if(W._applyLineJoin(this),!E){var C=this.getAbsoluteTransform(B).getMatrix();W.transform(C[0],C[1],C[2],C[3],C[4],C[5]),W._applyOpacity(this),W._applyGlobalCompositeOperation(this)}bt&&W._applyShadow(this),wt.call(this,W,this)}return W.restore(),this}drawHit(U,B,K=!1){if(!this.shouldDrawHit(B,K))return this;var tt=this.getLayer(),W=U||tt.hitCanvas,lt=W&&W.getContext(),wt=this.hitFunc()||this.sceneFunc(),bt=this._getCanvasCache(),xt=bt&&bt.hit;if(this.colorKey||e.Util.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()"),xt){lt.save();var it=this.getAbsoluteTransform(B).getMatrix();return lt.transform(it[0],it[1],it[2],it[3],it[4],it[5]),this._drawCachedHitCanvas(lt),lt.restore(),this}if(!wt)return this;if(lt.save(),lt._applyLineJoin(this),this!==B){var Y=this.getAbsoluteTransform(B).getMatrix();lt.transform(Y[0],Y[1],Y[2],Y[3],Y[4],Y[5])}return wt.call(this,lt,this),lt.restore(),this}drawHitFromCache(U=0){var B=this._getCanvasCache(),K=this._getCachedSceneCanvas(),tt=B.hit,W=tt.getContext(),lt=tt.getWidth(),wt=tt.getHeight(),bt,xt,it,Y,O,E;W.clear(),W.drawImage(K._canvas,0,0,lt,wt);try{for(bt=W.getImageData(0,0,lt,wt),xt=bt.data,it=xt.length,Y=e.Util._hexToRgb(this.colorKey),O=0;O<it;O+=4)E=xt[O+3],E>U?(xt[O]=Y.r,xt[O+1]=Y.g,xt[O+2]=Y.b,xt[O+3]=255):xt[O+3]=0;W.putImageData(bt,0,0)}catch(T){e.Util.error("Unable to draw hit graph from cached scene canvas. "+T.message)}return this}hasPointerCapture(U){return o.hasPointerCapture(U,this)}setPointerCapture(U){o.setPointerCapture(U,this)}releaseCapture(U){o.releaseCapture(U,this)}}n.Shape=R,R.prototype._fillFunc=v,R.prototype._strokeFunc=_,R.prototype._fillFuncHit=S,R.prototype._strokeFuncHit=x,R.prototype._centroid=!1,R.prototype.nodeType="Shape",(0,a._registerNode)(R),R.prototype.eventListeners={},R.prototype.on.call(R.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",m),R.prototype.on.call(R.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",k),R.prototype.on.call(R.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",F),R.prototype.on.call(R.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",P),R.prototype.on.call(R.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",N),r.Factory.addGetterSetter(R,"stroke",void 0,(0,s.getStringOrGradientValidator)()),r.Factory.addGetterSetter(R,"strokeWidth",2,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(R,"fillAfterStrokeEnabled",!1),r.Factory.addGetterSetter(R,"hitStrokeWidth","auto",(0,s.getNumberOrAutoValidator)()),r.Factory.addGetterSetter(R,"strokeHitEnabled",!0,(0,s.getBooleanValidator)()),r.Factory.addGetterSetter(R,"perfectDrawEnabled",!0,(0,s.getBooleanValidator)()),r.Factory.addGetterSetter(R,"shadowForStrokeEnabled",!0,(0,s.getBooleanValidator)()),r.Factory.addGetterSetter(R,"lineJoin"),r.Factory.addGetterSetter(R,"lineCap"),r.Factory.addGetterSetter(R,"sceneFunc"),r.Factory.addGetterSetter(R,"hitFunc"),r.Factory.addGetterSetter(R,"dash"),r.Factory.addGetterSetter(R,"dashOffset",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(R,"shadowColor",void 0,(0,s.getStringValidator)()),r.Factory.addGetterSetter(R,"shadowBlur",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(R,"shadowOpacity",1,(0,s.getNumberValidator)()),r.Factory.addComponentsGetterSetter(R,"shadowOffset",["x","y"]),r.Factory.addGetterSetter(R,"shadowOffsetX",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(R,"shadowOffsetY",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(R,"fillPatternImage"),r.Factory.addGetterSetter(R,"fill",void 0,(0,s.getStringOrGradientValidator)()),r.Factory.addGetterSetter(R,"fillPatternX",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(R,"fillPatternY",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(R,"fillLinearGradientColorStops"),r.Factory.addGetterSetter(R,"strokeLinearGradientColorStops"),r.Factory.addGetterSetter(R,"fillRadialGradientStartRadius",0),r.Factory.addGetterSetter(R,"fillRadialGradientEndRadius",0),r.Factory.addGetterSetter(R,"fillRadialGradientColorStops"),r.Factory.addGetterSetter(R,"fillPatternRepeat","repeat"),r.Factory.addGetterSetter(R,"fillEnabled",!0),r.Factory.addGetterSetter(R,"strokeEnabled",!0),r.Factory.addGetterSetter(R,"shadowEnabled",!0),r.Factory.addGetterSetter(R,"dashEnabled",!0),r.Factory.addGetterSetter(R,"strokeScaleEnabled",!0),r.Factory.addGetterSetter(R,"fillPriority","color"),r.Factory.addComponentsGetterSetter(R,"fillPatternOffset",["x","y"]),r.Factory.addGetterSetter(R,"fillPatternOffsetX",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(R,"fillPatternOffsetY",0,(0,s.getNumberValidator)()),r.Factory.addComponentsGetterSetter(R,"fillPatternScale",["x","y"]),r.Factory.addGetterSetter(R,"fillPatternScaleX",1,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(R,"fillPatternScaleY",1,(0,s.getNumberValidator)()),r.Factory.addComponentsGetterSetter(R,"fillLinearGradientStartPoint",["x","y"]),r.Factory.addComponentsGetterSetter(R,"strokeLinearGradientStartPoint",["x","y"]),r.Factory.addGetterSetter(R,"fillLinearGradientStartPointX",0),r.Factory.addGetterSetter(R,"strokeLinearGradientStartPointX",0),r.Factory.addGetterSetter(R,"fillLinearGradientStartPointY",0),r.Factory.addGetterSetter(R,"strokeLinearGradientStartPointY",0),r.Factory.addComponentsGetterSetter(R,"fillLinearGradientEndPoint",["x","y"]),r.Factory.addComponentsGetterSetter(R,"strokeLinearGradientEndPoint",["x","y"]),r.Factory.addGetterSetter(R,"fillLinearGradientEndPointX",0),r.Factory.addGetterSetter(R,"strokeLinearGradientEndPointX",0),r.Factory.addGetterSetter(R,"fillLinearGradientEndPointY",0),r.Factory.addGetterSetter(R,"strokeLinearGradientEndPointY",0),r.Factory.addComponentsGetterSetter(R,"fillRadialGradientStartPoint",["x","y"]),r.Factory.addGetterSetter(R,"fillRadialGradientStartPointX",0),r.Factory.addGetterSetter(R,"fillRadialGradientStartPointY",0),r.Factory.addComponentsGetterSetter(R,"fillRadialGradientEndPoint",["x","y"]),r.Factory.addGetterSetter(R,"fillRadialGradientEndPointX",0),r.Factory.addGetterSetter(R,"fillRadialGradientEndPointY",0),r.Factory.addGetterSetter(R,"fillPatternRotation",0),r.Factory.addGetterSetter(R,"fillRule",void 0,(0,s.getStringValidator)()),r.Factory.backCompat(R,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"})})(Ku);const b7=Tn(Ku),S7=Rt({__proto__:null,default:b7},[Ku]),Je=Dt(S7);Object.defineProperty(ba,"__esModule",{value:!0});var q1=ba.Layer=void 0;const Mr=Ae,Yu=Pl,us=je,Xu=Wt,K1=xl,k7=ee,C7=Je,T7=te;var P7="#",E7="beforeDraw",A7="draw",Y1=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],O7=Y1.length;class ds extends Yu.Container{constructor(t){super(t),this.canvas=new K1.SceneCanvas,this.hitCanvas=new K1.HitCanvas({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);var e=this.getStage();return e&&e.content&&(e.content.removeChild(this.getNativeCanvasElement()),t<e.children.length-1?e.content.insertBefore(this.getNativeCanvasElement(),e.children[t+1].getCanvas()._canvas):e.content.appendChild(this.getNativeCanvasElement())),this}moveToTop(){us.Node.prototype.moveToTop.call(this);var t=this.getStage();return t&&t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.appendChild(this.getNativeCanvasElement())),!0}moveUp(){var t=us.Node.prototype.moveUp.call(this);if(!t)return!1;var e=this.getStage();return!e||!e.content?!1:(e.content.removeChild(this.getNativeCanvasElement()),this.index<e.children.length-1?e.content.insertBefore(this.getNativeCanvasElement(),e.children[this.index+1].getCanvas()._canvas):e.content.appendChild(this.getNativeCanvasElement()),!0)}moveDown(){if(us.Node.prototype.moveDown.call(this)){var t=this.getStage();if(t){var e=t.children;t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.insertBefore(this.getNativeCanvasElement(),e[this.index+1].getCanvas()._canvas))}return!0}return!1}moveToBottom(){if(us.Node.prototype.moveToBottom.call(this)){var t=this.getStage();if(t){var e=t.children;t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.insertBefore(this.getNativeCanvasElement(),e[1].getCanvas()._canvas))}return!0}return!1}getLayer(){return this}remove(){var t=this.getNativeCanvasElement();return us.Node.prototype.remove.call(this),t&&t.parentNode&&Mr.Util._isInDocument(t)&&t.parentNode.removeChild(t),this}getStage(){return this.parent}setSize({width:t,height:e}){return this.canvas.setSize(t,e),this.hitCanvas.setSize(t,e),this._setSmoothEnabled(),this}_validateAdd(t){var e=t.getType();e!=="Group"&&e!=="Shape"&&Mr.Util.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(),us.Node.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(){Mr.Util.warn('Can not change width of layer. Use "stage.width(value)" function instead.')}getHeight(){if(this.parent)return this.parent.height()}setHeight(){Mr.Util.warn('Can not change height of layer. Use "stage.height(value)" function instead.')}batchDraw(){return this._waitingForDraw||(this._waitingForDraw=!0,Mr.Util.requestAnimFrame(()=>{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;for(var e=1,r=!1;;){for(let i=0;i<O7;i++){const s=Y1[i],a=this._getIntersection({x:t.x+s.x*e,y:t.y+s.y*e}),o=a.shape;if(o)return o;if(r=!!a.antialiased,!a.antialiased)break}if(r)e+=1;else return null}}_getIntersection(t){const e=this.hitCanvas.pixelRatio,r=this.hitCanvas.context.getImageData(Math.round(t.x*e),Math.round(t.y*e),1,1).data,i=r[3];if(i===255){const s=Mr.Util._rgbToHex(r[0],r[1],r[2]),a=C7.shapes[P7+s];return a?{shape:a}:{antialiased:!0}}else if(i>0)return{antialiased:!0};return{}}drawScene(t,e){var r=this.getLayer(),i=t||r&&r.getCanvas();return this._fire(E7,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),Yu.Container.prototype.drawScene.call(this,i,e),this._fire(A7,{node:this}),this}drawHit(t,e){var r=this.getLayer(),i=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),Yu.Container.prototype.drawHit.call(this,i,e),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){Mr.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return Mr.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var t=this.parent,e=!!this.hitCanvas._canvas.parentNode;e?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}destroy(){return Mr.Util.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}}q1=ba.Layer=ds,ds.prototype.nodeType="Layer",(0,T7._registerNode)(ds),Xu.Factory.addGetterSetter(ds,"imageSmoothingEnabled",!0),Xu.Factory.addGetterSetter(ds,"clearBeforeDraw",!0),Xu.Factory.addGetterSetter(ds,"hitGraphEnabled",!0,(0,k7.getBooleanValidator)());const $7=Rt({__proto__:null,get Layer(){return q1},default:ba},[ba]),X1=Dt($7);var Sa={};Object.defineProperty(Sa,"__esModule",{value:!0});var J1=Sa.FastLayer=void 0;const F7=Ae,N7=X1,R7=te;class Ju extends N7.Layer{constructor(t){super(t),this.listening(!1),F7.Util.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}J1=Sa.FastLayer=Ju,Ju.prototype.nodeType="FastLayer",(0,R7._registerNode)(Ju);const D7=Rt({__proto__:null,get FastLayer(){return J1},default:Sa},[Sa]),M7=Dt(D7);var ka={};Object.defineProperty(ka,"__esModule",{value:!0});var Q1=ka.Group=void 0;const I7=Ae,j7=Pl,L7=te;class Qu extends j7.Container{_validateAdd(t){var e=t.getType();e!=="Group"&&e!=="Shape"&&I7.Util.throw("You may only add groups and shapes to groups.")}}Q1=ka.Group=Qu,Qu.prototype.nodeType="Group",(0,L7._registerNode)(Qu);const U7=Rt({__proto__:null,get Group(){return Q1},default:ka},[ka]),Zu=Dt(U7);var Ca={};Object.defineProperty(Ca,"__esModule",{value:!0});var Z1=Ca.Animation=void 0;const Wu=te,W1=Ae,td=function(){return Wu.glob.performance&&Wu.glob.performance.now?function(){return Wu.glob.performance.now()}:function(){return new Date().getTime()}}();class gr{constructor(t,e){this.id=gr.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:td(),frameRate:0},this.func=t,this.setLayers(e)}setLayers(t){let e=[];return t&&(e=Array.isArray(t)?t:[t]),this.layers=e,this}getLayers(){return this.layers}addLayer(t){const e=this.layers,r=e.length;for(let i=0;i<r;i++)if(e[i]._id===t._id)return!1;return this.layers.push(t),!0}isRunning(){const t=gr.animations,e=t.length;for(let r=0;r<e;r++)if(t[r].id===this.id)return!0;return!1}start(){return this.stop(),this.frame.timeDiff=0,this.frame.lastTime=td(),gr._addAnimation(this),this}stop(){return gr._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 e=t.id,r=this.animations,i=r.length;for(let s=0;s<i;s++)if(r[s].id===e){this.animations.splice(s,1);break}}static _runFrames(){const t={},e=this.animations;for(let r=0;r<e.length;r++){const i=e[r],s=i.layers,a=i.func;i._updateFrameObject(td());const o=s.length;let h;if(a?h=a.call(i,i.frame)!==!1:h=!0,!!h)for(let l=0;l<o;l++){const c=s[l];c._id!==void 0&&(t[c._id]=c)}}for(let r in t)t.hasOwnProperty(r)&&t[r].batchDraw()}static _animationLoop(){const t=gr;t.animations.length?(t._runFrames(),W1.Util.requestAnimFrame(t._animationLoop)):t.animRunning=!1}static _handleAnimation(){this.animRunning||(this.animRunning=!0,W1.Util.requestAnimFrame(this._animationLoop))}}Z1=Ca.Animation=gr,gr.animations=[],gr.animIdCounter=0,gr.animRunning=!1;const G7=Rt({__proto__:null,get Animation(){return Z1},default:Ca},[Ca]),ed=Dt(G7);var nd={};(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.Easings=n.Tween=void 0;const t=Ae,e=ed,r=je,i=te;var s={node:1,duration:1,easing:1,onFinish:1,yoyo:1},a=1,o=2,h=3,l=0,c=["fill","stroke","shadowColor"];class f{constructor(p,v,_,S,x,m,k){this.prop=p,this.propFunc=v,this.begin=S,this._pos=S,this.duration=m,this._change=0,this.prevPos=0,this.yoyo=k,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=_,this._change=x-this.begin,this.pause()}fire(p){var v=this[p];v&&v()}setTime(p){p>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():p<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=p,this.update())}getTime(){return this._time}setPosition(p){this.prevPos=this._pos,this.propFunc(p),this._pos=p}getPosition(p){return p===void 0&&(p=this._time),this.func(p,this.begin,this._change,this.duration)}play(){this.state=o,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=h,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(p){this.pause(),this._time=p,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(){var p=this.getTimer()-this._startTime;this.state===o?this.setTime(p):this.state===h&&this.setTime(this.duration-p)}pause(){this.state=a,this.fire("onPause")}getTimer(){return new Date().getTime()}}class d{constructor(p){var v=this,_=p.node,S=_._id,x,m=p.easing||n.Easings.Linear,k=!!p.yoyo,F;typeof p.duration>"u"?x=.3:p.duration===0?x=.001:x=p.duration,this.node=_,this._id=l++;var P=_.getLayer()||(_ instanceof i.Konva.Stage?_.getLayers():null);P||t.Util.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new e.Animation(function(){v.tween.onEnterFrame()},P),this.tween=new f(F,function(N){v._tweenFunc(N)},m,0,1,x*1e3,k),this._addListeners(),d.attrs[S]||(d.attrs[S]={}),d.attrs[S][this._id]||(d.attrs[S][this._id]={}),d.tweens[S]||(d.tweens[S]={});for(F in p)s[F]===void 0&&this._addAttr(F,p[F]);this.reset(),this.onFinish=p.onFinish,this.onReset=p.onReset,this.onUpdate=p.onUpdate}_addAttr(p,v){var _=this.node,S=_._id,x,m,k,F,P,N,R,L;if(k=d.tweens[S][p],k&&delete d.attrs[S][k][p],x=_.getAttr(p),t.Util._isArray(v))if(m=[],P=Math.max(v.length,x.length),p==="points"&&v.length!==x.length&&(v.length>x.length?(R=x,x=t.Util._prepareArrayForTween(x,v,_.closed())):(N=v,v=t.Util._prepareArrayForTween(v,x,_.closed()))),p.indexOf("fill")===0)for(F=0;F<P;F++)if(F%2===0)m.push(v[F]-x[F]);else{var U=t.Util.colorToRGBA(x[F]);L=t.Util.colorToRGBA(v[F]),x[F]=U,m.push({r:L.r-U.r,g:L.g-U.g,b:L.b-U.b,a:L.a-U.a})}else for(F=0;F<P;F++)m.push(v[F]-x[F]);else c.indexOf(p)!==-1?(x=t.Util.colorToRGBA(x),L=t.Util.colorToRGBA(v),m={r:L.r-x.r,g:L.g-x.g,b:L.b-x.b,a:L.a-x.a}):m=v-x;d.attrs[S][this._id][p]={start:x,diff:m,end:v,trueEnd:N,trueStart:R},d.tweens[S][p]=this._id}_tweenFunc(p){var v=this.node,_=d.attrs[v._id][this._id],S,x,m,k,F,P,N,R;for(S in _){if(x=_[S],m=x.start,k=x.diff,R=x.end,t.Util._isArray(m))if(F=[],N=Math.max(m.length,R.length),S.indexOf("fill")===0)for(P=0;P<N;P++)P%2===0?F.push((m[P]||0)+k[P]*p):F.push("rgba("+Math.round(m[P].r+k[P].r*p)+","+Math.round(m[P].g+k[P].g*p)+","+Math.round(m[P].b+k[P].b*p)+","+(m[P].a+k[P].a*p)+")");else for(P=0;P<N;P++)F.push((m[P]||0)+k[P]*p);else c.indexOf(S)!==-1?F="rgba("+Math.round(m.r+k.r*p)+","+Math.round(m.g+k.g*p)+","+Math.round(m.b+k.b*p)+","+(m.a+k.a*p)+")":F=m+k*p;v.setAttr(S,F)}}_addListeners(){this.tween.onPlay=()=>{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var p=this.node,v=d.attrs[p._id][this._id];v.points&&v.points.trueEnd&&p.setAttr("points",v.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var p=this.node,v=d.attrs[p._id][this._id];v.points&&v.points.trueStart&&p.points(v.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(p){return this.tween.seek(p*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var p=this.node._id,v=this._id,_=d.tweens[p],S;this.pause();for(S in _)delete d.tweens[p][S];delete d.attrs[p][v]}}n.Tween=d,d.attrs={},d.tweens={},r.Node.prototype.to=function(u){var p=u.onFinish;u.node=this,u.onFinish=function(){this.destroy(),p&&p()};var v=new d(u);v.play()},n.Easings={BackEaseIn(u,p,v,_){var S=1.70158;return v*(u/=_)*u*((S+1)*u-S)+p},BackEaseOut(u,p,v,_){var S=1.70158;return v*((u=u/_-1)*u*((S+1)*u+S)+1)+p},BackEaseInOut(u,p,v,_){var S=1.70158;return(u/=_/2)<1?v/2*(u*u*(((S*=1.525)+1)*u-S))+p:v/2*((u-=2)*u*(((S*=1.525)+1)*u+S)+2)+p},ElasticEaseIn(u,p,v,_,S,x){var m=0;return u===0?p:(u/=_)===1?p+v:(x||(x=_*.3),!S||S<Math.abs(v)?(S=v,m=x/4):m=x/(2*Math.PI)*Math.asin(v/S),-(S*Math.pow(2,10*(u-=1))*Math.sin((u*_-m)*(2*Math.PI)/x))+p)},ElasticEaseOut(u,p,v,_,S,x){var m=0;return u===0?p:(u/=_)===1?p+v:(x||(x=_*.3),!S||S<Math.abs(v)?(S=v,m=x/4):m=x/(2*Math.PI)*Math.asin(v/S),S*Math.pow(2,-10*u)*Math.sin((u*_-m)*(2*Math.PI)/x)+v+p)},ElasticEaseInOut(u,p,v,_,S,x){var m=0;return u===0?p:(u/=_/2)===2?p+v:(x||(x=_*(.3*1.5)),!S||S<Math.abs(v)?(S=v,m=x/4):m=x/(2*Math.PI)*Math.asin(v/S),u<1?-.5*(S*Math.pow(2,10*(u-=1))*Math.sin((u*_-m)*(2*Math.PI)/x))+p:S*Math.pow(2,-10*(u-=1))*Math.sin((u*_-m)*(2*Math.PI)/x)*.5+v+p)},BounceEaseOut(u,p,v,_){return(u/=_)<1/2.75?v*(7.5625*u*u)+p:u<2/2.75?v*(7.5625*(u-=1.5/2.75)*u+.75)+p:u<2.5/2.75?v*(7.5625*(u-=2.25/2.75)*u+.9375)+p:v*(7.5625*(u-=2.625/2.75)*u+.984375)+p},BounceEaseIn(u,p,v,_){return v-n.Easings.BounceEaseOut(_-u,0,v,_)+p},BounceEaseInOut(u,p,v,_){return u<_/2?n.Easings.BounceEaseIn(u*2,0,v,_)*.5+p:n.Easings.BounceEaseOut(u*2-_,0,v,_)*.5+v*.5+p},EaseIn(u,p,v,_){return v*(u/=_)*u+p},EaseOut(u,p,v,_){return-v*(u/=_)*(u-2)+p},EaseInOut(u,p,v,_){return(u/=_/2)<1?v/2*u*u+p:-v/2*(--u*(u-2)-1)+p},StrongEaseIn(u,p,v,_){return v*(u/=_)*u*u*u*u+p},StrongEaseOut(u,p,v,_){return v*((u=u/_-1)*u*u*u*u+1)+p},StrongEaseInOut(u,p,v,_){return(u/=_/2)<1?v/2*u*u*u*u*u+p:v/2*((u-=2)*u*u*u*u+2)+p},Linear(u,p,v,_){return v*u/_+p}}})(nd);const z7=Tn(nd),V7=Rt({__proto__:null,default:z7},[nd]),B7=Dt(V7);(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.Konva=void 0;const t=te,e=Ae,r=je,i=Pl,s=x7,a=X1,o=M7,h=Zu,l=Gu,c=Je,f=ed,d=B7,u=k1,p=xl;n.Konva=e.Util._assign(t.Konva,{Util:e.Util,Transform:e.Transform,Node:r.Node,Container:i.Container,Stage:s.Stage,stages:s.stages,Layer:a.Layer,FastLayer:o.FastLayer,Group:h.Group,DD:l.DD,Shape:c.Shape,shapes:c.shapes,Animation:f.Animation,Tween:d.Tween,Easings:d.Easings,Context:u.Context,Canvas:p.Canvas}),n.default=n.Konva})(Mu);const H7=Tn(Mu),q7=Rt({__proto__:null,default:H7},[Mu]),K7=Dt(q7);var Ta={};Object.defineProperty(Ta,"__esModule",{value:!0});var ty=Ta.Arc=void 0;const El=Wt,Y7=Je,ey=te,Al=ee,X7=te;class Ir extends Y7.Shape{_sceneFunc(t){var e=ey.Konva.getAngle(this.angle()),r=this.clockwise();t.beginPath(),t.arc(0,0,this.outerRadius(),0,e,r),t.arc(0,0,this.innerRadius(),e,0,!r),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(),e=this.outerRadius(),r=this.clockwise(),i=ey.Konva.getAngle(r?360-this.angle():this.angle()),s=Math.cos(Math.min(i,Math.PI)),a=1,o=Math.sin(Math.min(Math.max(Math.PI,i),3*Math.PI/2)),h=Math.sin(Math.min(i,Math.PI/2)),l=s*(s>0?t:e),c=a*e,f=o*(o>0?t:e),d=h*(h>0?e:t);return{x:l,y:r?-1*d:f,width:c-l,height:d-f}}}ty=Ta.Arc=Ir,Ir.prototype._centroid=!0,Ir.prototype.className="Arc",Ir.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,X7._registerNode)(Ir),El.Factory.addGetterSetter(Ir,"innerRadius",0,(0,Al.getNumberValidator)()),El.Factory.addGetterSetter(Ir,"outerRadius",0,(0,Al.getNumberValidator)()),El.Factory.addGetterSetter(Ir,"angle",0,(0,Al.getNumberValidator)()),El.Factory.addGetterSetter(Ir,"clockwise",!1,(0,Al.getBooleanValidator)());const J7=Rt({__proto__:null,get Arc(){return ty},default:Ta},[Ta]),Q7=Dt(J7);var Pa={},Ea={};Object.defineProperty(Ea,"__esModule",{value:!0});var ny=Ea.Line=void 0;const Ol=Wt,Z7=Je,ry=ee,W7=te;function rd(n,t,e,r,i,s,a){var o=Math.sqrt(Math.pow(e-n,2)+Math.pow(r-t,2)),h=Math.sqrt(Math.pow(i-e,2)+Math.pow(s-r,2)),l=a*o/(o+h),c=a*h/(o+h),f=e-l*(i-n),d=r-l*(s-t),u=e+c*(i-n),p=r+c*(s-t);return[f,d,u,p]}function iy(n,t){var e=n.length,r=[],i,s;for(i=2;i<e-2;i+=2)s=rd(n[i-2],n[i-1],n[i],n[i+1],n[i+2],n[i+3],t),!isNaN(s[0])&&(r.push(s[0]),r.push(s[1]),r.push(n[i]),r.push(n[i+1]),r.push(s[2]),r.push(s[3]));return r}class ri extends Z7.Shape{constructor(t){super(t),this.on("pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva",function(){this._clearCache("tensionPoints")})}_sceneFunc(t){var e=this.points(),r=e.length,i=this.tension(),s=this.closed(),a=this.bezier(),o,h,l;if(r){if(t.beginPath(),t.moveTo(e[0],e[1]),i!==0&&r>4){for(o=this.getTensionPoints(),h=o.length,l=s?0:4,s||t.quadraticCurveTo(o[0],o[1],o[2],o[3]);l<h-2;)t.bezierCurveTo(o[l++],o[l++],o[l++],o[l++],o[l++],o[l++]);s||t.quadraticCurveTo(o[h-2],o[h-1],e[r-2],e[r-1])}else if(a)for(l=2;l<r;)t.bezierCurveTo(e[l++],e[l++],e[l++],e[l++],e[l++],e[l++]);else for(l=2;l<r;l+=2)t.lineTo(e[l],e[l+1]);s?(t.closePath(),t.fillStrokeShape(this)):t.strokeShape(this)}}getTensionPoints(){return this._getCache("tensionPoints",this._getTensionPoints)}_getTensionPoints(){return this.closed()?this._getTensionPointsClosed():iy(this.points(),this.tension())}_getTensionPointsClosed(){var t=this.points(),e=t.length,r=this.tension(),i=rd(t[e-2],t[e-1],t[0],t[1],t[2],t[3],r),s=rd(t[e-4],t[e-3],t[e-2],t[e-1],t[0],t[1],r),a=iy(t,r),o=[i[2],i[3]].concat(a).concat([s[0],s[1],t[e-2],t[e-1],s[2],s[3],i[0],i[1],t[0],t[1]]);return o}getWidth(){return this.getSelfRect().width}getHeight(){return this.getSelfRect().height}getSelfRect(){var 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();for(var e=t[0],r=t[0],i=t[1],s=t[1],a,o,h=0;h<t.length/2;h++)a=t[h*2],o=t[h*2+1],e=Math.min(e,a),r=Math.max(r,a),i=Math.min(i,o),s=Math.max(s,o);return{x:e,y:i,width:r-e,height:s-i}}}ny=Ea.Line=ri,ri.prototype.className="Line",ri.prototype._attrsAffectingSize=["points","bezier","tension"],(0,W7._registerNode)(ri),Ol.Factory.addGetterSetter(ri,"closed",!1),Ol.Factory.addGetterSetter(ri,"bezier",!1),Ol.Factory.addGetterSetter(ri,"tension",0,(0,ry.getNumberValidator)()),Ol.Factory.addGetterSetter(ri,"points",[],(0,ry.getNumberArrayValidator)());const tT=Rt({__proto__:null,get Line(){return ny},default:Ea},[Ea]),sy=Dt(tT);var Aa={},id={};(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.t2length=n.getQuadraticArcLength=n.getCubicArcLength=n.binomialCoefficients=n.cValues=n.tValues=void 0,n.tValues=[[],[],[-.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]],n.cValues=[[],[],[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]],n.binomialCoefficients=[[1],[1,1],[1,2,1],[1,3,3,1]];const t=(a,o,h)=>{let l,c,f;l=h/2,c=0;for(let d=0;d<20;d++)f=l*n.tValues[20][d]+l,c+=n.cValues[20][d]*r(a,o,f);return l*c};n.getCubicArcLength=t;const e=(a,o,h)=>{h===void 0&&(h=1);const l=a[0]-2*a[1]+a[2],c=o[0]-2*o[1]+o[2],f=2*a[1]-2*a[0],d=2*o[1]-2*o[0],u=4*(l*l+c*c),p=4*(l*f+c*d),v=f*f+d*d;if(u===0)return h*Math.sqrt(Math.pow(a[2]-a[0],2)+Math.pow(o[2]-o[0],2));const _=p/(2*u),S=v/u,x=h+_,m=S-_*_,k=x*x+m>0?Math.sqrt(x*x+m):0,F=_*_+m>0?Math.sqrt(_*_+m):0,P=_+Math.sqrt(_*_+m)!==0?m*Math.log(Math.abs((x+k)/(_+F))):0;return Math.sqrt(u)/2*(x*k-_*F+P)};n.getQuadraticArcLength=e;function r(a,o,h){const l=i(1,h,a),c=i(1,h,o),f=l*l+c*c;return Math.sqrt(f)}const i=(a,o,h)=>{const l=h.length-1;let c,f;if(l===0)return 0;if(a===0){f=0;for(let d=0;d<=l;d++)f+=n.binomialCoefficients[l][d]*Math.pow(1-o,l-d)*Math.pow(o,d)*h[d];return f}else{c=new Array(l);for(let d=0;d<l;d++)c[d]=l*(h[d+1]-h[d]);return i(a-1,o,c)}},s=(a,o,h)=>{let l=1,c=a/o,f=(a-h(c))/o,d=0;for(;l>.001;){const u=h(c+f),p=Math.abs(a-u)/o;if(p<l)l=p,c+=f;else{const v=h(c-f),_=Math.abs(a-v)/o;_<l?(l=_,c-=f):f/=2}if(d++,d>500)break}return c};n.t2length=s})(id);const eT=Tn(id),nT=Rt({__proto__:null,default:eT},[id]),rT=Dt(nT);Object.defineProperty(Aa,"__esModule",{value:!0});var ay=Aa.Path=void 0;const iT=Wt,sT=Je,aT=te,fs=rT;class Be extends sT.Shape{constructor(t){super(t),this.dataArray=[],this.pathLength=0,this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute()})}_readDataAttribute(){this.dataArray=Be.parsePathData(this.data()),this.pathLength=Be.getPathLength(this.dataArray)}_sceneFunc(t){var e=this.dataArray;t.beginPath();for(var r=!1,i=0;i<e.length;i++){var s=e[i].command,a=e[i].points;switch(s){case"L":t.lineTo(a[0],a[1]);break;case"M":t.moveTo(a[0],a[1]);break;case"C":t.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"Q":t.quadraticCurveTo(a[0],a[1],a[2],a[3]);break;case"A":var o=a[0],h=a[1],l=a[2],c=a[3],f=a[4],d=a[5],u=a[6],p=a[7],v=l>c?l:c,_=l>c?1:l/c,S=l>c?c/l:1;t.translate(o,h),t.rotate(u),t.scale(_,S),t.arc(0,0,v,f,f+d,1-p),t.scale(1/_,1/S),t.rotate(-u),t.translate(-o,-h);break;case"z":r=!0,t.closePath();break}}!r&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(l){if(l.command==="A"){var c=l.points[4],f=l.points[5],d=l.points[4]+f,u=Math.PI/180;if(Math.abs(c-d)<u&&(u=Math.abs(c-d)),f<0)for(let p=c-u;p>d;p-=u){const v=Be.getPointOnEllipticalArc(l.points[0],l.points[1],l.points[2],l.points[3],p,0);t.push(v.x,v.y)}else for(let p=c+u;p<d;p+=u){const v=Be.getPointOnEllipticalArc(l.points[0],l.points[1],l.points[2],l.points[3],p,0);t.push(v.x,v.y)}}else if(l.command==="C")for(let p=0;p<=1;p+=.01){const v=Be.getPointOnCubicBezier(p,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(v.x,v.y)}else t=t.concat(l.points)});for(var e=t[0],r=t[0],i=t[1],s=t[1],a,o,h=0;h<t.length/2;h++)a=t[h*2],o=t[h*2+1],isNaN(a)||(e=Math.min(e,a),r=Math.max(r,a)),isNaN(o)||(i=Math.min(i,o),s=Math.max(s,o));return{x:e,y:i,width:r-e,height:s-i}}getLength(){return this.pathLength}getPointAtLength(t){return Be.getPointAtLengthOfDataArray(t,this.dataArray)}static getLineLength(t,e,r,i){return Math.sqrt((r-t)*(r-t)+(i-e)*(i-e))}static getPathLength(t){let e=0;for(var r=0;r<t.length;++r)e+=t[r].pathLength;return e}static getPointAtLengthOfDataArray(t,e){var r,i=0,s=e.length;if(!s)return null;for(;i<s&&t>e[i].pathLength;)t-=e[i].pathLength,++i;if(i===s)return r=e[i-1].points.slice(-2),{x:r[0],y:r[1]};if(t<.01)return r=e[i].points.slice(0,2),{x:r[0],y:r[1]};var a=e[i],o=a.points;switch(a.command){case"L":return Be.getPointOnLine(t,a.start.x,a.start.y,o[0],o[1]);case"C":return Be.getPointOnCubicBezier((0,fs.t2length)(t,Be.getPathLength(e),v=>(0,fs.getCubicArcLength)([a.start.x,o[0],o[2],o[4]],[a.start.y,o[1],o[3],o[5]],v)),a.start.x,a.start.y,o[0],o[1],o[2],o[3],o[4],o[5]);case"Q":return Be.getPointOnQuadraticBezier((0,fs.t2length)(t,Be.getPathLength(e),v=>(0,fs.getQuadraticArcLength)([a.start.x,o[0],o[2]],[a.start.y,o[1],o[3]],v)),a.start.x,a.start.y,o[0],o[1],o[2],o[3]);case"A":var h=o[0],l=o[1],c=o[2],f=o[3],d=o[4],u=o[5],p=o[6];return d+=u*t/a.pathLength,Be.getPointOnEllipticalArc(h,l,c,f,d,p)}return null}static getPointOnLine(t,e,r,i,s,a,o){a===void 0&&(a=e),o===void 0&&(o=r);var h=(s-r)/(i-e+1e-8),l=Math.sqrt(t*t/(1+h*h));i<e&&(l*=-1);var c=h*l,f;if(i===e)f={x:a,y:o+c};else if((o-r)/(a-e+1e-8)===h)f={x:a+l,y:o+c};else{var d,u,p=this.getLineLength(e,r,i,s),v=(a-e)*(i-e)+(o-r)*(s-r);v=v/(p*p),d=e+v*(i-e),u=r+v*(s-r);var _=this.getLineLength(a,o,d,u),S=Math.sqrt(t*t-_*_);l=Math.sqrt(S*S/(1+h*h)),i<e&&(l*=-1),c=h*l,f={x:d+l,y:u+c}}return f}static getPointOnCubicBezier(t,e,r,i,s,a,o,h,l){function c(_){return _*_*_}function f(_){return 3*_*_*(1-_)}function d(_){return 3*_*(1-_)*(1-_)}function u(_){return(1-_)*(1-_)*(1-_)}var p=h*c(t)+a*f(t)+i*d(t)+e*u(t),v=l*c(t)+o*f(t)+s*d(t)+r*u(t);return{x:p,y:v}}static getPointOnQuadraticBezier(t,e,r,i,s,a,o){function h(u){return u*u}function l(u){return 2*u*(1-u)}function c(u){return(1-u)*(1-u)}var f=a*h(t)+i*l(t)+e*c(t),d=o*h(t)+s*l(t)+r*c(t);return{x:f,y:d}}static getPointOnEllipticalArc(t,e,r,i,s,a){var o=Math.cos(a),h=Math.sin(a),l={x:r*Math.cos(s),y:i*Math.sin(s)};return{x:t+(l.x*o-l.y*h),y:e+(l.x*h+l.y*o)}}static parsePathData(t){if(!t)return[];var e=t,r=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"];e=e.replace(new RegExp(" ","g"),",");for(var i=0;i<r.length;i++)e=e.replace(new RegExp(r[i],"g"),"|"+r[i]);var s=e.split("|"),a=[],o=[],h=0,l=0,c=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi,f;for(i=1;i<s.length;i++){var d=s[i],u=d.charAt(0);for(d=d.slice(1),o.length=0;f=c.exec(d);)o.push(f[0]);for(var p=[],v=0,_=o.length;v<_;v++){if(o[v]==="00"){p.push(0,0);continue}var S=parseFloat(o[v]);isNaN(S)?p.push(0):p.push(S)}for(;p.length>0&&!isNaN(p[0]);){var x="",m=[],k=h,F=l,P,N,R,L,U,B,K,tt,W,lt;switch(u){case"l":h+=p.shift(),l+=p.shift(),x="L",m.push(h,l);break;case"L":h=p.shift(),l=p.shift(),m.push(h,l);break;case"m":var wt=p.shift(),bt=p.shift();if(h+=wt,l+=bt,x="M",a.length>2&&a[a.length-1].command==="z"){for(var xt=a.length-2;xt>=0;xt--)if(a[xt].command==="M"){h=a[xt].points[0]+wt,l=a[xt].points[1]+bt;break}}m.push(h,l),u="l";break;case"M":h=p.shift(),l=p.shift(),x="M",m.push(h,l),u="L";break;case"h":h+=p.shift(),x="L",m.push(h,l);break;case"H":h=p.shift(),x="L",m.push(h,l);break;case"v":l+=p.shift(),x="L",m.push(h,l);break;case"V":l=p.shift(),x="L",m.push(h,l);break;case"C":m.push(p.shift(),p.shift(),p.shift(),p.shift()),h=p.shift(),l=p.shift(),m.push(h,l);break;case"c":m.push(h+p.shift(),l+p.shift(),h+p.shift(),l+p.shift()),h+=p.shift(),l+=p.shift(),x="C",m.push(h,l);break;case"S":N=h,R=l,P=a[a.length-1],P.command==="C"&&(N=h+(h-P.points[2]),R=l+(l-P.points[3])),m.push(N,R,p.shift(),p.shift()),h=p.shift(),l=p.shift(),x="C",m.push(h,l);break;case"s":N=h,R=l,P=a[a.length-1],P.command==="C"&&(N=h+(h-P.points[2]),R=l+(l-P.points[3])),m.push(N,R,h+p.shift(),l+p.shift()),h+=p.shift(),l+=p.shift(),x="C",m.push(h,l);break;case"Q":m.push(p.shift(),p.shift()),h=p.shift(),l=p.shift(),m.push(h,l);break;case"q":m.push(h+p.shift(),l+p.shift()),h+=p.shift(),l+=p.shift(),x="Q",m.push(h,l);break;case"T":N=h,R=l,P=a[a.length-1],P.command==="Q"&&(N=h+(h-P.points[0]),R=l+(l-P.points[1])),h=p.shift(),l=p.shift(),x="Q",m.push(N,R,h,l);break;case"t":N=h,R=l,P=a[a.length-1],P.command==="Q"&&(N=h+(h-P.points[0]),R=l+(l-P.points[1])),h+=p.shift(),l+=p.shift(),x="Q",m.push(N,R,h,l);break;case"A":L=p.shift(),U=p.shift(),B=p.shift(),K=p.shift(),tt=p.shift(),W=h,lt=l,h=p.shift(),l=p.shift(),x="A",m=this.convertEndpointToCenterParameterization(W,lt,h,l,K,tt,L,U,B);break;case"a":L=p.shift(),U=p.shift(),B=p.shift(),K=p.shift(),tt=p.shift(),W=h,lt=l,h+=p.shift(),l+=p.shift(),x="A",m=this.convertEndpointToCenterParameterization(W,lt,h,l,K,tt,L,U,B);break}a.push({command:x||u,points:m,start:{x:k,y:F},pathLength:this.calcLength(k,F,x||u,m)})}(u==="z"||u==="Z")&&a.push({command:"z",points:[],start:void 0,pathLength:0})}return a}static calcLength(t,e,r,i){var s,a,o,h,l=Be;switch(r){case"L":return l.getLineLength(t,e,i[0],i[1]);case"C":return(0,fs.getCubicArcLength)([t,i[0],i[2],i[4]],[e,i[1],i[3],i[5]],1);case"Q":return(0,fs.getQuadraticArcLength)([t,i[0],i[2]],[e,i[1],i[3]],1);case"A":s=0;var c=i[4],f=i[5],d=i[4]+f,u=Math.PI/180;if(Math.abs(c-d)<u&&(u=Math.abs(c-d)),a=l.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],c,0),f<0)for(h=c-u;h>d;h-=u)o=l.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],h,0),s+=l.getLineLength(a.x,a.y,o.x,o.y),a=o;else for(h=c+u;h<d;h+=u)o=l.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],h,0),s+=l.getLineLength(a.x,a.y,o.x,o.y),a=o;return o=l.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],d,0),s+=l.getLineLength(a.x,a.y,o.x,o.y),s}return 0}static convertEndpointToCenterParameterization(t,e,r,i,s,a,o,h,l){var c=l*(Math.PI/180),f=Math.cos(c)*(t-r)/2+Math.sin(c)*(e-i)/2,d=-1*Math.sin(c)*(t-r)/2+Math.cos(c)*(e-i)/2,u=f*f/(o*o)+d*d/(h*h);u>1&&(o*=Math.sqrt(u),h*=Math.sqrt(u));var p=Math.sqrt((o*o*(h*h)-o*o*(d*d)-h*h*(f*f))/(o*o*(d*d)+h*h*(f*f)));s===a&&(p*=-1),isNaN(p)&&(p=0);var v=p*o*d/h,_=p*-h*f/o,S=(t+r)/2+Math.cos(c)*v-Math.sin(c)*_,x=(e+i)/2+Math.sin(c)*v+Math.cos(c)*_,m=function(U){return Math.sqrt(U[0]*U[0]+U[1]*U[1])},k=function(U,B){return(U[0]*B[0]+U[1]*B[1])/(m(U)*m(B))},F=function(U,B){return(U[0]*B[1]<U[1]*B[0]?-1:1)*Math.acos(k(U,B))},P=F([1,0],[(f-v)/o,(d-_)/h]),N=[(f-v)/o,(d-_)/h],R=[(-1*f-v)/o,(-1*d-_)/h],L=F(N,R);return k(N,R)<=-1&&(L=Math.PI),k(N,R)>=1&&(L=0),a===0&&L>0&&(L=L-2*Math.PI),a===1&&L<0&&(L=L+2*Math.PI),[S,x,o,h,P,L,c,a]}}ay=Aa.Path=Be,Be.prototype.className="Path",Be.prototype._attrsAffectingSize=["data"],(0,aT._registerNode)(Be),iT.Factory.addGetterSetter(Be,"data");const oT=Rt({__proto__:null,get Path(){return ay},default:Aa},[Aa]),sd=Dt(oT);Object.defineProperty(Pa,"__esModule",{value:!0});var oy=Pa.Arrow=void 0;const $l=Wt,lT=sy,ly=ee,hT=te,hy=sd;class Di extends lT.Line{_sceneFunc(t){super._sceneFunc(t);var e=Math.PI*2,r=this.points(),i=r,s=this.tension()!==0&&r.length>4;s&&(i=this.getTensionPoints());var a=this.pointerLength(),o=r.length,h,l;if(s){const d=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],r[o-2],r[o-1]],u=hy.Path.calcLength(i[i.length-4],i[i.length-3],"C",d),p=hy.Path.getPointOnQuadraticBezier(Math.min(1,1-a/u),d[0],d[1],d[2],d[3],d[4],d[5]);h=r[o-2]-p.x,l=r[o-1]-p.y}else h=r[o-2]-r[o-4],l=r[o-1]-r[o-3];var c=(Math.atan2(l,h)+e)%e,f=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[o-2],r[o-1]),t.rotate(c),t.moveTo(0,0),t.lineTo(-a,f/2),t.lineTo(-a,-f/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(r[0],r[1]),s?(h=(i[0]+i[2])/2-r[0],l=(i[1]+i[3])/2-r[1]):(h=r[2]-r[0],l=r[3]-r[1]),t.rotate((Math.atan2(-l,-h)+e)%e),t.moveTo(0,0),t.lineTo(-a,f/2),t.lineTo(-a,-f/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){var e=this.dashEnabled();e&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),e&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),e=this.pointerWidth()/2;return{x:t.x-e,y:t.y-e,width:t.width+e*2,height:t.height+e*2}}}oy=Pa.Arrow=Di,Di.prototype.className="Arrow",(0,hT._registerNode)(Di),$l.Factory.addGetterSetter(Di,"pointerLength",10,(0,ly.getNumberValidator)()),$l.Factory.addGetterSetter(Di,"pointerWidth",10,(0,ly.getNumberValidator)()),$l.Factory.addGetterSetter(Di,"pointerAtBeginning",!1),$l.Factory.addGetterSetter(Di,"pointerAtEnding",!0);const cT=Rt({__proto__:null,get Arrow(){return oy},default:Pa},[Pa]),uT=Dt(cT);var Oa={};Object.defineProperty(Oa,"__esModule",{value:!0});var cy=Oa.Circle=void 0;const dT=Wt,fT=Je,pT=ee,gT=te;class ps extends fT.Shape{_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)}}cy=Oa.Circle=ps,ps.prototype._centroid=!0,ps.prototype.className="Circle",ps.prototype._attrsAffectingSize=["radius"],(0,gT._registerNode)(ps),dT.Factory.addGetterSetter(ps,"radius",0,(0,pT.getNumberValidator)());const mT=Rt({__proto__:null,get Circle(){return cy},default:Oa},[Oa]),yT=Dt(mT);var $a={};Object.defineProperty($a,"__esModule",{value:!0});var uy=$a.Ellipse=void 0;const ad=Wt,vT=Je,dy=ee,_T=te;class ii extends vT.Shape{_sceneFunc(t){var e=this.radiusX(),r=this.radiusY();t.beginPath(),t.save(),e!==r&&t.scale(1,r/e),t.arc(0,0,e,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)}}uy=$a.Ellipse=ii,ii.prototype.className="Ellipse",ii.prototype._centroid=!0,ii.prototype._attrsAffectingSize=["radiusX","radiusY"],(0,_T._registerNode)(ii),ad.Factory.addComponentsGetterSetter(ii,"radius",["x","y"]),ad.Factory.addGetterSetter(ii,"radiusX",0,(0,dy.getNumberValidator)()),ad.Factory.addGetterSetter(ii,"radiusY",0,(0,dy.getNumberValidator)());const wT=Rt({__proto__:null,get Ellipse(){return uy},default:$a},[$a]),xT=Dt(wT);var Fa={};Object.defineProperty(Fa,"__esModule",{value:!0});var fy=Fa.Image=void 0;const od=Ae,Mi=Wt,bT=Je,ST=te,Na=ee;let mr=class Kv extends bT.Shape{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){const e=this.getWidth(),r=this.getHeight(),i=this.cornerRadius(),s=this.attrs.image;let a;if(s){const o=this.attrs.cropWidth,h=this.attrs.cropHeight;o&&h?a=[s,this.cropX(),this.cropY(),o,h,0,0,e,r]:a=[s,0,0,e,r]}(this.hasFill()||this.hasStroke()||i)&&(t.beginPath(),i?od.Util.drawRoundedRectPath(t,e,r,i):t.rect(0,0,e,r),t.closePath(),t.fillStrokeShape(this)),s&&(i&&t.clip(),t.drawImage.apply(t,a))}_hitFunc(t){var e=this.width(),r=this.height(),i=this.cornerRadius();t.beginPath(),i?od.Util.drawRoundedRectPath(t,e,r,i):t.rect(0,0,e,r),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,e;return(t=this.attrs.width)!==null&&t!==void 0?t:(e=this.image())===null||e===void 0?void 0:e.width}getHeight(){var t,e;return(t=this.attrs.height)!==null&&t!==void 0?t:(e=this.image())===null||e===void 0?void 0:e.height}static fromURL(t,e,r=null){var i=od.Util.createImageElement();i.onload=function(){var s=new Kv({image:i});e(s)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}};fy=Fa.Image=mr,mr.prototype.className="Image",(0,ST._registerNode)(mr),Mi.Factory.addGetterSetter(mr,"cornerRadius",0,(0,Na.getNumberOrArrayOfNumbersValidator)(4)),Mi.Factory.addGetterSetter(mr,"image"),Mi.Factory.addComponentsGetterSetter(mr,"crop",["x","y","width","height"]),Mi.Factory.addGetterSetter(mr,"cropX",0,(0,Na.getNumberValidator)()),Mi.Factory.addGetterSetter(mr,"cropY",0,(0,Na.getNumberValidator)()),Mi.Factory.addGetterSetter(mr,"cropWidth",0,(0,Na.getNumberValidator)()),Mi.Factory.addGetterSetter(mr,"cropHeight",0,(0,Na.getNumberValidator)());const kT=Rt({__proto__:null,get Image(){return fy},default:Fa},[Fa]),CT=Dt(kT);var Ii={};Object.defineProperty(Ii,"__esModule",{value:!0});var py=Ii.Tag=yy=Ii.Label=void 0;const Fl=Wt,TT=Je,PT=Zu,ld=ee,gy=te;var my=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],ET="Change.konva",AT="none",hd="up",cd="right",ud="down",dd="left",OT=my.length;class fd extends PT.Group{constructor(t){super(t),this.on("add.konva",function(e){this._addListeners(e.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){var e=this,r,i=function(){e._sync()};for(r=0;r<OT;r++)t.on(my[r]+ET,i)}getWidth(){return this.getText().width()}getHeight(){return this.getText().height()}_sync(){var t=this.getText(),e=this.getTag(),r,i,s,a,o,h,l;if(t&&e){switch(r=t.width(),i=t.height(),s=e.pointerDirection(),a=e.pointerWidth(),l=e.pointerHeight(),o=0,h=0,s){case hd:o=r/2,h=-1*l;break;case cd:o=r+a,h=i/2;break;case ud:o=r/2,h=i+l;break;case dd:o=-1*a,h=i/2;break}e.setAttrs({x:-1*o,y:-1*h,width:r,height:i}),t.setAttrs({x:-1*o,y:-1*h})}}}var yy=Ii.Label=fd;fd.prototype.className="Label",(0,gy._registerNode)(fd);class ji extends TT.Shape{_sceneFunc(t){var e=this.width(),r=this.height(),i=this.pointerDirection(),s=this.pointerWidth(),a=this.pointerHeight(),o=this.cornerRadius();let h=0,l=0,c=0,f=0;typeof o=="number"?h=l=c=f=Math.min(o,e/2,r/2):(h=Math.min(o[0]||0,e/2,r/2),l=Math.min(o[1]||0,e/2,r/2),f=Math.min(o[2]||0,e/2,r/2),c=Math.min(o[3]||0,e/2,r/2)),t.beginPath(),t.moveTo(h,0),i===hd&&(t.lineTo((e-s)/2,0),t.lineTo(e/2,-1*a),t.lineTo((e+s)/2,0)),t.lineTo(e-l,0),t.arc(e-l,l,l,Math.PI*3/2,0,!1),i===cd&&(t.lineTo(e,(r-a)/2),t.lineTo(e+s,r/2),t.lineTo(e,(r+a)/2)),t.lineTo(e,r-f),t.arc(e-f,r-f,f,0,Math.PI/2,!1),i===ud&&(t.lineTo((e+s)/2,r),t.lineTo(e/2,r+a),t.lineTo((e-s)/2,r)),t.lineTo(c,r),t.arc(c,r-c,c,Math.PI/2,Math.PI,!1),i===dd&&(t.lineTo(0,(r+a)/2),t.lineTo(-1*s,r/2),t.lineTo(0,(r-a)/2)),t.lineTo(0,h),t.arc(h,h,h,Math.PI,Math.PI*3/2,!1),t.closePath(),t.fillStrokeShape(this)}getSelfRect(){var t=0,e=0,r=this.pointerWidth(),i=this.pointerHeight(),s=this.pointerDirection(),a=this.width(),o=this.height();return s===hd?(e-=i,o+=i):s===ud?o+=i:s===dd?(t-=r*1.5,a+=r):s===cd&&(a+=r*1.5),{x:t,y:e,width:a,height:o}}}py=Ii.Tag=ji,ji.prototype.className="Tag",(0,gy._registerNode)(ji),Fl.Factory.addGetterSetter(ji,"pointerDirection",AT),Fl.Factory.addGetterSetter(ji,"pointerWidth",0,(0,ld.getNumberValidator)()),Fl.Factory.addGetterSetter(ji,"pointerHeight",0,(0,ld.getNumberValidator)()),Fl.Factory.addGetterSetter(ji,"cornerRadius",0,(0,ld.getNumberOrArrayOfNumbersValidator)(4));const $T=Rt({__proto__:null,get Label(){return yy},get Tag(){return py},default:Ii},[Ii]),FT=Dt($T);var Ra={};Object.defineProperty(Ra,"__esModule",{value:!0});var vy=Ra.Rect=void 0;const NT=Wt,RT=Je,DT=te,MT=Ae,IT=ee;class Nl extends RT.Shape{_sceneFunc(t){var e=this.cornerRadius(),r=this.width(),i=this.height();t.beginPath(),e?MT.Util.drawRoundedRectPath(t,r,i,e):t.rect(0,0,r,i),t.closePath(),t.fillStrokeShape(this)}}vy=Ra.Rect=Nl,Nl.prototype.className="Rect",(0,DT._registerNode)(Nl),NT.Factory.addGetterSetter(Nl,"cornerRadius",0,(0,IT.getNumberOrArrayOfNumbersValidator)(4));const jT=Rt({__proto__:null,get Rect(){return vy},default:Ra},[Ra]),_y=Dt(jT);var Da={};Object.defineProperty(Da,"__esModule",{value:!0});var wy=Da.RegularPolygon=void 0;const xy=Wt,LT=Je,by=ee,UT=te;class Li extends LT.Shape{_sceneFunc(t){const e=this._getPoints();t.beginPath(),t.moveTo(e[0].x,e[0].y);for(var r=1;r<e.length;r++)t.lineTo(e[r].x,e[r].y);t.closePath(),t.fillStrokeShape(this)}_getPoints(){const t=this.attrs.sides,e=this.attrs.radius||0,r=[];for(var i=0;i<t;i++)r.push({x:e*Math.sin(i*2*Math.PI/t),y:-1*e*Math.cos(i*2*Math.PI/t)});return r}getSelfRect(){const t=this._getPoints();var e=t[0].x,r=t[0].y,i=t[0].x,s=t[0].y;return t.forEach(a=>{e=Math.min(e,a.x),r=Math.max(r,a.x),i=Math.min(i,a.y),s=Math.max(s,a.y)}),{x:e,y:i,width:r-e,height:s-i}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}wy=Da.RegularPolygon=Li,Li.prototype.className="RegularPolygon",Li.prototype._centroid=!0,Li.prototype._attrsAffectingSize=["radius"],(0,UT._registerNode)(Li),xy.Factory.addGetterSetter(Li,"radius",0,(0,by.getNumberValidator)()),xy.Factory.addGetterSetter(Li,"sides",0,(0,by.getNumberValidator)());const GT=Rt({__proto__:null,get RegularPolygon(){return wy},default:Da},[Da]),zT=Dt(GT);var Ma={};Object.defineProperty(Ma,"__esModule",{value:!0});var Sy=Ma.Ring=void 0;const ky=Wt,VT=Je,Cy=ee,BT=te;var Ty=Math.PI*2;class Ui extends VT.Shape{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,Ty,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),Ty,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)}}Sy=Ma.Ring=Ui,Ui.prototype.className="Ring",Ui.prototype._centroid=!0,Ui.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,BT._registerNode)(Ui),ky.Factory.addGetterSetter(Ui,"innerRadius",0,(0,Cy.getNumberValidator)()),ky.Factory.addGetterSetter(Ui,"outerRadius",0,(0,Cy.getNumberValidator)());const HT=Rt({__proto__:null,get Ring(){return Sy},default:Ma},[Ma]),qT=Dt(HT);var Ia={};Object.defineProperty(Ia,"__esModule",{value:!0});var Py=Ia.Sprite=void 0;const Gi=Wt,KT=Je,YT=ed,Ey=ee,XT=te;class yr extends KT.Shape{constructor(t){super(t),this._updated=!0,this.anim=new YT.Animation(()=>{var e=this._updated;return this._updated=!1,e}),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){var e=this.animation(),r=this.frameIndex(),i=r*4,s=this.animations()[e],a=this.frameOffsets(),o=s[i+0],h=s[i+1],l=s[i+2],c=s[i+3],f=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,l,c),t.closePath(),t.fillStrokeShape(this)),f)if(a){var d=a[e],u=r*2;t.drawImage(f,o,h,l,c,d[u+0],d[u+1],l,c)}else t.drawImage(f,o,h,l,c,0,0,l,c)}_hitFunc(t){var e=this.animation(),r=this.frameIndex(),i=r*4,s=this.animations()[e],a=this.frameOffsets(),o=s[i+2],h=s[i+3];if(t.beginPath(),a){var l=a[e],c=r*2;t.rect(l[c+0],l[c+1],o,h)}else t.rect(0,0,o,h);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var 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(){var t=this.frameIndex(),e=this.animation(),r=this.animations(),i=r[e],s=i.length/4;t<s-1?this.frameIndex(t+1):this.frameIndex(0)}}Py=Ia.Sprite=yr,yr.prototype.className="Sprite",(0,XT._registerNode)(yr),Gi.Factory.addGetterSetter(yr,"animation"),Gi.Factory.addGetterSetter(yr,"animations"),Gi.Factory.addGetterSetter(yr,"frameOffsets"),Gi.Factory.addGetterSetter(yr,"image"),Gi.Factory.addGetterSetter(yr,"frameIndex",0,(0,Ey.getNumberValidator)()),Gi.Factory.addGetterSetter(yr,"frameRate",17,(0,Ey.getNumberValidator)()),Gi.Factory.backCompat(yr,{index:"frameIndex",getIndex:"getFrameIndex",setIndex:"setFrameIndex"});const JT=Rt({__proto__:null,get Sprite(){return Py},default:Ia},[Ia]),QT=Dt(JT);var ja={};Object.defineProperty(ja,"__esModule",{value:!0});var Ay=ja.Star=void 0;const pd=Wt,ZT=Je,gd=ee,WT=te;class si extends ZT.Shape{_sceneFunc(t){var e=this.innerRadius(),r=this.outerRadius(),i=this.numPoints();t.beginPath(),t.moveTo(0,0-r);for(var s=1;s<i*2;s++){var a=s%2===0?r:e,o=a*Math.sin(s*Math.PI/i),h=-1*a*Math.cos(s*Math.PI/i);t.lineTo(o,h)}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)}}Ay=ja.Star=si,si.prototype.className="Star",si.prototype._centroid=!0,si.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,WT._registerNode)(si),pd.Factory.addGetterSetter(si,"numPoints",5,(0,gd.getNumberValidator)()),pd.Factory.addGetterSetter(si,"innerRadius",0,(0,gd.getNumberValidator)()),pd.Factory.addGetterSetter(si,"outerRadius",0,(0,gd.getNumberValidator)());const tP=Rt({__proto__:null,get Star(){return Ay},default:ja},[ja]),eP=Dt(tP);var zi={};Object.defineProperty(zi,"__esModule",{value:!0});var Oy=zi.Text=Fy=zi.stringToArray=void 0;const md=Ae,sn=Wt,nP=Je,ai=ee,rP=te;function $y(n){return Array.from(n)}var Fy=zi.stringToArray=$y,gs="auto",iP="center",Ny="inherit",La="justify",sP="Change.konva",aP="2d",Ry="-",Dy="left",oP="text",lP="Text",hP="top",cP="bottom",My="middle",Iy="normal",uP="px ",Rl=" ",dP="right",jy="rtl",fP="word",pP="char",Ly="none",yd="…",Uy=["direction","fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],gP=Uy.length;function mP(n){return n.split(",").map(t=>{t=t.trim();const e=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return e&&!r&&(t=`"${t}"`),t}).join(", ")}var vd;function _d(){return vd||(vd=md.Util.createCanvasElement().getContext(aP),vd)}function yP(n){n.fillText(this._partialText,this._partialTextX,this._partialTextY)}function vP(n){n.setAttr("miterLimit",2),n.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function _P(n){return n=n||{},!n.fillLinearGradientColorStops&&!n.fillRadialGradientColorStops&&!n.fillPatternImage&&(n.fill=n.fill||"black"),n}class $e extends nP.Shape{constructor(t){super(_P(t)),this._partialTextX=0,this._partialTextY=0;for(var e=0;e<gP;e++)this.on(Uy[e]+sP,this._setTextData);this._setTextData()}_sceneFunc(t){var e=this.textArr,r=e.length;if(this.text()){var i=this.padding(),s=this.fontSize(),a=this.lineHeight()*s,o=this.verticalAlign(),h=this.direction(),l=0,c=this.align(),f=this.getWidth(),d=this.letterSpacing(),u=this.fill(),p=this.textDecoration(),v=p.indexOf("underline")!==-1,_=p.indexOf("line-through")!==-1,S;h=h===Ny?t.direction:h;var x=0,x=a/2,m=0,k=0;for(h===jy&&t.setAttr("direction",h),t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",My),t.setAttr("textAlign",Dy),o===My?l=(this.getHeight()-r*a-i*2)/2:o===cP&&(l=this.getHeight()-r*a-i*2),t.translate(i,l+i),S=0;S<r;S++){var m=0,k=0,F=e[S],P=F.text,N=F.width,R=F.lastInParagraph,L,U,B;if(t.save(),c===dP?m+=f-N-i*2:c===iP&&(m+=(f-N-i*2)/2),v){t.save(),t.beginPath(),t.moveTo(m,x+k+Math.round(s/2)),L=P.split(" ").length-1,U=L===0,B=c===La&&!R?f-i*2:N,t.lineTo(m+Math.round(B),x+k+Math.round(s/2)),t.lineWidth=s/15;const bt=this._getLinearGradient();t.strokeStyle=bt||u,t.stroke(),t.restore()}if(_){t.save(),t.beginPath(),t.moveTo(m,x+k),L=P.split(" ").length-1,U=L===0,B=c===La&&R&&!U?f-i*2:N,t.lineTo(m+Math.round(B),x+k),t.lineWidth=s/15;const bt=this._getLinearGradient();t.strokeStyle=bt||u,t.stroke(),t.restore()}if(h!==jy&&(d!==0||c===La)){L=P.split(" ").length-1;for(var K=$y(P),tt=0;tt<K.length;tt++){var W=K[tt];W===" "&&!R&&c===La&&(m+=(f-i*2-N)/L),this._partialTextX=m,this._partialTextY=x+k,this._partialText=W,t.fillStrokeShape(this),m+=this.measureSize(W).width+d}}else d!==0&&t.setAttr("letterSpacing",`${d}px`),this._partialTextX=m,this._partialTextY=x+k,this._partialText=P,t.fillStrokeShape(this);t.restore(),r>1&&(x+=a)}}}_hitFunc(t){var e=this.getWidth(),r=this.getHeight();t.beginPath(),t.rect(0,0,e,r),t.closePath(),t.fillStrokeShape(this)}setText(t){var e=md.Util._isString(t)?t:t==null?"":t+"";return this._setAttr(oP,e),this}getWidth(){var t=this.attrs.width===gs||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===gs||this.attrs.height===void 0;return t?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return md.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var e=_d(),r=this.fontSize(),i;return e.save(),e.font=this._getContextFont(),i=e.measureText(t),e.restore(),{width:i.width,height:r}}_getContextFont(){return this.fontStyle()+Rl+this.fontVariant()+Rl+(this.fontSize()+uP)+mP(this.fontFamily())}_addTextLine(t){this.align()===La&&(t=t.trim());var e=this._getTextWidth(t);return this.textArr.push({text:t,width:e,lastInParagraph:!1})}_getTextWidth(t){var e=this.letterSpacing(),r=t.length;return _d().measureText(t).width+(r?e*(r-1):0)}_setTextData(){var t=this.text().split(`
43
- `),e=+this.fontSize(),r=0,i=this.lineHeight()*e,s=this.attrs.width,a=this.attrs.height,o=s!==gs&&s!==void 0,h=a!==gs&&a!==void 0,l=this.padding(),c=s-l*2,f=a-l*2,d=0,u=this.wrap(),p=u!==Ly,v=u!==pP&&p,_=this.ellipsis();this.textArr=[],_d().font=this._getContextFont();for(var S=_?this._getTextWidth(yd):0,x=0,m=t.length;x<m;++x){var k=t[x],F=this._getTextWidth(k);if(o&&F>c)for(;k.length>0;){for(var P=0,N=k.length,R="",L=0;P<N;){var U=P+N>>>1,B=k.slice(0,U+1),K=this._getTextWidth(B)+S;K<=c?(P=U+1,R=B,L=K):N=U}if(R){if(v){var tt,W=k[R.length],lt=W===Rl||W===Ry;lt&&L<=c?tt=R.length:tt=Math.max(R.lastIndexOf(Rl),R.lastIndexOf(Ry))+1,tt>0&&(P=tt,R=R.slice(0,P),L=this._getTextWidth(R))}R=R.trimRight(),this._addTextLine(R),r=Math.max(r,L),d+=i;var wt=this._shouldHandleEllipsis(d);if(wt){this._tryToAddEllipsisToLastLine();break}if(k=k.slice(P),k=k.trimLeft(),k.length>0&&(F=this._getTextWidth(k),F<=c)){this._addTextLine(k),d+=i,r=Math.max(r,F);break}}else break}else this._addTextLine(k),d+=i,r=Math.max(r,F),this._shouldHandleEllipsis(d)&&x<m-1&&this._tryToAddEllipsisToLastLine();if(this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0),h&&d+i>f)break}this.textHeight=e,this.textWidth=r}_shouldHandleEllipsis(t){var e=+this.fontSize(),r=this.lineHeight()*e,i=this.attrs.height,s=i!==gs&&i!==void 0,a=this.padding(),o=i-a*2,h=this.wrap(),l=h!==Ly;return!l||s&&t+r>o}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,e=t!==gs&&t!==void 0,r=this.padding(),i=t-r*2,s=this.ellipsis(),a=this.textArr[this.textArr.length-1];if(!(!a||!s)){if(e){var o=this._getTextWidth(a.text+yd)<i;o||(a.text=a.text.slice(0,a.text.length-3))}this.textArr.splice(this.textArr.length-1,1),this._addTextLine(a.text+yd)}}getStrokeScaleEnabled(){return!0}_useBufferCanvas(){const t=this.textDecoration().indexOf("underline")!==-1||this.textDecoration().indexOf("line-through")!==-1,e=this.hasShadow();return t&&e?!0:super._useBufferCanvas()}}Oy=zi.Text=$e,$e.prototype._fillFunc=yP,$e.prototype._strokeFunc=vP,$e.prototype.className=lP,$e.prototype._attrsAffectingSize=["text","fontSize","padding","wrap","lineHeight","letterSpacing"],(0,rP._registerNode)($e),sn.Factory.overWriteSetter($e,"width",(0,ai.getNumberOrAutoValidator)()),sn.Factory.overWriteSetter($e,"height",(0,ai.getNumberOrAutoValidator)()),sn.Factory.addGetterSetter($e,"direction",Ny),sn.Factory.addGetterSetter($e,"fontFamily","Arial"),sn.Factory.addGetterSetter($e,"fontSize",12,(0,ai.getNumberValidator)()),sn.Factory.addGetterSetter($e,"fontStyle",Iy),sn.Factory.addGetterSetter($e,"fontVariant",Iy),sn.Factory.addGetterSetter($e,"padding",0,(0,ai.getNumberValidator)()),sn.Factory.addGetterSetter($e,"align",Dy),sn.Factory.addGetterSetter($e,"verticalAlign",hP),sn.Factory.addGetterSetter($e,"lineHeight",1,(0,ai.getNumberValidator)()),sn.Factory.addGetterSetter($e,"wrap",fP),sn.Factory.addGetterSetter($e,"ellipsis",!1,(0,ai.getBooleanValidator)()),sn.Factory.addGetterSetter($e,"letterSpacing",0,(0,ai.getNumberValidator)()),sn.Factory.addGetterSetter($e,"text","",(0,ai.getStringValidator)()),sn.Factory.addGetterSetter($e,"textDecoration","");const wP=Rt({__proto__:null,get Text(){return Oy},default:zi,get stringToArray(){return Fy}},[zi]),Gy=Dt(wP);var Ua={};Object.defineProperty(Ua,"__esModule",{value:!0});var zy=Ua.TextPath=void 0;const wd=Ae,Jn=Wt,xP=Je,Ga=sd,xd=Gy,Vy=ee,bP=te;var SP="",By="normal";function Hy(n){n.fillText(this.partialText,0,0)}function qy(n){n.strokeText(this.partialText,0,0)}class He extends xP.Shape{constructor(t){super(t),this.dummyCanvas=wd.Util.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 Ga.Path.getPathLength(this.dataArray)}_getPointAtLength(t){if(!this.attrs.data)return null;const e=this.pathLength;return t-1>e?null:Ga.Path.getPointAtLengthOfDataArray(t,this.dataArray)}_readDataAttribute(){this.dataArray=Ga.Path.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();var e=this.textDecoration(),r=this.fill(),i=this.fontSize(),s=this.glyphInfo;e==="underline"&&t.beginPath();for(var a=0;a<s.length;a++){t.save();var o=s[a].p0;t.translate(o.x,o.y),t.rotate(s[a].rotation),this.partialText=s[a].text,t.fillStrokeShape(this),e==="underline"&&(a===0&&t.moveTo(0,i/2+1),t.lineTo(i,i/2+1)),t.restore()}e==="underline"&&(t.strokeStyle=r,t.lineWidth=i/20,t.stroke()),t.restore()}_hitFunc(t){t.beginPath();var e=this.glyphInfo;if(e.length>=1){var r=e[0].p0;t.moveTo(r.x,r.y)}for(var i=0;i<e.length;i++){var s=e[i].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 wd.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}setText(t){return xd.Text.prototype.setText.call(this,t)}_getContextFont(){return xd.Text.prototype._getContextFont.call(this)}_getTextSize(t){var e=this.dummyCanvas,r=e.getContext("2d");r.save(),r.font=this._getContextFont();var i=r.measureText(t);return r.restore(),{width:i.width,height:parseInt(`${this.fontSize()}`,10)}}_setTextData(){const{width:t,height:e}=this._getTextSize(this.attrs.text);if(this.textWidth=t,this.textHeight=e,this.glyphInfo=[],!this.attrs.data)return null;const r=this.letterSpacing(),i=this.align(),s=this.kerningFunc(),a=Math.max(this.textWidth+((this.attrs.text||"").length-1)*r,0);let o=0;i==="center"&&(o=Math.max(0,this.pathLength/2-a/2)),i==="right"&&(o=Math.max(0,this.pathLength-a));const h=(0,xd.stringToArray)(this.text());let l=o;for(var c=0;c<h.length;c++){const f=this._getPointAtLength(l);if(!f)return;let d=this._getTextSize(h[c]).width+r;if(h[c]===" "&&i==="justify"){const x=this.text().split(" ").length-1;d+=(this.pathLength-a)/x}const u=this._getPointAtLength(l+d);if(!u)return;const p=Ga.Path.getLineLength(f.x,f.y,u.x,u.y);let v=0;if(s)try{v=s(h[c-1],h[c])*this.fontSize()}catch{v=0}f.x+=v,u.x+=v,this.textWidth+=v;const _=Ga.Path.getPointOnLine(v+p/2,f.x,f.y,u.x,u.y),S=Math.atan2(u.y-f.y,u.x-f.x);this.glyphInfo.push({transposeX:_.x,transposeY:_.y,text:h[c],rotation:S,p0:f,p1:u}),l+=d}}getSelfRect(){if(!this.glyphInfo.length)return{x:0,y:0,width:0,height:0};var 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)});for(var e=t[0]||0,r=t[0]||0,i=t[1]||0,s=t[1]||0,a,o,h=0;h<t.length/2;h++)a=t[h*2],o=t[h*2+1],e=Math.min(e,a),r=Math.max(r,a),i=Math.min(i,o),s=Math.max(s,o);var l=this.fontSize();return{x:e-l/2,y:i-l/2,width:r-e+l,height:s-i+l}}destroy(){return wd.Util.releaseCanvas(this.dummyCanvas),super.destroy()}}zy=Ua.TextPath=He,He.prototype._fillFunc=Hy,He.prototype._strokeFunc=qy,He.prototype._fillFuncHit=Hy,He.prototype._strokeFuncHit=qy,He.prototype.className="TextPath",He.prototype._attrsAffectingSize=["text","fontSize","data"],(0,bP._registerNode)(He),Jn.Factory.addGetterSetter(He,"data"),Jn.Factory.addGetterSetter(He,"fontFamily","Arial"),Jn.Factory.addGetterSetter(He,"fontSize",12,(0,Vy.getNumberValidator)()),Jn.Factory.addGetterSetter(He,"fontStyle",By),Jn.Factory.addGetterSetter(He,"align","left"),Jn.Factory.addGetterSetter(He,"letterSpacing",0,(0,Vy.getNumberValidator)()),Jn.Factory.addGetterSetter(He,"textBaseline","middle"),Jn.Factory.addGetterSetter(He,"fontVariant",By),Jn.Factory.addGetterSetter(He,"text",SP),Jn.Factory.addGetterSetter(He,"textDecoration",null),Jn.Factory.addGetterSetter(He,"kerningFunc",null);const kP=Rt({__proto__:null,get TextPath(){return zy},default:Ua},[Ua]),CP=Dt(kP);var za={};Object.defineProperty(za,"__esModule",{value:!0});var Ky=za.Transformer=void 0;const ve=Ae,ge=Wt,Yy=je,TP=Je,PP=_y,Xy=Zu,Qn=te,oi=ee,EP=te;var Jy="tr-konva",AP=["resizeEnabledChange","rotateAnchorOffsetChange","rotateEnabledChange","enabledAnchorsChange","anchorSizeChange","borderEnabledChange","borderStrokeChange","borderStrokeWidthChange","borderDashChange","anchorStrokeChange","anchorStrokeWidthChange","anchorFillChange","anchorCornerRadiusChange","ignoreStrokeChange","anchorStyleFuncChange"].map(n=>n+`.${Jy}`).join(" "),Qy="nodesRect",OP=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],$P={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};const FP="ontouchstart"in Qn.Konva._global;function NP(n,t,e){if(n==="rotater")return e;t+=ve.Util.degToRad($P[n]||0);var r=(ve.Util.radToDeg(t)%360+360)%360;return ve.Util._inRange(r,315+22.5,360)||ve.Util._inRange(r,0,22.5)?"ns-resize":ve.Util._inRange(r,45-22.5,45+22.5)?"nesw-resize":ve.Util._inRange(r,90-22.5,90+22.5)?"ew-resize":ve.Util._inRange(r,135-22.5,135+22.5)?"nwse-resize":ve.Util._inRange(r,180-22.5,180+22.5)?"ns-resize":ve.Util._inRange(r,225-22.5,225+22.5)?"nesw-resize":ve.Util._inRange(r,270-22.5,270+22.5)?"ew-resize":ve.Util._inRange(r,315-22.5,315+22.5)?"nwse-resize":(ve.Util.error("Transformer has unknown angle for cursor detection: "+r),"pointer")}var Dl=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],Zy=1e8;function RP(n){return{x:n.x+n.width/2*Math.cos(n.rotation)+n.height/2*Math.sin(-n.rotation),y:n.y+n.height/2*Math.cos(n.rotation)+n.width/2*Math.sin(n.rotation)}}function Wy(n,t,e){const r=e.x+(n.x-e.x)*Math.cos(t)-(n.y-e.y)*Math.sin(t),i=e.y+(n.x-e.x)*Math.sin(t)+(n.y-e.y)*Math.cos(t);return{...n,rotation:n.rotation+t,x:r,y:i}}function DP(n,t){const e=RP(n);return Wy(n,t,e)}function MP(n,t,e){let r=t;for(let i=0;i<n.length;i++){const s=Qn.Konva.getAngle(n[i]),a=Math.abs(s-t)%(Math.PI*2);Math.min(a,Math.PI*2-a)<e&&(r=s)}return r}class oe extends Xy.Group{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(AP,this.update),this.getNode()&&this.update()}attachTo(t){return this.setNode(t),this}setNode(t){return ve.Util.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 Jy+this._id}setNodes(t=[]){this._nodes&&this._nodes.length&&this.detach();const e=t.filter(i=>i.isAncestorOf(this)?(ve.Util.error("Konva.Transformer cannot be an a child of the node you are trying to attach"),!1):!0);this._nodes=t=e,t.length===1&&this.useSingleNodeRotation()?this.rotation(t[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach(i=>{const s=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},a=i._attrsAffectingSize.map(o=>o+"Change."+this._getEventNamespace()).join(" ");i.on(a,s),i.on(OP.map(o=>o+`.${this._getEventNamespace()}`).join(" "),s),i.on(`absoluteTransformChange.${this._getEventNamespace()}`,s),this._proxyDrag(i)}),this._resetTransformCache();var r=!!this.findOne(".top-left");return r&&this.update(),this}_proxyDrag(t){let e;t.on(`dragstart.${this._getEventNamespace()}`,r=>{e=t.getAbsolutePosition(),!this.isDragging()&&t!==this.findOne(".back")&&this.startDrag(r,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,r=>{if(!e)return;const i=t.getAbsolutePosition(),s=i.x-e.x,a=i.y-e.y;this.nodes().forEach(o=>{if(o===t||o.isDragging())return;const h=o.getAbsolutePosition();o.setAbsolutePosition({x:h.x+s,y:h.y+a}),o.startDrag(r)}),e=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(Qy),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(Qy,this.__getNodeRect)}__getNodeShape(t,e=this.rotation(),r){var i=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),s=t.getAbsoluteScale(r),a=t.getAbsolutePosition(r),o=i.x*s.x-t.offsetX()*s.x,h=i.y*s.y-t.offsetY()*s.y;const l=(Qn.Konva.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),c={x:a.x+o*Math.cos(l)+h*Math.sin(-l),y:a.y+h*Math.cos(l)+o*Math.sin(l),width:i.width*s.x,height:i.height*s.y,rotation:l};return Wy(c,-Qn.Konva.getAngle(e),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-Zy,y:-Zy,width:0,height:0,rotation:0};const e=[];this.nodes().map(l=>{const c=l.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var f=[{x:c.x,y:c.y},{x:c.x+c.width,y:c.y},{x:c.x+c.width,y:c.y+c.height},{x:c.x,y:c.y+c.height}],d=l.getAbsoluteTransform();f.forEach(function(u){var p=d.point(u);e.push(p)})});const r=new ve.Transform;r.rotate(-Qn.Konva.getAngle(this.rotation()));var i=1/0,s=1/0,a=-1/0,o=-1/0;e.forEach(function(l){var c=r.point(l);i===void 0&&(i=a=c.x,s=o=c.y),i=Math.min(i,c.x),s=Math.min(s,c.y),a=Math.max(a,c.x),o=Math.max(o,c.y)}),r.invert();const h=r.point({x:i,y:s});return{x:h.x,y:h.y,width:a-i,height:o-s,rotation:Qn.Konva.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(),Dl.forEach(t=>{this._createAnchor(t)}),this._createAnchor("rotater")}_createAnchor(t){var e=new PP.Rect({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:FP?10:"auto"}),r=this;e.on("mousedown touchstart",function(i){r._handleMouseDown(i)}),e.on("dragstart",i=>{e.stopDrag(),i.cancelBubble=!0}),e.on("dragend",i=>{i.cancelBubble=!0}),e.on("mouseenter",()=>{var i=Qn.Konva.getAngle(this.rotation()),s=this.rotateAnchorCursor(),a=NP(t,i,s);e.getStage().content&&(e.getStage().content.style.cursor=a),this._cursorChange=!0}),e.on("mouseout",()=>{e.getStage().content&&(e.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(e)}_createBack(){var t=new TP.Shape({name:"back",width:0,height:0,draggable:!0,sceneFunc(e,r){var i=r.getParent(),s=i.padding();e.beginPath(),e.rect(-s,-s,r.width()+s*2,r.height()+s*2),e.moveTo(r.width()/2,-s),i.rotateEnabled()&&e.lineTo(r.width()/2,-i.rotateAnchorOffset()*ve.Util._sign(r.height())-s),e.fillStrokeShape(r)},hitFunc:(e,r)=>{if(this.shouldOverdrawWholeArea()){var i=this.padding();e.beginPath(),e.rect(-i,-i,r.width()+i*2,r.height()+i*2),e.fillStrokeShape(r)}}});this.add(t),this._proxyDrag(t),t.on("dragstart",e=>{e.cancelBubble=!0}),t.on("dragmove",e=>{e.cancelBubble=!0}),t.on("dragend",e=>{e.cancelBubble=!0}),this.on("dragmove",e=>{this.update()})}_handleMouseDown(t){this._movingAnchorName=t.target.name().split(" ")[0];var e=this._getNodeRect(),r=e.width,i=e.height,s=Math.sqrt(Math.pow(r,2)+Math.pow(i,2));this.sin=Math.abs(i/s),this.cos=Math.abs(r/s),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;var a=t.target.getAbsolutePosition(),o=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:o.x-a.x,y:o.y-a.y},this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(h=>{h._fire("transformstart",{evt:t.evt,target:h})})}_handleMouseMove(t){var e,r,i,s=this.findOne("."+this._movingAnchorName),a=s.getStage();a.setPointersPositions(t);const o=a.getPointerPosition();let h={x:o.x-this._anchorDragOffset.x,y:o.y-this._anchorDragOffset.y};const l=s.getAbsolutePosition();this.anchorDragBoundFunc()&&(h=this.anchorDragBoundFunc()(l,h,t)),s.setAbsolutePosition(h);const c=s.getAbsolutePosition();if(!(l.x===c.x&&l.y===c.y)){if(this._movingAnchorName==="rotater"){var f=this._getNodeRect();e=s.x()-f.width/2,r=-s.y()+f.height/2;let tt=Math.atan2(-r,e)+Math.PI/2;f.height<0&&(tt-=Math.PI);var d=Qn.Konva.getAngle(this.rotation());const W=d+tt,lt=Qn.Konva.getAngle(this.rotationSnapTolerance()),wt=MP(this.rotationSnaps(),W,lt)-f.rotation,bt=DP(f,wt);this._fitNodesInto(bt,t);return}var u=this.shiftBehavior(),p;u==="inverted"?p=this.keepRatio()&&!t.shiftKey:u==="none"?p=this.keepRatio():p=this.keepRatio()||t.shiftKey;var m=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(p){var v=m?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};i=Math.sqrt(Math.pow(v.x-s.x(),2)+Math.pow(v.y-s.y(),2));var _=this.findOne(".top-left").x()>v.x?-1:1,S=this.findOne(".top-left").y()>v.y?-1:1;e=i*this.cos*_,r=i*this.sin*S,this.findOne(".top-left").x(v.x-e),this.findOne(".top-left").y(v.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(s.y());else if(this._movingAnchorName==="top-right"){if(p){var v=m?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};i=Math.sqrt(Math.pow(s.x()-v.x,2)+Math.pow(v.y-s.y(),2));var _=this.findOne(".top-right").x()<v.x?-1:1,S=this.findOne(".top-right").y()>v.y?-1:1;e=i*this.cos*_,r=i*this.sin*S,this.findOne(".top-right").x(v.x+e),this.findOne(".top-right").y(v.y-r)}var x=s.position();this.findOne(".top-left").y(x.y),this.findOne(".bottom-right").x(x.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(s.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(s.x());else if(this._movingAnchorName==="bottom-left"){if(p){var v=m?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};i=Math.sqrt(Math.pow(v.x-s.x(),2)+Math.pow(s.y()-v.y,2));var _=v.x<s.x()?-1:1,S=s.y()<v.y?-1:1;e=i*this.cos*_,r=i*this.sin*S,s.x(v.x-e),s.y(v.y+r)}x=s.position(),this.findOne(".top-left").x(x.x),this.findOne(".bottom-right").y(x.y)}else if(this._movingAnchorName==="bottom-center")this.findOne(".bottom-right").y(s.y());else if(this._movingAnchorName==="bottom-right"){if(p){var v=m?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-left").x(),y:this.findOne(".top-left").y()};i=Math.sqrt(Math.pow(s.x()-v.x,2)+Math.pow(s.y()-v.y,2));var _=this.findOne(".bottom-right").x()<v.x?-1:1,S=this.findOne(".bottom-right").y()<v.y?-1:1;e=i*this.cos*_,r=i*this.sin*S,this.findOne(".bottom-right").x(v.x+e),this.findOne(".bottom-right").y(v.y+r)}}else console.error(new Error("Wrong position argument of selection resizer: "+this._movingAnchorName));var m=this.centeredScaling()||t.altKey;if(m){var k=this.findOne(".top-left"),F=this.findOne(".bottom-right"),P=k.x(),N=k.y(),R=this.getWidth()-F.x(),L=this.getHeight()-F.y();F.move({x:-P,y:-N}),k.move({x:R,y:L})}var U=this.findOne(".top-left").getAbsolutePosition();e=U.x,r=U.y;var B=this.findOne(".bottom-right").x()-this.findOne(".top-left").x(),K=this.findOne(".bottom-right").y()-this.findOne(".top-left").y();this._fitNodesInto({x:e,y:r,width:B,height:K,rotation:Qn.Konva.getAngle(this.rotation())},t)}}_handleMouseUp(t){this._removeEvents(t)}getAbsoluteTransform(){return this.getTransform()}_removeEvents(t){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));var e=this.getNode();this._fire("transformend",{evt:t,target:e}),e&&this._nodes.forEach(r=>{r._fire("transformend",{evt:t,target:r})}),this._movingAnchorName=null}}_fitNodesInto(t,e){var r=this._getNodeRect();const i=1;if(ve.Util._inRange(t.width,-this.padding()*2-i,i)){this.update();return}if(ve.Util._inRange(t.height,-this.padding()*2-i,i)){this.update();return}const s=this.flipEnabled();var a=new ve.Transform;if(a.rotate(Qn.Konva.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const f=a.point({x:-this.padding()*2,y:0});if(t.x+=f.x,t.y+=f.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=f.x,this._anchorDragOffset.y-=f.y,!s){this.update();return}}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const f=a.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=f.x,this._anchorDragOffset.y-=f.y,t.width+=this.padding()*2,!s){this.update();return}}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const f=a.point({x:0,y:-this.padding()*2});if(t.x+=f.x,t.y+=f.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=f.x,this._anchorDragOffset.y-=f.y,t.height+=this.padding()*2,!s){this.update();return}}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const f=a.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=f.x,this._anchorDragOffset.y-=f.y,t.height+=this.padding()*2,!s){this.update();return}}if(this.boundBoxFunc()){const f=this.boundBoxFunc()(r,t);f?t=f:ve.Util.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const o=1e7,h=new ve.Transform;h.translate(r.x,r.y),h.rotate(r.rotation),h.scale(r.width/o,r.height/o);const l=new ve.Transform;l.translate(t.x,t.y),l.rotate(t.rotation),l.scale(t.width/o,t.height/o);const c=l.multiply(h.invert());this._nodes.forEach(f=>{var d;const u=f.getParent().getAbsoluteTransform(),p=f.getTransform().copy();p.translate(f.offsetX(),f.offsetY());const v=new ve.Transform;v.multiply(u.copy().invert()).multiply(c).multiply(u).multiply(p);const _=v.decompose();f.setAttrs(_),this._fire("transform",{evt:e,target:f}),f._fire("transform",{evt:e,target:f}),(d=f.getLayer())===null||d===void 0||d.batchDraw()}),this.rotation(ve.Util._getRotation(t.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,e){this.findOne(t).setAttrs(e)}update(){var t,e=this._getNodeRect();this.rotation(ve.Util._getRotation(e.rotation));var r=e.width,i=e.height,s=this.enabledAnchors(),a=this.resizeEnabled(),o=this.padding(),h=this.anchorSize();const l=this.find("._anchor");l.forEach(f=>{f.setAttrs({width:h,height:h,offsetX:h/2,offsetY:h/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:h/2+o,offsetY:h/2+o,visible:a&&s.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:r/2,y:0,offsetY:h/2+o,visible:a&&s.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:r,y:0,offsetX:h/2-o,offsetY:h/2+o,visible:a&&s.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:h/2+o,visible:a&&s.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:r,y:i/2,offsetX:h/2-o,visible:a&&s.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:h/2+o,offsetY:h/2-o,visible:a&&s.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:r/2,y:i,offsetY:h/2-o,visible:a&&s.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:r,y:i,offsetX:h/2-o,offsetY:h/2-o,visible:a&&s.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:r/2,y:-this.rotateAnchorOffset()*ve.Util._sign(i)-o,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:r,height:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0});const c=this.anchorStyleFunc();c&&l.forEach(f=>{c(f)}),(t=this.getLayer())===null||t===void 0||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),Xy.Group.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return Yy.Node.prototype.toObject.call(this)}clone(t){var e=Yy.Node.prototype.clone.call(this,t);return e}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}Ky=za.Transformer=oe;function IP(n){return n instanceof Array||ve.Util.warn("enabledAnchors value should be an array"),n instanceof Array&&n.forEach(function(t){Dl.indexOf(t)===-1&&ve.Util.warn("Unknown anchor name: "+t+". Available names are: "+Dl.join(", "))}),n||[]}oe.prototype.className="Transformer",(0,EP._registerNode)(oe),ge.Factory.addGetterSetter(oe,"enabledAnchors",Dl,IP),ge.Factory.addGetterSetter(oe,"flipEnabled",!0,(0,oi.getBooleanValidator)()),ge.Factory.addGetterSetter(oe,"resizeEnabled",!0),ge.Factory.addGetterSetter(oe,"anchorSize",10,(0,oi.getNumberValidator)()),ge.Factory.addGetterSetter(oe,"rotateEnabled",!0),ge.Factory.addGetterSetter(oe,"rotationSnaps",[]),ge.Factory.addGetterSetter(oe,"rotateAnchorOffset",50,(0,oi.getNumberValidator)()),ge.Factory.addGetterSetter(oe,"rotateAnchorCursor","crosshair"),ge.Factory.addGetterSetter(oe,"rotationSnapTolerance",5,(0,oi.getNumberValidator)()),ge.Factory.addGetterSetter(oe,"borderEnabled",!0),ge.Factory.addGetterSetter(oe,"anchorStroke","rgb(0, 161, 255)"),ge.Factory.addGetterSetter(oe,"anchorStrokeWidth",1,(0,oi.getNumberValidator)()),ge.Factory.addGetterSetter(oe,"anchorFill","white"),ge.Factory.addGetterSetter(oe,"anchorCornerRadius",0,(0,oi.getNumberValidator)()),ge.Factory.addGetterSetter(oe,"borderStroke","rgb(0, 161, 255)"),ge.Factory.addGetterSetter(oe,"borderStrokeWidth",1,(0,oi.getNumberValidator)()),ge.Factory.addGetterSetter(oe,"borderDash"),ge.Factory.addGetterSetter(oe,"keepRatio",!0),ge.Factory.addGetterSetter(oe,"shiftBehavior","default"),ge.Factory.addGetterSetter(oe,"centeredScaling",!1),ge.Factory.addGetterSetter(oe,"ignoreStroke",!1),ge.Factory.addGetterSetter(oe,"padding",0,(0,oi.getNumberValidator)()),ge.Factory.addGetterSetter(oe,"node"),ge.Factory.addGetterSetter(oe,"nodes"),ge.Factory.addGetterSetter(oe,"boundBoxFunc"),ge.Factory.addGetterSetter(oe,"anchorDragBoundFunc"),ge.Factory.addGetterSetter(oe,"anchorStyleFunc"),ge.Factory.addGetterSetter(oe,"shouldOverdrawWholeArea",!1),ge.Factory.addGetterSetter(oe,"useSingleNodeRotation",!0),ge.Factory.backCompat(oe,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});const jP=Rt({__proto__:null,get Transformer(){return Ky},default:za},[za]),LP=Dt(jP);var Va={};Object.defineProperty(Va,"__esModule",{value:!0});var tv=Va.Wedge=void 0;const Ml=Wt,UP=Je,GP=te,ev=ee,zP=te;class jr extends UP.Shape{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,GP.Konva.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)}}tv=Va.Wedge=jr,jr.prototype.className="Wedge",jr.prototype._centroid=!0,jr.prototype._attrsAffectingSize=["radius"],(0,zP._registerNode)(jr),Ml.Factory.addGetterSetter(jr,"radius",0,(0,ev.getNumberValidator)()),Ml.Factory.addGetterSetter(jr,"angle",0,(0,ev.getNumberValidator)()),Ml.Factory.addGetterSetter(jr,"clockwise",!1),Ml.Factory.backCompat(jr,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});const VP=Rt({__proto__:null,get Wedge(){return tv},default:Va},[Va]),BP=Dt(VP);var Ba={};Object.defineProperty(Ba,"__esModule",{value:!0});var nv=Ba.Blur=void 0;const rv=Wt,HP=je,qP=ee;function iv(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var KP=[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],YP=[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 XP(n,t){var e=n.data,r=n.width,i=n.height,s,a,o,h,l,c,f,d,u,p,v,_,S,x,m,k,F,P,N,R,L,U,B,K,tt=t+t+1,W=r-1,lt=i-1,wt=t+1,bt=wt*(wt+1)/2,xt=new iv,it=null,Y=xt,O=null,E=null,T=KP[t],C=YP[t];for(o=1;o<tt;o++)Y=Y.next=new iv,o===wt&&(it=Y);for(Y.next=xt,f=c=0,a=0;a<i;a++){for(k=F=P=N=d=u=p=v=0,_=wt*(R=e[c]),S=wt*(L=e[c+1]),x=wt*(U=e[c+2]),m=wt*(B=e[c+3]),d+=bt*R,u+=bt*L,p+=bt*U,v+=bt*B,Y=xt,o=0;o<wt;o++)Y.r=R,Y.g=L,Y.b=U,Y.a=B,Y=Y.next;for(o=1;o<wt;o++)h=c+((W<o?W:o)<<2),d+=(Y.r=R=e[h])*(K=wt-o),u+=(Y.g=L=e[h+1])*K,p+=(Y.b=U=e[h+2])*K,v+=(Y.a=B=e[h+3])*K,k+=R,F+=L,P+=U,N+=B,Y=Y.next;for(O=xt,E=it,s=0;s<r;s++)e[c+3]=B=v*T>>C,B!==0?(B=255/B,e[c]=(d*T>>C)*B,e[c+1]=(u*T>>C)*B,e[c+2]=(p*T>>C)*B):e[c]=e[c+1]=e[c+2]=0,d-=_,u-=S,p-=x,v-=m,_-=O.r,S-=O.g,x-=O.b,m-=O.a,h=f+((h=s+t+1)<W?h:W)<<2,k+=O.r=e[h],F+=O.g=e[h+1],P+=O.b=e[h+2],N+=O.a=e[h+3],d+=k,u+=F,p+=P,v+=N,O=O.next,_+=R=E.r,S+=L=E.g,x+=U=E.b,m+=B=E.a,k-=R,F-=L,P-=U,N-=B,E=E.next,c+=4;f+=r}for(s=0;s<r;s++){for(F=P=N=k=u=p=v=d=0,c=s<<2,_=wt*(R=e[c]),S=wt*(L=e[c+1]),x=wt*(U=e[c+2]),m=wt*(B=e[c+3]),d+=bt*R,u+=bt*L,p+=bt*U,v+=bt*B,Y=xt,o=0;o<wt;o++)Y.r=R,Y.g=L,Y.b=U,Y.a=B,Y=Y.next;for(l=r,o=1;o<=t;o++)c=l+s<<2,d+=(Y.r=R=e[c])*(K=wt-o),u+=(Y.g=L=e[c+1])*K,p+=(Y.b=U=e[c+2])*K,v+=(Y.a=B=e[c+3])*K,k+=R,F+=L,P+=U,N+=B,Y=Y.next,o<lt&&(l+=r);for(c=s,O=xt,E=it,a=0;a<i;a++)h=c<<2,e[h+3]=B=v*T>>C,B>0?(B=255/B,e[h]=(d*T>>C)*B,e[h+1]=(u*T>>C)*B,e[h+2]=(p*T>>C)*B):e[h]=e[h+1]=e[h+2]=0,d-=_,u-=S,p-=x,v-=m,_-=O.r,S-=O.g,x-=O.b,m-=O.a,h=s+((h=a+wt)<lt?h:lt)*r<<2,d+=k+=O.r=e[h],u+=F+=O.g=e[h+1],p+=P+=O.b=e[h+2],v+=N+=O.a=e[h+3],O=O.next,_+=R=E.r,S+=L=E.g,x+=U=E.b,m+=B=E.a,k-=R,F-=L,P-=U,N-=B,E=E.next,c+=r}}const JP=function(n){var t=Math.round(this.blurRadius());t>0&&XP(n,t)};nv=Ba.Blur=JP,rv.Factory.addGetterSetter(HP.Node,"blurRadius",0,(0,qP.getNumberValidator)(),rv.Factory.afterSetFilter);const QP=Rt({__proto__:null,get Blur(){return nv},default:Ba},[Ba]),ZP=Dt(QP);var Ha={};Object.defineProperty(Ha,"__esModule",{value:!0});var sv=Ha.Brighten=void 0;const av=Wt,WP=je,tE=ee,eE=function(n){var t=this.brightness()*255,e=n.data,r=e.length,i;for(i=0;i<r;i+=4)e[i]+=t,e[i+1]+=t,e[i+2]+=t};sv=Ha.Brighten=eE,av.Factory.addGetterSetter(WP.Node,"brightness",0,(0,tE.getNumberValidator)(),av.Factory.afterSetFilter);const nE=Rt({__proto__:null,get Brighten(){return sv},default:Ha},[Ha]),rE=Dt(nE);var qa={};Object.defineProperty(qa,"__esModule",{value:!0});var ov=qa.Contrast=void 0;const lv=Wt,iE=je,sE=ee,aE=function(n){var t=Math.pow((this.contrast()+100)/100,2),e=n.data,r=e.length,i=150,s=150,a=150,o;for(o=0;o<r;o+=4)i=e[o],s=e[o+1],a=e[o+2],i/=255,i-=.5,i*=t,i+=.5,i*=255,s/=255,s-=.5,s*=t,s+=.5,s*=255,a/=255,a-=.5,a*=t,a+=.5,a*=255,i=i<0?0:i>255?255:i,s=s<0?0:s>255?255:s,a=a<0?0:a>255?255:a,e[o]=i,e[o+1]=s,e[o+2]=a};ov=qa.Contrast=aE,lv.Factory.addGetterSetter(iE.Node,"contrast",0,(0,sE.getNumberValidator)(),lv.Factory.afterSetFilter);const oE=Rt({__proto__:null,get Contrast(){return ov},default:qa},[qa]),lE=Dt(oE);var Ka={};Object.defineProperty(Ka,"__esModule",{value:!0});var hv=Ka.Emboss=void 0;const li=Wt,Il=je,hE=Ae,cv=ee,cE=function(n){var t=this.embossStrength()*10,e=this.embossWhiteLevel()*255,r=this.embossDirection(),i=this.embossBlend(),s=0,a=0,o=n.data,h=n.width,l=n.height,c=h*4,f=l;switch(r){case"top-left":s=-1,a=-1;break;case"top":s=-1,a=0;break;case"top-right":s=-1,a=1;break;case"right":s=0,a=1;break;case"bottom-right":s=1,a=1;break;case"bottom":s=1,a=0;break;case"bottom-left":s=1,a=-1;break;case"left":s=0,a=-1;break;default:hE.Util.error("Unknown emboss direction: "+r)}do{var d=(f-1)*c,u=s;f+u<1&&(u=0),f+u>l&&(u=0);var p=(f-1+u)*h*4,v=h;do{var _=d+(v-1)*4,S=a;v+S<1&&(S=0),v+S>h&&(S=0);var x=p+(v-1+S)*4,m=o[_]-o[x],k=o[_+1]-o[x+1],F=o[_+2]-o[x+2],P=m,N=P>0?P:-P,R=k>0?k:-k,L=F>0?F:-F;if(R>N&&(P=k),L>N&&(P=F),P*=t,i){var U=o[_]+P,B=o[_+1]+P,K=o[_+2]+P;o[_]=U>255?255:U<0?0:U,o[_+1]=B>255?255:B<0?0:B,o[_+2]=K>255?255:K<0?0:K}else{var tt=e-P;tt<0?tt=0:tt>255&&(tt=255),o[_]=o[_+1]=o[_+2]=tt}}while(--v)}while(--f)};hv=Ka.Emboss=cE,li.Factory.addGetterSetter(Il.Node,"embossStrength",.5,(0,cv.getNumberValidator)(),li.Factory.afterSetFilter),li.Factory.addGetterSetter(Il.Node,"embossWhiteLevel",.5,(0,cv.getNumberValidator)(),li.Factory.afterSetFilter),li.Factory.addGetterSetter(Il.Node,"embossDirection","top-left",null,li.Factory.afterSetFilter),li.Factory.addGetterSetter(Il.Node,"embossBlend",!1,null,li.Factory.afterSetFilter);const uE=Rt({__proto__:null,get Emboss(){return hv},default:Ka},[Ka]),dE=Dt(uE);var Ya={};Object.defineProperty(Ya,"__esModule",{value:!0});var uv=Ya.Enhance=void 0;const dv=Wt,fE=je,pE=ee;function bd(n,t,e,r,i){var s=e-t,a=i-r,o;return s===0?r+a/2:a===0?r:(o=(n-t)/s,o=a*o+r,o)}const gE=function(n){var t=n.data,e=t.length,r=t[0],i=r,s,a=t[1],o=a,h,l=t[2],c=l,f,d,u=this.enhance();if(u!==0){for(d=0;d<e;d+=4)s=t[d+0],s<r?r=s:s>i&&(i=s),h=t[d+1],h<a?a=h:h>o&&(o=h),f=t[d+2],f<l?l=f:f>c&&(c=f);i===r&&(i=255,r=0),o===a&&(o=255,a=0),c===l&&(c=255,l=0);var p,v,_,S,x,m,k,F,P;for(u>0?(v=i+u*(255-i),_=r-u*(r-0),x=o+u*(255-o),m=a-u*(a-0),F=c+u*(255-c),P=l-u*(l-0)):(p=(i+r)*.5,v=i+u*(i-p),_=r+u*(r-p),S=(o+a)*.5,x=o+u*(o-S),m=a+u*(a-S),k=(c+l)*.5,F=c+u*(c-k),P=l+u*(l-k)),d=0;d<e;d+=4)t[d+0]=bd(t[d+0],r,i,_,v),t[d+1]=bd(t[d+1],a,o,m,x),t[d+2]=bd(t[d+2],l,c,P,F)}};uv=Ya.Enhance=gE,dv.Factory.addGetterSetter(fE.Node,"enhance",0,(0,pE.getNumberValidator)(),dv.Factory.afterSetFilter);const mE=Rt({__proto__:null,get Enhance(){return uv},default:Ya},[Ya]),yE=Dt(mE);var Xa={};Object.defineProperty(Xa,"__esModule",{value:!0});var fv=Xa.Grayscale=void 0;const vE=function(n){var t=n.data,e=t.length,r,i;for(r=0;r<e;r+=4)i=.34*t[r]+.5*t[r+1]+.16*t[r+2],t[r]=i,t[r+1]=i,t[r+2]=i};fv=Xa.Grayscale=vE;const _E=Rt({__proto__:null,get Grayscale(){return fv},default:Xa},[Xa]),wE=Dt(_E);var Ja={};Object.defineProperty(Ja,"__esModule",{value:!0});var pv=Ja.HSL=void 0;const ms=Wt,Sd=je,kd=ee;ms.Factory.addGetterSetter(Sd.Node,"hue",0,(0,kd.getNumberValidator)(),ms.Factory.afterSetFilter),ms.Factory.addGetterSetter(Sd.Node,"saturation",0,(0,kd.getNumberValidator)(),ms.Factory.afterSetFilter),ms.Factory.addGetterSetter(Sd.Node,"luminance",0,(0,kd.getNumberValidator)(),ms.Factory.afterSetFilter);const xE=function(n){var t=n.data,e=t.length,r=1,i=Math.pow(2,this.saturation()),s=Math.abs(this.hue()+360)%360,a=this.luminance()*127,o,h=r*i*Math.cos(s*Math.PI/180),l=r*i*Math.sin(s*Math.PI/180),c=.299*r+.701*h+.167*l,f=.587*r-.587*h+.33*l,d=.114*r-.114*h-.497*l,u=.299*r-.299*h-.328*l,p=.587*r+.413*h+.035*l,v=.114*r-.114*h+.293*l,_=.299*r-.3*h+1.25*l,S=.587*r-.586*h-1.05*l,x=.114*r+.886*h-.2*l,m,k,F,P;for(o=0;o<e;o+=4)m=t[o+0],k=t[o+1],F=t[o+2],P=t[o+3],t[o+0]=c*m+f*k+d*F+a,t[o+1]=u*m+p*k+v*F+a,t[o+2]=_*m+S*k+x*F+a,t[o+3]=P};pv=Ja.HSL=xE;const bE=Rt({__proto__:null,get HSL(){return pv},default:Ja},[Ja]),SE=Dt(bE);var Qa={};Object.defineProperty(Qa,"__esModule",{value:!0});var gv=Qa.HSV=void 0;const ys=Wt,Cd=je,Td=ee,kE=function(n){var t=n.data,e=t.length,r=Math.pow(2,this.value()),i=Math.pow(2,this.saturation()),s=Math.abs(this.hue()+360)%360,a,o=r*i*Math.cos(s*Math.PI/180),h=r*i*Math.sin(s*Math.PI/180),l=.299*r+.701*o+.167*h,c=.587*r-.587*o+.33*h,f=.114*r-.114*o-.497*h,d=.299*r-.299*o-.328*h,u=.587*r+.413*o+.035*h,p=.114*r-.114*o+.293*h,v=.299*r-.3*o+1.25*h,_=.587*r-.586*o-1.05*h,S=.114*r+.886*o-.2*h,x,m,k,F;for(a=0;a<e;a+=4)x=t[a+0],m=t[a+1],k=t[a+2],F=t[a+3],t[a+0]=l*x+c*m+f*k,t[a+1]=d*x+u*m+p*k,t[a+2]=v*x+_*m+S*k,t[a+3]=F};gv=Qa.HSV=kE,ys.Factory.addGetterSetter(Cd.Node,"hue",0,(0,Td.getNumberValidator)(),ys.Factory.afterSetFilter),ys.Factory.addGetterSetter(Cd.Node,"saturation",0,(0,Td.getNumberValidator)(),ys.Factory.afterSetFilter),ys.Factory.addGetterSetter(Cd.Node,"value",0,(0,Td.getNumberValidator)(),ys.Factory.afterSetFilter);const CE=Rt({__proto__:null,get HSV(){return gv},default:Qa},[Qa]),TE=Dt(CE);var Za={};Object.defineProperty(Za,"__esModule",{value:!0});var mv=Za.Invert=void 0;const PE=function(n){var t=n.data,e=t.length,r;for(r=0;r<e;r+=4)t[r]=255-t[r],t[r+1]=255-t[r+1],t[r+2]=255-t[r+2]};mv=Za.Invert=PE;const EE=Rt({__proto__:null,get Invert(){return mv},default:Za},[Za]),AE=Dt(EE);var Wa={};Object.defineProperty(Wa,"__esModule",{value:!0});var yv=Wa.Kaleidoscope=void 0;const jl=Wt,vv=je,_v=Ae,wv=ee;var OE=function(n,t,e){var r=n.data,i=t.data,s=n.width,a=n.height,o=e.polarCenterX||s/2,h=e.polarCenterY||a/2,l,c,f,d=0,u=0,p=0,v=0,_,S=Math.sqrt(o*o+h*h);c=s-o,f=a-h,_=Math.sqrt(c*c+f*f),S=_>S?_:S;var x=a,m=s,k,F,P=360/m*Math.PI/180,N,R;for(F=0;F<m;F+=1)for(N=Math.sin(F*P),R=Math.cos(F*P),k=0;k<x;k+=1)c=Math.floor(o+S*k/x*R),f=Math.floor(h+S*k/x*N),l=(f*s+c)*4,d=r[l+0],u=r[l+1],p=r[l+2],v=r[l+3],l=(F+k*s)*4,i[l+0]=d,i[l+1]=u,i[l+2]=p,i[l+3]=v},$E=function(n,t,e){var r=n.data,i=t.data,s=n.width,a=n.height,o=e.polarCenterX||s/2,h=e.polarCenterY||a/2,l,c,f,d,u,p=0,v=0,_=0,S=0,x,m=Math.sqrt(o*o+h*h);c=s-o,f=a-h,x=Math.sqrt(c*c+f*f),m=x>m?x:m;var k=a,F=s,P,N,R=0,L,U;for(c=0;c<s;c+=1)for(f=0;f<a;f+=1)d=c-o,u=f-h,P=Math.sqrt(d*d+u*u)*k/m,N=(Math.atan2(u,d)*180/Math.PI+360+R)%360,N=N*F/360,L=Math.floor(N),U=Math.floor(P),l=(U*s+L)*4,p=r[l+0],v=r[l+1],_=r[l+2],S=r[l+3],l=(f*s+c)*4,i[l+0]=p,i[l+1]=v,i[l+2]=_,i[l+3]=S};const FE=function(n){var t=n.width,e=n.height,r,i,s,a,o,h,l,c,f,d,u=Math.round(this.kaleidoscopePower()),p=Math.round(this.kaleidoscopeAngle()),v=Math.floor(t*(p%360)/360);if(!(u<1)){var _=_v.Util.createCanvasElement();_.width=t,_.height=e;var S=_.getContext("2d").getImageData(0,0,t,e);_v.Util.releaseCanvas(_),OE(n,S,{polarCenterX:t/2,polarCenterY:e/2});for(var x=t/Math.pow(2,u);x<=8;)x=x*2,u-=1;x=Math.ceil(x);var m=x,k=0,F=m,P=1;for(v+x>t&&(k=m,F=0,P=-1),i=0;i<e;i+=1)for(r=k;r!==F;r+=P)s=Math.round(r+v)%t,f=(t*i+s)*4,o=S.data[f+0],h=S.data[f+1],l=S.data[f+2],c=S.data[f+3],d=(t*i+r)*4,S.data[d+0]=o,S.data[d+1]=h,S.data[d+2]=l,S.data[d+3]=c;for(i=0;i<e;i+=1)for(m=Math.floor(x),a=0;a<u;a+=1){for(r=0;r<m+1;r+=1)f=(t*i+r)*4,o=S.data[f+0],h=S.data[f+1],l=S.data[f+2],c=S.data[f+3],d=(t*i+m*2-r-1)*4,S.data[d+0]=o,S.data[d+1]=h,S.data[d+2]=l,S.data[d+3]=c;m*=2}$E(S,n,{polarRotation:0})}};yv=Wa.Kaleidoscope=FE,jl.Factory.addGetterSetter(vv.Node,"kaleidoscopePower",2,(0,wv.getNumberValidator)(),jl.Factory.afterSetFilter),jl.Factory.addGetterSetter(vv.Node,"kaleidoscopeAngle",0,(0,wv.getNumberValidator)(),jl.Factory.afterSetFilter);const NE=Rt({__proto__:null,get Kaleidoscope(){return yv},default:Wa},[Wa]),RE=Dt(NE);var to={};Object.defineProperty(to,"__esModule",{value:!0});var xv=to.Mask=void 0;const bv=Wt,DE=je,ME=ee;function Ll(n,t,e){var r=(e*n.width+t)*4,i=[];return i.push(n.data[r++],n.data[r++],n.data[r++],n.data[r++]),i}function eo(n,t){return Math.sqrt(Math.pow(n[0]-t[0],2)+Math.pow(n[1]-t[1],2)+Math.pow(n[2]-t[2],2))}function IE(n){for(var t=[0,0,0],e=0;e<n.length;e++)t[0]+=n[e][0],t[1]+=n[e][1],t[2]+=n[e][2];return t[0]/=n.length,t[1]/=n.length,t[2]/=n.length,t}function jE(n,t){var e=Ll(n,0,0),r=Ll(n,n.width-1,0),i=Ll(n,0,n.height-1),s=Ll(n,n.width-1,n.height-1),a=t||10;if(eo(e,r)<a&&eo(r,s)<a&&eo(s,i)<a&&eo(i,e)<a){for(var o=IE([r,e,s,i]),h=[],l=0;l<n.width*n.height;l++){var c=eo(o,[n.data[l*4],n.data[l*4+1],n.data[l*4+2]]);h[l]=c<a?0:255}return h}}function LE(n,t){for(var e=0;e<n.width*n.height;e++)n.data[4*e+3]=t[e]}function UE(n,t,e){for(var r=[1,1,1,1,0,1,1,1,1],i=Math.round(Math.sqrt(r.length)),s=Math.floor(i/2),a=[],o=0;o<e;o++)for(var h=0;h<t;h++){for(var l=o*t+h,c=0,f=0;f<i;f++)for(var d=0;d<i;d++){var u=o+f-s,p=h+d-s;if(u>=0&&u<e&&p>=0&&p<t){var v=u*t+p,_=r[f*i+d];c+=n[v]*_}}a[l]=c===255*8?255:0}return a}function GE(n,t,e){for(var r=[1,1,1,1,1,1,1,1,1],i=Math.round(Math.sqrt(r.length)),s=Math.floor(i/2),a=[],o=0;o<e;o++)for(var h=0;h<t;h++){for(var l=o*t+h,c=0,f=0;f<i;f++)for(var d=0;d<i;d++){var u=o+f-s,p=h+d-s;if(u>=0&&u<e&&p>=0&&p<t){var v=u*t+p,_=r[f*i+d];c+=n[v]*_}}a[l]=c>=255*4?255:0}return a}function zE(n,t,e){for(var r=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],i=Math.round(Math.sqrt(r.length)),s=Math.floor(i/2),a=[],o=0;o<e;o++)for(var h=0;h<t;h++){for(var l=o*t+h,c=0,f=0;f<i;f++)for(var d=0;d<i;d++){var u=o+f-s,p=h+d-s;if(u>=0&&u<e&&p>=0&&p<t){var v=u*t+p,_=r[f*i+d];c+=n[v]*_}}a[l]=c}return a}const VE=function(n){var t=this.threshold(),e=jE(n,t);return e&&(e=UE(e,n.width,n.height),e=GE(e,n.width,n.height),e=zE(e,n.width,n.height),LE(n,e)),n};xv=to.Mask=VE,bv.Factory.addGetterSetter(DE.Node,"threshold",0,(0,ME.getNumberValidator)(),bv.Factory.afterSetFilter);const BE=Rt({__proto__:null,get Mask(){return xv},default:to},[to]),HE=Dt(BE);var no={};Object.defineProperty(no,"__esModule",{value:!0});var Sv=no.Noise=void 0;const kv=Wt,qE=je,KE=ee,YE=function(n){var t=this.noise()*255,e=n.data,r=e.length,i=t/2,s;for(s=0;s<r;s+=4)e[s+0]+=i-2*i*Math.random(),e[s+1]+=i-2*i*Math.random(),e[s+2]+=i-2*i*Math.random()};Sv=no.Noise=YE,kv.Factory.addGetterSetter(qE.Node,"noise",.2,(0,KE.getNumberValidator)(),kv.Factory.afterSetFilter);const XE=Rt({__proto__:null,get Noise(){return Sv},default:no},[no]),JE=Dt(XE);var ro={};Object.defineProperty(ro,"__esModule",{value:!0});var Cv=ro.Pixelate=void 0;const Tv=Wt,QE=Ae,ZE=je,WE=ee,tA=function(n){var t=Math.ceil(this.pixelSize()),e=n.width,r=n.height,i,s,a,o,h,l,c,f=Math.ceil(e/t),d=Math.ceil(r/t),u,p,v,_,S,x,m,k=n.data;if(t<=0){QE.Util.error("pixelSize value can not be <= 0");return}for(S=0;S<f;S+=1)for(x=0;x<d;x+=1){for(o=0,h=0,l=0,c=0,u=S*t,p=u+t,v=x*t,_=v+t,m=0,i=u;i<p;i+=1)if(!(i>=e))for(s=v;s<_;s+=1)s>=r||(a=(e*s+i)*4,o+=k[a+0],h+=k[a+1],l+=k[a+2],c+=k[a+3],m+=1);for(o=o/m,h=h/m,l=l/m,c=c/m,i=u;i<p;i+=1)if(!(i>=e))for(s=v;s<_;s+=1)s>=r||(a=(e*s+i)*4,k[a+0]=o,k[a+1]=h,k[a+2]=l,k[a+3]=c)}};Cv=ro.Pixelate=tA,Tv.Factory.addGetterSetter(ZE.Node,"pixelSize",8,(0,WE.getNumberValidator)(),Tv.Factory.afterSetFilter);const eA=Rt({__proto__:null,get Pixelate(){return Cv},default:ro},[ro]),nA=Dt(eA);var io={};Object.defineProperty(io,"__esModule",{value:!0});var Pv=io.Posterize=void 0;const Ev=Wt,rA=je,iA=ee,sA=function(n){var t=Math.round(this.levels()*254)+1,e=n.data,r=e.length,i=255/t,s;for(s=0;s<r;s+=1)e[s]=Math.floor(e[s]/i)*i};Pv=io.Posterize=sA,Ev.Factory.addGetterSetter(rA.Node,"levels",.5,(0,iA.getNumberValidator)(),Ev.Factory.afterSetFilter);const aA=Rt({__proto__:null,get Posterize(){return Pv},default:io},[io]),oA=Dt(aA);var so={};Object.defineProperty(so,"__esModule",{value:!0});var Av=so.RGB=void 0;const Ul=Wt,Pd=je,lA=ee,hA=function(n){var t=n.data,e=t.length,r=this.red(),i=this.green(),s=this.blue(),a,o;for(a=0;a<e;a+=4)o=(.34*t[a]+.5*t[a+1]+.16*t[a+2])/255,t[a]=o*r,t[a+1]=o*i,t[a+2]=o*s,t[a+3]=t[a+3]};Av=so.RGB=hA,Ul.Factory.addGetterSetter(Pd.Node,"red",0,function(n){return this._filterUpToDate=!1,n>255?255:n<0?0:Math.round(n)}),Ul.Factory.addGetterSetter(Pd.Node,"green",0,function(n){return this._filterUpToDate=!1,n>255?255:n<0?0:Math.round(n)}),Ul.Factory.addGetterSetter(Pd.Node,"blue",0,lA.RGBComponent,Ul.Factory.afterSetFilter);const cA=Rt({__proto__:null,get RGB(){return Av},default:so},[so]),uA=Dt(cA);var ao={};Object.defineProperty(ao,"__esModule",{value:!0});var Ov=ao.RGBA=void 0;const oo=Wt,Gl=je,dA=ee,fA=function(n){var t=n.data,e=t.length,r=this.red(),i=this.green(),s=this.blue(),a=this.alpha(),o,h;for(o=0;o<e;o+=4)h=1-a,t[o]=r*a+t[o]*h,t[o+1]=i*a+t[o+1]*h,t[o+2]=s*a+t[o+2]*h};Ov=ao.RGBA=fA,oo.Factory.addGetterSetter(Gl.Node,"red",0,function(n){return this._filterUpToDate=!1,n>255?255:n<0?0:Math.round(n)}),oo.Factory.addGetterSetter(Gl.Node,"green",0,function(n){return this._filterUpToDate=!1,n>255?255:n<0?0:Math.round(n)}),oo.Factory.addGetterSetter(Gl.Node,"blue",0,dA.RGBComponent,oo.Factory.afterSetFilter),oo.Factory.addGetterSetter(Gl.Node,"alpha",1,function(n){return this._filterUpToDate=!1,n>1?1:n<0?0:n});const pA=Rt({__proto__:null,get RGBA(){return Ov},default:ao},[ao]),gA=Dt(pA);var lo={};Object.defineProperty(lo,"__esModule",{value:!0});var $v=lo.Sepia=void 0;const mA=function(n){var t=n.data,e=t.length,r,i,s,a;for(r=0;r<e;r+=4)i=t[r+0],s=t[r+1],a=t[r+2],t[r+0]=Math.min(255,i*.393+s*.769+a*.189),t[r+1]=Math.min(255,i*.349+s*.686+a*.168),t[r+2]=Math.min(255,i*.272+s*.534+a*.131)};$v=lo.Sepia=mA;const yA=Rt({__proto__:null,get Sepia(){return $v},default:lo},[lo]),vA=Dt(yA);var ho={};Object.defineProperty(ho,"__esModule",{value:!0});var Fv=ho.Solarize=void 0;const _A=function(n){var t=n.data,e=n.width,r=n.height,i=e*4,s=r;do{var a=(s-1)*i,o=e;do{var h=a+(o-1)*4,l=t[h],c=t[h+1],f=t[h+2];l>127&&(l=255-l),c>127&&(c=255-c),f>127&&(f=255-f),t[h]=l,t[h+1]=c,t[h+2]=f}while(--o)}while(--s)};Fv=ho.Solarize=_A;const wA=Rt({__proto__:null,get Solarize(){return Fv},default:ho},[ho]),xA=Dt(wA);var co={};Object.defineProperty(co,"__esModule",{value:!0});var Nv=co.Threshold=void 0;const Rv=Wt,bA=je,SA=ee,kA=function(n){var t=this.threshold()*255,e=n.data,r=e.length,i;for(i=0;i<r;i+=1)e[i]=e[i]<t?0:255};Nv=co.Threshold=kA,Rv.Factory.addGetterSetter(bA.Node,"threshold",.5,(0,SA.getNumberValidator)(),Rv.Factory.afterSetFilter);const CA=Rt({__proto__:null,get Threshold(){return Nv},default:co},[co]),TA=Dt(CA);Object.defineProperty(ya,"__esModule",{value:!0});var Dv=ya.Konva=void 0;const Mv=K7,PA=Q7,EA=uT,AA=yT,OA=xT,$A=CT,Iv=FT,FA=sy,NA=sd,RA=_y,DA=zT,MA=qT,IA=QT,jA=eP,LA=Gy,UA=CP,GA=LP,zA=BP,VA=ZP,BA=rE,HA=lE,qA=dE,KA=yE,YA=wE,XA=SE,JA=TE,QA=AE,ZA=RE,WA=HE,tO=JE,eO=nA,nO=oA,rO=uA,iO=gA,sO=vA,aO=xA,oO=TA;Dv=ya.Konva=Mv.Konva.Util._assign(Mv.Konva,{Arc:PA.Arc,Arrow:EA.Arrow,Circle:AA.Circle,Ellipse:OA.Ellipse,Image:$A.Image,Label:Iv.Label,Tag:Iv.Tag,Line:FA.Line,Path:NA.Path,Rect:RA.Rect,RegularPolygon:DA.RegularPolygon,Ring:MA.Ring,Sprite:IA.Sprite,Star:jA.Star,Text:LA.Text,TextPath:UA.TextPath,Transformer:GA.Transformer,Wedge:zA.Wedge,Filters:{Blur:VA.Blur,Brighten:BA.Brighten,Contrast:HA.Contrast,Emboss:qA.Emboss,Enhance:KA.Enhance,Grayscale:YA.Grayscale,HSL:XA.HSL,HSV:JA.HSV,Invert:QA.Invert,Kaleidoscope:ZA.Kaleidoscope,Mask:WA.Mask,Noise:tO.Noise,Pixelate:eO.Pixelate,Posterize:nO.Posterize,RGB:rO.RGB,RGBA:iO.RGBA,Sepia:sO.Sepia,Solarize:aO.Solarize,Threshold:oO.Threshold}});const lO=Rt({__proto__:null,get Konva(){return Dv},default:ya},[ya]),hO=Dt(lO);var cO=Du.exports;Object.defineProperty(cO,"__esModule",{value:!0});const uO=hO;Du.exports=uO.Konva;var dO=Du.exports;const xe=Tn(dO),fO=xe.Ellipse.prototype.toObject;xe.Ellipse.prototype.toObject=function(){const n=fO.call(this);return{...n,attrs:{...n.attrs,strokeWidth:this.strokeWidth(),dash:this.dash()}}};const pO=xe.Line.prototype.toObject;xe.Line.prototype.toObject=function(){const n=pO.call(this);return{...n,attrs:{...n.attrs,x:this.getAbsolutePosition().x,y:this.getAbsolutePosition().y,strokeWidth:this.strokeWidth(),dash:this.dash()}}};const gO=xe.Node.prototype.toObject,mO=function(){const n=gO.call(this);return{...n,attrs:{...n.attrs,x:this.getAbsolutePosition().x,y:this.getAbsolutePosition().y,scaleX:this.getAbsoluteScale().x,scaleY:this.getAbsoluteScale().y,rotation:this.getAbsoluteRotation(),opacity:this.getAbsoluteOpacity()}}};xe.Node.prototype.toObject=mO;const yO=xe.Node.prototype.remove;xe.Node.prototype.remove=function(){return yO.call(this),this.fire("removed",{target:this}),this};const vO=xe.Node.prototype.moveUp;xe.Node.prototype.moveUp=function(){const n=vO.call(this);return n&&this.fire("move:up"),n};const _O=xe.Node.prototype.moveDown;xe.Node.prototype.moveDown=function(){const n=_O.call(this);return n&&this.fire("move:down"),n};const wO=xe.Node.prototype.moveToTop;xe.Node.prototype.moveToTop=function(){const n=wO.call(this);return n&&this.fire("move:top"),n};const xO=xe.Node.prototype.moveToBottom;xe.Node.prototype.moveToBottom=function(){const n=xO.call(this);return n&&this.fire("move:bottom"),n};const bO=xe.Node.prototype.moveTo;xe.Node.prototype.moveTo=function(n){const t=bO.call(this,n);return this.fire("move:to"),t};const SO=xe.Rect.prototype.toObject;xe.Rect.prototype.toObject=function(){const n=SO.call(this);return{...n,attrs:{...n.attrs,strokeWidth:this.strokeWidth(),dash:this.dash(),cornerRadius:this.cornerRadius()}}};const kO=xe.RegularPolygon.prototype.toObject;xe.RegularPolygon.prototype.toObject=function(){const n=kO.call(this);return{...n,attrs:{...n.attrs,strokeWidth:this.strokeWidth(),dash:this.dash()}}};const CO=xe.Text.prototype.toObject;xe.Text.prototype.toObject=function(){const n=CO.call(this);return{...n,attrs:{...n.attrs,strokeWidth:this.strokeWidth()}}};const TO=xe.Image.prototype.toObject;xe.Image.prototype.toObject=function(){const n=TO.call(this);return{...n,attrs:{...n.attrs,strokeWidth:this.strokeWidth(),dash:this.dash(),image:this.image()}}};var PO=Object.defineProperty,EO=Object.getOwnPropertyDescriptor,hi=(n,t,e,r)=>{for(var i=EO(t,e),s=n.length-1,a;s>=0;s--)(a=n[s])&&(i=a(t,e,i)||i);return i&&PO(t,e,i),i};function ci(n,t,e){const r=e.value;return e.value=function(...i){if(this.enabled)return r.apply(this,i);console.log(`Method ${t} is disabled.`)},e}class ui{constructor(t,e){Tt(this,"app");Tt(this,"enabled");const{enabled:r}=e;this.app=t,this.enabled=r}alignLeft(t){const e=t.map(i=>i.getClientRect()),r=Math.min(...e.map(i=>i.x));this.app.update(...t.map((i,s)=>{const a=i.toObject(),o=e[s].x-r;return a.attrs={...a.attrs,x:a.attrs.x-o},a}))}alignRight(t){const e=t.map(i=>i.getClientRect()),r=Math.max(...e.map(i=>i.x+i.width));this.app.update(...t.map((i,s)=>{const a=i.toObject(),o=r-(e[s].x+e[s].width);return a.attrs={...a.attrs,x:a.attrs.x+o},a}))}alignTop(t){const e=t.map(i=>i.getClientRect()),r=Math.min(...e.map(i=>i.y));this.app.update(...t.map((i,s)=>{const a=i.toObject(),o=e[s].y-r;return a.attrs={...a.attrs,y:a.attrs.y-o},a}))}alignBottom(t){const e=t.map(i=>i.getClientRect()),r=Math.max(...e.map(i=>i.y+i.height));this.app.update(...t.map((i,s)=>{const a=i.toObject(),o=r-(e[s].y+e[s].height);return a.attrs={...a.attrs,y:a.attrs.y+o},a}))}alignCenterX(t){const e=t.map(i=>i.getClientRect()),r=e.reduce((i,s)=>i+(s.x+s.width/2),0)/e.length;this.app.update(...t.map((i,s)=>{const a=i.toObject(),o=r-(e[s].x+e[s].width/2);return a.attrs={...a.attrs,x:a.attrs.x+o},a}))}alignCenterY(t){const e=t.map(i=>i.getClientRect()),r=e.reduce((i,s)=>i+(s.y+s.height/2),0)/e.length;this.app.update(...t.map((i,s)=>{const a=i.toObject(),o=r-(e[s].y+e[s].height/2);return a.attrs={...a.attrs,y:a.attrs.y+o},a}))}dispersionX(t){t.map(e=>e.getClientRect().x+e.getClientRect().width/2).every((e,r,i)=>e===i[0])||this.distributeNodes(t,"x")}dispersionY(t){t.map(e=>e.getClientRect().y+e.getClientRect().height/2).every((e,r,i)=>e===i[0])||this.distributeNodes(t,"y")}distributeNodes(t,e){if(t.length<=2)return;t.sort((c,f)=>c.getClientRect()[e]-f.getClientRect()[e]);const r=t[0],i=t[t.length-1],s=r.getClientRect()[e]+(e==="x"?r.getClientRect().width:r.getClientRect().height),a=i.getClientRect()[e]-s,o=t.slice(1,-1).reduce((c,f)=>c+(e==="x"?f.getClientRect().width:f.getClientRect().height),0),h=Math.max((a-o)/(t.length-1),0);let l=s;this.app.update(...t.map((c,f)=>{const d=c.toObject();if(f===0||f===t.length-1)return d;const u=l+h;return d.attrs[e]=u-c.getClientRect()[e]+d.attrs[e],l=u+(e==="x"?c.getClientRect().width:c.getClientRect().height),d}))}}hi([ci],ui.prototype,"alignLeft"),hi([ci],ui.prototype,"alignRight"),hi([ci],ui.prototype,"alignTop"),hi([ci],ui.prototype,"alignBottom"),hi([ci],ui.prototype,"alignCenterX"),hi([ci],ui.prototype,"alignCenterY"),hi([ci],ui.prototype,"dispersionX"),hi([ci],ui.prototype,"dispersionY");const AO=De.defineComponent({__name:"Icon",props:{icon:{default:"mdi-light:home"},color:{default:xS.colorGray3},click:{}},setup(n){const t=n;return(e,r)=>(De.openBlock(),De.createElementBlock("span",{onClick:r[0]||(r[0]=(...i)=>e.click&&e.click(...i)),class:"icon",style:De.normalizeStyle(["cursor: pointer","color: "+e.color])},[De.createVNode(De.unref(X2),{icon:t.icon,color:e.color},null,8,["icon","color"])],4))}}),OO=((n,t)=>{const e=n.__vccOpts||n;for(const[r,i]of t)e[r]=i;return e})(AO,[["__scopeId","data-v-2a3d2dec"]]);kn.Icon=OO,Object.defineProperty(kn,Symbol.toStringTag,{value:"Module"})});
35
+ * Licensed under the MIT license */(function(n){(function(t,e,r,i){var s=["","webkit","Moz","MS","ms","o"],a=e.createElement("div"),o="function",l=Math.round,c=Math.abs,h=Date.now;function f(g,w,N){return setTimeout(m(g,N),w)}function d(g,w,N){return Array.isArray(g)?(u(g,N[w],N),!0):!1}function u(g,w,N){var I;if(g)if(g.forEach)g.forEach(w,N);else if(g.length!==i)for(I=0;I<g.length;)w.call(N,g[I],I,g),I++;else for(I in g)g.hasOwnProperty(I)&&w.call(N,g[I],I,g)}function p(g,w,N){var I="DEPRECATED METHOD: "+w+`
36
+ `+N+` AT
37
+ `;return function(){var j=new Error("get-stack-trace"),z=j&&j.stack?j.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",X=t.console&&(t.console.warn||t.console.log);return X&&X.call(t.console,I,z),g.apply(this,arguments)}}var v;typeof Object.assign!="function"?v=function(g){if(g===i||g===null)throw new TypeError("Cannot convert undefined or null to object");for(var w=Object(g),N=1;N<arguments.length;N++){var I=arguments[N];if(I!==i&&I!==null)for(var j in I)I.hasOwnProperty(j)&&(w[j]=I[j])}return w}:v=Object.assign;var _=p(function(g,w,N){for(var I=Object.keys(w),j=0;j<I.length;)(!N||N&&g[I[j]]===i)&&(g[I[j]]=w[I[j]]),j++;return g},"extend","Use `assign`."),x=p(function(g,w){return _(g,w,!0)},"merge","Use `assign`.");function b(g,w,N){var I=w.prototype,j;j=g.prototype=Object.create(I),j.constructor=g,j._super=I,N&&v(j,N)}function m(g,w){return function(){return g.apply(w,arguments)}}function k(g,w){return typeof g==o?g.apply(w&&w[0]||i,w):g}function O(g,w){return g===i?w:g}function T(g,w,N){u(U(w),function(I){g.addEventListener(I,N,!1)})}function F(g,w,N){u(U(w),function(I){g.removeEventListener(I,N,!1)})}function R(g,w){for(;g;){if(g==w)return!0;g=g.parentNode}return!1}function L(g,w){return g.indexOf(w)>-1}function U(g){return g.trim().split(/\s+/g)}function B(g,w,N){if(g.indexOf&&!N)return g.indexOf(w);for(var I=0;I<g.length;){if(N&&g[I][N]==w||!N&&g[I]===w)return I;I++}return-1}function Y(g){return Array.prototype.slice.call(g,0)}function tt(g,w,N){for(var I=[],j=[],z=0;z<g.length;){var X=g[z][w];B(j,X)<0&&I.push(g[z]),j[z]=X,z++}return I=I.sort(function(et,ut){return et[w]>ut[w]}),I}function W(g,w){for(var N,I,j=w[0].toUpperCase()+w.slice(1),z=0;z<s.length;){if(N=s[z],I=N?N+j:w,I in g)return I;z++}return i}var ct=1;function wt(){return ct++}function St(g){var w=g.ownerDocument||g;return w.defaultView||w.parentWindow||t}var xt=/mobile|tablet|ip(ad|hone|od)|android/i,st="ontouchstart"in t,K=W(t,"PointerEvent")!==i,$=st&&xt.test(navigator.userAgent),P="touch",E="pen",C="mouse",M="kinect",G=25,D=1,V=2,q=4,Z=8,rt=1,gt=2,Ct=4,Ft=8,kt=16,Ot=gt|Ct,Lt=Ft|kt,Vt=Ot|Lt,$t=["x","y"],he=["clientX","clientY"];function Zt(g,w){var N=this;this.manager=g,this.callback=w,this.element=g.element,this.target=g.options.inputTarget,this.domHandler=function(I){k(g.options.enable,[g])&&N.handler(I)},this.init()}Zt.prototype={handler:function(){},init:function(){this.evEl&&T(this.element,this.evEl,this.domHandler),this.evTarget&&T(this.target,this.evTarget,this.domHandler),this.evWin&&T(St(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&F(this.element,this.evEl,this.domHandler),this.evTarget&&F(this.target,this.evTarget,this.domHandler),this.evWin&&F(St(this.element),this.evWin,this.domHandler)}};function fe(g){var w,N=g.options.inputClass;return N?w=N:K?w=Sn:$?w=Vn:st?w=J:w=Mn,new w(g,qt)}function qt(g,w,N){var I=N.pointers.length,j=N.changedPointers.length,z=w&D&&I-j===0,X=w&(q|Z)&&I-j===0;N.isFirst=!!z,N.isFinal=!!X,z&&(g.session={}),N.eventType=w,Re(g,N),g.emit("hammer.input",N),g.recognize(N),g.session.prevInput=N}function Re(g,w){var N=g.session,I=w.pointers,j=I.length;N.firstInput||(N.firstInput=xn(w)),j>1&&!N.firstMultiple?N.firstMultiple=xn(w):j===1&&(N.firstMultiple=!1);var z=N.firstInput,X=N.firstMultiple,et=X?X.center:z.center,ut=w.center=cn(I);w.timeStamp=h(),w.deltaTime=w.timeStamp-z.timeStamp,w.angle=Rn(et,ut),w.distance=Fn(et,ut),Ae(N,w),w.offsetDirection=an(w.deltaX,w.deltaY);var at=Me(w.deltaTime,w.deltaX,w.deltaY);w.overallVelocityX=at.x,w.overallVelocityY=at.y,w.overallVelocity=c(at.x)>c(at.y)?at.x:at.y,w.scale=X?Ue(X.pointers,I):1,w.rotation=X?Gn(X.pointers,I):0,w.maxPointers=N.prevInput?w.pointers.length>N.prevInput.maxPointers?w.pointers.length:N.prevInput.maxPointers:w.pointers.length,We(N,w);var it=g.element;R(w.srcEvent.target,it)&&(it=w.srcEvent.target),w.target=it}function Ae(g,w){var N=w.center,I=g.offsetDelta||{},j=g.prevDelta||{},z=g.prevInput||{};(w.eventType===D||z.eventType===q)&&(j=g.prevDelta={x:z.deltaX||0,y:z.deltaY||0},I=g.offsetDelta={x:N.x,y:N.y}),w.deltaX=j.x+(N.x-I.x),w.deltaY=j.y+(N.y-I.y)}function We(g,w){var N=g.lastInterval||w,I=w.timeStamp-N.timeStamp,j,z,X,et;if(w.eventType!=Z&&(I>G||N.velocity===i)){var ut=w.deltaX-N.deltaX,at=w.deltaY-N.deltaY,it=Me(I,ut,at);z=it.x,X=it.y,j=c(it.x)>c(it.y)?it.x:it.y,et=an(ut,at),g.lastInterval=w}else j=N.velocity,z=N.velocityX,X=N.velocityY,et=N.direction;w.velocity=j,w.velocityX=z,w.velocityY=X,w.direction=et}function xn(g){for(var w=[],N=0;N<g.pointers.length;)w[N]={clientX:l(g.pointers[N].clientX),clientY:l(g.pointers[N].clientY)},N++;return{timeStamp:h(),pointers:w,center:cn(w),deltaX:g.deltaX,deltaY:g.deltaY}}function cn(g){var w=g.length;if(w===1)return{x:l(g[0].clientX),y:l(g[0].clientY)};for(var N=0,I=0,j=0;j<w;)N+=g[j].clientX,I+=g[j].clientY,j++;return{x:l(N/w),y:l(I/w)}}function Me(g,w,N){return{x:w/g||0,y:N/g||0}}function an(g,w){return g===w?rt:c(g)>=c(w)?g<0?gt:Ct:w<0?Ft:kt}function Fn(g,w,N){N||(N=$t);var I=w[N[0]]-g[N[0]],j=w[N[1]]-g[N[1]];return Math.sqrt(I*I+j*j)}function Rn(g,w,N){N||(N=$t);var I=w[N[0]]-g[N[0]],j=w[N[1]]-g[N[1]];return Math.atan2(j,I)*180/Math.PI}function Gn(g,w){return Rn(w[1],w[0],he)+Rn(g[1],g[0],he)}function Ue(g,w){return Fn(w[0],w[1],he)/Fn(g[0],g[1],he)}var zn={mousedown:D,mousemove:V,mouseup:q},er="mousedown",Te="mousemove mouseup";function Mn(){this.evEl=er,this.evWin=Te,this.pressed=!1,Zt.apply(this,arguments)}b(Mn,Zt,{handler:function(g){var w=zn[g.type];w&D&&g.button===0&&(this.pressed=!0),w&V&&g.which!==1&&(w=q),this.pressed&&(w&q&&(this.pressed=!1),this.callback(this.manager,w,{pointers:[g],changedPointers:[g],pointerType:C,srcEvent:g}))}});var mn={pointerdown:D,pointermove:V,pointerup:q,pointercancel:Z,pointerout:Z},Vr={2:P,3:E,4:C,5:M},nr="pointerdown",wr="pointermove pointerup pointercancel";t.MSPointerEvent&&!t.PointerEvent&&(nr="MSPointerDown",wr="MSPointerMove MSPointerUp MSPointerCancel");function Sn(){this.evEl=nr,this.evWin=wr,Zt.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}b(Sn,Zt,{handler:function(g){var w=this.store,N=!1,I=g.type.toLowerCase().replace("ms",""),j=mn[I],z=Vr[g.pointerType]||g.pointerType,X=z==P,et=B(w,g.pointerId,"pointerId");j&D&&(g.button===0||X)?et<0&&(w.push(g),et=w.length-1):j&(q|Z)&&(N=!0),!(et<0)&&(w[et]=g,this.callback(this.manager,j,{pointers:w,changedPointers:[g],pointerType:z,srcEvent:g}),N&&w.splice(et,1))}});var Oe={touchstart:D,touchmove:V,touchend:q,touchcancel:Z},xs="touchstart",rr="touchstart touchmove touchend touchcancel";function ir(){this.evTarget=xs,this.evWin=rr,this.started=!1,Zt.apply(this,arguments)}b(ir,Zt,{handler:function(g){var w=Oe[g.type];if(w===D&&(this.started=!0),!!this.started){var N=kn.call(this,g,w);w&(q|Z)&&N[0].length-N[1].length===0&&(this.started=!1),this.callback(this.manager,w,{pointers:N[0],changedPointers:N[1],pointerType:P,srcEvent:g})}}});function kn(g,w){var N=Y(g.touches),I=Y(g.changedTouches);return w&(q|Z)&&(N=tt(N.concat(I),"identifier")),[N,I]}var Br={touchstart:D,touchmove:V,touchend:q,touchcancel:Z},sr="touchstart touchmove touchend touchcancel";function Vn(){this.evTarget=sr,this.targetIds={},Zt.apply(this,arguments)}b(Vn,Zt,{handler:function(g){var w=Br[g.type],N=Hr.call(this,g,w);N&&this.callback(this.manager,w,{pointers:N[0],changedPointers:N[1],pointerType:P,srcEvent:g})}});function Hr(g,w){var N=Y(g.touches),I=this.targetIds;if(w&(D|V)&&N.length===1)return I[N[0].identifier]=!0,[N,N];var j,z,X=Y(g.changedTouches),et=[],ut=this.target;if(z=N.filter(function(at){return R(at.target,ut)}),w===D)for(j=0;j<z.length;)I[z[j].identifier]=!0,j++;for(j=0;j<X.length;)I[X[j].identifier]&&et.push(X[j]),w&(q|Z)&&delete I[X[j].identifier],j++;if(et.length)return[tt(z.concat(et),"identifier"),et]}var qr=2500,H=25;function J(){Zt.apply(this,arguments);var g=m(this.handler,this);this.touch=new Vn(this.manager,g),this.mouse=new Mn(this.manager,g),this.primaryTouch=null,this.lastTouches=[]}b(J,Zt,{handler:function(g,w,N){var I=N.pointerType==P,j=N.pointerType==C;if(!(j&&N.sourceCapabilities&&N.sourceCapabilities.firesTouchEvents)){if(I)Q.call(this,w,N);else if(j&&lt.call(this,N))return;this.callback(g,w,N)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});function Q(g,w){g&D?(this.primaryTouch=w.changedPointers[0].identifier,ot.call(this,w)):g&(q|Z)&&ot.call(this,w)}function ot(g){var w=g.changedPointers[0];if(w.identifier===this.primaryTouch){var N={x:w.clientX,y:w.clientY};this.lastTouches.push(N);var I=this.lastTouches,j=function(){var z=I.indexOf(N);z>-1&&I.splice(z,1)};setTimeout(j,qr)}}function lt(g){for(var w=g.srcEvent.clientX,N=g.srcEvent.clientY,I=0;I<this.lastTouches.length;I++){var j=this.lastTouches[I],z=Math.abs(w-j.x),X=Math.abs(N-j.y);if(z<=H&&X<=H)return!0}return!1}var It=W(a.style,"touchAction"),Rt=It!==i,se="compute",Ee="auto",ue="manipulation",Jt="none",Wt="pan-x",ge="pan-y",Gt=Ge();function jt(g,w){this.manager=g,this.set(w)}jt.prototype={set:function(g){g==se&&(g=this.compute()),Rt&&this.manager.element.style&&Gt[g]&&(this.manager.element.style[It]=g),this.actions=g.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var g=[];return u(this.manager.recognizers,function(w){k(w.options.enable,[w])&&(g=g.concat(w.getTouchAction()))}),me(g.join(" "))},preventDefaults:function(g){var w=g.srcEvent,N=g.offsetDirection;if(this.manager.session.prevented){w.preventDefault();return}var I=this.actions,j=L(I,Jt)&&!Gt[Jt],z=L(I,ge)&&!Gt[ge],X=L(I,Wt)&&!Gt[Wt];if(j){var et=g.pointers.length===1,ut=g.distance<2,at=g.deltaTime<250;if(et&&ut&&at)return}if(!(X&&z)&&(j||z&&N&Ot||X&&N&Lt))return this.preventSrc(w)},preventSrc:function(g){this.manager.session.prevented=!0,g.preventDefault()}};function me(g){if(L(g,Jt))return Jt;var w=L(g,Wt),N=L(g,ge);return w&&N?Jt:w||N?w?Wt:ge:L(g,ue)?ue:Ee}function Ge(){if(!Rt)return!1;var g={},w=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(N){g[N]=w?t.CSS.supports("touch-action",N):!0}),g}var Cn=1,we=2,Ve=4,Ke=8,Be=Ke,De=16,le=32;function Ut(g){this.options=v({},this.defaults,g||{}),this.id=wt(),this.manager=null,this.options.enable=O(this.options.enable,!0),this.state=Cn,this.simultaneous={},this.requireFail=[]}Ut.prototype={defaults:{},set:function(g){return v(this.options,g),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(g){if(d(g,"recognizeWith",this))return this;var w=this.simultaneous;return g=or(g,this),w[g.id]||(w[g.id]=g,g.recognizeWith(this)),this},dropRecognizeWith:function(g){return d(g,"dropRecognizeWith",this)?this:(g=or(g,this),delete this.simultaneous[g.id],this)},requireFailure:function(g){if(d(g,"requireFailure",this))return this;var w=this.requireFail;return g=or(g,this),B(w,g)===-1&&(w.push(g),g.requireFailure(this)),this},dropRequireFailure:function(g){if(d(g,"dropRequireFailure",this))return this;g=or(g,this);var w=B(this.requireFail,g);return w>-1&&this.requireFail.splice(w,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(g){return!!this.simultaneous[g.id]},emit:function(g){var w=this,N=this.state;function I(j){w.manager.emit(j,g)}N<Ke&&I(w.options.event+hn(N)),I(w.options.event),g.additionalEvent&&I(g.additionalEvent),N>=Ke&&I(w.options.event+hn(N))},tryEmit:function(g){if(this.canEmit())return this.emit(g);this.state=le},canEmit:function(){for(var g=0;g<this.requireFail.length;){if(!(this.requireFail[g].state&(le|Cn)))return!1;g++}return!0},recognize:function(g){var w=v({},g);if(!k(this.options.enable,[this,w])){this.reset(),this.state=le;return}this.state&(Be|De|le)&&(this.state=Cn),this.state=this.process(w),this.state&(we|Ve|Ke|De)&&this.tryEmit(w)},process:function(g){},getTouchAction:function(){},reset:function(){}};function hn(g){return g&De?"cancel":g&Ke?"end":g&Ve?"move":g&we?"start":""}function ar(g){return g==kt?"down":g==Ft?"up":g==gt?"left":g==Ct?"right":""}function or(g,w){var N=w.manager;return N?N.get(g):g}function tn(){Ut.apply(this,arguments)}b(tn,Ut,{defaults:{pointers:1},attrTest:function(g){var w=this.options.pointers;return w===0||g.pointers.length===w},process:function(g){var w=this.state,N=g.eventType,I=w&(we|Ve),j=this.attrTest(g);return I&&(N&Z||!j)?w|De:I||j?N&q?w|Ke:w&we?w|Ve:we:le}});function Xe(){tn.apply(this,arguments),this.pX=null,this.pY=null}b(Xe,tn,{defaults:{event:"pan",threshold:10,pointers:1,direction:Vt},getTouchAction:function(){var g=this.options.direction,w=[];return g&Ot&&w.push(ge),g&Lt&&w.push(Wt),w},directionTest:function(g){var w=this.options,N=!0,I=g.distance,j=g.direction,z=g.deltaX,X=g.deltaY;return j&w.direction||(w.direction&Ot?(j=z===0?rt:z<0?gt:Ct,N=z!=this.pX,I=Math.abs(g.deltaX)):(j=X===0?rt:X<0?Ft:kt,N=X!=this.pY,I=Math.abs(g.deltaY))),g.direction=j,N&&I>w.threshold&&j&w.direction},attrTest:function(g){return tn.prototype.attrTest.call(this,g)&&(this.state&we||!(this.state&we)&&this.directionTest(g))},emit:function(g){this.pX=g.deltaX,this.pY=g.deltaY;var w=ar(g.direction);w&&(g.additionalEvent=this.options.event+w),this._super.emit.call(this,g)}});function Tn(){tn.apply(this,arguments)}b(Tn,tn,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Jt]},attrTest:function(g){return this._super.attrTest.call(this,g)&&(Math.abs(g.scale-1)>this.options.threshold||this.state&we)},emit:function(g){if(g.scale!==1){var w=g.scale<1?"in":"out";g.additionalEvent=this.options.event+w}this._super.emit.call(this,g)}});function Yr(){Ut.apply(this,arguments),this._timer=null,this._input=null}b(Yr,Ut,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Ee]},process:function(g){var w=this.options,N=g.pointers.length===w.pointers,I=g.distance<w.threshold,j=g.deltaTime>w.time;if(this._input=g,!I||!N||g.eventType&(q|Z)&&!j)this.reset();else if(g.eventType&D)this.reset(),this._timer=f(function(){this.state=Be,this.tryEmit()},w.time,this);else if(g.eventType&q)return Be;return le},reset:function(){clearTimeout(this._timer)},emit:function(g){this.state===Be&&(g&&g.eventType&q?this.manager.emit(this.options.event+"up",g):(this._input.timeStamp=h(),this.manager.emit(this.options.event,this._input)))}});function Kr(){tn.apply(this,arguments)}b(Kr,tn,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Jt]},attrTest:function(g){return this._super.attrTest.call(this,g)&&(Math.abs(g.rotation)>this.options.threshold||this.state&we)}});function Bn(){tn.apply(this,arguments)}b(Bn,tn,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Ot|Lt,pointers:1},getTouchAction:function(){return Xe.prototype.getTouchAction.call(this)},attrTest:function(g){var w=this.options.direction,N;return w&(Ot|Lt)?N=g.overallVelocity:w&Ot?N=g.overallVelocityX:w&Lt&&(N=g.overallVelocityY),this._super.attrTest.call(this,g)&&w&g.offsetDirection&&g.distance>this.options.threshold&&g.maxPointers==this.options.pointers&&c(N)>this.options.velocity&&g.eventType&q},emit:function(g){var w=ar(g.offsetDirection);w&&this.manager.emit(this.options.event+w,g),this.manager.emit(this.options.event,g)}});function Hn(){Ut.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}b(Hn,Ut,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[ue]},process:function(g){var w=this.options,N=g.pointers.length===w.pointers,I=g.distance<w.threshold,j=g.deltaTime<w.time;if(this.reset(),g.eventType&D&&this.count===0)return this.failTimeout();if(I&&j&&N){if(g.eventType!=q)return this.failTimeout();var z=this.pTime?g.timeStamp-this.pTime<w.interval:!0,X=!this.pCenter||Fn(this.pCenter,g.center)<w.posThreshold;this.pTime=g.timeStamp,this.pCenter=g.center,!X||!z?this.count=1:this.count+=1,this._input=g;var et=this.count%w.taps;if(et===0)return this.hasRequireFailures()?(this._timer=f(function(){this.state=Be,this.tryEmit()},w.interval,this),we):Be}return le},failTimeout:function(){return this._timer=f(function(){this.state=le},this.options.interval,this),le},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==Be&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}});function lr(g,w){return w=w||{},w.recognizers=O(w.recognizers,lr.defaults.preset),new Ki(g,w)}lr.VERSION="2.0.7",lr.defaults={domEvents:!1,touchAction:se,enable:!0,inputTarget:null,inputClass:null,preset:[[Kr,{enable:!1}],[Tn,{enable:!1},["rotate"]],[Bn,{direction:Ot}],[Xe,{direction:Ot},["swipe"]],[Hn],[Hn,{event:"doubletap",taps:2},["tap"]],[Yr]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var Yi=1,Je=2;function Ki(g,w){this.options=v({},lr.defaults,w||{}),this.options.inputTarget=this.options.inputTarget||g,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=g,this.input=fe(this),this.touchAction=new jt(this,this.options.touchAction),y(this,!0),u(this.options.recognizers,function(N){var I=this.add(new N[0](N[1]));N[2]&&I.recognizeWith(N[2]),N[3]&&I.requireFailure(N[3])},this)}Ki.prototype={set:function(g){return v(this.options,g),g.touchAction&&this.touchAction.update(),g.inputTarget&&(this.input.destroy(),this.input.target=g.inputTarget,this.input.init()),this},stop:function(g){this.session.stopped=g?Je:Yi},recognize:function(g){var w=this.session;if(!w.stopped){this.touchAction.preventDefaults(g);var N,I=this.recognizers,j=w.curRecognizer;(!j||j&&j.state&Be)&&(j=w.curRecognizer=null);for(var z=0;z<I.length;)N=I[z],w.stopped!==Je&&(!j||N==j||N.canRecognizeWith(j))?N.recognize(g):N.reset(),!j&&N.state&(we|Ve|Ke)&&(j=w.curRecognizer=N),z++}},get:function(g){if(g instanceof Ut)return g;for(var w=this.recognizers,N=0;N<w.length;N++)if(w[N].options.event==g)return w[N];return null},add:function(g){if(d(g,"add",this))return this;var w=this.get(g.options.event);return w&&this.remove(w),this.recognizers.push(g),g.manager=this,this.touchAction.update(),g},remove:function(g){if(d(g,"remove",this))return this;if(g=this.get(g),g){var w=this.recognizers,N=B(w,g);N!==-1&&(w.splice(N,1),this.touchAction.update())}return this},on:function(g,w){if(g!==i&&w!==i){var N=this.handlers;return u(U(g),function(I){N[I]=N[I]||[],N[I].push(w)}),this}},off:function(g,w){if(g!==i){var N=this.handlers;return u(U(g),function(I){w?N[I]&&N[I].splice(B(N[I],w),1):delete N[I]}),this}},emit:function(g,w){this.options.domEvents&&S(g,w);var N=this.handlers[g]&&this.handlers[g].slice();if(!(!N||!N.length)){w.type=g,w.preventDefault=function(){w.srcEvent.preventDefault()};for(var I=0;I<N.length;)N[I](w),I++}},destroy:function(){this.element&&y(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}};function y(g,w){var N=g.element;if(N.style){var I;u(g.options.cssProps,function(j,z){I=W(N.style,z),w?(g.oldCssProps[I]=N.style[I],N.style[I]=j):N.style[I]=g.oldCssProps[I]||""}),w||(g.oldCssProps={})}}function S(g,w){var N=e.createEvent("Event");N.initEvent(g,!0,!0),N.gesture=w,w.target.dispatchEvent(N)}v(lr,{INPUT_START:D,INPUT_MOVE:V,INPUT_END:q,INPUT_CANCEL:Z,STATE_POSSIBLE:Cn,STATE_BEGAN:we,STATE_CHANGED:Ve,STATE_ENDED:Ke,STATE_RECOGNIZED:Be,STATE_CANCELLED:De,STATE_FAILED:le,DIRECTION_NONE:rt,DIRECTION_LEFT:gt,DIRECTION_RIGHT:Ct,DIRECTION_UP:Ft,DIRECTION_DOWN:kt,DIRECTION_HORIZONTAL:Ot,DIRECTION_VERTICAL:Lt,DIRECTION_ALL:Vt,Manager:Ki,Input:Zt,TouchAction:jt,TouchInput:Vn,MouseInput:Mn,PointerEventInput:Sn,TouchMouseInput:J,SingleTouchInput:ir,Recognizer:Ut,AttrRecognizer:tn,Tap:Hn,Pan:Xe,Swipe:Bn,Pinch:Tn,Rotate:Kr,Press:Yr,on:T,off:F,each:u,merge:x,extend:_,assign:v,inherit:b,bindFn:m,prefixed:W});var A=typeof t<"u"?t:typeof self<"u"?self:{};A.Hammer=lr,n.exports?n.exports=lr:t[r]=lr})(window,document,"Hammer")})(t8);const kg=[1,0,0,1,0,0],Cg=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];class fn{constructor(t=kg){Et(this,"value");Et(this,"matrix3d");Et(this,"isEverTo3d",!1);Et(this,"_prev_rotatex",0);Et(this,"_prev_rotatey",0);this.value=Array.from(t),this.matrix3d=this.toMatrix3D()}unit(){return this.value=Array.from(kg),this.matrix3d=this.toMatrix3D(),this}transformPoint(t,e,r=0,i=0){const s=t-r,a=e-i;return t=s*this.value[0]+a*this.value[2]+this.value[4],e=s*this.value[1]+a*this.value[3]+this.value[5],[t+r,e+i]}fromString(t){const e=gf("number",t);return e.length===6?e.forEach((r,i)=>{r.fullMatch&&(this.value[i]=parseFloat(r.fullMatch))}):this.unit(),this}toMatrix3D(t=this.matrix3d){const e=[this.value[0],this.value[1],0,0,this.value[2],this.value[3],0,0,0,0,1,0,this.value[4],this.value[5],0,1];return t?(t.value=e,t):new rs(e)}offset(t=0,e=0){return[t-this.value[4],e-this.value[5]]}clone(){return new fn(this.value)}multiply(t){const e=this.value;let r;t instanceof fn?r=t.value:r=t;const i=e[0]*r[0]+e[2]*r[1],s=e[1]*r[0]+e[3]*r[1],a=e[0]*r[2]+e[2]*r[3],o=e[1]*r[2]+e[3]*r[3],l=e[0]*r[4]+e[2]*r[5]+e[4],c=e[1]*r[4]+e[3]*r[5]+e[5];return e[0]=i,e[1]=s,e[2]=a,e[3]=o,e[4]=l,e[5]=c,this}inverse(){const t=new fn(this.value),e=t.value,r=1/(e[0]*e[3]-e[1]*e[2]),i=e[3]*r,s=-e[1]*r,a=-e[2]*r,o=e[0]*r,l=r*(e[2]*e[5]-e[3]*e[4]),c=r*(e[1]*e[4]-e[0]*e[5]);return e[0]=i,e[1]=s,e[2]=a,e[3]=o,e[4]=l,e[5]=c,t}translate(t,e){return this.matrix3d.translate(t,e,0),this.multiply([1,0,0,1,t,e])}translateTo(t,e){const r=this.offset(t,e);return this.translate(r[0],r[1])}translateX(t){return this.translate(t,0)}translateY(t){return this.translate(0,t)}translateZ(t){return this.isEverTo3d=!0,this.matrix3d.translate(0,0,t)}translate3d(t,e,r){return this.isEverTo3d=!0,this.matrix3d.translate(t,e,r)}rotate(t,e=0,r=0){const i=tu(t),s=+Math.cos(i).toFixed(9),a=+Math.sin(i).toFixed(9);return this.multiply([s,a,-a,s,e,r]),this.translate(-e,-r),this}rotateX(t){return this._prev_rotatex=t,this.isEverTo3d=!0,this.matrix3d.rotate("x",t)}rotateXTo(t){return this.rotateX(t-this._prev_rotatex)}rotateY(t){return this._prev_rotatey=t,this.isEverTo3d=!0,this.matrix3d.rotate("y",t)}rotateYTo(t){return this.rotateY(t-this._prev_rotatey)}rotateZ(t){return this.isEverTo3d=!0,this.matrix3d.rotate("z",t)}rotate3d(t,e,r){return this.isEverTo3d=!0,this.matrix3d.rotate("x",t).rotate("y",e).rotate("z",r)}scale(t,e=t,r=0,i=0){return this.matrix3d.scale(t,e,1),this.translate(r,i),this.multiply([t,0,0,e,0,0]),this.translate(-r,-i),this}scaleTo(t,e=t){return this.scale(t/this.value[0],e/this.value[3]),this}scaleX(t){return this.scale(t,1)}scaleY(t){return this.scale(1,t)}scaleZ(t){return this.isEverTo3d=!0,this.matrix3d.scale(1,1,t)}scale3d(t,e,r){return this.isEverTo3d=!0,this.matrix3d.scale(t,e,r)}skew(t,e=0){const r=t*Math.PI/180,i=e*Math.PI/180,s=Math.tan(r),a=Math.tan(i);return this.multiply([1,a,s,1,0,0])}skewX(t){return this.skew(t,0)}skewY(t){return this.skew(0,t)}skewZ(t){return this}skew3d(t,e,r){return this}split(){const t={dx:0,dy:0,scalex:1,scaley:1,shear:1,rotate:0,isSimple:!0,isSuperSimple:!0,noRotation:!1};t.dx=this.value[4],t.dy=this.value[5];const e=[[this.value[0],this.value[2]],[this.value[1],this.value[3]]];t.scalex=Math.sqrt(eu(e[0])),Sg(e[0]),t.shear=e[0][0]*e[1][0]+e[0][1]*e[1][1],e[1]=[e[1][0]-e[0][0]*t.shear,e[1][1]-e[0][1]*t.shear],t.scaley=Math.sqrt(eu(e[1])),Sg(e[1]),t.shear/=t.scaley;const r=-e[0][1],i=e[1][1];return i<0?(t.rotate=J6(Math.acos(i)),r<0&&(t.rotate=360-t.rotate)):t.rotate=tu(Math.asin(r)),t.isSimple=!+t.shear.toFixed(9)&&(t.scalex.toFixed(9)==t.scaley.toFixed(9)||!t.rotate),t.isSuperSimple=!+t.shear.toFixed(9)&&t.scalex.toFixed(9)==t.scaley.toFixed(9)&&!t.rotate,t.noRotation=!+t.shear.toFixed(9)&&!t.rotate,t}toTransformString(){const t=this.split();return t.isSimple?(t.scalex=+t.scalex.toFixed(4),t.scaley=+t.scaley.toFixed(4),t.rotate=+t.rotate.toFixed(4),(t.dx&&t.dy?"t"+[t.dx,t.dy]:"")+(t.scalex!=1||t.scaley!=1?"s"+[t.scalex,t.scaley,0,0]:"")+(t.rotate?"r"+[t.rotate,0,0]:"")):"matrix"+[this.value[0],this.value[1],this.value[2],this.value[3],this.value[4],this.value[5]]}toString(){return this.isEverTo3d?this.toMatrix3DString():`matrix(${this.value.map(t=>vf(t,6)).join(",")})`}toMatrix3DString(){return this.matrix3d.toString()}toFilter(){return"progid:DXImageTransform.Microsoft.Matrix(M11="+this.value[0]+", M12="+this.value[2]+", M21="+this.value[1]+", M22="+this.value[3]+", Dx="+this.value[4]+", Dy="+this.value[5]+", sizingmethod='auto expand')"}}class rs{constructor(t=Cg){Et(this,"value");this.value=Array.from(t)}unit(){return this.value=Array.from(Cg),this}fromString(t){const e=gf("number",t);return e.length===16?e.forEach((r,i)=>{r.fullMatch&&(this.value[i]=parseFloat(r.fullMatch))}):this.unit(),this}toMatrix(t){const e=[this.value[0],this.value[1],this.value[4],this.value[5],this.value[12],this.value[13]];return t?(t.value=e,t):new fn(e)}multiplyMatrix(t){const e=this.value[0],r=this.value[1],i=this.value[2],s=this.value[3],a=this.value[4],o=this.value[5],l=this.value[6],c=this.value[7],h=this.value[8],f=this.value[9],d=this.value[10],u=this.value[11],p=this.value[12],v=this.value[13],_=this.value[14],x=this.value[15],b=t.value[0],m=t.value[1],k=t.value[2],O=t.value[3],T=b*e+m*a+k*h+O*p,F=b*r+m*o+k*f+O*v,R=b*i+m*l+k*d+O*_,L=b*s+m*c+k*u+O*x;return new fn([T,F,R,L,0,0])}multiply(t){const e=new fn([t.value[0],t.value[1],t.value[2],t.value[3],0,0]),r=new fn([t.value[4],t.value[5],t.value[6],t.value[7],0,0]),i=new fn([t.value[8],t.value[9],t.value[10],t.value[11],0,0]),s=new fn([t.value[12],t.value[13],t.value[14],t.value[15],0,0]),a=this.multiplyMatrix(e),o=this.multiplyMatrix(r),l=this.multiplyMatrix(i),c=this.multiplyMatrix(s);return this.value[0]=a.value[0],this.value[1]=a.value[1],this.value[2]=a.value[2],this.value[3]=a.value[3],this.value[4]=o.value[0],this.value[5]=o.value[1],this.value[6]=o.value[2],this.value[7]=o.value[3],this.value[8]=l.value[0],this.value[9]=l.value[1],this.value[10]=l.value[2],this.value[11]=l.value[3],this.value[12]=c.value[0],this.value[13]=c.value[1],this.value[14]=c.value[2],this.value[15]=c.value[3],this}translate(t=0,e=0,r=0){return this.multiply(new rs([1,0,0,0,0,1,0,0,0,0,1,0,t,e,r,1]))}scale(t=1,e=1,r=1){return this.multiply(new rs([t,0,0,0,0,e,0,0,0,0,r,0,0,0,0,1]))}rotate(t,e){const r=tu(e),i=Math.sin,s=Math.cos;let a;switch(t){case"x":a=[1,0,0,0,0,s(r),i(r),0,0,-i(r),s(r),0,0,0,0,1];break;case"y":a=[s(r),0,-i(r),0,0,1,0,0,i(r),0,s(r),0,0,0,0,1];break;case"z":a=[s(r),i(r),0,0,-i(r),s(r),0,0,0,0,1,0,0,0,0,1];break}return this.multiply(new rs(a))}toString(){return`matrix3d(${this.value.map(t=>vf(t,6)).join(",")})`}}function al(n){const t=new fn;return n.replace(/([a-z0-9]+)\s*\(?\s*((-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)*[a-z%]*\s*,?\s*)+)\)?/gi,function(e,r,i){i.indexOf(",")>=0?i=i.split(/\s*,\s*/):i=i.split(/\s+/);const s=[];for(let a=0,o=i.length;a<o;a++)i[a].trim()&&s.push(parseFloat(""+i[a]));switch(r.toLowerCase()){case"t":case"translate":t.translate(s[0],s[1]);break;case"translatex":t.translateX(s[0]);break;case"translatey":t.translateY(s[0]);break;case"translatez":t.translateZ(s[0]);break;case"translate3d":t.translate3d(s[0],s[1],s[2]);break;case"r":case"rotate":t.rotate(s[0],s[1]??0,s[2]??0);break;case"rotatex":t.rotateX(s[0]);break;case"rotatey":t.rotateY(s[0]);break;case"rotatez":t.rotateZ(s[0]);break;case"rotate3d":t.rotate3d(s[0],s[1],s[2]);break;case"s":case"scale":t.scale(s[0],s[1]??s[0]);break;case"scalex":t.scaleX(s[0]);break;case"scaley":t.scaleY(s[0]);break;case"scalez":t.scaleZ(s[0]);break;case"scale3d":t.scale3d(s[0],s[1],s[2]);break;case"skew":t.skew(s[0],s[1]??0);break;case"skewx":t.skewX(s[0]);break;case"skewy":t.skewY(s[0]);break;case"skewz":t.skewZ(s[0]);break;case"skew3d":t.skew3d(s[0],s[1],s[2]);break;case"m":case"matrix":t.multiply([s[0],s[1],s[2],s[3],s[4],s[5]]);break;case"matrix3d":t.matrix3d.multiply(new rs(s));break}return""}),t}function e8(n){return typeof n!="string"?!1:(n=n.trim(),/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(n)&&/[\dz]$/i.test(n)&&n.length>4)}const ru={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},n8=/([astvzqmhlc])([^astvzqmhlc]*)/gi,r8=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;function i8(n){const t=n.match(r8);return t?t.map(Number):[]}function iu(n){const t=[];return n.replace(n8,function(e,r,i){let s=r.toLowerCase();for(i=i8(i),s=="m"&&i.length>2&&(t.push([r].concat(i.splice(0,2))),s="l",r=r=="m"?"l":"L");;){if(i.length==ru[s])return i.unshift(r),t.push(i);if(i.length<ru[s])throw new Error("malformed path data");t.push([r].concat(i.splice(0,ru[s])))}}),t}function su(n){var t=0,e=0,r=0,i=0;return n.map(function(s){s=s.slice();var a=s[0],o=a.toUpperCase();if(a!=o)switch(s[0]=o,a){case"a":s[6]+=r,s[7]+=i;break;case"v":s[1]+=i;break;case"h":s[1]+=r;break;default:for(var l=1;l<s.length;)s[l++]+=r,s[l++]+=i}switch(o){case"Z":r=t,i=e;break;case"H":r=s[1];break;case"V":i=s[1];break;case"M":r=t=s[1],i=e=s[2];break;default:r=s[s.length-2],i=s[s.length-1]}return s})}const Zs=Math.PI*2;function Tg(n,t,e,r){const i=n*r-t*e<0?-1:1;let s=n*e+t*r;return s>1&&(s=1),s<-1&&(s=-1),i*Math.acos(s)}function s8(n,t,e,r,i,s,a,o,l,c){const h=c*(n-e)/2+l*(t-r)/2,f=-l*(n-e)/2+c*(t-r)/2,d=a*a,u=o*o,p=h*h,v=f*f;let _=d*u-d*v-u*p;_<0&&(_=0),_/=d*v+u*p,_=Math.sqrt(_)*(i===s?-1:1);const x=_*a/o*f,b=_*-o/a*h,m=c*x-l*b+(n+e)/2,k=l*x+c*b+(t+r)/2,O=(h-x)/a,T=(f-b)/o,F=(-h-x)/a,R=(-f-b)/o,L=Tg(1,0,O,T);let U=Tg(O,T,F,R);return s===0&&U>0&&(U-=Zs),s===1&&U<0&&(U+=Zs),[m,k,L,U]}function a8(n,t){const e=1.3333333333333333*Math.tan(t/4),r=Math.cos(n),i=Math.sin(n),s=Math.cos(n+t),a=Math.sin(n+t);return[r,i,r-i*e,i+r*e,s+a*e,a-s*e,s,a]}function o8(n,t,e,r,i,s,a,o,l){const c=Math.sin(l*Zs/360),h=Math.cos(l*Zs/360),f=h*(n-e)/2+c*(t-r)/2,d=-c*(n-e)/2+h*(t-r)/2;if(f===0&&d===0)return[];if(a===0||o===0)return[];a=Math.abs(a),o=Math.abs(o);const u=f*f/(a*a)+d*d/(o*o);u>1&&(a*=Math.sqrt(u),o*=Math.sqrt(u));const p=s8(n,t,e,r,i,s,a,o,c,h),v=[];let _=p[2],x=p[3];const b=Math.max(Math.ceil(Math.abs(x)/(Zs/4)),1);x/=b;for(let m=0;m<b;m++)v.push(a8(_,x)),_+=x;return v.map(m=>{for(let k=0;k<m.length;k+=2){let O=m[k+0],T=m[k+1];O*=a,T*=o;const F=h*O-c*T,R=c*O+h*T;m[k+0]=F+p[0],m[k+1]=R+p[1]}return m})}function au(n){for(var t,e=[],r=0,i=0,s=0,a=0,o=null,l=null,c=0,h=0,f=0,d=n.length;f<d;f++){var u=n[f],p=u[0];switch(p){case"M":s=u[1],a=u[2];break;case"A":var v=o8(c,h,u[6],u[7],u[4],u[5],u[1],u[2],u[3]);if(!v.length)continue;v=v.map(k=>{const[O,T,F,R,L,U,B,Y]=k;return{x1:F,y1:R,x2:L,y2:U,x:B,y:Y}});for(var _=0,x;_<v.length;_++)x=v[_],u=["C",x.x1,x.y1,x.x2,x.y2,x.x,x.y],_<v.length-1&&e.push(u);break;case"S":var b=c,m=h;(t=="C"||t=="S")&&(b+=b-r,m+=m-i),u=["C",b,m,u[1],u[2],u[3],u[4]];break;case"T":t=="Q"||t=="T"?(o=c*2-o,l=h*2-l):(o=c,l=h),u=Eg(c,h,o,l,u[1],u[2]);break;case"Q":o=u[1],l=u[2],u=Eg(c,h,u[1],u[2],u[3],u[4]);break;case"L":u=ol(c,h,u[1],u[2]);break;case"H":u=ol(c,h,u[1],h);break;case"V":u=ol(c,h,c,u[1]);break;case"Z":u=ol(c,h,s,a);break}t=p,c=u[u.length-2],h=u[u.length-1],u.length>4?(r=u[u.length-4],i=u[u.length-3]):(r=c,i=h),e.push(u)}return e}function ol(n,t,e,r){return["C",n,t,e,r,e,r]}function Eg(n,t,e,r,i,s){return["C",n/3+2/3*e,t/3+2/3*r,i/3+2/3*e,s/3+2/3*r,i,s]}const l8=n=>Array.isArray(n);function is(n){if(!(this instanceof is))return new is(n);this._path=l8(n)?n:iu(n),this._path=su(this._path),this._path=h8(this._path),this._path=c8(this._path)}is.prototype.at=function(n,t){return this._walk(n,t).pos},is.prototype.length=function(){return this._walk(null).length},is.prototype._walk=function(n,t){let e=[0,0],r=[0,0,0],i=[0,0],s=0;for(let h=0;h<this._path.length;h++){let f=this._path[h];if(f[0]==="M"){if(e[0]=f[1],e[1]=f[2],n===0)return{length:s,pos:e}}else if(f[0]==="C"){r[0]=i[0]=e[0],r[1]=i[1]=e[1],r[2]=s;let d=100;for(let u=0;u<=d;u++){let p=u/d,v=a(f,p),_=o(f,p);if(s+=ou(e[0],e[1],v,_),e[0]=v,e[1]=_,typeof n=="number"&&s>=n){let x=(s-n)/(s-r[2]),b=[e[0]*(1-x)+r[0]*x,e[1]*(1-x)+r[1]*x];return{length:s,pos:b}}r[0]=e[0],r[1]=e[1],r[2]=s}}else if(f[0]==="Q"){r[0]=i[0]=e[0],r[1]=i[1]=e[1],r[2]=s;let d=100;for(let u=0;u<=d;u++){let p=u/d,v=l(f,p),_=c(f,p);if(s+=ou(e[0],e[1],v,_),e[0]=v,e[1]=_,typeof n=="number"&&s>=n){let x=(s-n)/(s-r[2]),b=[e[0]*(1-x)+r[0]*x,e[1]*(1-x)+r[1]*x];return{length:s,pos:b}}r[0]=e[0],r[1]=e[1],r[2]=s}}else if(f[0]==="L"){if(r[0]=e[0],r[1]=e[1],r[2]=s,s+=ou(e[0],e[1],f[1],f[2]),e[0]=f[1],e[1]=f[2],typeof n=="number"&&s>=n){let d=(s-n)/(s-r[2]),u=[e[0]*(1-d)+r[0]*d,e[1]*(1-d)+r[1]*d];return{length:s,pos:u}}r[0]=e[0],r[1]=e[1],r[2]=s}}return{length:s,pos:e};function a(h,f){return Math.pow(1-f,3)*i[0]+3*Math.pow(1-f,2)*f*h[1]+3*(1-f)*Math.pow(f,2)*h[3]+Math.pow(f,3)*h[5]}function o(h,f){return Math.pow(1-f,3)*i[1]+3*Math.pow(1-f,2)*f*h[2]+3*(1-f)*Math.pow(f,2)*h[4]+Math.pow(f,3)*h[6]}function l(h,f){return Math.pow(1-f,2)*i[0]+2*(1-f)*f*h[1]+Math.pow(f,2)*h[3]}function c(h,f){return Math.pow(1-f,2)*i[1]+2*(1-f)*f*h[2]+Math.pow(f,2)*h[4]}};function ou(n,t,e,r){let i=n-e,s=t-r;return Math.sqrt(i*i+s*s)}function c8(n){let t,e=0,r=0,i={S:{to:"C",x:3},T:{to:"Q",x:1}};for(let s=0,a=n.length;s<a;s++){let o=n[s],l=i[o[0]];l&&(o[0]=l.to,t&&(t[0]===l.to?(e=2*t[l.x+2]-t[l.x],r=2*t[l.x+3]-t[l.x+1]):(e=t[t.length-2],r=t[t.length-1])),o.splice(1,0,e,r)),t=o}return n}function h8(n){let t=[],e=["L",0,0],r;for(let i=0,s=n.length;i<s;i++){let a=n[i];switch(a[0]){case"M":e=["L",a[1],a[2]],t.push(a);break;case"Z":t.push(e);break;case"H":r=t[t.length-1]||["L",0,0],t.push(["L",a[1],r[r.length-1]]);break;case"V":r=t[t.length-1]||["L",0,0],t.push(["L",r[r.length-2],a[1]]);break;default:t.push(a)}}return t}const lu=n=>{if(typeof n=="function"||Object(n)!==n)return n;const t=new n.constructor;for(const e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=lu(n[e]));return t};function cu(n){const t=cu.ps=cu.ps||{};return t[n]?t[n].sleep=100:t[n]={sleep:100},setTimeout(()=>{for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&e!==n&&(t[e].sleep--,t[e].sleep||delete t[e])}),t[n]}function Ws(n,t,e,r){return n==null&&(n=t=e=r=0),t==null&&(t=n.y,e=n.width,r=n.height,n=n.x),{x:n,y:t,width:e,w:e,height:r,h:r,x2:n+e,y2:t+r,cx:n+e/2,cy:t+r/2,r1:Math.min(e,r)/2,r2:Math.max(e,r)/2,r0:Math.sqrt(e*e+r*r)/2,path:v8(n,t,e,r),vb:[n,t,e,r].join(" ")}}function Pg(n,t,e,r,i,s,a,o,l){const c=1-l,h=c**3,f=c**2,d=l*l,u=d*l,p=h*n+f*3*l*e+c*3*l*l*i+u*a,v=h*t+f*3*l*r+c*3*l*l*s+u*o,_=n+2*l*(e-n)+d*(i-2*e+n),x=t+2*l*(r-t)+d*(s-2*r+t),b=e+2*l*(i-e)+d*(a-2*i+e),m=r+2*l*(s-r)+d*(o-2*s+r),k=c*n+l*e,O=c*t+l*r,T=c*i+l*a,F=c*s+l*o,R=90-Math.atan2(_-b,x-m)*180/Math.PI;return{x:p,y:v,m:{x:_,y:x},n:{x:b,y:m},start:{x:k,y:O},end:{x:T,y:F},alpha:R}}function Ag(n,t,e,r,i,s,a,o){Array.isArray(n)||(n=[n,t,e,r,i,s,a,o]);const l=Ng(...n);return Ws(l.min.x,l.min.y,l.max.x-l.min.x,l.max.y-l.min.y)}function u8(n,t,e){return t>=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height}function d8(n,t){n=Ws(n),t=Ws(t);const{x:e,y:r,width:i,height:s}=n,{x:a,y:o,width:l,height:c}=t,h=e+i/2,f=r+s/2,d=a+l/2,u=o+c/2;return Math.abs(h-d)<=(i+l)/2||Math.abs(f-u)<=(s+c)/2}function Og(n,t,e,r,i){const s=-3*t+9*e-9*r+3*i,a=n*s+6*t-12*e+6*r;return n*a-3*t+3*e}function $g(n,t,e,r,i,s,a,o,l){l==null&&(l=1),l=Math.max(0,Math.min(l,1));const c=l/2,h=12,f=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],d=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472];let u=0;for(let p=0;p<h;p++){const v=c*f[p]+c,_=Og(v,n,e,i,a),x=Og(v,t,r,s,o),b=_*_+x*x;u+=d[p]*Math.sqrt(b)}return c*u}function f8(n,t,e,r,i,s,a,o){if(Math.max(n,e)<Math.min(i,a)||Math.min(n,e)>Math.max(i,a)||Math.max(t,r)<Math.min(s,o)||Math.min(t,r)>Math.max(s,o))return;const l=(n*r-t*e)*(i-a)-(n-e)*(i*o-s*a),c=(n*r-t*e)*(s-o)-(t-r)*(i*o-s*a),h=(n-e)*(s-o)-(t-r)*(i-a);if(!h)return;const f=l/h,d=c/h,u=Number(f.toFixed(2)),p=Number(d.toFixed(2));if(!(u<Number(Math.min(n,e).toFixed(2))||u>Number(Math.max(n,e).toFixed(2))||u<Number(Math.min(i,a).toFixed(2))||u>Number(Math.max(i,a).toFixed(2))||p<Number(Math.min(t,r).toFixed(2))||p>Number(Math.max(t,r).toFixed(2))||p<Number(Math.min(s,o).toFixed(2))||p>Number(Math.max(s,o).toFixed(2))))return{x:f,y:d}}function p8(n,t,e){const r=Ag(n),i=Ag(t);if(!d8(r,i))return e?0:[];const s=$g.apply(0,n),a=$g.apply(0,t),o=Math.ceil(s/8),l=Math.ceil(a/8),c=[],h=[],f={};let d=e?0:[];for(let u=0;u<o+1;u++){const p=Pg.apply(0,n.concat(u/o));c.push({x:p.x,y:p.y,t:u/o})}for(let u=0;u<l+1;u++){const p=Pg.apply(0,t.concat(u/l));h.push({x:p.x,y:p.y,t:u/l})}for(let u=0;u<o;u++)for(let p=0;p<l;p++){const v=c[u],_=c[u+1],x=h[p],b=h[p+1],m=Math.abs(_.x-v.x)<.001?"y":"x",k=Math.abs(b.x-x.x)<.001?"y":"x",O=f8(v.x,v.y,_.x,_.y,x.x,x.y,b.x,b.y);if(O&&f[O.x.toFixed(4)]!==O.y.toFixed(4)){f[O.x.toFixed(4)]=O.y.toFixed(4);const T=v.t+Math.abs((O[m]-v[m])/(_[m]-v[m]))*(_.t-v.t),F=x.t+Math.abs((O[k]-x[k])/(b[k]-x[k]))*(b.t-x.t);T>=0&&T<=1&&F>=0&&F<=1&&(e?d++:d.push({x:O.x,y:O.y,t1:T,t2:F}))}}return d}function g8(n,t,e){let r,i,s,a,o,l,c,h,f,d,u=e?0:[];for(let p=0,v=n.length;p<v;p++){const _=n[p];if(_[0]==="M")r=o=_[1],i=l=_[2];else{_[0]==="C"?(f=[r,i].concat(_.slice(1)),r=f[6],i=f[7]):(f=[r,i,r,i,o,l,o,l],r=o,i=l);for(let x=0,b=t.length;x<b;x++){const m=t[x];if(m[0]==="M")s=c=m[1],a=h=m[2];else{m[0]==="C"?(d=[s,a].concat(m.slice(1)),s=d[6],a=d[7]):(d=[s,a,s,a,c,h,c,h],s=c,a=h);const k=p8(f,d,e);if(e)u+=k;else{for(let O=0,T=k.length;O<T;O++)k[O].segment1=p,k[O].segment2=x,k[O].bez1=f,k[O].bez2=d;u=u.concat(k)}}}}}return u}function m8(n){const t=cu(n);if(t.bbox)return lu(t.bbox);if(!n)return Ws();let e=0,r=0,i=[],s=[],a=[];for(let d=0,u=n.length;d<u;d++)if(a=n[d],a[0]==="M")e=a[1],r=a[2],i.push(e),s.push(r);else{const p=Ng(e,r,a[1],a[2],a[3],a[4],a[5],a[6]);i=i.concat(p.min.x,p.max.x),s=s.concat(p.min.y,p.max.y),e=a[5],r=a[6]}const o=Math.min.apply(0,i),l=Math.min.apply(0,s),c=Math.max.apply(0,i),h=Math.max.apply(0,s),f=Ws(o,l,c-o,h-l);return t.bbox=lu(f),f}function v8(n,t,e,r,i){return i?[["M",Number(n)+Number(i),t],["l",e-i*2,0],["a",i,i,0,0,1,i,i],["l",0,r-i*2],["a",i,i,0,0,1,-i,i],["l",i*2-e,0],["a",i,i,0,0,1,-i,-i],["l",0,i*2-r],["a",i,i,0,0,1,i,-i],["z"]]:[["M",n,t],["l",e,0],["l",0,r],["l",-e,0],["z"]]}function Ng(n,t,e,r,i,s,a,o){const l=[],c=[[],[]];let h,f,d,u,p,v,_,x;for(let O=0;O<2;++O){if(O===0?(f=6*n-12*e+6*i,h=-3*n+9*e-9*i+3*a,d=3*e-3*n):(f=6*t-12*r+6*s,h=-3*t+9*r-9*s+3*o,d=3*r-3*t),Math.abs(h)<1e-12){if(Math.abs(f)<1e-12)continue;u=-d/f,u>0&&u<1&&l.push(u);continue}_=f*f-4*d*h,x=Math.sqrt(_),!(_<0)&&(p=(-f+x)/(2*h),p>0&&p<1&&l.push(p),v=(-f-x)/(2*h),v>0&&v<1&&l.push(v))}let b=l.length,m;const k=b;for(;b--;)u=l[b],m=1-u,c[0][b]=m*m*m*n+3*m*m*u*e+3*m*u*u*i+u*u*u*a,c[1][b]=m*m*m*t+3*m*m*u*r+3*m*u*u*s+u*u*u*o;return c[0][k]=n,c[1][k]=t,c[0][k+1]=a,c[1][k+1]=o,c[0].length=c[1].length=k+2,{min:{x:Math.min.apply(0,c[0]),y:Math.min.apply(0,c[1])},max:{x:Math.max.apply(0,c[0]),y:Math.max.apply(0,c[1])}}}function y8(n,t,e){const r=m8(n);return!(!u8(r,t,e)||g8(n,au([["M",t,e],["H",r.x2+10]]),1)%2!==1)}const hu=new Map;function Fg(n){if(hu.has(n))return hu.get(n);const t=is(n);return hu.set(n,t),t}function Rg(n){const t=document.createElementNS("http://www.w3.org/2000/svg","path");return t.setAttribute("d",n),t}function _8(n,t){return Eo?Rg(n).getTotalLength(t):Fg(n).length()}function b8(n,t){if(Eo)return Rg(n).getPointAtLength(t);{const e=Fg(n),[r,i]=e.at(t);return{x:r,y:i}}}let jn=null;function w8(n,t,e){if(Eo){jn||(jn=document.createElement("canvas").getContext("2d"));const r=new Path2D(n);return jn.isPointInPath(r,t,e)}else return y8(n,t,e)}function x8(n,t,e,{lineWidth:r=1,lineCap:i="butt",lineJoin:s="miter"}){if(Eo){if(jn||(jn=document.createElement("canvas").getContext("2d")),jn.isPointInStroke){jn.save(),jn.lineWidth=r,jn.lineCap=i,jn.lineJoin=s;const a=new Path2D(n),o=jn.isPointInStroke(a,t,e);return jn.restore(),o}}else return null}function S8(n){throw new Error('Could not dynamically require "'+n+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Mg={},Dg={exports:{}},Ig;function k8(){return Ig||(Ig=1,function(n){(function(t){var e="0.4.0",r="hasOwnProperty",i=/[\.\/]/,s="*",a=function(){},o=function(d,u){return d-u},l,c,h={n:{}},f=function(d,u){var p=c,v=Array.prototype.slice.call(arguments,2),_=f.listeners(d),x=0,b,m=[],k={},O=[];l=d,c=0;for(var T=0,F=_.length;T<F;T++)"zIndex"in _[T]&&(m.push(_[T].zIndex),_[T].zIndex<0&&(k[_[T].zIndex]=_[T]));for(m.sort(o);m[x]<0;)if(b=k[m[x++]],O.push(b.apply(u,v)),c)return c=p,O;for(T=0;T<F;T++)if(b=_[T],"zIndex"in b)if(b.zIndex==m[x]){if(O.push(b.apply(u,v)),c)return c=p,O;do if(x++,b=k[m[x]],b&&O.push(b.apply(u,v)),c)return c=p,O;while(b)}else k[b.zIndex]=b;else if(O.push(b.apply(u,v)),c)return c=p,O;return c=p,O.length?O:null};f.listeners=function(d){var u=d.split(i),p=h,v,_,x,b,m,k,O,T,F=[p],R=[];for(b=0,m=u.length;b<m;b++){for(T=[],k=0,O=F.length;k<O;k++)for(p=F[k].n,_=[p[u[b]],p[s]],x=2;x--;)v=_[x],v&&(T.push(v),R=R.concat(v.f||[]));F=T}return R},f.on=function(d,u){for(var p=d.split(i),v=h,_=0,x=p.length;_<x;_++)v=v.n,!v[p[_]]&&(v[p[_]]={n:{}}),v=v[p[_]];for(v.f=v.f||[],_=0,x=v.f.length;_<x;_++)if(v.f[_]==u)return a;return v.f.push(u),function(b){+b==+b&&(u.zIndex=+b)}},f.stop=function(){c=1},f.nt=function(d){return d?new RegExp("(?:\\.|\\/|^)"+d+"(?:\\.|\\/|$)").test(l):l},f.unbind=function(d,u){var p=d.split(i),v,_,x,b,m,k,O,T=[h];for(b=0,m=p.length;b<m;b++)for(k=0;k<T.length;k+=x.length-2){if(x=[k,1],v=T[k].n,p[b]!=s)v[p[b]]&&x.push(v[p[b]]);else for(_ in v)v[r](_)&&x.push(v[_]);T.splice.apply(T,x)}for(b=0,m=T.length;b<m;b++)for(v=T[b];v.n;){if(u){if(v.f){for(k=0,O=v.f.length;k<O;k++)if(v.f[k]==u){v.f.splice(k,1);break}!v.f.length&&delete v.f}for(_ in v.n)if(v.n[r](_)&&v.n[_].f){var F=v.n[_].f;for(k=0,O=F.length;k<O;k++)if(F[k]==u){F.splice(k,1);break}!F.length&&delete v.n[_].f}}else{delete v.f;for(_ in v.n)v.n[r](_)&&v.n[_].f&&delete v.n[_].f}v=v.n}},f.once=function(d,u){var p=function(){u.apply(this,arguments),f.unbind(d,p)};return f.on(d,p)},f.version=e,f.toString=function(){return"You are running Eve "+e},n.exports?n.exports=f:t.eve=f})(nu)}(Dg)),Dg.exports}(function(n){if(typeof S8=="function")var t=k8();(function(){function e(d){var u=function(p){u.parse(p)};return u.mode="text",u.type=String(d||"html").toLowerCase(),u.textchunk="",u.raw="",u.parse=l,u.on=a,u.event=s,u.end=i,u}function r(d,u,p){d==`
38
+ `&&this.event("newline"),f[this.mode].call(this,d,u,p)}function i(){r.call(this,"eof"),this.event("eof")}function s(d,u,p){typeof t=="function"&&t("elemental."+d+"."+u,null,u,p||"",this.raw);for(var v=this.events&&this.events[d],_=v&&v.length;_--;)try{this.events[d][_](u,p||"",this.raw)}catch{}this.raw=""}function a(d,u){this.events=this.events||{},this.events[d]=this.events[d]||[],this.events[d].push(u)}function o(d,u){return d&&(d.charAt?d.charAt(u):d[u])}function l(d){d=d||Object(d);for(var u=1,p=d.length+1,v,_,x=o(d,0);u<p;u++)v=_,_=x,x=o(d,u),this.raw+=_,r.call(this,_,x,v);this._beforeEnd=function(){r.call(this,"","",_)}}var c=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000]/,h=function(){for(var d in this.attr)this.attr.hasOwnProperty(d)&&this.event("attr",d,{value:this.attr[d],tagname:this.tagname,attr:this.attr})},f={text:function(d,u,p){switch(d){case"<":case"eof":this.nodename="",this.attr={},this.mode="tag name start",this.raw=this.raw.slice(0,-1),this.textchunk&&this.event("text",this.textchunk),this.raw+=d,this.textchunk="";break;default:this.textchunk+=d}},special:function(d,u,p){if(p=="!"&&d=="-"&&u=="-")this.mode="comment start";else{if(this.textchunk=="[CDATA"&&d=="["){this.mode="cdata",this.textchunk="";return}if(d==">"||d=="eof"){this.event("special",this.textchunk),this.mode="text",this.textchunk="";return}this.textchunk+=d}},cdata:function(d,u,p){p=="]"&&d=="]"&&u==">"?(this.mode="cdata end",this.textchunk=this.textchunk.slice(0,-1)):(d=="eof"&&f["cdata end"].call(this),this.textchunk+=d)},"cdata end":function(d,u,p){this.event("cdata",this.textchunk),this.textchunk="",this.mode="text"},"comment start":function(d,u,p){u==">"||d=="eof"?(this.event("comment",""),this.mode="comment instant end"):this.mode="comment"},"comment instant end":function(d,u,p){this.mode="text"},comment:function(d,u,p){d=="-"&&p=="-"&&u==">"?(this.mode="comment end",this.textchunk=this.textchunk.slice(0,-1)):d=="eof"?this.event("comment",this.textchunk):this.textchunk+=d},"comment end":function(d,u,p){this.event("comment",this.textchunk),this.textchunk="",this.mode="text"},declaration:function(d,u,p){d=="?"&&u==">"?this.mode="declaration end":(d=="eof"&&this.event("comment",this.textchunk),this.textchunk+=d)},"declaration end":function(d,u,p){this.event("comment",this.textchunk),this.textchunk="",this.mode="text"},"tag name start":function(d,u,p){if(d=="eof")this.event("text","<");else if(!c.test(d)){if(this.mode="tag name",d=="/"){this.mode="close tag name start";return}if(d=="!"){this.mode="special",this.textchunk="";return}if(d=="?"){this.mode="declaration";return}f[this.mode].call(this,d,u,p)}},"close tag name start":function(d,u,p){c.test(d)||(this.mode="close tag name",this.tagname="",this.nodename="",f[this.mode].call(this,d,u,p))},"close tag name":function(d,u,p){if(c.test(d))this.tagname=this.nodename;else switch(d){case">":this.event("/tag",this.tagname||this.nodename),this.mode="text";break;default:!this.tagname&&(this.nodename+=d)}},"tag name":function(d,u,p){if(c.test(d))this.tagname=this.nodename,this.nodename="",this.mode="attr start";else switch(d){case">":this.event("tag",this.nodename),this.mode="text";break;default:this.nodename+=d}},"attr start":function(d,u,p){c.test(d)||(this.mode="attr",this.nodename="",f[this.mode].call(this,d,u,p))},attr:function(d,u,p){if(c.test(d)||d=="=")this.attr[this.nodename]="",this.mode="attr value start";else switch(d){case">":this.nodename=="/"?(delete this.attr["/"],this.event("tag",this.tagname,this.attr),h.call(this),this.event("/tag",this.tagname,!0)):(this.nodename&&(this.attr[this.nodename]=""),this.event("tag",this.tagname,this.attr),h.call(this)),this.mode="text";break;default:this.nodename+=d}},"attr value start":function(d,u,p){if(!c.test(d)){if(this.mode="attr value",this.quote=!1,d=="'"||d=='"'){this.quote=d;return}f[this.mode].call(this,d,u,p)}},"attr value":function(d,u,p){if(c.test(d)&&!this.quote)this.mode="attr start";else if(d==">"&&!this.quote)this.event("tag",this.tagname,this.attr),this.mode="text";else switch(d){case'"':case"'":this.quote==d&&p!="\\"&&(this.mode="attr start");break;default:this.attr[this.nodename]+=d}}};e.version="0.2.1",n.elemental=e,n.eve=t})()})(Mg);const jg=An(Mg);function uu(n,t,e,r,i,s){if(typeof i>"u"||typeof s>"u"){const a=n-e,o=t-r;return!a&&!o?0:(180+Math.atan2(-o,-a)*180/Math.PI+360)%360}else return uu(n,t,i,s)-uu(e,r,i,s)}const Xt=jg.eve,C8=jg.elemental,ll={cursor:1,cx:0,cy:0,fill:1,"fill-opacity":0,font:1,"font-family":1,"font-size":0,"font-style":1,"font-weight":1,height:0,"letter-spacing":0,opacity:0,r:0,rx:0,ry:0,src:1,stroke:1,"stroke-linecap":1,"stroke-linejoin":1,"stroke-miterlimit":0,"stroke-opacity":0,"stroke-width":0,"text-anchor":1,width:0,x:0,y:0};function du(n,t,e){for(var r=(n+"").split(";"),i=/^\s+|\s+$/g,s,a=0,o=r.length;a<o;a++){var l=r[a].split(":");s=l[0].replace(i,"").replace(/[A-Z]/g,function(c){return"-"+c.toLowerCase()}),(!e||s in e)&&(t[s]=l[1].replace(i,""),e&&!e[s]&&(t[s]=parseFloat(t[s])))}}function T8(n){const t=C8(),e=[],r=[],i={};let s,a,o;const l={};function c(h,f){return function(d,u){const p={type:f||h};e.push(p);for(let v in u)Object.prototype.hasOwnProperty.call(u,v)&&Xt("rappar."+h+".attr."+v,p,u[v],v);Xt("rappar."+h+".attrend",p,u)}}return Xt.on("rappar.polygon.attr.points",function(h){this.path="M"+h+"z",Xt.stop()}),Xt.on("rappar.image.attr.xlink:href",function(h){this.src=h,Xt.stop()}),Xt.on("rappar.path.attr.d",function(h){this.path=h,Xt.stop()}),Xt.on("rappar.*.attr.transform",function(h){this.transform=al(h).toTransformString(),Xt.stop()}),Xt.on("rappar.*.attr.fill",function(h){var f=h.match(/url\(#([^)]+)\)/),d=this;f&&(f=f[1],i[f]?this.fill=i[f]:Xt.on("rappar.found."+f,function(u){d.fill=u}),Xt.stop())}),Xt.on("rappar.line.attrend",function(h){this.path="M"+[h.x1,h.y1,h.x2,h.y2]}),Xt.on("rappar.*.attrend",function(){for(var h=r.length;h--;)if(r[h]!=this){let d="",u="";for(var f in r[h])f=="transform"?d=r[h].transform:f=="class"&&l["."+r[h][f]]?u=l["."+r[h][f]].join(";")+";"+u:f=="id"&&l["#"+r[h][f]]?u=l["#"+r[h][f]].join(";")+";"+u:typeof this[f]>"u"&&(this[f]=r[h][f]);this.type&&(typeof this.transform>"u"?this.transform=d:this.transform+=d,typeof this.style>"u"?this.style=u:this.style=u+this.style,du(this.style,this,ll))}}),Xt.on("rappar.*.attr.style",function(h){var f=function(){du(h,this,ll),Xt.unbind("rappar.*.attrend",f)};Xt.on("rappar.*.attrend",f),Xt.stop()}),Xt.on("rappar.*.attr.*",function(h,f){f in ll&&(this[f]=ll[f]?h:parseFloat(h))}),Xt.on("elemental.tag.circle",c("circle")),Xt.on("elemental.tag.ellipse",c("ellipse")),Xt.on("elemental.tag.polygon",c("polygon","path")),Xt.on("elemental.tag.path",c("path")),Xt.on("elemental.tag.line",c("line","path")),Xt.on("elemental.tag.rect",c("rect")),Xt.on("elemental.tag.image",c("image")),Xt.on("elemental.tag.text",c("text")),Xt.on("elemental.text",function(h){try{const f=Zb(h);for(let d of f.stylesheet.rules){for(let u of d.selectors)l[u]=[];for(let u of d.declarations)for(let p of d.selectors)l[p].push(`${u.property}:${u.value}`)}}catch{}}),Xt.on("elemental.tag.svg",function(h,f){let d=f.width||0,u=f.height||0;if(!d||!u){const p=f.viewBox.split(/\s+/gi);d=parseFloat(p[2])-parseFloat(p[0]),u=parseFloat(p[3])-parseFloat(p[1])}e.push({type:"viewbox",width:d,height:u})}),Xt.on("rappar.text.attrend",function(){s="",a=this,this["text-anchor"]=this["text-anchor"]||"start"}),Xt.on("elemental.text",function(h,f,d){a&&(s+=d)}),Xt.on("elemental./tag.text",function(){a.text=s,a=null}),Xt.on("elemental.tag.g",function(h,f){var d={};r.push(d);for(var u in f)Object.prototype.hasOwnProperty.call(f,u)&&(d[u]=f[u],Xt("rappar.g.attr."+u,d,f[u],u));Xt("rappar.g.attrend",d)}),Xt.on("elemental./tag.g",function(h,f){r.pop()}),Xt.on("elemental.tag.linearGradient",function(h,f){o={id:f.id,angle:+(360+uu(f.x1,f.y1,f.x2,f.y2,f.x1+100,f.y1)).toFixed(2),stops:[]}}),Xt.on("elemental./tag.linearGradient",function(){for(var h=[o.angle],f,d=0,u=o.stops.length;d<u;d++)f=o.stops[d],d&&d!=u-1?h.push(f.color+":"+f.offset):h.push(f.color);i[o.id]=h.join("-"),Xt("rappar.found."+o.id,null,i[o.id])}),Xt.on("elemental.tag.radialGradient",function(h,f){o={id:f.id,stops:[]}}),Xt.on("elemental./tag.radialGradient",function(){for(var h=[],f,d=0,u=o.stops.length;d<u;d++)f=o.stops[d],d&&d!=u-1?h.push(f.color+":"+f.offset):h.push(f.color);i[o.id]="r"+h.join("-"),Xt("rappar.found."+o.id,null,i[o.id])}),Xt.on("elemental.tag.stop",function(h,f){var d={};f.style&&du(f.style,d),d.offset=d.offset||f.offset,d.color=d["stop-color"]||f["stop-color"],d.opacity=d["stop-opacity"]||f["stop-opacity"],~(d.offset+"").indexOf("%")?d.offset=parseFloat(d.offset):d.offset=parseFloat(d.offset)*100,d.offset=+d.offset.toFixed(2),o.stops.push(d)}),t(n),t.end(),e}const Lg=E8("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);function E8(n,t=10){const e={},r=n.split(",");for(let i=0;i<r.length;i+=2){const s="&"+r[i+1]+";",a=parseInt(r[i],t);e[s]="&#"+a+";"}return e["\\xa0"]="&#160;",e}function pn(n,t){const e=Object.keys(t);for(let r=0;r<e.length;r++)n=n.replace(new RegExp("{"+e[r]+"}","gi"),""+t[e[r]]);return n}function cl(n){let t,e;if(!n)throw new Error("cannot create a random attribute name for an undefined object");const r="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";t="";do for(t="",e=0;e<12;e++)t+=r[Math.floor(Math.random()*r.length)];while(n[t]);return t}function P8(n){const t={left:"start",right:"end",center:"middle",start:"start",end:"end"};return t[n]||t.start}function A8(n){const t={alphabetic:"alphabetic",hanging:"hanging",top:"text-before-edge",bottom:"text-after-edge",middle:"central"};return t[n]||t.alphabetic}const ta={strokeStyle:{svgAttr:"stroke",canvas:"#000000",svg:"none",apply:"stroke"},fillStyle:{svgAttr:"fill",canvas:"#000000",svg:null,apply:"fill"},lineCap:{svgAttr:"stroke-linecap",canvas:"butt",svg:"butt",apply:"stroke"},lineJoin:{svgAttr:"stroke-linejoin",canvas:"miter",svg:"miter",apply:"stroke"},miterLimit:{svgAttr:"stroke-miterlimit",canvas:10,svg:4,apply:"stroke"},lineWidth:{svgAttr:"stroke-width",canvas:1,svg:1,apply:"stroke"},globalAlpha:{svgAttr:"opacity",canvas:1,svg:1,apply:"fill stroke"},font:{canvas:"10px sans-serif"},shadowColor:{canvas:"#000000"},shadowOffsetX:{canvas:0},shadowOffsetY:{canvas:0},shadowBlur:{canvas:0},textAlign:{canvas:"start"},textBaseline:{canvas:"alphabetic"},lineDash:{svgAttr:"stroke-dasharray",canvas:[],svg:null,apply:"stroke"}};class fu{constructor(t,e){Et(this,"__root");Et(this,"__ctx");this.__root=t,this.__ctx=e}addColorStop(t,e){const r=this.__ctx.__createElement("stop");if(r.setAttribute("offset",""+t),e.indexOf("rgba")!==-1){const i=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(e);i&&(r.setAttribute("stop-color",pn("rgb({r},{g},{b})",{r:i[1],g:i[2],b:i[3]})),r.setAttribute("stop-opacity",i[4]))}else r.setAttribute("stop-color",e);this.__root.appendChild(r)}}class Ug{constructor(t,e){Et(this,"__root");Et(this,"__ctx");this.__root=t,this.__ctx=e}}class hl{constructor({canvas:t,width:e=500,height:r=500,enableMirroring:i=!1}){Et(this,"__document",document);Et(this,"__canvas");Et(this,"__ctx");Et(this,"width");Et(this,"height");Et(this,"__styleStack");Et(this,"__groupStack");Et(this,"__rootSVG");Et(this,"__ids");Et(this,"__SVGdefs");Et(this,"__currentElement");Et(this,"__currentElementsToStyle",null);this.enableMirroring=i,t?(this.__canvas=t,this.__ctx=t.getContext("2d"),this.width=t.width,this.height=t.height):(this.__canvas=this.__document.createElement("canvas"),this.__ctx=this.__canvas.getContext("2d"),this.width=e,this.height=r),this.__setDefaultStyles(),this.__styleStack=[this.__getStyleState()],this.__groupStack=[],this.__rootSVG=this.__document.createElementNS("http://www.w3.org/2000/svg","svg"),this.__rootSVG.setAttribute("version","1.1"),this.__rootSVG.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.__rootSVG.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),this.__rootSVG.setAttribute("width",""+this.width),this.__rootSVG.setAttribute("height",""+this.height),this.__ids={},this.__SVGdefs=this.__document.createElementNS("http://www.w3.org/2000/svg","defs"),this.__rootSVG.appendChild(this.__SVGdefs),this.__currentElement=this.__document.createElementNS("http://www.w3.org/2000/svg","g"),this.__rootSVG.appendChild(this.__currentElement)}__setDefaultStyles(){const t=Object.keys(ta);for(let e=0,r=t.length;e<r;e++){const i=t[e];this[i]=ta[i].canvas}}__getStyleState(){const t={},e=Object.keys(ta);for(let r=0,i=e.length;r<i;r++){const s=e[r];t[s]=this[s]}return t}__applyStyleState(t){const e=Object.keys(t);for(let r=0,i=e.length;r<i;r++){const s=e[r];this[s]=t[s]}}__createElement(t,e={},r=!1){const i=this.__document.createElementNS("http://www.w3.org/2000/svg",t),s=Object.keys(e);r&&(i.setAttribute("fill","none"),i.setAttribute("stroke","none"));for(let a=0;a<s.length;a++){const o=s[a];i.setAttribute(o,e[o])}return i}__applyStyleToCurrentElement(t){let e=this.__currentElement;const r=this.__currentElementsToStyle;r&&(e.setAttribute(t,""),e=r.element,r.children.forEach(s=>{s.setAttribute(t,"")}));const i=Object.keys(ta);for(let s=0;s<i.length;s++){const a=ta[i[s]],o=this[i[s]];if(a.apply){if(o instanceof Ug){if(o.__ctx)for(;o.__ctx.__SVGdefs.childNodes.length;){const l=o.__ctx.__SVGdefs.childNodes[0].getAttribute("id");this.__ids[l]=l,this.__SVGdefs.appendChild(o.__ctx.__SVGdefs.childNodes[0])}e.setAttribute(a.apply,pn("url(#{id})",{id:o.__root.getAttribute("id")}))}else if(o instanceof fu)e.setAttribute(a.apply,pn("url(#{id})",{id:o.__root.getAttribute("id")}));else if(a.apply.indexOf(t)!==-1&&a.svg!==o)if((a.svgAttr==="stroke"||a.svgAttr==="fill")&&o.indexOf("rgba")!==-1){const l=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(o);e.setAttribute(a.svgAttr,pn("rgb({r},{g},{b})",{r:l[1],g:l[2],b:l[3]}));let c=parseFloat(l[4]);const h=this.globalAlpha;h!=null&&(c*=h),e.setAttribute(a.svgAttr+"-opacity",""+c)}else{let l=a.svgAttr;if(i[s]==="globalAlpha"&&(l=t+"-"+a.svgAttr,e.getAttribute(l)))continue;l&&e.setAttribute(l,o)}}}}__closestGroupOrSvg(t){return t=t||this.__currentElement,t.nodeName==="g"||t.nodeName==="svg"?t:this.__closestGroupOrSvg(t.parentNode)}getSerializedSvg(t){let e=new XMLSerializer().serializeToString(this.__rootSVG);if(/xmlns="http:\/\/www\.w3\.org\/2000\/svg".+xmlns="http:\/\/www\.w3\.org\/2000\/svg/gi.test(e)&&(e=e.replace('xmlns="http://www.w3.org/2000/svg','xmlns:xlink="http://www.w3.org/1999/xlink')),t){const r=Object.keys(Lg);for(let i=0,s=r.length;i<s;i++){const a=r[i],o=Lg[a],l=new RegExp(a,"gi");l.test(e)&&(e=e.replace(l,o))}}return e}getSvg(){return this.__rootSVG}save(){const t=this.__createElement("g"),e=this.__closestGroupOrSvg();this.__groupStack.push(e),e.appendChild(t),this.__currentElement=t,this.__styleStack.push(this.__getStyleState())}restore(){this.__currentElementsToStyle=null;const t=this.__groupStack.pop();t?this.__currentElement=t:this.__currentElement=this.__rootSVG.childNodes[1];const e=this.__styleStack.pop();e&&this.__applyStyleState(e)}__addTransform(t){const e=this.__closestGroupOrSvg();if(e.childNodes.length>0){this.__currentElement.nodeName==="path"&&(this.__currentElementsToStyle||(this.__currentElementsToStyle={element:e,children:[]}),this.__currentElementsToStyle.children.push(this.__currentElement),this.__applyCurrentDefaultPath());const i=this.__createElement("g");e.appendChild(i),this.__currentElement=i}let r=this.__currentElement.getAttribute("transform");r?r+=" ":r="",r+=t,this.__currentElement.setAttribute("transform",r)}scale(t,e){e===void 0&&(e=t),this.__addTransform(pn("scale({x},{y})",{x:t,y:e}))}rotate(t){const e=t*180/Math.PI;this.__addTransform(pn("rotate({angle},{cx},{cy})",{angle:e,cx:0,cy:0}))}translate(t,e){this.__addTransform(pn("translate({x},{y})",{x:t,y:e}))}transform(t,e,r,i,s,a){this.__addTransform(pn("matrix({a},{b},{c},{d},{e},{f})",{a:t,b:e,c:r,d:i,e:s,f:a}))}beginPath(){this.__currentDefaultPath="",this.__currentPosition={};const t=this.__createElement("path",{},!0);this.__closestGroupOrSvg().appendChild(t),this.__currentElement=t}__applyCurrentDefaultPath(){const t=this.__currentElement;t.nodeName==="path"?t.setAttribute("d",this.__currentDefaultPath):console.error("Attempted to apply path command to node",t.nodeName)}__addPathCommand(t){this.__currentDefaultPath+=" ",this.__currentDefaultPath+=t}moveTo(t,e){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.__currentPosition={x:t,y:e},this.__addPathCommand(pn("M {x} {y}",this.__currentPosition))}closePath(){this.__currentDefaultPath&&this.__addPathCommand("Z")}lineTo(t,e){this.__currentPosition={x:t,y:e},this.__currentDefaultPath.indexOf("M")>-1?this.__addPathCommand(pn("L {x} {y}",this.__currentPosition)):this.__addPathCommand(pn("M {x} {y}",this.__currentPosition))}bezierCurveTo(t,e,r,i,s,a){this.__currentPosition={x:s,y:a},this.__addPathCommand(pn("C {cp1x} {cp1y} {cp2x} {cp2y} {x} {y}",{cp1x:t,cp1y:e,cp2x:r,cp2y:i,x:s,y:a}))}quadraticCurveTo(t,e,r,i){this.__currentPosition={x:r,y:i},this.__addPathCommand(pn("Q {cpx} {cpy} {x} {y}",{cpx:t,cpy:e,x:r,y:i}))}normalize(t){const e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]}arcTo(t,e,r,i,s){const a=this.__currentPosition&&this.__currentPosition.x,o=this.__currentPosition&&this.__currentPosition.y;if(typeof a>"u"||typeof o>"u")return;if(s<0)throw new Error("IndexSizeError: The radius provided ("+s+") is negative.");if(a===t&&o===e||t===r&&e===i||s===0){this.lineTo(t,e);return}const l=this.normalize([a-t,o-e]),c=this.normalize([r-t,i-e]);if(l[0]*c[1]===l[1]*c[0]){this.lineTo(t,e);return}const h=l[0]*c[0]+l[1]*c[1],f=Math.acos(Math.abs(h)),d=this.normalize([l[0]+c[0],l[1]+c[1]]),u=s/Math.sin(f/2),p=t+u*d[0],v=e+u*d[1],_=[-l[1],l[0]],x=[c[1],-c[0]],b=function(O){const T=O[0];return O[1]>=0?Math.acos(T):-Math.acos(T)},m=b(_),k=b(x);this.lineTo(p+_[0]*s,v+_[1]*s),this.arc(p,v,s,m,k)}stroke(){this.__currentElement.nodeName==="path"&&this.__currentElement.setAttribute("paint-order","fill stroke markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("stroke")}fill(){this.__currentElement.nodeName==="path"&&this.__currentElement.setAttribute("paint-order","stroke fill markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("fill")}rect(t,e,r,i){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.moveTo(t,e),this.lineTo(t+r,e),this.lineTo(t+r,e+i),this.lineTo(t,e+i),this.lineTo(t,e),this.closePath()}fillRect(t,e,r,i){const s=this.__createElement("rect",{x:t,y:e,width:r,height:i},!0);this.__closestGroupOrSvg().appendChild(s),this.__currentElement=s,this.__applyStyleToCurrentElement("fill")}strokeRect(t,e,r,i){const s=this.__createElement("rect",{x:t,y:e,width:r,height:i},!0);this.__closestGroupOrSvg().appendChild(s),this.__currentElement=s,this.__applyStyleToCurrentElement("stroke")}__clearCanvas(){const t=this.__closestGroupOrSvg().getAttribute("transform"),e=this.__rootSVG.childNodes[1],r=e.childNodes;for(let i=r.length-1;i>=0;i--)r[i]&&e.removeChild(r[i]);this.__currentElement=e,this.__groupStack=[],t&&this.__addTransform(t)}clearRect(t,e,r,i){if(t===0&&e===0&&r===this.width&&i===this.height){this.__clearCanvas();return}const s=this.__closestGroupOrSvg(),a=this.__createElement("rect",{x:t,y:e,width:r,height:i,fill:"#FFFFFF"},!0);s.appendChild(a)}createLinearGradient(t,e,r,i){const s=this.__createElement("linearGradient",{id:cl(this.__ids),x1:t+"px",x2:r+"px",y1:e+"px",y2:i+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(s),new fu(s,this)}createRadialGradient(t,e,r,i,s,a){const o=this.__createElement("radialGradient",{id:cl(this.__ids),cx:i+"px",cy:s+"px",r:a+"px",fx:t+"px",fy:e+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(o),new fu(o,this)}__parseFont(){const t=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:%|in|[cem]m|ex|p[CustomCanvasContext]))(?:\s*\/\s*(normal|[.\d]+(?:%|in|[cem]m|ex|p[CustomCanvasContext])))?\s*([-,'"\sa-z0-9]+?)\s*$/i.exec(this.font),e={style:t[1]||"normal",size:t[4]||"10px",family:t[6]||"sans-serif",weight:t[3]||"normal",decoration:t[2]||"normal",href:null};return this.__fontUnderline==="underline"&&(e.decoration="underline"),this.__fontHref&&(e.href=this.__fontHref),e}__wrapTextLink(t,e){if(t.href){const r=this.__createElement("a");return r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.href),r.appendChild(e),r}return e}__applyText(t,e,r,i){const s=this.__parseFont(),a=this.__closestGroupOrSvg(),o=this.__createElement("text",{"font-family":s.family,"font-size":s.size,"font-style":s.style,"font-weight":s.weight,"text-decoration":s.decoration,x:e,y:r,"text-anchor":P8(this.textAlign),"dominant-baseline":A8(this.textBaseline)},!0);o.appendChild(this.__document.createTextNode(t)),this.__currentElement=o,this.__applyStyleToCurrentElement(i),a.appendChild(this.__wrapTextLink(s,o))}fillText(t,e,r){this.__applyText(t,e,r,"fill")}strokeText(t,e,r){this.__applyText(t,e,r,"stroke")}measureText(t){return this.__ctx.font=this.font,this.__ctx.measureText(t)}arc(t,e,r,i,s,a){if(i===s)return;i=i%(2*Math.PI),s=s%(2*Math.PI),i===s&&(s=(s+2*Math.PI-.001*(a?-1:1))%(2*Math.PI));const o=t+r*Math.cos(s),l=e+r*Math.sin(s),c=t+r*Math.cos(i),h=e+r*Math.sin(i),f=a?0:1;let d=0,u=s-i;u<0&&(u+=2*Math.PI),a?d=u>Math.PI?0:1:d=u>Math.PI?1:0,this.lineTo(c,h),this.__addPathCommand(pn("A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}",{rx:r,ry:r,xAxisRotation:0,largeArcFlag:d,sweepFlag:f,endX:o,endY:l})),this.__currentPosition={x:o,y:l}}clip(){const t=this.__closestGroupOrSvg(),e=this.__createElement("clipPath"),r=cl(this.__ids),i=this.__createElement("g");this.__applyCurrentDefaultPath(),t.removeChild(this.__currentElement),e.setAttribute("id",r),e.appendChild(this.__currentElement),this.__SVGdefs.appendChild(e),t.setAttribute("clip-path",pn("url(#{id})",{id:r})),t.appendChild(i),this.__currentElement=i}drawImage(...t){var m;let e=t[0],r,i,s,a,o=0,l=0,c,h,f,d,u,p,v,_;if(t.length===3)r=t[1],i=t[2],c=e.width,h=e.height,s=c,a=h;else if(t.length===5)r=t[1],i=t[2],s=t[3],a=t[4],c=e.width,h=e.height;else if(t.length===9)o=t[1],l=t[2],c=t[3],h=t[4],r=t[5],i=t[6],s=t[7],a=t[8];else throw new Error("Invalid number of arguments passed to drawImage: "+arguments.length);const x=this.__closestGroupOrSvg();this.__currentElement;const b="translate("+r+", "+i+")";if(e instanceof hl){if(f=e.getSvg().cloneNode(!0),f.childNodes&&f.childNodes.length>1){for(d=f.childNodes[0];d.childNodes.length;)_=d.childNodes[0].getAttribute("id"),this.__ids[_]=_,this.__SVGdefs.appendChild(d.childNodes[0]);if(u=f.childNodes[1],u){const k=u.getAttribute("transform");let O;k?O=k+" "+b:O=b,u.setAttribute("transform",O),x.appendChild(u)}}}else(e.nodeName==="CANVAS"||e.nodeName==="IMG")&&(p=this.__createElement("image"),p.setAttribute("width",s),p.setAttribute("height",a),p.setAttribute("preserveAspectRatio","none"),(o||l||c!==e.width||h!==e.height)&&(v=this.__document.createElement("canvas"),v.width=s,v.height=a,(m=v.getContext("2d"))==null||m.drawImage(e,o,l,c,h,0,0,s,a),e=v),p.setAttribute("transform",b),p.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e.nodeName==="CANVAS"?e.toDataURL():e.getAttribute("src")),x.appendChild(p))}createPattern(t,e){const r=this.__document.createElementNS("http://www.w3.org/2000/svg","pattern"),i=cl(this.__ids);let s;return r.setAttribute("id",i),t.nodeName==="CANVAS"||t.nodeName==="IMG"?(s=this.__document.createElementNS("http://www.w3.org/2000/svg","image"),s.setAttribute("width",""+t.width),s.setAttribute("height",""+t.height),s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.nodeName==="CANVAS"?t.toDataURL():t.getAttribute("src")),r.appendChild(s),this.__SVGdefs.appendChild(r)):t instanceof hl&&(r.setAttribute("width",""+t.width),r.setAttribute("height",""+t.height),r.appendChild(t.__rootSVG.childNodes[1]),this.__SVGdefs.appendChild(r)),new Ug(r,this)}setLineDash(t){t&&t.length>0?this.lineDash=t.join(","):this.lineDash=null}drawFocusRing(){}createImageData(){}getImageData(){}putImageData(){}globalCompositeOperation(){}setTransform(){}}let Gg=class n2{constructor(t){Et(this,"point");this.point=new Ti(t)}static fromSVGPathData(t){if(t.length<3)throw new Error("Line 参数个数错误");if(t[0].toUpperCase()!=="L")throw new Error("Line command 错误");return new n2({x:t[1],y:t[2]})}toSVGPathData(){return["L",this.point.x,this.point.y]}toSVGPathD(){return"L "+this.point.toSVGPathD()}},zg=class r2 extends Gg{constructor(e){super(e);Et(this,"rx");Et(this,"ry");Et(this,"xAxisRotate");Et(this,"largeArcFlag");Et(this,"sweepFlag");this.rx=e.rx,this.ry=e.ry,this.xAxisRotate=(e==null?void 0:e.xAxisRotate)??0,this.largeArcFlag=(e==null?void 0:e.largeArcFlag)??1,this.sweepFlag=(e==null?void 0:e.sweepFlag)??1}static fromSVGPathData(e){if(e.length<8)throw new Error("Arc 参数个数错误");if(e[0].toUpperCase()!=="A")throw new Error("Arc command 错误");return new r2({x:e[6],y:e[7],rx:e[1],ry:e[2],xAxisRotate:e[3],largeArcFlag:e[4],sweepFlag:e[5]})}toSVGPathData(){return["A",this.rx,this.ry,this.xAxisRotate,this.largeArcFlag,this.sweepFlag,this.point.x,this.point.y]}toSVGPathD(){return`A ${this.rx},${this.ry} ${this.xAxisRotate} ${this.largeArcFlag},${this.sweepFlag} ${this.point.toSVGPathD()}`}};class ea extends Gg{constructor(e){super(e);Et(this,"ctrlPoints",[]);this.ctrlPoints.push(new Ti({x:e.c1x,y:e.c1y})),this.ctrlPoints.push(new Ti({x:e.c2x,y:e.c2y}))}static fromSVGPathData(e){if(e.length<7)throw new Error("CubicBezier 参数个数错误");if(e[0].toUpperCase()!=="C")throw new Error("CubicBezier command 错误");return new ea({c1x:e[1],c1y:e[2],c2x:e[3],c2y:e[4],x:e[5],y:e[6]})}toSVGPathData(){return["C",this.ctrlPoints[0].x,this.ctrlPoints[0].y,this.ctrlPoints[1].x,this.ctrlPoints[1].y,this.point.x,this.point.y]}toSVGPathD(){return`C ${this.ctrlPoints.map(e=>e.toSVGPathD()).join(" ")} ${this.point.toSVGPathD()}`}}class ss{constructor(t){Et(this,"startPoint");Et(this,"isClosed",!1);Et(this,"lines",[]);Et(this,"normalizedLines",[]);var e;this.startPoint=(t==null?void 0:t.startPoint)??null,this.isClosed=(t==null?void 0:t.isClosed)??!1,(e=t==null?void 0:t.lines)==null||e.forEach(this.addLine),this.normalize()}setStartPoint(t,e){return this.startPoint=new Ti({x:t,y:e}),this}addLine(t){return this.lines.push(t),this}normalize(){let t=this.lines.reduce((r,i)=>(r+=i.toSVGPathD(),r),"");this.startPoint&&(t="M "+this.startPoint.toSVGPathD()+t),this.isClosed&&(t+="Z"),this.normalizedLines=[];const e=au(su(iu(t)));for(let r=0,i=e.length;r<i;r++){const s=e[r];if(r==0&&s[0]=="M"){this.setStartPoint(s[1],s[2]);continue}if(r==i-1&&s[0]=="Z"){this.isClosed=!0;continue}this.normalizedLines.push(ea.fromSVGPathData(s))}return this}static fromSVGPathD(t,e){if(!e8(t))throw new Error("Not an SVG path!");const r=au(su(iu(t)));return ss.fromSVGPathData(r,e)}static fromSVGPathData(t,e){const r=new ss;for(let s=0,a=t.length;s<a;s++){const o=t[s],l=o[0];if(s==0&&l=="M"){r.setStartPoint(o[1],o[2]);continue}if(s==a-1&&l=="Z"){r.isClosed=!0;continue}r.addLine(new ea({c1x:o[1],c1y:o[2],c2x:o[3],c2y:o[4],x:o[5],y:o[6]}))}r.normalize();const i=al(e??"");return r.transform(i)}toSVGPathD(){let t="";this.startPoint&&(t+="M "+this.startPoint.toSVGPathD());for(let e=0,r=this.normalizedLines.length;e<r;e++)t+=this.normalizedLines[e].toSVGPathD();return this.isClosed&&(t+="Z"),t}toSVGPathData(){const t=[];this.startPoint&&t.push(["M",...this.startPoint.toSVGPathData()]);for(let e=0,r=this.normalizedLines.length;e<r;e++)t.push(this.normalizedLines[e].toSVGPathData());return this.isClosed&&t.push(["Z"]),t}toCanvas(t){const e=this.normalizedLines;e.length&&(this.startPoint&&(t.beginPath(),t.moveTo(this.startPoint.x,this.startPoint.y)),e.forEach(r=>{const[i,...s]=r.toSVGPathData();i==="M"?t.moveTo(s[0],s[1]):i==="Z"?t.closePath():t.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5])}),this.isClosed&&t.closePath())}get bounds(){let t=[0,0,0,0];if(this.normalizedLines.length){t=[1/0,1/0,-1/0,-1/0];for(let e=0,r=this.normalizedLines.length;e<r;e++){const i=this.normalizedLines[e],s=[...i.ctrlPoints,i.point];for(let a=0;a<s.length;a++){const o=s[a].x,l=s[a].y;o<t[0]&&(t[0]=o),l<t[1]&&(t[1]=l),o>t[2]&&(t[2]=o),l>t[3]&&(t[3]=l)}}}return t}get size(){const t=this.bounds;return[t[2]-t[0],t[3]-t[1]]}get center(){const[t,e,r,i]=this.bounds;return[(t+r)/2,(e+i)/2]}getTotalLength(){return _8(this.toSVGPathD())}getPointAtLength(t){return b8(this.toSVGPathD(),t)}isPointInPath(t,e){return w8(this.toSVGPathD(),t,e)}isPointInStroke(t,e,r={lineWidth:1,lineCap:"butt",lineJoin:"miter"}){return x8(this.toSVGPathD(),t,e,r)}transform(t){if(this.startPoint){const[e,r]=t.transformPoint(this.startPoint.x,this.startPoint.y);this.setStartPoint(e,r)}return this.normalizedLines=this.normalizedLines.map(e=>{const[r,...i]=e.toSVGPathData(),s=[r];for(let a=0,o=i.length;a<o;a+=2){const l=i[a],c=i[a+1],[h,f]=t.transformPoint(l,c);s.push(h,f)}return ea.fromSVGPathData(s)}),this}translate(t,e){const r=new fn().translate(t,e);return this.transform(r)}rotate(t,e=0,r=0){const i=new fn().rotate(t,e,r);return this.transform(i)}scale(t,e=t,r=0,i=0){const s=new fn().scale(t,e,r,i);return this.transform(s)}skew(t,e=0){const r=new fn().skew(t,e);return this.transform(r)}trim(){const[t,e]=this.bounds;return this.translate(-t,-e),this}static generateRosetta(t,e,r,i,s){if(s==0)throw new Error("no dividing by zero, please");const a=new ss;a.setStartPoint(t,e);const o=360/s;for(let l=0;l<s;l+=1){const c=o*l*Math.PI/180,h=t+2*r*Math.cos(c),f=e+2*r*Math.sin(c);a.addLine(new zg({x:h,y:f,rx:r,ry:i,xAxisRotate:o*l,largeArcFlag:1,sweepFlag:1})),a.addLine(new zg({x:t,y:e,rx:r,ry:i,xAxisRotate:o*l,largeArcFlag:1,sweepFlag:1}))}return a.normalize(),a}}var Vg={exports:{}};(function(n,t){(function(e,r){n.exports=r()})(window,function(){return function(e){var r={};function i(s){if(r[s])return r[s].exports;var a=r[s]={i:s,l:!1,exports:{}};return e[s].call(a.exports,a,a.exports,i),a.l=!0,a.exports}return i.m=e,i.c=r,i.d=function(s,a,o){i.o(s,a)||Object.defineProperty(s,a,{enumerable:!0,get:o})},i.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},i.t=function(s,a){if(1&a&&(s=i(s)),8&a||4&a&&typeof s=="object"&&s&&s.__esModule)return s;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:s}),2&a&&typeof s!="string")for(var l in s)i.d(o,l,(function(c){return s[c]}).bind(null,l));return o},i.n=function(s){var a=s&&s.__esModule?function(){return s.default}:function(){return s};return i.d(a,"a",a),a},i.o=function(s,a){return Object.prototype.hasOwnProperty.call(s,a)},i.p="",i(i.s=1)}([function(e,r,i){var s,a;s=[i(2)],(a=(function(o){function l(y){if(l.is(y,"function"))return c?y():o.on("raphael.DOMload",y);if(l.is(y,st))return l._engine.create[b](l,y.splice(0,3+l.is(y[0],xt))).add(y);var S=Array.prototype.slice.call(arguments,0);if(l.is(S[S.length-1],"function")){var A=S.pop();return c?A.call(l._engine.create[b](l,S)):o.on("raphael.DOMload",function(){A.call(l._engine.create[b](l,S))})}return l._engine.create[b](l,arguments)}l.version="2.3.0",l.eve=o;var c,h,f=/[, ]+/,d={circle:1,rect:1,path:1,ellipse:1,text:1,image:1},u=/\{(\d+)\}/g,p="hasOwnProperty",v={doc:document,win:window},_={was:Object.prototype[p].call(v.win,"Raphael"),is:v.win.Raphael},x=function(){this.ca=this.customAttributes={}},b="apply",m="concat",k="ontouchstart"in window||window.TouchEvent||window.DocumentTouch&&document instanceof DocumentTouch,O="",T=" ",F=String,R="split",L="click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel"[R](T),U={mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},B=F.prototype.toLowerCase,Y=Math,tt=Y.max,W=Y.min,ct=Y.abs,wt=Y.pow,St=Y.PI,xt="number",st="array",K=Object.prototype.toString,$=(l._ISURL=/^url\(['"]?(.+?)['"]?\)$/i,/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i),P={NaN:1,Infinity:1,"-Infinity":1},E=/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,C=Y.round,M=parseFloat,G=parseInt,D=F.prototype.toUpperCase,V=l._availableAttrs={"arrow-end":"none","arrow-start":"none",blur:0,"clip-rect":"0 0 1e9 1e9",cursor:"default",cx:0,cy:0,fill:"#fff","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:0,height:0,href:"http://raphaeljs.com/","letter-spacing":0,opacity:1,path:"M0,0",r:0,rx:0,ry:0,src:"",stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank","text-anchor":"middle",title:"Raphael",transform:"",width:0,x:0,y:0,class:""},q=l._availableAnimAttrs={blur:xt,"clip-rect":"csv",cx:xt,cy:xt,fill:"colour","fill-opacity":xt,"font-size":xt,height:xt,opacity:xt,path:"path",r:xt,rx:xt,ry:xt,stroke:"colour","stroke-opacity":xt,"stroke-width":xt,transform:"transform",width:xt,x:xt,y:xt},Z=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/,rt={hs:1,rg:1},gt=/,?([achlmqrstvxz]),?/gi,Ct=/([achlmrqstvz])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,Ft=/([rstm])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,kt=/(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/gi,Ot=(l._radial_gradient=/^r(?:\(([^,]+?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*([^\)]+?)\))?/,{}),Lt=function(y,S){return M(y)-M(S)},Vt=function(y){return y},$t=l._rectPath=function(y,S,A,g,w){return w?[["M",y+w,S],["l",A-2*w,0],["a",w,w,0,0,1,w,w],["l",0,g-2*w],["a",w,w,0,0,1,-w,w],["l",2*w-A,0],["a",w,w,0,0,1,-w,-w],["l",0,2*w-g],["a",w,w,0,0,1,w,-w],["z"]]:[["M",y,S],["l",A,0],["l",0,g],["l",-A,0],["z"]]},he=function(y,S,A,g){return g==null&&(g=A),[["M",y,S],["m",0,-g],["a",A,g,0,1,1,0,2*g],["a",A,g,0,1,1,0,-2*g],["z"]]},Zt=l._getPath={path:function(y){return y.attr("path")},circle:function(y){var S=y.attrs;return he(S.cx,S.cy,S.r)},ellipse:function(y){var S=y.attrs;return he(S.cx,S.cy,S.rx,S.ry)},rect:function(y){var S=y.attrs;return $t(S.x,S.y,S.width,S.height,S.r)},image:function(y){var S=y.attrs;return $t(S.x,S.y,S.width,S.height)},text:function(y){var S=y._getBBox();return $t(S.x,S.y,S.width,S.height)},set:function(y){var S=y._getBBox();return $t(S.x,S.y,S.width,S.height)}},fe=l.mapPath=function(y,S){if(!S)return y;var A,g,w,N,I,j,z;for(w=0,I=(y=Hr(y)).length;w<I;w++)for(N=1,j=(z=y[w]).length;N<j;N+=2)A=S.x(z[N],z[N+1]),g=S.y(z[N],z[N+1]),z[N]=A,z[N+1]=g;return y};if(l._g=v,l.type=v.win.SVGAngle||v.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML",l.type=="VML"){var qt,Re=v.doc.createElement("div");if(Re.innerHTML='<v:shape adj="1"/>',(qt=Re.firstChild).style.behavior="url(#default#VML)",!qt||typeof qt.adj!="object")return l.type=O;Re=null}function Ae(y){if(typeof y=="function"||Object(y)!==y)return y;var S=new y.constructor;for(var A in y)y[p](A)&&(S[A]=Ae(y[A]));return S}l.svg=!(l.vml=l.type=="VML"),l._Paper=x,l.fn=h=x.prototype=l.prototype,l._id=0,l.is=function(y,S){return(S=B.call(S))=="finite"?!P[p](+y):S=="array"?y instanceof Array:S=="null"&&y===null||S==typeof y&&y!==null||S=="object"&&y===Object(y)||S=="array"&&Array.isArray&&Array.isArray(y)||K.call(y).slice(8,-1).toLowerCase()==S},l.angle=function(y,S,A,g,w,N){if(w==null){var I=y-A,j=S-g;return I||j?(180+180*Y.atan2(-j,-I)/St+360)%360:0}return l.angle(y,S,w,N)-l.angle(A,g,w,N)},l.rad=function(y){return y%360*St/180},l.deg=function(y){return Math.round(180*y/St%360*1e3)/1e3},l.snapTo=function(y,S,A){if(A=l.is(A,"finite")?A:10,l.is(y,st)){for(var g=y.length;g--;)if(ct(y[g]-S)<=A)return y[g]}else{var w=S%(y=+y);if(w<A)return S-w;if(w>y-A)return S-w+y}return S};var We,xn;l.createUUID=(We=/[xy]/g,xn=function(y){var S=16*Y.random()|0;return(y=="x"?S:3&S|8).toString(16)},function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(We,xn).toUpperCase()}),l.setWindow=function(y){o("raphael.setWindow",l,v.win,y),v.win=y,v.doc=v.win.document,l._engine.initWin&&l._engine.initWin(v.win)};var cn=function(y){if(l.vml){var S,A=/^\s+|\s+$/g;try{var g=new ActiveXObject("htmlfile");g.write("<body>"),g.close(),S=g.body}catch{S=createPopup().document.body}var w=S.createTextRange();cn=Ue(function(I){try{S.style.color=F(I).replace(A,O);var j=w.queryCommandValue("ForeColor");return"#"+("000000"+(j=(255&j)<<16|65280&j|(16711680&j)>>>16).toString(16)).slice(-6)}catch{return"none"}})}else{var N=v.doc.createElement("i");N.title="Raphaël Colour Picker",N.style.display="none",v.doc.body.appendChild(N),cn=Ue(function(I){return N.style.color=I,v.doc.defaultView.getComputedStyle(N,O).getPropertyValue("color")})}return cn(y)},Me=function(){return"hsb("+[this.h,this.s,this.b]+")"},an=function(){return"hsl("+[this.h,this.s,this.l]+")"},Fn=function(){return this.hex},Rn=function(y,S,A){if(S==null&&l.is(y,"object")&&"r"in y&&"g"in y&&"b"in y&&(A=y.b,S=y.g,y=y.r),S==null&&l.is(y,"string")){var g=l.getRGB(y);y=g.r,S=g.g,A=g.b}return(y>1||S>1||A>1)&&(y/=255,S/=255,A/=255),[y,S,A]},Gn=function(y,S,A,g){var w={r:y*=255,g:S*=255,b:A*=255,hex:l.rgb(y,S,A),toString:Fn};return l.is(g,"finite")&&(w.opacity=g),w};function Ue(y,S,A){return function g(){var w=Array.prototype.slice.call(arguments,0),N=w.join("␀"),I=g.cache=g.cache||{},j=g.count=g.count||[];return I[p](N)?(function(z,X){for(var et=0,ut=z.length;et<ut;et++)if(z[et]===X)return z.push(z.splice(et,1)[0])}(j,N),A?A(I[N]):I[N]):(j.length>=1e3&&delete I[j.shift()],j.push(N),I[N]=y[b](S,w),A?A(I[N]):I[N])}}l.color=function(y){var S;return l.is(y,"object")&&"h"in y&&"s"in y&&"b"in y?(S=l.hsb2rgb(y),y.r=S.r,y.g=S.g,y.b=S.b,y.hex=S.hex):l.is(y,"object")&&"h"in y&&"s"in y&&"l"in y?(S=l.hsl2rgb(y),y.r=S.r,y.g=S.g,y.b=S.b,y.hex=S.hex):(l.is(y,"string")&&(y=l.getRGB(y)),l.is(y,"object")&&"r"in y&&"g"in y&&"b"in y?(S=l.rgb2hsl(y),y.h=S.h,y.s=S.s,y.l=S.l,S=l.rgb2hsb(y),y.v=S.b):(y={hex:"none"}).r=y.g=y.b=y.h=y.s=y.v=y.l=-1),y.toString=Fn,y},l.hsb2rgb=function(y,S,A,g){var w,N,I,j,z;return this.is(y,"object")&&"h"in y&&"s"in y&&"b"in y&&(A=y.b,S=y.s,g=y.o,y=y.h),j=(z=A*S)*(1-ct((y=(y*=360)%360/60)%2-1)),w=N=I=A-z,Gn(w+=[z,j,0,0,j,z][y=~~y],N+=[j,z,z,j,0,0][y],I+=[0,0,j,z,z,j][y],g)},l.hsl2rgb=function(y,S,A,g){var w,N,I,j,z;return this.is(y,"object")&&"h"in y&&"s"in y&&"l"in y&&(A=y.l,S=y.s,y=y.h),(y>1||S>1||A>1)&&(y/=360,S/=100,A/=100),j=(z=2*S*(A<.5?A:1-A))*(1-ct((y=(y*=360)%360/60)%2-1)),w=N=I=A-z/2,Gn(w+=[z,j,0,0,j,z][y=~~y],N+=[j,z,z,j,0,0][y],I+=[0,0,j,z,z,j][y],g)},l.rgb2hsb=function(y,S,A){var g,w;return y=(A=Rn(y,S,A))[0],S=A[1],A=A[2],{h:(((w=(g=tt(y,S,A))-W(y,S,A))==0?null:g==y?(S-A)/w:g==S?(A-y)/w+2:(y-S)/w+4)+360)%6*60/360,s:w==0?0:w/g,b:g,toString:Me}},l.rgb2hsl=function(y,S,A){var g,w,N,I;return y=(A=Rn(y,S,A))[0],S=A[1],A=A[2],g=((w=tt(y,S,A))+(N=W(y,S,A)))/2,{h:(((I=w-N)==0?null:w==y?(S-A)/I:w==S?(A-y)/I+2:(y-S)/I+4)+360)%6*60/360,s:I==0?0:g<.5?I/(2*g):I/(2-2*g),l:g,toString:an}},l._path2string=function(){return this.join(",").replace(gt,"$1")},l._preload=function(y,S){var A=v.doc.createElement("img");A.style.cssText="position:absolute;left:-9999em;top:-9999em",A.onload=function(){S.call(this),this.onload=null,v.doc.body.removeChild(this)},A.onerror=function(){v.doc.body.removeChild(this)},v.doc.body.appendChild(A),A.src=y};function zn(){return this.hex}function er(y,S){for(var A=[],g=0,w=y.length;w-2*!S>g;g+=2){var N=[{x:+y[g-2],y:+y[g-1]},{x:+y[g],y:+y[g+1]},{x:+y[g+2],y:+y[g+3]},{x:+y[g+4],y:+y[g+5]}];S?g?w-4==g?N[3]={x:+y[0],y:+y[1]}:w-2==g&&(N[2]={x:+y[0],y:+y[1]},N[3]={x:+y[2],y:+y[3]}):N[0]={x:+y[w-2],y:+y[w-1]}:w-4==g?N[3]=N[2]:g||(N[0]={x:+y[g],y:+y[g+1]}),A.push(["C",(-N[0].x+6*N[1].x+N[2].x)/6,(-N[0].y+6*N[1].y+N[2].y)/6,(N[1].x+6*N[2].x-N[3].x)/6,(N[1].y+6*N[2].y-N[3].y)/6,N[2].x,N[2].y])}return A}l.getRGB=Ue(function(y){if(!y||(y=F(y)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:zn};if(y=="none")return{r:-1,g:-1,b:-1,hex:"none",toString:zn};!rt[p](y.toLowerCase().substring(0,2))&&y.charAt()!="#"&&(y=cn(y));var S,A,g,w,N,I,j=y.match($);return j?(j[2]&&(g=G(j[2].substring(5),16),A=G(j[2].substring(3,5),16),S=G(j[2].substring(1,3),16)),j[3]&&(g=G((N=j[3].charAt(3))+N,16),A=G((N=j[3].charAt(2))+N,16),S=G((N=j[3].charAt(1))+N,16)),j[4]&&(I=j[4][R](Z),S=M(I[0]),I[0].slice(-1)=="%"&&(S*=2.55),A=M(I[1]),I[1].slice(-1)=="%"&&(A*=2.55),g=M(I[2]),I[2].slice(-1)=="%"&&(g*=2.55),j[1].toLowerCase().slice(0,4)=="rgba"&&(w=M(I[3])),I[3]&&I[3].slice(-1)=="%"&&(w/=100)),j[5]?(I=j[5][R](Z),S=M(I[0]),I[0].slice(-1)=="%"&&(S*=2.55),A=M(I[1]),I[1].slice(-1)=="%"&&(A*=2.55),g=M(I[2]),I[2].slice(-1)=="%"&&(g*=2.55),(I[0].slice(-3)=="deg"||I[0].slice(-1)=="°")&&(S/=360),j[1].toLowerCase().slice(0,4)=="hsba"&&(w=M(I[3])),I[3]&&I[3].slice(-1)=="%"&&(w/=100),l.hsb2rgb(S,A,g,w)):j[6]?(I=j[6][R](Z),S=M(I[0]),I[0].slice(-1)=="%"&&(S*=2.55),A=M(I[1]),I[1].slice(-1)=="%"&&(A*=2.55),g=M(I[2]),I[2].slice(-1)=="%"&&(g*=2.55),(I[0].slice(-3)=="deg"||I[0].slice(-1)=="°")&&(S/=360),j[1].toLowerCase().slice(0,4)=="hsla"&&(w=M(I[3])),I[3]&&I[3].slice(-1)=="%"&&(w/=100),l.hsl2rgb(S,A,g,w)):((j={r:S,g:A,b:g,toString:zn}).hex="#"+(16777216|g|A<<8|S<<16).toString(16).slice(1),l.is(w,"finite")&&(j.opacity=w),j)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:zn}},l),l.hsb=Ue(function(y,S,A){return l.hsb2rgb(y,S,A).hex}),l.hsl=Ue(function(y,S,A){return l.hsl2rgb(y,S,A).hex}),l.rgb=Ue(function(y,S,A){function g(w){return w+.5|0}return"#"+(16777216|g(A)|g(S)<<8|g(y)<<16).toString(16).slice(1)}),l.getColor=function(y){var S=this.getColor.start=this.getColor.start||{h:0,s:1,b:y||.75},A=this.hsb2rgb(S.h,S.s,S.b);return S.h+=.075,S.h>1&&(S.h=0,S.s-=.2,S.s<=0&&(this.getColor.start={h:0,s:1,b:S.b})),A.hex},l.getColor.reset=function(){delete this.start},l.parsePathString=function(y){if(!y)return null;var S=Te(y);if(S.arr)return Oe(S.arr);var A={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},g=[];return l.is(y,st)&&l.is(y[0],st)&&(g=Oe(y)),g.length||F(y).replace(Ct,function(w,N,I){var j=[],z=N.toLowerCase();if(I.replace(kt,function(X,et){et&&j.push(+et)}),z=="m"&&j.length>2&&(g.push([N][m](j.splice(0,2))),z="l",N=N=="m"?"l":"L"),z=="r")g.push([N][m](j));else for(;j.length>=A[z]&&(g.push([N][m](j.splice(0,A[z]))),A[z]););}),g.toString=l._path2string,S.arr=Oe(g),g},l.parseTransformString=Ue(function(y){if(!y)return null;var S=[];return l.is(y,st)&&l.is(y[0],st)&&(S=Oe(y)),S.length||F(y).replace(Ft,function(A,g,w){var N=[];B.call(g),w.replace(kt,function(I,j){j&&N.push(+j)}),S.push([g][m](N))}),S.toString=l._path2string,S},this,function(y){if(!y)return y;for(var S=[],A=0;A<y.length;A++){for(var g=[],w=0;w<y[A].length;w++)g.push(y[A][w]);S.push(g)}return S});var Te=function(y){var S=Te.ps=Te.ps||{};return S[y]?S[y].sleep=100:S[y]={sleep:100},setTimeout(function(){for(var A in S)S[p](A)&&A!=y&&(S[A].sleep--,!S[A].sleep&&delete S[A])}),S[y]};function Mn(y,S,A,g,w){return y*(y*(-3*S+9*A-9*g+3*w)+6*S-12*A+6*g)-3*S+3*A}function mn(y,S,A,g,w,N,I,j,z){z==null&&(z=1);for(var X=(z=z>1?1:z<0?0:z)/2,et=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],ut=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],at=0,it=0;it<12;it++){var dt=X*et[it]+X,mt=Mn(dt,y,A,w,I),ft=Mn(dt,S,g,N,j),ht=mt*mt+ft*ft;at+=ut[it]*Y.sqrt(ht)}return X*at}function Vr(y,S,A,g,w,N,I,j){if(!(tt(y,A)<W(w,I)||W(y,A)>tt(w,I)||tt(S,g)<W(N,j)||W(S,g)>tt(N,j))){var z=(y-A)*(N-j)-(S-g)*(w-I);if(z){var X=((y*g-S*A)*(w-I)-(y-A)*(w*j-N*I))/z,et=((y*g-S*A)*(N-j)-(S-g)*(w*j-N*I))/z,ut=+X.toFixed(2),at=+et.toFixed(2);if(!(ut<+W(y,A).toFixed(2)||ut>+tt(y,A).toFixed(2)||ut<+W(w,I).toFixed(2)||ut>+tt(w,I).toFixed(2)||at<+W(S,g).toFixed(2)||at>+tt(S,g).toFixed(2)||at<+W(N,j).toFixed(2)||at>+tt(N,j).toFixed(2)))return{x:X,y:et}}}}function nr(y,S,A){var g=l.bezierBBox(y),w=l.bezierBBox(S);if(!l.isBBoxIntersect(g,w))return A?0:[];for(var N=mn.apply(0,y),I=mn.apply(0,S),j=tt(~~(N/5),1),z=tt(~~(I/5),1),X=[],et=[],ut={},at=A?0:[],it=0;it<j+1;it++){var dt=l.findDotsAtSegment.apply(l,y.concat(it/j));X.push({x:dt.x,y:dt.y,t:it/j})}for(it=0;it<z+1;it++)dt=l.findDotsAtSegment.apply(l,S.concat(it/z)),et.push({x:dt.x,y:dt.y,t:it/z});for(it=0;it<j;it++)for(var mt=0;mt<z;mt++){var ft=X[it],ht=X[it+1],Tt=et[mt],vt=et[mt+1],bt=ct(ht.x-ft.x)<.001?"y":"x",yt=ct(vt.x-Tt.x)<.001?"y":"x",Yt=Vr(ft.x,ft.y,ht.x,ht.y,Tt.x,Tt.y,vt.x,vt.y);if(Yt){if(ut[Yt.x.toFixed(4)]==Yt.y.toFixed(4))continue;ut[Yt.x.toFixed(4)]=Yt.y.toFixed(4);var zt=ft.t+ct((Yt[bt]-ft[bt])/(ht[bt]-ft[bt]))*(ht.t-ft.t),Kt=Tt.t+ct((Yt[yt]-Tt[yt])/(vt[yt]-Tt[yt]))*(vt.t-Tt.t);zt>=0&&zt<=1.001&&Kt>=0&&Kt<=1.001&&(A?at++:at.push({x:Yt.x,y:Yt.y,t1:W(zt,1),t2:W(Kt,1)}))}}return at}function wr(y,S,A){y=l._path2curve(y),S=l._path2curve(S);for(var g,w,N,I,j,z,X,et,ut,at,it=A?0:[],dt=0,mt=y.length;dt<mt;dt++){var ft=y[dt];if(ft[0]=="M")g=j=ft[1],w=z=ft[2];else{ft[0]=="C"?(ut=[g,w].concat(ft.slice(1)),g=ut[6],w=ut[7]):(ut=[g,w,g,w,j,z,j,z],g=j,w=z);for(var ht=0,Tt=S.length;ht<Tt;ht++){var vt=S[ht];if(vt[0]=="M")N=X=vt[1],I=et=vt[2];else{vt[0]=="C"?(at=[N,I].concat(vt.slice(1)),N=at[6],I=at[7]):(at=[N,I,N,I,X,et,X,et],N=X,I=et);var bt=nr(ut,at,A);if(A)it+=bt;else{for(var yt=0,Yt=bt.length;yt<Yt;yt++)bt[yt].segment1=dt,bt[yt].segment2=ht,bt[yt].bez1=ut,bt[yt].bez2=at;it=it.concat(bt)}}}}}return it}l.findDotsAtSegment=function(y,S,A,g,w,N,I,j,z){var X=1-z,et=wt(X,3),ut=wt(X,2),at=z*z,it=at*z,dt=et*y+3*ut*z*A+3*X*z*z*w+it*I,mt=et*S+3*ut*z*g+3*X*z*z*N+it*j,ft=y+2*z*(A-y)+at*(w-2*A+y),ht=S+2*z*(g-S)+at*(N-2*g+S),Tt=A+2*z*(w-A)+at*(I-2*w+A),vt=g+2*z*(N-g)+at*(j-2*N+g),bt=X*y+z*A,yt=X*S+z*g,Yt=X*w+z*I,zt=X*N+z*j,Kt=90-180*Y.atan2(ft-Tt,ht-vt)/St;return(ft>Tt||ht<vt)&&(Kt+=180),{x:dt,y:mt,m:{x:ft,y:ht},n:{x:Tt,y:vt},start:{x:bt,y:yt},end:{x:Yt,y:zt},alpha:Kt}},l.bezierBBox=function(y,S,A,g,w,N,I,j){l.is(y,"array")||(y=[y,S,A,g,w,N,I,j]);var z=Vn.apply(null,y);return{x:z.min.x,y:z.min.y,x2:z.max.x,y2:z.max.y,width:z.max.x-z.min.x,height:z.max.y-z.min.y}},l.isPointInsideBBox=function(y,S,A){return S>=y.x&&S<=y.x2&&A>=y.y&&A<=y.y2},l.isBBoxIntersect=function(y,S){var A=l.isPointInsideBBox;return A(S,y.x,y.y)||A(S,y.x2,y.y)||A(S,y.x,y.y2)||A(S,y.x2,y.y2)||A(y,S.x,S.y)||A(y,S.x2,S.y)||A(y,S.x,S.y2)||A(y,S.x2,S.y2)||(y.x<S.x2&&y.x>S.x||S.x<y.x2&&S.x>y.x)&&(y.y<S.y2&&y.y>S.y||S.y<y.y2&&S.y>y.y)},l.pathIntersection=function(y,S){return wr(y,S)},l.pathIntersectionNumber=function(y,S){return wr(y,S,1)},l.isPointInsidePath=function(y,S,A){var g=l.pathBBox(y);return l.isPointInsideBBox(g,S,A)&&wr(y,[["M",S,A],["H",g.x2+10]],1)%2==1},l._removedFactory=function(y){return function(){o("raphael.log",null,"Raphaël: you are calling to method “"+y+"” of removed object",y)}};var Sn=l.pathBBox=function(y){var S=Te(y);if(S.bbox)return Ae(S.bbox);if(!y)return{x:0,y:0,width:0,height:0,x2:0,y2:0};for(var A,g=0,w=0,N=[],I=[],j=0,z=(y=Hr(y)).length;j<z;j++)if((A=y[j])[0]=="M")g=A[1],w=A[2],N.push(g),I.push(w);else{var X=Vn(g,w,A[1],A[2],A[3],A[4],A[5],A[6]);N=N[m](X.min.x,X.max.x),I=I[m](X.min.y,X.max.y),g=A[5],w=A[6]}var et=W[b](0,N),ut=W[b](0,I),at=tt[b](0,N),it=tt[b](0,I),dt=at-et,mt=it-ut,ft={x:et,y:ut,x2:at,y2:it,width:dt,height:mt,cx:et+dt/2,cy:ut+mt/2};return S.bbox=Ae(ft),ft},Oe=function(y){var S=Ae(y);return S.toString=l._path2string,S},xs=l._pathToRelative=function(y){var S=Te(y);if(S.rel)return Oe(S.rel);l.is(y,st)&&l.is(y&&y[0],st)||(y=l.parsePathString(y));var A=[],g=0,w=0,N=0,I=0,j=0;y[0][0]=="M"&&(N=g=y[0][1],I=w=y[0][2],j++,A.push(["M",g,w]));for(var z=j,X=y.length;z<X;z++){var et=A[z]=[],ut=y[z];if(ut[0]!=B.call(ut[0]))switch(et[0]=B.call(ut[0]),et[0]){case"a":et[1]=ut[1],et[2]=ut[2],et[3]=ut[3],et[4]=ut[4],et[5]=ut[5],et[6]=+(ut[6]-g).toFixed(3),et[7]=+(ut[7]-w).toFixed(3);break;case"v":et[1]=+(ut[1]-w).toFixed(3);break;case"m":N=ut[1],I=ut[2];default:for(var at=1,it=ut.length;at<it;at++)et[at]=+(ut[at]-(at%2?g:w)).toFixed(3)}else{et=A[z]=[],ut[0]=="m"&&(N=ut[1]+g,I=ut[2]+w);for(var dt=0,mt=ut.length;dt<mt;dt++)A[z][dt]=ut[dt]}var ft=A[z].length;switch(A[z][0]){case"z":g=N,w=I;break;case"h":g+=+A[z][ft-1];break;case"v":w+=+A[z][ft-1];break;default:g+=+A[z][ft-2],w+=+A[z][ft-1]}}return A.toString=l._path2string,S.rel=Oe(A),A},rr=l._pathToAbsolute=function(y){var S=Te(y);if(S.abs)return Oe(S.abs);if(l.is(y,st)&&l.is(y&&y[0],st)||(y=l.parsePathString(y)),!y||!y.length)return[["M",0,0]];var A=[],g=0,w=0,N=0,I=0,j=0;y[0][0]=="M"&&(N=g=+y[0][1],I=w=+y[0][2],j++,A[0]=["M",g,w]);for(var z,X,et=y.length==3&&y[0][0]=="M"&&y[1][0].toUpperCase()=="R"&&y[2][0].toUpperCase()=="Z",ut=j,at=y.length;ut<at;ut++){if(A.push(z=[]),(X=y[ut])[0]!=D.call(X[0]))switch(z[0]=D.call(X[0]),z[0]){case"A":z[1]=X[1],z[2]=X[2],z[3]=X[3],z[4]=X[4],z[5]=X[5],z[6]=+(X[6]+g),z[7]=+(X[7]+w);break;case"V":z[1]=+X[1]+w;break;case"H":z[1]=+X[1]+g;break;case"R":for(var it=[g,w][m](X.slice(1)),dt=2,mt=it.length;dt<mt;dt++)it[dt]=+it[dt]+g,it[++dt]=+it[dt]+w;A.pop(),A=A[m](er(it,et));break;case"M":N=+X[1]+g,I=+X[2]+w;default:for(dt=1,mt=X.length;dt<mt;dt++)z[dt]=+X[dt]+(dt%2?g:w)}else if(X[0]=="R")it=[g,w][m](X.slice(1)),A.pop(),A=A[m](er(it,et)),z=["R"][m](X.slice(-2));else for(var ft=0,ht=X.length;ft<ht;ft++)z[ft]=X[ft];switch(z[0]){case"Z":g=N,w=I;break;case"H":g=z[1];break;case"V":w=z[1];break;case"M":N=z[z.length-2],I=z[z.length-1];default:g=z[z.length-2],w=z[z.length-1]}}return A.toString=l._path2string,S.abs=Oe(A),A},ir=function(y,S,A,g){return[y,S,A,g,A,g]},kn=function(y,S,A,g,w,N){return[1/3*y+2/3*A,1/3*S+2/3*g,1/3*w+2/3*A,1/3*N+2/3*g,w,N]},Br=function(y,S,A,g,w,N,I,j,z,X){var et,ut=120*St/180,at=St/180*(+w||0),it=[],dt=Ue(function(t2,e2,Wl){return{x:t2*Y.cos(Wl)-e2*Y.sin(Wl),y:t2*Y.sin(Wl)+e2*Y.cos(Wl)}});if(X)zt=X[0],Kt=X[1],yt=X[2],Yt=X[3];else{y=(et=dt(y,S,-at)).x,S=et.y,j=(et=dt(j,z,-at)).x,z=et.y;var mt=(y-j)/2,ft=(S-z)/2,ht=mt*mt/(A*A)+ft*ft/(g*g);ht>1&&(A*=ht=Y.sqrt(ht),g*=ht);var Tt=A*A,vt=g*g,bt=(N==I?-1:1)*Y.sqrt(ct((Tt*vt-Tt*ft*ft-vt*mt*mt)/(Tt*ft*ft+vt*mt*mt))),yt=bt*A*ft/g+(y+j)/2,Yt=bt*-g*mt/A+(S+z)/2,zt=Y.asin(((S-Yt)/g).toFixed(9)),Kt=Y.asin(((z-Yt)/g).toFixed(9));(zt=y<yt?St-zt:zt)<0&&(zt=2*St+zt),(Kt=j<yt?St-Kt:Kt)<0&&(Kt=2*St+Kt),I&&zt>Kt&&(zt-=2*St),!I&&Kt>zt&&(Kt-=2*St)}var Ss=Kt-zt;if(ct(Ss)>ut){var yo=Kt,En=j,xr=z;Kt=zt+ut*(I&&Kt>zt?1:-1),j=yt+A*Y.cos(Kt),z=Yt+g*Y.sin(Kt),it=Br(j,z,A,g,w,0,I,En,xr,[Kt,yo,yt,Yt])}Ss=Kt-zt;var ks=Y.cos(zt),Cs=Y.sin(zt),Ql=Y.cos(Kt),Xr=Y.sin(Kt),Xi=Y.tan(Ss/4),Zl=4/3*A*Xi,Xy=4/3*g*Xi,Jy=[y,S],Ts=[y+Zl*Cs,S-Xy*ks],Qy=[j+Zl*Xr,z-Xy*Ql],Zy=[j,z];if(Ts[0]=2*Jy[0]-Ts[0],Ts[1]=2*Jy[1]-Ts[1],X)return[Ts,Qy,Zy][m](it);for(var Wy=[],mi=0,s$=(it=[Ts,Qy,Zy][m](it).join()[R](",")).length;mi<s$;mi++)Wy[mi]=mi%2?dt(it[mi-1],it[mi],at).y:dt(it[mi],it[mi+1],at).x;return Wy},sr=function(y,S,A,g,w,N,I,j,z){var X=1-z;return{x:wt(X,3)*y+3*wt(X,2)*z*A+3*X*z*z*w+wt(z,3)*I,y:wt(X,3)*S+3*wt(X,2)*z*g+3*X*z*z*N+wt(z,3)*j}},Vn=Ue(function(y,S,A,g,w,N,I,j){var z,X=w-2*A+y-(I-2*w+A),et=2*(A-y)-2*(w-A),ut=y-A,at=(-et+Y.sqrt(et*et-4*X*ut))/2/X,it=(-et-Y.sqrt(et*et-4*X*ut))/2/X,dt=[S,j],mt=[y,I];return ct(at)>"1e12"&&(at=.5),ct(it)>"1e12"&&(it=.5),at>0&&at<1&&(z=sr(y,S,A,g,w,N,I,j,at),mt.push(z.x),dt.push(z.y)),it>0&&it<1&&(z=sr(y,S,A,g,w,N,I,j,it),mt.push(z.x),dt.push(z.y)),X=N-2*g+S-(j-2*N+g),ut=S-g,at=(-(et=2*(g-S)-2*(N-g))+Y.sqrt(et*et-4*X*ut))/2/X,it=(-et-Y.sqrt(et*et-4*X*ut))/2/X,ct(at)>"1e12"&&(at=.5),ct(it)>"1e12"&&(it=.5),at>0&&at<1&&(z=sr(y,S,A,g,w,N,I,j,at),mt.push(z.x),dt.push(z.y)),it>0&&it<1&&(z=sr(y,S,A,g,w,N,I,j,it),mt.push(z.x),dt.push(z.y)),{min:{x:W[b](0,mt),y:W[b](0,dt)},max:{x:tt[b](0,mt),y:tt[b](0,dt)}}}),Hr=l._path2curve=Ue(function(y,S){var A=!S&&Te(y);if(!S&&A.curve)return Oe(A.curve);for(var g=rr(y),w=S&&rr(S),N={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},I={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},j=function(bt,yt,Yt){var zt,Kt;if(!bt)return["C",yt.x,yt.y,yt.x,yt.y,yt.x,yt.y];switch(!(bt[0]in{T:1,Q:1})&&(yt.qx=yt.qy=null),bt[0]){case"M":yt.X=bt[1],yt.Y=bt[2];break;case"A":bt=["C"][m](Br[b](0,[yt.x,yt.y][m](bt.slice(1))));break;case"S":Yt=="C"||Yt=="S"?(zt=2*yt.x-yt.bx,Kt=2*yt.y-yt.by):(zt=yt.x,Kt=yt.y),bt=["C",zt,Kt][m](bt.slice(1));break;case"T":Yt=="Q"||Yt=="T"?(yt.qx=2*yt.x-yt.qx,yt.qy=2*yt.y-yt.qy):(yt.qx=yt.x,yt.qy=yt.y),bt=["C"][m](kn(yt.x,yt.y,yt.qx,yt.qy,bt[1],bt[2]));break;case"Q":yt.qx=bt[1],yt.qy=bt[2],bt=["C"][m](kn(yt.x,yt.y,bt[1],bt[2],bt[3],bt[4]));break;case"L":bt=["C"][m](ir(yt.x,yt.y,bt[1],bt[2]));break;case"H":bt=["C"][m](ir(yt.x,yt.y,bt[1],yt.y));break;case"V":bt=["C"][m](ir(yt.x,yt.y,yt.x,bt[1]));break;case"Z":bt=["C"][m](ir(yt.x,yt.y,yt.X,yt.Y))}return bt},z=function(bt,yt){if(bt[yt].length>7){bt[yt].shift();for(var Yt=bt[yt];Yt.length;)et[yt]="A",w&&(ut[yt]="A"),bt.splice(yt++,0,["C"][m](Yt.splice(0,6)));bt.splice(yt,1),mt=tt(g.length,w&&w.length||0)}},X=function(bt,yt,Yt,zt,Kt){bt&&yt&&bt[Kt][0]=="M"&&yt[Kt][0]!="M"&&(yt.splice(Kt,0,["M",zt.x,zt.y]),Yt.bx=0,Yt.by=0,Yt.x=bt[Kt][1],Yt.y=bt[Kt][2],mt=tt(g.length,w&&w.length||0))},et=[],ut=[],at="",it="",dt=0,mt=tt(g.length,w&&w.length||0);dt<mt;dt++){g[dt]&&(at=g[dt][0]),at!="C"&&(et[dt]=at,dt&&(it=et[dt-1])),g[dt]=j(g[dt],N,it),et[dt]!="A"&&at=="C"&&(et[dt]="C"),z(g,dt),w&&(w[dt]&&(at=w[dt][0]),at!="C"&&(ut[dt]=at,dt&&(it=ut[dt-1])),w[dt]=j(w[dt],I,it),ut[dt]!="A"&&at=="C"&&(ut[dt]="C"),z(w,dt)),X(g,w,N,I,dt),X(w,g,I,N,dt);var ft=g[dt],ht=w&&w[dt],Tt=ft.length,vt=w&&ht.length;N.x=ft[Tt-2],N.y=ft[Tt-1],N.bx=M(ft[Tt-4])||N.x,N.by=M(ft[Tt-3])||N.y,I.bx=w&&(M(ht[vt-4])||I.x),I.by=w&&(M(ht[vt-3])||I.y),I.x=w&&ht[vt-2],I.y=w&&ht[vt-1]}return w||(A.curve=Oe(g)),w?[g,w]:g},null,Oe),qr=(l._parseDots=Ue(function(y){for(var S=[],A=0,g=y.length;A<g;A++){var w={},N=y[A].match(/^([^:]*):?([\d\.]*)/);if(w.color=l.getRGB(N[1]),w.color.error)return null;w.opacity=w.color.opacity,w.color=w.color.hex,N[2]&&(w.offset=N[2]+"%"),S.push(w)}for(A=1,g=S.length-1;A<g;A++)if(!S[A].offset){for(var I=M(S[A-1].offset||0),j=0,z=A+1;z<g;z++)if(S[z].offset){j=S[z].offset;break}j||(j=100,z=g);for(var X=((j=M(j))-I)/(z-A+1);A<z;A++)I+=X,S[A].offset=I+"%"}return S}),l._tear=function(y,S){y==S.top&&(S.top=y.prev),y==S.bottom&&(S.bottom=y.next),y.next&&(y.next.prev=y.prev),y.prev&&(y.prev.next=y.next)}),H=(l._tofront=function(y,S){S.top!==y&&(qr(y,S),y.next=null,y.prev=S.top,S.top.next=y,S.top=y)},l._toback=function(y,S){S.bottom!==y&&(qr(y,S),y.next=S.bottom,y.prev=null,S.bottom.prev=y,S.bottom=y)},l._insertafter=function(y,S,A){qr(y,A),S==A.top&&(A.top=y),S.next&&(S.next.prev=y),y.next=S.next,y.prev=S,S.next=y},l._insertbefore=function(y,S,A){qr(y,A),S==A.bottom&&(A.bottom=y),S.prev&&(S.prev.next=y),y.prev=S.prev,S.prev=y,y.next=S},l.toMatrix=function(y,S){var A=Sn(y),g={_:{transform:O},getBBox:function(){return A}};return J(g,S),g.matrix}),J=(l.transformPath=function(y,S){return fe(y,H(y,S))},l._extractTransform=function(y,S){if(S==null)return y._.transform;S=F(S).replace(/\.{3}|\u2026/g,y._.transform||O);var A,g,w=l.parseTransformString(S),N=0,I=1,j=1,z=y._,X=new lt;if(z.transform=w||[],w)for(var et=0,ut=w.length;et<ut;et++){var at,it,dt,mt,ft,ht=w[et],Tt=ht.length,vt=F(ht[0]).toLowerCase(),bt=ht[0]!=vt,yt=bt?X.invert():0;vt=="t"&&Tt==3?bt?(at=yt.x(0,0),it=yt.y(0,0),dt=yt.x(ht[1],ht[2]),mt=yt.y(ht[1],ht[2]),X.translate(dt-at,mt-it)):X.translate(ht[1],ht[2]):vt=="r"?Tt==2?(ft=ft||y.getBBox(1),X.rotate(ht[1],ft.x+ft.width/2,ft.y+ft.height/2),N+=ht[1]):Tt==4&&(bt?(dt=yt.x(ht[2],ht[3]),mt=yt.y(ht[2],ht[3]),X.rotate(ht[1],dt,mt)):X.rotate(ht[1],ht[2],ht[3]),N+=ht[1]):vt=="s"?Tt==2||Tt==3?(ft=ft||y.getBBox(1),X.scale(ht[1],ht[Tt-1],ft.x+ft.width/2,ft.y+ft.height/2),I*=ht[1],j*=ht[Tt-1]):Tt==5&&(bt?(dt=yt.x(ht[3],ht[4]),mt=yt.y(ht[3],ht[4]),X.scale(ht[1],ht[2],dt,mt)):X.scale(ht[1],ht[2],ht[3],ht[4]),I*=ht[1],j*=ht[2]):vt=="m"&&Tt==7&&X.add(ht[1],ht[2],ht[3],ht[4],ht[5],ht[6]),z.dirtyT=1,y.matrix=X}y.matrix=X,z.sx=I,z.sy=j,z.deg=N,z.dx=A=X.e,z.dy=g=X.f,I==1&&j==1&&!N&&z.bbox?(z.bbox.x+=+A,z.bbox.y+=+g):z.dirtyT=1}),Q=function(y){var S=y[0];switch(S.toLowerCase()){case"t":return[S,0,0];case"m":return[S,1,0,0,1,0,0];case"r":return y.length==4?[S,0,y[2],y[3]]:[S,0];case"s":return y.length==5?[S,1,1,y[3],y[4]]:y.length==3?[S,1,1]:[S,1]}},ot=l._equaliseTransform=function(y,S){S=F(S).replace(/\.{3}|\u2026/g,y),y=l.parseTransformString(y)||[],S=l.parseTransformString(S)||[];for(var A,g,w,N,I=tt(y.length,S.length),j=[],z=[],X=0;X<I;X++){if(w=y[X]||Q(S[X]),N=S[X]||Q(w),w[0]!=N[0]||w[0].toLowerCase()=="r"&&(w[2]!=N[2]||w[3]!=N[3])||w[0].toLowerCase()=="s"&&(w[3]!=N[3]||w[4]!=N[4]))return;for(j[X]=[],z[X]=[],A=0,g=tt(w.length,N.length);A<g;A++)A in w&&(j[X][A]=w[A]),A in N&&(z[X][A]=N[A])}return{from:j,to:z}};function lt(y,S,A,g,w,N){y!=null?(this.a=+y,this.b=+S,this.c=+A,this.d=+g,this.e=+w,this.f=+N):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0)}l._getContainer=function(y,S,A,g){var w;if((w=g!=null||l.is(y,"object")?y:v.doc.getElementById(y))!=null)return w.tagName?S==null?{container:w,width:w.style.pixelWidth||w.offsetWidth,height:w.style.pixelHeight||w.offsetHeight}:{container:w,width:S,height:A}:{container:1,x:y,y:S,width:A,height:g}},l.pathToRelative=xs,l._engine={},l.path2curve=Hr,l.matrix=function(y,S,A,g,w,N){return new lt(y,S,A,g,w,N)},function(y){function S(g){return g[0]*g[0]+g[1]*g[1]}function A(g){var w=Y.sqrt(S(g));g[0]&&(g[0]/=w),g[1]&&(g[1]/=w)}y.add=function(g,w,N,I,j,z){var X,et,ut,at,it=[[],[],[]],dt=[[this.a,this.c,this.e],[this.b,this.d,this.f],[0,0,1]],mt=[[g,N,j],[w,I,z],[0,0,1]];for(g&&g instanceof lt&&(mt=[[g.a,g.c,g.e],[g.b,g.d,g.f],[0,0,1]]),X=0;X<3;X++)for(et=0;et<3;et++){for(at=0,ut=0;ut<3;ut++)at+=dt[X][ut]*mt[ut][et];it[X][et]=at}this.a=it[0][0],this.b=it[1][0],this.c=it[0][1],this.d=it[1][1],this.e=it[0][2],this.f=it[1][2]},y.invert=function(){var g=this,w=g.a*g.d-g.b*g.c;return new lt(g.d/w,-g.b/w,-g.c/w,g.a/w,(g.c*g.f-g.d*g.e)/w,(g.b*g.e-g.a*g.f)/w)},y.clone=function(){return new lt(this.a,this.b,this.c,this.d,this.e,this.f)},y.translate=function(g,w){this.add(1,0,0,1,g,w)},y.scale=function(g,w,N,I){w==null&&(w=g),(N||I)&&this.add(1,0,0,1,N,I),this.add(g,0,0,w,0,0),(N||I)&&this.add(1,0,0,1,-N,-I)},y.rotate=function(g,w,N){g=l.rad(g),w=w||0,N=N||0;var I=+Y.cos(g).toFixed(9),j=+Y.sin(g).toFixed(9);this.add(I,j,-j,I,w,N),this.add(1,0,0,1,-w,-N)},y.x=function(g,w){return g*this.a+w*this.c+this.e},y.y=function(g,w){return g*this.b+w*this.d+this.f},y.get=function(g){return+this[F.fromCharCode(97+g)].toFixed(4)},y.toString=function(){return l.svg?"matrix("+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)].join()+")":[this.get(0),this.get(2),this.get(1),this.get(3),0,0].join()},y.toFilter=function(){return"progid:DXImageTransform.Microsoft.Matrix(M11="+this.get(0)+", M12="+this.get(2)+", M21="+this.get(1)+", M22="+this.get(3)+", Dx="+this.get(4)+", Dy="+this.get(5)+", sizingmethod='auto expand')"},y.offset=function(){return[this.e.toFixed(4),this.f.toFixed(4)]},y.split=function(){var g={};g.dx=this.e,g.dy=this.f;var w=[[this.a,this.c],[this.b,this.d]];g.scalex=Y.sqrt(S(w[0])),A(w[0]),g.shear=w[0][0]*w[1][0]+w[0][1]*w[1][1],w[1]=[w[1][0]-w[0][0]*g.shear,w[1][1]-w[0][1]*g.shear],g.scaley=Y.sqrt(S(w[1])),A(w[1]),g.shear/=g.scaley;var N=-w[0][1],I=w[1][1];return I<0?(g.rotate=l.deg(Y.acos(I)),N<0&&(g.rotate=360-g.rotate)):g.rotate=l.deg(Y.asin(N)),g.isSimple=!(+g.shear.toFixed(9)||g.scalex.toFixed(9)!=g.scaley.toFixed(9)&&g.rotate),g.isSuperSimple=!+g.shear.toFixed(9)&&g.scalex.toFixed(9)==g.scaley.toFixed(9)&&!g.rotate,g.noRotation=!+g.shear.toFixed(9)&&!g.rotate,g},y.toTransformString=function(g){var w=g||this[R]();return w.isSimple?(w.scalex=+w.scalex.toFixed(4),w.scaley=+w.scaley.toFixed(4),w.rotate=+w.rotate.toFixed(4),(w.dx||w.dy?"t"+[w.dx,w.dy]:O)+(w.scalex!=1||w.scaley!=1?"s"+[w.scalex,w.scaley,0,0]:O)+(w.rotate?"r"+[w.rotate,0,0]:O)):"m"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)]}}(lt.prototype);for(var It=function(){this.returnValue=!1},Rt=function(){return this.originalEvent.preventDefault()},se=function(){this.cancelBubble=!0},Ee=function(){return this.originalEvent.stopPropagation()},ue=function(y){var S=v.doc.documentElement.scrollTop||v.doc.body.scrollTop,A=v.doc.documentElement.scrollLeft||v.doc.body.scrollLeft;return{x:y.clientX+A,y:y.clientY+S}},Jt=v.doc.addEventListener?function(y,S,A,g){var w=function(I){var j=ue(I);return A.call(g,I,j.x,j.y)};if(y.addEventListener(S,w,!1),k&&U[S]){var N=function(I){for(var j=ue(I),z=I,X=0,et=I.targetTouches&&I.targetTouches.length;X<et;X++)if(I.targetTouches[X].target==y){(I=I.targetTouches[X]).originalEvent=z,I.preventDefault=Rt,I.stopPropagation=Ee;break}return A.call(g,I,j.x,j.y)};y.addEventListener(U[S],N,!1)}return function(){return y.removeEventListener(S,w,!1),k&&U[S]&&y.removeEventListener(U[S],N,!1),!0}}:v.doc.attachEvent?function(y,S,A,g){var w=function(N){N=N||v.win.event;var I=v.doc.documentElement.scrollTop||v.doc.body.scrollTop,j=v.doc.documentElement.scrollLeft||v.doc.body.scrollLeft,z=N.clientX+j,X=N.clientY+I;return N.preventDefault=N.preventDefault||It,N.stopPropagation=N.stopPropagation||se,A.call(g,N,z,X)};return y.attachEvent("on"+S,w),function(){return y.detachEvent("on"+S,w),!0}}:void 0,Wt=[],ge=function(y){for(var S,A=y.clientX,g=y.clientY,w=v.doc.documentElement.scrollTop||v.doc.body.scrollTop,N=v.doc.documentElement.scrollLeft||v.doc.body.scrollLeft,I=Wt.length;I--;){if(S=Wt[I],k&&y.touches){for(var j,z=y.touches.length;z--;)if((j=y.touches[z]).identifier==S.el._drag.id){A=j.clientX,g=j.clientY,(y.originalEvent?y.originalEvent:y).preventDefault();break}}else y.preventDefault();var X,et=S.el.node,ut=et.nextSibling,at=et.parentNode,it=et.style.display;v.win.opera&&at.removeChild(et),et.style.display="none",X=S.el.paper.getElementByPoint(A,g),et.style.display=it,v.win.opera&&(ut?at.insertBefore(et,ut):at.appendChild(et)),X&&o("raphael.drag.over."+S.el.id,S.el,X),A+=N,g+=w,o("raphael.drag.move."+S.el.id,S.move_scope||S.el,A-S.el._drag.x,g-S.el._drag.y,A,g,y)}},Gt=function(y){l.unmousemove(ge).unmouseup(Gt);for(var S,A=Wt.length;A--;)(S=Wt[A]).el._drag={},o("raphael.drag.end."+S.el.id,S.end_scope||S.start_scope||S.move_scope||S.el,y);Wt=[]},jt=l.el={},me=L.length;me--;)(function(y){l[y]=jt[y]=function(S,A){return l.is(S,"function")&&(this.events=this.events||[],this.events.push({name:y,f:S,unbind:Jt(this.shape||this.node||v.doc,y,S,A||this)})),this},l["un"+y]=jt["un"+y]=function(S){for(var A=this.events||[],g=A.length;g--;)A[g].name!=y||!l.is(S,"undefined")&&A[g].f!=S||(A[g].unbind(),A.splice(g,1),!A.length&&delete this.events);return this}})(L[me]);jt.data=function(y,S){var A=Ot[this.id]=Ot[this.id]||{};if(arguments.length==0)return A;if(arguments.length==1){if(l.is(y,"object")){for(var g in y)y[p](g)&&this.data(g,y[g]);return this}return o("raphael.data.get."+this.id,this,A[y],y),A[y]}return A[y]=S,o("raphael.data.set."+this.id,this,S,y),this},jt.removeData=function(y){return y==null?delete Ot[this.id]:Ot[this.id]&&delete Ot[this.id][y],this},jt.getData=function(){return Ae(Ot[this.id]||{})},jt.hover=function(y,S,A,g){return this.mouseover(y,A).mouseout(S,g||A)},jt.unhover=function(y,S){return this.unmouseover(y).unmouseout(S)};var Ge=[];jt.drag=function(y,S,A,g,w,N){function I(j){(j.originalEvent||j).preventDefault();var z=j.clientX,X=j.clientY,et=v.doc.documentElement.scrollTop||v.doc.body.scrollTop,ut=v.doc.documentElement.scrollLeft||v.doc.body.scrollLeft;if(this._drag.id=j.identifier,k&&j.touches){for(var at,it=j.touches.length;it--;)if(at=j.touches[it],this._drag.id=at.identifier,at.identifier==this._drag.id){z=at.clientX,X=at.clientY;break}}this._drag.x=z+ut,this._drag.y=X+et,!Wt.length&&l.mousemove(ge).mouseup(Gt),Wt.push({el:this,move_scope:g,start_scope:w,end_scope:N}),S&&o.on("raphael.drag.start."+this.id,S),y&&o.on("raphael.drag.move."+this.id,y),A&&o.on("raphael.drag.end."+this.id,A),o("raphael.drag.start."+this.id,w||g||this,this._drag.x,this._drag.y,j)}return this._drag={},Ge.push({el:this,start:I}),this.mousedown(I),this},jt.onDragOver=function(y){y?o.on("raphael.drag.over."+this.id,y):o.unbind("raphael.drag.over."+this.id)},jt.undrag=function(){for(var y=Ge.length;y--;)Ge[y].el==this&&(this.unmousedown(Ge[y].start),Ge.splice(y,1),o.unbind("raphael.drag.*."+this.id));!Ge.length&&l.unmousemove(ge).unmouseup(Gt),Wt=[]},h.circle=function(y,S,A){var g=l._engine.circle(this,y||0,S||0,A||0);return this.__set__&&this.__set__.push(g),g},h.rect=function(y,S,A,g,w){var N=l._engine.rect(this,y||0,S||0,A||0,g||0,w||0);return this.__set__&&this.__set__.push(N),N},h.ellipse=function(y,S,A,g){var w=l._engine.ellipse(this,y||0,S||0,A||0,g||0);return this.__set__&&this.__set__.push(w),w},h.path=function(y){y&&!l.is(y,"string")&&!l.is(y[0],st)&&(y+=O);var S=l._engine.path(l.format[b](l,arguments),this);return this.__set__&&this.__set__.push(S),S},h.image=function(y,S,A,g,w){var N=l._engine.image(this,y||"about:blank",S||0,A||0,g||0,w||0);return this.__set__&&this.__set__.push(N),N},h.text=function(y,S,A){var g=l._engine.text(this,y||0,S||0,F(A));return this.__set__&&this.__set__.push(g),g},h.set=function(y){!l.is(y,"array")&&(y=Array.prototype.splice.call(arguments,0,arguments.length));var S=new Yi(y);return this.__set__&&this.__set__.push(S),S.paper=this,S.type="set",S},h.setStart=function(y){this.__set__=y||this.set()},h.setFinish=function(y){var S=this.__set__;return delete this.__set__,S},h.getSize=function(){var y=this.canvas.parentNode;return{width:y.offsetWidth,height:y.offsetHeight}},h.setSize=function(y,S){return l._engine.setSize.call(this,y,S)},h.setViewBox=function(y,S,A,g,w){return l._engine.setViewBox.call(this,y,S,A,g,w)},h.top=h.bottom=null,h.raphael=l;function Cn(){return this.x+T+this.y+T+this.width+" × "+this.height}h.getElementByPoint=function(y,S){var A,g,w,N,I,j,z,X=this.canvas,et=v.doc.elementFromPoint(y,S);if(v.win.opera&&et.tagName=="svg"){var ut=(g=(A=X).getBoundingClientRect(),w=A.ownerDocument,N=w.body,I=w.documentElement,j=I.clientTop||N.clientTop||0,z=I.clientLeft||N.clientLeft||0,{y:g.top+(v.win.pageYOffset||I.scrollTop||N.scrollTop)-j,x:g.left+(v.win.pageXOffset||I.scrollLeft||N.scrollLeft)-z}),at=X.createSVGRect();at.x=y-ut.x,at.y=S-ut.y,at.width=at.height=1;var it=X.getIntersectionList(at,null);it.length&&(et=it[it.length-1])}if(!et)return null;for(;et.parentNode&&et!=X.parentNode&&!et.raphael;)et=et.parentNode;return et==this.canvas.parentNode&&(et=X),et=et&&et.raphael?this.getById(et.raphaelid):null},h.getElementsByBBox=function(y){var S=this.set();return this.forEach(function(A){l.isBBoxIntersect(A.getBBox(),y)&&S.push(A)}),S},h.getById=function(y){for(var S=this.bottom;S;){if(S.id==y)return S;S=S.next}return null},h.forEach=function(y,S){for(var A=this.bottom;A;){if(y.call(S,A)===!1)return this;A=A.next}return this},h.getElementsByPoint=function(y,S){var A=this.set();return this.forEach(function(g){g.isPointInside(y,S)&&A.push(g)}),A},jt.isPointInside=function(y,S){var A=this.realPath=Zt[this.type](this);return this.attr("transform")&&this.attr("transform").length&&(A=l.transformPath(A,this.attr("transform"))),l.isPointInsidePath(A,y,S)},jt.getBBox=function(y){if(this.removed)return{};var S=this._;return y?(!S.dirty&&S.bboxwt||(this.realPath=Zt[this.type](this),S.bboxwt=Sn(this.realPath),S.bboxwt.toString=Cn,S.dirty=0),S.bboxwt):((S.dirty||S.dirtyT||!S.bbox)&&(!S.dirty&&this.realPath||(S.bboxwt=0,this.realPath=Zt[this.type](this)),S.bbox=Sn(fe(this.realPath,this.matrix)),S.bbox.toString=Cn,S.dirty=S.dirtyT=0),S.bbox)},jt.clone=function(){if(this.removed)return null;var y=this.paper[this.type]().attr(this.attr());return this.__set__&&this.__set__.push(y),y},jt.glow=function(y){if(this.type=="text")return null;var S={width:((y=y||{}).width||10)+(+this.attr("stroke-width")||1),fill:y.fill||!1,opacity:y.opacity==null?.5:y.opacity,offsetx:y.offsetx||0,offsety:y.offsety||0,color:y.color||"#000"},A=S.width/2,g=this.paper,w=g.set(),N=this.realPath||Zt[this.type](this);N=this.matrix?fe(N,this.matrix):N;for(var I=1;I<A+1;I++)w.push(g.path(N).attr({stroke:S.color,fill:S.fill?S.color:"none","stroke-linejoin":"round","stroke-linecap":"round","stroke-width":+(S.width/A*I).toFixed(3),opacity:+(S.opacity/A).toFixed(3)}));return w.insertBefore(this).translate(S.offsetx,S.offsety)};var we=function(y,S,A,g,w,N,I,j,z){return z==null?mn(y,S,A,g,w,N,I,j):l.findDotsAtSegment(y,S,A,g,w,N,I,j,function(X,et,ut,at,it,dt,mt,ft,ht){if(!(ht<0||mn(X,et,ut,at,it,dt,mt,ft)<ht)){var Tt,vt=.5,bt=1-vt;for(Tt=mn(X,et,ut,at,it,dt,mt,ft,bt);ct(Tt-ht)>.01;)Tt=mn(X,et,ut,at,it,dt,mt,ft,bt+=(Tt<ht?1:-1)*(vt/=2));return bt}}(y,S,A,g,w,N,I,j,z))},Ve=function(y,S){return function(A,g,w){for(var N,I,j,z,X,et="",ut={},at=0,it=0,dt=(A=Hr(A)).length;it<dt;it++){if((j=A[it])[0]=="M")N=+j[1],I=+j[2];else{if(at+(z=we(N,I,j[1],j[2],j[3],j[4],j[5],j[6]))>g){if(S&&!ut.start){if(et+=["C"+(X=we(N,I,j[1],j[2],j[3],j[4],j[5],j[6],g-at)).start.x,X.start.y,X.m.x,X.m.y,X.x,X.y],w)return et;ut.start=et,et=["M"+X.x,X.y+"C"+X.n.x,X.n.y,X.end.x,X.end.y,j[5],j[6]].join(),at+=z,N=+j[5],I=+j[6];continue}if(!y&&!S)return{x:(X=we(N,I,j[1],j[2],j[3],j[4],j[5],j[6],g-at)).x,y:X.y,alpha:X.alpha}}at+=z,N=+j[5],I=+j[6]}et+=j.shift()+j}return ut.end=et,(X=y?at:S?ut:l.findDotsAtSegment(N,I,j[0],j[1],j[2],j[3],j[4],j[5],1)).alpha&&(X={x:X.x,y:X.y,alpha:X.alpha}),X}},Ke=Ve(1),Be=Ve(),De=Ve(0,1);l.getTotalLength=Ke,l.getPointAtLength=Be,l.getSubpath=function(y,S,A){if(this.getTotalLength(y)-A<1e-6)return De(y,S).end;var g=De(y,A,1);return S?De(g,S).end:g},jt.getTotalLength=function(){var y=this.getPath();if(y)return this.node.getTotalLength?this.node.getTotalLength():Ke(y)},jt.getPointAtLength=function(y){var S=this.getPath();if(S)return Be(S,y)},jt.getPath=function(){var y,S=l._getPath[this.type];if(this.type!="text"&&this.type!="set")return S&&(y=S(this)),y},jt.getSubpath=function(y,S){var A=this.getPath();if(A)return l.getSubpath(A,y,S)};var le=l.easing_formulas={linear:function(y){return y},"<":function(y){return wt(y,1.7)},">":function(y){return wt(y,.48)},"<>":function(y){var S=.48-y/1.04,A=Y.sqrt(.1734+S*S),g=A-S,w=-A-S,N=wt(ct(g),1/3)*(g<0?-1:1)+wt(ct(w),1/3)*(w<0?-1:1)+.5;return 3*(1-N)*N*N+N*N*N},backIn:function(y){var S=1.70158;return y*y*((S+1)*y-S)},backOut:function(y){var S=1.70158;return(y-=1)*y*((S+1)*y+S)+1},elastic:function(y){return y==!!y?y:wt(2,-10*y)*Y.sin(2*St*(y-.075)/.3)+1},bounce:function(y){var S=7.5625,A=2.75;return y<1/A?S*y*y:y<2/A?S*(y-=1.5/A)*y+.75:y<2.5/A?S*(y-=2.25/A)*y+.9375:S*(y-=2.625/A)*y+.984375}};le.easeIn=le["ease-in"]=le["<"],le.easeOut=le["ease-out"]=le[">"],le.easeInOut=le["ease-in-out"]=le["<>"],le["back-in"]=le.backIn,le["back-out"]=le.backOut;var Ut=[],hn=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(y){setTimeout(y,16)},ar=function(){for(var y=+new Date,S=0;S<Ut.length;S++){var A=Ut[S];if(!A.el.removed&&!A.paused){var g,w,N=y-A.start,I=A.ms,j=A.easing,z=A.from,X=A.diff,et=A.to,ut=(A.t,A.el),at={},it={};if(A.initstatus?(N=(A.initstatus*A.anim.top-A.prev)/(A.percent-A.prev)*I,A.status=A.initstatus,delete A.initstatus,A.stop&&Ut.splice(S--,1)):A.status=(A.prev+(A.percent-A.prev)*(N/I))/A.anim.top,!(N<0))if(N<I){var dt=j(N/I);for(var mt in z)if(z[p](mt)){switch(q[mt]){case xt:g=+z[mt]+dt*I*X[mt];break;case"colour":g="rgb("+[or(C(z[mt].r+dt*I*X[mt].r)),or(C(z[mt].g+dt*I*X[mt].g)),or(C(z[mt].b+dt*I*X[mt].b))].join(",")+")";break;case"path":g=[];for(var ft=0,ht=z[mt].length;ft<ht;ft++){g[ft]=[z[mt][ft][0]];for(var Tt=1,vt=z[mt][ft].length;Tt<vt;Tt++)g[ft][Tt]=+z[mt][ft][Tt]+dt*I*X[mt][ft][Tt];g[ft]=g[ft].join(T)}g=g.join(T);break;case"transform":if(X[mt].real)for(g=[],ft=0,ht=z[mt].length;ft<ht;ft++)for(g[ft]=[z[mt][ft][0]],Tt=1,vt=z[mt][ft].length;Tt<vt;Tt++)g[ft][Tt]=z[mt][ft][Tt]+dt*I*X[mt][ft][Tt];else{var bt=function(Yt){return+z[mt][Yt]+dt*I*X[mt][Yt]};g=[["m",bt(0),bt(1),bt(2),bt(3),bt(4),bt(5)]]}break;case"csv":if(mt=="clip-rect")for(g=[],ft=4;ft--;)g[ft]=+z[mt][ft]+dt*I*X[mt][ft];break;default:var yt=[][m](z[mt]);for(g=[],ft=ut.paper.customAttributes[mt].length;ft--;)g[ft]=+yt[ft]+dt*I*X[mt][ft]}at[mt]=g}ut.attr(at),function(Yt,zt,Kt){setTimeout(function(){o("raphael.anim.frame."+Yt,zt,Kt)})}(ut.id,ut,A.anim)}else{if(function(Yt,zt,Kt){setTimeout(function(){o("raphael.anim.frame."+zt.id,zt,Kt),o("raphael.anim.finish."+zt.id,zt,Kt),l.is(Yt,"function")&&Yt.call(zt)})}(A.callback,ut,A.anim),ut.attr(et),Ut.splice(S--,1),A.repeat>1&&!A.next){for(w in et)et[p](w)&&(it[w]=A.totalOrigin[w]);A.el.attr(it),Tn(A.anim,A.el,A.anim.percents[0],null,A.totalOrigin,A.repeat-1)}A.next&&!A.stop&&Tn(A.anim,A.el,A.next,null,A.totalOrigin,A.repeat)}}}Ut.length&&hn(ar)},or=function(y){return y>255?255:y<0?0:y};function tn(y,S,A,g,w,N){var I=3*S,j=3*(g-S)-I,z=1-I-j,X=3*A,et=3*(w-A)-X,ut=1-X-et;function at(it){return((z*it+j)*it+I)*it}return function(it,dt){var mt=function(ft,ht){var Tt,vt,bt,yt,Yt,zt;for(bt=ft,zt=0;zt<8;zt++){if(yt=at(bt)-ft,ct(yt)<ht)return bt;if(ct(Yt=(3*z*bt+2*j)*bt+I)<1e-6)break;bt-=yt/Yt}if(vt=1,(bt=ft)<(Tt=0))return Tt;if(bt>vt)return vt;for(;Tt<vt;){if(yt=at(bt),ct(yt-ft)<ht)return bt;ft>yt?Tt=bt:vt=bt,bt=(vt-Tt)/2+Tt}return bt}(it,dt);return((ut*mt+et)*mt+X)*mt}(y,1/(200*N))}function Xe(y,S){var A=[],g={};if(this.ms=S,this.times=1,y){for(var w in y)y[p](w)&&(g[M(w)]=y[w],A.push(M(w)));A.sort(Lt)}this.anim=g,this.top=A[A.length-1],this.percents=A}function Tn(y,S,A,g,w,N){A=M(A);var I,j,z,X,et,ut,at=y.ms,it={},dt={},mt={};if(g)for(ht=0,Tt=Ut.length;ht<Tt;ht++){var ft=Ut[ht];if(ft.el.id==S.id&&ft.anim==y){ft.percent!=A?(Ut.splice(ht,1),z=1):j=ft,S.attr(ft.totalOrigin);break}}else g=+dt;for(var ht=0,Tt=y.percents.length;ht<Tt;ht++){if(y.percents[ht]==A||y.percents[ht]>g*y.top){A=y.percents[ht],et=y.percents[ht-1]||0,at=at/y.top*(A-et),X=y.percents[ht+1],I=y.anim[A];break}g&&S.attr(y.anim[y.percents[ht]])}if(I){if(j)j.initstatus=g,j.start=new Date-j.ms*g;else{for(var vt in I)if(I[p](vt)&&(q[p](vt)||S.paper.customAttributes[p](vt)))switch(it[vt]=S.attr(vt),it[vt]==null&&(it[vt]=V[vt]),dt[vt]=I[vt],q[vt]){case xt:mt[vt]=(dt[vt]-it[vt])/at;break;case"colour":it[vt]=l.getRGB(it[vt]);var bt=l.getRGB(dt[vt]);mt[vt]={r:(bt.r-it[vt].r)/at,g:(bt.g-it[vt].g)/at,b:(bt.b-it[vt].b)/at};break;case"path":var yt=Hr(it[vt],dt[vt]),Yt=yt[1];for(it[vt]=yt[0],mt[vt]=[],ht=0,Tt=it[vt].length;ht<Tt;ht++){mt[vt][ht]=[0];for(var zt=1,Kt=it[vt][ht].length;zt<Kt;zt++)mt[vt][ht][zt]=(Yt[ht][zt]-it[vt][ht][zt])/at}break;case"transform":var Ss=S._,yo=ot(Ss[vt],dt[vt]);if(yo)for(it[vt]=yo.from,dt[vt]=yo.to,mt[vt]=[],mt[vt].real=!0,ht=0,Tt=it[vt].length;ht<Tt;ht++)for(mt[vt][ht]=[it[vt][ht][0]],zt=1,Kt=it[vt][ht].length;zt<Kt;zt++)mt[vt][ht][zt]=(dt[vt][ht][zt]-it[vt][ht][zt])/at;else{var En=S.matrix||new lt,xr={_:{transform:Ss.transform},getBBox:function(){return S.getBBox(1)}};it[vt]=[En.a,En.b,En.c,En.d,En.e,En.f],J(xr,dt[vt]),dt[vt]=xr._.transform,mt[vt]=[(xr.matrix.a-En.a)/at,(xr.matrix.b-En.b)/at,(xr.matrix.c-En.c)/at,(xr.matrix.d-En.d)/at,(xr.matrix.e-En.e)/at,(xr.matrix.f-En.f)/at]}break;case"csv":var ks=F(I[vt])[R](f),Cs=F(it[vt])[R](f);if(vt=="clip-rect")for(it[vt]=Cs,mt[vt]=[],ht=Cs.length;ht--;)mt[vt][ht]=(ks[ht]-it[vt][ht])/at;dt[vt]=ks;break;default:for(ks=[][m](I[vt]),Cs=[][m](it[vt]),mt[vt]=[],ht=S.paper.customAttributes[vt].length;ht--;)mt[vt][ht]=((ks[ht]||0)-(Cs[ht]||0))/at}var Ql=I.easing,Xr=l.easing_formulas[Ql];if(!Xr)if((Xr=F(Ql).match(E))&&Xr.length==5){var Xi=Xr;Xr=function(Zl){return tn(Zl,+Xi[1],+Xi[2],+Xi[3],+Xi[4],at)}}else Xr=Vt;if(ft={anim:y,percent:A,timestamp:ut=I.start||y.start||+new Date,start:ut+(y.del||0),status:0,initstatus:g||0,stop:!1,ms:at,easing:Xr,from:it,diff:mt,to:dt,el:S,callback:I.callback,prev:et,next:X,repeat:N||y.times,origin:S.attr(),totalOrigin:w},Ut.push(ft),g&&!j&&!z&&(ft.stop=!0,ft.start=new Date-at*g,Ut.length==1))return ar();z&&(ft.start=new Date-ft.ms*g),Ut.length==1&&hn(ar)}o("raphael.anim.start."+S.id,S,y)}}function Yr(y){for(var S=0;S<Ut.length;S++)Ut[S].el.paper==y&&Ut.splice(S--,1)}jt.animateWith=function(y,S,A,g,w,N){if(this.removed)return N&&N.call(this),this;var I=A instanceof Xe?A:l.animation(A,g,w,N);Tn(I,this,I.percents[0],null,this.attr());for(var j=0,z=Ut.length;j<z;j++)if(Ut[j].anim==S&&Ut[j].el==y){Ut[z-1].start=Ut[j].start;break}return this},jt.onAnimation=function(y){return y?o.on("raphael.anim.frame."+this.id,y):o.unbind("raphael.anim.frame."+this.id),this},Xe.prototype.delay=function(y){var S=new Xe(this.anim,this.ms);return S.times=this.times,S.del=+y||0,S},Xe.prototype.repeat=function(y){var S=new Xe(this.anim,this.ms);return S.del=this.del,S.times=Y.floor(tt(y,0))||1,S},l.animation=function(y,S,A,g){if(y instanceof Xe)return y;!l.is(A,"function")&&A||(g=g||A||null,A=null),y=Object(y),S=+S||0;var w,N,I={};for(N in y)y[p](N)&&M(N)!=N&&M(N)+"%"!=N&&(w=!0,I[N]=y[N]);if(w)return A&&(I.easing=A),g&&(I.callback=g),new Xe({100:I},S);if(g){var j=0;for(var z in y){var X=G(z);y[p](z)&&X>j&&(j=X)}!y[j+="%"].callback&&(y[j].callback=g)}return new Xe(y,S)},jt.animate=function(y,S,A,g){if(this.removed)return g&&g.call(this),this;var w=y instanceof Xe?y:l.animation(y,S,A,g);return Tn(w,this,w.percents[0],null,this.attr()),this},jt.setTime=function(y,S){return y&&S!=null&&this.status(y,W(S,y.ms)/y.ms),this},jt.status=function(y,S){var A,g,w=[],N=0;if(S!=null)return Tn(y,this,-1,W(S,1)),this;for(A=Ut.length;N<A;N++)if((g=Ut[N]).el.id==this.id&&(!y||g.anim==y)){if(y)return g.status;w.push({anim:g.anim,status:g.status})}return y?0:w},jt.pause=function(y){for(var S=0;S<Ut.length;S++)Ut[S].el.id!=this.id||y&&Ut[S].anim!=y||o("raphael.anim.pause."+this.id,this,Ut[S].anim)!==!1&&(Ut[S].paused=!0);return this},jt.resume=function(y){for(var S=0;S<Ut.length;S++)if(Ut[S].el.id==this.id&&(!y||Ut[S].anim==y)){var A=Ut[S];o("raphael.anim.resume."+this.id,this,A.anim)!==!1&&(delete A.paused,this.status(A.anim,A.status))}return this},jt.stop=function(y){for(var S=0;S<Ut.length;S++)Ut[S].el.id!=this.id||y&&Ut[S].anim!=y||o("raphael.anim.stop."+this.id,this,Ut[S].anim)!==!1&&Ut.splice(S--,1);return this},o.on("raphael.remove",Yr),o.on("raphael.clear",Yr),jt.toString=function(){return"Raphaël’s object"};var Kr,Bn,Hn,lr,Yi=function(y){if(this.items=[],this.length=0,this.type="set",y)for(var S=0,A=y.length;S<A;S++)!y[S]||y[S].constructor!=jt.constructor&&y[S].constructor!=Yi||(this[this.items.length]=this.items[this.items.length]=y[S],this.length++)},Je=Yi.prototype;for(var Ki in Je.push=function(){for(var y,S,A=0,g=arguments.length;A<g;A++)!(y=arguments[A])||y.constructor!=jt.constructor&&y.constructor!=Yi||(this[S=this.items.length]=this.items[S]=y,this.length++);return this},Je.pop=function(){return this.length&&delete this[this.length--],this.items.pop()},Je.forEach=function(y,S){for(var A=0,g=this.items.length;A<g;A++)if(y.call(S,this.items[A],A)===!1)return this;return this},jt)jt[p](Ki)&&(Je[Ki]=function(y){return function(){var S=arguments;return this.forEach(function(A){A[y][b](A,S)})}}(Ki));return Je.attr=function(y,S){if(y&&l.is(y,st)&&l.is(y[0],"object"))for(var A=0,g=y.length;A<g;A++)this.items[A].attr(y[A]);else for(var w=0,N=this.items.length;w<N;w++)this.items[w].attr(y,S);return this},Je.clear=function(){for(;this.length;)this.pop()},Je.splice=function(y,S,A){y=y<0?tt(this.length+y,0):y,S=tt(0,W(this.length-y,S));var g,w=[],N=[],I=[];for(g=2;g<arguments.length;g++)I.push(arguments[g]);for(g=0;g<S;g++)N.push(this[y+g]);for(;g<this.length-y;g++)w.push(this[y+g]);var j=I.length;for(g=0;g<j+w.length;g++)this.items[y+g]=this[y+g]=g<j?I[g]:w[g-j];for(g=this.items.length=this.length-=S-j;this[g];)delete this[g++];return new Yi(N)},Je.exclude=function(y){for(var S=0,A=this.length;S<A;S++)if(this[S]==y)return this.splice(S,1),!0},Je.animate=function(y,S,A,g){(l.is(A,"function")||!A)&&(g=A||null);var w,N,I=this.items.length,j=I,z=this;if(!I)return this;g&&(N=function(){!--I&&g.call(z)}),A=l.is(A,"string")?A:N;var X=l.animation(y,S,A,N);for(w=this.items[--j].animate(X);j--;)this.items[j]&&!this.items[j].removed&&this.items[j].animateWith(w,X,X),this.items[j]&&!this.items[j].removed||I--;return this},Je.insertAfter=function(y){for(var S=this.items.length;S--;)this.items[S].insertAfter(y);return this},Je.getBBox=function(){for(var y=[],S=[],A=[],g=[],w=this.items.length;w--;)if(!this.items[w].removed){var N=this.items[w].getBBox();y.push(N.x),S.push(N.y),A.push(N.x+N.width),g.push(N.y+N.height)}return{x:y=W[b](0,y),y:S=W[b](0,S),x2:A=tt[b](0,A),y2:g=tt[b](0,g),width:A-y,height:g-S}},Je.clone=function(y){y=this.paper.set();for(var S=0,A=this.items.length;S<A;S++)y.push(this.items[S].clone());return y},Je.toString=function(){return"Raphaël‘s set"},Je.glow=function(y){var S=this.paper.set();return this.forEach(function(A,g){var w=A.glow(y);w==null||w.forEach(function(N,I){S.push(N)})}),S},Je.isPointInside=function(y,S){var A=!1;return this.forEach(function(g){if(g.isPointInside(y,S))return A=!0,!1}),A},l.registerFont=function(y){if(!y.face)return y;this.fonts=this.fonts||{};var S={w:y.w,face:{},glyphs:{}},A=y.face["font-family"];for(var g in y.face)y.face[p](g)&&(S.face[g]=y.face[g]);if(this.fonts[A]?this.fonts[A].push(S):this.fonts[A]=[S],!y.svg){for(var w in S.face["units-per-em"]=G(y.face["units-per-em"],10),y.glyphs)if(y.glyphs[p](w)){var N=y.glyphs[w];if(S.glyphs[w]={w:N.w,k:{},d:N.d&&"M"+N.d.replace(/[mlcxtrv]/g,function(j){return{l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"}[j]||"M"})+"z"},N.k)for(var I in N.k)N[p](I)&&(S.glyphs[w].k[I]=N.k[I])}}return y},h.getFont=function(y,S,A,g){if(g=g||"normal",A=A||"normal",S=+S||{normal:400,bold:700,lighter:300,bolder:800}[S]||400,l.fonts){var w,N=l.fonts[y];if(!N){var I=new RegExp("(^|\\s)"+y.replace(/[^\w\d\s+!~.:_-]/g,O)+"(\\s|$)","i");for(var j in l.fonts)if(l.fonts[p](j)&&I.test(j)){N=l.fonts[j];break}}if(N)for(var z=0,X=N.length;z<X&&((w=N[z]).face["font-weight"]!=S||w.face["font-style"]!=A&&w.face["font-style"]||w.face["font-stretch"]!=g);z++);return w}},h.print=function(y,S,A,g,w,N,I,j){N=N||"middle",I=tt(W(I||0,1),-1),j=tt(W(j||1,3),1);var z,X=F(A)[R](O),et=0,ut=0,at=O;if(l.is(g,"string")&&(g=this.getFont(g)),g){z=(w||16)/g.face["units-per-em"];for(var it=g.face.bbox[R](f),dt=+it[0],mt=it[3]-it[1],ft=0,ht=+it[1]+(N=="baseline"?mt+ +g.face.descent:mt/2),Tt=0,vt=X.length;Tt<vt;Tt++){if(X[Tt]==`
39
+ `)et=0,yt=0,ut=0,ft+=mt*j;else{var bt=ut&&g.glyphs[X[Tt-1]]||{},yt=g.glyphs[X[Tt]];et+=ut?(bt.w||g.w)+(bt.k&&bt.k[X[Tt]]||0)+g.w*I:0,ut=1}yt&&yt.d&&(at+=l.transformPath(yt.d,["t",et*z,ft*z,"s",z,z,dt,ht,"t",(y-dt)/z,(S-ht)/z]))}}return this.path(at).attr({fill:"#000",stroke:"none"})},h.add=function(y){if(l.is(y,"array"))for(var S,A=this.set(),g=0,w=y.length;g<w;g++)S=y[g]||{},d[p](S.type)&&A.push(this[S.type]().attr(S));return A},l.format=function(y,S){var A=l.is(S,st)?[0][m](S):arguments;return y&&l.is(y,"string")&&A.length-1&&(y=y.replace(u,function(g,w){return A[++w]==null?O:A[w]})),y||O},l.fullfill=(Kr=/\{([^\}]+)\}/g,Bn=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g,function(y,S){return String(y).replace(Kr,function(A,g){return function(w,N,I){var j=I;return N.replace(Bn,function(z,X,et,ut,at){X=X||ut,j&&(X in j&&(j=j[X]),typeof j=="function"&&at&&(j=j()))}),j=(j==null||j==I?w:j)+""}(A,g,S)})}),l.ninja=function(){if(_.was)v.win.Raphael=_.is;else{window.Raphael=void 0;try{delete window.Raphael}catch{}}return l},l.st=Je,o.on("raphael.DOMload",function(){c=!0}),(Hn=document).readyState==null&&Hn.addEventListener&&(Hn.addEventListener("DOMContentLoaded",lr=function(){Hn.removeEventListener("DOMContentLoaded",lr,!1),Hn.readyState="complete"},!1),Hn.readyState="loading"),function y(){/in/.test(Hn.readyState)?setTimeout(y,9):l.eve("raphael.DOMload")}(),l}).apply(r,s))===void 0||(e.exports=a)},function(e,r,i){var s,a;s=[i(0),i(3),i(4)],(a=(function(o){return o}).apply(r,s))===void 0||(e.exports=a)},function(e,r,i){var s,a,o,l,c,h,f,d,u,p,v,_,x,b;l="hasOwnProperty",c=/[\.\/]/,h=/\s*,\s*/,f=function(m,k){return m-k},d={n:{}},u=function(){for(var m=0,k=this.length;m<k;m++)if(this[m]!==void 0)return this[m]},p=function(){for(var m=this.length;--m;)if(this[m]!==void 0)return this[m]},v=Object.prototype.toString,_=String,x=Array.isArray||function(m){return m instanceof Array||v.call(m)=="[object Array]"},(b=function(m,k){var O,T=o,F=Array.prototype.slice.call(arguments,2),R=b.listeners(m),L=0,U=[],B={},Y=[],tt=a;Y.firstDefined=u,Y.lastDefined=p,a=m,o=0;for(var W=0,ct=R.length;W<ct;W++)"zIndex"in R[W]&&(U.push(R[W].zIndex),R[W].zIndex<0&&(B[R[W].zIndex]=R[W]));for(U.sort(f);U[L]<0;)if(O=B[U[L++]],Y.push(O.apply(k,F)),o)return o=T,Y;for(W=0;W<ct;W++)if("zIndex"in(O=R[W]))if(O.zIndex==U[L]){if(Y.push(O.apply(k,F)),o)break;do if((O=B[U[++L]])&&Y.push(O.apply(k,F)),o)break;while(O)}else B[O.zIndex]=O;else if(Y.push(O.apply(k,F)),o)break;return o=T,a=tt,Y})._events=d,b.listeners=function(m){var k,O,T,F,R,L,U,B,Y=x(m)?m:m.split(c),tt=d,W=[tt],ct=[];for(F=0,R=Y.length;F<R;F++){for(B=[],L=0,U=W.length;L<U;L++)for(O=[(tt=W[L].n)[Y[F]],tt["*"]],T=2;T--;)(k=O[T])&&(B.push(k),ct=ct.concat(k.f||[]));W=B}return ct},b.separator=function(m){m?(m="["+(m=_(m).replace(/(?=[\.\^\]\[\-])/g,"\\"))+"]",c=new RegExp(m)):c=/[\.\/]/},b.on=function(m,k){if(typeof k!="function")return function(){};for(var O=x(m)?x(m[0])?m:[m]:_(m).split(h),T=0,F=O.length;T<F;T++)(function(R){for(var L,U=x(R)?R:_(R).split(c),B=d,Y=0,tt=U.length;Y<tt;Y++)B=(B=B.n).hasOwnProperty(U[Y])&&B[U[Y]]||(B[U[Y]]={n:{}});for(B.f=B.f||[],Y=0,tt=B.f.length;Y<tt;Y++)if(B.f[Y]==k){L=!0;break}!L&&B.f.push(k)})(O[T]);return function(R){+R==+R&&(k.zIndex=+R)}},b.f=function(m){var k=[].slice.call(arguments,1);return function(){b.apply(null,[m,null].concat(k).concat([].slice.call(arguments,0)))}},b.stop=function(){o=1},b.nt=function(m){var k=x(a)?a.join("."):a;return m?new RegExp("(?:\\.|\\/|^)"+m+"(?:\\.|\\/|$)").test(k):k},b.nts=function(){return x(a)?a:a.split(c)},b.off=b.unbind=function(m,k){if(m){var O=x(m)?x(m[0])?m:[m]:_(m).split(h);if(O.length>1)for(var T=0,F=O.length;T<F;T++)b.off(O[T],k);else{O=x(m)?m:_(m).split(c);var R,L,U,B,Y,tt=[d];for(T=0,F=O.length;T<F;T++)for(B=0;B<tt.length;B+=U.length-2){if(U=[B,1],R=tt[B].n,O[T]!="*")R[O[T]]&&U.push(R[O[T]]);else for(L in R)R[l](L)&&U.push(R[L]);tt.splice.apply(tt,U)}for(T=0,F=tt.length;T<F;T++)for(R=tt[T];R.n;){if(k){if(R.f){for(B=0,Y=R.f.length;B<Y;B++)if(R.f[B]==k){R.f.splice(B,1);break}!R.f.length&&delete R.f}for(L in R.n)if(R.n[l](L)&&R.n[L].f){var W=R.n[L].f;for(B=0,Y=W.length;B<Y;B++)if(W[B]==k){W.splice(B,1);break}!W.length&&delete R.n[L].f}}else for(L in delete R.f,R.n)R.n[l](L)&&R.n[L].f&&delete R.n[L].f;R=R.n}}}else b._events=d={n:{}}},b.once=function(m,k){var O=function(){return b.off(m,O),k.apply(this,arguments)};return b.on(m,O)},b.version="0.5.0",b.toString=function(){return"You are running Eve 0.5.0"},e.exports?e.exports=b:(s=(function(){return b}).apply(r,[]))===void 0||(e.exports=s)},function(e,r,i){var s,a;s=[i(0)],(a=(function(o){if(!o||o.svg){var l="hasOwnProperty",c=String,h=parseFloat,f=parseInt,d=Math,u=d.max,p=d.abs,v=d.pow,_=/[, ]+/,x=o.eve,b="",m=" ",k="http://www.w3.org/1999/xlink",O={block:"M5,0 0,2.5 5,5z",classic:"M5,0 0,2.5 5,5 3.5,3 3.5,2z",diamond:"M2.5,0 5,2.5 2.5,5 0,2.5z",open:"M6,1 1,3.5 6,6",oval:"M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z"},T={};o.toString=function(){return`Your browser supports SVG.
40
+ You are running Raphaël `+this.version};var F=function($,P){if(P)for(var E in typeof $=="string"&&($=F($)),P)P[l](E)&&(E.substring(0,6)=="xlink:"?$.setAttributeNS(k,E.substring(6),c(P[E])):$.setAttribute(E,c(P[E])));else($=o._g.doc.createElementNS("http://www.w3.org/2000/svg",$)).style&&($.style.webkitTapHighlightColor="rgba(0,0,0,0)");return $},R=function($,P){var E="linear",C=$.id+P,M=.5,G=.5,D=$.node,V=$.paper,q=D.style,Z=o._g.doc.getElementById(C);if(!Z){if(P=(P=c(P).replace(o._radial_gradient,function(Lt,Vt,$t){if(E="radial",Vt&&$t){M=h(Vt);var he=2*((G=h($t))>.5)-1;v(M-.5,2)+v(G-.5,2)>.25&&(G=d.sqrt(.25-v(M-.5,2))*he+.5)&&G!=.5&&(G=G.toFixed(5)-1e-5*he)}return b})).split(/\s*\-\s*/),E=="linear"){var rt=P.shift();if(rt=-h(rt),isNaN(rt))return null;var gt=[0,0,d.cos(o.rad(rt)),d.sin(o.rad(rt))],Ct=1/(u(p(gt[2]),p(gt[3]))||1);gt[2]*=Ct,gt[3]*=Ct,gt[2]<0&&(gt[0]=-gt[2],gt[2]=0),gt[3]<0&&(gt[1]=-gt[3],gt[3]=0)}var Ft=o._parseDots(P);if(!Ft)return null;if(C=C.replace(/[\(\)\s,\xb0#]/g,"_"),$.gradient&&C!=$.gradient.id&&(V.defs.removeChild($.gradient),delete $.gradient),!$.gradient){Z=F(E+"Gradient",{id:C}),$.gradient=Z,F(Z,E=="radial"?{fx:M,fy:G}:{x1:gt[0],y1:gt[1],x2:gt[2],y2:gt[3],gradientTransform:$.matrix.invert()}),V.defs.appendChild(Z);for(var kt=0,Ot=Ft.length;kt<Ot;kt++)Z.appendChild(F("stop",{offset:Ft[kt].offset?Ft[kt].offset:kt?"100%":"0%","stop-color":Ft[kt].color||"#fff","stop-opacity":isFinite(Ft[kt].opacity)?Ft[kt].opacity:1}))}}return F(D,{fill:L(C),opacity:1,"fill-opacity":1}),q.fill=b,q.opacity=1,q.fillOpacity=1,1},L=function($){if((P=document.documentMode)&&(P===9||P===10))return"url('#"+$+"')";var P,E=document.location;return"url('"+(E.protocol+"//"+E.host+E.pathname+E.search)+"#"+$+"')"},U=function($){var P=$.getBBox(1);F($.pattern,{patternTransform:$.matrix.invert()+" translate("+P.x+","+P.y+")"})},B=function($,P,E){if($.type=="path"){for(var C,M,G,D,V,q=c(P).toLowerCase().split("-"),Z=$.paper,rt=E?"end":"start",gt=$.node,Ct=$.attrs,Ft=Ct["stroke-width"],kt=q.length,Ot="classic",Lt=3,Vt=3,$t=5;kt--;)switch(q[kt]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":Ot=q[kt];break;case"wide":Vt=5;break;case"narrow":Vt=2;break;case"long":Lt=5;break;case"short":Lt=2}if(Ot=="open"?(Lt+=2,Vt+=2,$t+=2,G=1,D=E?4:1,V={fill:"none",stroke:Ct.stroke}):(D=G=Lt/2,V={fill:Ct.stroke,stroke:"none"}),$._.arrows?E?($._.arrows.endPath&&T[$._.arrows.endPath]--,$._.arrows.endMarker&&T[$._.arrows.endMarker]--):($._.arrows.startPath&&T[$._.arrows.startPath]--,$._.arrows.startMarker&&T[$._.arrows.startMarker]--):$._.arrows={},Ot!="none"){var he="raphael-marker-"+Ot,Zt="raphael-marker-"+rt+Ot+Lt+Vt+"-obj"+$.id;o._g.doc.getElementById(he)?T[he]++:(Z.defs.appendChild(F(F("path"),{"stroke-linecap":"round",d:O[Ot],id:he})),T[he]=1);var fe,qt=o._g.doc.getElementById(Zt);qt?(T[Zt]++,fe=qt.getElementsByTagName("use")[0]):(qt=F(F("marker"),{id:Zt,markerHeight:Vt,markerWidth:Lt,orient:"auto",refX:D,refY:Vt/2}),fe=F(F("use"),{"xlink:href":"#"+he,transform:(E?"rotate(180 "+Lt/2+" "+Vt/2+") ":b)+"scale("+Lt/$t+","+Vt/$t+")","stroke-width":(1/((Lt/$t+Vt/$t)/2)).toFixed(4)}),qt.appendChild(fe),Z.defs.appendChild(qt),T[Zt]=1),F(fe,V);var Re=G*(Ot!="diamond"&&Ot!="oval");E?(C=$._.arrows.startdx*Ft||0,M=o.getTotalLength(Ct.path)-Re*Ft):(C=Re*Ft,M=o.getTotalLength(Ct.path)-($._.arrows.enddx*Ft||0)),(V={})["marker-"+rt]="url(#"+Zt+")",(M||C)&&(V.d=o.getSubpath(Ct.path,C,M)),F(gt,V),$._.arrows[rt+"Path"]=he,$._.arrows[rt+"Marker"]=Zt,$._.arrows[rt+"dx"]=Re,$._.arrows[rt+"Type"]=Ot,$._.arrows[rt+"String"]=P}else E?(C=$._.arrows.startdx*Ft||0,M=o.getTotalLength(Ct.path)-C):(C=0,M=o.getTotalLength(Ct.path)-($._.arrows.enddx*Ft||0)),$._.arrows[rt+"Path"]&&F(gt,{d:o.getSubpath(Ct.path,C,M)}),delete $._.arrows[rt+"Path"],delete $._.arrows[rt+"Marker"],delete $._.arrows[rt+"dx"],delete $._.arrows[rt+"Type"],delete $._.arrows[rt+"String"];for(V in T)if(T[l](V)&&!T[V]){var Ae=o._g.doc.getElementById(V);Ae&&Ae.parentNode.removeChild(Ae)}}},Y={"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,1,1,1,1],". ":[1,3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]},tt=function($,P,E){if(P=Y[c(P).toLowerCase()]){for(var C=$.attrs["stroke-width"]||"1",M={round:C,square:C,butt:0}[$.attrs["stroke-linecap"]||E["stroke-linecap"]]||0,G=[],D=P.length;D--;)G[D]=P[D]*C+(D%2?1:-1)*M;F($.node,{"stroke-dasharray":G.join(",")})}else F($.node,{"stroke-dasharray":"none"})},W=function($,P){var E=$.node,C=$.attrs,M=E.style.visibility;for(var G in E.style.visibility="hidden",P)if(P[l](G)){if(!o._availableAttrs[l](G))continue;var D=P[G];switch(C[G]=D,G){case"blur":$.blur(D);break;case"title":var V=E.getElementsByTagName("title");if(V.length&&(V=V[0]))V.firstChild.nodeValue=D;else{V=F("title");var q=o._g.doc.createTextNode(D);V.appendChild(q),E.appendChild(V)}break;case"href":case"target":var Z=E.parentNode;if(Z.tagName.toLowerCase()!="a"){var rt=F("a");Z.insertBefore(rt,E),rt.appendChild(E),Z=rt}G=="target"?Z.setAttributeNS(k,"show",D=="blank"?"new":D):Z.setAttributeNS(k,G,D);break;case"cursor":E.style.cursor=D;break;case"transform":$.transform(D);break;case"arrow-start":B($,D);break;case"arrow-end":B($,D,1);break;case"clip-rect":var gt=c(D).split(_);if(gt.length==4){$.clip&&$.clip.parentNode.parentNode.removeChild($.clip.parentNode);var Ct=F("clipPath"),Ft=F("rect");Ct.id=o.createUUID(),F(Ft,{x:gt[0],y:gt[1],width:gt[2],height:gt[3]}),Ct.appendChild(Ft),$.paper.defs.appendChild(Ct),F(E,{"clip-path":"url(#"+Ct.id+")"}),$.clip=Ft}if(!D){var kt=E.getAttribute("clip-path");if(kt){var Ot=o._g.doc.getElementById(kt.replace(/(^url\(#|\)$)/g,b));Ot&&Ot.parentNode.removeChild(Ot),F(E,{"clip-path":b}),delete $.clip}}break;case"path":$.type=="path"&&(F(E,{d:D?C.path=o._pathToAbsolute(D):"M0,0"}),$._.dirty=1,$._.arrows&&("startString"in $._.arrows&&B($,$._.arrows.startString),"endString"in $._.arrows&&B($,$._.arrows.endString,1)));break;case"width":if(E.setAttribute(G,D),$._.dirty=1,!C.fx)break;G="x",D=C.x;case"x":C.fx&&(D=-C.x-(C.width||0));case"rx":if(G=="rx"&&$.type=="rect")break;case"cx":E.setAttribute(G,D),$.pattern&&U($),$._.dirty=1;break;case"height":if(E.setAttribute(G,D),$._.dirty=1,!C.fy)break;G="y",D=C.y;case"y":C.fy&&(D=-C.y-(C.height||0));case"ry":if(G=="ry"&&$.type=="rect")break;case"cy":E.setAttribute(G,D),$.pattern&&U($),$._.dirty=1;break;case"r":$.type=="rect"?F(E,{rx:D,ry:D}):E.setAttribute(G,D),$._.dirty=1;break;case"src":$.type=="image"&&E.setAttributeNS(k,"href",D);break;case"stroke-width":$._.sx==1&&$._.sy==1||(D/=u(p($._.sx),p($._.sy))||1),E.setAttribute(G,D),C["stroke-dasharray"]&&tt($,C["stroke-dasharray"],P),$._.arrows&&("startString"in $._.arrows&&B($,$._.arrows.startString),"endString"in $._.arrows&&B($,$._.arrows.endString,1));break;case"stroke-dasharray":tt($,D,P);break;case"fill":var Lt=c(D).match(o._ISURL);if(Lt){Ct=F("pattern");var Vt=F("image");Ct.id=o.createUUID(),F(Ct,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1}),F(Vt,{x:0,y:0,"xlink:href":Lt[1]}),Ct.appendChild(Vt),function(qt){o._preload(Lt[1],function(){var Re=this.offsetWidth,Ae=this.offsetHeight;F(qt,{width:Re,height:Ae}),F(Vt,{width:Re,height:Ae})})}(Ct),$.paper.defs.appendChild(Ct),F(E,{fill:"url(#"+Ct.id+")"}),$.pattern=Ct,$.pattern&&U($);break}var $t=o.getRGB(D);if($t.error){if(($.type=="circle"||$.type=="ellipse"||c(D).charAt()!="r")&&R($,D)){if("opacity"in C||"fill-opacity"in C){var he=o._g.doc.getElementById(E.getAttribute("fill").replace(/^url\(#|\)$/g,b));if(he){var Zt=he.getElementsByTagName("stop");F(Zt[Zt.length-1],{"stop-opacity":("opacity"in C?C.opacity:1)*("fill-opacity"in C?C["fill-opacity"]:1)})}}C.gradient=D,C.fill="none";break}}else delete P.gradient,delete C.gradient,!o.is(C.opacity,"undefined")&&o.is(P.opacity,"undefined")&&F(E,{opacity:C.opacity}),!o.is(C["fill-opacity"],"undefined")&&o.is(P["fill-opacity"],"undefined")&&F(E,{"fill-opacity":C["fill-opacity"]});$t[l]("opacity")&&F(E,{"fill-opacity":$t.opacity>1?$t.opacity/100:$t.opacity});case"stroke":$t=o.getRGB(D),E.setAttribute(G,$t.hex),G=="stroke"&&$t[l]("opacity")&&F(E,{"stroke-opacity":$t.opacity>1?$t.opacity/100:$t.opacity}),G=="stroke"&&$._.arrows&&("startString"in $._.arrows&&B($,$._.arrows.startString),"endString"in $._.arrows&&B($,$._.arrows.endString,1));break;case"gradient":($.type=="circle"||$.type=="ellipse"||c(D).charAt()!="r")&&R($,D);break;case"opacity":C.gradient&&!C[l]("stroke-opacity")&&F(E,{"stroke-opacity":D>1?D/100:D});case"fill-opacity":if(C.gradient){(he=o._g.doc.getElementById(E.getAttribute("fill").replace(/^url\(#|\)$/g,b)))&&(Zt=he.getElementsByTagName("stop"),F(Zt[Zt.length-1],{"stop-opacity":D}));break}default:G=="font-size"&&(D=f(D,10)+"px");var fe=G.replace(/(\-.)/g,function(qt){return qt.substring(1).toUpperCase()});E.style[fe]=D,$._.dirty=1,E.setAttribute(G,D)}}ct($,P),E.style.visibility=M},ct=function($,P){if($.type=="text"&&(P[l]("text")||P[l]("font")||P[l]("font-size")||P[l]("x")||P[l]("y"))){var E=$.attrs,C=$.node,M=C.firstChild?f(o._g.doc.defaultView.getComputedStyle(C.firstChild,b).getPropertyValue("font-size"),10):10;if(P[l]("text")){for(E.text=P.text;C.firstChild;)C.removeChild(C.firstChild);for(var G,D=c(P.text).split(`
41
+ `),V=[],q=0,Z=D.length;q<Z;q++)G=F("tspan"),q&&F(G,{dy:1.2*M,x:E.x}),G.appendChild(o._g.doc.createTextNode(D[q])),C.appendChild(G),V[q]=G}else for(q=0,Z=(V=C.getElementsByTagName("tspan")).length;q<Z;q++)q?F(V[q],{dy:1.2*M,x:E.x}):F(V[0],{dy:0});F(C,{x:E.x,y:E.y}),$._.dirty=1;var rt=$._getBBox(),gt=E.y-(rt.y+rt.height/2);gt&&o.is(gt,"finite")&&F(V[0],{dy:gt})}},wt=function($){return $.parentNode&&$.parentNode.tagName.toLowerCase()==="a"?$.parentNode:$},St=function($,P){this[0]=this.node=$,$.raphael=!0,this.id=("0000"+(Math.random()*Math.pow(36,5)<<0).toString(36)).slice(-5),$.raphaelid=this.id,this.matrix=o.matrix(),this.realPath=null,this.paper=P,this.attrs=this.attrs||{},this._={transform:[],sx:1,sy:1,deg:0,dx:0,dy:0,dirty:1},!P.bottom&&(P.bottom=this),this.prev=P.top,P.top&&(P.top.next=this),P.top=this,this.next=null},xt=o.el;St.prototype=xt,xt.constructor=St,o._engine.path=function($,P){var E=F("path");P.canvas&&P.canvas.appendChild(E);var C=new St(E,P);return C.type="path",W(C,{fill:"none",stroke:"#000",path:$}),C},xt.rotate=function($,P,E){if(this.removed)return this;if(($=c($).split(_)).length-1&&(P=h($[1]),E=h($[2])),$=h($[0]),E==null&&(P=E),P==null||E==null){var C=this.getBBox(1);P=C.x+C.width/2,E=C.y+C.height/2}return this.transform(this._.transform.concat([["r",$,P,E]])),this},xt.scale=function($,P,E,C){if(this.removed)return this;if(($=c($).split(_)).length-1&&(P=h($[1]),E=h($[2]),C=h($[3])),$=h($[0]),P==null&&(P=$),C==null&&(E=C),E==null||C==null)var M=this.getBBox(1);return E=E??M.x+M.width/2,C=C??M.y+M.height/2,this.transform(this._.transform.concat([["s",$,P,E,C]])),this},xt.translate=function($,P){return this.removed?this:(($=c($).split(_)).length-1&&(P=h($[1])),$=h($[0])||0,P=+P||0,this.transform(this._.transform.concat([["t",$,P]])),this)},xt.transform=function($){var P=this._;if($==null)return P.transform;if(o._extractTransform(this,$),this.clip&&F(this.clip,{transform:this.matrix.invert()}),this.pattern&&U(this),this.node&&F(this.node,{transform:this.matrix}),P.sx!=1||P.sy!=1){var E=this.attrs[l]("stroke-width")?this.attrs["stroke-width"]:1;this.attr({"stroke-width":E})}return this},xt.hide=function(){return this.removed||(this.node.style.display="none"),this},xt.show=function(){return this.removed||(this.node.style.display=""),this},xt.remove=function(){var $=wt(this.node);if(!this.removed&&$.parentNode){var P=this.paper;for(var E in P.__set__&&P.__set__.exclude(this),x.unbind("raphael.*.*."+this.id),this.gradient&&P.defs.removeChild(this.gradient),o._tear(this,P),$.parentNode.removeChild($),this.removeData(),this)this[E]=typeof this[E]=="function"?o._removedFactory(E):null;this.removed=!0}},xt._getBBox=function(){if(this.node.style.display=="none"){this.show();var $=!0}var P,E=!1;this.paper.canvas.parentElement?P=this.paper.canvas.parentElement.style:this.paper.canvas.parentNode&&(P=this.paper.canvas.parentNode.style),P&&P.display=="none"&&(E=!0,P.display="");var C={};try{C=this.node.getBBox()}catch{C={x:this.node.clientLeft,y:this.node.clientTop,width:this.node.clientWidth,height:this.node.clientHeight}}finally{C=C||{},E&&(P.display="none")}return $&&this.hide(),C},xt.attr=function($,P){if(this.removed)return this;if($==null){var E={};for(var C in this.attrs)this.attrs[l](C)&&(E[C]=this.attrs[C]);return E.gradient&&E.fill=="none"&&(E.fill=E.gradient)&&delete E.gradient,E.transform=this._.transform,E}if(P==null&&o.is($,"string")){if($=="fill"&&this.attrs.fill=="none"&&this.attrs.gradient)return this.attrs.gradient;if($=="transform")return this._.transform;for(var M=$.split(_),G={},D=0,V=M.length;D<V;D++)($=M[D])in this.attrs?G[$]=this.attrs[$]:o.is(this.paper.customAttributes[$],"function")?G[$]=this.paper.customAttributes[$].def:G[$]=o._availableAttrs[$];return V-1?G:G[M[0]]}if(P==null&&o.is($,"array")){for(G={},D=0,V=$.length;D<V;D++)G[$[D]]=this.attr($[D]);return G}if(P!=null){var q={};q[$]=P}else $!=null&&o.is($,"object")&&(q=$);for(var Z in q)x("raphael.attr."+Z+"."+this.id,this,q[Z]);for(Z in this.paper.customAttributes)if(this.paper.customAttributes[l](Z)&&q[l](Z)&&o.is(this.paper.customAttributes[Z],"function")){var rt=this.paper.customAttributes[Z].apply(this,[].concat(q[Z]));for(var gt in this.attrs[Z]=q[Z],rt)rt[l](gt)&&(q[gt]=rt[gt])}return W(this,q),this},xt.toFront=function(){if(this.removed)return this;var $=wt(this.node);$.parentNode.appendChild($);var P=this.paper;return P.top!=this&&o._tofront(this,P),this},xt.toBack=function(){if(this.removed)return this;var $=wt(this.node),P=$.parentNode;return P.insertBefore($,P.firstChild),o._toback(this,this.paper),this.paper,this},xt.insertAfter=function($){if(this.removed||!$)return this;var P=wt(this.node),E=wt($.node||$[$.length-1].node);return E.nextSibling?E.parentNode.insertBefore(P,E.nextSibling):E.parentNode.appendChild(P),o._insertafter(this,$,this.paper),this},xt.insertBefore=function($){if(this.removed||!$)return this;var P=wt(this.node),E=wt($.node||$[0].node);return E.parentNode.insertBefore(P,E),o._insertbefore(this,$,this.paper),this},xt.blur=function($){var P=this;if(+$!=0){var E=F("filter"),C=F("feGaussianBlur");P.attrs.blur=$,E.id=o.createUUID(),F(C,{stdDeviation:+$||1.5}),E.appendChild(C),P.paper.defs.appendChild(E),P._blur=E,F(P.node,{filter:"url(#"+E.id+")"})}else P._blur&&(P._blur.parentNode.removeChild(P._blur),delete P._blur,delete P.attrs.blur),P.node.removeAttribute("filter");return P},o._engine.circle=function($,P,E,C){var M=F("circle");$.canvas&&$.canvas.appendChild(M);var G=new St(M,$);return G.attrs={cx:P,cy:E,r:C,fill:"none",stroke:"#000"},G.type="circle",F(M,G.attrs),G},o._engine.rect=function($,P,E,C,M,G){var D=F("rect");$.canvas&&$.canvas.appendChild(D);var V=new St(D,$);return V.attrs={x:P,y:E,width:C,height:M,rx:G||0,ry:G||0,fill:"none",stroke:"#000"},V.type="rect",F(D,V.attrs),V},o._engine.ellipse=function($,P,E,C,M){var G=F("ellipse");$.canvas&&$.canvas.appendChild(G);var D=new St(G,$);return D.attrs={cx:P,cy:E,rx:C,ry:M,fill:"none",stroke:"#000"},D.type="ellipse",F(G,D.attrs),D},o._engine.image=function($,P,E,C,M,G){var D=F("image");F(D,{x:E,y:C,width:M,height:G,preserveAspectRatio:"none"}),D.setAttributeNS(k,"href",P),$.canvas&&$.canvas.appendChild(D);var V=new St(D,$);return V.attrs={x:E,y:C,width:M,height:G,src:P},V.type="image",V},o._engine.text=function($,P,E,C){var M=F("text");$.canvas&&$.canvas.appendChild(M);var G=new St(M,$);return G.attrs={x:P,y:E,"text-anchor":"middle",text:C,"font-family":o._availableAttrs["font-family"],"font-size":o._availableAttrs["font-size"],stroke:"none",fill:"#000"},G.type="text",W(G,G.attrs),G},o._engine.setSize=function($,P){return this.width=$||this.width,this.height=P||this.height,this.canvas.setAttribute("width",this.width),this.canvas.setAttribute("height",this.height),this._viewBox&&this.setViewBox.apply(this,this._viewBox),this},o._engine.create=function(){var $=o._getContainer.apply(0,arguments),P=$&&$.container;if(!P)throw new Error("SVG container not found.");var E,C=$.x,M=$.y,G=$.width,D=$.height,V=F("svg"),q="overflow:hidden;";return C=C||0,M=M||0,F(V,{height:D=D||342,version:1.1,width:G=G||512,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}),P==1?(V.style.cssText=q+"position:absolute;left:"+C+"px;top:"+M+"px",o._g.doc.body.appendChild(V),E=1):(V.style.cssText=q+"position:relative",P.firstChild?P.insertBefore(V,P.firstChild):P.appendChild(V)),(P=new o._Paper).width=G,P.height=D,P.canvas=V,P.clear(),P._left=P._top=0,E&&(P.renderfix=function(){}),P.renderfix(),P},o._engine.setViewBox=function($,P,E,C,M){x("raphael.setViewBox",this,this._viewBox,[$,P,E,C,M]);var G,D,V=this.getSize(),q=u(E/V.width,C/V.height),Z=this.top,rt=M?"xMidYMid meet":"xMinYMin";for($==null?(this._vbSize&&(q=1),delete this._vbSize,G="0 0 "+this.width+m+this.height):(this._vbSize=q,G=$+m+P+m+E+m+C),F(this.canvas,{viewBox:G,preserveAspectRatio:rt});q&&Z;)D="stroke-width"in Z.attrs?Z.attrs["stroke-width"]:1,Z.attr({"stroke-width":D}),Z._.dirty=1,Z._.dirtyT=1,Z=Z.prev;return this._viewBox=[$,P,E,C,!!M],this},o.prototype.renderfix=function(){var $,P=this.canvas,E=P.style;try{$=P.getScreenCTM()||P.createSVGMatrix()}catch{$=P.createSVGMatrix()}var C=-$.e%1,M=-$.f%1;(C||M)&&(C&&(this._left=(this._left+C)%1,E.left=this._left+"px"),M&&(this._top=(this._top+M)%1,E.top=this._top+"px"))},o.prototype.clear=function(){o.eve("raphael.clear",this);for(var $=this.canvas;$.firstChild;)$.removeChild($.firstChild);this.bottom=this.top=null,(this.desc=F("desc")).appendChild(o._g.doc.createTextNode("Created with Raphaël "+o.version)),$.appendChild(this.desc),$.appendChild(this.defs=F("defs"))},o.prototype.remove=function(){for(var $ in x("raphael.remove",this),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas),this)this[$]=typeof this[$]=="function"?o._removedFactory($):null};var st=o.st;for(var K in xt)xt[l](K)&&!st[l](K)&&(st[K]=function($){return function(){var P=arguments;return this.forEach(function(E){E[$].apply(E,P)})}}(K))}}).apply(r,s))===void 0||(e.exports=a)},function(e,r,i){var s,a;s=[i(0)],(a=(function(o){if(!o||o.vml){var l="hasOwnProperty",c=String,h=parseFloat,f=Math,d=f.round,u=f.max,p=f.min,v=f.abs,_=/[, ]+/,x=o.eve,b=" ",m="",k={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},O=/([clmz]),?([^clmz]*)/gi,T=/ progid:\S+Blur\([^\)]+\)/g,F=/-?[^,\s-]+/g,R="position:absolute;left:0;top:0;width:1px;height:1px;behavior:url(#default#VML)",L=21600,U={path:1,rect:1,image:1},B={circle:1,ellipse:1},Y=function(P,E,C){var M=o.matrix();return M.rotate(-P,.5,.5),{dx:M.x(E,C),dy:M.y(E,C)}},tt=function(P,E,C,M,G,D){var V=P._,q=P.matrix,Z=V.fillpos,rt=P.node,gt=rt.style,Ct=1,Ft="",kt=L/E,Ot=L/C;if(gt.visibility="hidden",E&&C){if(rt.coordsize=v(kt)+b+v(Ot),gt.rotation=D*(E*C<0?-1:1),D){var Lt=Y(D,M,G);M=Lt.dx,G=Lt.dy}if(E<0&&(Ft+="x"),C<0&&(Ft+=" y")&&(Ct=-1),gt.flip=Ft,rt.coordorigin=M*-kt+b+G*-Ot,Z||V.fillsize){var Vt=rt.getElementsByTagName("fill");Vt=Vt&&Vt[0],rt.removeChild(Vt),Z&&(Lt=Y(D,q.x(Z[0],Z[1]),q.y(Z[0],Z[1])),Vt.position=Lt.dx*Ct+b+Lt.dy*Ct),V.fillsize&&(Vt.size=V.fillsize[0]*v(E)+b+V.fillsize[1]*v(C)),rt.appendChild(Vt)}gt.visibility="visible"}};o.toString=function(){return`Your browser doesn’t support SVG. Falling down to VML.
42
+ You are running Raphaël `+this.version};var W,ct=function(P,E,C){for(var M=c(E).toLowerCase().split("-"),G=C?"end":"start",D=M.length,V="classic",q="medium",Z="medium";D--;)switch(M[D]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":V=M[D];break;case"wide":case"narrow":Z=M[D];break;case"long":case"short":q=M[D]}var rt=P.node.getElementsByTagName("stroke")[0];rt[G+"arrow"]=V,rt[G+"arrowlength"]=q,rt[G+"arrowwidth"]=Z},wt=function(P,E){P.attrs=P.attrs||{};var C=P.node,M=P.attrs,G=C.style,D=U[P.type]&&(E.x!=M.x||E.y!=M.y||E.width!=M.width||E.height!=M.height||E.cx!=M.cx||E.cy!=M.cy||E.rx!=M.rx||E.ry!=M.ry||E.r!=M.r),V=B[P.type]&&(M.cx!=E.cx||M.cy!=E.cy||M.r!=E.r||M.rx!=E.rx||M.ry!=E.ry),q=P;for(var Z in E)E[l](Z)&&(M[Z]=E[Z]);if(D&&(M.path=o._getPath[P.type](P),P._.dirty=1),E.href&&(C.href=E.href),E.title&&(C.title=E.title),E.target&&(C.target=E.target),E.cursor&&(G.cursor=E.cursor),"blur"in E&&P.blur(E.blur),(E.path&&P.type=="path"||D)&&(C.path=function(Ue){var zn=/[ahqstv]/gi,er=o._pathToAbsolute;if(c(Ue).match(zn)&&(er=o._path2curve),zn=/[clmz]/g,er==o._pathToAbsolute&&!c(Ue).match(zn)){var Te=c(Ue).replace(O,function(xs,rr,ir){var kn=[],Br=rr.toLowerCase()=="m",sr=k[rr];return ir.replace(F,function(Vn){Br&&kn.length==2&&(sr+=kn+k[rr=="m"?"l":"L"],kn=[]),kn.push(d(Vn*L))}),sr+kn});return Te}var Mn,mn,Vr=er(Ue);Te=[];for(var nr=0,wr=Vr.length;nr<wr;nr++){Mn=Vr[nr],(mn=Vr[nr][0].toLowerCase())=="z"&&(mn="x");for(var Sn=1,Oe=Mn.length;Sn<Oe;Sn++)mn+=d(Mn[Sn]*L)+(Sn!=Oe-1?",":m);Te.push(mn)}return Te.join(b)}(~c(M.path).toLowerCase().indexOf("r")?o._pathToAbsolute(M.path):M.path),P._.dirty=1,P.type=="image"&&(P._.fillpos=[M.x,M.y],P._.fillsize=[M.width,M.height],tt(P,1,1,0,0,0))),"transform"in E&&P.transform(E.transform),V){var rt=+M.cx,gt=+M.cy,Ct=+M.rx||+M.r||0,Ft=+M.ry||+M.r||0;C.path=o.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x",d((rt-Ct)*L),d((gt-Ft)*L),d((rt+Ct)*L),d((gt+Ft)*L),d(rt*L)),P._.dirty=1}if("clip-rect"in E){var kt=c(E["clip-rect"]).split(_);if(kt.length==4){kt[2]=+kt[2]+ +kt[0],kt[3]=+kt[3]+ +kt[1];var Ot=C.clipRect||o._g.doc.createElement("div"),Lt=Ot.style;Lt.clip=o.format("rect({1}px {2}px {3}px {0}px)",kt),C.clipRect||(Lt.position="absolute",Lt.top=0,Lt.left=0,Lt.width=P.paper.width+"px",Lt.height=P.paper.height+"px",C.parentNode.insertBefore(Ot,C),Ot.appendChild(C),C.clipRect=Ot)}E["clip-rect"]||C.clipRect&&(C.clipRect.style.clip="auto")}if(P.textpath){var Vt=P.textpath.style;E.font&&(Vt.font=E.font),E["font-family"]&&(Vt.fontFamily='"'+E["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g,m)+'"'),E["font-size"]&&(Vt.fontSize=E["font-size"]),E["font-weight"]&&(Vt.fontWeight=E["font-weight"]),E["font-style"]&&(Vt.fontStyle=E["font-style"])}if("arrow-start"in E&&ct(q,E["arrow-start"]),"arrow-end"in E&&ct(q,E["arrow-end"],1),E.opacity!=null||E.fill!=null||E.src!=null||E.stroke!=null||E["stroke-width"]!=null||E["stroke-opacity"]!=null||E["fill-opacity"]!=null||E["stroke-dasharray"]!=null||E["stroke-miterlimit"]!=null||E["stroke-linejoin"]!=null||E["stroke-linecap"]!=null){var $t=C.getElementsByTagName("fill");if(!($t=$t&&$t[0])&&($t=W("fill")),P.type=="image"&&E.src&&($t.src=E.src),E.fill&&($t.on=!0),$t.on!=null&&E.fill!="none"&&E.fill!==null||($t.on=!1),$t.on&&E.fill){var he=c(E.fill).match(o._ISURL);if(he){$t.parentNode==C&&C.removeChild($t),$t.rotate=!0,$t.src=he[1],$t.type="tile";var Zt=P.getBBox(1);$t.position=Zt.x+b+Zt.y,P._.fillpos=[Zt.x,Zt.y],o._preload(he[1],function(){P._.fillsize=[this.offsetWidth,this.offsetHeight]})}else $t.color=o.getRGB(E.fill).hex,$t.src=m,$t.type="solid",o.getRGB(E.fill).error&&(q.type in{circle:1,ellipse:1}||c(E.fill).charAt()!="r")&&St(q,E.fill,$t)&&(M.fill="none",M.gradient=E.fill,$t.rotate=!1)}if("fill-opacity"in E||"opacity"in E){var fe=((+M["fill-opacity"]+1||2)-1)*((+M.opacity+1||2)-1)*((+o.getRGB(E.fill).o+1||2)-1);fe=p(u(fe,0),1),$t.opacity=fe,$t.src&&($t.color="none")}C.appendChild($t);var qt=C.getElementsByTagName("stroke")&&C.getElementsByTagName("stroke")[0],Re=!1;!qt&&(Re=qt=W("stroke")),(E.stroke&&E.stroke!="none"||E["stroke-width"]||E["stroke-opacity"]!=null||E["stroke-dasharray"]||E["stroke-miterlimit"]||E["stroke-linejoin"]||E["stroke-linecap"])&&(qt.on=!0),(E.stroke=="none"||E.stroke===null||qt.on==null||E.stroke==0||E["stroke-width"]==0)&&(qt.on=!1);var Ae=o.getRGB(E.stroke);qt.on&&E.stroke&&(qt.color=Ae.hex),fe=((+M["stroke-opacity"]+1||2)-1)*((+M.opacity+1||2)-1)*((+Ae.o+1||2)-1);var We=.75*(h(E["stroke-width"])||1);if(fe=p(u(fe,0),1),E["stroke-width"]==null&&(We=M["stroke-width"]),E["stroke-width"]&&(qt.weight=We),We&&We<1&&(fe*=We)&&(qt.weight=1),qt.opacity=fe,E["stroke-linejoin"]&&(qt.joinstyle=E["stroke-linejoin"]||"miter"),qt.miterlimit=E["stroke-miterlimit"]||8,E["stroke-linecap"]&&(qt.endcap=E["stroke-linecap"]=="butt"?"flat":E["stroke-linecap"]=="square"?"square":"round"),"stroke-dasharray"in E){var xn={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};qt.dashstyle=xn[l](E["stroke-dasharray"])?xn[E["stroke-dasharray"]]:m}Re&&C.appendChild(qt)}if(q.type=="text"){q.paper.canvas.style.display=m;var cn=q.paper.span,Me=M.font&&M.font.match(/\d+(?:\.\d*)?(?=px)/);G=cn.style,M.font&&(G.font=M.font),M["font-family"]&&(G.fontFamily=M["font-family"]),M["font-weight"]&&(G.fontWeight=M["font-weight"]),M["font-style"]&&(G.fontStyle=M["font-style"]),Me=h(M["font-size"]||Me&&Me[0])||10,G.fontSize=100*Me+"px",q.textpath.string&&(cn.innerHTML=c(q.textpath.string).replace(/</g,"&#60;").replace(/&/g,"&#38;").replace(/\n/g,"<br>"));var an=cn.getBoundingClientRect();q.W=M.w=(an.right-an.left)/100,q.H=M.h=(an.bottom-an.top)/100,q.X=M.x,q.Y=M.y+q.H/2,("x"in E||"y"in E)&&(q.path.v=o.format("m{0},{1}l{2},{1}",d(M.x*L),d(M.y*L),d(M.x*L)+1));for(var Fn=["x","y","text","font","font-family","font-weight","font-style","font-size"],Rn=0,Gn=Fn.length;Rn<Gn;Rn++)if(Fn[Rn]in E){q._.dirty=1;break}switch(M["text-anchor"]){case"start":q.textpath.style["v-text-align"]="left",q.bbx=q.W/2;break;case"end":q.textpath.style["v-text-align"]="right",q.bbx=-q.W/2;break;default:q.textpath.style["v-text-align"]="center",q.bbx=0}q.textpath.style["v-text-kern"]=!0}},St=function(P,E,C){P.attrs=P.attrs||{},P.attrs;var M=Math.pow,G="linear",D=".5 .5";if(P.attrs.gradient=E,E=(E=c(E).replace(o._radial_gradient,function(Ct,Ft,kt){return G="radial",Ft&&kt&&(Ft=h(Ft),kt=h(kt),M(Ft-.5,2)+M(kt-.5,2)>.25&&(kt=f.sqrt(.25-M(Ft-.5,2))*(2*(kt>.5)-1)+.5),D=Ft+b+kt),m})).split(/\s*\-\s*/),G=="linear"){var V=E.shift();if(V=-h(V),isNaN(V))return null}var q=o._parseDots(E);if(!q)return null;if(P=P.shape||P.node,q.length){P.removeChild(C),C.on=!0,C.method="none",C.color=q[0].color,C.color2=q[q.length-1].color;for(var Z=[],rt=0,gt=q.length;rt<gt;rt++)q[rt].offset&&Z.push(q[rt].offset+b+q[rt].color);C.colors=Z.length?Z.join():"0% "+C.color,G=="radial"?(C.type="gradientTitle",C.focus="100%",C.focussize="0 0",C.focusposition=D,C.angle=0):(C.type="gradient",C.angle=(270-V)%360),P.appendChild(C)}return 1},xt=function(P,E){this[0]=this.node=P,P.raphael=!0,this.id=o._oid++,P.raphaelid=this.id,this.X=0,this.Y=0,this.attrs={},this.paper=E,this.matrix=o.matrix(),this._={transform:[],sx:1,sy:1,dx:0,dy:0,deg:0,dirty:1,dirtyT:1},!E.bottom&&(E.bottom=this),this.prev=E.top,E.top&&(E.top.next=this),E.top=this,this.next=null},st=o.el;xt.prototype=st,st.constructor=xt,st.transform=function(P){if(P==null)return this._.transform;var E,C=this.paper._viewBoxShift,M=C?"s"+[C.scale,C.scale]+"-1-1t"+[C.dx,C.dy]:m;C&&(E=P=c(P).replace(/\.{3}|\u2026/g,this._.transform||m)),o._extractTransform(this,M+P);var G,D=this.matrix.clone(),V=this.skew,q=this.node,Z=~c(this.attrs.fill).indexOf("-"),rt=!c(this.attrs.fill).indexOf("url(");if(D.translate(1,1),rt||Z||this.type=="image")if(V.matrix="1 0 0 1",V.offset="0 0",G=D.split(),Z&&G.noRotation||!G.isSimple){q.style.filter=D.toFilter();var gt=this.getBBox(),Ct=this.getBBox(1),Ft=gt.x-Ct.x,kt=gt.y-Ct.y;q.coordorigin=Ft*-L+b+kt*-L,tt(this,1,1,Ft,kt,0)}else q.style.filter=m,tt(this,G.scalex,G.scaley,G.dx,G.dy,G.rotate);else q.style.filter=m,V.matrix=c(D),V.offset=D.offset();return E!==null&&(this._.transform=E,o._extractTransform(this,E)),this},st.rotate=function(P,E,C){if(this.removed)return this;if(P!=null){if((P=c(P).split(_)).length-1&&(E=h(P[1]),C=h(P[2])),P=h(P[0]),C==null&&(E=C),E==null||C==null){var M=this.getBBox(1);E=M.x+M.width/2,C=M.y+M.height/2}return this._.dirtyT=1,this.transform(this._.transform.concat([["r",P,E,C]])),this}},st.translate=function(P,E){return this.removed?this:((P=c(P).split(_)).length-1&&(E=h(P[1])),P=h(P[0])||0,E=+E||0,this._.bbox&&(this._.bbox.x+=P,this._.bbox.y+=E),this.transform(this._.transform.concat([["t",P,E]])),this)},st.scale=function(P,E,C,M){if(this.removed)return this;if((P=c(P).split(_)).length-1&&(E=h(P[1]),C=h(P[2]),M=h(P[3]),isNaN(C)&&(C=null),isNaN(M)&&(M=null)),P=h(P[0]),E==null&&(E=P),M==null&&(C=M),C==null||M==null)var G=this.getBBox(1);return C=C??G.x+G.width/2,M=M??G.y+G.height/2,this.transform(this._.transform.concat([["s",P,E,C,M]])),this._.dirtyT=1,this},st.hide=function(){return!this.removed&&(this.node.style.display="none"),this},st.show=function(){return!this.removed&&(this.node.style.display=m),this},st.auxGetBBox=o.el.getBBox,st.getBBox=function(){var P=this.auxGetBBox();if(this.paper&&this.paper._viewBoxShift){var E={},C=1/this.paper._viewBoxShift.scale;return E.x=P.x-this.paper._viewBoxShift.dx,E.x*=C,E.y=P.y-this.paper._viewBoxShift.dy,E.y*=C,E.width=P.width*C,E.height=P.height*C,E.x2=E.x+E.width,E.y2=E.y+E.height,E}return P},st._getBBox=function(){return this.removed?{}:{x:this.X+(this.bbx||0)-this.W/2,y:this.Y-this.H,width:this.W,height:this.H}},st.remove=function(){if(!this.removed&&this.node.parentNode){for(var P in this.paper.__set__&&this.paper.__set__.exclude(this),o.eve.unbind("raphael.*.*."+this.id),o._tear(this,this.paper),this.node.parentNode.removeChild(this.node),this.shape&&this.shape.parentNode.removeChild(this.shape),this)this[P]=typeof this[P]=="function"?o._removedFactory(P):null;this.removed=!0}},st.attr=function(P,E){if(this.removed)return this;if(P==null){var C={};for(var M in this.attrs)this.attrs[l](M)&&(C[M]=this.attrs[M]);return C.gradient&&C.fill=="none"&&(C.fill=C.gradient)&&delete C.gradient,C.transform=this._.transform,C}if(E==null&&o.is(P,"string")){if(P=="fill"&&this.attrs.fill=="none"&&this.attrs.gradient)return this.attrs.gradient;for(var G=P.split(_),D={},V=0,q=G.length;V<q;V++)(P=G[V])in this.attrs?D[P]=this.attrs[P]:o.is(this.paper.customAttributes[P],"function")?D[P]=this.paper.customAttributes[P].def:D[P]=o._availableAttrs[P];return q-1?D:D[G[0]]}if(this.attrs&&E==null&&o.is(P,"array")){for(D={},V=0,q=P.length;V<q;V++)D[P[V]]=this.attr(P[V]);return D}var Z;for(var rt in E!=null&&((Z={})[P]=E),E==null&&o.is(P,"object")&&(Z=P),Z)x("raphael.attr."+rt+"."+this.id,this,Z[rt]);if(Z){for(rt in this.paper.customAttributes)if(this.paper.customAttributes[l](rt)&&Z[l](rt)&&o.is(this.paper.customAttributes[rt],"function")){var gt=this.paper.customAttributes[rt].apply(this,[].concat(Z[rt]));for(var Ct in this.attrs[rt]=Z[rt],gt)gt[l](Ct)&&(Z[Ct]=gt[Ct])}Z.text&&this.type=="text"&&(this.textpath.string=Z.text),wt(this,Z)}return this},st.toFront=function(){return!this.removed&&this.node.parentNode.appendChild(this.node),this.paper&&this.paper.top!=this&&o._tofront(this,this.paper),this},st.toBack=function(){return this.removed?this:(this.node.parentNode.firstChild!=this.node&&(this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild),o._toback(this,this.paper)),this)},st.insertAfter=function(P){return this.removed?this:(P.constructor==o.st.constructor&&(P=P[P.length-1]),P.node.nextSibling?P.node.parentNode.insertBefore(this.node,P.node.nextSibling):P.node.parentNode.appendChild(this.node),o._insertafter(this,P,this.paper),this)},st.insertBefore=function(P){return this.removed?this:(P.constructor==o.st.constructor&&(P=P[0]),P.node.parentNode.insertBefore(this.node,P.node),o._insertbefore(this,P,this.paper),this)},st.blur=function(P){var E=this.node.runtimeStyle,C=E.filter;return C=C.replace(T,m),+P!=0?(this.attrs.blur=P,E.filter=C+b+" progid:DXImageTransform.Microsoft.Blur(pixelradius="+(+P||1.5)+")",E.margin=o.format("-{0}px 0 0 -{0}px",d(+P||1.5))):(E.filter=C,E.margin=0,delete this.attrs.blur),this},o._engine.path=function(P,E){var C=W("shape");C.style.cssText=R,C.coordsize=L+b+L,C.coordorigin=E.coordorigin;var M=new xt(C,E),G={fill:"none",stroke:"#000"};P&&(G.path=P),M.type="path",M.path=[],M.Path=m,wt(M,G),E.canvas&&E.canvas.appendChild(C);var D=W("skew");return D.on=!0,C.appendChild(D),M.skew=D,M.transform(m),M},o._engine.rect=function(P,E,C,M,G,D){var V=o._rectPath(E,C,M,G,D),q=P.path(V),Z=q.attrs;return q.X=Z.x=E,q.Y=Z.y=C,q.W=Z.width=M,q.H=Z.height=G,Z.r=D,Z.path=V,q.type="rect",q},o._engine.ellipse=function(P,E,C,M,G){var D=P.path();return D.attrs,D.X=E-M,D.Y=C-G,D.W=2*M,D.H=2*G,D.type="ellipse",wt(D,{cx:E,cy:C,rx:M,ry:G}),D},o._engine.circle=function(P,E,C,M){var G=P.path();return G.attrs,G.X=E-M,G.Y=C-M,G.W=G.H=2*M,G.type="circle",wt(G,{cx:E,cy:C,r:M}),G},o._engine.image=function(P,E,C,M,G,D){var V=o._rectPath(C,M,G,D),q=P.path(V).attr({stroke:"none"}),Z=q.attrs,rt=q.node,gt=rt.getElementsByTagName("fill")[0];return Z.src=E,q.X=Z.x=C,q.Y=Z.y=M,q.W=Z.width=G,q.H=Z.height=D,Z.path=V,q.type="image",gt.parentNode==rt&&rt.removeChild(gt),gt.rotate=!0,gt.src=E,gt.type="tile",q._.fillpos=[C,M],q._.fillsize=[G,D],rt.appendChild(gt),tt(q,1,1,0,0,0),q},o._engine.text=function(P,E,C,M){var G=W("shape"),D=W("path"),V=W("textpath");E=E||0,C=C||0,M=M||"",D.v=o.format("m{0},{1}l{2},{1}",d(E*L),d(C*L),d(E*L)+1),D.textpathok=!0,V.string=c(M),V.on=!0,G.style.cssText=R,G.coordsize=L+b+L,G.coordorigin="0 0";var q=new xt(G,P),Z={fill:"#000",stroke:"none",font:o._availableAttrs.font,text:M};q.shape=G,q.path=D,q.textpath=V,q.type="text",q.attrs.text=c(M),q.attrs.x=E,q.attrs.y=C,q.attrs.w=1,q.attrs.h=1,wt(q,Z),G.appendChild(V),G.appendChild(D),P.canvas.appendChild(G);var rt=W("skew");return rt.on=!0,G.appendChild(rt),q.skew=rt,q.transform(m),q},o._engine.setSize=function(P,E){var C=this.canvas.style;return this.width=P,this.height=E,P==+P&&(P+="px"),E==+E&&(E+="px"),C.width=P,C.height=E,C.clip="rect(0 "+P+" "+E+" 0)",this._viewBox&&o._engine.setViewBox.apply(this,this._viewBox),this},o._engine.setViewBox=function(P,E,C,M,G){o.eve("raphael.setViewBox",this,this._viewBox,[P,E,C,M,G]);var D,V,q=this.getSize(),Z=q.width,rt=q.height;return G&&(C*(D=rt/M)<Z&&(P-=(Z-C*D)/2/D),M*(V=Z/C)<rt&&(E-=(rt-M*V)/2/V)),this._viewBox=[P,E,C,M,!!G],this._viewBoxShift={dx:-P,dy:-E,scale:q},this.forEach(function(gt){gt.transform("...")}),this},o._engine.initWin=function(P){var E=P.document;E.styleSheets.length<31?E.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)"):E.styleSheets[0].addRule(".rvml","behavior:url(#default#VML)");try{!E.namespaces.rvml&&E.namespaces.add("rvml","urn:schemas-microsoft-com:vml"),W=function(C){return E.createElement("<rvml:"+C+' class="rvml">')}}catch{W=function(C){return E.createElement("<"+C+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},o._engine.initWin(o._g.win),o._engine.create=function(){var P=o._getContainer.apply(0,arguments),E=P.container,C=P.height,M=P.width,G=P.x,D=P.y;if(!E)throw new Error("VML container not found.");var V=new o._Paper,q=V.canvas=o._g.doc.createElement("div"),Z=q.style;return G=G||0,D=D||0,M=M||512,C=C||342,V.width=M,V.height=C,M==+M&&(M+="px"),C==+C&&(C+="px"),V.coordsize=216e5+b+216e5,V.coordorigin="0 0",V.span=o._g.doc.createElement("span"),V.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",q.appendChild(V.span),Z.cssText=o.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",M,C),E==1?(o._g.doc.body.appendChild(q),Z.left=G+"px",Z.top=D+"px",Z.position="absolute"):E.firstChild?E.insertBefore(q,E.firstChild):E.appendChild(q),V.renderfix=function(){},V},o.prototype.clear=function(){o.eve("raphael.clear",this),this.canvas.innerHTML=m,this.span=o._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},o.prototype.remove=function(){for(var P in o.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas),this)this[P]=typeof this[P]=="function"?o._removedFactory(P):null;return!0};var K=o.st;for(var $ in st)st[l]($)&&!K[l]($)&&(K[$]=function(P){return function(){var E=arguments;return this.forEach(function(C){C[P].apply(C,E)})}}($))}}).apply(r,s))===void 0||(e.exports=a)}])})})(Vg);var O8=Vg.exports;const _n=An(O8);class ul{constructor(t=[]){Et(this,"points");this.points=t}toSVGPathData(){const t=[];for(let e=0,r=this.length;e<r;e++)t.push([e===0?"M":"L",this.points[e].x,this.points[e].y]);return t}toSVGPathD(){let t="";for(let e=0,r=this.length;e<r;e++)t+=(e===0?"M":"L")+this.points[e].x+","+this.points[e].y;return t}get length(){return this.points.length}addPoint(t){this.points.push(t)}getPoint(t){return this.points[t]}isContainPoint(t){const e=t.x,r=t.y,i=this.length;let s=!1;const a=2e-10;for(let o=0,l=i-1;o<i;l=o,o++){const c=this.points[o].x,h=this.points[o].y,f=this.points[l].x,d=this.points[l].y;if(c===e&&h===r||f===e&&d===r||r===h&&r===d)return!0;if(r>=h&&r<d||r<h&&r>=d){const u=(f-c)/(d-h),p=c+u*(r-h);if(p===e||Math.abs(p-e)<a)return!0;p>e&&(s=!s)}}return s}[Symbol.iterator](){let t=0;return{next:()=>({value:t>=this.length-1?this.points[++t]:void 0,done:t>=this.length})}}static generateInMultiplePoint(t,e,r,i,s=1){const a=new ul;for(let o=0;o<=s*r;o+=1){const l=Math.floor(o/s)/r*2*Math.PI,c=t+Math.cos(l)*i,h=e+Math.sin(l)*i;a.addPoint(new Ti({x:c,y:h}))}return a}}_n.easing_formulas.swing=function(n){return n+Math.sin(n*Math.PI*2)/2},_n.easing_formulas.may_cause_seizures=function(n){return n+.2*Math.random()-.1},_n.fn.importSVG=function(n,t){const e=$8.fromRawSVG(n);return e.toRaphael(this,(r,i)=>{e.save(),t&&t(r),i(),e.restore()}),this},_n.fn.NPolygonPath=function(n,t,e,r,i=2){return{shape:this.path(ul.generateInMultiplePoint(n,t,e,r,i).toSVGPathD()),afterPath:ul.generateInMultiplePoint(n,t,e*i,r,1).toSVGPathD()}},_n.fn.zoom=function(n=1){return this.setViewBox(0,0,this.width/n,this.height/n),this},_n.fn.brickwall=function(n,t,e,r,i){for(var s=r/i,a=e/3,o={fill:"firebrick",stroke:"#CCC"},l=0;l<i;l+=1){var c=this.rect(0,0,a,s).attr(o),h=this.rect(0,0,2*a,s).attr(o);l%2?(c.transform("T"+n+","+(t+l*s)),h.transform("T"+(n+a)+","+(t+l*s))):(h.transform("T"+n+","+(t+l*s)),c.transform("T"+(n+2*a)+","+(t+l*s)))}},_n.fn.rosetta=function(n,t,e,r,i){const s=ss.generateRosetta(n,t,e,r,i);return s.center,this.path(s.toSVGPathD())},_n.fn.moon=function(n){n=n||{},n.r=typeof n.r=="number"?n.r:100,n.phase=typeof n.phase=="number"?n.phase:.25,n.x=typeof n.x=="number"?n.x:0,n.y=typeof n.y=="number"?n.y:0,this.circle(n.r+n.x,n.r+n.y,n.r).attr({"stroke-width":0,fill:"#999"});function t(r){r=typeof r=="number"?r:.25,r=Math.max(0,Math.min(1,r)),r=(r-.5)*2;let i="M"+n.r+",0";i+="a"+n.r+","+n.r+" 0 0,0 0,"+n.r*2;let s=r>0?0:1;return r=Math.abs(r),r=r||1e-4,n.inner_r=n.r/Math.pow(r,.5),i+="M"+n.r+","+n.r*2,i+="a"+n.inner_r+","+n.inner_r+" 0 0,"+s+" 0,"+n.r*-2,i}var e=this.path(t(n.phase)).attr({"stroke-width":0,stroke:"#999",fill:"#FF9"}).transform("T"+n.x+","+n.y);return{setPhase:function(r){e.attr("path",t(r))}}},_n.fn.star=function(n,t,e){let r="M"+n+","+(t-e);for(var i=0;i<6;i+=1){const s=270+i*144,a=n+e*Math.cos(s*Math.PI/180),o=t+e*Math.sin(s*Math.PI/180);r+="L"+a+","+o}return this.path(r).attr("stroke-width",0).attr("fill","red")},_n.fn.heart=function(n=150,t=300){let e="M"+n+","+t;return e+="l120,-175a50,50 0 0,0 -120,-75a50,50 0 0,0 -120,75l120,175",this.path(e).attr("stroke","red").attr("fill","pink")},_n.el.redder=function(){const n=_n.getRGB(this.attr("fill"));n.r+=51,this.attr("fill","rgb("+n.r+","+n.g+","+n.b+")")},_n.installCustomAttributes=function(n){n.customAttributes.redness=function(t){const e=255*(1-t/100);return{fill:"rgb(255,"+e+", "+e+")"}},n.customAttributes.progress=function(t){const e=this.data("progresspath"),r=this.attr(),i={x:0,y:0},s=this.data("progresstrail");if(!e)return{transform:"t0,0"};Object.prototype.hasOwnProperty.call(r,"width")&&(i.x=-this.attr("width")/2,i.y=-this.attr("height")/2);const a=e.getTotalLength(),o=e.getPointAtLength(t*a);return s&&s.attr("path",e.getSubpath(0,t*a)),{transform:"t"+(o.x+i.x)+","+(o.y+i.y)+"r"+o.alpha}}};const Bg=_n;class Ei{constructor(){Et(this,"pgs",[]);Et(this,"history",[])}save(){this.history.push(mf(this.pgs))}restore(){const t=this.history.pop();t&&(this.pgs=t)}get size(){let t=0,e=0;return this.pgs.forEach(r=>{const i=r.pg;if(i){const[s,a,o,l]=i.bounds,[c,h]=i.size;t=Math.max(t,s,s+c,o),e=Math.max(e,a,a+h,l)}}),[Math.ceil(t),Math.ceil(e)]}static fromRawSVG(t){return Ei.fromRawSVGUseRappar(t)}static fromRawSVGUseRappar(t){const e=new Ei,r=T8(t);for(let i=0,s=r.length;i<s;i++){const a=r[i];if(a.type=="viewbox"&&a.width&&a.height)continue;const o={attrs:{}};for(const l in a)l==="type"||l==="path"||l==="transform"||(o.attrs[l]=a[l]);switch(a.type){case"path":o.d=a.path,o.pg=ss.fromSVGPathD(a.path,a.transform);break}e.pgs.push(o)}return e}toRaphael(t,e){let r;t instanceof HTMLElement?r=Bg(HTMLElement):typeof t=="string"?r=Bg(document.getElementById(t)):r=t;const[i,s]=this.size;r.setSize(i,s);const a=(o=!1)=>{var l,c;for(let h=0,f=this.pgs.length;h<f;h++){const d=this.pgs[h];if(d.pg&&(d.raphaelPath?d.raphaelPath.attr("path",d.pg.toSVGPathD()):d.raphaelPath=r.path(d.pg.toSVGPathD()),d.raphaelPath.attr(d.attrs)),o&&e){const u=p=>{const{x:v,y:_}=xg(r.canvas,p),x=this.pgs.find(b=>{var m;return(m=b.raphaelPath)==null?void 0:m.isPointInside(v,_)});x&&(e==null||e(x,a))};(l=d.raphaelPath)==null||l.unclick(u),(c=d.raphaelPath)==null||c.click(u)}}};return a(!0),r}toCanvasOperation(t,e){let r;typeof t=="string"?r=document.getElementById(t):r=t;const[i,s]=this.size;r.width=i,r.height=s;const a=new N8(r),o=()=>{a.clearRect(0,0,i,s);for(let c=0,h=this.pgs.length;c<h;c++){const f=this.pgs[c];f.pg&&(a.save(),this.toCanvasAttrs(a,f.attrs),f.pg.toCanvas(a),f.attrs.stroke!=="none"&&a.stroke(),f.attrs.fill!=="none"&&a.fill(),a.restore())}};o();const l=c=>{const{x:h,y:f}=xg(a.canvas,c),d=this.pgs.find(u=>{var p;return(p=u.pg)==null?void 0:p.isPointInPath(h,f)});d&&(e==null||e(d,o))};return r.removeEventListener("click",l),r.addEventListener("click",l),a}toCanvasAttrs(t,e){for(const r in e){const i=e[r];switch(r){case"fill":t.fillStyle=String(i);break;case"stroke":t.strokeStyle=String(i);break;case"stroke-width":t.lineWidth=Number(i);break;case"stroke-linecap":t.lineCap=i;break;case"stroke-linejoin":t.lineJoin=i;break}}}static toDownloadSVGElement(t,e="shape"){_g(V6(t),`${e}.svg`)}toDownloadSVGElement(t,e="shape"){return Ei.toDownloadSVGElement(t,e),this}static toDownloadSVGString(t,e="shape"){_g(yg(t),`${e}.svg`)}toDownloadSVGString(t,e="shape"){return Ei.toDownloadSVGString(t,e),this}static getSVGDOM(t){if(t instanceof HTMLObjectElement||t instanceof HTMLIFrameElement)return t.contentDocument;if(t instanceof HTMLEmbedElement)return t.getSVGDocument()}}const $8=Ei;class N8{constructor(t){Et(this,"canvas");Et(this,"context");Et(this,"customContext");this.canvas=t,this.context=t.getContext("2d",{willReadFrequently:!0}),this.customContext=new hl({canvas:this.canvas,width:this.canvas.width,height:this.canvas.height})}set lineWidth(t){this.context.lineWidth=t,this.customContext.lineWidth=t}get lineWidth(){return this.context.lineWidth}set lineCap(t){this.context.lineCap=t,this.customContext.lineCap=t}get lineCap(){return this.context.lineCap}set lineJoin(t){this.context.lineJoin=t,this.customContext.lineCap=t}get lineJoin(){return this.context.lineJoin}set lineDashOffset(t){this.context.lineDashOffset=t,this.customContext.lineDashOffset=t}get lineDashOffset(){return this.context.lineDashOffset}set miterLimit(t){this.context.miterLimit=t,this.customContext.miterLimit=t}get miterLimit(){return this.context.miterLimit}set globalAlpha(t){this.context.globalAlpha=t,this.customContext.globalAlpha=t}get globalAlpha(){return this.context.globalAlpha}set fillStyle(t){typeof t=="string"||t instanceof CanvasGradient||t instanceof CanvasPattern?(this.context.fillStyle=t,this.customContext.fillStyle=t):(this.context.fillStyle=t.gradient,this.customContext.fillStyle=t.gradientCustom)}get fillStyle(){return this.context.fillStyle}set strokeStyle(t){typeof t=="string"||t instanceof CanvasGradient||t instanceof CanvasPattern?(this.context.strokeStyle=t,this.customContext.strokeStyle=t):(this.context.strokeStyle=t.gradient,this.customContext.strokeStyle=t.gradientCustom)}get strokeStyle(){return this.context.strokeStyle}set font(t){this.context.font=t,this.customContext.font=t}get font(){return this.context.font}fill(){return this.context.fill(),this.customContext.fill(),this}fillRect(t,e,r,i){return this.context.fillRect(t,e,r,i),this.customContext.fillRect(t,e,r,i),this}fillText(t,e,r,i){return this.context.fillText(t,e,r,i),this.customContext.fillText(t,e,r),this}setLineDash(t){return this.context.setLineDash(t),this.customContext.setLineDash(t),this}stroke(){return this.context.stroke(),this.customContext.stroke(),this}strokeText(t,e,r,i){return this.context.strokeText(t,e,r,i),this.customContext.strokeText(t,e,r),this}strokeRect(t,e,r,i){return this.context.strokeRect(t,e,r,i),this.customContext.strokeRect(t,e,r,i),this}clearRect(t=0,e=0,r=this.canvas.width,i=this.canvas.height){return this.context.clearRect(t,e,r,i),this.customContext.clearRect(t,e,r,i),this}save(){return this.context.save(),this.customContext.save(),this}restore(){return this.context.restore(),this.customContext.restore(),this}beginPath(){return this.context.beginPath(),this.customContext.beginPath(),this}closePath(){return this.context.closePath(),this.customContext.closePath(),this}moveTo(t,e){return this.context.moveTo(t,e),this.customContext.moveTo(t,e),this}lineTo(t,e){return this.context.lineTo(t,e),this.customContext.lineTo(t,e),this}arc(t,e,r,i,s,a){return this.context.arc(t,e,r,i,s,a),this.customContext.arc(t,e,r,i,s,a?-1:1),this}arcTo(t,e,r,i,s){return this.context.arcTo(t,e,r,i,s),this.customContext.arcTo(t,e,r,i,s),this}quadraticCurveTo(t,e,r,i){return this.context.quadraticCurveTo(t,e,r,i),this.customContext.quadraticCurveTo(t,e,r,i),this}bezierCurveTo(t,e,r,i,s,a){return this.context.bezierCurveTo(t,e,r,i,s,a),this.customContext.bezierCurveTo(t,e,r,i,s,a),this}rect(t,e,r,i){return this.context.rect(t,e,r,i),this.customContext.rect(t,e,r,i),this}translate(t,e){return this.context.translate(t,e),this.customContext.translate(t,e),this}rotate(t){return this.context.rotate(t),this.customContext.rotate(t),this}scale(t,e){return this.context.scale(t,e),this.customContext.scale(t,e),this}createLinearGradient(t,e,r,i,s){const a=this.context.createLinearGradient(t,e,r,i),o=this.customContext.createLinearGradient(t,e,r,i);return s&&Object.keys(s).forEach(l=>{const c=parseFloat(l);a.addColorStop(c,s[c]),o.addColorStop(c,s[c])}),{gradient:a,gradientCustom:o}}createRadialGradient(t,e,r,i,s,a,o){const l=this.context.createRadialGradient(t,e,r,i,s,a),c=this.customContext.createRadialGradient(t,e,r,i,s,a);return o&&Object.keys(o).forEach(h=>{const f=parseFloat(h);l.addColorStop(f,o[f]),c.addColorStop(f,o[f])}),{gradient:l,gradientCustom:c}}drawImage(t,e=0,r=0){return this.context.drawImage(t,e,r),this.customContext.drawImage(t,e,r),this}getImageData(t,e,r,i,s){return this.context.getImageData(t,e,r,i,s)}putImageData(t,e=0,r=0){return this.context.putImageData(t,e,r)}toRawSVG(){const t=this.customContext.getSerializedSvg(!0),e=this.customContext.getSvg();return{raw:t,element:e}}toSVGOperation(){const{raw:t}=this.toRawSVG();return Ei.fromRawSVG(t)}}(function(){let n=0;window.requestAnimationFrame||(window.requestAnimationFrame=function(t){const e=new Date().getTime(),r=Math.max(0,16-(e-n)),i=window.setTimeout(function(){t(e+r)},r);return n=e+r,i}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)})})();const rn={colorPrimary:Bt.getCSSVar("--color-primary"),colorRed:Bt.getCSSVar("--color-red"),colorOrange:Bt.getCSSVar("--color-orange"),colorYellow:Bt.getCSSVar("--color-yellow"),colorGreen:Bt.getCSSVar("--color-green"),colorBlue:Bt.getCSSVar("--color-blue"),colorPurple:Bt.getCSSVar("--color-purple"),colorBlack:Bt.getCSSVar("--color-black"),colorGray0:Bt.getCSSVar("--color-gray-0"),colorGray3:Bt.getCSSVar("--color-gray-3"),colorGray6:Bt.getCSSVar("--color-gray-6"),colorGray9:Bt.getCSSVar("--color-gray-9"),colorGrayCC:Bt.getCSSVar("--color-gray-cc"),colorGrayDD:Bt.getCSSVar("--color-gray-dd"),colorGrayE6:Bt.getCSSVar("--color-gray-e6"),colorGrayEE:Bt.getCSSVar("--color-gray-ee"),colorGrayEF:Bt.getCSSVar("--color-gray-ef"),colorGrayF5:Bt.getCSSVar("--color-gray-f5"),colorGrayFF:Bt.getCSSVar("--color-gray-ff"),fontLineHeight:Bt.getCSSVar("--font-line-height"),fontSize32:Bt.getCSSVar("--font-size-32"),fontSize24:Bt.getCSSVar("--font-size-24"),fontSize18:Bt.getCSSVar("--font-size-18"),fontSize16:Bt.getCSSVar("--font-size-16"),fontSize14:Bt.getCSSVar("--font-size-14"),fontSize12:Bt.getCSSVar("--font-size-12"),fontSize11:Bt.getCSSVar("--font-size-11"),gap4:Bt.getCSSVar("--gap-4"),gap8:Bt.getCSSVar("--gap-8"),gap12:Bt.getCSSVar("--gap-12"),gap16:Bt.getCSSVar("--gap-16"),gap20:Bt.getCSSVar("--gap-20"),gap40:Bt.getCSSVar("--gap-40"),height44:Bt.getCSSVar("--height-44"),height32:Bt.getCSSVar("--height-32"),borderRadius:Bt.getCSSVar("--border-radius")},F8=function(n){return n[0]==="#"&&(n=n.slice(1)),parseInt(n,16)},R8=function(n,t=1){const e=n>>16&255,r=n>>8&255,i=n&255,s=t<0?0:t>1?1:t;return s===1?"rgb("+e+","+r+","+i+")":"rgba("+e+","+r+","+i+","+s+")"},M8=function(n,t=1){const e=F8(n);return R8(e,t)};function dl(n,t){let e=parseInt(n.substring(1,3),16),r=parseInt(n.substring(3,5),16),i=parseInt(n.substring(5,7),16);e==0&&(e=32),r==0&&(r=32),i==0&&(i=32),e=e*(100+t)/100,r=r*(100+t)/100,i=i*(100+t)/100,e=e<255?e:255,r=r<255?r:255,i=i<255?i:255,e=Math.round(e),r=Math.round(r),i=Math.round(i);const s=e.toString(16).length==1?"0"+e.toString(16):e.toString(16),a=r.toString(16).length==1?"0"+r.toString(16):r.toString(16),o=i.toString(16).length==1?"0"+i.toString(16):i.toString(16);return"#"+s+a+o}var Hg={exports:{}};(function(n){var t={};n.exports=t,t.parse=function(e,r){for(var i=t.bin.readUshort,s=t.bin.readUint,c=0,a={},o=new Uint8Array(e),l=o.length-4;s(o,l)!=101010256;)l--;var c=l;c+=4,c+=4;var h=i(o,c);c+=2,i(o,c),c+=2;var f=s(o,c);c+=4;var d=s(o,c);c+=4,c=d;for(var u=0;u<h;u++){s(o,c),c+=4,c+=4,c+=4,c+=4,s(o,c),c+=4;var f=s(o,c);c+=4;var p=s(o,c);c+=4;var v=i(o,c),_=i(o,c+2),x=i(o,c+4);c+=6,c+=8;var b=s(o,c);c+=4,c+=v+_+x,t._readLocal(o,b,a,f,p,r)}return a},t._readLocal=function(e,r,i,s,a,o){var l=t.bin.readUshort,c=t.bin.readUint;c(e,r),r+=4,l(e,r),r+=2,l(e,r),r+=2;var h=l(e,r);r+=2,c(e,r),r+=4,c(e,r),r+=4,r+=8;var f=l(e,r);r+=2;var d=l(e,r);r+=2;var u=t.bin.readUTF8(e,r,f);if(r+=f,r+=d,o){i[u]={size:a,csize:s};return}var p=new Uint8Array(e.buffer,r);if(h==0)i[u]=new Uint8Array(p.buffer.slice(r,r+s));else if(h==8){var v=new Uint8Array(a);t.inflateRaw(p,v),i[u]=v}else throw"unknown compression method: "+h},t.inflateRaw=function(e,r){return t.F.inflate(e,r)},t.inflate=function(e,r){return e[0],e[1],t.inflateRaw(new Uint8Array(e.buffer,e.byteOffset+2,e.length-6),r)},t.deflate=function(e,r){r==null&&(r={level:6});var i=0,s=new Uint8Array(50+Math.floor(e.length*1.1));s[i]=120,s[i+1]=156,i+=2,i=t.F.deflateRaw(e,s,i,r.level);var a=t.adler(e,0,e.length);return s[i+0]=a>>>24&255,s[i+1]=a>>>16&255,s[i+2]=a>>>8&255,s[i+3]=a>>>0&255,new Uint8Array(s.buffer,0,i+4)},t.deflateRaw=function(e,r){r==null&&(r={level:6});var i=new Uint8Array(50+Math.floor(e.length*1.1)),s=t.F.deflateRaw(e,i,s,r.level);return new Uint8Array(i.buffer,0,s)},t.encode=function(e,r){r==null&&(r=!1);var i=0,s=t.bin.writeUint,a=t.bin.writeUshort,o={};for(var l in e){var c=!t._noNeed(l)&&!r,h=e[l],f=t.crc.crc(h,0,h.length);o[l]={cpr:c,usize:h.length,crc:f,file:c?t.deflateRaw(h):h}}for(var l in o)i+=o[l].file.length+30+46+2*t.bin.sizeUTF8(l);i+=22;var d=new Uint8Array(i),u=0,p=[];for(var l in o){var v=o[l];p.push(u),u=t._writeHeader(d,u,l,v,0)}var _=0,x=u;for(var l in o){var v=o[l];p.push(u),u=t._writeHeader(d,u,l,v,1,p[_++])}var b=u-x;return s(d,u,101010256),u+=4,u+=4,a(d,u,_),u+=2,a(d,u,_),u+=2,s(d,u,b),u+=4,s(d,u,x),u+=4,u+=2,d.buffer},t._noNeed=function(e){var r=e.split(".").pop().toLowerCase();return"png,jpg,jpeg,zip".indexOf(r)!=-1},t._writeHeader=function(e,r,i,s,a,o){var l=t.bin.writeUint,c=t.bin.writeUshort,h=s.file;l(e,r,a==0?67324752:33639248),r+=4,a==1&&(r+=2),c(e,r,20),r+=2,c(e,r,0),r+=2,c(e,r,s.cpr?8:0),r+=2,l(e,r,0),r+=4,l(e,r,s.crc),r+=4,l(e,r,h.length),r+=4,l(e,r,s.usize),r+=4,c(e,r,t.bin.sizeUTF8(i)),r+=2,c(e,r,0),r+=2,a==1&&(r+=2,r+=2,r+=6,l(e,r,o),r+=4);var f=t.bin.writeUTF8(e,r,i);return r+=f,a==0&&(e.set(h,r),r+=h.length),r},t.crc={table:function(){for(var e=new Uint32Array(256),r=0;r<256;r++){for(var i=r,s=0;s<8;s++)i&1?i=3988292384^i>>>1:i=i>>>1;e[r]=i}return e}(),update:function(e,r,i,s){for(var a=0;a<s;a++)e=t.crc.table[(e^r[i+a])&255]^e>>>8;return e},crc:function(e,r,i){return t.crc.update(4294967295,e,r,i)^4294967295}},t.adler=function(e,r,i){for(var s=1,a=0,o=r,l=r+i;o<l;){for(var c=Math.min(o+5552,l);o<c;)s+=e[o++],a+=s;s=s%65521,a=a%65521}return a<<16|s},t.bin={readUshort:function(e,r){return e[r]|e[r+1]<<8},writeUshort:function(e,r,i){e[r]=i&255,e[r+1]=i>>8&255},readUint:function(e,r){return e[r+3]*(256*256*256)+(e[r+2]<<16|e[r+1]<<8|e[r])},writeUint:function(e,r,i){e[r]=i&255,e[r+1]=i>>8&255,e[r+2]=i>>16&255,e[r+3]=i>>24&255},readASCII:function(e,r,i){for(var s="",a=0;a<i;a++)s+=String.fromCharCode(e[r+a]);return s},writeASCII:function(e,r,i){for(var s=0;s<i.length;s++)e[r+s]=i.charCodeAt(s)},pad:function(e){return e.length<2?"0"+e:e},readUTF8:function(e,r,i){for(var s="",a,o=0;o<i;o++)s+="%"+t.bin.pad(e[r+o].toString(16));try{a=decodeURIComponent(s)}catch{return t.bin.readASCII(e,r,i)}return a},writeUTF8:function(e,r,i){for(var s=i.length,a=0,o=0;o<s;o++){var l=i.charCodeAt(o);if(!(l&4294967168))e[r+a]=l,a++;else if(!(l&4294965248))e[r+a]=192|l>>6,e[r+a+1]=128|l>>0&63,a+=2;else if(!(l&4294901760))e[r+a]=224|l>>12,e[r+a+1]=128|l>>6&63,e[r+a+2]=128|l>>0&63,a+=3;else if(!(l&4294967295-(1<<21)+1))e[r+a]=240|l>>18,e[r+a+1]=128|l>>12&63,e[r+a+2]=128|l>>6&63,e[r+a+3]=128|l>>0&63,a+=4;else throw"e"}return a},sizeUTF8:function(e){for(var r=e.length,i=0,s=0;s<r;s++){var a=e.charCodeAt(s);if(!(a&4294967168))i++;else if(!(a&4294965248))i+=2;else if(!(a&4294901760))i+=3;else if(!(a&4294967295-(1<<21)+1))i+=4;else throw"e"}return i}},t.F={},t.F.deflateRaw=function(e,r,i,s){var a=[[0,0,0,0,0],[4,4,8,4,0],[4,5,16,8,0],[4,6,16,16,0],[4,10,16,32,0],[8,16,32,32,0],[8,16,128,128,0],[8,32,128,256,0],[32,128,258,1024,1],[32,258,258,4096,1]],o=a[s],l=t.F.U,c=t.F._goodIndex;t.F._hash;var h=t.F._putsE,f=0,d=i<<3,u=0,p=e.length;if(s==0){for(;f<p;){var v=Math.min(65535,p-f);h(r,d,f+v==p?1:0),d=t.F._copyExact(e,f,v,r,d+8),f+=v}return d>>>3}var _=l.lits,x=l.strt,b=l.prev,m=0,k=0,O=0,T=0,F=0,R=0;for(p>2&&(R=t.F._hash(e,0),x[R]=0),f=0;f<p;f++){if(F=R,f+1<p-2){R=t.F._hash(e,f+1);var L=f+1&32767;b[L]=x[R],x[R]=L}if(u<=f){(m>14e3||k>26697)&&p-f>100&&(u<f&&(_[m]=f-u,m+=2,u=f),d=t.F._writeBlock(f==p-1||u==p?1:0,_,m,T,e,O,f-O,r,d),m=k=T=0,O=f);var U=0;f<p-2&&(U=t.F._bestMatch(e,f,b,F,Math.min(o[2],p-f),o[3]));var v=U>>>16,B=U&65535;if(U!=0){var v=U>>>16,B=U&65535,Y=c(v,l.of0);l.lhst[257+Y]++;var tt=c(B,l.df0);l.dhst[tt]++,T+=l.exb[Y]+l.dxb[tt],_[m]=v<<23|f-u,_[m+1]=B<<16|Y<<8|tt,m+=2,u=f+v}else l.lhst[e[f]]++;k++}}for((O!=f||e.length==0)&&(u<f&&(_[m]=f-u,m+=2,u=f),d=t.F._writeBlock(1,_,m,T,e,O,f-O,r,d),m=0,k=0,m=k=T=0,O=f);d&7;)d++;return d>>>3},t.F._bestMatch=function(e,r,i,s,a,o){var l=r&32767,c=i[l],h=l-c+32768&32767;if(c==l||s!=t.F._hash(e,r-h))return 0;for(var f=0,d=0,u=Math.min(32767,r);h<=u&&--o!=0&&c!=l;){if(f==0||e[r+f]==e[r+f-h]){var p=t.F._howLong(e,r,h);if(p>f){if(f=p,d=h,f>=a)break;h+2<p&&(p=h+2);for(var v=0,_=0;_<p-2;_++){var x=r-h+_+32768&32767,b=i[x],m=x-b+32768&32767;m>v&&(v=m,c=x)}}}l=c,c=i[l],h+=l-c+32768&32767}return f<<16|d},t.F._howLong=function(e,r,i){if(e[r]!=e[r-i]||e[r+1]!=e[r+1-i]||e[r+2]!=e[r+2-i])return 0;var s=r,a=Math.min(e.length,r+258);for(r+=3;r<a&&e[r]==e[r-i];)r++;return r-s},t.F._hash=function(e,r){return(e[r]<<8|e[r+1])+(e[r+2]<<4)&65535},t.saved=0,t.F._writeBlock=function(e,r,i,s,a,o,l,c,h){var f=t.F.U,d=t.F._putsF,u=t.F._putsE,p,v,_,x,b,m,k,O,T;f.lhst[256]++,p=t.F.getTrees(),v=p[0],_=p[1],x=p[2],b=p[3],m=p[4],k=p[5],O=p[6],T=p[7];var F=(h+3&7?8-(h+3&7):0)+32+(l<<3),R=s+t.F.contSize(f.fltree,f.lhst)+t.F.contSize(f.fdtree,f.dhst),L=s+t.F.contSize(f.ltree,f.lhst)+t.F.contSize(f.dtree,f.dhst);L+=14+3*k+t.F.contSize(f.itree,f.ihst)+(f.ihst[16]*2+f.ihst[17]*3+f.ihst[18]*7);for(var U=0;U<286;U++)f.lhst[U]=0;for(var U=0;U<30;U++)f.dhst[U]=0;for(var U=0;U<19;U++)f.ihst[U]=0;var B=F<R&&F<L?0:R<L?1:2;if(d(c,h,e),d(c,h+1,B),h+=3,B==0){for(;h&7;)h++;h=t.F._copyExact(a,o,l,c,h)}else{var Y,tt;if(B==1&&(Y=f.fltree,tt=f.fdtree),B==2){t.F.makeCodes(f.ltree,v),t.F.revCodes(f.ltree,v),t.F.makeCodes(f.dtree,_),t.F.revCodes(f.dtree,_),t.F.makeCodes(f.itree,x),t.F.revCodes(f.itree,x),Y=f.ltree,tt=f.dtree,u(c,h,b-257),h+=5,u(c,h,m-1),h+=5,u(c,h,k-4),h+=4;for(var W=0;W<k;W++)u(c,h+W*3,f.itree[(f.ordr[W]<<1)+1]);h+=3*k,h=t.F._codeTiny(O,f.itree,c,h),h=t.F._codeTiny(T,f.itree,c,h)}for(var ct=o,wt=0;wt<i;wt+=2){for(var St=r[wt],xt=St>>>23,st=ct+(St&(1<<23)-1);ct<st;)h=t.F._writeLit(a[ct++],Y,c,h);if(xt!=0){var K=r[wt+1],$=K>>16,P=K>>8&255,E=K&255;h=t.F._writeLit(257+P,Y,c,h),u(c,h,xt-f.of0[P]),h+=f.exb[P],h=t.F._writeLit(E,tt,c,h),d(c,h,$-f.df0[E]),h+=f.dxb[E],ct+=xt}}h=t.F._writeLit(256,Y,c,h)}return h},t.F._copyExact=function(e,r,i,s,a){var o=a>>>3;return s[o]=i,s[o+1]=i>>>8,s[o+2]=255-s[o],s[o+3]=255-s[o+1],o+=4,s.set(new Uint8Array(e.buffer,r,i),o),a+(i+4<<3)},t.F.getTrees=function(){for(var e=t.F.U,r=t.F._hufTree(e.lhst,e.ltree,15),i=t.F._hufTree(e.dhst,e.dtree,15),s=[],a=t.F._lenCodes(e.ltree,s),o=[],l=t.F._lenCodes(e.dtree,o),c=0;c<s.length;c+=2)e.ihst[s[c]]++;for(var c=0;c<o.length;c+=2)e.ihst[o[c]]++;for(var h=t.F._hufTree(e.ihst,e.itree,7),f=19;f>4&&e.itree[(e.ordr[f-1]<<1)+1]==0;)f--;return[r,i,h,a,l,f,s,o]},t.F.getSecond=function(e){for(var r=[],i=0;i<e.length;i+=2)r.push(e[i+1]);return r},t.F.nonZero=function(e){for(var r="",i=0;i<e.length;i+=2)e[i+1]!=0&&(r+=(i>>1)+",");return r},t.F.contSize=function(e,r){for(var i=0,s=0;s<r.length;s++)i+=r[s]*e[(s<<1)+1];return i},t.F._codeTiny=function(e,r,i,s){for(var a=0;a<e.length;a+=2){var o=e[a],l=e[a+1];s=t.F._writeLit(o,r,i,s);var c=o==16?2:o==17?3:7;o>15&&(t.F._putsE(i,s,l,c),s+=c)}return s},t.F._lenCodes=function(e,r){for(var i=e.length;i!=2&&e[i-1]==0;)i-=2;for(var s=0;s<i;s+=2){var a=e[s+1],o=s+3<i?e[s+3]:-1,l=s+5<i?e[s+5]:-1,c=s==0?-1:e[s-1];if(a==0&&o==a&&l==a){for(var h=s+5;h+2<i&&e[h+2]==a;)h+=2;var f=Math.min(h+1-s>>>1,138);f<11?r.push(17,f-3):r.push(18,f-11),s+=f*2-2}else if(a==c&&o==a&&l==a){for(var h=s+5;h+2<i&&e[h+2]==a;)h+=2;var f=Math.min(h+1-s>>>1,6);r.push(16,f-3),s+=f*2-2}else r.push(a,0)}return i>>>1},t.F._hufTree=function(e,r,i){var s=[],a=e.length,o=r.length,l=0;for(l=0;l<o;l+=2)r[l]=0,r[l+1]=0;for(l=0;l<a;l++)e[l]!=0&&s.push({lit:l,f:e[l]});var c=s.length,h=s.slice(0);if(c==0)return 0;if(c==1){var f=s[0].lit,h=f==0?1:0;return r[(f<<1)+1]=1,r[(h<<1)+1]=1,1}s.sort(function(b,m){return b.f-m.f});var d=s[0],u=s[1],p=0,v=1,_=2;for(s[0]={lit:-1,f:d.f+u.f,l:d,r:u,d:0};v!=c-1;)p!=v&&(_==c||s[p].f<s[_].f)?d=s[p++]:d=s[_++],p!=v&&(_==c||s[p].f<s[_].f)?u=s[p++]:u=s[_++],s[v++]={lit:-1,f:d.f+u.f,l:d,r:u};var x=t.F.setDepth(s[v-1],0);for(x>i&&(t.F.restrictDepth(h,i,x),x=i),l=0;l<c;l++)r[(h[l].lit<<1)+1]=h[l].d;return x},t.F.setDepth=function(e,r){return e.lit!=-1?(e.d=r,r):Math.max(t.F.setDepth(e.l,r+1),t.F.setDepth(e.r,r+1))},t.F.restrictDepth=function(e,r,i){var s=0,a=1<<i-r,o=0;for(e.sort(function(c,h){return h.d==c.d?c.f-h.f:h.d-c.d}),s=0;s<e.length&&e[s].d>r;s++){var l=e[s].d;e[s].d=r,o+=a-(1<<i-l)}for(o=o>>>i-r;o>0;){var l=e[s].d;l<r?(e[s].d++,o-=1<<r-l-1):s++}for(;s>=0;s--)e[s].d==r&&o<0&&(e[s].d--,o++);o!=0&&console.log("debt left")},t.F._goodIndex=function(e,r){var i=0;return r[i|16]<=e&&(i|=16),r[i|8]<=e&&(i|=8),r[i|4]<=e&&(i|=4),r[i|2]<=e&&(i|=2),r[i|1]<=e&&(i|=1),i},t.F._writeLit=function(e,r,i,s){return t.F._putsF(i,s,r[e<<1]),s+r[(e<<1)+1]},t.F.inflate=function(e,r){var i=Uint8Array;if(e[0]==3&&e[1]==0)return r||new i(0);var s=t.F,a=s._bitsF,o=s._bitsE,l=s._decodeTiny,c=s.makeCodes,h=s.codes2map,f=s._get17,d=s.U,u=r==null;u&&(r=new i(e.length>>>2<<3));for(var p=0,v=0,_=0,x=0,b=0,m=0,k=0,O=0,T=0,F,R;p==0;){if(p=a(e,T,1),v=a(e,T+1,2),T+=3,v==0){T&7&&(T+=8-(T&7));var L=(T>>>3)+4,U=e[L-4]|e[L-3]<<8;u&&(r=t.F._check(r,O+U)),r.set(new i(e.buffer,e.byteOffset+L,U),O),T=L+U<<3,O+=U;continue}if(u&&(r=t.F._check(r,O+(1<<17))),v==1&&(F=d.flmap,R=d.fdmap,m=511,k=31),v==2){_=o(e,T,5)+257,x=o(e,T+5,5)+1,b=o(e,T+10,4)+4,T+=14;for(var B=0;B<38;B+=2)d.itree[B]=0,d.itree[B+1]=0;for(var Y=1,B=0;B<b;B++){var tt=o(e,T+B*3,3);d.itree[(d.ordr[B]<<1)+1]=tt,tt>Y&&(Y=tt)}T+=3*b,c(d.itree,Y),h(d.itree,Y,d.imap),F=d.lmap,R=d.dmap,T=l(d.imap,(1<<Y)-1,_+x,e,T,d.ttree);var W=s._copyOut(d.ttree,0,_,d.ltree);m=(1<<W)-1;var ct=s._copyOut(d.ttree,_,x,d.dtree);k=(1<<ct)-1,c(d.ltree,W),h(d.ltree,W,F),c(d.dtree,ct),h(d.dtree,ct,R)}for(;;){var wt=F[f(e,T)&m];T+=wt&15;var St=wt>>>4;if(!(St>>>8))r[O++]=St;else{if(St==256)break;var xt=O+St-254;if(St>264){var st=d.ldef[St-257];xt=O+(st>>>3)+o(e,T,st&7),T+=st&7}var K=R[f(e,T)&k];T+=K&15;var $=K>>>4,P=d.ddef[$],E=(P>>>4)+a(e,T,P&15);for(T+=P&15,u&&(r=t.F._check(r,O+(1<<17)));O<xt;)r[O]=r[O++-E],r[O]=r[O++-E],r[O]=r[O++-E],r[O]=r[O++-E];O=xt}}}return r.length==O?r:r.slice(0,O)},t.F._check=function(e,r){var i=e.length;if(r<=i)return e;var s=new Uint8Array(Math.max(i<<1,r));return s.set(e,0),s},t.F._decodeTiny=function(e,r,i,s,a,o){for(var l=t.F._bitsE,c=t.F._get17,h=0;h<i;){var f=e[c(s,a)&r];a+=f&15;var d=f>>>4;if(d<=15)o[h]=d,h++;else{var u=0,p=0;d==16?(p=3+l(s,a,2),a+=2,u=o[h-1]):d==17?(p=3+l(s,a,3),a+=3):d==18&&(p=11+l(s,a,7),a+=7);for(var v=h+p;h<v;)o[h]=u,h++}}return a},t.F._copyOut=function(e,r,i,s){for(var a=0,o=0,l=s.length>>>1;o<i;){var c=e[o+r];s[o<<1]=0,s[(o<<1)+1]=c,c>a&&(a=c),o++}for(;o<l;)s[o<<1]=0,s[(o<<1)+1]=0,o++;return a},t.F.makeCodes=function(e,r){for(var i=t.F.U,s=e.length,a,o,l,f,c,h=i.bl_count,f=0;f<=r;f++)h[f]=0;for(f=1;f<s;f+=2)h[e[f]]++;var d=i.next_code;for(a=0,h[0]=0,o=1;o<=r;o++)a=a+h[o-1]<<1,d[o]=a;for(l=0;l<s;l+=2)c=e[l+1],c!=0&&(e[l]=d[c],d[c]++)},t.F.codes2map=function(e,r,i){for(var s=e.length,a=t.F.U,o=a.rev15,l=0;l<s;l+=2)if(e[l+1]!=0)for(var c=l>>1,h=e[l+1],f=c<<4|h,d=r-h,u=e[l]<<d,p=u+(1<<d);u!=p;){var v=o[u]>>>15-r;i[v]=f,u++}},t.F.revCodes=function(e,r){for(var i=t.F.U.rev15,s=15-r,a=0;a<e.length;a+=2){var o=e[a]<<r-e[a+1];e[a]=i[o]>>>s}},t.F._putsE=function(e,r,i){i=i<<(r&7);var s=r>>>3;e[s]|=i,e[s+1]|=i>>>8},t.F._putsF=function(e,r,i){i=i<<(r&7);var s=r>>>3;e[s]|=i,e[s+1]|=i>>>8,e[s+2]|=i>>>16},t.F._bitsE=function(e,r,i){return(e[r>>>3]|e[(r>>>3)+1]<<8)>>>(r&7)&(1<<i)-1},t.F._bitsF=function(e,r,i){return(e[r>>>3]|e[(r>>>3)+1]<<8|e[(r>>>3)+2]<<16)>>>(r&7)&(1<<i)-1},t.F._get17=function(e,r){return(e[r>>>3]|e[(r>>>3)+1]<<8|e[(r>>>3)+2]<<16)>>>(r&7)},t.F._get25=function(e,r){return(e[r>>>3]|e[(r>>>3)+1]<<8|e[(r>>>3)+2]<<16|e[(r>>>3)+3]<<24)>>>(r&7)},t.F.U=function(){var e=Uint16Array,r=Uint32Array;return{next_code:new e(16),bl_count:new e(16),ordr:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],of0:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],exb:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],ldef:new e(32),df0:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],dxb:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],ddef:new r(32),flmap:new e(512),fltree:[],fdmap:new e(32),fdtree:[],lmap:new e(32768),ltree:[],ttree:[],dmap:new e(32768),dtree:[],imap:new e(512),itree:[],rev15:new e(32768),lhst:new r(286),dhst:new r(30),ihst:new r(19),lits:new r(15e3),strt:new e(65536),prev:new e(32768)}}(),function(){for(var e=t.F.U,r=32768,i=0;i<r;i++){var s=i;s=(s&2863311530)>>>1|(s&1431655765)<<1,s=(s&3435973836)>>>2|(s&858993459)<<2,s=(s&4042322160)>>>4|(s&252645135)<<4,s=(s&4278255360)>>>8|(s&16711935)<<8,e.rev15[i]=(s>>>16|s<<16)>>>17}function a(o,l,c){for(;l--!=0;)o.push(0,c)}for(var i=0;i<32;i++)e.ldef[i]=e.of0[i]<<3|e.exb[i],e.ddef[i]=e.df0[i]<<4|e.dxb[i];a(e.fltree,144,8),a(e.fltree,112,9),a(e.fltree,24,7),a(e.fltree,8,8),t.F.makeCodes(e.fltree,9),t.F.codes2map(e.fltree,9,e.flmap),t.F.revCodes(e.fltree,9),a(e.fdtree,32,5),t.F.makeCodes(e.fdtree,5),t.F.codes2map(e.fdtree,5,e.fdmap),t.F.revCodes(e.fdtree,5),a(e.itree,19,0),a(e.ltree,286,0),a(e.dtree,30,0),a(e.ttree,320,0)}()})(Hg);var D8=Hg.exports;const qg=An(D8);/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */const I8=4,Yg=0,Kg=1,j8=2;function as(n){let t=n.length;for(;--t>=0;)n[t]=0}const L8=0,Xg=1,U8=2,G8=3,z8=258,pu=29,na=256,ra=na+1+pu,os=30,gu=19,Jg=2*ra+1,Pi=15,mu=16,V8=7,vu=256,Qg=16,Zg=17,Wg=18,yu=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),fl=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),B8=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),tm=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),H8=512,Nr=new Array((ra+2)*2);as(Nr);const ia=new Array(os*2);as(ia);const sa=new Array(H8);as(sa);const aa=new Array(z8-G8+1);as(aa);const _u=new Array(pu);as(_u);const pl=new Array(os);as(pl);function bu(n,t,e,r,i){this.static_tree=n,this.extra_bits=t,this.extra_base=e,this.elems=r,this.max_length=i,this.has_stree=n&&n.length}let em,nm,rm;function wu(n,t){this.dyn_tree=n,this.max_code=0,this.stat_desc=t}const im=n=>n<256?sa[n]:sa[256+(n>>>7)],oa=(n,t)=>{n.pending_buf[n.pending++]=t&255,n.pending_buf[n.pending++]=t>>>8&255},bn=(n,t,e)=>{n.bi_valid>mu-e?(n.bi_buf|=t<<n.bi_valid&65535,oa(n,n.bi_buf),n.bi_buf=t>>mu-n.bi_valid,n.bi_valid+=e-mu):(n.bi_buf|=t<<n.bi_valid&65535,n.bi_valid+=e)},dr=(n,t,e)=>{bn(n,e[t*2],e[t*2+1])},sm=(n,t)=>{let e=0;do e|=n&1,n>>>=1,e<<=1;while(--t>0);return e>>>1},q8=n=>{n.bi_valid===16?(oa(n,n.bi_buf),n.bi_buf=0,n.bi_valid=0):n.bi_valid>=8&&(n.pending_buf[n.pending++]=n.bi_buf&255,n.bi_buf>>=8,n.bi_valid-=8)},Y8=(n,t)=>{const e=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,s=t.stat_desc.has_stree,a=t.stat_desc.extra_bits,o=t.stat_desc.extra_base,l=t.stat_desc.max_length;let c,h,f,d,u,p,v=0;for(d=0;d<=Pi;d++)n.bl_count[d]=0;for(e[n.heap[n.heap_max]*2+1]=0,c=n.heap_max+1;c<Jg;c++)h=n.heap[c],d=e[e[h*2+1]*2+1]+1,d>l&&(d=l,v++),e[h*2+1]=d,!(h>r)&&(n.bl_count[d]++,u=0,h>=o&&(u=a[h-o]),p=e[h*2],n.opt_len+=p*(d+u),s&&(n.static_len+=p*(i[h*2+1]+u)));if(v!==0){do{for(d=l-1;n.bl_count[d]===0;)d--;n.bl_count[d]--,n.bl_count[d+1]+=2,n.bl_count[l]--,v-=2}while(v>0);for(d=l;d!==0;d--)for(h=n.bl_count[d];h!==0;)f=n.heap[--c],!(f>r)&&(e[f*2+1]!==d&&(n.opt_len+=(d-e[f*2+1])*e[f*2],e[f*2+1]=d),h--)}},am=(n,t,e)=>{const r=new Array(Pi+1);let i=0,s,a;for(s=1;s<=Pi;s++)i=i+e[s-1]<<1,r[s]=i;for(a=0;a<=t;a++){let o=n[a*2+1];o!==0&&(n[a*2]=sm(r[o]++,o))}},K8=()=>{let n,t,e,r,i;const s=new Array(Pi+1);for(e=0,r=0;r<pu-1;r++)for(_u[r]=e,n=0;n<1<<yu[r];n++)aa[e++]=r;for(aa[e-1]=r,i=0,r=0;r<16;r++)for(pl[r]=i,n=0;n<1<<fl[r];n++)sa[i++]=r;for(i>>=7;r<os;r++)for(pl[r]=i<<7,n=0;n<1<<fl[r]-7;n++)sa[256+i++]=r;for(t=0;t<=Pi;t++)s[t]=0;for(n=0;n<=143;)Nr[n*2+1]=8,n++,s[8]++;for(;n<=255;)Nr[n*2+1]=9,n++,s[9]++;for(;n<=279;)Nr[n*2+1]=7,n++,s[7]++;for(;n<=287;)Nr[n*2+1]=8,n++,s[8]++;for(am(Nr,ra+1,s),n=0;n<os;n++)ia[n*2+1]=5,ia[n*2]=sm(n,5);em=new bu(Nr,yu,na+1,ra,Pi),nm=new bu(ia,fl,0,os,Pi),rm=new bu(new Array(0),B8,0,gu,V8)},om=n=>{let t;for(t=0;t<ra;t++)n.dyn_ltree[t*2]=0;for(t=0;t<os;t++)n.dyn_dtree[t*2]=0;for(t=0;t<gu;t++)n.bl_tree[t*2]=0;n.dyn_ltree[vu*2]=1,n.opt_len=n.static_len=0,n.sym_next=n.matches=0},lm=n=>{n.bi_valid>8?oa(n,n.bi_buf):n.bi_valid>0&&(n.pending_buf[n.pending++]=n.bi_buf),n.bi_buf=0,n.bi_valid=0},cm=(n,t,e,r)=>{const i=t*2,s=e*2;return n[i]<n[s]||n[i]===n[s]&&r[t]<=r[e]},xu=(n,t,e)=>{const r=n.heap[e];let i=e<<1;for(;i<=n.heap_len&&(i<n.heap_len&&cm(t,n.heap[i+1],n.heap[i],n.depth)&&i++,!cm(t,r,n.heap[i],n.depth));)n.heap[e]=n.heap[i],e=i,i<<=1;n.heap[e]=r},hm=(n,t,e)=>{let r,i,s=0,a,o;if(n.sym_next!==0)do r=n.pending_buf[n.sym_buf+s++]&255,r+=(n.pending_buf[n.sym_buf+s++]&255)<<8,i=n.pending_buf[n.sym_buf+s++],r===0?dr(n,i,t):(a=aa[i],dr(n,a+na+1,t),o=yu[a],o!==0&&(i-=_u[a],bn(n,i,o)),r--,a=im(r),dr(n,a,e),o=fl[a],o!==0&&(r-=pl[a],bn(n,r,o)));while(s<n.sym_next);dr(n,vu,t)},Su=(n,t)=>{const e=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,s=t.stat_desc.elems;let a,o,l=-1,c;for(n.heap_len=0,n.heap_max=Jg,a=0;a<s;a++)e[a*2]!==0?(n.heap[++n.heap_len]=l=a,n.depth[a]=0):e[a*2+1]=0;for(;n.heap_len<2;)c=n.heap[++n.heap_len]=l<2?++l:0,e[c*2]=1,n.depth[c]=0,n.opt_len--,i&&(n.static_len-=r[c*2+1]);for(t.max_code=l,a=n.heap_len>>1;a>=1;a--)xu(n,e,a);c=s;do a=n.heap[1],n.heap[1]=n.heap[n.heap_len--],xu(n,e,1),o=n.heap[1],n.heap[--n.heap_max]=a,n.heap[--n.heap_max]=o,e[c*2]=e[a*2]+e[o*2],n.depth[c]=(n.depth[a]>=n.depth[o]?n.depth[a]:n.depth[o])+1,e[a*2+1]=e[o*2+1]=c,n.heap[1]=c++,xu(n,e,1);while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],Y8(n,t),am(e,l,n.bl_count)},um=(n,t,e)=>{let r,i=-1,s,a=t[0*2+1],o=0,l=7,c=4;for(a===0&&(l=138,c=3),t[(e+1)*2+1]=65535,r=0;r<=e;r++)s=a,a=t[(r+1)*2+1],!(++o<l&&s===a)&&(o<c?n.bl_tree[s*2]+=o:s!==0?(s!==i&&n.bl_tree[s*2]++,n.bl_tree[Qg*2]++):o<=10?n.bl_tree[Zg*2]++:n.bl_tree[Wg*2]++,o=0,i=s,a===0?(l=138,c=3):s===a?(l=6,c=3):(l=7,c=4))},dm=(n,t,e)=>{let r,i=-1,s,a=t[0*2+1],o=0,l=7,c=4;for(a===0&&(l=138,c=3),r=0;r<=e;r++)if(s=a,a=t[(r+1)*2+1],!(++o<l&&s===a)){if(o<c)do dr(n,s,n.bl_tree);while(--o!==0);else s!==0?(s!==i&&(dr(n,s,n.bl_tree),o--),dr(n,Qg,n.bl_tree),bn(n,o-3,2)):o<=10?(dr(n,Zg,n.bl_tree),bn(n,o-3,3)):(dr(n,Wg,n.bl_tree),bn(n,o-11,7));o=0,i=s,a===0?(l=138,c=3):s===a?(l=6,c=3):(l=7,c=4)}},X8=n=>{let t;for(um(n,n.dyn_ltree,n.l_desc.max_code),um(n,n.dyn_dtree,n.d_desc.max_code),Su(n,n.bl_desc),t=gu-1;t>=3&&n.bl_tree[tm[t]*2+1]===0;t--);return n.opt_len+=3*(t+1)+5+5+4,t},J8=(n,t,e,r)=>{let i;for(bn(n,t-257,5),bn(n,e-1,5),bn(n,r-4,4),i=0;i<r;i++)bn(n,n.bl_tree[tm[i]*2+1],3);dm(n,n.dyn_ltree,t-1),dm(n,n.dyn_dtree,e-1)},Q8=n=>{let t=4093624447,e;for(e=0;e<=31;e++,t>>>=1)if(t&1&&n.dyn_ltree[e*2]!==0)return Yg;if(n.dyn_ltree[9*2]!==0||n.dyn_ltree[10*2]!==0||n.dyn_ltree[13*2]!==0)return Kg;for(e=32;e<na;e++)if(n.dyn_ltree[e*2]!==0)return Kg;return Yg};let fm=!1;const Z8=n=>{fm||(K8(),fm=!0),n.l_desc=new wu(n.dyn_ltree,em),n.d_desc=new wu(n.dyn_dtree,nm),n.bl_desc=new wu(n.bl_tree,rm),n.bi_buf=0,n.bi_valid=0,om(n)},pm=(n,t,e,r)=>{bn(n,(L8<<1)+(r?1:0),3),lm(n),oa(n,e),oa(n,~e),e&&n.pending_buf.set(n.window.subarray(t,t+e),n.pending),n.pending+=e},W8=n=>{bn(n,Xg<<1,3),dr(n,vu,Nr),q8(n)},tk=(n,t,e,r)=>{let i,s,a=0;n.level>0?(n.strm.data_type===j8&&(n.strm.data_type=Q8(n)),Su(n,n.l_desc),Su(n,n.d_desc),a=X8(n),i=n.opt_len+3+7>>>3,s=n.static_len+3+7>>>3,s<=i&&(i=s)):i=s=e+5,e+4<=i&&t!==-1?pm(n,t,e,r):n.strategy===I8||s===i?(bn(n,(Xg<<1)+(r?1:0),3),hm(n,Nr,ia)):(bn(n,(U8<<1)+(r?1:0),3),J8(n,n.l_desc.max_code+1,n.d_desc.max_code+1,a+1),hm(n,n.dyn_ltree,n.dyn_dtree)),om(n),r&&lm(n)},ek=(n,t,e)=>(n.pending_buf[n.sym_buf+n.sym_next++]=t,n.pending_buf[n.sym_buf+n.sym_next++]=t>>8,n.pending_buf[n.sym_buf+n.sym_next++]=e,t===0?n.dyn_ltree[e*2]++:(n.matches++,t--,n.dyn_ltree[(aa[e]+na+1)*2]++,n.dyn_dtree[im(t)*2]++),n.sym_next===n.sym_end);var nk=Z8,rk=pm,ik=tk,sk=ek,ak=W8,ok={_tr_init:nk,_tr_stored_block:rk,_tr_flush_block:ik,_tr_tally:sk,_tr_align:ak},la=(n,t,e,r)=>{let i=n&65535|0,s=n>>>16&65535|0,a=0;for(;e!==0;){a=e>2e3?2e3:e,e-=a;do i=i+t[r++]|0,s=s+i|0;while(--a);i%=65521,s%=65521}return i|s<<16|0};const lk=()=>{let n,t=[];for(var e=0;e<256;e++){n=e;for(var r=0;r<8;r++)n=n&1?3988292384^n>>>1:n>>>1;t[e]=n}return t},ck=new Uint32Array(lk());var Qe=(n,t,e,r)=>{const i=ck,s=r+e;n^=-1;for(let a=r;a<s;a++)n=n>>>8^i[(n^t[a])&255];return n^-1},Ai={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},Oi={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:hk,_tr_stored_block:ku,_tr_flush_block:uk,_tr_tally:ei,_tr_align:dk}=ok,{Z_NO_FLUSH:ni,Z_PARTIAL_FLUSH:fk,Z_FULL_FLUSH:pk,Z_FINISH:Ln,Z_BLOCK:gm,Z_OK:sn,Z_STREAM_END:mm,Z_STREAM_ERROR:fr,Z_DATA_ERROR:gk,Z_BUF_ERROR:Cu,Z_DEFAULT_COMPRESSION:mk,Z_FILTERED:vk,Z_HUFFMAN_ONLY:gl,Z_RLE:yk,Z_FIXED:_k,Z_DEFAULT_STRATEGY:bk,Z_UNKNOWN:wk,Z_DEFLATED:ml}=Oi,xk=9,Sk=15,kk=8,Ck=29,Tk=256,Tu=Tk+1+Ck,Ek=30,Pk=19,Ak=2*Tu+1,Ok=15,ae=3,ri=258,pr=ri+ae+1,$k=32,ls=42,Eu=57,Pu=69,Au=73,Ou=91,$u=103,$i=113,ca=666,gn=1,cs=2,Ni=3,hs=4,Nk=3,Fi=(n,t)=>(n.msg=Ai[t],t),vm=n=>n*2-(n>4?9:0),ii=n=>{let t=n.length;for(;--t>=0;)n[t]=0},Fk=n=>{let t,e,r,i=n.w_size;t=n.hash_size,r=t;do e=n.head[--r],n.head[r]=e>=i?e-i:0;while(--t);t=i,r=t;do e=n.prev[--r],n.prev[r]=e>=i?e-i:0;while(--t)};let Rk=(n,t,e)=>(t<<n.hash_shift^e)&n.hash_mask,si=Rk;const On=n=>{const t=n.state;let e=t.pending;e>n.avail_out&&(e=n.avail_out),e!==0&&(n.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+e),n.next_out),n.next_out+=e,t.pending_out+=e,n.total_out+=e,n.avail_out-=e,t.pending-=e,t.pending===0&&(t.pending_out=0))},$n=(n,t)=>{uk(n,n.block_start>=0?n.block_start:-1,n.strstart-n.block_start,t),n.block_start=n.strstart,On(n.strm)},pe=(n,t)=>{n.pending_buf[n.pending++]=t},ha=(n,t)=>{n.pending_buf[n.pending++]=t>>>8&255,n.pending_buf[n.pending++]=t&255},Nu=(n,t,e,r)=>{let i=n.avail_in;return i>r&&(i=r),i===0?0:(n.avail_in-=i,t.set(n.input.subarray(n.next_in,n.next_in+i),e),n.state.wrap===1?n.adler=la(n.adler,t,i,e):n.state.wrap===2&&(n.adler=Qe(n.adler,t,i,e)),n.next_in+=i,n.total_in+=i,i)},ym=(n,t)=>{let e=n.max_chain_length,r=n.strstart,i,s,a=n.prev_length,o=n.nice_match;const l=n.strstart>n.w_size-pr?n.strstart-(n.w_size-pr):0,c=n.window,h=n.w_mask,f=n.prev,d=n.strstart+ri;let u=c[r+a-1],p=c[r+a];n.prev_length>=n.good_match&&(e>>=2),o>n.lookahead&&(o=n.lookahead);do if(i=t,!(c[i+a]!==p||c[i+a-1]!==u||c[i]!==c[r]||c[++i]!==c[r+1])){r+=2,i++;do;while(c[++r]===c[++i]&&c[++r]===c[++i]&&c[++r]===c[++i]&&c[++r]===c[++i]&&c[++r]===c[++i]&&c[++r]===c[++i]&&c[++r]===c[++i]&&c[++r]===c[++i]&&r<d);if(s=ri-(d-r),r=d-ri,s>a){if(n.match_start=t,a=s,s>=o)break;u=c[r+a-1],p=c[r+a]}}while((t=f[t&h])>l&&--e!==0);return a<=n.lookahead?a:n.lookahead},us=n=>{const t=n.w_size;let e,r,i;do{if(r=n.window_size-n.lookahead-n.strstart,n.strstart>=t+(t-pr)&&(n.window.set(n.window.subarray(t,t+t-r),0),n.match_start-=t,n.strstart-=t,n.block_start-=t,n.insert>n.strstart&&(n.insert=n.strstart),Fk(n),r+=t),n.strm.avail_in===0)break;if(e=Nu(n.strm,n.window,n.strstart+n.lookahead,r),n.lookahead+=e,n.lookahead+n.insert>=ae)for(i=n.strstart-n.insert,n.ins_h=n.window[i],n.ins_h=si(n,n.ins_h,n.window[i+1]);n.insert&&(n.ins_h=si(n,n.ins_h,n.window[i+ae-1]),n.prev[i&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=i,i++,n.insert--,!(n.lookahead+n.insert<ae)););}while(n.lookahead<pr&&n.strm.avail_in!==0)},_m=(n,t)=>{let e=n.pending_buf_size-5>n.w_size?n.w_size:n.pending_buf_size-5,r,i,s,a=0,o=n.strm.avail_in;do{if(r=65535,s=n.bi_valid+42>>3,n.strm.avail_out<s||(s=n.strm.avail_out-s,i=n.strstart-n.block_start,r>i+n.strm.avail_in&&(r=i+n.strm.avail_in),r>s&&(r=s),r<e&&(r===0&&t!==Ln||t===ni||r!==i+n.strm.avail_in)))break;a=t===Ln&&r===i+n.strm.avail_in?1:0,ku(n,0,0,a),n.pending_buf[n.pending-4]=r,n.pending_buf[n.pending-3]=r>>8,n.pending_buf[n.pending-2]=~r,n.pending_buf[n.pending-1]=~r>>8,On(n.strm),i&&(i>r&&(i=r),n.strm.output.set(n.window.subarray(n.block_start,n.block_start+i),n.strm.next_out),n.strm.next_out+=i,n.strm.avail_out-=i,n.strm.total_out+=i,n.block_start+=i,r-=i),r&&(Nu(n.strm,n.strm.output,n.strm.next_out,r),n.strm.next_out+=r,n.strm.avail_out-=r,n.strm.total_out+=r)}while(a===0);return o-=n.strm.avail_in,o&&(o>=n.w_size?(n.matches=2,n.window.set(n.strm.input.subarray(n.strm.next_in-n.w_size,n.strm.next_in),0),n.strstart=n.w_size,n.insert=n.strstart):(n.window_size-n.strstart<=o&&(n.strstart-=n.w_size,n.window.set(n.window.subarray(n.w_size,n.w_size+n.strstart),0),n.matches<2&&n.matches++,n.insert>n.strstart&&(n.insert=n.strstart)),n.window.set(n.strm.input.subarray(n.strm.next_in-o,n.strm.next_in),n.strstart),n.strstart+=o,n.insert+=o>n.w_size-n.insert?n.w_size-n.insert:o),n.block_start=n.strstart),n.high_water<n.strstart&&(n.high_water=n.strstart),a?hs:t!==ni&&t!==Ln&&n.strm.avail_in===0&&n.strstart===n.block_start?cs:(s=n.window_size-n.strstart,n.strm.avail_in>s&&n.block_start>=n.w_size&&(n.block_start-=n.w_size,n.strstart-=n.w_size,n.window.set(n.window.subarray(n.w_size,n.w_size+n.strstart),0),n.matches<2&&n.matches++,s+=n.w_size,n.insert>n.strstart&&(n.insert=n.strstart)),s>n.strm.avail_in&&(s=n.strm.avail_in),s&&(Nu(n.strm,n.window,n.strstart,s),n.strstart+=s,n.insert+=s>n.w_size-n.insert?n.w_size-n.insert:s),n.high_water<n.strstart&&(n.high_water=n.strstart),s=n.bi_valid+42>>3,s=n.pending_buf_size-s>65535?65535:n.pending_buf_size-s,e=s>n.w_size?n.w_size:s,i=n.strstart-n.block_start,(i>=e||(i||t===Ln)&&t!==ni&&n.strm.avail_in===0&&i<=s)&&(r=i>s?s:i,a=t===Ln&&n.strm.avail_in===0&&r===i?1:0,ku(n,n.block_start,r,a),n.block_start+=r,On(n.strm)),a?Ni:gn)},Fu=(n,t)=>{let e,r;for(;;){if(n.lookahead<pr){if(us(n),n.lookahead<pr&&t===ni)return gn;if(n.lookahead===0)break}if(e=0,n.lookahead>=ae&&(n.ins_h=si(n,n.ins_h,n.window[n.strstart+ae-1]),e=n.prev[n.strstart&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=n.strstart),e!==0&&n.strstart-e<=n.w_size-pr&&(n.match_length=ym(n,e)),n.match_length>=ae)if(r=ei(n,n.strstart-n.match_start,n.match_length-ae),n.lookahead-=n.match_length,n.match_length<=n.max_lazy_match&&n.lookahead>=ae){n.match_length--;do n.strstart++,n.ins_h=si(n,n.ins_h,n.window[n.strstart+ae-1]),e=n.prev[n.strstart&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=n.strstart;while(--n.match_length!==0);n.strstart++}else n.strstart+=n.match_length,n.match_length=0,n.ins_h=n.window[n.strstart],n.ins_h=si(n,n.ins_h,n.window[n.strstart+1]);else r=ei(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++;if(r&&($n(n,!1),n.strm.avail_out===0))return gn}return n.insert=n.strstart<ae-1?n.strstart:ae-1,t===Ln?($n(n,!0),n.strm.avail_out===0?Ni:hs):n.sym_next&&($n(n,!1),n.strm.avail_out===0)?gn:cs},ds=(n,t)=>{let e,r,i;for(;;){if(n.lookahead<pr){if(us(n),n.lookahead<pr&&t===ni)return gn;if(n.lookahead===0)break}if(e=0,n.lookahead>=ae&&(n.ins_h=si(n,n.ins_h,n.window[n.strstart+ae-1]),e=n.prev[n.strstart&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=n.strstart),n.prev_length=n.match_length,n.prev_match=n.match_start,n.match_length=ae-1,e!==0&&n.prev_length<n.max_lazy_match&&n.strstart-e<=n.w_size-pr&&(n.match_length=ym(n,e),n.match_length<=5&&(n.strategy===vk||n.match_length===ae&&n.strstart-n.match_start>4096)&&(n.match_length=ae-1)),n.prev_length>=ae&&n.match_length<=n.prev_length){i=n.strstart+n.lookahead-ae,r=ei(n,n.strstart-1-n.prev_match,n.prev_length-ae),n.lookahead-=n.prev_length-1,n.prev_length-=2;do++n.strstart<=i&&(n.ins_h=si(n,n.ins_h,n.window[n.strstart+ae-1]),e=n.prev[n.strstart&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=n.strstart);while(--n.prev_length!==0);if(n.match_available=0,n.match_length=ae-1,n.strstart++,r&&($n(n,!1),n.strm.avail_out===0))return gn}else if(n.match_available){if(r=ei(n,0,n.window[n.strstart-1]),r&&$n(n,!1),n.strstart++,n.lookahead--,n.strm.avail_out===0)return gn}else n.match_available=1,n.strstart++,n.lookahead--}return n.match_available&&(r=ei(n,0,n.window[n.strstart-1]),n.match_available=0),n.insert=n.strstart<ae-1?n.strstart:ae-1,t===Ln?($n(n,!0),n.strm.avail_out===0?Ni:hs):n.sym_next&&($n(n,!1),n.strm.avail_out===0)?gn:cs},Mk=(n,t)=>{let e,r,i,s;const a=n.window;for(;;){if(n.lookahead<=ri){if(us(n),n.lookahead<=ri&&t===ni)return gn;if(n.lookahead===0)break}if(n.match_length=0,n.lookahead>=ae&&n.strstart>0&&(i=n.strstart-1,r=a[i],r===a[++i]&&r===a[++i]&&r===a[++i])){s=n.strstart+ri;do;while(r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&i<s);n.match_length=ri-(s-i),n.match_length>n.lookahead&&(n.match_length=n.lookahead)}if(n.match_length>=ae?(e=ei(n,1,n.match_length-ae),n.lookahead-=n.match_length,n.strstart+=n.match_length,n.match_length=0):(e=ei(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++),e&&($n(n,!1),n.strm.avail_out===0))return gn}return n.insert=0,t===Ln?($n(n,!0),n.strm.avail_out===0?Ni:hs):n.sym_next&&($n(n,!1),n.strm.avail_out===0)?gn:cs},Dk=(n,t)=>{let e;for(;;){if(n.lookahead===0&&(us(n),n.lookahead===0)){if(t===ni)return gn;break}if(n.match_length=0,e=ei(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++,e&&($n(n,!1),n.strm.avail_out===0))return gn}return n.insert=0,t===Ln?($n(n,!0),n.strm.avail_out===0?Ni:hs):n.sym_next&&($n(n,!1),n.strm.avail_out===0)?gn:cs};function gr(n,t,e,r,i){this.good_length=n,this.max_lazy=t,this.nice_length=e,this.max_chain=r,this.func=i}const ua=[new gr(0,0,0,0,_m),new gr(4,4,8,4,Fu),new gr(4,5,16,8,Fu),new gr(4,6,32,32,Fu),new gr(4,4,16,16,ds),new gr(8,16,32,32,ds),new gr(8,16,128,128,ds),new gr(8,32,128,256,ds),new gr(32,128,258,1024,ds),new gr(32,258,258,4096,ds)],Ik=n=>{n.window_size=2*n.w_size,ii(n.head),n.max_lazy_match=ua[n.level].max_lazy,n.good_match=ua[n.level].good_length,n.nice_match=ua[n.level].nice_length,n.max_chain_length=ua[n.level].max_chain,n.strstart=0,n.block_start=0,n.lookahead=0,n.insert=0,n.match_length=n.prev_length=ae-1,n.match_available=0,n.ins_h=0};function jk(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ml,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(Ak*2),this.dyn_dtree=new Uint16Array((2*Ek+1)*2),this.bl_tree=new Uint16Array((2*Pk+1)*2),ii(this.dyn_ltree),ii(this.dyn_dtree),ii(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(Ok+1),this.heap=new Uint16Array(2*Tu+1),ii(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*Tu+1),ii(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const da=n=>{if(!n)return 1;const t=n.state;return!t||t.strm!==n||t.status!==ls&&t.status!==Eu&&t.status!==Pu&&t.status!==Au&&t.status!==Ou&&t.status!==$u&&t.status!==$i&&t.status!==ca?1:0},bm=n=>{if(da(n))return Fi(n,fr);n.total_in=n.total_out=0,n.data_type=wk;const t=n.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap===2?Eu:t.wrap?ls:$i,n.adler=t.wrap===2?0:1,t.last_flush=-2,hk(t),sn},wm=n=>{const t=bm(n);return t===sn&&Ik(n.state),t},Lk=(n,t)=>da(n)||n.state.wrap!==2?fr:(n.state.gzhead=t,sn),xm=(n,t,e,r,i,s)=>{if(!n)return fr;let a=1;if(t===mk&&(t=6),r<0?(a=0,r=-r):r>15&&(a=2,r-=16),i<1||i>xk||e!==ml||r<8||r>15||t<0||t>9||s<0||s>_k||r===8&&a!==1)return Fi(n,fr);r===8&&(r=9);const o=new jk;return n.state=o,o.strm=n,o.status=ls,o.wrap=a,o.gzhead=null,o.w_bits=r,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=i+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+ae-1)/ae),o.window=new Uint8Array(o.w_size*2),o.head=new Uint16Array(o.hash_size),o.prev=new Uint16Array(o.w_size),o.lit_bufsize=1<<i+6,o.pending_buf_size=o.lit_bufsize*4,o.pending_buf=new Uint8Array(o.pending_buf_size),o.sym_buf=o.lit_bufsize,o.sym_end=(o.lit_bufsize-1)*3,o.level=t,o.strategy=s,o.method=e,wm(n)},Uk=(n,t)=>xm(n,t,ml,Sk,kk,bk),Gk=(n,t)=>{if(da(n)||t>gm||t<0)return n?Fi(n,fr):fr;const e=n.state;if(!n.output||n.avail_in!==0&&!n.input||e.status===ca&&t!==Ln)return Fi(n,n.avail_out===0?Cu:fr);const r=e.last_flush;if(e.last_flush=t,e.pending!==0){if(On(n),n.avail_out===0)return e.last_flush=-1,sn}else if(n.avail_in===0&&vm(t)<=vm(r)&&t!==Ln)return Fi(n,Cu);if(e.status===ca&&n.avail_in!==0)return Fi(n,Cu);if(e.status===ls&&e.wrap===0&&(e.status=$i),e.status===ls){let i=ml+(e.w_bits-8<<4)<<8,s=-1;if(e.strategy>=gl||e.level<2?s=0:e.level<6?s=1:e.level===6?s=2:s=3,i|=s<<6,e.strstart!==0&&(i|=$k),i+=31-i%31,ha(e,i),e.strstart!==0&&(ha(e,n.adler>>>16),ha(e,n.adler&65535)),n.adler=1,e.status=$i,On(n),e.pending!==0)return e.last_flush=-1,sn}if(e.status===Eu){if(n.adler=0,pe(e,31),pe(e,139),pe(e,8),e.gzhead)pe(e,(e.gzhead.text?1:0)+(e.gzhead.hcrc?2:0)+(e.gzhead.extra?4:0)+(e.gzhead.name?8:0)+(e.gzhead.comment?16:0)),pe(e,e.gzhead.time&255),pe(e,e.gzhead.time>>8&255),pe(e,e.gzhead.time>>16&255),pe(e,e.gzhead.time>>24&255),pe(e,e.level===9?2:e.strategy>=gl||e.level<2?4:0),pe(e,e.gzhead.os&255),e.gzhead.extra&&e.gzhead.extra.length&&(pe(e,e.gzhead.extra.length&255),pe(e,e.gzhead.extra.length>>8&255)),e.gzhead.hcrc&&(n.adler=Qe(n.adler,e.pending_buf,e.pending,0)),e.gzindex=0,e.status=Pu;else if(pe(e,0),pe(e,0),pe(e,0),pe(e,0),pe(e,0),pe(e,e.level===9?2:e.strategy>=gl||e.level<2?4:0),pe(e,Nk),e.status=$i,On(n),e.pending!==0)return e.last_flush=-1,sn}if(e.status===Pu){if(e.gzhead.extra){let i=e.pending,s=(e.gzhead.extra.length&65535)-e.gzindex;for(;e.pending+s>e.pending_buf_size;){let o=e.pending_buf_size-e.pending;if(e.pending_buf.set(e.gzhead.extra.subarray(e.gzindex,e.gzindex+o),e.pending),e.pending=e.pending_buf_size,e.gzhead.hcrc&&e.pending>i&&(n.adler=Qe(n.adler,e.pending_buf,e.pending-i,i)),e.gzindex+=o,On(n),e.pending!==0)return e.last_flush=-1,sn;i=0,s-=o}let a=new Uint8Array(e.gzhead.extra);e.pending_buf.set(a.subarray(e.gzindex,e.gzindex+s),e.pending),e.pending+=s,e.gzhead.hcrc&&e.pending>i&&(n.adler=Qe(n.adler,e.pending_buf,e.pending-i,i)),e.gzindex=0}e.status=Au}if(e.status===Au){if(e.gzhead.name){let i=e.pending,s;do{if(e.pending===e.pending_buf_size){if(e.gzhead.hcrc&&e.pending>i&&(n.adler=Qe(n.adler,e.pending_buf,e.pending-i,i)),On(n),e.pending!==0)return e.last_flush=-1,sn;i=0}e.gzindex<e.gzhead.name.length?s=e.gzhead.name.charCodeAt(e.gzindex++)&255:s=0,pe(e,s)}while(s!==0);e.gzhead.hcrc&&e.pending>i&&(n.adler=Qe(n.adler,e.pending_buf,e.pending-i,i)),e.gzindex=0}e.status=Ou}if(e.status===Ou){if(e.gzhead.comment){let i=e.pending,s;do{if(e.pending===e.pending_buf_size){if(e.gzhead.hcrc&&e.pending>i&&(n.adler=Qe(n.adler,e.pending_buf,e.pending-i,i)),On(n),e.pending!==0)return e.last_flush=-1,sn;i=0}e.gzindex<e.gzhead.comment.length?s=e.gzhead.comment.charCodeAt(e.gzindex++)&255:s=0,pe(e,s)}while(s!==0);e.gzhead.hcrc&&e.pending>i&&(n.adler=Qe(n.adler,e.pending_buf,e.pending-i,i))}e.status=$u}if(e.status===$u){if(e.gzhead.hcrc){if(e.pending+2>e.pending_buf_size&&(On(n),e.pending!==0))return e.last_flush=-1,sn;pe(e,n.adler&255),pe(e,n.adler>>8&255),n.adler=0}if(e.status=$i,On(n),e.pending!==0)return e.last_flush=-1,sn}if(n.avail_in!==0||e.lookahead!==0||t!==ni&&e.status!==ca){let i=e.level===0?_m(e,t):e.strategy===gl?Dk(e,t):e.strategy===yk?Mk(e,t):ua[e.level].func(e,t);if((i===Ni||i===hs)&&(e.status=ca),i===gn||i===Ni)return n.avail_out===0&&(e.last_flush=-1),sn;if(i===cs&&(t===fk?dk(e):t!==gm&&(ku(e,0,0,!1),t===pk&&(ii(e.head),e.lookahead===0&&(e.strstart=0,e.block_start=0,e.insert=0))),On(n),n.avail_out===0))return e.last_flush=-1,sn}return t!==Ln?sn:e.wrap<=0?mm:(e.wrap===2?(pe(e,n.adler&255),pe(e,n.adler>>8&255),pe(e,n.adler>>16&255),pe(e,n.adler>>24&255),pe(e,n.total_in&255),pe(e,n.total_in>>8&255),pe(e,n.total_in>>16&255),pe(e,n.total_in>>24&255)):(ha(e,n.adler>>>16),ha(e,n.adler&65535)),On(n),e.wrap>0&&(e.wrap=-e.wrap),e.pending!==0?sn:mm)},zk=n=>{if(da(n))return fr;const t=n.state.status;return n.state=null,t===$i?Fi(n,gk):sn},Vk=(n,t)=>{let e=t.length;if(da(n))return fr;const r=n.state,i=r.wrap;if(i===2||i===1&&r.status!==ls||r.lookahead)return fr;if(i===1&&(n.adler=la(n.adler,t,e,0)),r.wrap=0,e>=r.w_size){i===0&&(ii(r.head),r.strstart=0,r.block_start=0,r.insert=0);let l=new Uint8Array(r.w_size);l.set(t.subarray(e-r.w_size,e),0),t=l,e=r.w_size}const s=n.avail_in,a=n.next_in,o=n.input;for(n.avail_in=e,n.next_in=0,n.input=t,us(r);r.lookahead>=ae;){let l=r.strstart,c=r.lookahead-(ae-1);do r.ins_h=si(r,r.ins_h,r.window[l+ae-1]),r.prev[l&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=l,l++;while(--c);r.strstart=l,r.lookahead=ae-1,us(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=ae-1,r.match_available=0,n.next_in=a,n.input=o,n.avail_in=s,r.wrap=i,sn};var Bk=Uk,Hk=xm,qk=wm,Yk=bm,Kk=Lk,Xk=Gk,Jk=zk,Qk=Vk,Zk="pako deflate (from Nodeca project)",fa={deflateInit:Bk,deflateInit2:Hk,deflateReset:qk,deflateResetKeep:Yk,deflateSetHeader:Kk,deflate:Xk,deflateEnd:Jk,deflateSetDictionary:Qk,deflateInfo:Zk};const Wk=(n,t)=>Object.prototype.hasOwnProperty.call(n,t);var tC=function(n){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const e=t.shift();if(e){if(typeof e!="object")throw new TypeError(e+"must be non-object");for(const r in e)Wk(e,r)&&(n[r]=e[r])}}return n},eC=n=>{let t=0;for(let r=0,i=n.length;r<i;r++)t+=n[r].length;const e=new Uint8Array(t);for(let r=0,i=0,s=n.length;r<s;r++){let a=n[r];e.set(a,i),i+=a.length}return e},vl={assign:tC,flattenChunks:eC};let Sm=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{Sm=!1}const pa=new Uint8Array(256);for(let n=0;n<256;n++)pa[n]=n>=252?6:n>=248?5:n>=240?4:n>=224?3:n>=192?2:1;pa[254]=pa[254]=1;var nC=n=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(n);let t,e,r,i,s,a=n.length,o=0;for(i=0;i<a;i++)e=n.charCodeAt(i),(e&64512)===55296&&i+1<a&&(r=n.charCodeAt(i+1),(r&64512)===56320&&(e=65536+(e-55296<<10)+(r-56320),i++)),o+=e<128?1:e<2048?2:e<65536?3:4;for(t=new Uint8Array(o),s=0,i=0;s<o;i++)e=n.charCodeAt(i),(e&64512)===55296&&i+1<a&&(r=n.charCodeAt(i+1),(r&64512)===56320&&(e=65536+(e-55296<<10)+(r-56320),i++)),e<128?t[s++]=e:e<2048?(t[s++]=192|e>>>6,t[s++]=128|e&63):e<65536?(t[s++]=224|e>>>12,t[s++]=128|e>>>6&63,t[s++]=128|e&63):(t[s++]=240|e>>>18,t[s++]=128|e>>>12&63,t[s++]=128|e>>>6&63,t[s++]=128|e&63);return t};const rC=(n,t)=>{if(t<65534&&n.subarray&&Sm)return String.fromCharCode.apply(null,n.length===t?n:n.subarray(0,t));let e="";for(let r=0;r<t;r++)e+=String.fromCharCode(n[r]);return e};var iC=(n,t)=>{const e=t||n.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(n.subarray(0,t));let r,i;const s=new Array(e*2);for(i=0,r=0;r<e;){let a=n[r++];if(a<128){s[i++]=a;continue}let o=pa[a];if(o>4){s[i++]=65533,r+=o-1;continue}for(a&=o===2?31:o===3?15:7;o>1&&r<e;)a=a<<6|n[r++]&63,o--;if(o>1){s[i++]=65533;continue}a<65536?s[i++]=a:(a-=65536,s[i++]=55296|a>>10&1023,s[i++]=56320|a&1023)}return rC(s,i)},sC=(n,t)=>{t=t||n.length,t>n.length&&(t=n.length);let e=t-1;for(;e>=0&&(n[e]&192)===128;)e--;return e<0||e===0?t:e+pa[n[e]]>t?e:t},ga={string2buf:nC,buf2string:iC,utf8border:sC};function aC(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var km=aC;const Cm=Object.prototype.toString,{Z_NO_FLUSH:oC,Z_SYNC_FLUSH:lC,Z_FULL_FLUSH:cC,Z_FINISH:hC,Z_OK:yl,Z_STREAM_END:uC,Z_DEFAULT_COMPRESSION:dC,Z_DEFAULT_STRATEGY:fC,Z_DEFLATED:pC}=Oi;function ma(n){this.options=vl.assign({level:dC,method:pC,chunkSize:16384,windowBits:15,memLevel:8,strategy:fC},n||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new km,this.strm.avail_out=0;let e=fa.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(e!==yl)throw new Error(Ai[e]);if(t.header&&fa.deflateSetHeader(this.strm,t.header),t.dictionary){let r;if(typeof t.dictionary=="string"?r=ga.string2buf(t.dictionary):Cm.call(t.dictionary)==="[object ArrayBuffer]"?r=new Uint8Array(t.dictionary):r=t.dictionary,e=fa.deflateSetDictionary(this.strm,r),e!==yl)throw new Error(Ai[e]);this._dict_set=!0}}ma.prototype.push=function(n,t){const e=this.strm,r=this.options.chunkSize;let i,s;if(this.ended)return!1;for(t===~~t?s=t:s=t===!0?hC:oC,typeof n=="string"?e.input=ga.string2buf(n):Cm.call(n)==="[object ArrayBuffer]"?e.input=new Uint8Array(n):e.input=n,e.next_in=0,e.avail_in=e.input.length;;){if(e.avail_out===0&&(e.output=new Uint8Array(r),e.next_out=0,e.avail_out=r),(s===lC||s===cC)&&e.avail_out<=6){this.onData(e.output.subarray(0,e.next_out)),e.avail_out=0;continue}if(i=fa.deflate(e,s),i===uC)return e.next_out>0&&this.onData(e.output.subarray(0,e.next_out)),i=fa.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===yl;if(e.avail_out===0){this.onData(e.output);continue}if(s>0&&e.next_out>0){this.onData(e.output.subarray(0,e.next_out)),e.avail_out=0;continue}if(e.avail_in===0)break}return!0},ma.prototype.onData=function(n){this.chunks.push(n)},ma.prototype.onEnd=function(n){n===yl&&(this.result=vl.flattenChunks(this.chunks)),this.chunks=[],this.err=n,this.msg=this.strm.msg};function Ru(n,t){const e=new ma(t);if(e.push(n,!0),e.err)throw e.msg||Ai[e.err];return e.result}function gC(n,t){return t=t||{},t.raw=!0,Ru(n,t)}function mC(n,t){return t=t||{},t.gzip=!0,Ru(n,t)}var vC=ma,yC=Ru,_C=gC,bC=mC,wC=Oi,xC={Deflate:vC,deflate:yC,deflateRaw:_C,gzip:bC,constants:wC};const _l=16209,SC=16191;var kC=function(n,t){let e,r,i,s,a,o,l,c,h,f,d,u,p,v,_,x,b,m,k,O,T,F,R,L;const U=n.state;e=n.next_in,R=n.input,r=e+(n.avail_in-5),i=n.next_out,L=n.output,s=i-(t-n.avail_out),a=i+(n.avail_out-257),o=U.dmax,l=U.wsize,c=U.whave,h=U.wnext,f=U.window,d=U.hold,u=U.bits,p=U.lencode,v=U.distcode,_=(1<<U.lenbits)-1,x=(1<<U.distbits)-1;t:do{u<15&&(d+=R[e++]<<u,u+=8,d+=R[e++]<<u,u+=8),b=p[d&_];e:for(;;){if(m=b>>>24,d>>>=m,u-=m,m=b>>>16&255,m===0)L[i++]=b&65535;else if(m&16){k=b&65535,m&=15,m&&(u<m&&(d+=R[e++]<<u,u+=8),k+=d&(1<<m)-1,d>>>=m,u-=m),u<15&&(d+=R[e++]<<u,u+=8,d+=R[e++]<<u,u+=8),b=v[d&x];n:for(;;){if(m=b>>>24,d>>>=m,u-=m,m=b>>>16&255,m&16){if(O=b&65535,m&=15,u<m&&(d+=R[e++]<<u,u+=8,u<m&&(d+=R[e++]<<u,u+=8)),O+=d&(1<<m)-1,O>o){n.msg="invalid distance too far back",U.mode=_l;break t}if(d>>>=m,u-=m,m=i-s,O>m){if(m=O-m,m>c&&U.sane){n.msg="invalid distance too far back",U.mode=_l;break t}if(T=0,F=f,h===0){if(T+=l-m,m<k){k-=m;do L[i++]=f[T++];while(--m);T=i-O,F=L}}else if(h<m){if(T+=l+h-m,m-=h,m<k){k-=m;do L[i++]=f[T++];while(--m);if(T=0,h<k){m=h,k-=m;do L[i++]=f[T++];while(--m);T=i-O,F=L}}}else if(T+=h-m,m<k){k-=m;do L[i++]=f[T++];while(--m);T=i-O,F=L}for(;k>2;)L[i++]=F[T++],L[i++]=F[T++],L[i++]=F[T++],k-=3;k&&(L[i++]=F[T++],k>1&&(L[i++]=F[T++]))}else{T=i-O;do L[i++]=L[T++],L[i++]=L[T++],L[i++]=L[T++],k-=3;while(k>2);k&&(L[i++]=L[T++],k>1&&(L[i++]=L[T++]))}}else if(m&64){n.msg="invalid distance code",U.mode=_l;break t}else{b=v[(b&65535)+(d&(1<<m)-1)];continue n}break}}else if(m&64)if(m&32){U.mode=SC;break t}else{n.msg="invalid literal/length code",U.mode=_l;break t}else{b=p[(b&65535)+(d&(1<<m)-1)];continue e}break}}while(e<r&&i<a);k=u>>3,e-=k,u-=k<<3,d&=(1<<u)-1,n.next_in=e,n.next_out=i,n.avail_in=e<r?5+(r-e):5-(e-r),n.avail_out=i<a?257+(a-i):257-(i-a),U.hold=d,U.bits=u};const fs=15,Tm=852,Em=592,Pm=0,Mu=1,Am=2,CC=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),TC=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),EC=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),PC=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var va=(n,t,e,r,i,s,a,o)=>{const l=o.bits;let c=0,h=0,f=0,d=0,u=0,p=0,v=0,_=0,x=0,b=0,m,k,O,T,F,R=null,L;const U=new Uint16Array(fs+1),B=new Uint16Array(fs+1);let Y=null,tt,W,ct;for(c=0;c<=fs;c++)U[c]=0;for(h=0;h<r;h++)U[t[e+h]]++;for(u=l,d=fs;d>=1&&U[d]===0;d--);if(u>d&&(u=d),d===0)return i[s++]=1<<24|64<<16|0,i[s++]=1<<24|64<<16|0,o.bits=1,0;for(f=1;f<d&&U[f]===0;f++);for(u<f&&(u=f),_=1,c=1;c<=fs;c++)if(_<<=1,_-=U[c],_<0)return-1;if(_>0&&(n===Pm||d!==1))return-1;for(B[1]=0,c=1;c<fs;c++)B[c+1]=B[c]+U[c];for(h=0;h<r;h++)t[e+h]!==0&&(a[B[t[e+h]]++]=h);if(n===Pm?(R=Y=a,L=20):n===Mu?(R=CC,Y=TC,L=257):(R=EC,Y=PC,L=0),b=0,h=0,c=f,F=s,p=u,v=0,O=-1,x=1<<u,T=x-1,n===Mu&&x>Tm||n===Am&&x>Em)return 1;for(;;){tt=c-v,a[h]+1<L?(W=0,ct=a[h]):a[h]>=L?(W=Y[a[h]-L],ct=R[a[h]-L]):(W=96,ct=0),m=1<<c-v,k=1<<p,f=k;do k-=m,i[F+(b>>v)+k]=tt<<24|W<<16|ct|0;while(k!==0);for(m=1<<c-1;b&m;)m>>=1;if(m!==0?(b&=m-1,b+=m):b=0,h++,--U[c]===0){if(c===d)break;c=t[e+a[h]]}if(c>u&&(b&T)!==O){for(v===0&&(v=u),F+=f,p=c-v,_=1<<p;p+v<d&&(_-=U[p+v],!(_<=0));)p++,_<<=1;if(x+=1<<p,n===Mu&&x>Tm||n===Am&&x>Em)return 1;O=b&T,i[O]=u<<24|p<<16|F-s|0}}return b!==0&&(i[F+b]=c-v<<24|64<<16|0),o.bits=u,0};const AC=0,Om=1,$m=2,{Z_FINISH:Nm,Z_BLOCK:OC,Z_TREES:bl,Z_OK:Ri,Z_STREAM_END:$C,Z_NEED_DICT:NC,Z_STREAM_ERROR:Zn,Z_DATA_ERROR:Fm,Z_MEM_ERROR:Rm,Z_BUF_ERROR:FC,Z_DEFLATED:Mm}=Oi,wl=16180,Dm=16181,Im=16182,jm=16183,Lm=16184,Um=16185,Gm=16186,zm=16187,Vm=16188,Bm=16189,xl=16190,Fr=16191,Du=16192,Hm=16193,Iu=16194,qm=16195,Ym=16196,Km=16197,Xm=16198,Sl=16199,kl=16200,Jm=16201,Qm=16202,Zm=16203,Wm=16204,t1=16205,ju=16206,e1=16207,n1=16208,Pe=16209,r1=16210,i1=16211,RC=852,MC=592,DC=15,IC=DC,s1=n=>(n>>>24&255)+(n>>>8&65280)+((n&65280)<<8)+((n&255)<<24);function jC(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const Mi=n=>{if(!n)return 1;const t=n.state;return!t||t.strm!==n||t.mode<wl||t.mode>i1?1:0},a1=n=>{if(Mi(n))return Zn;const t=n.state;return n.total_in=n.total_out=t.total=0,n.msg="",t.wrap&&(n.adler=t.wrap&1),t.mode=wl,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(RC),t.distcode=t.distdyn=new Int32Array(MC),t.sane=1,t.back=-1,Ri},o1=n=>{if(Mi(n))return Zn;const t=n.state;return t.wsize=0,t.whave=0,t.wnext=0,a1(n)},l1=(n,t)=>{let e;if(Mi(n))return Zn;const r=n.state;return t<0?(e=0,t=-t):(e=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?Zn:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=e,r.wbits=t,o1(n))},c1=(n,t)=>{if(!n)return Zn;const e=new jC;n.state=e,e.strm=n,e.window=null,e.mode=wl;const r=l1(n,t);return r!==Ri&&(n.state=null),r},LC=n=>c1(n,IC);let h1=!0,Lu,Uu;const UC=n=>{if(h1){Lu=new Int32Array(512),Uu=new Int32Array(32);let t=0;for(;t<144;)n.lens[t++]=8;for(;t<256;)n.lens[t++]=9;for(;t<280;)n.lens[t++]=7;for(;t<288;)n.lens[t++]=8;for(va(Om,n.lens,0,288,Lu,0,n.work,{bits:9}),t=0;t<32;)n.lens[t++]=5;va($m,n.lens,0,32,Uu,0,n.work,{bits:5}),h1=!1}n.lencode=Lu,n.lenbits=9,n.distcode=Uu,n.distbits=5},u1=(n,t,e,r)=>{let i;const s=n.state;return s.window===null&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new Uint8Array(s.wsize)),r>=s.wsize?(s.window.set(t.subarray(e-s.wsize,e),0),s.wnext=0,s.whave=s.wsize):(i=s.wsize-s.wnext,i>r&&(i=r),s.window.set(t.subarray(e-r,e-r+i),s.wnext),r-=i,r?(s.window.set(t.subarray(e-r,e),0),s.wnext=r,s.whave=s.wsize):(s.wnext+=i,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=i))),0},GC=(n,t)=>{let e,r,i,s,a,o,l,c,h,f,d,u,p,v,_=0,x,b,m,k,O,T,F,R;const L=new Uint8Array(4);let U,B;const Y=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Mi(n)||!n.output||!n.input&&n.avail_in!==0)return Zn;e=n.state,e.mode===Fr&&(e.mode=Du),a=n.next_out,i=n.output,l=n.avail_out,s=n.next_in,r=n.input,o=n.avail_in,c=e.hold,h=e.bits,f=o,d=l,R=Ri;t:for(;;)switch(e.mode){case wl:if(e.wrap===0){e.mode=Du;break}for(;h<16;){if(o===0)break t;o--,c+=r[s++]<<h,h+=8}if(e.wrap&2&&c===35615){e.wbits===0&&(e.wbits=15),e.check=0,L[0]=c&255,L[1]=c>>>8&255,e.check=Qe(e.check,L,2,0),c=0,h=0,e.mode=Dm;break}if(e.head&&(e.head.done=!1),!(e.wrap&1)||(((c&255)<<8)+(c>>8))%31){n.msg="incorrect header check",e.mode=Pe;break}if((c&15)!==Mm){n.msg="unknown compression method",e.mode=Pe;break}if(c>>>=4,h-=4,F=(c&15)+8,e.wbits===0&&(e.wbits=F),F>15||F>e.wbits){n.msg="invalid window size",e.mode=Pe;break}e.dmax=1<<e.wbits,e.flags=0,n.adler=e.check=1,e.mode=c&512?Bm:Fr,c=0,h=0;break;case Dm:for(;h<16;){if(o===0)break t;o--,c+=r[s++]<<h,h+=8}if(e.flags=c,(e.flags&255)!==Mm){n.msg="unknown compression method",e.mode=Pe;break}if(e.flags&57344){n.msg="unknown header flags set",e.mode=Pe;break}e.head&&(e.head.text=c>>8&1),e.flags&512&&e.wrap&4&&(L[0]=c&255,L[1]=c>>>8&255,e.check=Qe(e.check,L,2,0)),c=0,h=0,e.mode=Im;case Im:for(;h<32;){if(o===0)break t;o--,c+=r[s++]<<h,h+=8}e.head&&(e.head.time=c),e.flags&512&&e.wrap&4&&(L[0]=c&255,L[1]=c>>>8&255,L[2]=c>>>16&255,L[3]=c>>>24&255,e.check=Qe(e.check,L,4,0)),c=0,h=0,e.mode=jm;case jm:for(;h<16;){if(o===0)break t;o--,c+=r[s++]<<h,h+=8}e.head&&(e.head.xflags=c&255,e.head.os=c>>8),e.flags&512&&e.wrap&4&&(L[0]=c&255,L[1]=c>>>8&255,e.check=Qe(e.check,L,2,0)),c=0,h=0,e.mode=Lm;case Lm:if(e.flags&1024){for(;h<16;){if(o===0)break t;o--,c+=r[s++]<<h,h+=8}e.length=c,e.head&&(e.head.extra_len=c),e.flags&512&&e.wrap&4&&(L[0]=c&255,L[1]=c>>>8&255,e.check=Qe(e.check,L,2,0)),c=0,h=0}else e.head&&(e.head.extra=null);e.mode=Um;case Um:if(e.flags&1024&&(u=e.length,u>o&&(u=o),u&&(e.head&&(F=e.head.extra_len-e.length,e.head.extra||(e.head.extra=new Uint8Array(e.head.extra_len)),e.head.extra.set(r.subarray(s,s+u),F)),e.flags&512&&e.wrap&4&&(e.check=Qe(e.check,r,u,s)),o-=u,s+=u,e.length-=u),e.length))break t;e.length=0,e.mode=Gm;case Gm:if(e.flags&2048){if(o===0)break t;u=0;do F=r[s+u++],e.head&&F&&e.length<65536&&(e.head.name+=String.fromCharCode(F));while(F&&u<o);if(e.flags&512&&e.wrap&4&&(e.check=Qe(e.check,r,u,s)),o-=u,s+=u,F)break t}else e.head&&(e.head.name=null);e.length=0,e.mode=zm;case zm:if(e.flags&4096){if(o===0)break t;u=0;do F=r[s+u++],e.head&&F&&e.length<65536&&(e.head.comment+=String.fromCharCode(F));while(F&&u<o);if(e.flags&512&&e.wrap&4&&(e.check=Qe(e.check,r,u,s)),o-=u,s+=u,F)break t}else e.head&&(e.head.comment=null);e.mode=Vm;case Vm:if(e.flags&512){for(;h<16;){if(o===0)break t;o--,c+=r[s++]<<h,h+=8}if(e.wrap&4&&c!==(e.check&65535)){n.msg="header crc mismatch",e.mode=Pe;break}c=0,h=0}e.head&&(e.head.hcrc=e.flags>>9&1,e.head.done=!0),n.adler=e.check=0,e.mode=Fr;break;case Bm:for(;h<32;){if(o===0)break t;o--,c+=r[s++]<<h,h+=8}n.adler=e.check=s1(c),c=0,h=0,e.mode=xl;case xl:if(e.havedict===0)return n.next_out=a,n.avail_out=l,n.next_in=s,n.avail_in=o,e.hold=c,e.bits=h,NC;n.adler=e.check=1,e.mode=Fr;case Fr:if(t===OC||t===bl)break t;case Du:if(e.last){c>>>=h&7,h-=h&7,e.mode=ju;break}for(;h<3;){if(o===0)break t;o--,c+=r[s++]<<h,h+=8}switch(e.last=c&1,c>>>=1,h-=1,c&3){case 0:e.mode=Hm;break;case 1:if(UC(e),e.mode=Sl,t===bl){c>>>=2,h-=2;break t}break;case 2:e.mode=Ym;break;case 3:n.msg="invalid block type",e.mode=Pe}c>>>=2,h-=2;break;case Hm:for(c>>>=h&7,h-=h&7;h<32;){if(o===0)break t;o--,c+=r[s++]<<h,h+=8}if((c&65535)!==(c>>>16^65535)){n.msg="invalid stored block lengths",e.mode=Pe;break}if(e.length=c&65535,c=0,h=0,e.mode=Iu,t===bl)break t;case Iu:e.mode=qm;case qm:if(u=e.length,u){if(u>o&&(u=o),u>l&&(u=l),u===0)break t;i.set(r.subarray(s,s+u),a),o-=u,s+=u,l-=u,a+=u,e.length-=u;break}e.mode=Fr;break;case Ym:for(;h<14;){if(o===0)break t;o--,c+=r[s++]<<h,h+=8}if(e.nlen=(c&31)+257,c>>>=5,h-=5,e.ndist=(c&31)+1,c>>>=5,h-=5,e.ncode=(c&15)+4,c>>>=4,h-=4,e.nlen>286||e.ndist>30){n.msg="too many length or distance symbols",e.mode=Pe;break}e.have=0,e.mode=Km;case Km:for(;e.have<e.ncode;){for(;h<3;){if(o===0)break t;o--,c+=r[s++]<<h,h+=8}e.lens[Y[e.have++]]=c&7,c>>>=3,h-=3}for(;e.have<19;)e.lens[Y[e.have++]]=0;if(e.lencode=e.lendyn,e.lenbits=7,U={bits:e.lenbits},R=va(AC,e.lens,0,19,e.lencode,0,e.work,U),e.lenbits=U.bits,R){n.msg="invalid code lengths set",e.mode=Pe;break}e.have=0,e.mode=Xm;case Xm:for(;e.have<e.nlen+e.ndist;){for(;_=e.lencode[c&(1<<e.lenbits)-1],x=_>>>24,b=_>>>16&255,m=_&65535,!(x<=h);){if(o===0)break t;o--,c+=r[s++]<<h,h+=8}if(m<16)c>>>=x,h-=x,e.lens[e.have++]=m;else{if(m===16){for(B=x+2;h<B;){if(o===0)break t;o--,c+=r[s++]<<h,h+=8}if(c>>>=x,h-=x,e.have===0){n.msg="invalid bit length repeat",e.mode=Pe;break}F=e.lens[e.have-1],u=3+(c&3),c>>>=2,h-=2}else if(m===17){for(B=x+3;h<B;){if(o===0)break t;o--,c+=r[s++]<<h,h+=8}c>>>=x,h-=x,F=0,u=3+(c&7),c>>>=3,h-=3}else{for(B=x+7;h<B;){if(o===0)break t;o--,c+=r[s++]<<h,h+=8}c>>>=x,h-=x,F=0,u=11+(c&127),c>>>=7,h-=7}if(e.have+u>e.nlen+e.ndist){n.msg="invalid bit length repeat",e.mode=Pe;break}for(;u--;)e.lens[e.have++]=F}}if(e.mode===Pe)break;if(e.lens[256]===0){n.msg="invalid code -- missing end-of-block",e.mode=Pe;break}if(e.lenbits=9,U={bits:e.lenbits},R=va(Om,e.lens,0,e.nlen,e.lencode,0,e.work,U),e.lenbits=U.bits,R){n.msg="invalid literal/lengths set",e.mode=Pe;break}if(e.distbits=6,e.distcode=e.distdyn,U={bits:e.distbits},R=va($m,e.lens,e.nlen,e.ndist,e.distcode,0,e.work,U),e.distbits=U.bits,R){n.msg="invalid distances set",e.mode=Pe;break}if(e.mode=Sl,t===bl)break t;case Sl:e.mode=kl;case kl:if(o>=6&&l>=258){n.next_out=a,n.avail_out=l,n.next_in=s,n.avail_in=o,e.hold=c,e.bits=h,kC(n,d),a=n.next_out,i=n.output,l=n.avail_out,s=n.next_in,r=n.input,o=n.avail_in,c=e.hold,h=e.bits,e.mode===Fr&&(e.back=-1);break}for(e.back=0;_=e.lencode[c&(1<<e.lenbits)-1],x=_>>>24,b=_>>>16&255,m=_&65535,!(x<=h);){if(o===0)break t;o--,c+=r[s++]<<h,h+=8}if(b&&!(b&240)){for(k=x,O=b,T=m;_=e.lencode[T+((c&(1<<k+O)-1)>>k)],x=_>>>24,b=_>>>16&255,m=_&65535,!(k+x<=h);){if(o===0)break t;o--,c+=r[s++]<<h,h+=8}c>>>=k,h-=k,e.back+=k}if(c>>>=x,h-=x,e.back+=x,e.length=m,b===0){e.mode=t1;break}if(b&32){e.back=-1,e.mode=Fr;break}if(b&64){n.msg="invalid literal/length code",e.mode=Pe;break}e.extra=b&15,e.mode=Jm;case Jm:if(e.extra){for(B=e.extra;h<B;){if(o===0)break t;o--,c+=r[s++]<<h,h+=8}e.length+=c&(1<<e.extra)-1,c>>>=e.extra,h-=e.extra,e.back+=e.extra}e.was=e.length,e.mode=Qm;case Qm:for(;_=e.distcode[c&(1<<e.distbits)-1],x=_>>>24,b=_>>>16&255,m=_&65535,!(x<=h);){if(o===0)break t;o--,c+=r[s++]<<h,h+=8}if(!(b&240)){for(k=x,O=b,T=m;_=e.distcode[T+((c&(1<<k+O)-1)>>k)],x=_>>>24,b=_>>>16&255,m=_&65535,!(k+x<=h);){if(o===0)break t;o--,c+=r[s++]<<h,h+=8}c>>>=k,h-=k,e.back+=k}if(c>>>=x,h-=x,e.back+=x,b&64){n.msg="invalid distance code",e.mode=Pe;break}e.offset=m,e.extra=b&15,e.mode=Zm;case Zm:if(e.extra){for(B=e.extra;h<B;){if(o===0)break t;o--,c+=r[s++]<<h,h+=8}e.offset+=c&(1<<e.extra)-1,c>>>=e.extra,h-=e.extra,e.back+=e.extra}if(e.offset>e.dmax){n.msg="invalid distance too far back",e.mode=Pe;break}e.mode=Wm;case Wm:if(l===0)break t;if(u=d-l,e.offset>u){if(u=e.offset-u,u>e.whave&&e.sane){n.msg="invalid distance too far back",e.mode=Pe;break}u>e.wnext?(u-=e.wnext,p=e.wsize-u):p=e.wnext-u,u>e.length&&(u=e.length),v=e.window}else v=i,p=a-e.offset,u=e.length;u>l&&(u=l),l-=u,e.length-=u;do i[a++]=v[p++];while(--u);e.length===0&&(e.mode=kl);break;case t1:if(l===0)break t;i[a++]=e.length,l--,e.mode=kl;break;case ju:if(e.wrap){for(;h<32;){if(o===0)break t;o--,c|=r[s++]<<h,h+=8}if(d-=l,n.total_out+=d,e.total+=d,e.wrap&4&&d&&(n.adler=e.check=e.flags?Qe(e.check,i,d,a-d):la(e.check,i,d,a-d)),d=l,e.wrap&4&&(e.flags?c:s1(c))!==e.check){n.msg="incorrect data check",e.mode=Pe;break}c=0,h=0}e.mode=e1;case e1:if(e.wrap&&e.flags){for(;h<32;){if(o===0)break t;o--,c+=r[s++]<<h,h+=8}if(e.wrap&4&&c!==(e.total&4294967295)){n.msg="incorrect length check",e.mode=Pe;break}c=0,h=0}e.mode=n1;case n1:R=$C;break t;case Pe:R=Fm;break t;case r1:return Rm;case i1:default:return Zn}return n.next_out=a,n.avail_out=l,n.next_in=s,n.avail_in=o,e.hold=c,e.bits=h,(e.wsize||d!==n.avail_out&&e.mode<Pe&&(e.mode<ju||t!==Nm))&&u1(n,n.output,n.next_out,d-n.avail_out),f-=n.avail_in,d-=n.avail_out,n.total_in+=f,n.total_out+=d,e.total+=d,e.wrap&4&&d&&(n.adler=e.check=e.flags?Qe(e.check,i,d,n.next_out-d):la(e.check,i,d,n.next_out-d)),n.data_type=e.bits+(e.last?64:0)+(e.mode===Fr?128:0)+(e.mode===Sl||e.mode===Iu?256:0),(f===0&&d===0||t===Nm)&&R===Ri&&(R=FC),R},zC=n=>{if(Mi(n))return Zn;let t=n.state;return t.window&&(t.window=null),n.state=null,Ri},VC=(n,t)=>{if(Mi(n))return Zn;const e=n.state;return e.wrap&2?(e.head=t,t.done=!1,Ri):Zn},BC=(n,t)=>{const e=t.length;let r,i,s;return Mi(n)||(r=n.state,r.wrap!==0&&r.mode!==xl)?Zn:r.mode===xl&&(i=1,i=la(i,t,e,0),i!==r.check)?Fm:(s=u1(n,t,e,e),s?(r.mode=r1,Rm):(r.havedict=1,Ri))};var HC=o1,qC=l1,YC=a1,KC=LC,XC=c1,JC=GC,QC=zC,ZC=VC,WC=BC,t9="pako inflate (from Nodeca project)",Rr={inflateReset:HC,inflateReset2:qC,inflateResetKeep:YC,inflateInit:KC,inflateInit2:XC,inflate:JC,inflateEnd:QC,inflateGetHeader:ZC,inflateSetDictionary:WC,inflateInfo:t9};function e9(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var n9=e9;const d1=Object.prototype.toString,{Z_NO_FLUSH:r9,Z_FINISH:i9,Z_OK:ya,Z_STREAM_END:Gu,Z_NEED_DICT:zu,Z_STREAM_ERROR:s9,Z_DATA_ERROR:f1,Z_MEM_ERROR:a9}=Oi;function _a(n){this.options=vl.assign({chunkSize:1024*64,windowBits:15,to:""},n||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(n&&n.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new km,this.strm.avail_out=0;let e=Rr.inflateInit2(this.strm,t.windowBits);if(e!==ya)throw new Error(Ai[e]);if(this.header=new n9,Rr.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=ga.string2buf(t.dictionary):d1.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(e=Rr.inflateSetDictionary(this.strm,t.dictionary),e!==ya)))throw new Error(Ai[e])}_a.prototype.push=function(n,t){const e=this.strm,r=this.options.chunkSize,i=this.options.dictionary;let s,a,o;if(this.ended)return!1;for(t===~~t?a=t:a=t===!0?i9:r9,d1.call(n)==="[object ArrayBuffer]"?e.input=new Uint8Array(n):e.input=n,e.next_in=0,e.avail_in=e.input.length;;){for(e.avail_out===0&&(e.output=new Uint8Array(r),e.next_out=0,e.avail_out=r),s=Rr.inflate(e,a),s===zu&&i&&(s=Rr.inflateSetDictionary(e,i),s===ya?s=Rr.inflate(e,a):s===f1&&(s=zu));e.avail_in>0&&s===Gu&&e.state.wrap>0&&n[e.next_in]!==0;)Rr.inflateReset(e),s=Rr.inflate(e,a);switch(s){case s9:case f1:case zu:case a9:return this.onEnd(s),this.ended=!0,!1}if(o=e.avail_out,e.next_out&&(e.avail_out===0||s===Gu))if(this.options.to==="string"){let l=ga.utf8border(e.output,e.next_out),c=e.next_out-l,h=ga.buf2string(e.output,l);e.next_out=c,e.avail_out=r-c,c&&e.output.set(e.output.subarray(l,l+c),0),this.onData(h)}else this.onData(e.output.length===e.next_out?e.output:e.output.subarray(0,e.next_out));if(!(s===ya&&o===0)){if(s===Gu)return s=Rr.inflateEnd(this.strm),this.onEnd(s),this.ended=!0,!0;if(e.avail_in===0)break}}return!0},_a.prototype.onData=function(n){this.chunks.push(n)},_a.prototype.onEnd=function(n){n===ya&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=vl.flattenChunks(this.chunks)),this.chunks=[],this.err=n,this.msg=this.strm.msg};function Vu(n,t){const e=new _a(t);if(e.push(n),e.err)throw e.msg||Ai[e.err];return e.result}function o9(n,t){return t=t||{},t.raw=!0,Vu(n,t)}var l9=_a,c9=Vu,h9=o9,u9=Vu,d9=Oi,f9={Inflate:l9,inflate:c9,inflateRaw:h9,ungzip:u9,constants:d9};const{Deflate:p9,deflate:g9,deflateRaw:m9,gzip:v9}=xC,{Inflate:y9,inflate:_9,inflateRaw:b9,ungzip:w9}=f9;var x9=p9,S9=g9,k9=m9,C9=v9,T9=y9,E9=_9,P9=b9,A9=w9,O9=Oi,$9={Deflate:x9,deflate:S9,deflateRaw:k9,gzip:C9,Inflate:T9,inflate:E9,inflateRaw:P9,ungzip:A9,constants:O9};const _t={};_t.toRGBA8=function(n){const t=n.width,e=n.height;if(n.tabs.acTL===null)return[_t.toRGBA8.decodeImage(n.data,t,e,n).buffer];const r=[];n.frames[0].data===null&&(n.frames[0].data=n.data);const i=t*e*4,s=new Uint8Array(i),a=new Uint8Array(i),o=new Uint8Array(i);for(let l=0;l<n.frames.length;l++){const c=n.frames[l],h=c.rect.x,f=c.rect.y,d=c.rect.width,u=c.rect.height,p=_t.toRGBA8.decodeImage(c.data,d,u,n);if(l!==0)for(let v=0;v<i;v++)o[v]=s[v];if(c.blend===0?_t._copyTile(p,d,u,s,t,e,h,f,0):c.blend===1&&_t._copyTile(p,d,u,s,t,e,h,f,1),r.push(s.buffer.slice(0)),c.dispose===1)_t._copyTile(a,d,u,s,t,e,h,f,0);else if(c.dispose===2)for(let v=0;v<i;v++)s[v]=o[v]}return r},_t.toRGBA8.decodeImage=function(n,t,e,r){const i=t*e,s=_t.decode._getBPP(r),a=Math.ceil(t*s/8),o=new Uint8Array(i*4),l=new Uint32Array(o.buffer),c=r.ctype,h=r.depth,f=_t._bin.readUshort;if(c===6){const d=i<<2;if(h===8)for(let u=0;u<d;u+=4)o[u]=n[u],o[u+1]=n[u+1],o[u+2]=n[u+2],o[u+3]=n[u+3];if(h===16)for(let u=0;u<d;u++)o[u]=n[u<<1]}else if(c===2){const d=r.tabs.tRNS;if(d===null){if(h===8)for(let u=0;u<i;u++){const p=u*3;l[u]=255<<24|n[p+2]<<16|n[p+1]<<8|n[p]}if(h===16)for(let u=0;u<i;u++){const p=u*6;l[u]=255<<24|n[p+4]<<16|n[p+2]<<8|n[p]}}else{const u=d[0],p=d[1],v=d[2];if(h===8)for(let _=0;_<i;_++){const x=_<<2,b=_*3;l[_]=255<<24|n[b+2]<<16|n[b+1]<<8|n[b],n[b]===u&&n[b+1]===p&&n[b+2]===v&&(o[x+3]=0)}if(h===16)for(let _=0;_<i;_++){const x=_<<2,b=_*6;l[_]=255<<24|n[b+4]<<16|n[b+2]<<8|n[b],f(n,b)===u&&f(n,b+2)===p&&f(n,b+4)===v&&(o[x+3]=0)}}}else if(c===3){const d=r.tabs.PLTE,u=r.tabs.tRNS,p=u?u.length:0;if(h===1)for(let v=0;v<e;v++){const _=v*a,x=v*t;for(let b=0;b<t;b++){const m=x+b<<2,k=n[_+(b>>3)]>>7-((b&7)<<0)&1,O=3*k;o[m]=d[O],o[m+1]=d[O+1],o[m+2]=d[O+2],o[m+3]=k<p?u[k]:255}}if(h===2)for(let v=0;v<e;v++){const _=v*a,x=v*t;for(let b=0;b<t;b++){const m=x+b<<2,k=n[_+(b>>2)]>>6-((b&3)<<1)&3,O=3*k;o[m]=d[O],o[m+1]=d[O+1],o[m+2]=d[O+2],o[m+3]=k<p?u[k]:255}}if(h===4)for(let v=0;v<e;v++){const _=v*a,x=v*t;for(let b=0;b<t;b++){const m=x+b<<2,k=n[_+(b>>1)]>>4-((b&1)<<2)&15,O=3*k;o[m]=d[O],o[m+1]=d[O+1],o[m+2]=d[O+2],o[m+3]=k<p?u[k]:255}}if(h===8)for(let v=0;v<i;v++){const _=v<<2,x=n[v],b=3*x;o[_]=d[b],o[_+1]=d[b+1],o[_+2]=d[b+2],o[_+3]=x<p?u[x]:255}}else if(c===4){if(h===8)for(let d=0;d<i;d++){const u=d<<2,p=d<<1,v=n[p];o[u]=v,o[u+1]=v,o[u+2]=v,o[u+3]=n[p+1]}if(h===16)for(let d=0;d<i;d++){const u=d<<2,p=d<<2,v=n[p];o[u]=v,o[u+1]=v,o[u+2]=v,o[u+3]=n[p+2]}}else if(c===0){const d=r.tabs.tRNS?r.tabs.tRNS:-1;for(let u=0;u<e;u++){const p=u*a,v=u*t;if(h===1)for(let _=0;_<t;_++){const x=255*(n[p+(_>>>3)]>>>7-(_&7)&1),b=x===d*255?0:255;l[v+_]=b<<24|x<<16|x<<8|x}else if(h===2)for(let _=0;_<t;_++){const x=85*(n[p+(_>>>2)]>>>6-((_&3)<<1)&3),b=x===d*85?0:255;l[v+_]=b<<24|x<<16|x<<8|x}else if(h===4)for(let _=0;_<t;_++){const x=17*(n[p+(_>>>1)]>>>4-((_&1)<<2)&15),b=x===d*17?0:255;l[v+_]=b<<24|x<<16|x<<8|x}else if(h===8)for(let _=0;_<t;_++){const x=n[p+_],b=x===d?0:255;l[v+_]=b<<24|x<<16|x<<8|x}else if(h===16)for(let _=0;_<t;_++){const x=n[p+(_<<1)],b=f(n,p+(_<<1))===d?0:255;l[v+_]=b<<24|x<<16|x<<8|x}}}return o},_t.decode=function(n){const t=new Uint8Array(n);let e=8;const r=_t._bin,i=r.readUshort,s=r.readUint,a={tabs:{},frames:[]},o=new Uint8Array(t.length);let l=0,c,h=0;const f=[137,80,78,71,13,10,26,10];for(let d=0;d<8;d++)if(t[d]!==f[d])throw"The input is not a PNG file!";for(;e<t.length;){const d=r.readUint(t,e);e+=4;const u=r.readASCII(t,e,4);if(e+=4,u==="IHDR")_t.decode._IHDR(t,e,a);else if(u==="CgBI")a.tabs[u]=t.slice(e,e+4);else if(u==="IDAT"){for(let p=0;p<d;p++)o[l+p]=t[e+p];l+=d}else if(u==="acTL")a.tabs[u]={num_frames:s(t,e),num_plays:s(t,e+4)},c=new Uint8Array(t.length);else if(u==="fcTL"){if(h!==0){const x=a.frames[a.frames.length-1];x.data=_t.decode._decompress(a,c.slice(0,h),x.rect.width,x.rect.height),h=0}const p={x:s(t,e+12),y:s(t,e+16),width:s(t,e+4),height:s(t,e+8)};let v=i(t,e+22);v=i(t,e+20)/(v===0?100:v);const _={rect:p,delay:Math.round(v*1e3),dispose:t[e+24],blend:t[e+25]};a.frames.push(_)}else if(u==="fdAT"){for(let p=0;p<d-4;p++)c[h+p]=t[e+p+4];h+=d-4}else if(u==="pHYs")a.tabs[u]=[r.readUint(t,e),r.readUint(t,e+4),t[e+8]];else if(u==="cHRM"){a.tabs[u]=[];for(let p=0;p<8;p++)a.tabs[u].push(r.readUint(t,e+p*4))}else if(u==="tEXt"||u==="zTXt"){a.tabs[u]===null&&(a.tabs[u]={});const p=r.nextZero(t,e),v=r.readASCII(t,e,p-e);let _;const x=e+d-p-1;if(u==="tEXt")_=r.readASCII(t,p+1,x);else{const b=_t.decode._inflate(t.slice(p+2,p+2+x));_=r.readUTF8(b,0,b.length)}a.tabs[u][v]=_}else if(u==="iTXt"){a.tabs[u]==null&&(a.tabs[u]={});let p=0,v=e;p=r.nextZero(t,v);const _=r.readASCII(t,v,p-v);v=p+1;const x=t[v];v+=2,p=r.nextZero(t,v),v=p+1,p=r.nextZero(t,v),v=p+1;let b;const m=d-(v-e);if(x===0)b=r.readUTF8(t,v,m);else{const k=_t.decode._inflate(t.slice(v,v+m));b=r.readUTF8(k,0,k.length)}a.tabs[u][_]=b}else if(u==="PLTE")a.tabs[u]=r.readBytes(t,e,d);else if(u==="hIST"){const p=a.tabs.PLTE.length/3;a.tabs[u]=[];for(let v=0;v<p;v++)a.tabs[u].push(i(t,e+v*2))}else if(u==="tRNS")a.ctype===3?a.tabs[u]=r.readBytes(t,e,d):a.ctype===0?a.tabs[u]=i(t,e):a.ctype===2&&(a.tabs[u]=[i(t,e),i(t,e+2),i(t,e+4)]);else if(u==="gAMA")a.tabs[u]=r.readUint(t,e)/1e5;else if(u==="sRGB")a.tabs[u]=t[e];else if(u==="bKGD")a.ctype===0||a.ctype===4?a.tabs[u]=[i(t,e)]:a.ctype===2||a.ctype===6?a.tabs[u]=[i(t,e),i(t,e+2),i(t,e+4)]:a.ctype===3&&(a.tabs[u]=t[e]);else if(u==="IEND")break;e+=d,e+=4}if(h!==0){const d=a.frames[a.frames.length-1];d.data=_t.decode._decompress(a,c.slice(0,h),d.rect.width,d.rect.height),h=0}return a.data=_t.decode._decompress(a,o,a.width,a.height),delete a.compress,delete a.interlace,delete a.filter,a},_t.decode._decompress=function(n,t,e,r){const i=_t.decode._getBPP(n),s=Math.ceil(e*i/8),a=new Uint8Array((s+1+n.interlace)*r);return n.tabs.CgBI?t=_t.inflateRaw(t,a):t=_t.decode._inflate(t,a),n.interlace===0?t=_t.decode._filterZero(t,n,0,e,r):n.interlace===1&&(t=_t.decode._readInterlace(t,n)),t},_t.decode._inflate=function(n,t){return _t.inflateRaw(new Uint8Array(n.buffer,2,n.length-6),t)},_t.inflateRaw=function(){const n={};return n.H={},n.H.N=function(t,e){const r=Uint8Array;let i=0,s=0,a=0,o=0,l=0,c=0,h=0,f=0,d=0,u,p;if(t[0]===3&&t[1]===0)return e||new r(0);const v=n.H,_=v.b,x=v.e,b=v.R,m=v.n,k=v.A,O=v.Z,T=v.m,F=e===null;for(F&&(e=new r(t.length>>>2<<3));i===0;){if(i=_(t,d,1),s=_(t,d+1,2),d+=3,s===0){d&7&&(d+=8-(d&7));const R=(d>>>3)+4,L=t[R-4]|t[R-3]<<8;F&&(e=n.H.W(e,f+L)),e.set(new r(t.buffer,t.byteOffset+R,L),f),d=R+L<<3,f+=L;continue}if(F&&(e=n.H.W(e,f+(1<<17))),s===1&&(u=T.J,p=T.h,c=511,h=31),s===2){a=x(t,d,5)+257,o=x(t,d+5,5)+1,l=x(t,d+10,4)+4,d+=14;let R=1;for(let B=0;B<38;B+=2)T.Q[B]=0,T.Q[B+1]=0;for(let B=0;B<l;B++){const Y=x(t,d+B*3,3);T.Q[(T.X[B]<<1)+1]=Y,Y>R&&(R=Y)}d+=3*l,m(T.Q,R),k(T.Q,R,T.u),u=T.w,p=T.d,d=b(T.u,(1<<R)-1,a+o,t,d,T.v);const L=v.V(T.v,0,a,T.C);c=(1<<L)-1;const U=v.V(T.v,a,o,T.D);h=(1<<U)-1,m(T.C,L),k(T.C,L,u),m(T.D,U),k(T.D,U,p)}for(;;){const R=u[O(t,d)&c];d+=R&15;const L=R>>>4;if(!(L>>>8))e[f++]=L;else{if(L===256)break;{let U=f+L-254;if(L>264){const ct=T.q[L-257];U=f+(ct>>>3)+x(t,d,ct&7),d+=ct&7}const B=p[O(t,d)&h];d+=B&15;const Y=B>>>4,tt=T.c[Y],W=(tt>>>4)+_(t,d,tt&15);for(d+=tt&15;f<U;)e[f]=e[f++-W],e[f]=e[f++-W],e[f]=e[f++-W],e[f]=e[f++-W];f=U}}}}return e.length===f?e:e.slice(0,f)},n.H.W=function(t,e){const r=t.length;if(e<=r)return t;const i=new Uint8Array(r<<1);return i.set(t,0),i},n.H.R=function(t,e,r,i,s,a){const o=n.H.e,l=n.H.Z;let c=0;for(;c<r;){const h=t[l(i,s)&e];s+=h&15;const f=h>>>4;if(f<=15)a[c]=f,c++;else{let d=0,u=0;f===16?(u=3+o(i,s,2),s+=2,d=a[c-1]):f===17?(u=3+o(i,s,3),s+=3):f===18&&(u=11+o(i,s,7),s+=7);const p=c+u;for(;c<p;)a[c]=d,c++}}return s},n.H.V=function(t,e,r,i){let s=0,a=0;const o=i.length>>>1;for(;a<r;){const l=t[a+e];i[a<<1]=0,i[(a<<1)+1]=l,l>s&&(s=l),a++}for(;a<o;)i[a<<1]=0,i[(a<<1)+1]=0,a++;return s},n.H.n=function(t,e){const r=n.H.m,i=t.length;let s,a,o,l,c;const h=r.j;for(let d=0;d<=e;d++)h[d]=0;for(l=1;l<i;l+=2)h[t[l]]++;const f=r.K;for(s=0,h[0]=0,a=1;a<=e;a++)s=s+h[a-1]<<1,f[a]=s;for(o=0;o<i;o+=2)c=t[o+1],c!==0&&(t[o]=f[c],f[c]++)},n.H.A=function(t,e,r){const i=t.length,s=n.H.m.r;for(let a=0;a<i;a+=2)if(t[a+1]!==0){const o=a>>1,l=t[a+1],c=o<<4|l,h=e-l;let f=t[a]<<h;const d=f+(1<<h);for(;f!==d;){const u=s[f]>>>15-e;r[u]=c,f++}}},n.H.l=function(t,e){const r=n.H.m.r,i=15-e;for(let s=0;s<t.length;s+=2){const a=t[s]<<e-t[s+1];t[s]=r[a]>>>i}},n.H.M=function(t,e,r){r=r<<(e&7);const i=e>>>3;t[i]|=r,t[i+1]|=r>>>8},n.H.I=function(t,e,r){r=r<<(e&7);const i=e>>>3;t[i]|=r,t[i+1]|=r>>>8,t[i+2]|=r>>>16},n.H.e=function(t,e,r){return(t[e>>>3]|t[(e>>>3)+1]<<8)>>>(e&7)&(1<<r)-1},n.H.b=function(t,e,r){return(t[e>>>3]|t[(e>>>3)+1]<<8|t[(e>>>3)+2]<<16)>>>(e&7)&(1<<r)-1},n.H.Z=function(t,e){return(t[e>>>3]|t[(e>>>3)+1]<<8|t[(e>>>3)+2]<<16)>>>(e&7)},n.H.i=function(t,e){return(t[e>>>3]|t[(e>>>3)+1]<<8|t[(e>>>3)+2]<<16|t[(e>>>3)+3]<<24)>>>(e&7)},n.H.m=function(){const t=Uint16Array,e=Uint32Array;return{K:new t(16),j:new t(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new t(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new e(32),J:new t(512),_:[],h:new t(32),$:[],w:new t(32768),C:[],v:[],d:new t(32768),D:[],u:new t(512),Q:[],r:new t(32768),s:new e(286),Y:new e(30),a:new e(19),t:new e(15e3),k:new t(65536),g:new t(32768)}}(),function(){const t=n.H.m,e=32768;for(let i=0;i<e;i++){let s=i;s=(s&2863311530)>>>1|(s&1431655765)<<1,s=(s&3435973836)>>>2|(s&858993459)<<2,s=(s&4042322160)>>>4|(s&252645135)<<4,s=(s&4278255360)>>>8|(s&16711935)<<8,t.r[i]=(s>>>16|s<<16)>>>17}function r(i,s,a){for(;s--!==0;)i.push(0,a)}for(let i=0;i<32;i++)t.q[i]=t.S[i]<<3|t.T[i],t.c[i]=t.p[i]<<4|t.z[i];r(t._,144,8),r(t._,112,9),r(t._,24,7),r(t._,8,8),n.H.n(t._,9),n.H.A(t._,9,t.J),n.H.l(t._,9),r(t.$,32,5),n.H.n(t.$,5),n.H.A(t.$,5,t.h),n.H.l(t.$,5),r(t.Q,19,0),r(t.C,286,0),r(t.D,30,0),r(t.v,320,0)}(),n.H.N}(),_t.decode._readInterlace=function(n,t){const e=t.width,r=t.height,i=_t.decode._getBPP(t),s=i>>3,a=Math.ceil(e*i/8),o=new Uint8Array(r*a);let l=0;const c=[0,0,4,0,2,0,1],h=[0,4,0,2,0,1,0],f=[8,8,8,4,4,2,2],d=[8,8,4,4,2,2,1];let u=0;for(;u<7;){const p=f[u],v=d[u];let _=0,x=0,b=c[u];for(;b<r;)b+=p,x++;let m=h[u];for(;m<e;)m+=v,_++;const k=Math.ceil(_*i/8);_t.decode._filterZero(n,t,l,_,x);let O=0,T=c[u];for(;T<r;){let F=h[u],R=l+O*k<<3;for(;F<e;){if(i===1){let L=n[R>>3];L=L>>7-(R&7)&1,o[T*a+(F>>3)]|=L<<7-((F&7)<<0)}if(i===2){let L=n[R>>3];L=L>>6-(R&7)&3,o[T*a+(F>>2)]|=L<<6-((F&3)<<1)}if(i===4){let L=n[R>>3];L=L>>4-(R&7)&15,o[T*a+(F>>1)]|=L<<4-((F&1)<<2)}if(i>=8){const L=T*a+F*s;for(let U=0;U<s;U++)o[L+U]=n[(R>>3)+U]}R+=i,F+=v}O++,T+=p}_*x!==0&&(l+=x*(1+k)),u=u+1}return o},_t.decode._getBPP=function(n){return[1,null,3,1,2,null,4][n.ctype]*n.depth},_t.decode._filterZero=function(n,t,e,r,i){let s=_t.decode._getBPP(t);const a=Math.ceil(r*s/8),o=_t.decode._paeth;s=Math.ceil(s/8);let l=0,c=1,h=n[e],f=0;if(h>1&&(n[e]=[0,0,1][h-2]),h===3)for(f=s;f<a;f++)n[f+1]=n[f+1]+(n[f+1-s]>>>1)&255;for(let d=0;d<i;d++)if(l=e+d*a,c=l+d+1,h=n[c-1],f=0,h===0)for(;f<a;f++)n[l+f]=n[c+f];else if(h===1){for(;f<s;f++)n[l+f]=n[c+f];for(;f<a;f++)n[l+f]=n[c+f]+n[l+f-s]}else if(h===2)for(;f<a;f++)n[l+f]=n[c+f]+n[l+f-a];else if(h===3){for(;f<s;f++)n[l+f]=n[c+f]+(n[l+f-a]>>>1);for(;f<a;f++)n[l+f]=n[c+f]+(n[l+f-a]+n[l+f-s]>>>1)}else{for(;f<s;f++)n[l+f]=n[c+f]+o(0,n[l+f-a],0);for(;f<a;f++)n[l+f]=n[c+f]+o(n[l+f-s],n[l+f-a],n[l+f-s-a])}return n},_t.decode._paeth=function(n,t,e){const r=n+t-e,i=r-n,s=r-t,a=r-e;return i*i<=s*s&&i*i<=a*a?n:s*s<=a*a?t:e},_t.decode._IHDR=function(n,t,e){const r=_t._bin;e.width=r.readUint(n,t),t+=4,e.height=r.readUint(n,t),t+=4,e.depth=n[t],t++,e.ctype=n[t],t++,e.compress=n[t],t++,e.filter=n[t],t++,e.interlace=n[t],t++},_t._bin={nextZero:function(n,t){for(;n[t]!==0;)t++;return t},readUshort:function(n,t){return n[t]<<8|n[t+1]},writeUshort:function(n,t,e){n[t]=e>>8&255,n[t+1]=e&255},readUint:function(n,t){return n[t]*(256*256*256)+(n[t+1]<<16|n[t+2]<<8|n[t+3])},writeUint:function(n,t,e){n[t]=e>>24&255,n[t+1]=e>>16&255,n[t+2]=e>>8&255,n[t+3]=e&255},readASCII:function(n,t,e){let r="";for(let i=0;i<e;i++)r+=String.fromCharCode(n[t+i]);return r},writeASCII:function(n,t,e){for(let r=0;r<e.length;r++)n[t+r]=e.charCodeAt(r)},readBytes:function(n,t,e){const r=[];for(let i=0;i<e;i++)r.push(n[t+i]);return r},pad:function(n){return n.length<2?"0"+n:n},readUTF8:function(n,t,e){let r="",i;for(let s=0;s<e;s++)r+="%"+_t._bin.pad(n[t+s].toString(16));try{i=decodeURIComponent(r)}catch{return _t._bin.readASCII(n,t,e)}return i}},_t._copyTile=function(n,t,e,r,i,s,a,o,l){const c=Math.min(t,i),h=Math.min(e,s);let f=0,d=0;for(let u=0;u<h;u++)for(let p=0;p<c;p++)if(a>=0&&o>=0?(f=u*t+p<<2,d=(o+u)*i+a+p<<2):(f=(-o+u)*t-a+p<<2,d=u*i+p<<2),l===0)r[d]=n[f],r[d+1]=n[f+1],r[d+2]=n[f+2],r[d+3]=n[f+3];else if(l===1){const v=n[f+3]*.00392156862745098,_=n[f]*v,x=n[f+1]*v,b=n[f+2]*v,m=r[d+3]*(1/255),k=r[d]*m,O=r[d+1]*m,T=r[d+2]*m,F=1-v,R=v+m*F,L=R===0?0:1/R;r[d+3]=255*R,r[d+0]=(_+k*F)*L,r[d+1]=(x+O*F)*L,r[d+2]=(b+T*F)*L}else if(l===2){const v=n[f+3],_=n[f],x=n[f+1],b=n[f+2],m=r[d+3],k=r[d],O=r[d+1],T=r[d+2];v===m&&_===k&&x===O&&b===T?(r[d]=0,r[d+1]=0,r[d+2]=0,r[d+3]=0):(r[d]=_,r[d+1]=x,r[d+2]=b,r[d+3]=v)}else if(l===3){const v=n[f+3],_=n[f],x=n[f+1],b=n[f+2],m=r[d+3],k=r[d],O=r[d+1],T=r[d+2];if(v===m&&_===k&&x===O&&b===T)continue;if(v<220&&m>20)return!1}return!0},_t.encode=function(n,t,e,r,i,s,a){r===null&&(r=0),a===null&&(a=!1);const o=_t.encode.compress(n,t,e,r,[!1,!1,!1,0,a]);return _t.encode.compressPNG(o,-1),_t.encode._main(o,t,e,i,s)},_t.encodeLL=function(n,t,e,r,i,s,a,o){const l={ctype:0+(r===1?0:2)+(i===0?0:4),depth:s,frames:[]},c=(r+i)*s,h=c*t;for(let f=0;f<n.length;f++)l.frames.push({rect:{x:0,y:0,width:t,height:e},img:new Uint8Array(n[f]),blend:0,dispose:1,bpp:Math.ceil(c/8),bpl:Math.ceil(h/8)});return _t.encode.compressPNG(l,0,!0),_t.encode._main(l,t,e,a,o)},_t.encode._main=function(n,t,e,r,i){i||(i={});const s=_t.crc.crc,a=_t._bin.writeUint,o=_t._bin.writeUshort,l=_t._bin.writeASCII;let c=8;const h=n.frames.length>1;let f=!1,d=33+(h?20:0);if(i.sRGB!==null&&i.sRGB!==void 0&&(d+=13),i.pHYs!==null&&i.pHYs!==void 0&&(d+=21),n.ctype===3){const _=n.plte.length;for(let x=0;x<_;x++)n.plte[x]>>>24!==255&&(f=!0);d+=8+_*3+4+(f?8+_*1+4:0)}for(let _=0;_<n.frames.length;_++){const x=n.frames[_];h&&(d+=38),d+=x.cimg.length+12,_!==0&&(d+=4)}d+=12;const u=new Uint8Array(d),p=[137,80,78,71,13,10,26,10];for(let _=0;_<8;_++)u[_]=p[_];if(a(u,c,13),c+=4,l(u,c,"IHDR"),c+=4,a(u,c,t),c+=4,a(u,c,e),c+=4,u[c]=n.depth,c++,u[c]=n.ctype,c++,u[c]=0,c++,u[c]=0,c++,u[c]=0,c++,a(u,c,s(u,c-17,17)),c+=4,i.sRGB!==null&&i.sRGB!==void 0&&(a(u,c,1),c+=4,l(u,c,"sRGB"),c+=4,u[c]=i.sRGB,c++,a(u,c,s(u,c-5,5)),c+=4),i.pHYs!==null&&i.pHYs!==void 0&&(a(u,c,9),c+=4,l(u,c,"pHYs"),c+=4,a(u,c,i.pHYs[0]),c+=4,a(u,c,i.pHYs[1]),c+=4,u[c]=i.pHYs[2],c++,a(u,c,s(u,c-13,13)),c+=4),h&&(a(u,c,8),c+=4,l(u,c,"acTL"),c+=4,a(u,c,n.frames.length),c+=4,a(u,c,i.loop!=null?i.loop:0),c+=4,a(u,c,s(u,c-12,12)),c+=4),n.ctype===3){const _=n.plte.length;a(u,c,_*3),c+=4,l(u,c,"PLTE"),c+=4;for(let x=0;x<_;x++){const b=x*3,m=n.plte[x],k=m&255,O=m>>>8&255,T=m>>>16&255;u[c+b+0]=k,u[c+b+1]=O,u[c+b+2]=T}if(c+=_*3,a(u,c,s(u,c-_*3-4,_*3+4)),c+=4,f){a(u,c,_),c+=4,l(u,c,"tRNS"),c+=4;for(let x=0;x<_;x++)u[c+x]=n.plte[x]>>>24&255;c+=_,a(u,c,s(u,c-_-4,_+4)),c+=4}}let v=0;for(let _=0;_<n.frames.length;_++){const x=n.frames[_];h&&(a(u,c,26),c+=4,l(u,c,"fcTL"),c+=4,a(u,c,v++),c+=4,a(u,c,x.rect.width),c+=4,a(u,c,x.rect.height),c+=4,a(u,c,x.rect.x),c+=4,a(u,c,x.rect.y),c+=4,o(u,c,r[_]),c+=2,o(u,c,1e3),c+=2,u[c]=x.dispose,c++,u[c]=x.blend,c++,a(u,c,s(u,c-30,30)),c+=4);const b=x.cimg,m=b.length;a(u,c,m+(_===0?0:4)),c+=4;const k=c;l(u,c,_===0?"IDAT":"fdAT"),c+=4,_!==0&&(a(u,c,v++),c+=4),u.set(b,c),c+=m,a(u,c,s(u,k,c-k)),c+=4}return a(u,c,0),c+=4,l(u,c,"IEND"),c+=4,a(u,c,s(u,c-4,4)),c+=4,u.buffer},_t.encode.compressPNG=function(n,t,e){for(let r=0;r<n.frames.length;r++){const i=n.frames[r],s=i.rect.height,a=new Uint8Array(s*i.bpl+s);i.cimg=_t.encode._filterZero(i.img,s,i.bpp,i.bpl,a,t,e)}},_t.encode.compress=function(n,t,e,r,i){const s=i[0],a=i[1],o=i[2],l=i[3],c=i[4];let h=6,f=8,d=255;for(let m=0;m<n.length;m++){const k=new Uint8Array(n[m]),O=k.length;for(let T=0;T<O;T+=4)d&=k[T+3]}const u=d!==255,p=_t.encode.framize(n,t,e,s,a,o),v={},_=[],x=[];if(r!==0){const m=[];for(let R=0;R<p.length;R++)m.push(p[R].img.buffer);const k=_t.encode.concatRGBA(m),O=_t.quantize(k,r);let T=0;const F=new Uint8Array(O.abuf);for(let R=0;R<p.length;R++){const L=p[R].img,U=L.length;x.push(new Uint8Array(O.inds.buffer,T>>2,U>>2));for(let B=0;B<U;B+=4)L[B]=F[T+B],L[B+1]=F[T+B+1],L[B+2]=F[T+B+2],L[B+3]=F[T+B+3];T+=U}for(let R=0;R<O.plte.length;R++)_.push(O.plte[R].est.rgba)}else for(let m=0;m<p.length;m++){const k=p[m],O=new Uint32Array(k.img.buffer),T=k.rect.width,F=O.length,R=new Uint8Array(F);x.push(R);for(let L=0;L<F;L++){const U=O[L];if(L!==0&&U===O[L-1])R[L]=R[L-1];else if(L>T&&U===O[L-T])R[L]=R[L-T];else{let B=v[U];if(B===null&&(v[U]=B=_.length,_.push(U),_.length>=300))break;R[L]=B}}}const b=_.length;b<=256&&c===!1&&(b<=2?f=1:b<=4?f=2:b<=16?f=4:f=8,f=Math.max(f,l));for(let m=0;m<p.length;m++){const k=p[m],O=k.rect.width,T=k.rect.height;let F=k.img,R=4*O,L=4;if(b<=256&&c===!1){R=Math.ceil(f*O/8);const U=new Uint8Array(R*T),B=x[m];for(let Y=0;Y<T;Y++){const tt=Y*R,W=Y*O;if(f===8)for(let ct=0;ct<O;ct++)U[tt+ct]=B[W+ct];else if(f===4)for(let ct=0;ct<O;ct++)U[tt+(ct>>1)]|=B[W+ct]<<4-(ct&1)*4;else if(f===2)for(let ct=0;ct<O;ct++)U[tt+(ct>>2)]|=B[W+ct]<<6-(ct&3)*2;else if(f===1)for(let ct=0;ct<O;ct++)U[tt+(ct>>3)]|=B[W+ct]<<7-(ct&7)*1}F=U,h=3,L=1}else if(u===!1&&p.length===1){const U=new Uint8Array(O*T*3),B=O*T;for(let Y=0;Y<B;Y++){const tt=Y*3,W=Y*4;U[tt]=F[W],U[tt+1]=F[W+1],U[tt+2]=F[W+2]}F=U,h=2,L=3,R=3*O}k.img=F,k.bpl=R,k.bpp=L}return{ctype:h,depth:f,plte:_,frames:p}},_t.encode.framize=function(n,t,e,r,i,s){const a=[];for(let o=0;o<n.length;o++){const l=new Uint8Array(n[o]),c=new Uint32Array(l.buffer);let h,f=0,d=0,u=t,p=e,v=r?1:0;if(o!==0){const _=s||r||o===1||a[o-2].dispose!==0?1:2;let x=0,b=1e9;for(let k=0;k<_;k++){const O=new Uint32Array(n[o-1-k]);let T=t,F=e,R=-1,L=-1;for(let B=0;B<e;B++)for(let Y=0;Y<t;Y++){const tt=B*t+Y;c[tt]!==O[tt]&&(Y<T&&(T=Y),Y>R&&(R=Y),B<F&&(F=B),B>L&&(L=B))}R===-1&&(T=F=R=L=0),i&&((T&1)===1&&T--,(F&1)===1&&F--);const U=(R-T+1)*(L-F+1);U<b&&(b=U,x=k,f=T,d=F,u=R-T+1,p=L-F+1)}const m=new Uint8Array(n[o-1-x]);x===1&&(a[o-1].dispose=2),h=new Uint8Array(u*p*4),_t._copyTile(m,t,e,h,u,p,-f,-d,0),v=_t._copyTile(l,t,e,h,u,p,-f,-d,3)?1:0,v===1?_t.encode._prepareDiff(l,t,e,h,{x:f,y:d,width:u,height:p}):_t._copyTile(l,t,e,h,u,p,-f,-d,0)}else h=l.slice(0);a.push({rect:{x:f,y:d,width:u,height:p},img:h,blend:v,dispose:0})}if(r)for(let o=0;o<a.length;o++){const l=a[o];if(l.blend===1)continue;const c=l.rect,h=a[o-1].rect,f=Math.min(c.x,h.x),d=Math.min(c.y,h.y),u=Math.max(c.x+c.width,h.x+h.width),p=Math.max(c.y+c.height,h.y+h.height),v={x:f,y:d,width:u-f,height:p-d};a[o-1].dispose=1,o-1!==0&&_t.encode._updateFrame(n,t,e,a,o-1,v,i),_t.encode._updateFrame(n,t,e,a,o,v,i)}return a},_t.encode._updateFrame=function(n,t,e,r,i,s,a){const o=Uint8Array,l=Uint32Array,c=new o(n[i-1]),h=new l(n[i-1]),f=i+1<n.length?new o(n[i+1]):null,d=new o(n[i]),u=new l(d.buffer);let p=t,v=e,_=-1,x=-1;for(let m=0;m<s.height;m++)for(let k=0;k<s.width;k++){const O=s.x+k,T=s.y+m,F=T*t+O,R=u[F];R===0||r[i-1].dispose===0&&h[F]===R&&(f===null||f[F*4+3]!==0)||(O<p&&(p=O),O>_&&(_=O),T<v&&(v=T),T>x&&(x=T))}_===-1&&(p=v=_=x=0),a&&((p&1)===1&&p--,(v&1)===1&&v--),s={x:p,y:v,width:_-p+1,height:x-v+1};const b=r[i];b.rect=s,b.blend=1,b.img=new Uint8Array(s.width*s.height*4),r[i-1].dispose===0?(_t._copyTile(c,t,e,b.img,s.width,s.height,-s.x,-s.y,0),_t.encode._prepareDiff(d,t,e,b.img,s)):_t._copyTile(d,t,e,b.img,s.width,s.height,-s.x,-s.y,0)},_t.encode._prepareDiff=function(n,t,e,r,i){_t._copyTile(n,t,e,r,i.width,i.height,-i.x,-i.y,2)},_t.encode._filterZero=function(n,t,e,r,i,s,a){const o=[];let l=[0,1,2,3,4];s!==-1?l=[s]:(t*r>5e5||e===1)&&(l=[0]);let c;a&&(c={level:0});const h=i.length>1e7&&qg!=null?qg:$9;for(let u=0;u<l.length;u++){for(let p=0;p<t;p++)_t.encode._filterLine(i,n,p,r,e,l[u]);o.push(h.deflate(i,c))}let f,d=1e9;for(let u=0;u<o.length;u++)o[u].length<d&&(f=u,d=o[u].length);return o[f]},_t.encode._filterLine=function(n,t,e,r,i,s){const a=e*r;let o=a+e;const l=_t.decode._paeth;if(n[o]=s,o++,s===0)if(r<500)for(let c=0;c<r;c++)n[o+c]=t[a+c];else n.set(new Uint8Array(t.buffer,a,r),o);else if(s===1){for(let c=0;c<i;c++)n[o+c]=t[a+c];for(let c=i;c<r;c++)n[o+c]=t[a+c]-t[a+c-i]+256&255}else if(e===0){for(let c=0;c<i;c++)n[o+c]=t[a+c];if(s===2)for(let c=i;c<r;c++)n[o+c]=t[a+c];if(s===3)for(let c=i;c<r;c++)n[o+c]=t[a+c]-(t[a+c-i]>>1)+256&255;if(s===4)for(let c=i;c<r;c++)n[o+c]=t[a+c]-l(t[a+c-i],0,0)+256&255}else{if(s===2)for(let c=0;c<r;c++)n[o+c]=t[a+c]+256-t[a+c-r]&255;if(s===3){for(let c=0;c<i;c++)n[o+c]=t[a+c]+256-(t[a+c-r]>>1)&255;for(let c=i;c<r;c++)n[o+c]=t[a+c]+256-(t[a+c-r]+t[a+c-i]>>1)&255}if(s===4){for(let c=0;c<i;c++)n[o+c]=t[a+c]+256-l(0,t[a+c-r],0)&255;for(let c=i;c<r;c++)n[o+c]=t[a+c]+256-l(t[a+c-i],t[a+c-r],t[a+c-i-r])&255}}},_t.crc={table:function(){const n=new Uint32Array(256);for(let t=0;t<256;t++){let e=t;for(let r=0;r<8;r++)e&1?e=3988292384^e>>>1:e=e>>>1;n[t]=e}return n}(),update:function(n,t,e,r){for(let i=0;i<r;i++)n=_t.crc.table[(n^t[e+i])&255]^n>>>8;return n},crc:function(n,t,e){return _t.crc.update(4294967295,n,t,e)^4294967295}},_t.quantize=function(n,t){const e=new Uint8Array(n),r=e.slice(0),i=new Uint32Array(r.buffer),s=_t.quantize.getKDtree(r,t),a=s[0],o=s[1],l=_t.quantize.planeDst,c=e,h=i,f=c.length,d=new Uint8Array(e.length>>2);let u;if(e.length<2e7)for(let p=0;p<f;p+=4){const v=c[p]*.00392156862745098,_=c[p+1]*(1/255),x=c[p+2]*(1/255),b=c[p+3]*(1/255);u=_t.quantize.getNearest(a,v,_,x,b),d[p>>2]=u.ind,h[p>>2]=u.est.rgba}else for(let p=0;p<f;p+=4){const v=c[p]*.00392156862745098,_=c[p+1]*(1/255),x=c[p+2]*(1/255),b=c[p+3]*(1/255);for(u=a;u.left;)u=l(u.est,v,_,x,b)<=0?u.left:u.right;d[p>>2]=u.ind,h[p>>2]=u.est.rgba}return{abuf:r.buffer,inds:d,plte:o}},_t.quantize.getKDtree=function(n,t,e){e===null&&(e=1e-4);const r=new Uint32Array(n.buffer),i={i0:0,i1:n.length,bst:null,est:null,tdst:0,left:null,right:null};i.bst=_t.quantize.stats(n,i.i0,i.i1),i.est=_t.quantize.estats(i.bst);const s=[i];for(;s.length<t;){let a=0,o=0;for(let d=0;d<s.length;d++)s[d].est.L>a&&(a=s[d].est.L,o=d);if(a<e)break;const l=s[o],c=_t.quantize.splitPixels(n,r,l.i0,l.i1,l.est.e,l.est.eMq255);if(l.i0>=c||l.i1<=c){l.est.L=0;continue}const h={i0:l.i0,i1:c,bst:null,est:null,tdst:0,left:null,right:null};h.bst=_t.quantize.stats(n,h.i0,h.i1),h.est=_t.quantize.estats(h.bst);const f={i0:c,i1:l.i1,bst:null,est:null,tdst:0,left:null,right:null};f.bst={R:[],m:[],N:l.bst.N-h.bst.N};for(let d=0;d<16;d++)f.bst.R[d]=l.bst.R[d]-h.bst.R[d];for(let d=0;d<4;d++)f.bst.m[d]=l.bst.m[d]-h.bst.m[d];f.est=_t.quantize.estats(f.bst),l.left=h,l.right=f,s[o]=h,s.push(f)}s.sort(function(a,o){return o.bst.N-a.bst.N});for(let a=0;a<s.length;a++)s[a].ind=a;return[i,s]},_t.quantize.getNearest=function(n,t,e,r,i){if(n.left==null)return n.tdst=_t.quantize.dist(n.est.q,t,e,r,i),n;const s=_t.quantize.planeDst(n.est,t,e,r,i);let a=n.left,o=n.right;s>0&&(a=n.right,o=n.left);const l=_t.quantize.getNearest(a,t,e,r,i);if(l.tdst<=s*s)return l;const c=_t.quantize.getNearest(o,t,e,r,i);return c.tdst<l.tdst?c:l},_t.quantize.planeDst=function(n,t,e,r,i){const s=n.e;return s[0]*t+s[1]*e+s[2]*r+s[3]*i-n.eMq},_t.quantize.dist=function(n,t,e,r,i){const s=t-n[0],a=e-n[1],o=r-n[2],l=i-n[3];return s*s+a*a+o*o+l*l},_t.quantize.splitPixels=function(n,t,e,r,i,s){const a=_t.quantize.vecDot;for(r-=4;e<r;){for(;a(n,e,i)<=s;)e+=4;for(;a(n,r,i)>s;)r-=4;if(e>=r)break;const o=t[e>>2];t[e>>2]=t[r>>2],t[r>>2]=o,e+=4,r-=4}for(;a(n,e,i)>s;)e-=4;return e+4},_t.quantize.vecDot=function(n,t,e){return n[t]*e[0]+n[t+1]*e[1]+n[t+2]*e[2]+n[t+3]*e[3]},_t.quantize.stats=function(n,t,e){const r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],i=[0,0,0,0],s=e-t>>2;for(let a=t;a<e;a+=4){const o=n[a]*.00392156862745098,l=n[a+1]*(1/255),c=n[a+2]*(1/255),h=n[a+3]*(1/255);i[0]+=o,i[1]+=l,i[2]+=c,i[3]+=h,r[0]+=o*o,r[1]+=o*l,r[2]+=o*c,r[3]+=o*h,r[5]+=l*l,r[6]+=l*c,r[7]+=l*h,r[10]+=c*c,r[11]+=c*h,r[15]+=h*h}return r[4]=r[1],r[8]=r[2],r[9]=r[6],r[12]=r[3],r[13]=r[7],r[14]=r[11],{R:r,m:i,N:s}},_t.quantize.estats=function(n){const t=n.R,e=n.m,r=n.N,i=e[0],s=e[1],a=e[2],o=e[3],l=r===0?0:1/r,c=[t[0]-i*i*l,t[1]-i*s*l,t[2]-i*a*l,t[3]-i*o*l,t[4]-s*i*l,t[5]-s*s*l,t[6]-s*a*l,t[7]-s*o*l,t[8]-a*i*l,t[9]-a*s*l,t[10]-a*a*l,t[11]-a*o*l,t[12]-o*i*l,t[13]-o*s*l,t[14]-o*a*l,t[15]-o*o*l],h=c,f=_t.M4;let d=[Math.random(),Math.random(),Math.random(),Math.random()],u=0,p=0;if(r!==0)for(let x=0;x<16&&(d=f.multVec(h,d),p=Math.sqrt(f.dot(d,d)),d=f.sml(1/p,d),!(x!==0&&Math.abs(p-u)<1e-9));x++)u=p;const v=[i*l,s*l,a*l,o*l],_=f.dot(f.sml(255,v),d);return{Cov:c,q:v,e:d,L:u,eMq255:_,eMq:f.dot(d,v),rgba:(Math.round(255*v[3])<<24|Math.round(255*v[2])<<16|Math.round(255*v[1])<<8|Math.round(255*v[0])<<0)>>>0}},_t.M4={multVec:function(n,t){return[n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]*t[3],n[4]*t[0]+n[5]*t[1]+n[6]*t[2]+n[7]*t[3],n[8]*t[0]+n[9]*t[1]+n[10]*t[2]+n[11]*t[3],n[12]*t[0]+n[13]*t[1]+n[14]*t[2]+n[15]*t[3]]},dot:function(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]*t[3]},sml:function(n,t){return[n*t[0],n*t[1],n*t[2],n*t[3]]}},_t.encode.concatRGBA=function(n){let t=0;for(let i=0;i<n.length;i++)t+=n[i].byteLength;const e=new Uint8Array(t);let r=0;for(let i=0;i<n.length;i++){const s=new Uint8Array(n[i]),a=s.length;for(let o=0;o<a;o+=4){let l=s[o],c=s[o+1],h=s[o+2];const f=s[o+3];f===0&&(l=c=h=0),e[r+o]=l,e[r+o+1]=c,e[r+o+2]=h,e[r+o+3]=f}r+=a}return e.buffer};const mr={glog:function(n){if(n<1)throw new Error("glog("+n+")");return mr.LOG_TABLE[n]},gexp:function(n){for(;n<0;)n+=255;for(;n>=256;)n-=255;return mr.EXP_TABLE[n]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)};for(let n=0;n<8;n++)mr.EXP_TABLE[n]=1<<n;for(let n=8;n<256;n++)mr.EXP_TABLE[n]=mr.EXP_TABLE[n-4]^mr.EXP_TABLE[n-5]^mr.EXP_TABLE[n-6]^mr.EXP_TABLE[n-8];for(let n=0;n<255;n++)mr.LOG_TABLE[mr.EXP_TABLE[n]]=n;let ba;typeof self>"u"&&typeof process<"u"&&process.hrtime?ba=function(){const n=process.hrtime();return n[0]*1e3+n[1]/1e6}:typeof self<"u"&&self.performance!==void 0&&self.performance.now!==void 0?ba=self.performance.now.bind(self.performance):Date.now!==void 0?ba=Date.now:ba=function(){return new Date().getTime()};const N9=ba;let F9=class{constructor(){Et(this,"_tweens",{});Et(this,"_tweensAddedDuringUpdate",{})}getAll(){return Object.keys(this._tweens).map(n=>this._tweens[n])}removeAll(){this._tweens={}}add(n){this._tweens[n.getId()]=n,this._tweensAddedDuringUpdate[n.getId()]=n}remove(n){delete this._tweens[n.getId()],delete this._tweensAddedDuringUpdate[n.getId()]}update(n=N9(),t=!1){let e=Object.keys(this._tweens);if(e.length===0)return!1;for(;e.length>0;){this._tweensAddedDuringUpdate={};for(let r=0;r<e.length;r++){const i=this._tweens[e[r]],s=!t;i&&i.update(n,s)===!1&&!t&&delete this._tweens[e[r]]}e=Object.keys(this._tweensAddedDuringUpdate)}return!0}};const vr=new F9;vr.getAll.bind(vr),vr.removeAll.bind(vr),vr.add.bind(vr),vr.remove.bind(vr),vr.update.bind(vr);function p1(n){switch(n){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-in-out":return[.42,0,.58,1];case"ease-out":return[0,0,.58,1]}}const R9={attributeName:["display"],values:[["block","block"]]},wn={easeName:"linear",begin:0,dur:300,repeatCount:1,direction:"normal",fill:"freeze",keyTimes:[0,1]};class g1{constructor(){Et(this,"currentAnimateName");Et(this,"objects",[]);Et(this,"actions",[])}hasObjects(){return this.objects.length>0}fromDOM(t){return Array.isArray(t)||(t=[t]),this.objects=[],t.forEach(e=>{const r=$r(e);this.objects.push({width:parseFloat(r.css("width")),height:parseFloat(r.css("height")),dom:r,el:e,originCSSObject:r.css()})}),this}toCSS(t,...e){var s;if(!this.hasObjects())return;switch(this.currentAnimateName=t,this[t](...e),(s=this.objects[0].dom)==null||s.parent().css({position:"relative",perspective:"1000px",overflow:"hidden"}),t){default:this.objects.forEach((a,o)=>{var l;(l=a.dom)==null||l.css({position:"absolute","z-index":String(1e3+o),"transform-style":"preserve-3d","backface-visibility":"hidden"})});break}let r=0;const i=()=>{this.actions.forEach((a,o)=>{var p;const l=this.objects[a.objectIndex];let c=[],h=[];Array.isArray(a.attributeName)?(c=a.attributeName,h=a.values):a.attributeName&&(c=[a.attributeName],h=[a.values]);const f=a.keyTimes.length,d=al(((p=l.dom)==null?void 0:p.css("transform"))??"");let u=a.begin;a.keyTimes.forEach((v,_)=>{var b;const x={_matrix:d};c.forEach((m,k)=>{const O=h[k][a.direction=="reverse"?f-_-1:_];this._transformAttributeToCSSObjectUseMatrix(m,O,x)}),_==0?(b=l.dom)==null||b.css(Object.assign(x,{transition:""})):(setTimeout(()=>{var m;(m=l.dom)==null||m.css(Object.assign(x,{transition:`all ${a.realKeyTimes[_]}ms cubic-bezier(${a.keySplines[_-1].join(",")})`}))},u),u+=a.realKeyTimes[_])}),setTimeout(()=>{var v;a.fill==="remove"&&((v=l.dom)==null||v.css(l.originCSSObject??{})),o==this.actions.length-1&&(typeof a.repeatCount=="number"&&++r<a.repeatCount||a.repeatCount=="infinite")&&requestAnimationFrame(()=>{this.currentAnimateName===t&&i()})},a.begin+a.dur)})};i()}_transformAttributeToCSSObjectUseMatrix(t,e,r={}){switch(t){case"translateTo":r._matrix.translateTo(e[0]??0,e[1]??0);break;case"translate":r._matrix.translate(e[0]??0,e[1]??0);break;case"rotate":r._matrix.rotate(e??0);break;case"rotateXTo":r._matrix.rotateXTo(e??0);break;case"rotateYTo":r._matrix.rotateYTo(e??0);break;case"scaleTo":typeof e=="number"?r._matrix.scaleTo(e??1):r._matrix.scaleTo(e[0]??1,e[1]??1);break;case"scale":typeof e=="number"?r._matrix.scale(e??1):r._matrix.scale(e[0]??1,e[1]??1);break;case"scaleX":r._matrix.scale(e??1,1);break;case"scaleY":r._matrix.scale(1,e??1);break;default:Object.assign(r,{[t]:`${e??""}`});break}return Object.assign(r,{transform:r._matrix.toString()}),r}_addAction(t,e=!1){return this.actions=e?[]:this.actions,Array.isArray(t)||(t=[t]),t.forEach(r=>{this.actions.push(Object.assign(r,{realKeyTimes:r.keyTimes.map(i=>r.dur*i)}))}),this}_addAnimate(t=R9,e=wn,r=0,i=!1){const s=e.keyTimes??[0,1],a=[];return s.forEach((o,l)=>{l>0&&a.push(p1(e.easeName??"linear"))}),this._addAction({objectIndex:r,attributeName:t.attributeName,values:t.values,begin:e.begin??0,dur:e.dur??300,keyTimes:s,keySplines:a,repeatCount:e.repeatCount??1,direction:e.direction??"normal",fill:e.fill??"freeze"},i),this}_predefinedAnimate(t,e,r,i,s=wn,a=this.objects.length-1){let o=!0,l=!1,c=!1,h=!1;const f=this.objects.length;a=(a+f)%f;const d=(a-1+f)%f,u=(a+1+f)%f,p=this.objects[a],v=this.objects[d],_=this.objects[u];if(v&&d!==a){const x=t(v);x&&(this._addAnimate(x,s,d,o),o=!1,l=!0)}if(p){const x=e(p);x&&(this._addAnimate(x,s,a,o),o=!1,c=!0)}if(_&&u!==a){const x=r(_);x&&(this._addAnimate(x,s,u,o),o=!1,h=!0)}this.objects.forEach((x,b)=>{if(!(b==d&&l||b==a&&c||b==u&&h)){const m=i(x);m&&(this._addAnimate(m,s,b,o),o=!1)}})}flip(t=wn,e=this.objects.length-1){var p,v,_,x,b,m,k,O,T,F,R;const r=e-1,i=this.objects[r],s=this.objects[e],a=al(((p=s.dom)==null?void 0:p.css("transform"))??""),o=a.clone();(v=i.dom)==null||v.show(),(_=i.dom)==null||_.css("opacity","1");const l=(x=i.el)==null?void 0:x.getBoundingClientRect();(b=i.dom)==null||b.css("opacity","0"),(m=s.dom)==null||m.show(),(k=s.dom)==null||k.css("opacity","1");const c=(O=s.el)==null?void 0:O.getBoundingClientRect(),h=(T=i.dom)==null?void 0:T.css("background-color"),f=(F=s.dom)==null?void 0:F.css("background-color");o.translate(((l==null?void 0:l.left)??0)-((c==null?void 0:c.left)??0),((l==null?void 0:l.top)??0)-((c==null?void 0:c.top)??0)),o.scale(((l==null?void 0:l.width)??1)/((c==null?void 0:c.width)??1),((l==null?void 0:l.height)??1)/((c==null?void 0:c.height)??1));const d={transform:o.toString(),transition:""};h&&Object.assign(d,{"background-color":h}),(R=s.dom)==null||R.css(d);const u={transform:a.toString(),transition:`all ${t.dur}ms cubic-bezier(${p1(t.easeName??"linear").join(",")})`};f&&Object.assign(u,{"background-color":f}),setTimeout(()=>{var L;(L=s.dom)==null||L.css(u)},t.begin)}slideLeft(t=wn,e=this.objects.length-1){this._predefinedAnimate(r=>({attributeName:["translateTo"],values:[[[0,0],[-r.width,0]]]}),r=>({attributeName:["opacity","translateTo"],values:[[1,1],[[r.width,0],[0,0]]]}),r=>{},r=>({attributeName:["translateTo"],values:[[[-r.width,0],[-r.width,0]]]}),t,e)}slideRight(t=wn,e=this.objects.length-1){this._predefinedAnimate(r=>{},r=>({attributeName:["opacity","translateTo"],values:[[1,1],[[-r.width,0],[0,0]]]}),r=>({attributeName:["translateTo"],values:[[[0,0],[r.width,0]]]}),r=>({attributeName:["translateTo"],values:[[[r.width,0],[r.width,0]]]}),t,e)}slideDown(t=wn,e=this.objects.length-1){this._predefinedAnimate(r=>({attributeName:["translateTo"],values:[[[0,0],[0,r.height]]]}),r=>({attributeName:["opacity","translateTo"],values:[[1,1],[[0,-r.height],[0,0]]]}),r=>{},r=>({attributeName:["translateTo"],values:[[[0,r.height],[0,r.height]]]}),t,e)}slideUp(t=wn,e=this.objects.length-1){this._predefinedAnimate(r=>({attributeName:["translateTo"],values:[[[0,0],[0,-r.height]]]}),r=>({attributeName:["opacity","translateTo"],values:[[1,1],[[0,r.height],[0,0]]]}),r=>{},r=>({attributeName:["translateTo"],values:[[[0,-r.height],[0,-r.height]]]}),t,e)}flipLeft(t=wn,e=this.objects.length-1){this._predefinedAnimate(r=>({attributeName:["opacity","rotateYTo"],values:[[1,1],[0,180]]}),r=>({attributeName:["opacity","rotateYTo"],values:[[1,1],[-180,0]]}),r=>{},r=>({attributeName:["opacity"],values:[[0,0]]}),t,e)}flipRight(t=wn,e=this.objects.length-1){this._predefinedAnimate(r=>({attributeName:["opacity","rotateYTo"],values:[[1,1],[0,-180]]}),r=>({attributeName:["opacity","rotateYTo"],values:[[1,1],[180,0]]}),r=>{},r=>({attributeName:["opacity"],values:[[0,0]]}),t,e)}flipDown(t=wn,e=this.objects.length-1){this._predefinedAnimate(r=>({attributeName:["opacity","rotateXTo"],values:[[1,1],[0,-180]]}),r=>({attributeName:["opacity","rotateXTo"],values:[[1,1],[180,0]]}),r=>{},r=>({attributeName:["opacity"],values:[[0,0]]}),t,e)}flipUp(t=wn,e=this.objects.length-1){this._predefinedAnimate(r=>({attributeName:["opacity","rotateXTo"],values:[[1,1],[0,180]]}),r=>({attributeName:["opacity","rotateXTo"],values:[[1,1],[-180,0]]}),r=>{},r=>({attributeName:["opacity"],values:[[0,0]]}),t,e)}popIn(t=wn,e=this.objects.length-1){this._predefinedAnimate(r=>{},r=>({attributeName:["translateTo","scaleTo","opacity"],values:[[[0,0],[0,0]],[.8,1],[0,1]]}),r=>{},r=>({attributeName:["opacity"],values:[[0,0]]}),t,e)}popOut(t=wn,e=this.objects.length-1){this._predefinedAnimate(r=>{},r=>({attributeName:["translateTo","scaleTo","opacity"],values:[[[0,0],[0,0]],[1,1.2],[1,0]]}),r=>{},r=>({attributeName:["opacity"],values:[[0,0]]}),t,e)}rotate(t=wn,e=this.objects.length-1){Object.assign(t,{keyTimes:[0,1]});const r=t.degree??360;this._predefinedAnimate(i=>{},i=>({attributeName:["opacity","rotate"],values:[[1,1],[0,r]]}),i=>{},i=>({attributeName:["opacity"],values:[[0,0]]}),t,e)}}var m1=null;if(navigator.mozGetUserMedia)window.webrtcDetectedBrowser="firefox",window.webrtcDetectedVersion=parseInt(navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1],10),RTCSessionDescription=mozRTCSessionDescription,RTCIceCandidate=mozRTCIceCandidate,window.getUserMedia=navigator.mozGetUserMedia.bind(navigator),navigator.getUserMedia=m1,window.createIceServer=function(n,t,e){var r=null,i=n.split(":");if(i[0].indexOf("stun")===0)r={url:n};else if(i[0].indexOf("turn")===0){var s=n.split("?");(s.length===1||s[1].indexOf("transport=udp")===0)&&(r={url:s[0],credential:e,username:t})}return r},window.createIceServers=function(n,t,e){for(var r=[],i=0;i<n.length;i++){var s=createIceServer(n[i],t,e);s!==null&&r.push(s)}return r},window.attachMediaStream=function(n,t){n.mozSrcObject=t,n.play()},window.reattachMediaStream=function(n,t){n.mozSrcObject=t.mozSrcObject,n.play()};else if(navigator.webkitGetUserMedia){window.webrtcDetectedBrowser="chrome";var v1=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);v1!==null?window.webrtcDetectedVersion=parseInt(v1[2],10):window.webrtcDetectedVersion=999,window.createIceServer=function(n,t,e){var r=null,i=n.split(":");return i[0].indexOf("stun")===0?r={url:n}:i[0].indexOf("turn")===0&&(r={url:n,credential:e,username:t}),r},window.createIceServers=function(n,t,e){for(var r=[],i=0;i<n.length;i++){var s=createIceServer(n[i],t,e);s!==null&&r.push(s)}return r},window.getUserMedia=navigator.webkitGetUserMedia.bind(navigator),navigator.getUserMedia=m1,window.attachMediaStream=function(n,t){typeof n.srcObject<"u"?n.srcObject=t:typeof n.mozSrcObject<"u"?n.mozSrcObject=t:typeof n.src<"u"&&(n.src=URL.createObjectURL(t))},window.reattachMediaStream=function(n,t){n.src=t.src}}var Bu={exports:{}},wa={},Hu={},qu={};(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n._registerNode=n.Konva=n.glob=void 0;const t=Math.PI/180;function e(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}n.glob=typeof nu<"u"?nu:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},n.Konva={_global:n.glob,version:"9.2.2",isBrowser:e(),isUnminified:/param/.test((function(i){}).toString()),dblClickWindow:400,getAngle(i){return n.Konva.angleDeg?i*t:i},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,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return n.Konva.DD.isDragging},isDragReady(){return!!n.Konva.DD.node},releaseCanvasOnDestroy:!0,document:n.glob.document,_injectGlobal(i){n.glob.Konva=i}};const r=i=>{n.Konva[i.prototype.getClassName()]=i};n._registerNode=r,n.Konva._injectGlobal(n.Konva)})(qu);const M9=An(qu),D9=Mt({__proto__:null,default:M9},[qu]),ne=Dt(D9);var Yu={};(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.Util=n.Transform=void 0;const t=ne;class e{constructor(k=[1,0,0,1,0,0]){this.dirty=!1,this.m=k&&k.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 e(this.m)}copyInto(k){k.m[0]=this.m[0],k.m[1]=this.m[1],k.m[2]=this.m[2],k.m[3]=this.m[3],k.m[4]=this.m[4],k.m[5]=this.m[5]}point(k){var O=this.m;return{x:O[0]*k.x+O[2]*k.y+O[4],y:O[1]*k.x+O[3]*k.y+O[5]}}translate(k,O){return this.m[4]+=this.m[0]*k+this.m[2]*O,this.m[5]+=this.m[1]*k+this.m[3]*O,this}scale(k,O){return this.m[0]*=k,this.m[1]*=k,this.m[2]*=O,this.m[3]*=O,this}rotate(k){var O=Math.cos(k),T=Math.sin(k),F=this.m[0]*O+this.m[2]*T,R=this.m[1]*O+this.m[3]*T,L=this.m[0]*-T+this.m[2]*O,U=this.m[1]*-T+this.m[3]*O;return this.m[0]=F,this.m[1]=R,this.m[2]=L,this.m[3]=U,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(k,O){var T=this.m[0]+this.m[2]*O,F=this.m[1]+this.m[3]*O,R=this.m[2]+this.m[0]*k,L=this.m[3]+this.m[1]*k;return this.m[0]=T,this.m[1]=F,this.m[2]=R,this.m[3]=L,this}multiply(k){var O=this.m[0]*k.m[0]+this.m[2]*k.m[1],T=this.m[1]*k.m[0]+this.m[3]*k.m[1],F=this.m[0]*k.m[2]+this.m[2]*k.m[3],R=this.m[1]*k.m[2]+this.m[3]*k.m[3],L=this.m[0]*k.m[4]+this.m[2]*k.m[5]+this.m[4],U=this.m[1]*k.m[4]+this.m[3]*k.m[5]+this.m[5];return this.m[0]=O,this.m[1]=T,this.m[2]=F,this.m[3]=R,this.m[4]=L,this.m[5]=U,this}invert(){var k=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),O=this.m[3]*k,T=-this.m[1]*k,F=-this.m[2]*k,R=this.m[0]*k,L=k*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),U=k*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=O,this.m[1]=T,this.m[2]=F,this.m[3]=R,this.m[4]=L,this.m[5]=U,this}getMatrix(){return this.m}decompose(){var k=this.m[0],O=this.m[1],T=this.m[2],F=this.m[3],R=this.m[4],L=this.m[5],U=k*F-O*T;let B={x:R,y:L,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(k!=0||O!=0){var Y=Math.sqrt(k*k+O*O);B.rotation=O>0?Math.acos(k/Y):-Math.acos(k/Y),B.scaleX=Y,B.scaleY=U/Y,B.skewX=(k*T+O*F)/U,B.skewY=0}else if(T!=0||F!=0){var tt=Math.sqrt(T*T+F*F);B.rotation=Math.PI/2-(F>0?Math.acos(-T/tt):-Math.acos(T/tt)),B.scaleX=U/tt,B.scaleY=tt,B.skewX=0,B.skewY=(k*T+O*F)/U}return B.rotation=n.Util._getRotation(B.rotation),B}}n.Transform=e;var r="[object Array]",i="[object Number]",s="[object String]",a="[object Boolean]",o=Math.PI/180,l=180/Math.PI,c="#",h="",f="0",d="Konva warning: ",u="Konva error: ",p="rgb(",v={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]},_=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,x=[];const b=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(m){setTimeout(m,60)};n.Util={_isElement(m){return!!(m&&m.nodeType==1)},_isFunction(m){return!!(m&&m.constructor&&m.call&&m.apply)},_isPlainObject(m){return!!m&&m.constructor===Object},_isArray(m){return Object.prototype.toString.call(m)===r},_isNumber(m){return Object.prototype.toString.call(m)===i&&!isNaN(m)&&isFinite(m)},_isString(m){return Object.prototype.toString.call(m)===s},_isBoolean(m){return Object.prototype.toString.call(m)===a},isObject(m){return m instanceof Object},isValidSelector(m){if(typeof m!="string")return!1;var k=m[0];return k==="#"||k==="."||k===k.toUpperCase()},_sign(m){return m===0||m>0?1:-1},requestAnimFrame(m){x.push(m),x.length===1&&b(function(){const k=x;x=[],k.forEach(function(O){O()})})},createCanvasElement(){var m=document.createElement("canvas");try{m.style=m.style||{}}catch{}return m},createImageElement(){return document.createElement("img")},_isInDocument(m){for(;m=m.parentNode;)if(m==document)return!0;return!1},_urlToImage(m,k){var O=n.Util.createImageElement();O.onload=function(){k(O)},O.src=m},_rgbToHex(m,k,O){return((1<<24)+(m<<16)+(k<<8)+O).toString(16).slice(1)},_hexToRgb(m){m=m.replace(c,h);var k=parseInt(m,16);return{r:k>>16&255,g:k>>8&255,b:k&255}},getRandomColor(){for(var m=(Math.random()*16777215<<0).toString(16);m.length<6;)m=f+m;return c+m},getRGB(m){var k;return m in v?(k=v[m],{r:k[0],g:k[1],b:k[2]}):m[0]===c?this._hexToRgb(m.substring(1)):m.substr(0,4)===p?(k=_.exec(m.replace(/ /g,"")),{r:parseInt(k[1],10),g:parseInt(k[2],10),b:parseInt(k[3],10)}):{r:0,g:0,b:0}},colorToRGBA(m){return m=m||"black",n.Util._namedColorToRBA(m)||n.Util._hex3ColorToRGBA(m)||n.Util._hex4ColorToRGBA(m)||n.Util._hex6ColorToRGBA(m)||n.Util._hex8ColorToRGBA(m)||n.Util._rgbColorToRGBA(m)||n.Util._rgbaColorToRGBA(m)||n.Util._hslColorToRGBA(m)},_namedColorToRBA(m){var k=v[m.toLowerCase()];return k?{r:k[0],g:k[1],b:k[2],a:1}:null},_rgbColorToRGBA(m){if(m.indexOf("rgb(")===0){m=m.match(/rgb\(([^)]+)\)/)[1];var k=m.split(/ *, */).map(Number);return{r:k[0],g:k[1],b:k[2],a:1}}},_rgbaColorToRGBA(m){if(m.indexOf("rgba(")===0){m=m.match(/rgba\(([^)]+)\)/)[1];var k=m.split(/ *, */).map((O,T)=>O.slice(-1)==="%"?T===3?parseInt(O)/100:parseInt(O)/100*255:Number(O));return{r:k[0],g:k[1],b:k[2],a:k[3]}}},_hex8ColorToRGBA(m){if(m[0]==="#"&&m.length===9)return{r:parseInt(m.slice(1,3),16),g:parseInt(m.slice(3,5),16),b:parseInt(m.slice(5,7),16),a:parseInt(m.slice(7,9),16)/255}},_hex6ColorToRGBA(m){if(m[0]==="#"&&m.length===7)return{r:parseInt(m.slice(1,3),16),g:parseInt(m.slice(3,5),16),b:parseInt(m.slice(5,7),16),a:1}},_hex4ColorToRGBA(m){if(m[0]==="#"&&m.length===5)return{r:parseInt(m[1]+m[1],16),g:parseInt(m[2]+m[2],16),b:parseInt(m[3]+m[3],16),a:parseInt(m[4]+m[4],16)/255}},_hex3ColorToRGBA(m){if(m[0]==="#"&&m.length===4)return{r:parseInt(m[1]+m[1],16),g:parseInt(m[2]+m[2],16),b:parseInt(m[3]+m[3],16),a:1}},_hslColorToRGBA(m){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(m)){const[k,...O]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(m),T=Number(O[0])/360,F=Number(O[1])/100,R=Number(O[2])/100;let L,U,B;if(F===0)return B=R*255,{r:Math.round(B),g:Math.round(B),b:Math.round(B),a:1};R<.5?L=R*(1+F):L=R+F-R*F;const Y=2*R-L,tt=[0,0,0];for(let W=0;W<3;W++)U=T+1/3*-(W-1),U<0&&U++,U>1&&U--,6*U<1?B=Y+(L-Y)*6*U:2*U<1?B=L:3*U<2?B=Y+(L-Y)*(2/3-U)*6:B=Y,tt[W]=B*255;return{r:Math.round(tt[0]),g:Math.round(tt[1]),b:Math.round(tt[2]),a:1}}},haveIntersection(m,k){return!(k.x>m.x+m.width||k.x+k.width<m.x||k.y>m.y+m.height||k.y+k.height<m.y)},cloneObject(m){var k={};for(var O in m)this._isPlainObject(m[O])?k[O]=this.cloneObject(m[O]):this._isArray(m[O])?k[O]=this.cloneArray(m[O]):k[O]=m[O];return k},cloneArray(m){return m.slice(0)},degToRad(m){return m*o},radToDeg(m){return m*l},_degToRad(m){return n.Util.warn("Util._degToRad is removed. Please use public Util.degToRad instead."),n.Util.degToRad(m)},_radToDeg(m){return n.Util.warn("Util._radToDeg is removed. Please use public Util.radToDeg instead."),n.Util.radToDeg(m)},_getRotation(m){return t.Konva.angleDeg?n.Util.radToDeg(m):m},_capitalize(m){return m.charAt(0).toUpperCase()+m.slice(1)},throw(m){throw new Error(u+m)},error(m){console.error(u+m)},warn(m){t.Konva.showWarnings&&console.warn(d+m)},each(m,k){for(var O in m)k(O,m[O])},_inRange(m,k,O){return k<=m&&m<O},_getProjectionToSegment(m,k,O,T,F,R){var L,U,B,Y=(m-O)*(m-O)+(k-T)*(k-T);if(Y==0)L=m,U=k,B=(F-O)*(F-O)+(R-T)*(R-T);else{var tt=((F-m)*(O-m)+(R-k)*(T-k))/Y;tt<0?(L=m,U=k,B=(m-F)*(m-F)+(k-R)*(k-R)):tt>1?(L=O,U=T,B=(O-F)*(O-F)+(T-R)*(T-R)):(L=m+tt*(O-m),U=k+tt*(T-k),B=(L-F)*(L-F)+(U-R)*(U-R))}return[L,U,B]},_getProjectionToLine(m,k,O){var T=n.Util.cloneObject(m),F=Number.MAX_VALUE;return k.forEach(function(R,L){if(!(!O&&L===k.length-1)){var U=k[(L+1)%k.length],B=n.Util._getProjectionToSegment(R.x,R.y,U.x,U.y,m.x,m.y),Y=B[0],tt=B[1],W=B[2];W<F&&(T.x=Y,T.y=tt,F=W)}}),T},_prepareArrayForTween(m,k,O){var T,F=[],R=[];if(m.length>k.length){var L=k;k=m,m=L}for(T=0;T<m.length;T+=2)F.push({x:m[T],y:m[T+1]});for(T=0;T<k.length;T+=2)R.push({x:k[T],y:k[T+1]});var U=[];return R.forEach(function(B){var Y=n.Util._getProjectionToLine(B,F,O);U.push(Y.x),U.push(Y.y)}),U},_prepareToStringify(m){var k;m.visitedByCircularReferenceRemoval=!0;for(var O in m)if(m.hasOwnProperty(O)&&m[O]&&typeof m[O]=="object"){if(k=Object.getOwnPropertyDescriptor(m,O),m[O].visitedByCircularReferenceRemoval||n.Util._isElement(m[O]))if(k.configurable)delete m[O];else return null;else if(n.Util._prepareToStringify(m[O])===null)if(k.configurable)delete m[O];else return null}return delete m.visitedByCircularReferenceRemoval,m},_assign(m,k){for(var O in k)m[O]=k[O];return m},_getFirstPointerId(m){return m.touches?m.changedTouches[0].identifier:m.pointerId||999},releaseCanvas(...m){t.Konva.releaseCanvasOnDestroy&&m.forEach(k=>{k.width=0,k.height=0})},drawRoundedRectPath(m,k,O,T){let F=0,R=0,L=0,U=0;typeof T=="number"?F=R=L=U=Math.min(T,k/2,O/2):(F=Math.min(T[0]||0,k/2,O/2),R=Math.min(T[1]||0,k/2,O/2),U=Math.min(T[2]||0,k/2,O/2),L=Math.min(T[3]||0,k/2,O/2)),m.moveTo(F,0),m.lineTo(k-R,0),m.arc(k-R,R,R,Math.PI*3/2,0,!1),m.lineTo(k,O-U),m.arc(k-U,O-U,U,0,Math.PI/2,!1),m.lineTo(L,O),m.arc(L,O-L,L,Math.PI/2,Math.PI,!1),m.lineTo(0,F),m.arc(F,F,F,Math.PI,Math.PI*3/2,!1)}}})(Yu);const I9=An(Yu),j9=Mt({__proto__:null,default:I9},[Yu]),$e=Dt(j9);var xa={},Ku={},Ce={};Object.defineProperty(Ce,"__esModule",{value:!0});var y1=Ce.getComponentValidator=P1=Ce.getBooleanValidator=E1=Ce.getNumberArrayValidator=T1=Ce.getFunctionValidator=C1=Ce.getStringOrGradientValidator=k1=Ce.getStringValidator=S1=Ce.getNumberOrAutoValidator=x1=Ce.getNumberOrArrayOfNumbersValidator=w1=Ce.getNumberValidator=b1=Ce.alphaComponent=_1=Ce.RGBComponent=void 0;const Mr=ne,Ne=$e;function Dr(n){return Ne.Util._isString(n)?'"'+n+'"':Object.prototype.toString.call(n)==="[object Number]"||Ne.Util._isBoolean(n)?n:Object.prototype.toString.call(n)}function L9(n){return n>255?255:n<0?0:Math.round(n)}var _1=Ce.RGBComponent=L9;function U9(n){return n>1?1:n<1e-4?1e-4:n}var b1=Ce.alphaComponent=U9;function G9(){if(Mr.Konva.isUnminified)return function(n,t){return Ne.Util._isNumber(n)||Ne.Util.warn(Dr(n)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),n}}var w1=Ce.getNumberValidator=G9;function z9(n){if(Mr.Konva.isUnminified)return function(t,e){let r=Ne.Util._isNumber(t),i=Ne.Util._isArray(t)&&t.length==n;return!r&&!i&&Ne.Util.warn(Dr(t)+' is a not valid value for "'+e+'" attribute. The value should be a number or Array<number>('+n+")"),t}}var x1=Ce.getNumberOrArrayOfNumbersValidator=z9;function V9(){if(Mr.Konva.isUnminified)return function(n,t){var e=Ne.Util._isNumber(n),r=n==="auto";return e||r||Ne.Util.warn(Dr(n)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),n}}var S1=Ce.getNumberOrAutoValidator=V9;function B9(){if(Mr.Konva.isUnminified)return function(n,t){return Ne.Util._isString(n)||Ne.Util.warn(Dr(n)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),n}}var k1=Ce.getStringValidator=B9;function H9(){if(Mr.Konva.isUnminified)return function(n,t){const e=Ne.Util._isString(n),r=Object.prototype.toString.call(n)==="[object CanvasGradient]"||n&&n.addColorStop;return e||r||Ne.Util.warn(Dr(n)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),n}}var C1=Ce.getStringOrGradientValidator=H9;function q9(){if(Mr.Konva.isUnminified)return function(n,t){return Ne.Util._isFunction(n)||Ne.Util.warn(Dr(n)+' is a not valid value for "'+t+'" attribute. The value should be a function.'),n}}var T1=Ce.getFunctionValidator=q9;function Y9(){if(Mr.Konva.isUnminified)return function(n,t){const e=Int8Array?Object.getPrototypeOf(Int8Array):null;return e&&n instanceof e||(Ne.Util._isArray(n)?n.forEach(function(r){Ne.Util._isNumber(r)||Ne.Util.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):Ne.Util.warn(Dr(n)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),n}}var E1=Ce.getNumberArrayValidator=Y9;function K9(){if(Mr.Konva.isUnminified)return function(n,t){var e=n===!0||n===!1;return e||Ne.Util.warn(Dr(n)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),n}}var P1=Ce.getBooleanValidator=K9;function X9(n){if(Mr.Konva.isUnminified)return function(t,e){return t==null||Ne.Util.isObject(t)||Ne.Util.warn(Dr(t)+' is a not valid value for "'+e+'" attribute. The value should be an object with properties '+n),t}}y1=Ce.getComponentValidator=X9;const J9=Mt({__proto__:null,get RGBComponent(){return _1},get alphaComponent(){return b1},default:Ce,get getBooleanValidator(){return P1},get getComponentValidator(){return y1},get getFunctionValidator(){return T1},get getNumberArrayValidator(){return E1},get getNumberOrArrayOfNumbersValidator(){return x1},get getNumberOrAutoValidator(){return S1},get getNumberValidator(){return w1},get getStringOrGradientValidator(){return C1},get getStringValidator(){return k1}},[Ce]),re=Dt(J9);(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.Factory=void 0;const t=$e,e=re;var r="get",i="set";n.Factory={addGetterSetter(s,a,o,l,c){n.Factory.addGetter(s,a,o),n.Factory.addSetter(s,a,l,c),n.Factory.addOverloadedGetterSetter(s,a)},addGetter(s,a,o){var l=r+t.Util._capitalize(a);s.prototype[l]=s.prototype[l]||function(){var c=this.attrs[a];return c===void 0?o:c}},addSetter(s,a,o,l){var c=i+t.Util._capitalize(a);s.prototype[c]||n.Factory.overWriteSetter(s,a,o,l)},overWriteSetter(s,a,o,l){var c=i+t.Util._capitalize(a);s.prototype[c]=function(h){return o&&h!==void 0&&h!==null&&(h=o.call(this,h,a)),this._setAttr(a,h),l&&l.call(this),this}},addComponentsGetterSetter(s,a,o,l,c){var h=o.length,f=t.Util._capitalize,d=r+f(a),u=i+f(a),p,v;s.prototype[d]=function(){var x={};for(p=0;p<h;p++)v=o[p],x[v]=this.getAttr(a+f(v));return x};var _=(0,e.getComponentValidator)(o);s.prototype[u]=function(x){var b=this.attrs[a],m;l&&(x=l.call(this,x)),_&&_.call(this,x,a);for(m in x)x.hasOwnProperty(m)&&this._setAttr(a+f(m),x[m]);return x||o.forEach(k=>{this._setAttr(a+f(k),void 0)}),this._fireChangeEvent(a,b,x),c&&c.call(this),this},n.Factory.addOverloadedGetterSetter(s,a)},addOverloadedGetterSetter(s,a){var o=t.Util._capitalize(a),l=i+o,c=r+o;s.prototype[a]=function(){return arguments.length?(this[l](arguments[0]),this):this[c]()}},addDeprecatedGetterSetter(s,a,o,l){t.Util.error("Adding deprecated "+a);var c=r+t.Util._capitalize(a),h=a+" property is deprecated and will be removed soon. Look at Konva change log for more information.";s.prototype[c]=function(){t.Util.error(h);var f=this.attrs[a];return f===void 0?o:f},n.Factory.addSetter(s,a,l,function(){t.Util.error(h)}),n.Factory.addOverloadedGetterSetter(s,a)},backCompat(s,a){t.Util.each(a,function(o,l){var c=s.prototype[l],h=r+t.Util._capitalize(o),f=i+t.Util._capitalize(o);function d(){c.apply(this,arguments),t.Util.error('"'+o+'" method is deprecated and will be removed soon. Use ""'+l+'" instead.')}s.prototype[o]=d,s.prototype[h]=d,s.prototype[f]=d})},afterSetFilter(){this._filterUpToDate=!1}}})(Ku);const Q9=An(Ku),Z9=Mt({__proto__:null,default:Q9},[Ku]),ee=Dt(Z9);var Ir={},jr={};Object.defineProperty(jr,"__esModule",{value:!0});var A1=jr.HitContext=R1=jr.SceneContext=F1=jr.Context=void 0;const O1=$e,W9=ne;function tT(n){var t=[],e=n.length,r=O1.Util,i,s;for(i=0;i<e;i++)s=n[i],r._isNumber(s)?s=Math.round(s*1e3)/1e3:r._isString(s)||(s=s+""),t.push(s);return t}var $1=",",eT="(",nT=")",rT="([",iT="])",sT=";",aT="()",oT="=",N1=["arc","arcTo","beginPath","bezierCurveTo","clearRect","clip","closePath","createLinearGradient","createPattern","createRadialGradient","drawImage","ellipse","fill","fillText","getImageData","createImageData","lineTo","moveTo","putImageData","quadraticCurveTo","rect","restore","rotate","save","scale","setLineDash","setTransform","stroke","strokeText","transform","translate"],lT=["fillStyle","strokeStyle","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","letterSpacing","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","direction","font","textAlign","textBaseline","globalAlpha","globalCompositeOperation","imageSmoothingEnabled"];const cT=100;class Cl{constructor(t){this.canvas=t,W9.Konva.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,e){var r=this.traceArr,i=r.length,s="",a,o,l,c;for(a=0;a<i;a++)o=r[a],l=o.method,l?(c=o.args,s+=l,t?s+=aT:O1.Util._isArray(c[0])?s+=rT+c.join($1)+iT:(e&&(c=c.map(h=>typeof h=="number"?Math.floor(h):h)),s+=eT+c.join($1)+nT)):(s+=o.property,t||(s+=oT+o.val)),s+=sT;return s}clearTrace(){this.traceArr=[]}_trace(t){var e=this.traceArr,r;e.push(t),r=e.length,r>=cT&&e.shift()}reset(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){var e=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,e.getWidth()/e.pixelRatio,e.getHeight()/e.pixelRatio)}_applyLineCap(t){const e=t.attrs.lineCap;e&&this.setAttr("lineCap",e)}_applyOpacity(t){var e=t.getAbsoluteOpacity();e!==1&&this.setAttr("globalAlpha",e)}_applyLineJoin(t){const e=t.attrs.lineJoin;e&&this.setAttr("lineJoin",e)}setAttr(t,e){this._context[t]=e}arc(t,e,r,i,s,a){this._context.arc(t,e,r,i,s,a)}arcTo(t,e,r,i,s){this._context.arcTo(t,e,r,i,s)}beginPath(){this._context.beginPath()}bezierCurveTo(t,e,r,i,s,a){this._context.bezierCurveTo(t,e,r,i,s,a)}clearRect(t,e,r,i){this._context.clearRect(t,e,r,i)}clip(...t){this._context.clip.apply(this._context,t)}closePath(){this._context.closePath()}createImageData(t,e){var r=arguments;if(r.length===2)return this._context.createImageData(t,e);if(r.length===1)return this._context.createImageData(t)}createLinearGradient(t,e,r,i){return this._context.createLinearGradient(t,e,r,i)}createPattern(t,e){return this._context.createPattern(t,e)}createRadialGradient(t,e,r,i,s,a){return this._context.createRadialGradient(t,e,r,i,s,a)}drawImage(t,e,r,i,s,a,o,l,c){var h=arguments,f=this._context;h.length===3?f.drawImage(t,e,r):h.length===5?f.drawImage(t,e,r,i,s):h.length===9&&f.drawImage(t,e,r,i,s,a,o,l,c)}ellipse(t,e,r,i,s,a,o,l){this._context.ellipse(t,e,r,i,s,a,o,l)}isPointInPath(t,e,r,i){return r?this._context.isPointInPath(r,t,e,i):this._context.isPointInPath(t,e,i)}fill(...t){this._context.fill.apply(this._context,t)}fillRect(t,e,r,i){this._context.fillRect(t,e,r,i)}strokeRect(t,e,r,i){this._context.strokeRect(t,e,r,i)}fillText(t,e,r,i){i?this._context.fillText(t,e,r,i):this._context.fillText(t,e,r)}measureText(t){return this._context.measureText(t)}getImageData(t,e,r,i){return this._context.getImageData(t,e,r,i)}lineTo(t,e){this._context.lineTo(t,e)}moveTo(t,e){this._context.moveTo(t,e)}rect(t,e,r,i){this._context.rect(t,e,r,i)}putImageData(t,e,r){this._context.putImageData(t,e,r)}quadraticCurveTo(t,e,r,i){this._context.quadraticCurveTo(t,e,r,i)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,e){this._context.scale(t,e)}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,e,r,i,s,a){this._context.setTransform(t,e,r,i,s,a)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,e,r,i){this._context.strokeText(t,e,r,i)}transform(t,e,r,i,s,a){this._context.transform(t,e,r,i,s,a)}translate(t,e){this._context.translate(t,e)}_enableTrace(){var t=this,e=N1.length,r=this.setAttr,i,s,a=function(o){var l=t[o],c;t[o]=function(){return s=tT(Array.prototype.slice.call(arguments,0)),c=l.apply(t,arguments),t._trace({method:o,args:s}),c}};for(i=0;i<e;i++)a(N1[i]);t.setAttr=function(){r.apply(t,arguments);var o=arguments[0],l=arguments[1];(o==="shadowOffsetX"||o==="shadowOffsetY"||o==="shadowBlur")&&(l=l/this.canvas.getPixelRatio()),t._trace({property:o,val:l})}}_applyGlobalCompositeOperation(t){const e=t.attrs.globalCompositeOperation;var r=!e||e==="source-over";r||this.setAttr("globalCompositeOperation",e)}}var F1=jr.Context=Cl;lT.forEach(function(n){Object.defineProperty(Cl.prototype,n,{get(){return this._context[n]},set(t){this._context[n]=t}})});class hT extends Cl{constructor(t,{willReadFrequently:e=!1}={}){super(t),this._context=t._canvas.getContext("2d",{willReadFrequently:e})}_fillColor(t){var e=t.fill();this.setAttr("fillStyle",e),t._fillFunc(this)}_fillPattern(t){this.setAttr("fillStyle",t._getFillPattern()),t._fillFunc(this)}_fillLinearGradient(t){var e=t._getLinearGradient();e&&(this.setAttr("fillStyle",e),t._fillFunc(this))}_fillRadialGradient(t){const e=t._getRadialGradient();e&&(this.setAttr("fillStyle",e),t._fillFunc(this))}_fill(t){const e=t.fill(),r=t.getFillPriority();if(e&&r==="color"){this._fillColor(t);return}const i=t.getFillPatternImage();if(i&&r==="pattern"){this._fillPattern(t);return}const s=t.getFillLinearGradientColorStops();if(s&&r==="linear-gradient"){this._fillLinearGradient(t);return}const a=t.getFillRadialGradientColorStops();if(a&&r==="radial-gradient"){this._fillRadialGradient(t);return}e?this._fillColor(t):i?this._fillPattern(t):s?this._fillLinearGradient(t):a&&this._fillRadialGradient(t)}_strokeLinearGradient(t){const e=t.getStrokeLinearGradientStartPoint(),r=t.getStrokeLinearGradientEndPoint(),i=t.getStrokeLinearGradientColorStops(),s=this.createLinearGradient(e.x,e.y,r.x,r.y);if(i){for(var a=0;a<i.length;a+=2)s.addColorStop(i[a],i[a+1]);this.setAttr("strokeStyle",s)}}_stroke(t){var e=t.dash(),r=t.getStrokeScaleEnabled();if(t.hasStroke()){if(!r){this.save();var i=this.getCanvas().getPixelRatio();this.setTransform(i,0,0,i,0,0)}this._applyLineCap(t),e&&t.dashEnabled()&&(this.setLineDash(e),this.setAttr("lineDashOffset",t.dashOffset())),this.setAttr("lineWidth",t.strokeWidth()),t.getShadowForStrokeEnabled()||this.setAttr("shadowColor","rgba(0,0,0,0)");var s=t.getStrokeLinearGradientColorStops();s?this._strokeLinearGradient(t):this.setAttr("strokeStyle",t.stroke()),t._strokeFunc(this),r||this.restore()}}_applyShadow(t){var e,r,i,s=(e=t.getShadowRGBA())!==null&&e!==void 0?e:"black",a=(r=t.getShadowBlur())!==null&&r!==void 0?r:5,o=(i=t.getShadowOffset())!==null&&i!==void 0?i:{x:0,y:0},l=t.getAbsoluteScale(),c=this.canvas.getPixelRatio(),h=l.x*c,f=l.y*c;this.setAttr("shadowColor",s),this.setAttr("shadowBlur",a*Math.min(Math.abs(h),Math.abs(f))),this.setAttr("shadowOffsetX",o.x*h),this.setAttr("shadowOffsetY",o.y*f)}}var R1=jr.SceneContext=hT;class uT extends Cl{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 s=t.getStrokeScaleEnabled();if(!s){this.save();var e=this.getCanvas().getPixelRatio();this.setTransform(e,0,0,e,0,0)}this._applyLineCap(t);var r=t.hitStrokeWidth(),i=r==="auto"?t.strokeWidth():r;this.setAttr("lineWidth",i),this.setAttr("strokeStyle",t.colorKey),t._strokeFuncHit(this),s||this.restore()}}}A1=jr.HitContext=uT;const dT=Mt({__proto__:null,get Context(){return F1},get HitContext(){return A1},get SceneContext(){return R1},default:jr},[jr]),M1=Dt(dT);Object.defineProperty(Ir,"__esModule",{value:!0});var D1=Ir.HitCanvas=U1=Ir.SceneCanvas=L1=Ir.Canvas=void 0;const Tl=$e,I1=M1,j1=ne,fT=ee,pT=re;var El;function gT(){if(El)return El;var n=Tl.Util.createCanvasElement(),t=n.getContext("2d");return El=function(){var e=j1.Konva._global.devicePixelRatio||1,r=t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return e/r}(),Tl.Util.releaseCanvas(n),El}class Pl{constructor(t){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;var e=t||{},r=e.pixelRatio||j1.Konva.pixelRatio||gT();this.pixelRatio=r,this._canvas=Tl.Util.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){var e=this.pixelRatio;this.pixelRatio=t,this.setSize(this.getWidth()/e,this.getHeight()/e)}setWidth(t){this.width=this._canvas.width=t*this.pixelRatio,this._canvas.style.width=t+"px";var e=this.pixelRatio,r=this.getContext()._context;r.scale(e,e)}setHeight(t){this.height=this._canvas.height=t*this.pixelRatio,this._canvas.style.height=t+"px";var e=this.pixelRatio,r=this.getContext()._context;r.scale(e,e)}getWidth(){return this.width}getHeight(){return this.height}setSize(t,e){this.setWidth(t||0),this.setHeight(e||0)}toDataURL(t,e){try{return this._canvas.toDataURL(t,e)}catch{try{return this._canvas.toDataURL()}catch(r){return Tl.Util.error("Unable to get data URL. "+r.message+" For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html."),""}}}}var L1=Ir.Canvas=Pl;fT.Factory.addGetterSetter(Pl,"pixelRatio",void 0,(0,pT.getNumberValidator)());class mT extends Pl{constructor(t={width:0,height:0,willReadFrequently:!1}){super(t),this.context=new I1.SceneContext(this,{willReadFrequently:t.willReadFrequently}),this.setSize(t.width,t.height)}}var U1=Ir.SceneCanvas=mT;class vT extends Pl{constructor(t={width:0,height:0}){super(t),this.hitCanvas=!0,this.context=new I1.HitContext(this),this.setSize(t.width,t.height)}}D1=Ir.HitCanvas=vT;const yT=Mt({__proto__:null,get Canvas(){return L1},get HitCanvas(){return D1},get SceneCanvas(){return U1},default:Ir},[Ir]),Al=Dt(yT);var Xu={};(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.DD=void 0;const t=ne,e=$e;n.DD={get isDragging(){var r=!1;return n.DD._dragElements.forEach(i=>{i.dragStatus==="dragging"&&(r=!0)}),r},justDragged:!1,get node(){var r;return n.DD._dragElements.forEach(i=>{r=i.node}),r},_dragElements:new Map,_drag(r){const i=[];n.DD._dragElements.forEach((s,a)=>{const{node:o}=s,l=o.getStage();l.setPointersPositions(r),s.pointerId===void 0&&(s.pointerId=e.Util._getFirstPointerId(r));const c=l._changedPointerPositions.find(d=>d.id===s.pointerId);if(c){if(s.dragStatus!=="dragging"){var h=o.dragDistance(),f=Math.max(Math.abs(c.x-s.startPointerPos.x),Math.abs(c.y-s.startPointerPos.y));if(f<h||(o.startDrag({evt:r}),!o.isDragging()))return}o._setDragPosition(r,s),i.push(o)}}),i.forEach(s=>{s.fire("dragmove",{type:"dragmove",target:s,evt:r},!0)})},_endDragBefore(r){const i=[];n.DD._dragElements.forEach(s=>{const{node:a}=s,o=a.getStage();if(r&&o.setPointersPositions(r),!o._changedPointerPositions.find(c=>c.id===s.pointerId))return;(s.dragStatus==="dragging"||s.dragStatus==="stopped")&&(n.DD.justDragged=!0,t.Konva._mouseListenClick=!1,t.Konva._touchListenClick=!1,t.Konva._pointerListenClick=!1,s.dragStatus="stopped");const l=s.node.getLayer()||s.node instanceof t.Konva.Stage&&s.node;l&&i.indexOf(l)===-1&&i.push(l)}),i.forEach(s=>{s.draw()})},_endDragAfter(r){n.DD._dragElements.forEach((i,s)=>{i.dragStatus==="stopped"&&i.node.fire("dragend",{type:"dragend",target:i.node,evt:r},!0),i.dragStatus!=="dragging"&&n.DD._dragElements.delete(s)})}},t.Konva.isBrowser&&(window.addEventListener("mouseup",n.DD._endDragBefore,!0),window.addEventListener("touchend",n.DD._endDragBefore,!0),window.addEventListener("mousemove",n.DD._drag),window.addEventListener("touchmove",n.DD._drag),window.addEventListener("mouseup",n.DD._endDragAfter,!1),window.addEventListener("touchend",n.DD._endDragAfter,!1))})(Xu);const _T=An(Xu),bT=Mt({__proto__:null,default:_T},[Xu]),Ju=Dt(bT);Object.defineProperty(xa,"__esModule",{value:!0});var G1=xa.Node=void 0;const ie=$e,Sa=ee,Ol=Al,Di=ne,Un=Ju,je=re;var $l="absoluteOpacity",Nl="allEventListeners",Lr="absoluteTransform",z1="absoluteScale",Ii="canvas",wT="Change",xT="children",ST="konva",Qu="listening",V1="mouseenter",B1="mouseleave",H1="set",q1="Shape",Fl=" ",Y1="stage",ai="transform",kT="Stage",Zu="visible",CT=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(Fl);let TT=1,Qt=class jd{constructor(t){this._id=TT++,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===ai||t===Lr)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,e){var r=this._cache.get(t),i=t===ai||t===Lr,s=r===void 0||i&&r.dirty===!0;return s&&(r=e.call(this),this._cache.set(t,r)),r}_calculate(t,e,r){if(!this._attachedDepsListeners.get(t)){const i=e.map(s=>s+"Change.konva").join(Fl);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(Ii)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===Lr&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(Ii)){const{scene:t,filter:e,hit:r}=this._cache.get(Ii);ie.Util.releaseCanvas(t,e,r),this._cache.delete(Ii)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var e=t||{},r={};(e.x===void 0||e.y===void 0||e.width===void 0||e.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()||void 0}));var i=Math.ceil(e.width||r.width),s=Math.ceil(e.height||r.height),a=e.pixelRatio,o=e.x===void 0?Math.floor(r.x):e.x,l=e.y===void 0?Math.floor(r.y):e.y,c=e.offset||0,h=e.drawBorder||!1,f=e.hitCanvasPixelRatio||1;if(!i||!s){ie.Util.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}i+=c*2+1,s+=c*2+1,o-=c,l-=c;var d=new Ol.SceneCanvas({pixelRatio:a,width:i,height:s}),u=new Ol.SceneCanvas({pixelRatio:a,width:0,height:0,willReadFrequently:!0}),p=new Ol.HitCanvas({pixelRatio:f,width:i,height:s}),v=d.getContext(),_=p.getContext();return p.isCache=!0,d.isCache=!0,this._cache.delete(Ii),this._filterUpToDate=!1,e.imageSmoothingEnabled===!1&&(d.getContext()._context.imageSmoothingEnabled=!1,u.getContext()._context.imageSmoothingEnabled=!1),v.save(),_.save(),v.translate(-o,-l),_.translate(-o,-l),this._isUnderCache=!0,this._clearSelfAndDescendantCache($l),this._clearSelfAndDescendantCache(z1),this.drawScene(d,this),this.drawHit(p,this),this._isUnderCache=!1,v.restore(),_.restore(),h&&(v.save(),v.beginPath(),v.rect(0,0,i,s),v.closePath(),v.setAttr("strokeStyle","red"),v.setAttr("lineWidth",5),v.stroke(),v.restore()),this._cache.set(Ii,{scene:d,filter:u,hit:p,x:o,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(Ii)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,e){var r=[{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}],i=1/0,s=1/0,a=-1/0,o=-1/0,l=this.getAbsoluteTransform(e);return r.forEach(function(c){var h=l.point(c);i===void 0&&(i=a=h.x,s=o=h.y),i=Math.min(i,h.x),s=Math.min(s,h.y),a=Math.max(a,h.x),o=Math.max(o,h.y)}),{x:i,y:s,width:a-i,height:o-s}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const e=this._getCanvasCache();t.translate(e.x,e.y);var r=this._getCachedSceneCanvas(),i=r.pixelRatio;t.drawImage(r._canvas,0,0,r.width/i,r.height/i),t.restore()}_drawCachedHitCanvas(t){var e=this._getCanvasCache(),r=e.hit;t.save(),t.translate(e.x,e.y),t.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),t.restore()}_getCachedSceneCanvas(){var t=this.filters(),e=this._getCanvasCache(),r=e.scene,i=e.filter,s=i.getContext(),a,o,l,c;if(t){if(!this._filterUpToDate){var h=r.pixelRatio;i.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(a=t.length,s.clear(),s.drawImage(r._canvas,0,0,r.getWidth()/h,r.getHeight()/h),o=s.getImageData(0,0,i.getWidth(),i.getHeight()),l=0;l<a;l++){if(c=t[l],typeof c!="function"){ie.Util.error("Filter should be type of function, but got "+typeof c+" instead. Please check correct filters");continue}c.call(this,o),s.putImageData(o,0,0)}}catch(f){ie.Util.error("Unable to apply filter. "+f.message+" This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.")}this._filterUpToDate=!0}return i}return r}on(t,e){if(this._cache&&this._cache.delete(Nl),arguments.length===3)return this._delegate.apply(this,arguments);var r=t.split(Fl),i=r.length,s,a,o,l,c;for(s=0;s<i;s++)a=r[s],o=a.split("."),l=o[0],c=o[1]||"",this.eventListeners[l]||(this.eventListeners[l]=[]),this.eventListeners[l].push({name:c,handler:e});return this}off(t,e){var r=(t||"").split(Fl),i=r.length,s,a,o,l,c,h;if(this._cache&&this._cache.delete(Nl),!t)for(a in this.eventListeners)this._off(a);for(s=0;s<i;s++)if(o=r[s],l=o.split("."),c=l[0],h=l[1],c)this.eventListeners[c]&&this._off(c,h,e);else for(a in this.eventListeners)this._off(a,h,e);return this}dispatchEvent(t){var e={target:this,type:t.type,evt:t};return this.fire(t.type,e),this}addEventListener(t,e){return this.on(t,function(r){e.call(this,r.evt)}),this}removeEventListener(t){return this.off(t),this}_delegate(t,e,r){var i=this;this.on(t,function(s){for(var a=s.target.findAncestors(e,!0,i),o=0;o<a.length;o++)s=ie.Util.cloneObject(s),s.currentTarget=a[o],r.call(a[o],s)})}remove(){return this.isDragging()&&this.stopDrag(),Un.DD._dragElements.delete(this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(Lr),this._clearSelfAndDescendantCache($l),this._clearSelfAndDescendantCache(z1),this._clearSelfAndDescendantCache(Y1),this._clearSelfAndDescendantCache(Zu),this._clearSelfAndDescendantCache(Qu)}_remove(){this._clearCaches();var 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){var e="get"+ie.Util._capitalize(t);return ie.Util._isFunction(this[e])?this[e]():this.attrs[t]}getAncestors(){for(var t=this.getParent(),e=[];t;)e.push(t),t=t.getParent();return e}getAttrs(){return this.attrs||{}}setAttrs(t){return this._batchTransformChanges(()=>{var e,r;if(!t)return this;for(e in t)e!==xT&&(r=H1+ie.Util._capitalize(e),ie.Util._isFunction(this[r])?this[r](t[e]):this._setAttr(e,t[e]))}),this}isListening(){return this._getCache(Qu,this._isListening)}_isListening(t){if(!this.listening())return!1;const e=this.getParent();return e&&e!==t&&this!==t?e._isListening(t):!0}isVisible(){return this._getCache(Zu,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const e=this.getParent();return e&&e!==t&&this!==t?e._isVisible(t):!0}shouldDrawHit(t,e=!1){if(t)return this._isVisible(t)&&this._isListening(t);var r=this.getLayer(),i=!1;Un.DD._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===r)&&(i=!0)});var s=!e&&!Di.Konva.hitOnDragEnabled&&i;return this.isListening()&&this.isVisible()&&!s}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t=this.getDepth(),e=this,r=0,i,s,a,o;function l(h){for(i=[],s=h.length,a=0;a<s;a++)o=h[a],r++,o.nodeType!==q1&&(i=i.concat(o.getChildren().slice())),o._id===e._id&&(a=s);i.length>0&&i[0].getDepth()<=t&&l(i)}const c=this.getStage();return e.nodeType!==kT&&c&&l(c.getChildren()),r}getDepth(){for(var t=0,e=this.parent;e;)t++,e=e.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(ai),this._clearSelfAndDescendantCache(Lr)),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;var e=t.getPointerPosition();if(!e)return null;var r=this.getAbsoluteTransform().copy();return r.invert(),r.point(e)}getAbsolutePosition(t){let e=!1,r=this.parent;for(;r;){if(r.isCached()){e=!0;break}r=r.parent}e&&!t&&(t=!0);var i=this.getAbsoluteTransform(t).getMatrix(),s=new ie.Transform,a=this.offset();return s.m=i.slice(),s.translate(a.x,a.y),s.getTranslation()}setAbsolutePosition(t){const{x:e,y:r,...i}=this._clearTransform();this.attrs.x=e,this.attrs.y=r,this._clearCache(ai);var s=this._getAbsoluteTransform().copy();return s.invert(),s.translate(t.x,t.y),t={x:this.attrs.x+s.getTranslation().x,y:this.attrs.y+s.getTranslation().y},this._setTransform(i),this.setPosition({x:t.x,y:t.y}),this._clearCache(ai),this._clearSelfAndDescendantCache(Lr),this}_setTransform(t){var e;for(e in t)this.attrs[e]=t[e]}_clearTransform(){var 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){var e=t.x,r=t.y,i=this.x(),s=this.y();return e!==void 0&&(i+=e),r!==void 0&&(s+=r),this.setPosition({x:i,y:s}),this}_eachAncestorReverse(t,e){var r=[],i=this.getParent(),s,a;if(!(e&&e._id===this._id)){for(r.unshift(this);i&&(!e||i._id!==e._id);)r.unshift(i),i=i.parent;for(s=r.length,a=0;a<s;a++)t(r[a])}}rotate(t){return this.rotation(this.rotation()+t),this}moveToTop(){if(!this.parent)return ie.Util.warn("Node has no parent. moveToTop function is ignored."),!1;var t=this.index,e=this.parent.getChildren().length;return t<e-1?(this.parent.children.splice(t,1),this.parent.children.push(this),this.parent._setChildrenIndices(),!0):!1}moveUp(){if(!this.parent)return ie.Util.warn("Node has no parent. moveUp function is ignored."),!1;var t=this.index,e=this.parent.getChildren().length;return t<e-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 ie.Util.warn("Node has no parent. moveDown function is ignored."),!1;var 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 ie.Util.warn("Node has no parent. moveToBottom function is ignored."),!1;var 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 ie.Util.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&ie.Util.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)+".");var e=this.index;return this.parent.children.splice(e,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache($l,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),e=this.getParent();return e&&!e._isUnderCache&&(t*=e.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t={},e=this.getAttrs(),r,i,s,a,o;t.attrs={};for(r in e)i=e[r],o=ie.Util.isObject(i)&&!ie.Util._isPlainObject(i)&&!ie.Util._isArray(i),!o&&(s=typeof this[r]=="function"&&this[r],delete e[r],a=s?s.call(this):null,e[r]=i,a!==i&&(t.attrs[r]=i));return t.className=this.getClassName(),ie.Util._prepareToStringify(t)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,e,r){var i=[];e&&this._isMatch(t)&&i.push(this);for(var s=this.parent;s;){if(s===r)return i;s._isMatch(t)&&i.push(s),s=s.parent}return i}isAncestorOf(t){return!1}findAncestor(t,e,r){return this.findAncestors(t,e,r)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);var e=t.replace(/ /g,"").split(","),r=e.length,i,s;for(i=0;i<r;i++)if(s=e[i],ie.Util.isValidSelector(s)||(ie.Util.warn('Selector "'+s+'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'),ie.Util.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'),ie.Util.warn("Konva is awesome, right?")),s.charAt(0)==="#"){if(this.id()===s.slice(1))return!0}else if(s.charAt(0)==="."){if(this.hasName(s.slice(1)))return!0}else if(this.className===s||this.nodeType===s)return!0;return!1}getLayer(){var t=this.getParent();return t?t.getLayer():null}getStage(){return this._getCache(Y1,this._getStage)}_getStage(){var t=this.getParent();return t?t.getStage():null}fire(t,e={},r){return e.target=e.target||this,r?this._fireAndBubble(t,e):this._fire(t,e),this}getAbsoluteTransform(t){return t?this._getAbsoluteTransform(t):this._getCache(Lr,this._getAbsoluteTransform)}_getAbsoluteTransform(t){var e;if(t)return e=new ie.Transform,this._eachAncestorReverse(function(i){var s=i.transformsEnabled();s==="all"?e.multiply(i.getTransform()):s==="position"&&e.translate(i.x()-i.offsetX(),i.y()-i.offsetY())},t),e;e=this._cache.get(Lr)||new ie.Transform,this.parent?this.parent.getAbsoluteTransform().copyInto(e):e.reset();var r=this.transformsEnabled();if(r==="all")e.multiply(this.getTransform());else if(r==="position"){const i=this.attrs.x||0,s=this.attrs.y||0,a=this.attrs.offsetX||0,o=this.attrs.offsetY||0;e.translate(i-a,s-o)}return e.dirty=!1,e}getAbsoluteScale(t){for(var e=this;e;)e._isUnderCache&&(t=e),e=e.getParent();const r=this.getAbsoluteTransform(t).decompose();return{x:r.scaleX,y:r.scaleY}}getAbsoluteRotation(){return this.getAbsoluteTransform().decompose().rotation}getTransform(){return this._getCache(ai,this._getTransform)}_getTransform(){var t,e,r=this._cache.get(ai)||new ie.Transform;r.reset();var i=this.x(),s=this.y(),a=Di.Konva.getAngle(this.rotation()),o=(t=this.attrs.scaleX)!==null&&t!==void 0?t:1,l=(e=this.attrs.scaleY)!==null&&e!==void 0?e:1,c=this.attrs.skewX||0,h=this.attrs.skewY||0,f=this.attrs.offsetX||0,d=this.attrs.offsetY||0;return(i!==0||s!==0)&&r.translate(i,s),a!==0&&r.rotate(a),(c!==0||h!==0)&&r.skew(c,h),(o!==1||l!==1)&&r.scale(o,l),(f!==0||d!==0)&&r.translate(-1*f,-1*d),r.dirty=!1,r}clone(t){var e=ie.Util.cloneObject(this.attrs),r,i,s,a,o;for(r in t)e[r]=t[r];var l=new this.constructor(e);for(r in this.eventListeners)for(i=this.eventListeners[r],s=i.length,a=0;a<s;a++)o=i[a],o.name.indexOf(ST)<0&&(l.eventListeners[r]||(l.eventListeners[r]=[]),l.eventListeners[r].push(o));return l}_toKonvaCanvas(t){t=t||{};var e=this.getClientRect(),r=this.getStage(),i=t.x!==void 0?t.x:Math.floor(e.x),s=t.y!==void 0?t.y:Math.floor(e.y),a=t.pixelRatio||1,o=new Ol.SceneCanvas({width:t.width||Math.ceil(e.width)||(r?r.width():0),height:t.height||Math.ceil(e.height)||(r?r.height():0),pixelRatio:a}),l=o.getContext();return t.imageSmoothingEnabled===!1&&(l._context.imageSmoothingEnabled=!1),l.save(),(i||s)&&l.translate(-1*i,-1*s),this.drawScene(o),l.restore(),o}toCanvas(t){return this._toKonvaCanvas(t)._canvas}toDataURL(t){t=t||{};var e=t.mimeType||null,r=t.quality||null,i=this._toKonvaCanvas(t).toDataURL(e,r);return t.callback&&t.callback(i),i}toImage(t){return new Promise((e,r)=>{try{const i=t==null?void 0:t.callback;i&&delete t.callback,ie.Util._urlToImage(this.toDataURL(t),function(s){e(s),i==null||i(s)})}catch(i){r(i)}})}toBlob(t){return new Promise((e,r)=>{try{const i=t==null?void 0:t.callback;i&&delete t.callback,this.toCanvas(t).toBlob(s=>{e(s),i==null||i(s)})}catch(i){r(i)}})}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():Di.Konva.dragDistance}_off(t,e,r){var i=this.eventListeners[t],s,a,o;for(s=0;s<i.length;s++)if(a=i[s].name,o=i[s].handler,(a!=="konva"||e==="konva")&&(!e||a===e)&&(!r||r===o)){if(i.splice(s,1),i.length===0){delete this.eventListeners[t];break}s--}}_fireChangeEvent(t,e,r){this._fire(t+wT,{oldVal:e,newVal:r})}addName(t){if(!this.hasName(t)){var e=this.name(),r=e?e+" "+t:t;this.name(r)}return this}hasName(t){if(!t)return!1;const e=this.name();if(!e)return!1;var r=(e||"").split(/\s/g);return r.indexOf(t)!==-1}removeName(t){var e=(this.name()||"").split(/\s/g),r=e.indexOf(t);return r!==-1&&(e.splice(r,1),this.name(e.join(" "))),this}setAttr(t,e){var r=this[H1+ie.Util._capitalize(t)];return ie.Util._isFunction(r)?r.call(this,e):this._setAttr(t,e),this}_requestDraw(){if(Di.Konva.autoDrawEnabled){const t=this.getLayer()||this.getStage();t==null||t.batchDraw()}}_setAttr(t,e){var r=this.attrs[t];r===e&&!ie.Util.isObject(e)||(e==null?delete this.attrs[t]:this.attrs[t]=e,this._shouldFireChangeEvents&&this._fireChangeEvent(t,r,e),this._requestDraw())}_setComponentAttr(t,e,r){var i;r!==void 0&&(i=this.attrs[t],i||(this.attrs[t]=this.getAttr(t)),this.attrs[t][e]=r,this._fireChangeEvent(t,i,r))}_fireAndBubble(t,e,r){e&&this.nodeType===q1&&(e.target=this);var i=(t===V1||t===B1)&&(r&&(this===r||this.isAncestorOf&&this.isAncestorOf(r))||this.nodeType==="Stage"&&!r);if(!i){this._fire(t,e);var s=(t===V1||t===B1)&&r&&r.isAncestorOf&&r.isAncestorOf(this)&&!r.isAncestorOf(this.parent);(e&&!e.cancelBubble||!e)&&this.parent&&this.parent.isListening()&&!s&&(r&&r.parent?this._fireAndBubble.call(this.parent,t,e,r):this._fireAndBubble.call(this.parent,t,e))}}_getProtoListeners(t){var e,r,i;const s=(e=this._cache.get(Nl))!==null&&e!==void 0?e:{};let a=s==null?void 0:s[t];if(a===void 0){a=[];let o=Object.getPrototypeOf(this);for(;o;){const l=(i=(r=o.eventListeners)===null||r===void 0?void 0:r[t])!==null&&i!==void 0?i:[];a.push(...l),o=Object.getPrototypeOf(o)}s[t]=a,this._cache.set(Nl,s)}return a}_fire(t,e){e=e||{},e.currentTarget=this,e.type=t;const r=this._getProtoListeners(t);if(r)for(var i=0;i<r.length;i++)r[i].handler.call(this,e);const s=this.eventListeners[t];if(s)for(var i=0;i<s.length;i++)s[i].handler.call(this,e)}draw(){return this.drawScene(),this.drawHit(),this}_createDragElement(t){var e=t?t.pointerId:void 0,r=this.getStage(),i=this.getAbsolutePosition();if(r){var s=r._getPointerById(e)||r._changedPointerPositions[0]||i;Un.DD._dragElements.set(this._id,{node:this,startPointerPos:s,offset:{x:s.x-i.x,y:s.y-i.y},dragStatus:"ready",pointerId:e})}}startDrag(t,e=!0){Un.DD._dragElements.has(this._id)||this._createDragElement(t);const r=Un.DD._dragElements.get(this._id);r.dragStatus="dragging",this.fire("dragstart",{type:"dragstart",target:this,evt:t&&t.evt},e)}_setDragPosition(t,e){const r=this.getStage()._getPointerById(e.pointerId);if(r){var i={x:r.x-e.offset.x,y:r.y-e.offset.y},s=this.dragBoundFunc();if(s!==void 0){const a=s.call(this,i,t);a?i=a:ie.Util.warn("dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.")}(!this._lastPos||this._lastPos.x!==i.x||this._lastPos.y!==i.y)&&(this.setAbsolutePosition(i),this._requestDraw()),this._lastPos=i}}stopDrag(t){const e=Un.DD._dragElements.get(this._id);e&&(e.dragStatus="stopped"),Un.DD._endDragBefore(t),Un.DD._endDragAfter(t)}setDraggable(t){this._setAttr("draggable",t),this._dragChange()}isDragging(){const t=Un.DD._dragElements.get(this._id);return t?t.dragStatus==="dragging":!1}_listenDrag(){this._dragCleanup(),this.on("mousedown.konva touchstart.konva",function(t){var e=t.evt.button!==void 0,r=!e||Di.Konva.dragButtons.indexOf(t.evt.button)>=0;if(r&&!this.isDragging()){var i=!1;Un.DD._dragElements.forEach(s=>{this.isAncestorOf(s.node)&&(i=!0)}),i||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage();if(!t)return;const e=Un.DD._dragElements.get(this._id),r=e&&e.dragStatus==="dragging",i=e&&e.dragStatus==="ready";r?this.stopDrag():i&&Un.DD._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const e=this.getStage();if(!e)return!1;const r={x:-t.x,y:-t.y,width:e.width()+2*t.x,height:e.height()+2*t.y};return ie.Util.haveIntersection(r,this.getClientRect())}static create(t,e){return ie.Util._isString(t)&&(t=JSON.parse(t)),this._createNode(t,e)}static _createNode(t,e){var r=jd.prototype.getClassName.call(t),i=t.children,s,a,o;e&&(t.attrs.container=e),Di.Konva[r]||(ie.Util.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=Di.Konva[r];if(s=new l(t.attrs),i)for(a=i.length,o=0;o<a;o++)s.add(jd._createNode(i[o]));return s}};G1=xa.Node=Qt,Qt.prototype.nodeType="Node",Qt.prototype._attrsAffectingSize=[],Qt.prototype.eventListeners={},Qt.prototype.on.call(Qt.prototype,CT,function(){if(this._batchingTransformChange){this._needClearTransformCache=!0;return}this._clearCache(ai),this._clearSelfAndDescendantCache(Lr)}),Qt.prototype.on.call(Qt.prototype,"visibleChange.konva",function(){this._clearSelfAndDescendantCache(Zu)}),Qt.prototype.on.call(Qt.prototype,"listeningChange.konva",function(){this._clearSelfAndDescendantCache(Qu)}),Qt.prototype.on.call(Qt.prototype,"opacityChange.konva",function(){this._clearSelfAndDescendantCache($l)});const xe=Sa.Factory.addGetterSetter;xe(Qt,"zIndex"),xe(Qt,"absolutePosition"),xe(Qt,"position"),xe(Qt,"x",0,(0,je.getNumberValidator)()),xe(Qt,"y",0,(0,je.getNumberValidator)()),xe(Qt,"globalCompositeOperation","source-over",(0,je.getStringValidator)()),xe(Qt,"opacity",1,(0,je.getNumberValidator)()),xe(Qt,"name","",(0,je.getStringValidator)()),xe(Qt,"id","",(0,je.getStringValidator)()),xe(Qt,"rotation",0,(0,je.getNumberValidator)()),Sa.Factory.addComponentsGetterSetter(Qt,"scale",["x","y"]),xe(Qt,"scaleX",1,(0,je.getNumberValidator)()),xe(Qt,"scaleY",1,(0,je.getNumberValidator)()),Sa.Factory.addComponentsGetterSetter(Qt,"skew",["x","y"]),xe(Qt,"skewX",0,(0,je.getNumberValidator)()),xe(Qt,"skewY",0,(0,je.getNumberValidator)()),Sa.Factory.addComponentsGetterSetter(Qt,"offset",["x","y"]),xe(Qt,"offsetX",0,(0,je.getNumberValidator)()),xe(Qt,"offsetY",0,(0,je.getNumberValidator)()),xe(Qt,"dragDistance",null,(0,je.getNumberValidator)()),xe(Qt,"width",0,(0,je.getNumberValidator)()),xe(Qt,"height",0,(0,je.getNumberValidator)()),xe(Qt,"listening",!0,(0,je.getBooleanValidator)()),xe(Qt,"preventDefault",!0,(0,je.getBooleanValidator)()),xe(Qt,"filters",null,function(n){return this._filterUpToDate=!1,n}),xe(Qt,"visible",!0,(0,je.getBooleanValidator)()),xe(Qt,"transformsEnabled","all",(0,je.getStringValidator)()),xe(Qt,"size"),xe(Qt,"dragBoundFunc"),xe(Qt,"draggable",!1,(0,je.getBooleanValidator)()),Sa.Factory.backCompat(Qt,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"});const ET=Mt({__proto__:null,get Node(){return G1},default:xa},[xa]),Le=Dt(ET);var ka={};Object.defineProperty(ka,"__esModule",{value:!0});var K1=ka.Container=void 0;const ps=ee,Wu=Le,Rl=re;class ji extends Wu.Node{constructor(){super(...arguments),this.children=[]}getChildren(t){if(!t)return this.children||[];const e=this.children||[];var r=[];return e.forEach(function(i){t(i)&&r.push(i)}),r}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(var e=0;e<t.length;e++)this.add(t[e]);return this}const r=t[0];return r.getParent()?(r.moveTo(this),this):(this._validateAdd(r),r.index=this.getChildren().length,r.parent=this,r._clearCaches(),this.getChildren().push(r),this._fire("add",{child:r}),this._requestDraw(),this)}destroy(){return this.hasChildren()&&this.destroyChildren(),super.destroy(),this}find(t){return this._generalFind(t,!1)}findOne(t){var e=this._generalFind(t,!0);return e.length>0?e[0]:void 0}_generalFind(t,e){var r=[];return this._descendants(i=>{const s=i._isMatch(t);return s&&r.push(i),!!(s&&e)}),r}_descendants(t){let e=!1;const r=this.getChildren();for(const i of r)if(e=t(i),e||i.hasChildren()&&(e=i._descendants(t),e))return!0;return!1}toObject(){var t=Wu.Node.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(e=>{t.children.push(e.toObject())}),t}isAncestorOf(t){for(var e=t.getParent();e;){if(e._id===this._id)return!0;e=e.getParent()}return!1}clone(t){var e=Wu.Node.prototype.clone.call(this,t);return this.getChildren().forEach(function(r){e.add(r.clone())}),e}getAllIntersections(t){var e=[];return this.find("Shape").forEach(r=>{r.isVisible()&&r.intersects(t)&&e.push(r)}),e}_clearSelfAndDescendantCache(t){var e;super._clearSelfAndDescendantCache(t),!this.isCached()&&((e=this.children)===null||e===void 0||e.forEach(function(r){r._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(e,r){e.index=r}),this._requestDraw()}drawScene(t,e){var r=this.getLayer(),i=t||r&&r.getCanvas(),s=i&&i.getContext(),a=this._getCanvasCache(),o=a&&a.scene,l=i&&i.isCache;if(!this.isVisible()&&!l)return this;if(o){s.save();var c=this.getAbsoluteTransform(e).getMatrix();s.transform(c[0],c[1],c[2],c[3],c[4],c[5]),this._drawCachedSceneCanvas(s),s.restore()}else this._drawChildren("drawScene",i,e);return this}drawHit(t,e){if(!this.shouldDrawHit(e))return this;var r=this.getLayer(),i=t||r&&r.hitCanvas,s=i&&i.getContext(),a=this._getCanvasCache(),o=a&&a.hit;if(o){s.save();var l=this.getAbsoluteTransform(e).getMatrix();s.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedHitCanvas(s),s.restore()}else this._drawChildren("drawHit",i,e);return this}_drawChildren(t,e,r){var i,s=e&&e.getContext(),a=this.clipWidth(),o=this.clipHeight(),l=this.clipFunc(),c=a&&o||l;const h=r===this;if(c){s.save();var f=this.getAbsoluteTransform(r),d=f.getMatrix();s.transform(d[0],d[1],d[2],d[3],d[4],d[5]),s.beginPath();let _;if(l)_=l.call(this,s,this);else{var u=this.clipX(),p=this.clipY();s.rect(u,p,a,o)}s.clip.apply(s,_),d=f.copy().invert().getMatrix(),s.transform(d[0],d[1],d[2],d[3],d[4],d[5])}var v=!h&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";v&&(s.save(),s._applyGlobalCompositeOperation(this)),(i=this.children)===null||i===void 0||i.forEach(function(_){_[t](e,r)}),v&&s.restore(),c&&s.restore()}getClientRect(t={}){var e,r=t.skipTransform,i=t.relativeTo,s,a,o,l,c={x:1/0,y:1/0,width:0,height:0},h=this;(e=this.children)===null||e===void 0||e.forEach(function(v){if(v.visible()){var _=v.getClientRect({relativeTo:h,skipShadow:t.skipShadow,skipStroke:t.skipStroke});_.width===0&&_.height===0||(s===void 0?(s=_.x,a=_.y,o=_.x+_.width,l=_.y+_.height):(s=Math.min(s,_.x),a=Math.min(a,_.y),o=Math.max(o,_.x+_.width),l=Math.max(l,_.y+_.height)))}});for(var f=this.find("Shape"),d=!1,u=0;u<f.length;u++){var p=f[u];if(p._isVisible(this)){d=!0;break}}return d&&s!==void 0?c={x:s,y:a,width:o-s,height:l-a}:c={x:0,y:0,width:0,height:0},r?c:this._transformedRect(c,i)}}K1=ka.Container=ji,ps.Factory.addComponentsGetterSetter(ji,"clip",["x","y","width","height"]),ps.Factory.addGetterSetter(ji,"clipX",void 0,(0,Rl.getNumberValidator)()),ps.Factory.addGetterSetter(ji,"clipY",void 0,(0,Rl.getNumberValidator)()),ps.Factory.addGetterSetter(ji,"clipWidth",void 0,(0,Rl.getNumberValidator)()),ps.Factory.addGetterSetter(ji,"clipHeight",void 0,(0,Rl.getNumberValidator)()),ps.Factory.addGetterSetter(ji,"clipFunc");const PT=Mt({__proto__:null,get Container(){return K1},default:ka},[ka]),Ml=Dt(PT);var td={},Nn={};Object.defineProperty(Nn,"__esModule",{value:!0});var X1=Nn.releaseCapture=tv=Nn.setPointerCapture=W1=Nn.hasPointerCapture=Z1=Nn.createEvent=Q1=Nn.getCapturedShape=void 0;const AT=ne,Ca=new Map,J1=AT.Konva._global.PointerEvent!==void 0;function OT(n){return Ca.get(n)}var Q1=Nn.getCapturedShape=OT;function ed(n){return{evt:n,pointerId:n.pointerId}}var Z1=Nn.createEvent=ed;function $T(n,t){return Ca.get(n)===t}var W1=Nn.hasPointerCapture=$T;function NT(n,t){ev(n),t.getStage()&&(Ca.set(n,t),J1&&t._fire("gotpointercapture",ed(new PointerEvent("gotpointercapture"))))}var tv=Nn.setPointerCapture=NT;function ev(n,t){const e=Ca.get(n);if(!e)return;const r=e.getStage();r&&r.content,Ca.delete(n),J1&&e._fire("lostpointercapture",ed(new PointerEvent("lostpointercapture")))}X1=Nn.releaseCapture=ev;const FT=Mt({__proto__:null,get createEvent(){return Z1},default:Nn,get getCapturedShape(){return Q1},get hasPointerCapture(){return W1},get releaseCapture(){return X1},get setPointerCapture(){return tv}},[Nn]),nv=Dt(FT);(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.Stage=n.stages=void 0;const t=$e,e=ee,r=Ml,i=ne,s=Al,a=Ju,o=ne,l=nv;var c="Stage",h="string",f="px",d="mouseout",u="mouseleave",p="mouseover",v="mouseenter",_="mousemove",x="mousedown",b="mouseup",m="pointermove",k="pointerdown",O="pointerup",T="pointercancel",F="lostpointercapture",R="pointerout",L="pointerleave",U="pointerover",B="pointerenter",Y="contextmenu",tt="touchstart",W="touchend",ct="touchmove",wt="touchcancel",St="wheel",xt=5,st=[[v,"_pointerenter"],[x,"_pointerdown"],[_,"_pointermove"],[b,"_pointerup"],[u,"_pointerleave"],[tt,"_pointerdown"],[ct,"_pointermove"],[W,"_pointerup"],[wt,"_pointercancel"],[p,"_pointerover"],[St,"_wheel"],[Y,"_contextmenu"],[k,"_pointerdown"],[m,"_pointermove"],[O,"_pointerup"],[T,"_pointercancel"],[F,"_lostpointercapture"]];const K={mouse:{[R]:d,[L]:u,[U]:p,[B]:v,[m]:_,[k]:x,[O]:b,[T]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},touch:{[R]:"touchout",[L]:"touchleave",[U]:"touchover",[B]:"touchenter",[m]:ct,[k]:tt,[O]:W,[T]:wt,pointerclick:"tap",pointerdblclick:"dbltap"},pointer:{[R]:R,[L]:L,[U]:U,[B]:B,[m]:m,[k]:k,[O]:O,[T]:T,pointerclick:"pointerclick",pointerdblclick:"pointerdblclick"}},$=G=>G.indexOf("pointer")>=0?"pointer":G.indexOf("touch")>=0?"touch":"mouse",P=G=>{const D=$(G);if(D==="pointer")return i.Konva.pointerEventsEnabled&&K.pointer;if(D==="touch")return K.touch;if(D==="mouse")return K.mouse};function E(G={}){return(G.clipFunc||G.clipWidth||G.clipHeight)&&t.Util.warn("Stage does not support clipping. Please use clip for Layers or Groups."),G}const C="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);";n.stages=[];class M extends r.Container{constructor(D){super(E(D)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),n.stages.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{E(this.attrs)}),this._checkVisibility()}_validateAdd(D){const V=D.getType()==="Layer",q=D.getType()==="FastLayer";V||q||t.Util.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const D=this.visible()?"":"none";this.content.style.display=D}setContainer(D){if(typeof D===h){if(D.charAt(0)==="."){var V=D.slice(1);D=document.getElementsByClassName(V)[0]}else{var q;D.charAt(0)!=="#"?q=D:q=D.slice(1),D=document.getElementById(q)}if(!D)throw"Can not find container in document with id "+q}return this._setAttr("container",D),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),D.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var D=this.children,V=D.length,q;for(q=0;q<V;q++)D[q].clear();return this}clone(D){return D||(D={}),D.container=typeof document<"u"&&document.createElement("div"),r.Container.prototype.clone.call(this,D)}destroy(){super.destroy();var D=this.content;D&&t.Util._isInDocument(D)&&this.container().removeChild(D);var V=n.stages.indexOf(this);return V>-1&&n.stages.splice(V,1),t.Util.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const D=this._pointerPositions[0]||this._changedPointerPositions[0];return D?{x:D.x,y:D.y}:(t.Util.warn(C),null)}_getPointerById(D){return this._pointerPositions.find(V=>V.id===D)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(D){D=D||{},D.x=D.x||0,D.y=D.y||0,D.width=D.width||this.width(),D.height=D.height||this.height();var V=new s.SceneCanvas({width:D.width,height:D.height,pixelRatio:D.pixelRatio||1}),q=V.getContext()._context,Z=this.children;return(D.x||D.y)&&q.translate(-1*D.x,-1*D.y),Z.forEach(function(rt){if(rt.isVisible()){var gt=rt._toKonvaCanvas(D);q.drawImage(gt._canvas,D.x,D.y,gt.getWidth()/gt.getPixelRatio(),gt.getHeight()/gt.getPixelRatio())}}),V}getIntersection(D){if(!D)return null;var V=this.children,q=V.length,Z=q-1,rt;for(rt=Z;rt>=0;rt--){const gt=V[rt].getIntersection(D);if(gt)return gt}return null}_resizeDOM(){var D=this.width(),V=this.height();this.content&&(this.content.style.width=D+f,this.content.style.height=V+f),this.bufferCanvas.setSize(D,V),this.bufferHitCanvas.setSize(D,V),this.children.forEach(q=>{q.setSize({width:D,height:V}),q.draw()})}add(D,...V){if(arguments.length>1){for(var q=0;q<arguments.length;q++)this.add(arguments[q]);return this}super.add(D);var Z=this.children.length;return Z>xt&&t.Util.warn("The stage has "+Z+" 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."),D.setSize({width:this.width(),height:this.height()}),D.draw(),i.Konva.isBrowser&&this.content.appendChild(D.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(D){return l.hasPointerCapture(D,this)}setPointerCapture(D){l.setPointerCapture(D,this)}releaseCapture(D){l.releaseCapture(D,this)}getLayers(){return this.children}_bindContentEvents(){i.Konva.isBrowser&&st.forEach(([D,V])=>{this.content.addEventListener(D,q=>{this[V](q)},{passive:!1})})}_pointerenter(D){this.setPointersPositions(D);const V=P(D.type);V&&this._fire(V.pointerenter,{evt:D,target:this,currentTarget:this})}_pointerover(D){this.setPointersPositions(D);const V=P(D.type);V&&this._fire(V.pointerover,{evt:D,target:this,currentTarget:this})}_getTargetShape(D){let V=this[D+"targetShape"];return V&&!V.getStage()&&(V=null),V}_pointerleave(D){const V=P(D.type),q=$(D.type);if(V){this.setPointersPositions(D);var Z=this._getTargetShape(q),rt=!a.DD.isDragging||i.Konva.hitOnDragEnabled;Z&&rt?(Z._fireAndBubble(V.pointerout,{evt:D}),Z._fireAndBubble(V.pointerleave,{evt:D}),this._fire(V.pointerleave,{evt:D,target:this,currentTarget:this}),this[q+"targetShape"]=null):rt&&(this._fire(V.pointerleave,{evt:D,target:this,currentTarget:this}),this._fire(V.pointerout,{evt:D,target:this,currentTarget:this})),this.pointerPos=null,this._pointerPositions=[]}}_pointerdown(D){const V=P(D.type),q=$(D.type);if(V){this.setPointersPositions(D);var Z=!1;this._changedPointerPositions.forEach(rt=>{var gt=this.getIntersection(rt);if(a.DD.justDragged=!1,i.Konva["_"+q+"ListenClick"]=!0,!gt||!gt.isListening())return;i.Konva.capturePointerEventsEnabled&&gt.setPointerCapture(rt.id),this[q+"ClickStartShape"]=gt,gt._fireAndBubble(V.pointerdown,{evt:D,pointerId:rt.id}),Z=!0;const Ct=D.type.indexOf("touch")>=0;gt.preventDefault()&&D.cancelable&&Ct&&D.preventDefault()}),Z||this._fire(V.pointerdown,{evt:D,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(D){const V=P(D.type),q=$(D.type);if(!V)return;a.DD.isDragging&&a.DD.node.preventDefault()&&D.cancelable&&D.preventDefault(),this.setPointersPositions(D);var Z=!a.DD.isDragging||i.Konva.hitOnDragEnabled;if(!Z)return;var rt={};let gt=!1;var Ct=this._getTargetShape(q);this._changedPointerPositions.forEach(Ft=>{const kt=l.getCapturedShape(Ft.id)||this.getIntersection(Ft),Ot=Ft.id,Lt={evt:D,pointerId:Ot};var Vt=Ct!==kt;if(Vt&&Ct&&(Ct._fireAndBubble(V.pointerout,{...Lt},kt),Ct._fireAndBubble(V.pointerleave,{...Lt},kt)),kt){if(rt[kt._id])return;rt[kt._id]=!0}kt&&kt.isListening()?(gt=!0,Vt&&(kt._fireAndBubble(V.pointerover,{...Lt},Ct),kt._fireAndBubble(V.pointerenter,{...Lt},Ct),this[q+"targetShape"]=kt),kt._fireAndBubble(V.pointermove,{...Lt})):Ct&&(this._fire(V.pointerover,{evt:D,target:this,currentTarget:this,pointerId:Ot}),this[q+"targetShape"]=null)}),gt||this._fire(V.pointermove,{evt:D,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(D){const V=P(D.type),q=$(D.type);if(!V)return;this.setPointersPositions(D);const Z=this[q+"ClickStartShape"],rt=this[q+"ClickEndShape"];var gt={};let Ct=!1;this._changedPointerPositions.forEach(Ft=>{const kt=l.getCapturedShape(Ft.id)||this.getIntersection(Ft);if(kt){if(kt.releaseCapture(Ft.id),gt[kt._id])return;gt[kt._id]=!0}const Ot=Ft.id,Lt={evt:D,pointerId:Ot};let Vt=!1;i.Konva["_"+q+"InDblClickWindow"]?(Vt=!0,clearTimeout(this[q+"DblTimeout"])):a.DD.justDragged||(i.Konva["_"+q+"InDblClickWindow"]=!0,clearTimeout(this[q+"DblTimeout"])),this[q+"DblTimeout"]=setTimeout(function(){i.Konva["_"+q+"InDblClickWindow"]=!1},i.Konva.dblClickWindow),kt&&kt.isListening()?(Ct=!0,this[q+"ClickEndShape"]=kt,kt._fireAndBubble(V.pointerup,{...Lt}),i.Konva["_"+q+"ListenClick"]&&Z&&Z===kt&&(kt._fireAndBubble(V.pointerclick,{...Lt}),Vt&&rt&&rt===kt&&kt._fireAndBubble(V.pointerdblclick,{...Lt}))):(this[q+"ClickEndShape"]=null,i.Konva["_"+q+"ListenClick"]&&this._fire(V.pointerclick,{evt:D,target:this,currentTarget:this,pointerId:Ot}),Vt&&this._fire(V.pointerdblclick,{evt:D,target:this,currentTarget:this,pointerId:Ot}))}),Ct||this._fire(V.pointerup,{evt:D,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),i.Konva["_"+q+"ListenClick"]=!1,D.cancelable&&q!=="touch"&&D.preventDefault()}_contextmenu(D){this.setPointersPositions(D);var V=this.getIntersection(this.getPointerPosition());V&&V.isListening()?V._fireAndBubble(Y,{evt:D}):this._fire(Y,{evt:D,target:this,currentTarget:this})}_wheel(D){this.setPointersPositions(D);var V=this.getIntersection(this.getPointerPosition());V&&V.isListening()?V._fireAndBubble(St,{evt:D}):this._fire(St,{evt:D,target:this,currentTarget:this})}_pointercancel(D){this.setPointersPositions(D);const V=l.getCapturedShape(D.pointerId)||this.getIntersection(this.getPointerPosition());V&&V._fireAndBubble(O,l.createEvent(D)),l.releaseCapture(D.pointerId)}_lostpointercapture(D){l.releaseCapture(D.pointerId)}setPointersPositions(D){var V=this._getContentPosition(),q=null,Z=null;D=D||window.event,D.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(D.touches,rt=>{this._pointerPositions.push({id:rt.identifier,x:(rt.clientX-V.left)/V.scaleX,y:(rt.clientY-V.top)/V.scaleY})}),Array.prototype.forEach.call(D.changedTouches||D.touches,rt=>{this._changedPointerPositions.push({id:rt.identifier,x:(rt.clientX-V.left)/V.scaleX,y:(rt.clientY-V.top)/V.scaleY})})):(q=(D.clientX-V.left)/V.scaleX,Z=(D.clientY-V.top)/V.scaleY,this.pointerPos={x:q,y:Z},this._pointerPositions=[{x:q,y:Z,id:t.Util._getFirstPointerId(D)}],this._changedPointerPositions=[{x:q,y:Z,id:t.Util._getFirstPointerId(D)}])}_setPointerPosition(D){t.Util.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(D)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var D=this.content.getBoundingClientRect();return{top:D.top,left:D.left,scaleX:D.width/this.content.clientWidth||1,scaleY:D.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new s.SceneCanvas({width:this.width(),height:this.height()}),this.bufferHitCanvas=new s.HitCanvas({pixelRatio:1,width:this.width(),height:this.height()}),!!i.Konva.isBrowser){var D=this.container();if(!D)throw"Stage has no container. A container is required.";D.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"),D.appendChild(this.content),this._resizeDOM()}}cache(){return t.Util.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(D){D.batchDraw()}),this}}n.Stage=M,M.prototype.nodeType=c,(0,o._registerNode)(M),e.Factory.addGetterSetter(M,"container")})(td);const RT=An(td),MT=Mt({__proto__:null,default:RT},[td]),DT=Dt(MT);var Ta={},nd={};(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.Shape=n.shapes=void 0;const t=ne,e=$e,r=ee,i=Le,s=re,a=ne,o=nv;var l="hasShadow",c="shadowRGBA",h="patternImage",f="linearGradient",d="radialGradient";let u;function p(){return u||(u=e.Util.createCanvasElement().getContext("2d"),u)}n.shapes={};function v(L){const U=this.attrs.fillRule;U?L.fill(U):L.fill()}function _(L){L.stroke()}function x(L){L.fill()}function b(L){L.stroke()}function m(){this._clearCache(l)}function k(){this._clearCache(c)}function O(){this._clearCache(h)}function T(){this._clearCache(f)}function F(){this._clearCache(d)}class R extends i.Node{constructor(U){super(U);let B;for(;B=e.Util.getRandomColor(),!(B&&!(B in n.shapes)););this.colorKey=B,n.shapes[B]=this}getContext(){return e.Util.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return e.Util.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(l,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(h,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var U=p();const B=U.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(B&&B.setTransform){const Y=new e.Transform;Y.translate(this.fillPatternX(),this.fillPatternY()),Y.rotate(t.Konva.getAngle(this.fillPatternRotation())),Y.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),Y.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const tt=Y.getMatrix(),W=typeof DOMMatrix>"u"?{a:tt[0],b:tt[1],c:tt[2],d:tt[3],e:tt[4],f:tt[5]}:new DOMMatrix(tt);B.setTransform(W)}return B}}_getLinearGradient(){return this._getCache(f,this.__getLinearGradient)}__getLinearGradient(){var U=this.fillLinearGradientColorStops();if(U){for(var B=p(),Y=this.fillLinearGradientStartPoint(),tt=this.fillLinearGradientEndPoint(),W=B.createLinearGradient(Y.x,Y.y,tt.x,tt.y),ct=0;ct<U.length;ct+=2)W.addColorStop(U[ct],U[ct+1]);return W}}_getRadialGradient(){return this._getCache(d,this.__getRadialGradient)}__getRadialGradient(){var U=this.fillRadialGradientColorStops();if(U){for(var B=p(),Y=this.fillRadialGradientStartPoint(),tt=this.fillRadialGradientEndPoint(),W=B.createRadialGradient(Y.x,Y.y,this.fillRadialGradientStartRadius(),tt.x,tt.y,this.fillRadialGradientEndRadius()),ct=0;ct<U.length;ct+=2)W.addColorStop(U[ct],U[ct+1]);return W}}getShadowRGBA(){return this._getCache(c,this._getShadowRGBA)}_getShadowRGBA(){if(this.hasShadow()){var U=e.Util.colorToRGBA(this.shadowColor());if(U)return"rgba("+U.r+","+U.g+","+U.b+","+U.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 U=this.hitStrokeWidth();return U==="auto"?this.hasStroke():this.strokeEnabled()&&!!U}intersects(U){var B=this.getStage();if(!B)return!1;const Y=B.bufferHitCanvas;return Y.getContext().clear(),this.drawHit(Y,void 0,!0),Y.context.getImageData(Math.round(U.x),Math.round(U.y),1,1).data[3]>0}destroy(){return i.Node.prototype.destroy.call(this),delete n.shapes[this.colorKey],delete this.colorKey,this}_useBufferCanvas(U){var B;if(!this.getStage()||!(!((B=this.attrs.perfectDrawEnabled)!==null&&B!==void 0)||B))return!1;const Y=U||this.hasFill(),tt=this.hasStroke(),W=this.getAbsoluteOpacity()!==1;if(Y&&tt&&W)return!0;const ct=this.hasShadow(),wt=this.shadowForStrokeEnabled();return!!(Y&&tt&&ct&&wt)}setStrokeHitEnabled(U){e.Util.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),U?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var U=this.size();return{x:this._centroid?-U.width/2:0,y:this._centroid?-U.height/2:0,width:U.width,height:U.height}}getClientRect(U={}){const B=U.skipTransform,Y=U.relativeTo,tt=this.getSelfRect(),W=!U.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,ct=tt.width+W,wt=tt.height+W,St=!U.skipShadow&&this.hasShadow(),xt=St?this.shadowOffsetX():0,st=St?this.shadowOffsetY():0,K=ct+Math.abs(xt),$=wt+Math.abs(st),P=St&&this.shadowBlur()||0,E=K+P*2,C=$+P*2,M={width:E,height:C,x:-(W/2+P)+Math.min(xt,0)+tt.x,y:-(W/2+P)+Math.min(st,0)+tt.y};return B?M:this._transformedRect(M,Y)}drawScene(U,B){var Y=this.getLayer(),tt=U||Y.getCanvas(),W=tt.getContext(),ct=this._getCanvasCache(),wt=this.getSceneFunc(),St=this.hasShadow(),xt,st,K,$=tt.isCache,P=B===this;if(!this.isVisible()&&!P)return this;if(ct){W.save();var E=this.getAbsoluteTransform(B).getMatrix();return W.transform(E[0],E[1],E[2],E[3],E[4],E[5]),this._drawCachedSceneCanvas(W),W.restore(),this}if(!wt)return this;if(W.save(),this._useBufferCanvas()&&!$){xt=this.getStage(),st=xt.bufferCanvas,K=st.getContext(),K.clear(),K.save(),K._applyLineJoin(this);var C=this.getAbsoluteTransform(B).getMatrix();K.transform(C[0],C[1],C[2],C[3],C[4],C[5]),wt.call(this,K,this),K.restore();var M=st.pixelRatio;St&&W._applyShadow(this),W._applyOpacity(this),W._applyGlobalCompositeOperation(this),W.drawImage(st._canvas,0,0,st.width/M,st.height/M)}else{if(W._applyLineJoin(this),!P){var C=this.getAbsoluteTransform(B).getMatrix();W.transform(C[0],C[1],C[2],C[3],C[4],C[5]),W._applyOpacity(this),W._applyGlobalCompositeOperation(this)}St&&W._applyShadow(this),wt.call(this,W,this)}return W.restore(),this}drawHit(U,B,Y=!1){if(!this.shouldDrawHit(B,Y))return this;var tt=this.getLayer(),W=U||tt.hitCanvas,ct=W&&W.getContext(),wt=this.hitFunc()||this.sceneFunc(),St=this._getCanvasCache(),xt=St&&St.hit;if(this.colorKey||e.Util.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()"),xt){ct.save();var st=this.getAbsoluteTransform(B).getMatrix();return ct.transform(st[0],st[1],st[2],st[3],st[4],st[5]),this._drawCachedHitCanvas(ct),ct.restore(),this}if(!wt)return this;if(ct.save(),ct._applyLineJoin(this),this!==B){var K=this.getAbsoluteTransform(B).getMatrix();ct.transform(K[0],K[1],K[2],K[3],K[4],K[5])}return wt.call(this,ct,this),ct.restore(),this}drawHitFromCache(U=0){var B=this._getCanvasCache(),Y=this._getCachedSceneCanvas(),tt=B.hit,W=tt.getContext(),ct=tt.getWidth(),wt=tt.getHeight(),St,xt,st,K,$,P;W.clear(),W.drawImage(Y._canvas,0,0,ct,wt);try{for(St=W.getImageData(0,0,ct,wt),xt=St.data,st=xt.length,K=e.Util._hexToRgb(this.colorKey),$=0;$<st;$+=4)P=xt[$+3],P>U?(xt[$]=K.r,xt[$+1]=K.g,xt[$+2]=K.b,xt[$+3]=255):xt[$+3]=0;W.putImageData(St,0,0)}catch(E){e.Util.error("Unable to draw hit graph from cached scene canvas. "+E.message)}return this}hasPointerCapture(U){return o.hasPointerCapture(U,this)}setPointerCapture(U){o.setPointerCapture(U,this)}releaseCapture(U){o.releaseCapture(U,this)}}n.Shape=R,R.prototype._fillFunc=v,R.prototype._strokeFunc=_,R.prototype._fillFuncHit=x,R.prototype._strokeFuncHit=b,R.prototype._centroid=!1,R.prototype.nodeType="Shape",(0,a._registerNode)(R),R.prototype.eventListeners={},R.prototype.on.call(R.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",m),R.prototype.on.call(R.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",k),R.prototype.on.call(R.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",O),R.prototype.on.call(R.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",T),R.prototype.on.call(R.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",F),r.Factory.addGetterSetter(R,"stroke",void 0,(0,s.getStringOrGradientValidator)()),r.Factory.addGetterSetter(R,"strokeWidth",2,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(R,"fillAfterStrokeEnabled",!1),r.Factory.addGetterSetter(R,"hitStrokeWidth","auto",(0,s.getNumberOrAutoValidator)()),r.Factory.addGetterSetter(R,"strokeHitEnabled",!0,(0,s.getBooleanValidator)()),r.Factory.addGetterSetter(R,"perfectDrawEnabled",!0,(0,s.getBooleanValidator)()),r.Factory.addGetterSetter(R,"shadowForStrokeEnabled",!0,(0,s.getBooleanValidator)()),r.Factory.addGetterSetter(R,"lineJoin"),r.Factory.addGetterSetter(R,"lineCap"),r.Factory.addGetterSetter(R,"sceneFunc"),r.Factory.addGetterSetter(R,"hitFunc"),r.Factory.addGetterSetter(R,"dash"),r.Factory.addGetterSetter(R,"dashOffset",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(R,"shadowColor",void 0,(0,s.getStringValidator)()),r.Factory.addGetterSetter(R,"shadowBlur",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(R,"shadowOpacity",1,(0,s.getNumberValidator)()),r.Factory.addComponentsGetterSetter(R,"shadowOffset",["x","y"]),r.Factory.addGetterSetter(R,"shadowOffsetX",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(R,"shadowOffsetY",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(R,"fillPatternImage"),r.Factory.addGetterSetter(R,"fill",void 0,(0,s.getStringOrGradientValidator)()),r.Factory.addGetterSetter(R,"fillPatternX",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(R,"fillPatternY",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(R,"fillLinearGradientColorStops"),r.Factory.addGetterSetter(R,"strokeLinearGradientColorStops"),r.Factory.addGetterSetter(R,"fillRadialGradientStartRadius",0),r.Factory.addGetterSetter(R,"fillRadialGradientEndRadius",0),r.Factory.addGetterSetter(R,"fillRadialGradientColorStops"),r.Factory.addGetterSetter(R,"fillPatternRepeat","repeat"),r.Factory.addGetterSetter(R,"fillEnabled",!0),r.Factory.addGetterSetter(R,"strokeEnabled",!0),r.Factory.addGetterSetter(R,"shadowEnabled",!0),r.Factory.addGetterSetter(R,"dashEnabled",!0),r.Factory.addGetterSetter(R,"strokeScaleEnabled",!0),r.Factory.addGetterSetter(R,"fillPriority","color"),r.Factory.addComponentsGetterSetter(R,"fillPatternOffset",["x","y"]),r.Factory.addGetterSetter(R,"fillPatternOffsetX",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(R,"fillPatternOffsetY",0,(0,s.getNumberValidator)()),r.Factory.addComponentsGetterSetter(R,"fillPatternScale",["x","y"]),r.Factory.addGetterSetter(R,"fillPatternScaleX",1,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(R,"fillPatternScaleY",1,(0,s.getNumberValidator)()),r.Factory.addComponentsGetterSetter(R,"fillLinearGradientStartPoint",["x","y"]),r.Factory.addComponentsGetterSetter(R,"strokeLinearGradientStartPoint",["x","y"]),r.Factory.addGetterSetter(R,"fillLinearGradientStartPointX",0),r.Factory.addGetterSetter(R,"strokeLinearGradientStartPointX",0),r.Factory.addGetterSetter(R,"fillLinearGradientStartPointY",0),r.Factory.addGetterSetter(R,"strokeLinearGradientStartPointY",0),r.Factory.addComponentsGetterSetter(R,"fillLinearGradientEndPoint",["x","y"]),r.Factory.addComponentsGetterSetter(R,"strokeLinearGradientEndPoint",["x","y"]),r.Factory.addGetterSetter(R,"fillLinearGradientEndPointX",0),r.Factory.addGetterSetter(R,"strokeLinearGradientEndPointX",0),r.Factory.addGetterSetter(R,"fillLinearGradientEndPointY",0),r.Factory.addGetterSetter(R,"strokeLinearGradientEndPointY",0),r.Factory.addComponentsGetterSetter(R,"fillRadialGradientStartPoint",["x","y"]),r.Factory.addGetterSetter(R,"fillRadialGradientStartPointX",0),r.Factory.addGetterSetter(R,"fillRadialGradientStartPointY",0),r.Factory.addComponentsGetterSetter(R,"fillRadialGradientEndPoint",["x","y"]),r.Factory.addGetterSetter(R,"fillRadialGradientEndPointX",0),r.Factory.addGetterSetter(R,"fillRadialGradientEndPointY",0),r.Factory.addGetterSetter(R,"fillPatternRotation",0),r.Factory.addGetterSetter(R,"fillRule",void 0,(0,s.getStringValidator)()),r.Factory.backCompat(R,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"})})(nd);const IT=An(nd),jT=Mt({__proto__:null,default:IT},[nd]),Ze=Dt(jT);Object.defineProperty(Ta,"__esModule",{value:!0});var rv=Ta.Layer=void 0;const Ur=$e,rd=Ml,gs=Le,id=ee,iv=Al,LT=re,UT=Ze,GT=ne;var zT="#",VT="beforeDraw",BT="draw",sv=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],HT=sv.length;class ms extends rd.Container{constructor(t){super(t),this.canvas=new iv.SceneCanvas,this.hitCanvas=new iv.HitCanvas({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);var e=this.getStage();return e&&e.content&&(e.content.removeChild(this.getNativeCanvasElement()),t<e.children.length-1?e.content.insertBefore(this.getNativeCanvasElement(),e.children[t+1].getCanvas()._canvas):e.content.appendChild(this.getNativeCanvasElement())),this}moveToTop(){gs.Node.prototype.moveToTop.call(this);var t=this.getStage();return t&&t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.appendChild(this.getNativeCanvasElement())),!0}moveUp(){var t=gs.Node.prototype.moveUp.call(this);if(!t)return!1;var e=this.getStage();return!e||!e.content?!1:(e.content.removeChild(this.getNativeCanvasElement()),this.index<e.children.length-1?e.content.insertBefore(this.getNativeCanvasElement(),e.children[this.index+1].getCanvas()._canvas):e.content.appendChild(this.getNativeCanvasElement()),!0)}moveDown(){if(gs.Node.prototype.moveDown.call(this)){var t=this.getStage();if(t){var e=t.children;t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.insertBefore(this.getNativeCanvasElement(),e[this.index+1].getCanvas()._canvas))}return!0}return!1}moveToBottom(){if(gs.Node.prototype.moveToBottom.call(this)){var t=this.getStage();if(t){var e=t.children;t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.insertBefore(this.getNativeCanvasElement(),e[1].getCanvas()._canvas))}return!0}return!1}getLayer(){return this}remove(){var t=this.getNativeCanvasElement();return gs.Node.prototype.remove.call(this),t&&t.parentNode&&Ur.Util._isInDocument(t)&&t.parentNode.removeChild(t),this}getStage(){return this.parent}setSize({width:t,height:e}){return this.canvas.setSize(t,e),this.hitCanvas.setSize(t,e),this._setSmoothEnabled(),this}_validateAdd(t){var e=t.getType();e!=="Group"&&e!=="Shape"&&Ur.Util.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(),gs.Node.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(){Ur.Util.warn('Can not change width of layer. Use "stage.width(value)" function instead.')}getHeight(){if(this.parent)return this.parent.height()}setHeight(){Ur.Util.warn('Can not change height of layer. Use "stage.height(value)" function instead.')}batchDraw(){return this._waitingForDraw||(this._waitingForDraw=!0,Ur.Util.requestAnimFrame(()=>{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;for(var e=1,r=!1;;){for(let i=0;i<HT;i++){const s=sv[i],a=this._getIntersection({x:t.x+s.x*e,y:t.y+s.y*e}),o=a.shape;if(o)return o;if(r=!!a.antialiased,!a.antialiased)break}if(r)e+=1;else return null}}_getIntersection(t){const e=this.hitCanvas.pixelRatio,r=this.hitCanvas.context.getImageData(Math.round(t.x*e),Math.round(t.y*e),1,1).data,i=r[3];if(i===255){const s=Ur.Util._rgbToHex(r[0],r[1],r[2]),a=UT.shapes[zT+s];return a?{shape:a}:{antialiased:!0}}else if(i>0)return{antialiased:!0};return{}}drawScene(t,e){var r=this.getLayer(),i=t||r&&r.getCanvas();return this._fire(VT,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),rd.Container.prototype.drawScene.call(this,i,e),this._fire(BT,{node:this}),this}drawHit(t,e){var r=this.getLayer(),i=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),rd.Container.prototype.drawHit.call(this,i,e),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){Ur.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return Ur.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var t=this.parent,e=!!this.hitCanvas._canvas.parentNode;e?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}destroy(){return Ur.Util.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}}rv=Ta.Layer=ms,ms.prototype.nodeType="Layer",(0,GT._registerNode)(ms),id.Factory.addGetterSetter(ms,"imageSmoothingEnabled",!0),id.Factory.addGetterSetter(ms,"clearBeforeDraw",!0),id.Factory.addGetterSetter(ms,"hitGraphEnabled",!0,(0,LT.getBooleanValidator)());const qT=Mt({__proto__:null,get Layer(){return rv},default:Ta},[Ta]),av=Dt(qT);var Ea={};Object.defineProperty(Ea,"__esModule",{value:!0});var ov=Ea.FastLayer=void 0;const YT=$e,KT=av,XT=ne;class sd extends KT.Layer{constructor(t){super(t),this.listening(!1),YT.Util.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}ov=Ea.FastLayer=sd,sd.prototype.nodeType="FastLayer",(0,XT._registerNode)(sd);const JT=Mt({__proto__:null,get FastLayer(){return ov},default:Ea},[Ea]),QT=Dt(JT);var Pa={};Object.defineProperty(Pa,"__esModule",{value:!0});var lv=Pa.Group=void 0;const ZT=$e,WT=Ml,tE=ne;class ad extends WT.Container{_validateAdd(t){var e=t.getType();e!=="Group"&&e!=="Shape"&&ZT.Util.throw("You may only add groups and shapes to groups.")}}lv=Pa.Group=ad,ad.prototype.nodeType="Group",(0,tE._registerNode)(ad);const eE=Mt({__proto__:null,get Group(){return lv},default:Pa},[Pa]),od=Dt(eE);var Aa={};Object.defineProperty(Aa,"__esModule",{value:!0});var cv=Aa.Animation=void 0;const ld=ne,hv=$e,cd=function(){return ld.glob.performance&&ld.glob.performance.now?function(){return ld.glob.performance.now()}:function(){return new Date().getTime()}}();class yr{constructor(t,e){this.id=yr.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:cd(),frameRate:0},this.func=t,this.setLayers(e)}setLayers(t){let e=[];return t&&(e=Array.isArray(t)?t:[t]),this.layers=e,this}getLayers(){return this.layers}addLayer(t){const e=this.layers,r=e.length;for(let i=0;i<r;i++)if(e[i]._id===t._id)return!1;return this.layers.push(t),!0}isRunning(){const t=yr.animations,e=t.length;for(let r=0;r<e;r++)if(t[r].id===this.id)return!0;return!1}start(){return this.stop(),this.frame.timeDiff=0,this.frame.lastTime=cd(),yr._addAnimation(this),this}stop(){return yr._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 e=t.id,r=this.animations,i=r.length;for(let s=0;s<i;s++)if(r[s].id===e){this.animations.splice(s,1);break}}static _runFrames(){const t={},e=this.animations;for(let r=0;r<e.length;r++){const i=e[r],s=i.layers,a=i.func;i._updateFrameObject(cd());const o=s.length;let l;if(a?l=a.call(i,i.frame)!==!1:l=!0,!!l)for(let c=0;c<o;c++){const h=s[c];h._id!==void 0&&(t[h._id]=h)}}for(let r in t)t.hasOwnProperty(r)&&t[r].batchDraw()}static _animationLoop(){const t=yr;t.animations.length?(t._runFrames(),hv.Util.requestAnimFrame(t._animationLoop)):t.animRunning=!1}static _handleAnimation(){this.animRunning||(this.animRunning=!0,hv.Util.requestAnimFrame(this._animationLoop))}}cv=Aa.Animation=yr,yr.animations=[],yr.animIdCounter=0,yr.animRunning=!1;const nE=Mt({__proto__:null,get Animation(){return cv},default:Aa},[Aa]),hd=Dt(nE);var ud={};(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.Easings=n.Tween=void 0;const t=$e,e=hd,r=Le,i=ne;var s={node:1,duration:1,easing:1,onFinish:1,yoyo:1},a=1,o=2,l=3,c=0,h=["fill","stroke","shadowColor"];class f{constructor(p,v,_,x,b,m,k){this.prop=p,this.propFunc=v,this.begin=x,this._pos=x,this.duration=m,this._change=0,this.prevPos=0,this.yoyo=k,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=_,this._change=b-this.begin,this.pause()}fire(p){var v=this[p];v&&v()}setTime(p){p>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():p<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=p,this.update())}getTime(){return this._time}setPosition(p){this.prevPos=this._pos,this.propFunc(p),this._pos=p}getPosition(p){return p===void 0&&(p=this._time),this.func(p,this.begin,this._change,this.duration)}play(){this.state=o,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=l,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(p){this.pause(),this._time=p,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(){var p=this.getTimer()-this._startTime;this.state===o?this.setTime(p):this.state===l&&this.setTime(this.duration-p)}pause(){this.state=a,this.fire("onPause")}getTimer(){return new Date().getTime()}}class d{constructor(p){var v=this,_=p.node,x=_._id,b,m=p.easing||n.Easings.Linear,k=!!p.yoyo,O;typeof p.duration>"u"?b=.3:p.duration===0?b=.001:b=p.duration,this.node=_,this._id=c++;var T=_.getLayer()||(_ instanceof i.Konva.Stage?_.getLayers():null);T||t.Util.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new e.Animation(function(){v.tween.onEnterFrame()},T),this.tween=new f(O,function(F){v._tweenFunc(F)},m,0,1,b*1e3,k),this._addListeners(),d.attrs[x]||(d.attrs[x]={}),d.attrs[x][this._id]||(d.attrs[x][this._id]={}),d.tweens[x]||(d.tweens[x]={});for(O in p)s[O]===void 0&&this._addAttr(O,p[O]);this.reset(),this.onFinish=p.onFinish,this.onReset=p.onReset,this.onUpdate=p.onUpdate}_addAttr(p,v){var _=this.node,x=_._id,b,m,k,O,T,F,R,L;if(k=d.tweens[x][p],k&&delete d.attrs[x][k][p],b=_.getAttr(p),t.Util._isArray(v))if(m=[],T=Math.max(v.length,b.length),p==="points"&&v.length!==b.length&&(v.length>b.length?(R=b,b=t.Util._prepareArrayForTween(b,v,_.closed())):(F=v,v=t.Util._prepareArrayForTween(v,b,_.closed()))),p.indexOf("fill")===0)for(O=0;O<T;O++)if(O%2===0)m.push(v[O]-b[O]);else{var U=t.Util.colorToRGBA(b[O]);L=t.Util.colorToRGBA(v[O]),b[O]=U,m.push({r:L.r-U.r,g:L.g-U.g,b:L.b-U.b,a:L.a-U.a})}else for(O=0;O<T;O++)m.push(v[O]-b[O]);else h.indexOf(p)!==-1?(b=t.Util.colorToRGBA(b),L=t.Util.colorToRGBA(v),m={r:L.r-b.r,g:L.g-b.g,b:L.b-b.b,a:L.a-b.a}):m=v-b;d.attrs[x][this._id][p]={start:b,diff:m,end:v,trueEnd:F,trueStart:R},d.tweens[x][p]=this._id}_tweenFunc(p){var v=this.node,_=d.attrs[v._id][this._id],x,b,m,k,O,T,F,R;for(x in _){if(b=_[x],m=b.start,k=b.diff,R=b.end,t.Util._isArray(m))if(O=[],F=Math.max(m.length,R.length),x.indexOf("fill")===0)for(T=0;T<F;T++)T%2===0?O.push((m[T]||0)+k[T]*p):O.push("rgba("+Math.round(m[T].r+k[T].r*p)+","+Math.round(m[T].g+k[T].g*p)+","+Math.round(m[T].b+k[T].b*p)+","+(m[T].a+k[T].a*p)+")");else for(T=0;T<F;T++)O.push((m[T]||0)+k[T]*p);else h.indexOf(x)!==-1?O="rgba("+Math.round(m.r+k.r*p)+","+Math.round(m.g+k.g*p)+","+Math.round(m.b+k.b*p)+","+(m.a+k.a*p)+")":O=m+k*p;v.setAttr(x,O)}}_addListeners(){this.tween.onPlay=()=>{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var p=this.node,v=d.attrs[p._id][this._id];v.points&&v.points.trueEnd&&p.setAttr("points",v.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var p=this.node,v=d.attrs[p._id][this._id];v.points&&v.points.trueStart&&p.points(v.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(p){return this.tween.seek(p*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var p=this.node._id,v=this._id,_=d.tweens[p],x;this.pause();for(x in _)delete d.tweens[p][x];delete d.attrs[p][v]}}n.Tween=d,d.attrs={},d.tweens={},r.Node.prototype.to=function(u){var p=u.onFinish;u.node=this,u.onFinish=function(){this.destroy(),p&&p()};var v=new d(u);v.play()},n.Easings={BackEaseIn(u,p,v,_){var x=1.70158;return v*(u/=_)*u*((x+1)*u-x)+p},BackEaseOut(u,p,v,_){var x=1.70158;return v*((u=u/_-1)*u*((x+1)*u+x)+1)+p},BackEaseInOut(u,p,v,_){var x=1.70158;return(u/=_/2)<1?v/2*(u*u*(((x*=1.525)+1)*u-x))+p:v/2*((u-=2)*u*(((x*=1.525)+1)*u+x)+2)+p},ElasticEaseIn(u,p,v,_,x,b){var m=0;return u===0?p:(u/=_)===1?p+v:(b||(b=_*.3),!x||x<Math.abs(v)?(x=v,m=b/4):m=b/(2*Math.PI)*Math.asin(v/x),-(x*Math.pow(2,10*(u-=1))*Math.sin((u*_-m)*(2*Math.PI)/b))+p)},ElasticEaseOut(u,p,v,_,x,b){var m=0;return u===0?p:(u/=_)===1?p+v:(b||(b=_*.3),!x||x<Math.abs(v)?(x=v,m=b/4):m=b/(2*Math.PI)*Math.asin(v/x),x*Math.pow(2,-10*u)*Math.sin((u*_-m)*(2*Math.PI)/b)+v+p)},ElasticEaseInOut(u,p,v,_,x,b){var m=0;return u===0?p:(u/=_/2)===2?p+v:(b||(b=_*(.3*1.5)),!x||x<Math.abs(v)?(x=v,m=b/4):m=b/(2*Math.PI)*Math.asin(v/x),u<1?-.5*(x*Math.pow(2,10*(u-=1))*Math.sin((u*_-m)*(2*Math.PI)/b))+p:x*Math.pow(2,-10*(u-=1))*Math.sin((u*_-m)*(2*Math.PI)/b)*.5+v+p)},BounceEaseOut(u,p,v,_){return(u/=_)<1/2.75?v*(7.5625*u*u)+p:u<2/2.75?v*(7.5625*(u-=1.5/2.75)*u+.75)+p:u<2.5/2.75?v*(7.5625*(u-=2.25/2.75)*u+.9375)+p:v*(7.5625*(u-=2.625/2.75)*u+.984375)+p},BounceEaseIn(u,p,v,_){return v-n.Easings.BounceEaseOut(_-u,0,v,_)+p},BounceEaseInOut(u,p,v,_){return u<_/2?n.Easings.BounceEaseIn(u*2,0,v,_)*.5+p:n.Easings.BounceEaseOut(u*2-_,0,v,_)*.5+v*.5+p},EaseIn(u,p,v,_){return v*(u/=_)*u+p},EaseOut(u,p,v,_){return-v*(u/=_)*(u-2)+p},EaseInOut(u,p,v,_){return(u/=_/2)<1?v/2*u*u+p:-v/2*(--u*(u-2)-1)+p},StrongEaseIn(u,p,v,_){return v*(u/=_)*u*u*u*u+p},StrongEaseOut(u,p,v,_){return v*((u=u/_-1)*u*u*u*u+1)+p},StrongEaseInOut(u,p,v,_){return(u/=_/2)<1?v/2*u*u*u*u*u+p:v/2*((u-=2)*u*u*u*u+2)+p},Linear(u,p,v,_){return v*u/_+p}}})(ud);const rE=An(ud),iE=Mt({__proto__:null,default:rE},[ud]),sE=Dt(iE);(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.Konva=void 0;const t=ne,e=$e,r=Le,i=Ml,s=DT,a=av,o=QT,l=od,c=Ju,h=Ze,f=hd,d=sE,u=M1,p=Al;n.Konva=e.Util._assign(t.Konva,{Util:e.Util,Transform:e.Transform,Node:r.Node,Container:i.Container,Stage:s.Stage,stages:s.stages,Layer:a.Layer,FastLayer:o.FastLayer,Group:l.Group,DD:c.DD,Shape:h.Shape,shapes:h.shapes,Animation:f.Animation,Tween:d.Tween,Easings:d.Easings,Context:u.Context,Canvas:p.Canvas}),n.default=n.Konva})(Hu);const aE=An(Hu),oE=Mt({__proto__:null,default:aE},[Hu]),lE=Dt(oE);var Oa={};Object.defineProperty(Oa,"__esModule",{value:!0});var uv=Oa.Arc=void 0;const Dl=ee,cE=Ze,dv=ne,Il=re,hE=ne;class Gr extends cE.Shape{_sceneFunc(t){var e=dv.Konva.getAngle(this.angle()),r=this.clockwise();t.beginPath(),t.arc(0,0,this.outerRadius(),0,e,r),t.arc(0,0,this.innerRadius(),e,0,!r),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(),e=this.outerRadius(),r=this.clockwise(),i=dv.Konva.getAngle(r?360-this.angle():this.angle()),s=Math.cos(Math.min(i,Math.PI)),a=1,o=Math.sin(Math.min(Math.max(Math.PI,i),3*Math.PI/2)),l=Math.sin(Math.min(i,Math.PI/2)),c=s*(s>0?t:e),h=a*e,f=o*(o>0?t:e),d=l*(l>0?e:t);return{x:c,y:r?-1*d:f,width:h-c,height:d-f}}}uv=Oa.Arc=Gr,Gr.prototype._centroid=!0,Gr.prototype.className="Arc",Gr.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,hE._registerNode)(Gr),Dl.Factory.addGetterSetter(Gr,"innerRadius",0,(0,Il.getNumberValidator)()),Dl.Factory.addGetterSetter(Gr,"outerRadius",0,(0,Il.getNumberValidator)()),Dl.Factory.addGetterSetter(Gr,"angle",0,(0,Il.getNumberValidator)()),Dl.Factory.addGetterSetter(Gr,"clockwise",!1,(0,Il.getBooleanValidator)());const uE=Mt({__proto__:null,get Arc(){return uv},default:Oa},[Oa]),dE=Dt(uE);var $a={},Na={};Object.defineProperty(Na,"__esModule",{value:!0});var fv=Na.Line=void 0;const jl=ee,fE=Ze,pv=re,pE=ne;function dd(n,t,e,r,i,s,a){var o=Math.sqrt(Math.pow(e-n,2)+Math.pow(r-t,2)),l=Math.sqrt(Math.pow(i-e,2)+Math.pow(s-r,2)),c=a*o/(o+l),h=a*l/(o+l),f=e-c*(i-n),d=r-c*(s-t),u=e+h*(i-n),p=r+h*(s-t);return[f,d,u,p]}function gv(n,t){var e=n.length,r=[],i,s;for(i=2;i<e-2;i+=2)s=dd(n[i-2],n[i-1],n[i],n[i+1],n[i+2],n[i+3],t),!isNaN(s[0])&&(r.push(s[0]),r.push(s[1]),r.push(n[i]),r.push(n[i+1]),r.push(s[2]),r.push(s[3]));return r}class oi extends fE.Shape{constructor(t){super(t),this.on("pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva",function(){this._clearCache("tensionPoints")})}_sceneFunc(t){var e=this.points(),r=e.length,i=this.tension(),s=this.closed(),a=this.bezier(),o,l,c;if(r){if(t.beginPath(),t.moveTo(e[0],e[1]),i!==0&&r>4){for(o=this.getTensionPoints(),l=o.length,c=s?0:4,s||t.quadraticCurveTo(o[0],o[1],o[2],o[3]);c<l-2;)t.bezierCurveTo(o[c++],o[c++],o[c++],o[c++],o[c++],o[c++]);s||t.quadraticCurveTo(o[l-2],o[l-1],e[r-2],e[r-1])}else if(a)for(c=2;c<r;)t.bezierCurveTo(e[c++],e[c++],e[c++],e[c++],e[c++],e[c++]);else for(c=2;c<r;c+=2)t.lineTo(e[c],e[c+1]);s?(t.closePath(),t.fillStrokeShape(this)):t.strokeShape(this)}}getTensionPoints(){return this._getCache("tensionPoints",this._getTensionPoints)}_getTensionPoints(){return this.closed()?this._getTensionPointsClosed():gv(this.points(),this.tension())}_getTensionPointsClosed(){var t=this.points(),e=t.length,r=this.tension(),i=dd(t[e-2],t[e-1],t[0],t[1],t[2],t[3],r),s=dd(t[e-4],t[e-3],t[e-2],t[e-1],t[0],t[1],r),a=gv(t,r),o=[i[2],i[3]].concat(a).concat([s[0],s[1],t[e-2],t[e-1],s[2],s[3],i[0],i[1],t[0],t[1]]);return o}getWidth(){return this.getSelfRect().width}getHeight(){return this.getSelfRect().height}getSelfRect(){var 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();for(var e=t[0],r=t[0],i=t[1],s=t[1],a,o,l=0;l<t.length/2;l++)a=t[l*2],o=t[l*2+1],e=Math.min(e,a),r=Math.max(r,a),i=Math.min(i,o),s=Math.max(s,o);return{x:e,y:i,width:r-e,height:s-i}}}fv=Na.Line=oi,oi.prototype.className="Line",oi.prototype._attrsAffectingSize=["points","bezier","tension"],(0,pE._registerNode)(oi),jl.Factory.addGetterSetter(oi,"closed",!1),jl.Factory.addGetterSetter(oi,"bezier",!1),jl.Factory.addGetterSetter(oi,"tension",0,(0,pv.getNumberValidator)()),jl.Factory.addGetterSetter(oi,"points",[],(0,pv.getNumberArrayValidator)());const gE=Mt({__proto__:null,get Line(){return fv},default:Na},[Na]),mv=Dt(gE);var Fa={},fd={};(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.t2length=n.getQuadraticArcLength=n.getCubicArcLength=n.binomialCoefficients=n.cValues=n.tValues=void 0,n.tValues=[[],[],[-.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]],n.cValues=[[],[],[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]],n.binomialCoefficients=[[1],[1,1],[1,2,1],[1,3,3,1]];const t=(a,o,l)=>{let c,h,f;c=l/2,h=0;for(let d=0;d<20;d++)f=c*n.tValues[20][d]+c,h+=n.cValues[20][d]*r(a,o,f);return c*h};n.getCubicArcLength=t;const e=(a,o,l)=>{l===void 0&&(l=1);const c=a[0]-2*a[1]+a[2],h=o[0]-2*o[1]+o[2],f=2*a[1]-2*a[0],d=2*o[1]-2*o[0],u=4*(c*c+h*h),p=4*(c*f+h*d),v=f*f+d*d;if(u===0)return l*Math.sqrt(Math.pow(a[2]-a[0],2)+Math.pow(o[2]-o[0],2));const _=p/(2*u),x=v/u,b=l+_,m=x-_*_,k=b*b+m>0?Math.sqrt(b*b+m):0,O=_*_+m>0?Math.sqrt(_*_+m):0,T=_+Math.sqrt(_*_+m)!==0?m*Math.log(Math.abs((b+k)/(_+O))):0;return Math.sqrt(u)/2*(b*k-_*O+T)};n.getQuadraticArcLength=e;function r(a,o,l){const c=i(1,l,a),h=i(1,l,o),f=c*c+h*h;return Math.sqrt(f)}const i=(a,o,l)=>{const c=l.length-1;let h,f;if(c===0)return 0;if(a===0){f=0;for(let d=0;d<=c;d++)f+=n.binomialCoefficients[c][d]*Math.pow(1-o,c-d)*Math.pow(o,d)*l[d];return f}else{h=new Array(c);for(let d=0;d<c;d++)h[d]=c*(l[d+1]-l[d]);return i(a-1,o,h)}},s=(a,o,l)=>{let c=1,h=a/o,f=(a-l(h))/o,d=0;for(;c>.001;){const u=l(h+f),p=Math.abs(a-u)/o;if(p<c)c=p,h+=f;else{const v=l(h-f),_=Math.abs(a-v)/o;_<c?(c=_,h-=f):f/=2}if(d++,d>500)break}return h};n.t2length=s})(fd);const mE=An(fd),vE=Mt({__proto__:null,default:mE},[fd]),yE=Dt(vE);Object.defineProperty(Fa,"__esModule",{value:!0});var vv=Fa.Path=void 0;const _E=ee,bE=Ze,wE=ne,vs=yE;class qe extends bE.Shape{constructor(t){super(t),this.dataArray=[],this.pathLength=0,this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute()})}_readDataAttribute(){this.dataArray=qe.parsePathData(this.data()),this.pathLength=qe.getPathLength(this.dataArray)}_sceneFunc(t){var e=this.dataArray;t.beginPath();for(var r=!1,i=0;i<e.length;i++){var s=e[i].command,a=e[i].points;switch(s){case"L":t.lineTo(a[0],a[1]);break;case"M":t.moveTo(a[0],a[1]);break;case"C":t.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"Q":t.quadraticCurveTo(a[0],a[1],a[2],a[3]);break;case"A":var o=a[0],l=a[1],c=a[2],h=a[3],f=a[4],d=a[5],u=a[6],p=a[7],v=c>h?c:h,_=c>h?1:c/h,x=c>h?h/c:1;t.translate(o,l),t.rotate(u),t.scale(_,x),t.arc(0,0,v,f,f+d,1-p),t.scale(1/_,1/x),t.rotate(-u),t.translate(-o,-l);break;case"z":r=!0,t.closePath();break}}!r&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(c){if(c.command==="A"){var h=c.points[4],f=c.points[5],d=c.points[4]+f,u=Math.PI/180;if(Math.abs(h-d)<u&&(u=Math.abs(h-d)),f<0)for(let p=h-u;p>d;p-=u){const v=qe.getPointOnEllipticalArc(c.points[0],c.points[1],c.points[2],c.points[3],p,0);t.push(v.x,v.y)}else for(let p=h+u;p<d;p+=u){const v=qe.getPointOnEllipticalArc(c.points[0],c.points[1],c.points[2],c.points[3],p,0);t.push(v.x,v.y)}}else if(c.command==="C")for(let p=0;p<=1;p+=.01){const v=qe.getPointOnCubicBezier(p,c.start.x,c.start.y,c.points[0],c.points[1],c.points[2],c.points[3],c.points[4],c.points[5]);t.push(v.x,v.y)}else t=t.concat(c.points)});for(var e=t[0],r=t[0],i=t[1],s=t[1],a,o,l=0;l<t.length/2;l++)a=t[l*2],o=t[l*2+1],isNaN(a)||(e=Math.min(e,a),r=Math.max(r,a)),isNaN(o)||(i=Math.min(i,o),s=Math.max(s,o));return{x:e,y:i,width:r-e,height:s-i}}getLength(){return this.pathLength}getPointAtLength(t){return qe.getPointAtLengthOfDataArray(t,this.dataArray)}static getLineLength(t,e,r,i){return Math.sqrt((r-t)*(r-t)+(i-e)*(i-e))}static getPathLength(t){let e=0;for(var r=0;r<t.length;++r)e+=t[r].pathLength;return e}static getPointAtLengthOfDataArray(t,e){var r,i=0,s=e.length;if(!s)return null;for(;i<s&&t>e[i].pathLength;)t-=e[i].pathLength,++i;if(i===s)return r=e[i-1].points.slice(-2),{x:r[0],y:r[1]};if(t<.01)return r=e[i].points.slice(0,2),{x:r[0],y:r[1]};var a=e[i],o=a.points;switch(a.command){case"L":return qe.getPointOnLine(t,a.start.x,a.start.y,o[0],o[1]);case"C":return qe.getPointOnCubicBezier((0,vs.t2length)(t,qe.getPathLength(e),v=>(0,vs.getCubicArcLength)([a.start.x,o[0],o[2],o[4]],[a.start.y,o[1],o[3],o[5]],v)),a.start.x,a.start.y,o[0],o[1],o[2],o[3],o[4],o[5]);case"Q":return qe.getPointOnQuadraticBezier((0,vs.t2length)(t,qe.getPathLength(e),v=>(0,vs.getQuadraticArcLength)([a.start.x,o[0],o[2]],[a.start.y,o[1],o[3]],v)),a.start.x,a.start.y,o[0],o[1],o[2],o[3]);case"A":var l=o[0],c=o[1],h=o[2],f=o[3],d=o[4],u=o[5],p=o[6];return d+=u*t/a.pathLength,qe.getPointOnEllipticalArc(l,c,h,f,d,p)}return null}static getPointOnLine(t,e,r,i,s,a,o){a===void 0&&(a=e),o===void 0&&(o=r);var l=(s-r)/(i-e+1e-8),c=Math.sqrt(t*t/(1+l*l));i<e&&(c*=-1);var h=l*c,f;if(i===e)f={x:a,y:o+h};else if((o-r)/(a-e+1e-8)===l)f={x:a+c,y:o+h};else{var d,u,p=this.getLineLength(e,r,i,s),v=(a-e)*(i-e)+(o-r)*(s-r);v=v/(p*p),d=e+v*(i-e),u=r+v*(s-r);var _=this.getLineLength(a,o,d,u),x=Math.sqrt(t*t-_*_);c=Math.sqrt(x*x/(1+l*l)),i<e&&(c*=-1),h=l*c,f={x:d+c,y:u+h}}return f}static getPointOnCubicBezier(t,e,r,i,s,a,o,l,c){function h(_){return _*_*_}function f(_){return 3*_*_*(1-_)}function d(_){return 3*_*(1-_)*(1-_)}function u(_){return(1-_)*(1-_)*(1-_)}var p=l*h(t)+a*f(t)+i*d(t)+e*u(t),v=c*h(t)+o*f(t)+s*d(t)+r*u(t);return{x:p,y:v}}static getPointOnQuadraticBezier(t,e,r,i,s,a,o){function l(u){return u*u}function c(u){return 2*u*(1-u)}function h(u){return(1-u)*(1-u)}var f=a*l(t)+i*c(t)+e*h(t),d=o*l(t)+s*c(t)+r*h(t);return{x:f,y:d}}static getPointOnEllipticalArc(t,e,r,i,s,a){var o=Math.cos(a),l=Math.sin(a),c={x:r*Math.cos(s),y:i*Math.sin(s)};return{x:t+(c.x*o-c.y*l),y:e+(c.x*l+c.y*o)}}static parsePathData(t){if(!t)return[];var e=t,r=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"];e=e.replace(new RegExp(" ","g"),",");for(var i=0;i<r.length;i++)e=e.replace(new RegExp(r[i],"g"),"|"+r[i]);var s=e.split("|"),a=[],o=[],l=0,c=0,h=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi,f;for(i=1;i<s.length;i++){var d=s[i],u=d.charAt(0);for(d=d.slice(1),o.length=0;f=h.exec(d);)o.push(f[0]);for(var p=[],v=0,_=o.length;v<_;v++){if(o[v]==="00"){p.push(0,0);continue}var x=parseFloat(o[v]);isNaN(x)?p.push(0):p.push(x)}for(;p.length>0&&!isNaN(p[0]);){var b="",m=[],k=l,O=c,T,F,R,L,U,B,Y,tt,W,ct;switch(u){case"l":l+=p.shift(),c+=p.shift(),b="L",m.push(l,c);break;case"L":l=p.shift(),c=p.shift(),m.push(l,c);break;case"m":var wt=p.shift(),St=p.shift();if(l+=wt,c+=St,b="M",a.length>2&&a[a.length-1].command==="z"){for(var xt=a.length-2;xt>=0;xt--)if(a[xt].command==="M"){l=a[xt].points[0]+wt,c=a[xt].points[1]+St;break}}m.push(l,c),u="l";break;case"M":l=p.shift(),c=p.shift(),b="M",m.push(l,c),u="L";break;case"h":l+=p.shift(),b="L",m.push(l,c);break;case"H":l=p.shift(),b="L",m.push(l,c);break;case"v":c+=p.shift(),b="L",m.push(l,c);break;case"V":c=p.shift(),b="L",m.push(l,c);break;case"C":m.push(p.shift(),p.shift(),p.shift(),p.shift()),l=p.shift(),c=p.shift(),m.push(l,c);break;case"c":m.push(l+p.shift(),c+p.shift(),l+p.shift(),c+p.shift()),l+=p.shift(),c+=p.shift(),b="C",m.push(l,c);break;case"S":F=l,R=c,T=a[a.length-1],T.command==="C"&&(F=l+(l-T.points[2]),R=c+(c-T.points[3])),m.push(F,R,p.shift(),p.shift()),l=p.shift(),c=p.shift(),b="C",m.push(l,c);break;case"s":F=l,R=c,T=a[a.length-1],T.command==="C"&&(F=l+(l-T.points[2]),R=c+(c-T.points[3])),m.push(F,R,l+p.shift(),c+p.shift()),l+=p.shift(),c+=p.shift(),b="C",m.push(l,c);break;case"Q":m.push(p.shift(),p.shift()),l=p.shift(),c=p.shift(),m.push(l,c);break;case"q":m.push(l+p.shift(),c+p.shift()),l+=p.shift(),c+=p.shift(),b="Q",m.push(l,c);break;case"T":F=l,R=c,T=a[a.length-1],T.command==="Q"&&(F=l+(l-T.points[0]),R=c+(c-T.points[1])),l=p.shift(),c=p.shift(),b="Q",m.push(F,R,l,c);break;case"t":F=l,R=c,T=a[a.length-1],T.command==="Q"&&(F=l+(l-T.points[0]),R=c+(c-T.points[1])),l+=p.shift(),c+=p.shift(),b="Q",m.push(F,R,l,c);break;case"A":L=p.shift(),U=p.shift(),B=p.shift(),Y=p.shift(),tt=p.shift(),W=l,ct=c,l=p.shift(),c=p.shift(),b="A",m=this.convertEndpointToCenterParameterization(W,ct,l,c,Y,tt,L,U,B);break;case"a":L=p.shift(),U=p.shift(),B=p.shift(),Y=p.shift(),tt=p.shift(),W=l,ct=c,l+=p.shift(),c+=p.shift(),b="A",m=this.convertEndpointToCenterParameterization(W,ct,l,c,Y,tt,L,U,B);break}a.push({command:b||u,points:m,start:{x:k,y:O},pathLength:this.calcLength(k,O,b||u,m)})}(u==="z"||u==="Z")&&a.push({command:"z",points:[],start:void 0,pathLength:0})}return a}static calcLength(t,e,r,i){var s,a,o,l,c=qe;switch(r){case"L":return c.getLineLength(t,e,i[0],i[1]);case"C":return(0,vs.getCubicArcLength)([t,i[0],i[2],i[4]],[e,i[1],i[3],i[5]],1);case"Q":return(0,vs.getQuadraticArcLength)([t,i[0],i[2]],[e,i[1],i[3]],1);case"A":s=0;var h=i[4],f=i[5],d=i[4]+f,u=Math.PI/180;if(Math.abs(h-d)<u&&(u=Math.abs(h-d)),a=c.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],h,0),f<0)for(l=h-u;l>d;l-=u)o=c.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),s+=c.getLineLength(a.x,a.y,o.x,o.y),a=o;else for(l=h+u;l<d;l+=u)o=c.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),s+=c.getLineLength(a.x,a.y,o.x,o.y),a=o;return o=c.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],d,0),s+=c.getLineLength(a.x,a.y,o.x,o.y),s}return 0}static convertEndpointToCenterParameterization(t,e,r,i,s,a,o,l,c){var h=c*(Math.PI/180),f=Math.cos(h)*(t-r)/2+Math.sin(h)*(e-i)/2,d=-1*Math.sin(h)*(t-r)/2+Math.cos(h)*(e-i)/2,u=f*f/(o*o)+d*d/(l*l);u>1&&(o*=Math.sqrt(u),l*=Math.sqrt(u));var p=Math.sqrt((o*o*(l*l)-o*o*(d*d)-l*l*(f*f))/(o*o*(d*d)+l*l*(f*f)));s===a&&(p*=-1),isNaN(p)&&(p=0);var v=p*o*d/l,_=p*-l*f/o,x=(t+r)/2+Math.cos(h)*v-Math.sin(h)*_,b=(e+i)/2+Math.sin(h)*v+Math.cos(h)*_,m=function(U){return Math.sqrt(U[0]*U[0]+U[1]*U[1])},k=function(U,B){return(U[0]*B[0]+U[1]*B[1])/(m(U)*m(B))},O=function(U,B){return(U[0]*B[1]<U[1]*B[0]?-1:1)*Math.acos(k(U,B))},T=O([1,0],[(f-v)/o,(d-_)/l]),F=[(f-v)/o,(d-_)/l],R=[(-1*f-v)/o,(-1*d-_)/l],L=O(F,R);return k(F,R)<=-1&&(L=Math.PI),k(F,R)>=1&&(L=0),a===0&&L>0&&(L=L-2*Math.PI),a===1&&L<0&&(L=L+2*Math.PI),[x,b,o,l,T,L,h,a]}}vv=Fa.Path=qe,qe.prototype.className="Path",qe.prototype._attrsAffectingSize=["data"],(0,wE._registerNode)(qe),_E.Factory.addGetterSetter(qe,"data");const xE=Mt({__proto__:null,get Path(){return vv},default:Fa},[Fa]),pd=Dt(xE);Object.defineProperty($a,"__esModule",{value:!0});var yv=$a.Arrow=void 0;const Ll=ee,SE=mv,_v=re,kE=ne,bv=pd;class Li extends SE.Line{_sceneFunc(t){super._sceneFunc(t);var e=Math.PI*2,r=this.points(),i=r,s=this.tension()!==0&&r.length>4;s&&(i=this.getTensionPoints());var a=this.pointerLength(),o=r.length,l,c;if(s){const d=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],r[o-2],r[o-1]],u=bv.Path.calcLength(i[i.length-4],i[i.length-3],"C",d),p=bv.Path.getPointOnQuadraticBezier(Math.min(1,1-a/u),d[0],d[1],d[2],d[3],d[4],d[5]);l=r[o-2]-p.x,c=r[o-1]-p.y}else l=r[o-2]-r[o-4],c=r[o-1]-r[o-3];var h=(Math.atan2(c,l)+e)%e,f=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[o-2],r[o-1]),t.rotate(h),t.moveTo(0,0),t.lineTo(-a,f/2),t.lineTo(-a,-f/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(r[0],r[1]),s?(l=(i[0]+i[2])/2-r[0],c=(i[1]+i[3])/2-r[1]):(l=r[2]-r[0],c=r[3]-r[1]),t.rotate((Math.atan2(-c,-l)+e)%e),t.moveTo(0,0),t.lineTo(-a,f/2),t.lineTo(-a,-f/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){var e=this.dashEnabled();e&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),e&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),e=this.pointerWidth()/2;return{x:t.x-e,y:t.y-e,width:t.width+e*2,height:t.height+e*2}}}yv=$a.Arrow=Li,Li.prototype.className="Arrow",(0,kE._registerNode)(Li),Ll.Factory.addGetterSetter(Li,"pointerLength",10,(0,_v.getNumberValidator)()),Ll.Factory.addGetterSetter(Li,"pointerWidth",10,(0,_v.getNumberValidator)()),Ll.Factory.addGetterSetter(Li,"pointerAtBeginning",!1),Ll.Factory.addGetterSetter(Li,"pointerAtEnding",!0);const CE=Mt({__proto__:null,get Arrow(){return yv},default:$a},[$a]),TE=Dt(CE);var Ra={};Object.defineProperty(Ra,"__esModule",{value:!0});var wv=Ra.Circle=void 0;const EE=ee,PE=Ze,AE=re,OE=ne;class ys extends PE.Shape{_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)}}wv=Ra.Circle=ys,ys.prototype._centroid=!0,ys.prototype.className="Circle",ys.prototype._attrsAffectingSize=["radius"],(0,OE._registerNode)(ys),EE.Factory.addGetterSetter(ys,"radius",0,(0,AE.getNumberValidator)());const $E=Mt({__proto__:null,get Circle(){return wv},default:Ra},[Ra]),NE=Dt($E);var Ma={};Object.defineProperty(Ma,"__esModule",{value:!0});var xv=Ma.Ellipse=void 0;const gd=ee,FE=Ze,Sv=re,RE=ne;class li extends FE.Shape{_sceneFunc(t){var e=this.radiusX(),r=this.radiusY();t.beginPath(),t.save(),e!==r&&t.scale(1,r/e),t.arc(0,0,e,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)}}xv=Ma.Ellipse=li,li.prototype.className="Ellipse",li.prototype._centroid=!0,li.prototype._attrsAffectingSize=["radiusX","radiusY"],(0,RE._registerNode)(li),gd.Factory.addComponentsGetterSetter(li,"radius",["x","y"]),gd.Factory.addGetterSetter(li,"radiusX",0,(0,Sv.getNumberValidator)()),gd.Factory.addGetterSetter(li,"radiusY",0,(0,Sv.getNumberValidator)());const ME=Mt({__proto__:null,get Ellipse(){return xv},default:Ma},[Ma]),DE=Dt(ME);var Da={};Object.defineProperty(Da,"__esModule",{value:!0});var kv=Da.Image=void 0;const md=$e,Ui=ee,IE=Ze,jE=ne,Ia=re;let _r=class i2 extends IE.Shape{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){const e=this.getWidth(),r=this.getHeight(),i=this.cornerRadius(),s=this.attrs.image;let a;if(s){const o=this.attrs.cropWidth,l=this.attrs.cropHeight;o&&l?a=[s,this.cropX(),this.cropY(),o,l,0,0,e,r]:a=[s,0,0,e,r]}(this.hasFill()||this.hasStroke()||i)&&(t.beginPath(),i?md.Util.drawRoundedRectPath(t,e,r,i):t.rect(0,0,e,r),t.closePath(),t.fillStrokeShape(this)),s&&(i&&t.clip(),t.drawImage.apply(t,a))}_hitFunc(t){var e=this.width(),r=this.height(),i=this.cornerRadius();t.beginPath(),i?md.Util.drawRoundedRectPath(t,e,r,i):t.rect(0,0,e,r),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,e;return(t=this.attrs.width)!==null&&t!==void 0?t:(e=this.image())===null||e===void 0?void 0:e.width}getHeight(){var t,e;return(t=this.attrs.height)!==null&&t!==void 0?t:(e=this.image())===null||e===void 0?void 0:e.height}static fromURL(t,e,r=null){var i=md.Util.createImageElement();i.onload=function(){var s=new i2({image:i});e(s)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}};kv=Da.Image=_r,_r.prototype.className="Image",(0,jE._registerNode)(_r),Ui.Factory.addGetterSetter(_r,"cornerRadius",0,(0,Ia.getNumberOrArrayOfNumbersValidator)(4)),Ui.Factory.addGetterSetter(_r,"image"),Ui.Factory.addComponentsGetterSetter(_r,"crop",["x","y","width","height"]),Ui.Factory.addGetterSetter(_r,"cropX",0,(0,Ia.getNumberValidator)()),Ui.Factory.addGetterSetter(_r,"cropY",0,(0,Ia.getNumberValidator)()),Ui.Factory.addGetterSetter(_r,"cropWidth",0,(0,Ia.getNumberValidator)()),Ui.Factory.addGetterSetter(_r,"cropHeight",0,(0,Ia.getNumberValidator)());const LE=Mt({__proto__:null,get Image(){return kv},default:Da},[Da]),UE=Dt(LE);var Gi={};Object.defineProperty(Gi,"__esModule",{value:!0});var Cv=Gi.Tag=Pv=Gi.Label=void 0;const Ul=ee,GE=Ze,zE=od,vd=re,Tv=ne;var Ev=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],VE="Change.konva",BE="none",yd="up",_d="right",bd="down",wd="left",HE=Ev.length;class xd extends zE.Group{constructor(t){super(t),this.on("add.konva",function(e){this._addListeners(e.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){var e=this,r,i=function(){e._sync()};for(r=0;r<HE;r++)t.on(Ev[r]+VE,i)}getWidth(){return this.getText().width()}getHeight(){return this.getText().height()}_sync(){var t=this.getText(),e=this.getTag(),r,i,s,a,o,l,c;if(t&&e){switch(r=t.width(),i=t.height(),s=e.pointerDirection(),a=e.pointerWidth(),c=e.pointerHeight(),o=0,l=0,s){case yd:o=r/2,l=-1*c;break;case _d:o=r+a,l=i/2;break;case bd:o=r/2,l=i+c;break;case wd:o=-1*a,l=i/2;break}e.setAttrs({x:-1*o,y:-1*l,width:r,height:i}),t.setAttrs({x:-1*o,y:-1*l})}}}var Pv=Gi.Label=xd;xd.prototype.className="Label",(0,Tv._registerNode)(xd);class zi extends GE.Shape{_sceneFunc(t){var e=this.width(),r=this.height(),i=this.pointerDirection(),s=this.pointerWidth(),a=this.pointerHeight(),o=this.cornerRadius();let l=0,c=0,h=0,f=0;typeof o=="number"?l=c=h=f=Math.min(o,e/2,r/2):(l=Math.min(o[0]||0,e/2,r/2),c=Math.min(o[1]||0,e/2,r/2),f=Math.min(o[2]||0,e/2,r/2),h=Math.min(o[3]||0,e/2,r/2)),t.beginPath(),t.moveTo(l,0),i===yd&&(t.lineTo((e-s)/2,0),t.lineTo(e/2,-1*a),t.lineTo((e+s)/2,0)),t.lineTo(e-c,0),t.arc(e-c,c,c,Math.PI*3/2,0,!1),i===_d&&(t.lineTo(e,(r-a)/2),t.lineTo(e+s,r/2),t.lineTo(e,(r+a)/2)),t.lineTo(e,r-f),t.arc(e-f,r-f,f,0,Math.PI/2,!1),i===bd&&(t.lineTo((e+s)/2,r),t.lineTo(e/2,r+a),t.lineTo((e-s)/2,r)),t.lineTo(h,r),t.arc(h,r-h,h,Math.PI/2,Math.PI,!1),i===wd&&(t.lineTo(0,(r+a)/2),t.lineTo(-1*s,r/2),t.lineTo(0,(r-a)/2)),t.lineTo(0,l),t.arc(l,l,l,Math.PI,Math.PI*3/2,!1),t.closePath(),t.fillStrokeShape(this)}getSelfRect(){var t=0,e=0,r=this.pointerWidth(),i=this.pointerHeight(),s=this.pointerDirection(),a=this.width(),o=this.height();return s===yd?(e-=i,o+=i):s===bd?o+=i:s===wd?(t-=r*1.5,a+=r):s===_d&&(a+=r*1.5),{x:t,y:e,width:a,height:o}}}Cv=Gi.Tag=zi,zi.prototype.className="Tag",(0,Tv._registerNode)(zi),Ul.Factory.addGetterSetter(zi,"pointerDirection",BE),Ul.Factory.addGetterSetter(zi,"pointerWidth",0,(0,vd.getNumberValidator)()),Ul.Factory.addGetterSetter(zi,"pointerHeight",0,(0,vd.getNumberValidator)()),Ul.Factory.addGetterSetter(zi,"cornerRadius",0,(0,vd.getNumberOrArrayOfNumbersValidator)(4));const qE=Mt({__proto__:null,get Label(){return Pv},get Tag(){return Cv},default:Gi},[Gi]),YE=Dt(qE);var ja={};Object.defineProperty(ja,"__esModule",{value:!0});var Av=ja.Rect=void 0;const KE=ee,XE=Ze,JE=ne,QE=$e,ZE=re;class Gl extends XE.Shape{_sceneFunc(t){var e=this.cornerRadius(),r=this.width(),i=this.height();t.beginPath(),e?QE.Util.drawRoundedRectPath(t,r,i,e):t.rect(0,0,r,i),t.closePath(),t.fillStrokeShape(this)}}Av=ja.Rect=Gl,Gl.prototype.className="Rect",(0,JE._registerNode)(Gl),KE.Factory.addGetterSetter(Gl,"cornerRadius",0,(0,ZE.getNumberOrArrayOfNumbersValidator)(4));const WE=Mt({__proto__:null,get Rect(){return Av},default:ja},[ja]),Ov=Dt(WE);var La={};Object.defineProperty(La,"__esModule",{value:!0});var $v=La.RegularPolygon=void 0;const Nv=ee,t7=Ze,Fv=re,e7=ne;class Vi extends t7.Shape{_sceneFunc(t){const e=this._getPoints();t.beginPath(),t.moveTo(e[0].x,e[0].y);for(var r=1;r<e.length;r++)t.lineTo(e[r].x,e[r].y);t.closePath(),t.fillStrokeShape(this)}_getPoints(){const t=this.attrs.sides,e=this.attrs.radius||0,r=[];for(var i=0;i<t;i++)r.push({x:e*Math.sin(i*2*Math.PI/t),y:-1*e*Math.cos(i*2*Math.PI/t)});return r}getSelfRect(){const t=this._getPoints();var e=t[0].x,r=t[0].y,i=t[0].x,s=t[0].y;return t.forEach(a=>{e=Math.min(e,a.x),r=Math.max(r,a.x),i=Math.min(i,a.y),s=Math.max(s,a.y)}),{x:e,y:i,width:r-e,height:s-i}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}$v=La.RegularPolygon=Vi,Vi.prototype.className="RegularPolygon",Vi.prototype._centroid=!0,Vi.prototype._attrsAffectingSize=["radius"],(0,e7._registerNode)(Vi),Nv.Factory.addGetterSetter(Vi,"radius",0,(0,Fv.getNumberValidator)()),Nv.Factory.addGetterSetter(Vi,"sides",0,(0,Fv.getNumberValidator)());const n7=Mt({__proto__:null,get RegularPolygon(){return $v},default:La},[La]),r7=Dt(n7);var Ua={};Object.defineProperty(Ua,"__esModule",{value:!0});var Rv=Ua.Ring=void 0;const Mv=ee,i7=Ze,Dv=re,s7=ne;var Iv=Math.PI*2;class Bi extends i7.Shape{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,Iv,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),Iv,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)}}Rv=Ua.Ring=Bi,Bi.prototype.className="Ring",Bi.prototype._centroid=!0,Bi.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,s7._registerNode)(Bi),Mv.Factory.addGetterSetter(Bi,"innerRadius",0,(0,Dv.getNumberValidator)()),Mv.Factory.addGetterSetter(Bi,"outerRadius",0,(0,Dv.getNumberValidator)());const a7=Mt({__proto__:null,get Ring(){return Rv},default:Ua},[Ua]),o7=Dt(a7);var Ga={};Object.defineProperty(Ga,"__esModule",{value:!0});var jv=Ga.Sprite=void 0;const Hi=ee,l7=Ze,c7=hd,Lv=re,h7=ne;class br extends l7.Shape{constructor(t){super(t),this._updated=!0,this.anim=new c7.Animation(()=>{var e=this._updated;return this._updated=!1,e}),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){var e=this.animation(),r=this.frameIndex(),i=r*4,s=this.animations()[e],a=this.frameOffsets(),o=s[i+0],l=s[i+1],c=s[i+2],h=s[i+3],f=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,c,h),t.closePath(),t.fillStrokeShape(this)),f)if(a){var d=a[e],u=r*2;t.drawImage(f,o,l,c,h,d[u+0],d[u+1],c,h)}else t.drawImage(f,o,l,c,h,0,0,c,h)}_hitFunc(t){var e=this.animation(),r=this.frameIndex(),i=r*4,s=this.animations()[e],a=this.frameOffsets(),o=s[i+2],l=s[i+3];if(t.beginPath(),a){var c=a[e],h=r*2;t.rect(c[h+0],c[h+1],o,l)}else t.rect(0,0,o,l);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var 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(){var t=this.frameIndex(),e=this.animation(),r=this.animations(),i=r[e],s=i.length/4;t<s-1?this.frameIndex(t+1):this.frameIndex(0)}}jv=Ga.Sprite=br,br.prototype.className="Sprite",(0,h7._registerNode)(br),Hi.Factory.addGetterSetter(br,"animation"),Hi.Factory.addGetterSetter(br,"animations"),Hi.Factory.addGetterSetter(br,"frameOffsets"),Hi.Factory.addGetterSetter(br,"image"),Hi.Factory.addGetterSetter(br,"frameIndex",0,(0,Lv.getNumberValidator)()),Hi.Factory.addGetterSetter(br,"frameRate",17,(0,Lv.getNumberValidator)()),Hi.Factory.backCompat(br,{index:"frameIndex",getIndex:"getFrameIndex",setIndex:"setFrameIndex"});const u7=Mt({__proto__:null,get Sprite(){return jv},default:Ga},[Ga]),d7=Dt(u7);var za={};Object.defineProperty(za,"__esModule",{value:!0});var Uv=za.Star=void 0;const Sd=ee,f7=Ze,kd=re,p7=ne;class ci extends f7.Shape{_sceneFunc(t){var e=this.innerRadius(),r=this.outerRadius(),i=this.numPoints();t.beginPath(),t.moveTo(0,0-r);for(var s=1;s<i*2;s++){var a=s%2===0?r:e,o=a*Math.sin(s*Math.PI/i),l=-1*a*Math.cos(s*Math.PI/i);t.lineTo(o,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)}}Uv=za.Star=ci,ci.prototype.className="Star",ci.prototype._centroid=!0,ci.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,p7._registerNode)(ci),Sd.Factory.addGetterSetter(ci,"numPoints",5,(0,kd.getNumberValidator)()),Sd.Factory.addGetterSetter(ci,"innerRadius",0,(0,kd.getNumberValidator)()),Sd.Factory.addGetterSetter(ci,"outerRadius",0,(0,kd.getNumberValidator)());const g7=Mt({__proto__:null,get Star(){return Uv},default:za},[za]),m7=Dt(g7);var qi={};Object.defineProperty(qi,"__esModule",{value:!0});var Gv=qi.Text=Vv=qi.stringToArray=void 0;const Cd=$e,ln=ee,v7=Ze,hi=re,y7=ne;function zv(n){return Array.from(n)}var Vv=qi.stringToArray=zv,_s="auto",_7="center",Bv="inherit",Va="justify",b7="Change.konva",w7="2d",Hv="-",qv="left",x7="text",S7="Text",k7="top",C7="bottom",Yv="middle",Kv="normal",T7="px ",zl=" ",E7="right",Xv="rtl",P7="word",A7="char",Jv="none",Td="…",Qv=["direction","fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],O7=Qv.length;function $7(n){return n.split(",").map(t=>{t=t.trim();const e=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return e&&!r&&(t=`"${t}"`),t}).join(", ")}var Ed;function Pd(){return Ed||(Ed=Cd.Util.createCanvasElement().getContext(w7),Ed)}function N7(n){n.fillText(this._partialText,this._partialTextX,this._partialTextY)}function F7(n){n.setAttr("miterLimit",2),n.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function R7(n){return n=n||{},!n.fillLinearGradientColorStops&&!n.fillRadialGradientColorStops&&!n.fillPatternImage&&(n.fill=n.fill||"black"),n}class Fe extends v7.Shape{constructor(t){super(R7(t)),this._partialTextX=0,this._partialTextY=0;for(var e=0;e<O7;e++)this.on(Qv[e]+b7,this._setTextData);this._setTextData()}_sceneFunc(t){var e=this.textArr,r=e.length;if(this.text()){var i=this.padding(),s=this.fontSize(),a=this.lineHeight()*s,o=this.verticalAlign(),l=this.direction(),c=0,h=this.align(),f=this.getWidth(),d=this.letterSpacing(),u=this.fill(),p=this.textDecoration(),v=p.indexOf("underline")!==-1,_=p.indexOf("line-through")!==-1,x;l=l===Bv?t.direction:l;var b=0,b=a/2,m=0,k=0;for(l===Xv&&t.setAttr("direction",l),t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",Yv),t.setAttr("textAlign",qv),o===Yv?c=(this.getHeight()-r*a-i*2)/2:o===C7&&(c=this.getHeight()-r*a-i*2),t.translate(i,c+i),x=0;x<r;x++){var m=0,k=0,O=e[x],T=O.text,F=O.width,R=O.lastInParagraph,L,U,B;if(t.save(),h===E7?m+=f-F-i*2:h===_7&&(m+=(f-F-i*2)/2),v){t.save(),t.beginPath(),t.moveTo(m,b+k+Math.round(s/2)),L=T.split(" ").length-1,U=L===0,B=h===Va&&!R?f-i*2:F,t.lineTo(m+Math.round(B),b+k+Math.round(s/2)),t.lineWidth=s/15;const St=this._getLinearGradient();t.strokeStyle=St||u,t.stroke(),t.restore()}if(_){t.save(),t.beginPath(),t.moveTo(m,b+k),L=T.split(" ").length-1,U=L===0,B=h===Va&&R&&!U?f-i*2:F,t.lineTo(m+Math.round(B),b+k),t.lineWidth=s/15;const St=this._getLinearGradient();t.strokeStyle=St||u,t.stroke(),t.restore()}if(l!==Xv&&(d!==0||h===Va)){L=T.split(" ").length-1;for(var Y=zv(T),tt=0;tt<Y.length;tt++){var W=Y[tt];W===" "&&!R&&h===Va&&(m+=(f-i*2-F)/L),this._partialTextX=m,this._partialTextY=b+k,this._partialText=W,t.fillStrokeShape(this),m+=this.measureSize(W).width+d}}else d!==0&&t.setAttr("letterSpacing",`${d}px`),this._partialTextX=m,this._partialTextY=b+k,this._partialText=T,t.fillStrokeShape(this);t.restore(),r>1&&(b+=a)}}}_hitFunc(t){var e=this.getWidth(),r=this.getHeight();t.beginPath(),t.rect(0,0,e,r),t.closePath(),t.fillStrokeShape(this)}setText(t){var e=Cd.Util._isString(t)?t:t==null?"":t+"";return this._setAttr(x7,e),this}getWidth(){var t=this.attrs.width===_s||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===_s||this.attrs.height===void 0;return t?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return Cd.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var e=Pd(),r=this.fontSize(),i;return e.save(),e.font=this._getContextFont(),i=e.measureText(t),e.restore(),{width:i.width,height:r}}_getContextFont(){return this.fontStyle()+zl+this.fontVariant()+zl+(this.fontSize()+T7)+$7(this.fontFamily())}_addTextLine(t){this.align()===Va&&(t=t.trim());var e=this._getTextWidth(t);return this.textArr.push({text:t,width:e,lastInParagraph:!1})}_getTextWidth(t){var e=this.letterSpacing(),r=t.length;return Pd().measureText(t).width+(r?e*(r-1):0)}_setTextData(){var t=this.text().split(`
43
+ `),e=+this.fontSize(),r=0,i=this.lineHeight()*e,s=this.attrs.width,a=this.attrs.height,o=s!==_s&&s!==void 0,l=a!==_s&&a!==void 0,c=this.padding(),h=s-c*2,f=a-c*2,d=0,u=this.wrap(),p=u!==Jv,v=u!==A7&&p,_=this.ellipsis();this.textArr=[],Pd().font=this._getContextFont();for(var x=_?this._getTextWidth(Td):0,b=0,m=t.length;b<m;++b){var k=t[b],O=this._getTextWidth(k);if(o&&O>h)for(;k.length>0;){for(var T=0,F=k.length,R="",L=0;T<F;){var U=T+F>>>1,B=k.slice(0,U+1),Y=this._getTextWidth(B)+x;Y<=h?(T=U+1,R=B,L=Y):F=U}if(R){if(v){var tt,W=k[R.length],ct=W===zl||W===Hv;ct&&L<=h?tt=R.length:tt=Math.max(R.lastIndexOf(zl),R.lastIndexOf(Hv))+1,tt>0&&(T=tt,R=R.slice(0,T),L=this._getTextWidth(R))}R=R.trimRight(),this._addTextLine(R),r=Math.max(r,L),d+=i;var wt=this._shouldHandleEllipsis(d);if(wt){this._tryToAddEllipsisToLastLine();break}if(k=k.slice(T),k=k.trimLeft(),k.length>0&&(O=this._getTextWidth(k),O<=h)){this._addTextLine(k),d+=i,r=Math.max(r,O);break}}else break}else this._addTextLine(k),d+=i,r=Math.max(r,O),this._shouldHandleEllipsis(d)&&b<m-1&&this._tryToAddEllipsisToLastLine();if(this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0),l&&d+i>f)break}this.textHeight=e,this.textWidth=r}_shouldHandleEllipsis(t){var e=+this.fontSize(),r=this.lineHeight()*e,i=this.attrs.height,s=i!==_s&&i!==void 0,a=this.padding(),o=i-a*2,l=this.wrap(),c=l!==Jv;return!c||s&&t+r>o}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,e=t!==_s&&t!==void 0,r=this.padding(),i=t-r*2,s=this.ellipsis(),a=this.textArr[this.textArr.length-1];if(!(!a||!s)){if(e){var o=this._getTextWidth(a.text+Td)<i;o||(a.text=a.text.slice(0,a.text.length-3))}this.textArr.splice(this.textArr.length-1,1),this._addTextLine(a.text+Td)}}getStrokeScaleEnabled(){return!0}_useBufferCanvas(){const t=this.textDecoration().indexOf("underline")!==-1||this.textDecoration().indexOf("line-through")!==-1,e=this.hasShadow();return t&&e?!0:super._useBufferCanvas()}}Gv=qi.Text=Fe,Fe.prototype._fillFunc=N7,Fe.prototype._strokeFunc=F7,Fe.prototype.className=S7,Fe.prototype._attrsAffectingSize=["text","fontSize","padding","wrap","lineHeight","letterSpacing"],(0,y7._registerNode)(Fe),ln.Factory.overWriteSetter(Fe,"width",(0,hi.getNumberOrAutoValidator)()),ln.Factory.overWriteSetter(Fe,"height",(0,hi.getNumberOrAutoValidator)()),ln.Factory.addGetterSetter(Fe,"direction",Bv),ln.Factory.addGetterSetter(Fe,"fontFamily","Arial"),ln.Factory.addGetterSetter(Fe,"fontSize",12,(0,hi.getNumberValidator)()),ln.Factory.addGetterSetter(Fe,"fontStyle",Kv),ln.Factory.addGetterSetter(Fe,"fontVariant",Kv),ln.Factory.addGetterSetter(Fe,"padding",0,(0,hi.getNumberValidator)()),ln.Factory.addGetterSetter(Fe,"align",qv),ln.Factory.addGetterSetter(Fe,"verticalAlign",k7),ln.Factory.addGetterSetter(Fe,"lineHeight",1,(0,hi.getNumberValidator)()),ln.Factory.addGetterSetter(Fe,"wrap",P7),ln.Factory.addGetterSetter(Fe,"ellipsis",!1,(0,hi.getBooleanValidator)()),ln.Factory.addGetterSetter(Fe,"letterSpacing",0,(0,hi.getNumberValidator)()),ln.Factory.addGetterSetter(Fe,"text","",(0,hi.getStringValidator)()),ln.Factory.addGetterSetter(Fe,"textDecoration","");const M7=Mt({__proto__:null,get Text(){return Gv},default:qi,get stringToArray(){return Vv}},[qi]),Zv=Dt(M7);var Ba={};Object.defineProperty(Ba,"__esModule",{value:!0});var Wv=Ba.TextPath=void 0;const Ad=$e,Wn=ee,D7=Ze,Ha=pd,Od=Zv,ty=re,I7=ne;var j7="",ey="normal";function ny(n){n.fillText(this.partialText,0,0)}function ry(n){n.strokeText(this.partialText,0,0)}class Ye extends D7.Shape{constructor(t){super(t),this.dummyCanvas=Ad.Util.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 Ha.Path.getPathLength(this.dataArray)}_getPointAtLength(t){if(!this.attrs.data)return null;const e=this.pathLength;return t-1>e?null:Ha.Path.getPointAtLengthOfDataArray(t,this.dataArray)}_readDataAttribute(){this.dataArray=Ha.Path.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();var e=this.textDecoration(),r=this.fill(),i=this.fontSize(),s=this.glyphInfo;e==="underline"&&t.beginPath();for(var a=0;a<s.length;a++){t.save();var o=s[a].p0;t.translate(o.x,o.y),t.rotate(s[a].rotation),this.partialText=s[a].text,t.fillStrokeShape(this),e==="underline"&&(a===0&&t.moveTo(0,i/2+1),t.lineTo(i,i/2+1)),t.restore()}e==="underline"&&(t.strokeStyle=r,t.lineWidth=i/20,t.stroke()),t.restore()}_hitFunc(t){t.beginPath();var e=this.glyphInfo;if(e.length>=1){var r=e[0].p0;t.moveTo(r.x,r.y)}for(var i=0;i<e.length;i++){var s=e[i].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 Ad.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}setText(t){return Od.Text.prototype.setText.call(this,t)}_getContextFont(){return Od.Text.prototype._getContextFont.call(this)}_getTextSize(t){var e=this.dummyCanvas,r=e.getContext("2d");r.save(),r.font=this._getContextFont();var i=r.measureText(t);return r.restore(),{width:i.width,height:parseInt(`${this.fontSize()}`,10)}}_setTextData(){const{width:t,height:e}=this._getTextSize(this.attrs.text);if(this.textWidth=t,this.textHeight=e,this.glyphInfo=[],!this.attrs.data)return null;const r=this.letterSpacing(),i=this.align(),s=this.kerningFunc(),a=Math.max(this.textWidth+((this.attrs.text||"").length-1)*r,0);let o=0;i==="center"&&(o=Math.max(0,this.pathLength/2-a/2)),i==="right"&&(o=Math.max(0,this.pathLength-a));const l=(0,Od.stringToArray)(this.text());let c=o;for(var h=0;h<l.length;h++){const f=this._getPointAtLength(c);if(!f)return;let d=this._getTextSize(l[h]).width+r;if(l[h]===" "&&i==="justify"){const b=this.text().split(" ").length-1;d+=(this.pathLength-a)/b}const u=this._getPointAtLength(c+d);if(!u)return;const p=Ha.Path.getLineLength(f.x,f.y,u.x,u.y);let v=0;if(s)try{v=s(l[h-1],l[h])*this.fontSize()}catch{v=0}f.x+=v,u.x+=v,this.textWidth+=v;const _=Ha.Path.getPointOnLine(v+p/2,f.x,f.y,u.x,u.y),x=Math.atan2(u.y-f.y,u.x-f.x);this.glyphInfo.push({transposeX:_.x,transposeY:_.y,text:l[h],rotation:x,p0:f,p1:u}),c+=d}}getSelfRect(){if(!this.glyphInfo.length)return{x:0,y:0,width:0,height:0};var t=[];this.glyphInfo.forEach(function(h){t.push(h.p0.x),t.push(h.p0.y),t.push(h.p1.x),t.push(h.p1.y)});for(var e=t[0]||0,r=t[0]||0,i=t[1]||0,s=t[1]||0,a,o,l=0;l<t.length/2;l++)a=t[l*2],o=t[l*2+1],e=Math.min(e,a),r=Math.max(r,a),i=Math.min(i,o),s=Math.max(s,o);var c=this.fontSize();return{x:e-c/2,y:i-c/2,width:r-e+c,height:s-i+c}}destroy(){return Ad.Util.releaseCanvas(this.dummyCanvas),super.destroy()}}Wv=Ba.TextPath=Ye,Ye.prototype._fillFunc=ny,Ye.prototype._strokeFunc=ry,Ye.prototype._fillFuncHit=ny,Ye.prototype._strokeFuncHit=ry,Ye.prototype.className="TextPath",Ye.prototype._attrsAffectingSize=["text","fontSize","data"],(0,I7._registerNode)(Ye),Wn.Factory.addGetterSetter(Ye,"data"),Wn.Factory.addGetterSetter(Ye,"fontFamily","Arial"),Wn.Factory.addGetterSetter(Ye,"fontSize",12,(0,ty.getNumberValidator)()),Wn.Factory.addGetterSetter(Ye,"fontStyle",ey),Wn.Factory.addGetterSetter(Ye,"align","left"),Wn.Factory.addGetterSetter(Ye,"letterSpacing",0,(0,ty.getNumberValidator)()),Wn.Factory.addGetterSetter(Ye,"textBaseline","middle"),Wn.Factory.addGetterSetter(Ye,"fontVariant",ey),Wn.Factory.addGetterSetter(Ye,"text",j7),Wn.Factory.addGetterSetter(Ye,"textDecoration",null),Wn.Factory.addGetterSetter(Ye,"kerningFunc",null);const L7=Mt({__proto__:null,get TextPath(){return Wv},default:Ba},[Ba]),U7=Dt(L7);var qa={};Object.defineProperty(qa,"__esModule",{value:!0});var iy=qa.Transformer=void 0;const be=$e,ve=ee,sy=Le,G7=Ze,z7=Ov,ay=od,tr=ne,ui=re,V7=ne;var oy="tr-konva",B7=["resizeEnabledChange","rotateAnchorOffsetChange","rotateEnabledChange","enabledAnchorsChange","anchorSizeChange","borderEnabledChange","borderStrokeChange","borderStrokeWidthChange","borderDashChange","anchorStrokeChange","anchorStrokeWidthChange","anchorFillChange","anchorCornerRadiusChange","ignoreStrokeChange","anchorStyleFuncChange"].map(n=>n+`.${oy}`).join(" "),ly="nodesRect",H7=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],q7={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};const Y7="ontouchstart"in tr.Konva._global;function K7(n,t,e){if(n==="rotater")return e;t+=be.Util.degToRad(q7[n]||0);var r=(be.Util.radToDeg(t)%360+360)%360;return be.Util._inRange(r,315+22.5,360)||be.Util._inRange(r,0,22.5)?"ns-resize":be.Util._inRange(r,45-22.5,45+22.5)?"nesw-resize":be.Util._inRange(r,90-22.5,90+22.5)?"ew-resize":be.Util._inRange(r,135-22.5,135+22.5)?"nwse-resize":be.Util._inRange(r,180-22.5,180+22.5)?"ns-resize":be.Util._inRange(r,225-22.5,225+22.5)?"nesw-resize":be.Util._inRange(r,270-22.5,270+22.5)?"ew-resize":be.Util._inRange(r,315-22.5,315+22.5)?"nwse-resize":(be.Util.error("Transformer has unknown angle for cursor detection: "+r),"pointer")}var Vl=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],cy=1e8;function X7(n){return{x:n.x+n.width/2*Math.cos(n.rotation)+n.height/2*Math.sin(-n.rotation),y:n.y+n.height/2*Math.cos(n.rotation)+n.width/2*Math.sin(n.rotation)}}function hy(n,t,e){const r=e.x+(n.x-e.x)*Math.cos(t)-(n.y-e.y)*Math.sin(t),i=e.y+(n.x-e.x)*Math.sin(t)+(n.y-e.y)*Math.cos(t);return{...n,rotation:n.rotation+t,x:r,y:i}}function J7(n,t){const e=X7(n);return hy(n,t,e)}function Q7(n,t,e){let r=t;for(let i=0;i<n.length;i++){const s=tr.Konva.getAngle(n[i]),a=Math.abs(s-t)%(Math.PI*2);Math.min(a,Math.PI*2-a)<e&&(r=s)}return r}class ce extends ay.Group{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(B7,this.update),this.getNode()&&this.update()}attachTo(t){return this.setNode(t),this}setNode(t){return be.Util.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 oy+this._id}setNodes(t=[]){this._nodes&&this._nodes.length&&this.detach();const e=t.filter(i=>i.isAncestorOf(this)?(be.Util.error("Konva.Transformer cannot be an a child of the node you are trying to attach"),!1):!0);this._nodes=t=e,t.length===1&&this.useSingleNodeRotation()?this.rotation(t[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach(i=>{const s=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},a=i._attrsAffectingSize.map(o=>o+"Change."+this._getEventNamespace()).join(" ");i.on(a,s),i.on(H7.map(o=>o+`.${this._getEventNamespace()}`).join(" "),s),i.on(`absoluteTransformChange.${this._getEventNamespace()}`,s),this._proxyDrag(i)}),this._resetTransformCache();var r=!!this.findOne(".top-left");return r&&this.update(),this}_proxyDrag(t){let e;t.on(`dragstart.${this._getEventNamespace()}`,r=>{e=t.getAbsolutePosition(),!this.isDragging()&&t!==this.findOne(".back")&&this.startDrag(r,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,r=>{if(!e)return;const i=t.getAbsolutePosition(),s=i.x-e.x,a=i.y-e.y;this.nodes().forEach(o=>{if(o===t||o.isDragging())return;const l=o.getAbsolutePosition();o.setAbsolutePosition({x:l.x+s,y:l.y+a}),o.startDrag(r)}),e=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(ly),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(ly,this.__getNodeRect)}__getNodeShape(t,e=this.rotation(),r){var i=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),s=t.getAbsoluteScale(r),a=t.getAbsolutePosition(r),o=i.x*s.x-t.offsetX()*s.x,l=i.y*s.y-t.offsetY()*s.y;const c=(tr.Konva.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),h={x:a.x+o*Math.cos(c)+l*Math.sin(-c),y:a.y+l*Math.cos(c)+o*Math.sin(c),width:i.width*s.x,height:i.height*s.y,rotation:c};return hy(h,-tr.Konva.getAngle(e),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-cy,y:-cy,width:0,height:0,rotation:0};const e=[];this.nodes().map(c=>{const h=c.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var f=[{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}],d=c.getAbsoluteTransform();f.forEach(function(u){var p=d.point(u);e.push(p)})});const r=new be.Transform;r.rotate(-tr.Konva.getAngle(this.rotation()));var i=1/0,s=1/0,a=-1/0,o=-1/0;e.forEach(function(c){var h=r.point(c);i===void 0&&(i=a=h.x,s=o=h.y),i=Math.min(i,h.x),s=Math.min(s,h.y),a=Math.max(a,h.x),o=Math.max(o,h.y)}),r.invert();const l=r.point({x:i,y:s});return{x:l.x,y:l.y,width:a-i,height:o-s,rotation:tr.Konva.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(),Vl.forEach(t=>{this._createAnchor(t)}),this._createAnchor("rotater")}_createAnchor(t){var e=new z7.Rect({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:Y7?10:"auto"}),r=this;e.on("mousedown touchstart",function(i){r._handleMouseDown(i)}),e.on("dragstart",i=>{e.stopDrag(),i.cancelBubble=!0}),e.on("dragend",i=>{i.cancelBubble=!0}),e.on("mouseenter",()=>{var i=tr.Konva.getAngle(this.rotation()),s=this.rotateAnchorCursor(),a=K7(t,i,s);e.getStage().content&&(e.getStage().content.style.cursor=a),this._cursorChange=!0}),e.on("mouseout",()=>{e.getStage().content&&(e.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(e)}_createBack(){var t=new G7.Shape({name:"back",width:0,height:0,draggable:!0,sceneFunc(e,r){var i=r.getParent(),s=i.padding();e.beginPath(),e.rect(-s,-s,r.width()+s*2,r.height()+s*2),e.moveTo(r.width()/2,-s),i.rotateEnabled()&&e.lineTo(r.width()/2,-i.rotateAnchorOffset()*be.Util._sign(r.height())-s),e.fillStrokeShape(r)},hitFunc:(e,r)=>{if(this.shouldOverdrawWholeArea()){var i=this.padding();e.beginPath(),e.rect(-i,-i,r.width()+i*2,r.height()+i*2),e.fillStrokeShape(r)}}});this.add(t),this._proxyDrag(t),t.on("dragstart",e=>{e.cancelBubble=!0}),t.on("dragmove",e=>{e.cancelBubble=!0}),t.on("dragend",e=>{e.cancelBubble=!0}),this.on("dragmove",e=>{this.update()})}_handleMouseDown(t){this._movingAnchorName=t.target.name().split(" ")[0];var e=this._getNodeRect(),r=e.width,i=e.height,s=Math.sqrt(Math.pow(r,2)+Math.pow(i,2));this.sin=Math.abs(i/s),this.cos=Math.abs(r/s),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;var a=t.target.getAbsolutePosition(),o=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:o.x-a.x,y:o.y-a.y},this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(l=>{l._fire("transformstart",{evt:t.evt,target:l})})}_handleMouseMove(t){var e,r,i,s=this.findOne("."+this._movingAnchorName),a=s.getStage();a.setPointersPositions(t);const o=a.getPointerPosition();let l={x:o.x-this._anchorDragOffset.x,y:o.y-this._anchorDragOffset.y};const c=s.getAbsolutePosition();this.anchorDragBoundFunc()&&(l=this.anchorDragBoundFunc()(c,l,t)),s.setAbsolutePosition(l);const h=s.getAbsolutePosition();if(!(c.x===h.x&&c.y===h.y)){if(this._movingAnchorName==="rotater"){var f=this._getNodeRect();e=s.x()-f.width/2,r=-s.y()+f.height/2;let tt=Math.atan2(-r,e)+Math.PI/2;f.height<0&&(tt-=Math.PI);var d=tr.Konva.getAngle(this.rotation());const W=d+tt,ct=tr.Konva.getAngle(this.rotationSnapTolerance()),wt=Q7(this.rotationSnaps(),W,ct)-f.rotation,St=J7(f,wt);this._fitNodesInto(St,t);return}var u=this.shiftBehavior(),p;u==="inverted"?p=this.keepRatio()&&!t.shiftKey:u==="none"?p=this.keepRatio():p=this.keepRatio()||t.shiftKey;var m=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(p){var v=m?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};i=Math.sqrt(Math.pow(v.x-s.x(),2)+Math.pow(v.y-s.y(),2));var _=this.findOne(".top-left").x()>v.x?-1:1,x=this.findOne(".top-left").y()>v.y?-1:1;e=i*this.cos*_,r=i*this.sin*x,this.findOne(".top-left").x(v.x-e),this.findOne(".top-left").y(v.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(s.y());else if(this._movingAnchorName==="top-right"){if(p){var v=m?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};i=Math.sqrt(Math.pow(s.x()-v.x,2)+Math.pow(v.y-s.y(),2));var _=this.findOne(".top-right").x()<v.x?-1:1,x=this.findOne(".top-right").y()>v.y?-1:1;e=i*this.cos*_,r=i*this.sin*x,this.findOne(".top-right").x(v.x+e),this.findOne(".top-right").y(v.y-r)}var b=s.position();this.findOne(".top-left").y(b.y),this.findOne(".bottom-right").x(b.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(s.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(s.x());else if(this._movingAnchorName==="bottom-left"){if(p){var v=m?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};i=Math.sqrt(Math.pow(v.x-s.x(),2)+Math.pow(s.y()-v.y,2));var _=v.x<s.x()?-1:1,x=s.y()<v.y?-1:1;e=i*this.cos*_,r=i*this.sin*x,s.x(v.x-e),s.y(v.y+r)}b=s.position(),this.findOne(".top-left").x(b.x),this.findOne(".bottom-right").y(b.y)}else if(this._movingAnchorName==="bottom-center")this.findOne(".bottom-right").y(s.y());else if(this._movingAnchorName==="bottom-right"){if(p){var v=m?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-left").x(),y:this.findOne(".top-left").y()};i=Math.sqrt(Math.pow(s.x()-v.x,2)+Math.pow(s.y()-v.y,2));var _=this.findOne(".bottom-right").x()<v.x?-1:1,x=this.findOne(".bottom-right").y()<v.y?-1:1;e=i*this.cos*_,r=i*this.sin*x,this.findOne(".bottom-right").x(v.x+e),this.findOne(".bottom-right").y(v.y+r)}}else console.error(new Error("Wrong position argument of selection resizer: "+this._movingAnchorName));var m=this.centeredScaling()||t.altKey;if(m){var k=this.findOne(".top-left"),O=this.findOne(".bottom-right"),T=k.x(),F=k.y(),R=this.getWidth()-O.x(),L=this.getHeight()-O.y();O.move({x:-T,y:-F}),k.move({x:R,y:L})}var U=this.findOne(".top-left").getAbsolutePosition();e=U.x,r=U.y;var B=this.findOne(".bottom-right").x()-this.findOne(".top-left").x(),Y=this.findOne(".bottom-right").y()-this.findOne(".top-left").y();this._fitNodesInto({x:e,y:r,width:B,height:Y,rotation:tr.Konva.getAngle(this.rotation())},t)}}_handleMouseUp(t){this._removeEvents(t)}getAbsoluteTransform(){return this.getTransform()}_removeEvents(t){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));var e=this.getNode();this._fire("transformend",{evt:t,target:e}),e&&this._nodes.forEach(r=>{r._fire("transformend",{evt:t,target:r})}),this._movingAnchorName=null}}_fitNodesInto(t,e){var r=this._getNodeRect();const i=1;if(be.Util._inRange(t.width,-this.padding()*2-i,i)){this.update();return}if(be.Util._inRange(t.height,-this.padding()*2-i,i)){this.update();return}const s=this.flipEnabled();var a=new be.Transform;if(a.rotate(tr.Konva.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const f=a.point({x:-this.padding()*2,y:0});if(t.x+=f.x,t.y+=f.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=f.x,this._anchorDragOffset.y-=f.y,!s){this.update();return}}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const f=a.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=f.x,this._anchorDragOffset.y-=f.y,t.width+=this.padding()*2,!s){this.update();return}}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const f=a.point({x:0,y:-this.padding()*2});if(t.x+=f.x,t.y+=f.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=f.x,this._anchorDragOffset.y-=f.y,t.height+=this.padding()*2,!s){this.update();return}}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const f=a.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=f.x,this._anchorDragOffset.y-=f.y,t.height+=this.padding()*2,!s){this.update();return}}if(this.boundBoxFunc()){const f=this.boundBoxFunc()(r,t);f?t=f:be.Util.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const o=1e7,l=new be.Transform;l.translate(r.x,r.y),l.rotate(r.rotation),l.scale(r.width/o,r.height/o);const c=new be.Transform;c.translate(t.x,t.y),c.rotate(t.rotation),c.scale(t.width/o,t.height/o);const h=c.multiply(l.invert());this._nodes.forEach(f=>{var d;const u=f.getParent().getAbsoluteTransform(),p=f.getTransform().copy();p.translate(f.offsetX(),f.offsetY());const v=new be.Transform;v.multiply(u.copy().invert()).multiply(h).multiply(u).multiply(p);const _=v.decompose();f.setAttrs(_),this._fire("transform",{evt:e,target:f}),f._fire("transform",{evt:e,target:f}),(d=f.getLayer())===null||d===void 0||d.batchDraw()}),this.rotation(be.Util._getRotation(t.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,e){this.findOne(t).setAttrs(e)}update(){var t,e=this._getNodeRect();this.rotation(be.Util._getRotation(e.rotation));var r=e.width,i=e.height,s=this.enabledAnchors(),a=this.resizeEnabled(),o=this.padding(),l=this.anchorSize();const c=this.find("._anchor");c.forEach(f=>{f.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+o,offsetY:l/2+o,visible:a&&s.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:r/2,y:0,offsetY:l/2+o,visible:a&&s.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:r,y:0,offsetX:l/2-o,offsetY:l/2+o,visible:a&&s.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:l/2+o,visible:a&&s.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:r,y:i/2,offsetX:l/2-o,visible:a&&s.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:l/2+o,offsetY:l/2-o,visible:a&&s.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:r/2,y:i,offsetY:l/2-o,visible:a&&s.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:r,y:i,offsetX:l/2-o,offsetY:l/2-o,visible:a&&s.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:r/2,y:-this.rotateAnchorOffset()*be.Util._sign(i)-o,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:r,height:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0});const h=this.anchorStyleFunc();h&&c.forEach(f=>{h(f)}),(t=this.getLayer())===null||t===void 0||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),ay.Group.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return sy.Node.prototype.toObject.call(this)}clone(t){var e=sy.Node.prototype.clone.call(this,t);return e}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}iy=qa.Transformer=ce;function Z7(n){return n instanceof Array||be.Util.warn("enabledAnchors value should be an array"),n instanceof Array&&n.forEach(function(t){Vl.indexOf(t)===-1&&be.Util.warn("Unknown anchor name: "+t+". Available names are: "+Vl.join(", "))}),n||[]}ce.prototype.className="Transformer",(0,V7._registerNode)(ce),ve.Factory.addGetterSetter(ce,"enabledAnchors",Vl,Z7),ve.Factory.addGetterSetter(ce,"flipEnabled",!0,(0,ui.getBooleanValidator)()),ve.Factory.addGetterSetter(ce,"resizeEnabled",!0),ve.Factory.addGetterSetter(ce,"anchorSize",10,(0,ui.getNumberValidator)()),ve.Factory.addGetterSetter(ce,"rotateEnabled",!0),ve.Factory.addGetterSetter(ce,"rotationSnaps",[]),ve.Factory.addGetterSetter(ce,"rotateAnchorOffset",50,(0,ui.getNumberValidator)()),ve.Factory.addGetterSetter(ce,"rotateAnchorCursor","crosshair"),ve.Factory.addGetterSetter(ce,"rotationSnapTolerance",5,(0,ui.getNumberValidator)()),ve.Factory.addGetterSetter(ce,"borderEnabled",!0),ve.Factory.addGetterSetter(ce,"anchorStroke","rgb(0, 161, 255)"),ve.Factory.addGetterSetter(ce,"anchorStrokeWidth",1,(0,ui.getNumberValidator)()),ve.Factory.addGetterSetter(ce,"anchorFill","white"),ve.Factory.addGetterSetter(ce,"anchorCornerRadius",0,(0,ui.getNumberValidator)()),ve.Factory.addGetterSetter(ce,"borderStroke","rgb(0, 161, 255)"),ve.Factory.addGetterSetter(ce,"borderStrokeWidth",1,(0,ui.getNumberValidator)()),ve.Factory.addGetterSetter(ce,"borderDash"),ve.Factory.addGetterSetter(ce,"keepRatio",!0),ve.Factory.addGetterSetter(ce,"shiftBehavior","default"),ve.Factory.addGetterSetter(ce,"centeredScaling",!1),ve.Factory.addGetterSetter(ce,"ignoreStroke",!1),ve.Factory.addGetterSetter(ce,"padding",0,(0,ui.getNumberValidator)()),ve.Factory.addGetterSetter(ce,"node"),ve.Factory.addGetterSetter(ce,"nodes"),ve.Factory.addGetterSetter(ce,"boundBoxFunc"),ve.Factory.addGetterSetter(ce,"anchorDragBoundFunc"),ve.Factory.addGetterSetter(ce,"anchorStyleFunc"),ve.Factory.addGetterSetter(ce,"shouldOverdrawWholeArea",!1),ve.Factory.addGetterSetter(ce,"useSingleNodeRotation",!0),ve.Factory.backCompat(ce,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});const W7=Mt({__proto__:null,get Transformer(){return iy},default:qa},[qa]),tP=Dt(W7);var Ya={};Object.defineProperty(Ya,"__esModule",{value:!0});var uy=Ya.Wedge=void 0;const Bl=ee,eP=Ze,nP=ne,dy=re,rP=ne;class zr extends eP.Shape{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,nP.Konva.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)}}uy=Ya.Wedge=zr,zr.prototype.className="Wedge",zr.prototype._centroid=!0,zr.prototype._attrsAffectingSize=["radius"],(0,rP._registerNode)(zr),Bl.Factory.addGetterSetter(zr,"radius",0,(0,dy.getNumberValidator)()),Bl.Factory.addGetterSetter(zr,"angle",0,(0,dy.getNumberValidator)()),Bl.Factory.addGetterSetter(zr,"clockwise",!1),Bl.Factory.backCompat(zr,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});const iP=Mt({__proto__:null,get Wedge(){return uy},default:Ya},[Ya]),sP=Dt(iP);var Ka={};Object.defineProperty(Ka,"__esModule",{value:!0});var fy=Ka.Blur=void 0;const py=ee,aP=Le,oP=re;function gy(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var lP=[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],cP=[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 hP(n,t){var e=n.data,r=n.width,i=n.height,s,a,o,l,c,h,f,d,u,p,v,_,x,b,m,k,O,T,F,R,L,U,B,Y,tt=t+t+1,W=r-1,ct=i-1,wt=t+1,St=wt*(wt+1)/2,xt=new gy,st=null,K=xt,$=null,P=null,E=lP[t],C=cP[t];for(o=1;o<tt;o++)K=K.next=new gy,o===wt&&(st=K);for(K.next=xt,f=h=0,a=0;a<i;a++){for(k=O=T=F=d=u=p=v=0,_=wt*(R=e[h]),x=wt*(L=e[h+1]),b=wt*(U=e[h+2]),m=wt*(B=e[h+3]),d+=St*R,u+=St*L,p+=St*U,v+=St*B,K=xt,o=0;o<wt;o++)K.r=R,K.g=L,K.b=U,K.a=B,K=K.next;for(o=1;o<wt;o++)l=h+((W<o?W:o)<<2),d+=(K.r=R=e[l])*(Y=wt-o),u+=(K.g=L=e[l+1])*Y,p+=(K.b=U=e[l+2])*Y,v+=(K.a=B=e[l+3])*Y,k+=R,O+=L,T+=U,F+=B,K=K.next;for($=xt,P=st,s=0;s<r;s++)e[h+3]=B=v*E>>C,B!==0?(B=255/B,e[h]=(d*E>>C)*B,e[h+1]=(u*E>>C)*B,e[h+2]=(p*E>>C)*B):e[h]=e[h+1]=e[h+2]=0,d-=_,u-=x,p-=b,v-=m,_-=$.r,x-=$.g,b-=$.b,m-=$.a,l=f+((l=s+t+1)<W?l:W)<<2,k+=$.r=e[l],O+=$.g=e[l+1],T+=$.b=e[l+2],F+=$.a=e[l+3],d+=k,u+=O,p+=T,v+=F,$=$.next,_+=R=P.r,x+=L=P.g,b+=U=P.b,m+=B=P.a,k-=R,O-=L,T-=U,F-=B,P=P.next,h+=4;f+=r}for(s=0;s<r;s++){for(O=T=F=k=u=p=v=d=0,h=s<<2,_=wt*(R=e[h]),x=wt*(L=e[h+1]),b=wt*(U=e[h+2]),m=wt*(B=e[h+3]),d+=St*R,u+=St*L,p+=St*U,v+=St*B,K=xt,o=0;o<wt;o++)K.r=R,K.g=L,K.b=U,K.a=B,K=K.next;for(c=r,o=1;o<=t;o++)h=c+s<<2,d+=(K.r=R=e[h])*(Y=wt-o),u+=(K.g=L=e[h+1])*Y,p+=(K.b=U=e[h+2])*Y,v+=(K.a=B=e[h+3])*Y,k+=R,O+=L,T+=U,F+=B,K=K.next,o<ct&&(c+=r);for(h=s,$=xt,P=st,a=0;a<i;a++)l=h<<2,e[l+3]=B=v*E>>C,B>0?(B=255/B,e[l]=(d*E>>C)*B,e[l+1]=(u*E>>C)*B,e[l+2]=(p*E>>C)*B):e[l]=e[l+1]=e[l+2]=0,d-=_,u-=x,p-=b,v-=m,_-=$.r,x-=$.g,b-=$.b,m-=$.a,l=s+((l=a+wt)<ct?l:ct)*r<<2,d+=k+=$.r=e[l],u+=O+=$.g=e[l+1],p+=T+=$.b=e[l+2],v+=F+=$.a=e[l+3],$=$.next,_+=R=P.r,x+=L=P.g,b+=U=P.b,m+=B=P.a,k-=R,O-=L,T-=U,F-=B,P=P.next,h+=r}}const uP=function(n){var t=Math.round(this.blurRadius());t>0&&hP(n,t)};fy=Ka.Blur=uP,py.Factory.addGetterSetter(aP.Node,"blurRadius",0,(0,oP.getNumberValidator)(),py.Factory.afterSetFilter);const dP=Mt({__proto__:null,get Blur(){return fy},default:Ka},[Ka]),fP=Dt(dP);var Xa={};Object.defineProperty(Xa,"__esModule",{value:!0});var my=Xa.Brighten=void 0;const vy=ee,pP=Le,gP=re,mP=function(n){var t=this.brightness()*255,e=n.data,r=e.length,i;for(i=0;i<r;i+=4)e[i]+=t,e[i+1]+=t,e[i+2]+=t};my=Xa.Brighten=mP,vy.Factory.addGetterSetter(pP.Node,"brightness",0,(0,gP.getNumberValidator)(),vy.Factory.afterSetFilter);const vP=Mt({__proto__:null,get Brighten(){return my},default:Xa},[Xa]),yP=Dt(vP);var Ja={};Object.defineProperty(Ja,"__esModule",{value:!0});var yy=Ja.Contrast=void 0;const _y=ee,_P=Le,bP=re,wP=function(n){var t=Math.pow((this.contrast()+100)/100,2),e=n.data,r=e.length,i=150,s=150,a=150,o;for(o=0;o<r;o+=4)i=e[o],s=e[o+1],a=e[o+2],i/=255,i-=.5,i*=t,i+=.5,i*=255,s/=255,s-=.5,s*=t,s+=.5,s*=255,a/=255,a-=.5,a*=t,a+=.5,a*=255,i=i<0?0:i>255?255:i,s=s<0?0:s>255?255:s,a=a<0?0:a>255?255:a,e[o]=i,e[o+1]=s,e[o+2]=a};yy=Ja.Contrast=wP,_y.Factory.addGetterSetter(_P.Node,"contrast",0,(0,bP.getNumberValidator)(),_y.Factory.afterSetFilter);const xP=Mt({__proto__:null,get Contrast(){return yy},default:Ja},[Ja]),SP=Dt(xP);var Qa={};Object.defineProperty(Qa,"__esModule",{value:!0});var by=Qa.Emboss=void 0;const di=ee,Hl=Le,kP=$e,wy=re,CP=function(n){var t=this.embossStrength()*10,e=this.embossWhiteLevel()*255,r=this.embossDirection(),i=this.embossBlend(),s=0,a=0,o=n.data,l=n.width,c=n.height,h=l*4,f=c;switch(r){case"top-left":s=-1,a=-1;break;case"top":s=-1,a=0;break;case"top-right":s=-1,a=1;break;case"right":s=0,a=1;break;case"bottom-right":s=1,a=1;break;case"bottom":s=1,a=0;break;case"bottom-left":s=1,a=-1;break;case"left":s=0,a=-1;break;default:kP.Util.error("Unknown emboss direction: "+r)}do{var d=(f-1)*h,u=s;f+u<1&&(u=0),f+u>c&&(u=0);var p=(f-1+u)*l*4,v=l;do{var _=d+(v-1)*4,x=a;v+x<1&&(x=0),v+x>l&&(x=0);var b=p+(v-1+x)*4,m=o[_]-o[b],k=o[_+1]-o[b+1],O=o[_+2]-o[b+2],T=m,F=T>0?T:-T,R=k>0?k:-k,L=O>0?O:-O;if(R>F&&(T=k),L>F&&(T=O),T*=t,i){var U=o[_]+T,B=o[_+1]+T,Y=o[_+2]+T;o[_]=U>255?255:U<0?0:U,o[_+1]=B>255?255:B<0?0:B,o[_+2]=Y>255?255:Y<0?0:Y}else{var tt=e-T;tt<0?tt=0:tt>255&&(tt=255),o[_]=o[_+1]=o[_+2]=tt}}while(--v)}while(--f)};by=Qa.Emboss=CP,di.Factory.addGetterSetter(Hl.Node,"embossStrength",.5,(0,wy.getNumberValidator)(),di.Factory.afterSetFilter),di.Factory.addGetterSetter(Hl.Node,"embossWhiteLevel",.5,(0,wy.getNumberValidator)(),di.Factory.afterSetFilter),di.Factory.addGetterSetter(Hl.Node,"embossDirection","top-left",null,di.Factory.afterSetFilter),di.Factory.addGetterSetter(Hl.Node,"embossBlend",!1,null,di.Factory.afterSetFilter);const TP=Mt({__proto__:null,get Emboss(){return by},default:Qa},[Qa]),EP=Dt(TP);var Za={};Object.defineProperty(Za,"__esModule",{value:!0});var xy=Za.Enhance=void 0;const Sy=ee,PP=Le,AP=re;function $d(n,t,e,r,i){var s=e-t,a=i-r,o;return s===0?r+a/2:a===0?r:(o=(n-t)/s,o=a*o+r,o)}const OP=function(n){var t=n.data,e=t.length,r=t[0],i=r,s,a=t[1],o=a,l,c=t[2],h=c,f,d,u=this.enhance();if(u!==0){for(d=0;d<e;d+=4)s=t[d+0],s<r?r=s:s>i&&(i=s),l=t[d+1],l<a?a=l:l>o&&(o=l),f=t[d+2],f<c?c=f:f>h&&(h=f);i===r&&(i=255,r=0),o===a&&(o=255,a=0),h===c&&(h=255,c=0);var p,v,_,x,b,m,k,O,T;for(u>0?(v=i+u*(255-i),_=r-u*(r-0),b=o+u*(255-o),m=a-u*(a-0),O=h+u*(255-h),T=c-u*(c-0)):(p=(i+r)*.5,v=i+u*(i-p),_=r+u*(r-p),x=(o+a)*.5,b=o+u*(o-x),m=a+u*(a-x),k=(h+c)*.5,O=h+u*(h-k),T=c+u*(c-k)),d=0;d<e;d+=4)t[d+0]=$d(t[d+0],r,i,_,v),t[d+1]=$d(t[d+1],a,o,m,b),t[d+2]=$d(t[d+2],c,h,T,O)}};xy=Za.Enhance=OP,Sy.Factory.addGetterSetter(PP.Node,"enhance",0,(0,AP.getNumberValidator)(),Sy.Factory.afterSetFilter);const $P=Mt({__proto__:null,get Enhance(){return xy},default:Za},[Za]),NP=Dt($P);var Wa={};Object.defineProperty(Wa,"__esModule",{value:!0});var ky=Wa.Grayscale=void 0;const FP=function(n){var t=n.data,e=t.length,r,i;for(r=0;r<e;r+=4)i=.34*t[r]+.5*t[r+1]+.16*t[r+2],t[r]=i,t[r+1]=i,t[r+2]=i};ky=Wa.Grayscale=FP;const RP=Mt({__proto__:null,get Grayscale(){return ky},default:Wa},[Wa]),MP=Dt(RP);var to={};Object.defineProperty(to,"__esModule",{value:!0});var Cy=to.HSL=void 0;const bs=ee,Nd=Le,Fd=re;bs.Factory.addGetterSetter(Nd.Node,"hue",0,(0,Fd.getNumberValidator)(),bs.Factory.afterSetFilter),bs.Factory.addGetterSetter(Nd.Node,"saturation",0,(0,Fd.getNumberValidator)(),bs.Factory.afterSetFilter),bs.Factory.addGetterSetter(Nd.Node,"luminance",0,(0,Fd.getNumberValidator)(),bs.Factory.afterSetFilter);const DP=function(n){var t=n.data,e=t.length,r=1,i=Math.pow(2,this.saturation()),s=Math.abs(this.hue()+360)%360,a=this.luminance()*127,o,l=r*i*Math.cos(s*Math.PI/180),c=r*i*Math.sin(s*Math.PI/180),h=.299*r+.701*l+.167*c,f=.587*r-.587*l+.33*c,d=.114*r-.114*l-.497*c,u=.299*r-.299*l-.328*c,p=.587*r+.413*l+.035*c,v=.114*r-.114*l+.293*c,_=.299*r-.3*l+1.25*c,x=.587*r-.586*l-1.05*c,b=.114*r+.886*l-.2*c,m,k,O,T;for(o=0;o<e;o+=4)m=t[o+0],k=t[o+1],O=t[o+2],T=t[o+3],t[o+0]=h*m+f*k+d*O+a,t[o+1]=u*m+p*k+v*O+a,t[o+2]=_*m+x*k+b*O+a,t[o+3]=T};Cy=to.HSL=DP;const IP=Mt({__proto__:null,get HSL(){return Cy},default:to},[to]),jP=Dt(IP);var eo={};Object.defineProperty(eo,"__esModule",{value:!0});var Ty=eo.HSV=void 0;const ws=ee,Rd=Le,Md=re,LP=function(n){var t=n.data,e=t.length,r=Math.pow(2,this.value()),i=Math.pow(2,this.saturation()),s=Math.abs(this.hue()+360)%360,a,o=r*i*Math.cos(s*Math.PI/180),l=r*i*Math.sin(s*Math.PI/180),c=.299*r+.701*o+.167*l,h=.587*r-.587*o+.33*l,f=.114*r-.114*o-.497*l,d=.299*r-.299*o-.328*l,u=.587*r+.413*o+.035*l,p=.114*r-.114*o+.293*l,v=.299*r-.3*o+1.25*l,_=.587*r-.586*o-1.05*l,x=.114*r+.886*o-.2*l,b,m,k,O;for(a=0;a<e;a+=4)b=t[a+0],m=t[a+1],k=t[a+2],O=t[a+3],t[a+0]=c*b+h*m+f*k,t[a+1]=d*b+u*m+p*k,t[a+2]=v*b+_*m+x*k,t[a+3]=O};Ty=eo.HSV=LP,ws.Factory.addGetterSetter(Rd.Node,"hue",0,(0,Md.getNumberValidator)(),ws.Factory.afterSetFilter),ws.Factory.addGetterSetter(Rd.Node,"saturation",0,(0,Md.getNumberValidator)(),ws.Factory.afterSetFilter),ws.Factory.addGetterSetter(Rd.Node,"value",0,(0,Md.getNumberValidator)(),ws.Factory.afterSetFilter);const UP=Mt({__proto__:null,get HSV(){return Ty},default:eo},[eo]),GP=Dt(UP);var no={};Object.defineProperty(no,"__esModule",{value:!0});var Ey=no.Invert=void 0;const zP=function(n){var t=n.data,e=t.length,r;for(r=0;r<e;r+=4)t[r]=255-t[r],t[r+1]=255-t[r+1],t[r+2]=255-t[r+2]};Ey=no.Invert=zP;const VP=Mt({__proto__:null,get Invert(){return Ey},default:no},[no]),BP=Dt(VP);var ro={};Object.defineProperty(ro,"__esModule",{value:!0});var Py=ro.Kaleidoscope=void 0;const ql=ee,Ay=Le,Oy=$e,$y=re;var HP=function(n,t,e){var r=n.data,i=t.data,s=n.width,a=n.height,o=e.polarCenterX||s/2,l=e.polarCenterY||a/2,c,h,f,d=0,u=0,p=0,v=0,_,x=Math.sqrt(o*o+l*l);h=s-o,f=a-l,_=Math.sqrt(h*h+f*f),x=_>x?_:x;var b=a,m=s,k,O,T=360/m*Math.PI/180,F,R;for(O=0;O<m;O+=1)for(F=Math.sin(O*T),R=Math.cos(O*T),k=0;k<b;k+=1)h=Math.floor(o+x*k/b*R),f=Math.floor(l+x*k/b*F),c=(f*s+h)*4,d=r[c+0],u=r[c+1],p=r[c+2],v=r[c+3],c=(O+k*s)*4,i[c+0]=d,i[c+1]=u,i[c+2]=p,i[c+3]=v},qP=function(n,t,e){var r=n.data,i=t.data,s=n.width,a=n.height,o=e.polarCenterX||s/2,l=e.polarCenterY||a/2,c,h,f,d,u,p=0,v=0,_=0,x=0,b,m=Math.sqrt(o*o+l*l);h=s-o,f=a-l,b=Math.sqrt(h*h+f*f),m=b>m?b:m;var k=a,O=s,T,F,R=0,L,U;for(h=0;h<s;h+=1)for(f=0;f<a;f+=1)d=h-o,u=f-l,T=Math.sqrt(d*d+u*u)*k/m,F=(Math.atan2(u,d)*180/Math.PI+360+R)%360,F=F*O/360,L=Math.floor(F),U=Math.floor(T),c=(U*s+L)*4,p=r[c+0],v=r[c+1],_=r[c+2],x=r[c+3],c=(f*s+h)*4,i[c+0]=p,i[c+1]=v,i[c+2]=_,i[c+3]=x};const YP=function(n){var t=n.width,e=n.height,r,i,s,a,o,l,c,h,f,d,u=Math.round(this.kaleidoscopePower()),p=Math.round(this.kaleidoscopeAngle()),v=Math.floor(t*(p%360)/360);if(!(u<1)){var _=Oy.Util.createCanvasElement();_.width=t,_.height=e;var x=_.getContext("2d").getImageData(0,0,t,e);Oy.Util.releaseCanvas(_),HP(n,x,{polarCenterX:t/2,polarCenterY:e/2});for(var b=t/Math.pow(2,u);b<=8;)b=b*2,u-=1;b=Math.ceil(b);var m=b,k=0,O=m,T=1;for(v+b>t&&(k=m,O=0,T=-1),i=0;i<e;i+=1)for(r=k;r!==O;r+=T)s=Math.round(r+v)%t,f=(t*i+s)*4,o=x.data[f+0],l=x.data[f+1],c=x.data[f+2],h=x.data[f+3],d=(t*i+r)*4,x.data[d+0]=o,x.data[d+1]=l,x.data[d+2]=c,x.data[d+3]=h;for(i=0;i<e;i+=1)for(m=Math.floor(b),a=0;a<u;a+=1){for(r=0;r<m+1;r+=1)f=(t*i+r)*4,o=x.data[f+0],l=x.data[f+1],c=x.data[f+2],h=x.data[f+3],d=(t*i+m*2-r-1)*4,x.data[d+0]=o,x.data[d+1]=l,x.data[d+2]=c,x.data[d+3]=h;m*=2}qP(x,n,{polarRotation:0})}};Py=ro.Kaleidoscope=YP,ql.Factory.addGetterSetter(Ay.Node,"kaleidoscopePower",2,(0,$y.getNumberValidator)(),ql.Factory.afterSetFilter),ql.Factory.addGetterSetter(Ay.Node,"kaleidoscopeAngle",0,(0,$y.getNumberValidator)(),ql.Factory.afterSetFilter);const KP=Mt({__proto__:null,get Kaleidoscope(){return Py},default:ro},[ro]),XP=Dt(KP);var io={};Object.defineProperty(io,"__esModule",{value:!0});var Ny=io.Mask=void 0;const Fy=ee,JP=Le,QP=re;function Yl(n,t,e){var r=(e*n.width+t)*4,i=[];return i.push(n.data[r++],n.data[r++],n.data[r++],n.data[r++]),i}function so(n,t){return Math.sqrt(Math.pow(n[0]-t[0],2)+Math.pow(n[1]-t[1],2)+Math.pow(n[2]-t[2],2))}function ZP(n){for(var t=[0,0,0],e=0;e<n.length;e++)t[0]+=n[e][0],t[1]+=n[e][1],t[2]+=n[e][2];return t[0]/=n.length,t[1]/=n.length,t[2]/=n.length,t}function WP(n,t){var e=Yl(n,0,0),r=Yl(n,n.width-1,0),i=Yl(n,0,n.height-1),s=Yl(n,n.width-1,n.height-1),a=t||10;if(so(e,r)<a&&so(r,s)<a&&so(s,i)<a&&so(i,e)<a){for(var o=ZP([r,e,s,i]),l=[],c=0;c<n.width*n.height;c++){var h=so(o,[n.data[c*4],n.data[c*4+1],n.data[c*4+2]]);l[c]=h<a?0:255}return l}}function tA(n,t){for(var e=0;e<n.width*n.height;e++)n.data[4*e+3]=t[e]}function eA(n,t,e){for(var r=[1,1,1,1,0,1,1,1,1],i=Math.round(Math.sqrt(r.length)),s=Math.floor(i/2),a=[],o=0;o<e;o++)for(var l=0;l<t;l++){for(var c=o*t+l,h=0,f=0;f<i;f++)for(var d=0;d<i;d++){var u=o+f-s,p=l+d-s;if(u>=0&&u<e&&p>=0&&p<t){var v=u*t+p,_=r[f*i+d];h+=n[v]*_}}a[c]=h===255*8?255:0}return a}function nA(n,t,e){for(var r=[1,1,1,1,1,1,1,1,1],i=Math.round(Math.sqrt(r.length)),s=Math.floor(i/2),a=[],o=0;o<e;o++)for(var l=0;l<t;l++){for(var c=o*t+l,h=0,f=0;f<i;f++)for(var d=0;d<i;d++){var u=o+f-s,p=l+d-s;if(u>=0&&u<e&&p>=0&&p<t){var v=u*t+p,_=r[f*i+d];h+=n[v]*_}}a[c]=h>=255*4?255:0}return a}function rA(n,t,e){for(var r=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],i=Math.round(Math.sqrt(r.length)),s=Math.floor(i/2),a=[],o=0;o<e;o++)for(var l=0;l<t;l++){for(var c=o*t+l,h=0,f=0;f<i;f++)for(var d=0;d<i;d++){var u=o+f-s,p=l+d-s;if(u>=0&&u<e&&p>=0&&p<t){var v=u*t+p,_=r[f*i+d];h+=n[v]*_}}a[c]=h}return a}const iA=function(n){var t=this.threshold(),e=WP(n,t);return e&&(e=eA(e,n.width,n.height),e=nA(e,n.width,n.height),e=rA(e,n.width,n.height),tA(n,e)),n};Ny=io.Mask=iA,Fy.Factory.addGetterSetter(JP.Node,"threshold",0,(0,QP.getNumberValidator)(),Fy.Factory.afterSetFilter);const sA=Mt({__proto__:null,get Mask(){return Ny},default:io},[io]),aA=Dt(sA);var ao={};Object.defineProperty(ao,"__esModule",{value:!0});var Ry=ao.Noise=void 0;const My=ee,oA=Le,lA=re,cA=function(n){var t=this.noise()*255,e=n.data,r=e.length,i=t/2,s;for(s=0;s<r;s+=4)e[s+0]+=i-2*i*Math.random(),e[s+1]+=i-2*i*Math.random(),e[s+2]+=i-2*i*Math.random()};Ry=ao.Noise=cA,My.Factory.addGetterSetter(oA.Node,"noise",.2,(0,lA.getNumberValidator)(),My.Factory.afterSetFilter);const hA=Mt({__proto__:null,get Noise(){return Ry},default:ao},[ao]),uA=Dt(hA);var oo={};Object.defineProperty(oo,"__esModule",{value:!0});var Dy=oo.Pixelate=void 0;const Iy=ee,dA=$e,fA=Le,pA=re,gA=function(n){var t=Math.ceil(this.pixelSize()),e=n.width,r=n.height,i,s,a,o,l,c,h,f=Math.ceil(e/t),d=Math.ceil(r/t),u,p,v,_,x,b,m,k=n.data;if(t<=0){dA.Util.error("pixelSize value can not be <= 0");return}for(x=0;x<f;x+=1)for(b=0;b<d;b+=1){for(o=0,l=0,c=0,h=0,u=x*t,p=u+t,v=b*t,_=v+t,m=0,i=u;i<p;i+=1)if(!(i>=e))for(s=v;s<_;s+=1)s>=r||(a=(e*s+i)*4,o+=k[a+0],l+=k[a+1],c+=k[a+2],h+=k[a+3],m+=1);for(o=o/m,l=l/m,c=c/m,h=h/m,i=u;i<p;i+=1)if(!(i>=e))for(s=v;s<_;s+=1)s>=r||(a=(e*s+i)*4,k[a+0]=o,k[a+1]=l,k[a+2]=c,k[a+3]=h)}};Dy=oo.Pixelate=gA,Iy.Factory.addGetterSetter(fA.Node,"pixelSize",8,(0,pA.getNumberValidator)(),Iy.Factory.afterSetFilter);const mA=Mt({__proto__:null,get Pixelate(){return Dy},default:oo},[oo]),vA=Dt(mA);var lo={};Object.defineProperty(lo,"__esModule",{value:!0});var jy=lo.Posterize=void 0;const Ly=ee,yA=Le,_A=re,bA=function(n){var t=Math.round(this.levels()*254)+1,e=n.data,r=e.length,i=255/t,s;for(s=0;s<r;s+=1)e[s]=Math.floor(e[s]/i)*i};jy=lo.Posterize=bA,Ly.Factory.addGetterSetter(yA.Node,"levels",.5,(0,_A.getNumberValidator)(),Ly.Factory.afterSetFilter);const wA=Mt({__proto__:null,get Posterize(){return jy},default:lo},[lo]),xA=Dt(wA);var co={};Object.defineProperty(co,"__esModule",{value:!0});var Uy=co.RGB=void 0;const Kl=ee,Dd=Le,SA=re,kA=function(n){var t=n.data,e=t.length,r=this.red(),i=this.green(),s=this.blue(),a,o;for(a=0;a<e;a+=4)o=(.34*t[a]+.5*t[a+1]+.16*t[a+2])/255,t[a]=o*r,t[a+1]=o*i,t[a+2]=o*s,t[a+3]=t[a+3]};Uy=co.RGB=kA,Kl.Factory.addGetterSetter(Dd.Node,"red",0,function(n){return this._filterUpToDate=!1,n>255?255:n<0?0:Math.round(n)}),Kl.Factory.addGetterSetter(Dd.Node,"green",0,function(n){return this._filterUpToDate=!1,n>255?255:n<0?0:Math.round(n)}),Kl.Factory.addGetterSetter(Dd.Node,"blue",0,SA.RGBComponent,Kl.Factory.afterSetFilter);const CA=Mt({__proto__:null,get RGB(){return Uy},default:co},[co]),TA=Dt(CA);var ho={};Object.defineProperty(ho,"__esModule",{value:!0});var Gy=ho.RGBA=void 0;const uo=ee,Xl=Le,EA=re,PA=function(n){var t=n.data,e=t.length,r=this.red(),i=this.green(),s=this.blue(),a=this.alpha(),o,l;for(o=0;o<e;o+=4)l=1-a,t[o]=r*a+t[o]*l,t[o+1]=i*a+t[o+1]*l,t[o+2]=s*a+t[o+2]*l};Gy=ho.RGBA=PA,uo.Factory.addGetterSetter(Xl.Node,"red",0,function(n){return this._filterUpToDate=!1,n>255?255:n<0?0:Math.round(n)}),uo.Factory.addGetterSetter(Xl.Node,"green",0,function(n){return this._filterUpToDate=!1,n>255?255:n<0?0:Math.round(n)}),uo.Factory.addGetterSetter(Xl.Node,"blue",0,EA.RGBComponent,uo.Factory.afterSetFilter),uo.Factory.addGetterSetter(Xl.Node,"alpha",1,function(n){return this._filterUpToDate=!1,n>1?1:n<0?0:n});const AA=Mt({__proto__:null,get RGBA(){return Gy},default:ho},[ho]),OA=Dt(AA);var fo={};Object.defineProperty(fo,"__esModule",{value:!0});var zy=fo.Sepia=void 0;const $A=function(n){var t=n.data,e=t.length,r,i,s,a;for(r=0;r<e;r+=4)i=t[r+0],s=t[r+1],a=t[r+2],t[r+0]=Math.min(255,i*.393+s*.769+a*.189),t[r+1]=Math.min(255,i*.349+s*.686+a*.168),t[r+2]=Math.min(255,i*.272+s*.534+a*.131)};zy=fo.Sepia=$A;const NA=Mt({__proto__:null,get Sepia(){return zy},default:fo},[fo]),FA=Dt(NA);var po={};Object.defineProperty(po,"__esModule",{value:!0});var Vy=po.Solarize=void 0;const RA=function(n){var t=n.data,e=n.width,r=n.height,i=e*4,s=r;do{var a=(s-1)*i,o=e;do{var l=a+(o-1)*4,c=t[l],h=t[l+1],f=t[l+2];c>127&&(c=255-c),h>127&&(h=255-h),f>127&&(f=255-f),t[l]=c,t[l+1]=h,t[l+2]=f}while(--o)}while(--s)};Vy=po.Solarize=RA;const MA=Mt({__proto__:null,get Solarize(){return Vy},default:po},[po]),DA=Dt(MA);var go={};Object.defineProperty(go,"__esModule",{value:!0});var By=go.Threshold=void 0;const Hy=ee,IA=Le,jA=re,LA=function(n){var t=this.threshold()*255,e=n.data,r=e.length,i;for(i=0;i<r;i+=1)e[i]=e[i]<t?0:255};By=go.Threshold=LA,Hy.Factory.addGetterSetter(IA.Node,"threshold",.5,(0,jA.getNumberValidator)(),Hy.Factory.afterSetFilter);const UA=Mt({__proto__:null,get Threshold(){return By},default:go},[go]),GA=Dt(UA);Object.defineProperty(wa,"__esModule",{value:!0});var qy=wa.Konva=void 0;const Yy=lE,zA=dE,VA=TE,BA=NE,HA=DE,qA=UE,Ky=YE,YA=mv,KA=pd,XA=Ov,JA=r7,QA=o7,ZA=d7,WA=m7,tO=Zv,eO=U7,nO=tP,rO=sP,iO=fP,sO=yP,aO=SP,oO=EP,lO=NP,cO=MP,hO=jP,uO=GP,dO=BP,fO=XP,pO=aA,gO=uA,mO=vA,vO=xA,yO=TA,_O=OA,bO=FA,wO=DA,xO=GA;qy=wa.Konva=Yy.Konva.Util._assign(Yy.Konva,{Arc:zA.Arc,Arrow:VA.Arrow,Circle:BA.Circle,Ellipse:HA.Ellipse,Image:qA.Image,Label:Ky.Label,Tag:Ky.Tag,Line:YA.Line,Path:KA.Path,Rect:XA.Rect,RegularPolygon:JA.RegularPolygon,Ring:QA.Ring,Sprite:ZA.Sprite,Star:WA.Star,Text:tO.Text,TextPath:eO.TextPath,Transformer:nO.Transformer,Wedge:rO.Wedge,Filters:{Blur:iO.Blur,Brighten:sO.Brighten,Contrast:aO.Contrast,Emboss:oO.Emboss,Enhance:lO.Enhance,Grayscale:cO.Grayscale,HSL:hO.HSL,HSV:uO.HSV,Invert:dO.Invert,Kaleidoscope:fO.Kaleidoscope,Mask:pO.Mask,Noise:gO.Noise,Pixelate:mO.Pixelate,Posterize:vO.Posterize,RGB:yO.RGB,RGBA:_O.RGBA,Sepia:bO.Sepia,Solarize:wO.Solarize,Threshold:xO.Threshold}});const SO=Mt({__proto__:null,get Konva(){return qy},default:wa},[wa]),kO=Dt(SO);var CO=Bu.exports;Object.defineProperty(CO,"__esModule",{value:!0});const TO=kO;Bu.exports=TO.Konva;var EO=Bu.exports;const Se=An(EO),PO=Se.Ellipse.prototype.toObject;Se.Ellipse.prototype.toObject=function(){const n=PO.call(this);return{...n,attrs:{...n.attrs,strokeWidth:this.strokeWidth(),dash:this.dash()}}};const AO=Se.Line.prototype.toObject;Se.Line.prototype.toObject=function(){const n=AO.call(this);return{...n,attrs:{...n.attrs,x:this.getAbsolutePosition().x,y:this.getAbsolutePosition().y,strokeWidth:this.strokeWidth(),dash:this.dash()}}};const OO=Se.Node.prototype.toObject,$O=function(){const n=OO.call(this);return{...n,attrs:{...n.attrs,x:this.getAbsolutePosition().x,y:this.getAbsolutePosition().y,scaleX:this.getAbsoluteScale().x,scaleY:this.getAbsoluteScale().y,rotation:this.getAbsoluteRotation(),opacity:this.getAbsoluteOpacity()}}};Se.Node.prototype.toObject=$O;const NO=Se.Node.prototype.remove;Se.Node.prototype.remove=function(){return NO.call(this),this.fire("removed",{target:this}),this};const FO=Se.Node.prototype.moveUp;Se.Node.prototype.moveUp=function(){const n=FO.call(this);return n&&this.fire("move:up"),n};const RO=Se.Node.prototype.moveDown;Se.Node.prototype.moveDown=function(){const n=RO.call(this);return n&&this.fire("move:down"),n};const MO=Se.Node.prototype.moveToTop;Se.Node.prototype.moveToTop=function(){const n=MO.call(this);return n&&this.fire("move:top"),n};const DO=Se.Node.prototype.moveToBottom;Se.Node.prototype.moveToBottom=function(){const n=DO.call(this);return n&&this.fire("move:bottom"),n};const IO=Se.Node.prototype.moveTo;Se.Node.prototype.moveTo=function(n){const t=IO.call(this,n);return this.fire("move:to"),t};const jO=Se.Rect.prototype.toObject;Se.Rect.prototype.toObject=function(){const n=jO.call(this);return{...n,attrs:{...n.attrs,strokeWidth:this.strokeWidth(),dash:this.dash(),cornerRadius:this.cornerRadius()}}};const LO=Se.RegularPolygon.prototype.toObject;Se.RegularPolygon.prototype.toObject=function(){const n=LO.call(this);return{...n,attrs:{...n.attrs,strokeWidth:this.strokeWidth(),dash:this.dash()}}};const UO=Se.Text.prototype.toObject;Se.Text.prototype.toObject=function(){const n=UO.call(this);return{...n,attrs:{...n.attrs,strokeWidth:this.strokeWidth()}}};const GO=Se.Image.prototype.toObject;Se.Image.prototype.toObject=function(){const n=GO.call(this);return{...n,attrs:{...n.attrs,strokeWidth:this.strokeWidth(),dash:this.dash(),image:this.image()}}};var zO=Object.defineProperty,VO=Object.getOwnPropertyDescriptor,fi=(n,t,e,r)=>{for(var i=VO(t,e),s=n.length-1,a;s>=0;s--)(a=n[s])&&(i=a(t,e,i)||i);return i&&zO(t,e,i),i};function pi(n,t,e){const r=e.value;return e.value=function(...i){if(this.enabled)return r.apply(this,i);console.log(`Method ${t} is disabled.`)},e}class gi{constructor(t,e){Et(this,"app");Et(this,"enabled");const{enabled:r}=e;this.app=t,this.enabled=r}alignLeft(t){const e=t.map(i=>i.getClientRect()),r=Math.min(...e.map(i=>i.x));this.app.update(...t.map((i,s)=>{const a=i.toObject(),o=e[s].x-r;return a.attrs={...a.attrs,x:a.attrs.x-o},a}))}alignRight(t){const e=t.map(i=>i.getClientRect()),r=Math.max(...e.map(i=>i.x+i.width));this.app.update(...t.map((i,s)=>{const a=i.toObject(),o=r-(e[s].x+e[s].width);return a.attrs={...a.attrs,x:a.attrs.x+o},a}))}alignTop(t){const e=t.map(i=>i.getClientRect()),r=Math.min(...e.map(i=>i.y));this.app.update(...t.map((i,s)=>{const a=i.toObject(),o=e[s].y-r;return a.attrs={...a.attrs,y:a.attrs.y-o},a}))}alignBottom(t){const e=t.map(i=>i.getClientRect()),r=Math.max(...e.map(i=>i.y+i.height));this.app.update(...t.map((i,s)=>{const a=i.toObject(),o=r-(e[s].y+e[s].height);return a.attrs={...a.attrs,y:a.attrs.y+o},a}))}alignCenterX(t){const e=t.map(i=>i.getClientRect()),r=e.reduce((i,s)=>i+(s.x+s.width/2),0)/e.length;this.app.update(...t.map((i,s)=>{const a=i.toObject(),o=r-(e[s].x+e[s].width/2);return a.attrs={...a.attrs,x:a.attrs.x+o},a}))}alignCenterY(t){const e=t.map(i=>i.getClientRect()),r=e.reduce((i,s)=>i+(s.y+s.height/2),0)/e.length;this.app.update(...t.map((i,s)=>{const a=i.toObject(),o=r-(e[s].y+e[s].height/2);return a.attrs={...a.attrs,y:a.attrs.y+o},a}))}dispersionX(t){t.map(e=>e.getClientRect().x+e.getClientRect().width/2).every((e,r,i)=>e===i[0])||this.distributeNodes(t,"x")}dispersionY(t){t.map(e=>e.getClientRect().y+e.getClientRect().height/2).every((e,r,i)=>e===i[0])||this.distributeNodes(t,"y")}distributeNodes(t,e){if(t.length<=2)return;t.sort((h,f)=>h.getClientRect()[e]-f.getClientRect()[e]);const r=t[0],i=t[t.length-1],s=r.getClientRect()[e]+(e==="x"?r.getClientRect().width:r.getClientRect().height),a=i.getClientRect()[e]-s,o=t.slice(1,-1).reduce((h,f)=>h+(e==="x"?f.getClientRect().width:f.getClientRect().height),0),l=Math.max((a-o)/(t.length-1),0);let c=s;this.app.update(...t.map((h,f)=>{const d=h.toObject();if(f===0||f===t.length-1)return d;const u=c+l;return d.attrs[e]=u-h.getClientRect()[e]+d.attrs[e],c=u+(e==="x"?h.getClientRect().width:h.getClientRect().height),d}))}}fi([pi],gi.prototype,"alignLeft"),fi([pi],gi.prototype,"alignRight"),fi([pi],gi.prototype,"alignTop"),fi([pi],gi.prototype,"alignBottom"),fi([pi],gi.prototype,"alignCenterX"),fi([pi],gi.prototype,"alignCenterY"),fi([pi],gi.prototype,"dispersionX"),fi([pi],gi.prototype,"dispersionY");const BO=nt.defineComponent({__name:"Icon",props:{icon:{default:"mdi-light:home"},color:{default:rn.colorPrimary}},setup(n){const t=n;return(e,r)=>(nt.openBlock(),nt.createElementBlock("span",{class:"icon",style:nt.normalizeStyle(["color: "+e.color])},[nt.createVNode(nt.unref(a_),{icon:t.icon,color:e.color},null,8,["icon","color"])],4))}}),mo=(n,t)=>{const e=n.__vccOpts||n;for(const[r,i]of t)e[r]=i;return e},vo=mo(BO,[["__scopeId","data-v-a5ce002f"]]),HO=nt.defineComponent({__name:"Button",props:{label:{},icon:{},isDisabled:{type:Boolean,default:!1},height:{default:rn.height44},iconPosition:{default:"right"},padding:{default:rn.gap12},fontSize:{default:rn.fontSize14},borderRadius:{default:rn.borderRadius},borderColor:{default:rn.colorPrimary},bgColor:{default:rn.colorPrimary},fontColor:{default:rn.colorGrayFF}},emits:["ceClick","click"],setup(n,{emit:t}){const e=n,r=t,i=nt.ref(e.borderColor),s=nt.ref(e.bgColor),a=nt.ref(e.fontColor),o=nt.ref(e.isDisabled?"0.6":"1"),l=nt.ref(e.isDisabled?"not-allowed":"pointer");let c=!1;const h=()=>{e.isDisabled||(c=!0,i.value=dl(e.borderColor,10),s.value=dl(e.bgColor,10))},f=()=>{e.isDisabled||(c=!1,i.value=e.borderColor,s.value=e.bgColor)},d=()=>{e.isDisabled||(i.value=dl(e.borderColor,-10),s.value=dl(e.bgColor,-10),setTimeout(()=>{c?h():f()},150),r("ceClick"),r("click"))};return(u,p)=>(nt.openBlock(),nt.createElementBlock("div",nt.mergeProps({class:"button",style:[`opacity: ${o.value}`,`border: 1px solid ${i.value}`,`border-radius: ${e.borderRadius}`,`background-color: ${s.value}`,`color: ${a.value}`,`height: ${e.height}`,`line-height: ${e.height}`,`font-size: ${e.fontSize}`,`cursor: ${l.value}`]},u.$attrs,{onMouseover:h,onMouseleave:f,onClick:d}),[nt.createElementVNode("label",{class:"label truncate",style:nt.normalizeStyle({padding:"0 "+u.padding,cursor:l.value})},[nt.renderSlot(u.$slots,"default",{},()=>[u.icon&&u.iconPosition==="right"?(nt.openBlock(),nt.createBlock(vo,{key:0,icon:u.icon,color:a.value,style:nt.normalizeStyle({marginRight:nt.unref(rn).gap4,cursor:l.value})},null,8,["icon","color","style"])):nt.createCommentVNode("",!0),nt.createElementVNode("span",{style:nt.normalizeStyle({cursor:l.value})},nt.toDisplayString(u.label),5),u.icon&&u.iconPosition==="left"?(nt.openBlock(),nt.createBlock(vo,{key:1,icon:u.icon,color:a.value,style:nt.normalizeStyle({marginLeft:nt.unref(rn).gap4,cursor:l.value})},null,8,["icon","color","style"])):nt.createCommentVNode("",!0)],!0)],4)],16))}}),Jl=mo(HO,[["__scopeId","data-v-05688e75"]]),qO={id:"page"},YO=mo(nt.defineComponent({__name:"MobileLayout",props:{header:{type:Boolean,default:!0},footer:{type:Boolean,default:!0},left:{type:Boolean,default:!1},right:{type:Boolean,default:!1},designWidth:{default:750}},emits:["triggerHeader","triggerFooter","triggerLeft","triggerRight"],setup(n,{expose:t,emit:e}){const r=n;X6(r.designWidth);const i=e,s=nt.ref(),a=nt.ref(),o=nt.ref(),l=nt.ref(),c=nt.ref("0");nt.watch(s,(T,F)=>{typeof T<"u"&&T!==F&&(c.value=$r(s.value).css("height"))});const h=nt.ref("0");nt.watch(a,(T,F)=>{typeof T<"u"&&T!==F&&(h.value=$r(a.value).css("height"))});const f=nt.ref("0");nt.watch(o,(T,F)=>{typeof T<"u"&&T!==F&&(f.value=$r(o.value).css("width"))});const d=nt.ref("0");nt.watch(l,(T,F)=>{typeof T<"u"&&T!==F&&(d.value=$r(l.value).css("width"))}),window.addEventListener("orientationchange"in window?"orientationchange":"resize",()=>{c.value=$r(s.value).css("height"),h.value=$r(a.value).css("height"),f.value=$r(o.value).css("width"),d.value=$r(l.value).css("width")},!1);const u=new g1;let p=nt.ref(r.header);const v=()=>{s.value&&(u.fromDOM([s.value]),u.toCSS("slideDown",{easeName:"ease-in",dur:150,direction:p.value?"reverse":"normal"}),p.value=!p.value,i("triggerHeader",p.value))};let _=nt.ref(r.footer);const x=()=>{a.value&&(u.fromDOM([a.value]),u.toCSS("slideUp",{easeName:"ease-in",dur:150,direction:_.value?"reverse":"normal"}),_.value=!_.value,i("triggerFooter",_.value))};let b=nt.ref(r.left);const m=()=>{o.value&&(u.fromDOM([o.value]),u.toCSS("slideRight",{easeName:"ease-in",dur:150,direction:b.value?"reverse":"normal"}),b.value=!b.value,i("triggerLeft",b.value))};let k=nt.ref(r.right);return t({triggerHeader:v,triggerFooter:x,triggerLeft:m,triggerRight:()=>{l.value&&(u.fromDOM([l.value]),u.toCSS("slideLeft",{easeName:"ease-in",dur:150,direction:k.value?"reverse":"normal"}),k.value=!k.value,i("triggerRight",k.value))}}),(T,F)=>(nt.openBlock(),nt.createElementBlock("div",qO,[nt.createElementVNode("header",{id:"header",ref_key:"refHeader",ref:s,style:nt.normalizeStyle({transform:T.header?"translate(0, 0)":`translate(0, -${c.value})`})},[nt.renderSlot(T.$slots,"header",{},void 0,!0)],4),nt.createElementVNode("div",{id:"main",style:nt.normalizeStyle({paddingTop:nt.unref(p)?c.value:0,paddingBottom:nt.unref(_)?h.value:0})},[nt.renderSlot(T.$slots,"main",{},void 0,!0)],4),nt.createElementVNode("footer",{id:"footer",ref_key:"refFooter",ref:a,style:nt.normalizeStyle({transform:T.footer?"translate(0, 0)":`translate(0, ${h.value})`})},[nt.renderSlot(T.$slots,"footer",{},void 0,!0)],4),nt.createElementVNode("div",{id:"left",ref_key:"refLeft",ref:o,style:nt.normalizeStyle({transform:T.left?"translate(0, 0)":`translate(-${f.value}, 0)`})},[nt.renderSlot(T.$slots,"left",{},void 0,!0)],4),nt.createElementVNode("div",{id:"right",ref_key:"refRight",ref:l,style:nt.normalizeStyle({transform:T.right?"translate(0, 0)":`translate(${d.value}, 0)`})},[nt.renderSlot(T.$slots,"right",{},void 0,!0)],4)]))}}),[["__scopeId","data-v-aded2ce3"]]),KO={class:"content"},XO={class:"content-inner"},JO={key:0,class:"title"},QO={key:0,class:"title-inner truncate"},ZO={class:"custom-content"},WO={key:1,class:"btns"},Id=mo(nt.defineComponent({customOptions:{Icon:vo,Button:Jl},__name:"Dialog",props:{open:{type:Boolean,default:!1},title:{default:"通知"},content:{default:"..."},showTitle:{type:Boolean,default:!0},showClose:{type:Boolean,default:!1},showCancel:{type:Boolean,default:!1},showConfirm:{type:Boolean,default:!0},openDurTime:{default:300},closeDurTime:{default:150}},emits:["close","cancel","confirm"],setup(n,{expose:t,emit:e}){const r=n,i=e,s=nt.ref(),a=new g1,o=(d=!0)=>{d?nt.watch(s,()=>{s.value&&(a.fromDOM(s.value),a.toCSS("popIn",{easeName:"ease",dur:r.openDurTime}))},{once:!0}):a.toCSS("popIn",{easeName:"ease",dur:r.closeDurTime,direction:"reverse"})},l=nt.ref();nt.watch(l,(d,u)=>{d!==u&&o(l.value)}),nt.watch(()=>r.open,()=>{(r.open===!0||r.open===!1)&&(l.value=r.open)},{immediate:!0});function c(){o(!1),setTimeout(()=>{l.value=!1,i("close")},r.closeDurTime)}function h(){c(),i("cancel")}function f(){c(),i("confirm")}return t({close:c}),(d,u)=>l.value?(nt.openBlock(),nt.createElementBlock("div",{key:0,class:"overlay",style:nt.normalizeStyle(["background-color: "+nt.unref(M8)(nt.unref(rn).colorGray0,.25)])},[nt.createElementVNode("div",KO,[nt.createElementVNode("div",XO,[nt.createElementVNode("div",{ref_key:"dialog",ref:s,class:"panel",style:nt.normalizeStyle(["background-color: "+nt.unref(rn).colorGrayFF,"opacity: 0"])},[d.showTitle||d.showClose?(nt.openBlock(),nt.createElementBlock("div",JO,[d.showTitle?(nt.openBlock(),nt.createElementBlock("div",QO,nt.toDisplayString(d.title),1)):nt.createCommentVNode("",!0),d.showClose?(nt.openBlock(),nt.createBlock(vo,{key:1,class:"close",icon:"ic:baseline-close",color:nt.unref(rn).colorGrayCC,onClick:c},null,8,["color"])):nt.createCommentVNode("",!0)])):nt.createCommentVNode("",!0),nt.createElementVNode("div",ZO,[nt.renderSlot(d.$slots,"default",{},()=>[nt.createTextVNode(nt.toDisplayString(d.content),1)],!0)]),d.showCancel||d.showConfirm?(nt.openBlock(),nt.createElementBlock("div",WO,[d.showCancel?(nt.openBlock(),nt.createBlock(Jl,{key:0,onClick:h,class:"btn",bgColor:nt.unref(rn).colorGrayE6,borderColor:nt.unref(rn).colorGrayE6,fontColor:nt.unref(rn).colorGray3,borderRadius:"0"},{default:nt.withCtx(()=>[nt.createTextVNode(" 取消 ")]),_:1},8,["bgColor","borderColor","fontColor"])):nt.createCommentVNode("",!0),d.showConfirm?(nt.openBlock(),nt.createBlock(Jl,{key:1,onClick:f,class:"btn",borderRadius:"0"},{default:nt.withCtx(()=>[nt.createTextVNode(" 确定 ")]),_:1})):nt.createCommentVNode("",!0)])):nt.createCommentVNode("",!0)],4)])])],4)):nt.createCommentVNode("",!0)}}),[["__scopeId","data-v-04990eca"]]),t$={class:"loading"},e$={class:"icon"},n$={viewBox:"25 25 50 50"},r$={key:0,class:"content"},i$=mo(nt.defineComponent({customOptions:{Dialog:Id},__name:"Loading",props:{open:{type:Boolean,default:!1},content:{}},setup(n){const t=n;return(e,r)=>(nt.openBlock(),nt.createBlock(Id,{open:t.open,showConfirm:!1,showTitle:!1},{default:nt.withCtx(()=>[nt.createElementVNode("div",t$,[nt.createElementVNode("div",e$,[nt.renderSlot(e.$slots,"default",{},()=>[(nt.openBlock(),nt.createElementBlock("svg",n$,[nt.createElementVNode("circle",{cx:"50",cy:"50",r:"20",style:nt.normalizeStyle(["stroke: "+nt.unref(rn).colorPrimary])},null,4)]))],!0)]),e.content?(nt.openBlock(),nt.createElementBlock("div",r$,nt.toDisplayString(e.content),1)):nt.createCommentVNode("",!0)])]),_:3},8,["open"]))}}),[["__scopeId","data-v-9af456e2"]]);en.Button=Jl,en.Dialog=Id,en.Icon=vo,en.Loading=i$,en.MobileLayout=YO,Object.defineProperty(en,Symbol.toStringTag,{value:"Module"})});