archgine 1.0.39 → 1.0.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/applications/app-offscreen.d.ts +1 -1
- package/lib/environment.worker.js +1 -1
- package/lib/index.mjs +33 -28
- package/lib/index.umd.js +15 -15
- package/lib/renderer.worker.js +547 -542
- package/package.json +3 -2
package/lib/index.umd.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
(function(le,kn){typeof exports=="object"&&typeof module<"u"?kn(exports):typeof define=="function"&&define.amd?define(["exports"],kn):(le=typeof globalThis<"u"?globalThis:le||self,kn(le.archgine={}))})(this,function(le){"use strict";const kn={name:"TinyEngine",containerId:"tinyEngine",canvas:"tinyEngine",width:0,height:0,aspect:1,dpr:1,alpha:!1,color:"#232323",fps:60,syncDelay:800,animateDuration:600,mergeRendering:!1,usedCache:!1,showPoints:!1,wireframe:!1,castShadow:!1,workerRender:!1,monitorDuration:1e4,light:{color:"#f2f2f2",position:[-6,6,0],castShadow:!0,shadowBlur:16},camera:{left:-1,right:1,top:1,bottom:-1,aspect:1,eye:[0,0,0],up:[0,0,1],helperEnable:!0},controls:{target:[0,0,0],minDistance:.1,maxDistance:1e3,enablePan:!0,enableRotate:!0,enableZoom:!0,focusMode:!0,autoRotate:!1,autoRotateSpeed:.5,enableDamping:!0,dampingFactor:.2},gridHelper:{fill:"#e3e3e3"},axesHelper:{},displayUnits:"",tooltip:!0,assetType:"rm",zoomToSelectEnable:!1,selectEnable:!1,multiSelectEnable:!1,socialDistanceEnable:!1,socialDistance:{radius:3}};function dh(r,t){const e=r.x*Math.cos(t)-r.y*Math.sin(t),n=r.y*Math.cos(t)+r.x*Math.sin(t);r.x=e,r.y=n}function Kd(r,t,e){r.x+=t,r.y+=e}function gh(r,t){r.x*=t,r.y*=t}class Hn{commands;constructor(t){this.commands=[],t&&t instanceof Hn?this.commands.push(...t.commands):t&&(this.commands=ig(t))}addPath(t){t&&t instanceof Hn&&this.commands.push(...t.commands)}moveTo(t,e){this.commands.push(["M",t,e])}lineTo(t,e){this.commands.push(["L",t,e])}arc(t,e,n,a,u,l){this.commands.push(["AC",t,e,n,a,u,!!l])}arcTo(t,e,n,a,u){this.commands.push(["AT",t,e,n,a,u])}ellipse(t,e,n,a,u,l,c,f){this.commands.push(["E",t,e,n,a,u,l,c,!!f])}closePath(){this.commands.push(["Z"])}bezierCurveTo(t,e,n,a,u,l){this.commands.push(["C",t,e,n,a,u,l])}quadraticCurveTo(t,e,n,a){this.commands.push(["Q",t,e,n,a])}rect(t,e,n,a){this.commands.push(["R",t,e,n,a])}roundRect(t,e,n,a,u){typeof u>"u"?this.commands.push(["RR",t,e,n,a,0]):this.commands.push(["RR",t,e,n,a,u])}}function Ku(r,t){let e=0,n=0,a,u,l,c,f,d,y,A,_,C,F,N,M,R,q,z,w,L,k,j,tt,Z=null,rt=null,J=null,st=null,ht=null,ct=null;r.beginPath();for(let ft=0;ft<t.length;++ft){L=t[ft][0],L!=="S"&&L!=="s"&&L!=="C"&&L!=="c"&&(Z=null,rt=null),L!=="T"&&L!=="t"&&L!=="Q"&&L!=="q"&&(J=null,st=null);let O;switch(L){case"m":case"M":O=t[ft],L==="m"?(e+=O[1],n+=O[2]):(e=O[1],n=O[2]),(L==="M"||!ht)&&(ht={x:e,y:n}),r.moveTo(e,n);break;case"l":O=t[ft],e+=O[1],n+=O[2],r.lineTo(e,n);break;case"L":O=t[ft],e=O[1],n=O[2],r.lineTo(e,n);break;case"H":O=t[ft],e=O[1],r.lineTo(e,n);break;case"h":O=t[ft],e+=O[1],r.lineTo(e,n);break;case"V":O=t[ft],n=O[1],r.lineTo(e,n);break;case"v":O=t[ft],n+=O[1],r.lineTo(e,n);break;case"a":case"A":if(O=t[ft],ct===null)throw new Error("This should never happen");L==="a"?(e+=O[6],n+=O[7]):(e=O[6],n=O[7]),R=O[1],q=O[2],y=O[3]*Math.PI/180,l=!!O[4],c=!!O[5],f={x:e,y:n},d={x:(ct.x-f.x)/2,y:(ct.y-f.y)/2},dh(d,-y),A=d.x*d.x/(R*R)+d.y*d.y/(q*q),A>1&&(A=Math.sqrt(A),R*=A,q*=A),k={x:R*d.y/q,y:-(q*d.x)/R},_=R*R*q*q,C=R*R*d.y*d.y+q*q*d.x*d.x,c!==l?gh(k,Math.sqrt((_-C)/C)||0):gh(k,-Math.sqrt((_-C)/C)||0),u=Math.atan2((d.y-k.y)/q,(d.x-k.x)/R),a=Math.atan2(-(d.y+k.y)/q,-(d.x+k.x)/R),dh(k,y),Kd(k,(f.x+ct.x)/2,(f.y+ct.y)/2),r.save(),r.translate(k.x,k.y),r.rotate(y),r.scale(R,q),r.arc(0,0,1,u,a,!c),r.restore();break;case"C":O=t[ft],Z=O[3],rt=O[4],e=O[5],n=O[6],r.bezierCurveTo(O[1],O[2],Z,rt,e,n);break;case"c":O=t[ft],r.bezierCurveTo(O[1]+e,O[2]+n,O[3]+e,O[4]+n,O[5]+e,O[6]+n),Z=O[3]+e,rt=O[4]+n,e+=O[5],n+=O[6];break;case"S":O=t[ft],(Z===null||rt===null)&&(Z=e,rt=n),r.bezierCurveTo(2*e-Z,2*n-rt,O[1],O[2],O[3],O[4]),Z=O[1],rt=O[2],e=O[3],n=O[4];break;case"s":O=t[ft],(Z===null||rt===null)&&(Z=e,rt=n),r.bezierCurveTo(2*e-Z,2*n-rt,O[1]+e,O[2]+n,O[3]+e,O[4]+n),Z=O[1]+e,rt=O[2]+n,e+=O[3],n+=O[4];break;case"Q":O=t[ft],J=O[1],st=O[2],e=O[3],n=O[4],r.quadraticCurveTo(J,st,e,n);break;case"q":O=t[ft],J=O[1]+e,st=O[2]+n,e+=O[3],n+=O[4],r.quadraticCurveTo(J,st,e,n);break;case"T":O=t[ft],(J===null||st===null)&&(J=e,st=n),J=2*e-J,st=2*n-st,e=O[1],n=O[2],r.quadraticCurveTo(J,st,e,n);break;case"t":O=t[ft],(J===null||st===null)&&(J=e,st=n),J=2*e-J,st=2*n-st,e+=O[1],n+=O[2],r.quadraticCurveTo(J,st,e,n);break;case"z":case"Z":ht&&(e=ht.x,n=ht.y),ht=null,r.closePath();break;case"AC":O=t[ft],e=O[1],n=O[2],M=O[3],u=O[4],a=O[5],j=O[6],r.arc(e,n,M,u,a,j);break;case"AT":O=t[ft],F=O[1],N=O[2],e=O[3],n=O[4],M=O[5],r.arcTo(F,N,e,n,M);break;case"E":O=t[ft],e=O[1],n=O[2],R=O[3],q=O[4],y=O[5],u=O[6],a=O[7],j=O[8],r.save(),r.translate(e,n),r.rotate(y),r.scale(R,q),r.arc(0,0,1,u,a,j),r.restore();break;case"R":O=t[ft],e=O[1],n=O[2],z=O[3],w=O[4],ht={x:e,y:n},r.rect(e,n,z,w);break;case"RR":O=t[ft],e=O[1],n=O[2],z=O[3],w=O[4],tt=O[5],ht={x:e,y:n},r.roundRect(e,n,z,w,tt);break}ct?(ct.x=e,ct.y=n):ct={x:e,y:n}}}function Jd(r){if(!r||!r.CanvasRenderingContext2D||r.Path2D)return;const{CanvasRenderingContext2D:t}=r,e=t==null?void 0:t.prototype.fill,n=t==null?void 0:t.prototype.stroke,a=t==null?void 0:t.prototype.isPointInPath;t.prototype.fill=function(...l){if(l[0]instanceof Hn){const c=l[0],f=l[1]||"nonzero";Ku(this,c.commands),e.apply(this,[f])}else{const c=l[0]||"nonzero";return e.apply(this,[c])}},t.prototype.stroke=function(l){l&&Ku(this,l.commands),n.apply(this)},t.prototype.isPointInPath=function(...l){if(l[0]instanceof Hn){const c=l[0],f=l[1],d=l[2],y=l[3]||"nonzero";return Ku(this,c.commands),a.apply(this,[f,d,y])}else return a.apply(this,l)},r.Path2D=Hn}const Ss={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},tg=/([astvzqmhlc])([^astvzqmhlc]*)/gi,eg=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;function rg(r){const t=r.match(eg);return t?t.map(Number):[]}function ig(r){const t=[],e=String(r).trim();return e[0]!=="M"&&e[0]!=="m"||e.replace(tg,(n,a,u)=>{const l=rg(u);let c=a.toLowerCase(),f=a;if(c==="m"&&l.length>2&&(t.push([f,...l.splice(0,2)]),c="l",f=f==="m"?"l":"L"),l.length<Ss[c])return"";for(t.push([f,...l.splice(0,Ss[c])]);l.length>=Ss[c]&&l.length&&Ss[c];)t.push([f,...l.splice(0,Ss[c])]);return""}),t}var Os=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function yh(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Pi={},hi={};function ng(r,t,e){if(e===void 0&&(e=Array.prototype),r&&typeof e.find=="function")return e.find.call(r,t);for(var n=0;n<r.length;n++)if(Object.prototype.hasOwnProperty.call(r,n)){var a=r[n];if(t.call(void 0,a,n,r))return a}}function Ju(r,t){return t===void 0&&(t=Object),t&&typeof t.freeze=="function"?t.freeze(r):r}function sg(r,t){if(r===null||typeof r!="object")throw new TypeError("target is not an object");for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=t[e]);return r}var vh=Ju({HTML:"text/html",isHTML:function(r){return r===vh.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),mh=Ju({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(r){return r===mh.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});hi.assign=sg,hi.find=ng,hi.freeze=Ju,hi.MIME_TYPE=vh,hi.NAMESPACE=mh;var xh=hi,Xr=xh.find,Ns=xh.NAMESPACE;function ag(r){return r!==""}function ug(r){return r?r.split(/[\t\n\f\r ]+/).filter(ag):[]}function og(r,t){return r.hasOwnProperty(t)||(r[t]=!0),r}function Eh(r){if(!r)return[];var t=ug(r);return Object.keys(t.reduce(og,{}))}function lg(r){return function(t){return r&&r.indexOf(t)!==-1}}function Ms(r,t){for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])}function He(r,t){var e=r.prototype;if(!(e instanceof t)){let n=function(){};n.prototype=t.prototype,n=new n,Ms(e,n),r.prototype=e=n}e.constructor!=r&&(typeof r!="function"&&console.error("unknown Class:"+r),e.constructor=r)}var qe={},Nr=qe.ELEMENT_NODE=1,qn=qe.ATTRIBUTE_NODE=2,Ma=qe.TEXT_NODE=3,Ah=qe.CDATA_SECTION_NODE=4,bh=qe.ENTITY_REFERENCE_NODE=5,hg=qe.ENTITY_NODE=6,wh=qe.PROCESSING_INSTRUCTION_NODE=7,Th=qe.COMMENT_NODE=8,_h=qe.DOCUMENT_NODE=9,Ch=qe.DOCUMENT_TYPE_NODE=10,ci=qe.DOCUMENT_FRAGMENT_NODE=11,cg=qe.NOTATION_NODE=12,_e={},ge={};_e.INDEX_SIZE_ERR=(ge[1]="Index size error",1),_e.DOMSTRING_SIZE_ERR=(ge[2]="DOMString size error",2);var We=_e.HIERARCHY_REQUEST_ERR=(ge[3]="Hierarchy request error",3);_e.WRONG_DOCUMENT_ERR=(ge[4]="Wrong document",4),_e.INVALID_CHARACTER_ERR=(ge[5]="Invalid character",5),_e.NO_DATA_ALLOWED_ERR=(ge[6]="No data allowed",6),_e.NO_MODIFICATION_ALLOWED_ERR=(ge[7]="No modification allowed",7);var Dh=_e.NOT_FOUND_ERR=(ge[8]="Not found",8);_e.NOT_SUPPORTED_ERR=(ge[9]="Not supported",9);var Sh=_e.INUSE_ATTRIBUTE_ERR=(ge[10]="Attribute in use",10);_e.INVALID_STATE_ERR=(ge[11]="Invalid state",11),_e.SYNTAX_ERR=(ge[12]="Syntax error",12),_e.INVALID_MODIFICATION_ERR=(ge[13]="Invalid modification",13),_e.NAMESPACE_ERR=(ge[14]="Invalid namespace",14),_e.INVALID_ACCESS_ERR=(ge[15]="Invalid access",15);function Kt(r,t){if(t instanceof Error)var e=t;else e=this,Error.call(this,ge[r]),this.message=ge[r],Error.captureStackTrace&&Error.captureStackTrace(this,Kt);return e.code=r,t&&(this.message=this.message+": "+t),e}Kt.prototype=Error.prototype,Ms(_e,Kt);function fi(){}fi.prototype={length:0,item:function(r){return r>=0&&r<this.length?this[r]:null},toString:function(r,t){for(var e=[],n=0;n<this.length;n++)Vn(this[n],e,r,t);return e.join("")},filter:function(r){return Array.prototype.filter.call(this,r)},indexOf:function(r){return Array.prototype.indexOf.call(this,r)}};function Wn(r,t){this._node=r,this._refresh=t,to(this)}function to(r){var t=r._node._inc||r._node.ownerDocument._inc;if(r._inc!==t){var e=r._refresh(r._node);if(zh(r,"length",e.length),!r.$$length||e.length<r.$$length)for(var n=e.length;n in r;n++)Object.prototype.hasOwnProperty.call(r,n)&&delete r[n];Ms(e,r),r._inc=t}}Wn.prototype.item=function(r){return to(this),this[r]||null},He(Wn,fi);function Ba(){}function Oh(r,t){for(var e=r.length;e--;)if(r[e]===t)return e}function Nh(r,t,e,n){if(n?t[Oh(t,n)]=e:t[t.length++]=e,r){e.ownerElement=r;var a=r.ownerDocument;a&&(n&&Rh(a,r,n),fg(a,r,e))}}function Mh(r,t,e){var n=Oh(t,e);if(n>=0){for(var a=t.length-1;n<a;)t[n]=t[++n];if(t.length=a,r){var u=r.ownerDocument;u&&(Rh(u,r,e),e.ownerElement=null)}}else throw new Kt(Dh,new Error(r.tagName+"@"+e))}Ba.prototype={length:0,item:fi.prototype.item,getNamedItem:function(r){for(var t=this.length;t--;){var e=this[t];if(e.nodeName==r)return e}},setNamedItem:function(r){var t=r.ownerElement;if(t&&t!=this._ownerElement)throw new Kt(Sh);var e=this.getNamedItem(r.nodeName);return Nh(this._ownerElement,this,r,e),e},setNamedItemNS:function(r){var t=r.ownerElement,e;if(t&&t!=this._ownerElement)throw new Kt(Sh);return e=this.getNamedItemNS(r.namespaceURI,r.localName),Nh(this._ownerElement,this,r,e),e},removeNamedItem:function(r){var t=this.getNamedItem(r);return Mh(this._ownerElement,this,t),t},removeNamedItemNS:function(r,t){var e=this.getNamedItemNS(r,t);return Mh(this._ownerElement,this,e),e},getNamedItemNS:function(r,t){for(var e=this.length;e--;){var n=this[e];if(n.localName==t&&n.namespaceURI==r)return n}return null}};function Bh(){}Bh.prototype={hasFeature:function(r,t){return!0},createDocument:function(r,t,e){var n=new Is;if(n.implementation=this,n.childNodes=new fi,n.doctype=e||null,e&&n.appendChild(e),t){var a=n.createElementNS(r,t);n.appendChild(a)}return n},createDocumentType:function(r,t,e){var n=new La;return n.name=r,n.nodeName=r,n.publicId=t||"",n.systemId=e||"",n}};function Rt(){}Rt.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(r,t){return Ia(this,r,t)},replaceChild:function(r,t){Ia(this,r,t,Uh),t&&this.removeChild(t)},removeChild:function(r){return Lh(this,r)},appendChild:function(r){return this.insertBefore(r,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(r){return lo(this.ownerDocument||this,this,r)},normalize:function(){for(var r=this.firstChild;r;){var t=r.nextSibling;t&&t.nodeType==Ma&&r.nodeType==Ma?(this.removeChild(t),r.appendData(t.data)):(r.normalize(),r=t)}},isSupported:function(r,t){return this.ownerDocument.implementation.hasFeature(r,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(r){for(var t=this;t;){var e=t._nsMap;if(e){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&e[n]===r)return n}t=t.nodeType==qn?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(r){for(var t=this;t;){var e=t._nsMap;if(e&&Object.prototype.hasOwnProperty.call(e,r))return e[r];t=t.nodeType==qn?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(r){var t=this.lookupPrefix(r);return t==null}};function Ih(r){return r=="<"&&"<"||r==">"&&">"||r=="&"&&"&"||r=='"'&&"""||"&#"+r.charCodeAt()+";"}Ms(qe,Rt),Ms(qe,Rt.prototype);function Bs(r,t){if(t(r))return!0;if(r=r.firstChild)do if(Bs(r,t))return!0;while(r=r.nextSibling)}function Is(){this.ownerDocument=this}function fg(r,t,e){r&&r._inc++;var n=e.namespaceURI;n===Ns.XMLNS&&(t._nsMap[e.prefix?e.localName:""]=e.value)}function Rh(r,t,e,n){r&&r._inc++;var a=e.namespaceURI;a===Ns.XMLNS&&delete t._nsMap[e.prefix?e.localName:""]}function eo(r,t,e){if(r&&r._inc){r._inc++;var n=t.childNodes;if(e)n[n.length++]=e;else{for(var a=t.firstChild,u=0;a;)n[u++]=a,a=a.nextSibling;n.length=u,delete n[n.length]}}}function Lh(r,t){var e=t.previousSibling,n=t.nextSibling;return e?e.nextSibling=n:r.firstChild=n,n?n.previousSibling=e:r.lastChild=e,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,eo(r.ownerDocument,r),t}function pg(r){return r&&(r.nodeType===Rt.DOCUMENT_NODE||r.nodeType===Rt.DOCUMENT_FRAGMENT_NODE||r.nodeType===Rt.ELEMENT_NODE)}function dg(r){return r&&(Zr(r)||ro(r)||pi(r)||r.nodeType===Rt.DOCUMENT_FRAGMENT_NODE||r.nodeType===Rt.COMMENT_NODE||r.nodeType===Rt.PROCESSING_INSTRUCTION_NODE)}function pi(r){return r&&r.nodeType===Rt.DOCUMENT_TYPE_NODE}function Zr(r){return r&&r.nodeType===Rt.ELEMENT_NODE}function ro(r){return r&&r.nodeType===Rt.TEXT_NODE}function Ph(r,t){var e=r.childNodes||[];if(Xr(e,Zr)||pi(t))return!1;var n=Xr(e,pi);return!(t&&n&&e.indexOf(n)>e.indexOf(t))}function Fh(r,t){var e=r.childNodes||[];function n(u){return Zr(u)&&u!==t}if(Xr(e,n))return!1;var a=Xr(e,pi);return!(t&&a&&e.indexOf(a)>e.indexOf(t))}function gg(r,t,e){if(!pg(r))throw new Kt(We,"Unexpected parent node type "+r.nodeType);if(e&&e.parentNode!==r)throw new Kt(Dh,"child not in parent");if(!dg(t)||pi(t)&&r.nodeType!==Rt.DOCUMENT_NODE)throw new Kt(We,"Unexpected node type "+t.nodeType+" for parent node type "+r.nodeType)}function yg(r,t,e){var n=r.childNodes||[],a=t.childNodes||[];if(t.nodeType===Rt.DOCUMENT_FRAGMENT_NODE){var u=a.filter(Zr);if(u.length>1||Xr(a,ro))throw new Kt(We,"More than one element or text in fragment");if(u.length===1&&!Ph(r,e))throw new Kt(We,"Element in fragment can not be inserted before doctype")}if(Zr(t)&&!Ph(r,e))throw new Kt(We,"Only one element can be added and only after doctype");if(pi(t)){if(Xr(n,pi))throw new Kt(We,"Only one doctype is allowed");var l=Xr(n,Zr);if(e&&n.indexOf(l)<n.indexOf(e))throw new Kt(We,"Doctype can only be inserted before an element");if(!e&&l)throw new Kt(We,"Doctype can not be appended since element is present")}}function Uh(r,t,e){var n=r.childNodes||[],a=t.childNodes||[];if(t.nodeType===Rt.DOCUMENT_FRAGMENT_NODE){var u=a.filter(Zr);if(u.length>1||Xr(a,ro))throw new Kt(We,"More than one element or text in fragment");if(u.length===1&&!Fh(r,e))throw new Kt(We,"Element in fragment can not be inserted before doctype")}if(Zr(t)&&!Fh(r,e))throw new Kt(We,"Only one element can be added and only after doctype");if(pi(t)){if(Xr(n,function(f){return pi(f)&&f!==e}))throw new Kt(We,"Only one doctype is allowed");var l=Xr(n,Zr);if(e&&n.indexOf(l)<n.indexOf(e))throw new Kt(We,"Doctype can only be inserted before an element")}}function Ia(r,t,e,n){gg(r,t,e),r.nodeType===Rt.DOCUMENT_NODE&&(n||yg)(r,t,e);var a=t.parentNode;if(a&&a.removeChild(t),t.nodeType===ci){var u=t.firstChild;if(u==null)return t;var l=t.lastChild}else u=l=t;var c=e?e.previousSibling:r.lastChild;u.previousSibling=c,l.nextSibling=e,c?c.nextSibling=u:r.firstChild=u,e==null?r.lastChild=l:e.previousSibling=l;do u.parentNode=r;while(u!==l&&(u=u.nextSibling));return eo(r.ownerDocument||r,r),t.nodeType==ci&&(t.firstChild=t.lastChild=null),t}function vg(r,t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=r,t.previousSibling=r.lastChild,t.nextSibling=null,t.previousSibling?t.previousSibling.nextSibling=t:r.firstChild=t,r.lastChild=t,eo(r.ownerDocument,r,t),t}Is.prototype={nodeName:"#document",nodeType:_h,doctype:null,documentElement:null,_inc:1,insertBefore:function(r,t){if(r.nodeType==ci){for(var e=r.firstChild;e;){var n=e.nextSibling;this.insertBefore(e,t),e=n}return r}return Ia(this,r,t),r.ownerDocument=this,this.documentElement===null&&r.nodeType===Nr&&(this.documentElement=r),r},removeChild:function(r){return this.documentElement==r&&(this.documentElement=null),Lh(this,r)},replaceChild:function(r,t){Ia(this,r,t,Uh),r.ownerDocument=this,t&&this.removeChild(t),Zr(r)&&(this.documentElement=r)},importNode:function(r,t){return $h(this,r,t)},getElementById:function(r){var t=null;return Bs(this.documentElement,function(e){if(e.nodeType==Nr&&e.getAttribute("id")==r)return t=e,!0}),t},getElementsByClassName:function(r){var t=Eh(r);return new Wn(this,function(e){var n=[];return t.length>0&&Bs(e.documentElement,function(a){if(a!==e&&a.nodeType===Nr){var u=a.getAttribute("class");if(u){var l=r===u;if(!l){var c=Eh(u);l=t.every(lg(c))}l&&n.push(a)}}}),n})},createElement:function(r){var t=new cn;t.ownerDocument=this,t.nodeName=r,t.tagName=r,t.localName=r,t.childNodes=new fi;var e=t.attributes=new Ba;return e._ownerElement=t,t},createDocumentFragment:function(){var r=new Pa;return r.ownerDocument=this,r.childNodes=new fi,r},createTextNode:function(r){var t=new io;return t.ownerDocument=this,t.appendData(r),t},createComment:function(r){var t=new no;return t.ownerDocument=this,t.appendData(r),t},createCDATASection:function(r){var t=new so;return t.ownerDocument=this,t.appendData(r),t},createProcessingInstruction:function(r,t){var e=new uo;return e.ownerDocument=this,e.tagName=e.nodeName=e.target=r,e.nodeValue=e.data=t,e},createAttribute:function(r){var t=new Ra;return t.ownerDocument=this,t.name=r,t.nodeName=r,t.localName=r,t.specified=!0,t},createEntityReference:function(r){var t=new ao;return t.ownerDocument=this,t.nodeName=r,t},createElementNS:function(r,t){var e=new cn,n=t.split(":"),a=e.attributes=new Ba;return e.childNodes=new fi,e.ownerDocument=this,e.nodeName=t,e.tagName=t,e.namespaceURI=r,n.length==2?(e.prefix=n[0],e.localName=n[1]):e.localName=t,a._ownerElement=e,e},createAttributeNS:function(r,t){var e=new Ra,n=t.split(":");return e.ownerDocument=this,e.nodeName=t,e.name=t,e.namespaceURI=r,e.specified=!0,n.length==2?(e.prefix=n[0],e.localName=n[1]):e.localName=t,e}},He(Is,Rt);function cn(){this._nsMap={}}cn.prototype={nodeType:Nr,hasAttribute:function(r){return this.getAttributeNode(r)!=null},getAttribute:function(r){var t=this.getAttributeNode(r);return t&&t.value||""},getAttributeNode:function(r){return this.attributes.getNamedItem(r)},setAttribute:function(r,t){var e=this.ownerDocument.createAttribute(r);e.value=e.nodeValue=""+t,this.setAttributeNode(e)},removeAttribute:function(r){var t=this.getAttributeNode(r);t&&this.removeAttributeNode(t)},appendChild:function(r){return r.nodeType===ci?this.insertBefore(r,null):vg(this,r)},setAttributeNode:function(r){return this.attributes.setNamedItem(r)},setAttributeNodeNS:function(r){return this.attributes.setNamedItemNS(r)},removeAttributeNode:function(r){return this.attributes.removeNamedItem(r.nodeName)},removeAttributeNS:function(r,t){var e=this.getAttributeNodeNS(r,t);e&&this.removeAttributeNode(e)},hasAttributeNS:function(r,t){return this.getAttributeNodeNS(r,t)!=null},getAttributeNS:function(r,t){var e=this.getAttributeNodeNS(r,t);return e&&e.value||""},setAttributeNS:function(r,t,e){var n=this.ownerDocument.createAttributeNS(r,t);n.value=n.nodeValue=""+e,this.setAttributeNode(n)},getAttributeNodeNS:function(r,t){return this.attributes.getNamedItemNS(r,t)},getElementsByTagName:function(r){return new Wn(this,function(t){var e=[];return Bs(t,function(n){n!==t&&n.nodeType==Nr&&(r==="*"||n.tagName==r)&&e.push(n)}),e})},getElementsByTagNameNS:function(r,t){return new Wn(this,function(e){var n=[];return Bs(e,function(a){a!==e&&a.nodeType===Nr&&(r==="*"||a.namespaceURI===r)&&(t==="*"||a.localName==t)&&n.push(a)}),n})}},Is.prototype.getElementsByTagName=cn.prototype.getElementsByTagName,Is.prototype.getElementsByTagNameNS=cn.prototype.getElementsByTagNameNS,He(cn,Rt);function Ra(){}Ra.prototype.nodeType=qn,He(Ra,Rt);function Rs(){}Rs.prototype={data:"",substringData:function(r,t){return this.data.substring(r,r+t)},appendData:function(r){r=this.data+r,this.nodeValue=this.data=r,this.length=r.length},insertData:function(r,t){this.replaceData(r,0,t)},appendChild:function(r){throw new Error(ge[We])},deleteData:function(r,t){this.replaceData(r,t,"")},replaceData:function(r,t,e){var n=this.data.substring(0,r),a=this.data.substring(r+t);e=n+e+a,this.nodeValue=this.data=e,this.length=e.length}},He(Rs,Rt);function io(){}io.prototype={nodeName:"#text",nodeType:Ma,splitText:function(r){var t=this.data,e=t.substring(r);t=t.substring(0,r),this.data=this.nodeValue=t,this.length=t.length;var n=this.ownerDocument.createTextNode(e);return this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling),n}},He(io,Rs);function no(){}no.prototype={nodeName:"#comment",nodeType:Th},He(no,Rs);function so(){}so.prototype={nodeName:"#cdata-section",nodeType:Ah},He(so,Rs);function La(){}La.prototype.nodeType=Ch,He(La,Rt);function kh(){}kh.prototype.nodeType=cg,He(kh,Rt);function Hh(){}Hh.prototype.nodeType=hg,He(Hh,Rt);function ao(){}ao.prototype.nodeType=bh,He(ao,Rt);function Pa(){}Pa.prototype.nodeName="#document-fragment",Pa.prototype.nodeType=ci,He(Pa,Rt);function uo(){}uo.prototype.nodeType=wh,He(uo,Rt);function qh(){}qh.prototype.serializeToString=function(r,t,e){return Wh.call(r,t,e)},Rt.prototype.toString=Wh;function Wh(r,t){var e=[],n=this.nodeType==9&&this.documentElement||this,a=n.prefix,u=n.namespaceURI;if(u&&a==null){var a=n.lookupPrefix(u);if(a==null)var l=[{namespace:u,prefix:null}]}return Vn(this,e,r,t,l),e.join("")}function Vh(r,t,e){var n=r.prefix||"",a=r.namespaceURI;if(!a||n==="xml"&&a===Ns.XML||a===Ns.XMLNS)return!1;for(var u=e.length;u--;){var l=e[u];if(l.prefix===n)return l.namespace!==a}return!0}function oo(r,t,e){r.push(" ",t,'="',e.replace(/[<>&"\t\n\r]/g,Ih),'"')}function Vn(r,t,e,n,a){if(a||(a=[]),n)if(r=n(r),r){if(typeof r=="string"){t.push(r);return}}else return;switch(r.nodeType){case Nr:var u=r.attributes,l=u.length,R=r.firstChild,c=r.tagName;e=Ns.isHTML(r.namespaceURI)||e;var f=c;if(!e&&!r.prefix&&r.namespaceURI){for(var d,y=0;y<u.length;y++)if(u.item(y).name==="xmlns"){d=u.item(y).value;break}if(!d)for(var A=a.length-1;A>=0;A--){var _=a[A];if(_.prefix===""&&_.namespace===r.namespaceURI){d=_.namespace;break}}if(d!==r.namespaceURI)for(var A=a.length-1;A>=0;A--){var _=a[A];if(_.namespace===r.namespaceURI){_.prefix&&(f=_.prefix+":"+c);break}}}t.push("<",f);for(var C=0;C<l;C++){var F=u.item(C);F.prefix=="xmlns"?a.push({prefix:F.localName,namespace:F.value}):F.nodeName=="xmlns"&&a.push({prefix:"",namespace:F.value})}for(var C=0;C<l;C++){var F=u.item(C);if(Vh(F,e,a)){var N=F.prefix||"",M=F.namespaceURI;oo(t,N?"xmlns:"+N:"xmlns",M),a.push({prefix:N,namespace:M})}Vn(F,t,e,n,a)}if(c===f&&Vh(r,e,a)){var N=r.prefix||"",M=r.namespaceURI;oo(t,N?"xmlns:"+N:"xmlns",M),a.push({prefix:N,namespace:M})}if(R||e&&!/^(?:meta|link|img|br|hr|input)$/i.test(c)){if(t.push(">"),e&&/^script$/i.test(c))for(;R;)R.data?t.push(R.data):Vn(R,t,e,n,a.slice()),R=R.nextSibling;else for(;R;)Vn(R,t,e,n,a.slice()),R=R.nextSibling;t.push("</",f,">")}else t.push("/>");return;case _h:case ci:for(var R=r.firstChild;R;)Vn(R,t,e,n,a.slice()),R=R.nextSibling;return;case qn:return oo(t,r.name,r.value);case Ma:return t.push(r.data.replace(/[<&>]/g,Ih));case Ah:return t.push("<![CDATA[",r.data,"]]>");case Th:return t.push("<!--",r.data,"-->");case Ch:var q=r.publicId,z=r.systemId;if(t.push("<!DOCTYPE ",r.name),q)t.push(" PUBLIC ",q),z&&z!="."&&t.push(" ",z),t.push(">");else if(z&&z!=".")t.push(" SYSTEM ",z,">");else{var w=r.internalSubset;w&&t.push(" [",w,"]"),t.push(">")}return;case wh:return t.push("<?",r.target," ",r.data,"?>");case bh:return t.push("&",r.nodeName,";");default:t.push("??",r.nodeName)}}function $h(r,t,e){var n;switch(t.nodeType){case Nr:n=t.cloneNode(!1),n.ownerDocument=r;case ci:break;case qn:e=!0;break}if(n||(n=t.cloneNode(!1)),n.ownerDocument=r,n.parentNode=null,e)for(var a=t.firstChild;a;)n.appendChild($h(r,a,e)),a=a.nextSibling;return n}function lo(r,t,e){var n=new t.constructor;for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a)){var u=t[a];typeof u!="object"&&u!=n[a]&&(n[a]=u)}switch(t.childNodes&&(n.childNodes=new fi),n.ownerDocument=r,n.nodeType){case Nr:var l=t.attributes,c=n.attributes=new Ba,f=l.length;c._ownerElement=n;for(var d=0;d<f;d++)n.setAttributeNode(lo(r,l.item(d),!0));break;case qn:e=!0}if(e)for(var y=t.firstChild;y;)n.appendChild(lo(r,y,e)),y=y.nextSibling;return n}function zh(r,t,e){r[t]=e}try{if(Object.defineProperty){let r=function(t){switch(t.nodeType){case Nr:case ci:var e=[];for(t=t.firstChild;t;)t.nodeType!==7&&t.nodeType!==8&&e.push(r(t)),t=t.nextSibling;return e.join("");default:return t.nodeValue}};Object.defineProperty(Wn.prototype,"length",{get:function(){return to(this),this.$$length}}),Object.defineProperty(Rt.prototype,"textContent",{get:function(){return r(this)},set:function(t){switch(this.nodeType){case Nr:case ci:for(;this.firstChild;)this.removeChild(this.firstChild);(t||String(t))&&this.appendChild(this.ownerDocument.createTextNode(t));break;default:this.data=t,this.value=t,this.nodeValue=t}}}),zh=function(t,e,n){t["$$"+e]=n}}}catch{}Pi.DocumentType=La,Pi.DOMException=Kt,Pi.DOMImplementation=Bh,Pi.Element=cn,Pi.Node=Rt,Pi.NodeList=fi,Pi.XMLSerializer=qh;var Fa={},Gh={};(function(r){var t=hi.freeze;r.XML_ENTITIES=t({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),r.HTML_ENTITIES=t({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
|
|
2
|
-
`,nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:" ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"",zwnj:""}),r.entityMap=r.HTML_ENTITIES})(Gh);var ho={},Ls=hi.NAMESPACE,co=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,Yh=new RegExp("[\\-\\.0-9"+co.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),Xh=new RegExp("^"+co.source+Yh.source+"*(?::"+co.source+Yh.source+"*)?$"),Ps=0,Fi=1,$n=2,Fs=3,zn=4,Gn=5,Us=6,Ua=7;function Yn(r,t){this.message=r,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,Yn)}Yn.prototype=new Error,Yn.prototype.name=Yn.name;function Zh(){}Zh.prototype={parse:function(r,t,e){var n=this.domBuilder;n.startDocument(),Kh(t,t={}),mg(r,t,e,n,this.errorHandler),n.endDocument()}};function mg(r,t,e,n,a){function u(O){if(O>65535){O-=65536;var yt=55296+(O>>10),Bt=56320+(O&1023);return String.fromCharCode(yt,Bt)}else return String.fromCharCode(O)}function l(O){var yt=O.slice(1,-1);return Object.hasOwnProperty.call(e,yt)?e[yt]:yt.charAt(0)==="#"?u(parseInt(yt.substr(1).replace("x","0x"))):(a.error("entity not found:"+O),O)}function c(O){if(O>N){var yt=r.substring(N,O).replace(/&#?\w+;/g,l);_&&f(N),n.characters(yt,0,O-N),N=O}}function f(O,yt){for(;O>=y&&(yt=A.exec(r));)d=yt.index,y=d+yt[0].length,_.lineNumber++;_.columnNumber=O-d+1}for(var d=0,y=0,A=/.*(?:\r\n?|\n)|.*$/g,_=n.locator,C=[{currentNSMap:t}],F={},N=0;;){try{var M=r.indexOf("<",N);if(M<0){if(!r.substr(N).match(/^\s*$/)){var R=n.doc,q=R.createTextNode(r.substr(N));R.appendChild(q),n.currentElement=q}return}switch(M>N&&c(M),r.charAt(M+1)){case"/":var J=r.indexOf(">",M+3),z=r.substring(M+2,J).replace(/[ \t\n\r]+$/g,""),w=C.pop();J<0?(z=r.substring(M+2).replace(/[\s<].*/,""),a.error("end tag name: "+z+" is not complete:"+w.tagName),J=M+1+z.length):z.match(/\s</)&&(z=z.replace(/[\s<].*/,""),a.error("end tag name: "+z+" maybe not complete"),J=M+1+z.length);var L=w.localNSMap,k=w.tagName==z,j=k||w.tagName&&w.tagName.toLowerCase()==z.toLowerCase();if(j){if(n.endElement(w.uri,w.localName,z),L)for(var tt in L)Object.prototype.hasOwnProperty.call(L,tt)&&n.endPrefixMapping(tt);k||a.fatalError("end tag name: "+z+" is not match the current start tagName:"+w.tagName)}else C.push(w);J++;break;case"?":_&&f(M),J=wg(r,M,n);break;case"!":_&&f(M),J=bg(r,M,n,a);break;default:_&&f(M);var Z=new Jh,rt=C[C.length-1].currentNSMap,J=xg(r,M,Z,rt,l,a),st=Z.length;if(!Z.closed&&Ag(r,J,Z.tagName,F)&&(Z.closed=!0,e.nbsp||a.warning("unclosed xml attribute")),_&&st){for(var ht=Qh(_,{}),ct=0;ct<st;ct++){var ft=Z[ct];f(ft.offset),ft.locator=Qh(_,{})}n.locator=ht,jh(Z,n,rt)&&C.push(Z),n.locator=_}else jh(Z,n,rt)&&C.push(Z);Ls.isHTML(Z.uri)&&!Z.closed?J=Eg(r,J,Z.tagName,l,n):J++}}catch(O){if(O instanceof Yn)throw O;a.error("element parse error: "+O),J=-1}J>N?N=J:c(Math.max(M,N)+1)}}function Qh(r,t){return t.lineNumber=r.lineNumber,t.columnNumber=r.columnNumber,t}function xg(r,t,e,n,a,u){function l(_,C,F){e.attributeNames.hasOwnProperty(_)&&u.fatalError("Attribute "+_+" redefined"),e.addValue(_,C.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,a),F)}for(var c,f,d=++t,y=Ps;;){var A=r.charAt(d);switch(A){case"=":if(y===Fi)c=r.slice(t,d),y=Fs;else if(y===$n)y=Fs;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(y===Fs||y===Fi)if(y===Fi&&(u.warning('attribute value must after "="'),c=r.slice(t,d)),t=d+1,d=r.indexOf(A,t),d>0)f=r.slice(t,d),l(c,f,t-1),y=Gn;else throw new Error("attribute value no end '"+A+"' match");else if(y==zn)f=r.slice(t,d),l(c,f,t),u.warning('attribute "'+c+'" missed start quot('+A+")!!"),t=d+1,y=Gn;else throw new Error('attribute value must after "="');break;case"/":switch(y){case Ps:e.setTagName(r.slice(t,d));case Gn:case Us:case Ua:y=Ua,e.closed=!0;case zn:case Fi:break;case $n:e.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return u.error("unexpected end of input"),y==Ps&&e.setTagName(r.slice(t,d)),d;case">":switch(y){case Ps:e.setTagName(r.slice(t,d));case Gn:case Us:case Ua:break;case zn:case Fi:f=r.slice(t,d),f.slice(-1)==="/"&&(e.closed=!0,f=f.slice(0,-1));case $n:y===$n&&(f=c),y==zn?(u.warning('attribute "'+f+'" missed quot(")!'),l(c,f,t)):((!Ls.isHTML(n[""])||!f.match(/^(?:disabled|checked|selected)$/i))&&u.warning('attribute "'+f+'" missed value!! "'+f+'" instead!!'),l(f,f,t));break;case Fs:throw new Error("attribute value missed!!")}return d;case"":A=" ";default:if(A<=" ")switch(y){case Ps:e.setTagName(r.slice(t,d)),y=Us;break;case Fi:c=r.slice(t,d),y=$n;break;case zn:var f=r.slice(t,d);u.warning('attribute "'+f+'" missed quot(")!!'),l(c,f,t);case Gn:y=Us;break}else switch(y){case $n:e.tagName,(!Ls.isHTML(n[""])||!c.match(/^(?:disabled|checked|selected)$/i))&&u.warning('attribute "'+c+'" missed value!! "'+c+'" instead2!!'),l(c,c,t),t=d,y=Fi;break;case Gn:u.warning('attribute space is required"'+c+'"!!');case Us:y=Fi,t=d;break;case Fs:y=zn,t=d;break;case Ua:throw new Error("elements closed character '/' and '>' must be connected to")}}d++}}function jh(r,t,e){for(var n=r.tagName,a=null,A=r.length;A--;){var u=r[A],l=u.qName,c=u.value,_=l.indexOf(":");if(_>0)var f=u.prefix=l.slice(0,_),d=l.slice(_+1),y=f==="xmlns"&&d;else d=l,f=null,y=l==="xmlns"&&"";u.localName=d,y!==!1&&(a==null&&(a={},Kh(e,e={})),e[y]=a[y]=c,u.uri=Ls.XMLNS,t.startPrefixMapping(y,c))}for(var A=r.length;A--;){u=r[A];var f=u.prefix;f&&(f==="xml"&&(u.uri=Ls.XML),f!=="xmlns"&&(u.uri=e[f||""]))}var _=n.indexOf(":");_>0?(f=r.prefix=n.slice(0,_),d=r.localName=n.slice(_+1)):(f=null,d=r.localName=n);var C=r.uri=e[f||""];if(t.startElement(C,d,n,r),r.closed){if(t.endElement(C,d,n),a)for(f in a)Object.prototype.hasOwnProperty.call(a,f)&&t.endPrefixMapping(f)}else return r.currentNSMap=e,r.localNSMap=a,!0}function Eg(r,t,e,n,a){if(/^(?:script|textarea)$/i.test(e)){var u=r.indexOf("</"+e+">",t),l=r.substring(t+1,u);if(/[&<]/.test(l))return/^script$/i.test(e)?(a.characters(l,0,l.length),u):(l=l.replace(/&#?\w+;/g,n),a.characters(l,0,l.length),u)}return t+1}function Ag(r,t,e,n){var a=n[e];return a==null&&(a=r.lastIndexOf("</"+e+">"),a<t&&(a=r.lastIndexOf("</"+e)),n[e]=a),a<t}function Kh(r,t){for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])}function bg(r,t,e,n){var a=r.charAt(t+2);switch(a){case"-":if(r.charAt(t+3)==="-"){var u=r.indexOf("-->",t+4);return u>t?(e.comment(r,t+4,u-t-4),u+3):(n.error("Unclosed comment"),-1)}else return-1;default:if(r.substr(t+3,6)=="CDATA["){var u=r.indexOf("]]>",t+9);return e.startCDATA(),e.characters(r,t+9,u-t-9),e.endCDATA(),u+3}var l=Tg(r,t),c=l.length;if(c>1&&/!doctype/i.test(l[0][0])){var f=l[1][0],d=!1,y=!1;c>3&&(/^public$/i.test(l[2][0])?(d=l[3][0],y=c>4&&l[4][0]):/^system$/i.test(l[2][0])&&(y=l[3][0]));var A=l[c-1];return e.startDTD(f,d,y),e.endDTD(),A.index+A[0].length}}return-1}function wg(r,t,e){var n=r.indexOf("?>",t);if(n){var a=r.substring(t,n).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return a?(a[0].length,e.processingInstruction(a[1],a[2]),n+2):-1}return-1}function Jh(){this.attributeNames={}}Jh.prototype={setTagName:function(r){if(!Xh.test(r))throw new Error("invalid tagName:"+r);this.tagName=r},addValue:function(r,t,e){if(!Xh.test(r))throw new Error("invalid attribute:"+r);this.attributeNames[r]=this.length,this[this.length++]={qName:r,value:t,offset:e}},length:0,getLocalName:function(r){return this[r].localName},getLocator:function(r){return this[r].locator},getQName:function(r){return this[r].qName},getURI:function(r){return this[r].uri},getValue:function(r){return this[r].value}};function Tg(r,t){var e,n=[],a=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(a.lastIndex=t,a.exec(r);e=a.exec(r);)if(n.push(e),e[1])return n}ho.XMLReader=Zh,ho.ParseError=Yn;var _g=hi,Cg=Pi,tc=Gh,ec=ho,Dg=Cg.DOMImplementation,rc=_g.NAMESPACE,Sg=ec.ParseError,Og=ec.XMLReader;function ic(r){return r.replace(/\r[\n\u0085]/g,`
|
|
1
|
+
(function(le,kn){typeof exports=="object"&&typeof module<"u"?kn(exports):typeof define=="function"&&define.amd?define(["exports"],kn):(le=typeof globalThis<"u"?globalThis:le||self,kn(le.archgine={}))})(this,function(le){"use strict";const kn={name:"TinyEngine",containerId:"tinyEngine",canvas:"tinyEngine",width:0,height:0,aspect:1,dpr:1,alpha:!1,color:"#232323",fps:60,syncDelay:800,animateDuration:600,mergeRendering:!1,usedCache:!1,showPoints:!1,wireframe:!1,castShadow:!1,workerRender:!1,monitorDuration:1e4,light:{color:"#f2f2f2",position:[-6,6,0],castShadow:!0,shadowBlur:16},camera:{left:-1,right:1,top:1,bottom:-1,aspect:1,eye:[0,0,0],up:[0,0,1],helperEnable:!0},controls:{target:[0,0,0],minDistance:.1,maxDistance:1e3,enablePan:!0,enableRotate:!0,enableZoom:!0,focusMode:!0,autoRotate:!1,autoRotateSpeed:.5,enableDamping:!0,dampingFactor:.2},gridHelper:{fill:"#e3e3e3"},axesHelper:{},displayUnits:"",tooltip:!0,assetType:"rm",zoomToSelectEnable:!1,selectEnable:!1,multiSelectEnable:!1,socialDistanceEnable:!1,socialDistance:{radius:3}};function dh(r,t){const e=r.x*Math.cos(t)-r.y*Math.sin(t),n=r.y*Math.cos(t)+r.x*Math.sin(t);r.x=e,r.y=n}function jd(r,t,e){r.x+=t,r.y+=e}function gh(r,t){r.x*=t,r.y*=t}class Hn{commands;constructor(t){this.commands=[],t&&t instanceof Hn?this.commands.push(...t.commands):t&&(this.commands=rg(t))}addPath(t){t&&t instanceof Hn&&this.commands.push(...t.commands)}moveTo(t,e){this.commands.push(["M",t,e])}lineTo(t,e){this.commands.push(["L",t,e])}arc(t,e,n,a,u,l){this.commands.push(["AC",t,e,n,a,u,!!l])}arcTo(t,e,n,a,u){this.commands.push(["AT",t,e,n,a,u])}ellipse(t,e,n,a,u,l,c,f){this.commands.push(["E",t,e,n,a,u,l,c,!!f])}closePath(){this.commands.push(["Z"])}bezierCurveTo(t,e,n,a,u,l){this.commands.push(["C",t,e,n,a,u,l])}quadraticCurveTo(t,e,n,a){this.commands.push(["Q",t,e,n,a])}rect(t,e,n,a){this.commands.push(["R",t,e,n,a])}roundRect(t,e,n,a,u){typeof u>"u"?this.commands.push(["RR",t,e,n,a,0]):this.commands.push(["RR",t,e,n,a,u])}}function Ku(r,t){let e=0,n=0,a,u,l,c,f,d,y,A,_,C,F,N,M,R,q,z,w,L,k,j,tt,Z=null,rt=null,J=null,st=null,ht=null,ct=null;r.beginPath();for(let ft=0;ft<t.length;++ft){L=t[ft][0],L!=="S"&&L!=="s"&&L!=="C"&&L!=="c"&&(Z=null,rt=null),L!=="T"&&L!=="t"&&L!=="Q"&&L!=="q"&&(J=null,st=null);let O;switch(L){case"m":case"M":O=t[ft],L==="m"?(e+=O[1],n+=O[2]):(e=O[1],n=O[2]),(L==="M"||!ht)&&(ht={x:e,y:n}),r.moveTo(e,n);break;case"l":O=t[ft],e+=O[1],n+=O[2],r.lineTo(e,n);break;case"L":O=t[ft],e=O[1],n=O[2],r.lineTo(e,n);break;case"H":O=t[ft],e=O[1],r.lineTo(e,n);break;case"h":O=t[ft],e+=O[1],r.lineTo(e,n);break;case"V":O=t[ft],n=O[1],r.lineTo(e,n);break;case"v":O=t[ft],n+=O[1],r.lineTo(e,n);break;case"a":case"A":if(O=t[ft],ct===null)throw new Error("This should never happen");L==="a"?(e+=O[6],n+=O[7]):(e=O[6],n=O[7]),R=O[1],q=O[2],y=O[3]*Math.PI/180,l=!!O[4],c=!!O[5],f={x:e,y:n},d={x:(ct.x-f.x)/2,y:(ct.y-f.y)/2},dh(d,-y),A=d.x*d.x/(R*R)+d.y*d.y/(q*q),A>1&&(A=Math.sqrt(A),R*=A,q*=A),k={x:R*d.y/q,y:-(q*d.x)/R},_=R*R*q*q,C=R*R*d.y*d.y+q*q*d.x*d.x,c!==l?gh(k,Math.sqrt((_-C)/C)||0):gh(k,-Math.sqrt((_-C)/C)||0),u=Math.atan2((d.y-k.y)/q,(d.x-k.x)/R),a=Math.atan2(-(d.y+k.y)/q,-(d.x+k.x)/R),dh(k,y),jd(k,(f.x+ct.x)/2,(f.y+ct.y)/2),r.save(),r.translate(k.x,k.y),r.rotate(y),r.scale(R,q),r.arc(0,0,1,u,a,!c),r.restore();break;case"C":O=t[ft],Z=O[3],rt=O[4],e=O[5],n=O[6],r.bezierCurveTo(O[1],O[2],Z,rt,e,n);break;case"c":O=t[ft],r.bezierCurveTo(O[1]+e,O[2]+n,O[3]+e,O[4]+n,O[5]+e,O[6]+n),Z=O[3]+e,rt=O[4]+n,e+=O[5],n+=O[6];break;case"S":O=t[ft],(Z===null||rt===null)&&(Z=e,rt=n),r.bezierCurveTo(2*e-Z,2*n-rt,O[1],O[2],O[3],O[4]),Z=O[1],rt=O[2],e=O[3],n=O[4];break;case"s":O=t[ft],(Z===null||rt===null)&&(Z=e,rt=n),r.bezierCurveTo(2*e-Z,2*n-rt,O[1]+e,O[2]+n,O[3]+e,O[4]+n),Z=O[1]+e,rt=O[2]+n,e+=O[3],n+=O[4];break;case"Q":O=t[ft],J=O[1],st=O[2],e=O[3],n=O[4],r.quadraticCurveTo(J,st,e,n);break;case"q":O=t[ft],J=O[1]+e,st=O[2]+n,e+=O[3],n+=O[4],r.quadraticCurveTo(J,st,e,n);break;case"T":O=t[ft],(J===null||st===null)&&(J=e,st=n),J=2*e-J,st=2*n-st,e=O[1],n=O[2],r.quadraticCurveTo(J,st,e,n);break;case"t":O=t[ft],(J===null||st===null)&&(J=e,st=n),J=2*e-J,st=2*n-st,e+=O[1],n+=O[2],r.quadraticCurveTo(J,st,e,n);break;case"z":case"Z":ht&&(e=ht.x,n=ht.y),ht=null,r.closePath();break;case"AC":O=t[ft],e=O[1],n=O[2],M=O[3],u=O[4],a=O[5],j=O[6],r.arc(e,n,M,u,a,j);break;case"AT":O=t[ft],F=O[1],N=O[2],e=O[3],n=O[4],M=O[5],r.arcTo(F,N,e,n,M);break;case"E":O=t[ft],e=O[1],n=O[2],R=O[3],q=O[4],y=O[5],u=O[6],a=O[7],j=O[8],r.save(),r.translate(e,n),r.rotate(y),r.scale(R,q),r.arc(0,0,1,u,a,j),r.restore();break;case"R":O=t[ft],e=O[1],n=O[2],z=O[3],w=O[4],ht={x:e,y:n},r.rect(e,n,z,w);break;case"RR":O=t[ft],e=O[1],n=O[2],z=O[3],w=O[4],tt=O[5],ht={x:e,y:n},r.roundRect(e,n,z,w,tt);break}ct?(ct.x=e,ct.y=n):ct={x:e,y:n}}}function Kd(r){if(!r||!r.CanvasRenderingContext2D||r.Path2D)return;const{CanvasRenderingContext2D:t}=r,e=t==null?void 0:t.prototype.fill,n=t==null?void 0:t.prototype.stroke,a=t==null?void 0:t.prototype.isPointInPath;t.prototype.fill=function(...l){if(l[0]instanceof Hn){const c=l[0],f=l[1]||"nonzero";Ku(this,c.commands),e.apply(this,[f])}else{const c=l[0]||"nonzero";return e.apply(this,[c])}},t.prototype.stroke=function(l){l&&Ku(this,l.commands),n.apply(this)},t.prototype.isPointInPath=function(...l){if(l[0]instanceof Hn){const c=l[0],f=l[1],d=l[2],y=l[3]||"nonzero";return Ku(this,c.commands),a.apply(this,[f,d,y])}else return a.apply(this,l)},r.Path2D=Hn}const Ss={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},Jd=/([astvzqmhlc])([^astvzqmhlc]*)/gi,tg=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;function eg(r){const t=r.match(tg);return t?t.map(Number):[]}function rg(r){const t=[],e=String(r).trim();return e[0]!=="M"&&e[0]!=="m"||e.replace(Jd,(n,a,u)=>{const l=eg(u);let c=a.toLowerCase(),f=a;if(c==="m"&&l.length>2&&(t.push([f,...l.splice(0,2)]),c="l",f=f==="m"?"l":"L"),l.length<Ss[c])return"";for(t.push([f,...l.splice(0,Ss[c])]);l.length>=Ss[c]&&l.length&&Ss[c];)t.push([f,...l.splice(0,Ss[c])]);return""}),t}var Os=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function yh(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Pi={},hi={};function ig(r,t,e){if(e===void 0&&(e=Array.prototype),r&&typeof e.find=="function")return e.find.call(r,t);for(var n=0;n<r.length;n++)if(Object.prototype.hasOwnProperty.call(r,n)){var a=r[n];if(t.call(void 0,a,n,r))return a}}function Ju(r,t){return t===void 0&&(t=Object),t&&typeof t.freeze=="function"?t.freeze(r):r}function ng(r,t){if(r===null||typeof r!="object")throw new TypeError("target is not an object");for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=t[e]);return r}var vh=Ju({HTML:"text/html",isHTML:function(r){return r===vh.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),mh=Ju({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(r){return r===mh.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});hi.assign=ng,hi.find=ig,hi.freeze=Ju,hi.MIME_TYPE=vh,hi.NAMESPACE=mh;var xh=hi,Xr=xh.find,Ns=xh.NAMESPACE;function sg(r){return r!==""}function ag(r){return r?r.split(/[\t\n\f\r ]+/).filter(sg):[]}function ug(r,t){return r.hasOwnProperty(t)||(r[t]=!0),r}function Eh(r){if(!r)return[];var t=ag(r);return Object.keys(t.reduce(ug,{}))}function og(r){return function(t){return r&&r.indexOf(t)!==-1}}function Ms(r,t){for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])}function He(r,t){var e=r.prototype;if(!(e instanceof t)){let n=function(){};n.prototype=t.prototype,n=new n,Ms(e,n),r.prototype=e=n}e.constructor!=r&&(typeof r!="function"&&console.error("unknown Class:"+r),e.constructor=r)}var qe={},Nr=qe.ELEMENT_NODE=1,qn=qe.ATTRIBUTE_NODE=2,Ma=qe.TEXT_NODE=3,Ah=qe.CDATA_SECTION_NODE=4,bh=qe.ENTITY_REFERENCE_NODE=5,lg=qe.ENTITY_NODE=6,wh=qe.PROCESSING_INSTRUCTION_NODE=7,Th=qe.COMMENT_NODE=8,_h=qe.DOCUMENT_NODE=9,Ch=qe.DOCUMENT_TYPE_NODE=10,ci=qe.DOCUMENT_FRAGMENT_NODE=11,hg=qe.NOTATION_NODE=12,_e={},ge={};_e.INDEX_SIZE_ERR=(ge[1]="Index size error",1),_e.DOMSTRING_SIZE_ERR=(ge[2]="DOMString size error",2);var We=_e.HIERARCHY_REQUEST_ERR=(ge[3]="Hierarchy request error",3);_e.WRONG_DOCUMENT_ERR=(ge[4]="Wrong document",4),_e.INVALID_CHARACTER_ERR=(ge[5]="Invalid character",5),_e.NO_DATA_ALLOWED_ERR=(ge[6]="No data allowed",6),_e.NO_MODIFICATION_ALLOWED_ERR=(ge[7]="No modification allowed",7);var Dh=_e.NOT_FOUND_ERR=(ge[8]="Not found",8);_e.NOT_SUPPORTED_ERR=(ge[9]="Not supported",9);var Sh=_e.INUSE_ATTRIBUTE_ERR=(ge[10]="Attribute in use",10);_e.INVALID_STATE_ERR=(ge[11]="Invalid state",11),_e.SYNTAX_ERR=(ge[12]="Syntax error",12),_e.INVALID_MODIFICATION_ERR=(ge[13]="Invalid modification",13),_e.NAMESPACE_ERR=(ge[14]="Invalid namespace",14),_e.INVALID_ACCESS_ERR=(ge[15]="Invalid access",15);function Kt(r,t){if(t instanceof Error)var e=t;else e=this,Error.call(this,ge[r]),this.message=ge[r],Error.captureStackTrace&&Error.captureStackTrace(this,Kt);return e.code=r,t&&(this.message=this.message+": "+t),e}Kt.prototype=Error.prototype,Ms(_e,Kt);function fi(){}fi.prototype={length:0,item:function(r){return r>=0&&r<this.length?this[r]:null},toString:function(r,t){for(var e=[],n=0;n<this.length;n++)Vn(this[n],e,r,t);return e.join("")},filter:function(r){return Array.prototype.filter.call(this,r)},indexOf:function(r){return Array.prototype.indexOf.call(this,r)}};function Wn(r,t){this._node=r,this._refresh=t,to(this)}function to(r){var t=r._node._inc||r._node.ownerDocument._inc;if(r._inc!==t){var e=r._refresh(r._node);if(zh(r,"length",e.length),!r.$$length||e.length<r.$$length)for(var n=e.length;n in r;n++)Object.prototype.hasOwnProperty.call(r,n)&&delete r[n];Ms(e,r),r._inc=t}}Wn.prototype.item=function(r){return to(this),this[r]||null},He(Wn,fi);function Ba(){}function Oh(r,t){for(var e=r.length;e--;)if(r[e]===t)return e}function Nh(r,t,e,n){if(n?t[Oh(t,n)]=e:t[t.length++]=e,r){e.ownerElement=r;var a=r.ownerDocument;a&&(n&&Rh(a,r,n),cg(a,r,e))}}function Mh(r,t,e){var n=Oh(t,e);if(n>=0){for(var a=t.length-1;n<a;)t[n]=t[++n];if(t.length=a,r){var u=r.ownerDocument;u&&(Rh(u,r,e),e.ownerElement=null)}}else throw new Kt(Dh,new Error(r.tagName+"@"+e))}Ba.prototype={length:0,item:fi.prototype.item,getNamedItem:function(r){for(var t=this.length;t--;){var e=this[t];if(e.nodeName==r)return e}},setNamedItem:function(r){var t=r.ownerElement;if(t&&t!=this._ownerElement)throw new Kt(Sh);var e=this.getNamedItem(r.nodeName);return Nh(this._ownerElement,this,r,e),e},setNamedItemNS:function(r){var t=r.ownerElement,e;if(t&&t!=this._ownerElement)throw new Kt(Sh);return e=this.getNamedItemNS(r.namespaceURI,r.localName),Nh(this._ownerElement,this,r,e),e},removeNamedItem:function(r){var t=this.getNamedItem(r);return Mh(this._ownerElement,this,t),t},removeNamedItemNS:function(r,t){var e=this.getNamedItemNS(r,t);return Mh(this._ownerElement,this,e),e},getNamedItemNS:function(r,t){for(var e=this.length;e--;){var n=this[e];if(n.localName==t&&n.namespaceURI==r)return n}return null}};function Bh(){}Bh.prototype={hasFeature:function(r,t){return!0},createDocument:function(r,t,e){var n=new Is;if(n.implementation=this,n.childNodes=new fi,n.doctype=e||null,e&&n.appendChild(e),t){var a=n.createElementNS(r,t);n.appendChild(a)}return n},createDocumentType:function(r,t,e){var n=new La;return n.name=r,n.nodeName=r,n.publicId=t||"",n.systemId=e||"",n}};function Rt(){}Rt.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(r,t){return Ia(this,r,t)},replaceChild:function(r,t){Ia(this,r,t,Uh),t&&this.removeChild(t)},removeChild:function(r){return Lh(this,r)},appendChild:function(r){return this.insertBefore(r,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(r){return lo(this.ownerDocument||this,this,r)},normalize:function(){for(var r=this.firstChild;r;){var t=r.nextSibling;t&&t.nodeType==Ma&&r.nodeType==Ma?(this.removeChild(t),r.appendData(t.data)):(r.normalize(),r=t)}},isSupported:function(r,t){return this.ownerDocument.implementation.hasFeature(r,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(r){for(var t=this;t;){var e=t._nsMap;if(e){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&e[n]===r)return n}t=t.nodeType==qn?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(r){for(var t=this;t;){var e=t._nsMap;if(e&&Object.prototype.hasOwnProperty.call(e,r))return e[r];t=t.nodeType==qn?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(r){var t=this.lookupPrefix(r);return t==null}};function Ih(r){return r=="<"&&"<"||r==">"&&">"||r=="&"&&"&"||r=='"'&&"""||"&#"+r.charCodeAt()+";"}Ms(qe,Rt),Ms(qe,Rt.prototype);function Bs(r,t){if(t(r))return!0;if(r=r.firstChild)do if(Bs(r,t))return!0;while(r=r.nextSibling)}function Is(){this.ownerDocument=this}function cg(r,t,e){r&&r._inc++;var n=e.namespaceURI;n===Ns.XMLNS&&(t._nsMap[e.prefix?e.localName:""]=e.value)}function Rh(r,t,e,n){r&&r._inc++;var a=e.namespaceURI;a===Ns.XMLNS&&delete t._nsMap[e.prefix?e.localName:""]}function eo(r,t,e){if(r&&r._inc){r._inc++;var n=t.childNodes;if(e)n[n.length++]=e;else{for(var a=t.firstChild,u=0;a;)n[u++]=a,a=a.nextSibling;n.length=u,delete n[n.length]}}}function Lh(r,t){var e=t.previousSibling,n=t.nextSibling;return e?e.nextSibling=n:r.firstChild=n,n?n.previousSibling=e:r.lastChild=e,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,eo(r.ownerDocument,r),t}function fg(r){return r&&(r.nodeType===Rt.DOCUMENT_NODE||r.nodeType===Rt.DOCUMENT_FRAGMENT_NODE||r.nodeType===Rt.ELEMENT_NODE)}function pg(r){return r&&(Zr(r)||ro(r)||pi(r)||r.nodeType===Rt.DOCUMENT_FRAGMENT_NODE||r.nodeType===Rt.COMMENT_NODE||r.nodeType===Rt.PROCESSING_INSTRUCTION_NODE)}function pi(r){return r&&r.nodeType===Rt.DOCUMENT_TYPE_NODE}function Zr(r){return r&&r.nodeType===Rt.ELEMENT_NODE}function ro(r){return r&&r.nodeType===Rt.TEXT_NODE}function Ph(r,t){var e=r.childNodes||[];if(Xr(e,Zr)||pi(t))return!1;var n=Xr(e,pi);return!(t&&n&&e.indexOf(n)>e.indexOf(t))}function Fh(r,t){var e=r.childNodes||[];function n(u){return Zr(u)&&u!==t}if(Xr(e,n))return!1;var a=Xr(e,pi);return!(t&&a&&e.indexOf(a)>e.indexOf(t))}function dg(r,t,e){if(!fg(r))throw new Kt(We,"Unexpected parent node type "+r.nodeType);if(e&&e.parentNode!==r)throw new Kt(Dh,"child not in parent");if(!pg(t)||pi(t)&&r.nodeType!==Rt.DOCUMENT_NODE)throw new Kt(We,"Unexpected node type "+t.nodeType+" for parent node type "+r.nodeType)}function gg(r,t,e){var n=r.childNodes||[],a=t.childNodes||[];if(t.nodeType===Rt.DOCUMENT_FRAGMENT_NODE){var u=a.filter(Zr);if(u.length>1||Xr(a,ro))throw new Kt(We,"More than one element or text in fragment");if(u.length===1&&!Ph(r,e))throw new Kt(We,"Element in fragment can not be inserted before doctype")}if(Zr(t)&&!Ph(r,e))throw new Kt(We,"Only one element can be added and only after doctype");if(pi(t)){if(Xr(n,pi))throw new Kt(We,"Only one doctype is allowed");var l=Xr(n,Zr);if(e&&n.indexOf(l)<n.indexOf(e))throw new Kt(We,"Doctype can only be inserted before an element");if(!e&&l)throw new Kt(We,"Doctype can not be appended since element is present")}}function Uh(r,t,e){var n=r.childNodes||[],a=t.childNodes||[];if(t.nodeType===Rt.DOCUMENT_FRAGMENT_NODE){var u=a.filter(Zr);if(u.length>1||Xr(a,ro))throw new Kt(We,"More than one element or text in fragment");if(u.length===1&&!Fh(r,e))throw new Kt(We,"Element in fragment can not be inserted before doctype")}if(Zr(t)&&!Fh(r,e))throw new Kt(We,"Only one element can be added and only after doctype");if(pi(t)){if(Xr(n,function(f){return pi(f)&&f!==e}))throw new Kt(We,"Only one doctype is allowed");var l=Xr(n,Zr);if(e&&n.indexOf(l)<n.indexOf(e))throw new Kt(We,"Doctype can only be inserted before an element")}}function Ia(r,t,e,n){dg(r,t,e),r.nodeType===Rt.DOCUMENT_NODE&&(n||gg)(r,t,e);var a=t.parentNode;if(a&&a.removeChild(t),t.nodeType===ci){var u=t.firstChild;if(u==null)return t;var l=t.lastChild}else u=l=t;var c=e?e.previousSibling:r.lastChild;u.previousSibling=c,l.nextSibling=e,c?c.nextSibling=u:r.firstChild=u,e==null?r.lastChild=l:e.previousSibling=l;do u.parentNode=r;while(u!==l&&(u=u.nextSibling));return eo(r.ownerDocument||r,r),t.nodeType==ci&&(t.firstChild=t.lastChild=null),t}function yg(r,t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=r,t.previousSibling=r.lastChild,t.nextSibling=null,t.previousSibling?t.previousSibling.nextSibling=t:r.firstChild=t,r.lastChild=t,eo(r.ownerDocument,r,t),t}Is.prototype={nodeName:"#document",nodeType:_h,doctype:null,documentElement:null,_inc:1,insertBefore:function(r,t){if(r.nodeType==ci){for(var e=r.firstChild;e;){var n=e.nextSibling;this.insertBefore(e,t),e=n}return r}return Ia(this,r,t),r.ownerDocument=this,this.documentElement===null&&r.nodeType===Nr&&(this.documentElement=r),r},removeChild:function(r){return this.documentElement==r&&(this.documentElement=null),Lh(this,r)},replaceChild:function(r,t){Ia(this,r,t,Uh),r.ownerDocument=this,t&&this.removeChild(t),Zr(r)&&(this.documentElement=r)},importNode:function(r,t){return $h(this,r,t)},getElementById:function(r){var t=null;return Bs(this.documentElement,function(e){if(e.nodeType==Nr&&e.getAttribute("id")==r)return t=e,!0}),t},getElementsByClassName:function(r){var t=Eh(r);return new Wn(this,function(e){var n=[];return t.length>0&&Bs(e.documentElement,function(a){if(a!==e&&a.nodeType===Nr){var u=a.getAttribute("class");if(u){var l=r===u;if(!l){var c=Eh(u);l=t.every(og(c))}l&&n.push(a)}}}),n})},createElement:function(r){var t=new cn;t.ownerDocument=this,t.nodeName=r,t.tagName=r,t.localName=r,t.childNodes=new fi;var e=t.attributes=new Ba;return e._ownerElement=t,t},createDocumentFragment:function(){var r=new Pa;return r.ownerDocument=this,r.childNodes=new fi,r},createTextNode:function(r){var t=new io;return t.ownerDocument=this,t.appendData(r),t},createComment:function(r){var t=new no;return t.ownerDocument=this,t.appendData(r),t},createCDATASection:function(r){var t=new so;return t.ownerDocument=this,t.appendData(r),t},createProcessingInstruction:function(r,t){var e=new uo;return e.ownerDocument=this,e.tagName=e.nodeName=e.target=r,e.nodeValue=e.data=t,e},createAttribute:function(r){var t=new Ra;return t.ownerDocument=this,t.name=r,t.nodeName=r,t.localName=r,t.specified=!0,t},createEntityReference:function(r){var t=new ao;return t.ownerDocument=this,t.nodeName=r,t},createElementNS:function(r,t){var e=new cn,n=t.split(":"),a=e.attributes=new Ba;return e.childNodes=new fi,e.ownerDocument=this,e.nodeName=t,e.tagName=t,e.namespaceURI=r,n.length==2?(e.prefix=n[0],e.localName=n[1]):e.localName=t,a._ownerElement=e,e},createAttributeNS:function(r,t){var e=new Ra,n=t.split(":");return e.ownerDocument=this,e.nodeName=t,e.name=t,e.namespaceURI=r,e.specified=!0,n.length==2?(e.prefix=n[0],e.localName=n[1]):e.localName=t,e}},He(Is,Rt);function cn(){this._nsMap={}}cn.prototype={nodeType:Nr,hasAttribute:function(r){return this.getAttributeNode(r)!=null},getAttribute:function(r){var t=this.getAttributeNode(r);return t&&t.value||""},getAttributeNode:function(r){return this.attributes.getNamedItem(r)},setAttribute:function(r,t){var e=this.ownerDocument.createAttribute(r);e.value=e.nodeValue=""+t,this.setAttributeNode(e)},removeAttribute:function(r){var t=this.getAttributeNode(r);t&&this.removeAttributeNode(t)},appendChild:function(r){return r.nodeType===ci?this.insertBefore(r,null):yg(this,r)},setAttributeNode:function(r){return this.attributes.setNamedItem(r)},setAttributeNodeNS:function(r){return this.attributes.setNamedItemNS(r)},removeAttributeNode:function(r){return this.attributes.removeNamedItem(r.nodeName)},removeAttributeNS:function(r,t){var e=this.getAttributeNodeNS(r,t);e&&this.removeAttributeNode(e)},hasAttributeNS:function(r,t){return this.getAttributeNodeNS(r,t)!=null},getAttributeNS:function(r,t){var e=this.getAttributeNodeNS(r,t);return e&&e.value||""},setAttributeNS:function(r,t,e){var n=this.ownerDocument.createAttributeNS(r,t);n.value=n.nodeValue=""+e,this.setAttributeNode(n)},getAttributeNodeNS:function(r,t){return this.attributes.getNamedItemNS(r,t)},getElementsByTagName:function(r){return new Wn(this,function(t){var e=[];return Bs(t,function(n){n!==t&&n.nodeType==Nr&&(r==="*"||n.tagName==r)&&e.push(n)}),e})},getElementsByTagNameNS:function(r,t){return new Wn(this,function(e){var n=[];return Bs(e,function(a){a!==e&&a.nodeType===Nr&&(r==="*"||a.namespaceURI===r)&&(t==="*"||a.localName==t)&&n.push(a)}),n})}},Is.prototype.getElementsByTagName=cn.prototype.getElementsByTagName,Is.prototype.getElementsByTagNameNS=cn.prototype.getElementsByTagNameNS,He(cn,Rt);function Ra(){}Ra.prototype.nodeType=qn,He(Ra,Rt);function Rs(){}Rs.prototype={data:"",substringData:function(r,t){return this.data.substring(r,r+t)},appendData:function(r){r=this.data+r,this.nodeValue=this.data=r,this.length=r.length},insertData:function(r,t){this.replaceData(r,0,t)},appendChild:function(r){throw new Error(ge[We])},deleteData:function(r,t){this.replaceData(r,t,"")},replaceData:function(r,t,e){var n=this.data.substring(0,r),a=this.data.substring(r+t);e=n+e+a,this.nodeValue=this.data=e,this.length=e.length}},He(Rs,Rt);function io(){}io.prototype={nodeName:"#text",nodeType:Ma,splitText:function(r){var t=this.data,e=t.substring(r);t=t.substring(0,r),this.data=this.nodeValue=t,this.length=t.length;var n=this.ownerDocument.createTextNode(e);return this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling),n}},He(io,Rs);function no(){}no.prototype={nodeName:"#comment",nodeType:Th},He(no,Rs);function so(){}so.prototype={nodeName:"#cdata-section",nodeType:Ah},He(so,Rs);function La(){}La.prototype.nodeType=Ch,He(La,Rt);function kh(){}kh.prototype.nodeType=hg,He(kh,Rt);function Hh(){}Hh.prototype.nodeType=lg,He(Hh,Rt);function ao(){}ao.prototype.nodeType=bh,He(ao,Rt);function Pa(){}Pa.prototype.nodeName="#document-fragment",Pa.prototype.nodeType=ci,He(Pa,Rt);function uo(){}uo.prototype.nodeType=wh,He(uo,Rt);function qh(){}qh.prototype.serializeToString=function(r,t,e){return Wh.call(r,t,e)},Rt.prototype.toString=Wh;function Wh(r,t){var e=[],n=this.nodeType==9&&this.documentElement||this,a=n.prefix,u=n.namespaceURI;if(u&&a==null){var a=n.lookupPrefix(u);if(a==null)var l=[{namespace:u,prefix:null}]}return Vn(this,e,r,t,l),e.join("")}function Vh(r,t,e){var n=r.prefix||"",a=r.namespaceURI;if(!a||n==="xml"&&a===Ns.XML||a===Ns.XMLNS)return!1;for(var u=e.length;u--;){var l=e[u];if(l.prefix===n)return l.namespace!==a}return!0}function oo(r,t,e){r.push(" ",t,'="',e.replace(/[<>&"\t\n\r]/g,Ih),'"')}function Vn(r,t,e,n,a){if(a||(a=[]),n)if(r=n(r),r){if(typeof r=="string"){t.push(r);return}}else return;switch(r.nodeType){case Nr:var u=r.attributes,l=u.length,R=r.firstChild,c=r.tagName;e=Ns.isHTML(r.namespaceURI)||e;var f=c;if(!e&&!r.prefix&&r.namespaceURI){for(var d,y=0;y<u.length;y++)if(u.item(y).name==="xmlns"){d=u.item(y).value;break}if(!d)for(var A=a.length-1;A>=0;A--){var _=a[A];if(_.prefix===""&&_.namespace===r.namespaceURI){d=_.namespace;break}}if(d!==r.namespaceURI)for(var A=a.length-1;A>=0;A--){var _=a[A];if(_.namespace===r.namespaceURI){_.prefix&&(f=_.prefix+":"+c);break}}}t.push("<",f);for(var C=0;C<l;C++){var F=u.item(C);F.prefix=="xmlns"?a.push({prefix:F.localName,namespace:F.value}):F.nodeName=="xmlns"&&a.push({prefix:"",namespace:F.value})}for(var C=0;C<l;C++){var F=u.item(C);if(Vh(F,e,a)){var N=F.prefix||"",M=F.namespaceURI;oo(t,N?"xmlns:"+N:"xmlns",M),a.push({prefix:N,namespace:M})}Vn(F,t,e,n,a)}if(c===f&&Vh(r,e,a)){var N=r.prefix||"",M=r.namespaceURI;oo(t,N?"xmlns:"+N:"xmlns",M),a.push({prefix:N,namespace:M})}if(R||e&&!/^(?:meta|link|img|br|hr|input)$/i.test(c)){if(t.push(">"),e&&/^script$/i.test(c))for(;R;)R.data?t.push(R.data):Vn(R,t,e,n,a.slice()),R=R.nextSibling;else for(;R;)Vn(R,t,e,n,a.slice()),R=R.nextSibling;t.push("</",f,">")}else t.push("/>");return;case _h:case ci:for(var R=r.firstChild;R;)Vn(R,t,e,n,a.slice()),R=R.nextSibling;return;case qn:return oo(t,r.name,r.value);case Ma:return t.push(r.data.replace(/[<&>]/g,Ih));case Ah:return t.push("<![CDATA[",r.data,"]]>");case Th:return t.push("<!--",r.data,"-->");case Ch:var q=r.publicId,z=r.systemId;if(t.push("<!DOCTYPE ",r.name),q)t.push(" PUBLIC ",q),z&&z!="."&&t.push(" ",z),t.push(">");else if(z&&z!=".")t.push(" SYSTEM ",z,">");else{var w=r.internalSubset;w&&t.push(" [",w,"]"),t.push(">")}return;case wh:return t.push("<?",r.target," ",r.data,"?>");case bh:return t.push("&",r.nodeName,";");default:t.push("??",r.nodeName)}}function $h(r,t,e){var n;switch(t.nodeType){case Nr:n=t.cloneNode(!1),n.ownerDocument=r;case ci:break;case qn:e=!0;break}if(n||(n=t.cloneNode(!1)),n.ownerDocument=r,n.parentNode=null,e)for(var a=t.firstChild;a;)n.appendChild($h(r,a,e)),a=a.nextSibling;return n}function lo(r,t,e){var n=new t.constructor;for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a)){var u=t[a];typeof u!="object"&&u!=n[a]&&(n[a]=u)}switch(t.childNodes&&(n.childNodes=new fi),n.ownerDocument=r,n.nodeType){case Nr:var l=t.attributes,c=n.attributes=new Ba,f=l.length;c._ownerElement=n;for(var d=0;d<f;d++)n.setAttributeNode(lo(r,l.item(d),!0));break;case qn:e=!0}if(e)for(var y=t.firstChild;y;)n.appendChild(lo(r,y,e)),y=y.nextSibling;return n}function zh(r,t,e){r[t]=e}try{if(Object.defineProperty){let r=function(t){switch(t.nodeType){case Nr:case ci:var e=[];for(t=t.firstChild;t;)t.nodeType!==7&&t.nodeType!==8&&e.push(r(t)),t=t.nextSibling;return e.join("");default:return t.nodeValue}};Object.defineProperty(Wn.prototype,"length",{get:function(){return to(this),this.$$length}}),Object.defineProperty(Rt.prototype,"textContent",{get:function(){return r(this)},set:function(t){switch(this.nodeType){case Nr:case ci:for(;this.firstChild;)this.removeChild(this.firstChild);(t||String(t))&&this.appendChild(this.ownerDocument.createTextNode(t));break;default:this.data=t,this.value=t,this.nodeValue=t}}}),zh=function(t,e,n){t["$$"+e]=n}}}catch{}Pi.DocumentType=La,Pi.DOMException=Kt,Pi.DOMImplementation=Bh,Pi.Element=cn,Pi.Node=Rt,Pi.NodeList=fi,Pi.XMLSerializer=qh;var Fa={},Gh={};(function(r){var t=hi.freeze;r.XML_ENTITIES=t({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),r.HTML_ENTITIES=t({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
|
|
2
|
+
`,nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:" ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"",zwnj:""}),r.entityMap=r.HTML_ENTITIES})(Gh);var ho={},Ls=hi.NAMESPACE,co=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,Yh=new RegExp("[\\-\\.0-9"+co.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),Xh=new RegExp("^"+co.source+Yh.source+"*(?::"+co.source+Yh.source+"*)?$"),Ps=0,Fi=1,$n=2,Fs=3,zn=4,Gn=5,Us=6,Ua=7;function Yn(r,t){this.message=r,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,Yn)}Yn.prototype=new Error,Yn.prototype.name=Yn.name;function Zh(){}Zh.prototype={parse:function(r,t,e){var n=this.domBuilder;n.startDocument(),Kh(t,t={}),vg(r,t,e,n,this.errorHandler),n.endDocument()}};function vg(r,t,e,n,a){function u(O){if(O>65535){O-=65536;var yt=55296+(O>>10),Bt=56320+(O&1023);return String.fromCharCode(yt,Bt)}else return String.fromCharCode(O)}function l(O){var yt=O.slice(1,-1);return Object.hasOwnProperty.call(e,yt)?e[yt]:yt.charAt(0)==="#"?u(parseInt(yt.substr(1).replace("x","0x"))):(a.error("entity not found:"+O),O)}function c(O){if(O>N){var yt=r.substring(N,O).replace(/&#?\w+;/g,l);_&&f(N),n.characters(yt,0,O-N),N=O}}function f(O,yt){for(;O>=y&&(yt=A.exec(r));)d=yt.index,y=d+yt[0].length,_.lineNumber++;_.columnNumber=O-d+1}for(var d=0,y=0,A=/.*(?:\r\n?|\n)|.*$/g,_=n.locator,C=[{currentNSMap:t}],F={},N=0;;){try{var M=r.indexOf("<",N);if(M<0){if(!r.substr(N).match(/^\s*$/)){var R=n.doc,q=R.createTextNode(r.substr(N));R.appendChild(q),n.currentElement=q}return}switch(M>N&&c(M),r.charAt(M+1)){case"/":var J=r.indexOf(">",M+3),z=r.substring(M+2,J).replace(/[ \t\n\r]+$/g,""),w=C.pop();J<0?(z=r.substring(M+2).replace(/[\s<].*/,""),a.error("end tag name: "+z+" is not complete:"+w.tagName),J=M+1+z.length):z.match(/\s</)&&(z=z.replace(/[\s<].*/,""),a.error("end tag name: "+z+" maybe not complete"),J=M+1+z.length);var L=w.localNSMap,k=w.tagName==z,j=k||w.tagName&&w.tagName.toLowerCase()==z.toLowerCase();if(j){if(n.endElement(w.uri,w.localName,z),L)for(var tt in L)Object.prototype.hasOwnProperty.call(L,tt)&&n.endPrefixMapping(tt);k||a.fatalError("end tag name: "+z+" is not match the current start tagName:"+w.tagName)}else C.push(w);J++;break;case"?":_&&f(M),J=bg(r,M,n);break;case"!":_&&f(M),J=Ag(r,M,n,a);break;default:_&&f(M);var Z=new Jh,rt=C[C.length-1].currentNSMap,J=mg(r,M,Z,rt,l,a),st=Z.length;if(!Z.closed&&Eg(r,J,Z.tagName,F)&&(Z.closed=!0,e.nbsp||a.warning("unclosed xml attribute")),_&&st){for(var ht=Qh(_,{}),ct=0;ct<st;ct++){var ft=Z[ct];f(ft.offset),ft.locator=Qh(_,{})}n.locator=ht,jh(Z,n,rt)&&C.push(Z),n.locator=_}else jh(Z,n,rt)&&C.push(Z);Ls.isHTML(Z.uri)&&!Z.closed?J=xg(r,J,Z.tagName,l,n):J++}}catch(O){if(O instanceof Yn)throw O;a.error("element parse error: "+O),J=-1}J>N?N=J:c(Math.max(M,N)+1)}}function Qh(r,t){return t.lineNumber=r.lineNumber,t.columnNumber=r.columnNumber,t}function mg(r,t,e,n,a,u){function l(_,C,F){e.attributeNames.hasOwnProperty(_)&&u.fatalError("Attribute "+_+" redefined"),e.addValue(_,C.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,a),F)}for(var c,f,d=++t,y=Ps;;){var A=r.charAt(d);switch(A){case"=":if(y===Fi)c=r.slice(t,d),y=Fs;else if(y===$n)y=Fs;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(y===Fs||y===Fi)if(y===Fi&&(u.warning('attribute value must after "="'),c=r.slice(t,d)),t=d+1,d=r.indexOf(A,t),d>0)f=r.slice(t,d),l(c,f,t-1),y=Gn;else throw new Error("attribute value no end '"+A+"' match");else if(y==zn)f=r.slice(t,d),l(c,f,t),u.warning('attribute "'+c+'" missed start quot('+A+")!!"),t=d+1,y=Gn;else throw new Error('attribute value must after "="');break;case"/":switch(y){case Ps:e.setTagName(r.slice(t,d));case Gn:case Us:case Ua:y=Ua,e.closed=!0;case zn:case Fi:break;case $n:e.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return u.error("unexpected end of input"),y==Ps&&e.setTagName(r.slice(t,d)),d;case">":switch(y){case Ps:e.setTagName(r.slice(t,d));case Gn:case Us:case Ua:break;case zn:case Fi:f=r.slice(t,d),f.slice(-1)==="/"&&(e.closed=!0,f=f.slice(0,-1));case $n:y===$n&&(f=c),y==zn?(u.warning('attribute "'+f+'" missed quot(")!'),l(c,f,t)):((!Ls.isHTML(n[""])||!f.match(/^(?:disabled|checked|selected)$/i))&&u.warning('attribute "'+f+'" missed value!! "'+f+'" instead!!'),l(f,f,t));break;case Fs:throw new Error("attribute value missed!!")}return d;case"":A=" ";default:if(A<=" ")switch(y){case Ps:e.setTagName(r.slice(t,d)),y=Us;break;case Fi:c=r.slice(t,d),y=$n;break;case zn:var f=r.slice(t,d);u.warning('attribute "'+f+'" missed quot(")!!'),l(c,f,t);case Gn:y=Us;break}else switch(y){case $n:e.tagName,(!Ls.isHTML(n[""])||!c.match(/^(?:disabled|checked|selected)$/i))&&u.warning('attribute "'+c+'" missed value!! "'+c+'" instead2!!'),l(c,c,t),t=d,y=Fi;break;case Gn:u.warning('attribute space is required"'+c+'"!!');case Us:y=Fi,t=d;break;case Fs:y=zn,t=d;break;case Ua:throw new Error("elements closed character '/' and '>' must be connected to")}}d++}}function jh(r,t,e){for(var n=r.tagName,a=null,A=r.length;A--;){var u=r[A],l=u.qName,c=u.value,_=l.indexOf(":");if(_>0)var f=u.prefix=l.slice(0,_),d=l.slice(_+1),y=f==="xmlns"&&d;else d=l,f=null,y=l==="xmlns"&&"";u.localName=d,y!==!1&&(a==null&&(a={},Kh(e,e={})),e[y]=a[y]=c,u.uri=Ls.XMLNS,t.startPrefixMapping(y,c))}for(var A=r.length;A--;){u=r[A];var f=u.prefix;f&&(f==="xml"&&(u.uri=Ls.XML),f!=="xmlns"&&(u.uri=e[f||""]))}var _=n.indexOf(":");_>0?(f=r.prefix=n.slice(0,_),d=r.localName=n.slice(_+1)):(f=null,d=r.localName=n);var C=r.uri=e[f||""];if(t.startElement(C,d,n,r),r.closed){if(t.endElement(C,d,n),a)for(f in a)Object.prototype.hasOwnProperty.call(a,f)&&t.endPrefixMapping(f)}else return r.currentNSMap=e,r.localNSMap=a,!0}function xg(r,t,e,n,a){if(/^(?:script|textarea)$/i.test(e)){var u=r.indexOf("</"+e+">",t),l=r.substring(t+1,u);if(/[&<]/.test(l))return/^script$/i.test(e)?(a.characters(l,0,l.length),u):(l=l.replace(/&#?\w+;/g,n),a.characters(l,0,l.length),u)}return t+1}function Eg(r,t,e,n){var a=n[e];return a==null&&(a=r.lastIndexOf("</"+e+">"),a<t&&(a=r.lastIndexOf("</"+e)),n[e]=a),a<t}function Kh(r,t){for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])}function Ag(r,t,e,n){var a=r.charAt(t+2);switch(a){case"-":if(r.charAt(t+3)==="-"){var u=r.indexOf("-->",t+4);return u>t?(e.comment(r,t+4,u-t-4),u+3):(n.error("Unclosed comment"),-1)}else return-1;default:if(r.substr(t+3,6)=="CDATA["){var u=r.indexOf("]]>",t+9);return e.startCDATA(),e.characters(r,t+9,u-t-9),e.endCDATA(),u+3}var l=wg(r,t),c=l.length;if(c>1&&/!doctype/i.test(l[0][0])){var f=l[1][0],d=!1,y=!1;c>3&&(/^public$/i.test(l[2][0])?(d=l[3][0],y=c>4&&l[4][0]):/^system$/i.test(l[2][0])&&(y=l[3][0]));var A=l[c-1];return e.startDTD(f,d,y),e.endDTD(),A.index+A[0].length}}return-1}function bg(r,t,e){var n=r.indexOf("?>",t);if(n){var a=r.substring(t,n).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return a?(a[0].length,e.processingInstruction(a[1],a[2]),n+2):-1}return-1}function Jh(){this.attributeNames={}}Jh.prototype={setTagName:function(r){if(!Xh.test(r))throw new Error("invalid tagName:"+r);this.tagName=r},addValue:function(r,t,e){if(!Xh.test(r))throw new Error("invalid attribute:"+r);this.attributeNames[r]=this.length,this[this.length++]={qName:r,value:t,offset:e}},length:0,getLocalName:function(r){return this[r].localName},getLocator:function(r){return this[r].locator},getQName:function(r){return this[r].qName},getURI:function(r){return this[r].uri},getValue:function(r){return this[r].value}};function wg(r,t){var e,n=[],a=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(a.lastIndex=t,a.exec(r);e=a.exec(r);)if(n.push(e),e[1])return n}ho.XMLReader=Zh,ho.ParseError=Yn;var Tg=hi,_g=Pi,tc=Gh,ec=ho,Cg=_g.DOMImplementation,rc=Tg.NAMESPACE,Dg=ec.ParseError,Sg=ec.XMLReader;function ic(r){return r.replace(/\r[\n\u0085]/g,`
|
|
3
3
|
`).replace(/[\r\u0085\u2028]/g,`
|
|
4
|
-
`)}function nc(r){this.options=r||{locator:{}}}nc.prototype.parseFromString=function(r,t){var e=this.options,n=new
|
|
5
|
-
@`+(r.systemId||"")+"#[line:"+r.lineNumber+",col:"+r.columnNumber+"]"}function sc(r,t,e){return typeof r=="string"?r.substr(t,e):r.length>=t+e||t?new java.lang.String(r,t,e)+"":r}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(r){ks.prototype[r]=function(){return null}});function ka(r,t){r.currentElement?r.currentElement.appendChild(t):r.doc.appendChild(t)}Fa.__DOMHandler=ks,Fa.normalizeLineEndings=ic,Fa.DOMParser=nc;var Mg=Fa.DOMParser;const Bg="1.0.39";function Ig(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const Zn=typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{document:void 0,tinyEngine:void 0};Zn.Path2D||Jd(Zn),Zn.DOMParser||(Zn.DOMParser=Mg);const Zt={window:Zn,version:Bg,isBrowser:Ig(),dpr:typeof window<"u"&&window.devicePixelRatio||1,document:Zn.document,time:0,deltaTime:0,config:kn},Hs=(r,t,e)=>Math.max(t,Math.min(e,r)),ac=(r,t=1e-6)=>Math.abs(r)<t?0:r<0?-1:1,uc=r=>r*(Math.PI/180),Rg=(r,t)=>(r%t+t)%t,po=(r,t,e)=>(1-e)*r+e*t,Lg=r=>{let t=r*(180/Math.PI);return t<0&&(t+=360),t>360&&(t-=360),t},he={transparent:"rgba(1, 1, 1, 0)",green:"#45b787",darkGreen:"#314a43",blue:"#6e9bc5",darkBlue:"#2775b6",red:"#F26666",darkRed:"#D95970",brown:"#ECD2B9",darkBrown:"#BF9D8A",yellow:"#ECDEC0",darkYellow:"#D0AC57",lightGray:"#e0e0e0",gray:"#beb6b6",darkGray:"#918883",white:"#F2F2F2",darkWhite:"#ececec",lightBlack:"#2E3032",black:"#182327",blackAlpha5:"rgba(0, 0, 0, 0.5)"},Pg={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Mr={h:0,s:0,l:0},Ha={h:0,s:0,l:0};function go(r,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?r+(t-r)*6*e:e<1/2?t:e<2/3?r+(t-r)*6*(2/3-e):r}const Fg=/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3}|[A-Fa-f0-9]{8})$|rgb\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*\)|rgba\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*,\s*[\d.]+\s*\)/;class Wt{isColor=!0;r=1;g=1;b=1;a=1;constructor(t,e,n,a){return e===void 0&&n===void 0?this.set(t):this.setRGBA(t,e,n,a)}static isColor(t){return typeof t=="string"?Fg.test(t):typeof t=="number"?t>=0&&t<=16777215:!1}static getRandomStyle(){return di.random().getStyle()}static getDarken(t,e=.8){return di.set(t).getHSL(qa),di.setHSL(qa.h,qa.s,qa.l*e).getStyle()}static getLighten(t,e=1.2){return this.getDarken(t,e)}static getContrast(t){return di.set(t),di.getContrastString()}static getArray(t){return di.set(t).toArray()}static getComplementary(t){return di.set(t),di.getComplementaryString()}static getMoreTransparent(t,e){return di.set(t).setA(e).getStyle()}set(t){return t&&t.isColor?this.copy(t):typeof t=="number"?this.setHex(t):typeof t=="string"&&this.setStyle(t),this}random(){return this.setHex(Math.floor(Math.random()*(1<<24)))}setScalar(t){return this.r=t,this.g=t,this.b=t,this.a=1,this}setHex(t){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(t&255)/255,this.a=1,this}setR(t){return this.r=t,this}setG(t){return this.g=t,this}setB(t){return this.b=t,this}setA(t){return this.a=t,this}setRGB(t,e,n){return this.setRGBA(t,e,n,this.a)}setRGBA(t,e,n,a=1){return this.r=t,this.g=e,this.b=n,this.a=a,this}setHSL(t,e,n,a=1){if(t=Rg(t,1),e=Hs(e,0,1),n=Hs(n,0,1),e===0)this.r=this.g=this.b=n;else{const u=n<=.5?n*(1+e):n+e-n*e,l=2*n-u;this.r=go(l,u,t+1/3),this.g=go(l,u,t),this.b=go(l,u,t-1/3)}return this.a=a,this}setStyle(t){let e;if(e=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(t)){let n;const a=e[1],u=e[2];switch(a){case"rgb":case"rgba":if(n=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(u))return this.r=Math.min(255,parseInt(n[1],10))/255,this.g=Math.min(255,parseInt(n[2],10))/255,this.b=Math.min(255,parseInt(n[3],10))/255,this.a=Math.max(Math.min(1,n[4]!==void 0?parseFloat(n[4]):1),0),this;if(n=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(u))return this.r=Math.min(100,parseInt(n[1],10))/100,this.g=Math.min(100,parseInt(n[2],10))/100,this.b=Math.min(100,parseInt(n[3],10))/100,this.a=Math.max(Math.min(1,n[4]!==void 0?parseFloat(n[4]):1),0),this;break;case"hsl":case"hsla":if(n=/^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(u)){const l=parseFloat(n[1])/360,c=parseInt(n[2],10)/100,f=parseInt(n[3],10)/100,d=Math.max(Math.min(1,n[4]!==void 0?parseFloat(n[4]):1),0);return this.setHSL(l,c,f,d)}break}}else if(e=/^\#([A-Fa-f\d]+)$/.exec(t)){const n=e[1],a=n.length;if(a===3)return this.r=parseInt(n.charAt(0)+n.charAt(0),16)/255,this.g=parseInt(n.charAt(1)+n.charAt(1),16)/255,this.b=parseInt(n.charAt(2)+n.charAt(2),16)/255,this.a=1,this;if(a===6)return this.r=parseInt(n.charAt(0)+n.charAt(1),16)/255,this.g=parseInt(n.charAt(2)+n.charAt(3),16)/255,this.b=parseInt(n.charAt(4)+n.charAt(5),16)/255,this.a=1,this}return t&&t.length>0?this.setColorName(t):this}setColorName(t){const e=Pg[t.toLowerCase()];return e!==void 0?this.setHex(e):console.warn("Color: Unknown color "+t),this}clone(){return new Wt(this.r,this.g,this.b,this.a)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this}getRGB(t=new Wt){return t.setRGB(this.r,this.g,this.b)}getRGBByBg(t=new Wt){const e=this.a,n=e*this.r+(1-e)*t.r,a=e*this.g+(1-e)*t.g,u=e*this.b+(1-e)*t.b;return new Wt(n,a,u)}getHex(){return Hs(this.r*255,0,255)<<16^Hs(this.g*255,0,255)<<8^Hs(this.b*255,0,255)<<0}getHSL(t){const e=this.r,n=this.g,a=this.b,u=Math.max(e,n,a),l=Math.min(e,n,a);let c=0,f;const d=(l+u)/2;if(l===u)c=0,f=0;else{const y=u-l;switch(f=d<=.5?y/(u+l):y/(2-u-l),u){case e:c=(n-a)/y+(n<a?6:0);break;case n:c=(a-e)/y+2;break;case a:c=(e-n)/y+4;break}c/=6}return t.h=c,t.s=f,t.l=d,t}getStyle(){return this.a===1?`rgb(${this.r*255|0},${this.g*255|0},${this.b*255|0})`:`rgba(${this.r*255|0},${this.g*255|0},${this.b*255|0},${this.a||1})`}getHexString(){return"#"+("000000"+this.getHex().toString(16)).slice(-6)}getBrightness(){let t=(this.r*255*299+this.g*255*587+this.b*255*144)/1e3;return t+=(255-t)*(255-this.a*255)/255,t}getContrastString(){return this.getBrightness()>125?"#2f2f2f":"#f2f2f2"}getComplementary(t=new Wt){const e=this.toArray(),n=[0,0,0,1];for(let a=0;a<e.length;a++)if(a<3)n[a]=1-e[a];else if(a===3)e[a]>1||e[a]<=0?n[a]=1:n[a]=Math.max(Math.min(parseFloat(e[a].toFixed(2)),1),0);else continue;return t.setRGBA(n[0],n[1],n[2],parseFloat(n[3].toFixed(2)))}getComplementaryString(){return this.getComplementary().getStyle()}getLightenOrDarken(t){if(typeof t>"u"||t>=1)return this.getHexString();const e=this.getRGBByBg(),n=e.r*t+(1-t),a=e.g*t+(1-t),u=e.b*t+(1-t);return new Wt(n,a,u).getHexString()}getNormalized(){return[parseFloat(Math.max(Math.min(this.r,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.g,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.b,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.a,1),0).toFixed(2))]}getNormalized3(){return[parseFloat(Math.max(Math.min(this.r,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.g,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.b,1),0).toFixed(2))]}offsetHSL(t,e,n){return this.getHSL(Mr),Mr.h+=t,Mr.s+=e,Mr.l+=n,this.setHSL(Mr.h,Mr.s,Mr.l),this}add(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this}addColors(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this}addScalar(t){return this.r+=t,this.g+=t,this.b+=t,this}sub(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),this}multiply(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this}multiplyScalar(t){return this.r*=t,this.g*=t,this.b*=t,this}lerp(t,e){return this.r+=(t.r-this.r)*e,this.g+=(t.g-this.g)*e,this.b+=(t.b-this.b)*e,this}lerpColors(t,e,n){return this.r=t.r+(e.r-t.r)*n,this.g=t.g+(e.g-t.g)*n,this.b=t.b+(e.b-t.b)*n,this}lerpHSL(t,e){this.getHSL(Mr),t.getHSL(Ha);const n=po(Mr.h,Ha.h,e),a=po(Mr.s,Ha.s,e),u=po(Mr.l,Ha.l,e);return this.setHSL(n,a,u),this}equals(t){return t.r===this.r&&t.g===this.g&&t.b===this.b}fromArray(t,e=0){return this.r=t[e],this.g=t[e+1],this.b=t[e+2],this.a=t[e+3],this}toArray(t=[0,0,0,0],e=0){return t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t[e+3]=this.a,t}fromBufferAttribute(t,e){return this.r=t.getX(e),this.g=t.getY(e),this.b=t.getZ(e),t.normalized===!0&&(this.r/=255,this.g/=255,this.b/=255),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const di=new Wt,qa={h:0,s:0,l:0};class Y{isVector2=!0;x=0;y=0;z;constructor(t=0,e=0,n){this.x=t,this.y=e,this.z=n||0}static isZero(t){return t.x===0&&t.y===0}static isEmpty(t){return!Number.isFinite(t.x)&&!Number.isFinite(t.y)}static equals(t,e,n=!0){return n?t.x===e.x&&t.y===e.y:Math.abs(t.x-e.x)<Number.EPSILON&&Math.abs(t.y-e.y)<Number.EPSILON}static getInt32Array(t,e=2){const n=new ArrayBuffer(t.length*e*4),a=new Int32Array(n);for(let u=0,l=t.length;u<l;u++)a[u*2]=t[u].x,a[u*2+1]=t[u].y;return a}static getFloat64Array(t,e=2){const n=new ArrayBuffer(t.length*e*8),a=new Float64Array(n);for(let u=0,l=t.length;u<l;u++)a[u*2]=t[u].x,a[u*2+1]=t[u].y;return a}static getVectors(t){const e=[];for(let n=0,a=t.length;n<a;n++)e.push(new Y(t[n].x,t[n].y));return e}static getStrings(t){const e=[];if(!t||!t.length)return"";for(let n=0,a=t.length;n<a;n++)e.push(Y.getString(t[n]));return e.join(",")}static getString(t){return`${t.x},${t.y}`}static getLength(t){return Math.sqrt(t.x*t.x+t.y*t.y)}static getDistance(t,e){return Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y))}static dot(t,e){return t.x*e.x+t.y*e.y}static cross(t,e){return t.x*e.y-t.y*e.x}static sub(t,e){return new Y().subVectors(t,e)}static isPointOnSegment(t,e,n){return ac(this.sub(t,n).cross(this.sub(e,n)))===0&&ac(this.sub(t,n).dot(this.sub(e,n)))<=0}static angle(t,e,n){return n?Math.atan2(t.y-e.y,t.x-e.x):Lg(Math.atan2(t.y-e.y,t.x-e.x))}static getSamplingPoints(t,e=100){let n=this.getClothoidPoints(t,e),a=0;for(let u=0,l=n.length;u<l;u++){let c=Math.max(0,u-1);u>0?a+=this.getDistance(n[c],n[c+1]):a=0,n[u].l=Math.round(a);let f=this.angle(n[c+1],n[c]);n[u].a=Math.round(f*100)/100}return n}static getClothoidPoints(t,e=100){let n=[],a=t.concat([]);if(!a||a.length<2)return n;a.length===2?(a.push(a[1]),a.unshift(a[0])):a.length===3&&a.splice(2,0,a[1]);for(let u=0;u<a.length-3;u+=3){let l=new Y(a[u].x,a[u].y),c=new Y(a[u+1].x,a[u+1].y),f=new Y(a[u+2].x,a[u+2].y),d=new Y(a[u+3].x,a[u+3].y),y=0;y+=l.distanceTo(c),y+=c.distanceTo(f),y+=f.distanceTo(d);let A=Math.min(.5,1/(y/e));for(let _=A;_<1;_+=A){let C=3*(c.x-l.x),F=3*(f.x-c.x)-C,N=d.x-l.x-C-F,M=3*(c.y-l.y),R=3*(f.y-c.y)-M,q=d.y-l.y-M-R,z=N*Math.pow(_,3)+F*Math.pow(_,2)+C*_+l.x,w=q*Math.pow(_,3)+R*Math.pow(_,2)+M*_+l.y;n.push({x:Math.round(z),y:Math.round(w),a:0,l:0})}}return n.unshift({x:a[0].x,y:a[0].y,a:0,l:0}),n.push({x:a[a.length-1].x,y:a[a.length-1].y,a:0,l:0}),n}static getClothoidLength(t){let e=0;if(t.length>2)for(let n=0;n<t.length;n++){let a=Math.max(0,n-1);n>0&&(e+=this.getDistance(t[a],t[a+1]))}return e}static getCircleCenterByChord(t,e,n,a=!0,u=new Y){const l=this.getDistance(t,e);if(l===0)return u.x=1/0,u.y=1/0,u;yo.set((t.x+e.x)/2,(t.y+e.y)/2);const c=Math.sqrt(n*n-l*l/4),f=a?-1:1;return u.x=yo.x+f*c*(e.y-t.y)/l,u.y=yo.y-f*c*(e.x-t.x)/l,u}static isPointInCircle(t,e,n){return this.getDistance(n,t)<e}static isPointInPolygonByRay(t,e){let n=0;const a=new Y().copy(t),u=new Y,l=new Y;for(let c=0;c<e.length;c++){c===e.length-1?(u.copy(e[c]),l.copy(e[0])):(u.copy(e[c]),l.copy(e[c+1]));let f=[u.y,l.y].sort((d,y)=>d-y);f[0]<a.y&&f[1]>a.y&&(u.x<a.x||l.x<a.x)&&n++}return n%2===1}static whichSideOfSegment(t,e,n){return(e.x-t.x)*(n.y-t.y)-(n.x-t.x)*(e.y-t.y)}static getIntersectionOfSegments(t,e,n,a,u=!1,l=new Y){const c=(a.y-n.y)*(e.x-t.x)-(a.x-n.x)*(e.y-t.y);if(c===0)return l.makeEmpty();const f=(a.x-n.x)*(t.y-n.y)-(a.y-n.y)*(t.x-n.x),d=(e.x-t.x)*(t.y-n.y)-(e.y-t.y)*(t.x-n.x),y=f/c,A=d/c;return u&&(y<0||y>1||A<0||A>1)?l.makeEmpty():(l.x=t.x+y*(e.x-t.x),l.y=t.y+y*(e.y-t.y),l)}static getConvexHullByGrahamScan(t,e=!1,n=[]){if(!t||!t.length)return n;const a=t.length;let u=0;for(let f=0;f<a;f++)t[f].x<t[u].x&&(u=f);let l=u,c;do{n.push(t[l]),c=(l+1)%a;for(let f=0;f<a;f++)this.whichSideOfSegment(t[l],t[f],t[c])>0&&(c=f);l=c}while(l!==u);return e&&n.push(t[u]),n}static getPointsWithMatrix3(t,e){const n=[];if(!t)return n;for(let a=0,u=t.length;a<u;a++)n.push({x:e.elements[0]*t[a].x+e.elements[3]*t[a].y+e.elements[6],y:e.elements[1]*t[a].x+e.elements[4]*t[a].y+e.elements[7]});return n}static getPointsApplyMatrix3(t,e=[]){for(let n=0,a=e.length;n<a;n++){const u=t.elements[0]*e[n].x+t.elements[3]*e[n].y+t.elements[6],l=t.elements[1]*e[n].x+t.elements[4]*e[n].y+t.elements[7];e[n].x=u,e[n].y=l}return e}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}applyMatrix3(t){const e=this.x,n=this.y,a=t.elements;return this.x=a[0]*e+a[3]*n+a[6],this.y=a[1]*e+a[4]*n+a[7],this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}ceilToZero(){return this.x=this.x<0?Math.floor(this.x):Math.ceil(this.x),this.y=this.y<0?Math.floor(this.y):Math.ceil(this.y),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this}clone(){return new Y(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}cross(t){return this.x*t.y-this.y*t.x}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,n=this.y-t.y;return e*e+n*n}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}dot(t){return this.x*t.x+this.y*t.y}equals(t,e=!0){return e?t.x===this.x&&t.y===this.y:Math.abs(t.x-this.x)<Number.EPSILON&&Math.abs(t.y-this.y)<Number.EPSILON}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}floorToZero(){return this.roundToZero()}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("out of range: "+t)}}identity(){return this.set(0,0)}isEmpty(){return!Number.isFinite(this.x)&&!Number.isFinite(this.y)}isZero(){return this.x===0&&this.y===0}length(){return Math.sqrt(this.dot(this))}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this}makeEmpty(){return this.x=1/0,this.y=1/0,this}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}maxXY(t,e){return this.x=Math.max(this.x,t),this.y=Math.max(this.y,e),this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}minXY(t,e){return this.x=Math.min(this.x,t),this.y=Math.min(this.y,e),this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t,e){return this.x*=t,this.y*=e||t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this}negate(){return this.x=-this.x,this.y=-this.y,this}normalize(){return this.divideScalar(this.length()||1)}project(t){return this.applyMatrix3(t.matrixWorldInverse).applyMatrix3(t.projectionMatrix)}random(){return this.x=Math.random(),this.y=Math.random(),this}rotate(t){const e=Math.cos(t),n=Math.sin(t),a=this.x,u=this.y;return this.x=a*e-u*n,this.y=a*n+u*e,this}rotateAround(t,e){const n=Math.cos(e),a=Math.sin(e),u=this.x-t.x,l=this.y-t.y;return this.x=u*n-l*a+t.x,this.y=u*a+l*n+t.y,this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}set(t,e){return this.x=t,this.y=e,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("out of range: "+t)}return this}setFromMatrixColumn(t,e){return this.fromArray(t.elements,e*3)}setLength(t){return this.normalize().multiplyScalar(t)}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}toString(){return`{"x":${this.x},"y":${this.y}}`}unproject(t,e=!1){return this.applyMatrix3(t.projectionMatrixInverse).applyMatrix3(t.matrixWorld)}validate(){return!(isNaN(this.x)||isNaN(this.y))}*[Symbol.iterator](){yield this.x,yield this.y}}const yo=new Y,Ug=Object.freeze(Object.defineProperty({__proto__:null,default:Y},Symbol.toStringTag,{value:"Module"}));var Wa={exports:{}};/**
|
|
4
|
+
`)}function nc(r){this.options=r||{locator:{}}}nc.prototype.parseFromString=function(r,t){var e=this.options,n=new Sg,a=e.domBuilder||new ks,u=e.errorHandler,l=e.locator,c=e.xmlns||{},f=/\/x?html?$/.test(t),d=f?tc.HTML_ENTITIES:tc.XML_ENTITIES;l&&a.setDocumentLocator(l),n.errorHandler=Og(u,a,l),n.domBuilder=e.domBuilder||a,f&&(c[""]=rc.HTML),c.xml=c.xml||rc.XML;var y=e.normalizeLineEndings||ic;return r&&typeof r=="string"?n.parse(y(r),c,d):n.errorHandler.error("invalid doc source"),a.doc};function Og(r,t,e){if(!r){if(t instanceof ks)return t;r=t}var n={},a=r instanceof Function;e=e||{};function u(l){var c=r[l];!c&&a&&(c=r.length==2?function(f){r(l,f)}:r),n[l]=c&&function(f){c("[xmldom "+l+"] "+f+fo(e))}||function(){}}return u("warning"),u("error"),u("fatalError"),n}function ks(){this.cdata=!1}function Xn(r,t){t.lineNumber=r.lineNumber,t.columnNumber=r.columnNumber}ks.prototype={startDocument:function(){this.doc=new Cg().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(r,t,e,n){var a=this.doc,u=a.createElementNS(r,e||t),l=n.length;ka(this,u),this.currentElement=u,this.locator&&Xn(this.locator,u);for(var c=0;c<l;c++){var r=n.getURI(c),f=n.getValue(c),e=n.getQName(c),d=a.createAttributeNS(r,e);this.locator&&Xn(n.getLocator(c),d),d.value=d.nodeValue=f,u.setAttributeNode(d)}},endElement:function(r,t,e){var n=this.currentElement;n.tagName,this.currentElement=n.parentNode},startPrefixMapping:function(r,t){},endPrefixMapping:function(r){},processingInstruction:function(r,t){var e=this.doc.createProcessingInstruction(r,t);this.locator&&Xn(this.locator,e),ka(this,e)},ignorableWhitespace:function(r,t,e){},characters:function(r,t,e){if(r=sc.apply(this,arguments),r){if(this.cdata)var n=this.doc.createCDATASection(r);else var n=this.doc.createTextNode(r);this.currentElement?this.currentElement.appendChild(n):/^\s*$/.test(r)&&this.doc.appendChild(n),this.locator&&Xn(this.locator,n)}},skippedEntity:function(r){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(r){(this.locator=r)&&(r.lineNumber=0)},comment:function(r,t,e){r=sc.apply(this,arguments);var n=this.doc.createComment(r);this.locator&&Xn(this.locator,n),ka(this,n)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(r,t,e){var n=this.doc.implementation;if(n&&n.createDocumentType){var a=n.createDocumentType(r,t,e);this.locator&&Xn(this.locator,a),ka(this,a),this.doc.doctype=a}},warning:function(r){console.warn("[xmldom warning] "+r,fo(this.locator))},error:function(r){console.error("[xmldom error] "+r,fo(this.locator))},fatalError:function(r){throw new Dg(r,this.locator)}};function fo(r){if(r)return`
|
|
5
|
+
@`+(r.systemId||"")+"#[line:"+r.lineNumber+",col:"+r.columnNumber+"]"}function sc(r,t,e){return typeof r=="string"?r.substr(t,e):r.length>=t+e||t?new java.lang.String(r,t,e)+"":r}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(r){ks.prototype[r]=function(){return null}});function ka(r,t){r.currentElement?r.currentElement.appendChild(t):r.doc.appendChild(t)}Fa.__DOMHandler=ks,Fa.normalizeLineEndings=ic,Fa.DOMParser=nc;var Ng=Fa.DOMParser;const Mg="1.0.41";function Bg(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const Zn=typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{document:void 0,tinyEngine:void 0};Zn.Path2D||Kd(Zn),Zn.DOMParser||(Zn.DOMParser=Ng);const Zt={window:Zn,version:Mg,isBrowser:Bg(),dpr:typeof window<"u"&&window.devicePixelRatio||1,document:Zn.document,time:0,deltaTime:0,config:kn},Hs=(r,t,e)=>Math.max(t,Math.min(e,r)),ac=(r,t=1e-6)=>Math.abs(r)<t?0:r<0?-1:1,uc=r=>r*(Math.PI/180),Ig=(r,t)=>(r%t+t)%t,po=(r,t,e)=>(1-e)*r+e*t,Rg=r=>{let t=r*(180/Math.PI);return t<0&&(t+=360),t>360&&(t-=360),t},he={transparent:"rgba(1, 1, 1, 0)",green:"#45b787",darkGreen:"#314a43",blue:"#6e9bc5",darkBlue:"#2775b6",red:"#F26666",darkRed:"#D95970",brown:"#ECD2B9",darkBrown:"#BF9D8A",yellow:"#ECDEC0",darkYellow:"#D0AC57",lightGray:"#e0e0e0",gray:"#beb6b6",darkGray:"#918883",white:"#F2F2F2",darkWhite:"#ececec",lightBlack:"#2E3032",black:"#182327",blackAlpha5:"rgba(0, 0, 0, 0.5)"},Lg={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Mr={h:0,s:0,l:0},Ha={h:0,s:0,l:0};function go(r,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?r+(t-r)*6*e:e<1/2?t:e<2/3?r+(t-r)*6*(2/3-e):r}const Pg=/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3}|[A-Fa-f0-9]{8})$|rgb\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*\)|rgba\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*,\s*[\d.]+\s*\)/;class Wt{isColor=!0;r=1;g=1;b=1;a=1;constructor(t,e,n,a){return e===void 0&&n===void 0?this.set(t):this.setRGBA(t,e,n,a)}static isColor(t){return typeof t=="string"?Pg.test(t):typeof t=="number"?t>=0&&t<=16777215:!1}static getRandomStyle(){return di.random().getStyle()}static getDarken(t,e=.8){return di.set(t).getHSL(qa),di.setHSL(qa.h,qa.s,qa.l*e).getStyle()}static getLighten(t,e=1.2){return this.getDarken(t,e)}static getContrast(t){return di.set(t),di.getContrastString()}static getArray(t){return di.set(t).toArray()}static getComplementary(t){return di.set(t),di.getComplementaryString()}static getMoreTransparent(t,e){return di.set(t).setA(e).getStyle()}set(t){return t&&t.isColor?this.copy(t):typeof t=="number"?this.setHex(t):typeof t=="string"&&this.setStyle(t),this}random(){return this.setHex(Math.floor(Math.random()*(1<<24)))}setScalar(t){return this.r=t,this.g=t,this.b=t,this.a=1,this}setHex(t){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(t&255)/255,this.a=1,this}setR(t){return this.r=t,this}setG(t){return this.g=t,this}setB(t){return this.b=t,this}setA(t){return this.a=t,this}setRGB(t,e,n){return this.setRGBA(t,e,n,this.a)}setRGBA(t,e,n,a=1){return this.r=t,this.g=e,this.b=n,this.a=a,this}setHSL(t,e,n,a=1){if(t=Ig(t,1),e=Hs(e,0,1),n=Hs(n,0,1),e===0)this.r=this.g=this.b=n;else{const u=n<=.5?n*(1+e):n+e-n*e,l=2*n-u;this.r=go(l,u,t+1/3),this.g=go(l,u,t),this.b=go(l,u,t-1/3)}return this.a=a,this}setStyle(t){let e;if(e=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(t)){let n;const a=e[1],u=e[2];switch(a){case"rgb":case"rgba":if(n=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(u))return this.r=Math.min(255,parseInt(n[1],10))/255,this.g=Math.min(255,parseInt(n[2],10))/255,this.b=Math.min(255,parseInt(n[3],10))/255,this.a=Math.max(Math.min(1,n[4]!==void 0?parseFloat(n[4]):1),0),this;if(n=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(u))return this.r=Math.min(100,parseInt(n[1],10))/100,this.g=Math.min(100,parseInt(n[2],10))/100,this.b=Math.min(100,parseInt(n[3],10))/100,this.a=Math.max(Math.min(1,n[4]!==void 0?parseFloat(n[4]):1),0),this;break;case"hsl":case"hsla":if(n=/^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(u)){const l=parseFloat(n[1])/360,c=parseInt(n[2],10)/100,f=parseInt(n[3],10)/100,d=Math.max(Math.min(1,n[4]!==void 0?parseFloat(n[4]):1),0);return this.setHSL(l,c,f,d)}break}}else if(e=/^\#([A-Fa-f\d]+)$/.exec(t)){const n=e[1],a=n.length;if(a===3)return this.r=parseInt(n.charAt(0)+n.charAt(0),16)/255,this.g=parseInt(n.charAt(1)+n.charAt(1),16)/255,this.b=parseInt(n.charAt(2)+n.charAt(2),16)/255,this.a=1,this;if(a===6)return this.r=parseInt(n.charAt(0)+n.charAt(1),16)/255,this.g=parseInt(n.charAt(2)+n.charAt(3),16)/255,this.b=parseInt(n.charAt(4)+n.charAt(5),16)/255,this.a=1,this}return t&&t.length>0?this.setColorName(t):this}setColorName(t){const e=Lg[t.toLowerCase()];return e!==void 0?this.setHex(e):console.warn("Color: Unknown color "+t),this}clone(){return new Wt(this.r,this.g,this.b,this.a)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this}getRGB(t=new Wt){return t.setRGB(this.r,this.g,this.b)}getRGBByBg(t=new Wt){const e=this.a,n=e*this.r+(1-e)*t.r,a=e*this.g+(1-e)*t.g,u=e*this.b+(1-e)*t.b;return new Wt(n,a,u)}getHex(){return Hs(this.r*255,0,255)<<16^Hs(this.g*255,0,255)<<8^Hs(this.b*255,0,255)<<0}getHSL(t){const e=this.r,n=this.g,a=this.b,u=Math.max(e,n,a),l=Math.min(e,n,a);let c=0,f;const d=(l+u)/2;if(l===u)c=0,f=0;else{const y=u-l;switch(f=d<=.5?y/(u+l):y/(2-u-l),u){case e:c=(n-a)/y+(n<a?6:0);break;case n:c=(a-e)/y+2;break;case a:c=(e-n)/y+4;break}c/=6}return t.h=c,t.s=f,t.l=d,t}getStyle(){return this.a===1?`rgb(${this.r*255|0},${this.g*255|0},${this.b*255|0})`:`rgba(${this.r*255|0},${this.g*255|0},${this.b*255|0},${this.a||1})`}getHexString(){return"#"+("000000"+this.getHex().toString(16)).slice(-6)}getBrightness(){let t=(this.r*255*299+this.g*255*587+this.b*255*144)/1e3;return t+=(255-t)*(255-this.a*255)/255,t}getContrastString(){return this.getBrightness()>125?"#2f2f2f":"#f2f2f2"}getComplementary(t=new Wt){const e=this.toArray(),n=[0,0,0,1];for(let a=0;a<e.length;a++)if(a<3)n[a]=1-e[a];else if(a===3)e[a]>1||e[a]<=0?n[a]=1:n[a]=Math.max(Math.min(parseFloat(e[a].toFixed(2)),1),0);else continue;return t.setRGBA(n[0],n[1],n[2],parseFloat(n[3].toFixed(2)))}getComplementaryString(){return this.getComplementary().getStyle()}getLightenOrDarken(t){if(typeof t>"u"||t>=1)return this.getHexString();const e=this.getRGBByBg(),n=e.r*t+(1-t),a=e.g*t+(1-t),u=e.b*t+(1-t);return new Wt(n,a,u).getHexString()}getNormalized(){return[parseFloat(Math.max(Math.min(this.r,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.g,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.b,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.a,1),0).toFixed(2))]}getNormalized3(){return[parseFloat(Math.max(Math.min(this.r,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.g,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.b,1),0).toFixed(2))]}offsetHSL(t,e,n){return this.getHSL(Mr),Mr.h+=t,Mr.s+=e,Mr.l+=n,this.setHSL(Mr.h,Mr.s,Mr.l),this}add(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this}addColors(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this}addScalar(t){return this.r+=t,this.g+=t,this.b+=t,this}sub(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),this}multiply(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this}multiplyScalar(t){return this.r*=t,this.g*=t,this.b*=t,this}lerp(t,e){return this.r+=(t.r-this.r)*e,this.g+=(t.g-this.g)*e,this.b+=(t.b-this.b)*e,this}lerpColors(t,e,n){return this.r=t.r+(e.r-t.r)*n,this.g=t.g+(e.g-t.g)*n,this.b=t.b+(e.b-t.b)*n,this}lerpHSL(t,e){this.getHSL(Mr),t.getHSL(Ha);const n=po(Mr.h,Ha.h,e),a=po(Mr.s,Ha.s,e),u=po(Mr.l,Ha.l,e);return this.setHSL(n,a,u),this}equals(t){return t.r===this.r&&t.g===this.g&&t.b===this.b}fromArray(t,e=0){return this.r=t[e],this.g=t[e+1],this.b=t[e+2],this.a=t[e+3],this}toArray(t=[0,0,0,0],e=0){return t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t[e+3]=this.a,t}fromBufferAttribute(t,e){return this.r=t.getX(e),this.g=t.getY(e),this.b=t.getZ(e),t.normalized===!0&&(this.r/=255,this.g/=255,this.b/=255),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const di=new Wt,qa={h:0,s:0,l:0};class Y{isVector2=!0;x=0;y=0;z;constructor(t=0,e=0,n){this.x=t,this.y=e,this.z=n||0}static isZero(t){return t.x===0&&t.y===0}static isEmpty(t){return!Number.isFinite(t.x)&&!Number.isFinite(t.y)}static equals(t,e,n=!0){return n?t.x===e.x&&t.y===e.y:Math.abs(t.x-e.x)<Number.EPSILON&&Math.abs(t.y-e.y)<Number.EPSILON}static getInt32Array(t,e=2){const n=new ArrayBuffer(t.length*e*4),a=new Int32Array(n);for(let u=0,l=t.length;u<l;u++)a[u*2]=t[u].x,a[u*2+1]=t[u].y;return a}static getFloat64Array(t,e=2){const n=new ArrayBuffer(t.length*e*8),a=new Float64Array(n);for(let u=0,l=t.length;u<l;u++)a[u*2]=t[u].x,a[u*2+1]=t[u].y;return a}static getVectors(t){const e=[];for(let n=0,a=t.length;n<a;n++)e.push(new Y(t[n].x,t[n].y));return e}static getStrings(t){const e=[];if(!t||!t.length)return"";for(let n=0,a=t.length;n<a;n++)e.push(Y.getString(t[n]));return e.join(",")}static getString(t){return`${t.x},${t.y}`}static getLength(t){return Math.sqrt(t.x*t.x+t.y*t.y)}static getDistance(t,e){return Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y))}static dot(t,e){return t.x*e.x+t.y*e.y}static cross(t,e){return t.x*e.y-t.y*e.x}static sub(t,e){return new Y().subVectors(t,e)}static isPointOnSegment(t,e,n){return ac(this.sub(t,n).cross(this.sub(e,n)))===0&&ac(this.sub(t,n).dot(this.sub(e,n)))<=0}static angle(t,e,n){return n?Math.atan2(t.y-e.y,t.x-e.x):Rg(Math.atan2(t.y-e.y,t.x-e.x))}static getSamplingPoints(t,e=100){let n=this.getClothoidPoints(t,e),a=0;for(let u=0,l=n.length;u<l;u++){let c=Math.max(0,u-1);u>0?a+=this.getDistance(n[c],n[c+1]):a=0,n[u].l=Math.round(a);let f=this.angle(n[c+1],n[c]);n[u].a=Math.round(f*100)/100}return n}static getClothoidPoints(t,e=100){let n=[],a=t.concat([]);if(!a||a.length<2)return n;a.length===2?(a.push(a[1]),a.unshift(a[0])):a.length===3&&a.splice(2,0,a[1]);for(let u=0;u<a.length-3;u+=3){let l=new Y(a[u].x,a[u].y),c=new Y(a[u+1].x,a[u+1].y),f=new Y(a[u+2].x,a[u+2].y),d=new Y(a[u+3].x,a[u+3].y),y=0;y+=l.distanceTo(c),y+=c.distanceTo(f),y+=f.distanceTo(d);let A=Math.min(.5,1/(y/e));for(let _=A;_<1;_+=A){let C=3*(c.x-l.x),F=3*(f.x-c.x)-C,N=d.x-l.x-C-F,M=3*(c.y-l.y),R=3*(f.y-c.y)-M,q=d.y-l.y-M-R,z=N*Math.pow(_,3)+F*Math.pow(_,2)+C*_+l.x,w=q*Math.pow(_,3)+R*Math.pow(_,2)+M*_+l.y;n.push({x:Math.round(z),y:Math.round(w),a:0,l:0})}}return n.unshift({x:a[0].x,y:a[0].y,a:0,l:0}),n.push({x:a[a.length-1].x,y:a[a.length-1].y,a:0,l:0}),n}static getClothoidLength(t){let e=0;if(t.length>2)for(let n=0;n<t.length;n++){let a=Math.max(0,n-1);n>0&&(e+=this.getDistance(t[a],t[a+1]))}return e}static getCircleCenterByChord(t,e,n,a=!0,u=new Y){const l=this.getDistance(t,e);if(l===0)return u.x=1/0,u.y=1/0,u;yo.set((t.x+e.x)/2,(t.y+e.y)/2);const c=Math.sqrt(n*n-l*l/4),f=a?-1:1;return u.x=yo.x+f*c*(e.y-t.y)/l,u.y=yo.y-f*c*(e.x-t.x)/l,u}static isPointInCircle(t,e,n){return this.getDistance(n,t)<e}static isPointInPolygonByRay(t,e){let n=0;const a=new Y().copy(t),u=new Y,l=new Y;for(let c=0;c<e.length;c++){c===e.length-1?(u.copy(e[c]),l.copy(e[0])):(u.copy(e[c]),l.copy(e[c+1]));let f=[u.y,l.y].sort((d,y)=>d-y);f[0]<a.y&&f[1]>a.y&&(u.x<a.x||l.x<a.x)&&n++}return n%2===1}static whichSideOfSegment(t,e,n){return(e.x-t.x)*(n.y-t.y)-(n.x-t.x)*(e.y-t.y)}static getIntersectionOfSegments(t,e,n,a,u=!1,l=new Y){const c=(a.y-n.y)*(e.x-t.x)-(a.x-n.x)*(e.y-t.y);if(c===0)return l.makeEmpty();const f=(a.x-n.x)*(t.y-n.y)-(a.y-n.y)*(t.x-n.x),d=(e.x-t.x)*(t.y-n.y)-(e.y-t.y)*(t.x-n.x),y=f/c,A=d/c;return u&&(y<0||y>1||A<0||A>1)?l.makeEmpty():(l.x=t.x+y*(e.x-t.x),l.y=t.y+y*(e.y-t.y),l)}static getConvexHullByGrahamScan(t,e=!1,n=[]){if(!t||!t.length)return n;const a=t.length;let u=0;for(let f=0;f<a;f++)t[f].x<t[u].x&&(u=f);let l=u,c;do{n.push(t[l]),c=(l+1)%a;for(let f=0;f<a;f++)this.whichSideOfSegment(t[l],t[f],t[c])>0&&(c=f);l=c}while(l!==u);return e&&n.push(t[u]),n}static getPointsWithMatrix3(t,e){const n=[];if(!t)return n;for(let a=0,u=t.length;a<u;a++)n.push({x:e.elements[0]*t[a].x+e.elements[3]*t[a].y+e.elements[6],y:e.elements[1]*t[a].x+e.elements[4]*t[a].y+e.elements[7]});return n}static getPointsApplyMatrix3(t,e=[]){for(let n=0,a=e.length;n<a;n++){const u=t.elements[0]*e[n].x+t.elements[3]*e[n].y+t.elements[6],l=t.elements[1]*e[n].x+t.elements[4]*e[n].y+t.elements[7];e[n].x=u,e[n].y=l}return e}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}applyMatrix3(t){const e=this.x,n=this.y,a=t.elements;return this.x=a[0]*e+a[3]*n+a[6],this.y=a[1]*e+a[4]*n+a[7],this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}ceilToZero(){return this.x=this.x<0?Math.floor(this.x):Math.ceil(this.x),this.y=this.y<0?Math.floor(this.y):Math.ceil(this.y),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this}clone(){return new Y(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}cross(t){return this.x*t.y-this.y*t.x}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,n=this.y-t.y;return e*e+n*n}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}dot(t){return this.x*t.x+this.y*t.y}equals(t,e=!0){return e?t.x===this.x&&t.y===this.y:Math.abs(t.x-this.x)<Number.EPSILON&&Math.abs(t.y-this.y)<Number.EPSILON}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}floorToZero(){return this.roundToZero()}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("out of range: "+t)}}identity(){return this.set(0,0)}isEmpty(){return!Number.isFinite(this.x)&&!Number.isFinite(this.y)}isZero(){return this.x===0&&this.y===0}length(){return Math.sqrt(this.dot(this))}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this}makeEmpty(){return this.x=1/0,this.y=1/0,this}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}maxXY(t,e){return this.x=Math.max(this.x,t),this.y=Math.max(this.y,e),this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}minXY(t,e){return this.x=Math.min(this.x,t),this.y=Math.min(this.y,e),this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t,e){return this.x*=t,this.y*=e||t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this}negate(){return this.x=-this.x,this.y=-this.y,this}normalize(){return this.divideScalar(this.length()||1)}project(t){return this.applyMatrix3(t.matrixWorldInverse).applyMatrix3(t.projectionMatrix)}random(){return this.x=Math.random(),this.y=Math.random(),this}rotate(t){const e=Math.cos(t),n=Math.sin(t),a=this.x,u=this.y;return this.x=a*e-u*n,this.y=a*n+u*e,this}rotateAround(t,e){const n=Math.cos(e),a=Math.sin(e),u=this.x-t.x,l=this.y-t.y;return this.x=u*n-l*a+t.x,this.y=u*a+l*n+t.y,this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}set(t,e){return this.x=t,this.y=e,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("out of range: "+t)}return this}setFromMatrixColumn(t,e){return this.fromArray(t.elements,e*3)}setLength(t){return this.normalize().multiplyScalar(t)}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}toString(){return`{"x":${this.x},"y":${this.y}}`}unproject(t,e=!1){return this.applyMatrix3(t.projectionMatrixInverse).applyMatrix3(t.matrixWorld)}validate(){return!(isNaN(this.x)||isNaN(this.y))}*[Symbol.iterator](){yield this.x,yield this.y}}const yo=new Y,Fg=Object.freeze(Object.defineProperty({__proto__:null,default:Y},Symbol.toStringTag,{value:"Module"}));var Wa={exports:{}};/**
|
|
6
6
|
* @license
|
|
7
7
|
* Lodash <https://lodash.com/>
|
|
8
8
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
9
9
|
* Released under MIT license <https://lodash.com/license>
|
|
10
10
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
11
11
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
12
|
-
*/Wa.exports,function(r,t){(function(){var e,n="4.17.21",a=200,u="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",l="Expected a function",c="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",d=500,y="__lodash_placeholder__",A=1,_=2,C=4,F=1,N=2,M=1,R=2,q=4,z=8,w=16,L=32,k=64,j=128,tt=256,Z=512,rt=30,J="...",st=800,ht=16,ct=1,ft=2,O=3,yt=1/0,Bt=9007199254740991,Re=17976931348623157e292,be=NaN,se=4294967295,ve=se-1,qr=se>>>1,Le=[["ary",j],["bind",M],["bindKey",R],["curry",z],["curryRight",w],["flip",Z],["partial",L],["partialRight",k],["rearg",tt]],ae="[object Arguments]",Se="[object Array]",Vt="[object AsyncFunction]",Gt="[object Boolean]",Ct="[object Date]",Ht="[object DOMException]",Oe="[object Error]",Pe="[object Function]",ze="[object GeneratorFunction]",Qt="[object Map]",Ne="[object Number]",me="[object Null]",Yt="[object Object]",ii="[object Promise]",Ai="[object Proxy]",ue="[object RegExp]",Dt="[object Set]",nr="[object String]",Ge="[object Symbol]",bi="[object Undefined]",mr="[object WeakMap]",Gi="[object WeakSet]",sr="[object ArrayBuffer]",Ye="[object DataView]",Yi="[object Float32Array]",Xi="[object Float64Array]",ni="[object Int8Array]",wi="[object Int16Array]",bn="[object Int32Array]",P="[object Uint8Array]",it="[object Uint8ClampedArray]",at="[object Uint16Array]",wt="[object Uint32Array]",vt=/\b__p \+= '';/g,fe=/\b(__p \+=) '' \+/g,Me=/(__e\(.*?\)|\b__t\)) \+\n'';/g,xr=/&(?:amp|lt|gt|quot|#39);/g,Zi=/[&<>"']/g,ar=RegExp(xr.source),wn=RegExp(Zi.source),Qi=/<%-([\s\S]+?)%>/g,si=/<%([\s\S]+?)%>/g,Tn=/<%=([\s\S]+?)%>/g,_n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ji=/^\w*$/,el=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ki=/[\\^$.*+?()[\]{}|]/g,rl=RegExp(Ki.source),la=/^\s+/,su=/\s/,ha=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,il=/\{\n\/\* \[wrapped with (.+)\] \*/,au=/,? & /,nl=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,uu=/[()=,{}\[\]\/\s]/,ou=/\\(\\)?/g,lu=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ca=/\w*$/,fa=/^[-+]0x[0-9a-f]+$/i,Ti=/^0b[01]+$/i,Cn=/^\[object .+?Constructor\]$/,Dn=/^0o[0-7]+$/i,os=/^(?:0|[1-9]\d*)$/,pa=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ls=/($^)/,sl=/['\n\r\u2028\u2029\\]/g,_i="\\ud800-\\udfff",Xe="\\u0300-\\u036f",Ji="\\ufe20-\\ufe2f",ai="\\u20d0-\\u20ff",Er=Xe+Ji+ai,tn="\\u2700-\\u27bf",ur="a-z\\xdf-\\xf6\\xf8-\\xff",Wr="\\xac\\xb1\\xd7\\xf7",hu="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",cu="\\u2000-\\u206f",hs=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ze="A-Z\\xc0-\\xd6\\xd8-\\xde",Sn="\\ufe0e\\ufe0f",cs=Wr+hu+cu+hs,On="['’]",da="["+_i+"]",fs="["+cs+"]",Ci="["+Er+"]",Vr="\\d+",al="["+tn+"]",ga="["+ur+"]",ps="[^"+_i+cs+Vr+tn+ur+Ze+"]",ds="\\ud83c[\\udffb-\\udfff]",ul="(?:"+Ci+"|"+ds+")",fu="[^"+_i+"]",g="(?:\\ud83c[\\udde6-\\uddff]){2}",x="[\\ud800-\\udbff][\\udc00-\\udfff]",b="["+Ze+"]",B="\\u200d",G="(?:"+ga+"|"+ps+")",K="(?:"+b+"|"+ps+")",mt="(?:"+On+"(?:d|ll|m|re|s|t|ve))?",Jt="(?:"+On+"(?:D|LL|M|RE|S|T|VE))?",oe=ul+"?",xe="["+Sn+"]?",Ar="(?:"+B+"(?:"+[fu,g,x].join("|")+")"+xe+oe+")*",dv="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",gv="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",$f=xe+oe+Ar,yv="(?:"+[al,g,x].join("|")+")"+$f,vv="(?:"+[fu+Ci+"?",Ci,g,x,da].join("|")+")",mv=RegExp(On,"g"),xv=RegExp(Ci,"g"),ol=RegExp(ds+"(?="+ds+")|"+vv+$f,"g"),Ev=RegExp([b+"?"+ga+"+"+mt+"(?="+[fs,b,"$"].join("|")+")",K+"+"+Jt+"(?="+[fs,b+G,"$"].join("|")+")",b+"?"+G+"+"+mt,b+"+"+Jt,gv,dv,Vr,yv].join("|"),"g"),Av=RegExp("["+B+_i+Er+Sn+"]"),bv=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,wv=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Tv=-1,qt={};qt[Yi]=qt[Xi]=qt[ni]=qt[wi]=qt[bn]=qt[P]=qt[it]=qt[at]=qt[wt]=!0,qt[ae]=qt[Se]=qt[sr]=qt[Gt]=qt[Ye]=qt[Ct]=qt[Oe]=qt[Pe]=qt[Qt]=qt[Ne]=qt[Yt]=qt[ue]=qt[Dt]=qt[nr]=qt[mr]=!1;var kt={};kt[ae]=kt[Se]=kt[sr]=kt[Ye]=kt[Gt]=kt[Ct]=kt[Yi]=kt[Xi]=kt[ni]=kt[wi]=kt[bn]=kt[Qt]=kt[Ne]=kt[Yt]=kt[ue]=kt[Dt]=kt[nr]=kt[Ge]=kt[P]=kt[it]=kt[at]=kt[wt]=!0,kt[Oe]=kt[Pe]=kt[mr]=!1;var _v={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Cv={"&":"&","<":"<",">":">",'"':""","'":"'"},Dv={"&":"&","<":"<",">":">",""":'"',"'":"'"},Sv={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ov=parseFloat,Nv=parseInt,zf=typeof Os=="object"&&Os&&Os.Object===Object&&Os,Mv=typeof self=="object"&&self&&self.Object===Object&&self,we=zf||Mv||Function("return this")(),ll=t&&!t.nodeType&&t,Nn=ll&&!0&&r&&!r.nodeType&&r,Gf=Nn&&Nn.exports===ll,hl=Gf&&zf.process,br=function(){try{var D=Nn&&Nn.require&&Nn.require("util").types;return D||hl&&hl.binding&&hl.binding("util")}catch{}}(),Yf=br&&br.isArrayBuffer,Xf=br&&br.isDate,Zf=br&&br.isMap,Qf=br&&br.isRegExp,jf=br&&br.isSet,Kf=br&&br.isTypedArray;function or(D,U,I){switch(I.length){case 0:return D.call(U);case 1:return D.call(U,I[0]);case 2:return D.call(U,I[0],I[1]);case 3:return D.call(U,I[0],I[1],I[2])}return D.apply(U,I)}function Bv(D,U,I,et){for(var pt=-1,Nt=D==null?0:D.length;++pt<Nt;){var pe=D[pt];U(et,pe,I(pe),D)}return et}function wr(D,U){for(var I=-1,et=D==null?0:D.length;++I<et&&U(D[I],I,D)!==!1;);return D}function Iv(D,U){for(var I=D==null?0:D.length;I--&&U(D[I],I,D)!==!1;);return D}function Jf(D,U){for(var I=-1,et=D==null?0:D.length;++I<et;)if(!U(D[I],I,D))return!1;return!0}function en(D,U){for(var I=-1,et=D==null?0:D.length,pt=0,Nt=[];++I<et;){var pe=D[I];U(pe,I,D)&&(Nt[pt++]=pe)}return Nt}function pu(D,U){var I=D==null?0:D.length;return!!I&&gs(D,U,0)>-1}function cl(D,U,I){for(var et=-1,pt=D==null?0:D.length;++et<pt;)if(I(U,D[et]))return!0;return!1}function $t(D,U){for(var I=-1,et=D==null?0:D.length,pt=Array(et);++I<et;)pt[I]=U(D[I],I,D);return pt}function rn(D,U){for(var I=-1,et=U.length,pt=D.length;++I<et;)D[pt+I]=U[I];return D}function fl(D,U,I,et){var pt=-1,Nt=D==null?0:D.length;for(et&&Nt&&(I=D[++pt]);++pt<Nt;)I=U(I,D[pt],pt,D);return I}function Rv(D,U,I,et){var pt=D==null?0:D.length;for(et&&pt&&(I=D[--pt]);pt--;)I=U(I,D[pt],pt,D);return I}function pl(D,U){for(var I=-1,et=D==null?0:D.length;++I<et;)if(U(D[I],I,D))return!0;return!1}var Lv=dl("length");function Pv(D){return D.split("")}function Fv(D){return D.match(nl)||[]}function tp(D,U,I){var et;return I(D,function(pt,Nt,pe){if(U(pt,Nt,pe))return et=Nt,!1}),et}function du(D,U,I,et){for(var pt=D.length,Nt=I+(et?1:-1);et?Nt--:++Nt<pt;)if(U(D[Nt],Nt,D))return Nt;return-1}function gs(D,U,I){return U===U?Zv(D,U,I):du(D,ep,I)}function Uv(D,U,I,et){for(var pt=I-1,Nt=D.length;++pt<Nt;)if(et(D[pt],U))return pt;return-1}function ep(D){return D!==D}function rp(D,U){var I=D==null?0:D.length;return I?yl(D,U)/I:be}function dl(D){return function(U){return U==null?e:U[D]}}function gl(D){return function(U){return D==null?e:D[U]}}function ip(D,U,I,et,pt){return pt(D,function(Nt,pe,Ut){I=et?(et=!1,Nt):U(I,Nt,pe,Ut)}),I}function kv(D,U){var I=D.length;for(D.sort(U);I--;)D[I]=D[I].value;return D}function yl(D,U){for(var I,et=-1,pt=D.length;++et<pt;){var Nt=U(D[et]);Nt!==e&&(I=I===e?Nt:I+Nt)}return I}function vl(D,U){for(var I=-1,et=Array(D);++I<D;)et[I]=U(I);return et}function Hv(D,U){return $t(U,function(I){return[I,D[I]]})}function np(D){return D&&D.slice(0,op(D)+1).replace(la,"")}function lr(D){return function(U){return D(U)}}function ml(D,U){return $t(U,function(I){return D[I]})}function ya(D,U){return D.has(U)}function sp(D,U){for(var I=-1,et=D.length;++I<et&&gs(U,D[I],0)>-1;);return I}function ap(D,U){for(var I=D.length;I--&&gs(U,D[I],0)>-1;);return I}function qv(D,U){for(var I=D.length,et=0;I--;)D[I]===U&&++et;return et}var Wv=gl(_v),Vv=gl(Cv);function $v(D){return"\\"+Sv[D]}function zv(D,U){return D==null?e:D[U]}function ys(D){return Av.test(D)}function Gv(D){return bv.test(D)}function Yv(D){for(var U,I=[];!(U=D.next()).done;)I.push(U.value);return I}function xl(D){var U=-1,I=Array(D.size);return D.forEach(function(et,pt){I[++U]=[pt,et]}),I}function up(D,U){return function(I){return D(U(I))}}function nn(D,U){for(var I=-1,et=D.length,pt=0,Nt=[];++I<et;){var pe=D[I];(pe===U||pe===y)&&(D[I]=y,Nt[pt++]=I)}return Nt}function gu(D){var U=-1,I=Array(D.size);return D.forEach(function(et){I[++U]=et}),I}function Xv(D){var U=-1,I=Array(D.size);return D.forEach(function(et){I[++U]=[et,et]}),I}function Zv(D,U,I){for(var et=I-1,pt=D.length;++et<pt;)if(D[et]===U)return et;return-1}function Qv(D,U,I){for(var et=I+1;et--;)if(D[et]===U)return et;return et}function vs(D){return ys(D)?Kv(D):Lv(D)}function $r(D){return ys(D)?Jv(D):Pv(D)}function op(D){for(var U=D.length;U--&&su.test(D.charAt(U)););return U}var jv=gl(Dv);function Kv(D){for(var U=ol.lastIndex=0;ol.test(D);)++U;return U}function Jv(D){return D.match(ol)||[]}function tm(D){return D.match(Ev)||[]}var em=function D(U){U=U==null?we:ms.defaults(we.Object(),U,ms.pick(we,wv));var I=U.Array,et=U.Date,pt=U.Error,Nt=U.Function,pe=U.Math,Ut=U.Object,El=U.RegExp,rm=U.String,Tr=U.TypeError,yu=I.prototype,im=Nt.prototype,xs=Ut.prototype,vu=U["__core-js_shared__"],mu=im.toString,Lt=xs.hasOwnProperty,nm=0,lp=function(){var i=/[^.]+$/.exec(vu&&vu.keys&&vu.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}(),xu=xs.toString,sm=mu.call(Ut),am=we._,um=El("^"+mu.call(Lt).replace(Ki,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Eu=Gf?U.Buffer:e,sn=U.Symbol,Au=U.Uint8Array,hp=Eu?Eu.allocUnsafe:e,bu=up(Ut.getPrototypeOf,Ut),cp=Ut.create,fp=xs.propertyIsEnumerable,wu=yu.splice,pp=sn?sn.isConcatSpreadable:e,va=sn?sn.iterator:e,Mn=sn?sn.toStringTag:e,Tu=function(){try{var i=Pn(Ut,"defineProperty");return i({},"",{}),i}catch{}}(),om=U.clearTimeout!==we.clearTimeout&&U.clearTimeout,lm=et&&et.now!==we.Date.now&&et.now,hm=U.setTimeout!==we.setTimeout&&U.setTimeout,_u=pe.ceil,Cu=pe.floor,Al=Ut.getOwnPropertySymbols,cm=Eu?Eu.isBuffer:e,dp=U.isFinite,fm=yu.join,pm=up(Ut.keys,Ut),de=pe.max,Be=pe.min,dm=et.now,gm=U.parseInt,gp=pe.random,ym=yu.reverse,bl=Pn(U,"DataView"),ma=Pn(U,"Map"),wl=Pn(U,"Promise"),Es=Pn(U,"Set"),xa=Pn(U,"WeakMap"),Ea=Pn(Ut,"create"),Du=xa&&new xa,As={},vm=Fn(bl),mm=Fn(ma),xm=Fn(wl),Em=Fn(Es),Am=Fn(xa),Su=sn?sn.prototype:e,Aa=Su?Su.valueOf:e,yp=Su?Su.toString:e;function v(i){if(jt(i)&&!dt(i)&&!(i instanceof bt)){if(i instanceof _r)return i;if(Lt.call(i,"__wrapped__"))return vd(i)}return new _r(i)}var bs=function(){function i(){}return function(s){if(!Xt(s))return{};if(cp)return cp(s);i.prototype=s;var o=new i;return i.prototype=e,o}}();function Ou(){}function _r(i,s){this.__wrapped__=i,this.__actions__=[],this.__chain__=!!s,this.__index__=0,this.__values__=e}v.templateSettings={escape:Qi,evaluate:si,interpolate:Tn,variable:"",imports:{_:v}},v.prototype=Ou.prototype,v.prototype.constructor=v,_r.prototype=bs(Ou.prototype),_r.prototype.constructor=_r;function bt(i){this.__wrapped__=i,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=se,this.__views__=[]}function bm(){var i=new bt(this.__wrapped__);return i.__actions__=Qe(this.__actions__),i.__dir__=this.__dir__,i.__filtered__=this.__filtered__,i.__iteratees__=Qe(this.__iteratees__),i.__takeCount__=this.__takeCount__,i.__views__=Qe(this.__views__),i}function wm(){if(this.__filtered__){var i=new bt(this);i.__dir__=-1,i.__filtered__=!0}else i=this.clone(),i.__dir__*=-1;return i}function Tm(){var i=this.__wrapped__.value(),s=this.__dir__,o=dt(i),h=s<0,p=o?i.length:0,m=P1(0,p,this.__views__),E=m.start,T=m.end,S=T-E,W=h?T:E-1,V=this.__iteratees__,$=V.length,Q=0,nt=Be(S,this.__takeCount__);if(!o||!h&&p==S&&nt==S)return Hp(i,this.__actions__);var ot=[];t:for(;S--&&Q<nt;){W+=s;for(var xt=-1,lt=i[W];++xt<$;){var At=V[xt],Tt=At.iteratee,fr=At.type,ke=Tt(lt);if(fr==ft)lt=ke;else if(!ke){if(fr==ct)continue t;break t}}ot[Q++]=lt}return ot}bt.prototype=bs(Ou.prototype),bt.prototype.constructor=bt;function Bn(i){var s=-1,o=i==null?0:i.length;for(this.clear();++s<o;){var h=i[s];this.set(h[0],h[1])}}function _m(){this.__data__=Ea?Ea(null):{},this.size=0}function Cm(i){var s=this.has(i)&&delete this.__data__[i];return this.size-=s?1:0,s}function Dm(i){var s=this.__data__;if(Ea){var o=s[i];return o===f?e:o}return Lt.call(s,i)?s[i]:e}function Sm(i){var s=this.__data__;return Ea?s[i]!==e:Lt.call(s,i)}function Om(i,s){var o=this.__data__;return this.size+=this.has(i)?0:1,o[i]=Ea&&s===e?f:s,this}Bn.prototype.clear=_m,Bn.prototype.delete=Cm,Bn.prototype.get=Dm,Bn.prototype.has=Sm,Bn.prototype.set=Om;function Di(i){var s=-1,o=i==null?0:i.length;for(this.clear();++s<o;){var h=i[s];this.set(h[0],h[1])}}function Nm(){this.__data__=[],this.size=0}function Mm(i){var s=this.__data__,o=Nu(s,i);if(o<0)return!1;var h=s.length-1;return o==h?s.pop():wu.call(s,o,1),--this.size,!0}function Bm(i){var s=this.__data__,o=Nu(s,i);return o<0?e:s[o][1]}function Im(i){return Nu(this.__data__,i)>-1}function Rm(i,s){var o=this.__data__,h=Nu(o,i);return h<0?(++this.size,o.push([i,s])):o[h][1]=s,this}Di.prototype.clear=Nm,Di.prototype.delete=Mm,Di.prototype.get=Bm,Di.prototype.has=Im,Di.prototype.set=Rm;function Si(i){var s=-1,o=i==null?0:i.length;for(this.clear();++s<o;){var h=i[s];this.set(h[0],h[1])}}function Lm(){this.size=0,this.__data__={hash:new Bn,map:new(ma||Di),string:new Bn}}function Pm(i){var s=Wu(this,i).delete(i);return this.size-=s?1:0,s}function Fm(i){return Wu(this,i).get(i)}function Um(i){return Wu(this,i).has(i)}function km(i,s){var o=Wu(this,i),h=o.size;return o.set(i,s),this.size+=o.size==h?0:1,this}Si.prototype.clear=Lm,Si.prototype.delete=Pm,Si.prototype.get=Fm,Si.prototype.has=Um,Si.prototype.set=km;function In(i){var s=-1,o=i==null?0:i.length;for(this.__data__=new Si;++s<o;)this.add(i[s])}function Hm(i){return this.__data__.set(i,f),this}function qm(i){return this.__data__.has(i)}In.prototype.add=In.prototype.push=Hm,In.prototype.has=qm;function zr(i){var s=this.__data__=new Di(i);this.size=s.size}function Wm(){this.__data__=new Di,this.size=0}function Vm(i){var s=this.__data__,o=s.delete(i);return this.size=s.size,o}function $m(i){return this.__data__.get(i)}function zm(i){return this.__data__.has(i)}function Gm(i,s){var o=this.__data__;if(o instanceof Di){var h=o.__data__;if(!ma||h.length<a-1)return h.push([i,s]),this.size=++o.size,this;o=this.__data__=new Si(h)}return o.set(i,s),this.size=o.size,this}zr.prototype.clear=Wm,zr.prototype.delete=Vm,zr.prototype.get=$m,zr.prototype.has=zm,zr.prototype.set=Gm;function vp(i,s){var o=dt(i),h=!o&&Un(i),p=!o&&!h&&hn(i),m=!o&&!h&&!p&&Cs(i),E=o||h||p||m,T=E?vl(i.length,rm):[],S=T.length;for(var W in i)(s||Lt.call(i,W))&&!(E&&(W=="length"||p&&(W=="offset"||W=="parent")||m&&(W=="buffer"||W=="byteLength"||W=="byteOffset")||Bi(W,S)))&&T.push(W);return T}function mp(i){var s=i.length;return s?i[Rl(0,s-1)]:e}function Ym(i,s){return Vu(Qe(i),Rn(s,0,i.length))}function Xm(i){return Vu(Qe(i))}function Tl(i,s,o){(o!==e&&!Gr(i[s],o)||o===e&&!(s in i))&&Oi(i,s,o)}function ba(i,s,o){var h=i[s];(!(Lt.call(i,s)&&Gr(h,o))||o===e&&!(s in i))&&Oi(i,s,o)}function Nu(i,s){for(var o=i.length;o--;)if(Gr(i[o][0],s))return o;return-1}function Zm(i,s,o,h){return an(i,function(p,m,E){s(h,p,o(p),E)}),h}function xp(i,s){return i&&oi(s,Ee(s),i)}function Qm(i,s){return i&&oi(s,Ke(s),i)}function Oi(i,s,o){s=="__proto__"&&Tu?Tu(i,s,{configurable:!0,enumerable:!0,value:o,writable:!0}):i[s]=o}function _l(i,s){for(var o=-1,h=s.length,p=I(h),m=i==null;++o<h;)p[o]=m?e:sh(i,s[o]);return p}function Rn(i,s,o){return i===i&&(o!==e&&(i=i<=o?i:o),s!==e&&(i=i>=s?i:s)),i}function Cr(i,s,o,h,p,m){var E,T=s&A,S=s&_,W=s&C;if(o&&(E=p?o(i,h,p,m):o(i)),E!==e)return E;if(!Xt(i))return i;var V=dt(i);if(V){if(E=U1(i),!T)return Qe(i,E)}else{var $=Ie(i),Q=$==Pe||$==ze;if(hn(i))return Vp(i,T);if($==Yt||$==ae||Q&&!p){if(E=S||Q?{}:od(i),!T)return S?D1(i,Qm(E,i)):C1(i,xp(E,i))}else{if(!kt[$])return p?i:{};E=k1(i,$,T)}}m||(m=new zr);var nt=m.get(i);if(nt)return nt;m.set(i,E),Fd(i)?i.forEach(function(lt){E.add(Cr(lt,s,o,lt,i,m))}):Ld(i)&&i.forEach(function(lt,At){E.set(At,Cr(lt,s,o,At,i,m))});var ot=W?S?zl:$l:S?Ke:Ee,xt=V?e:ot(i);return wr(xt||i,function(lt,At){xt&&(At=lt,lt=i[At]),ba(E,At,Cr(lt,s,o,At,i,m))}),E}function jm(i){var s=Ee(i);return function(o){return Ep(o,i,s)}}function Ep(i,s,o){var h=o.length;if(i==null)return!h;for(i=Ut(i);h--;){var p=o[h],m=s[p],E=i[p];if(E===e&&!(p in i)||!m(E))return!1}return!0}function Ap(i,s,o){if(typeof i!="function")throw new Tr(l);return Oa(function(){i.apply(e,o)},s)}function wa(i,s,o,h){var p=-1,m=pu,E=!0,T=i.length,S=[],W=s.length;if(!T)return S;o&&(s=$t(s,lr(o))),h?(m=cl,E=!1):s.length>=a&&(m=ya,E=!1,s=new In(s));t:for(;++p<T;){var V=i[p],$=o==null?V:o(V);if(V=h||V!==0?V:0,E&&$===$){for(var Q=W;Q--;)if(s[Q]===$)continue t;S.push(V)}else m(s,$,h)||S.push(V)}return S}var an=Xp(ui),bp=Xp(Dl,!0);function Km(i,s){var o=!0;return an(i,function(h,p,m){return o=!!s(h,p,m),o}),o}function Mu(i,s,o){for(var h=-1,p=i.length;++h<p;){var m=i[h],E=s(m);if(E!=null&&(T===e?E===E&&!cr(E):o(E,T)))var T=E,S=m}return S}function Jm(i,s,o,h){var p=i.length;for(o=gt(o),o<0&&(o=-o>p?0:p+o),h=h===e||h>p?p:gt(h),h<0&&(h+=p),h=o>h?0:kd(h);o<h;)i[o++]=s;return i}function wp(i,s){var o=[];return an(i,function(h,p,m){s(h,p,m)&&o.push(h)}),o}function Te(i,s,o,h,p){var m=-1,E=i.length;for(o||(o=q1),p||(p=[]);++m<E;){var T=i[m];s>0&&o(T)?s>1?Te(T,s-1,o,h,p):rn(p,T):h||(p[p.length]=T)}return p}var Cl=Zp(),Tp=Zp(!0);function ui(i,s){return i&&Cl(i,s,Ee)}function Dl(i,s){return i&&Tp(i,s,Ee)}function Bu(i,s){return en(s,function(o){return Ii(i[o])})}function Ln(i,s){s=on(s,i);for(var o=0,h=s.length;i!=null&&o<h;)i=i[li(s[o++])];return o&&o==h?i:e}function _p(i,s,o){var h=s(i);return dt(i)?h:rn(h,o(i))}function Fe(i){return i==null?i===e?bi:me:Mn&&Mn in Ut(i)?L1(i):X1(i)}function Sl(i,s){return i>s}function t1(i,s){return i!=null&&Lt.call(i,s)}function e1(i,s){return i!=null&&s in Ut(i)}function r1(i,s,o){return i>=Be(s,o)&&i<de(s,o)}function Ol(i,s,o){for(var h=o?cl:pu,p=i[0].length,m=i.length,E=m,T=I(m),S=1/0,W=[];E--;){var V=i[E];E&&s&&(V=$t(V,lr(s))),S=Be(V.length,S),T[E]=!o&&(s||p>=120&&V.length>=120)?new In(E&&V):e}V=i[0];var $=-1,Q=T[0];t:for(;++$<p&&W.length<S;){var nt=V[$],ot=s?s(nt):nt;if(nt=o||nt!==0?nt:0,!(Q?ya(Q,ot):h(W,ot,o))){for(E=m;--E;){var xt=T[E];if(!(xt?ya(xt,ot):h(i[E],ot,o)))continue t}Q&&Q.push(ot),W.push(nt)}}return W}function i1(i,s,o,h){return ui(i,function(p,m,E){s(h,o(p),m,E)}),h}function Ta(i,s,o){s=on(s,i),i=fd(i,s);var h=i==null?i:i[li(Sr(s))];return h==null?e:or(h,i,o)}function Cp(i){return jt(i)&&Fe(i)==ae}function n1(i){return jt(i)&&Fe(i)==sr}function s1(i){return jt(i)&&Fe(i)==Ct}function _a(i,s,o,h,p){return i===s?!0:i==null||s==null||!jt(i)&&!jt(s)?i!==i&&s!==s:a1(i,s,o,h,_a,p)}function a1(i,s,o,h,p,m){var E=dt(i),T=dt(s),S=E?Se:Ie(i),W=T?Se:Ie(s);S=S==ae?Yt:S,W=W==ae?Yt:W;var V=S==Yt,$=W==Yt,Q=S==W;if(Q&&hn(i)){if(!hn(s))return!1;E=!0,V=!1}if(Q&&!V)return m||(m=new zr),E||Cs(i)?sd(i,s,o,h,p,m):I1(i,s,S,o,h,p,m);if(!(o&F)){var nt=V&&Lt.call(i,"__wrapped__"),ot=$&&Lt.call(s,"__wrapped__");if(nt||ot){var xt=nt?i.value():i,lt=ot?s.value():s;return m||(m=new zr),p(xt,lt,o,h,m)}}return Q?(m||(m=new zr),R1(i,s,o,h,p,m)):!1}function u1(i){return jt(i)&&Ie(i)==Qt}function Nl(i,s,o,h){var p=o.length,m=p,E=!h;if(i==null)return!m;for(i=Ut(i);p--;){var T=o[p];if(E&&T[2]?T[1]!==i[T[0]]:!(T[0]in i))return!1}for(;++p<m;){T=o[p];var S=T[0],W=i[S],V=T[1];if(E&&T[2]){if(W===e&&!(S in i))return!1}else{var $=new zr;if(h)var Q=h(W,V,S,i,s,$);if(!(Q===e?_a(V,W,F|N,h,$):Q))return!1}}return!0}function Dp(i){if(!Xt(i)||V1(i))return!1;var s=Ii(i)?um:Cn;return s.test(Fn(i))}function o1(i){return jt(i)&&Fe(i)==ue}function l1(i){return jt(i)&&Ie(i)==Dt}function h1(i){return jt(i)&&Zu(i.length)&&!!qt[Fe(i)]}function Sp(i){return typeof i=="function"?i:i==null?Je:typeof i=="object"?dt(i)?Mp(i[0],i[1]):Np(i):Qd(i)}function Ml(i){if(!Sa(i))return pm(i);var s=[];for(var o in Ut(i))Lt.call(i,o)&&o!="constructor"&&s.push(o);return s}function c1(i){if(!Xt(i))return Y1(i);var s=Sa(i),o=[];for(var h in i)h=="constructor"&&(s||!Lt.call(i,h))||o.push(h);return o}function Bl(i,s){return i<s}function Op(i,s){var o=-1,h=je(i)?I(i.length):[];return an(i,function(p,m,E){h[++o]=s(p,m,E)}),h}function Np(i){var s=Yl(i);return s.length==1&&s[0][2]?hd(s[0][0],s[0][1]):function(o){return o===i||Nl(o,i,s)}}function Mp(i,s){return Zl(i)&&ld(s)?hd(li(i),s):function(o){var h=sh(o,i);return h===e&&h===s?ah(o,i):_a(s,h,F|N)}}function Iu(i,s,o,h,p){i!==s&&Cl(s,function(m,E){if(p||(p=new zr),Xt(m))f1(i,s,E,o,Iu,h,p);else{var T=h?h(jl(i,E),m,E+"",i,s,p):e;T===e&&(T=m),Tl(i,E,T)}},Ke)}function f1(i,s,o,h,p,m,E){var T=jl(i,o),S=jl(s,o),W=E.get(S);if(W){Tl(i,o,W);return}var V=m?m(T,S,o+"",i,s,E):e,$=V===e;if($){var Q=dt(S),nt=!Q&&hn(S),ot=!Q&&!nt&&Cs(S);V=S,Q||nt||ot?dt(T)?V=T:te(T)?V=Qe(T):nt?($=!1,V=Vp(S,!0)):ot?($=!1,V=$p(S,!0)):V=[]:Na(S)||Un(S)?(V=T,Un(T)?V=Hd(T):(!Xt(T)||Ii(T))&&(V=od(S))):$=!1}$&&(E.set(S,V),p(V,S,h,m,E),E.delete(S)),Tl(i,o,V)}function Bp(i,s){var o=i.length;if(o)return s+=s<0?o:0,Bi(s,o)?i[s]:e}function Ip(i,s,o){s.length?s=$t(s,function(m){return dt(m)?function(E){return Ln(E,m.length===1?m[0]:m)}:m}):s=[Je];var h=-1;s=$t(s,lr(ut()));var p=Op(i,function(m,E,T){var S=$t(s,function(W){return W(m)});return{criteria:S,index:++h,value:m}});return kv(p,function(m,E){return _1(m,E,o)})}function p1(i,s){return Rp(i,s,function(o,h){return ah(i,h)})}function Rp(i,s,o){for(var h=-1,p=s.length,m={};++h<p;){var E=s[h],T=Ln(i,E);o(T,E)&&Ca(m,on(E,i),T)}return m}function d1(i){return function(s){return Ln(s,i)}}function Il(i,s,o,h){var p=h?Uv:gs,m=-1,E=s.length,T=i;for(i===s&&(s=Qe(s)),o&&(T=$t(i,lr(o)));++m<E;)for(var S=0,W=s[m],V=o?o(W):W;(S=p(T,V,S,h))>-1;)T!==i&&wu.call(T,S,1),wu.call(i,S,1);return i}function Lp(i,s){for(var o=i?s.length:0,h=o-1;o--;){var p=s[o];if(o==h||p!==m){var m=p;Bi(p)?wu.call(i,p,1):Fl(i,p)}}return i}function Rl(i,s){return i+Cu(gp()*(s-i+1))}function g1(i,s,o,h){for(var p=-1,m=de(_u((s-i)/(o||1)),0),E=I(m);m--;)E[h?m:++p]=i,i+=o;return E}function Ll(i,s){var o="";if(!i||s<1||s>Bt)return o;do s%2&&(o+=i),s=Cu(s/2),s&&(i+=i);while(s);return o}function Et(i,s){return Kl(cd(i,s,Je),i+"")}function y1(i){return mp(Ds(i))}function v1(i,s){var o=Ds(i);return Vu(o,Rn(s,0,o.length))}function Ca(i,s,o,h){if(!Xt(i))return i;s=on(s,i);for(var p=-1,m=s.length,E=m-1,T=i;T!=null&&++p<m;){var S=li(s[p]),W=o;if(S==="__proto__"||S==="constructor"||S==="prototype")return i;if(p!=E){var V=T[S];W=h?h(V,S,T):e,W===e&&(W=Xt(V)?V:Bi(s[p+1])?[]:{})}ba(T,S,W),T=T[S]}return i}var Pp=Du?function(i,s){return Du.set(i,s),i}:Je,m1=Tu?function(i,s){return Tu(i,"toString",{configurable:!0,enumerable:!1,value:oh(s),writable:!0})}:Je;function x1(i){return Vu(Ds(i))}function Dr(i,s,o){var h=-1,p=i.length;s<0&&(s=-s>p?0:p+s),o=o>p?p:o,o<0&&(o+=p),p=s>o?0:o-s>>>0,s>>>=0;for(var m=I(p);++h<p;)m[h]=i[h+s];return m}function E1(i,s){var o;return an(i,function(h,p,m){return o=s(h,p,m),!o}),!!o}function Ru(i,s,o){var h=0,p=i==null?h:i.length;if(typeof s=="number"&&s===s&&p<=qr){for(;h<p;){var m=h+p>>>1,E=i[m];E!==null&&!cr(E)&&(o?E<=s:E<s)?h=m+1:p=m}return p}return Pl(i,s,Je,o)}function Pl(i,s,o,h){var p=0,m=i==null?0:i.length;if(m===0)return 0;s=o(s);for(var E=s!==s,T=s===null,S=cr(s),W=s===e;p<m;){var V=Cu((p+m)/2),$=o(i[V]),Q=$!==e,nt=$===null,ot=$===$,xt=cr($);if(E)var lt=h||ot;else W?lt=ot&&(h||Q):T?lt=ot&&Q&&(h||!nt):S?lt=ot&&Q&&!nt&&(h||!xt):nt||xt?lt=!1:lt=h?$<=s:$<s;lt?p=V+1:m=V}return Be(m,ve)}function Fp(i,s){for(var o=-1,h=i.length,p=0,m=[];++o<h;){var E=i[o],T=s?s(E):E;if(!o||!Gr(T,S)){var S=T;m[p++]=E===0?0:E}}return m}function Up(i){return typeof i=="number"?i:cr(i)?be:+i}function hr(i){if(typeof i=="string")return i;if(dt(i))return $t(i,hr)+"";if(cr(i))return yp?yp.call(i):"";var s=i+"";return s=="0"&&1/i==-yt?"-0":s}function un(i,s,o){var h=-1,p=pu,m=i.length,E=!0,T=[],S=T;if(o)E=!1,p=cl;else if(m>=a){var W=s?null:M1(i);if(W)return gu(W);E=!1,p=ya,S=new In}else S=s?[]:T;t:for(;++h<m;){var V=i[h],$=s?s(V):V;if(V=o||V!==0?V:0,E&&$===$){for(var Q=S.length;Q--;)if(S[Q]===$)continue t;s&&S.push($),T.push(V)}else p(S,$,o)||(S!==T&&S.push($),T.push(V))}return T}function Fl(i,s){return s=on(s,i),i=fd(i,s),i==null||delete i[li(Sr(s))]}function kp(i,s,o,h){return Ca(i,s,o(Ln(i,s)),h)}function Lu(i,s,o,h){for(var p=i.length,m=h?p:-1;(h?m--:++m<p)&&s(i[m],m,i););return o?Dr(i,h?0:m,h?m+1:p):Dr(i,h?m+1:0,h?p:m)}function Hp(i,s){var o=i;return o instanceof bt&&(o=o.value()),fl(s,function(h,p){return p.func.apply(p.thisArg,rn([h],p.args))},o)}function Ul(i,s,o){var h=i.length;if(h<2)return h?un(i[0]):[];for(var p=-1,m=I(h);++p<h;)for(var E=i[p],T=-1;++T<h;)T!=p&&(m[p]=wa(m[p]||E,i[T],s,o));return un(Te(m,1),s,o)}function qp(i,s,o){for(var h=-1,p=i.length,m=s.length,E={};++h<p;){var T=h<m?s[h]:e;o(E,i[h],T)}return E}function kl(i){return te(i)?i:[]}function Hl(i){return typeof i=="function"?i:Je}function on(i,s){return dt(i)?i:Zl(i,s)?[i]:yd(It(i))}var A1=Et;function ln(i,s,o){var h=i.length;return o=o===e?h:o,!s&&o>=h?i:Dr(i,s,o)}var Wp=om||function(i){return we.clearTimeout(i)};function Vp(i,s){if(s)return i.slice();var o=i.length,h=hp?hp(o):new i.constructor(o);return i.copy(h),h}function ql(i){var s=new i.constructor(i.byteLength);return new Au(s).set(new Au(i)),s}function b1(i,s){var o=s?ql(i.buffer):i.buffer;return new i.constructor(o,i.byteOffset,i.byteLength)}function w1(i){var s=new i.constructor(i.source,ca.exec(i));return s.lastIndex=i.lastIndex,s}function T1(i){return Aa?Ut(Aa.call(i)):{}}function $p(i,s){var o=s?ql(i.buffer):i.buffer;return new i.constructor(o,i.byteOffset,i.length)}function zp(i,s){if(i!==s){var o=i!==e,h=i===null,p=i===i,m=cr(i),E=s!==e,T=s===null,S=s===s,W=cr(s);if(!T&&!W&&!m&&i>s||m&&E&&S&&!T&&!W||h&&E&&S||!o&&S||!p)return 1;if(!h&&!m&&!W&&i<s||W&&o&&p&&!h&&!m||T&&o&&p||!E&&p||!S)return-1}return 0}function _1(i,s,o){for(var h=-1,p=i.criteria,m=s.criteria,E=p.length,T=o.length;++h<E;){var S=zp(p[h],m[h]);if(S){if(h>=T)return S;var W=o[h];return S*(W=="desc"?-1:1)}}return i.index-s.index}function Gp(i,s,o,h){for(var p=-1,m=i.length,E=o.length,T=-1,S=s.length,W=de(m-E,0),V=I(S+W),$=!h;++T<S;)V[T]=s[T];for(;++p<E;)($||p<m)&&(V[o[p]]=i[p]);for(;W--;)V[T++]=i[p++];return V}function Yp(i,s,o,h){for(var p=-1,m=i.length,E=-1,T=o.length,S=-1,W=s.length,V=de(m-T,0),$=I(V+W),Q=!h;++p<V;)$[p]=i[p];for(var nt=p;++S<W;)$[nt+S]=s[S];for(;++E<T;)(Q||p<m)&&($[nt+o[E]]=i[p++]);return $}function Qe(i,s){var o=-1,h=i.length;for(s||(s=I(h));++o<h;)s[o]=i[o];return s}function oi(i,s,o,h){var p=!o;o||(o={});for(var m=-1,E=s.length;++m<E;){var T=s[m],S=h?h(o[T],i[T],T,o,i):e;S===e&&(S=i[T]),p?Oi(o,T,S):ba(o,T,S)}return o}function C1(i,s){return oi(i,Xl(i),s)}function D1(i,s){return oi(i,ad(i),s)}function Pu(i,s){return function(o,h){var p=dt(o)?Bv:Zm,m=s?s():{};return p(o,i,ut(h,2),m)}}function ws(i){return Et(function(s,o){var h=-1,p=o.length,m=p>1?o[p-1]:e,E=p>2?o[2]:e;for(m=i.length>3&&typeof m=="function"?(p--,m):e,E&&Ue(o[0],o[1],E)&&(m=p<3?e:m,p=1),s=Ut(s);++h<p;){var T=o[h];T&&i(s,T,h,m)}return s})}function Xp(i,s){return function(o,h){if(o==null)return o;if(!je(o))return i(o,h);for(var p=o.length,m=s?p:-1,E=Ut(o);(s?m--:++m<p)&&h(E[m],m,E)!==!1;);return o}}function Zp(i){return function(s,o,h){for(var p=-1,m=Ut(s),E=h(s),T=E.length;T--;){var S=E[i?T:++p];if(o(m[S],S,m)===!1)break}return s}}function S1(i,s,o){var h=s&M,p=Da(i);function m(){var E=this&&this!==we&&this instanceof m?p:i;return E.apply(h?o:this,arguments)}return m}function Qp(i){return function(s){s=It(s);var o=ys(s)?$r(s):e,h=o?o[0]:s.charAt(0),p=o?ln(o,1).join(""):s.slice(1);return h[i]()+p}}function Ts(i){return function(s){return fl(Xd(Yd(s).replace(mv,"")),i,"")}}function Da(i){return function(){var s=arguments;switch(s.length){case 0:return new i;case 1:return new i(s[0]);case 2:return new i(s[0],s[1]);case 3:return new i(s[0],s[1],s[2]);case 4:return new i(s[0],s[1],s[2],s[3]);case 5:return new i(s[0],s[1],s[2],s[3],s[4]);case 6:return new i(s[0],s[1],s[2],s[3],s[4],s[5]);case 7:return new i(s[0],s[1],s[2],s[3],s[4],s[5],s[6])}var o=bs(i.prototype),h=i.apply(o,s);return Xt(h)?h:o}}function O1(i,s,o){var h=Da(i);function p(){for(var m=arguments.length,E=I(m),T=m,S=_s(p);T--;)E[T]=arguments[T];var W=m<3&&E[0]!==S&&E[m-1]!==S?[]:nn(E,S);if(m-=W.length,m<o)return ed(i,s,Fu,p.placeholder,e,E,W,e,e,o-m);var V=this&&this!==we&&this instanceof p?h:i;return or(V,this,E)}return p}function jp(i){return function(s,o,h){var p=Ut(s);if(!je(s)){var m=ut(o,3);s=Ee(s),o=function(T){return m(p[T],T,p)}}var E=i(s,o,h);return E>-1?p[m?s[E]:E]:e}}function Kp(i){return Mi(function(s){var o=s.length,h=o,p=_r.prototype.thru;for(i&&s.reverse();h--;){var m=s[h];if(typeof m!="function")throw new Tr(l);if(p&&!E&&qu(m)=="wrapper")var E=new _r([],!0)}for(h=E?h:o;++h<o;){m=s[h];var T=qu(m),S=T=="wrapper"?Gl(m):e;S&&Ql(S[0])&&S[1]==(j|z|L|tt)&&!S[4].length&&S[9]==1?E=E[qu(S[0])].apply(E,S[3]):E=m.length==1&&Ql(m)?E[T]():E.thru(m)}return function(){var W=arguments,V=W[0];if(E&&W.length==1&&dt(V))return E.plant(V).value();for(var $=0,Q=o?s[$].apply(this,W):V;++$<o;)Q=s[$].call(this,Q);return Q}})}function Fu(i,s,o,h,p,m,E,T,S,W){var V=s&j,$=s&M,Q=s&R,nt=s&(z|w),ot=s&Z,xt=Q?e:Da(i);function lt(){for(var At=arguments.length,Tt=I(At),fr=At;fr--;)Tt[fr]=arguments[fr];if(nt)var ke=_s(lt),pr=qv(Tt,ke);if(h&&(Tt=Gp(Tt,h,p,nt)),m&&(Tt=Yp(Tt,m,E,nt)),At-=pr,nt&&At<W){var ee=nn(Tt,ke);return ed(i,s,Fu,lt.placeholder,o,Tt,ee,T,S,W-At)}var Yr=$?o:this,Li=Q?Yr[i]:i;return At=Tt.length,T?Tt=Z1(Tt,T):ot&&At>1&&Tt.reverse(),V&&S<At&&(Tt.length=S),this&&this!==we&&this instanceof lt&&(Li=xt||Da(Li)),Li.apply(Yr,Tt)}return lt}function Jp(i,s){return function(o,h){return i1(o,i,s(h),{})}}function Uu(i,s){return function(o,h){var p;if(o===e&&h===e)return s;if(o!==e&&(p=o),h!==e){if(p===e)return h;typeof o=="string"||typeof h=="string"?(o=hr(o),h=hr(h)):(o=Up(o),h=Up(h)),p=i(o,h)}return p}}function Wl(i){return Mi(function(s){return s=$t(s,lr(ut())),Et(function(o){var h=this;return i(s,function(p){return or(p,h,o)})})})}function ku(i,s){s=s===e?" ":hr(s);var o=s.length;if(o<2)return o?Ll(s,i):s;var h=Ll(s,_u(i/vs(s)));return ys(s)?ln($r(h),0,i).join(""):h.slice(0,i)}function N1(i,s,o,h){var p=s&M,m=Da(i);function E(){for(var T=-1,S=arguments.length,W=-1,V=h.length,$=I(V+S),Q=this&&this!==we&&this instanceof E?m:i;++W<V;)$[W]=h[W];for(;S--;)$[W++]=arguments[++T];return or(Q,p?o:this,$)}return E}function td(i){return function(s,o,h){return h&&typeof h!="number"&&Ue(s,o,h)&&(o=h=e),s=Ri(s),o===e?(o=s,s=0):o=Ri(o),h=h===e?s<o?1:-1:Ri(h),g1(s,o,h,i)}}function Hu(i){return function(s,o){return typeof s=="string"&&typeof o=="string"||(s=Or(s),o=Or(o)),i(s,o)}}function ed(i,s,o,h,p,m,E,T,S,W){var V=s&z,$=V?E:e,Q=V?e:E,nt=V?m:e,ot=V?e:m;s|=V?L:k,s&=~(V?k:L),s&q||(s&=~(M|R));var xt=[i,s,p,nt,$,ot,Q,T,S,W],lt=o.apply(e,xt);return Ql(i)&&pd(lt,xt),lt.placeholder=h,dd(lt,i,s)}function Vl(i){var s=pe[i];return function(o,h){if(o=Or(o),h=h==null?0:Be(gt(h),292),h&&dp(o)){var p=(It(o)+"e").split("e"),m=s(p[0]+"e"+(+p[1]+h));return p=(It(m)+"e").split("e"),+(p[0]+"e"+(+p[1]-h))}return s(o)}}var M1=Es&&1/gu(new Es([,-0]))[1]==yt?function(i){return new Es(i)}:ch;function rd(i){return function(s){var o=Ie(s);return o==Qt?xl(s):o==Dt?Xv(s):Hv(s,i(s))}}function Ni(i,s,o,h,p,m,E,T){var S=s&R;if(!S&&typeof i!="function")throw new Tr(l);var W=h?h.length:0;if(W||(s&=~(L|k),h=p=e),E=E===e?E:de(gt(E),0),T=T===e?T:gt(T),W-=p?p.length:0,s&k){var V=h,$=p;h=p=e}var Q=S?e:Gl(i),nt=[i,s,o,h,p,V,$,m,E,T];if(Q&&G1(nt,Q),i=nt[0],s=nt[1],o=nt[2],h=nt[3],p=nt[4],T=nt[9]=nt[9]===e?S?0:i.length:de(nt[9]-W,0),!T&&s&(z|w)&&(s&=~(z|w)),!s||s==M)var ot=S1(i,s,o);else s==z||s==w?ot=O1(i,s,T):(s==L||s==(M|L))&&!p.length?ot=N1(i,s,o,h):ot=Fu.apply(e,nt);var xt=Q?Pp:pd;return dd(xt(ot,nt),i,s)}function id(i,s,o,h){return i===e||Gr(i,xs[o])&&!Lt.call(h,o)?s:i}function nd(i,s,o,h,p,m){return Xt(i)&&Xt(s)&&(m.set(s,i),Iu(i,s,e,nd,m),m.delete(s)),i}function B1(i){return Na(i)?e:i}function sd(i,s,o,h,p,m){var E=o&F,T=i.length,S=s.length;if(T!=S&&!(E&&S>T))return!1;var W=m.get(i),V=m.get(s);if(W&&V)return W==s&&V==i;var $=-1,Q=!0,nt=o&N?new In:e;for(m.set(i,s),m.set(s,i);++$<T;){var ot=i[$],xt=s[$];if(h)var lt=E?h(xt,ot,$,s,i,m):h(ot,xt,$,i,s,m);if(lt!==e){if(lt)continue;Q=!1;break}if(nt){if(!pl(s,function(At,Tt){if(!ya(nt,Tt)&&(ot===At||p(ot,At,o,h,m)))return nt.push(Tt)})){Q=!1;break}}else if(!(ot===xt||p(ot,xt,o,h,m))){Q=!1;break}}return m.delete(i),m.delete(s),Q}function I1(i,s,o,h,p,m,E){switch(o){case Ye:if(i.byteLength!=s.byteLength||i.byteOffset!=s.byteOffset)return!1;i=i.buffer,s=s.buffer;case sr:return!(i.byteLength!=s.byteLength||!m(new Au(i),new Au(s)));case Gt:case Ct:case Ne:return Gr(+i,+s);case Oe:return i.name==s.name&&i.message==s.message;case ue:case nr:return i==s+"";case Qt:var T=xl;case Dt:var S=h&F;if(T||(T=gu),i.size!=s.size&&!S)return!1;var W=E.get(i);if(W)return W==s;h|=N,E.set(i,s);var V=sd(T(i),T(s),h,p,m,E);return E.delete(i),V;case Ge:if(Aa)return Aa.call(i)==Aa.call(s)}return!1}function R1(i,s,o,h,p,m){var E=o&F,T=$l(i),S=T.length,W=$l(s),V=W.length;if(S!=V&&!E)return!1;for(var $=S;$--;){var Q=T[$];if(!(E?Q in s:Lt.call(s,Q)))return!1}var nt=m.get(i),ot=m.get(s);if(nt&&ot)return nt==s&&ot==i;var xt=!0;m.set(i,s),m.set(s,i);for(var lt=E;++$<S;){Q=T[$];var At=i[Q],Tt=s[Q];if(h)var fr=E?h(Tt,At,Q,s,i,m):h(At,Tt,Q,i,s,m);if(!(fr===e?At===Tt||p(At,Tt,o,h,m):fr)){xt=!1;break}lt||(lt=Q=="constructor")}if(xt&&!lt){var ke=i.constructor,pr=s.constructor;ke!=pr&&"constructor"in i&&"constructor"in s&&!(typeof ke=="function"&&ke instanceof ke&&typeof pr=="function"&&pr instanceof pr)&&(xt=!1)}return m.delete(i),m.delete(s),xt}function Mi(i){return Kl(cd(i,e,Ed),i+"")}function $l(i){return _p(i,Ee,Xl)}function zl(i){return _p(i,Ke,ad)}var Gl=Du?function(i){return Du.get(i)}:ch;function qu(i){for(var s=i.name+"",o=As[s],h=Lt.call(As,s)?o.length:0;h--;){var p=o[h],m=p.func;if(m==null||m==i)return p.name}return s}function _s(i){var s=Lt.call(v,"placeholder")?v:i;return s.placeholder}function ut(){var i=v.iteratee||lh;return i=i===lh?Sp:i,arguments.length?i(arguments[0],arguments[1]):i}function Wu(i,s){var o=i.__data__;return W1(s)?o[typeof s=="string"?"string":"hash"]:o.map}function Yl(i){for(var s=Ee(i),o=s.length;o--;){var h=s[o],p=i[h];s[o]=[h,p,ld(p)]}return s}function Pn(i,s){var o=zv(i,s);return Dp(o)?o:e}function L1(i){var s=Lt.call(i,Mn),o=i[Mn];try{i[Mn]=e;var h=!0}catch{}var p=xu.call(i);return h&&(s?i[Mn]=o:delete i[Mn]),p}var Xl=Al?function(i){return i==null?[]:(i=Ut(i),en(Al(i),function(s){return fp.call(i,s)}))}:fh,ad=Al?function(i){for(var s=[];i;)rn(s,Xl(i)),i=bu(i);return s}:fh,Ie=Fe;(bl&&Ie(new bl(new ArrayBuffer(1)))!=Ye||ma&&Ie(new ma)!=Qt||wl&&Ie(wl.resolve())!=ii||Es&&Ie(new Es)!=Dt||xa&&Ie(new xa)!=mr)&&(Ie=function(i){var s=Fe(i),o=s==Yt?i.constructor:e,h=o?Fn(o):"";if(h)switch(h){case vm:return Ye;case mm:return Qt;case xm:return ii;case Em:return Dt;case Am:return mr}return s});function P1(i,s,o){for(var h=-1,p=o.length;++h<p;){var m=o[h],E=m.size;switch(m.type){case"drop":i+=E;break;case"dropRight":s-=E;break;case"take":s=Be(s,i+E);break;case"takeRight":i=de(i,s-E);break}}return{start:i,end:s}}function F1(i){var s=i.match(il);return s?s[1].split(au):[]}function ud(i,s,o){s=on(s,i);for(var h=-1,p=s.length,m=!1;++h<p;){var E=li(s[h]);if(!(m=i!=null&&o(i,E)))break;i=i[E]}return m||++h!=p?m:(p=i==null?0:i.length,!!p&&Zu(p)&&Bi(E,p)&&(dt(i)||Un(i)))}function U1(i){var s=i.length,o=new i.constructor(s);return s&&typeof i[0]=="string"&&Lt.call(i,"index")&&(o.index=i.index,o.input=i.input),o}function od(i){return typeof i.constructor=="function"&&!Sa(i)?bs(bu(i)):{}}function k1(i,s,o){var h=i.constructor;switch(s){case sr:return ql(i);case Gt:case Ct:return new h(+i);case Ye:return b1(i,o);case Yi:case Xi:case ni:case wi:case bn:case P:case it:case at:case wt:return $p(i,o);case Qt:return new h;case Ne:case nr:return new h(i);case ue:return w1(i);case Dt:return new h;case Ge:return T1(i)}}function H1(i,s){var o=s.length;if(!o)return i;var h=o-1;return s[h]=(o>1?"& ":"")+s[h],s=s.join(o>2?", ":" "),i.replace(ha,`{
|
|
12
|
+
*/Wa.exports,function(r,t){(function(){var e,n="4.17.21",a=200,u="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",l="Expected a function",c="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",d=500,y="__lodash_placeholder__",A=1,_=2,C=4,F=1,N=2,M=1,R=2,q=4,z=8,w=16,L=32,k=64,j=128,tt=256,Z=512,rt=30,J="...",st=800,ht=16,ct=1,ft=2,O=3,yt=1/0,Bt=9007199254740991,Re=17976931348623157e292,be=NaN,se=4294967295,ve=se-1,qr=se>>>1,Le=[["ary",j],["bind",M],["bindKey",R],["curry",z],["curryRight",w],["flip",Z],["partial",L],["partialRight",k],["rearg",tt]],ae="[object Arguments]",Se="[object Array]",Vt="[object AsyncFunction]",Gt="[object Boolean]",Ct="[object Date]",Ht="[object DOMException]",Oe="[object Error]",Pe="[object Function]",ze="[object GeneratorFunction]",Qt="[object Map]",Ne="[object Number]",me="[object Null]",Yt="[object Object]",ii="[object Promise]",Ai="[object Proxy]",ue="[object RegExp]",Dt="[object Set]",nr="[object String]",Ge="[object Symbol]",bi="[object Undefined]",mr="[object WeakMap]",Gi="[object WeakSet]",sr="[object ArrayBuffer]",Ye="[object DataView]",Yi="[object Float32Array]",Xi="[object Float64Array]",ni="[object Int8Array]",wi="[object Int16Array]",bn="[object Int32Array]",P="[object Uint8Array]",it="[object Uint8ClampedArray]",at="[object Uint16Array]",wt="[object Uint32Array]",vt=/\b__p \+= '';/g,fe=/\b(__p \+=) '' \+/g,Me=/(__e\(.*?\)|\b__t\)) \+\n'';/g,xr=/&(?:amp|lt|gt|quot|#39);/g,Zi=/[&<>"']/g,ar=RegExp(xr.source),wn=RegExp(Zi.source),Qi=/<%-([\s\S]+?)%>/g,si=/<%([\s\S]+?)%>/g,Tn=/<%=([\s\S]+?)%>/g,_n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ji=/^\w*$/,el=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ki=/[\\^$.*+?()[\]{}|]/g,rl=RegExp(Ki.source),la=/^\s+/,su=/\s/,ha=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,il=/\{\n\/\* \[wrapped with (.+)\] \*/,au=/,? & /,nl=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,uu=/[()=,{}\[\]\/\s]/,ou=/\\(\\)?/g,lu=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ca=/\w*$/,fa=/^[-+]0x[0-9a-f]+$/i,Ti=/^0b[01]+$/i,Cn=/^\[object .+?Constructor\]$/,Dn=/^0o[0-7]+$/i,os=/^(?:0|[1-9]\d*)$/,pa=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ls=/($^)/,sl=/['\n\r\u2028\u2029\\]/g,_i="\\ud800-\\udfff",Xe="\\u0300-\\u036f",Ji="\\ufe20-\\ufe2f",ai="\\u20d0-\\u20ff",Er=Xe+Ji+ai,tn="\\u2700-\\u27bf",ur="a-z\\xdf-\\xf6\\xf8-\\xff",Wr="\\xac\\xb1\\xd7\\xf7",hu="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",cu="\\u2000-\\u206f",hs=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ze="A-Z\\xc0-\\xd6\\xd8-\\xde",Sn="\\ufe0e\\ufe0f",cs=Wr+hu+cu+hs,On="['’]",da="["+_i+"]",fs="["+cs+"]",Ci="["+Er+"]",Vr="\\d+",al="["+tn+"]",ga="["+ur+"]",ps="[^"+_i+cs+Vr+tn+ur+Ze+"]",ds="\\ud83c[\\udffb-\\udfff]",ul="(?:"+Ci+"|"+ds+")",fu="[^"+_i+"]",g="(?:\\ud83c[\\udde6-\\uddff]){2}",x="[\\ud800-\\udbff][\\udc00-\\udfff]",b="["+Ze+"]",B="\\u200d",G="(?:"+ga+"|"+ps+")",K="(?:"+b+"|"+ps+")",mt="(?:"+On+"(?:d|ll|m|re|s|t|ve))?",Jt="(?:"+On+"(?:D|LL|M|RE|S|T|VE))?",oe=ul+"?",xe="["+Sn+"]?",Ar="(?:"+B+"(?:"+[fu,g,x].join("|")+")"+xe+oe+")*",dv="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",gv="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Vf=xe+oe+Ar,yv="(?:"+[al,g,x].join("|")+")"+Vf,vv="(?:"+[fu+Ci+"?",Ci,g,x,da].join("|")+")",mv=RegExp(On,"g"),xv=RegExp(Ci,"g"),ol=RegExp(ds+"(?="+ds+")|"+vv+Vf,"g"),Ev=RegExp([b+"?"+ga+"+"+mt+"(?="+[fs,b,"$"].join("|")+")",K+"+"+Jt+"(?="+[fs,b+G,"$"].join("|")+")",b+"?"+G+"+"+mt,b+"+"+Jt,gv,dv,Vr,yv].join("|"),"g"),Av=RegExp("["+B+_i+Er+Sn+"]"),bv=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,wv=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Tv=-1,qt={};qt[Yi]=qt[Xi]=qt[ni]=qt[wi]=qt[bn]=qt[P]=qt[it]=qt[at]=qt[wt]=!0,qt[ae]=qt[Se]=qt[sr]=qt[Gt]=qt[Ye]=qt[Ct]=qt[Oe]=qt[Pe]=qt[Qt]=qt[Ne]=qt[Yt]=qt[ue]=qt[Dt]=qt[nr]=qt[mr]=!1;var kt={};kt[ae]=kt[Se]=kt[sr]=kt[Ye]=kt[Gt]=kt[Ct]=kt[Yi]=kt[Xi]=kt[ni]=kt[wi]=kt[bn]=kt[Qt]=kt[Ne]=kt[Yt]=kt[ue]=kt[Dt]=kt[nr]=kt[Ge]=kt[P]=kt[it]=kt[at]=kt[wt]=!0,kt[Oe]=kt[Pe]=kt[mr]=!1;var _v={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Cv={"&":"&","<":"<",">":">",'"':""","'":"'"},Dv={"&":"&","<":"<",">":">",""":'"',"'":"'"},Sv={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ov=parseFloat,Nv=parseInt,$f=typeof Os=="object"&&Os&&Os.Object===Object&&Os,Mv=typeof self=="object"&&self&&self.Object===Object&&self,we=$f||Mv||Function("return this")(),ll=t&&!t.nodeType&&t,Nn=ll&&!0&&r&&!r.nodeType&&r,zf=Nn&&Nn.exports===ll,hl=zf&&$f.process,br=function(){try{var D=Nn&&Nn.require&&Nn.require("util").types;return D||hl&&hl.binding&&hl.binding("util")}catch{}}(),Gf=br&&br.isArrayBuffer,Yf=br&&br.isDate,Xf=br&&br.isMap,Zf=br&&br.isRegExp,Qf=br&&br.isSet,jf=br&&br.isTypedArray;function or(D,U,I){switch(I.length){case 0:return D.call(U);case 1:return D.call(U,I[0]);case 2:return D.call(U,I[0],I[1]);case 3:return D.call(U,I[0],I[1],I[2])}return D.apply(U,I)}function Bv(D,U,I,et){for(var pt=-1,Nt=D==null?0:D.length;++pt<Nt;){var pe=D[pt];U(et,pe,I(pe),D)}return et}function wr(D,U){for(var I=-1,et=D==null?0:D.length;++I<et&&U(D[I],I,D)!==!1;);return D}function Iv(D,U){for(var I=D==null?0:D.length;I--&&U(D[I],I,D)!==!1;);return D}function Kf(D,U){for(var I=-1,et=D==null?0:D.length;++I<et;)if(!U(D[I],I,D))return!1;return!0}function en(D,U){for(var I=-1,et=D==null?0:D.length,pt=0,Nt=[];++I<et;){var pe=D[I];U(pe,I,D)&&(Nt[pt++]=pe)}return Nt}function pu(D,U){var I=D==null?0:D.length;return!!I&&gs(D,U,0)>-1}function cl(D,U,I){for(var et=-1,pt=D==null?0:D.length;++et<pt;)if(I(U,D[et]))return!0;return!1}function $t(D,U){for(var I=-1,et=D==null?0:D.length,pt=Array(et);++I<et;)pt[I]=U(D[I],I,D);return pt}function rn(D,U){for(var I=-1,et=U.length,pt=D.length;++I<et;)D[pt+I]=U[I];return D}function fl(D,U,I,et){var pt=-1,Nt=D==null?0:D.length;for(et&&Nt&&(I=D[++pt]);++pt<Nt;)I=U(I,D[pt],pt,D);return I}function Rv(D,U,I,et){var pt=D==null?0:D.length;for(et&&pt&&(I=D[--pt]);pt--;)I=U(I,D[pt],pt,D);return I}function pl(D,U){for(var I=-1,et=D==null?0:D.length;++I<et;)if(U(D[I],I,D))return!0;return!1}var Lv=dl("length");function Pv(D){return D.split("")}function Fv(D){return D.match(nl)||[]}function Jf(D,U,I){var et;return I(D,function(pt,Nt,pe){if(U(pt,Nt,pe))return et=Nt,!1}),et}function du(D,U,I,et){for(var pt=D.length,Nt=I+(et?1:-1);et?Nt--:++Nt<pt;)if(U(D[Nt],Nt,D))return Nt;return-1}function gs(D,U,I){return U===U?Zv(D,U,I):du(D,tp,I)}function Uv(D,U,I,et){for(var pt=I-1,Nt=D.length;++pt<Nt;)if(et(D[pt],U))return pt;return-1}function tp(D){return D!==D}function ep(D,U){var I=D==null?0:D.length;return I?yl(D,U)/I:be}function dl(D){return function(U){return U==null?e:U[D]}}function gl(D){return function(U){return D==null?e:D[U]}}function rp(D,U,I,et,pt){return pt(D,function(Nt,pe,Ut){I=et?(et=!1,Nt):U(I,Nt,pe,Ut)}),I}function kv(D,U){var I=D.length;for(D.sort(U);I--;)D[I]=D[I].value;return D}function yl(D,U){for(var I,et=-1,pt=D.length;++et<pt;){var Nt=U(D[et]);Nt!==e&&(I=I===e?Nt:I+Nt)}return I}function vl(D,U){for(var I=-1,et=Array(D);++I<D;)et[I]=U(I);return et}function Hv(D,U){return $t(U,function(I){return[I,D[I]]})}function ip(D){return D&&D.slice(0,up(D)+1).replace(la,"")}function lr(D){return function(U){return D(U)}}function ml(D,U){return $t(U,function(I){return D[I]})}function ya(D,U){return D.has(U)}function np(D,U){for(var I=-1,et=D.length;++I<et&&gs(U,D[I],0)>-1;);return I}function sp(D,U){for(var I=D.length;I--&&gs(U,D[I],0)>-1;);return I}function qv(D,U){for(var I=D.length,et=0;I--;)D[I]===U&&++et;return et}var Wv=gl(_v),Vv=gl(Cv);function $v(D){return"\\"+Sv[D]}function zv(D,U){return D==null?e:D[U]}function ys(D){return Av.test(D)}function Gv(D){return bv.test(D)}function Yv(D){for(var U,I=[];!(U=D.next()).done;)I.push(U.value);return I}function xl(D){var U=-1,I=Array(D.size);return D.forEach(function(et,pt){I[++U]=[pt,et]}),I}function ap(D,U){return function(I){return D(U(I))}}function nn(D,U){for(var I=-1,et=D.length,pt=0,Nt=[];++I<et;){var pe=D[I];(pe===U||pe===y)&&(D[I]=y,Nt[pt++]=I)}return Nt}function gu(D){var U=-1,I=Array(D.size);return D.forEach(function(et){I[++U]=et}),I}function Xv(D){var U=-1,I=Array(D.size);return D.forEach(function(et){I[++U]=[et,et]}),I}function Zv(D,U,I){for(var et=I-1,pt=D.length;++et<pt;)if(D[et]===U)return et;return-1}function Qv(D,U,I){for(var et=I+1;et--;)if(D[et]===U)return et;return et}function vs(D){return ys(D)?Kv(D):Lv(D)}function $r(D){return ys(D)?Jv(D):Pv(D)}function up(D){for(var U=D.length;U--&&su.test(D.charAt(U)););return U}var jv=gl(Dv);function Kv(D){for(var U=ol.lastIndex=0;ol.test(D);)++U;return U}function Jv(D){return D.match(ol)||[]}function tm(D){return D.match(Ev)||[]}var em=function D(U){U=U==null?we:ms.defaults(we.Object(),U,ms.pick(we,wv));var I=U.Array,et=U.Date,pt=U.Error,Nt=U.Function,pe=U.Math,Ut=U.Object,El=U.RegExp,rm=U.String,Tr=U.TypeError,yu=I.prototype,im=Nt.prototype,xs=Ut.prototype,vu=U["__core-js_shared__"],mu=im.toString,Lt=xs.hasOwnProperty,nm=0,op=function(){var i=/[^.]+$/.exec(vu&&vu.keys&&vu.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}(),xu=xs.toString,sm=mu.call(Ut),am=we._,um=El("^"+mu.call(Lt).replace(Ki,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Eu=zf?U.Buffer:e,sn=U.Symbol,Au=U.Uint8Array,lp=Eu?Eu.allocUnsafe:e,bu=ap(Ut.getPrototypeOf,Ut),hp=Ut.create,cp=xs.propertyIsEnumerable,wu=yu.splice,fp=sn?sn.isConcatSpreadable:e,va=sn?sn.iterator:e,Mn=sn?sn.toStringTag:e,Tu=function(){try{var i=Pn(Ut,"defineProperty");return i({},"",{}),i}catch{}}(),om=U.clearTimeout!==we.clearTimeout&&U.clearTimeout,lm=et&&et.now!==we.Date.now&&et.now,hm=U.setTimeout!==we.setTimeout&&U.setTimeout,_u=pe.ceil,Cu=pe.floor,Al=Ut.getOwnPropertySymbols,cm=Eu?Eu.isBuffer:e,pp=U.isFinite,fm=yu.join,pm=ap(Ut.keys,Ut),de=pe.max,Be=pe.min,dm=et.now,gm=U.parseInt,dp=pe.random,ym=yu.reverse,bl=Pn(U,"DataView"),ma=Pn(U,"Map"),wl=Pn(U,"Promise"),Es=Pn(U,"Set"),xa=Pn(U,"WeakMap"),Ea=Pn(Ut,"create"),Du=xa&&new xa,As={},vm=Fn(bl),mm=Fn(ma),xm=Fn(wl),Em=Fn(Es),Am=Fn(xa),Su=sn?sn.prototype:e,Aa=Su?Su.valueOf:e,gp=Su?Su.toString:e;function v(i){if(jt(i)&&!dt(i)&&!(i instanceof bt)){if(i instanceof _r)return i;if(Lt.call(i,"__wrapped__"))return yd(i)}return new _r(i)}var bs=function(){function i(){}return function(s){if(!Xt(s))return{};if(hp)return hp(s);i.prototype=s;var o=new i;return i.prototype=e,o}}();function Ou(){}function _r(i,s){this.__wrapped__=i,this.__actions__=[],this.__chain__=!!s,this.__index__=0,this.__values__=e}v.templateSettings={escape:Qi,evaluate:si,interpolate:Tn,variable:"",imports:{_:v}},v.prototype=Ou.prototype,v.prototype.constructor=v,_r.prototype=bs(Ou.prototype),_r.prototype.constructor=_r;function bt(i){this.__wrapped__=i,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=se,this.__views__=[]}function bm(){var i=new bt(this.__wrapped__);return i.__actions__=Qe(this.__actions__),i.__dir__=this.__dir__,i.__filtered__=this.__filtered__,i.__iteratees__=Qe(this.__iteratees__),i.__takeCount__=this.__takeCount__,i.__views__=Qe(this.__views__),i}function wm(){if(this.__filtered__){var i=new bt(this);i.__dir__=-1,i.__filtered__=!0}else i=this.clone(),i.__dir__*=-1;return i}function Tm(){var i=this.__wrapped__.value(),s=this.__dir__,o=dt(i),h=s<0,p=o?i.length:0,m=P1(0,p,this.__views__),E=m.start,T=m.end,S=T-E,W=h?T:E-1,V=this.__iteratees__,$=V.length,Q=0,nt=Be(S,this.__takeCount__);if(!o||!h&&p==S&&nt==S)return kp(i,this.__actions__);var ot=[];t:for(;S--&&Q<nt;){W+=s;for(var xt=-1,lt=i[W];++xt<$;){var At=V[xt],Tt=At.iteratee,fr=At.type,ke=Tt(lt);if(fr==ft)lt=ke;else if(!ke){if(fr==ct)continue t;break t}}ot[Q++]=lt}return ot}bt.prototype=bs(Ou.prototype),bt.prototype.constructor=bt;function Bn(i){var s=-1,o=i==null?0:i.length;for(this.clear();++s<o;){var h=i[s];this.set(h[0],h[1])}}function _m(){this.__data__=Ea?Ea(null):{},this.size=0}function Cm(i){var s=this.has(i)&&delete this.__data__[i];return this.size-=s?1:0,s}function Dm(i){var s=this.__data__;if(Ea){var o=s[i];return o===f?e:o}return Lt.call(s,i)?s[i]:e}function Sm(i){var s=this.__data__;return Ea?s[i]!==e:Lt.call(s,i)}function Om(i,s){var o=this.__data__;return this.size+=this.has(i)?0:1,o[i]=Ea&&s===e?f:s,this}Bn.prototype.clear=_m,Bn.prototype.delete=Cm,Bn.prototype.get=Dm,Bn.prototype.has=Sm,Bn.prototype.set=Om;function Di(i){var s=-1,o=i==null?0:i.length;for(this.clear();++s<o;){var h=i[s];this.set(h[0],h[1])}}function Nm(){this.__data__=[],this.size=0}function Mm(i){var s=this.__data__,o=Nu(s,i);if(o<0)return!1;var h=s.length-1;return o==h?s.pop():wu.call(s,o,1),--this.size,!0}function Bm(i){var s=this.__data__,o=Nu(s,i);return o<0?e:s[o][1]}function Im(i){return Nu(this.__data__,i)>-1}function Rm(i,s){var o=this.__data__,h=Nu(o,i);return h<0?(++this.size,o.push([i,s])):o[h][1]=s,this}Di.prototype.clear=Nm,Di.prototype.delete=Mm,Di.prototype.get=Bm,Di.prototype.has=Im,Di.prototype.set=Rm;function Si(i){var s=-1,o=i==null?0:i.length;for(this.clear();++s<o;){var h=i[s];this.set(h[0],h[1])}}function Lm(){this.size=0,this.__data__={hash:new Bn,map:new(ma||Di),string:new Bn}}function Pm(i){var s=Wu(this,i).delete(i);return this.size-=s?1:0,s}function Fm(i){return Wu(this,i).get(i)}function Um(i){return Wu(this,i).has(i)}function km(i,s){var o=Wu(this,i),h=o.size;return o.set(i,s),this.size+=o.size==h?0:1,this}Si.prototype.clear=Lm,Si.prototype.delete=Pm,Si.prototype.get=Fm,Si.prototype.has=Um,Si.prototype.set=km;function In(i){var s=-1,o=i==null?0:i.length;for(this.__data__=new Si;++s<o;)this.add(i[s])}function Hm(i){return this.__data__.set(i,f),this}function qm(i){return this.__data__.has(i)}In.prototype.add=In.prototype.push=Hm,In.prototype.has=qm;function zr(i){var s=this.__data__=new Di(i);this.size=s.size}function Wm(){this.__data__=new Di,this.size=0}function Vm(i){var s=this.__data__,o=s.delete(i);return this.size=s.size,o}function $m(i){return this.__data__.get(i)}function zm(i){return this.__data__.has(i)}function Gm(i,s){var o=this.__data__;if(o instanceof Di){var h=o.__data__;if(!ma||h.length<a-1)return h.push([i,s]),this.size=++o.size,this;o=this.__data__=new Si(h)}return o.set(i,s),this.size=o.size,this}zr.prototype.clear=Wm,zr.prototype.delete=Vm,zr.prototype.get=$m,zr.prototype.has=zm,zr.prototype.set=Gm;function yp(i,s){var o=dt(i),h=!o&&Un(i),p=!o&&!h&&hn(i),m=!o&&!h&&!p&&Cs(i),E=o||h||p||m,T=E?vl(i.length,rm):[],S=T.length;for(var W in i)(s||Lt.call(i,W))&&!(E&&(W=="length"||p&&(W=="offset"||W=="parent")||m&&(W=="buffer"||W=="byteLength"||W=="byteOffset")||Bi(W,S)))&&T.push(W);return T}function vp(i){var s=i.length;return s?i[Rl(0,s-1)]:e}function Ym(i,s){return Vu(Qe(i),Rn(s,0,i.length))}function Xm(i){return Vu(Qe(i))}function Tl(i,s,o){(o!==e&&!Gr(i[s],o)||o===e&&!(s in i))&&Oi(i,s,o)}function ba(i,s,o){var h=i[s];(!(Lt.call(i,s)&&Gr(h,o))||o===e&&!(s in i))&&Oi(i,s,o)}function Nu(i,s){for(var o=i.length;o--;)if(Gr(i[o][0],s))return o;return-1}function Zm(i,s,o,h){return an(i,function(p,m,E){s(h,p,o(p),E)}),h}function mp(i,s){return i&&oi(s,Ee(s),i)}function Qm(i,s){return i&&oi(s,Ke(s),i)}function Oi(i,s,o){s=="__proto__"&&Tu?Tu(i,s,{configurable:!0,enumerable:!0,value:o,writable:!0}):i[s]=o}function _l(i,s){for(var o=-1,h=s.length,p=I(h),m=i==null;++o<h;)p[o]=m?e:sh(i,s[o]);return p}function Rn(i,s,o){return i===i&&(o!==e&&(i=i<=o?i:o),s!==e&&(i=i>=s?i:s)),i}function Cr(i,s,o,h,p,m){var E,T=s&A,S=s&_,W=s&C;if(o&&(E=p?o(i,h,p,m):o(i)),E!==e)return E;if(!Xt(i))return i;var V=dt(i);if(V){if(E=U1(i),!T)return Qe(i,E)}else{var $=Ie(i),Q=$==Pe||$==ze;if(hn(i))return Wp(i,T);if($==Yt||$==ae||Q&&!p){if(E=S||Q?{}:ud(i),!T)return S?D1(i,Qm(E,i)):C1(i,mp(E,i))}else{if(!kt[$])return p?i:{};E=k1(i,$,T)}}m||(m=new zr);var nt=m.get(i);if(nt)return nt;m.set(i,E),Pd(i)?i.forEach(function(lt){E.add(Cr(lt,s,o,lt,i,m))}):Rd(i)&&i.forEach(function(lt,At){E.set(At,Cr(lt,s,o,At,i,m))});var ot=W?S?zl:$l:S?Ke:Ee,xt=V?e:ot(i);return wr(xt||i,function(lt,At){xt&&(At=lt,lt=i[At]),ba(E,At,Cr(lt,s,o,At,i,m))}),E}function jm(i){var s=Ee(i);return function(o){return xp(o,i,s)}}function xp(i,s,o){var h=o.length;if(i==null)return!h;for(i=Ut(i);h--;){var p=o[h],m=s[p],E=i[p];if(E===e&&!(p in i)||!m(E))return!1}return!0}function Ep(i,s,o){if(typeof i!="function")throw new Tr(l);return Oa(function(){i.apply(e,o)},s)}function wa(i,s,o,h){var p=-1,m=pu,E=!0,T=i.length,S=[],W=s.length;if(!T)return S;o&&(s=$t(s,lr(o))),h?(m=cl,E=!1):s.length>=a&&(m=ya,E=!1,s=new In(s));t:for(;++p<T;){var V=i[p],$=o==null?V:o(V);if(V=h||V!==0?V:0,E&&$===$){for(var Q=W;Q--;)if(s[Q]===$)continue t;S.push(V)}else m(s,$,h)||S.push(V)}return S}var an=Yp(ui),Ap=Yp(Dl,!0);function Km(i,s){var o=!0;return an(i,function(h,p,m){return o=!!s(h,p,m),o}),o}function Mu(i,s,o){for(var h=-1,p=i.length;++h<p;){var m=i[h],E=s(m);if(E!=null&&(T===e?E===E&&!cr(E):o(E,T)))var T=E,S=m}return S}function Jm(i,s,o,h){var p=i.length;for(o=gt(o),o<0&&(o=-o>p?0:p+o),h=h===e||h>p?p:gt(h),h<0&&(h+=p),h=o>h?0:Ud(h);o<h;)i[o++]=s;return i}function bp(i,s){var o=[];return an(i,function(h,p,m){s(h,p,m)&&o.push(h)}),o}function Te(i,s,o,h,p){var m=-1,E=i.length;for(o||(o=q1),p||(p=[]);++m<E;){var T=i[m];s>0&&o(T)?s>1?Te(T,s-1,o,h,p):rn(p,T):h||(p[p.length]=T)}return p}var Cl=Xp(),wp=Xp(!0);function ui(i,s){return i&&Cl(i,s,Ee)}function Dl(i,s){return i&&wp(i,s,Ee)}function Bu(i,s){return en(s,function(o){return Ii(i[o])})}function Ln(i,s){s=on(s,i);for(var o=0,h=s.length;i!=null&&o<h;)i=i[li(s[o++])];return o&&o==h?i:e}function Tp(i,s,o){var h=s(i);return dt(i)?h:rn(h,o(i))}function Fe(i){return i==null?i===e?bi:me:Mn&&Mn in Ut(i)?L1(i):X1(i)}function Sl(i,s){return i>s}function t1(i,s){return i!=null&&Lt.call(i,s)}function e1(i,s){return i!=null&&s in Ut(i)}function r1(i,s,o){return i>=Be(s,o)&&i<de(s,o)}function Ol(i,s,o){for(var h=o?cl:pu,p=i[0].length,m=i.length,E=m,T=I(m),S=1/0,W=[];E--;){var V=i[E];E&&s&&(V=$t(V,lr(s))),S=Be(V.length,S),T[E]=!o&&(s||p>=120&&V.length>=120)?new In(E&&V):e}V=i[0];var $=-1,Q=T[0];t:for(;++$<p&&W.length<S;){var nt=V[$],ot=s?s(nt):nt;if(nt=o||nt!==0?nt:0,!(Q?ya(Q,ot):h(W,ot,o))){for(E=m;--E;){var xt=T[E];if(!(xt?ya(xt,ot):h(i[E],ot,o)))continue t}Q&&Q.push(ot),W.push(nt)}}return W}function i1(i,s,o,h){return ui(i,function(p,m,E){s(h,o(p),m,E)}),h}function Ta(i,s,o){s=on(s,i),i=cd(i,s);var h=i==null?i:i[li(Sr(s))];return h==null?e:or(h,i,o)}function _p(i){return jt(i)&&Fe(i)==ae}function n1(i){return jt(i)&&Fe(i)==sr}function s1(i){return jt(i)&&Fe(i)==Ct}function _a(i,s,o,h,p){return i===s?!0:i==null||s==null||!jt(i)&&!jt(s)?i!==i&&s!==s:a1(i,s,o,h,_a,p)}function a1(i,s,o,h,p,m){var E=dt(i),T=dt(s),S=E?Se:Ie(i),W=T?Se:Ie(s);S=S==ae?Yt:S,W=W==ae?Yt:W;var V=S==Yt,$=W==Yt,Q=S==W;if(Q&&hn(i)){if(!hn(s))return!1;E=!0,V=!1}if(Q&&!V)return m||(m=new zr),E||Cs(i)?nd(i,s,o,h,p,m):I1(i,s,S,o,h,p,m);if(!(o&F)){var nt=V&&Lt.call(i,"__wrapped__"),ot=$&&Lt.call(s,"__wrapped__");if(nt||ot){var xt=nt?i.value():i,lt=ot?s.value():s;return m||(m=new zr),p(xt,lt,o,h,m)}}return Q?(m||(m=new zr),R1(i,s,o,h,p,m)):!1}function u1(i){return jt(i)&&Ie(i)==Qt}function Nl(i,s,o,h){var p=o.length,m=p,E=!h;if(i==null)return!m;for(i=Ut(i);p--;){var T=o[p];if(E&&T[2]?T[1]!==i[T[0]]:!(T[0]in i))return!1}for(;++p<m;){T=o[p];var S=T[0],W=i[S],V=T[1];if(E&&T[2]){if(W===e&&!(S in i))return!1}else{var $=new zr;if(h)var Q=h(W,V,S,i,s,$);if(!(Q===e?_a(V,W,F|N,h,$):Q))return!1}}return!0}function Cp(i){if(!Xt(i)||V1(i))return!1;var s=Ii(i)?um:Cn;return s.test(Fn(i))}function o1(i){return jt(i)&&Fe(i)==ue}function l1(i){return jt(i)&&Ie(i)==Dt}function h1(i){return jt(i)&&Zu(i.length)&&!!qt[Fe(i)]}function Dp(i){return typeof i=="function"?i:i==null?Je:typeof i=="object"?dt(i)?Np(i[0],i[1]):Op(i):Zd(i)}function Ml(i){if(!Sa(i))return pm(i);var s=[];for(var o in Ut(i))Lt.call(i,o)&&o!="constructor"&&s.push(o);return s}function c1(i){if(!Xt(i))return Y1(i);var s=Sa(i),o=[];for(var h in i)h=="constructor"&&(s||!Lt.call(i,h))||o.push(h);return o}function Bl(i,s){return i<s}function Sp(i,s){var o=-1,h=je(i)?I(i.length):[];return an(i,function(p,m,E){h[++o]=s(p,m,E)}),h}function Op(i){var s=Yl(i);return s.length==1&&s[0][2]?ld(s[0][0],s[0][1]):function(o){return o===i||Nl(o,i,s)}}function Np(i,s){return Zl(i)&&od(s)?ld(li(i),s):function(o){var h=sh(o,i);return h===e&&h===s?ah(o,i):_a(s,h,F|N)}}function Iu(i,s,o,h,p){i!==s&&Cl(s,function(m,E){if(p||(p=new zr),Xt(m))f1(i,s,E,o,Iu,h,p);else{var T=h?h(jl(i,E),m,E+"",i,s,p):e;T===e&&(T=m),Tl(i,E,T)}},Ke)}function f1(i,s,o,h,p,m,E){var T=jl(i,o),S=jl(s,o),W=E.get(S);if(W){Tl(i,o,W);return}var V=m?m(T,S,o+"",i,s,E):e,$=V===e;if($){var Q=dt(S),nt=!Q&&hn(S),ot=!Q&&!nt&&Cs(S);V=S,Q||nt||ot?dt(T)?V=T:te(T)?V=Qe(T):nt?($=!1,V=Wp(S,!0)):ot?($=!1,V=Vp(S,!0)):V=[]:Na(S)||Un(S)?(V=T,Un(T)?V=kd(T):(!Xt(T)||Ii(T))&&(V=ud(S))):$=!1}$&&(E.set(S,V),p(V,S,h,m,E),E.delete(S)),Tl(i,o,V)}function Mp(i,s){var o=i.length;if(o)return s+=s<0?o:0,Bi(s,o)?i[s]:e}function Bp(i,s,o){s.length?s=$t(s,function(m){return dt(m)?function(E){return Ln(E,m.length===1?m[0]:m)}:m}):s=[Je];var h=-1;s=$t(s,lr(ut()));var p=Sp(i,function(m,E,T){var S=$t(s,function(W){return W(m)});return{criteria:S,index:++h,value:m}});return kv(p,function(m,E){return _1(m,E,o)})}function p1(i,s){return Ip(i,s,function(o,h){return ah(i,h)})}function Ip(i,s,o){for(var h=-1,p=s.length,m={};++h<p;){var E=s[h],T=Ln(i,E);o(T,E)&&Ca(m,on(E,i),T)}return m}function d1(i){return function(s){return Ln(s,i)}}function Il(i,s,o,h){var p=h?Uv:gs,m=-1,E=s.length,T=i;for(i===s&&(s=Qe(s)),o&&(T=$t(i,lr(o)));++m<E;)for(var S=0,W=s[m],V=o?o(W):W;(S=p(T,V,S,h))>-1;)T!==i&&wu.call(T,S,1),wu.call(i,S,1);return i}function Rp(i,s){for(var o=i?s.length:0,h=o-1;o--;){var p=s[o];if(o==h||p!==m){var m=p;Bi(p)?wu.call(i,p,1):Fl(i,p)}}return i}function Rl(i,s){return i+Cu(dp()*(s-i+1))}function g1(i,s,o,h){for(var p=-1,m=de(_u((s-i)/(o||1)),0),E=I(m);m--;)E[h?m:++p]=i,i+=o;return E}function Ll(i,s){var o="";if(!i||s<1||s>Bt)return o;do s%2&&(o+=i),s=Cu(s/2),s&&(i+=i);while(s);return o}function Et(i,s){return Kl(hd(i,s,Je),i+"")}function y1(i){return vp(Ds(i))}function v1(i,s){var o=Ds(i);return Vu(o,Rn(s,0,o.length))}function Ca(i,s,o,h){if(!Xt(i))return i;s=on(s,i);for(var p=-1,m=s.length,E=m-1,T=i;T!=null&&++p<m;){var S=li(s[p]),W=o;if(S==="__proto__"||S==="constructor"||S==="prototype")return i;if(p!=E){var V=T[S];W=h?h(V,S,T):e,W===e&&(W=Xt(V)?V:Bi(s[p+1])?[]:{})}ba(T,S,W),T=T[S]}return i}var Lp=Du?function(i,s){return Du.set(i,s),i}:Je,m1=Tu?function(i,s){return Tu(i,"toString",{configurable:!0,enumerable:!1,value:oh(s),writable:!0})}:Je;function x1(i){return Vu(Ds(i))}function Dr(i,s,o){var h=-1,p=i.length;s<0&&(s=-s>p?0:p+s),o=o>p?p:o,o<0&&(o+=p),p=s>o?0:o-s>>>0,s>>>=0;for(var m=I(p);++h<p;)m[h]=i[h+s];return m}function E1(i,s){var o;return an(i,function(h,p,m){return o=s(h,p,m),!o}),!!o}function Ru(i,s,o){var h=0,p=i==null?h:i.length;if(typeof s=="number"&&s===s&&p<=qr){for(;h<p;){var m=h+p>>>1,E=i[m];E!==null&&!cr(E)&&(o?E<=s:E<s)?h=m+1:p=m}return p}return Pl(i,s,Je,o)}function Pl(i,s,o,h){var p=0,m=i==null?0:i.length;if(m===0)return 0;s=o(s);for(var E=s!==s,T=s===null,S=cr(s),W=s===e;p<m;){var V=Cu((p+m)/2),$=o(i[V]),Q=$!==e,nt=$===null,ot=$===$,xt=cr($);if(E)var lt=h||ot;else W?lt=ot&&(h||Q):T?lt=ot&&Q&&(h||!nt):S?lt=ot&&Q&&!nt&&(h||!xt):nt||xt?lt=!1:lt=h?$<=s:$<s;lt?p=V+1:m=V}return Be(m,ve)}function Pp(i,s){for(var o=-1,h=i.length,p=0,m=[];++o<h;){var E=i[o],T=s?s(E):E;if(!o||!Gr(T,S)){var S=T;m[p++]=E===0?0:E}}return m}function Fp(i){return typeof i=="number"?i:cr(i)?be:+i}function hr(i){if(typeof i=="string")return i;if(dt(i))return $t(i,hr)+"";if(cr(i))return gp?gp.call(i):"";var s=i+"";return s=="0"&&1/i==-yt?"-0":s}function un(i,s,o){var h=-1,p=pu,m=i.length,E=!0,T=[],S=T;if(o)E=!1,p=cl;else if(m>=a){var W=s?null:M1(i);if(W)return gu(W);E=!1,p=ya,S=new In}else S=s?[]:T;t:for(;++h<m;){var V=i[h],$=s?s(V):V;if(V=o||V!==0?V:0,E&&$===$){for(var Q=S.length;Q--;)if(S[Q]===$)continue t;s&&S.push($),T.push(V)}else p(S,$,o)||(S!==T&&S.push($),T.push(V))}return T}function Fl(i,s){return s=on(s,i),i=cd(i,s),i==null||delete i[li(Sr(s))]}function Up(i,s,o,h){return Ca(i,s,o(Ln(i,s)),h)}function Lu(i,s,o,h){for(var p=i.length,m=h?p:-1;(h?m--:++m<p)&&s(i[m],m,i););return o?Dr(i,h?0:m,h?m+1:p):Dr(i,h?m+1:0,h?p:m)}function kp(i,s){var o=i;return o instanceof bt&&(o=o.value()),fl(s,function(h,p){return p.func.apply(p.thisArg,rn([h],p.args))},o)}function Ul(i,s,o){var h=i.length;if(h<2)return h?un(i[0]):[];for(var p=-1,m=I(h);++p<h;)for(var E=i[p],T=-1;++T<h;)T!=p&&(m[p]=wa(m[p]||E,i[T],s,o));return un(Te(m,1),s,o)}function Hp(i,s,o){for(var h=-1,p=i.length,m=s.length,E={};++h<p;){var T=h<m?s[h]:e;o(E,i[h],T)}return E}function kl(i){return te(i)?i:[]}function Hl(i){return typeof i=="function"?i:Je}function on(i,s){return dt(i)?i:Zl(i,s)?[i]:gd(It(i))}var A1=Et;function ln(i,s,o){var h=i.length;return o=o===e?h:o,!s&&o>=h?i:Dr(i,s,o)}var qp=om||function(i){return we.clearTimeout(i)};function Wp(i,s){if(s)return i.slice();var o=i.length,h=lp?lp(o):new i.constructor(o);return i.copy(h),h}function ql(i){var s=new i.constructor(i.byteLength);return new Au(s).set(new Au(i)),s}function b1(i,s){var o=s?ql(i.buffer):i.buffer;return new i.constructor(o,i.byteOffset,i.byteLength)}function w1(i){var s=new i.constructor(i.source,ca.exec(i));return s.lastIndex=i.lastIndex,s}function T1(i){return Aa?Ut(Aa.call(i)):{}}function Vp(i,s){var o=s?ql(i.buffer):i.buffer;return new i.constructor(o,i.byteOffset,i.length)}function $p(i,s){if(i!==s){var o=i!==e,h=i===null,p=i===i,m=cr(i),E=s!==e,T=s===null,S=s===s,W=cr(s);if(!T&&!W&&!m&&i>s||m&&E&&S&&!T&&!W||h&&E&&S||!o&&S||!p)return 1;if(!h&&!m&&!W&&i<s||W&&o&&p&&!h&&!m||T&&o&&p||!E&&p||!S)return-1}return 0}function _1(i,s,o){for(var h=-1,p=i.criteria,m=s.criteria,E=p.length,T=o.length;++h<E;){var S=$p(p[h],m[h]);if(S){if(h>=T)return S;var W=o[h];return S*(W=="desc"?-1:1)}}return i.index-s.index}function zp(i,s,o,h){for(var p=-1,m=i.length,E=o.length,T=-1,S=s.length,W=de(m-E,0),V=I(S+W),$=!h;++T<S;)V[T]=s[T];for(;++p<E;)($||p<m)&&(V[o[p]]=i[p]);for(;W--;)V[T++]=i[p++];return V}function Gp(i,s,o,h){for(var p=-1,m=i.length,E=-1,T=o.length,S=-1,W=s.length,V=de(m-T,0),$=I(V+W),Q=!h;++p<V;)$[p]=i[p];for(var nt=p;++S<W;)$[nt+S]=s[S];for(;++E<T;)(Q||p<m)&&($[nt+o[E]]=i[p++]);return $}function Qe(i,s){var o=-1,h=i.length;for(s||(s=I(h));++o<h;)s[o]=i[o];return s}function oi(i,s,o,h){var p=!o;o||(o={});for(var m=-1,E=s.length;++m<E;){var T=s[m],S=h?h(o[T],i[T],T,o,i):e;S===e&&(S=i[T]),p?Oi(o,T,S):ba(o,T,S)}return o}function C1(i,s){return oi(i,Xl(i),s)}function D1(i,s){return oi(i,sd(i),s)}function Pu(i,s){return function(o,h){var p=dt(o)?Bv:Zm,m=s?s():{};return p(o,i,ut(h,2),m)}}function ws(i){return Et(function(s,o){var h=-1,p=o.length,m=p>1?o[p-1]:e,E=p>2?o[2]:e;for(m=i.length>3&&typeof m=="function"?(p--,m):e,E&&Ue(o[0],o[1],E)&&(m=p<3?e:m,p=1),s=Ut(s);++h<p;){var T=o[h];T&&i(s,T,h,m)}return s})}function Yp(i,s){return function(o,h){if(o==null)return o;if(!je(o))return i(o,h);for(var p=o.length,m=s?p:-1,E=Ut(o);(s?m--:++m<p)&&h(E[m],m,E)!==!1;);return o}}function Xp(i){return function(s,o,h){for(var p=-1,m=Ut(s),E=h(s),T=E.length;T--;){var S=E[i?T:++p];if(o(m[S],S,m)===!1)break}return s}}function S1(i,s,o){var h=s&M,p=Da(i);function m(){var E=this&&this!==we&&this instanceof m?p:i;return E.apply(h?o:this,arguments)}return m}function Zp(i){return function(s){s=It(s);var o=ys(s)?$r(s):e,h=o?o[0]:s.charAt(0),p=o?ln(o,1).join(""):s.slice(1);return h[i]()+p}}function Ts(i){return function(s){return fl(Yd(Gd(s).replace(mv,"")),i,"")}}function Da(i){return function(){var s=arguments;switch(s.length){case 0:return new i;case 1:return new i(s[0]);case 2:return new i(s[0],s[1]);case 3:return new i(s[0],s[1],s[2]);case 4:return new i(s[0],s[1],s[2],s[3]);case 5:return new i(s[0],s[1],s[2],s[3],s[4]);case 6:return new i(s[0],s[1],s[2],s[3],s[4],s[5]);case 7:return new i(s[0],s[1],s[2],s[3],s[4],s[5],s[6])}var o=bs(i.prototype),h=i.apply(o,s);return Xt(h)?h:o}}function O1(i,s,o){var h=Da(i);function p(){for(var m=arguments.length,E=I(m),T=m,S=_s(p);T--;)E[T]=arguments[T];var W=m<3&&E[0]!==S&&E[m-1]!==S?[]:nn(E,S);if(m-=W.length,m<o)return td(i,s,Fu,p.placeholder,e,E,W,e,e,o-m);var V=this&&this!==we&&this instanceof p?h:i;return or(V,this,E)}return p}function Qp(i){return function(s,o,h){var p=Ut(s);if(!je(s)){var m=ut(o,3);s=Ee(s),o=function(T){return m(p[T],T,p)}}var E=i(s,o,h);return E>-1?p[m?s[E]:E]:e}}function jp(i){return Mi(function(s){var o=s.length,h=o,p=_r.prototype.thru;for(i&&s.reverse();h--;){var m=s[h];if(typeof m!="function")throw new Tr(l);if(p&&!E&&qu(m)=="wrapper")var E=new _r([],!0)}for(h=E?h:o;++h<o;){m=s[h];var T=qu(m),S=T=="wrapper"?Gl(m):e;S&&Ql(S[0])&&S[1]==(j|z|L|tt)&&!S[4].length&&S[9]==1?E=E[qu(S[0])].apply(E,S[3]):E=m.length==1&&Ql(m)?E[T]():E.thru(m)}return function(){var W=arguments,V=W[0];if(E&&W.length==1&&dt(V))return E.plant(V).value();for(var $=0,Q=o?s[$].apply(this,W):V;++$<o;)Q=s[$].call(this,Q);return Q}})}function Fu(i,s,o,h,p,m,E,T,S,W){var V=s&j,$=s&M,Q=s&R,nt=s&(z|w),ot=s&Z,xt=Q?e:Da(i);function lt(){for(var At=arguments.length,Tt=I(At),fr=At;fr--;)Tt[fr]=arguments[fr];if(nt)var ke=_s(lt),pr=qv(Tt,ke);if(h&&(Tt=zp(Tt,h,p,nt)),m&&(Tt=Gp(Tt,m,E,nt)),At-=pr,nt&&At<W){var ee=nn(Tt,ke);return td(i,s,Fu,lt.placeholder,o,Tt,ee,T,S,W-At)}var Yr=$?o:this,Li=Q?Yr[i]:i;return At=Tt.length,T?Tt=Z1(Tt,T):ot&&At>1&&Tt.reverse(),V&&S<At&&(Tt.length=S),this&&this!==we&&this instanceof lt&&(Li=xt||Da(Li)),Li.apply(Yr,Tt)}return lt}function Kp(i,s){return function(o,h){return i1(o,i,s(h),{})}}function Uu(i,s){return function(o,h){var p;if(o===e&&h===e)return s;if(o!==e&&(p=o),h!==e){if(p===e)return h;typeof o=="string"||typeof h=="string"?(o=hr(o),h=hr(h)):(o=Fp(o),h=Fp(h)),p=i(o,h)}return p}}function Wl(i){return Mi(function(s){return s=$t(s,lr(ut())),Et(function(o){var h=this;return i(s,function(p){return or(p,h,o)})})})}function ku(i,s){s=s===e?" ":hr(s);var o=s.length;if(o<2)return o?Ll(s,i):s;var h=Ll(s,_u(i/vs(s)));return ys(s)?ln($r(h),0,i).join(""):h.slice(0,i)}function N1(i,s,o,h){var p=s&M,m=Da(i);function E(){for(var T=-1,S=arguments.length,W=-1,V=h.length,$=I(V+S),Q=this&&this!==we&&this instanceof E?m:i;++W<V;)$[W]=h[W];for(;S--;)$[W++]=arguments[++T];return or(Q,p?o:this,$)}return E}function Jp(i){return function(s,o,h){return h&&typeof h!="number"&&Ue(s,o,h)&&(o=h=e),s=Ri(s),o===e?(o=s,s=0):o=Ri(o),h=h===e?s<o?1:-1:Ri(h),g1(s,o,h,i)}}function Hu(i){return function(s,o){return typeof s=="string"&&typeof o=="string"||(s=Or(s),o=Or(o)),i(s,o)}}function td(i,s,o,h,p,m,E,T,S,W){var V=s&z,$=V?E:e,Q=V?e:E,nt=V?m:e,ot=V?e:m;s|=V?L:k,s&=~(V?k:L),s&q||(s&=~(M|R));var xt=[i,s,p,nt,$,ot,Q,T,S,W],lt=o.apply(e,xt);return Ql(i)&&fd(lt,xt),lt.placeholder=h,pd(lt,i,s)}function Vl(i){var s=pe[i];return function(o,h){if(o=Or(o),h=h==null?0:Be(gt(h),292),h&&pp(o)){var p=(It(o)+"e").split("e"),m=s(p[0]+"e"+(+p[1]+h));return p=(It(m)+"e").split("e"),+(p[0]+"e"+(+p[1]-h))}return s(o)}}var M1=Es&&1/gu(new Es([,-0]))[1]==yt?function(i){return new Es(i)}:ch;function ed(i){return function(s){var o=Ie(s);return o==Qt?xl(s):o==Dt?Xv(s):Hv(s,i(s))}}function Ni(i,s,o,h,p,m,E,T){var S=s&R;if(!S&&typeof i!="function")throw new Tr(l);var W=h?h.length:0;if(W||(s&=~(L|k),h=p=e),E=E===e?E:de(gt(E),0),T=T===e?T:gt(T),W-=p?p.length:0,s&k){var V=h,$=p;h=p=e}var Q=S?e:Gl(i),nt=[i,s,o,h,p,V,$,m,E,T];if(Q&&G1(nt,Q),i=nt[0],s=nt[1],o=nt[2],h=nt[3],p=nt[4],T=nt[9]=nt[9]===e?S?0:i.length:de(nt[9]-W,0),!T&&s&(z|w)&&(s&=~(z|w)),!s||s==M)var ot=S1(i,s,o);else s==z||s==w?ot=O1(i,s,T):(s==L||s==(M|L))&&!p.length?ot=N1(i,s,o,h):ot=Fu.apply(e,nt);var xt=Q?Lp:fd;return pd(xt(ot,nt),i,s)}function rd(i,s,o,h){return i===e||Gr(i,xs[o])&&!Lt.call(h,o)?s:i}function id(i,s,o,h,p,m){return Xt(i)&&Xt(s)&&(m.set(s,i),Iu(i,s,e,id,m),m.delete(s)),i}function B1(i){return Na(i)?e:i}function nd(i,s,o,h,p,m){var E=o&F,T=i.length,S=s.length;if(T!=S&&!(E&&S>T))return!1;var W=m.get(i),V=m.get(s);if(W&&V)return W==s&&V==i;var $=-1,Q=!0,nt=o&N?new In:e;for(m.set(i,s),m.set(s,i);++$<T;){var ot=i[$],xt=s[$];if(h)var lt=E?h(xt,ot,$,s,i,m):h(ot,xt,$,i,s,m);if(lt!==e){if(lt)continue;Q=!1;break}if(nt){if(!pl(s,function(At,Tt){if(!ya(nt,Tt)&&(ot===At||p(ot,At,o,h,m)))return nt.push(Tt)})){Q=!1;break}}else if(!(ot===xt||p(ot,xt,o,h,m))){Q=!1;break}}return m.delete(i),m.delete(s),Q}function I1(i,s,o,h,p,m,E){switch(o){case Ye:if(i.byteLength!=s.byteLength||i.byteOffset!=s.byteOffset)return!1;i=i.buffer,s=s.buffer;case sr:return!(i.byteLength!=s.byteLength||!m(new Au(i),new Au(s)));case Gt:case Ct:case Ne:return Gr(+i,+s);case Oe:return i.name==s.name&&i.message==s.message;case ue:case nr:return i==s+"";case Qt:var T=xl;case Dt:var S=h&F;if(T||(T=gu),i.size!=s.size&&!S)return!1;var W=E.get(i);if(W)return W==s;h|=N,E.set(i,s);var V=nd(T(i),T(s),h,p,m,E);return E.delete(i),V;case Ge:if(Aa)return Aa.call(i)==Aa.call(s)}return!1}function R1(i,s,o,h,p,m){var E=o&F,T=$l(i),S=T.length,W=$l(s),V=W.length;if(S!=V&&!E)return!1;for(var $=S;$--;){var Q=T[$];if(!(E?Q in s:Lt.call(s,Q)))return!1}var nt=m.get(i),ot=m.get(s);if(nt&&ot)return nt==s&&ot==i;var xt=!0;m.set(i,s),m.set(s,i);for(var lt=E;++$<S;){Q=T[$];var At=i[Q],Tt=s[Q];if(h)var fr=E?h(Tt,At,Q,s,i,m):h(At,Tt,Q,i,s,m);if(!(fr===e?At===Tt||p(At,Tt,o,h,m):fr)){xt=!1;break}lt||(lt=Q=="constructor")}if(xt&&!lt){var ke=i.constructor,pr=s.constructor;ke!=pr&&"constructor"in i&&"constructor"in s&&!(typeof ke=="function"&&ke instanceof ke&&typeof pr=="function"&&pr instanceof pr)&&(xt=!1)}return m.delete(i),m.delete(s),xt}function Mi(i){return Kl(hd(i,e,xd),i+"")}function $l(i){return Tp(i,Ee,Xl)}function zl(i){return Tp(i,Ke,sd)}var Gl=Du?function(i){return Du.get(i)}:ch;function qu(i){for(var s=i.name+"",o=As[s],h=Lt.call(As,s)?o.length:0;h--;){var p=o[h],m=p.func;if(m==null||m==i)return p.name}return s}function _s(i){var s=Lt.call(v,"placeholder")?v:i;return s.placeholder}function ut(){var i=v.iteratee||lh;return i=i===lh?Dp:i,arguments.length?i(arguments[0],arguments[1]):i}function Wu(i,s){var o=i.__data__;return W1(s)?o[typeof s=="string"?"string":"hash"]:o.map}function Yl(i){for(var s=Ee(i),o=s.length;o--;){var h=s[o],p=i[h];s[o]=[h,p,od(p)]}return s}function Pn(i,s){var o=zv(i,s);return Cp(o)?o:e}function L1(i){var s=Lt.call(i,Mn),o=i[Mn];try{i[Mn]=e;var h=!0}catch{}var p=xu.call(i);return h&&(s?i[Mn]=o:delete i[Mn]),p}var Xl=Al?function(i){return i==null?[]:(i=Ut(i),en(Al(i),function(s){return cp.call(i,s)}))}:fh,sd=Al?function(i){for(var s=[];i;)rn(s,Xl(i)),i=bu(i);return s}:fh,Ie=Fe;(bl&&Ie(new bl(new ArrayBuffer(1)))!=Ye||ma&&Ie(new ma)!=Qt||wl&&Ie(wl.resolve())!=ii||Es&&Ie(new Es)!=Dt||xa&&Ie(new xa)!=mr)&&(Ie=function(i){var s=Fe(i),o=s==Yt?i.constructor:e,h=o?Fn(o):"";if(h)switch(h){case vm:return Ye;case mm:return Qt;case xm:return ii;case Em:return Dt;case Am:return mr}return s});function P1(i,s,o){for(var h=-1,p=o.length;++h<p;){var m=o[h],E=m.size;switch(m.type){case"drop":i+=E;break;case"dropRight":s-=E;break;case"take":s=Be(s,i+E);break;case"takeRight":i=de(i,s-E);break}}return{start:i,end:s}}function F1(i){var s=i.match(il);return s?s[1].split(au):[]}function ad(i,s,o){s=on(s,i);for(var h=-1,p=s.length,m=!1;++h<p;){var E=li(s[h]);if(!(m=i!=null&&o(i,E)))break;i=i[E]}return m||++h!=p?m:(p=i==null?0:i.length,!!p&&Zu(p)&&Bi(E,p)&&(dt(i)||Un(i)))}function U1(i){var s=i.length,o=new i.constructor(s);return s&&typeof i[0]=="string"&&Lt.call(i,"index")&&(o.index=i.index,o.input=i.input),o}function ud(i){return typeof i.constructor=="function"&&!Sa(i)?bs(bu(i)):{}}function k1(i,s,o){var h=i.constructor;switch(s){case sr:return ql(i);case Gt:case Ct:return new h(+i);case Ye:return b1(i,o);case Yi:case Xi:case ni:case wi:case bn:case P:case it:case at:case wt:return Vp(i,o);case Qt:return new h;case Ne:case nr:return new h(i);case ue:return w1(i);case Dt:return new h;case Ge:return T1(i)}}function H1(i,s){var o=s.length;if(!o)return i;var h=o-1;return s[h]=(o>1?"& ":"")+s[h],s=s.join(o>2?", ":" "),i.replace(ha,`{
|
|
13
13
|
/* [wrapped with `+s+`] */
|
|
14
|
-
`)}function q1(i){return dt(i)||Un(i)||!!(pp&&i&&i[pp])}function Bi(i,s){var o=typeof i;return s=s??Bt,!!s&&(o=="number"||o!="symbol"&&os.test(i))&&i>-1&&i%1==0&&i<s}function Ue(i,s,o){if(!Xt(o))return!1;var h=typeof s;return(h=="number"?je(o)&&Bi(s,o.length):h=="string"&&s in o)?Gr(o[s],i):!1}function Zl(i,s){if(dt(i))return!1;var o=typeof i;return o=="number"||o=="symbol"||o=="boolean"||i==null||cr(i)?!0:ji.test(i)||!_n.test(i)||s!=null&&i in Ut(s)}function W1(i){var s=typeof i;return s=="string"||s=="number"||s=="symbol"||s=="boolean"?i!=="__proto__":i===null}function Ql(i){var s=qu(i),o=v[s];if(typeof o!="function"||!(s in bt.prototype))return!1;if(i===o)return!0;var h=Gl(o);return!!h&&i===h[0]}function V1(i){return!!lp&&lp in i}var $1=vu?Ii:ph;function Sa(i){var s=i&&i.constructor,o=typeof s=="function"&&s.prototype||xs;return i===o}function ld(i){return i===i&&!Xt(i)}function hd(i,s){return function(o){return o==null?!1:o[i]===s&&(s!==e||i in Ut(o))}}function z1(i){var s=Yu(i,function(h){return o.size===d&&o.clear(),h}),o=s.cache;return s}function G1(i,s){var o=i[1],h=s[1],p=o|h,m=p<(M|R|j),E=h==j&&o==z||h==j&&o==tt&&i[7].length<=s[8]||h==(j|tt)&&s[7].length<=s[8]&&o==z;if(!(m||E))return i;h&M&&(i[2]=s[2],p|=o&M?0:q);var T=s[3];if(T){var S=i[3];i[3]=S?Gp(S,T,s[4]):T,i[4]=S?nn(i[3],y):s[4]}return T=s[5],T&&(S=i[5],i[5]=S?Yp(S,T,s[6]):T,i[6]=S?nn(i[5],y):s[6]),T=s[7],T&&(i[7]=T),h&j&&(i[8]=i[8]==null?s[8]:Be(i[8],s[8])),i[9]==null&&(i[9]=s[9]),i[0]=s[0],i[1]=p,i}function Y1(i){var s=[];if(i!=null)for(var o in Ut(i))s.push(o);return s}function X1(i){return xu.call(i)}function cd(i,s,o){return s=de(s===e?i.length-1:s,0),function(){for(var h=arguments,p=-1,m=de(h.length-s,0),E=I(m);++p<m;)E[p]=h[s+p];p=-1;for(var T=I(s+1);++p<s;)T[p]=h[p];return T[s]=o(E),or(i,this,T)}}function fd(i,s){return s.length<2?i:Ln(i,Dr(s,0,-1))}function Z1(i,s){for(var o=i.length,h=Be(s.length,o),p=Qe(i);h--;){var m=s[h];i[h]=Bi(m,o)?p[m]:e}return i}function jl(i,s){if(!(s==="constructor"&&typeof i[s]=="function")&&s!="__proto__")return i[s]}var pd=gd(Pp),Oa=hm||function(i,s){return we.setTimeout(i,s)},Kl=gd(m1);function dd(i,s,o){var h=s+"";return Kl(i,H1(h,Q1(F1(h),o)))}function gd(i){var s=0,o=0;return function(){var h=dm(),p=ht-(h-o);if(o=h,p>0){if(++s>=st)return arguments[0]}else s=0;return i.apply(e,arguments)}}function Vu(i,s){var o=-1,h=i.length,p=h-1;for(s=s===e?h:s;++o<s;){var m=Rl(o,p),E=i[m];i[m]=i[o],i[o]=E}return i.length=s,i}var yd=z1(function(i){var s=[];return i.charCodeAt(0)===46&&s.push(""),i.replace(el,function(o,h,p,m){s.push(p?m.replace(ou,"$1"):h||o)}),s});function li(i){if(typeof i=="string"||cr(i))return i;var s=i+"";return s=="0"&&1/i==-yt?"-0":s}function Fn(i){if(i!=null){try{return mu.call(i)}catch{}try{return i+""}catch{}}return""}function Q1(i,s){return wr(Le,function(o){var h="_."+o[0];s&o[1]&&!pu(i,h)&&i.push(h)}),i.sort()}function vd(i){if(i instanceof bt)return i.clone();var s=new _r(i.__wrapped__,i.__chain__);return s.__actions__=Qe(i.__actions__),s.__index__=i.__index__,s.__values__=i.__values__,s}function j1(i,s,o){(o?Ue(i,s,o):s===e)?s=1:s=de(gt(s),0);var h=i==null?0:i.length;if(!h||s<1)return[];for(var p=0,m=0,E=I(_u(h/s));p<h;)E[m++]=Dr(i,p,p+=s);return E}function K1(i){for(var s=-1,o=i==null?0:i.length,h=0,p=[];++s<o;){var m=i[s];m&&(p[h++]=m)}return p}function J1(){var i=arguments.length;if(!i)return[];for(var s=I(i-1),o=arguments[0],h=i;h--;)s[h-1]=arguments[h];return rn(dt(o)?Qe(o):[o],Te(s,1))}var tx=Et(function(i,s){return te(i)?wa(i,Te(s,1,te,!0)):[]}),ex=Et(function(i,s){var o=Sr(s);return te(o)&&(o=e),te(i)?wa(i,Te(s,1,te,!0),ut(o,2)):[]}),rx=Et(function(i,s){var o=Sr(s);return te(o)&&(o=e),te(i)?wa(i,Te(s,1,te,!0),e,o):[]});function ix(i,s,o){var h=i==null?0:i.length;return h?(s=o||s===e?1:gt(s),Dr(i,s<0?0:s,h)):[]}function nx(i,s,o){var h=i==null?0:i.length;return h?(s=o||s===e?1:gt(s),s=h-s,Dr(i,0,s<0?0:s)):[]}function sx(i,s){return i&&i.length?Lu(i,ut(s,3),!0,!0):[]}function ax(i,s){return i&&i.length?Lu(i,ut(s,3),!0):[]}function ux(i,s,o,h){var p=i==null?0:i.length;return p?(o&&typeof o!="number"&&Ue(i,s,o)&&(o=0,h=p),Jm(i,s,o,h)):[]}function md(i,s,o){var h=i==null?0:i.length;if(!h)return-1;var p=o==null?0:gt(o);return p<0&&(p=de(h+p,0)),du(i,ut(s,3),p)}function xd(i,s,o){var h=i==null?0:i.length;if(!h)return-1;var p=h-1;return o!==e&&(p=gt(o),p=o<0?de(h+p,0):Be(p,h-1)),du(i,ut(s,3),p,!0)}function Ed(i){var s=i==null?0:i.length;return s?Te(i,1):[]}function ox(i){var s=i==null?0:i.length;return s?Te(i,yt):[]}function lx(i,s){var o=i==null?0:i.length;return o?(s=s===e?1:gt(s),Te(i,s)):[]}function hx(i){for(var s=-1,o=i==null?0:i.length,h={};++s<o;){var p=i[s];h[p[0]]=p[1]}return h}function Ad(i){return i&&i.length?i[0]:e}function cx(i,s,o){var h=i==null?0:i.length;if(!h)return-1;var p=o==null?0:gt(o);return p<0&&(p=de(h+p,0)),gs(i,s,p)}function fx(i){var s=i==null?0:i.length;return s?Dr(i,0,-1):[]}var px=Et(function(i){var s=$t(i,kl);return s.length&&s[0]===i[0]?Ol(s):[]}),dx=Et(function(i){var s=Sr(i),o=$t(i,kl);return s===Sr(o)?s=e:o.pop(),o.length&&o[0]===i[0]?Ol(o,ut(s,2)):[]}),gx=Et(function(i){var s=Sr(i),o=$t(i,kl);return s=typeof s=="function"?s:e,s&&o.pop(),o.length&&o[0]===i[0]?Ol(o,e,s):[]});function yx(i,s){return i==null?"":fm.call(i,s)}function Sr(i){var s=i==null?0:i.length;return s?i[s-1]:e}function vx(i,s,o){var h=i==null?0:i.length;if(!h)return-1;var p=h;return o!==e&&(p=gt(o),p=p<0?de(h+p,0):Be(p,h-1)),s===s?Qv(i,s,p):du(i,ep,p,!0)}function mx(i,s){return i&&i.length?Bp(i,gt(s)):e}var xx=Et(bd);function bd(i,s){return i&&i.length&&s&&s.length?Il(i,s):i}function Ex(i,s,o){return i&&i.length&&s&&s.length?Il(i,s,ut(o,2)):i}function Ax(i,s,o){return i&&i.length&&s&&s.length?Il(i,s,e,o):i}var bx=Mi(function(i,s){var o=i==null?0:i.length,h=_l(i,s);return Lp(i,$t(s,function(p){return Bi(p,o)?+p:p}).sort(zp)),h});function wx(i,s){var o=[];if(!(i&&i.length))return o;var h=-1,p=[],m=i.length;for(s=ut(s,3);++h<m;){var E=i[h];s(E,h,i)&&(o.push(E),p.push(h))}return Lp(i,p),o}function Jl(i){return i==null?i:ym.call(i)}function Tx(i,s,o){var h=i==null?0:i.length;return h?(o&&typeof o!="number"&&Ue(i,s,o)?(s=0,o=h):(s=s==null?0:gt(s),o=o===e?h:gt(o)),Dr(i,s,o)):[]}function _x(i,s){return Ru(i,s)}function Cx(i,s,o){return Pl(i,s,ut(o,2))}function Dx(i,s){var o=i==null?0:i.length;if(o){var h=Ru(i,s);if(h<o&&Gr(i[h],s))return h}return-1}function Sx(i,s){return Ru(i,s,!0)}function Ox(i,s,o){return Pl(i,s,ut(o,2),!0)}function Nx(i,s){var o=i==null?0:i.length;if(o){var h=Ru(i,s,!0)-1;if(Gr(i[h],s))return h}return-1}function Mx(i){return i&&i.length?Fp(i):[]}function Bx(i,s){return i&&i.length?Fp(i,ut(s,2)):[]}function Ix(i){var s=i==null?0:i.length;return s?Dr(i,1,s):[]}function Rx(i,s,o){return i&&i.length?(s=o||s===e?1:gt(s),Dr(i,0,s<0?0:s)):[]}function Lx(i,s,o){var h=i==null?0:i.length;return h?(s=o||s===e?1:gt(s),s=h-s,Dr(i,s<0?0:s,h)):[]}function Px(i,s){return i&&i.length?Lu(i,ut(s,3),!1,!0):[]}function Fx(i,s){return i&&i.length?Lu(i,ut(s,3)):[]}var Ux=Et(function(i){return un(Te(i,1,te,!0))}),kx=Et(function(i){var s=Sr(i);return te(s)&&(s=e),un(Te(i,1,te,!0),ut(s,2))}),Hx=Et(function(i){var s=Sr(i);return s=typeof s=="function"?s:e,un(Te(i,1,te,!0),e,s)});function qx(i){return i&&i.length?un(i):[]}function Wx(i,s){return i&&i.length?un(i,ut(s,2)):[]}function Vx(i,s){return s=typeof s=="function"?s:e,i&&i.length?un(i,e,s):[]}function th(i){if(!(i&&i.length))return[];var s=0;return i=en(i,function(o){if(te(o))return s=de(o.length,s),!0}),vl(s,function(o){return $t(i,dl(o))})}function wd(i,s){if(!(i&&i.length))return[];var o=th(i);return s==null?o:$t(o,function(h){return or(s,e,h)})}var $x=Et(function(i,s){return te(i)?wa(i,s):[]}),zx=Et(function(i){return Ul(en(i,te))}),Gx=Et(function(i){var s=Sr(i);return te(s)&&(s=e),Ul(en(i,te),ut(s,2))}),Yx=Et(function(i){var s=Sr(i);return s=typeof s=="function"?s:e,Ul(en(i,te),e,s)}),Xx=Et(th);function Zx(i,s){return qp(i||[],s||[],ba)}function Qx(i,s){return qp(i||[],s||[],Ca)}var jx=Et(function(i){var s=i.length,o=s>1?i[s-1]:e;return o=typeof o=="function"?(i.pop(),o):e,wd(i,o)});function Td(i){var s=v(i);return s.__chain__=!0,s}function Kx(i,s){return s(i),i}function $u(i,s){return s(i)}var Jx=Mi(function(i){var s=i.length,o=s?i[0]:0,h=this.__wrapped__,p=function(m){return _l(m,i)};return s>1||this.__actions__.length||!(h instanceof bt)||!Bi(o)?this.thru(p):(h=h.slice(o,+o+(s?1:0)),h.__actions__.push({func:$u,args:[p],thisArg:e}),new _r(h,this.__chain__).thru(function(m){return s&&!m.length&&m.push(e),m}))});function tE(){return Td(this)}function eE(){return new _r(this.value(),this.__chain__)}function rE(){this.__values__===e&&(this.__values__=Ud(this.value()));var i=this.__index__>=this.__values__.length,s=i?e:this.__values__[this.__index__++];return{done:i,value:s}}function iE(){return this}function nE(i){for(var s,o=this;o instanceof Ou;){var h=vd(o);h.__index__=0,h.__values__=e,s?p.__wrapped__=h:s=h;var p=h;o=o.__wrapped__}return p.__wrapped__=i,s}function sE(){var i=this.__wrapped__;if(i instanceof bt){var s=i;return this.__actions__.length&&(s=new bt(this)),s=s.reverse(),s.__actions__.push({func:$u,args:[Jl],thisArg:e}),new _r(s,this.__chain__)}return this.thru(Jl)}function aE(){return Hp(this.__wrapped__,this.__actions__)}var uE=Pu(function(i,s,o){Lt.call(i,o)?++i[o]:Oi(i,o,1)});function oE(i,s,o){var h=dt(i)?Jf:Km;return o&&Ue(i,s,o)&&(s=e),h(i,ut(s,3))}function lE(i,s){var o=dt(i)?en:wp;return o(i,ut(s,3))}var hE=jp(md),cE=jp(xd);function fE(i,s){return Te(zu(i,s),1)}function pE(i,s){return Te(zu(i,s),yt)}function dE(i,s,o){return o=o===e?1:gt(o),Te(zu(i,s),o)}function _d(i,s){var o=dt(i)?wr:an;return o(i,ut(s,3))}function Cd(i,s){var o=dt(i)?Iv:bp;return o(i,ut(s,3))}var gE=Pu(function(i,s,o){Lt.call(i,o)?i[o].push(s):Oi(i,o,[s])});function yE(i,s,o,h){i=je(i)?i:Ds(i),o=o&&!h?gt(o):0;var p=i.length;return o<0&&(o=de(p+o,0)),Qu(i)?o<=p&&i.indexOf(s,o)>-1:!!p&&gs(i,s,o)>-1}var vE=Et(function(i,s,o){var h=-1,p=typeof s=="function",m=je(i)?I(i.length):[];return an(i,function(E){m[++h]=p?or(s,E,o):Ta(E,s,o)}),m}),mE=Pu(function(i,s,o){Oi(i,o,s)});function zu(i,s){var o=dt(i)?$t:Op;return o(i,ut(s,3))}function xE(i,s,o,h){return i==null?[]:(dt(s)||(s=s==null?[]:[s]),o=h?e:o,dt(o)||(o=o==null?[]:[o]),Ip(i,s,o))}var EE=Pu(function(i,s,o){i[o?0:1].push(s)},function(){return[[],[]]});function AE(i,s,o){var h=dt(i)?fl:ip,p=arguments.length<3;return h(i,ut(s,4),o,p,an)}function bE(i,s,o){var h=dt(i)?Rv:ip,p=arguments.length<3;return h(i,ut(s,4),o,p,bp)}function wE(i,s){var o=dt(i)?en:wp;return o(i,Xu(ut(s,3)))}function TE(i){var s=dt(i)?mp:y1;return s(i)}function _E(i,s,o){(o?Ue(i,s,o):s===e)?s=1:s=gt(s);var h=dt(i)?Ym:v1;return h(i,s)}function CE(i){var s=dt(i)?Xm:x1;return s(i)}function DE(i){if(i==null)return 0;if(je(i))return Qu(i)?vs(i):i.length;var s=Ie(i);return s==Qt||s==Dt?i.size:Ml(i).length}function SE(i,s,o){var h=dt(i)?pl:E1;return o&&Ue(i,s,o)&&(s=e),h(i,ut(s,3))}var OE=Et(function(i,s){if(i==null)return[];var o=s.length;return o>1&&Ue(i,s[0],s[1])?s=[]:o>2&&Ue(s[0],s[1],s[2])&&(s=[s[0]]),Ip(i,Te(s,1),[])}),Gu=lm||function(){return we.Date.now()};function NE(i,s){if(typeof s!="function")throw new Tr(l);return i=gt(i),function(){if(--i<1)return s.apply(this,arguments)}}function Dd(i,s,o){return s=o?e:s,s=i&&s==null?i.length:s,Ni(i,j,e,e,e,e,s)}function Sd(i,s){var o;if(typeof s!="function")throw new Tr(l);return i=gt(i),function(){return--i>0&&(o=s.apply(this,arguments)),i<=1&&(s=e),o}}var eh=Et(function(i,s,o){var h=M;if(o.length){var p=nn(o,_s(eh));h|=L}return Ni(i,h,s,o,p)}),Od=Et(function(i,s,o){var h=M|R;if(o.length){var p=nn(o,_s(Od));h|=L}return Ni(s,h,i,o,p)});function Nd(i,s,o){s=o?e:s;var h=Ni(i,z,e,e,e,e,e,s);return h.placeholder=Nd.placeholder,h}function Md(i,s,o){s=o?e:s;var h=Ni(i,w,e,e,e,e,e,s);return h.placeholder=Md.placeholder,h}function Bd(i,s,o){var h,p,m,E,T,S,W=0,V=!1,$=!1,Q=!0;if(typeof i!="function")throw new Tr(l);s=Or(s)||0,Xt(o)&&(V=!!o.leading,$="maxWait"in o,m=$?de(Or(o.maxWait)||0,s):m,Q="trailing"in o?!!o.trailing:Q);function nt(ee){var Yr=h,Li=p;return h=p=e,W=ee,E=i.apply(Li,Yr),E}function ot(ee){return W=ee,T=Oa(At,s),V?nt(ee):E}function xt(ee){var Yr=ee-S,Li=ee-W,jd=s-Yr;return $?Be(jd,m-Li):jd}function lt(ee){var Yr=ee-S,Li=ee-W;return S===e||Yr>=s||Yr<0||$&&Li>=m}function At(){var ee=Gu();if(lt(ee))return Tt(ee);T=Oa(At,xt(ee))}function Tt(ee){return T=e,Q&&h?nt(ee):(h=p=e,E)}function fr(){T!==e&&Wp(T),W=0,h=S=p=T=e}function ke(){return T===e?E:Tt(Gu())}function pr(){var ee=Gu(),Yr=lt(ee);if(h=arguments,p=this,S=ee,Yr){if(T===e)return ot(S);if($)return Wp(T),T=Oa(At,s),nt(S)}return T===e&&(T=Oa(At,s)),E}return pr.cancel=fr,pr.flush=ke,pr}var ME=Et(function(i,s){return Ap(i,1,s)}),BE=Et(function(i,s,o){return Ap(i,Or(s)||0,o)});function IE(i){return Ni(i,Z)}function Yu(i,s){if(typeof i!="function"||s!=null&&typeof s!="function")throw new Tr(l);var o=function(){var h=arguments,p=s?s.apply(this,h):h[0],m=o.cache;if(m.has(p))return m.get(p);var E=i.apply(this,h);return o.cache=m.set(p,E)||m,E};return o.cache=new(Yu.Cache||Si),o}Yu.Cache=Si;function Xu(i){if(typeof i!="function")throw new Tr(l);return function(){var s=arguments;switch(s.length){case 0:return!i.call(this);case 1:return!i.call(this,s[0]);case 2:return!i.call(this,s[0],s[1]);case 3:return!i.call(this,s[0],s[1],s[2])}return!i.apply(this,s)}}function RE(i){return Sd(2,i)}var LE=A1(function(i,s){s=s.length==1&&dt(s[0])?$t(s[0],lr(ut())):$t(Te(s,1),lr(ut()));var o=s.length;return Et(function(h){for(var p=-1,m=Be(h.length,o);++p<m;)h[p]=s[p].call(this,h[p]);return or(i,this,h)})}),rh=Et(function(i,s){var o=nn(s,_s(rh));return Ni(i,L,e,s,o)}),Id=Et(function(i,s){var o=nn(s,_s(Id));return Ni(i,k,e,s,o)}),PE=Mi(function(i,s){return Ni(i,tt,e,e,e,s)});function FE(i,s){if(typeof i!="function")throw new Tr(l);return s=s===e?s:gt(s),Et(i,s)}function UE(i,s){if(typeof i!="function")throw new Tr(l);return s=s==null?0:de(gt(s),0),Et(function(o){var h=o[s],p=ln(o,0,s);return h&&rn(p,h),or(i,this,p)})}function kE(i,s,o){var h=!0,p=!0;if(typeof i!="function")throw new Tr(l);return Xt(o)&&(h="leading"in o?!!o.leading:h,p="trailing"in o?!!o.trailing:p),Bd(i,s,{leading:h,maxWait:s,trailing:p})}function HE(i){return Dd(i,1)}function qE(i,s){return rh(Hl(s),i)}function WE(){if(!arguments.length)return[];var i=arguments[0];return dt(i)?i:[i]}function VE(i){return Cr(i,C)}function $E(i,s){return s=typeof s=="function"?s:e,Cr(i,C,s)}function zE(i){return Cr(i,A|C)}function GE(i,s){return s=typeof s=="function"?s:e,Cr(i,A|C,s)}function YE(i,s){return s==null||Ep(i,s,Ee(s))}function Gr(i,s){return i===s||i!==i&&s!==s}var XE=Hu(Sl),ZE=Hu(function(i,s){return i>=s}),Un=Cp(function(){return arguments}())?Cp:function(i){return jt(i)&&Lt.call(i,"callee")&&!fp.call(i,"callee")},dt=I.isArray,QE=Yf?lr(Yf):n1;function je(i){return i!=null&&Zu(i.length)&&!Ii(i)}function te(i){return jt(i)&&je(i)}function jE(i){return i===!0||i===!1||jt(i)&&Fe(i)==Gt}var hn=cm||ph,KE=Xf?lr(Xf):s1;function JE(i){return jt(i)&&i.nodeType===1&&!Na(i)}function tA(i){if(i==null)return!0;if(je(i)&&(dt(i)||typeof i=="string"||typeof i.splice=="function"||hn(i)||Cs(i)||Un(i)))return!i.length;var s=Ie(i);if(s==Qt||s==Dt)return!i.size;if(Sa(i))return!Ml(i).length;for(var o in i)if(Lt.call(i,o))return!1;return!0}function eA(i,s){return _a(i,s)}function rA(i,s,o){o=typeof o=="function"?o:e;var h=o?o(i,s):e;return h===e?_a(i,s,e,o):!!h}function ih(i){if(!jt(i))return!1;var s=Fe(i);return s==Oe||s==Ht||typeof i.message=="string"&&typeof i.name=="string"&&!Na(i)}function iA(i){return typeof i=="number"&&dp(i)}function Ii(i){if(!Xt(i))return!1;var s=Fe(i);return s==Pe||s==ze||s==Vt||s==Ai}function Rd(i){return typeof i=="number"&&i==gt(i)}function Zu(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=Bt}function Xt(i){var s=typeof i;return i!=null&&(s=="object"||s=="function")}function jt(i){return i!=null&&typeof i=="object"}var Ld=Zf?lr(Zf):u1;function nA(i,s){return i===s||Nl(i,s,Yl(s))}function sA(i,s,o){return o=typeof o=="function"?o:e,Nl(i,s,Yl(s),o)}function aA(i){return Pd(i)&&i!=+i}function uA(i){if($1(i))throw new pt(u);return Dp(i)}function oA(i){return i===null}function lA(i){return i==null}function Pd(i){return typeof i=="number"||jt(i)&&Fe(i)==Ne}function Na(i){if(!jt(i)||Fe(i)!=Yt)return!1;var s=bu(i);if(s===null)return!0;var o=Lt.call(s,"constructor")&&s.constructor;return typeof o=="function"&&o instanceof o&&mu.call(o)==sm}var nh=Qf?lr(Qf):o1;function hA(i){return Rd(i)&&i>=-Bt&&i<=Bt}var Fd=jf?lr(jf):l1;function Qu(i){return typeof i=="string"||!dt(i)&&jt(i)&&Fe(i)==nr}function cr(i){return typeof i=="symbol"||jt(i)&&Fe(i)==Ge}var Cs=Kf?lr(Kf):h1;function cA(i){return i===e}function fA(i){return jt(i)&&Ie(i)==mr}function pA(i){return jt(i)&&Fe(i)==Gi}var dA=Hu(Bl),gA=Hu(function(i,s){return i<=s});function Ud(i){if(!i)return[];if(je(i))return Qu(i)?$r(i):Qe(i);if(va&&i[va])return Yv(i[va]());var s=Ie(i),o=s==Qt?xl:s==Dt?gu:Ds;return o(i)}function Ri(i){if(!i)return i===0?i:0;if(i=Or(i),i===yt||i===-yt){var s=i<0?-1:1;return s*Re}return i===i?i:0}function gt(i){var s=Ri(i),o=s%1;return s===s?o?s-o:s:0}function kd(i){return i?Rn(gt(i),0,se):0}function Or(i){if(typeof i=="number")return i;if(cr(i))return be;if(Xt(i)){var s=typeof i.valueOf=="function"?i.valueOf():i;i=Xt(s)?s+"":s}if(typeof i!="string")return i===0?i:+i;i=np(i);var o=Ti.test(i);return o||Dn.test(i)?Nv(i.slice(2),o?2:8):fa.test(i)?be:+i}function Hd(i){return oi(i,Ke(i))}function yA(i){return i?Rn(gt(i),-Bt,Bt):i===0?i:0}function It(i){return i==null?"":hr(i)}var vA=ws(function(i,s){if(Sa(s)||je(s)){oi(s,Ee(s),i);return}for(var o in s)Lt.call(s,o)&&ba(i,o,s[o])}),qd=ws(function(i,s){oi(s,Ke(s),i)}),ju=ws(function(i,s,o,h){oi(s,Ke(s),i,h)}),mA=ws(function(i,s,o,h){oi(s,Ee(s),i,h)}),xA=Mi(_l);function EA(i,s){var o=bs(i);return s==null?o:xp(o,s)}var AA=Et(function(i,s){i=Ut(i);var o=-1,h=s.length,p=h>2?s[2]:e;for(p&&Ue(s[0],s[1],p)&&(h=1);++o<h;)for(var m=s[o],E=Ke(m),T=-1,S=E.length;++T<S;){var W=E[T],V=i[W];(V===e||Gr(V,xs[W])&&!Lt.call(i,W))&&(i[W]=m[W])}return i}),bA=Et(function(i){return i.push(e,nd),or(Wd,e,i)});function wA(i,s){return tp(i,ut(s,3),ui)}function TA(i,s){return tp(i,ut(s,3),Dl)}function _A(i,s){return i==null?i:Cl(i,ut(s,3),Ke)}function CA(i,s){return i==null?i:Tp(i,ut(s,3),Ke)}function DA(i,s){return i&&ui(i,ut(s,3))}function SA(i,s){return i&&Dl(i,ut(s,3))}function OA(i){return i==null?[]:Bu(i,Ee(i))}function NA(i){return i==null?[]:Bu(i,Ke(i))}function sh(i,s,o){var h=i==null?e:Ln(i,s);return h===e?o:h}function MA(i,s){return i!=null&&ud(i,s,t1)}function ah(i,s){return i!=null&&ud(i,s,e1)}var BA=Jp(function(i,s,o){s!=null&&typeof s.toString!="function"&&(s=xu.call(s)),i[s]=o},oh(Je)),IA=Jp(function(i,s,o){s!=null&&typeof s.toString!="function"&&(s=xu.call(s)),Lt.call(i,s)?i[s].push(o):i[s]=[o]},ut),RA=Et(Ta);function Ee(i){return je(i)?vp(i):Ml(i)}function Ke(i){return je(i)?vp(i,!0):c1(i)}function LA(i,s){var o={};return s=ut(s,3),ui(i,function(h,p,m){Oi(o,s(h,p,m),h)}),o}function PA(i,s){var o={};return s=ut(s,3),ui(i,function(h,p,m){Oi(o,p,s(h,p,m))}),o}var FA=ws(function(i,s,o){Iu(i,s,o)}),Wd=ws(function(i,s,o,h){Iu(i,s,o,h)}),UA=Mi(function(i,s){var o={};if(i==null)return o;var h=!1;s=$t(s,function(m){return m=on(m,i),h||(h=m.length>1),m}),oi(i,zl(i),o),h&&(o=Cr(o,A|_|C,B1));for(var p=s.length;p--;)Fl(o,s[p]);return o});function kA(i,s){return Vd(i,Xu(ut(s)))}var HA=Mi(function(i,s){return i==null?{}:p1(i,s)});function Vd(i,s){if(i==null)return{};var o=$t(zl(i),function(h){return[h]});return s=ut(s),Rp(i,o,function(h,p){return s(h,p[0])})}function qA(i,s,o){s=on(s,i);var h=-1,p=s.length;for(p||(p=1,i=e);++h<p;){var m=i==null?e:i[li(s[h])];m===e&&(h=p,m=o),i=Ii(m)?m.call(i):m}return i}function WA(i,s,o){return i==null?i:Ca(i,s,o)}function VA(i,s,o,h){return h=typeof h=="function"?h:e,i==null?i:Ca(i,s,o,h)}var $d=rd(Ee),zd=rd(Ke);function $A(i,s,o){var h=dt(i),p=h||hn(i)||Cs(i);if(s=ut(s,4),o==null){var m=i&&i.constructor;p?o=h?new m:[]:Xt(i)?o=Ii(m)?bs(bu(i)):{}:o={}}return(p?wr:ui)(i,function(E,T,S){return s(o,E,T,S)}),o}function zA(i,s){return i==null?!0:Fl(i,s)}function GA(i,s,o){return i==null?i:kp(i,s,Hl(o))}function YA(i,s,o,h){return h=typeof h=="function"?h:e,i==null?i:kp(i,s,Hl(o),h)}function Ds(i){return i==null?[]:ml(i,Ee(i))}function XA(i){return i==null?[]:ml(i,Ke(i))}function ZA(i,s,o){return o===e&&(o=s,s=e),o!==e&&(o=Or(o),o=o===o?o:0),s!==e&&(s=Or(s),s=s===s?s:0),Rn(Or(i),s,o)}function QA(i,s,o){return s=Ri(s),o===e?(o=s,s=0):o=Ri(o),i=Or(i),r1(i,s,o)}function jA(i,s,o){if(o&&typeof o!="boolean"&&Ue(i,s,o)&&(s=o=e),o===e&&(typeof s=="boolean"?(o=s,s=e):typeof i=="boolean"&&(o=i,i=e)),i===e&&s===e?(i=0,s=1):(i=Ri(i),s===e?(s=i,i=0):s=Ri(s)),i>s){var h=i;i=s,s=h}if(o||i%1||s%1){var p=gp();return Be(i+p*(s-i+Ov("1e-"+((p+"").length-1))),s)}return Rl(i,s)}var KA=Ts(function(i,s,o){return s=s.toLowerCase(),i+(o?Gd(s):s)});function Gd(i){return uh(It(i).toLowerCase())}function Yd(i){return i=It(i),i&&i.replace(pa,Wv).replace(xv,"")}function JA(i,s,o){i=It(i),s=hr(s);var h=i.length;o=o===e?h:Rn(gt(o),0,h);var p=o;return o-=s.length,o>=0&&i.slice(o,p)==s}function tb(i){return i=It(i),i&&wn.test(i)?i.replace(Zi,Vv):i}function eb(i){return i=It(i),i&&rl.test(i)?i.replace(Ki,"\\$&"):i}var rb=Ts(function(i,s,o){return i+(o?"-":"")+s.toLowerCase()}),ib=Ts(function(i,s,o){return i+(o?" ":"")+s.toLowerCase()}),nb=Qp("toLowerCase");function sb(i,s,o){i=It(i),s=gt(s);var h=s?vs(i):0;if(!s||h>=s)return i;var p=(s-h)/2;return ku(Cu(p),o)+i+ku(_u(p),o)}function ab(i,s,o){i=It(i),s=gt(s);var h=s?vs(i):0;return s&&h<s?i+ku(s-h,o):i}function ub(i,s,o){i=It(i),s=gt(s);var h=s?vs(i):0;return s&&h<s?ku(s-h,o)+i:i}function ob(i,s,o){return o||s==null?s=0:s&&(s=+s),gm(It(i).replace(la,""),s||0)}function lb(i,s,o){return(o?Ue(i,s,o):s===e)?s=1:s=gt(s),Ll(It(i),s)}function hb(){var i=arguments,s=It(i[0]);return i.length<3?s:s.replace(i[1],i[2])}var cb=Ts(function(i,s,o){return i+(o?"_":"")+s.toLowerCase()});function fb(i,s,o){return o&&typeof o!="number"&&Ue(i,s,o)&&(s=o=e),o=o===e?se:o>>>0,o?(i=It(i),i&&(typeof s=="string"||s!=null&&!nh(s))&&(s=hr(s),!s&&ys(i))?ln($r(i),0,o):i.split(s,o)):[]}var pb=Ts(function(i,s,o){return i+(o?" ":"")+uh(s)});function db(i,s,o){return i=It(i),o=o==null?0:Rn(gt(o),0,i.length),s=hr(s),i.slice(o,o+s.length)==s}function gb(i,s,o){var h=v.templateSettings;o&&Ue(i,s,o)&&(s=e),i=It(i),s=ju({},s,h,id);var p=ju({},s.imports,h.imports,id),m=Ee(p),E=ml(p,m),T,S,W=0,V=s.interpolate||ls,$="__p += '",Q=El((s.escape||ls).source+"|"+V.source+"|"+(V===Tn?lu:ls).source+"|"+(s.evaluate||ls).source+"|$","g"),nt="//# sourceURL="+(Lt.call(s,"sourceURL")?(s.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Tv+"]")+`
|
|
14
|
+
`)}function q1(i){return dt(i)||Un(i)||!!(fp&&i&&i[fp])}function Bi(i,s){var o=typeof i;return s=s??Bt,!!s&&(o=="number"||o!="symbol"&&os.test(i))&&i>-1&&i%1==0&&i<s}function Ue(i,s,o){if(!Xt(o))return!1;var h=typeof s;return(h=="number"?je(o)&&Bi(s,o.length):h=="string"&&s in o)?Gr(o[s],i):!1}function Zl(i,s){if(dt(i))return!1;var o=typeof i;return o=="number"||o=="symbol"||o=="boolean"||i==null||cr(i)?!0:ji.test(i)||!_n.test(i)||s!=null&&i in Ut(s)}function W1(i){var s=typeof i;return s=="string"||s=="number"||s=="symbol"||s=="boolean"?i!=="__proto__":i===null}function Ql(i){var s=qu(i),o=v[s];if(typeof o!="function"||!(s in bt.prototype))return!1;if(i===o)return!0;var h=Gl(o);return!!h&&i===h[0]}function V1(i){return!!op&&op in i}var $1=vu?Ii:ph;function Sa(i){var s=i&&i.constructor,o=typeof s=="function"&&s.prototype||xs;return i===o}function od(i){return i===i&&!Xt(i)}function ld(i,s){return function(o){return o==null?!1:o[i]===s&&(s!==e||i in Ut(o))}}function z1(i){var s=Yu(i,function(h){return o.size===d&&o.clear(),h}),o=s.cache;return s}function G1(i,s){var o=i[1],h=s[1],p=o|h,m=p<(M|R|j),E=h==j&&o==z||h==j&&o==tt&&i[7].length<=s[8]||h==(j|tt)&&s[7].length<=s[8]&&o==z;if(!(m||E))return i;h&M&&(i[2]=s[2],p|=o&M?0:q);var T=s[3];if(T){var S=i[3];i[3]=S?zp(S,T,s[4]):T,i[4]=S?nn(i[3],y):s[4]}return T=s[5],T&&(S=i[5],i[5]=S?Gp(S,T,s[6]):T,i[6]=S?nn(i[5],y):s[6]),T=s[7],T&&(i[7]=T),h&j&&(i[8]=i[8]==null?s[8]:Be(i[8],s[8])),i[9]==null&&(i[9]=s[9]),i[0]=s[0],i[1]=p,i}function Y1(i){var s=[];if(i!=null)for(var o in Ut(i))s.push(o);return s}function X1(i){return xu.call(i)}function hd(i,s,o){return s=de(s===e?i.length-1:s,0),function(){for(var h=arguments,p=-1,m=de(h.length-s,0),E=I(m);++p<m;)E[p]=h[s+p];p=-1;for(var T=I(s+1);++p<s;)T[p]=h[p];return T[s]=o(E),or(i,this,T)}}function cd(i,s){return s.length<2?i:Ln(i,Dr(s,0,-1))}function Z1(i,s){for(var o=i.length,h=Be(s.length,o),p=Qe(i);h--;){var m=s[h];i[h]=Bi(m,o)?p[m]:e}return i}function jl(i,s){if(!(s==="constructor"&&typeof i[s]=="function")&&s!="__proto__")return i[s]}var fd=dd(Lp),Oa=hm||function(i,s){return we.setTimeout(i,s)},Kl=dd(m1);function pd(i,s,o){var h=s+"";return Kl(i,H1(h,Q1(F1(h),o)))}function dd(i){var s=0,o=0;return function(){var h=dm(),p=ht-(h-o);if(o=h,p>0){if(++s>=st)return arguments[0]}else s=0;return i.apply(e,arguments)}}function Vu(i,s){var o=-1,h=i.length,p=h-1;for(s=s===e?h:s;++o<s;){var m=Rl(o,p),E=i[m];i[m]=i[o],i[o]=E}return i.length=s,i}var gd=z1(function(i){var s=[];return i.charCodeAt(0)===46&&s.push(""),i.replace(el,function(o,h,p,m){s.push(p?m.replace(ou,"$1"):h||o)}),s});function li(i){if(typeof i=="string"||cr(i))return i;var s=i+"";return s=="0"&&1/i==-yt?"-0":s}function Fn(i){if(i!=null){try{return mu.call(i)}catch{}try{return i+""}catch{}}return""}function Q1(i,s){return wr(Le,function(o){var h="_."+o[0];s&o[1]&&!pu(i,h)&&i.push(h)}),i.sort()}function yd(i){if(i instanceof bt)return i.clone();var s=new _r(i.__wrapped__,i.__chain__);return s.__actions__=Qe(i.__actions__),s.__index__=i.__index__,s.__values__=i.__values__,s}function j1(i,s,o){(o?Ue(i,s,o):s===e)?s=1:s=de(gt(s),0);var h=i==null?0:i.length;if(!h||s<1)return[];for(var p=0,m=0,E=I(_u(h/s));p<h;)E[m++]=Dr(i,p,p+=s);return E}function K1(i){for(var s=-1,o=i==null?0:i.length,h=0,p=[];++s<o;){var m=i[s];m&&(p[h++]=m)}return p}function J1(){var i=arguments.length;if(!i)return[];for(var s=I(i-1),o=arguments[0],h=i;h--;)s[h-1]=arguments[h];return rn(dt(o)?Qe(o):[o],Te(s,1))}var tx=Et(function(i,s){return te(i)?wa(i,Te(s,1,te,!0)):[]}),ex=Et(function(i,s){var o=Sr(s);return te(o)&&(o=e),te(i)?wa(i,Te(s,1,te,!0),ut(o,2)):[]}),rx=Et(function(i,s){var o=Sr(s);return te(o)&&(o=e),te(i)?wa(i,Te(s,1,te,!0),e,o):[]});function ix(i,s,o){var h=i==null?0:i.length;return h?(s=o||s===e?1:gt(s),Dr(i,s<0?0:s,h)):[]}function nx(i,s,o){var h=i==null?0:i.length;return h?(s=o||s===e?1:gt(s),s=h-s,Dr(i,0,s<0?0:s)):[]}function sx(i,s){return i&&i.length?Lu(i,ut(s,3),!0,!0):[]}function ax(i,s){return i&&i.length?Lu(i,ut(s,3),!0):[]}function ux(i,s,o,h){var p=i==null?0:i.length;return p?(o&&typeof o!="number"&&Ue(i,s,o)&&(o=0,h=p),Jm(i,s,o,h)):[]}function vd(i,s,o){var h=i==null?0:i.length;if(!h)return-1;var p=o==null?0:gt(o);return p<0&&(p=de(h+p,0)),du(i,ut(s,3),p)}function md(i,s,o){var h=i==null?0:i.length;if(!h)return-1;var p=h-1;return o!==e&&(p=gt(o),p=o<0?de(h+p,0):Be(p,h-1)),du(i,ut(s,3),p,!0)}function xd(i){var s=i==null?0:i.length;return s?Te(i,1):[]}function ox(i){var s=i==null?0:i.length;return s?Te(i,yt):[]}function lx(i,s){var o=i==null?0:i.length;return o?(s=s===e?1:gt(s),Te(i,s)):[]}function hx(i){for(var s=-1,o=i==null?0:i.length,h={};++s<o;){var p=i[s];h[p[0]]=p[1]}return h}function Ed(i){return i&&i.length?i[0]:e}function cx(i,s,o){var h=i==null?0:i.length;if(!h)return-1;var p=o==null?0:gt(o);return p<0&&(p=de(h+p,0)),gs(i,s,p)}function fx(i){var s=i==null?0:i.length;return s?Dr(i,0,-1):[]}var px=Et(function(i){var s=$t(i,kl);return s.length&&s[0]===i[0]?Ol(s):[]}),dx=Et(function(i){var s=Sr(i),o=$t(i,kl);return s===Sr(o)?s=e:o.pop(),o.length&&o[0]===i[0]?Ol(o,ut(s,2)):[]}),gx=Et(function(i){var s=Sr(i),o=$t(i,kl);return s=typeof s=="function"?s:e,s&&o.pop(),o.length&&o[0]===i[0]?Ol(o,e,s):[]});function yx(i,s){return i==null?"":fm.call(i,s)}function Sr(i){var s=i==null?0:i.length;return s?i[s-1]:e}function vx(i,s,o){var h=i==null?0:i.length;if(!h)return-1;var p=h;return o!==e&&(p=gt(o),p=p<0?de(h+p,0):Be(p,h-1)),s===s?Qv(i,s,p):du(i,tp,p,!0)}function mx(i,s){return i&&i.length?Mp(i,gt(s)):e}var xx=Et(Ad);function Ad(i,s){return i&&i.length&&s&&s.length?Il(i,s):i}function Ex(i,s,o){return i&&i.length&&s&&s.length?Il(i,s,ut(o,2)):i}function Ax(i,s,o){return i&&i.length&&s&&s.length?Il(i,s,e,o):i}var bx=Mi(function(i,s){var o=i==null?0:i.length,h=_l(i,s);return Rp(i,$t(s,function(p){return Bi(p,o)?+p:p}).sort($p)),h});function wx(i,s){var o=[];if(!(i&&i.length))return o;var h=-1,p=[],m=i.length;for(s=ut(s,3);++h<m;){var E=i[h];s(E,h,i)&&(o.push(E),p.push(h))}return Rp(i,p),o}function Jl(i){return i==null?i:ym.call(i)}function Tx(i,s,o){var h=i==null?0:i.length;return h?(o&&typeof o!="number"&&Ue(i,s,o)?(s=0,o=h):(s=s==null?0:gt(s),o=o===e?h:gt(o)),Dr(i,s,o)):[]}function _x(i,s){return Ru(i,s)}function Cx(i,s,o){return Pl(i,s,ut(o,2))}function Dx(i,s){var o=i==null?0:i.length;if(o){var h=Ru(i,s);if(h<o&&Gr(i[h],s))return h}return-1}function Sx(i,s){return Ru(i,s,!0)}function Ox(i,s,o){return Pl(i,s,ut(o,2),!0)}function Nx(i,s){var o=i==null?0:i.length;if(o){var h=Ru(i,s,!0)-1;if(Gr(i[h],s))return h}return-1}function Mx(i){return i&&i.length?Pp(i):[]}function Bx(i,s){return i&&i.length?Pp(i,ut(s,2)):[]}function Ix(i){var s=i==null?0:i.length;return s?Dr(i,1,s):[]}function Rx(i,s,o){return i&&i.length?(s=o||s===e?1:gt(s),Dr(i,0,s<0?0:s)):[]}function Lx(i,s,o){var h=i==null?0:i.length;return h?(s=o||s===e?1:gt(s),s=h-s,Dr(i,s<0?0:s,h)):[]}function Px(i,s){return i&&i.length?Lu(i,ut(s,3),!1,!0):[]}function Fx(i,s){return i&&i.length?Lu(i,ut(s,3)):[]}var Ux=Et(function(i){return un(Te(i,1,te,!0))}),kx=Et(function(i){var s=Sr(i);return te(s)&&(s=e),un(Te(i,1,te,!0),ut(s,2))}),Hx=Et(function(i){var s=Sr(i);return s=typeof s=="function"?s:e,un(Te(i,1,te,!0),e,s)});function qx(i){return i&&i.length?un(i):[]}function Wx(i,s){return i&&i.length?un(i,ut(s,2)):[]}function Vx(i,s){return s=typeof s=="function"?s:e,i&&i.length?un(i,e,s):[]}function th(i){if(!(i&&i.length))return[];var s=0;return i=en(i,function(o){if(te(o))return s=de(o.length,s),!0}),vl(s,function(o){return $t(i,dl(o))})}function bd(i,s){if(!(i&&i.length))return[];var o=th(i);return s==null?o:$t(o,function(h){return or(s,e,h)})}var $x=Et(function(i,s){return te(i)?wa(i,s):[]}),zx=Et(function(i){return Ul(en(i,te))}),Gx=Et(function(i){var s=Sr(i);return te(s)&&(s=e),Ul(en(i,te),ut(s,2))}),Yx=Et(function(i){var s=Sr(i);return s=typeof s=="function"?s:e,Ul(en(i,te),e,s)}),Xx=Et(th);function Zx(i,s){return Hp(i||[],s||[],ba)}function Qx(i,s){return Hp(i||[],s||[],Ca)}var jx=Et(function(i){var s=i.length,o=s>1?i[s-1]:e;return o=typeof o=="function"?(i.pop(),o):e,bd(i,o)});function wd(i){var s=v(i);return s.__chain__=!0,s}function Kx(i,s){return s(i),i}function $u(i,s){return s(i)}var Jx=Mi(function(i){var s=i.length,o=s?i[0]:0,h=this.__wrapped__,p=function(m){return _l(m,i)};return s>1||this.__actions__.length||!(h instanceof bt)||!Bi(o)?this.thru(p):(h=h.slice(o,+o+(s?1:0)),h.__actions__.push({func:$u,args:[p],thisArg:e}),new _r(h,this.__chain__).thru(function(m){return s&&!m.length&&m.push(e),m}))});function tE(){return wd(this)}function eE(){return new _r(this.value(),this.__chain__)}function rE(){this.__values__===e&&(this.__values__=Fd(this.value()));var i=this.__index__>=this.__values__.length,s=i?e:this.__values__[this.__index__++];return{done:i,value:s}}function iE(){return this}function nE(i){for(var s,o=this;o instanceof Ou;){var h=yd(o);h.__index__=0,h.__values__=e,s?p.__wrapped__=h:s=h;var p=h;o=o.__wrapped__}return p.__wrapped__=i,s}function sE(){var i=this.__wrapped__;if(i instanceof bt){var s=i;return this.__actions__.length&&(s=new bt(this)),s=s.reverse(),s.__actions__.push({func:$u,args:[Jl],thisArg:e}),new _r(s,this.__chain__)}return this.thru(Jl)}function aE(){return kp(this.__wrapped__,this.__actions__)}var uE=Pu(function(i,s,o){Lt.call(i,o)?++i[o]:Oi(i,o,1)});function oE(i,s,o){var h=dt(i)?Kf:Km;return o&&Ue(i,s,o)&&(s=e),h(i,ut(s,3))}function lE(i,s){var o=dt(i)?en:bp;return o(i,ut(s,3))}var hE=Qp(vd),cE=Qp(md);function fE(i,s){return Te(zu(i,s),1)}function pE(i,s){return Te(zu(i,s),yt)}function dE(i,s,o){return o=o===e?1:gt(o),Te(zu(i,s),o)}function Td(i,s){var o=dt(i)?wr:an;return o(i,ut(s,3))}function _d(i,s){var o=dt(i)?Iv:Ap;return o(i,ut(s,3))}var gE=Pu(function(i,s,o){Lt.call(i,o)?i[o].push(s):Oi(i,o,[s])});function yE(i,s,o,h){i=je(i)?i:Ds(i),o=o&&!h?gt(o):0;var p=i.length;return o<0&&(o=de(p+o,0)),Qu(i)?o<=p&&i.indexOf(s,o)>-1:!!p&&gs(i,s,o)>-1}var vE=Et(function(i,s,o){var h=-1,p=typeof s=="function",m=je(i)?I(i.length):[];return an(i,function(E){m[++h]=p?or(s,E,o):Ta(E,s,o)}),m}),mE=Pu(function(i,s,o){Oi(i,o,s)});function zu(i,s){var o=dt(i)?$t:Sp;return o(i,ut(s,3))}function xE(i,s,o,h){return i==null?[]:(dt(s)||(s=s==null?[]:[s]),o=h?e:o,dt(o)||(o=o==null?[]:[o]),Bp(i,s,o))}var EE=Pu(function(i,s,o){i[o?0:1].push(s)},function(){return[[],[]]});function AE(i,s,o){var h=dt(i)?fl:rp,p=arguments.length<3;return h(i,ut(s,4),o,p,an)}function bE(i,s,o){var h=dt(i)?Rv:rp,p=arguments.length<3;return h(i,ut(s,4),o,p,Ap)}function wE(i,s){var o=dt(i)?en:bp;return o(i,Xu(ut(s,3)))}function TE(i){var s=dt(i)?vp:y1;return s(i)}function _E(i,s,o){(o?Ue(i,s,o):s===e)?s=1:s=gt(s);var h=dt(i)?Ym:v1;return h(i,s)}function CE(i){var s=dt(i)?Xm:x1;return s(i)}function DE(i){if(i==null)return 0;if(je(i))return Qu(i)?vs(i):i.length;var s=Ie(i);return s==Qt||s==Dt?i.size:Ml(i).length}function SE(i,s,o){var h=dt(i)?pl:E1;return o&&Ue(i,s,o)&&(s=e),h(i,ut(s,3))}var OE=Et(function(i,s){if(i==null)return[];var o=s.length;return o>1&&Ue(i,s[0],s[1])?s=[]:o>2&&Ue(s[0],s[1],s[2])&&(s=[s[0]]),Bp(i,Te(s,1),[])}),Gu=lm||function(){return we.Date.now()};function NE(i,s){if(typeof s!="function")throw new Tr(l);return i=gt(i),function(){if(--i<1)return s.apply(this,arguments)}}function Cd(i,s,o){return s=o?e:s,s=i&&s==null?i.length:s,Ni(i,j,e,e,e,e,s)}function Dd(i,s){var o;if(typeof s!="function")throw new Tr(l);return i=gt(i),function(){return--i>0&&(o=s.apply(this,arguments)),i<=1&&(s=e),o}}var eh=Et(function(i,s,o){var h=M;if(o.length){var p=nn(o,_s(eh));h|=L}return Ni(i,h,s,o,p)}),Sd=Et(function(i,s,o){var h=M|R;if(o.length){var p=nn(o,_s(Sd));h|=L}return Ni(s,h,i,o,p)});function Od(i,s,o){s=o?e:s;var h=Ni(i,z,e,e,e,e,e,s);return h.placeholder=Od.placeholder,h}function Nd(i,s,o){s=o?e:s;var h=Ni(i,w,e,e,e,e,e,s);return h.placeholder=Nd.placeholder,h}function Md(i,s,o){var h,p,m,E,T,S,W=0,V=!1,$=!1,Q=!0;if(typeof i!="function")throw new Tr(l);s=Or(s)||0,Xt(o)&&(V=!!o.leading,$="maxWait"in o,m=$?de(Or(o.maxWait)||0,s):m,Q="trailing"in o?!!o.trailing:Q);function nt(ee){var Yr=h,Li=p;return h=p=e,W=ee,E=i.apply(Li,Yr),E}function ot(ee){return W=ee,T=Oa(At,s),V?nt(ee):E}function xt(ee){var Yr=ee-S,Li=ee-W,Qd=s-Yr;return $?Be(Qd,m-Li):Qd}function lt(ee){var Yr=ee-S,Li=ee-W;return S===e||Yr>=s||Yr<0||$&&Li>=m}function At(){var ee=Gu();if(lt(ee))return Tt(ee);T=Oa(At,xt(ee))}function Tt(ee){return T=e,Q&&h?nt(ee):(h=p=e,E)}function fr(){T!==e&&qp(T),W=0,h=S=p=T=e}function ke(){return T===e?E:Tt(Gu())}function pr(){var ee=Gu(),Yr=lt(ee);if(h=arguments,p=this,S=ee,Yr){if(T===e)return ot(S);if($)return qp(T),T=Oa(At,s),nt(S)}return T===e&&(T=Oa(At,s)),E}return pr.cancel=fr,pr.flush=ke,pr}var ME=Et(function(i,s){return Ep(i,1,s)}),BE=Et(function(i,s,o){return Ep(i,Or(s)||0,o)});function IE(i){return Ni(i,Z)}function Yu(i,s){if(typeof i!="function"||s!=null&&typeof s!="function")throw new Tr(l);var o=function(){var h=arguments,p=s?s.apply(this,h):h[0],m=o.cache;if(m.has(p))return m.get(p);var E=i.apply(this,h);return o.cache=m.set(p,E)||m,E};return o.cache=new(Yu.Cache||Si),o}Yu.Cache=Si;function Xu(i){if(typeof i!="function")throw new Tr(l);return function(){var s=arguments;switch(s.length){case 0:return!i.call(this);case 1:return!i.call(this,s[0]);case 2:return!i.call(this,s[0],s[1]);case 3:return!i.call(this,s[0],s[1],s[2])}return!i.apply(this,s)}}function RE(i){return Dd(2,i)}var LE=A1(function(i,s){s=s.length==1&&dt(s[0])?$t(s[0],lr(ut())):$t(Te(s,1),lr(ut()));var o=s.length;return Et(function(h){for(var p=-1,m=Be(h.length,o);++p<m;)h[p]=s[p].call(this,h[p]);return or(i,this,h)})}),rh=Et(function(i,s){var o=nn(s,_s(rh));return Ni(i,L,e,s,o)}),Bd=Et(function(i,s){var o=nn(s,_s(Bd));return Ni(i,k,e,s,o)}),PE=Mi(function(i,s){return Ni(i,tt,e,e,e,s)});function FE(i,s){if(typeof i!="function")throw new Tr(l);return s=s===e?s:gt(s),Et(i,s)}function UE(i,s){if(typeof i!="function")throw new Tr(l);return s=s==null?0:de(gt(s),0),Et(function(o){var h=o[s],p=ln(o,0,s);return h&&rn(p,h),or(i,this,p)})}function kE(i,s,o){var h=!0,p=!0;if(typeof i!="function")throw new Tr(l);return Xt(o)&&(h="leading"in o?!!o.leading:h,p="trailing"in o?!!o.trailing:p),Md(i,s,{leading:h,maxWait:s,trailing:p})}function HE(i){return Cd(i,1)}function qE(i,s){return rh(Hl(s),i)}function WE(){if(!arguments.length)return[];var i=arguments[0];return dt(i)?i:[i]}function VE(i){return Cr(i,C)}function $E(i,s){return s=typeof s=="function"?s:e,Cr(i,C,s)}function zE(i){return Cr(i,A|C)}function GE(i,s){return s=typeof s=="function"?s:e,Cr(i,A|C,s)}function YE(i,s){return s==null||xp(i,s,Ee(s))}function Gr(i,s){return i===s||i!==i&&s!==s}var XE=Hu(Sl),ZE=Hu(function(i,s){return i>=s}),Un=_p(function(){return arguments}())?_p:function(i){return jt(i)&&Lt.call(i,"callee")&&!cp.call(i,"callee")},dt=I.isArray,QE=Gf?lr(Gf):n1;function je(i){return i!=null&&Zu(i.length)&&!Ii(i)}function te(i){return jt(i)&&je(i)}function jE(i){return i===!0||i===!1||jt(i)&&Fe(i)==Gt}var hn=cm||ph,KE=Yf?lr(Yf):s1;function JE(i){return jt(i)&&i.nodeType===1&&!Na(i)}function tA(i){if(i==null)return!0;if(je(i)&&(dt(i)||typeof i=="string"||typeof i.splice=="function"||hn(i)||Cs(i)||Un(i)))return!i.length;var s=Ie(i);if(s==Qt||s==Dt)return!i.size;if(Sa(i))return!Ml(i).length;for(var o in i)if(Lt.call(i,o))return!1;return!0}function eA(i,s){return _a(i,s)}function rA(i,s,o){o=typeof o=="function"?o:e;var h=o?o(i,s):e;return h===e?_a(i,s,e,o):!!h}function ih(i){if(!jt(i))return!1;var s=Fe(i);return s==Oe||s==Ht||typeof i.message=="string"&&typeof i.name=="string"&&!Na(i)}function iA(i){return typeof i=="number"&&pp(i)}function Ii(i){if(!Xt(i))return!1;var s=Fe(i);return s==Pe||s==ze||s==Vt||s==Ai}function Id(i){return typeof i=="number"&&i==gt(i)}function Zu(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=Bt}function Xt(i){var s=typeof i;return i!=null&&(s=="object"||s=="function")}function jt(i){return i!=null&&typeof i=="object"}var Rd=Xf?lr(Xf):u1;function nA(i,s){return i===s||Nl(i,s,Yl(s))}function sA(i,s,o){return o=typeof o=="function"?o:e,Nl(i,s,Yl(s),o)}function aA(i){return Ld(i)&&i!=+i}function uA(i){if($1(i))throw new pt(u);return Cp(i)}function oA(i){return i===null}function lA(i){return i==null}function Ld(i){return typeof i=="number"||jt(i)&&Fe(i)==Ne}function Na(i){if(!jt(i)||Fe(i)!=Yt)return!1;var s=bu(i);if(s===null)return!0;var o=Lt.call(s,"constructor")&&s.constructor;return typeof o=="function"&&o instanceof o&&mu.call(o)==sm}var nh=Zf?lr(Zf):o1;function hA(i){return Id(i)&&i>=-Bt&&i<=Bt}var Pd=Qf?lr(Qf):l1;function Qu(i){return typeof i=="string"||!dt(i)&&jt(i)&&Fe(i)==nr}function cr(i){return typeof i=="symbol"||jt(i)&&Fe(i)==Ge}var Cs=jf?lr(jf):h1;function cA(i){return i===e}function fA(i){return jt(i)&&Ie(i)==mr}function pA(i){return jt(i)&&Fe(i)==Gi}var dA=Hu(Bl),gA=Hu(function(i,s){return i<=s});function Fd(i){if(!i)return[];if(je(i))return Qu(i)?$r(i):Qe(i);if(va&&i[va])return Yv(i[va]());var s=Ie(i),o=s==Qt?xl:s==Dt?gu:Ds;return o(i)}function Ri(i){if(!i)return i===0?i:0;if(i=Or(i),i===yt||i===-yt){var s=i<0?-1:1;return s*Re}return i===i?i:0}function gt(i){var s=Ri(i),o=s%1;return s===s?o?s-o:s:0}function Ud(i){return i?Rn(gt(i),0,se):0}function Or(i){if(typeof i=="number")return i;if(cr(i))return be;if(Xt(i)){var s=typeof i.valueOf=="function"?i.valueOf():i;i=Xt(s)?s+"":s}if(typeof i!="string")return i===0?i:+i;i=ip(i);var o=Ti.test(i);return o||Dn.test(i)?Nv(i.slice(2),o?2:8):fa.test(i)?be:+i}function kd(i){return oi(i,Ke(i))}function yA(i){return i?Rn(gt(i),-Bt,Bt):i===0?i:0}function It(i){return i==null?"":hr(i)}var vA=ws(function(i,s){if(Sa(s)||je(s)){oi(s,Ee(s),i);return}for(var o in s)Lt.call(s,o)&&ba(i,o,s[o])}),Hd=ws(function(i,s){oi(s,Ke(s),i)}),ju=ws(function(i,s,o,h){oi(s,Ke(s),i,h)}),mA=ws(function(i,s,o,h){oi(s,Ee(s),i,h)}),xA=Mi(_l);function EA(i,s){var o=bs(i);return s==null?o:mp(o,s)}var AA=Et(function(i,s){i=Ut(i);var o=-1,h=s.length,p=h>2?s[2]:e;for(p&&Ue(s[0],s[1],p)&&(h=1);++o<h;)for(var m=s[o],E=Ke(m),T=-1,S=E.length;++T<S;){var W=E[T],V=i[W];(V===e||Gr(V,xs[W])&&!Lt.call(i,W))&&(i[W]=m[W])}return i}),bA=Et(function(i){return i.push(e,id),or(qd,e,i)});function wA(i,s){return Jf(i,ut(s,3),ui)}function TA(i,s){return Jf(i,ut(s,3),Dl)}function _A(i,s){return i==null?i:Cl(i,ut(s,3),Ke)}function CA(i,s){return i==null?i:wp(i,ut(s,3),Ke)}function DA(i,s){return i&&ui(i,ut(s,3))}function SA(i,s){return i&&Dl(i,ut(s,3))}function OA(i){return i==null?[]:Bu(i,Ee(i))}function NA(i){return i==null?[]:Bu(i,Ke(i))}function sh(i,s,o){var h=i==null?e:Ln(i,s);return h===e?o:h}function MA(i,s){return i!=null&&ad(i,s,t1)}function ah(i,s){return i!=null&&ad(i,s,e1)}var BA=Kp(function(i,s,o){s!=null&&typeof s.toString!="function"&&(s=xu.call(s)),i[s]=o},oh(Je)),IA=Kp(function(i,s,o){s!=null&&typeof s.toString!="function"&&(s=xu.call(s)),Lt.call(i,s)?i[s].push(o):i[s]=[o]},ut),RA=Et(Ta);function Ee(i){return je(i)?yp(i):Ml(i)}function Ke(i){return je(i)?yp(i,!0):c1(i)}function LA(i,s){var o={};return s=ut(s,3),ui(i,function(h,p,m){Oi(o,s(h,p,m),h)}),o}function PA(i,s){var o={};return s=ut(s,3),ui(i,function(h,p,m){Oi(o,p,s(h,p,m))}),o}var FA=ws(function(i,s,o){Iu(i,s,o)}),qd=ws(function(i,s,o,h){Iu(i,s,o,h)}),UA=Mi(function(i,s){var o={};if(i==null)return o;var h=!1;s=$t(s,function(m){return m=on(m,i),h||(h=m.length>1),m}),oi(i,zl(i),o),h&&(o=Cr(o,A|_|C,B1));for(var p=s.length;p--;)Fl(o,s[p]);return o});function kA(i,s){return Wd(i,Xu(ut(s)))}var HA=Mi(function(i,s){return i==null?{}:p1(i,s)});function Wd(i,s){if(i==null)return{};var o=$t(zl(i),function(h){return[h]});return s=ut(s),Ip(i,o,function(h,p){return s(h,p[0])})}function qA(i,s,o){s=on(s,i);var h=-1,p=s.length;for(p||(p=1,i=e);++h<p;){var m=i==null?e:i[li(s[h])];m===e&&(h=p,m=o),i=Ii(m)?m.call(i):m}return i}function WA(i,s,o){return i==null?i:Ca(i,s,o)}function VA(i,s,o,h){return h=typeof h=="function"?h:e,i==null?i:Ca(i,s,o,h)}var Vd=ed(Ee),$d=ed(Ke);function $A(i,s,o){var h=dt(i),p=h||hn(i)||Cs(i);if(s=ut(s,4),o==null){var m=i&&i.constructor;p?o=h?new m:[]:Xt(i)?o=Ii(m)?bs(bu(i)):{}:o={}}return(p?wr:ui)(i,function(E,T,S){return s(o,E,T,S)}),o}function zA(i,s){return i==null?!0:Fl(i,s)}function GA(i,s,o){return i==null?i:Up(i,s,Hl(o))}function YA(i,s,o,h){return h=typeof h=="function"?h:e,i==null?i:Up(i,s,Hl(o),h)}function Ds(i){return i==null?[]:ml(i,Ee(i))}function XA(i){return i==null?[]:ml(i,Ke(i))}function ZA(i,s,o){return o===e&&(o=s,s=e),o!==e&&(o=Or(o),o=o===o?o:0),s!==e&&(s=Or(s),s=s===s?s:0),Rn(Or(i),s,o)}function QA(i,s,o){return s=Ri(s),o===e?(o=s,s=0):o=Ri(o),i=Or(i),r1(i,s,o)}function jA(i,s,o){if(o&&typeof o!="boolean"&&Ue(i,s,o)&&(s=o=e),o===e&&(typeof s=="boolean"?(o=s,s=e):typeof i=="boolean"&&(o=i,i=e)),i===e&&s===e?(i=0,s=1):(i=Ri(i),s===e?(s=i,i=0):s=Ri(s)),i>s){var h=i;i=s,s=h}if(o||i%1||s%1){var p=dp();return Be(i+p*(s-i+Ov("1e-"+((p+"").length-1))),s)}return Rl(i,s)}var KA=Ts(function(i,s,o){return s=s.toLowerCase(),i+(o?zd(s):s)});function zd(i){return uh(It(i).toLowerCase())}function Gd(i){return i=It(i),i&&i.replace(pa,Wv).replace(xv,"")}function JA(i,s,o){i=It(i),s=hr(s);var h=i.length;o=o===e?h:Rn(gt(o),0,h);var p=o;return o-=s.length,o>=0&&i.slice(o,p)==s}function tb(i){return i=It(i),i&&wn.test(i)?i.replace(Zi,Vv):i}function eb(i){return i=It(i),i&&rl.test(i)?i.replace(Ki,"\\$&"):i}var rb=Ts(function(i,s,o){return i+(o?"-":"")+s.toLowerCase()}),ib=Ts(function(i,s,o){return i+(o?" ":"")+s.toLowerCase()}),nb=Zp("toLowerCase");function sb(i,s,o){i=It(i),s=gt(s);var h=s?vs(i):0;if(!s||h>=s)return i;var p=(s-h)/2;return ku(Cu(p),o)+i+ku(_u(p),o)}function ab(i,s,o){i=It(i),s=gt(s);var h=s?vs(i):0;return s&&h<s?i+ku(s-h,o):i}function ub(i,s,o){i=It(i),s=gt(s);var h=s?vs(i):0;return s&&h<s?ku(s-h,o)+i:i}function ob(i,s,o){return o||s==null?s=0:s&&(s=+s),gm(It(i).replace(la,""),s||0)}function lb(i,s,o){return(o?Ue(i,s,o):s===e)?s=1:s=gt(s),Ll(It(i),s)}function hb(){var i=arguments,s=It(i[0]);return i.length<3?s:s.replace(i[1],i[2])}var cb=Ts(function(i,s,o){return i+(o?"_":"")+s.toLowerCase()});function fb(i,s,o){return o&&typeof o!="number"&&Ue(i,s,o)&&(s=o=e),o=o===e?se:o>>>0,o?(i=It(i),i&&(typeof s=="string"||s!=null&&!nh(s))&&(s=hr(s),!s&&ys(i))?ln($r(i),0,o):i.split(s,o)):[]}var pb=Ts(function(i,s,o){return i+(o?" ":"")+uh(s)});function db(i,s,o){return i=It(i),o=o==null?0:Rn(gt(o),0,i.length),s=hr(s),i.slice(o,o+s.length)==s}function gb(i,s,o){var h=v.templateSettings;o&&Ue(i,s,o)&&(s=e),i=It(i),s=ju({},s,h,rd);var p=ju({},s.imports,h.imports,rd),m=Ee(p),E=ml(p,m),T,S,W=0,V=s.interpolate||ls,$="__p += '",Q=El((s.escape||ls).source+"|"+V.source+"|"+(V===Tn?lu:ls).source+"|"+(s.evaluate||ls).source+"|$","g"),nt="//# sourceURL="+(Lt.call(s,"sourceURL")?(s.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Tv+"]")+`
|
|
15
15
|
`;i.replace(Q,function(lt,At,Tt,fr,ke,pr){return Tt||(Tt=fr),$+=i.slice(W,pr).replace(sl,$v),At&&(T=!0,$+=`' +
|
|
16
16
|
__e(`+At+`) +
|
|
17
17
|
'`),ke&&(S=!0,$+=`';
|
|
@@ -28,10 +28,10 @@ __p += '`),Tt&&($+=`' +
|
|
|
28
28
|
function print() { __p += __j.call(arguments, '') }
|
|
29
29
|
`:`;
|
|
30
30
|
`)+$+`return __p
|
|
31
|
-
}`;var xt=Zd(function(){return Nt(m,nt+"return "+$).apply(e,E)});if(xt.source=$,ih(xt))throw xt;return xt}function yb(i){return It(i).toLowerCase()}function vb(i){return It(i).toUpperCase()}function mb(i,s,o){if(i=It(i),i&&(o||s===e))return np(i);if(!i||!(s=hr(s)))return i;var h=$r(i),p=$r(s),m=sp(h,p),E=ap(h,p)+1;return ln(h,m,E).join("")}function xb(i,s,o){if(i=It(i),i&&(o||s===e))return i.slice(0,op(i)+1);if(!i||!(s=hr(s)))return i;var h=$r(i),p=ap(h,$r(s))+1;return ln(h,0,p).join("")}function Eb(i,s,o){if(i=It(i),i&&(o||s===e))return i.replace(la,"");if(!i||!(s=hr(s)))return i;var h=$r(i),p=sp(h,$r(s));return ln(h,p).join("")}function Ab(i,s){var o=rt,h=J;if(Xt(s)){var p="separator"in s?s.separator:p;o="length"in s?gt(s.length):o,h="omission"in s?hr(s.omission):h}i=It(i);var m=i.length;if(ys(i)){var E=$r(i);m=E.length}if(o>=m)return i;var T=o-vs(h);if(T<1)return h;var S=E?ln(E,0,T).join(""):i.slice(0,T);if(p===e)return S+h;if(E&&(T+=S.length-T),nh(p)){if(i.slice(T).search(p)){var W,V=S;for(p.global||(p=El(p.source,It(ca.exec(p))+"g")),p.lastIndex=0;W=p.exec(V);)var $=W.index;S=S.slice(0,$===e?T:$)}}else if(i.indexOf(hr(p),T)!=T){var Q=S.lastIndexOf(p);Q>-1&&(S=S.slice(0,Q))}return S+h}function bb(i){return i=It(i),i&&ar.test(i)?i.replace(xr,jv):i}var wb=Ts(function(i,s,o){return i+(o?" ":"")+s.toUpperCase()}),uh=Qp("toUpperCase");function Xd(i,s,o){return i=It(i),s=o?e:s,s===e?Gv(i)?tm(i):Fv(i):i.match(s)||[]}var Zd=Et(function(i,s){try{return or(i,e,s)}catch(o){return ih(o)?o:new pt(o)}}),Tb=Mi(function(i,s){return wr(s,function(o){o=li(o),Oi(i,o,eh(i[o],i))}),i});function _b(i){var s=i==null?0:i.length,o=ut();return i=s?$t(i,function(h){if(typeof h[1]!="function")throw new Tr(l);return[o(h[0]),h[1]]}):[],Et(function(h){for(var p=-1;++p<s;){var m=i[p];if(or(m[0],this,h))return or(m[1],this,h)}})}function Cb(i){return jm(Cr(i,A))}function oh(i){return function(){return i}}function Db(i,s){return i==null||i!==i?s:i}var Sb=Kp(),Ob=Kp(!0);function Je(i){return i}function lh(i){return Sp(typeof i=="function"?i:Cr(i,A))}function Nb(i){return Np(Cr(i,A))}function Mb(i,s){return Mp(i,Cr(s,A))}var Bb=Et(function(i,s){return function(o){return Ta(o,i,s)}}),Ib=Et(function(i,s){return function(o){return Ta(i,o,s)}});function hh(i,s,o){var h=Ee(s),p=Bu(s,h);o==null&&!(Xt(s)&&(p.length||!h.length))&&(o=s,s=i,i=this,p=Bu(s,Ee(s)));var m=!(Xt(o)&&"chain"in o)||!!o.chain,E=Ii(i);return wr(p,function(T){var S=s[T];i[T]=S,E&&(i.prototype[T]=function(){var W=this.__chain__;if(m||W){var V=i(this.__wrapped__),$=V.__actions__=Qe(this.__actions__);return $.push({func:S,args:arguments,thisArg:i}),V.__chain__=W,V}return S.apply(i,rn([this.value()],arguments))})}),i}function Rb(){return we._===this&&(we._=am),this}function ch(){}function Lb(i){return i=gt(i),Et(function(s){return Bp(s,i)})}var Pb=Wl($t),Fb=Wl(Jf),Ub=Wl(pl);function Qd(i){return Zl(i)?dl(li(i)):d1(i)}function kb(i){return function(s){return i==null?e:Ln(i,s)}}var Hb=td(),qb=td(!0);function fh(){return[]}function ph(){return!1}function Wb(){return{}}function Vb(){return""}function $b(){return!0}function zb(i,s){if(i=gt(i),i<1||i>Bt)return[];var o=se,h=Be(i,se);s=ut(s),i-=se;for(var p=vl(h,s);++o<i;)s(o);return p}function Gb(i){return dt(i)?$t(i,li):cr(i)?[i]:Qe(yd(It(i)))}function Yb(i){var s=++nm;return It(i)+s}var Xb=Uu(function(i,s){return i+s},0),Zb=Vl("ceil"),Qb=Uu(function(i,s){return i/s},1),jb=Vl("floor");function Kb(i){return i&&i.length?Mu(i,Je,Sl):e}function Jb(i,s){return i&&i.length?Mu(i,ut(s,2),Sl):e}function tw(i){return rp(i,Je)}function ew(i,s){return rp(i,ut(s,2))}function rw(i){return i&&i.length?Mu(i,Je,Bl):e}function iw(i,s){return i&&i.length?Mu(i,ut(s,2),Bl):e}var nw=Uu(function(i,s){return i*s},1),sw=Vl("round"),aw=Uu(function(i,s){return i-s},0);function uw(i){return i&&i.length?yl(i,Je):0}function ow(i,s){return i&&i.length?yl(i,ut(s,2)):0}return v.after=NE,v.ary=Dd,v.assign=vA,v.assignIn=qd,v.assignInWith=ju,v.assignWith=mA,v.at=xA,v.before=Sd,v.bind=eh,v.bindAll=Tb,v.bindKey=Od,v.castArray=WE,v.chain=Td,v.chunk=j1,v.compact=K1,v.concat=J1,v.cond=_b,v.conforms=Cb,v.constant=oh,v.countBy=uE,v.create=EA,v.curry=Nd,v.curryRight=Md,v.debounce=Bd,v.defaults=AA,v.defaultsDeep=bA,v.defer=ME,v.delay=BE,v.difference=tx,v.differenceBy=ex,v.differenceWith=rx,v.drop=ix,v.dropRight=nx,v.dropRightWhile=sx,v.dropWhile=ax,v.fill=ux,v.filter=lE,v.flatMap=fE,v.flatMapDeep=pE,v.flatMapDepth=dE,v.flatten=Ed,v.flattenDeep=ox,v.flattenDepth=lx,v.flip=IE,v.flow=Sb,v.flowRight=Ob,v.fromPairs=hx,v.functions=OA,v.functionsIn=NA,v.groupBy=gE,v.initial=fx,v.intersection=px,v.intersectionBy=dx,v.intersectionWith=gx,v.invert=BA,v.invertBy=IA,v.invokeMap=vE,v.iteratee=lh,v.keyBy=mE,v.keys=Ee,v.keysIn=Ke,v.map=zu,v.mapKeys=LA,v.mapValues=PA,v.matches=Nb,v.matchesProperty=Mb,v.memoize=Yu,v.merge=FA,v.mergeWith=Wd,v.method=Bb,v.methodOf=Ib,v.mixin=hh,v.negate=Xu,v.nthArg=Lb,v.omit=UA,v.omitBy=kA,v.once=RE,v.orderBy=xE,v.over=Pb,v.overArgs=LE,v.overEvery=Fb,v.overSome=Ub,v.partial=rh,v.partialRight=Id,v.partition=EE,v.pick=HA,v.pickBy=Vd,v.property=Qd,v.propertyOf=kb,v.pull=xx,v.pullAll=bd,v.pullAllBy=Ex,v.pullAllWith=Ax,v.pullAt=bx,v.range=Hb,v.rangeRight=qb,v.rearg=PE,v.reject=wE,v.remove=wx,v.rest=FE,v.reverse=Jl,v.sampleSize=_E,v.set=WA,v.setWith=VA,v.shuffle=CE,v.slice=Tx,v.sortBy=OE,v.sortedUniq=Mx,v.sortedUniqBy=Bx,v.split=fb,v.spread=UE,v.tail=Ix,v.take=Rx,v.takeRight=Lx,v.takeRightWhile=Px,v.takeWhile=Fx,v.tap=Kx,v.throttle=kE,v.thru=$u,v.toArray=Ud,v.toPairs=$d,v.toPairsIn=zd,v.toPath=Gb,v.toPlainObject=Hd,v.transform=$A,v.unary=HE,v.union=Ux,v.unionBy=kx,v.unionWith=Hx,v.uniq=qx,v.uniqBy=Wx,v.uniqWith=Vx,v.unset=zA,v.unzip=th,v.unzipWith=wd,v.update=GA,v.updateWith=YA,v.values=Ds,v.valuesIn=XA,v.without=$x,v.words=Xd,v.wrap=qE,v.xor=zx,v.xorBy=Gx,v.xorWith=Yx,v.zip=Xx,v.zipObject=Zx,v.zipObjectDeep=Qx,v.zipWith=jx,v.entries=$d,v.entriesIn=zd,v.extend=qd,v.extendWith=ju,hh(v,v),v.add=Xb,v.attempt=Zd,v.camelCase=KA,v.capitalize=Gd,v.ceil=Zb,v.clamp=ZA,v.clone=VE,v.cloneDeep=zE,v.cloneDeepWith=GE,v.cloneWith=$E,v.conformsTo=YE,v.deburr=Yd,v.defaultTo=Db,v.divide=Qb,v.endsWith=JA,v.eq=Gr,v.escape=tb,v.escapeRegExp=eb,v.every=oE,v.find=hE,v.findIndex=md,v.findKey=wA,v.findLast=cE,v.findLastIndex=xd,v.findLastKey=TA,v.floor=jb,v.forEach=_d,v.forEachRight=Cd,v.forIn=_A,v.forInRight=CA,v.forOwn=DA,v.forOwnRight=SA,v.get=sh,v.gt=XE,v.gte=ZE,v.has=MA,v.hasIn=ah,v.head=Ad,v.identity=Je,v.includes=yE,v.indexOf=cx,v.inRange=QA,v.invoke=RA,v.isArguments=Un,v.isArray=dt,v.isArrayBuffer=QE,v.isArrayLike=je,v.isArrayLikeObject=te,v.isBoolean=jE,v.isBuffer=hn,v.isDate=KE,v.isElement=JE,v.isEmpty=tA,v.isEqual=eA,v.isEqualWith=rA,v.isError=ih,v.isFinite=iA,v.isFunction=Ii,v.isInteger=Rd,v.isLength=Zu,v.isMap=Ld,v.isMatch=nA,v.isMatchWith=sA,v.isNaN=aA,v.isNative=uA,v.isNil=lA,v.isNull=oA,v.isNumber=Pd,v.isObject=Xt,v.isObjectLike=jt,v.isPlainObject=Na,v.isRegExp=nh,v.isSafeInteger=hA,v.isSet=Fd,v.isString=Qu,v.isSymbol=cr,v.isTypedArray=Cs,v.isUndefined=cA,v.isWeakMap=fA,v.isWeakSet=pA,v.join=yx,v.kebabCase=rb,v.last=Sr,v.lastIndexOf=vx,v.lowerCase=ib,v.lowerFirst=nb,v.lt=dA,v.lte=gA,v.max=Kb,v.maxBy=Jb,v.mean=tw,v.meanBy=ew,v.min=rw,v.minBy=iw,v.stubArray=fh,v.stubFalse=ph,v.stubObject=Wb,v.stubString=Vb,v.stubTrue=$b,v.multiply=nw,v.nth=mx,v.noConflict=Rb,v.noop=ch,v.now=Gu,v.pad=sb,v.padEnd=ab,v.padStart=ub,v.parseInt=ob,v.random=jA,v.reduce=AE,v.reduceRight=bE,v.repeat=lb,v.replace=hb,v.result=qA,v.round=sw,v.runInContext=D,v.sample=TE,v.size=DE,v.snakeCase=cb,v.some=SE,v.sortedIndex=_x,v.sortedIndexBy=Cx,v.sortedIndexOf=Dx,v.sortedLastIndex=Sx,v.sortedLastIndexBy=Ox,v.sortedLastIndexOf=Nx,v.startCase=pb,v.startsWith=db,v.subtract=aw,v.sum=uw,v.sumBy=ow,v.template=gb,v.times=zb,v.toFinite=Ri,v.toInteger=gt,v.toLength=kd,v.toLower=yb,v.toNumber=Or,v.toSafeInteger=yA,v.toString=It,v.toUpper=vb,v.trim=mb,v.trimEnd=xb,v.trimStart=Eb,v.truncate=Ab,v.unescape=bb,v.uniqueId=Yb,v.upperCase=wb,v.upperFirst=uh,v.each=_d,v.eachRight=Cd,v.first=Ad,hh(v,function(){var i={};return ui(v,function(s,o){Lt.call(v.prototype,o)||(i[o]=s)}),i}(),{chain:!1}),v.VERSION=n,wr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(i){v[i].placeholder=v}),wr(["drop","take"],function(i,s){bt.prototype[i]=function(o){o=o===e?1:de(gt(o),0);var h=this.__filtered__&&!s?new bt(this):this.clone();return h.__filtered__?h.__takeCount__=Be(o,h.__takeCount__):h.__views__.push({size:Be(o,se),type:i+(h.__dir__<0?"Right":"")}),h},bt.prototype[i+"Right"]=function(o){return this.reverse()[i](o).reverse()}}),wr(["filter","map","takeWhile"],function(i,s){var o=s+1,h=o==ct||o==O;bt.prototype[i]=function(p){var m=this.clone();return m.__iteratees__.push({iteratee:ut(p,3),type:o}),m.__filtered__=m.__filtered__||h,m}}),wr(["head","last"],function(i,s){var o="take"+(s?"Right":"");bt.prototype[i]=function(){return this[o](1).value()[0]}}),wr(["initial","tail"],function(i,s){var o="drop"+(s?"":"Right");bt.prototype[i]=function(){return this.__filtered__?new bt(this):this[o](1)}}),bt.prototype.compact=function(){return this.filter(Je)},bt.prototype.find=function(i){return this.filter(i).head()},bt.prototype.findLast=function(i){return this.reverse().find(i)},bt.prototype.invokeMap=Et(function(i,s){return typeof i=="function"?new bt(this):this.map(function(o){return Ta(o,i,s)})}),bt.prototype.reject=function(i){return this.filter(Xu(ut(i)))},bt.prototype.slice=function(i,s){i=gt(i);var o=this;return o.__filtered__&&(i>0||s<0)?new bt(o):(i<0?o=o.takeRight(-i):i&&(o=o.drop(i)),s!==e&&(s=gt(s),o=s<0?o.dropRight(-s):o.take(s-i)),o)},bt.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},bt.prototype.toArray=function(){return this.take(se)},ui(bt.prototype,function(i,s){var o=/^(?:filter|find|map|reject)|While$/.test(s),h=/^(?:head|last)$/.test(s),p=v[h?"take"+(s=="last"?"Right":""):s],m=h||/^find/.test(s);p&&(v.prototype[s]=function(){var E=this.__wrapped__,T=h?[1]:arguments,S=E instanceof bt,W=T[0],V=S||dt(E),$=function(At){var Tt=p.apply(v,rn([At],T));return h&&Q?Tt[0]:Tt};V&&o&&typeof W=="function"&&W.length!=1&&(S=V=!1);var Q=this.__chain__,nt=!!this.__actions__.length,ot=m&&!Q,xt=S&&!nt;if(!m&&V){E=xt?E:new bt(this);var lt=i.apply(E,T);return lt.__actions__.push({func:$u,args:[$],thisArg:e}),new _r(lt,Q)}return ot&&xt?i.apply(this,T):(lt=this.thru($),ot?h?lt.value()[0]:lt.value():lt)})}),wr(["pop","push","shift","sort","splice","unshift"],function(i){var s=yu[i],o=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",h=/^(?:pop|shift)$/.test(i);v.prototype[i]=function(){var p=arguments;if(h&&!this.__chain__){var m=this.value();return s.apply(dt(m)?m:[],p)}return this[o](function(E){return s.apply(dt(E)?E:[],p)})}}),ui(bt.prototype,function(i,s){var o=v[s];if(o){var h=o.name+"";Lt.call(As,h)||(As[h]=[]),As[h].push({name:s,func:o})}}),As[Fu(e,R).name]=[{name:"wrapper",func:e}],bt.prototype.clone=bm,bt.prototype.reverse=wm,bt.prototype.value=Tm,v.prototype.at=Jx,v.prototype.chain=tE,v.prototype.commit=eE,v.prototype.next=rE,v.prototype.plant=nE,v.prototype.reverse=sE,v.prototype.toJSON=v.prototype.valueOf=v.prototype.value=aE,v.prototype.first=v.prototype.head,va&&(v.prototype[va]=iE),v},ms=em();Nn?((Nn.exports=ms)._=ms,ll._=ms):we._=ms}).call(Os)}(Wa,Wa.exports);var kg=Wa.exports;const Mt=yh(kg);class St{isBox2=!0;min;max;constructor(t=new Y(1/0,1/0),e=new Y(-1/0,-1/0)){this.min=t,this.max=e}applyMatrix3(t){return this.isEmpty()?this:(qs[0].set(this.min.x,this.min.y).applyMatrix3(t),qs[1].set(this.min.x,this.max.y).applyMatrix3(t),qs[3].set(this.max.x,this.max.y).applyMatrix3(t),qs[2].set(this.max.x,this.min.y).applyMatrix3(t),this.setFromPoints(qs),this)}clone(){return new St().copy(this)}copy(t){return this.min.copy(t.min),this.max.copy(t.max),this}containsPoint(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y)}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}ceil(){return this.min.ceilToZero(),this.max.ceilToZero(),this}distanceToPoint(t){return Br.copy(t).clamp(this.min,this.max).sub(t).length()}expandByXY(t,e){return this.min.minXY(t,e),this.max.maxXY(t,e),this}expandByPoint(t){return this.min.min(t),this.max.max(t),this}expandByPoints(t){if(!t||!t.length)return this;for(let e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this}expandByVector(t){return this.min.sub(t),this.max.add(t),this}expandByScalar(t){return this.min.addScalar(-t),this.max.addScalar(t),this}expandByObject(t){return t.updateWorldMatrix(!1,!1),t.geometry.boundingBox!==void 0?((!t.geometry.boundingBox||t.geometry.boundingBox.isEmpty())&&t.computeBoundingBox(),Qn.copy(t.geometry.boundingBox),Qn.applyMatrix3(t.matrixWorld),this.union(Qn)):t.geometry.points&&t.geometry.points.length&&(Qn.setFromPoints(t.geometry.points),Qn.applyMatrix3(t.matrixWorld),this.union(Qn)),this}expandByBox(t){this.expandByPoint(t.min),this.expandByPoint(t.max)}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}floor(){return this.min.floorToZero(),this.max.floorToZero(),this}getCenter(t=new Y){return this.isEmpty()?t.set(0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(t){return this.isEmpty()?t.set(0,0):t.subVectors(this.max,this.min)}getPoints(t=[]){return t.length=0,t[0]={x:this.min.x,y:this.min.y},t[1]={x:this.min.x,y:this.max.y},t[2]={x:this.max.x,y:this.max.y},t[3]={x:this.max.x,y:this.min.y},t}getArea(){return this.getSize(Br),Br.x*Br.y}getParameter(t,e){return e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y}intersectsBox(t){return t?!(t.max.x<this.min.x||t.min.x>this.max.x||t.max.y<this.min.y||t.min.y>this.max.y):!1}intersectsObject(t){return!t||!t.geometry?!1:this.intersectsBox(t.geometry.boundingBox)}intersect(t){return this.min.max(t.min),this.max.min(t.max),this}makeEmpty(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this}round(){return this.min.roundToZero(),this.max.roundToZero(),this}set(t,e){return this.min.copy(t),this.max.copy(e),this}setFromArray(t){this.makeEmpty();for(let e=0,n=t.length;e<n;e+=3)this.expandByPoint(Br.fromArray(t,e));return this}setFromPoints(t){this.makeEmpty();for(let e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this}setFromCenterAndSize(t,e){const n=Br.copy(e).multiplyScalar(.5);return this.min.copy(t).sub(n),this.max.copy(t).add(n),this}setFromProjectionMatrix(t){return this.min.set(t.elements[6],t.elements[7]),this.max.set(t.elements[6],t.elements[7]),this}setFromObject(t){return this.makeEmpty(),this.expandByObject(t)}setFromMinMaxString(t,e=" "){if(this.makeEmpty(),!(t!=null&&t.length))return this;let n=t.split(e),a=Mt.map(n,u=>parseFloat(u));for(let u=0,l=a.length;u<l;u+=2)this.expandByPoint(Br.fromArray(a,u));return this}translate(t){return this.min.add(t),this.max.add(t),this}toString(){return`{"min":${this.min.toString()},"max":${this.max.toString()}}`}fromString(t){return t?(this.copy(JSON.parse(t)),this):this}union(t){return t.validate()?(this.min.min(t.min),this.max.max(t.max),this):this}validate(){return this.min.validate()&&this.max.validate()}unproject(t){return this.applyMatrix3(t.projectionMatrixInverse).applyMatrix3(t.matrixWorld)}centralArrange(t=1,e=20,n=10){const a=e+n;this.getCenter(Br),this.getSize(fn),fn.subScalar(e);const u=Math.floor(fn.x/a),l=Math.ceil(t/u),c=u*a,f=l*a;if(fn.x<a||fn.y<a||c>=fn.x||f>=fn.y)return Br.clone();let y=[],A=0,_=0;for(let C=0;C<t;C++){const F=u>t?t*a:c,N=Br.x-F/2+_*a+a/2,M=Br.y-f/2+A*a+a/2;y.push(new Y(N,M)),_++,_>=u&&(_=0,A++)}return y}}const Qn=new St,qs=[new Y,new Y,new Y,new Y],Br=new Y,fn=new Y,Hg=Object.freeze(Object.defineProperty({__proto__:null,default:St},Symbol.toStringTag,{value:"Module"})),qg=Zt.window.requestAnimationFrame,Ws=Zt.window.performance?()=>Zt.window.performance.now():()=>new Date().getTime(),oc=qg;class Pt{static idCounter=0;static children=[];static isRunning=!1;static actived=!1;static duration=0;static lastTime=Ws();static messages=[];static maxLetters=20;id=Pt.idCounter++;timers=new Map;timersDuration=new Map;counters=new Map;countersAmount=new Map;out=[];constructor(){}static active(t){t?Pt.actived=!0:Pt.actived=!1,Pt.duration=t||0}static add(t){this.children.push(t),this.handleStart()}static remove(t){for(let e=0,n=Pt.children.length;e<n;e++)if(Pt.children[e].id===t.id){this.children.splice(e,1);break}}static handleStart(){this.isRunning||(this.isRunning=!0,oc(this.runLoop))}static runLoop(){Pt.children.length?(Pt.runFrames(),oc(Pt.runLoop)):Pt.isRunning=!1}static runFrames(){let t,e=Ws();if(!(e-Pt.lastTime<Pt.duration)){Pt.lastTime=e;for(let n=0,a=this.children.length;n<a;n++)t=this.children[n],t.calculateTimers(),t.calculateCounters(),Pt.messages=Pt.messages.concat(t.out),t.out.length=0;if(Pt.messages.length){if(Pt.actived){let n=[];n.push(Wg),n.push(Vg),n.push($g),this.messages.forEach(a=>n.push(Qg(a,this.maxLetters))),n.push(zg),console.log(n.join(`
|
|
32
|
-
`))}Pt.messages.length=0}}}destroy(){Pt.remove(this)}addTimer(t,e=Ws(),n=Ws()-(this.timersDuration.get(t)||Ws())){this.addTimerDuration(t,n),this.timersDuration.set(t,e)}addTimerDuration(t,e){var n;this.timers.has(t)||this.timers.set(t,[]),(n=this.timers.get(t))==null||n.push(e)}calculateTimers(){this.timers.forEach((t,e)=>{!t||!t.length||(this.out.push(this.calculateDurations(e,t)),t.length=0)})}addCounterAmount(t,e){var n;this.counters.has(t)||this.counters.set(t,[]),(n=this.counters.get(t))==null||n.push(e)}calculateCounters(){this.counters.forEach((t,e)=>{!t||!t.length||(this.out.push(this.calculateAmounts(e,t)),t.length=0)})}start(){return this.stop(),Pt.add(this),this}stop(){return Pt.remove(this),this}calculateDurations(t,e){const n={name:t,avg:0,min:0,max:0,stdDev:0,count:0,FPS:0};if(!e||!e.length)return n;const a=e.length,{min:u,max:l,avg:c}=this.minMaxAvg(e),f=parseFloat(this.stdDev(e,c).toFixed(2));return{name:t,avg:this.fd(c),min:this.fd(u),max:this.fd(l),stdDev:f,count:a,FPS:Math.ceil(a/Pt.duration*1e3)}}calculateAmounts(t,e){const n={name:t,avg:0,min:0,max:0,stdDev:0,count:0,FPS:0};if(!e||!e.length)return n;const a=e.length,{min:u,max:l,avg:c}=this.minMaxAvg(e),f=this.stdDev(e,c);return{name:t,avg:c,min:u,max:l,stdDev:f,count:a,FPS:Math.ceil(a/Pt.duration*1e3)}}minMaxAvg(t){let e=t[0],n=t[0],a=t.length,u=0;for(let c=0;c<t.length;c++){const f=t[c];u+=f,f<e&&(e=f),f>n&&(n=f)}const l=u/a;return{min:this.fx(e),max:this.fx(n),avg:this.fx(l)}}stdDev(t,e){let n=0;for(let u=0;u<t.length;u++){const l=t[u];n+=(l-e)*(l-e)}const a=t.length;return this.fx(Math.sqrt(n/a))}fd(t){return t>1e3?(t/1e3).toFixed(1)+"s":t.toFixed(1)+"ms"}fx(t,e=1){return e===1?Math.round(t*10)/10:e===2?Math.round(t*100)/100:e===3?Math.round(t*1e3)/1e3:t}}const Va=20,$a=["avg","min","max","stdDev","count","FPS"],Qr=Yg($a,1),Wg=Gg($a,Va),Vg=Xg($a,Va),$g=Zg($a,Va),zg=jg(Va);function Gg(r,t=20){let e="┌";e+="─".repeat(t),e+="┬";for(let n=0,a=r.length;n<a;n++)e+="─".repeat(Qr),n<a-1?e+="┬":e+="┐";return e}function Yg(r,t=0){let e=0;for(let n=0,a=r.length;n<a;n++)e=Math.max(e,r[n].length);return e+t}function Xg(r,t=20){let e="│";e+=" ".repeat(t),e+="│";for(let n=0,a=r.length;n<a;n++)e+=" ".repeat(Math.max(Qr-r[n].length-1,0)),e+=r[n],e+=" │";return e}function Zg(r,t=20){let e="├";e+="─".repeat(t),e+="┼";for(let n=0,a=r.length;n<a;n++)e+="─".repeat(Qr),n<a-1?e+="┴":e+="┘";return e}function Qg(r,t=20){let e="│";e+=" ".repeat(Math.max(t-r.name.length,0)),e+=r.name,e+="│";const n=typeof r.avg=="string"?Qr-r.avg.length:Qr-r.avg.toString().length;return e+=" ".repeat(Math.max(n,0)),e+=r.avg+" ",e+=" ".repeat(Math.max(Qr-r.min.toString().length,0)),e+=r.min+" ",e+=" ".repeat(Math.max(Qr-r.max.toString().length,0)),e+=r.max+" ",e+=" ".repeat(Math.max(Qr-r.stdDev.toString().length,0)),e+=r.stdDev+" ",e+=" ".repeat(Math.max(Qr-r.count.toString().length,0)),e+=r.count+" ",e+=" ".repeat(Math.max(Qr-r.FPS.toString().length,0)),e+=r.FPS,e}function jg(r=20){let t="└";for(let e=0;e<r;e++)t+="─";return t+="┘",t}var er=(r=>(r.GROS="gros",r.RM="rm",r.WS="ws",r.SU="su",r.EQ="eq",r.FN="fn",r.GL="gl",r.IP="ip",r))(er||{}),Vs=(r=>(r.BACKGROUND="background",r.ASSETS="assets",r.ANNOTATIONS="annotations",r.TEXT="text",r.ASSET_LABELS="asset-labels",r.LABELS="labels",r))(Vs||{});class Ir{_listeners=new Map;destroy(){this._listeners.clear()}addEventListener(t,e){let n=this._listeners.get(t);n||(n=[],this._listeners.set(t,n)),n.includes(e)||n.push(e)}addEventListeners(t,e){const n=t.split(","),a=n.length;for(let u=0;u<a;u++)this.addEventListener(n[u].trim(),e)}isListening(t){var e;return this._listeners.has(t)&&!!((e=this._listeners.get(t))!=null&&e.length)}hasEventListener(t,e){var n;return this._listeners.size===0?!1:this._listeners.has(t)&&!!((n=this._listeners.get(t))!=null&&n.includes(e))}removeEventListener(t,e){const n=this._listeners.get(t);if(n){const a=n.indexOf(e);a>-1&&n.splice(a,1)}}dispatchEvent(t){const e=this._listeners.get(t.type);if(e){t.target=this;const n=e.slice(0);for(let a=0,u=n.length;a<u;a++)n[a].call(this,t);t.target=void 0}}dispatchEventAsync(t){const e=this._listeners.get(t.type);e&&setTimeout(()=>{for(const n of e)n.call(this,t)})}}function vo(r,t="http://www.w3.org/2000/svg"){var e,n;return(n=(e=Zt.window)==null?void 0:e.document)==null?void 0:n.createElementNS(t,r)}async function lc(r=2e3){return new Promise(t=>setTimeout(t,(Math.random()+.5)*r))}function hc(r,t=[]){var e,n;return!r||!r.value||(t.push(r.value),(e=r.children)!=null&&e.length&&((n=r.children)==null||n.forEach(a=>hc(a,t)))),t}function cc(r){if(!r)return"inches";let t=r.querySelector("#defaultView"),e=t==null?void 0:t.getAttribute("units");return e||"inches"}function Kg(r){if(!r)return 1;let t=cc(r),e=1;switch(t){case"mm":e=500/39.3701;break;case"cm":e=50/39.3701;break;case"Metres":e=.5/39.3701;break;case"m":e=.5/39.3701;break;default:e=1}return e}function Jg(r,t=new St){if(!r)return t;let e=r.split(" "),n=Mt.map(e,a=>parseFloat(a));return(n==null?void 0:n.length)!==4||(t.min.set(n[0],n[1]),t.max.set(n[0]+n[2],n[1]+n[3])),t}function t0(r=new St){let t="";const e=[];return e.push(r.min.x),e.push(r.min.y),e.push(Math.abs(r.max.x-r.min.x)),e.push(Math.abs(r.max.y-r.min.y)),t=e.join(" "),t}function fc(r){var t;if((t=r==null?void 0:r.children)!=null&&t.length){for(let e=0,n=r.children.length;e<n;e++)if(r.children[e].nodeName==="g")return r.children[e]}}const e0=new Pt().start();class r0{isSvgRenderer=!0;id;params;container=Zt.window.document.getElementsByTagName("body")[0];cameraVersion=-1;viewAreaLimit=-1;constructor(t){this.id="SvgRenderer@"+Date.now(),this.params=t,Zt.config=t,this.initSvg(),Pt.active(this.params.monitorDuration)}destroy(){Pt.active(0)}initSvg(){if(this.params.containerId&&(this.container=Zt.window.document.getElementById(this.params.containerId)),this.container||(this.container=Zt.window.document.getElementsByTagName("body")[0]),!this.params.width||!this.params.height){const t=this.container.getBoundingClientRect();this.params.width=t.width,this.params.height=t.height}this.container.style.overflow="hidden",this.container.style.transform="translateZ(0)",this.setSize(this.params.width,this.params.height)}resize(){var e,n;const t=(n=(e=this.container)==null?void 0:e.parentElement)==null?void 0:n.getBoundingClientRect();t&&this.setSize(t.width,t.height)}setSize(t,e){this.container.style.width=t+"px",this.container.style.height=e+"px",this.params.width=t,this.params.height=e,this.params.camera||(this.params.camera={}),this.params.camera.width=this.params.width,this.params.camera.height=this.params.height,this.params.aspect=this.params.width/this.params.height,this.params.camera.aspect=this.params.aspect,this.params.camera.left=this.params.width*-.5,this.params.camera.right=this.params.width*.5,this.params.camera.top=this.params.height*.5,this.params.camera.bottom=this.params.height*-.5}getSize(t){return t.set(this.params.width,this.params.height)}clean(){}async render(t,e){var a;if(!t||!e||this.cameraVersion===(e==null?void 0:e.version))return;e.updateMatrixWorld(),dc.set(0,0).unproject(e),gc.set(this.params.width,this.params.height).unproject(e),pc.setFromPoints([dc,gc]);let n=t0(pc);(a=t.svg)==null||a.setAttribute("viewBox",n),this.cameraVersion=e.version||-1,e0.addTimer("render cycle")}autoClear;getRenderTarget(){}setRenderTarget(t){}renderTexture(t){}}const pc=new St,dc=new Y,gc=new Y;class re{isMatrix3=!0;elements=[1,0,0,0,1,0,0,0,1];constructor(){}static equals(t,e,n=1e-6){if(t.elements.length!=e.elements.length)return!1;for(let a=0,u=t.elements.length;a<u;a++){const l=t.elements[a]-e.elements[a];if(Math.abs(l)>n)return!1}return!0}copy(t){const e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],this}clone(){return new re().fromArray(this.elements)}compose(t,e,n){const a=Math.sin(e.x),u=Math.cos(e.x);return this.set(n.x*u,n.y*a*-1,t.x,n.x*a,n.y*u,t.y,0,0,1)}composeWithCenter(t,e,n,a){return Rr.identity(),za.makeTranslation(t.x,t.y),$s.makeRotation(e.x),jn.makeScale(n.x,n.y),Ae.copy(a).applyMatrix3(jn),Rr.multiply(mo.makeTranslation(-Ae.x,-Ae.y)).multiply(za).multiply(mo.makeTranslation(Ae.x,Ae.y)).multiply($s).multiply(mo.makeTranslation(-Ae.x,-Ae.y)).multiply(jn),this.copy(Rr)}decompose(t,e,n){const a=Rr.copy(this).elements,u=Math.sqrt(a[0]*a[0]+a[3]*a[3]),l=Math.sqrt(a[1]*a[1]+a[4]*a[4]),c=a[0]*a[4]-a[3]*a[1];a[0]||a[3]?n.set(u,c/u):a[1]||a[4]?n.set(c/l,l):n.set(0,0);let f=0;a[0]||a[3]?f=a[3]>0?-Math.acos(a[0]/u):Math.acos(a[0]/u):a[1]||a[4]?f=Math.PI/2-(a[4]>0?Math.acos(-a[1]/l):-Math.acos(a[1]/l)):f=0,f!==0&&n.y<0&&(f*=-1),e.set(f,f),t.set(a[6],a[7])}compose2(t,e,n){return this.identity().translate(t.x,t.y).rotate(e.x).scale(n.x,n.y),this}decompose2(t,e,n){const a=this.clone();a.scale(-1,1);const u=a.elements[0],l=a.elements[1],c=a.elements[3],f=a.elements[4];let d=0,y=0,A=0;if(u!==0||c!==0){const _=Math.hypot(u,c);d=_,y=(u*f-l*c)/_;const C=Math.acos(u/_);A=c>0?-C:C}else if(l!==0||f!==0){const _=Math.hypot(l,f);d=(u*f-l*c)/_,y=_;const C=Math.acos(l/_);A=Math.PI/2+(f>0?-C:C)}else d=0,y=0,A=0;d=-d,t.x=a.elements[6],t.y=a.elements[7],e.x=e.y=A/Math.PI/180,n.x=d,n.y=y}composeSvgTransform(t=0,e=0,n){if(!n&&!t&&!e)return this;let a=n==null?void 0:n.split(") ").map(u=>u.trim()+")").filter(u=>u!==")");return a||(a=[]),(t||e)&&a.push(`translate(${t},${e})`),this.identity(),Rr.identity(),a.forEach(u=>{const l=/scale\(\s*([^\s,)]+)[ ,]([^\s,)]+)/.exec(u),c=/rotate\(\s*(-?\d*\.?\d+)(?:[ ,](-?\d*\.?\d+)(?:[ ,](-?\d*\.?\d+))?)?\s*\)/.exec(u),f=/translate\(\s*([^\s,)]+)[ ,]([^\s,)]+)/.exec(u);if(l){const d=Number(l[1])||1,y=Number(l[2])||d;Rr.multiply(jn.makeScale(d,y))}else c?Number(c[2])||Number(c[3])?(Ce.set(Number(c[2]||"0"),Number(c[3]||"0")),Rr.multiply($s.makeRotationByPoint(uc(Number(c[1])),Ce))):Rr.multiply($s.makeRotation(uc(Number(c[1])||0))):f&&Rr.multiply(za.makeTranslation(Number(f[1])||0,Number(f[2])||0))}),this.copy(Rr),this}decomposeSvgMatrix(t,e,n){const a=Rr.copy(this).elements;Ce.set(a[0],a[1]),Ae.set(a[3],a[4]);let u=Ce.length();Ce.normalize();let l=Ce.dot(Ae);yc.copy(Ce).multiplyScalar(-l),Ae.add(yc);const c=Ae.length()||0;Ae.normalize(),Ce.x*Ae.y<Ae.x*Ce.y&&(Ce.x=-Ce.x,Ce.y=-Ce.y,u=-u,l=-l);const f=u?Math.atan2(Ce.y,Ce.x):Math.atan2(-Ce.x,Ae.y);t.set(a[6],a[7]),e.set(f,f),n.set(u,c)}determinant(){const t=this.elements,e=t[0],n=t[3],a=t[6],u=t[1],l=t[4],c=t[7],f=t[2],d=t[5],y=t[8];return e*l*y-e*d*c-u*n*y+u*d*a+f*n*c-f*l*a}equals(t,e=0){const n=this.elements,a=t.elements;for(let u=0;u<9;u++)if(Math.abs(n[u]-a[u])>e)return!1;return!0}extractBasis2(t,e){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),this}flipY(){return this.multiply(jn.makeScale(1,-1))}fromArray(t,e=0){for(let n=0;n<9;n++)this.elements[n]=t[n+e];return this}getComponents(t=[1,0,0,1,0,0]){return t[0]=this.elements[0],t[1]=this.elements[1],t[2]=this.elements[3],t[3]=this.elements[4],t[4]=this.elements[6],t[5]=this.elements[7],t}getNormalMatrix(t){return this.setFromMatrix(t).invert().transpose()}getRotation(t){let e=this.elements;const n=Math.sqrt(e[0]*e[0]+e[3]*e[3]),a=Math.sqrt(e[1]*e[1]+e[4]*e[4]);let u=0;e[0]||e[3]?u=e[3]>0?-Math.acos(e[0]/n):Math.acos(e[0]/n):e[1]||e[4]?u=Math.PI/2-(e[4]>0?Math.acos(-e[1]/a):-Math.acos(e[1]/a)):u=0,this.getScale(Ae),u!==0&&Ae.x<0&&(u*=-1),t.set(u,u)}getScale(t){let e=this.elements,n=Math.sqrt(e[0]*e[0]+e[1]*e[1]),a=Math.sqrt(e[3]*e[3]+e[4]*e[4]),u=e[0]*e[4]-e[3]*e[1];e[0]||e[1]?t.set(u/a,a):e[3]||e[4]?t.set(n,u/n):t.set(0,0)}getTransition(t){t.set(this.elements[6],this.elements[7])}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}invert(){const t=this.elements,e=t[0],n=t[1],a=t[2],u=t[3],l=t[4],c=t[5],f=t[6],d=t[7],y=t[8],A=y*l-c*d,_=c*f-y*u,C=d*u-l*f,F=e*A+n*_+a*C;if(F===0)return this.set(0,0,0,0,0,0,0,0,0);const N=1/F;return t[0]=A*N,t[1]=(a*d-y*n)*N,t[2]=(c*n-a*l)*N,t[3]=_*N,t[4]=(y*e-a*f)*N,t[5]=(a*u-c*e)*N,t[6]=C*N,t[7]=(n*f-d*e)*N,t[8]=(l*e-n*u)*N,this}lookAt(t,e,n){return this.identity().rotate(e.angle()-t.angle()+n.angle())}makeProjection(t,e,n,a,u,l){const c=u/(e-t),f=l/(n-a),d=u/2-(e+t)*c,y=l/2+(n+a)*f;return this.elements[0]=c,this.elements[3]=0,this.elements[6]=d,this.elements[1]=0,this.elements[4]=-f,this.elements[7]=y,this.elements[2]=0,this.elements[5]=0,this.elements[8]=1,this}makeRotation(t){const e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,n,e,0,0,0,1),this}makeRotationByPoint(t,e){const n=Math.cos(t),a=Math.sin(t),u=-e.x*n+e.y*a+e.x,l=-e.x*a-e.y*n+e.y;return this.set(n,-a,u,a,n,l,0,0,1),this}makeRotationFromQuaternion(t){return this.compose(i0,t,n0)}makeScale(t,e){return this.set(t,0,0,0,e,0,0,0,1),this}makeTranslation(t,e){return this.set(1,0,t,0,1,e,0,0,1),this}multiply(t){return this.multiplyMatrices(this,t)}multiplyMatrices(t,e){const n=t.elements,a=e.elements,u=this.elements,l=n[0],c=n[3],f=n[6],d=n[1],y=n[4],A=n[7],_=n[2],C=n[5],F=n[8],N=a[0],M=a[3],R=a[6],q=a[1],z=a[4],w=a[7],L=a[2],k=a[5],j=a[8];return u[0]=l*N+c*q+f*L,u[3]=l*M+c*z+f*k,u[6]=l*R+c*w+f*j,u[1]=d*N+y*q+A*L,u[4]=d*M+y*z+A*k,u[7]=d*R+y*w+A*j,u[2]=_*N+C*q+F*L,u[5]=_*M+C*z+F*k,u[8]=_*R+C*w+F*j,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this}premultiply(t){return this.multiplyMatrices(t,this)}rotate(t){return this.premultiply($s.makeRotation(-t))}scale(t,e){return this.premultiply(jn.makeScale(t,e))}set(t,e,n,a,u,l,c,f,d){return this.elements[0]=t,this.elements[3]=e,this.elements[6]=n,this.elements[1]=a,this.elements[4]=u,this.elements[7]=l,this.elements[2]=c,this.elements[5]=f,this.elements[8]=d,this}setFromDomMatrix(t){return typeof t.m11<"u"&&typeof t.m21<"u"&&typeof t.m41<"u"&&typeof t.m12<"u"&&typeof t.m22<"u"&&typeof t.m42<"u"&&typeof t.m14<"u"&&typeof t.m24<"u"&&typeof t.m44<"u"?this.set(t.m11,t.m21,t.m41,t.m12,t.m22,t.m42,t.m14,t.m24,t.m44):typeof t.a<"u"&&typeof t.b<"u"&&typeof t.c<"u"&&typeof t.d<"u"&&typeof t.e<"u"&&typeof t.f<"u"&&this.set(t.a,t.c,t.e,t.b,t.d,t.f,0,0,1),this}setFromMatrix(t){const e=t.elements;return this.set(e[0],e[3],e[6],e[1],e[4],e[7],e[2],e[5],e[8]),this}setUvTransform(t,e,n,a,u,l,c){const f=Math.cos(u),d=Math.sin(u);return this.set(n*f,n*d,-n*(f*l+d*c)+l+t,-a*d,a*f,-a*(-d*l+f*c)+c+e,0,0,1),this}toArray(t=[],e=0){const n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t}toString(){return`[${this.elements[0]},${this.elements[1]}, ${this.elements[3]},${this.elements[4]}, ${this.elements[6]},${this.elements[7]}]`}translate(t,e){return this.premultiply(za.makeTranslation(t,e))}transpose(){let t;const e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}transposeIntoArray(t){const e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this}}const Ce=new Y,Ae=new Y,yc=new Y,Rr=new re,za=new re,$s=new re,jn=new re,mo=new re,i0=new Y(0,0,0),n0=new Y(1,1,1),De=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"],s0=()=>{const r=Math.random()*4294967295|0,t=Math.random()*4294967295|0,e=Math.random()*4294967295|0,n=Math.random()*4294967295|0;return(De[r&255]+De[r>>8&255]+De[r>>16&255]+De[r>>24&255]+"-"+De[t&255]+De[t>>8&255]+"-"+De[t>>16&15|64]+De[t>>24&255]+"-"+De[e&63|128]+De[e>>8&255]+"-"+De[e>>16&255]+De[e>>24&255]+De[n&255]+De[n>>8&255]+De[n>>16&255]+De[n>>24&255]).toLowerCase()};let a0=0;const xo=new Y,jr=new re,vc=new Y,Eo=new St,zs=new Y,Ao=new Y,pn=new Y,u0=new Y(0,1),o0={type:"added"},bo={type:"removed"};class mc extends Ir{isObject2=!0;id=a0++;uuid=s0();name;type="Object2";featureKey="Object2_"+this.id;parent;children=[];up=new Y(0,1);position=new Y;rotation=new Y;scaled=new Y(1,1);flipY=!1;selectable=!1;matrix=new re;matrixWorld=new re;matrixWorldInverse=new re;modelViewMatrix=new re;normalMatrix=new re;fixed=!1;dynamically=!1;matrixAutoUpdate=!1;matrixWorldNeedsUpdate=!1;matrixWorldAutoUpdate=!1;composeNode=!1;isInComposeNode=!1;alignCenter=!1;boundingBox=new St;boundingBoxWorld=new St;boundingBoxNeedsUpdate=!1;centerPoint=new Y;visible=!0;castShadow=!1;receiveShadow=!1;renderOrder=0;animations=[];finalSize;userData={};DefaultUp=new Y(0,1);_autoSort=!0;constructor(t={}){super(),t.name!==void 0?this.name=t.name:this.name="Object2",t.flipY!==void 0&&(this.flipY=t.flipY),t.selectable!==void 0&&(this.selectable=t.selectable),t.finalSize!==void 0&&(this.finalSize=t.finalSize),this.setAttrs(t)}_version=0;get version(){return this._version}set version(t){this._version=t}set needsUpdate(t){t&&this._version++}destroy(){super.destroy(),this.clear(),this.parent=void 0,this.dispatchEvent(bo)}setPosition(t){return this.position.set(t.x,t.y),this}translate(t,e){this.position.x+=t,this.position.y+=e}setScale(t,e){return this.scaled.set(t,e),this}setRotationFromMatrix(t){t.decompose(zs,this.rotation,Ao)}setRotation(t){return this.rotation.set(t,t),this}rotate(t){this.rotation.x+=t}scale(t,e){e?(this.scaled.x*=t,this.scaled.y*=e):this.scaled.multiplyScalar(t)}localToWorld(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix3(this.matrixWorld)}worldToLocal(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix3(jr.copy(this.matrixWorld).invert())}lookAt(t){vc.copy(t),this.updateWorldMatrix(!0,!1),this.matrixWorld.getTransition(zs),jr.lookAt(zs,vc,u0),jr.getRotation(pn),this.rotation.set(pn.x,pn.x),this.parent&&(this.parent.matrixWorld.getRotation(pn),this.rotate(pn.x))}applyMatrix3(t){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(t),this.matrix.decompose(this.position,this.rotation,this.scaled)}updateMatrix(){xo.copy(this.scaled),this.flipY&&(xo.y*=-1),this.matrix.compose(this.position,this.rotation,xo),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(this.parent?this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix):this.matrixWorld.copy(this.matrix),this.matrixWorldInverse.copy(this.matrixWorld).invert(),this.matrixWorldNeedsUpdate=!1,t=!0,this.boundingBoxNeedsUpdate=!0);const e=this.children;for(let n=0,a=e.length;n<a;n++)e[n].updateMatrixWorld(t);this.boundingBoxNeedsUpdate&&(this.updateBoundingBox(),this.boundingBoxNeedsUpdate=!1)}updateWorldMatrix(t=!1,e=!1){const n=this.parent;if(t&&n&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.parent?this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix):this.matrixWorld.copy(this.matrix),this.matrixWorldInverse.copy(this.matrixWorld).invert(),e){const a=this.children;for(let u=0,l=a.length;u<l;u++)a[u].updateWorldMatrix(!1,!0)}}updateModelViewMatrix(t){jr.copy(this.matrixWorld),this.isInComposeNode?this.modelViewMatrix.copy(this.matrix):t&&this.fixed?this.modelViewMatrix.copy(t.projectionMatrix):t?this.modelViewMatrix.multiplyMatrices(t.viewMatrix,jr):this.modelViewMatrix.copy(jr);for(let e=0,n=this.children.length;e<n;e++)this.children[e].updateModelViewMatrix(t)}computeBoundingBox(){this.boundingBox.makeEmpty(),this.centerPoint.set(0,0);for(let t=0,e=this.children.length;t<e;t++)this.children[t].updateMatrixWorld(),Eo.copy(this.children[t].computeBoundingBox()),Eo.applyMatrix3(jr.copy(this.children[t].matrixWorld)),this.boundingBox.union(Eo);return this.boundingBox.applyMatrix3(this.matrixWorldInverse),this.boundingBox}updateBoundingBox(){this.boundingBox.isEmpty()||this.boundingBoxWorld.copy(this.boundingBox).applyMatrix3(this.matrixWorld)}setAttrs(t){if(!t)return this;for(const e in t)if(!(e==="children"||t[e]===void 0)){if(e==="userData"&&t[e]){Object.keys(t[e]).forEach(n=>this.userData[n]=t[e][n]);continue}this.userData[e]=t[e]}return this}add(t){return!t||!t.isObject2||t===this?this:(t.parent&&t.parent.remove(t),t.parent=this,this.children.push(t),t.isInComposeNode=this.composeNode||this.isInComposeNode,t.selectable&&t.parent.setSelectable(t.selectable),this._autoSort&&this.children.sort((e,n)=>e.renderOrder-n.renderOrder),t.dispatchEvent(o0),this.matrixAutoUpdate||(this.matrixWorldNeedsUpdate=!0),this)}adds(t){if(!t||!t.length)return this;this._autoSort=!1;for(let e=0,n=t.length;e<n;e++)e===t.length-1&&(this._autoSort=!0),this.add(t[e]);return this}remove(t){const e=this.children.indexOf(t);return e!==-1&&(t.parent=void 0,this.children.splice(e,1),t.dispatchEvent(bo)),this}removes(t){for(let e=0,n=t.length;e<n;e++)this.remove(t[e]);return this}removeFromParent(){const t=this.parent;return t&&t.remove(this),this}moveToLast(){var e;if(!this.parent)return;let t=this.clone();this.removeFromParent(),(e=t.parent)==null||e.add(t)}clear(){for(let t=0;t<this.children.length;t++){const e=this.children[t];e.parent=void 0,e.destroy(),e.dispatchEvent(bo)}return this.children.length=0,this}attach(t){return this.updateWorldMatrix(!0,!1),jr.copy(this.matrixWorld).invert(),t.parent&&(t.parent.updateWorldMatrix(!0,!1),jr.multiply(t.parent.matrixWorld)),t.applyMatrix3(jr),this.add(t),t.updateWorldMatrix(!1,!0),this}getObjectById(t){return this.getObjectByProperty("id",t)}getObjectByName(t){return this.getObjectByProperty("name",t)}getObjectByProperty(t,e){if(this[t]===e)return this;for(let n=0,a=this.children.length;n<a;n++){const l=this.children[n].getObjectByProperty(t,e);if(l!==void 0)return l}}getWorldPosition(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(t,pn,Ao),t}getWorldRotation(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(zs,t,Ao),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(zs,pn,t),t}getWorldDirection(t){return this.updateWorldMatrix(!0,!1),t.set(this.matrixWorld.elements[6],this.matrixWorld.elements[7]).normalize()}traverse(t){t(this);const e=this.children;for(let n=0,a=e.length;n<a;n++)e[n].traverse(t)}traverseVisible(t){if(this.visible)return;t(this);const e=this.children;for(let n=0,a=e.length;n<a;n++)e[n].traverseVisible(t)}traverseAncestors(t){const e=this.parent;e&&(t(e),e.traverseAncestors(t))}onBeforeRender(t,e,n){}render(t){}onAfterRender(t,e,n){}setSelectable(t){this.selectable=t,this.parent&&this.parent.setSelectable(t)}raycast(t,e=[]){}clone(t=!0){const e=this.constructor;return new e(this.userData).copy(this,t)}copy(t,e=!0){if(this.name=t.name,this.type=t.type,this.featureKey=t.featureKey,this._version=0,this.parent=t.parent,this.up.copy(t.up),this.position.copy(t.position),this.rotation.copy(t.rotation),this.scaled.copy(t.scaled),this.flipY=t.flipY,this.selectable=t.selectable,this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.modelViewMatrix.copy(t.modelViewMatrix),this.normalMatrix.copy(t.normalMatrix),this.fixed=t.fixed,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.composeNode=t.composeNode,this.alignCenter=t.alignCenter,this.boundingBox.copy(t.boundingBox),this.boundingBoxWorld.copy(t.boundingBoxWorld),this.boundingBoxNeedsUpdate=t.boundingBoxNeedsUpdate,this.centerPoint.copy(t.centerPoint),this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.renderOrder=t.renderOrder,this.animations=t.animations.slice(),this.userData=JSON.parse(JSON.stringify(t.userData)),e)for(let n=0;n<t.children.length;n++){const a=t.children[n];this.add(a.clone())}return this}}class l0 extends mc{name="Scene";type="Scene";isScene=!0;view;background;featureKey="Scene_"+this.id;matrixAutoUpdate=!1;constructor(){super()}destroy(){super.destroy(),this.boundingBox.makeEmpty()}setup(t){this.view=t}onBeforeRender(t,e,n){super.onBeforeRender(t,e,n),n&&this.cameraVersion!==n.version&&(this.matrixAutoUpdate||this.updateMatrix(),this.needsUpdate=!0,this.cameraVersion=n.version)}render(t){var e;this.visible&&((e=this.children)==null||e.forEach(function(n){n.isShape&&n.render(t)}))}getIntersectObjects(t,e=er.RM,n=[]){throw new Error("must be implemented in derived")}}class h0{isLoading=!1;itemsLoaded=0;itemsTotal=0;urlModifier;handlers=[];onStart;onLoad;onProgress;onError;constructor(t,e,n){this.onLoad=t,this.onProgress=e,this.onError=n}itemStart(t){this.itemsTotal++,this.isLoading||this.onStart!==void 0&&this.onStart(t,this.itemsLoaded,this.itemsTotal),this.isLoading=!0}itemEnd(t){this.itemsLoaded++,this.onProgress!==void 0&&this.onProgress(t,this.itemsLoaded,this.itemsTotal),this.itemsLoaded===this.itemsTotal&&(this.isLoading=!1,this.onLoad!==void 0&&this.onLoad())}itemError(t){this.onError!==void 0&&this.onError(t)}resolveURL(t){return this.urlModifier!==void 0?this.urlModifier(t):t}setURLModifier(t){return this.urlModifier=t,this}addHandler(t,e){return this.handlers.push(t,e),this}removeHandler(t){const e=this.handlers.indexOf(t);return e!==-1&&this.handlers.splice(e,2),this}getHandler(t){for(let e=0,n=this.handlers.length;e<n;e+=2){const a=this.handlers[e],u=this.handlers[e+1];if(a.global&&(a.lastIndex=0),a.test(t))return u}return null}}const xc={enabled:!1,files:{},add:function(r,t){this.enabled&&(this.files[r]=t)},get:function(r){if(this.enabled)return this.files[r]},remove:function(r){delete this.files[r]},clear:function(){this.files={}}},c0=new h0;class Ec{manager;crossOrigin="anonymous";withCredentials=!1;path="";resourcePath="";requestHeader={};constructor(t=c0){this.manager=t}loadAsync(t,e){const n=this;return new Promise(function(a,u){n.load(t,a,e,u)})}setCrossOrigin(t){return this.crossOrigin=t,this}setWithCredentials(t){return this.withCredentials=t,this}setPath(t){return this.path=t,this}setResourcePath(t){return this.resourcePath=t,this}setRequestHeader(t){return this.requestHeader=t,this}}const gi={};class f0 extends Error{response;constructor(t,e){super(t),this.response=e}}class p0 extends Ec{mimeType;responseType;constructor(t){super(t)}load(t,e,n,a){t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);const u=xc.get(t);if(u!==void 0)return this.manager.itemStart(t),setTimeout(()=>{e&&e(u),this.manager.itemEnd(t)},0),u;if(gi[t]!==void 0){gi[t].push({onLoad:e,onProgress:n,onError:a});return}gi[t]=[],gi[t].push({onLoad:e,onProgress:n,onError:a});const l=new Zt.window.Request(t,{headers:new Zt.window.Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),c=this.mimeType,f=this.responseType;fetch(l).then(d=>{if(d.status===200||d.status===0){if(d.status===0&&console.warn("FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||d.body===void 0||d.body.getReader===void 0)return d;const y=gi[t],A=d.body.getReader(),_=d.headers.get("Content-Length")||d.headers.get("X-File-Size"),C=_?parseInt(_):0,F=C!==0;let N=0;const M=new ReadableStream({start(R){q();function q(){A.read().then(({done:z,value:w})=>{if(z)R.close();else{N+=w.byteLength;const L=new ProgressEvent("progress",{lengthComputable:F,loaded:N,total:C});for(let k=0,j=y.length;k<j;k++){const tt=y[k];tt.onProgress&&tt.onProgress(L)}R.enqueue(w),q()}})}}});return new Response(M)}else throw new f0(`fetch for "${d.url}" responded with ${d.status}: ${d.statusText}`,d)}).then(d=>{switch(f){case"arraybuffer":return d.arrayBuffer();case"blob":return d.blob();case"document":return d.text().then(y=>new DOMParser().parseFromString(y,c));case"json":return d.json();default:if(c===void 0)return d.text();{const A=/charset="?([^;"\s]*)"?/i.exec(c),_=A&&A[1]?A[1].toLowerCase():void 0,C=new TextDecoder(_);return d.arrayBuffer().then(F=>C.decode(F))}}}).then(d=>{xc.add(t,d);const y=gi[t];delete gi[t];for(let A=0,_=y.length;A<_;A++){const C=y[A];C.onLoad&&C.onLoad(d)}}).catch(d=>{const y=gi[t];if(y===void 0)throw this.manager.itemError(t),d;delete gi[t];for(let A=0,_=y.length;A<_;A++){const C=y[A];C.onError&&C.onError(d)}this.manager.itemError(t)}).finally(()=>{this.manager.itemEnd(t)}),this.manager.itemStart(t)}setMimeType(t){return this.mimeType=t,this}setResponseType(t){return this.responseType=t,this}}class Ac extends Ec{constructor(t){super(t)}load(t,e,n,a){const u=this,l=new p0(u.manager);l.setPath(u.path),l.setRequestHeader(u.requestHeader),l.setWithCredentials(u.withCredentials),l.load(t,function(c){try{e&&e(c)}catch(f){a?a(f):console.error(f),u.manager.itemError(t)}},n,a)}}const Kn="ae",bc="-",Ga="rm-assets",wc="rm-labels";function Gs(r){return r+bc+Vs.ASSETS}function Ya(r){return r+bc+Vs.LABELS}const d0={rm:["su-assets","su-labels","eq-assets","eq-labels","fn-assets","fn-labels"],su:[Ga,wc,"eq-assets","eq-labels","fn-assets","fn-labels"],eq:[Ga,wc,"su-assets","su-labels","fn-assets","fn-labels"]};function wo(r,t,e){const n=r==null?void 0:r.getAttribute(t);return n?Number(n):e}new re().makeScale(1,-1);function g0(r,t,e,n,a,u,l,c,f){let d=f*(Math.PI/180),y=Math.cos(d)*(r-e)/2+Math.sin(d)*(t-n)/2,A=-1*Math.sin(d)*(r-e)/2+Math.cos(d)*(t-n)/2,_=y*y/(l*l)+A*A/(c*c);_>1&&(l*=Math.sqrt(_),c*=Math.sqrt(_));let C=Math.sqrt((l*l*(c*c)-l*l*(A*A)-c*c*(y*y))/(l*l*(A*A)+c*c*(y*y)));a===u&&(C*=-1),isNaN(C)&&(C=0);let F=C*l*A/c,N=C*-c*y/l,M=(r+e)/2+Math.cos(d)*F-Math.sin(d)*N,R=(t+n)/2+Math.sin(d)*F+Math.cos(d)*N,q=function(Z){return Math.sqrt(Z[0]*Z[0]+Z[1]*Z[1])},z=function(Z,rt){return(Z[0]*rt[0]+Z[1]*rt[1])/(q(Z)*q(rt))},w=function(Z,rt){return(Z[0]*rt[1]<Z[1]*rt[0]?-1:1)*Math.acos(z(Z,rt))},L=w([1,0],[(y-F)/l,(A-N)/c]),k=[(y-F)/l,(A-N)/c],j=[(-1*y-F)/l,(-1*A-N)/c],tt=w(k,j);return z(k,j)<=-1&&(tt=Math.PI),z(k,j)>=1&&(tt=0),u===0&&tt>0&&(tt=tt-2*Math.PI),u===1&&tt<0&&(tt=tt+2*Math.PI),[M,R,l,c,L,tt,d,u]}const ie=" ";function y0(r){let t="";Array.isArray(r)||(r=[r]);for(let e=0;e<r.length;e++){const n=r[e];if(n.type===H.CLOSE_PATH)t+="z";else if(n.type===H.HORIZ_LINE_TO)t+=(n.relative?"h":"H")+n.x;else if(n.type===H.VERT_LINE_TO)t+=(n.relative?"v":"V")+n.y;else if(n.type===H.MOVE_TO)t+=(n.relative?"m":"M")+n.x+ie+n.y;else if(n.type===H.LINE_TO)t+=(n.relative?"l":"L")+n.x+ie+n.y;else if(n.type===H.CURVE_TO)t+=(n.relative?"c":"C")+n.x1+ie+n.y1+ie+n.x2+ie+n.y2+ie+n.x+ie+n.y;else if(n.type===H.SMOOTH_CURVE_TO)t+=(n.relative?"s":"S")+n.x2+ie+n.y2+ie+n.x+ie+n.y;else if(n.type===H.QUAD_TO)t+=(n.relative?"q":"Q")+n.x1+ie+n.y1+ie+n.x+ie+n.y;else if(n.type===H.SMOOTH_QUAD_TO)t+=(n.relative?"t":"T")+n.x+ie+n.y;else if(n.type===H.ARC)t+=(n.relative?"a":"A")+n.rX+ie+n.rY+ie+n.xRot+ie+ +n.lArcFlag+ie+ +n.sweepFlag+ie+n.x+ie+n.y;else throw new Error(`Unexpected command type "${n==null?void 0:n.type}" at index ${e}.`)}return t}function To([r,t],e){return[r*Math.cos(e)-t*Math.sin(e),r*Math.sin(e)+t*Math.cos(e)]}function Lr(...r){for(let t=0;t<r.length;t++)if(typeof r[t]!="number")throw new Error(`assertNumbers arguments[${t}] is not a number. ${typeof r[t]} == typeof ${r[t]}`);return!0}const Ui=Math.PI;function _o(r,t,e){r.lArcFlag=r.lArcFlag===0?0:1,r.sweepFlag=r.sweepFlag===0?0:1;let{rX:n,rY:a}=r;const{x:u,y:l}=r;n=Math.abs(r.rX),a=Math.abs(r.rY);const[c,f]=To([(t-u)/2,(e-l)/2],-r.xRot/180*Ui),d=Math.pow(c,2)/Math.pow(n,2)+Math.pow(f,2)/Math.pow(a,2);1<d&&(n*=Math.sqrt(d),a*=Math.sqrt(d)),r.rX=n,r.rY=a;const y=Math.pow(n,2)*Math.pow(f,2)+Math.pow(a,2)*Math.pow(c,2),A=(r.lArcFlag!==r.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(n,2)*Math.pow(a,2)-y)/y)),_=n*f/a*A,C=-a*c/n*A,F=To([_,C],r.xRot/180*Ui);r.cX=F[0]+(t+u)/2,r.cY=F[1]+(e+l)/2,r.phi1=Math.atan2((f-C)/a,(c-_)/n),r.phi2=Math.atan2((-f-C)/a,(-c-_)/n),r.sweepFlag===0&&r.phi2>r.phi1&&(r.phi2-=2*Ui),r.sweepFlag===1&&r.phi2<r.phi1&&(r.phi2+=2*Ui),r.phi1*=180/Ui,r.phi2*=180/Ui}function Tc(r,t,e){Lr(r,t,e);const n=r*r+t*t-e*e;if(0>n)return[];if(n===0)return[[r*e/(r*r+t*t),t*e/(r*r+t*t)]];const a=Math.sqrt(n);return[[(r*e+t*a)/(r*r+t*t),(t*e-r*a)/(r*r+t*t)],[(r*e-t*a)/(r*r+t*t),(t*e+r*a)/(r*r+t*t)]]}const yi=Math.PI/180;function _c(r,t,e){return(1-e)*r+e*t}function Cc(r,t,e,n){return r+Math.cos(n/180*Ui)*t+Math.sin(n/180*Ui)*e}function Dc(r,t,e,n){const u=t-r,l=e-t,c=n-e,f=3*u+3*c-6*l,d=(l-u)*6,y=3*u;return Math.abs(f)<1e-6?[-y/d]:v0(d/f,y/f,1e-6)}function Sc(r,t,e,n,a){const u=1-a,l=u*u*u,c=3*u*u*a,f=3*u*a*a,d=a*a*a;return r*l+t*c+e*f+n*d}function v0(r,t,e=1e-6){const n=r*r/4-t;if(n<-e)return[];if(n<=e)return[-r/2];const a=Math.sqrt(n);return[-(r/2)-a,-(r/2)+a]}function m0(r,t,e){r.cX||_o(r,t,e);const n=Math.min(r.phi1,r.phi2),a=Math.max(r.phi1,r.phi2),u=a-n,l=Math.ceil(u/90),c=new Array(l);let f=t,d=e;for(let y=0;y<l;y++){const A=_c(r.phi1,r.phi2,y/l),_=_c(r.phi1,r.phi2,(y+1)/l),C=_-A,F=4/3*Math.tan(C*yi/4),[N,M]=[Math.cos(A*yi)-F*Math.sin(A*yi),Math.sin(A*yi)+F*Math.cos(A*yi)],[R,q]=[Math.cos(_*yi),Math.sin(_*yi)],[z,w]=[R+F*Math.sin(_*yi),q-F*Math.cos(_*yi)],L={relative:r.relative,type:H.CURVE_TO},k=(j,tt)=>{const[Z,rt]=To([j*r.rX,tt*r.rY],r.xRot);return[r.cX+Z,r.cY+rt]};[L.x1,L.y1]=k(N,M),[L.x2,L.y2]=k(z,w),[L.x,L.y]=k(R,q),r.relative&&(L.x1-=f,L.y1-=d,L.x2-=f,L.y2-=d,L.x-=f,L.y-=d),[f,d]=[L.x,L.y],c[y]=L}return c}function x0(r=1e13){Lr(r);function t(e){return Math.round(e*r)/r}return function(n){return"x1"in n&&typeof n.x1<"u"&&(n.x1=t(n.x1)),"y1"in n&&typeof n.y1<"u"&&(n.y1=t(n.y1)),"x2"in n&&typeof n.x2<"u"&&(n.x2=t(n.x2)),"y2"in n&&typeof n.y2<"u"&&(n.y2=t(n.y2)),"x"in n&&typeof n.x<"u"&&(n.x=t(n.x)),"y"in n&&typeof n.y<"u"&&(n.y=t(n.y)),"rX"in n&&typeof n.rX<"u"&&(n.rX=t(n.rX)),"rY"in n&&typeof n.rY<"u"&&(n.rY=t(n.rY)),n}}function Oc(){return Pr((r,t,e)=>(r.relative&&(typeof r.x1<"u"&&(r.x1+=t),typeof r.y1<"u"&&(r.y1+=e),typeof r.x2<"u"&&(r.x2+=t),typeof r.y2<"u"&&(r.y2+=e),typeof r.x<"u"&&(r.x+=t),typeof r.y<"u"&&(r.y+=e),r.relative=!1),r))}function E0(){return Pr((r,t,e)=>(r.relative||(typeof r.x1<"u"&&(r.x1-=t),typeof r.y1<"u"&&(r.y1-=e),typeof r.x2<"u"&&(r.x2-=t),typeof r.y2<"u"&&(r.y2-=e),typeof r.x<"u"&&(r.x-=t),typeof r.y<"u"&&(r.y-=e),r.relative=!0),r))}function A0(r=!0,t=!0,e=!0){return Pr((n,a,u,l,c)=>{if(isNaN(l)&&!(n.type&H.MOVE_TO))throw new Error("path must start with moveto");return t&&n.type&H.HORIZ_LINE_TO&&(n.type=H.LINE_TO,n.y=n.relative?0:u),e&&n.type&H.VERT_LINE_TO&&(n.type=H.LINE_TO,n.x=n.relative?0:a),r&&n.type&H.CLOSE_PATH&&(n.type=H.LINE_TO,n.x=n.relative?l-a:l,n.y=n.relative?c-u:c),n.type&H.ARC&&(n.rX===0||n.rY===0)&&(n.type=H.LINE_TO,delete n.rX,delete n.rY,delete n.xRot,delete n.lArcFlag,delete n.sweepFlag),n})}function Nc(){let r=NaN,t=NaN,e=NaN,n=NaN;return Pr((a,u,l)=>(a.type&H.SMOOTH_CURVE_TO&&(a.type=H.CURVE_TO,r=isNaN(r)?u:r,t=isNaN(t)?l:t,a.x1=a.relative?u-r:2*u-r,a.y1=a.relative?l-t:2*l-t),a.type&H.CURVE_TO?(r=a.relative?u+a.x2:a.x2,t=a.relative?l+a.y2:a.y2):(r=NaN,t=NaN),a.type&H.SMOOTH_QUAD_TO&&(a.type=H.QUAD_TO,e=isNaN(e)?u:e,n=isNaN(n)?l:n,a.x1=a.relative?u-e:2*u-e,a.y1=a.relative?l-n:2*l-n),a.type&H.QUAD_TO?(e=a.relative?u+a.x1:a.x1,n=a.relative?l+a.y1:a.y1):(e=NaN,n=NaN),a))}function Mc(){let r=NaN,t=NaN;return Pr((e,n,a)=>{if(e.type&H.SMOOTH_QUAD_TO&&(e.type=H.QUAD_TO,r=isNaN(r)?n:r,t=isNaN(t)?a:t,e.x1=e.relative?n-r:2*n-r,e.y1=e.relative?a-t:2*a-t),e.type&H.QUAD_TO){r=e.relative?n+e.x1:e.x1,t=e.relative?a+e.y1:e.y1;const u=e.x1,l=e.y1;e.type=H.CURVE_TO,e.x1=((e.relative?0:n)+u*2)/3,e.y1=((e.relative?0:a)+l*2)/3,e.x2=(e.x+u*2)/3,e.y2=(e.y+l*2)/3}else r=NaN,t=NaN;return e})}function Pr(r){let t=0,e=0,n=NaN,a=NaN;return function(l){if(isNaN(n)&&!(l.type&H.MOVE_TO))throw new Error("path must start with moveto");const c=r(l,t,e,n,a);return l.type&H.CLOSE_PATH&&(t=n,e=a),"x"in l&&typeof l.x<"u"&&(t=l.relative?t+l.x:l.x),"y"in l&&typeof l.y<"u"&&(e=l.relative?e+l.y:l.y),l.type&H.MOVE_TO&&(n=t,a=e),c}}function b0(r=0){Lr(r);let t=NaN,e=NaN,n=NaN,a=NaN;return Pr((u,l,c,f,d)=>{const y=Math.abs;let A=!1,_=0,C=0;if(u.type&H.SMOOTH_CURVE_TO&&(_=isNaN(t)?0:l-t,C=isNaN(e)?0:c-e),u.type&(H.CURVE_TO|H.SMOOTH_CURVE_TO)?(t=u.relative?l+u.x2:u.x2,e=u.relative?c+u.y2:u.y2):(t=NaN,e=NaN),u.type&H.SMOOTH_QUAD_TO?(n=isNaN(n)?l:2*l-n,a=isNaN(a)?c:2*c-a):u.type&H.QUAD_TO?(n=u.relative?l+u.x1:u.x1,a=u.relative?c+u.y1:u.y2):(n=NaN,a=NaN),u.type&H.LINE_COMMANDS||u.type&H.ARC&&(u.rX===0||u.rY===0||!u.lArcFlag)||u.type&H.CURVE_TO||u.type&H.SMOOTH_CURVE_TO||u.type&H.QUAD_TO||u.type&H.SMOOTH_QUAD_TO){const F=typeof u.x>"u"?0:u.relative?u.x:u.x-l,N=typeof u.y>"u"?0:u.relative?u.y:u.y-c;_=isNaN(n)?typeof u.x1>"u"?_:u.relative?u.x:u.x1-l:n-l,C=isNaN(a)?typeof u.y1>"u"?C:u.relative?u.y:u.y1-c:a-c;const M=typeof u.x2>"u"?0:u.relative?u.x:u.x2-l,R=typeof u.y2>"u"?0:u.relative?u.y:u.y2-c;y(F)<=r&&y(N)<=r&&y(_)<=r&&y(C)<=r&&y(M)<=r&&y(R)<=r&&(A=!0)}return u.type&H.CLOSE_PATH&&y(l-f)<=r&&y(c-d)<=r&&(A=!0),A?[]:u})}function ki(r,t,e,n,a,u){return Lr(r,t,e,n,a,u),Pr((l,c,f,d)=>{const y=l.x1,A=l.x2,_=l.relative&&!isNaN(d),C=typeof l.x<"u"?l.x:_?0:c,F=typeof l.y<"u"?l.y:_?0:f;l.type&H.HORIZ_LINE_TO&&t!==0&&(l.type=H.LINE_TO,l.y=l.relative?0:f),l.type&H.VERT_LINE_TO&&e!==0&&(l.type=H.LINE_TO,l.x=l.relative?0:c),typeof l.x<"u"&&(l.x=l.x*r+F*e+(_?0:a)),typeof l.y<"u"&&(l.y=C*t+l.y*n+(_?0:u)),typeof l.x1<"u"&&(l.x1=l.x1*r+l.y1*e+(_?0:a)),typeof l.y1<"u"&&(l.y1=y*t+l.y1*n+(_?0:u)),typeof l.x2<"u"&&(l.x2=l.x2*r+l.y2*e+(_?0:a)),typeof l.y2<"u"&&(l.y2=A*t+l.y2*n+(_?0:u));function N(R){return R*R}const M=r*n-t*e;if(typeof l.xRot<"u"&&(r!==1||t!==0||e!==0||n!==1))if(M===0)delete l.rX,delete l.rY,delete l.xRot,delete l.lArcFlag,delete l.sweepFlag,l.type=H.LINE_TO;else{const R=l.xRot*Math.PI/180,q=Math.sin(R),z=Math.cos(R),w=1/N(l.rX),L=1/N(l.rY),k=N(z)*w+N(q)*L,j=2*q*z*(w-L),tt=N(q)*w+N(z)*L,Z=k*n*n-j*t*n+tt*t*t,rt=j*(r*n+t*e)-2*(k*e*n+tt*r*t),J=k*e*e-j*r*e+tt*r*r,st=(Math.atan2(rt,Z-J)+Math.PI)%Math.PI/2,ht=Math.sin(st),ct=Math.cos(st);l.rX=Math.abs(M)/Math.sqrt(Z*N(ct)+rt*ht*ct+J*N(ht)),l.rY=Math.abs(M)/Math.sqrt(Z*N(ht)-rt*ht*ct+J*N(ct)),l.xRot=st*180/Math.PI}return typeof l.sweepFlag<"u"&&0>M&&(l.sweepFlag=+!l.sweepFlag),l})}function w0(r,t=0,e=0){Lr(r,t,e);const n=Math.sin(r),a=Math.cos(r);return ki(a,n,-n,a,t-t*a+e*n,e-t*n-e*a)}function T0(r,t=0){return Lr(r,t),ki(1,0,0,1,r,t)}function _0(r,t=r){return Lr(r,t),ki(r,0,0,t,0,0)}function C0(r){return Lr(r),ki(1,0,Math.atan(r),1,0,0)}function D0(r){return Lr(r),ki(1,Math.atan(r),0,1,0,0)}function S0(r=0){return Lr(r),ki(-1,0,0,1,r,0)}function O0(r=0){return Lr(r),ki(1,0,0,-1,0,r)}function N0(){return Pr((r,t,e)=>H.ARC===r.type?m0(r,r.relative?0:t,r.relative?0:e):r)}function M0(){return Pr((r,t,e)=>(r.relative&&(t=0,e=0),H.ARC===r.type&&_o(r,t,e),r))}function Bc(){return r=>({...r})}function B0(){const r=Bc(),t=Oc(),e=Mc(),n=Nc(),a=Pr((u,l,c)=>{const f=n(e(t(r(u))));function d(A){A>a.maxX&&(a.maxX=A),A<a.minX&&(a.minX=A)}function y(A){A>a.maxY&&(a.maxY=A),A<a.minY&&(a.minY=A)}if(f.type&H.DRAWING_COMMANDS&&(d(l),y(c)),f.type&H.HORIZ_LINE_TO&&d(f.x),f.type&H.VERT_LINE_TO&&y(f.y),f.type&H.LINE_TO&&(d(f.x),y(f.y)),f.type&H.CURVE_TO){d(f.x),y(f.y);const A=Dc(l,f.x1,f.x2,f.x);for(const C of A)0<C&&1>C&&d(Sc(l,f.x1,f.x2,f.x,C));const _=Dc(c,f.y1,f.y2,f.y);for(const C of _)0<C&&1>C&&y(Sc(c,f.y1,f.y2,f.y,C))}if(f.type&H.ARC){d(f.x),y(f.y),_o(f,l,c);const A=f.xRot/180*Math.PI,_=Math.cos(A)*f.rX,C=Math.sin(A)*f.rX,F=-Math.sin(A)*f.rY,N=Math.cos(A)*f.rY,[M,R]=f.phi1<f.phi2?[f.phi1,f.phi2]:-180>f.phi2?[f.phi2+360,f.phi1+360]:[f.phi2,f.phi1],q=([L,k])=>{const tt=Math.atan2(k,L)*180/Math.PI;return tt<M?tt+360:tt},z=Tc(F,-_,0).map(q);for(const L of z)L>M&&L<R&&d(Cc(f.cX,_,F,L));const w=Tc(N,-C,0).map(q);for(const L of w)L>M&&L<R&&y(Cc(f.cY,C,N,L))}return u});return a.minX=1/0,a.maxX=-1/0,a.minY=1/0,a.maxY=-1/0,a}const ye={ROUND:x0,TO_ABS:Oc,TO_REL:E0,NORMALIZE_HVZ:A0,NORMALIZE_ST:Nc,QT_TO_C:Mc,INFO:Pr,SANITIZE:b0,MATRIX:ki,ROTATE:w0,TRANSLATE:T0,SCALE:_0,SKEW_X:C0,SKEW_Y:D0,X_AXIS_SYMMETRY:S0,Y_AXIS_SYMMETRY:O0,A_TO_C:N0,ANNOTATE_ARCS:M0,CLONE:Bc,CALCULATE_BOUNDS:B0};let Ic=class{round(t){return this.transform(ye.ROUND(t))}toAbs(){return this.transform(ye.TO_ABS())}toRel(){return this.transform(ye.TO_REL())}normalizeHVZ(t,e,n){return this.transform(ye.NORMALIZE_HVZ(t,e,n))}normalizeST(){return this.transform(ye.NORMALIZE_ST())}qtToC(){return this.transform(ye.QT_TO_C())}aToC(){return this.transform(ye.A_TO_C())}sanitize(t){return this.transform(ye.SANITIZE(t))}translate(t,e){return this.transform(ye.TRANSLATE(t,e))}scale(t,e){return this.transform(ye.SCALE(t,e))}rotate(t,e,n){return this.transform(ye.ROTATE(t,e,n))}matrix(t,e,n,a,u,l){return this.transform(ye.MATRIX(t,e,n,a,u,l))}skewX(t){return this.transform(ye.SKEW_X(t))}skewY(t){return this.transform(ye.SKEW_Y(t))}xSymmetry(t){return this.transform(ye.X_AXIS_SYMMETRY(t))}ySymmetry(t){return this.transform(ye.Y_AXIS_SYMMETRY(t))}annotateArcs(){return this.transform(ye.ANNOTATE_ARCS())}};const I0=r=>r===" "||r===" "||r==="\r"||r===`
|
|
33
|
-
`,Rc=r=>48<=r.charCodeAt(0)&&r.charCodeAt(0)<=57;let
|
|
34
|
-
`,Pc=r=>48<=r.charCodeAt(0)&&r.charCodeAt(0)<=57;class U0 extends Lc{constructor(){super(),this.curNumber="",this.curCommandType=-1,this.curCommandRelative=!1,this.canParseCommandOrComma=!0,this.curNumberHasExp=!1,this.curNumberHasExpDigits=!1,this.curNumberHasDecimal=!1,this.curArgs=[]}finish(t=[]){if(this.parse(" ",t),this.curArgs.length!==0||!this.canParseCommandOrComma)throw new SyntaxError("Unterminated command at the path end.");return t}parse(t,e=[]){const n=a=>{e.push(a),this.curArgs.length=0,this.canParseCommandOrComma=!0};for(let a=0;a<t.length;a++){const u=t[a],l=this.curCommandType===X.ARC&&(this.curArgs.length===3||this.curArgs.length===4)&&this.curNumber.length===1&&(this.curNumber==="0"||this.curNumber==="1"),c=Pc(u)&&(this.curNumber==="0"&&u==="0"||l);if(Pc(u)&&!c){this.curNumber+=u,this.curNumberHasExpDigits=this.curNumberHasExp;continue}if(u==="e"||u==="E"){this.curNumber+=u,this.curNumberHasExp=!0;continue}if((u==="-"||u==="+")&&this.curNumberHasExp&&!this.curNumberHasExpDigits){this.curNumber+=u;continue}if(u==="."&&!this.curNumberHasExp&&!this.curNumberHasDecimal&&!l){this.curNumber+=u,this.curNumberHasDecimal=!0;continue}if(this.curNumber&&this.curCommandType!==-1){const f=Number(this.curNumber);if(isNaN(f))throw new SyntaxError(`Invalid number ending at ${a}`);if(this.curCommandType===X.ARC){if(this.curArgs.length===0||this.curArgs.length===1){if(0>f)throw new SyntaxError(`Expected positive number, got "${f}" at index "${a}"`)}else if((this.curArgs.length===3||this.curArgs.length===4)&&this.curNumber!=="0"&&this.curNumber!=="1")throw new SyntaxError(`Expected a flag, got "${this.curNumber}" at index "${a}"`)}this.curArgs.push(f),this.curArgs.length===k0[this.curCommandType]&&(X.HORIZ_LINE_TO===this.curCommandType?n({type:X.HORIZ_LINE_TO,relative:this.curCommandRelative,x:f}):X.VERT_LINE_TO===this.curCommandType?n({type:X.VERT_LINE_TO,relative:this.curCommandRelative,y:f}):this.curCommandType===X.MOVE_TO||this.curCommandType===X.LINE_TO||this.curCommandType===X.SMOOTH_QUAD_TO?(n({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),X.MOVE_TO===this.curCommandType&&(this.curCommandType=X.LINE_TO)):this.curCommandType===X.CURVE_TO?n({type:X.CURVE_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x2:this.curArgs[2],y2:this.curArgs[3],x:this.curArgs[4],y:this.curArgs[5]}):this.curCommandType===X.SMOOTH_CURVE_TO?n({type:X.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===X.QUAD_TO?n({type:X.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===X.ARC&&n({type:X.ARC,relative:this.curCommandRelative,rX:this.curArgs[0],rY:this.curArgs[1],xRot:this.curArgs[2],lArcFlag:this.curArgs[3],sweepFlag:this.curArgs[4],x:this.curArgs[5],y:this.curArgs[6]})),this.curNumber="",this.curNumberHasExpDigits=!1,this.curNumberHasExp=!1,this.curNumberHasDecimal=!1,this.canParseCommandOrComma=!0}if(!F0(u)){if(u===","&&this.canParseCommandOrComma){this.canParseCommandOrComma=!1;continue}if(u==="+"||u==="-"||u==="."){this.curNumber=u,this.curNumberHasDecimal=u===".";continue}if(c){this.curNumber=u,this.curNumberHasDecimal=!1;continue}if(this.curArgs.length!==0)throw new SyntaxError(`Unterminated command at index ${a}.`);if(!this.canParseCommandOrComma)throw new SyntaxError(`Unexpected character "${u}" at index ${a}. Command cannot follow comma`);if(this.canParseCommandOrComma=!1,u==="z"||u==="Z"){e.push({type:X.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1;continue}else if(u==="h"||u==="H")this.curCommandType=X.HORIZ_LINE_TO,this.curCommandRelative=u==="h";else if(u==="v"||u==="V")this.curCommandType=X.VERT_LINE_TO,this.curCommandRelative=u==="v";else if(u==="m"||u==="M")this.curCommandType=X.MOVE_TO,this.curCommandRelative=u==="m";else if(u==="l"||u==="L")this.curCommandType=X.LINE_TO,this.curCommandRelative=u==="l";else if(u==="c"||u==="C")this.curCommandType=X.CURVE_TO,this.curCommandRelative=u==="c";else if(u==="s"||u==="S")this.curCommandType=X.SMOOTH_CURVE_TO,this.curCommandRelative=u==="s";else if(u==="q"||u==="Q")this.curCommandType=X.QUAD_TO,this.curCommandRelative=u==="q";else if(u==="t"||u==="T")this.curCommandType=X.SMOOTH_QUAD_TO,this.curCommandRelative=u==="t";else if(u==="a"||u==="A")this.curCommandType=X.ARC,this.curCommandRelative=u==="a";else throw new SyntaxError(`Unexpected character "${u}" at index ${a}.`)}}return e}transform(t){return Object.create(this,{parse:{value(n,a=[]){const u=Object.getPrototypeOf(this).parse.call(this,n);for(const l of u){const c=t(l);Array.isArray(c)?a.push(...c):a.push(c)}return a}}})}}const Ft=class Ft extends Lc{constructor(t){super(),typeof t=="string"?this.commands=Ft.parse(t):this.commands=t}encode(){return Ft.encode(this.commands)}getBounds(){const t=ce.CALCULATE_BOUNDS();return this.transform(t),t}transform(t){const e=[];for(const n of this.commands){const a=t(n);Array.isArray(a)?e.push(...a):e.push(a)}return this.commands=e,this}static encode(t){return P0(t)}static parse(t){const e=new U0,n=[];return e.parse(t,n),e.finish(n),n}};Ft.CLOSE_PATH=1,Ft.MOVE_TO=2,Ft.HORIZ_LINE_TO=4,Ft.VERT_LINE_TO=8,Ft.LINE_TO=16,Ft.CURVE_TO=32,Ft.SMOOTH_CURVE_TO=64,Ft.QUAD_TO=128,Ft.SMOOTH_QUAD_TO=256,Ft.ARC=512,Ft.LINE_COMMANDS=Ft.LINE_TO|Ft.HORIZ_LINE_TO|Ft.VERT_LINE_TO,Ft.DRAWING_COMMANDS=Ft.HORIZ_LINE_TO|Ft.VERT_LINE_TO|Ft.LINE_TO|Ft.CURVE_TO|Ft.SMOOTH_CURVE_TO|Ft.QUAD_TO|Ft.SMOOTH_QUAD_TO|Ft.ARC;let X=Ft;const k0={[X.MOVE_TO]:2,[X.LINE_TO]:2,[X.HORIZ_LINE_TO]:1,[X.VERT_LINE_TO]:1,[X.CLOSE_PATH]:0,[X.QUAD_TO]:4,[X.SMOOTH_QUAD_TO]:2,[X.CURVE_TO]:6,[X.SMOOTH_CURVE_TO]:4,[X.ARC]:7};function Co([r,t],e){return[r*Math.cos(e)-t*Math.sin(e),r*Math.sin(e)+t*Math.cos(e)]}function Fr(...r){for(let t=0;t<r.length;t++)if(typeof r[t]!="number")throw new Error(`assertNumbers arguments[${t}] is not a number. ${typeof r[t]} == typeof ${r[t]}`);return!0}const Hi=Math.PI;function Do(r,t,e){r.lArcFlag=r.lArcFlag===0?0:1,r.sweepFlag=r.sweepFlag===0?0:1;let{rX:n,rY:a}=r;const{x:u,y:l}=r;n=Math.abs(r.rX),a=Math.abs(r.rY);const[c,f]=Co([(t-u)/2,(e-l)/2],-r.xRot/180*Hi),d=Math.pow(c,2)/Math.pow(n,2)+Math.pow(f,2)/Math.pow(a,2);1<d&&(n*=Math.sqrt(d),a*=Math.sqrt(d)),r.rX=n,r.rY=a;const y=Math.pow(n,2)*Math.pow(f,2)+Math.pow(a,2)*Math.pow(c,2),A=(r.lArcFlag!==r.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(n,2)*Math.pow(a,2)-y)/y)),_=n*f/a*A,C=-a*c/n*A,F=Co([_,C],r.xRot/180*Hi);r.cX=F[0]+(t+u)/2,r.cY=F[1]+(e+l)/2,r.phi1=Math.atan2((f-C)/a,(c-_)/n),r.phi2=Math.atan2((-f-C)/a,(-c-_)/n),r.sweepFlag===0&&r.phi2>r.phi1&&(r.phi2-=2*Hi),r.sweepFlag===1&&r.phi2<r.phi1&&(r.phi2+=2*Hi),r.phi1*=180/Hi,r.phi2*=180/Hi}function Fc(r,t,e){Fr(r,t,e);const n=r*r+t*t-e*e;if(0>n)return[];if(n===0)return[[r*e/(r*r+t*t),t*e/(r*r+t*t)]];const a=Math.sqrt(n);return[[(r*e+t*a)/(r*r+t*t),(t*e-r*a)/(r*r+t*t)],[(r*e-t*a)/(r*r+t*t),(t*e+r*a)/(r*r+t*t)]]}const vi=Math.PI/180;function Uc(r,t,e){return(1-e)*r+e*t}function kc(r,t,e,n){return r+Math.cos(n/180*Hi)*t+Math.sin(n/180*Hi)*e}function Hc(r,t,e,n){const u=t-r,l=e-t,c=n-e,f=3*u+3*c-6*l,d=(l-u)*6,y=3*u;return Math.abs(f)<1e-6?[-y/d]:H0(d/f,y/f,1e-6)}function qc(r,t,e,n,a){const u=1-a,l=u*u*u,c=3*u*u*a,f=3*u*a*a,d=a*a*a;return r*l+t*c+e*f+n*d}function H0(r,t,e=1e-6){const n=r*r/4-t;if(n<-e)return[];if(n<=e)return[-r/2];const a=Math.sqrt(n);return[-(r/2)-a,-(r/2)+a]}function q0(r,t,e){r.cX||Do(r,t,e);const n=Math.min(r.phi1,r.phi2),a=Math.max(r.phi1,r.phi2),u=a-n,l=Math.ceil(u/90),c=new Array(l);let f=t,d=e;for(let y=0;y<l;y++){const A=Uc(r.phi1,r.phi2,y/l),_=Uc(r.phi1,r.phi2,(y+1)/l),C=_-A,F=4/3*Math.tan(C*vi/4),[N,M]=[Math.cos(A*vi)-F*Math.sin(A*vi),Math.sin(A*vi)+F*Math.cos(A*vi)],[R,q]=[Math.cos(_*vi),Math.sin(_*vi)],[z,w]=[R+F*Math.sin(_*vi),q-F*Math.cos(_*vi)],L={relative:r.relative,type:X.CURVE_TO},k=(j,tt)=>{const[Z,rt]=Co([j*r.rX,tt*r.rY],r.xRot);return[r.cX+Z,r.cY+rt]};[L.x1,L.y1]=k(N,M),[L.x2,L.y2]=k(z,w),[L.x,L.y]=k(R,q),r.relative&&(L.x1-=f,L.y1-=d,L.x2-=f,L.y2-=d,L.x-=f,L.y-=d),[f,d]=[L.x,L.y],c[y]=L}return c}function W0(r=1e13){Fr(r);function t(e){return Math.round(e*r)/r}return function(n){return"x1"in n&&typeof n.x1<"u"&&(n.x1=t(n.x1)),"y1"in n&&typeof n.y1<"u"&&(n.y1=t(n.y1)),"x2"in n&&typeof n.x2<"u"&&(n.x2=t(n.x2)),"y2"in n&&typeof n.y2<"u"&&(n.y2=t(n.y2)),"x"in n&&typeof n.x<"u"&&(n.x=t(n.x)),"y"in n&&typeof n.y<"u"&&(n.y=t(n.y)),"rX"in n&&typeof n.rX<"u"&&(n.rX=t(n.rX)),"rY"in n&&typeof n.rY<"u"&&(n.rY=t(n.rY)),n}}function Wc(){return Ur((r,t,e)=>(r.relative&&(typeof r.x1<"u"&&(r.x1+=t),typeof r.y1<"u"&&(r.y1+=e),typeof r.x2<"u"&&(r.x2+=t),typeof r.y2<"u"&&(r.y2+=e),typeof r.x<"u"&&(r.x+=t),typeof r.y<"u"&&(r.y+=e),r.relative=!1),r))}function V0(){return Ur((r,t,e)=>(r.relative||(typeof r.x1<"u"&&(r.x1-=t),typeof r.y1<"u"&&(r.y1-=e),typeof r.x2<"u"&&(r.x2-=t),typeof r.y2<"u"&&(r.y2-=e),typeof r.x<"u"&&(r.x-=t),typeof r.y<"u"&&(r.y-=e),r.relative=!0),r))}function $0(r=!0,t=!0,e=!0){return Ur((n,a,u,l,c)=>{if(isNaN(l)&&!(n.type&X.MOVE_TO))throw new Error("path must start with moveto");return t&&n.type&X.HORIZ_LINE_TO&&(n.type=X.LINE_TO,n.y=n.relative?0:u),e&&n.type&X.VERT_LINE_TO&&(n.type=X.LINE_TO,n.x=n.relative?0:a),r&&n.type&X.CLOSE_PATH&&(n.type=X.LINE_TO,n.x=n.relative?l-a:l,n.y=n.relative?c-u:c),n.type&X.ARC&&(n.rX===0||n.rY===0)&&(n.type=X.LINE_TO,delete n.rX,delete n.rY,delete n.xRot,delete n.lArcFlag,delete n.sweepFlag),n})}function Vc(){let r=NaN,t=NaN,e=NaN,n=NaN;return Ur((a,u,l)=>(a.type&X.SMOOTH_CURVE_TO&&(a.type=X.CURVE_TO,r=isNaN(r)?u:r,t=isNaN(t)?l:t,a.x1=a.relative?u-r:2*u-r,a.y1=a.relative?l-t:2*l-t),a.type&X.CURVE_TO?(r=a.relative?u+a.x2:a.x2,t=a.relative?l+a.y2:a.y2):(r=NaN,t=NaN),a.type&X.SMOOTH_QUAD_TO&&(a.type=X.QUAD_TO,e=isNaN(e)?u:e,n=isNaN(n)?l:n,a.x1=a.relative?u-e:2*u-e,a.y1=a.relative?l-n:2*l-n),a.type&X.QUAD_TO?(e=a.relative?u+a.x1:a.x1,n=a.relative?l+a.y1:a.y1):(e=NaN,n=NaN),a))}function $c(){let r=NaN,t=NaN;return Ur((e,n,a)=>{if(e.type&X.SMOOTH_QUAD_TO&&(e.type=X.QUAD_TO,r=isNaN(r)?n:r,t=isNaN(t)?a:t,e.x1=e.relative?n-r:2*n-r,e.y1=e.relative?a-t:2*a-t),e.type&X.QUAD_TO){r=e.relative?n+e.x1:e.x1,t=e.relative?a+e.y1:e.y1;const u=e.x1,l=e.y1;e.type=X.CURVE_TO,e.x1=((e.relative?0:n)+u*2)/3,e.y1=((e.relative?0:a)+l*2)/3,e.x2=(e.x+u*2)/3,e.y2=(e.y+l*2)/3}else r=NaN,t=NaN;return e})}function Ur(r){let t=0,e=0,n=NaN,a=NaN;return function(l){if(isNaN(n)&&!(l.type&X.MOVE_TO))throw new Error("path must start with moveto");const c=r(l,t,e,n,a);return l.type&X.CLOSE_PATH&&(t=n,e=a),"x"in l&&typeof l.x<"u"&&(t=l.relative?t+l.x:l.x),"y"in l&&typeof l.y<"u"&&(e=l.relative?e+l.y:l.y),l.type&X.MOVE_TO&&(n=t,a=e),c}}function z0(r=0){Fr(r);let t=NaN,e=NaN,n=NaN,a=NaN;return Ur((u,l,c,f,d)=>{const y=Math.abs;let A=!1,_=0,C=0;if(u.type&X.SMOOTH_CURVE_TO&&(_=isNaN(t)?0:l-t,C=isNaN(e)?0:c-e),u.type&(X.CURVE_TO|X.SMOOTH_CURVE_TO)?(t=u.relative?l+u.x2:u.x2,e=u.relative?c+u.y2:u.y2):(t=NaN,e=NaN),u.type&X.SMOOTH_QUAD_TO?(n=isNaN(n)?l:2*l-n,a=isNaN(a)?c:2*c-a):u.type&X.QUAD_TO?(n=u.relative?l+u.x1:u.x1,a=u.relative?c+u.y1:u.y2):(n=NaN,a=NaN),u.type&X.LINE_COMMANDS||u.type&X.ARC&&(u.rX===0||u.rY===0||!u.lArcFlag)||u.type&X.CURVE_TO||u.type&X.SMOOTH_CURVE_TO||u.type&X.QUAD_TO||u.type&X.SMOOTH_QUAD_TO){const F=typeof u.x>"u"?0:u.relative?u.x:u.x-l,N=typeof u.y>"u"?0:u.relative?u.y:u.y-c;_=isNaN(n)?typeof u.x1>"u"?_:u.relative?u.x:u.x1-l:n-l,C=isNaN(a)?typeof u.y1>"u"?C:u.relative?u.y:u.y1-c:a-c;const M=typeof u.x2>"u"?0:u.relative?u.x:u.x2-l,R=typeof u.y2>"u"?0:u.relative?u.y:u.y2-c;y(F)<=r&&y(N)<=r&&y(_)<=r&&y(C)<=r&&y(M)<=r&&y(R)<=r&&(A=!0)}return u.type&X.CLOSE_PATH&&y(l-f)<=r&&y(c-d)<=r&&(A=!0),A?[]:u})}function qi(r,t,e,n,a,u){return Fr(r,t,e,n,a,u),Ur((l,c,f,d)=>{const y=l.x1,A=l.x2,_=l.relative&&!isNaN(d),C=typeof l.x<"u"?l.x:_?0:c,F=typeof l.y<"u"?l.y:_?0:f;l.type&X.HORIZ_LINE_TO&&t!==0&&(l.type=X.LINE_TO,l.y=l.relative?0:f),l.type&X.VERT_LINE_TO&&e!==0&&(l.type=X.LINE_TO,l.x=l.relative?0:c),typeof l.x<"u"&&(l.x=l.x*r+F*e+(_?0:a)),typeof l.y<"u"&&(l.y=C*t+l.y*n+(_?0:u)),typeof l.x1<"u"&&(l.x1=l.x1*r+l.y1*e+(_?0:a)),typeof l.y1<"u"&&(l.y1=y*t+l.y1*n+(_?0:u)),typeof l.x2<"u"&&(l.x2=l.x2*r+l.y2*e+(_?0:a)),typeof l.y2<"u"&&(l.y2=A*t+l.y2*n+(_?0:u));function N(R){return R*R}const M=r*n-t*e;if(typeof l.xRot<"u"&&(r!==1||t!==0||e!==0||n!==1))if(M===0)delete l.rX,delete l.rY,delete l.xRot,delete l.lArcFlag,delete l.sweepFlag,l.type=X.LINE_TO;else{const R=l.xRot*Math.PI/180,q=Math.sin(R),z=Math.cos(R),w=1/N(l.rX),L=1/N(l.rY),k=N(z)*w+N(q)*L,j=2*q*z*(w-L),tt=N(q)*w+N(z)*L,Z=k*n*n-j*t*n+tt*t*t,rt=j*(r*n+t*e)-2*(k*e*n+tt*r*t),J=k*e*e-j*r*e+tt*r*r,st=(Math.atan2(rt,Z-J)+Math.PI)%Math.PI/2,ht=Math.sin(st),ct=Math.cos(st);l.rX=Math.abs(M)/Math.sqrt(Z*N(ct)+rt*ht*ct+J*N(ht)),l.rY=Math.abs(M)/Math.sqrt(Z*N(ht)-rt*ht*ct+J*N(ct)),l.xRot=st*180/Math.PI}return typeof l.sweepFlag<"u"&&0>M&&(l.sweepFlag=+!l.sweepFlag),l})}function G0(r,t=0,e=0){Fr(r,t,e);const n=Math.sin(r),a=Math.cos(r);return qi(a,n,-n,a,t-t*a+e*n,e-t*n-e*a)}function Y0(r,t=0){return Fr(r,t),qi(1,0,0,1,r,t)}function X0(r,t=r){return Fr(r,t),qi(r,0,0,t,0,0)}function Z0(r){return Fr(r),qi(1,0,Math.atan(r),1,0,0)}function Q0(r){return Fr(r),qi(1,Math.atan(r),0,1,0,0)}function j0(r=0){return Fr(r),qi(-1,0,0,1,r,0)}function K0(r=0){return Fr(r),qi(1,0,0,-1,0,r)}function J0(){return Ur((r,t,e)=>X.ARC===r.type?q0(r,r.relative?0:t,r.relative?0:e):r)}function t2(){return Ur((r,t,e)=>(r.relative&&(t=0,e=0),X.ARC===r.type&&Do(r,t,e),r))}function zc(){return r=>({...r})}function e2(){const r=zc(),t=Wc(),e=$c(),n=Vc(),a=Ur((u,l,c)=>{const f=n(e(t(r(u))));function d(A){A>a.maxX&&(a.maxX=A),A<a.minX&&(a.minX=A)}function y(A){A>a.maxY&&(a.maxY=A),A<a.minY&&(a.minY=A)}if(f.type&X.DRAWING_COMMANDS&&(d(l),y(c)),f.type&X.HORIZ_LINE_TO&&d(f.x),f.type&X.VERT_LINE_TO&&y(f.y),f.type&X.LINE_TO&&(d(f.x),y(f.y)),f.type&X.CURVE_TO){d(f.x),y(f.y);const A=Hc(l,f.x1,f.x2,f.x);for(const C of A)0<C&&1>C&&d(qc(l,f.x1,f.x2,f.x,C));const _=Hc(c,f.y1,f.y2,f.y);for(const C of _)0<C&&1>C&&y(qc(c,f.y1,f.y2,f.y,C))}if(f.type&X.ARC){d(f.x),y(f.y),Do(f,l,c);const A=f.xRot/180*Math.PI,_=Math.cos(A)*f.rX,C=Math.sin(A)*f.rX,F=-Math.sin(A)*f.rY,N=Math.cos(A)*f.rY,[M,R]=f.phi1<f.phi2?[f.phi1,f.phi2]:-180>f.phi2?[f.phi2+360,f.phi1+360]:[f.phi2,f.phi1],q=([L,k])=>{const tt=Math.atan2(k,L)*180/Math.PI;return tt<M?tt+360:tt},z=Fc(F,-_,0).map(q);for(const L of z)L>M&&L<R&&d(kc(f.cX,_,F,L));const w=Fc(N,-C,0).map(q);for(const L of w)L>M&&L<R&&y(kc(f.cY,C,N,L))}return u});return a.minX=1/0,a.maxX=-1/0,a.minY=1/0,a.maxY=-1/0,a}const ce={ROUND:W0,TO_ABS:Wc,TO_REL:V0,NORMALIZE_HVZ:$0,NORMALIZE_ST:Vc,QT_TO_C:$c,INFO:Ur,SANITIZE:z0,MATRIX:qi,ROTATE:G0,TRANSLATE:Y0,SCALE:X0,SKEW_X:Z0,SKEW_Y:Q0,X_AXIS_SYMMETRY:j0,Y_AXIS_SYMMETRY:K0,A_TO_C:J0,ANNOTATE_ARCS:t2,CLONE:zc,CALCULATE_BOUNDS:e2};class Ys extends H{name="Geo2";params;viewMatrix=new re;boundingBox=new St;constructor(t={}){super(t.commands),this.params=t,this.toAbs(),t.flipY&&this.matrix(1,0,0,-1,0,0)}_version=0;get version(){return this._version}set version(t){this._version=t}set needsUpdate(t){t&&this._version++}static render(t,e){if(!(!t||!(e!=null&&e.length))){Ot.identity();for(let n=0,a=(e==null?void 0:e.length)||0;n<a;n++){const u=e[n];switch(u.type){case H.MOVE_TO:t.moveTo(u.x,u.y),Ot.set(u.x,u.y);break;case H.LINE_TO:t.lineTo(u.x,u.y),Ot.set(u.x,u.y);break;case H.ARC:t.arc(u.x,u.y,u.rX,u.phi1||0,u.phi2||Math.PI*2,u.sweepFlag!==1),Ot.set(u.x,u.y);break;case H.HORIZ_LINE_TO:Ot.set(u.x,Ot.y);break;case H.VERT_LINE_TO:Ot.set(Ot.x,u.y);break;case H.CURVE_TO:Ot.set(u.x,u.y);break;case H.SMOOTH_CURVE_TO:Ot.set(u.x,u.y);break;case H.QUAD_TO:Ot.set(u.x,u.y);break;case H.SMOOTH_QUAD_TO:Ot.set(u.x,u.y);break}}}}setFromPoints(t){return t!=null&&t.length?(this.params.points=t,this.recomputePath(),this):this}recomputePath(){throw new Error("must be implemented in derived")}computeBoundingBox(){var t;this.boundingBox.makeEmpty(),Ot.identity();for(let e=0,n=((t=this.commands)==null?void 0:t.length)||0;e<n;e++){const a=this.commands[e];switch(a.type){case H.MOVE_TO:this.boundingBox.expandByXY(a.x,a.y),Ot.set(a.x,a.y);break;case H.LINE_TO:this.boundingBox.expandByXY(a.x,a.y),Ot.set(a.x,a.y);break;case H.ARC:typeof a.xRot>"u"?(this.boundingBox.expandByXY(a.x,a.y),kr.set(a.x,a.y).addScalar(-a.rX),this.boundingBox.expandByPoint(kr),kr.set(a.x,a.y).addScalar(a.rX),this.boundingBox.expandByPoint(kr)):this.boundingBox.expandByXY(a.x,a.y),Ot.set(a.x,a.y);break;case H.HORIZ_LINE_TO:this.boundingBox.expandByXY(a.x,Ot.y),Ot.set(a.x,Ot.y);break;case H.VERT_LINE_TO:this.boundingBox.expandByXY(Ot.x,a.y),Ot.set(Ot.x,a.y);break;case H.QUAD_TO:this.boundingBox.expandByXY(a.x,a.y),Ot.set(a.x,a.y);break}}return this.boundingBox}render(t){Ys.render(t,this.commands)}applyMatrix(t){return this.needsUpdate=!0,this.matrix(t.elements[0],t.elements[1],t.elements[3],t.elements[4],t.elements[6],t.elements[7]),this}getRenderCommands(t){var u;const e=[];for(let l=0,c=((u=this.commands)==null?void 0:u.length)||0;l<c;l++)e.push(Object.assign({},this.commands[l]));if(!t)return e;Ot.identity();const n=ce.MATRIX(t.elements[0],t.elements[1],t.elements[3],t.elements[4],t.elements[6],t.elements[7]),a=[];for(let l=0,c=e.length;l<c;l++){const f=e[l],d=n(f);if(d.type===H.ARC&&typeof d.xRot<"u"){const y=g0(Ot.x,Ot.y,d.x,d.y,d.lArcFlag,d.sweepFlag,d.rX,d.rY,0);d.x=y[0],d.y=y[1],d.rX=y[2]>y[3]?y[2]:y[3],d.phi1=y[4],d.phi2=y[4]+y[5],d.sweepFlag=y[7],d.phi2===0&&(d.phi2=d.phi1>0?1e-6:-1e-6)}else if(d.type===H.ARC&&(t.getScale(kr),d.rX=d.rY*Math.abs(kr.x),d.phi1!==0||d.phi2!==Math.PI*2)){t.getRotation(kr),d.phi1+=kr.x,d.phi2+=kr.x;const y=a[a.length-1];y.x=(y.x||0)+Math.cos(kr.x)*d.rX*2,y.y=(y.y||0)+Math.sin(kr.x)*d.rX*2}Array.isArray(d)?a.push(...d):a.push(d),typeof d.x>"u"?Ot.set(Ot.x,d.y):typeof d.y>"u"?Ot.set(d.x,Ot.y):Ot.set(d.x,d.y)}return a}copy(t){return this.commands=Mt.cloneDeep(t.commands),this.version=0,this}clone(){const t=this.constructor;return new t(this.params).copy(this)}}const Ot=new Y,kr=new Y;class r2 extends Ys{isCircle=!0;radius=1;start=0;end=Math.PI*2;constructor(t={}){t.commands||(t.commands=[]),super(t),typeof t.radius<"u"&&(this.radius=t.radius),typeof t.start<"u"&&(this.start=t.start),typeof t.end<"u"&&(this.end=t.end),this.recomputePath()}recomputePath(){var n,a;if(!((a=(n=this.params)==null?void 0:n.points)!=null&&a.length))return this;const t=this.params.points,e=[];for(let u=0,l=t.length;u<l;u++)e.push({type:H.MOVE_TO,x:t[u].x>0?t[u].x+this.radius:t[u].x-this.radius,y:t[u].y,relative:!1}),e.push({type:H.ARC,rX:this.radius,rY:this.radius,xRot:void 0,lArcFlag:0,sweepFlag:1,phi1:this.start,phi2:this.end,x:t[u].x,y:t[u].y,relative:!1});return this.commands=e,this}}class i2{params;constructor(t={}){this.params=t}destroy(){}static getInstanceByElement(t,e=!1){if(!t)return;let n;switch(t.nodeName){case"path":n=this.getInstanceByPath(t,e);break;case"circle":n=this.getInstanceByCircle(t,e);break}return n||console.error(`unsupported: ${t.nodeName}`),n}static getInstanceByPath(t,e=!1){if(!t)return;const n=t.getAttribute("d");if(!n)return;const a=n.replace(/([+\-.])\s+/gm,"$1").replace(/[^MmZzLlHhVvCcSsQqTtAae\d\s.,+-].*/g,"");return new Ys({commands:a,flipY:e})}static getInstanceByCircle(t,e=!1){if(!t||t.nodeName!=="circle")return;Gc.set(wo(t,"cx",0),wo(t,"cy",0));const n=wo(t,"r",0);return new r2({points:[Gc.clone()],radius:n,flipY:e})}static getInstance(t,e=!1){if(t)return new Ys({commands:t,flipY:e})}}const Gc=new Y;class n2{svg;offset=new Y;svgRoot;layers=[];elementsMap={};boundingBoxMap={};boundingBox=new St;svgSkeletons=[];data;_exceptTypes=["view"];_exceptIds=["viewer","mirror"];_lvi=0;bindSvg(t){return this.svg=t,this.svgRoot=fc(this.svg),this.layers=this.getLayers(2),this.getElementsMap(this.svg,this.elementsMap),this}getLayers(t){var e;if(!this.svg)throw new Error("please bind svg first");return t===2&&((e=this.layers)!=null&&e.length)?this.layers:(this.layers=this._getSvgLayer(this.svg,t),this.layers)}_getSvgLayer(t,e=0,n=0,a=[]){var c;let u,l=t.id;if(this._exceptTypes.includes(t.tagName)||t.tagName==="defs")return this._lvi--,a;if(e&&this._lvi>e)return a;l&&!this._exceptIds.includes(l)&&(u={value:l,label:l,children:[]},a.push(u)),this._lvi++;for(let f=0,d=t.children.length;f<d;f++)u?this._getSvgLayer(t.children[f],e,this._lvi,u.children):this._getSvgLayer(t.children[f],e,this._lvi,a);return((c=u==null?void 0:u.children)==null?void 0:c.length)===0&&delete u.children,this._lvi=n,a}getElementsMap(t,e={}){return this.traverseSvg(t,n=>{n!==t&&n.id&&(e[n.id]=n)}),e}computeBoundingBoxMap(){var e;if(Object.keys(this.boundingBoxMap).length)return this.boundingBoxMap;let t=(e=this.svg)==null?void 0:e.getBoundingClientRect();return t&&this.offset.set(t.left,t.top),this.traverseSvg(this.svg,n=>{if(!n.id)return;if(n.tagName==="use"){const l=this.getUseSymbolId(n);if(!l)return;const c=this.boundingBoxMap[l];if(c&&!c.isEmpty()){mi.set(Number(n.getAttribute("x")||"0"),Number(n.getAttribute("y")||"0")),Xa.composeSvgTransform(mi.x,mi.y,n.getAttribute("transform"));const y=new St().copy(c).applyMatrix3(Xa);this.boundingBoxMap[n.id]=y;return}const f=this.getUseElementBoundingBoxWithSymbol(n);if(!f)return;this.boundingBoxMap[l]=f,mi.set(Number(n.getAttribute("x")||"0"),Number(n.getAttribute("y")||"0")),Xa.composeSvgTransform(mi.x,mi.y,n.getAttribute("transform"));const d=new St().copy(f).applyMatrix3(Xa);this.boundingBoxMap[n.id]=d,this.boundingBox.expandByBox(d);return}if(typeof n.getBBox!="function")return;const a=n.getBBox();if((!a.width||!a.height)&&n.tagName==="path"){const l=i2.getInstanceByPath(n),c=l==null?void 0:l.computeBoundingBox();if(!c||c.isEmpty())return;c.getSize(mi),a.x=c.min.x,a.y=c.max.y,a.width=mi.x,a.height=mi.y}if(!a.width||!a.height)return;const u=new St(new Y(a.x,a.y),new Y(a.x+a.width,a.y+a.height));this.boundingBoxMap[n.id]=u.round(),this.boundingBox.expandByBox(u)}),this.boundingBoxMap}updateLayersVisibility(t,e=!1){if(!this.elementsMap)throw new Error("please bind svg first");this._updateAllLayersVisibility(!e),t!=null&&t.length||(t=["background"]);for(let n=0,a=t.length;n<a;n++){const u=this.getElementById(t[n]);u&&this._updateLayersVisibility(u,e,!0,!0)}}_updateAllLayersVisibility(t=!1){Object.values(this.elementsMap).forEach(e=>{e.tagName==="svg"||e.tagName==="symbol"||!e.getAttribute("id")||(e.style.display=t?"block":"none")})}_updateLayersVisibility(t,e=!1,n=!1,a=!1){var u,l;if(!(!t||t.tagName==="svg"||!t.getAttribute("id"))){if(t.style.display=e?"block":"none",n&&e){let c=t.parentElement;for(;c&&c.tagName!=="svg";)c.style.display=e?"block":"none",c=c.parentElement}if(a&&((u=t.children)==null?void 0:u.length)>0)for(let c=0,f=(l=t.children)==null?void 0:l.length;c<f;c++)this._updateLayersVisibility(t.children[c],e,!1,!0)}}updateVisibilityByAssetType(t,e=!1,n){n||(n=d0[t]),this.updateLayersVisibility(n,!e)}updateVisibilityByAssetTypes(t,e=!1,n){if(Array.isArray(t)||(t=[t]),!!(t!=null&&t.length))for(let a=0,u=t.length;a<u;a++)this.updateVisibilityByAssetType(t[a],e,n)}getElementById(t){if(!this.elementsMap)throw new Error("please bind svg first");return this.elementsMap[t]}getElementBoundingBox(t){return this.boundingBoxMap[t]}findSkeletonByPath(t=[]){let e=0,n;const a=Object.keys(this.elementsMap);for(let u=0,l=a.length;u<l;u++){const c=this.elementsMap[a[u]];if(!c)continue;const f=c.getAttribute("d");f&&(f.length<e||(e=f.length,n=c.id?c:c.parent))}return n&&t.push(n),t}setTextInChildren2(t,e){var a;let n;((a=t==null?void 0:t.children)==null?void 0:a.length)<2?(n=vo("text"),n.setAttribute("dy","1em"),t.appendChild(n)):n=t.children[t.children.length-1],n.innerHTML=e}traverseSvg(t,e){var n;if(!this._exceptTypes.includes(t.tagName)&&!(t.tagName!=="svg"&&t.tagName!=="defs"&&!t.id)&&!(t.tagName==="g"&&((n=t.children)==null?void 0:n.length)===0)){this._exceptIds.includes(t.id)||e(t);for(let a=0,u=t.children.length;a<u;a++)this.traverseSvg(t.children[a],e)}}traverseSvgTLayers(t,e){var n;if(Array.isArray(t)){for(let a=0,u=t.length;a<u;a++)this.traverseSvgTLayers(t[a],e);return}if(e(t),!!((n=t.children)!=null&&n.length))for(let a=0,u=t.children.length;a<u;a++)this.traverseSvgTLayers(t.children[a],e)}getLabelElementsByType(t,e={}){const n=this.getElementById(Ya(t));return n&&this.getElementsMap(n,e),e}getLabelElementById(t,e="rm"){if(!t)return;const n=this.getElementById(t);if(!n)return;let a=n.getAttribute("aid");return a||(a="l-"+e+"-"+t),this.getElementById(a)}setLabelsById(t,e,n="rm"){var l,c;const a=this.getLabelElementById(t,n);if(!a)return;const u=((l=a.children)==null?void 0:l.length)||0;for(let f=0,d=((e==null?void 0:e.length)||0)-(u-1);f<d;f++){const y=vo("text");y.setAttribute("x","0"),y.setAttribute("y",u+f+"em"),a.appendChild(y)}for(let f=1,d=(c=a.children)==null?void 0:c.length;f<d;f++)a.children[f].textContent=e&&f<=e.length?e[f-1]:""}clearAssetLabelsByType(t="rm"){var a;const e=this.getLabelElementsByType(t),n=Mt.keys(e);for(let u=0,l=n.length;u<l;u++){const c=e[n[u]];for(let f=1,d=((a=c.children)==null?void 0:a.length)||0;f<d;f++)c.children[f].textContent=""}}getUseSymbolId(t){var e;if(!(!t||t.tagName!=="use"))return(e=t.getAttribute("xlink:href"))==null?void 0:e.substring(1)}getUseSymbol(t){if(!t||t.tagName!=="use")return;const e=this.getUseSymbolId(t);if(e)return this.getElementById(e)}setElementState2selected(t,e=!1){var a;if(!t)return;if(t.tagName==="use"){const u=this._getSymbolBox(t);if(!u)return;e?(a=t.parentNode)==null||a.insertBefore(u,t):t.parentNode&&t.parentNode.contains(u)&&t.parentNode.removeChild(u);return}let n=t.getAttribute("class");n||(n=""),e?n="danger":n=Mt.replace(n,"danger","").trim(),t.setAttribute("class",n)}_getSymbolBox(t){if(!t)return;const e=t.id+"-boundingBox";let n=this.getElementById(e);if(n)return n;const a=this.getUseSymbol(t);if(!a)return;let u=this.getElementBoundingBox(t.id);if(!u||u.isEmpty())return;n=document.createElementNS("http://www.w3.org/2000/svg","rect"),n.setAttribute("id",e),n.setAttribute("class","danger"),n.setAttribute("x",u.min.x.toString()),n.setAttribute("y",u.min.y.toString());const l=new Y;return u.getSize(l),n.setAttribute("width",l.x.toString()),n.setAttribute("height",l.y.toString()),a.getAttribute("transform")&&n.setAttribute("transform",a.getAttribute("transform")||""),a.getAttribute("style")&&n.setAttribute("style",a.getAttribute("style")||""),this.elementsMap[e]=n,n}getUseElementBoundingBoxWithSymbol(t){var f;if(!t)return;const e=(f=t.getAttribute("xlink:href"))==null?void 0:f.substring(1);if(!e)return;let n=this.getElementById(e);if(!n)return;const a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.style.position="absolute",a.style.top="-9999px",a.style.left="-9999px";let u;if(Mt.lowerCase(n.tagName)==="symbol"){u=document.createElementNS("http://www.w3.org/2000/svg","g");for(let d=0,y=n.childNodes.length;d<y;d++){const A=n.childNodes[d].cloneNode(!0);u.appendChild(A)}}else u=n.cloneNode(!0);a.appendChild(u),u.setAttribute("style","stroke: #333333;"),document.body.appendChild(a);const l=a.getBBox();if(document.body.removeChild(a),!l)return;const c=new St;return c.set(new Y(l.x,l.y),new Y(l.x+l.width,l.y+l.height)),c}fontZoom(t,e=1){const n=this.getElementById(t);if(!n)return;let a=n.getAttribute("font-size");a||(a="12");const u=/(\d+)([a-zA-Z%]+)/.exec(a),l=u&&(u==null?void 0:u.length)>2?u[2]:"";let c=Math.round(parseFloat(a)*e*100)/100;n.setAttribute("font-size",c+l)}getCentroid(t,e=new Y){const n=t.getAttribute("insX"),a=t.getAttribute("insY");return n||a?e.set(Number(n||"0"),Number(a||"0")):this.getCentroidByDom(t,e)}getCentroidByDom(t,e=new Y){const n=Number(t.getAttribute("x")||"0"),a=Number(t.getAttribute("y")||"0"),u=t.getBBox();let l=1,c=1,f=t.getAttribute("transform");if(!f)return e.set(n,a);const d=/scale\(\s*([^\s,)]+)[ ,]([^\s,)]+)/.exec(f);if(typeof d>"u"||d==null){const y=t.transform.baseVal;if(f&&y.numberOfItems>0){let A=y.getItem(0);A&&A.type===SVGTransform.SVG_TRANSFORM_SCALE&&(l=A.matrix.a!==0?A.matrix.a:1,c=A.matrix.d!==0?A.matrix.d:l)}else return e.set((u.x+u.width/2)*l,(u.y+u.height/2)*c)}else l=d[1]&&Number(d[1])>0?Number(d[1]):1,c=d[2]&&Number(d[2])>0?Number(d[2]):l;return n&&a?e.set(n*l,a*c):e.set((u.x+u.width/2)*l,(u.y+u.height/2)*c),e}_lastLinked=[];linkAssetsByTree(t,e){if(t||(t=er.RM),this.clearLinkedLines(t),!e||!e.value)return;const n=this.getLinesByTree(e);this.drawLinkedLines(t,n)}clearLinkedLines(t){var a;const e=Gs(t);if(this.getElementById(e)){for(let u=((a=this._lastLinked)==null?void 0:a.length)-1;u>=0;u--){const l=this._lastLinked[u];l.parentNode&&l.parentNode.removeChild(l),this._lastLinked.splice(u,1)}this._lastLinked.length=0}}drawLinkedLines(t,e){var u;if(!(e!=null&&e.length))return;const n=Gs(t),a=this.getElementById(n);if(a)for(let l=0,c=e.length;l<c;l++){const f=e[l][0],d=e[l][((u=e[l])==null?void 0:u.length)-1],y=vo("line");y.setAttribute("x1",f.x.toString()),y.setAttribute("y1",f.y.toString()),y.setAttribute("x2",d.x.toString()),y.setAttribute("y2",d.y.toString()),y.setAttribute("class","danger"),y.setAttribute("style","stroke-width: 2;"),a.appendChild(y),this._lastLinked.push(y)}}getLinesByTree(t,e=[]){var u;if(!(t!=null&&t.value))return e;const n=this.getElementBoundingBox(t.value);if(!n)return e;const a=n.getCenter();return(u=t.children)==null||u.forEach(l=>{var d;const c=this.getElementBoundingBox(l==null?void 0:l.value);if(!c)return;const f=c.getCenter();e.push([a,f]),(d=l.children)!=null&&d.length&&this.getLinesByTree(l,e)}),e}}const mi=new Y,Xa=new re;class s2{name="SvgPainter";params;chef;constructor(t={},e){this.params=t,this.chef=e}drawSocialDistanceCircles(t,e="http://www.w3.org/2000/svg"){var C,F,N;if(!t)return;const n=Kg(t),a=cc(t),u=2*n,l=(F=(C=this.params.socialDistance)==null?void 0:C.colors)!=null&&F.length?(N=this.params.socialDistance)==null?void 0:N.colors:[he.green,he.red],c=this.getRadius(a),f=t.querySelector(`#${Ga}`),d=f==null?void 0:f.querySelectorAll("path");if(!f||!(d!=null&&d.length))return;let y,A;const _=new Array;for(let M=0,R=(d==null?void 0:d.length)||0;M<R;M++){if(y=d[M],A=y.getAttribute("id"),!A)continue;const q=this.chef.getElementBoundingBox(A);if(!q)continue;const z=new Y;q.getCenter(z),_.push({id:A,cp:z})}for(let M=0,R=_.length;M<R;M++){_[M].color=l[0];for(let q=0,z=R;q<z;q++)_[M]!==_[q]&&Y.getDistance(_[M].cp,_[q].cp)<c*2&&(_[M].color=l[1])}for(let M=0,R=_.length;M<R;M++){let q=this.createCircle(_[M],c,u,e);f.appendChild(q)}}clearSocialDistanceCircles(t){if(!t)return;const e=t.querySelector(`#${Ga}`),n=e==null?void 0:e.querySelectorAll("circle");if(!(!e||!(n!=null&&n.length)))for(let a=0,u=(n==null?void 0:n.length)||0;a<u;a++){const l=n[a].getAttribute("id");l&&(l==null?void 0:l.indexOf("_circle"))>-1&&e.removeChild(n[a])}}getRadius(t){var n,a,u;let e=((a=(n=this.params)==null?void 0:n.socialDistance)==null?void 0:a.radius)||3;return((u=this.params)==null?void 0:u.displayUnits)==="imperial"?t==="Metres"||t==="m"?e/=3.28084:t==="cm"?e=e/3.28084*100:t==="mm"?e=e/3.28084*1e3:(t==="INCH"||t==="inches")&&(e*=12):t==="INCH"||t==="inches"?e=e*3.28084*12:t==="cm"?e*=100:t==="mm"&&(e*=1e3),e}createCircle(t,e,n,a){const u=document.createElementNS(a,"circle");return u.setAttributeNS(null,"id",t.id+"_circle"),u.setAttributeNS(null,"cx",t.cp.x),u.setAttributeNS(null,"cy",t.cp.y),u.setAttributeNS(null,"r",String(e)),u.setAttributeNS(null,"style",`pointer-events:none;fill-opacity:0.1;stroke:${t.color};stroke-width:${n}px;`),u}}const a2=function(r){return(r||"").replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g,"")};function Za(r,t){if(!r||!t)return!1;if(t.indexOf(" ")!==-1)throw new Error("className should not contain space.");return r.classList?r.classList.contains(t):(" "+r.className+" ").indexOf(" "+t+" ")>-1}function Xs(r,t){if(!r)return;let e=r.className;const n=(t||"").split(" ");for(let a=0,u=n.length;a<u;a++){const l=n[a];l&&(r.classList?r.classList.add(l):Za(r,l)||(e+=" "+l))}r.classList||(r.className=e)}function Zs(r,t){if(!r||!t)return;const e=t.split(" ");let n=" "+r.className+" ";for(let a=0,u=e.length;a<u;a++){const l=e[a];l&&(r.classList?r.classList.remove(l):Za(r,l)&&(n=n.replace(" "+l+" "," ")))}r.classList||(r.className=a2(n))}class Yc extends l0{isSvgScene=!0;name="SvgScene";dynamically=!0;params;socialDistanceEnable=!1;container;svg;svgStr="";svgRoot;viewBox=new St;chef;defaultLayers=[];skeletonLayers=[];currentLayers=[];assetType;assetsMap={};legend=[];selectedList=[];painter;_lastHighlightType="";_lastHighlightIds=[];clickSvgElementHandler=this.handleClickSvgElement.bind(this);constructor(t={}){super(),this.params=t,this.assetType=t.assetType||er.RM,this.params.socialDistanceEnable&&(this.socialDistanceEnable=!0),this.container=this.params.containerId?document.getElementById(this.params.containerId):Zt.window.document.getElementsByTagName("body")[0],this.chef=new n2,this.painter=new s2(t,this.chef)}get isMounted(){var t;return((t=this.container.querySelectorAll("svg"))==null?void 0:t.length)>0}destroy(){var t;super.destroy(),this.unmount(),(t=this.camera)==null||t.destroy()}mount(){this.svg&&(this.container.contains(this.svg)||this.container.appendChild(this.svg),this.chef.computeBoundingBoxMap())}unmount(){this.svg&&this.svg.parentNode&&this.container.contains(this.svg)&&this.container.removeChild(this.svg)}computeBoundingBox(){return this.boundingBox.makeEmpty(),!this.chef||!this.svg?this.boundingBox:(this.chef.computeBoundingBoxMap(),this.boundingBox.copy(this.chef.boundingBox),console.warn("svgScene.computeBoundingBox: ",this.chef.boundingBox.toString()),this.boundingBox)}async load(t){return new Ac().loadAsync(t)}bind(t){if(this.svgStr=t,this.svg=new DOMParser().parseFromString(t,"image/svg+xml").documentElement,console.warn("bind: ",this.name),!this.svg)throw new Error("svg load failed");let e=this.svg.getAttribute("viewBox");e&&(Jg(e,this.viewBox),this.chef.bindSvg(this.svg),this.svgRoot=fc(this.svg),this.svg.setAttribute("viewBox",`0 0 ${this.params.width} ${this.params.height}`),this.svg.setAttribute("style","transform: translateZ(0);"),this.appendStyles(),console.log(this.name,"viewBox -> ",e,this.viewBox.toString()),this.setAssetsMap(this.assetType,this.assetsMap))}appendStyles(){var e;let t=(e=this.svg)==null?void 0:e.querySelector("style");t&&(t.appendChild(document.createTextNode(`.default { stroke: ${this.params.defaultStroke}; fill: ${this.params.defaultFill}; }`)),t.appendChild(document.createTextNode(`.info { stroke: ${this.params.infoStroke}; fill: ${this.params.infoFill}; }`)),t.appendChild(document.createTextNode(`.primary { stroke: ${this.params.primaryStroke}; fill: ${this.params.primaryFill}; }`)),t.appendChild(document.createTextNode(`.success { stroke: ${this.params.successStroke}; fill: ${this.params.successFill}; }`)),t.appendChild(document.createTextNode(`.warning { stroke: ${this.params.warningStroke}; fill: ${this.params.warningFill}; }`)),t.appendChild(document.createTextNode(`.danger { stroke: ${this.params.dangerStroke}; fill: ${this.params.dangerFill}; }`)),t.appendChild(document.createTextNode(`.active { stroke: ${this.params.activeStroke}; fill: ${this.params.activeFill}; }`)))}getLayers(t=2){return this.svg?this.chef.getLayers(t):[]}setDefaultLayers(t){t!=null&&t.length&&(this.defaultLayers=t)}setSkeletonLayers(t){t!=null&&t.length&&(this.skeletonLayers=t)}setCurrentLayers(t){t!=null&&t.length&&(this.currentLayers=t)}showDefaultLayers(t,e=!1){this.setDefaultLayers(t),this.chef.updateLayersVisibility(t,e)}updateLayersVisibility(t,e=!1){this.chef.updateLayersVisibility(t,e)}setAssetType(t,e){this.assetsMap={},this.assetType=t,this.setAssetsMap(this.assetType,this.assetsMap),e||(e=[Gs(t)],t!==er.RM&&e.unshift(Gs(er.RM))),this.setDefaultLayers(e),this.updateLayersVisibility(this.defaultLayers,!0)}isBelongsToAssetType(t,e){e||(e=this.assetType);const n=this.getAssetsByType(e);return n==null?void 0:n.hasOwnProperty(t)}setAssetsMap(t,e={}){const n=this.chef.getElementById(Gs(t));if(!n)return e;e[t]=this.chef.getElementsMap(n);const a=Ya(t),u=this.chef.getElementById(a);if(!u)return e;const l=this.chef.getElementsMap(u),c=Mt.keys(l);if(!(c!=null&&c.length))return e;if(Mt.startsWith(c[0],`l-${t}-`)){const f=`l-${t}-`.length;for(let d=0,y=c.length;d<y;d++){const A=c[d].slice(f);l[A]=l[c[d]],delete l[c[d]]}}return e[a]=l,e}getAssetsByType(t){return this.assetsMap.hasOwnProperty(t)||this.setAssetsMap(t,this.assetsMap),this.assetsMap[t]}getElementById(t){if(!t)return;const e=this.getAssetsByType(this.assetType);if(!(!e||!Object.hasOwnProperty.call(e,t)))return e[t]}getAssetIdsByType(t){const e=this.getAssetsByType(t),n=[];return e?Mt.keys(e):n}clearFillOrStroke(t="fill"){const e=this.getAssetsByType(this.assetType),n=Mt.keys(e);let a;for(let u=0,l=n.length;u<l;u++)a=e[n[u]],!(!a||!a.hasAttribute(t))&&(a.removeAttribute(t),t==="stroke"&&a.removeAttribute("stroke-width"));this.clearLegendBy(t)}clearFillOrStrokeByIds(t,e="fill"){const n=this.getAssetsByType(this.assetType),a=Mt.keys(n);let u;for(let l=0,c=a.length;l<c;l++)t!=null&&t.length&&!t.includes(a[l])||(u=n[a[l]],!(!u||!u.hasAttribute(e))&&(u.removeAttribute(e),e==="stroke"&&u.removeAttribute("stroke-width")));this.clearLegendBy(e)}setFillOrStrokeByIds(t,e,n="fill"){const a=this.getAssetsByType(this.assetType),u=Mt.keys(a);let l;for(let c=0,f=u.length;c<f;c++)t.includes(u[c])&&(l=a[u[c]],l&&(l.setAttribute(n,e),n==="stroke"&&l.setAttribute("stroke-width","7"),this.addLegend(n,e,u[c])))}addLegend(t,e,n){let a=this.legend.find(u=>u.color===e);a||(a={type:t,color:e,ids:[]},this.legend.push(a)),a.ids.push(n)}clearLegendBy(t){var e;t||(this.legend.length=0);for(let n=((e=this.legend)==null?void 0:e.length)-1;n>=0;n--)this.legend[n].type===t&&this.legend.splice(n,n)}getLegend(){return this.legend}showSkeleton(){var t;(t=this.skeletonLayers)!=null&&t.length&&(this.chef.updateLayersVisibility(this.defaultLayers,!1),this.chef.updateLayersVisibility(this.skeletonLayers,!0))}hideSkeleton(){var t;(t=this.skeletonLayers)!=null&&t.length&&(this.chef.updateLayersVisibility(this.skeletonLayers,!1),this.chef.updateLayersVisibility(this.defaultLayers,!0))}setAssetLabels(t,e){this.chef.setLabelsById(t,e,this.assetType)}getAssetLabelsMap(t){var a,u;if(!t)return;const e=Ya(t);let n=this.getAssetsByType(e);if(!n||!((a=Object.keys(n))!=null&&a.length)){let l=this.chef.getElementById(e);if(l||(l=this.chef.getElementById(t+"-txt-label")),!l)return;n=this.chef.getElementsMap(l),this.assetsMap[e]=n}if(!(!n||!((u=Object.keys(n))!=null&&u.length)))return n}getAssetLabelById(t,e){var l,c;const n=this.getAssetLabelsMap(t);if(!n)return;let a=n[e];if(a&&((l=a==null?void 0:a.childNodes)!=null&&l.length))return a.childNodes[0].textContent||"";const u="l-"+t+"-"+e;if(a=n[u],a&&((c=a==null?void 0:a.children)!=null&&c.length))return a.children[0].textContent||""}clearAssetLabels(){this.chef.clearAssetLabelsByType(this.assetType)}bindAssetsEvents(t){var a;const e=(a=this.svg)==null?void 0:a.querySelector("#"+t);if(!e)return;e.querySelectorAll("[id]").forEach(u=>{u instanceof SVGElement&&u.addEventListener("click",this.clickSvgElementHandler)})}handleClickSvgElement(t){var e;typeof t.preventDefault=="function"&&t.preventDefault(),console.warn("svgScene.handleClickSvgElement: ",(e=t==null?void 0:t.target)==null?void 0:e.id,t==null?void 0:t.target),this.dispatchEvent({type:"click",data:t})}socialDistanceEnableChanged(t){this.socialDistanceEnable=!!t,t?this.painter.drawSocialDistanceCircles(this.svg):this.painter.clearSocialDistanceCircles(this.svg)}highlightAssets(t,e){var a;this.resetHighlightAssets(t);const n=this.getAssetsByType(t);!n||!((a=Object.keys(n))!=null&&a.length)||(this._lastHighlightType=t,this._lastHighlightIds=Array.isArray(e)?e:[e],this._lastHighlightIds.forEach(u=>{u&&n[u]&&Xs(n[u],"active")}))}resetHighlightAssets(t){var n;const e=this.getAssetsByType(t||this._lastHighlightType);!e||!((n=Object.keys(e))!=null&&n.length)||(this._lastHighlightIds.forEach(a=>{a&&e[a]&&Zs(e[a],"active")}),this._lastHighlightIds.length=0)}getIntersectObjects(t,e=er.RM,n=[]){n.length=0;const a=[],u=this.getAssetsByType(e),l=Mt.keys(u);for(let f=0,d=l.length;f<d;f++){const y=this.chef.getElementBoundingBox(u[l[f]].id);y&&y.containsPoint(t.worldCoords)&&a.push(u[l[f]])}const c=Mt.sortBy(a,f=>{var d;return(d=this.chef.getElementBoundingBox(f.id))==null?void 0:d.getArea()});return n.push(...c),n}clearSelected(){var t,e;if((t=this.selectedList)!=null&&t.length)for(let n=((e=this.selectedList)==null?void 0:e.length)-1;n>=0;n--){let a=this.selectedList[n];this.selectedList.splice(n,1),this.chef.setElementState2selected(a,!1)}}clearSelectedById(t){var n,a;let e=(n=this.selectedList)==null?void 0:n.findIndex(u=>u.getAttribute("id")===t);e>-1&&(this.chef.setElementState2selected(this.selectedList[e],!1),(a=this.selectedList)==null||a.splice(e,1))}selectByIds(t,e=!1){Array.isArray(t)||(t=[t]),e||this.clearSelected();const n=Mt.uniq(Mt.map(this.selectedList,u=>u.getAttribute("id")||"")),a=this.getAssetsByType(this.assetType);for(let u=t.length-1;u>=0;u--)n.includes(t[u])?(this.clearSelectedById(t[u]),t.splice(u,1)):Object.hasOwnProperty.call(a,t[u])&&this.selectedList.push(a[t[u]]);this.selectedList.forEach(u=>{this.chef.setElementState2selected(u,!0)})}getSelectedIds(){var e;if(!((e=this.selectedList)!=null&&e.length))return;const t=[];for(let n=0,a=this.selectedList.length;n<a;n++)this.selectedList[n].id&&t.push(this.selectedList[n].id);return t}getSelectedBoundingBox(){var e;const t=new St;return(e=this.selectedList)!=null&&e.length?(this.selectedList.forEach(n=>{const a=this.chef.boundingBoxMap[n.id];a&&t.expandByBox(a)}),t):t.copy(this.boundingBox)}getElementsByBox(t){const e=[],n=Object.keys(this.chef.boundingBoxMap),a=this.getAssetsByType(this.assetType);for(let u=0,l=n.length;u<l;u++)if(a.hasOwnProperty(n[u])&&!(n[u].indexOf("-assets")>-1)&&t.intersectsBox(this.chef.boundingBoxMap[n[u]])){const c=a[n[u]];c&&e.push(c)}return e}getBoundingBoxById(t){if(this.chef.boundingBoxMap.hasOwnProperty(t))return new St().copy(this.chef.boundingBoxMap[t])}_lastLinkedIds=[];linkAssetsByTree(t){this.chef.linkAssetsByTree(this.assetType,t);const e=this.chef.getElementById(Vs.ASSET_LABELS);e&&(e.style.display="block");const n=Ya(this.assetType),a=this.chef.getElementById(n);a&&(a.style.display="block");const u=this.assetsMap[n];u&&(this._lastLinkedIds.forEach(l=>{u[l]&&(u[l].style.display="none")}),this._lastLinkedIds=hc(t),this._lastLinkedIds.forEach(l=>{u[l]&&(u[l].style.display="block")}))}onBeforeRender(){}fullscreen(t=1e3,e=!1){}update(){}}class u2 extends Yc{name="SvgLoadingScene";constructor(t){super(t),this.bind(`<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 100 100">
|
|
31
|
+
}`;var xt=Xd(function(){return Nt(m,nt+"return "+$).apply(e,E)});if(xt.source=$,ih(xt))throw xt;return xt}function yb(i){return It(i).toLowerCase()}function vb(i){return It(i).toUpperCase()}function mb(i,s,o){if(i=It(i),i&&(o||s===e))return ip(i);if(!i||!(s=hr(s)))return i;var h=$r(i),p=$r(s),m=np(h,p),E=sp(h,p)+1;return ln(h,m,E).join("")}function xb(i,s,o){if(i=It(i),i&&(o||s===e))return i.slice(0,up(i)+1);if(!i||!(s=hr(s)))return i;var h=$r(i),p=sp(h,$r(s))+1;return ln(h,0,p).join("")}function Eb(i,s,o){if(i=It(i),i&&(o||s===e))return i.replace(la,"");if(!i||!(s=hr(s)))return i;var h=$r(i),p=np(h,$r(s));return ln(h,p).join("")}function Ab(i,s){var o=rt,h=J;if(Xt(s)){var p="separator"in s?s.separator:p;o="length"in s?gt(s.length):o,h="omission"in s?hr(s.omission):h}i=It(i);var m=i.length;if(ys(i)){var E=$r(i);m=E.length}if(o>=m)return i;var T=o-vs(h);if(T<1)return h;var S=E?ln(E,0,T).join(""):i.slice(0,T);if(p===e)return S+h;if(E&&(T+=S.length-T),nh(p)){if(i.slice(T).search(p)){var W,V=S;for(p.global||(p=El(p.source,It(ca.exec(p))+"g")),p.lastIndex=0;W=p.exec(V);)var $=W.index;S=S.slice(0,$===e?T:$)}}else if(i.indexOf(hr(p),T)!=T){var Q=S.lastIndexOf(p);Q>-1&&(S=S.slice(0,Q))}return S+h}function bb(i){return i=It(i),i&&ar.test(i)?i.replace(xr,jv):i}var wb=Ts(function(i,s,o){return i+(o?" ":"")+s.toUpperCase()}),uh=Zp("toUpperCase");function Yd(i,s,o){return i=It(i),s=o?e:s,s===e?Gv(i)?tm(i):Fv(i):i.match(s)||[]}var Xd=Et(function(i,s){try{return or(i,e,s)}catch(o){return ih(o)?o:new pt(o)}}),Tb=Mi(function(i,s){return wr(s,function(o){o=li(o),Oi(i,o,eh(i[o],i))}),i});function _b(i){var s=i==null?0:i.length,o=ut();return i=s?$t(i,function(h){if(typeof h[1]!="function")throw new Tr(l);return[o(h[0]),h[1]]}):[],Et(function(h){for(var p=-1;++p<s;){var m=i[p];if(or(m[0],this,h))return or(m[1],this,h)}})}function Cb(i){return jm(Cr(i,A))}function oh(i){return function(){return i}}function Db(i,s){return i==null||i!==i?s:i}var Sb=jp(),Ob=jp(!0);function Je(i){return i}function lh(i){return Dp(typeof i=="function"?i:Cr(i,A))}function Nb(i){return Op(Cr(i,A))}function Mb(i,s){return Np(i,Cr(s,A))}var Bb=Et(function(i,s){return function(o){return Ta(o,i,s)}}),Ib=Et(function(i,s){return function(o){return Ta(i,o,s)}});function hh(i,s,o){var h=Ee(s),p=Bu(s,h);o==null&&!(Xt(s)&&(p.length||!h.length))&&(o=s,s=i,i=this,p=Bu(s,Ee(s)));var m=!(Xt(o)&&"chain"in o)||!!o.chain,E=Ii(i);return wr(p,function(T){var S=s[T];i[T]=S,E&&(i.prototype[T]=function(){var W=this.__chain__;if(m||W){var V=i(this.__wrapped__),$=V.__actions__=Qe(this.__actions__);return $.push({func:S,args:arguments,thisArg:i}),V.__chain__=W,V}return S.apply(i,rn([this.value()],arguments))})}),i}function Rb(){return we._===this&&(we._=am),this}function ch(){}function Lb(i){return i=gt(i),Et(function(s){return Mp(s,i)})}var Pb=Wl($t),Fb=Wl(Kf),Ub=Wl(pl);function Zd(i){return Zl(i)?dl(li(i)):d1(i)}function kb(i){return function(s){return i==null?e:Ln(i,s)}}var Hb=Jp(),qb=Jp(!0);function fh(){return[]}function ph(){return!1}function Wb(){return{}}function Vb(){return""}function $b(){return!0}function zb(i,s){if(i=gt(i),i<1||i>Bt)return[];var o=se,h=Be(i,se);s=ut(s),i-=se;for(var p=vl(h,s);++o<i;)s(o);return p}function Gb(i){return dt(i)?$t(i,li):cr(i)?[i]:Qe(gd(It(i)))}function Yb(i){var s=++nm;return It(i)+s}var Xb=Uu(function(i,s){return i+s},0),Zb=Vl("ceil"),Qb=Uu(function(i,s){return i/s},1),jb=Vl("floor");function Kb(i){return i&&i.length?Mu(i,Je,Sl):e}function Jb(i,s){return i&&i.length?Mu(i,ut(s,2),Sl):e}function tw(i){return ep(i,Je)}function ew(i,s){return ep(i,ut(s,2))}function rw(i){return i&&i.length?Mu(i,Je,Bl):e}function iw(i,s){return i&&i.length?Mu(i,ut(s,2),Bl):e}var nw=Uu(function(i,s){return i*s},1),sw=Vl("round"),aw=Uu(function(i,s){return i-s},0);function uw(i){return i&&i.length?yl(i,Je):0}function ow(i,s){return i&&i.length?yl(i,ut(s,2)):0}return v.after=NE,v.ary=Cd,v.assign=vA,v.assignIn=Hd,v.assignInWith=ju,v.assignWith=mA,v.at=xA,v.before=Dd,v.bind=eh,v.bindAll=Tb,v.bindKey=Sd,v.castArray=WE,v.chain=wd,v.chunk=j1,v.compact=K1,v.concat=J1,v.cond=_b,v.conforms=Cb,v.constant=oh,v.countBy=uE,v.create=EA,v.curry=Od,v.curryRight=Nd,v.debounce=Md,v.defaults=AA,v.defaultsDeep=bA,v.defer=ME,v.delay=BE,v.difference=tx,v.differenceBy=ex,v.differenceWith=rx,v.drop=ix,v.dropRight=nx,v.dropRightWhile=sx,v.dropWhile=ax,v.fill=ux,v.filter=lE,v.flatMap=fE,v.flatMapDeep=pE,v.flatMapDepth=dE,v.flatten=xd,v.flattenDeep=ox,v.flattenDepth=lx,v.flip=IE,v.flow=Sb,v.flowRight=Ob,v.fromPairs=hx,v.functions=OA,v.functionsIn=NA,v.groupBy=gE,v.initial=fx,v.intersection=px,v.intersectionBy=dx,v.intersectionWith=gx,v.invert=BA,v.invertBy=IA,v.invokeMap=vE,v.iteratee=lh,v.keyBy=mE,v.keys=Ee,v.keysIn=Ke,v.map=zu,v.mapKeys=LA,v.mapValues=PA,v.matches=Nb,v.matchesProperty=Mb,v.memoize=Yu,v.merge=FA,v.mergeWith=qd,v.method=Bb,v.methodOf=Ib,v.mixin=hh,v.negate=Xu,v.nthArg=Lb,v.omit=UA,v.omitBy=kA,v.once=RE,v.orderBy=xE,v.over=Pb,v.overArgs=LE,v.overEvery=Fb,v.overSome=Ub,v.partial=rh,v.partialRight=Bd,v.partition=EE,v.pick=HA,v.pickBy=Wd,v.property=Zd,v.propertyOf=kb,v.pull=xx,v.pullAll=Ad,v.pullAllBy=Ex,v.pullAllWith=Ax,v.pullAt=bx,v.range=Hb,v.rangeRight=qb,v.rearg=PE,v.reject=wE,v.remove=wx,v.rest=FE,v.reverse=Jl,v.sampleSize=_E,v.set=WA,v.setWith=VA,v.shuffle=CE,v.slice=Tx,v.sortBy=OE,v.sortedUniq=Mx,v.sortedUniqBy=Bx,v.split=fb,v.spread=UE,v.tail=Ix,v.take=Rx,v.takeRight=Lx,v.takeRightWhile=Px,v.takeWhile=Fx,v.tap=Kx,v.throttle=kE,v.thru=$u,v.toArray=Fd,v.toPairs=Vd,v.toPairsIn=$d,v.toPath=Gb,v.toPlainObject=kd,v.transform=$A,v.unary=HE,v.union=Ux,v.unionBy=kx,v.unionWith=Hx,v.uniq=qx,v.uniqBy=Wx,v.uniqWith=Vx,v.unset=zA,v.unzip=th,v.unzipWith=bd,v.update=GA,v.updateWith=YA,v.values=Ds,v.valuesIn=XA,v.without=$x,v.words=Yd,v.wrap=qE,v.xor=zx,v.xorBy=Gx,v.xorWith=Yx,v.zip=Xx,v.zipObject=Zx,v.zipObjectDeep=Qx,v.zipWith=jx,v.entries=Vd,v.entriesIn=$d,v.extend=Hd,v.extendWith=ju,hh(v,v),v.add=Xb,v.attempt=Xd,v.camelCase=KA,v.capitalize=zd,v.ceil=Zb,v.clamp=ZA,v.clone=VE,v.cloneDeep=zE,v.cloneDeepWith=GE,v.cloneWith=$E,v.conformsTo=YE,v.deburr=Gd,v.defaultTo=Db,v.divide=Qb,v.endsWith=JA,v.eq=Gr,v.escape=tb,v.escapeRegExp=eb,v.every=oE,v.find=hE,v.findIndex=vd,v.findKey=wA,v.findLast=cE,v.findLastIndex=md,v.findLastKey=TA,v.floor=jb,v.forEach=Td,v.forEachRight=_d,v.forIn=_A,v.forInRight=CA,v.forOwn=DA,v.forOwnRight=SA,v.get=sh,v.gt=XE,v.gte=ZE,v.has=MA,v.hasIn=ah,v.head=Ed,v.identity=Je,v.includes=yE,v.indexOf=cx,v.inRange=QA,v.invoke=RA,v.isArguments=Un,v.isArray=dt,v.isArrayBuffer=QE,v.isArrayLike=je,v.isArrayLikeObject=te,v.isBoolean=jE,v.isBuffer=hn,v.isDate=KE,v.isElement=JE,v.isEmpty=tA,v.isEqual=eA,v.isEqualWith=rA,v.isError=ih,v.isFinite=iA,v.isFunction=Ii,v.isInteger=Id,v.isLength=Zu,v.isMap=Rd,v.isMatch=nA,v.isMatchWith=sA,v.isNaN=aA,v.isNative=uA,v.isNil=lA,v.isNull=oA,v.isNumber=Ld,v.isObject=Xt,v.isObjectLike=jt,v.isPlainObject=Na,v.isRegExp=nh,v.isSafeInteger=hA,v.isSet=Pd,v.isString=Qu,v.isSymbol=cr,v.isTypedArray=Cs,v.isUndefined=cA,v.isWeakMap=fA,v.isWeakSet=pA,v.join=yx,v.kebabCase=rb,v.last=Sr,v.lastIndexOf=vx,v.lowerCase=ib,v.lowerFirst=nb,v.lt=dA,v.lte=gA,v.max=Kb,v.maxBy=Jb,v.mean=tw,v.meanBy=ew,v.min=rw,v.minBy=iw,v.stubArray=fh,v.stubFalse=ph,v.stubObject=Wb,v.stubString=Vb,v.stubTrue=$b,v.multiply=nw,v.nth=mx,v.noConflict=Rb,v.noop=ch,v.now=Gu,v.pad=sb,v.padEnd=ab,v.padStart=ub,v.parseInt=ob,v.random=jA,v.reduce=AE,v.reduceRight=bE,v.repeat=lb,v.replace=hb,v.result=qA,v.round=sw,v.runInContext=D,v.sample=TE,v.size=DE,v.snakeCase=cb,v.some=SE,v.sortedIndex=_x,v.sortedIndexBy=Cx,v.sortedIndexOf=Dx,v.sortedLastIndex=Sx,v.sortedLastIndexBy=Ox,v.sortedLastIndexOf=Nx,v.startCase=pb,v.startsWith=db,v.subtract=aw,v.sum=uw,v.sumBy=ow,v.template=gb,v.times=zb,v.toFinite=Ri,v.toInteger=gt,v.toLength=Ud,v.toLower=yb,v.toNumber=Or,v.toSafeInteger=yA,v.toString=It,v.toUpper=vb,v.trim=mb,v.trimEnd=xb,v.trimStart=Eb,v.truncate=Ab,v.unescape=bb,v.uniqueId=Yb,v.upperCase=wb,v.upperFirst=uh,v.each=Td,v.eachRight=_d,v.first=Ed,hh(v,function(){var i={};return ui(v,function(s,o){Lt.call(v.prototype,o)||(i[o]=s)}),i}(),{chain:!1}),v.VERSION=n,wr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(i){v[i].placeholder=v}),wr(["drop","take"],function(i,s){bt.prototype[i]=function(o){o=o===e?1:de(gt(o),0);var h=this.__filtered__&&!s?new bt(this):this.clone();return h.__filtered__?h.__takeCount__=Be(o,h.__takeCount__):h.__views__.push({size:Be(o,se),type:i+(h.__dir__<0?"Right":"")}),h},bt.prototype[i+"Right"]=function(o){return this.reverse()[i](o).reverse()}}),wr(["filter","map","takeWhile"],function(i,s){var o=s+1,h=o==ct||o==O;bt.prototype[i]=function(p){var m=this.clone();return m.__iteratees__.push({iteratee:ut(p,3),type:o}),m.__filtered__=m.__filtered__||h,m}}),wr(["head","last"],function(i,s){var o="take"+(s?"Right":"");bt.prototype[i]=function(){return this[o](1).value()[0]}}),wr(["initial","tail"],function(i,s){var o="drop"+(s?"":"Right");bt.prototype[i]=function(){return this.__filtered__?new bt(this):this[o](1)}}),bt.prototype.compact=function(){return this.filter(Je)},bt.prototype.find=function(i){return this.filter(i).head()},bt.prototype.findLast=function(i){return this.reverse().find(i)},bt.prototype.invokeMap=Et(function(i,s){return typeof i=="function"?new bt(this):this.map(function(o){return Ta(o,i,s)})}),bt.prototype.reject=function(i){return this.filter(Xu(ut(i)))},bt.prototype.slice=function(i,s){i=gt(i);var o=this;return o.__filtered__&&(i>0||s<0)?new bt(o):(i<0?o=o.takeRight(-i):i&&(o=o.drop(i)),s!==e&&(s=gt(s),o=s<0?o.dropRight(-s):o.take(s-i)),o)},bt.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},bt.prototype.toArray=function(){return this.take(se)},ui(bt.prototype,function(i,s){var o=/^(?:filter|find|map|reject)|While$/.test(s),h=/^(?:head|last)$/.test(s),p=v[h?"take"+(s=="last"?"Right":""):s],m=h||/^find/.test(s);p&&(v.prototype[s]=function(){var E=this.__wrapped__,T=h?[1]:arguments,S=E instanceof bt,W=T[0],V=S||dt(E),$=function(At){var Tt=p.apply(v,rn([At],T));return h&&Q?Tt[0]:Tt};V&&o&&typeof W=="function"&&W.length!=1&&(S=V=!1);var Q=this.__chain__,nt=!!this.__actions__.length,ot=m&&!Q,xt=S&&!nt;if(!m&&V){E=xt?E:new bt(this);var lt=i.apply(E,T);return lt.__actions__.push({func:$u,args:[$],thisArg:e}),new _r(lt,Q)}return ot&&xt?i.apply(this,T):(lt=this.thru($),ot?h?lt.value()[0]:lt.value():lt)})}),wr(["pop","push","shift","sort","splice","unshift"],function(i){var s=yu[i],o=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",h=/^(?:pop|shift)$/.test(i);v.prototype[i]=function(){var p=arguments;if(h&&!this.__chain__){var m=this.value();return s.apply(dt(m)?m:[],p)}return this[o](function(E){return s.apply(dt(E)?E:[],p)})}}),ui(bt.prototype,function(i,s){var o=v[s];if(o){var h=o.name+"";Lt.call(As,h)||(As[h]=[]),As[h].push({name:s,func:o})}}),As[Fu(e,R).name]=[{name:"wrapper",func:e}],bt.prototype.clone=bm,bt.prototype.reverse=wm,bt.prototype.value=Tm,v.prototype.at=Jx,v.prototype.chain=tE,v.prototype.commit=eE,v.prototype.next=rE,v.prototype.plant=nE,v.prototype.reverse=sE,v.prototype.toJSON=v.prototype.valueOf=v.prototype.value=aE,v.prototype.first=v.prototype.head,va&&(v.prototype[va]=iE),v},ms=em();Nn?((Nn.exports=ms)._=ms,ll._=ms):we._=ms}).call(Os)}(Wa,Wa.exports);var Ug=Wa.exports;const Mt=yh(Ug);class St{isBox2=!0;min;max;constructor(t=new Y(1/0,1/0),e=new Y(-1/0,-1/0)){this.min=t,this.max=e}applyMatrix3(t){return this.isEmpty()?this:(qs[0].set(this.min.x,this.min.y).applyMatrix3(t),qs[1].set(this.min.x,this.max.y).applyMatrix3(t),qs[3].set(this.max.x,this.max.y).applyMatrix3(t),qs[2].set(this.max.x,this.min.y).applyMatrix3(t),this.setFromPoints(qs),this)}clone(){return new St().copy(this)}copy(t){return this.min.copy(t.min),this.max.copy(t.max),this}containsPoint(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y)}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}ceil(){return this.min.ceilToZero(),this.max.ceilToZero(),this}distanceToPoint(t){return Br.copy(t).clamp(this.min,this.max).sub(t).length()}expandByXY(t,e){return this.min.minXY(t,e),this.max.maxXY(t,e),this}expandByPoint(t){return this.min.min(t),this.max.max(t),this}expandByPoints(t){if(!t||!t.length)return this;for(let e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this}expandByVector(t){return this.min.sub(t),this.max.add(t),this}expandByScalar(t){return this.min.addScalar(-t),this.max.addScalar(t),this}expandByObject(t){return t.updateWorldMatrix(!1,!1),t.geometry.boundingBox!==void 0?((!t.geometry.boundingBox||t.geometry.boundingBox.isEmpty())&&t.computeBoundingBox(),Qn.copy(t.geometry.boundingBox),Qn.applyMatrix3(t.matrixWorld),this.union(Qn)):t.geometry.points&&t.geometry.points.length&&(Qn.setFromPoints(t.geometry.points),Qn.applyMatrix3(t.matrixWorld),this.union(Qn)),this}expandByBox(t){this.expandByPoint(t.min),this.expandByPoint(t.max)}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}floor(){return this.min.floorToZero(),this.max.floorToZero(),this}getCenter(t=new Y){return this.isEmpty()?t.set(0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(t){return this.isEmpty()?t.set(0,0):t.subVectors(this.max,this.min)}getPoints(t=[]){return t.length=0,t[0]={x:this.min.x,y:this.min.y},t[1]={x:this.min.x,y:this.max.y},t[2]={x:this.max.x,y:this.max.y},t[3]={x:this.max.x,y:this.min.y},t}getArea(){return this.getSize(Br),Br.x*Br.y}getParameter(t,e){return e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y}intersectsBox(t){return t?!(t.max.x<this.min.x||t.min.x>this.max.x||t.max.y<this.min.y||t.min.y>this.max.y):!1}intersectsObject(t){return!t||!t.geometry?!1:this.intersectsBox(t.geometry.boundingBox)}intersect(t){return this.min.max(t.min),this.max.min(t.max),this}makeEmpty(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this}round(){return this.min.roundToZero(),this.max.roundToZero(),this}set(t,e){return this.min.copy(t),this.max.copy(e),this}setFromArray(t){this.makeEmpty();for(let e=0,n=t.length;e<n;e+=3)this.expandByPoint(Br.fromArray(t,e));return this}setFromPoints(t){this.makeEmpty();for(let e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this}setFromCenterAndSize(t,e){const n=Br.copy(e).multiplyScalar(.5);return this.min.copy(t).sub(n),this.max.copy(t).add(n),this}setFromProjectionMatrix(t){return this.min.set(t.elements[6],t.elements[7]),this.max.set(t.elements[6],t.elements[7]),this}setFromObject(t){return this.makeEmpty(),this.expandByObject(t)}setFromMinMaxString(t,e=" "){if(this.makeEmpty(),!(t!=null&&t.length))return this;let n=t.split(e),a=Mt.map(n,u=>parseFloat(u));for(let u=0,l=a.length;u<l;u+=2)this.expandByPoint(Br.fromArray(a,u));return this}translate(t){return this.min.add(t),this.max.add(t),this}toString(){return`{"min":${this.min.toString()},"max":${this.max.toString()}}`}fromString(t){return t?(this.copy(JSON.parse(t)),this):this}union(t){return t.validate()?(this.min.min(t.min),this.max.max(t.max),this):this}validate(){return this.min.validate()&&this.max.validate()}unproject(t){return this.applyMatrix3(t.projectionMatrixInverse).applyMatrix3(t.matrixWorld)}centralArrange(t=1,e=20,n=10){const a=e+n;this.getCenter(Br),this.getSize(fn),fn.subScalar(e);const u=Math.floor(fn.x/a),l=Math.ceil(t/u),c=u*a,f=l*a;if(fn.x<a||fn.y<a||c>=fn.x||f>=fn.y)return Br.clone();let y=[],A=0,_=0;for(let C=0;C<t;C++){const F=u>t?t*a:c,N=Br.x-F/2+_*a+a/2,M=Br.y-f/2+A*a+a/2;y.push(new Y(N,M)),_++,_>=u&&(_=0,A++)}return y}}const Qn=new St,qs=[new Y,new Y,new Y,new Y],Br=new Y,fn=new Y,kg=Object.freeze(Object.defineProperty({__proto__:null,default:St},Symbol.toStringTag,{value:"Module"})),Hg=Zt.window.requestAnimationFrame,Ws=Zt.window.performance?()=>Zt.window.performance.now():()=>new Date().getTime(),oc=Hg;class Pt{static idCounter=0;static children=[];static isRunning=!1;static actived=!1;static duration=0;static lastTime=Ws();static messages=[];static maxLetters=20;id=Pt.idCounter++;timers=new Map;timersDuration=new Map;counters=new Map;countersAmount=new Map;out=[];constructor(){}static active(t){t?Pt.actived=!0:Pt.actived=!1,Pt.duration=t||0}static add(t){this.children.push(t),this.handleStart()}static remove(t){for(let e=0,n=Pt.children.length;e<n;e++)if(Pt.children[e].id===t.id){this.children.splice(e,1);break}}static handleStart(){this.isRunning||(this.isRunning=!0,oc(this.runLoop))}static runLoop(){Pt.children.length?(Pt.runFrames(),oc(Pt.runLoop)):Pt.isRunning=!1}static runFrames(){let t,e=Ws();if(!(e-Pt.lastTime<Pt.duration)){Pt.lastTime=e;for(let n=0,a=this.children.length;n<a;n++)t=this.children[n],t.calculateTimers(),t.calculateCounters(),Pt.messages=Pt.messages.concat(t.out),t.out.length=0;if(Pt.messages.length){if(Pt.actived){let n=[];n.push(qg),n.push(Wg),n.push(Vg),this.messages.forEach(a=>n.push(Zg(a,this.maxLetters))),n.push($g),console.log(n.join(`
|
|
32
|
+
`))}Pt.messages.length=0}}}destroy(){Pt.remove(this)}addTimer(t,e=Ws(),n=Ws()-(this.timersDuration.get(t)||Ws())){this.addTimerDuration(t,n),this.timersDuration.set(t,e)}addTimerDuration(t,e){var n;this.timers.has(t)||this.timers.set(t,[]),(n=this.timers.get(t))==null||n.push(e)}calculateTimers(){this.timers.forEach((t,e)=>{!t||!t.length||(this.out.push(this.calculateDurations(e,t)),t.length=0)})}addCounterAmount(t,e){var n;this.counters.has(t)||this.counters.set(t,[]),(n=this.counters.get(t))==null||n.push(e)}calculateCounters(){this.counters.forEach((t,e)=>{!t||!t.length||(this.out.push(this.calculateAmounts(e,t)),t.length=0)})}start(){return this.stop(),Pt.add(this),this}stop(){return Pt.remove(this),this}calculateDurations(t,e){const n={name:t,avg:0,min:0,max:0,stdDev:0,count:0,FPS:0};if(!e||!e.length)return n;const a=e.length,{min:u,max:l,avg:c}=this.minMaxAvg(e),f=parseFloat(this.stdDev(e,c).toFixed(2));return{name:t,avg:this.fd(c),min:this.fd(u),max:this.fd(l),stdDev:f,count:a,FPS:Math.ceil(a/Pt.duration*1e3)}}calculateAmounts(t,e){const n={name:t,avg:0,min:0,max:0,stdDev:0,count:0,FPS:0};if(!e||!e.length)return n;const a=e.length,{min:u,max:l,avg:c}=this.minMaxAvg(e),f=this.stdDev(e,c);return{name:t,avg:c,min:u,max:l,stdDev:f,count:a,FPS:Math.ceil(a/Pt.duration*1e3)}}minMaxAvg(t){let e=t[0],n=t[0],a=t.length,u=0;for(let c=0;c<t.length;c++){const f=t[c];u+=f,f<e&&(e=f),f>n&&(n=f)}const l=u/a;return{min:this.fx(e),max:this.fx(n),avg:this.fx(l)}}stdDev(t,e){let n=0;for(let u=0;u<t.length;u++){const l=t[u];n+=(l-e)*(l-e)}const a=t.length;return this.fx(Math.sqrt(n/a))}fd(t){return t>1e3?(t/1e3).toFixed(1)+"s":t.toFixed(1)+"ms"}fx(t,e=1){return e===1?Math.round(t*10)/10:e===2?Math.round(t*100)/100:e===3?Math.round(t*1e3)/1e3:t}}const Va=20,$a=["avg","min","max","stdDev","count","FPS"],Qr=Gg($a,1),qg=zg($a,Va),Wg=Yg($a,Va),Vg=Xg($a,Va),$g=Qg(Va);function zg(r,t=20){let e="┌";e+="─".repeat(t),e+="┬";for(let n=0,a=r.length;n<a;n++)e+="─".repeat(Qr),n<a-1?e+="┬":e+="┐";return e}function Gg(r,t=0){let e=0;for(let n=0,a=r.length;n<a;n++)e=Math.max(e,r[n].length);return e+t}function Yg(r,t=20){let e="│";e+=" ".repeat(t),e+="│";for(let n=0,a=r.length;n<a;n++)e+=" ".repeat(Math.max(Qr-r[n].length-1,0)),e+=r[n],e+=" │";return e}function Xg(r,t=20){let e="├";e+="─".repeat(t),e+="┼";for(let n=0,a=r.length;n<a;n++)e+="─".repeat(Qr),n<a-1?e+="┴":e+="┘";return e}function Zg(r,t=20){let e="│";e+=" ".repeat(Math.max(t-r.name.length,0)),e+=r.name,e+="│";const n=typeof r.avg=="string"?Qr-r.avg.length:Qr-r.avg.toString().length;return e+=" ".repeat(Math.max(n,0)),e+=r.avg+" ",e+=" ".repeat(Math.max(Qr-r.min.toString().length,0)),e+=r.min+" ",e+=" ".repeat(Math.max(Qr-r.max.toString().length,0)),e+=r.max+" ",e+=" ".repeat(Math.max(Qr-r.stdDev.toString().length,0)),e+=r.stdDev+" ",e+=" ".repeat(Math.max(Qr-r.count.toString().length,0)),e+=r.count+" ",e+=" ".repeat(Math.max(Qr-r.FPS.toString().length,0)),e+=r.FPS,e}function Qg(r=20){let t="└";for(let e=0;e<r;e++)t+="─";return t+="┘",t}var er=(r=>(r.GROS="gros",r.RM="rm",r.WS="ws",r.SU="su",r.EQ="eq",r.FN="fn",r.GL="gl",r.IP="ip",r))(er||{}),Vs=(r=>(r.BACKGROUND="background",r.ASSETS="assets",r.ANNOTATIONS="annotations",r.TEXT="text",r.ASSET_LABELS="asset-labels",r.LABELS="labels",r))(Vs||{});class Ir{_listeners=new Map;destroy(){this._listeners.clear()}addEventListener(t,e){let n=this._listeners.get(t);n||(n=[],this._listeners.set(t,n)),n.includes(e)||n.push(e)}addEventListeners(t,e){const n=t.split(","),a=n.length;for(let u=0;u<a;u++)this.addEventListener(n[u].trim(),e)}isListening(t){var e;return this._listeners.has(t)&&!!((e=this._listeners.get(t))!=null&&e.length)}hasEventListener(t,e){var n;return this._listeners.size===0?!1:this._listeners.has(t)&&!!((n=this._listeners.get(t))!=null&&n.includes(e))}removeEventListener(t,e){const n=this._listeners.get(t);if(n){const a=n.indexOf(e);a>-1&&n.splice(a,1)}}dispatchEvent(t){const e=this._listeners.get(t.type);if(e){t.target=this;const n=e.slice(0);for(let a=0,u=n.length;a<u;a++)n[a].call(this,t);t.target=void 0}}dispatchEventAsync(t){const e=this._listeners.get(t.type);e&&setTimeout(()=>{for(const n of e)n.call(this,t)})}}function vo(r,t="http://www.w3.org/2000/svg"){var e,n;return(n=(e=Zt.window)==null?void 0:e.document)==null?void 0:n.createElementNS(t,r)}async function lc(r=2e3){return new Promise(t=>setTimeout(t,(Math.random()+.5)*r))}function hc(r,t=[]){var e,n;return!r||!r.value||(t.push(r.value),(e=r.children)!=null&&e.length&&((n=r.children)==null||n.forEach(a=>hc(a,t)))),t}function cc(r){if(!r)return"inches";let t=r.querySelector("#defaultView"),e=t==null?void 0:t.getAttribute("units");return e||"inches"}function jg(r){if(!r)return 1;let t=cc(r),e=1;switch(t){case"mm":e=500/39.3701;break;case"cm":e=50/39.3701;break;case"Metres":e=.5/39.3701;break;case"m":e=.5/39.3701;break;default:e=1}return e}function Kg(r,t=new St){if(!r)return t;let e=r.split(" "),n=Mt.map(e,a=>parseFloat(a));return(n==null?void 0:n.length)!==4||(t.min.set(n[0],n[1]),t.max.set(n[0]+n[2],n[1]+n[3])),t}function Jg(r=new St){let t="";const e=[];return e.push(r.min.x),e.push(r.min.y),e.push(Math.abs(r.max.x-r.min.x)),e.push(Math.abs(r.max.y-r.min.y)),t=e.join(" "),t}function fc(r){var t;if((t=r==null?void 0:r.children)!=null&&t.length){for(let e=0,n=r.children.length;e<n;e++)if(r.children[e].nodeName==="g")return r.children[e]}}const t0=new Pt().start();class e0{isSvgRenderer=!0;id;params;container=Zt.window.document.getElementsByTagName("body")[0];cameraVersion=-1;viewAreaLimit=-1;constructor(t){this.id="SvgRenderer@"+Date.now(),this.params=t,Zt.config=t,this.initSvg(),Pt.active(this.params.monitorDuration)}destroy(){Pt.active(0)}initSvg(){if(this.params.containerId&&(this.container=Zt.window.document.getElementById(this.params.containerId)),this.container||(this.container=Zt.window.document.getElementsByTagName("body")[0]),!this.params.width||!this.params.height){const t=this.container.getBoundingClientRect();this.params.width=t.width,this.params.height=t.height}this.container.style.overflow="hidden",this.container.style.transform="translateZ(0)",this.setSize(this.params.width,this.params.height)}resize(){var e,n;const t=(n=(e=this.container)==null?void 0:e.parentElement)==null?void 0:n.getBoundingClientRect();t&&this.setSize(t.width,t.height)}setSize(t,e){this.container.style.width=t+"px",this.container.style.height=e+"px",this.params.width=t,this.params.height=e,this.params.camera||(this.params.camera={}),this.params.camera.width=this.params.width,this.params.camera.height=this.params.height,this.params.aspect=this.params.width/this.params.height,this.params.camera.aspect=this.params.aspect,this.params.camera.left=this.params.width*-.5,this.params.camera.right=this.params.width*.5,this.params.camera.top=this.params.height*.5,this.params.camera.bottom=this.params.height*-.5}getSize(t){return t.set(this.params.width,this.params.height)}clean(){}async render(t,e){var a;if(!t||!e||this.cameraVersion===(e==null?void 0:e.version))return;e.updateMatrixWorld(),dc.set(0,0).unproject(e),gc.set(this.params.width,this.params.height).unproject(e),pc.setFromPoints([dc,gc]);let n=Jg(pc);(a=t.svg)==null||a.setAttribute("viewBox",n),this.cameraVersion=e.version||-1,t0.addTimer("render cycle")}autoClear;getRenderTarget(){}setRenderTarget(t){}renderTexture(t){}}const pc=new St,dc=new Y,gc=new Y;class re{isMatrix3=!0;elements=[1,0,0,0,1,0,0,0,1];constructor(){}static equals(t,e,n=1e-6){if(t.elements.length!=e.elements.length)return!1;for(let a=0,u=t.elements.length;a<u;a++){const l=t.elements[a]-e.elements[a];if(Math.abs(l)>n)return!1}return!0}copy(t){const e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],this}clone(){return new re().fromArray(this.elements)}compose(t,e,n){const a=Math.sin(e.x),u=Math.cos(e.x);return this.set(n.x*u,n.y*a*-1,t.x,n.x*a,n.y*u,t.y,0,0,1)}composeWithCenter(t,e,n,a){return Rr.identity(),za.makeTranslation(t.x,t.y),$s.makeRotation(e.x),jn.makeScale(n.x,n.y),Ae.copy(a).applyMatrix3(jn),Rr.multiply(mo.makeTranslation(-Ae.x,-Ae.y)).multiply(za).multiply(mo.makeTranslation(Ae.x,Ae.y)).multiply($s).multiply(mo.makeTranslation(-Ae.x,-Ae.y)).multiply(jn),this.copy(Rr)}decompose(t,e,n){const a=Rr.copy(this).elements,u=Math.sqrt(a[0]*a[0]+a[3]*a[3]),l=Math.sqrt(a[1]*a[1]+a[4]*a[4]),c=a[0]*a[4]-a[3]*a[1];a[0]||a[3]?n.set(u,c/u):a[1]||a[4]?n.set(c/l,l):n.set(0,0);let f=0;a[0]||a[3]?f=a[3]>0?-Math.acos(a[0]/u):Math.acos(a[0]/u):a[1]||a[4]?f=Math.PI/2-(a[4]>0?Math.acos(-a[1]/l):-Math.acos(a[1]/l)):f=0,f!==0&&n.y<0&&(f*=-1),e.set(f,f),t.set(a[6],a[7])}compose2(t,e,n){return this.identity().translate(t.x,t.y).rotate(e.x).scale(n.x,n.y),this}decompose2(t,e,n){const a=this.clone();a.scale(-1,1);const u=a.elements[0],l=a.elements[1],c=a.elements[3],f=a.elements[4];let d=0,y=0,A=0;if(u!==0||c!==0){const _=Math.hypot(u,c);d=_,y=(u*f-l*c)/_;const C=Math.acos(u/_);A=c>0?-C:C}else if(l!==0||f!==0){const _=Math.hypot(l,f);d=(u*f-l*c)/_,y=_;const C=Math.acos(l/_);A=Math.PI/2+(f>0?-C:C)}else d=0,y=0,A=0;d=-d,t.x=a.elements[6],t.y=a.elements[7],e.x=e.y=A/Math.PI/180,n.x=d,n.y=y}composeSvgTransform(t=0,e=0,n){if(!n&&!t&&!e)return this;let a=n==null?void 0:n.split(") ").map(u=>u.trim()+")").filter(u=>u!==")");return a||(a=[]),(t||e)&&a.push(`translate(${t},${e})`),this.identity(),Rr.identity(),a.forEach(u=>{const l=/scale\(\s*([^\s,)]+)[ ,]([^\s,)]+)/.exec(u),c=/rotate\(\s*(-?\d*\.?\d+)(?:[ ,](-?\d*\.?\d+)(?:[ ,](-?\d*\.?\d+))?)?\s*\)/.exec(u),f=/translate\(\s*([^\s,)]+)[ ,]([^\s,)]+)/.exec(u);if(l){const d=Number(l[1])||1,y=Number(l[2])||d;Rr.multiply(jn.makeScale(d,y))}else c?Number(c[2])||Number(c[3])?(Ce.set(Number(c[2]||"0"),Number(c[3]||"0")),Rr.multiply($s.makeRotationByPoint(uc(Number(c[1])),Ce))):Rr.multiply($s.makeRotation(uc(Number(c[1])||0))):f&&Rr.multiply(za.makeTranslation(Number(f[1])||0,Number(f[2])||0))}),this.copy(Rr),this}decomposeSvgMatrix(t,e,n){const a=Rr.copy(this).elements;Ce.set(a[0],a[1]),Ae.set(a[3],a[4]);let u=Ce.length();Ce.normalize();let l=Ce.dot(Ae);yc.copy(Ce).multiplyScalar(-l),Ae.add(yc);const c=Ae.length()||0;Ae.normalize(),Ce.x*Ae.y<Ae.x*Ce.y&&(Ce.x=-Ce.x,Ce.y=-Ce.y,u=-u,l=-l);const f=u?Math.atan2(Ce.y,Ce.x):Math.atan2(-Ce.x,Ae.y);t.set(a[6],a[7]),e.set(f,f),n.set(u,c)}determinant(){const t=this.elements,e=t[0],n=t[3],a=t[6],u=t[1],l=t[4],c=t[7],f=t[2],d=t[5],y=t[8];return e*l*y-e*d*c-u*n*y+u*d*a+f*n*c-f*l*a}equals(t,e=0){const n=this.elements,a=t.elements;for(let u=0;u<9;u++)if(Math.abs(n[u]-a[u])>e)return!1;return!0}extractBasis2(t,e){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),this}flipY(){return this.multiply(jn.makeScale(1,-1))}fromArray(t,e=0){for(let n=0;n<9;n++)this.elements[n]=t[n+e];return this}getComponents(t=[1,0,0,1,0,0]){return t[0]=this.elements[0],t[1]=this.elements[1],t[2]=this.elements[3],t[3]=this.elements[4],t[4]=this.elements[6],t[5]=this.elements[7],t}getNormalMatrix(t){return this.setFromMatrix(t).invert().transpose()}getRotation(t){let e=this.elements;const n=Math.sqrt(e[0]*e[0]+e[3]*e[3]),a=Math.sqrt(e[1]*e[1]+e[4]*e[4]);let u=0;e[0]||e[3]?u=e[3]>0?-Math.acos(e[0]/n):Math.acos(e[0]/n):e[1]||e[4]?u=Math.PI/2-(e[4]>0?Math.acos(-e[1]/a):-Math.acos(e[1]/a)):u=0,this.getScale(Ae),u!==0&&Ae.x<0&&(u*=-1),t.set(u,u)}getScale(t){let e=this.elements,n=Math.sqrt(e[0]*e[0]+e[1]*e[1]),a=Math.sqrt(e[3]*e[3]+e[4]*e[4]),u=e[0]*e[4]-e[3]*e[1];e[0]||e[1]?t.set(u/a,a):e[3]||e[4]?t.set(n,u/n):t.set(0,0)}getTransition(t){t.set(this.elements[6],this.elements[7])}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}invert(){const t=this.elements,e=t[0],n=t[1],a=t[2],u=t[3],l=t[4],c=t[5],f=t[6],d=t[7],y=t[8],A=y*l-c*d,_=c*f-y*u,C=d*u-l*f,F=e*A+n*_+a*C;if(F===0)return this.set(0,0,0,0,0,0,0,0,0);const N=1/F;return t[0]=A*N,t[1]=(a*d-y*n)*N,t[2]=(c*n-a*l)*N,t[3]=_*N,t[4]=(y*e-a*f)*N,t[5]=(a*u-c*e)*N,t[6]=C*N,t[7]=(n*f-d*e)*N,t[8]=(l*e-n*u)*N,this}lookAt(t,e,n){return this.identity().rotate(e.angle()-t.angle()+n.angle())}makeProjection(t,e,n,a,u,l){const c=u/(e-t),f=l/(n-a),d=u/2-(e+t)*c,y=l/2+(n+a)*f;return this.elements[0]=c,this.elements[3]=0,this.elements[6]=d,this.elements[1]=0,this.elements[4]=-f,this.elements[7]=y,this.elements[2]=0,this.elements[5]=0,this.elements[8]=1,this}makeRotation(t){const e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,n,e,0,0,0,1),this}makeRotationByPoint(t,e){const n=Math.cos(t),a=Math.sin(t),u=-e.x*n+e.y*a+e.x,l=-e.x*a-e.y*n+e.y;return this.set(n,-a,u,a,n,l,0,0,1),this}makeRotationFromQuaternion(t){return this.compose(r0,t,i0)}makeScale(t,e){return this.set(t,0,0,0,e,0,0,0,1),this}makeTranslation(t,e){return this.set(1,0,t,0,1,e,0,0,1),this}multiply(t){return this.multiplyMatrices(this,t)}multiplyMatrices(t,e){const n=t.elements,a=e.elements,u=this.elements,l=n[0],c=n[3],f=n[6],d=n[1],y=n[4],A=n[7],_=n[2],C=n[5],F=n[8],N=a[0],M=a[3],R=a[6],q=a[1],z=a[4],w=a[7],L=a[2],k=a[5],j=a[8];return u[0]=l*N+c*q+f*L,u[3]=l*M+c*z+f*k,u[6]=l*R+c*w+f*j,u[1]=d*N+y*q+A*L,u[4]=d*M+y*z+A*k,u[7]=d*R+y*w+A*j,u[2]=_*N+C*q+F*L,u[5]=_*M+C*z+F*k,u[8]=_*R+C*w+F*j,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this}premultiply(t){return this.multiplyMatrices(t,this)}rotate(t){return this.premultiply($s.makeRotation(-t))}scale(t,e){return this.premultiply(jn.makeScale(t,e))}set(t,e,n,a,u,l,c,f,d){return this.elements[0]=t,this.elements[3]=e,this.elements[6]=n,this.elements[1]=a,this.elements[4]=u,this.elements[7]=l,this.elements[2]=c,this.elements[5]=f,this.elements[8]=d,this}setFromDomMatrix(t){return typeof t.m11<"u"&&typeof t.m21<"u"&&typeof t.m41<"u"&&typeof t.m12<"u"&&typeof t.m22<"u"&&typeof t.m42<"u"&&typeof t.m14<"u"&&typeof t.m24<"u"&&typeof t.m44<"u"?this.set(t.m11,t.m21,t.m41,t.m12,t.m22,t.m42,t.m14,t.m24,t.m44):typeof t.a<"u"&&typeof t.b<"u"&&typeof t.c<"u"&&typeof t.d<"u"&&typeof t.e<"u"&&typeof t.f<"u"&&this.set(t.a,t.c,t.e,t.b,t.d,t.f,0,0,1),this}setFromMatrix(t){const e=t.elements;return this.set(e[0],e[3],e[6],e[1],e[4],e[7],e[2],e[5],e[8]),this}setUvTransform(t,e,n,a,u,l,c){const f=Math.cos(u),d=Math.sin(u);return this.set(n*f,n*d,-n*(f*l+d*c)+l+t,-a*d,a*f,-a*(-d*l+f*c)+c+e,0,0,1),this}toArray(t=[],e=0){const n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t}toString(){return`[${this.elements[0]},${this.elements[1]}, ${this.elements[3]},${this.elements[4]}, ${this.elements[6]},${this.elements[7]}]`}translate(t,e){return this.premultiply(za.makeTranslation(t,e))}transpose(){let t;const e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}transposeIntoArray(t){const e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this}}const Ce=new Y,Ae=new Y,yc=new Y,Rr=new re,za=new re,$s=new re,jn=new re,mo=new re,r0=new Y(0,0,0),i0=new Y(1,1,1),De=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"],n0=()=>{const r=Math.random()*4294967295|0,t=Math.random()*4294967295|0,e=Math.random()*4294967295|0,n=Math.random()*4294967295|0;return(De[r&255]+De[r>>8&255]+De[r>>16&255]+De[r>>24&255]+"-"+De[t&255]+De[t>>8&255]+"-"+De[t>>16&15|64]+De[t>>24&255]+"-"+De[e&63|128]+De[e>>8&255]+"-"+De[e>>16&255]+De[e>>24&255]+De[n&255]+De[n>>8&255]+De[n>>16&255]+De[n>>24&255]).toLowerCase()};let s0=0;const xo=new Y,jr=new re,vc=new Y,Eo=new St,zs=new Y,Ao=new Y,pn=new Y,a0=new Y(0,1),u0={type:"added"},bo={type:"removed"};class mc extends Ir{isObject2=!0;id=s0++;uuid=n0();name;type="Object2";featureKey="Object2_"+this.id;parent;children=[];up=new Y(0,1);position=new Y;rotation=new Y;scaled=new Y(1,1);flipY=!1;selectable=!1;matrix=new re;matrixWorld=new re;matrixWorldInverse=new re;modelViewMatrix=new re;normalMatrix=new re;fixed=!1;dynamically=!1;matrixAutoUpdate=!1;matrixWorldNeedsUpdate=!1;matrixWorldAutoUpdate=!1;composeNode=!1;isInComposeNode=!1;alignCenter=!1;boundingBox=new St;boundingBoxWorld=new St;boundingBoxNeedsUpdate=!1;centerPoint=new Y;visible=!0;castShadow=!1;receiveShadow=!1;renderOrder=0;animations=[];finalSize;userData={};DefaultUp=new Y(0,1);_autoSort=!0;constructor(t={}){super(),t.name!==void 0?this.name=t.name:this.name="Object2",t.flipY!==void 0&&(this.flipY=t.flipY),t.selectable!==void 0&&(this.selectable=t.selectable),t.finalSize!==void 0&&(this.finalSize=t.finalSize),this.setAttrs(t)}_version=0;get version(){return this._version}set version(t){this._version=t}set needsUpdate(t){t&&this._version++}destroy(){super.destroy(),this.clear(),this.parent=void 0,this.dispatchEvent(bo)}setPosition(t){return this.position.set(t.x,t.y),this}translate(t,e){this.position.x+=t,this.position.y+=e}setScale(t,e){return this.scaled.set(t,e),this}setRotationFromMatrix(t){t.decompose(zs,this.rotation,Ao)}setRotation(t){return this.rotation.set(t,t),this}rotate(t){this.rotation.x+=t}scale(t,e){e?(this.scaled.x*=t,this.scaled.y*=e):this.scaled.multiplyScalar(t)}localToWorld(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix3(this.matrixWorld)}worldToLocal(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix3(jr.copy(this.matrixWorld).invert())}lookAt(t){vc.copy(t),this.updateWorldMatrix(!0,!1),this.matrixWorld.getTransition(zs),jr.lookAt(zs,vc,a0),jr.getRotation(pn),this.rotation.set(pn.x,pn.x),this.parent&&(this.parent.matrixWorld.getRotation(pn),this.rotate(pn.x))}applyMatrix3(t){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(t),this.matrix.decompose(this.position,this.rotation,this.scaled)}updateMatrix(){xo.copy(this.scaled),this.flipY&&(xo.y*=-1),this.matrix.compose(this.position,this.rotation,xo),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(this.parent?this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix):this.matrixWorld.copy(this.matrix),this.matrixWorldInverse.copy(this.matrixWorld).invert(),this.matrixWorldNeedsUpdate=!1,t=!0,this.boundingBoxNeedsUpdate=!0);const e=this.children;for(let n=0,a=e.length;n<a;n++)e[n].updateMatrixWorld(t);this.boundingBoxNeedsUpdate&&(this.updateBoundingBox(),this.boundingBoxNeedsUpdate=!1)}updateWorldMatrix(t=!1,e=!1){const n=this.parent;if(t&&n&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.parent?this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix):this.matrixWorld.copy(this.matrix),this.matrixWorldInverse.copy(this.matrixWorld).invert(),e){const a=this.children;for(let u=0,l=a.length;u<l;u++)a[u].updateWorldMatrix(!1,!0)}}updateModelViewMatrix(t){jr.copy(this.matrixWorld),this.isInComposeNode?this.modelViewMatrix.copy(this.matrix):t&&this.fixed?this.modelViewMatrix.copy(t.projectionMatrix):t?this.modelViewMatrix.multiplyMatrices(t.viewMatrix,jr):this.modelViewMatrix.copy(jr);for(let e=0,n=this.children.length;e<n;e++)this.children[e].updateModelViewMatrix(t)}computeBoundingBox(){this.boundingBox.makeEmpty(),this.centerPoint.set(0,0);for(let t=0,e=this.children.length;t<e;t++)this.children[t].updateMatrixWorld(),Eo.copy(this.children[t].computeBoundingBox()),Eo.applyMatrix3(jr.copy(this.children[t].matrixWorld)),this.boundingBox.union(Eo);return this.boundingBox.applyMatrix3(this.matrixWorldInverse),this.boundingBox}updateBoundingBox(){this.boundingBox.isEmpty()||this.boundingBoxWorld.copy(this.boundingBox).applyMatrix3(this.matrixWorld)}setAttrs(t){if(!t)return this;for(const e in t)if(!(e==="children"||t[e]===void 0)){if(e==="userData"&&t[e]){Object.keys(t[e]).forEach(n=>this.userData[n]=t[e][n]);continue}this.userData[e]=t[e]}return this}add(t){return!t||!t.isObject2||t===this?this:(t.parent&&t.parent.remove(t),t.parent=this,this.children.push(t),t.isInComposeNode=this.composeNode||this.isInComposeNode,t.selectable&&t.parent.setSelectable(t.selectable),this._autoSort&&this.children.sort((e,n)=>e.renderOrder-n.renderOrder),t.dispatchEvent(u0),this.matrixAutoUpdate||(this.matrixWorldNeedsUpdate=!0),this)}adds(t){if(!t||!t.length)return this;this._autoSort=!1;for(let e=0,n=t.length;e<n;e++)e===t.length-1&&(this._autoSort=!0),this.add(t[e]);return this}remove(t){const e=this.children.indexOf(t);return e!==-1&&(t.parent=void 0,this.children.splice(e,1),t.dispatchEvent(bo)),this}removes(t){for(let e=0,n=t.length;e<n;e++)this.remove(t[e]);return this}removeFromParent(){const t=this.parent;return t&&t.remove(this),this}moveToLast(){var e;if(!this.parent)return;let t=this.clone();this.removeFromParent(),(e=t.parent)==null||e.add(t)}clear(){for(let t=0;t<this.children.length;t++){const e=this.children[t];e.parent=void 0,e.destroy(),e.dispatchEvent(bo)}return this.children.length=0,this}attach(t){return this.updateWorldMatrix(!0,!1),jr.copy(this.matrixWorld).invert(),t.parent&&(t.parent.updateWorldMatrix(!0,!1),jr.multiply(t.parent.matrixWorld)),t.applyMatrix3(jr),this.add(t),t.updateWorldMatrix(!1,!0),this}getObjectById(t){return this.getObjectByProperty("id",t)}getObjectByName(t){return this.getObjectByProperty("name",t)}getObjectByProperty(t,e){if(this[t]===e)return this;for(let n=0,a=this.children.length;n<a;n++){const l=this.children[n].getObjectByProperty(t,e);if(l!==void 0)return l}}getWorldPosition(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(t,pn,Ao),t}getWorldRotation(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(zs,t,Ao),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(zs,pn,t),t}getWorldDirection(t){return this.updateWorldMatrix(!0,!1),t.set(this.matrixWorld.elements[6],this.matrixWorld.elements[7]).normalize()}traverse(t){t(this);const e=this.children;for(let n=0,a=e.length;n<a;n++)e[n].traverse(t)}traverseVisible(t){if(this.visible)return;t(this);const e=this.children;for(let n=0,a=e.length;n<a;n++)e[n].traverseVisible(t)}traverseAncestors(t){const e=this.parent;e&&(t(e),e.traverseAncestors(t))}onBeforeRender(t,e,n){}render(t){}onAfterRender(t,e,n){}setSelectable(t){this.selectable=t,this.parent&&this.parent.setSelectable(t)}raycast(t,e=[]){}clone(t=!0){const e=this.constructor;return new e(this.userData).copy(this,t)}copy(t,e=!0){if(this.name=t.name,this.type=t.type,this.featureKey=t.featureKey,this._version=0,this.parent=t.parent,this.up.copy(t.up),this.position.copy(t.position),this.rotation.copy(t.rotation),this.scaled.copy(t.scaled),this.flipY=t.flipY,this.selectable=t.selectable,this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.modelViewMatrix.copy(t.modelViewMatrix),this.normalMatrix.copy(t.normalMatrix),this.fixed=t.fixed,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.composeNode=t.composeNode,this.alignCenter=t.alignCenter,this.boundingBox.copy(t.boundingBox),this.boundingBoxWorld.copy(t.boundingBoxWorld),this.boundingBoxNeedsUpdate=t.boundingBoxNeedsUpdate,this.centerPoint.copy(t.centerPoint),this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.renderOrder=t.renderOrder,this.animations=t.animations.slice(),this.userData=JSON.parse(JSON.stringify(t.userData)),e)for(let n=0;n<t.children.length;n++){const a=t.children[n];this.add(a.clone())}return this}}class o0 extends mc{name="Scene";type="Scene";isScene=!0;view;background;featureKey="Scene_"+this.id;matrixAutoUpdate=!1;constructor(){super()}destroy(){super.destroy(),this.boundingBox.makeEmpty()}setup(t){this.view=t}onBeforeRender(t,e,n){super.onBeforeRender(t,e,n),n&&this.cameraVersion!==n.version&&(this.matrixAutoUpdate||this.updateMatrix(),this.needsUpdate=!0,this.cameraVersion=n.version)}render(t){var e;this.visible&&((e=this.children)==null||e.forEach(function(n){n.isShape&&n.render(t)}))}getIntersectObjects(t,e=er.RM,n=[]){throw new Error("must be implemented in derived")}}class l0{isLoading=!1;itemsLoaded=0;itemsTotal=0;urlModifier;handlers=[];onStart;onLoad;onProgress;onError;constructor(t,e,n){this.onLoad=t,this.onProgress=e,this.onError=n}itemStart(t){this.itemsTotal++,this.isLoading||this.onStart!==void 0&&this.onStart(t,this.itemsLoaded,this.itemsTotal),this.isLoading=!0}itemEnd(t){this.itemsLoaded++,this.onProgress!==void 0&&this.onProgress(t,this.itemsLoaded,this.itemsTotal),this.itemsLoaded===this.itemsTotal&&(this.isLoading=!1,this.onLoad!==void 0&&this.onLoad())}itemError(t){this.onError!==void 0&&this.onError(t)}resolveURL(t){return this.urlModifier!==void 0?this.urlModifier(t):t}setURLModifier(t){return this.urlModifier=t,this}addHandler(t,e){return this.handlers.push(t,e),this}removeHandler(t){const e=this.handlers.indexOf(t);return e!==-1&&this.handlers.splice(e,2),this}getHandler(t){for(let e=0,n=this.handlers.length;e<n;e+=2){const a=this.handlers[e],u=this.handlers[e+1];if(a.global&&(a.lastIndex=0),a.test(t))return u}return null}}const xc={enabled:!1,files:{},add:function(r,t){this.enabled&&(this.files[r]=t)},get:function(r){if(this.enabled)return this.files[r]},remove:function(r){delete this.files[r]},clear:function(){this.files={}}},h0=new l0;class Ec{manager;crossOrigin="anonymous";withCredentials=!1;path="";resourcePath="";requestHeader={};constructor(t=h0){this.manager=t}loadAsync(t,e){const n=this;return new Promise(function(a,u){n.load(t,a,e,u)})}setCrossOrigin(t){return this.crossOrigin=t,this}setWithCredentials(t){return this.withCredentials=t,this}setPath(t){return this.path=t,this}setResourcePath(t){return this.resourcePath=t,this}setRequestHeader(t){return this.requestHeader=t,this}}const gi={};class c0 extends Error{response;constructor(t,e){super(t),this.response=e}}class f0 extends Ec{mimeType;responseType;constructor(t){super(t)}load(t,e,n,a){t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);const u=xc.get(t);if(u!==void 0)return this.manager.itemStart(t),setTimeout(()=>{e&&e(u),this.manager.itemEnd(t)},0),u;if(gi[t]!==void 0){gi[t].push({onLoad:e,onProgress:n,onError:a});return}gi[t]=[],gi[t].push({onLoad:e,onProgress:n,onError:a});const l=new Zt.window.Request(t,{headers:new Zt.window.Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),c=this.mimeType,f=this.responseType;fetch(l).then(d=>{if(d.status===200||d.status===0){if(d.status===0&&console.warn("FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||d.body===void 0||d.body.getReader===void 0)return d;const y=gi[t],A=d.body.getReader(),_=d.headers.get("Content-Length")||d.headers.get("X-File-Size"),C=_?parseInt(_):0,F=C!==0;let N=0;const M=new ReadableStream({start(R){q();function q(){A.read().then(({done:z,value:w})=>{if(z)R.close();else{N+=w.byteLength;const L=new ProgressEvent("progress",{lengthComputable:F,loaded:N,total:C});for(let k=0,j=y.length;k<j;k++){const tt=y[k];tt.onProgress&&tt.onProgress(L)}R.enqueue(w),q()}})}}});return new Response(M)}else throw new c0(`fetch for "${d.url}" responded with ${d.status}: ${d.statusText}`,d)}).then(d=>{switch(f){case"arraybuffer":return d.arrayBuffer();case"blob":return d.blob();case"document":return d.text().then(y=>new DOMParser().parseFromString(y,c));case"json":return d.json();default:if(c===void 0)return d.text();{const A=/charset="?([^;"\s]*)"?/i.exec(c),_=A&&A[1]?A[1].toLowerCase():void 0,C=new TextDecoder(_);return d.arrayBuffer().then(F=>C.decode(F))}}}).then(d=>{xc.add(t,d);const y=gi[t];delete gi[t];for(let A=0,_=y.length;A<_;A++){const C=y[A];C.onLoad&&C.onLoad(d)}}).catch(d=>{const y=gi[t];if(y===void 0)throw this.manager.itemError(t),d;delete gi[t];for(let A=0,_=y.length;A<_;A++){const C=y[A];C.onError&&C.onError(d)}this.manager.itemError(t)}).finally(()=>{this.manager.itemEnd(t)}),this.manager.itemStart(t)}setMimeType(t){return this.mimeType=t,this}setResponseType(t){return this.responseType=t,this}}class Ac extends Ec{constructor(t){super(t)}load(t,e,n,a){const u=this,l=new f0(u.manager);l.setPath(u.path),l.setRequestHeader(u.requestHeader),l.setWithCredentials(u.withCredentials),l.load(t,function(c){try{e&&e(c)}catch(f){a?a(f):console.error(f),u.manager.itemError(t)}},n,a)}}const Kn="ae",bc="-",Ga="rm-assets",wc="rm-labels";function Gs(r){return r+bc+Vs.ASSETS}function Ya(r){return r+bc+Vs.LABELS}const p0={rm:["su-assets","su-labels","eq-assets","eq-labels","fn-assets","fn-labels"],su:[Ga,wc,"eq-assets","eq-labels","fn-assets","fn-labels"],eq:[Ga,wc,"su-assets","su-labels","fn-assets","fn-labels"]};function wo(r,t,e){const n=r==null?void 0:r.getAttribute(t);return n?Number(n):e}new re().makeScale(1,-1);function d0(r,t,e,n,a,u,l,c,f){let d=f*(Math.PI/180),y=Math.cos(d)*(r-e)/2+Math.sin(d)*(t-n)/2,A=-1*Math.sin(d)*(r-e)/2+Math.cos(d)*(t-n)/2,_=y*y/(l*l)+A*A/(c*c);_>1&&(l*=Math.sqrt(_),c*=Math.sqrt(_));let C=Math.sqrt((l*l*(c*c)-l*l*(A*A)-c*c*(y*y))/(l*l*(A*A)+c*c*(y*y)));a===u&&(C*=-1),isNaN(C)&&(C=0);let F=C*l*A/c,N=C*-c*y/l,M=(r+e)/2+Math.cos(d)*F-Math.sin(d)*N,R=(t+n)/2+Math.sin(d)*F+Math.cos(d)*N,q=function(Z){return Math.sqrt(Z[0]*Z[0]+Z[1]*Z[1])},z=function(Z,rt){return(Z[0]*rt[0]+Z[1]*rt[1])/(q(Z)*q(rt))},w=function(Z,rt){return(Z[0]*rt[1]<Z[1]*rt[0]?-1:1)*Math.acos(z(Z,rt))},L=w([1,0],[(y-F)/l,(A-N)/c]),k=[(y-F)/l,(A-N)/c],j=[(-1*y-F)/l,(-1*A-N)/c],tt=w(k,j);return z(k,j)<=-1&&(tt=Math.PI),z(k,j)>=1&&(tt=0),u===0&&tt>0&&(tt=tt-2*Math.PI),u===1&&tt<0&&(tt=tt+2*Math.PI),[M,R,l,c,L,tt,d,u]}const ie=" ";function g0(r){let t="";Array.isArray(r)||(r=[r]);for(let e=0;e<r.length;e++){const n=r[e];if(n.type===H.CLOSE_PATH)t+="z";else if(n.type===H.HORIZ_LINE_TO)t+=(n.relative?"h":"H")+n.x;else if(n.type===H.VERT_LINE_TO)t+=(n.relative?"v":"V")+n.y;else if(n.type===H.MOVE_TO)t+=(n.relative?"m":"M")+n.x+ie+n.y;else if(n.type===H.LINE_TO)t+=(n.relative?"l":"L")+n.x+ie+n.y;else if(n.type===H.CURVE_TO)t+=(n.relative?"c":"C")+n.x1+ie+n.y1+ie+n.x2+ie+n.y2+ie+n.x+ie+n.y;else if(n.type===H.SMOOTH_CURVE_TO)t+=(n.relative?"s":"S")+n.x2+ie+n.y2+ie+n.x+ie+n.y;else if(n.type===H.QUAD_TO)t+=(n.relative?"q":"Q")+n.x1+ie+n.y1+ie+n.x+ie+n.y;else if(n.type===H.SMOOTH_QUAD_TO)t+=(n.relative?"t":"T")+n.x+ie+n.y;else if(n.type===H.ARC)t+=(n.relative?"a":"A")+n.rX+ie+n.rY+ie+n.xRot+ie+ +n.lArcFlag+ie+ +n.sweepFlag+ie+n.x+ie+n.y;else throw new Error(`Unexpected command type "${n==null?void 0:n.type}" at index ${e}.`)}return t}function To([r,t],e){return[r*Math.cos(e)-t*Math.sin(e),r*Math.sin(e)+t*Math.cos(e)]}function Lr(...r){for(let t=0;t<r.length;t++)if(typeof r[t]!="number")throw new Error(`assertNumbers arguments[${t}] is not a number. ${typeof r[t]} == typeof ${r[t]}`);return!0}const Ui=Math.PI;function _o(r,t,e){r.lArcFlag=r.lArcFlag===0?0:1,r.sweepFlag=r.sweepFlag===0?0:1;let{rX:n,rY:a}=r;const{x:u,y:l}=r;n=Math.abs(r.rX),a=Math.abs(r.rY);const[c,f]=To([(t-u)/2,(e-l)/2],-r.xRot/180*Ui),d=Math.pow(c,2)/Math.pow(n,2)+Math.pow(f,2)/Math.pow(a,2);1<d&&(n*=Math.sqrt(d),a*=Math.sqrt(d)),r.rX=n,r.rY=a;const y=Math.pow(n,2)*Math.pow(f,2)+Math.pow(a,2)*Math.pow(c,2),A=(r.lArcFlag!==r.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(n,2)*Math.pow(a,2)-y)/y)),_=n*f/a*A,C=-a*c/n*A,F=To([_,C],r.xRot/180*Ui);r.cX=F[0]+(t+u)/2,r.cY=F[1]+(e+l)/2,r.phi1=Math.atan2((f-C)/a,(c-_)/n),r.phi2=Math.atan2((-f-C)/a,(-c-_)/n),r.sweepFlag===0&&r.phi2>r.phi1&&(r.phi2-=2*Ui),r.sweepFlag===1&&r.phi2<r.phi1&&(r.phi2+=2*Ui),r.phi1*=180/Ui,r.phi2*=180/Ui}function Tc(r,t,e){Lr(r,t,e);const n=r*r+t*t-e*e;if(0>n)return[];if(n===0)return[[r*e/(r*r+t*t),t*e/(r*r+t*t)]];const a=Math.sqrt(n);return[[(r*e+t*a)/(r*r+t*t),(t*e-r*a)/(r*r+t*t)],[(r*e-t*a)/(r*r+t*t),(t*e+r*a)/(r*r+t*t)]]}const yi=Math.PI/180;function _c(r,t,e){return(1-e)*r+e*t}function Cc(r,t,e,n){return r+Math.cos(n/180*Ui)*t+Math.sin(n/180*Ui)*e}function Dc(r,t,e,n){const u=t-r,l=e-t,c=n-e,f=3*u+3*c-6*l,d=(l-u)*6,y=3*u;return Math.abs(f)<1e-6?[-y/d]:y0(d/f,y/f,1e-6)}function Sc(r,t,e,n,a){const u=1-a,l=u*u*u,c=3*u*u*a,f=3*u*a*a,d=a*a*a;return r*l+t*c+e*f+n*d}function y0(r,t,e=1e-6){const n=r*r/4-t;if(n<-e)return[];if(n<=e)return[-r/2];const a=Math.sqrt(n);return[-(r/2)-a,-(r/2)+a]}function v0(r,t,e){r.cX||_o(r,t,e);const n=Math.min(r.phi1,r.phi2),a=Math.max(r.phi1,r.phi2),u=a-n,l=Math.ceil(u/90),c=new Array(l);let f=t,d=e;for(let y=0;y<l;y++){const A=_c(r.phi1,r.phi2,y/l),_=_c(r.phi1,r.phi2,(y+1)/l),C=_-A,F=4/3*Math.tan(C*yi/4),[N,M]=[Math.cos(A*yi)-F*Math.sin(A*yi),Math.sin(A*yi)+F*Math.cos(A*yi)],[R,q]=[Math.cos(_*yi),Math.sin(_*yi)],[z,w]=[R+F*Math.sin(_*yi),q-F*Math.cos(_*yi)],L={relative:r.relative,type:H.CURVE_TO},k=(j,tt)=>{const[Z,rt]=To([j*r.rX,tt*r.rY],r.xRot);return[r.cX+Z,r.cY+rt]};[L.x1,L.y1]=k(N,M),[L.x2,L.y2]=k(z,w),[L.x,L.y]=k(R,q),r.relative&&(L.x1-=f,L.y1-=d,L.x2-=f,L.y2-=d,L.x-=f,L.y-=d),[f,d]=[L.x,L.y],c[y]=L}return c}function m0(r=1e13){Lr(r);function t(e){return Math.round(e*r)/r}return function(n){return"x1"in n&&typeof n.x1<"u"&&(n.x1=t(n.x1)),"y1"in n&&typeof n.y1<"u"&&(n.y1=t(n.y1)),"x2"in n&&typeof n.x2<"u"&&(n.x2=t(n.x2)),"y2"in n&&typeof n.y2<"u"&&(n.y2=t(n.y2)),"x"in n&&typeof n.x<"u"&&(n.x=t(n.x)),"y"in n&&typeof n.y<"u"&&(n.y=t(n.y)),"rX"in n&&typeof n.rX<"u"&&(n.rX=t(n.rX)),"rY"in n&&typeof n.rY<"u"&&(n.rY=t(n.rY)),n}}function Oc(){return Pr((r,t,e)=>(r.relative&&(typeof r.x1<"u"&&(r.x1+=t),typeof r.y1<"u"&&(r.y1+=e),typeof r.x2<"u"&&(r.x2+=t),typeof r.y2<"u"&&(r.y2+=e),typeof r.x<"u"&&(r.x+=t),typeof r.y<"u"&&(r.y+=e),r.relative=!1),r))}function x0(){return Pr((r,t,e)=>(r.relative||(typeof r.x1<"u"&&(r.x1-=t),typeof r.y1<"u"&&(r.y1-=e),typeof r.x2<"u"&&(r.x2-=t),typeof r.y2<"u"&&(r.y2-=e),typeof r.x<"u"&&(r.x-=t),typeof r.y<"u"&&(r.y-=e),r.relative=!0),r))}function E0(r=!0,t=!0,e=!0){return Pr((n,a,u,l,c)=>{if(isNaN(l)&&!(n.type&H.MOVE_TO))throw new Error("path must start with moveto");return t&&n.type&H.HORIZ_LINE_TO&&(n.type=H.LINE_TO,n.y=n.relative?0:u),e&&n.type&H.VERT_LINE_TO&&(n.type=H.LINE_TO,n.x=n.relative?0:a),r&&n.type&H.CLOSE_PATH&&(n.type=H.LINE_TO,n.x=n.relative?l-a:l,n.y=n.relative?c-u:c),n.type&H.ARC&&(n.rX===0||n.rY===0)&&(n.type=H.LINE_TO,delete n.rX,delete n.rY,delete n.xRot,delete n.lArcFlag,delete n.sweepFlag),n})}function Nc(){let r=NaN,t=NaN,e=NaN,n=NaN;return Pr((a,u,l)=>(a.type&H.SMOOTH_CURVE_TO&&(a.type=H.CURVE_TO,r=isNaN(r)?u:r,t=isNaN(t)?l:t,a.x1=a.relative?u-r:2*u-r,a.y1=a.relative?l-t:2*l-t),a.type&H.CURVE_TO?(r=a.relative?u+a.x2:a.x2,t=a.relative?l+a.y2:a.y2):(r=NaN,t=NaN),a.type&H.SMOOTH_QUAD_TO&&(a.type=H.QUAD_TO,e=isNaN(e)?u:e,n=isNaN(n)?l:n,a.x1=a.relative?u-e:2*u-e,a.y1=a.relative?l-n:2*l-n),a.type&H.QUAD_TO?(e=a.relative?u+a.x1:a.x1,n=a.relative?l+a.y1:a.y1):(e=NaN,n=NaN),a))}function Mc(){let r=NaN,t=NaN;return Pr((e,n,a)=>{if(e.type&H.SMOOTH_QUAD_TO&&(e.type=H.QUAD_TO,r=isNaN(r)?n:r,t=isNaN(t)?a:t,e.x1=e.relative?n-r:2*n-r,e.y1=e.relative?a-t:2*a-t),e.type&H.QUAD_TO){r=e.relative?n+e.x1:e.x1,t=e.relative?a+e.y1:e.y1;const u=e.x1,l=e.y1;e.type=H.CURVE_TO,e.x1=((e.relative?0:n)+u*2)/3,e.y1=((e.relative?0:a)+l*2)/3,e.x2=(e.x+u*2)/3,e.y2=(e.y+l*2)/3}else r=NaN,t=NaN;return e})}function Pr(r){let t=0,e=0,n=NaN,a=NaN;return function(l){if(isNaN(n)&&!(l.type&H.MOVE_TO))throw new Error("path must start with moveto");const c=r(l,t,e,n,a);return l.type&H.CLOSE_PATH&&(t=n,e=a),"x"in l&&typeof l.x<"u"&&(t=l.relative?t+l.x:l.x),"y"in l&&typeof l.y<"u"&&(e=l.relative?e+l.y:l.y),l.type&H.MOVE_TO&&(n=t,a=e),c}}function A0(r=0){Lr(r);let t=NaN,e=NaN,n=NaN,a=NaN;return Pr((u,l,c,f,d)=>{const y=Math.abs;let A=!1,_=0,C=0;if(u.type&H.SMOOTH_CURVE_TO&&(_=isNaN(t)?0:l-t,C=isNaN(e)?0:c-e),u.type&(H.CURVE_TO|H.SMOOTH_CURVE_TO)?(t=u.relative?l+u.x2:u.x2,e=u.relative?c+u.y2:u.y2):(t=NaN,e=NaN),u.type&H.SMOOTH_QUAD_TO?(n=isNaN(n)?l:2*l-n,a=isNaN(a)?c:2*c-a):u.type&H.QUAD_TO?(n=u.relative?l+u.x1:u.x1,a=u.relative?c+u.y1:u.y2):(n=NaN,a=NaN),u.type&H.LINE_COMMANDS||u.type&H.ARC&&(u.rX===0||u.rY===0||!u.lArcFlag)||u.type&H.CURVE_TO||u.type&H.SMOOTH_CURVE_TO||u.type&H.QUAD_TO||u.type&H.SMOOTH_QUAD_TO){const F=typeof u.x>"u"?0:u.relative?u.x:u.x-l,N=typeof u.y>"u"?0:u.relative?u.y:u.y-c;_=isNaN(n)?typeof u.x1>"u"?_:u.relative?u.x:u.x1-l:n-l,C=isNaN(a)?typeof u.y1>"u"?C:u.relative?u.y:u.y1-c:a-c;const M=typeof u.x2>"u"?0:u.relative?u.x:u.x2-l,R=typeof u.y2>"u"?0:u.relative?u.y:u.y2-c;y(F)<=r&&y(N)<=r&&y(_)<=r&&y(C)<=r&&y(M)<=r&&y(R)<=r&&(A=!0)}return u.type&H.CLOSE_PATH&&y(l-f)<=r&&y(c-d)<=r&&(A=!0),A?[]:u})}function ki(r,t,e,n,a,u){return Lr(r,t,e,n,a,u),Pr((l,c,f,d)=>{const y=l.x1,A=l.x2,_=l.relative&&!isNaN(d),C=typeof l.x<"u"?l.x:_?0:c,F=typeof l.y<"u"?l.y:_?0:f;l.type&H.HORIZ_LINE_TO&&t!==0&&(l.type=H.LINE_TO,l.y=l.relative?0:f),l.type&H.VERT_LINE_TO&&e!==0&&(l.type=H.LINE_TO,l.x=l.relative?0:c),typeof l.x<"u"&&(l.x=l.x*r+F*e+(_?0:a)),typeof l.y<"u"&&(l.y=C*t+l.y*n+(_?0:u)),typeof l.x1<"u"&&(l.x1=l.x1*r+l.y1*e+(_?0:a)),typeof l.y1<"u"&&(l.y1=y*t+l.y1*n+(_?0:u)),typeof l.x2<"u"&&(l.x2=l.x2*r+l.y2*e+(_?0:a)),typeof l.y2<"u"&&(l.y2=A*t+l.y2*n+(_?0:u));function N(R){return R*R}const M=r*n-t*e;if(typeof l.xRot<"u"&&(r!==1||t!==0||e!==0||n!==1))if(M===0)delete l.rX,delete l.rY,delete l.xRot,delete l.lArcFlag,delete l.sweepFlag,l.type=H.LINE_TO;else{const R=l.xRot*Math.PI/180,q=Math.sin(R),z=Math.cos(R),w=1/N(l.rX),L=1/N(l.rY),k=N(z)*w+N(q)*L,j=2*q*z*(w-L),tt=N(q)*w+N(z)*L,Z=k*n*n-j*t*n+tt*t*t,rt=j*(r*n+t*e)-2*(k*e*n+tt*r*t),J=k*e*e-j*r*e+tt*r*r,st=(Math.atan2(rt,Z-J)+Math.PI)%Math.PI/2,ht=Math.sin(st),ct=Math.cos(st);l.rX=Math.abs(M)/Math.sqrt(Z*N(ct)+rt*ht*ct+J*N(ht)),l.rY=Math.abs(M)/Math.sqrt(Z*N(ht)-rt*ht*ct+J*N(ct)),l.xRot=st*180/Math.PI}return typeof l.sweepFlag<"u"&&0>M&&(l.sweepFlag=+!l.sweepFlag),l})}function b0(r,t=0,e=0){Lr(r,t,e);const n=Math.sin(r),a=Math.cos(r);return ki(a,n,-n,a,t-t*a+e*n,e-t*n-e*a)}function w0(r,t=0){return Lr(r,t),ki(1,0,0,1,r,t)}function T0(r,t=r){return Lr(r,t),ki(r,0,0,t,0,0)}function _0(r){return Lr(r),ki(1,0,Math.atan(r),1,0,0)}function C0(r){return Lr(r),ki(1,Math.atan(r),0,1,0,0)}function D0(r=0){return Lr(r),ki(-1,0,0,1,r,0)}function S0(r=0){return Lr(r),ki(1,0,0,-1,0,r)}function O0(){return Pr((r,t,e)=>H.ARC===r.type?v0(r,r.relative?0:t,r.relative?0:e):r)}function N0(){return Pr((r,t,e)=>(r.relative&&(t=0,e=0),H.ARC===r.type&&_o(r,t,e),r))}function Bc(){return r=>({...r})}function M0(){const r=Bc(),t=Oc(),e=Mc(),n=Nc(),a=Pr((u,l,c)=>{const f=n(e(t(r(u))));function d(A){A>a.maxX&&(a.maxX=A),A<a.minX&&(a.minX=A)}function y(A){A>a.maxY&&(a.maxY=A),A<a.minY&&(a.minY=A)}if(f.type&H.DRAWING_COMMANDS&&(d(l),y(c)),f.type&H.HORIZ_LINE_TO&&d(f.x),f.type&H.VERT_LINE_TO&&y(f.y),f.type&H.LINE_TO&&(d(f.x),y(f.y)),f.type&H.CURVE_TO){d(f.x),y(f.y);const A=Dc(l,f.x1,f.x2,f.x);for(const C of A)0<C&&1>C&&d(Sc(l,f.x1,f.x2,f.x,C));const _=Dc(c,f.y1,f.y2,f.y);for(const C of _)0<C&&1>C&&y(Sc(c,f.y1,f.y2,f.y,C))}if(f.type&H.ARC){d(f.x),y(f.y),_o(f,l,c);const A=f.xRot/180*Math.PI,_=Math.cos(A)*f.rX,C=Math.sin(A)*f.rX,F=-Math.sin(A)*f.rY,N=Math.cos(A)*f.rY,[M,R]=f.phi1<f.phi2?[f.phi1,f.phi2]:-180>f.phi2?[f.phi2+360,f.phi1+360]:[f.phi2,f.phi1],q=([L,k])=>{const tt=Math.atan2(k,L)*180/Math.PI;return tt<M?tt+360:tt},z=Tc(F,-_,0).map(q);for(const L of z)L>M&&L<R&&d(Cc(f.cX,_,F,L));const w=Tc(N,-C,0).map(q);for(const L of w)L>M&&L<R&&y(Cc(f.cY,C,N,L))}return u});return a.minX=1/0,a.maxX=-1/0,a.minY=1/0,a.maxY=-1/0,a}const ye={ROUND:m0,TO_ABS:Oc,TO_REL:x0,NORMALIZE_HVZ:E0,NORMALIZE_ST:Nc,QT_TO_C:Mc,INFO:Pr,SANITIZE:A0,MATRIX:ki,ROTATE:b0,TRANSLATE:w0,SCALE:T0,SKEW_X:_0,SKEW_Y:C0,X_AXIS_SYMMETRY:D0,Y_AXIS_SYMMETRY:S0,A_TO_C:O0,ANNOTATE_ARCS:N0,CLONE:Bc,CALCULATE_BOUNDS:M0};let Ic=class{round(t){return this.transform(ye.ROUND(t))}toAbs(){return this.transform(ye.TO_ABS())}toRel(){return this.transform(ye.TO_REL())}normalizeHVZ(t,e,n){return this.transform(ye.NORMALIZE_HVZ(t,e,n))}normalizeST(){return this.transform(ye.NORMALIZE_ST())}qtToC(){return this.transform(ye.QT_TO_C())}aToC(){return this.transform(ye.A_TO_C())}sanitize(t){return this.transform(ye.SANITIZE(t))}translate(t,e){return this.transform(ye.TRANSLATE(t,e))}scale(t,e){return this.transform(ye.SCALE(t,e))}rotate(t,e,n){return this.transform(ye.ROTATE(t,e,n))}matrix(t,e,n,a,u,l){return this.transform(ye.MATRIX(t,e,n,a,u,l))}skewX(t){return this.transform(ye.SKEW_X(t))}skewY(t){return this.transform(ye.SKEW_Y(t))}xSymmetry(t){return this.transform(ye.X_AXIS_SYMMETRY(t))}ySymmetry(t){return this.transform(ye.Y_AXIS_SYMMETRY(t))}annotateArcs(){return this.transform(ye.ANNOTATE_ARCS())}};const B0=r=>r===" "||r===" "||r==="\r"||r===`
|
|
33
|
+
`,Rc=r=>48<=r.charCodeAt(0)&&r.charCodeAt(0)<=57;let I0=class extends Ic{curNumber="";curCommandType=-1;curCommandRelative=!1;canParseCommandOrComma=!0;curNumberHasExp=!1;curNumberHasExpDigits=!1;curNumberHasDecimal=!1;curArgs=[];constructor(){super()}finish(t=[]){if(this.parse(" ",t),this.curArgs.length!==0||!this.canParseCommandOrComma)throw new SyntaxError("Unterminated command at the path end.");return t}parse(t,e=[]){const n=a=>{e.push(a),this.curArgs.length=0,this.canParseCommandOrComma=!0};for(let a=0;a<t.length;a++){const u=t[a],l=this.curCommandType===H.ARC&&(this.curArgs.length===3||this.curArgs.length===4)&&this.curNumber.length===1&&(this.curNumber==="0"||this.curNumber==="1"),c=Rc(u)&&(this.curNumber==="0"&&u==="0"||l);if(Rc(u)&&!c){this.curNumber+=u,this.curNumberHasExpDigits=this.curNumberHasExp;continue}if(u==="e"||u==="E"){this.curNumber+=u,this.curNumberHasExp=!0;continue}if((u==="-"||u==="+")&&this.curNumberHasExp&&!this.curNumberHasExpDigits){this.curNumber+=u;continue}if(u==="."&&!this.curNumberHasExp&&!this.curNumberHasDecimal&&!l){this.curNumber+=u,this.curNumberHasDecimal=!0;continue}if(this.curNumber&&this.curCommandType!==-1){const f=Number(this.curNumber);if(isNaN(f))throw new SyntaxError(`Invalid number ending at ${a}`);if(this.curCommandType===H.ARC){if(this.curArgs.length===0||this.curArgs.length===1){if(0>f)throw new SyntaxError(`Expected positive number, got "${f}" at index "${a}"`)}else if((this.curArgs.length===3||this.curArgs.length===4)&&this.curNumber!=="0"&&this.curNumber!=="1")throw new SyntaxError(`Expected a flag, got "${this.curNumber}" at index "${a}"`)}this.curArgs.push(f),this.curArgs.length===R0[this.curCommandType]&&(H.HORIZ_LINE_TO===this.curCommandType?n({type:H.HORIZ_LINE_TO,relative:this.curCommandRelative,x:f}):H.VERT_LINE_TO===this.curCommandType?n({type:H.VERT_LINE_TO,relative:this.curCommandRelative,y:f}):this.curCommandType===H.MOVE_TO||this.curCommandType===H.LINE_TO||this.curCommandType===H.SMOOTH_QUAD_TO?(n({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),H.MOVE_TO===this.curCommandType&&(this.curCommandType=H.LINE_TO)):this.curCommandType===H.CURVE_TO?n({type:H.CURVE_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x2:this.curArgs[2],y2:this.curArgs[3],x:this.curArgs[4],y:this.curArgs[5]}):this.curCommandType===H.SMOOTH_CURVE_TO?n({type:H.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===H.QUAD_TO?n({type:H.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===H.ARC&&n({type:H.ARC,relative:this.curCommandRelative,rX:this.curArgs[0],rY:this.curArgs[1],xRot:this.curArgs[2],lArcFlag:this.curArgs[3],sweepFlag:this.curArgs[4],x:this.curArgs[5],y:this.curArgs[6]})),this.curNumber="",this.curNumberHasExpDigits=!1,this.curNumberHasExp=!1,this.curNumberHasDecimal=!1,this.canParseCommandOrComma=!0}if(!B0(u)){if(u===","&&this.canParseCommandOrComma){this.canParseCommandOrComma=!1;continue}if(u==="+"||u==="-"||u==="."){this.curNumber=u,this.curNumberHasDecimal=u===".";continue}if(c){this.curNumber=u,this.curNumberHasDecimal=!1;continue}if(this.curArgs.length!==0)throw new SyntaxError(`Unterminated command at index ${a}.`);if(!this.canParseCommandOrComma)throw new SyntaxError(`Unexpected character "${u}" at index ${a}. Command cannot follow comma`);if(this.canParseCommandOrComma=!1,u==="z"||u==="Z"){e.push({type:H.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1;continue}else if(u==="h"||u==="H")this.curCommandType=H.HORIZ_LINE_TO,this.curCommandRelative=u==="h";else if(u==="v"||u==="V")this.curCommandType=H.VERT_LINE_TO,this.curCommandRelative=u==="v";else if(u==="m"||u==="M")this.curCommandType=H.MOVE_TO,this.curCommandRelative=u==="m";else if(u==="l"||u==="L")this.curCommandType=H.LINE_TO,this.curCommandRelative=u==="l";else if(u==="c"||u==="C")this.curCommandType=H.CURVE_TO,this.curCommandRelative=u==="c";else if(u==="s"||u==="S")this.curCommandType=H.SMOOTH_CURVE_TO,this.curCommandRelative=u==="s";else if(u==="q"||u==="Q")this.curCommandType=H.QUAD_TO,this.curCommandRelative=u==="q";else if(u==="t"||u==="T")this.curCommandType=H.SMOOTH_QUAD_TO,this.curCommandRelative=u==="t";else if(u==="a"||u==="A")this.curCommandType=H.ARC,this.curCommandRelative=u==="a";else throw new SyntaxError(`Unexpected character "${u}" at index ${a}.`)}}return e}transform(t){return Object.create(this,{parse:{value(n,a=[]){const u=Object.getPrototypeOf(this).parse.call(this,n);for(const l of u){const c=t(l);Array.isArray(c)?a.push(...c):a.push(c)}return a}}})}},H=class tr extends Ic{commands;constructor(t){super(),typeof t=="string"?this.commands=tr.parse(t):this.commands=t}encode(){return tr.encode(this.commands)}getBounds(){const t=ye.CALCULATE_BOUNDS();return this.transform(t),t}transform(t){const e=[];for(const n of this.commands){const a=t(n);Array.isArray(a)?e.push(...a):e.push(a)}return this.commands=e,this}static encode(t){return g0(t)}static parse(t){const e=new I0,n=[];return e.parse(t,n),e.finish(n),n}static CLOSE_PATH=1;static MOVE_TO=2;static HORIZ_LINE_TO=4;static VERT_LINE_TO=8;static LINE_TO=16;static CURVE_TO=32;static SMOOTH_CURVE_TO=64;static QUAD_TO=128;static SMOOTH_QUAD_TO=256;static ARC=512;static LINE_COMMANDS=tr.LINE_TO|tr.HORIZ_LINE_TO|tr.VERT_LINE_TO;static DRAWING_COMMANDS=tr.HORIZ_LINE_TO|tr.VERT_LINE_TO|tr.LINE_TO|tr.CURVE_TO|tr.SMOOTH_CURVE_TO|tr.QUAD_TO|tr.SMOOTH_QUAD_TO|tr.ARC};const R0={[H.MOVE_TO]:2,[H.LINE_TO]:2,[H.HORIZ_LINE_TO]:1,[H.VERT_LINE_TO]:1,[H.CLOSE_PATH]:0,[H.QUAD_TO]:4,[H.SMOOTH_QUAD_TO]:2,[H.CURVE_TO]:6,[H.SMOOTH_CURVE_TO]:4,[H.ARC]:7},ne=" ";function L0(r){let t="";Array.isArray(r)||(r=[r]);for(let e=0;e<r.length;e++){const n=r[e];if(n.type===X.CLOSE_PATH)t+="z";else if(n.type===X.HORIZ_LINE_TO)t+=(n.relative?"h":"H")+n.x;else if(n.type===X.VERT_LINE_TO)t+=(n.relative?"v":"V")+n.y;else if(n.type===X.MOVE_TO)t+=(n.relative?"m":"M")+n.x+ne+n.y;else if(n.type===X.LINE_TO)t+=(n.relative?"l":"L")+n.x+ne+n.y;else if(n.type===X.CURVE_TO)t+=(n.relative?"c":"C")+n.x1+ne+n.y1+ne+n.x2+ne+n.y2+ne+n.x+ne+n.y;else if(n.type===X.SMOOTH_CURVE_TO)t+=(n.relative?"s":"S")+n.x2+ne+n.y2+ne+n.x+ne+n.y;else if(n.type===X.QUAD_TO)t+=(n.relative?"q":"Q")+n.x1+ne+n.y1+ne+n.x+ne+n.y;else if(n.type===X.SMOOTH_QUAD_TO)t+=(n.relative?"t":"T")+n.x+ne+n.y;else if(n.type===X.ARC)t+=(n.relative?"a":"A")+n.rX+ne+n.rY+ne+n.xRot+ne+ +n.lArcFlag+ne+ +n.sweepFlag+ne+n.x+ne+n.y;else throw new Error(`Unexpected command type "${n==null?void 0:n.type}" at index ${e}.`)}return t}class Lc{round(t){return this.transform(ce.ROUND(t))}toAbs(){return this.transform(ce.TO_ABS())}toRel(){return this.transform(ce.TO_REL())}normalizeHVZ(t,e,n){return this.transform(ce.NORMALIZE_HVZ(t,e,n))}normalizeST(){return this.transform(ce.NORMALIZE_ST())}qtToC(){return this.transform(ce.QT_TO_C())}aToC(){return this.transform(ce.A_TO_C())}sanitize(t){return this.transform(ce.SANITIZE(t))}translate(t,e){return this.transform(ce.TRANSLATE(t,e))}scale(t,e){return this.transform(ce.SCALE(t,e))}rotate(t,e,n){return this.transform(ce.ROTATE(t,e,n))}matrix(t,e,n,a,u,l){return this.transform(ce.MATRIX(t,e,n,a,u,l))}skewX(t){return this.transform(ce.SKEW_X(t))}skewY(t){return this.transform(ce.SKEW_Y(t))}xSymmetry(t){return this.transform(ce.X_AXIS_SYMMETRY(t))}ySymmetry(t){return this.transform(ce.Y_AXIS_SYMMETRY(t))}annotateArcs(){return this.transform(ce.ANNOTATE_ARCS())}}const P0=r=>r===" "||r===" "||r==="\r"||r===`
|
|
34
|
+
`,Pc=r=>48<=r.charCodeAt(0)&&r.charCodeAt(0)<=57;class F0 extends Lc{constructor(){super(),this.curNumber="",this.curCommandType=-1,this.curCommandRelative=!1,this.canParseCommandOrComma=!0,this.curNumberHasExp=!1,this.curNumberHasExpDigits=!1,this.curNumberHasDecimal=!1,this.curArgs=[]}finish(t=[]){if(this.parse(" ",t),this.curArgs.length!==0||!this.canParseCommandOrComma)throw new SyntaxError("Unterminated command at the path end.");return t}parse(t,e=[]){const n=a=>{e.push(a),this.curArgs.length=0,this.canParseCommandOrComma=!0};for(let a=0;a<t.length;a++){const u=t[a],l=this.curCommandType===X.ARC&&(this.curArgs.length===3||this.curArgs.length===4)&&this.curNumber.length===1&&(this.curNumber==="0"||this.curNumber==="1"),c=Pc(u)&&(this.curNumber==="0"&&u==="0"||l);if(Pc(u)&&!c){this.curNumber+=u,this.curNumberHasExpDigits=this.curNumberHasExp;continue}if(u==="e"||u==="E"){this.curNumber+=u,this.curNumberHasExp=!0;continue}if((u==="-"||u==="+")&&this.curNumberHasExp&&!this.curNumberHasExpDigits){this.curNumber+=u;continue}if(u==="."&&!this.curNumberHasExp&&!this.curNumberHasDecimal&&!l){this.curNumber+=u,this.curNumberHasDecimal=!0;continue}if(this.curNumber&&this.curCommandType!==-1){const f=Number(this.curNumber);if(isNaN(f))throw new SyntaxError(`Invalid number ending at ${a}`);if(this.curCommandType===X.ARC){if(this.curArgs.length===0||this.curArgs.length===1){if(0>f)throw new SyntaxError(`Expected positive number, got "${f}" at index "${a}"`)}else if((this.curArgs.length===3||this.curArgs.length===4)&&this.curNumber!=="0"&&this.curNumber!=="1")throw new SyntaxError(`Expected a flag, got "${this.curNumber}" at index "${a}"`)}this.curArgs.push(f),this.curArgs.length===U0[this.curCommandType]&&(X.HORIZ_LINE_TO===this.curCommandType?n({type:X.HORIZ_LINE_TO,relative:this.curCommandRelative,x:f}):X.VERT_LINE_TO===this.curCommandType?n({type:X.VERT_LINE_TO,relative:this.curCommandRelative,y:f}):this.curCommandType===X.MOVE_TO||this.curCommandType===X.LINE_TO||this.curCommandType===X.SMOOTH_QUAD_TO?(n({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),X.MOVE_TO===this.curCommandType&&(this.curCommandType=X.LINE_TO)):this.curCommandType===X.CURVE_TO?n({type:X.CURVE_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x2:this.curArgs[2],y2:this.curArgs[3],x:this.curArgs[4],y:this.curArgs[5]}):this.curCommandType===X.SMOOTH_CURVE_TO?n({type:X.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===X.QUAD_TO?n({type:X.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===X.ARC&&n({type:X.ARC,relative:this.curCommandRelative,rX:this.curArgs[0],rY:this.curArgs[1],xRot:this.curArgs[2],lArcFlag:this.curArgs[3],sweepFlag:this.curArgs[4],x:this.curArgs[5],y:this.curArgs[6]})),this.curNumber="",this.curNumberHasExpDigits=!1,this.curNumberHasExp=!1,this.curNumberHasDecimal=!1,this.canParseCommandOrComma=!0}if(!P0(u)){if(u===","&&this.canParseCommandOrComma){this.canParseCommandOrComma=!1;continue}if(u==="+"||u==="-"||u==="."){this.curNumber=u,this.curNumberHasDecimal=u===".";continue}if(c){this.curNumber=u,this.curNumberHasDecimal=!1;continue}if(this.curArgs.length!==0)throw new SyntaxError(`Unterminated command at index ${a}.`);if(!this.canParseCommandOrComma)throw new SyntaxError(`Unexpected character "${u}" at index ${a}. Command cannot follow comma`);if(this.canParseCommandOrComma=!1,u==="z"||u==="Z"){e.push({type:X.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1;continue}else if(u==="h"||u==="H")this.curCommandType=X.HORIZ_LINE_TO,this.curCommandRelative=u==="h";else if(u==="v"||u==="V")this.curCommandType=X.VERT_LINE_TO,this.curCommandRelative=u==="v";else if(u==="m"||u==="M")this.curCommandType=X.MOVE_TO,this.curCommandRelative=u==="m";else if(u==="l"||u==="L")this.curCommandType=X.LINE_TO,this.curCommandRelative=u==="l";else if(u==="c"||u==="C")this.curCommandType=X.CURVE_TO,this.curCommandRelative=u==="c";else if(u==="s"||u==="S")this.curCommandType=X.SMOOTH_CURVE_TO,this.curCommandRelative=u==="s";else if(u==="q"||u==="Q")this.curCommandType=X.QUAD_TO,this.curCommandRelative=u==="q";else if(u==="t"||u==="T")this.curCommandType=X.SMOOTH_QUAD_TO,this.curCommandRelative=u==="t";else if(u==="a"||u==="A")this.curCommandType=X.ARC,this.curCommandRelative=u==="a";else throw new SyntaxError(`Unexpected character "${u}" at index ${a}.`)}}return e}transform(t){return Object.create(this,{parse:{value(n,a=[]){const u=Object.getPrototypeOf(this).parse.call(this,n);for(const l of u){const c=t(l);Array.isArray(c)?a.push(...c):a.push(c)}return a}}})}}const Ft=class Ft extends Lc{constructor(t){super(),typeof t=="string"?this.commands=Ft.parse(t):this.commands=t}encode(){return Ft.encode(this.commands)}getBounds(){const t=ce.CALCULATE_BOUNDS();return this.transform(t),t}transform(t){const e=[];for(const n of this.commands){const a=t(n);Array.isArray(a)?e.push(...a):e.push(a)}return this.commands=e,this}static encode(t){return L0(t)}static parse(t){const e=new F0,n=[];return e.parse(t,n),e.finish(n),n}};Ft.CLOSE_PATH=1,Ft.MOVE_TO=2,Ft.HORIZ_LINE_TO=4,Ft.VERT_LINE_TO=8,Ft.LINE_TO=16,Ft.CURVE_TO=32,Ft.SMOOTH_CURVE_TO=64,Ft.QUAD_TO=128,Ft.SMOOTH_QUAD_TO=256,Ft.ARC=512,Ft.LINE_COMMANDS=Ft.LINE_TO|Ft.HORIZ_LINE_TO|Ft.VERT_LINE_TO,Ft.DRAWING_COMMANDS=Ft.HORIZ_LINE_TO|Ft.VERT_LINE_TO|Ft.LINE_TO|Ft.CURVE_TO|Ft.SMOOTH_CURVE_TO|Ft.QUAD_TO|Ft.SMOOTH_QUAD_TO|Ft.ARC;let X=Ft;const U0={[X.MOVE_TO]:2,[X.LINE_TO]:2,[X.HORIZ_LINE_TO]:1,[X.VERT_LINE_TO]:1,[X.CLOSE_PATH]:0,[X.QUAD_TO]:4,[X.SMOOTH_QUAD_TO]:2,[X.CURVE_TO]:6,[X.SMOOTH_CURVE_TO]:4,[X.ARC]:7};function Co([r,t],e){return[r*Math.cos(e)-t*Math.sin(e),r*Math.sin(e)+t*Math.cos(e)]}function Fr(...r){for(let t=0;t<r.length;t++)if(typeof r[t]!="number")throw new Error(`assertNumbers arguments[${t}] is not a number. ${typeof r[t]} == typeof ${r[t]}`);return!0}const Hi=Math.PI;function Do(r,t,e){r.lArcFlag=r.lArcFlag===0?0:1,r.sweepFlag=r.sweepFlag===0?0:1;let{rX:n,rY:a}=r;const{x:u,y:l}=r;n=Math.abs(r.rX),a=Math.abs(r.rY);const[c,f]=Co([(t-u)/2,(e-l)/2],-r.xRot/180*Hi),d=Math.pow(c,2)/Math.pow(n,2)+Math.pow(f,2)/Math.pow(a,2);1<d&&(n*=Math.sqrt(d),a*=Math.sqrt(d)),r.rX=n,r.rY=a;const y=Math.pow(n,2)*Math.pow(f,2)+Math.pow(a,2)*Math.pow(c,2),A=(r.lArcFlag!==r.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(n,2)*Math.pow(a,2)-y)/y)),_=n*f/a*A,C=-a*c/n*A,F=Co([_,C],r.xRot/180*Hi);r.cX=F[0]+(t+u)/2,r.cY=F[1]+(e+l)/2,r.phi1=Math.atan2((f-C)/a,(c-_)/n),r.phi2=Math.atan2((-f-C)/a,(-c-_)/n),r.sweepFlag===0&&r.phi2>r.phi1&&(r.phi2-=2*Hi),r.sweepFlag===1&&r.phi2<r.phi1&&(r.phi2+=2*Hi),r.phi1*=180/Hi,r.phi2*=180/Hi}function Fc(r,t,e){Fr(r,t,e);const n=r*r+t*t-e*e;if(0>n)return[];if(n===0)return[[r*e/(r*r+t*t),t*e/(r*r+t*t)]];const a=Math.sqrt(n);return[[(r*e+t*a)/(r*r+t*t),(t*e-r*a)/(r*r+t*t)],[(r*e-t*a)/(r*r+t*t),(t*e+r*a)/(r*r+t*t)]]}const vi=Math.PI/180;function Uc(r,t,e){return(1-e)*r+e*t}function kc(r,t,e,n){return r+Math.cos(n/180*Hi)*t+Math.sin(n/180*Hi)*e}function Hc(r,t,e,n){const u=t-r,l=e-t,c=n-e,f=3*u+3*c-6*l,d=(l-u)*6,y=3*u;return Math.abs(f)<1e-6?[-y/d]:k0(d/f,y/f,1e-6)}function qc(r,t,e,n,a){const u=1-a,l=u*u*u,c=3*u*u*a,f=3*u*a*a,d=a*a*a;return r*l+t*c+e*f+n*d}function k0(r,t,e=1e-6){const n=r*r/4-t;if(n<-e)return[];if(n<=e)return[-r/2];const a=Math.sqrt(n);return[-(r/2)-a,-(r/2)+a]}function H0(r,t,e){r.cX||Do(r,t,e);const n=Math.min(r.phi1,r.phi2),a=Math.max(r.phi1,r.phi2),u=a-n,l=Math.ceil(u/90),c=new Array(l);let f=t,d=e;for(let y=0;y<l;y++){const A=Uc(r.phi1,r.phi2,y/l),_=Uc(r.phi1,r.phi2,(y+1)/l),C=_-A,F=4/3*Math.tan(C*vi/4),[N,M]=[Math.cos(A*vi)-F*Math.sin(A*vi),Math.sin(A*vi)+F*Math.cos(A*vi)],[R,q]=[Math.cos(_*vi),Math.sin(_*vi)],[z,w]=[R+F*Math.sin(_*vi),q-F*Math.cos(_*vi)],L={relative:r.relative,type:X.CURVE_TO},k=(j,tt)=>{const[Z,rt]=Co([j*r.rX,tt*r.rY],r.xRot);return[r.cX+Z,r.cY+rt]};[L.x1,L.y1]=k(N,M),[L.x2,L.y2]=k(z,w),[L.x,L.y]=k(R,q),r.relative&&(L.x1-=f,L.y1-=d,L.x2-=f,L.y2-=d,L.x-=f,L.y-=d),[f,d]=[L.x,L.y],c[y]=L}return c}function q0(r=1e13){Fr(r);function t(e){return Math.round(e*r)/r}return function(n){return"x1"in n&&typeof n.x1<"u"&&(n.x1=t(n.x1)),"y1"in n&&typeof n.y1<"u"&&(n.y1=t(n.y1)),"x2"in n&&typeof n.x2<"u"&&(n.x2=t(n.x2)),"y2"in n&&typeof n.y2<"u"&&(n.y2=t(n.y2)),"x"in n&&typeof n.x<"u"&&(n.x=t(n.x)),"y"in n&&typeof n.y<"u"&&(n.y=t(n.y)),"rX"in n&&typeof n.rX<"u"&&(n.rX=t(n.rX)),"rY"in n&&typeof n.rY<"u"&&(n.rY=t(n.rY)),n}}function Wc(){return Ur((r,t,e)=>(r.relative&&(typeof r.x1<"u"&&(r.x1+=t),typeof r.y1<"u"&&(r.y1+=e),typeof r.x2<"u"&&(r.x2+=t),typeof r.y2<"u"&&(r.y2+=e),typeof r.x<"u"&&(r.x+=t),typeof r.y<"u"&&(r.y+=e),r.relative=!1),r))}function W0(){return Ur((r,t,e)=>(r.relative||(typeof r.x1<"u"&&(r.x1-=t),typeof r.y1<"u"&&(r.y1-=e),typeof r.x2<"u"&&(r.x2-=t),typeof r.y2<"u"&&(r.y2-=e),typeof r.x<"u"&&(r.x-=t),typeof r.y<"u"&&(r.y-=e),r.relative=!0),r))}function V0(r=!0,t=!0,e=!0){return Ur((n,a,u,l,c)=>{if(isNaN(l)&&!(n.type&X.MOVE_TO))throw new Error("path must start with moveto");return t&&n.type&X.HORIZ_LINE_TO&&(n.type=X.LINE_TO,n.y=n.relative?0:u),e&&n.type&X.VERT_LINE_TO&&(n.type=X.LINE_TO,n.x=n.relative?0:a),r&&n.type&X.CLOSE_PATH&&(n.type=X.LINE_TO,n.x=n.relative?l-a:l,n.y=n.relative?c-u:c),n.type&X.ARC&&(n.rX===0||n.rY===0)&&(n.type=X.LINE_TO,delete n.rX,delete n.rY,delete n.xRot,delete n.lArcFlag,delete n.sweepFlag),n})}function Vc(){let r=NaN,t=NaN,e=NaN,n=NaN;return Ur((a,u,l)=>(a.type&X.SMOOTH_CURVE_TO&&(a.type=X.CURVE_TO,r=isNaN(r)?u:r,t=isNaN(t)?l:t,a.x1=a.relative?u-r:2*u-r,a.y1=a.relative?l-t:2*l-t),a.type&X.CURVE_TO?(r=a.relative?u+a.x2:a.x2,t=a.relative?l+a.y2:a.y2):(r=NaN,t=NaN),a.type&X.SMOOTH_QUAD_TO&&(a.type=X.QUAD_TO,e=isNaN(e)?u:e,n=isNaN(n)?l:n,a.x1=a.relative?u-e:2*u-e,a.y1=a.relative?l-n:2*l-n),a.type&X.QUAD_TO?(e=a.relative?u+a.x1:a.x1,n=a.relative?l+a.y1:a.y1):(e=NaN,n=NaN),a))}function $c(){let r=NaN,t=NaN;return Ur((e,n,a)=>{if(e.type&X.SMOOTH_QUAD_TO&&(e.type=X.QUAD_TO,r=isNaN(r)?n:r,t=isNaN(t)?a:t,e.x1=e.relative?n-r:2*n-r,e.y1=e.relative?a-t:2*a-t),e.type&X.QUAD_TO){r=e.relative?n+e.x1:e.x1,t=e.relative?a+e.y1:e.y1;const u=e.x1,l=e.y1;e.type=X.CURVE_TO,e.x1=((e.relative?0:n)+u*2)/3,e.y1=((e.relative?0:a)+l*2)/3,e.x2=(e.x+u*2)/3,e.y2=(e.y+l*2)/3}else r=NaN,t=NaN;return e})}function Ur(r){let t=0,e=0,n=NaN,a=NaN;return function(l){if(isNaN(n)&&!(l.type&X.MOVE_TO))throw new Error("path must start with moveto");const c=r(l,t,e,n,a);return l.type&X.CLOSE_PATH&&(t=n,e=a),"x"in l&&typeof l.x<"u"&&(t=l.relative?t+l.x:l.x),"y"in l&&typeof l.y<"u"&&(e=l.relative?e+l.y:l.y),l.type&X.MOVE_TO&&(n=t,a=e),c}}function $0(r=0){Fr(r);let t=NaN,e=NaN,n=NaN,a=NaN;return Ur((u,l,c,f,d)=>{const y=Math.abs;let A=!1,_=0,C=0;if(u.type&X.SMOOTH_CURVE_TO&&(_=isNaN(t)?0:l-t,C=isNaN(e)?0:c-e),u.type&(X.CURVE_TO|X.SMOOTH_CURVE_TO)?(t=u.relative?l+u.x2:u.x2,e=u.relative?c+u.y2:u.y2):(t=NaN,e=NaN),u.type&X.SMOOTH_QUAD_TO?(n=isNaN(n)?l:2*l-n,a=isNaN(a)?c:2*c-a):u.type&X.QUAD_TO?(n=u.relative?l+u.x1:u.x1,a=u.relative?c+u.y1:u.y2):(n=NaN,a=NaN),u.type&X.LINE_COMMANDS||u.type&X.ARC&&(u.rX===0||u.rY===0||!u.lArcFlag)||u.type&X.CURVE_TO||u.type&X.SMOOTH_CURVE_TO||u.type&X.QUAD_TO||u.type&X.SMOOTH_QUAD_TO){const F=typeof u.x>"u"?0:u.relative?u.x:u.x-l,N=typeof u.y>"u"?0:u.relative?u.y:u.y-c;_=isNaN(n)?typeof u.x1>"u"?_:u.relative?u.x:u.x1-l:n-l,C=isNaN(a)?typeof u.y1>"u"?C:u.relative?u.y:u.y1-c:a-c;const M=typeof u.x2>"u"?0:u.relative?u.x:u.x2-l,R=typeof u.y2>"u"?0:u.relative?u.y:u.y2-c;y(F)<=r&&y(N)<=r&&y(_)<=r&&y(C)<=r&&y(M)<=r&&y(R)<=r&&(A=!0)}return u.type&X.CLOSE_PATH&&y(l-f)<=r&&y(c-d)<=r&&(A=!0),A?[]:u})}function qi(r,t,e,n,a,u){return Fr(r,t,e,n,a,u),Ur((l,c,f,d)=>{const y=l.x1,A=l.x2,_=l.relative&&!isNaN(d),C=typeof l.x<"u"?l.x:_?0:c,F=typeof l.y<"u"?l.y:_?0:f;l.type&X.HORIZ_LINE_TO&&t!==0&&(l.type=X.LINE_TO,l.y=l.relative?0:f),l.type&X.VERT_LINE_TO&&e!==0&&(l.type=X.LINE_TO,l.x=l.relative?0:c),typeof l.x<"u"&&(l.x=l.x*r+F*e+(_?0:a)),typeof l.y<"u"&&(l.y=C*t+l.y*n+(_?0:u)),typeof l.x1<"u"&&(l.x1=l.x1*r+l.y1*e+(_?0:a)),typeof l.y1<"u"&&(l.y1=y*t+l.y1*n+(_?0:u)),typeof l.x2<"u"&&(l.x2=l.x2*r+l.y2*e+(_?0:a)),typeof l.y2<"u"&&(l.y2=A*t+l.y2*n+(_?0:u));function N(R){return R*R}const M=r*n-t*e;if(typeof l.xRot<"u"&&(r!==1||t!==0||e!==0||n!==1))if(M===0)delete l.rX,delete l.rY,delete l.xRot,delete l.lArcFlag,delete l.sweepFlag,l.type=X.LINE_TO;else{const R=l.xRot*Math.PI/180,q=Math.sin(R),z=Math.cos(R),w=1/N(l.rX),L=1/N(l.rY),k=N(z)*w+N(q)*L,j=2*q*z*(w-L),tt=N(q)*w+N(z)*L,Z=k*n*n-j*t*n+tt*t*t,rt=j*(r*n+t*e)-2*(k*e*n+tt*r*t),J=k*e*e-j*r*e+tt*r*r,st=(Math.atan2(rt,Z-J)+Math.PI)%Math.PI/2,ht=Math.sin(st),ct=Math.cos(st);l.rX=Math.abs(M)/Math.sqrt(Z*N(ct)+rt*ht*ct+J*N(ht)),l.rY=Math.abs(M)/Math.sqrt(Z*N(ht)-rt*ht*ct+J*N(ct)),l.xRot=st*180/Math.PI}return typeof l.sweepFlag<"u"&&0>M&&(l.sweepFlag=+!l.sweepFlag),l})}function z0(r,t=0,e=0){Fr(r,t,e);const n=Math.sin(r),a=Math.cos(r);return qi(a,n,-n,a,t-t*a+e*n,e-t*n-e*a)}function G0(r,t=0){return Fr(r,t),qi(1,0,0,1,r,t)}function Y0(r,t=r){return Fr(r,t),qi(r,0,0,t,0,0)}function X0(r){return Fr(r),qi(1,0,Math.atan(r),1,0,0)}function Z0(r){return Fr(r),qi(1,Math.atan(r),0,1,0,0)}function Q0(r=0){return Fr(r),qi(-1,0,0,1,r,0)}function j0(r=0){return Fr(r),qi(1,0,0,-1,0,r)}function K0(){return Ur((r,t,e)=>X.ARC===r.type?H0(r,r.relative?0:t,r.relative?0:e):r)}function J0(){return Ur((r,t,e)=>(r.relative&&(t=0,e=0),X.ARC===r.type&&Do(r,t,e),r))}function zc(){return r=>({...r})}function t2(){const r=zc(),t=Wc(),e=$c(),n=Vc(),a=Ur((u,l,c)=>{const f=n(e(t(r(u))));function d(A){A>a.maxX&&(a.maxX=A),A<a.minX&&(a.minX=A)}function y(A){A>a.maxY&&(a.maxY=A),A<a.minY&&(a.minY=A)}if(f.type&X.DRAWING_COMMANDS&&(d(l),y(c)),f.type&X.HORIZ_LINE_TO&&d(f.x),f.type&X.VERT_LINE_TO&&y(f.y),f.type&X.LINE_TO&&(d(f.x),y(f.y)),f.type&X.CURVE_TO){d(f.x),y(f.y);const A=Hc(l,f.x1,f.x2,f.x);for(const C of A)0<C&&1>C&&d(qc(l,f.x1,f.x2,f.x,C));const _=Hc(c,f.y1,f.y2,f.y);for(const C of _)0<C&&1>C&&y(qc(c,f.y1,f.y2,f.y,C))}if(f.type&X.ARC){d(f.x),y(f.y),Do(f,l,c);const A=f.xRot/180*Math.PI,_=Math.cos(A)*f.rX,C=Math.sin(A)*f.rX,F=-Math.sin(A)*f.rY,N=Math.cos(A)*f.rY,[M,R]=f.phi1<f.phi2?[f.phi1,f.phi2]:-180>f.phi2?[f.phi2+360,f.phi1+360]:[f.phi2,f.phi1],q=([L,k])=>{const tt=Math.atan2(k,L)*180/Math.PI;return tt<M?tt+360:tt},z=Fc(F,-_,0).map(q);for(const L of z)L>M&&L<R&&d(kc(f.cX,_,F,L));const w=Fc(N,-C,0).map(q);for(const L of w)L>M&&L<R&&y(kc(f.cY,C,N,L))}return u});return a.minX=1/0,a.maxX=-1/0,a.minY=1/0,a.maxY=-1/0,a}const ce={ROUND:q0,TO_ABS:Wc,TO_REL:W0,NORMALIZE_HVZ:V0,NORMALIZE_ST:Vc,QT_TO_C:$c,INFO:Ur,SANITIZE:$0,MATRIX:qi,ROTATE:z0,TRANSLATE:G0,SCALE:Y0,SKEW_X:X0,SKEW_Y:Z0,X_AXIS_SYMMETRY:Q0,Y_AXIS_SYMMETRY:j0,A_TO_C:K0,ANNOTATE_ARCS:J0,CLONE:zc,CALCULATE_BOUNDS:t2};class Ys extends H{name="Geo2";params;viewMatrix=new re;boundingBox=new St;constructor(t={}){super(t.commands),this.params=t,this.toAbs(),t.flipY&&this.matrix(1,0,0,-1,0,0)}_version=0;get version(){return this._version}set version(t){this._version=t}set needsUpdate(t){t&&this._version++}static render(t,e){if(!(!t||!(e!=null&&e.length))){Ot.identity();for(let n=0,a=(e==null?void 0:e.length)||0;n<a;n++){const u=e[n];switch(u.type){case H.MOVE_TO:t.moveTo(u.x,u.y),Ot.set(u.x,u.y);break;case H.LINE_TO:t.lineTo(u.x,u.y),Ot.set(u.x,u.y);break;case H.ARC:t.arc(u.x,u.y,u.rX,u.phi1||0,u.phi2||Math.PI*2,u.sweepFlag!==1),Ot.set(u.x,u.y);break;case H.HORIZ_LINE_TO:Ot.set(u.x,Ot.y);break;case H.VERT_LINE_TO:Ot.set(Ot.x,u.y);break;case H.CURVE_TO:Ot.set(u.x,u.y);break;case H.SMOOTH_CURVE_TO:Ot.set(u.x,u.y);break;case H.QUAD_TO:Ot.set(u.x,u.y);break;case H.SMOOTH_QUAD_TO:Ot.set(u.x,u.y);break}}}}setFromPoints(t){return t!=null&&t.length?(this.params.points=t,this.recomputePath(),this):this}recomputePath(){throw new Error("must be implemented in derived")}computeBoundingBox(){var t;this.boundingBox.makeEmpty(),Ot.identity();for(let e=0,n=((t=this.commands)==null?void 0:t.length)||0;e<n;e++){const a=this.commands[e];switch(a.type){case H.MOVE_TO:this.boundingBox.expandByXY(a.x,a.y),Ot.set(a.x,a.y);break;case H.LINE_TO:this.boundingBox.expandByXY(a.x,a.y),Ot.set(a.x,a.y);break;case H.ARC:typeof a.xRot>"u"?(this.boundingBox.expandByXY(a.x,a.y),kr.set(a.x,a.y).addScalar(-a.rX),this.boundingBox.expandByPoint(kr),kr.set(a.x,a.y).addScalar(a.rX),this.boundingBox.expandByPoint(kr)):this.boundingBox.expandByXY(a.x,a.y),Ot.set(a.x,a.y);break;case H.HORIZ_LINE_TO:this.boundingBox.expandByXY(a.x,Ot.y),Ot.set(a.x,Ot.y);break;case H.VERT_LINE_TO:this.boundingBox.expandByXY(Ot.x,a.y),Ot.set(Ot.x,a.y);break;case H.QUAD_TO:this.boundingBox.expandByXY(a.x,a.y),Ot.set(a.x,a.y);break}}return this.boundingBox}render(t){Ys.render(t,this.commands)}applyMatrix(t){return this.needsUpdate=!0,this.matrix(t.elements[0],t.elements[1],t.elements[3],t.elements[4],t.elements[6],t.elements[7]),this}getRenderCommands(t){var u;const e=[];for(let l=0,c=((u=this.commands)==null?void 0:u.length)||0;l<c;l++)e.push(Object.assign({},this.commands[l]));if(!t)return e;Ot.identity();const n=ce.MATRIX(t.elements[0],t.elements[1],t.elements[3],t.elements[4],t.elements[6],t.elements[7]),a=[];for(let l=0,c=e.length;l<c;l++){const f=e[l],d=n(f);if(d.type===H.ARC&&typeof d.xRot<"u"){const y=d0(Ot.x,Ot.y,d.x,d.y,d.lArcFlag,d.sweepFlag,d.rX,d.rY,0);d.x=y[0],d.y=y[1],d.rX=y[2]>y[3]?y[2]:y[3],d.phi1=y[4],d.phi2=y[4]+y[5],d.sweepFlag=y[7],d.phi2===0&&(d.phi2=d.phi1>0?1e-6:-1e-6)}else if(d.type===H.ARC&&(t.getScale(kr),d.rX=d.rY*Math.abs(kr.x),d.phi1!==0||d.phi2!==Math.PI*2)){t.getRotation(kr),d.phi1+=kr.x,d.phi2+=kr.x;const y=a[a.length-1];y.x=(y.x||0)+Math.cos(kr.x)*d.rX*2,y.y=(y.y||0)+Math.sin(kr.x)*d.rX*2}Array.isArray(d)?a.push(...d):a.push(d),typeof d.x>"u"?Ot.set(Ot.x,d.y):typeof d.y>"u"?Ot.set(d.x,Ot.y):Ot.set(d.x,d.y)}return a}copy(t){return this.commands=Mt.cloneDeep(t.commands),this.version=0,this}clone(){const t=this.constructor;return new t(this.params).copy(this)}}const Ot=new Y,kr=new Y;class e2 extends Ys{isCircle=!0;radius=1;start=0;end=Math.PI*2;constructor(t={}){t.commands||(t.commands=[]),super(t),typeof t.radius<"u"&&(this.radius=t.radius),typeof t.start<"u"&&(this.start=t.start),typeof t.end<"u"&&(this.end=t.end),this.recomputePath()}recomputePath(){var n,a;if(!((a=(n=this.params)==null?void 0:n.points)!=null&&a.length))return this;const t=this.params.points,e=[];for(let u=0,l=t.length;u<l;u++)e.push({type:H.MOVE_TO,x:t[u].x>0?t[u].x+this.radius:t[u].x-this.radius,y:t[u].y,relative:!1}),e.push({type:H.ARC,rX:this.radius,rY:this.radius,xRot:void 0,lArcFlag:0,sweepFlag:1,phi1:this.start,phi2:this.end,x:t[u].x,y:t[u].y,relative:!1});return this.commands=e,this}}class r2{params;constructor(t={}){this.params=t}destroy(){}static getInstanceByElement(t,e=!1){if(!t)return;let n;switch(t.nodeName){case"path":n=this.getInstanceByPath(t,e);break;case"circle":n=this.getInstanceByCircle(t,e);break}return n||console.error(`unsupported: ${t.nodeName}`),n}static getInstanceByPath(t,e=!1){if(!t)return;const n=t.getAttribute("d");if(!n)return;const a=n.replace(/([+\-.])\s+/gm,"$1").replace(/[^MmZzLlHhVvCcSsQqTtAae\d\s.,+-].*/g,"");return new Ys({commands:a,flipY:e})}static getInstanceByCircle(t,e=!1){if(!t||t.nodeName!=="circle")return;Gc.set(wo(t,"cx",0),wo(t,"cy",0));const n=wo(t,"r",0);return new e2({points:[Gc.clone()],radius:n,flipY:e})}static getInstance(t,e=!1){if(t)return new Ys({commands:t,flipY:e})}}const Gc=new Y;class i2{svg;offset=new Y;svgRoot;layers=[];elementsMap={};boundingBoxMap={};boundingBox=new St;svgSkeletons=[];data;_exceptTypes=["view"];_exceptIds=["viewer","mirror"];_lvi=0;bindSvg(t){return this.svg=t,this.svgRoot=fc(this.svg),this.layers=this.getLayers(2),this.getElementsMap(this.svg,this.elementsMap),this}getLayers(t){var e;if(!this.svg)throw new Error("please bind svg first");return t===2&&((e=this.layers)!=null&&e.length)?this.layers:(this.layers=this._getSvgLayer(this.svg,t),this.layers)}_getSvgLayer(t,e=0,n=0,a=[]){var c;let u,l=t.id;if(this._exceptTypes.includes(t.tagName)||t.tagName==="defs")return this._lvi--,a;if(e&&this._lvi>e)return a;l&&!this._exceptIds.includes(l)&&(u={value:l,label:l,children:[]},a.push(u)),this._lvi++;for(let f=0,d=t.children.length;f<d;f++)u?this._getSvgLayer(t.children[f],e,this._lvi,u.children):this._getSvgLayer(t.children[f],e,this._lvi,a);return((c=u==null?void 0:u.children)==null?void 0:c.length)===0&&delete u.children,this._lvi=n,a}getElementsMap(t,e={}){return this.traverseSvg(t,n=>{n!==t&&n.id&&(e[n.id]=n)}),e}computeBoundingBoxMap(){var e;if(Object.keys(this.boundingBoxMap).length)return this.boundingBoxMap;let t=(e=this.svg)==null?void 0:e.getBoundingClientRect();return t&&this.offset.set(t.left,t.top),this.traverseSvg(this.svg,n=>{if(!n.id)return;if(n.tagName==="use"){const l=this.getUseSymbolId(n);if(!l)return;const c=this.boundingBoxMap[l];if(c&&!c.isEmpty()){mi.set(Number(n.getAttribute("x")||"0"),Number(n.getAttribute("y")||"0")),Xa.composeSvgTransform(mi.x,mi.y,n.getAttribute("transform"));const y=new St().copy(c).applyMatrix3(Xa);this.boundingBoxMap[n.id]=y;return}const f=this.getUseElementBoundingBoxWithSymbol(n);if(!f)return;this.boundingBoxMap[l]=f,mi.set(Number(n.getAttribute("x")||"0"),Number(n.getAttribute("y")||"0")),Xa.composeSvgTransform(mi.x,mi.y,n.getAttribute("transform"));const d=new St().copy(f).applyMatrix3(Xa);this.boundingBoxMap[n.id]=d,this.boundingBox.expandByBox(d);return}if(typeof n.getBBox!="function")return;const a=n.getBBox();if((!a.width||!a.height)&&n.tagName==="path"){const l=r2.getInstanceByPath(n),c=l==null?void 0:l.computeBoundingBox();if(!c||c.isEmpty())return;c.getSize(mi),a.x=c.min.x,a.y=c.max.y,a.width=mi.x,a.height=mi.y}if(!a.width||!a.height)return;const u=new St(new Y(a.x,a.y),new Y(a.x+a.width,a.y+a.height));this.boundingBoxMap[n.id]=u.round(),this.boundingBox.expandByBox(u)}),this.boundingBoxMap}updateLayersVisibility(t,e=!1){if(!this.elementsMap)throw new Error("please bind svg first");this._updateAllLayersVisibility(!e),t!=null&&t.length||(t=["background"]);for(let n=0,a=t.length;n<a;n++){const u=this.getElementById(t[n]);u&&this._updateLayersVisibility(u,e,!0,!0)}}_updateAllLayersVisibility(t=!1){Object.values(this.elementsMap).forEach(e=>{e.tagName==="svg"||e.tagName==="symbol"||!e.getAttribute("id")||(e.style.display=t?"block":"none")})}_updateLayersVisibility(t,e=!1,n=!1,a=!1){var u,l;if(!(!t||t.tagName==="svg"||!t.getAttribute("id"))){if(t.style.display=e?"block":"none",n&&e){let c=t.parentElement;for(;c&&c.tagName!=="svg";)c.style.display=e?"block":"none",c=c.parentElement}if(a&&((u=t.children)==null?void 0:u.length)>0)for(let c=0,f=(l=t.children)==null?void 0:l.length;c<f;c++)this._updateLayersVisibility(t.children[c],e,!1,!0)}}updateVisibilityByAssetType(t,e=!1,n){n||(n=p0[t]),this.updateLayersVisibility(n,!e)}updateVisibilityByAssetTypes(t,e=!1,n){if(Array.isArray(t)||(t=[t]),!!(t!=null&&t.length))for(let a=0,u=t.length;a<u;a++)this.updateVisibilityByAssetType(t[a],e,n)}getElementById(t){if(!this.elementsMap)throw new Error("please bind svg first");return this.elementsMap[t]}getElementBoundingBox(t){return this.boundingBoxMap[t]}findSkeletonByPath(t=[]){let e=0,n;const a=Object.keys(this.elementsMap);for(let u=0,l=a.length;u<l;u++){const c=this.elementsMap[a[u]];if(!c)continue;const f=c.getAttribute("d");f&&(f.length<e||(e=f.length,n=c.id?c:c.parent))}return n&&t.push(n),t}setTextInChildren2(t,e){var a;let n;((a=t==null?void 0:t.children)==null?void 0:a.length)<2?(n=vo("text"),n.setAttribute("dy","1em"),t.appendChild(n)):n=t.children[t.children.length-1],n.innerHTML=e}traverseSvg(t,e){var n;if(!this._exceptTypes.includes(t.tagName)&&!(t.tagName!=="svg"&&t.tagName!=="defs"&&!t.id)&&!(t.tagName==="g"&&((n=t.children)==null?void 0:n.length)===0)){this._exceptIds.includes(t.id)||e(t);for(let a=0,u=t.children.length;a<u;a++)this.traverseSvg(t.children[a],e)}}traverseSvgTLayers(t,e){var n;if(Array.isArray(t)){for(let a=0,u=t.length;a<u;a++)this.traverseSvgTLayers(t[a],e);return}if(e(t),!!((n=t.children)!=null&&n.length))for(let a=0,u=t.children.length;a<u;a++)this.traverseSvgTLayers(t.children[a],e)}getLabelElementsByType(t,e={}){const n=this.getElementById(Ya(t));return n&&this.getElementsMap(n,e),e}getLabelElementById(t,e="rm"){if(!t)return;const n=this.getElementById(t);if(!n)return;let a=n.getAttribute("aid");return a||(a="l-"+e+"-"+t),this.getElementById(a)}setLabelsById(t,e,n="rm"){var l,c;const a=this.getLabelElementById(t,n);if(!a)return;const u=((l=a.children)==null?void 0:l.length)||0;for(let f=0,d=((e==null?void 0:e.length)||0)-(u-1);f<d;f++){const y=vo("text");y.setAttribute("x","0"),y.setAttribute("y",u+f+"em"),a.appendChild(y)}for(let f=1,d=(c=a.children)==null?void 0:c.length;f<d;f++)a.children[f].textContent=e&&f<=e.length?e[f-1]:""}clearAssetLabelsByType(t="rm"){var a;const e=this.getLabelElementsByType(t),n=Mt.keys(e);for(let u=0,l=n.length;u<l;u++){const c=e[n[u]];for(let f=1,d=((a=c.children)==null?void 0:a.length)||0;f<d;f++)c.children[f].textContent=""}}getUseSymbolId(t){var e;if(!(!t||t.tagName!=="use"))return(e=t.getAttribute("xlink:href"))==null?void 0:e.substring(1)}getUseSymbol(t){if(!t||t.tagName!=="use")return;const e=this.getUseSymbolId(t);if(e)return this.getElementById(e)}setElementState2selected(t,e=!1){var a;if(!t)return;if(t.tagName==="use"){const u=this._getSymbolBox(t);if(!u)return;e?(a=t.parentNode)==null||a.insertBefore(u,t):t.parentNode&&t.parentNode.contains(u)&&t.parentNode.removeChild(u);return}let n=t.getAttribute("class");n||(n=""),e?n="danger":n=Mt.replace(n,"danger","").trim(),t.setAttribute("class",n)}_getSymbolBox(t){if(!t)return;const e=t.id+"-boundingBox";let n=this.getElementById(e);if(n)return n;const a=this.getUseSymbol(t);if(!a)return;let u=this.getElementBoundingBox(t.id);if(!u||u.isEmpty())return;n=document.createElementNS("http://www.w3.org/2000/svg","rect"),n.setAttribute("id",e),n.setAttribute("class","danger"),n.setAttribute("x",u.min.x.toString()),n.setAttribute("y",u.min.y.toString());const l=new Y;return u.getSize(l),n.setAttribute("width",l.x.toString()),n.setAttribute("height",l.y.toString()),a.getAttribute("transform")&&n.setAttribute("transform",a.getAttribute("transform")||""),a.getAttribute("style")&&n.setAttribute("style",a.getAttribute("style")||""),this.elementsMap[e]=n,n}getUseElementBoundingBoxWithSymbol(t){var f;if(!t)return;const e=(f=t.getAttribute("xlink:href"))==null?void 0:f.substring(1);if(!e)return;let n=this.getElementById(e);if(!n)return;const a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.style.position="absolute",a.style.top="-9999px",a.style.left="-9999px";let u;if(Mt.lowerCase(n.tagName)==="symbol"){u=document.createElementNS("http://www.w3.org/2000/svg","g");for(let d=0,y=n.childNodes.length;d<y;d++){const A=n.childNodes[d].cloneNode(!0);u.appendChild(A)}}else u=n.cloneNode(!0);a.appendChild(u),u.setAttribute("style","stroke: #333333;"),document.body.appendChild(a);const l=a.getBBox();if(document.body.removeChild(a),!l)return;const c=new St;return c.set(new Y(l.x,l.y),new Y(l.x+l.width,l.y+l.height)),c}fontZoom(t,e=1){const n=this.getElementById(t);if(!n)return;let a=n.getAttribute("font-size");a||(a="12");const u=/(\d+)([a-zA-Z%]+)/.exec(a),l=u&&(u==null?void 0:u.length)>2?u[2]:"";let c=Math.round(parseFloat(a)*e*100)/100;n.setAttribute("font-size",c+l)}getCentroid(t,e=new Y){const n=t.getAttribute("insX"),a=t.getAttribute("insY");return n||a?e.set(Number(n||"0"),Number(a||"0")):this.getCentroidByDom(t,e)}getCentroidByDom(t,e=new Y){const n=Number(t.getAttribute("x")||"0"),a=Number(t.getAttribute("y")||"0"),u=t.getBBox();let l=1,c=1,f=t.getAttribute("transform");if(!f)return e.set(n,a);const d=/scale\(\s*([^\s,)]+)[ ,]([^\s,)]+)/.exec(f);if(typeof d>"u"||d==null){const y=t.transform.baseVal;if(f&&y.numberOfItems>0){let A=y.getItem(0);A&&A.type===SVGTransform.SVG_TRANSFORM_SCALE&&(l=A.matrix.a!==0?A.matrix.a:1,c=A.matrix.d!==0?A.matrix.d:l)}else return e.set((u.x+u.width/2)*l,(u.y+u.height/2)*c)}else l=d[1]&&Number(d[1])>0?Number(d[1]):1,c=d[2]&&Number(d[2])>0?Number(d[2]):l;return n&&a?e.set(n*l,a*c):e.set((u.x+u.width/2)*l,(u.y+u.height/2)*c),e}_lastLinked=[];linkAssetsByTree(t,e){if(t||(t=er.RM),this.clearLinkedLines(t),!e||!e.value)return;const n=this.getLinesByTree(e);this.drawLinkedLines(t,n)}clearLinkedLines(t){var a;const e=Gs(t);if(this.getElementById(e)){for(let u=((a=this._lastLinked)==null?void 0:a.length)-1;u>=0;u--){const l=this._lastLinked[u];l.parentNode&&l.parentNode.removeChild(l),this._lastLinked.splice(u,1)}this._lastLinked.length=0}}drawLinkedLines(t,e){var u;if(!(e!=null&&e.length))return;const n=Gs(t),a=this.getElementById(n);if(a)for(let l=0,c=e.length;l<c;l++){const f=e[l][0],d=e[l][((u=e[l])==null?void 0:u.length)-1],y=vo("line");y.setAttribute("x1",f.x.toString()),y.setAttribute("y1",f.y.toString()),y.setAttribute("x2",d.x.toString()),y.setAttribute("y2",d.y.toString()),y.setAttribute("class","danger"),y.setAttribute("style","stroke-width: 2;"),a.appendChild(y),this._lastLinked.push(y)}}getLinesByTree(t,e=[]){var u;if(!(t!=null&&t.value))return e;const n=this.getElementBoundingBox(t.value);if(!n)return e;const a=n.getCenter();return(u=t.children)==null||u.forEach(l=>{var d;const c=this.getElementBoundingBox(l==null?void 0:l.value);if(!c)return;const f=c.getCenter();e.push([a,f]),(d=l.children)!=null&&d.length&&this.getLinesByTree(l,e)}),e}}const mi=new Y,Xa=new re;class n2{name="SvgPainter";params;chef;constructor(t={},e){this.params=t,this.chef=e}drawSocialDistanceCircles(t,e="http://www.w3.org/2000/svg"){var C,F,N;if(!t)return;const n=jg(t),a=cc(t),u=2*n,l=(F=(C=this.params.socialDistance)==null?void 0:C.colors)!=null&&F.length?(N=this.params.socialDistance)==null?void 0:N.colors:[he.green,he.red],c=this.getRadius(a),f=t.querySelector(`#${Ga}`),d=f==null?void 0:f.querySelectorAll("path");if(!f||!(d!=null&&d.length))return;let y,A;const _=new Array;for(let M=0,R=(d==null?void 0:d.length)||0;M<R;M++){if(y=d[M],A=y.getAttribute("id"),!A)continue;const q=this.chef.getElementBoundingBox(A);if(!q)continue;const z=new Y;q.getCenter(z),_.push({id:A,cp:z})}for(let M=0,R=_.length;M<R;M++){_[M].color=l[0];for(let q=0,z=R;q<z;q++)_[M]!==_[q]&&Y.getDistance(_[M].cp,_[q].cp)<c*2&&(_[M].color=l[1])}for(let M=0,R=_.length;M<R;M++){let q=this.createCircle(_[M],c,u,e);f.appendChild(q)}}clearSocialDistanceCircles(t){if(!t)return;const e=t.querySelector(`#${Ga}`),n=e==null?void 0:e.querySelectorAll("circle");if(!(!e||!(n!=null&&n.length)))for(let a=0,u=(n==null?void 0:n.length)||0;a<u;a++){const l=n[a].getAttribute("id");l&&(l==null?void 0:l.indexOf("_circle"))>-1&&e.removeChild(n[a])}}getRadius(t){var n,a,u;let e=((a=(n=this.params)==null?void 0:n.socialDistance)==null?void 0:a.radius)||3;return((u=this.params)==null?void 0:u.displayUnits)==="imperial"?t==="Metres"||t==="m"?e/=3.28084:t==="cm"?e=e/3.28084*100:t==="mm"?e=e/3.28084*1e3:(t==="INCH"||t==="inches")&&(e*=12):t==="INCH"||t==="inches"?e=e*3.28084*12:t==="cm"?e*=100:t==="mm"&&(e*=1e3),e}createCircle(t,e,n,a){const u=document.createElementNS(a,"circle");return u.setAttributeNS(null,"id",t.id+"_circle"),u.setAttributeNS(null,"cx",t.cp.x),u.setAttributeNS(null,"cy",t.cp.y),u.setAttributeNS(null,"r",String(e)),u.setAttributeNS(null,"style",`pointer-events:none;fill-opacity:0.1;stroke:${t.color};stroke-width:${n}px;`),u}}const s2=function(r){return(r||"").replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g,"")};function Za(r,t){if(!r||!t)return!1;if(t.indexOf(" ")!==-1)throw new Error("className should not contain space.");return r.classList?r.classList.contains(t):(" "+r.className+" ").indexOf(" "+t+" ")>-1}function Xs(r,t){if(!r)return;let e=r.className;const n=(t||"").split(" ");for(let a=0,u=n.length;a<u;a++){const l=n[a];l&&(r.classList?r.classList.add(l):Za(r,l)||(e+=" "+l))}r.classList||(r.className=e)}function Zs(r,t){if(!r||!t)return;const e=t.split(" ");let n=" "+r.className+" ";for(let a=0,u=e.length;a<u;a++){const l=e[a];l&&(r.classList?r.classList.remove(l):Za(r,l)&&(n=n.replace(" "+l+" "," ")))}r.classList||(r.className=s2(n))}class Yc extends o0{isSvgScene=!0;name="SvgScene";dynamically=!0;params;socialDistanceEnable=!1;container;svg;svgStr="";svgRoot;viewBox=new St;chef;defaultLayers=[];skeletonLayers=[];currentLayers=[];assetType;assetsMap={};legend=[];selectedList=[];painter;_lastHighlightType="";_lastHighlightIds=[];clickSvgElementHandler=this.handleClickSvgElement.bind(this);constructor(t={}){super(),this.params=t,this.assetType=t.assetType||er.RM,this.params.socialDistanceEnable&&(this.socialDistanceEnable=!0),this.container=this.params.containerId?document.getElementById(this.params.containerId):Zt.window.document.getElementsByTagName("body")[0],this.chef=new i2,this.painter=new n2(t,this.chef)}get isMounted(){var t;return((t=this.container.querySelectorAll("svg"))==null?void 0:t.length)>0}destroy(){var t;super.destroy(),this.unmount(),(t=this.camera)==null||t.destroy()}mount(){this.svg&&(this.container.contains(this.svg)||this.container.appendChild(this.svg),this.chef.computeBoundingBoxMap())}unmount(){this.svg&&this.svg.parentNode&&this.container.contains(this.svg)&&this.container.removeChild(this.svg)}computeBoundingBox(){return this.boundingBox.makeEmpty(),!this.chef||!this.svg?this.boundingBox:(this.chef.computeBoundingBoxMap(),this.boundingBox.copy(this.chef.boundingBox),console.warn("svgScene.computeBoundingBox: ",this.chef.boundingBox.toString()),this.boundingBox)}async load(t){return new Ac().loadAsync(t)}bind(t){if(this.svgStr=t,this.svg=new DOMParser().parseFromString(t,"image/svg+xml").documentElement,console.warn("bind: ",this.name),!this.svg)throw new Error("svg load failed");let e=this.svg.getAttribute("viewBox");e&&(Kg(e,this.viewBox),this.chef.bindSvg(this.svg),this.svgRoot=fc(this.svg),this.svg.setAttribute("viewBox",`0 0 ${this.params.width} ${this.params.height}`),this.svg.setAttribute("style","transform: translateZ(0);"),this.appendStyles(),console.log(this.name,"viewBox -> ",e,this.viewBox.toString()),this.setAssetsMap(this.assetType,this.assetsMap))}appendStyles(){var e;let t=(e=this.svg)==null?void 0:e.querySelector("style");t&&(t.appendChild(document.createTextNode(`.default { stroke: ${this.params.defaultStroke}; fill: ${this.params.defaultFill}; }`)),t.appendChild(document.createTextNode(`.info { stroke: ${this.params.infoStroke}; fill: ${this.params.infoFill}; }`)),t.appendChild(document.createTextNode(`.primary { stroke: ${this.params.primaryStroke}; fill: ${this.params.primaryFill}; }`)),t.appendChild(document.createTextNode(`.success { stroke: ${this.params.successStroke}; fill: ${this.params.successFill}; }`)),t.appendChild(document.createTextNode(`.warning { stroke: ${this.params.warningStroke}; fill: ${this.params.warningFill}; }`)),t.appendChild(document.createTextNode(`.danger { stroke: ${this.params.dangerStroke}; fill: ${this.params.dangerFill}; }`)),t.appendChild(document.createTextNode(`.active { stroke: ${this.params.activeStroke}; fill: ${this.params.activeFill}; }`)))}getLayers(t=2){return this.svg?this.chef.getLayers(t):[]}setDefaultLayers(t){t!=null&&t.length&&(this.defaultLayers=t)}setSkeletonLayers(t){t!=null&&t.length&&(this.skeletonLayers=t)}setCurrentLayers(t){t!=null&&t.length&&(this.currentLayers=t)}showDefaultLayers(t,e=!1){this.setDefaultLayers(t),this.chef.updateLayersVisibility(t,e)}updateLayersVisibility(t,e=!1){this.chef.updateLayersVisibility(t,e)}setAssetType(t,e){this.assetsMap={},this.assetType=t,this.setAssetsMap(this.assetType,this.assetsMap),e||(e=[Gs(t)],t!==er.RM&&e.unshift(Gs(er.RM))),this.setDefaultLayers(e),this.updateLayersVisibility(this.defaultLayers,!0)}isBelongsToAssetType(t,e){e||(e=this.assetType);const n=this.getAssetsByType(e);return n==null?void 0:n.hasOwnProperty(t)}setAssetsMap(t,e={}){const n=this.chef.getElementById(Gs(t));if(!n)return e;e[t]=this.chef.getElementsMap(n);const a=Ya(t),u=this.chef.getElementById(a);if(!u)return e;const l=this.chef.getElementsMap(u),c=Mt.keys(l);if(!(c!=null&&c.length))return e;if(Mt.startsWith(c[0],`l-${t}-`)){const f=`l-${t}-`.length;for(let d=0,y=c.length;d<y;d++){const A=c[d].slice(f);l[A]=l[c[d]],delete l[c[d]]}}return e[a]=l,e}getAssetsByType(t){return this.assetsMap.hasOwnProperty(t)||this.setAssetsMap(t,this.assetsMap),this.assetsMap[t]}getElementById(t){if(!t)return;const e=this.getAssetsByType(this.assetType);if(!(!e||!Object.hasOwnProperty.call(e,t)))return e[t]}getAssetIdsByType(t){const e=this.getAssetsByType(t),n=[];return e?Mt.keys(e):n}clearFillOrStroke(t="fill"){const e=this.getAssetsByType(this.assetType),n=Mt.keys(e);let a;for(let u=0,l=n.length;u<l;u++)a=e[n[u]],!(!a||!a.hasAttribute(t))&&(a.removeAttribute(t),t==="stroke"&&a.removeAttribute("stroke-width"));this.clearLegendBy(t)}clearFillOrStrokeByIds(t,e="fill"){const n=this.getAssetsByType(this.assetType),a=Mt.keys(n);let u;for(let l=0,c=a.length;l<c;l++)t!=null&&t.length&&!t.includes(a[l])||(u=n[a[l]],!(!u||!u.hasAttribute(e))&&(u.removeAttribute(e),e==="stroke"&&u.removeAttribute("stroke-width")));this.clearLegendBy(e)}setFillOrStrokeByIds(t,e,n="fill"){const a=this.getAssetsByType(this.assetType),u=Mt.keys(a);let l;for(let c=0,f=u.length;c<f;c++)t.includes(u[c])&&(l=a[u[c]],l&&(l.setAttribute(n,e),n==="stroke"&&l.setAttribute("stroke-width","7"),this.addLegend(n,e,u[c])))}addLegend(t,e,n){let a=this.legend.find(u=>u.color===e);a||(a={type:t,color:e,ids:[]},this.legend.push(a)),a.ids.push(n)}clearLegendBy(t){var e;t||(this.legend.length=0);for(let n=((e=this.legend)==null?void 0:e.length)-1;n>=0;n--)this.legend[n].type===t&&this.legend.splice(n,n)}getLegend(){return this.legend}showSkeleton(){var t;(t=this.skeletonLayers)!=null&&t.length&&(this.chef.updateLayersVisibility(this.defaultLayers,!1),this.chef.updateLayersVisibility(this.skeletonLayers,!0))}hideSkeleton(){var t;(t=this.skeletonLayers)!=null&&t.length&&(this.chef.updateLayersVisibility(this.skeletonLayers,!1),this.chef.updateLayersVisibility(this.defaultLayers,!0))}setAssetLabels(t,e){this.chef.setLabelsById(t,e,this.assetType)}getAssetLabelsMap(t){var a,u;if(!t)return;const e=Ya(t);let n=this.getAssetsByType(e);if(!n||!((a=Object.keys(n))!=null&&a.length)){let l=this.chef.getElementById(e);if(l||(l=this.chef.getElementById(t+"-txt-label")),!l)return;n=this.chef.getElementsMap(l),this.assetsMap[e]=n}if(!(!n||!((u=Object.keys(n))!=null&&u.length)))return n}getAssetLabelById(t,e){var l,c;const n=this.getAssetLabelsMap(t);if(!n)return;let a=n[e];if(a&&((l=a==null?void 0:a.childNodes)!=null&&l.length))return a.childNodes[0].textContent||"";const u="l-"+t+"-"+e;if(a=n[u],a&&((c=a==null?void 0:a.children)!=null&&c.length))return a.children[0].textContent||""}clearAssetLabels(){this.chef.clearAssetLabelsByType(this.assetType)}bindAssetsEvents(t){var a;const e=(a=this.svg)==null?void 0:a.querySelector("#"+t);if(!e)return;e.querySelectorAll("[id]").forEach(u=>{u instanceof SVGElement&&u.addEventListener("click",this.clickSvgElementHandler)})}handleClickSvgElement(t){var e;typeof t.preventDefault=="function"&&t.preventDefault(),console.warn("svgScene.handleClickSvgElement: ",(e=t==null?void 0:t.target)==null?void 0:e.id,t==null?void 0:t.target),this.dispatchEvent({type:"click",data:t})}socialDistanceEnableChanged(t){this.socialDistanceEnable=!!t,t?this.painter.drawSocialDistanceCircles(this.svg):this.painter.clearSocialDistanceCircles(this.svg)}highlightAssets(t,e){var a;this.resetHighlightAssets(t);const n=this.getAssetsByType(t);!n||!((a=Object.keys(n))!=null&&a.length)||(this._lastHighlightType=t,this._lastHighlightIds=Array.isArray(e)?e:[e],this._lastHighlightIds.forEach(u=>{u&&n[u]&&Xs(n[u],"active")}))}resetHighlightAssets(t){var n;const e=this.getAssetsByType(t||this._lastHighlightType);!e||!((n=Object.keys(e))!=null&&n.length)||(this._lastHighlightIds.forEach(a=>{a&&e[a]&&Zs(e[a],"active")}),this._lastHighlightIds.length=0)}getIntersectObjects(t,e=er.RM,n=[]){n.length=0;const a=[],u=this.getAssetsByType(e),l=Mt.keys(u);for(let f=0,d=l.length;f<d;f++){const y=this.chef.getElementBoundingBox(u[l[f]].id);y&&y.containsPoint(t.worldCoords)&&a.push(u[l[f]])}const c=Mt.sortBy(a,f=>{var d;return(d=this.chef.getElementBoundingBox(f.id))==null?void 0:d.getArea()});return n.push(...c),n}clearSelected(){var t,e;if((t=this.selectedList)!=null&&t.length)for(let n=((e=this.selectedList)==null?void 0:e.length)-1;n>=0;n--){let a=this.selectedList[n];this.selectedList.splice(n,1),this.chef.setElementState2selected(a,!1)}}clearSelectedById(t){var n,a;let e=(n=this.selectedList)==null?void 0:n.findIndex(u=>u.getAttribute("id")===t);e>-1&&(this.chef.setElementState2selected(this.selectedList[e],!1),(a=this.selectedList)==null||a.splice(e,1))}selectByIds(t,e=!1){Array.isArray(t)||(t=[t]),e||this.clearSelected();const n=Mt.uniq(Mt.map(this.selectedList,u=>u.getAttribute("id")||"")),a=this.getAssetsByType(this.assetType);for(let u=t.length-1;u>=0;u--)n.includes(t[u])?(this.clearSelectedById(t[u]),t.splice(u,1)):Object.hasOwnProperty.call(a,t[u])&&this.selectedList.push(a[t[u]]);this.selectedList.forEach(u=>{this.chef.setElementState2selected(u,!0)})}getSelectedIds(){var e;if(!((e=this.selectedList)!=null&&e.length))return;const t=[];for(let n=0,a=this.selectedList.length;n<a;n++)this.selectedList[n].id&&t.push(this.selectedList[n].id);return t}getSelectedBoundingBox(){var e;const t=new St;return(e=this.selectedList)!=null&&e.length?(this.selectedList.forEach(n=>{const a=this.chef.boundingBoxMap[n.id];a&&t.expandByBox(a)}),t):t.copy(this.boundingBox)}getElementsByBox(t){const e=[],n=Object.keys(this.chef.boundingBoxMap),a=this.getAssetsByType(this.assetType);for(let u=0,l=n.length;u<l;u++)if(a.hasOwnProperty(n[u])&&!(n[u].indexOf("-assets")>-1)&&t.intersectsBox(this.chef.boundingBoxMap[n[u]])){const c=a[n[u]];c&&e.push(c)}return e}getBoundingBoxById(t){if(this.chef.boundingBoxMap.hasOwnProperty(t))return new St().copy(this.chef.boundingBoxMap[t])}_lastLinkedIds=[];linkAssetsByTree(t){this.chef.linkAssetsByTree(this.assetType,t);const e=this.chef.getElementById(Vs.ASSET_LABELS);e&&(e.style.display="block");const n=Ya(this.assetType),a=this.chef.getElementById(n);a&&(a.style.display="block");const u=this.assetsMap[n];u&&(this._lastLinkedIds.forEach(l=>{u[l]&&(u[l].style.display="none")}),this._lastLinkedIds=hc(t),this._lastLinkedIds.forEach(l=>{u[l]&&(u[l].style.display="block")}))}onBeforeRender(){}fullscreen(t=1e3,e=!1){}update(){}}class a2 extends Yc{name="SvgLoadingScene";constructor(t){super(t),this.bind(`<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 100 100">
|
|
35
35
|
<view id="defaultView" viewBox="0 0 100 100" />
|
|
36
36
|
<style> #svg-loading-fast circle {animation: svg-loading-fast 2s ease infinite;}
|
|
37
37
|
@keyframes svg-loading-fast {
|
|
@@ -49,24 +49,24 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
49
49
|
* Copyright (c) 2016 Jorik Tangelder;
|
|
50
50
|
* Licensed under the MIT license */(function(r){(function(t,e,n,a){var u=["","webkit","Moz","MS","ms","o"],l=e.createElement("div"),c="function",f=Math.round,d=Math.abs,y=Date.now;function A(g,x,b){return setTimeout(z(g,b),x)}function _(g,x,b){return Array.isArray(g)?(C(g,b[x],b),!0):!1}function C(g,x,b){var B;if(g)if(g.forEach)g.forEach(x,b);else if(g.length!==a)for(B=0;B<g.length;)x.call(b,g[B],B,g),B++;else for(B in g)g.hasOwnProperty(B)&&x.call(b,g[B],B,g)}function F(g,x,b){var B="DEPRECATED METHOD: "+x+`
|
|
51
51
|
`+b+` AT
|
|
52
|
-
`;return function(){var G=new Error("get-stack-trace"),K=G&&G.stack?G.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",mt=t.console&&(t.console.warn||t.console.log);return mt&&mt.call(t.console,B,K),g.apply(this,arguments)}}var N;typeof Object.assign!="function"?N=function(x){if(x===a||x===null)throw new TypeError("Cannot convert undefined or null to object");for(var b=Object(x),B=1;B<arguments.length;B++){var G=arguments[B];if(G!==a&&G!==null)for(var K in G)G.hasOwnProperty(K)&&(b[K]=G[K])}return b}:N=Object.assign;var M=F(function(x,b,B){for(var G=Object.keys(b),K=0;K<G.length;)(!B||B&&x[G[K]]===a)&&(x[G[K]]=b[G[K]]),K++;return x},"extend","Use `assign`."),R=F(function(x,b){return M(x,b,!0)},"merge","Use `assign`.");function q(g,x,b){var B=x.prototype,G;G=g.prototype=Object.create(B),G.constructor=g,G._super=B,b&&N(G,b)}function z(g,x){return function(){return g.apply(x,arguments)}}function w(g,x){return typeof g==c?g.apply(x&&x[0]||a,x):g}function L(g,x){return g===a?x:g}function k(g,x,b){C(rt(x),function(B){g.addEventListener(B,b,!1)})}function j(g,x,b){C(rt(x),function(B){g.removeEventListener(B,b,!1)})}function tt(g,x){for(;g;){if(g==x)return!0;g=g.parentNode}return!1}function Z(g,x){return g.indexOf(x)>-1}function rt(g){return g.trim().split(/\s+/g)}function J(g,x,b){if(g.indexOf&&!b)return g.indexOf(x);for(var B=0;B<g.length;){if(b&&g[B][b]==x||!b&&g[B]===x)return B;B++}return-1}function st(g){return Array.prototype.slice.call(g,0)}function ht(g,x,b){for(var B=[],G=[],K=0;K<g.length;){var mt=g[K][x];J(G,mt)<0&&B.push(g[K]),G[K]=mt,K++}return B=B.sort(function(oe,xe){return oe[x]>xe[x]}),B}function ct(g,x){for(var b,B,G=x[0].toUpperCase()+x.slice(1),K=0;K<u.length;){if(b=u[K],B=b?b+G:x,B in g)return B;K++}return a}var ft=1;function O(){return ft++}function yt(g){var x=g.ownerDocument||g;return x.defaultView||x.parentWindow||t}var Bt=/mobile|tablet|ip(ad|hone|od)|android/i,Re="ontouchstart"in t,be=ct(t,"PointerEvent")!==a,se=Re&&Bt.test(navigator.userAgent),ve="touch",qr="pen",Le="mouse",ae="kinect",Se=25,Vt=1,Gt=2,Ct=4,Ht=8,Oe=1,Pe=2,ze=4,Qt=8,Ne=16,me=Pe|ze,Yt=Qt|Ne,ii=me|Yt,Ai=["x","y"],ue=["clientX","clientY"];function Dt(g,x){var b=this;this.manager=g,this.callback=x,this.element=g.element,this.target=g.options.inputTarget,this.domHandler=function(B){w(g.options.enable,[g])&&b.handler(B)},this.init()}Dt.prototype={handler:function(){},init:function(){this.evEl&&k(this.element,this.evEl,this.domHandler),this.evTarget&&k(this.target,this.evTarget,this.domHandler),this.evWin&&k(yt(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&j(this.element,this.evEl,this.domHandler),this.evTarget&&j(this.target,this.evTarget,this.domHandler),this.evWin&&j(yt(this.element),this.evWin,this.domHandler)}};function nr(g){var x,b=g.options.inputClass;return b?x=b:be?x=ar:se?x=Ki:Re?x=ha:x=vt,new x(g,Ge)}function Ge(g,x,b){var B=b.pointers.length,G=b.changedPointers.length,K=x&Vt&&B-G===0,mt=x&(Ct|Ht)&&B-G===0;b.isFirst=!!K,b.isFinal=!!mt,K&&(g.session={}),b.eventType=x,bi(g,b),g.emit("hammer.input",b),g.recognize(b),g.session.prevInput=b}function bi(g,x){var b=g.session,B=x.pointers,G=B.length;b.firstInput||(b.firstInput=sr(x)),G>1&&!b.firstMultiple?b.firstMultiple=sr(x):G===1&&(b.firstMultiple=!1);var K=b.firstInput,mt=b.firstMultiple,Jt=mt?mt.center:K.center,oe=x.center=Ye(B);x.timeStamp=y(),x.deltaTime=x.timeStamp-K.timeStamp,x.angle=wi(Jt,oe),x.distance=ni(Jt,oe),mr(b,x),x.offsetDirection=Xi(x.deltaX,x.deltaY);var xe=Yi(x.deltaTime,x.deltaX,x.deltaY);x.overallVelocityX=xe.x,x.overallVelocityY=xe.y,x.overallVelocity=d(xe.x)>d(xe.y)?xe.x:xe.y,x.scale=mt?P(mt.pointers,B):1,x.rotation=mt?bn(mt.pointers,B):0,x.maxPointers=b.prevInput?x.pointers.length>b.prevInput.maxPointers?x.pointers.length:b.prevInput.maxPointers:x.pointers.length,Gi(b,x);var Ar=g.element;tt(x.srcEvent.target,Ar)&&(Ar=x.srcEvent.target),x.target=Ar}function mr(g,x){var b=x.center,B=g.offsetDelta||{},G=g.prevDelta||{},K=g.prevInput||{};(x.eventType===Vt||K.eventType===Ct)&&(G=g.prevDelta={x:K.deltaX||0,y:K.deltaY||0},B=g.offsetDelta={x:b.x,y:b.y}),x.deltaX=G.x+(b.x-B.x),x.deltaY=G.y+(b.y-B.y)}function Gi(g,x){var b=g.lastInterval||x,B=x.timeStamp-b.timeStamp,G,K,mt,Jt;if(x.eventType!=Ht&&(B>Se||b.velocity===a)){var oe=x.deltaX-b.deltaX,xe=x.deltaY-b.deltaY,Ar=Yi(B,oe,xe);K=Ar.x,mt=Ar.y,G=d(Ar.x)>d(Ar.y)?Ar.x:Ar.y,Jt=Xi(oe,xe),g.lastInterval=x}else G=b.velocity,K=b.velocityX,mt=b.velocityY,Jt=b.direction;x.velocity=G,x.velocityX=K,x.velocityY=mt,x.direction=Jt}function sr(g){for(var x=[],b=0;b<g.pointers.length;)x[b]={clientX:f(g.pointers[b].clientX),clientY:f(g.pointers[b].clientY)},b++;return{timeStamp:y(),pointers:x,center:Ye(x),deltaX:g.deltaX,deltaY:g.deltaY}}function Ye(g){var x=g.length;if(x===1)return{x:f(g[0].clientX),y:f(g[0].clientY)};for(var b=0,B=0,G=0;G<x;)b+=g[G].clientX,B+=g[G].clientY,G++;return{x:f(b/x),y:f(B/x)}}function Yi(g,x,b){return{x:x/g||0,y:b/g||0}}function Xi(g,x){return g===x?Oe:d(g)>=d(x)?g<0?Pe:ze:x<0?Qt:Ne}function ni(g,x,b){b||(b=Ai);var B=x[b[0]]-g[b[0]],G=x[b[1]]-g[b[1]];return Math.sqrt(B*B+G*G)}function wi(g,x,b){b||(b=Ai);var B=x[b[0]]-g[b[0]],G=x[b[1]]-g[b[1]];return Math.atan2(G,B)*180/Math.PI}function bn(g,x){return wi(x[1],x[0],ue)+wi(g[1],g[0],ue)}function P(g,x){return ni(x[0],x[1],ue)/ni(g[0],g[1],ue)}var it={mousedown:Vt,mousemove:Gt,mouseup:Ct},at="mousedown",wt="mousemove mouseup";function vt(){this.evEl=at,this.evWin=wt,this.pressed=!1,Dt.apply(this,arguments)}q(vt,Dt,{handler:function(x){var b=it[x.type];b&Vt&&x.button===0&&(this.pressed=!0),b&Gt&&x.which!==1&&(b=Ct),this.pressed&&(b&Ct&&(this.pressed=!1),this.callback(this.manager,b,{pointers:[x],changedPointers:[x],pointerType:Le,srcEvent:x}))}});var fe={pointerdown:Vt,pointermove:Gt,pointerup:Ct,pointercancel:Ht,pointerout:Ht},Me={2:ve,3:qr,4:Le,5:ae},xr="pointerdown",Zi="pointermove pointerup pointercancel";t.MSPointerEvent&&!t.PointerEvent&&(xr="MSPointerDown",Zi="MSPointerMove MSPointerUp MSPointerCancel");function ar(){this.evEl=xr,this.evWin=Zi,Dt.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}q(ar,Dt,{handler:function(x){var b=this.store,B=!1,G=x.type.toLowerCase().replace("ms",""),K=fe[G],mt=Me[x.pointerType]||x.pointerType,Jt=mt==ve,oe=J(b,x.pointerId,"pointerId");K&Vt&&(x.button===0||Jt)?oe<0&&(b.push(x),oe=b.length-1):K&(Ct|Ht)&&(B=!0),!(oe<0)&&(b[oe]=x,this.callback(this.manager,K,{pointers:b,changedPointers:[x],pointerType:mt,srcEvent:x}),B&&b.splice(oe,1))}});var wn={touchstart:Vt,touchmove:Gt,touchend:Ct,touchcancel:Ht},Qi="touchstart",si="touchstart touchmove touchend touchcancel";function Tn(){this.evTarget=Qi,this.evWin=si,this.started=!1,Dt.apply(this,arguments)}q(Tn,Dt,{handler:function(x){var b=wn[x.type];if(b===Vt&&(this.started=!0),!!this.started){var B=_n.call(this,x,b);b&(Ct|Ht)&&B[0].length-B[1].length===0&&(this.started=!1),this.callback(this.manager,b,{pointers:B[0],changedPointers:B[1],pointerType:ve,srcEvent:x})}}});function _n(g,x){var b=st(g.touches),B=st(g.changedTouches);return x&(Ct|Ht)&&(b=ht(b.concat(B),"identifier")),[b,B]}var ji={touchstart:Vt,touchmove:Gt,touchend:Ct,touchcancel:Ht},el="touchstart touchmove touchend touchcancel";function Ki(){this.evTarget=el,this.targetIds={},Dt.apply(this,arguments)}q(Ki,Dt,{handler:function(x){var b=ji[x.type],B=rl.call(this,x,b);B&&this.callback(this.manager,b,{pointers:B[0],changedPointers:B[1],pointerType:ve,srcEvent:x})}});function rl(g,x){var b=st(g.touches),B=this.targetIds;if(x&(Vt|Gt)&&b.length===1)return B[b[0].identifier]=!0,[b,b];var G,K,mt=st(g.changedTouches),Jt=[],oe=this.target;if(K=b.filter(function(xe){return tt(xe.target,oe)}),x===Vt)for(G=0;G<K.length;)B[K[G].identifier]=!0,G++;for(G=0;G<mt.length;)B[mt[G].identifier]&&Jt.push(mt[G]),x&(Ct|Ht)&&delete B[mt[G].identifier],G++;if(Jt.length)return[ht(K.concat(Jt),"identifier"),Jt]}var la=2500,su=25;function ha(){Dt.apply(this,arguments);var g=z(this.handler,this);this.touch=new Ki(this.manager,g),this.mouse=new vt(this.manager,g),this.primaryTouch=null,this.lastTouches=[]}q(ha,Dt,{handler:function(x,b,B){var G=B.pointerType==ve,K=B.pointerType==Le;if(!(K&&B.sourceCapabilities&&B.sourceCapabilities.firesTouchEvents)){if(G)il.call(this,b,B);else if(K&&nl.call(this,B))return;this.callback(x,b,B)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});function il(g,x){g&Vt?(this.primaryTouch=x.changedPointers[0].identifier,au.call(this,x)):g&(Ct|Ht)&&au.call(this,x)}function au(g){var x=g.changedPointers[0];if(x.identifier===this.primaryTouch){var b={x:x.clientX,y:x.clientY};this.lastTouches.push(b);var B=this.lastTouches,G=function(){var K=B.indexOf(b);K>-1&&B.splice(K,1)};setTimeout(G,la)}}function nl(g){for(var x=g.srcEvent.clientX,b=g.srcEvent.clientY,B=0;B<this.lastTouches.length;B++){var G=this.lastTouches[B],K=Math.abs(x-G.x),mt=Math.abs(b-G.y);if(K<=su&&mt<=su)return!0}return!1}var uu=ct(l.style,"touchAction"),ou=uu!==a,lu="compute",ca="auto",fa="manipulation",Ti="none",Cn="pan-x",Dn="pan-y",os=sl();function pa(g,x){this.manager=g,this.set(x)}pa.prototype={set:function(g){g==lu&&(g=this.compute()),ou&&this.manager.element.style&&os[g]&&(this.manager.element.style[uu]=g),this.actions=g.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var g=[];return C(this.manager.recognizers,function(x){w(x.options.enable,[x])&&(g=g.concat(x.getTouchAction()))}),ls(g.join(" "))},preventDefaults:function(g){var x=g.srcEvent,b=g.offsetDirection;if(this.manager.session.prevented){x.preventDefault();return}var B=this.actions,G=Z(B,Ti)&&!os[Ti],K=Z(B,Dn)&&!os[Dn],mt=Z(B,Cn)&&!os[Cn];if(G){var Jt=g.pointers.length===1,oe=g.distance<2,xe=g.deltaTime<250;if(Jt&&oe&&xe)return}if(!(mt&&K)&&(G||K&&b&me||mt&&b&Yt))return this.preventSrc(x)},preventSrc:function(g){this.manager.session.prevented=!0,g.preventDefault()}};function ls(g){if(Z(g,Ti))return Ti;var x=Z(g,Cn),b=Z(g,Dn);return x&&b?Ti:x||b?x?Cn:Dn:Z(g,fa)?fa:ca}function sl(){if(!ou)return!1;var g={},x=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(b){g[b]=x?t.CSS.supports("touch-action",b):!0}),g}var _i=1,Xe=2,Ji=4,ai=8,Er=ai,tn=16,ur=32;function Wr(g){this.options=N({},this.defaults,g||{}),this.id=O(),this.manager=null,this.options.enable=L(this.options.enable,!0),this.state=_i,this.simultaneous={},this.requireFail=[]}Wr.prototype={defaults:{},set:function(g){return N(this.options,g),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(g){if(_(g,"recognizeWith",this))return this;var x=this.simultaneous;return g=hs(g,this),x[g.id]||(x[g.id]=g,g.recognizeWith(this)),this},dropRecognizeWith:function(g){return _(g,"dropRecognizeWith",this)?this:(g=hs(g,this),delete this.simultaneous[g.id],this)},requireFailure:function(g){if(_(g,"requireFailure",this))return this;var x=this.requireFail;return g=hs(g,this),J(x,g)===-1&&(x.push(g),g.requireFailure(this)),this},dropRequireFailure:function(g){if(_(g,"dropRequireFailure",this))return this;g=hs(g,this);var x=J(this.requireFail,g);return x>-1&&this.requireFail.splice(x,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(g){return!!this.simultaneous[g.id]},emit:function(g){var x=this,b=this.state;function B(G){x.manager.emit(G,g)}b<ai&&B(x.options.event+hu(b)),B(x.options.event),g.additionalEvent&&B(g.additionalEvent),b>=ai&&B(x.options.event+hu(b))},tryEmit:function(g){if(this.canEmit())return this.emit(g);this.state=ur},canEmit:function(){for(var g=0;g<this.requireFail.length;){if(!(this.requireFail[g].state&(ur|_i)))return!1;g++}return!0},recognize:function(g){var x=N({},g);if(!w(this.options.enable,[this,x])){this.reset(),this.state=ur;return}this.state&(Er|tn|ur)&&(this.state=_i),this.state=this.process(x),this.state&(Xe|Ji|ai|tn)&&this.tryEmit(x)},process:function(g){},getTouchAction:function(){},reset:function(){}};function hu(g){return g&tn?"cancel":g&ai?"end":g&Ji?"move":g&Xe?"start":""}function cu(g){return g==Ne?"down":g==Qt?"up":g==Pe?"left":g==ze?"right":""}function hs(g,x){var b=x.manager;return b?b.get(g):g}function Ze(){Wr.apply(this,arguments)}q(Ze,Wr,{defaults:{pointers:1},attrTest:function(g){var x=this.options.pointers;return x===0||g.pointers.length===x},process:function(g){var x=this.state,b=g.eventType,B=x&(Xe|Ji),G=this.attrTest(g);return B&&(b&Ht||!G)?x|tn:B||G?b&Ct?x|ai:x&Xe?x|Ji:Xe:ur}});function Sn(){Ze.apply(this,arguments),this.pX=null,this.pY=null}q(Sn,Ze,{defaults:{event:"pan",threshold:10,pointers:1,direction:ii},getTouchAction:function(){var g=this.options.direction,x=[];return g&me&&x.push(Dn),g&Yt&&x.push(Cn),x},directionTest:function(g){var x=this.options,b=!0,B=g.distance,G=g.direction,K=g.deltaX,mt=g.deltaY;return G&x.direction||(x.direction&me?(G=K===0?Oe:K<0?Pe:ze,b=K!=this.pX,B=Math.abs(g.deltaX)):(G=mt===0?Oe:mt<0?Qt:Ne,b=mt!=this.pY,B=Math.abs(g.deltaY))),g.direction=G,b&&B>x.threshold&&G&x.direction},attrTest:function(g){return Ze.prototype.attrTest.call(this,g)&&(this.state&Xe||!(this.state&Xe)&&this.directionTest(g))},emit:function(g){this.pX=g.deltaX,this.pY=g.deltaY;var x=cu(g.direction);x&&(g.additionalEvent=this.options.event+x),this._super.emit.call(this,g)}});function cs(){Ze.apply(this,arguments)}q(cs,Ze,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Ti]},attrTest:function(g){return this._super.attrTest.call(this,g)&&(Math.abs(g.scale-1)>this.options.threshold||this.state&Xe)},emit:function(g){if(g.scale!==1){var x=g.scale<1?"in":"out";g.additionalEvent=this.options.event+x}this._super.emit.call(this,g)}});function On(){Wr.apply(this,arguments),this._timer=null,this._input=null}q(On,Wr,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[ca]},process:function(g){var x=this.options,b=g.pointers.length===x.pointers,B=g.distance<x.threshold,G=g.deltaTime>x.time;if(this._input=g,!B||!b||g.eventType&(Ct|Ht)&&!G)this.reset();else if(g.eventType&Vt)this.reset(),this._timer=A(function(){this.state=Er,this.tryEmit()},x.time,this);else if(g.eventType&Ct)return Er;return ur},reset:function(){clearTimeout(this._timer)},emit:function(g){this.state===Er&&(g&&g.eventType&Ct?this.manager.emit(this.options.event+"up",g):(this._input.timeStamp=y(),this.manager.emit(this.options.event,this._input)))}});function da(){Ze.apply(this,arguments)}q(da,Ze,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Ti]},attrTest:function(g){return this._super.attrTest.call(this,g)&&(Math.abs(g.rotation)>this.options.threshold||this.state&Xe)}});function fs(){Ze.apply(this,arguments)}q(fs,Ze,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:me|Yt,pointers:1},getTouchAction:function(){return Sn.prototype.getTouchAction.call(this)},attrTest:function(g){var x=this.options.direction,b;return x&(me|Yt)?b=g.overallVelocity:x&me?b=g.overallVelocityX:x&Yt&&(b=g.overallVelocityY),this._super.attrTest.call(this,g)&&x&g.offsetDirection&&g.distance>this.options.threshold&&g.maxPointers==this.options.pointers&&d(b)>this.options.velocity&&g.eventType&Ct},emit:function(g){var x=cu(g.offsetDirection);x&&this.manager.emit(this.options.event+x,g),this.manager.emit(this.options.event,g)}});function Ci(){Wr.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}q(Ci,Wr,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[fa]},process:function(g){var x=this.options,b=g.pointers.length===x.pointers,B=g.distance<x.threshold,G=g.deltaTime<x.time;if(this.reset(),g.eventType&Vt&&this.count===0)return this.failTimeout();if(B&&G&&b){if(g.eventType!=Ct)return this.failTimeout();var K=this.pTime?g.timeStamp-this.pTime<x.interval:!0,mt=!this.pCenter||ni(this.pCenter,g.center)<x.posThreshold;this.pTime=g.timeStamp,this.pCenter=g.center,!mt||!K?this.count=1:this.count+=1,this._input=g;var Jt=this.count%x.taps;if(Jt===0)return this.hasRequireFailures()?(this._timer=A(function(){this.state=Er,this.tryEmit()},x.interval,this),Xe):Er}return ur},failTimeout:function(){return this._timer=A(function(){this.state=ur},this.options.interval,this),ur},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==Er&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}});function Vr(g,x){return x=x||{},x.recognizers=L(x.recognizers,Vr.defaults.preset),new ps(g,x)}Vr.VERSION="2.0.7",Vr.defaults={domEvents:!1,touchAction:lu,enable:!0,inputTarget:null,inputClass:null,preset:[[da,{enable:!1}],[cs,{enable:!1},["rotate"]],[fs,{direction:me}],[Sn,{direction:me},["swipe"]],[Ci],[Ci,{event:"doubletap",taps:2},["tap"]],[On]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var al=1,ga=2;function ps(g,x){this.options=N({},Vr.defaults,x||{}),this.options.inputTarget=this.options.inputTarget||g,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=g,this.input=nr(this),this.touchAction=new pa(this,this.options.touchAction),ds(this,!0),C(this.options.recognizers,function(b){var B=this.add(new b[0](b[1]));b[2]&&B.recognizeWith(b[2]),b[3]&&B.requireFailure(b[3])},this)}ps.prototype={set:function(g){return N(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?ga:al},recognize:function(g){var x=this.session;if(!x.stopped){this.touchAction.preventDefaults(g);var b,B=this.recognizers,G=x.curRecognizer;(!G||G&&G.state&Er)&&(G=x.curRecognizer=null);for(var K=0;K<B.length;)b=B[K],x.stopped!==ga&&(!G||b==G||b.canRecognizeWith(G))?b.recognize(g):b.reset(),!G&&b.state&(Xe|Ji|ai)&&(G=x.curRecognizer=b),K++}},get:function(g){if(g instanceof Wr)return g;for(var x=this.recognizers,b=0;b<x.length;b++)if(x[b].options.event==g)return x[b];return null},add:function(g){if(_(g,"add",this))return this;var x=this.get(g.options.event);return x&&this.remove(x),this.recognizers.push(g),g.manager=this,this.touchAction.update(),g},remove:function(g){if(_(g,"remove",this))return this;if(g=this.get(g),g){var x=this.recognizers,b=J(x,g);b!==-1&&(x.splice(b,1),this.touchAction.update())}return this},on:function(g,x){if(g!==a&&x!==a){var b=this.handlers;return C(rt(g),function(B){b[B]=b[B]||[],b[B].push(x)}),this}},off:function(g,x){if(g!==a){var b=this.handlers;return C(rt(g),function(B){x?b[B]&&b[B].splice(J(b[B],x),1):delete b[B]}),this}},emit:function(g,x){this.options.domEvents&&ul(g,x);var b=this.handlers[g]&&this.handlers[g].slice();if(!(!b||!b.length)){x.type=g,x.preventDefault=function(){x.srcEvent.preventDefault()};for(var B=0;B<b.length;)b[B](x),B++}},destroy:function(){this.element&&ds(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}};function ds(g,x){var b=g.element;if(b.style){var B;C(g.options.cssProps,function(G,K){B=ct(b.style,K),x?(g.oldCssProps[B]=b.style[B],b.style[B]=G):b.style[B]=g.oldCssProps[B]||""}),x||(g.oldCssProps={})}}function ul(g,x){var b=e.createEvent("Event");b.initEvent(g,!0,!0),b.gesture=x,x.target.dispatchEvent(b)}N(Vr,{INPUT_START:Vt,INPUT_MOVE:Gt,INPUT_END:Ct,INPUT_CANCEL:Ht,STATE_POSSIBLE:_i,STATE_BEGAN:Xe,STATE_CHANGED:Ji,STATE_ENDED:ai,STATE_RECOGNIZED:Er,STATE_CANCELLED:tn,STATE_FAILED:ur,DIRECTION_NONE:Oe,DIRECTION_LEFT:Pe,DIRECTION_RIGHT:ze,DIRECTION_UP:Qt,DIRECTION_DOWN:Ne,DIRECTION_HORIZONTAL:me,DIRECTION_VERTICAL:Yt,DIRECTION_ALL:ii,Manager:ps,Input:Dt,TouchAction:pa,TouchInput:Ki,MouseInput:vt,PointerEventInput:ar,TouchMouseInput:ha,SingleTouchInput:Tn,Recognizer:Wr,AttrRecognizer:Ze,Tap:Ci,Pan:Sn,Swipe:fs,Pinch:cs,Rotate:da,Press:On,on:k,off:j,each:C,merge:R,extend:M,assign:N,inherit:q,bindFn:z,prefixed:ct});var fu=typeof t<"u"?t:typeof self<"u"?self:{};fu.Hammer=Vr,r.exports?r.exports=Vr:t[n]=Vr})(window,document,"Hammer")})(Xc);var o2=Xc.exports;const Wi=yh(o2),Zc=new Y,Hr=new Y;class Qc extends Ir{name="orbit-controller.ts";isSvg=!1;dom;domOffset=new Y;camera;hammer;enabled=!0;enablePan=!0;enableRotate=!0;rotateSpeed=1;enableZoom=!0;minZoom=0;maxZoom=1/0;zoomSpeed=1;zoomChanged=!1;distanceStart=1;distanceEnd=1;state=-1;EPS=1e-6;focus=new Y;target=new Y;scaled=1;rotateTheta=0;enableDamping=!1;dampingFactor=.05;mouseButtons={LEFT:2,MIDDLE:1,RIGHT:0};isWheeling=!1;finalTimer;rotateStart=new Y;rotateEnd=new Y;rotateDelta=new Y;panStart=new Y;panEnd=new Y;panOffset=new Y;dollyStart=0;dollyOffset=new Y;contextMenuHandler=this.handleContextMenu.bind(this);wheelHandler=this.handleWheel.bind(this);pointerDownHandler=this.handlePointerDown.bind(this);pointerUpHandler=this.handlePointerUp.bind(this);pointerMoveHandler=this.handlePointerMove.bind(this);pointerOverHandler=Mt.debounce(this.handlePointerOver.bind(this),100);pointerLeaveHandler=this.handlePointerLeave.bind(this);tapHandler=this.handleTap.bind(this);panHandler=this.handlePan.bind(this);pinchHandler=this.handlePinch.bind(this);pressHandler=this.handlePress.bind(this);swipeHandler=this.handleSwipe.bind(this);hammerInputHandler=this.handleHammerInput.bind(this);constructor(t,e,n=!1){super(),this.isSvg=n,this.dom=t,this.camera=e,this.scaled=e.scaled.x;let a=this.dom.getBoundingClientRect();this.domOffset.set(a.left,a.top),this.dom.style.touchAction="none",this.bindEvents()}destroy(){this.unbindEvents(),super.destroy()}update(){Zc.copy(this.camera.position).sub(this.target),this.target.add(this.panOffset),this.camera.position.copy(this.target).add(Zc),this.camera.position.add(this.dollyOffset),this.camera.scaled.set(this.scaled,this.scaled),this.camera.update(),this.panOffset.set(0,0),this.dollyOffset.set(0,0),this.scaled=this.camera.scaled.x,this.dispatchEvent({type:"cameraChanged",data:{t:this.camera.position,r:this.camera.rotation.x,s:this.camera.scaled.x}})}bindEvents(){this.unbindEvents(),this.hammer=new Wi.Manager(this.dom,{domEvents:!0});const t=new Wi.Pan({threshold:0,pointers:0}),e=new Wi.Pinch({threshold:0}),n=new Wi.Tap({event:"singletap",taps:1}),a=new Wi.Press({});this.hammer.add([t,n,a,e]),e.recognizeWith(t),this.hammer.on(["panstart","panmove","panend"].join(" "),this.panHandler),this.hammer.on(["pinchstart","pinchmove","pinchend"].join(" "),this.pinchHandler),this.hammer.on("singletap",this.tapHandler),this.hammer.on("press",this.pressHandler),this.hammer.on("swipe",this.swipeHandler),this.hammer.on("hammer.input",this.hammerInputHandler),this.dom.addEventListener("contextmenu",this.contextMenuHandler),this.dom.addEventListener("wheel",this.wheelHandler,{passive:!1}),this.dom.addEventListener("mousemove",this.pointerOverHandler),this.isSvg||(this.dom.addEventListener("pointerdown",this.pointerDownHandler),this.dom.addEventListener("pointerleave",this.pointerLeaveHandler))}unbindEvents(){var t,e,n,a,u,l,c,f;(t=this.hammer)==null||t.off(["panstart","panmove","panend"].join(" "),this.panHandler),(e=this.hammer)==null||e.off(["pinchstart","pinchmove","pinchend"].join(" "),this.pinchHandler),(n=this.hammer)==null||n.off("singletap",this.tapHandler),(a=this.hammer)==null||a.off("press",this.pressHandler),(u=this.hammer)==null||u.off("swipe",this.swipeHandler),(l=this.hammer)==null||l.off("hammer.input",this.hammerInputHandler),this.dom.removeEventListener("contextmenu",this.contextMenuHandler),this.dom.removeEventListener("wheel",this.wheelHandler),this.dom.removeEventListener("mousemove",this.pointerOverHandler),this.isSvg||(this.dom.removeEventListener("pointerdown",this.pointerDownHandler),this.dom.removeEventListener("pointerleave",this.pointerLeaveHandler)),(c=this.hammer)==null||c.stop(!0),(f=this.hammer)==null||f.destroy()}setFocus(t,e){this.focus.set(t,e).sub(this.domOffset).unproject(this.camera)}handleTap(t){typeof t.preventDefault=="function"&&t.preventDefault(),console.log("【orbitController】Tap: ",t),Hr.set(t.center.x,t.center.y).sub(this.domOffset),this.dispatchEvent({type:"tap",data:{screenCoords:{x:Hr.x,y:Hr.y}},e:t})}handleDoubleTap(t){typeof t.preventDefault=="function"&&t.preventDefault(),console.log("【orbitController】DoubleTap: ",t),Hr.set(t.center.x,t.center.y).sub(this.domOffset),this.dispatchEvent({type:"doubletap",data:{screenCoords:{x:Hr.x,y:Hr.y}}})}handlePress(t){typeof t.preventDefault=="function"&&t.preventDefault(),console.log("【orbitController】Press: ",t)}handlePan(t){var n;if(((n=t.pointers)==null?void 0:n.length)!==1)return;typeof t.preventDefault=="function"&&t.preventDefault();const e={type:"panmove",data:{}};(t.isFirst||t.type==="panstart")&&(this.state=2,this.panStart.set(t.center.x,t.center.y),e.type="panstart"),(t.isFinal||t.type==="panend")&&(this.state=-1,e.type="panend"),this.panEnd.set(t.center.x,t.center.y),this.panOffset.subVectors(this.panEnd,this.panStart).multiplyScalar(-this.camera.scaled.x,-this.camera.scaled.y*(this.camera.flipY?1:-1)),this.panStart.copy(this.panEnd),Hr.set(t.center.x,t.center.y).sub(this.domOffset),e.data.screenCoords=Hr.clone(),this.dispatchEvent(e),this.enablePan&&this.update()}handlePinch(t){typeof t.preventDefault=="function"&&t.preventDefault(),t.type==="pinchstart"&&(this.dollyStart=this.camera.scaled.x,this.state=1),(t.isFinal||t.type==="pinchend")&&(this.state=-1),this.scaled=this.dollyStart*(1/t.scale);let e=(this.scaled-this.camera.scaled.x)/this.camera.scaled.x;this.setFocus(t.center.x,t.center.y),this.dollyOffset.copy(this.camera.position).lerp(this.focus,-e).sub(this.camera.position),this.update()}handleRotate(t){typeof t.preventDefault=="function"&&t.preventDefault()}handleSwipe(t){typeof t.preventDefault=="function"&&t.preventDefault()}handleHammerInput(t){t.isFirst&&(this.state=9),t.isFinal&&(this.state=-1)}handleContextMenu(t){this.enabled&&typeof t.preventDefault=="function"&&t.preventDefault()}handleWheel(t){if(typeof t.preventDefault=="function"&&t.preventDefault(),!this.enabled||!this.enableZoom||this.state!==-1)return;this.isWheeling||(this.dispatchEvent({type:"wheelstart"}),this.isWheeling=!0),typeof t.preventDefault=="function"&&t.preventDefault(),typeof t.stopPropagation=="function"&&t.stopPropagation();let e=t.deltaY;(t==null?void 0:t.deltaMode)===1?e*=16:(t==null?void 0:t.deltaMode)===2&&(e*=100),t!=null&&t.ctrlKey&&(e*=10),this.setFocus(t.clientX,t.clientY);let n=this.getZoomScale(e);e<0?this.onDollyIn(n):e>0?this.onDollyOut(n):(this.scaled=this.camera.scaled.x,this.dollyOffset.set(0,0)),this.update(),clearTimeout(this.finalTimer),this.finalTimer=setTimeout(()=>{this.isWheeling&&(this.dispatchEvent({type:"wheelend"}),this.isWheeling=!1)},500)}onDollyIn(t){this.scaled=Math.max(this.minZoom,Math.min(this.maxZoom,this.camera.scaled.x*t)),this.dollyOffset.copy(this.camera.position).lerp(this.focus,1-t).sub(this.camera.position)}onDollyOut(t){this.scaled=Math.max(this.minZoom,Math.min(this.maxZoom,this.camera.scaled.x/t)),this.dollyOffset.copy(this.camera.position).lerp(this.focus,-1+t).sub(this.camera.position)}getZoomScale(t){return Math.pow(.95,this.zoomSpeed*Math.abs(t*.03))}handlePointerDown(t){if(!this.enabled||t.button!==2)return;this.dom.addEventListener("pointermove",this.pointerMoveHandler),this.dom.addEventListener("pointerup",this.pointerUpHandler);let e=-1;t.button===0?e=this.mouseButtons.LEFT:t.button===1?e=this.mouseButtons.MIDDLE:t.button===2&&(e=this.mouseButtons.RIGHT),e===0&&(this.rotateStart.set(t.clientX,t.clientY),this.setFocus(this.rotateStart.x,this.rotateStart.y),this.state=0)}handlePointerUp(){this.dom.removeEventListener("pointermove",this.pointerMoveHandler),this.dom.removeEventListener("pointerup",this.pointerUpHandler),this.state=-1}handlePointerLeave(){this.state=-1}handlePointerMove(t){if(this.enabled&&this.state===0){if(!this.enableRotate)return;this.onRotate(t.clientX,t.clientY)}}handlePointerOver(t){t.buttons>0||(Hr.set(t.clientX,t.clientY).sub(this.domOffset),this.dispatchEvent({type:"pointerover",data:{screenCoords:{x:Hr.x,y:Hr.y}},e:t}))}onRotate(t,e){this.rotateEnd.set(t,e),this.rotateDelta.subVectors(this.rotateEnd,this.rotateStart).multiplyScalar(this.rotateSpeed);const n=this.rotateDelta.x*Math.PI*2/this.dom.clientHeight;this.rotateTheta-=n,this.rotateStart.copy(this.rotateEnd),this.camera.rotation.x-=this.rotateTheta,this.target.rotateAround(this.focus,-this.rotateTheta),this.camera.position.copy(this.target),this.camera.update(),this.rotateTheta=0}}var _t=(r=>(r.CONTEXTMENU="contextmenu",r.LOSTPOINTERCAPTURE="lostpointercapture",r.MOUSEOVER="mouseover",r.MOUSEOUT="mouseout",r.MOUSELEAVE="mouseleave",r.MOUSEENTER="mouseenter",r.MOUSEMOVE="mousemove",r.MOUSEDOWN="mousedown",r.MOUSEUP="mouseup",r.POINTERMOVE="pointermove",r.POINTERDOWN="pointerdown",r.POINTERUP="pointerup",r.POINTERCANCEL="pointercancel",r.POINTEROUT="pointerout",r.POINTERLEAVE="pointerleave",r.POINTEROVER="pointerover",r.POINTERENTER="pointerenter",r.TOUCHSTART="touchstart",r.TOUCHEND="touchend",r.TOUCHMOVE="touchmove",r.TOUCHCANCEL="touchcancel",r.WHEEL="wheel",r.WHEEL_START="wheelstart",r.WHEEL_END="wheelend",r.MOUSEWHEEL="mousewheel",r.CLICK="click",r.DBLCLICK="dblclick",r.CONTEXT_LOST="contextlost",r.CONTEXT_RESTORED="contextrestored",r.CONTROLS_CHANGED="controlschanged",r.TAP="tap",r.SINGLE_TAP="singletap",r.DOUBLE_TAP="doubletap",r.PRESS="press",r.PAN="pan",r.PAN_START="panstart",r.PAN_MOVE="panmove",r.PAN_END="panend",r.ROTATE="rotate",r.ROTATE_START="rotatestart",r.ROTATE_MOVE="rotatemove",r.ROTATE_END="rotateend",r.PINCH="pinch",r.PINCH_START="pinchstart",r.PINCH_MOVE="pinchmove",r.PINCH_END="pinchend",r.PINCH_IN="pinchin",r.PINCH_OUT="pinchout",r.SWIPE="swipe",r.CHANGE_START="change_start",r.CHANGE_END="change_end",r.CAMERA_CHANGED="cameraChanged",r))(_t||{});const Qs=new Y;class jc extends mc{isCamera=!0;type="Camera2";name="Camera2";params;matrixAutoUpdate=!1;matrixWorldAutoUpdate=!1;projectionMatrix=new re;projectionMatrixInverse=new re;viewMatrix=new re;viewMatrixNeedsUpdate=!0;viewArea=0;left=-1;right=1;top=1;bottom=-1;width=2;height=2;aspect=1;view;constructor(t){super(),this.params=t,this.width=(t==null?void 0:t.width)!==void 0?t.width:2,this.height=(t==null?void 0:t.height)!==void 0?t.height:2,this.aspect=(t==null?void 0:t.aspect)!==void 0?t.aspect:1,(t==null?void 0:t.left)!==void 0&&(this.left=t.left),(t==null?void 0:t.right)!==void 0&&(this.right=t.right),(t==null?void 0:t.top)!==void 0&&(this.top=t.top),(t==null?void 0:t.bottom)!==void 0&&(this.bottom=t.bottom);const e=(this.right+this.left)/2,n=(this.top+this.bottom)/2;if(this.aspect>1){const a=Math.round((this.right-this.left)/2/this.aspect);this.top=n+a,this.bottom=n-a}else if(this.aspect<1){const a=Math.round((this.top-this.bottom)/2*this.aspect);this.left=e-a,this.right=e+a}this.flipY=(t==null?void 0:t.flipY)===!0,this.updateProjectionMatrix(),t!=null&&t.eye&&this.position.fromArray(t.eye),t!=null&&t.up&&this.up.fromArray(t.up),this.computeBoundingBox(),this.update()}destroy(){super.destroy()}get pixelWidth(){return this.scaled.x}set(t=-1,e=1,n=1,a=-1){Qs.set(t+e,a+n).multiplyScalar(.5);const u=Math.max((e-t)/this.width,(n-a)/this.height);this.setTRS(Qs,0,u)}setByBox(t){if(!t||t.isEmpty()){console.error(`setByBox: ${t==null?void 0:t.toString()}`);return}this.set(t.min.x,t.max.x,t.max.y,t.min.y)}setTRS(t={x:0,y:0},e=0,n=0){this.position.set(t.x||0,t.y||0),this.rotation.set(e,e),this.scaled.set(n,n),this.update()}resize(){this.setSize(this.params.width,this.params.height)}setSize(t,e){this.width=t||2,this.height=e||2,this.left=this.params.left||-1,this.right=this.params.right||1,this.top=this.params.top||1,this.bottom=this.params.bottom||-1,this.aspect=t/e;const n=(this.right+this.left)/2,a=(this.top+this.bottom)/2;if(this.aspect>1){const u=Math.round((this.right-this.left)/2/this.aspect);this.top=a+u,this.bottom=a-u}else if(this.aspect<1){const u=Math.round((this.top-this.bottom)/2*this.aspect);this.left=n-u,this.right=n+u}this.updateProjectionMatrix(),this.update()}getWorldDirection(t){this.updateWorldMatrix(!0,!1);const e=this.matrixWorld.elements;return t.set(-e[6],-e[7]).normalize()}getCameraPosition(){return{x:this.position.x,y:this.position.y,z:this.position.z,s:this.scaled.x,r:this.rotation.x}}updateMatrixWorld(t=!1){super.updateMatrixWorld(t),this.updateViewMatrix()}updateProjectionMatrix(){this.parent===void 0&&this.matrixWorldAutoUpdate&&this.updateMatrixWorld(),this.projectionMatrix.makeProjection(this.left,this.right,this.top,this.bottom,this.width,this.height),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}updateViewMatrix(){this.matrixWorldInverse.copy(this.matrixWorld).invert(),this.viewMatrix.multiplyMatrices(this.projectionMatrix,this.matrixWorldInverse)}update(){this.matrixAutoUpdate||this.updateMatrix(),this.updateMatrixWorld(),this.needsUpdate=!0,this.updateBoundingBox(),this.dispatchEvent({type:"update",data:{t:this.position,r:this.rotation.x,s:this.scaled.x}})}computeBoundingBox(){return Qs.set(this.width,this.height).multiplyScalar(.5).multiplyScalar(this.scaled.x),this.boundingBox.min.subVectors(this.position,Qs),this.boundingBox.max.addVectors(this.position,Qs),this.boundingBox}updateBoundingBox(){super.updateBoundingBox(),this.viewArea=this.boundingBoxWorld.getArea()}toJSON(){const t={};return t.left=this.left,t.right=this.right,t.top=this.top,t.bottom=this.bottom,t.width=this.width,t.height=this.height,t.aspect=this.aspect,t.position=this.position.toArray(),t.rotation=this.rotation.toArray(),t.scaled=this.scaled.toArray(),t}fromJSON(t){this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.width=t.width,this.height=t.height,this.aspect=t.aspect,this.position.fromArray(t.position),this.rotation.fromArray(t.rotation),this.scaled.fromArray(t.scaled),this.updateProjectionMatrix(),this.update()}clone(){return new this.constructor.prototype.constructor().copy(this)}copy(t,e=!0){return super.copy(t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this.width=t.width,this.height=t.height,this.aspect=t.aspect,this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this}}var Qa=(r=>(r.UPDATE="update",r))(Qa||{});class Kc extends Ir{name="SvgSelectRect";container;el;constructor(t){super(),t?this.container=t:this.container=document.getElementsByTagName("body")[0],this.el=document.createElement("div"),this.el.setAttribute("id",Kn+"SvgSelectRect"),this.el.setAttribute("class",Kn+"-svg-select-rect"),this.el.style.display="none",this.container.appendChild(this.el)}destroy(){super.destroy(),this.el&&this.el.remove()}draw(t){Jc.copy(t).getSize(Oo),So.copy(Jc.min),this.el.style.display="none",this.el.style.position="absolute",this.el.style.left=So.x+"px",this.el.style.top=So.y+"px",this.el.style.width=Oo.x+"px",this.el.style.height=Oo.y+"px",this.el.style.display="block",this.el.style.background=new Wt(he.darkBlue).setA(.1).getStyle(),this.el.style.border=he.darkBlue+" 1px dashed"}hide(){this.el.style.display="none"}}const Jc=new St,So=new Y,Oo=new Y;class l2 extends Ir{name="SvgMultiSelector";controller;scene;container;p1=new Y;p2=new Y;graph;selectEnable=!1;multiSelectEnable=!1;controllerTapHandler=this.handleControllerTap.bind(this);controllerPanStartHandler=this.handleControllerPanStart.bind(this);controllerPanMoveHandler=this.handleControllerPanMove.bind(this);controllerPanEndHandler=this.handleControllerPanEnd.bind(this);constructor(t,e){super(),this.container=t,this.controller=e,this.graph=new Kc(t),this.bindControllerEvents()}destroy(){this.unbindControllerEvents(),super.destroy()}bindScene(t){this.scene=t}selectEnableChanged(t){var e;(e=this.scene)==null||e.clearSelected(),this.selectEnable=!!t}multiSelectEnableChanged(t){var e;(e=this.scene)==null||e.clearSelected(),this.multiSelectEnable=!!t,this.controller.enablePan=!this.multiSelectEnable}bindControllerEvents(){this.controller.addEventListener(_t.TAP,this.controllerTapHandler),this.controller.addEventListener(_t.PAN_START,this.controllerPanStartHandler),this.controller.addEventListener(_t.PAN_MOVE,this.controllerPanMoveHandler),this.controller.addEventListener(_t.PAN_END,this.controllerPanEndHandler)}unbindControllerEvents(){this.controller.removeEventListener(_t.TAP,this.controllerTapHandler),this.controller.removeEventListener(_t.PAN_START,this.controllerPanStartHandler),this.controller.removeEventListener(_t.PAN_MOVE,this.controllerPanMoveHandler),this.controller.removeEventListener(_t.PAN_END,this.controllerPanEndHandler)}handleControllerTap(t){var n,a,u,l,c,f;if((t==null?void 0:t.type)!==_t.TAP||!this.selectEnable&&!this.multiSelectEnable)return;const e=((n=t==null?void 0:t.e)==null?void 0:n.target)||((u=(a=t==null?void 0:t.e)==null?void 0:a.srcEvent)==null?void 0:u.target)||((c=(l=t==null?void 0:t.e)==null?void 0:l.srcEvent)==null?void 0:c.srcElement);e!=null&&e.id&&(f=this.scene)!=null&&f.isBelongsToAssetType(e==null?void 0:e.id)&&this.dispatchEvent({type:"SELECTED",data:{...t.data,target:[e],selected:[e==null?void 0:e.id]}})}handleControllerPanStart(t){(t==null?void 0:t.type)===_t.PAN_START&&this.multiSelectEnable&&(this.p1.copy(t.data.screenCoords),dn.makeEmpty().expandByPoint(this.p1),this.graph.draw(dn))}handleControllerPanMove(t){(t==null?void 0:t.type)===_t.PAN_MOVE&&this.multiSelectEnable&&(this.p2.copy(t.data.screenCoords),dn.makeEmpty().expandByPoint(this.p1).expandByPoint(this.p2),this.graph.draw(dn))}handleControllerPanEnd(t){var a;if((t==null?void 0:t.type)!==_t.PAN_END||!this.multiSelectEnable)return;this.p2.copy(t.data.screenCoords),dn.makeEmpty().expandByPoint(this.p1).expandByPoint(this.p2).unproject(this.controller.camera);const e=(a=this.scene)==null?void 0:a.getElementsByBox(dn),n=[];(e||[]).forEach(u=>n.push(u.id)),this.graph.hide(),dn.makeEmpty(),this.dispatchEvent({type:"SELECTED",data:{target:e,selected:n}})}}var No=(r=>(r.SELECTED="SELECTED",r))(No||{});const dn=new St;var gn=(r=>(r.DEFAULT="default",r.INFO="info",r.PRIMARY="primary",r.SUCCESS="success",r.WARNING="warning",r.DANGER="danger",r))(gn||{});class h2{camera;screenCoords=new Y;worldCoords=new Y;params={Shape:{},Line:{threshold:1},Points:{threshold:1},Sprite:{}};constructor(){}setFromCamera(t,e){return this.camera=e,this.screenCoords.set(t.x,t.y),this.worldCoords.copy(this.screenCoords).unproject(e),this}intersectObjects(t,e=!0,n=[]){for(let a=0,u=t.length;a<u;a++)this.intersectObject(t[a],e,n)}intersectObject(t,e=!1,n=[]){if(!t.selectable||(t.raycast(this,n),!e||t.composeNode))return n;for(let a=0,u=t.children.length;a<u;a++)this.intersectObject(t.children[a],e,n);return n}}var Ve="top",dr="bottom",gr="right",$e="left",Mo="auto",js=[Ve,dr,gr,$e],Jn="start",Ks="end",c2="clippingParents",tf="viewport",Js="popper",f2="reference",ef=js.reduce(function(r,t){return r.concat([t+"-"+Jn,t+"-"+Ks])},[]),rf=[].concat(js,[Mo]).reduce(function(r,t){return r.concat([t,t+"-"+Jn,t+"-"+Ks])},[]),p2="beforeRead",d2="read",g2="afterRead",y2="beforeMain",v2="main",m2="afterMain",x2="beforeWrite",E2="write",A2="afterWrite",b2=[p2,d2,g2,y2,v2,m2,x2,E2,A2];function Kr(r){return r?(r.nodeName||"").toLowerCase():null}function rr(r){if(r==null)return window;if(r.toString()!=="[object Window]"){var t=r.ownerDocument;return t&&t.defaultView||window}return r}function yn(r){var t=rr(r).Element;return r instanceof t||r instanceof Element}function yr(r){var t=rr(r).HTMLElement;return r instanceof t||r instanceof HTMLElement}function Bo(r){if(typeof ShadowRoot>"u")return!1;var t=rr(r).ShadowRoot;return r instanceof t||r instanceof ShadowRoot}function w2(r){var t=r.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},a=t.attributes[e]||{},u=t.elements[e];!yr(u)||!Kr(u)||(Object.assign(u.style,n),Object.keys(a).forEach(function(l){var c=a[l];c===!1?u.removeAttribute(l):u.setAttribute(l,c===!0?"":c)}))})}function T2(r){var t=r.state,e={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,e.popper),t.styles=e,t.elements.arrow&&Object.assign(t.elements.arrow.style,e.arrow),function(){Object.keys(t.elements).forEach(function(n){var a=t.elements[n],u=t.attributes[n]||{},l=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:e[n]),c=l.reduce(function(f,d){return f[d]="",f},{});!yr(a)||!Kr(a)||(Object.assign(a.style,c),Object.keys(u).forEach(function(f){a.removeAttribute(f)}))})}}const nf={name:"applyStyles",enabled:!0,phase:"write",fn:w2,effect:T2,requires:["computeStyles"]};function Jr(r){return r.split("-")[0]}var vn=Math.max,ja=Math.min,ts=Math.round;function Io(){var r=navigator.userAgentData;return r!=null&&r.brands&&Array.isArray(r.brands)?r.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function sf(){return!/^((?!chrome|android).)*safari/i.test(Io())}function es(r,t,e){t===void 0&&(t=!1),e===void 0&&(e=!1);var n=r.getBoundingClientRect(),a=1,u=1;t&&yr(r)&&(a=r.offsetWidth>0&&ts(n.width)/r.offsetWidth||1,u=r.offsetHeight>0&&ts(n.height)/r.offsetHeight||1);var l=yn(r)?rr(r):window,c=l.visualViewport,f=!sf()&&e,d=(n.left+(f&&c?c.offsetLeft:0))/a,y=(n.top+(f&&c?c.offsetTop:0))/u,A=n.width/a,_=n.height/u;return{width:A,height:_,top:y,right:d+A,bottom:y+_,left:d,x:d,y}}function Ro(r){var t=es(r),e=r.offsetWidth,n=r.offsetHeight;return Math.abs(t.width-e)<=1&&(e=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:r.offsetLeft,y:r.offsetTop,width:e,height:n}}function af(r,t){var e=t.getRootNode&&t.getRootNode();if(r.contains(t))return!0;if(e&&Bo(e)){var n=t;do{if(n&&r.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function xi(r){return rr(r).getComputedStyle(r)}function _2(r){return["table","td","th"].indexOf(Kr(r))>=0}function Vi(r){return((yn(r)?r.ownerDocument:r.document)||window.document).documentElement}function Ka(r){return Kr(r)==="html"?r:r.assignedSlot||r.parentNode||(Bo(r)?r.host:null)||Vi(r)}function uf(r){return!yr(r)||xi(r).position==="fixed"?null:r.offsetParent}function C2(r){var t=/firefox/i.test(Io()),e=/Trident/i.test(Io());if(e&&yr(r)){var n=xi(r);if(n.position==="fixed")return null}var a=Ka(r);for(Bo(a)&&(a=a.host);yr(a)&&["html","body"].indexOf(Kr(a))<0;){var u=xi(a);if(u.transform!=="none"||u.perspective!=="none"||u.contain==="paint"||["transform","perspective"].indexOf(u.willChange)!==-1||t&&u.willChange==="filter"||t&&u.filter&&u.filter!=="none")return a;a=a.parentNode}return null}function ta(r){for(var t=rr(r),e=uf(r);e&&_2(e)&&xi(e).position==="static";)e=uf(e);return e&&(Kr(e)==="html"||Kr(e)==="body"&&xi(e).position==="static")?t:e||C2(r)||t}function Lo(r){return["top","bottom"].indexOf(r)>=0?"x":"y"}function ea(r,t,e){return vn(r,ja(t,e))}function D2(r,t,e){var n=ea(r,t,e);return n>e?e:n}function of(){return{top:0,right:0,bottom:0,left:0}}function lf(r){return Object.assign({},of(),r)}function hf(r,t){return t.reduce(function(e,n){return e[n]=r,e},{})}var S2=function(t,e){return t=typeof t=="function"?t(Object.assign({},e.rects,{placement:e.placement})):t,lf(typeof t!="number"?t:hf(t,js))};function O2(r){var t,e=r.state,n=r.name,a=r.options,u=e.elements.arrow,l=e.modifiersData.popperOffsets,c=Jr(e.placement),f=Lo(c),d=[$e,gr].indexOf(c)>=0,y=d?"height":"width";if(!(!u||!l)){var A=S2(a.padding,e),_=Ro(u),C=f==="y"?Ve:$e,F=f==="y"?dr:gr,N=e.rects.reference[y]+e.rects.reference[f]-l[f]-e.rects.popper[y],M=l[f]-e.rects.reference[f],R=ta(u),q=R?f==="y"?R.clientHeight||0:R.clientWidth||0:0,z=N/2-M/2,w=A[C],L=q-_[y]-A[F],k=q/2-_[y]/2+z,j=ea(w,k,L),tt=f;e.modifiersData[n]=(t={},t[tt]=j,t.centerOffset=j-k,t)}}function N2(r){var t=r.state,e=r.options,n=e.element,a=n===void 0?"[data-popper-arrow]":n;a!=null&&(typeof a=="string"&&(a=t.elements.popper.querySelector(a),!a)||af(t.elements.popper,a)&&(t.elements.arrow=a))}const M2={name:"arrow",enabled:!0,phase:"main",fn:O2,effect:N2,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function rs(r){return r.split("-")[1]}var B2={top:"auto",right:"auto",bottom:"auto",left:"auto"};function I2(r,t){var e=r.x,n=r.y,a=t.devicePixelRatio||1;return{x:ts(e*a)/a||0,y:ts(n*a)/a||0}}function cf(r){var t,e=r.popper,n=r.popperRect,a=r.placement,u=r.variation,l=r.offsets,c=r.position,f=r.gpuAcceleration,d=r.adaptive,y=r.roundOffsets,A=r.isFixed,_=l.x,C=_===void 0?0:_,F=l.y,N=F===void 0?0:F,M=typeof y=="function"?y({x:C,y:N}):{x:C,y:N};C=M.x,N=M.y;var R=l.hasOwnProperty("x"),q=l.hasOwnProperty("y"),z=$e,w=Ve,L=window;if(d){var k=ta(e),j="clientHeight",tt="clientWidth";if(k===rr(e)&&(k=Vi(e),xi(k).position!=="static"&&c==="absolute"&&(j="scrollHeight",tt="scrollWidth")),k=k,a===Ve||(a===$e||a===gr)&&u===Ks){w=dr;var Z=A&&k===L&&L.visualViewport?L.visualViewport.height:k[j];N-=Z-n.height,N*=f?1:-1}if(a===$e||(a===Ve||a===dr)&&u===Ks){z=gr;var rt=A&&k===L&&L.visualViewport?L.visualViewport.width:k[tt];C-=rt-n.width,C*=f?1:-1}}var J=Object.assign({position:c},d&&B2),st=y===!0?I2({x:C,y:N},rr(e)):{x:C,y:N};if(C=st.x,N=st.y,f){var ht;return Object.assign({},J,(ht={},ht[w]=q?"0":"",ht[z]=R?"0":"",ht.transform=(L.devicePixelRatio||1)<=1?"translate("+C+"px, "+N+"px)":"translate3d("+C+"px, "+N+"px, 0)",ht))}return Object.assign({},J,(t={},t[w]=q?N+"px":"",t[z]=R?C+"px":"",t.transform="",t))}function R2(r){var t=r.state,e=r.options,n=e.gpuAcceleration,a=n===void 0?!0:n,u=e.adaptive,l=u===void 0?!0:u,c=e.roundOffsets,f=c===void 0?!0:c,d={placement:Jr(t.placement),variation:rs(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:a,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,cf(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:l,roundOffsets:f})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,cf(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:f})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const L2={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:R2,data:{}};var Ja={passive:!0};function P2(r){var t=r.state,e=r.instance,n=r.options,a=n.scroll,u=a===void 0?!0:a,l=n.resize,c=l===void 0?!0:l,f=rr(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return u&&d.forEach(function(y){y.addEventListener("scroll",e.update,Ja)}),c&&f.addEventListener("resize",e.update,Ja),function(){u&&d.forEach(function(y){y.removeEventListener("scroll",e.update,Ja)}),c&&f.removeEventListener("resize",e.update,Ja)}}const F2={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:P2,data:{}};var U2={left:"right",right:"left",bottom:"top",top:"bottom"};function tu(r){return r.replace(/left|right|bottom|top/g,function(t){return U2[t]})}var k2={start:"end",end:"start"};function ff(r){return r.replace(/start|end/g,function(t){return k2[t]})}function Po(r){var t=rr(r),e=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:e,scrollTop:n}}function Fo(r){return es(Vi(r)).left+Po(r).scrollLeft}function H2(r,t){var e=rr(r),n=Vi(r),a=e.visualViewport,u=n.clientWidth,l=n.clientHeight,c=0,f=0;if(a){u=a.width,l=a.height;var d=sf();(d||!d&&t==="fixed")&&(c=a.offsetLeft,f=a.offsetTop)}return{width:u,height:l,x:c+Fo(r),y:f}}function q2(r){var t,e=Vi(r),n=Po(r),a=(t=r.ownerDocument)==null?void 0:t.body,u=vn(e.scrollWidth,e.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),l=vn(e.scrollHeight,e.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0),c=-n.scrollLeft+Fo(r),f=-n.scrollTop;return xi(a||e).direction==="rtl"&&(c+=vn(e.clientWidth,a?a.clientWidth:0)-u),{width:u,height:l,x:c,y:f}}function Uo(r){var t=xi(r),e=t.overflow,n=t.overflowX,a=t.overflowY;return/auto|scroll|overlay|hidden/.test(e+a+n)}function pf(r){return["html","body","#document"].indexOf(Kr(r))>=0?r.ownerDocument.body:yr(r)&&Uo(r)?r:pf(Ka(r))}function ra(r,t){var e;t===void 0&&(t=[]);var n=pf(r),a=n===((e=r.ownerDocument)==null?void 0:e.body),u=rr(n),l=a?[u].concat(u.visualViewport||[],Uo(n)?n:[]):n,c=t.concat(l);return a?c:c.concat(ra(Ka(l)))}function ko(r){return Object.assign({},r,{left:r.x,top:r.y,right:r.x+r.width,bottom:r.y+r.height})}function W2(r,t){var e=es(r,!1,t==="fixed");return e.top=e.top+r.clientTop,e.left=e.left+r.clientLeft,e.bottom=e.top+r.clientHeight,e.right=e.left+r.clientWidth,e.width=r.clientWidth,e.height=r.clientHeight,e.x=e.left,e.y=e.top,e}function df(r,t,e){return t===tf?ko(H2(r,e)):yn(t)?W2(t,e):ko(q2(Vi(r)))}function V2(r){var t=ra(Ka(r)),e=["absolute","fixed"].indexOf(xi(r).position)>=0,n=e&&yr(r)?ta(r):r;return yn(n)?t.filter(function(a){return yn(a)&&af(a,n)&&Kr(a)!=="body"}):[]}function $2(r,t,e,n){var a=t==="clippingParents"?V2(r):[].concat(t),u=[].concat(a,[e]),l=u[0],c=u.reduce(function(f,d){var y=df(r,d,n);return f.top=vn(y.top,f.top),f.right=ja(y.right,f.right),f.bottom=ja(y.bottom,f.bottom),f.left=vn(y.left,f.left),f},df(r,l,n));return c.width=c.right-c.left,c.height=c.bottom-c.top,c.x=c.left,c.y=c.top,c}function gf(r){var t=r.reference,e=r.element,n=r.placement,a=n?Jr(n):null,u=n?rs(n):null,l=t.x+t.width/2-e.width/2,c=t.y+t.height/2-e.height/2,f;switch(a){case Ve:f={x:l,y:t.y-e.height};break;case dr:f={x:l,y:t.y+t.height};break;case gr:f={x:t.x+t.width,y:c};break;case $e:f={x:t.x-e.width,y:c};break;default:f={x:t.x,y:t.y}}var d=a?Lo(a):null;if(d!=null){var y=d==="y"?"height":"width";switch(u){case Jn:f[d]=f[d]-(t[y]/2-e[y]/2);break;case Ks:f[d]=f[d]+(t[y]/2-e[y]/2);break}}return f}function ia(r,t){t===void 0&&(t={});var e=t,n=e.placement,a=n===void 0?r.placement:n,u=e.strategy,l=u===void 0?r.strategy:u,c=e.boundary,f=c===void 0?c2:c,d=e.rootBoundary,y=d===void 0?tf:d,A=e.elementContext,_=A===void 0?Js:A,C=e.altBoundary,F=C===void 0?!1:C,N=e.padding,M=N===void 0?0:N,R=lf(typeof M!="number"?M:hf(M,js)),q=_===Js?f2:Js,z=r.rects.popper,w=r.elements[F?q:_],L=$2(yn(w)?w:w.contextElement||Vi(r.elements.popper),f,y,l),k=es(r.elements.reference),j=gf({reference:k,element:z,strategy:"absolute",placement:a}),tt=ko(Object.assign({},z,j)),Z=_===Js?tt:k,rt={top:L.top-Z.top+R.top,bottom:Z.bottom-L.bottom+R.bottom,left:L.left-Z.left+R.left,right:Z.right-L.right+R.right},J=r.modifiersData.offset;if(_===Js&&J){var st=J[a];Object.keys(rt).forEach(function(ht){var ct=[gr,dr].indexOf(ht)>=0?1:-1,ft=[Ve,dr].indexOf(ht)>=0?"y":"x";rt[ht]+=st[ft]*ct})}return rt}function z2(r,t){t===void 0&&(t={});var e=t,n=e.placement,a=e.boundary,u=e.rootBoundary,l=e.padding,c=e.flipVariations,f=e.allowedAutoPlacements,d=f===void 0?rf:f,y=rs(n),A=y?c?ef:ef.filter(function(F){return rs(F)===y}):js,_=A.filter(function(F){return d.indexOf(F)>=0});_.length===0&&(_=A);var C=_.reduce(function(F,N){return F[N]=ia(r,{placement:N,boundary:a,rootBoundary:u,padding:l})[Jr(N)],F},{});return Object.keys(C).sort(function(F,N){return C[F]-C[N]})}function G2(r){if(Jr(r)===Mo)return[];var t=tu(r);return[ff(r),t,ff(t)]}function Y2(r){var t=r.state,e=r.options,n=r.name;if(!t.modifiersData[n]._skip){for(var a=e.mainAxis,u=a===void 0?!0:a,l=e.altAxis,c=l===void 0?!0:l,f=e.fallbackPlacements,d=e.padding,y=e.boundary,A=e.rootBoundary,_=e.altBoundary,C=e.flipVariations,F=C===void 0?!0:C,N=e.allowedAutoPlacements,M=t.options.placement,R=Jr(M),q=R===M,z=f||(q||!F?[tu(M)]:G2(M)),w=[M].concat(z).reduce(function(Le,ae){return Le.concat(Jr(ae)===Mo?z2(t,{placement:ae,boundary:y,rootBoundary:A,padding:d,flipVariations:F,allowedAutoPlacements:N}):ae)},[]),L=t.rects.reference,k=t.rects.popper,j=new Map,tt=!0,Z=w[0],rt=0;rt<w.length;rt++){var J=w[rt],st=Jr(J),ht=rs(J)===Jn,ct=[Ve,dr].indexOf(st)>=0,ft=ct?"width":"height",O=ia(t,{placement:J,boundary:y,rootBoundary:A,altBoundary:_,padding:d}),yt=ct?ht?gr:$e:ht?dr:Ve;L[ft]>k[ft]&&(yt=tu(yt));var Bt=tu(yt),Re=[];if(u&&Re.push(O[st]<=0),c&&Re.push(O[yt]<=0,O[Bt]<=0),Re.every(function(Le){return Le})){Z=J,tt=!1;break}j.set(J,Re)}if(tt)for(var be=F?3:1,se=function(ae){var Se=w.find(function(Vt){var Gt=j.get(Vt);if(Gt)return Gt.slice(0,ae).every(function(Ct){return Ct})});if(Se)return Z=Se,"break"},ve=be;ve>0;ve--){var qr=se(ve);if(qr==="break")break}t.placement!==Z&&(t.modifiersData[n]._skip=!0,t.placement=Z,t.reset=!0)}}const X2={name:"flip",enabled:!0,phase:"main",fn:Y2,requiresIfExists:["offset"],data:{_skip:!1}};function yf(r,t,e){return e===void 0&&(e={x:0,y:0}),{top:r.top-t.height-e.y,right:r.right-t.width+e.x,bottom:r.bottom-t.height+e.y,left:r.left-t.width-e.x}}function vf(r){return[Ve,gr,dr,$e].some(function(t){return r[t]>=0})}function Z2(r){var t=r.state,e=r.name,n=t.rects.reference,a=t.rects.popper,u=t.modifiersData.preventOverflow,l=ia(t,{elementContext:"reference"}),c=ia(t,{altBoundary:!0}),f=yf(l,n),d=yf(c,a,u),y=vf(f),A=vf(d);t.modifiersData[e]={referenceClippingOffsets:f,popperEscapeOffsets:d,isReferenceHidden:y,hasPopperEscaped:A},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":y,"data-popper-escaped":A})}const Q2={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Z2};function j2(r,t,e){var n=Jr(r),a=[$e,Ve].indexOf(n)>=0?-1:1,u=typeof e=="function"?e(Object.assign({},t,{placement:r})):e,l=u[0],c=u[1];return l=l||0,c=(c||0)*a,[$e,gr].indexOf(n)>=0?{x:c,y:l}:{x:l,y:c}}function K2(r){var t=r.state,e=r.options,n=r.name,a=e.offset,u=a===void 0?[0,0]:a,l=rf.reduce(function(y,A){return y[A]=j2(A,t.rects,u),y},{}),c=l[t.placement],f=c.x,d=c.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=f,t.modifiersData.popperOffsets.y+=d),t.modifiersData[n]=l}const J2={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:K2};function ty(r){var t=r.state,e=r.name;t.modifiersData[e]=gf({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const ey={name:"popperOffsets",enabled:!0,phase:"read",fn:ty,data:{}};function ry(r){return r==="x"?"y":"x"}function iy(r){var t=r.state,e=r.options,n=r.name,a=e.mainAxis,u=a===void 0?!0:a,l=e.altAxis,c=l===void 0?!1:l,f=e.boundary,d=e.rootBoundary,y=e.altBoundary,A=e.padding,_=e.tether,C=_===void 0?!0:_,F=e.tetherOffset,N=F===void 0?0:F,M=ia(t,{boundary:f,rootBoundary:d,padding:A,altBoundary:y}),R=Jr(t.placement),q=rs(t.placement),z=!q,w=Lo(R),L=ry(w),k=t.modifiersData.popperOffsets,j=t.rects.reference,tt=t.rects.popper,Z=typeof N=="function"?N(Object.assign({},t.rects,{placement:t.placement})):N,rt=typeof Z=="number"?{mainAxis:Z,altAxis:Z}:Object.assign({mainAxis:0,altAxis:0},Z),J=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,st={x:0,y:0};if(k){if(u){var ht,ct=w==="y"?Ve:$e,ft=w==="y"?dr:gr,O=w==="y"?"height":"width",yt=k[w],Bt=yt+M[ct],Re=yt-M[ft],be=C?-tt[O]/2:0,se=q===Jn?j[O]:tt[O],ve=q===Jn?-tt[O]:-j[O],qr=t.elements.arrow,Le=C&&qr?Ro(qr):{width:0,height:0},ae=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:of(),Se=ae[ct],Vt=ae[ft],Gt=ea(0,j[O],Le[O]),Ct=z?j[O]/2-be-Gt-Se-rt.mainAxis:se-Gt-Se-rt.mainAxis,Ht=z?-j[O]/2+be+Gt+Vt+rt.mainAxis:ve+Gt+Vt+rt.mainAxis,Oe=t.elements.arrow&&ta(t.elements.arrow),Pe=Oe?w==="y"?Oe.clientTop||0:Oe.clientLeft||0:0,ze=(ht=J==null?void 0:J[w])!=null?ht:0,Qt=yt+Ct-ze-Pe,Ne=yt+Ht-ze,me=ea(C?ja(Bt,Qt):Bt,yt,C?vn(Re,Ne):Re);k[w]=me,st[w]=me-yt}if(c){var Yt,ii=w==="x"?Ve:$e,Ai=w==="x"?dr:gr,ue=k[L],Dt=L==="y"?"height":"width",nr=ue+M[ii],Ge=ue-M[Ai],bi=[Ve,$e].indexOf(R)!==-1,mr=(Yt=J==null?void 0:J[L])!=null?Yt:0,Gi=bi?nr:ue-j[Dt]-tt[Dt]-mr+rt.altAxis,sr=bi?ue+j[Dt]+tt[Dt]-mr-rt.altAxis:Ge,Ye=C&&bi?D2(Gi,ue,sr):ea(C?Gi:nr,ue,C?sr:Ge);k[L]=Ye,st[L]=Ye-ue}t.modifiersData[n]=st}}const ny={name:"preventOverflow",enabled:!0,phase:"main",fn:iy,requiresIfExists:["offset"]};function sy(r){return{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}}function ay(r){return r===rr(r)||!yr(r)?Po(r):sy(r)}function uy(r){var t=r.getBoundingClientRect(),e=ts(t.width)/r.offsetWidth||1,n=ts(t.height)/r.offsetHeight||1;return e!==1||n!==1}function oy(r,t,e){e===void 0&&(e=!1);var n=yr(t),a=yr(t)&&uy(t),u=Vi(t),l=es(r,a,e),c={scrollLeft:0,scrollTop:0},f={x:0,y:0};return(n||!n&&!e)&&((Kr(t)!=="body"||Uo(u))&&(c=ay(t)),yr(t)?(f=es(t,!0),f.x+=t.clientLeft,f.y+=t.clientTop):u&&(f.x=Fo(u))),{x:l.left+c.scrollLeft-f.x,y:l.top+c.scrollTop-f.y,width:l.width,height:l.height}}function ly(r){var t=new Map,e=new Set,n=[];r.forEach(function(u){t.set(u.name,u)});function a(u){e.add(u.name);var l=[].concat(u.requires||[],u.requiresIfExists||[]);l.forEach(function(c){if(!e.has(c)){var f=t.get(c);f&&a(f)}}),n.push(u)}return r.forEach(function(u){e.has(u.name)||a(u)}),n}function hy(r){var t=ly(r);return b2.reduce(function(e,n){return e.concat(t.filter(function(a){return a.phase===n}))},[])}function cy(r){var t;return function(){return t||(t=new Promise(function(e){Promise.resolve().then(function(){t=void 0,e(r())})})),t}}function fy(r){var t=r.reduce(function(e,n){var a=e[n.name];return e[n.name]=a?Object.assign({},a,n,{options:Object.assign({},a.options,n.options),data:Object.assign({},a.data,n.data)}):n,e},{});return Object.keys(t).map(function(e){return t[e]})}var mf={placement:"bottom",modifiers:[],strategy:"absolute"};function xf(){for(var r=arguments.length,t=new Array(r),e=0;e<r;e++)t[e]=arguments[e];return!t.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function py(r){r===void 0&&(r={});var t=r,e=t.defaultModifiers,n=e===void 0?[]:e,a=t.defaultOptions,u=a===void 0?mf:a;return function(c,f,d){d===void 0&&(d=u);var y={placement:"bottom",orderedModifiers:[],options:Object.assign({},mf,u),modifiersData:{},elements:{reference:c,popper:f},attributes:{},styles:{}},A=[],_=!1,C={state:y,setOptions:function(R){var q=typeof R=="function"?R(y.options):R;N(),y.options=Object.assign({},u,y.options,q),y.scrollParents={reference:yn(c)?ra(c):c.contextElement?ra(c.contextElement):[],popper:ra(f)};var z=hy(fy([].concat(n,y.options.modifiers)));return y.orderedModifiers=z.filter(function(w){return w.enabled}),F(),C.update()},forceUpdate:function(){if(!_){var R=y.elements,q=R.reference,z=R.popper;if(xf(q,z)){y.rects={reference:oy(q,ta(z),y.options.strategy==="fixed"),popper:Ro(z)},y.reset=!1,y.placement=y.options.placement,y.orderedModifiers.forEach(function(rt){return y.modifiersData[rt.name]=Object.assign({},rt.data)});for(var w=0;w<y.orderedModifiers.length;w++){if(y.reset===!0){y.reset=!1,w=-1;continue}var L=y.orderedModifiers[w],k=L.fn,j=L.options,tt=j===void 0?{}:j,Z=L.name;typeof k=="function"&&(y=k({state:y,options:tt,name:Z,instance:C})||y)}}}},update:cy(function(){return new Promise(function(M){C.forceUpdate(),M(y)})}),destroy:function(){N(),_=!0}};if(!xf(c,f))return C;C.setOptions(d).then(function(M){!_&&d.onFirstUpdate&&d.onFirstUpdate(M)});function F(){y.orderedModifiers.forEach(function(M){var R=M.name,q=M.options,z=q===void 0?{}:q,w=M.effect;if(typeof w=="function"){var L=w({state:y,name:R,instance:C,options:z}),k=function(){};A.push(L||k)}})}function N(){A.forEach(function(M){return M()}),A=[]}return C}}var dy=[F2,ey,L2,nf,J2,X2,ny,M2,Q2],gy=py({defaultModifiers:dy}),yy="tippy-box",Ef="tippy-content",vy="tippy-backdrop",Af="tippy-arrow",bf="tippy-svg-arrow",mn={passive:!0,capture:!0},wf=function(){return document.body};function my(r,t){return{}.hasOwnProperty.call(r,t)}function Ho(r,t,e){if(Array.isArray(r)){var n=r[t];return n??(Array.isArray(e)?e[t]:e)}return r}function qo(r,t){var e={}.toString.call(r);return e.indexOf("[object")===0&&e.indexOf(t+"]")>-1}function Tf(r,t){return typeof r=="function"?r.apply(void 0,t):r}function _f(r,t){if(t===0)return r;var e;return function(n){clearTimeout(e),e=setTimeout(function(){r(n)},t)}}function xy(r,t){var e=Object.assign({},r);return t.forEach(function(n){delete e[n]}),e}function Ey(r){return r.split(/\s+/).filter(Boolean)}function is(r){return[].concat(r)}function Cf(r,t){r.indexOf(t)===-1&&r.push(t)}function Ay(r){return r.filter(function(t,e){return r.indexOf(t)===e})}function by(r){return r.split("-")[0]}function eu(r){return[].slice.call(r)}function Df(r){return Object.keys(r).reduce(function(t,e){return r[e]!==void 0&&(t[e]=r[e]),t},{})}function na(){return document.createElement("div")}function sa(r){return["Element","Fragment"].some(function(t){return qo(r,t)})}function wy(r){return qo(r,"NodeList")}function Ty(r){return qo(r,"MouseEvent")}function _y(r){return!!(r&&r._tippy&&r._tippy.reference===r)}function Cy(r){return sa(r)?[r]:wy(r)?eu(r):Array.isArray(r)?r:eu(document.querySelectorAll(r))}function Wo(r,t){r.forEach(function(e){e&&(e.style.transitionDuration=t+"ms")})}function Sf(r,t){r.forEach(function(e){e&&e.setAttribute("data-state",t)})}function Dy(r){var t,e=is(r),n=e[0];return n!=null&&(t=n.ownerDocument)!=null&&t.body?n.ownerDocument:document}function Sy(r,t){var e=t.clientX,n=t.clientY;return r.every(function(a){var u=a.popperRect,l=a.popperState,c=a.props,f=c.interactiveBorder,d=by(l.placement),y=l.modifiersData.offset;if(!y)return!0;var A=d==="bottom"?y.top.y:0,_=d==="top"?y.bottom.y:0,C=d==="right"?y.left.x:0,F=d==="left"?y.right.x:0,N=u.top-n+A>f,M=n-u.bottom-_>f,R=u.left-e+C>f,q=e-u.right-F>f;return N||M||R||q})}function Vo(r,t,e){var n=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(a){r[n](a,e)})}function Of(r,t){for(var e=t;e;){var n;if(r.contains(e))return!0;e=e.getRootNode==null||(n=e.getRootNode())==null?void 0:n.host}return!1}var ti={isTouch:!1},Nf=0;function Oy(){ti.isTouch||(ti.isTouch=!0,window.performance&&document.addEventListener("mousemove",Mf))}function Mf(){var r=performance.now();r-Nf<20&&(ti.isTouch=!1,document.removeEventListener("mousemove",Mf)),Nf=r}function Ny(){var r=document.activeElement;if(_y(r)){var t=r._tippy;r.blur&&!t.state.isVisible&&r.blur()}}function My(){document.addEventListener("touchstart",Oy,mn),window.addEventListener("blur",Ny)}var By=typeof window<"u"&&typeof document<"u",Iy=By?!!window.msCrypto:!1;function ns(r){var t=r==="destroy"?"n already-":" ";return[r+"() was called on a"+t+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function Bf(r){var t=/[ \t]{2,}/g,e=/^[ \t]*/gm;return r.replace(t," ").replace(e,"").trim()}function Ry(r){return Bf(`
|
|
52
|
+
`;return function(){var G=new Error("get-stack-trace"),K=G&&G.stack?G.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",mt=t.console&&(t.console.warn||t.console.log);return mt&&mt.call(t.console,B,K),g.apply(this,arguments)}}var N;typeof Object.assign!="function"?N=function(x){if(x===a||x===null)throw new TypeError("Cannot convert undefined or null to object");for(var b=Object(x),B=1;B<arguments.length;B++){var G=arguments[B];if(G!==a&&G!==null)for(var K in G)G.hasOwnProperty(K)&&(b[K]=G[K])}return b}:N=Object.assign;var M=F(function(x,b,B){for(var G=Object.keys(b),K=0;K<G.length;)(!B||B&&x[G[K]]===a)&&(x[G[K]]=b[G[K]]),K++;return x},"extend","Use `assign`."),R=F(function(x,b){return M(x,b,!0)},"merge","Use `assign`.");function q(g,x,b){var B=x.prototype,G;G=g.prototype=Object.create(B),G.constructor=g,G._super=B,b&&N(G,b)}function z(g,x){return function(){return g.apply(x,arguments)}}function w(g,x){return typeof g==c?g.apply(x&&x[0]||a,x):g}function L(g,x){return g===a?x:g}function k(g,x,b){C(rt(x),function(B){g.addEventListener(B,b,!1)})}function j(g,x,b){C(rt(x),function(B){g.removeEventListener(B,b,!1)})}function tt(g,x){for(;g;){if(g==x)return!0;g=g.parentNode}return!1}function Z(g,x){return g.indexOf(x)>-1}function rt(g){return g.trim().split(/\s+/g)}function J(g,x,b){if(g.indexOf&&!b)return g.indexOf(x);for(var B=0;B<g.length;){if(b&&g[B][b]==x||!b&&g[B]===x)return B;B++}return-1}function st(g){return Array.prototype.slice.call(g,0)}function ht(g,x,b){for(var B=[],G=[],K=0;K<g.length;){var mt=g[K][x];J(G,mt)<0&&B.push(g[K]),G[K]=mt,K++}return B=B.sort(function(oe,xe){return oe[x]>xe[x]}),B}function ct(g,x){for(var b,B,G=x[0].toUpperCase()+x.slice(1),K=0;K<u.length;){if(b=u[K],B=b?b+G:x,B in g)return B;K++}return a}var ft=1;function O(){return ft++}function yt(g){var x=g.ownerDocument||g;return x.defaultView||x.parentWindow||t}var Bt=/mobile|tablet|ip(ad|hone|od)|android/i,Re="ontouchstart"in t,be=ct(t,"PointerEvent")!==a,se=Re&&Bt.test(navigator.userAgent),ve="touch",qr="pen",Le="mouse",ae="kinect",Se=25,Vt=1,Gt=2,Ct=4,Ht=8,Oe=1,Pe=2,ze=4,Qt=8,Ne=16,me=Pe|ze,Yt=Qt|Ne,ii=me|Yt,Ai=["x","y"],ue=["clientX","clientY"];function Dt(g,x){var b=this;this.manager=g,this.callback=x,this.element=g.element,this.target=g.options.inputTarget,this.domHandler=function(B){w(g.options.enable,[g])&&b.handler(B)},this.init()}Dt.prototype={handler:function(){},init:function(){this.evEl&&k(this.element,this.evEl,this.domHandler),this.evTarget&&k(this.target,this.evTarget,this.domHandler),this.evWin&&k(yt(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&j(this.element,this.evEl,this.domHandler),this.evTarget&&j(this.target,this.evTarget,this.domHandler),this.evWin&&j(yt(this.element),this.evWin,this.domHandler)}};function nr(g){var x,b=g.options.inputClass;return b?x=b:be?x=ar:se?x=Ki:Re?x=ha:x=vt,new x(g,Ge)}function Ge(g,x,b){var B=b.pointers.length,G=b.changedPointers.length,K=x&Vt&&B-G===0,mt=x&(Ct|Ht)&&B-G===0;b.isFirst=!!K,b.isFinal=!!mt,K&&(g.session={}),b.eventType=x,bi(g,b),g.emit("hammer.input",b),g.recognize(b),g.session.prevInput=b}function bi(g,x){var b=g.session,B=x.pointers,G=B.length;b.firstInput||(b.firstInput=sr(x)),G>1&&!b.firstMultiple?b.firstMultiple=sr(x):G===1&&(b.firstMultiple=!1);var K=b.firstInput,mt=b.firstMultiple,Jt=mt?mt.center:K.center,oe=x.center=Ye(B);x.timeStamp=y(),x.deltaTime=x.timeStamp-K.timeStamp,x.angle=wi(Jt,oe),x.distance=ni(Jt,oe),mr(b,x),x.offsetDirection=Xi(x.deltaX,x.deltaY);var xe=Yi(x.deltaTime,x.deltaX,x.deltaY);x.overallVelocityX=xe.x,x.overallVelocityY=xe.y,x.overallVelocity=d(xe.x)>d(xe.y)?xe.x:xe.y,x.scale=mt?P(mt.pointers,B):1,x.rotation=mt?bn(mt.pointers,B):0,x.maxPointers=b.prevInput?x.pointers.length>b.prevInput.maxPointers?x.pointers.length:b.prevInput.maxPointers:x.pointers.length,Gi(b,x);var Ar=g.element;tt(x.srcEvent.target,Ar)&&(Ar=x.srcEvent.target),x.target=Ar}function mr(g,x){var b=x.center,B=g.offsetDelta||{},G=g.prevDelta||{},K=g.prevInput||{};(x.eventType===Vt||K.eventType===Ct)&&(G=g.prevDelta={x:K.deltaX||0,y:K.deltaY||0},B=g.offsetDelta={x:b.x,y:b.y}),x.deltaX=G.x+(b.x-B.x),x.deltaY=G.y+(b.y-B.y)}function Gi(g,x){var b=g.lastInterval||x,B=x.timeStamp-b.timeStamp,G,K,mt,Jt;if(x.eventType!=Ht&&(B>Se||b.velocity===a)){var oe=x.deltaX-b.deltaX,xe=x.deltaY-b.deltaY,Ar=Yi(B,oe,xe);K=Ar.x,mt=Ar.y,G=d(Ar.x)>d(Ar.y)?Ar.x:Ar.y,Jt=Xi(oe,xe),g.lastInterval=x}else G=b.velocity,K=b.velocityX,mt=b.velocityY,Jt=b.direction;x.velocity=G,x.velocityX=K,x.velocityY=mt,x.direction=Jt}function sr(g){for(var x=[],b=0;b<g.pointers.length;)x[b]={clientX:f(g.pointers[b].clientX),clientY:f(g.pointers[b].clientY)},b++;return{timeStamp:y(),pointers:x,center:Ye(x),deltaX:g.deltaX,deltaY:g.deltaY}}function Ye(g){var x=g.length;if(x===1)return{x:f(g[0].clientX),y:f(g[0].clientY)};for(var b=0,B=0,G=0;G<x;)b+=g[G].clientX,B+=g[G].clientY,G++;return{x:f(b/x),y:f(B/x)}}function Yi(g,x,b){return{x:x/g||0,y:b/g||0}}function Xi(g,x){return g===x?Oe:d(g)>=d(x)?g<0?Pe:ze:x<0?Qt:Ne}function ni(g,x,b){b||(b=Ai);var B=x[b[0]]-g[b[0]],G=x[b[1]]-g[b[1]];return Math.sqrt(B*B+G*G)}function wi(g,x,b){b||(b=Ai);var B=x[b[0]]-g[b[0]],G=x[b[1]]-g[b[1]];return Math.atan2(G,B)*180/Math.PI}function bn(g,x){return wi(x[1],x[0],ue)+wi(g[1],g[0],ue)}function P(g,x){return ni(x[0],x[1],ue)/ni(g[0],g[1],ue)}var it={mousedown:Vt,mousemove:Gt,mouseup:Ct},at="mousedown",wt="mousemove mouseup";function vt(){this.evEl=at,this.evWin=wt,this.pressed=!1,Dt.apply(this,arguments)}q(vt,Dt,{handler:function(x){var b=it[x.type];b&Vt&&x.button===0&&(this.pressed=!0),b&Gt&&x.which!==1&&(b=Ct),this.pressed&&(b&Ct&&(this.pressed=!1),this.callback(this.manager,b,{pointers:[x],changedPointers:[x],pointerType:Le,srcEvent:x}))}});var fe={pointerdown:Vt,pointermove:Gt,pointerup:Ct,pointercancel:Ht,pointerout:Ht},Me={2:ve,3:qr,4:Le,5:ae},xr="pointerdown",Zi="pointermove pointerup pointercancel";t.MSPointerEvent&&!t.PointerEvent&&(xr="MSPointerDown",Zi="MSPointerMove MSPointerUp MSPointerCancel");function ar(){this.evEl=xr,this.evWin=Zi,Dt.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}q(ar,Dt,{handler:function(x){var b=this.store,B=!1,G=x.type.toLowerCase().replace("ms",""),K=fe[G],mt=Me[x.pointerType]||x.pointerType,Jt=mt==ve,oe=J(b,x.pointerId,"pointerId");K&Vt&&(x.button===0||Jt)?oe<0&&(b.push(x),oe=b.length-1):K&(Ct|Ht)&&(B=!0),!(oe<0)&&(b[oe]=x,this.callback(this.manager,K,{pointers:b,changedPointers:[x],pointerType:mt,srcEvent:x}),B&&b.splice(oe,1))}});var wn={touchstart:Vt,touchmove:Gt,touchend:Ct,touchcancel:Ht},Qi="touchstart",si="touchstart touchmove touchend touchcancel";function Tn(){this.evTarget=Qi,this.evWin=si,this.started=!1,Dt.apply(this,arguments)}q(Tn,Dt,{handler:function(x){var b=wn[x.type];if(b===Vt&&(this.started=!0),!!this.started){var B=_n.call(this,x,b);b&(Ct|Ht)&&B[0].length-B[1].length===0&&(this.started=!1),this.callback(this.manager,b,{pointers:B[0],changedPointers:B[1],pointerType:ve,srcEvent:x})}}});function _n(g,x){var b=st(g.touches),B=st(g.changedTouches);return x&(Ct|Ht)&&(b=ht(b.concat(B),"identifier")),[b,B]}var ji={touchstart:Vt,touchmove:Gt,touchend:Ct,touchcancel:Ht},el="touchstart touchmove touchend touchcancel";function Ki(){this.evTarget=el,this.targetIds={},Dt.apply(this,arguments)}q(Ki,Dt,{handler:function(x){var b=ji[x.type],B=rl.call(this,x,b);B&&this.callback(this.manager,b,{pointers:B[0],changedPointers:B[1],pointerType:ve,srcEvent:x})}});function rl(g,x){var b=st(g.touches),B=this.targetIds;if(x&(Vt|Gt)&&b.length===1)return B[b[0].identifier]=!0,[b,b];var G,K,mt=st(g.changedTouches),Jt=[],oe=this.target;if(K=b.filter(function(xe){return tt(xe.target,oe)}),x===Vt)for(G=0;G<K.length;)B[K[G].identifier]=!0,G++;for(G=0;G<mt.length;)B[mt[G].identifier]&&Jt.push(mt[G]),x&(Ct|Ht)&&delete B[mt[G].identifier],G++;if(Jt.length)return[ht(K.concat(Jt),"identifier"),Jt]}var la=2500,su=25;function ha(){Dt.apply(this,arguments);var g=z(this.handler,this);this.touch=new Ki(this.manager,g),this.mouse=new vt(this.manager,g),this.primaryTouch=null,this.lastTouches=[]}q(ha,Dt,{handler:function(x,b,B){var G=B.pointerType==ve,K=B.pointerType==Le;if(!(K&&B.sourceCapabilities&&B.sourceCapabilities.firesTouchEvents)){if(G)il.call(this,b,B);else if(K&&nl.call(this,B))return;this.callback(x,b,B)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});function il(g,x){g&Vt?(this.primaryTouch=x.changedPointers[0].identifier,au.call(this,x)):g&(Ct|Ht)&&au.call(this,x)}function au(g){var x=g.changedPointers[0];if(x.identifier===this.primaryTouch){var b={x:x.clientX,y:x.clientY};this.lastTouches.push(b);var B=this.lastTouches,G=function(){var K=B.indexOf(b);K>-1&&B.splice(K,1)};setTimeout(G,la)}}function nl(g){for(var x=g.srcEvent.clientX,b=g.srcEvent.clientY,B=0;B<this.lastTouches.length;B++){var G=this.lastTouches[B],K=Math.abs(x-G.x),mt=Math.abs(b-G.y);if(K<=su&&mt<=su)return!0}return!1}var uu=ct(l.style,"touchAction"),ou=uu!==a,lu="compute",ca="auto",fa="manipulation",Ti="none",Cn="pan-x",Dn="pan-y",os=sl();function pa(g,x){this.manager=g,this.set(x)}pa.prototype={set:function(g){g==lu&&(g=this.compute()),ou&&this.manager.element.style&&os[g]&&(this.manager.element.style[uu]=g),this.actions=g.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var g=[];return C(this.manager.recognizers,function(x){w(x.options.enable,[x])&&(g=g.concat(x.getTouchAction()))}),ls(g.join(" "))},preventDefaults:function(g){var x=g.srcEvent,b=g.offsetDirection;if(this.manager.session.prevented){x.preventDefault();return}var B=this.actions,G=Z(B,Ti)&&!os[Ti],K=Z(B,Dn)&&!os[Dn],mt=Z(B,Cn)&&!os[Cn];if(G){var Jt=g.pointers.length===1,oe=g.distance<2,xe=g.deltaTime<250;if(Jt&&oe&&xe)return}if(!(mt&&K)&&(G||K&&b&me||mt&&b&Yt))return this.preventSrc(x)},preventSrc:function(g){this.manager.session.prevented=!0,g.preventDefault()}};function ls(g){if(Z(g,Ti))return Ti;var x=Z(g,Cn),b=Z(g,Dn);return x&&b?Ti:x||b?x?Cn:Dn:Z(g,fa)?fa:ca}function sl(){if(!ou)return!1;var g={},x=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(b){g[b]=x?t.CSS.supports("touch-action",b):!0}),g}var _i=1,Xe=2,Ji=4,ai=8,Er=ai,tn=16,ur=32;function Wr(g){this.options=N({},this.defaults,g||{}),this.id=O(),this.manager=null,this.options.enable=L(this.options.enable,!0),this.state=_i,this.simultaneous={},this.requireFail=[]}Wr.prototype={defaults:{},set:function(g){return N(this.options,g),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(g){if(_(g,"recognizeWith",this))return this;var x=this.simultaneous;return g=hs(g,this),x[g.id]||(x[g.id]=g,g.recognizeWith(this)),this},dropRecognizeWith:function(g){return _(g,"dropRecognizeWith",this)?this:(g=hs(g,this),delete this.simultaneous[g.id],this)},requireFailure:function(g){if(_(g,"requireFailure",this))return this;var x=this.requireFail;return g=hs(g,this),J(x,g)===-1&&(x.push(g),g.requireFailure(this)),this},dropRequireFailure:function(g){if(_(g,"dropRequireFailure",this))return this;g=hs(g,this);var x=J(this.requireFail,g);return x>-1&&this.requireFail.splice(x,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(g){return!!this.simultaneous[g.id]},emit:function(g){var x=this,b=this.state;function B(G){x.manager.emit(G,g)}b<ai&&B(x.options.event+hu(b)),B(x.options.event),g.additionalEvent&&B(g.additionalEvent),b>=ai&&B(x.options.event+hu(b))},tryEmit:function(g){if(this.canEmit())return this.emit(g);this.state=ur},canEmit:function(){for(var g=0;g<this.requireFail.length;){if(!(this.requireFail[g].state&(ur|_i)))return!1;g++}return!0},recognize:function(g){var x=N({},g);if(!w(this.options.enable,[this,x])){this.reset(),this.state=ur;return}this.state&(Er|tn|ur)&&(this.state=_i),this.state=this.process(x),this.state&(Xe|Ji|ai|tn)&&this.tryEmit(x)},process:function(g){},getTouchAction:function(){},reset:function(){}};function hu(g){return g&tn?"cancel":g&ai?"end":g&Ji?"move":g&Xe?"start":""}function cu(g){return g==Ne?"down":g==Qt?"up":g==Pe?"left":g==ze?"right":""}function hs(g,x){var b=x.manager;return b?b.get(g):g}function Ze(){Wr.apply(this,arguments)}q(Ze,Wr,{defaults:{pointers:1},attrTest:function(g){var x=this.options.pointers;return x===0||g.pointers.length===x},process:function(g){var x=this.state,b=g.eventType,B=x&(Xe|Ji),G=this.attrTest(g);return B&&(b&Ht||!G)?x|tn:B||G?b&Ct?x|ai:x&Xe?x|Ji:Xe:ur}});function Sn(){Ze.apply(this,arguments),this.pX=null,this.pY=null}q(Sn,Ze,{defaults:{event:"pan",threshold:10,pointers:1,direction:ii},getTouchAction:function(){var g=this.options.direction,x=[];return g&me&&x.push(Dn),g&Yt&&x.push(Cn),x},directionTest:function(g){var x=this.options,b=!0,B=g.distance,G=g.direction,K=g.deltaX,mt=g.deltaY;return G&x.direction||(x.direction&me?(G=K===0?Oe:K<0?Pe:ze,b=K!=this.pX,B=Math.abs(g.deltaX)):(G=mt===0?Oe:mt<0?Qt:Ne,b=mt!=this.pY,B=Math.abs(g.deltaY))),g.direction=G,b&&B>x.threshold&&G&x.direction},attrTest:function(g){return Ze.prototype.attrTest.call(this,g)&&(this.state&Xe||!(this.state&Xe)&&this.directionTest(g))},emit:function(g){this.pX=g.deltaX,this.pY=g.deltaY;var x=cu(g.direction);x&&(g.additionalEvent=this.options.event+x),this._super.emit.call(this,g)}});function cs(){Ze.apply(this,arguments)}q(cs,Ze,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Ti]},attrTest:function(g){return this._super.attrTest.call(this,g)&&(Math.abs(g.scale-1)>this.options.threshold||this.state&Xe)},emit:function(g){if(g.scale!==1){var x=g.scale<1?"in":"out";g.additionalEvent=this.options.event+x}this._super.emit.call(this,g)}});function On(){Wr.apply(this,arguments),this._timer=null,this._input=null}q(On,Wr,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[ca]},process:function(g){var x=this.options,b=g.pointers.length===x.pointers,B=g.distance<x.threshold,G=g.deltaTime>x.time;if(this._input=g,!B||!b||g.eventType&(Ct|Ht)&&!G)this.reset();else if(g.eventType&Vt)this.reset(),this._timer=A(function(){this.state=Er,this.tryEmit()},x.time,this);else if(g.eventType&Ct)return Er;return ur},reset:function(){clearTimeout(this._timer)},emit:function(g){this.state===Er&&(g&&g.eventType&Ct?this.manager.emit(this.options.event+"up",g):(this._input.timeStamp=y(),this.manager.emit(this.options.event,this._input)))}});function da(){Ze.apply(this,arguments)}q(da,Ze,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Ti]},attrTest:function(g){return this._super.attrTest.call(this,g)&&(Math.abs(g.rotation)>this.options.threshold||this.state&Xe)}});function fs(){Ze.apply(this,arguments)}q(fs,Ze,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:me|Yt,pointers:1},getTouchAction:function(){return Sn.prototype.getTouchAction.call(this)},attrTest:function(g){var x=this.options.direction,b;return x&(me|Yt)?b=g.overallVelocity:x&me?b=g.overallVelocityX:x&Yt&&(b=g.overallVelocityY),this._super.attrTest.call(this,g)&&x&g.offsetDirection&&g.distance>this.options.threshold&&g.maxPointers==this.options.pointers&&d(b)>this.options.velocity&&g.eventType&Ct},emit:function(g){var x=cu(g.offsetDirection);x&&this.manager.emit(this.options.event+x,g),this.manager.emit(this.options.event,g)}});function Ci(){Wr.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}q(Ci,Wr,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[fa]},process:function(g){var x=this.options,b=g.pointers.length===x.pointers,B=g.distance<x.threshold,G=g.deltaTime<x.time;if(this.reset(),g.eventType&Vt&&this.count===0)return this.failTimeout();if(B&&G&&b){if(g.eventType!=Ct)return this.failTimeout();var K=this.pTime?g.timeStamp-this.pTime<x.interval:!0,mt=!this.pCenter||ni(this.pCenter,g.center)<x.posThreshold;this.pTime=g.timeStamp,this.pCenter=g.center,!mt||!K?this.count=1:this.count+=1,this._input=g;var Jt=this.count%x.taps;if(Jt===0)return this.hasRequireFailures()?(this._timer=A(function(){this.state=Er,this.tryEmit()},x.interval,this),Xe):Er}return ur},failTimeout:function(){return this._timer=A(function(){this.state=ur},this.options.interval,this),ur},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==Er&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}});function Vr(g,x){return x=x||{},x.recognizers=L(x.recognizers,Vr.defaults.preset),new ps(g,x)}Vr.VERSION="2.0.7",Vr.defaults={domEvents:!1,touchAction:lu,enable:!0,inputTarget:null,inputClass:null,preset:[[da,{enable:!1}],[cs,{enable:!1},["rotate"]],[fs,{direction:me}],[Sn,{direction:me},["swipe"]],[Ci],[Ci,{event:"doubletap",taps:2},["tap"]],[On]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var al=1,ga=2;function ps(g,x){this.options=N({},Vr.defaults,x||{}),this.options.inputTarget=this.options.inputTarget||g,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=g,this.input=nr(this),this.touchAction=new pa(this,this.options.touchAction),ds(this,!0),C(this.options.recognizers,function(b){var B=this.add(new b[0](b[1]));b[2]&&B.recognizeWith(b[2]),b[3]&&B.requireFailure(b[3])},this)}ps.prototype={set:function(g){return N(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?ga:al},recognize:function(g){var x=this.session;if(!x.stopped){this.touchAction.preventDefaults(g);var b,B=this.recognizers,G=x.curRecognizer;(!G||G&&G.state&Er)&&(G=x.curRecognizer=null);for(var K=0;K<B.length;)b=B[K],x.stopped!==ga&&(!G||b==G||b.canRecognizeWith(G))?b.recognize(g):b.reset(),!G&&b.state&(Xe|Ji|ai)&&(G=x.curRecognizer=b),K++}},get:function(g){if(g instanceof Wr)return g;for(var x=this.recognizers,b=0;b<x.length;b++)if(x[b].options.event==g)return x[b];return null},add:function(g){if(_(g,"add",this))return this;var x=this.get(g.options.event);return x&&this.remove(x),this.recognizers.push(g),g.manager=this,this.touchAction.update(),g},remove:function(g){if(_(g,"remove",this))return this;if(g=this.get(g),g){var x=this.recognizers,b=J(x,g);b!==-1&&(x.splice(b,1),this.touchAction.update())}return this},on:function(g,x){if(g!==a&&x!==a){var b=this.handlers;return C(rt(g),function(B){b[B]=b[B]||[],b[B].push(x)}),this}},off:function(g,x){if(g!==a){var b=this.handlers;return C(rt(g),function(B){x?b[B]&&b[B].splice(J(b[B],x),1):delete b[B]}),this}},emit:function(g,x){this.options.domEvents&&ul(g,x);var b=this.handlers[g]&&this.handlers[g].slice();if(!(!b||!b.length)){x.type=g,x.preventDefault=function(){x.srcEvent.preventDefault()};for(var B=0;B<b.length;)b[B](x),B++}},destroy:function(){this.element&&ds(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}};function ds(g,x){var b=g.element;if(b.style){var B;C(g.options.cssProps,function(G,K){B=ct(b.style,K),x?(g.oldCssProps[B]=b.style[B],b.style[B]=G):b.style[B]=g.oldCssProps[B]||""}),x||(g.oldCssProps={})}}function ul(g,x){var b=e.createEvent("Event");b.initEvent(g,!0,!0),b.gesture=x,x.target.dispatchEvent(b)}N(Vr,{INPUT_START:Vt,INPUT_MOVE:Gt,INPUT_END:Ct,INPUT_CANCEL:Ht,STATE_POSSIBLE:_i,STATE_BEGAN:Xe,STATE_CHANGED:Ji,STATE_ENDED:ai,STATE_RECOGNIZED:Er,STATE_CANCELLED:tn,STATE_FAILED:ur,DIRECTION_NONE:Oe,DIRECTION_LEFT:Pe,DIRECTION_RIGHT:ze,DIRECTION_UP:Qt,DIRECTION_DOWN:Ne,DIRECTION_HORIZONTAL:me,DIRECTION_VERTICAL:Yt,DIRECTION_ALL:ii,Manager:ps,Input:Dt,TouchAction:pa,TouchInput:Ki,MouseInput:vt,PointerEventInput:ar,TouchMouseInput:ha,SingleTouchInput:Tn,Recognizer:Wr,AttrRecognizer:Ze,Tap:Ci,Pan:Sn,Swipe:fs,Pinch:cs,Rotate:da,Press:On,on:k,off:j,each:C,merge:R,extend:M,assign:N,inherit:q,bindFn:z,prefixed:ct});var fu=typeof t<"u"?t:typeof self<"u"?self:{};fu.Hammer=Vr,r.exports?r.exports=Vr:t[n]=Vr})(window,document,"Hammer")})(Xc);var u2=Xc.exports;const Wi=yh(u2),Zc=new Y,Hr=new Y;class Qc extends Ir{name="orbit-controller.ts";isSvg=!1;dom;domOffset=new Y;camera;hammer;enabled=!0;enablePan=!0;enableRotate=!0;rotateSpeed=1;enableZoom=!0;minZoom=0;maxZoom=1/0;zoomSpeed=1;zoomChanged=!1;distanceStart=1;distanceEnd=1;state=-1;EPS=1e-6;focus=new Y;target=new Y;scaled=1;rotateTheta=0;enableDamping=!1;dampingFactor=.05;mouseButtons={LEFT:2,MIDDLE:1,RIGHT:0};isWheeling=!1;finalTimer;rotateStart=new Y;rotateEnd=new Y;rotateDelta=new Y;panStart=new Y;panEnd=new Y;panOffset=new Y;dollyStart=0;dollyOffset=new Y;contextMenuHandler=this.handleContextMenu.bind(this);wheelHandler=this.handleWheel.bind(this);pointerDownHandler=this.handlePointerDown.bind(this);pointerUpHandler=this.handlePointerUp.bind(this);pointerMoveHandler=this.handlePointerMove.bind(this);pointerOverHandler=Mt.debounce(this.handlePointerOver.bind(this),100);pointerLeaveHandler=this.handlePointerLeave.bind(this);tapHandler=this.handleTap.bind(this);panHandler=this.handlePan.bind(this);pinchHandler=this.handlePinch.bind(this);pressHandler=this.handlePress.bind(this);swipeHandler=this.handleSwipe.bind(this);hammerInputHandler=this.handleHammerInput.bind(this);constructor(t,e,n=!1){super(),this.isSvg=n,this.dom=t,this.camera=e,this.scaled=e.scaled.x;let a=this.dom.getBoundingClientRect();this.domOffset.set(a.left,a.top),this.dom.style.touchAction="none",this.bindEvents()}destroy(){this.unbindEvents(),super.destroy()}update(){Zc.copy(this.camera.position).sub(this.target),this.target.add(this.panOffset),this.camera.position.copy(this.target).add(Zc),this.camera.position.add(this.dollyOffset),this.camera.scaled.set(this.scaled,this.scaled),this.camera.update(),this.panOffset.set(0,0),this.dollyOffset.set(0,0),this.scaled=this.camera.scaled.x,this.dispatchEvent({type:"cameraChanged",data:{t:this.camera.position,r:this.camera.rotation.x,s:this.camera.scaled.x}})}bindEvents(){this.unbindEvents(),this.hammer=new Wi.Manager(this.dom,{domEvents:!0});const t=new Wi.Pan({threshold:0,pointers:0}),e=new Wi.Pinch({threshold:0}),n=new Wi.Tap({event:"singletap",taps:1}),a=new Wi.Press({});this.hammer.add([t,n,a,e]),e.recognizeWith(t),this.hammer.on(["panstart","panmove","panend"].join(" "),this.panHandler),this.hammer.on(["pinchstart","pinchmove","pinchend"].join(" "),this.pinchHandler),this.hammer.on("singletap",this.tapHandler),this.hammer.on("press",this.pressHandler),this.hammer.on("swipe",this.swipeHandler),this.hammer.on("hammer.input",this.hammerInputHandler),this.dom.addEventListener("contextmenu",this.contextMenuHandler),this.dom.addEventListener("wheel",this.wheelHandler,{passive:!1}),this.dom.addEventListener("mousemove",this.pointerOverHandler),this.isSvg||(this.dom.addEventListener("pointerdown",this.pointerDownHandler),this.dom.addEventListener("pointerleave",this.pointerLeaveHandler))}unbindEvents(){var t,e,n,a,u,l,c,f;(t=this.hammer)==null||t.off(["panstart","panmove","panend"].join(" "),this.panHandler),(e=this.hammer)==null||e.off(["pinchstart","pinchmove","pinchend"].join(" "),this.pinchHandler),(n=this.hammer)==null||n.off("singletap",this.tapHandler),(a=this.hammer)==null||a.off("press",this.pressHandler),(u=this.hammer)==null||u.off("swipe",this.swipeHandler),(l=this.hammer)==null||l.off("hammer.input",this.hammerInputHandler),this.dom.removeEventListener("contextmenu",this.contextMenuHandler),this.dom.removeEventListener("wheel",this.wheelHandler),this.dom.removeEventListener("mousemove",this.pointerOverHandler),this.isSvg||(this.dom.removeEventListener("pointerdown",this.pointerDownHandler),this.dom.removeEventListener("pointerleave",this.pointerLeaveHandler)),(c=this.hammer)==null||c.stop(!0),(f=this.hammer)==null||f.destroy()}setFocus(t,e){this.focus.set(t,e).sub(this.domOffset).unproject(this.camera)}handleTap(t){typeof t.preventDefault=="function"&&t.preventDefault(),console.log("【orbitController】Tap: ",t),Hr.set(t.center.x,t.center.y).sub(this.domOffset),this.dispatchEvent({type:"tap",data:{screenCoords:{x:Hr.x,y:Hr.y}},e:t})}handleDoubleTap(t){typeof t.preventDefault=="function"&&t.preventDefault(),console.log("【orbitController】DoubleTap: ",t),Hr.set(t.center.x,t.center.y).sub(this.domOffset),this.dispatchEvent({type:"doubletap",data:{screenCoords:{x:Hr.x,y:Hr.y}}})}handlePress(t){typeof t.preventDefault=="function"&&t.preventDefault(),console.log("【orbitController】Press: ",t)}handlePan(t){var n;if(((n=t.pointers)==null?void 0:n.length)!==1)return;typeof t.preventDefault=="function"&&t.preventDefault();const e={type:"panmove",data:{}};(t.isFirst||t.type==="panstart")&&(this.state=2,this.panStart.set(t.center.x,t.center.y),e.type="panstart"),(t.isFinal||t.type==="panend")&&(this.state=-1,e.type="panend"),this.panEnd.set(t.center.x,t.center.y),this.panOffset.subVectors(this.panEnd,this.panStart).multiplyScalar(-this.camera.scaled.x,-this.camera.scaled.y*(this.camera.flipY?1:-1)),this.panStart.copy(this.panEnd),Hr.set(t.center.x,t.center.y).sub(this.domOffset),e.data.screenCoords=Hr.clone(),this.dispatchEvent(e),this.enablePan&&this.update()}handlePinch(t){typeof t.preventDefault=="function"&&t.preventDefault(),t.type==="pinchstart"&&(this.dollyStart=this.camera.scaled.x,this.state=1),(t.isFinal||t.type==="pinchend")&&(this.state=-1),this.scaled=this.dollyStart*(1/t.scale);let e=(this.scaled-this.camera.scaled.x)/this.camera.scaled.x;this.setFocus(t.center.x,t.center.y),this.dollyOffset.copy(this.camera.position).lerp(this.focus,-e).sub(this.camera.position),this.update()}handleRotate(t){typeof t.preventDefault=="function"&&t.preventDefault()}handleSwipe(t){typeof t.preventDefault=="function"&&t.preventDefault()}handleHammerInput(t){t.isFirst&&(this.state=9),t.isFinal&&(this.state=-1)}handleContextMenu(t){this.enabled&&typeof t.preventDefault=="function"&&t.preventDefault()}handleWheel(t){if(typeof t.preventDefault=="function"&&t.preventDefault(),!this.enabled||!this.enableZoom||this.state!==-1)return;this.isWheeling||(this.dispatchEvent({type:"wheelstart"}),this.isWheeling=!0),typeof t.preventDefault=="function"&&t.preventDefault(),typeof t.stopPropagation=="function"&&t.stopPropagation();let e=t.deltaY;(t==null?void 0:t.deltaMode)===1?e*=16:(t==null?void 0:t.deltaMode)===2&&(e*=100),t!=null&&t.ctrlKey&&(e*=10),this.setFocus(t.clientX,t.clientY);let n=this.getZoomScale(e);e<0?this.onDollyIn(n):e>0?this.onDollyOut(n):(this.scaled=this.camera.scaled.x,this.dollyOffset.set(0,0)),this.update(),clearTimeout(this.finalTimer),this.finalTimer=setTimeout(()=>{this.isWheeling&&(this.dispatchEvent({type:"wheelend"}),this.isWheeling=!1)},500)}onDollyIn(t){this.scaled=Math.max(this.minZoom,Math.min(this.maxZoom,this.camera.scaled.x*t)),this.dollyOffset.copy(this.camera.position).lerp(this.focus,1-t).sub(this.camera.position)}onDollyOut(t){this.scaled=Math.max(this.minZoom,Math.min(this.maxZoom,this.camera.scaled.x/t)),this.dollyOffset.copy(this.camera.position).lerp(this.focus,-1+t).sub(this.camera.position)}getZoomScale(t){return Math.pow(.95,this.zoomSpeed*Math.abs(t*.03))}handlePointerDown(t){if(!this.enabled||t.button!==2)return;this.dom.addEventListener("pointermove",this.pointerMoveHandler),this.dom.addEventListener("pointerup",this.pointerUpHandler);let e=-1;t.button===0?e=this.mouseButtons.LEFT:t.button===1?e=this.mouseButtons.MIDDLE:t.button===2&&(e=this.mouseButtons.RIGHT),e===0&&(this.rotateStart.set(t.clientX,t.clientY),this.setFocus(this.rotateStart.x,this.rotateStart.y),this.state=0)}handlePointerUp(){this.dom.removeEventListener("pointermove",this.pointerMoveHandler),this.dom.removeEventListener("pointerup",this.pointerUpHandler),this.state=-1}handlePointerLeave(){this.state=-1}handlePointerMove(t){if(this.enabled&&this.state===0){if(!this.enableRotate)return;this.onRotate(t.clientX,t.clientY)}}handlePointerOver(t){t.buttons>0||(Hr.set(t.clientX,t.clientY).sub(this.domOffset),this.dispatchEvent({type:"pointerover",data:{screenCoords:{x:Hr.x,y:Hr.y}},e:t}))}onRotate(t,e){this.rotateEnd.set(t,e),this.rotateDelta.subVectors(this.rotateEnd,this.rotateStart).multiplyScalar(this.rotateSpeed);const n=this.rotateDelta.x*Math.PI*2/this.dom.clientHeight;this.rotateTheta-=n,this.rotateStart.copy(this.rotateEnd),this.camera.rotation.x-=this.rotateTheta,this.target.rotateAround(this.focus,-this.rotateTheta),this.camera.position.copy(this.target),this.camera.update(),this.rotateTheta=0}}var _t=(r=>(r.CONTEXTMENU="contextmenu",r.LOSTPOINTERCAPTURE="lostpointercapture",r.MOUSEOVER="mouseover",r.MOUSEOUT="mouseout",r.MOUSELEAVE="mouseleave",r.MOUSEENTER="mouseenter",r.MOUSEMOVE="mousemove",r.MOUSEDOWN="mousedown",r.MOUSEUP="mouseup",r.POINTERMOVE="pointermove",r.POINTERDOWN="pointerdown",r.POINTERUP="pointerup",r.POINTERCANCEL="pointercancel",r.POINTEROUT="pointerout",r.POINTERLEAVE="pointerleave",r.POINTEROVER="pointerover",r.POINTERENTER="pointerenter",r.TOUCHSTART="touchstart",r.TOUCHEND="touchend",r.TOUCHMOVE="touchmove",r.TOUCHCANCEL="touchcancel",r.WHEEL="wheel",r.WHEEL_START="wheelstart",r.WHEEL_END="wheelend",r.MOUSEWHEEL="mousewheel",r.CLICK="click",r.DBLCLICK="dblclick",r.CONTEXT_LOST="contextlost",r.CONTEXT_RESTORED="contextrestored",r.CONTROLS_CHANGED="controlschanged",r.TAP="tap",r.SINGLE_TAP="singletap",r.DOUBLE_TAP="doubletap",r.PRESS="press",r.PAN="pan",r.PAN_START="panstart",r.PAN_MOVE="panmove",r.PAN_END="panend",r.ROTATE="rotate",r.ROTATE_START="rotatestart",r.ROTATE_MOVE="rotatemove",r.ROTATE_END="rotateend",r.PINCH="pinch",r.PINCH_START="pinchstart",r.PINCH_MOVE="pinchmove",r.PINCH_END="pinchend",r.PINCH_IN="pinchin",r.PINCH_OUT="pinchout",r.SWIPE="swipe",r.CHANGE_START="change_start",r.CHANGE_END="change_end",r.CAMERA_CHANGED="cameraChanged",r))(_t||{});const Qs=new Y;class jc extends mc{isCamera=!0;type="Camera2";name="Camera2";params;matrixAutoUpdate=!1;matrixWorldAutoUpdate=!1;projectionMatrix=new re;projectionMatrixInverse=new re;viewMatrix=new re;viewMatrixNeedsUpdate=!0;viewArea=0;left=-1;right=1;top=1;bottom=-1;width=2;height=2;aspect=1;view;constructor(t){super(),this.params=t,this.width=(t==null?void 0:t.width)!==void 0?t.width:2,this.height=(t==null?void 0:t.height)!==void 0?t.height:2,this.aspect=(t==null?void 0:t.aspect)!==void 0?t.aspect:1,(t==null?void 0:t.left)!==void 0&&(this.left=t.left),(t==null?void 0:t.right)!==void 0&&(this.right=t.right),(t==null?void 0:t.top)!==void 0&&(this.top=t.top),(t==null?void 0:t.bottom)!==void 0&&(this.bottom=t.bottom);const e=(this.right+this.left)/2,n=(this.top+this.bottom)/2;if(this.aspect>1){const a=Math.round((this.right-this.left)/2/this.aspect);this.top=n+a,this.bottom=n-a}else if(this.aspect<1){const a=Math.round((this.top-this.bottom)/2*this.aspect);this.left=e-a,this.right=e+a}this.flipY=(t==null?void 0:t.flipY)===!0,this.updateProjectionMatrix(),t!=null&&t.eye&&this.position.fromArray(t.eye),t!=null&&t.up&&this.up.fromArray(t.up),this.computeBoundingBox(),this.update()}destroy(){super.destroy()}get pixelWidth(){return this.scaled.x}set(t=-1,e=1,n=1,a=-1){Qs.set(t+e,a+n).multiplyScalar(.5);const u=Math.max((e-t)/this.width,(n-a)/this.height);this.setTRS(Qs,0,u)}setByBox(t){if(!t||t.isEmpty()){console.error(`setByBox: ${t==null?void 0:t.toString()}`);return}this.set(t.min.x,t.max.x,t.max.y,t.min.y)}setTRS(t={x:0,y:0},e=0,n=0){this.position.set(t.x||0,t.y||0),this.rotation.set(e,e),this.scaled.set(n,n),this.update()}resize(){this.setSize(this.params.width,this.params.height)}setSize(t,e){this.width=t||2,this.height=e||2,this.left=this.params.left||-1,this.right=this.params.right||1,this.top=this.params.top||1,this.bottom=this.params.bottom||-1,this.aspect=t/e;const n=(this.right+this.left)/2,a=(this.top+this.bottom)/2;if(this.aspect>1){const u=Math.round((this.right-this.left)/2/this.aspect);this.top=a+u,this.bottom=a-u}else if(this.aspect<1){const u=Math.round((this.top-this.bottom)/2*this.aspect);this.left=n-u,this.right=n+u}this.updateProjectionMatrix(),this.update()}getWorldDirection(t){this.updateWorldMatrix(!0,!1);const e=this.matrixWorld.elements;return t.set(-e[6],-e[7]).normalize()}getCameraPosition(){return{x:this.position.x,y:this.position.y,z:this.position.z,s:this.scaled.x,r:this.rotation.x}}updateMatrixWorld(t=!1){super.updateMatrixWorld(t),this.updateViewMatrix()}updateProjectionMatrix(){this.parent===void 0&&this.matrixWorldAutoUpdate&&this.updateMatrixWorld(),this.projectionMatrix.makeProjection(this.left,this.right,this.top,this.bottom,this.width,this.height),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}updateViewMatrix(){this.matrixWorldInverse.copy(this.matrixWorld).invert(),this.viewMatrix.multiplyMatrices(this.projectionMatrix,this.matrixWorldInverse)}update(){this.matrixAutoUpdate||this.updateMatrix(),this.updateMatrixWorld(),this.needsUpdate=!0,this.updateBoundingBox(),this.dispatchEvent({type:"update",data:{t:this.position,r:this.rotation.x,s:this.scaled.x}})}computeBoundingBox(){return Qs.set(this.width,this.height).multiplyScalar(.5).multiplyScalar(this.scaled.x),this.boundingBox.min.subVectors(this.position,Qs),this.boundingBox.max.addVectors(this.position,Qs),this.boundingBox}updateBoundingBox(){super.updateBoundingBox(),this.viewArea=this.boundingBoxWorld.getArea()}toJSON(){const t={};return t.left=this.left,t.right=this.right,t.top=this.top,t.bottom=this.bottom,t.width=this.width,t.height=this.height,t.aspect=this.aspect,t.position=this.position.toArray(),t.rotation=this.rotation.toArray(),t.scaled=this.scaled.toArray(),t}fromJSON(t){this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.width=t.width,this.height=t.height,this.aspect=t.aspect,this.position.fromArray(t.position),this.rotation.fromArray(t.rotation),this.scaled.fromArray(t.scaled),this.updateProjectionMatrix(),this.update()}clone(){return new this.constructor.prototype.constructor().copy(this)}copy(t,e=!0){return super.copy(t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this.width=t.width,this.height=t.height,this.aspect=t.aspect,this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this}}var Qa=(r=>(r.UPDATE="update",r))(Qa||{});class Kc extends Ir{name="SvgSelectRect";container;el;constructor(t){super(),t?this.container=t:this.container=document.getElementsByTagName("body")[0],this.el=document.createElement("div"),this.el.setAttribute("id",Kn+"SvgSelectRect"),this.el.setAttribute("class",Kn+"-svg-select-rect"),this.el.style.display="none",this.container.appendChild(this.el)}destroy(){super.destroy(),this.el&&this.el.remove()}draw(t){Jc.copy(t).getSize(Oo),So.copy(Jc.min),this.el.style.display="none",this.el.style.position="absolute",this.el.style.left=So.x+"px",this.el.style.top=So.y+"px",this.el.style.width=Oo.x+"px",this.el.style.height=Oo.y+"px",this.el.style.display="block",this.el.style.background=new Wt(he.darkBlue).setA(.1).getStyle(),this.el.style.border=he.darkBlue+" 1px dashed"}hide(){this.el.style.display="none"}}const Jc=new St,So=new Y,Oo=new Y;class o2 extends Ir{name="SvgMultiSelector";controller;scene;container;p1=new Y;p2=new Y;graph;selectEnable=!1;multiSelectEnable=!1;controllerTapHandler=this.handleControllerTap.bind(this);controllerPanStartHandler=this.handleControllerPanStart.bind(this);controllerPanMoveHandler=this.handleControllerPanMove.bind(this);controllerPanEndHandler=this.handleControllerPanEnd.bind(this);constructor(t,e){super(),this.container=t,this.controller=e,this.graph=new Kc(t),this.bindControllerEvents()}destroy(){this.unbindControllerEvents(),super.destroy()}bindScene(t){this.scene=t}selectEnableChanged(t){var e;(e=this.scene)==null||e.clearSelected(),this.selectEnable=!!t}multiSelectEnableChanged(t){var e;(e=this.scene)==null||e.clearSelected(),this.multiSelectEnable=!!t,this.controller.enablePan=!this.multiSelectEnable}bindControllerEvents(){this.controller.addEventListener(_t.TAP,this.controllerTapHandler),this.controller.addEventListener(_t.PAN_START,this.controllerPanStartHandler),this.controller.addEventListener(_t.PAN_MOVE,this.controllerPanMoveHandler),this.controller.addEventListener(_t.PAN_END,this.controllerPanEndHandler)}unbindControllerEvents(){this.controller.removeEventListener(_t.TAP,this.controllerTapHandler),this.controller.removeEventListener(_t.PAN_START,this.controllerPanStartHandler),this.controller.removeEventListener(_t.PAN_MOVE,this.controllerPanMoveHandler),this.controller.removeEventListener(_t.PAN_END,this.controllerPanEndHandler)}handleControllerTap(t){var n,a,u,l,c,f;if((t==null?void 0:t.type)!==_t.TAP||!this.selectEnable&&!this.multiSelectEnable)return;const e=((n=t==null?void 0:t.e)==null?void 0:n.target)||((u=(a=t==null?void 0:t.e)==null?void 0:a.srcEvent)==null?void 0:u.target)||((c=(l=t==null?void 0:t.e)==null?void 0:l.srcEvent)==null?void 0:c.srcElement);e!=null&&e.id&&(f=this.scene)!=null&&f.isBelongsToAssetType(e==null?void 0:e.id)&&this.dispatchEvent({type:"SELECTED",data:{...t.data,target:[e],selected:[e==null?void 0:e.id]}})}handleControllerPanStart(t){(t==null?void 0:t.type)===_t.PAN_START&&this.multiSelectEnable&&(this.p1.copy(t.data.screenCoords),dn.makeEmpty().expandByPoint(this.p1),this.graph.draw(dn))}handleControllerPanMove(t){(t==null?void 0:t.type)===_t.PAN_MOVE&&this.multiSelectEnable&&(this.p2.copy(t.data.screenCoords),dn.makeEmpty().expandByPoint(this.p1).expandByPoint(this.p2),this.graph.draw(dn))}handleControllerPanEnd(t){var a;if((t==null?void 0:t.type)!==_t.PAN_END||!this.multiSelectEnable)return;this.p2.copy(t.data.screenCoords),dn.makeEmpty().expandByPoint(this.p1).expandByPoint(this.p2).unproject(this.controller.camera);const e=(a=this.scene)==null?void 0:a.getElementsByBox(dn),n=[];(e||[]).forEach(u=>n.push(u.id)),this.graph.hide(),dn.makeEmpty(),this.dispatchEvent({type:"SELECTED",data:{target:e,selected:n}})}}var No=(r=>(r.SELECTED="SELECTED",r))(No||{});const dn=new St;var gn=(r=>(r.DEFAULT="default",r.INFO="info",r.PRIMARY="primary",r.SUCCESS="success",r.WARNING="warning",r.DANGER="danger",r))(gn||{});class l2{camera;screenCoords=new Y;worldCoords=new Y;params={Shape:{},Line:{threshold:1},Points:{threshold:1},Sprite:{}};constructor(){}setFromCamera(t,e){return this.camera=e,this.screenCoords.set(t.x,t.y),this.worldCoords.copy(this.screenCoords).unproject(e),this}intersectObjects(t,e=!0,n=[]){for(let a=0,u=t.length;a<u;a++)this.intersectObject(t[a],e,n)}intersectObject(t,e=!1,n=[]){if(!t.selectable||(t.raycast(this,n),!e||t.composeNode))return n;for(let a=0,u=t.children.length;a<u;a++)this.intersectObject(t.children[a],e,n);return n}}var Ve="top",dr="bottom",gr="right",$e="left",Mo="auto",js=[Ve,dr,gr,$e],Jn="start",Ks="end",h2="clippingParents",tf="viewport",Js="popper",c2="reference",ef=js.reduce(function(r,t){return r.concat([t+"-"+Jn,t+"-"+Ks])},[]),rf=[].concat(js,[Mo]).reduce(function(r,t){return r.concat([t,t+"-"+Jn,t+"-"+Ks])},[]),f2="beforeRead",p2="read",d2="afterRead",g2="beforeMain",y2="main",v2="afterMain",m2="beforeWrite",x2="write",E2="afterWrite",A2=[f2,p2,d2,g2,y2,v2,m2,x2,E2];function Kr(r){return r?(r.nodeName||"").toLowerCase():null}function rr(r){if(r==null)return window;if(r.toString()!=="[object Window]"){var t=r.ownerDocument;return t&&t.defaultView||window}return r}function yn(r){var t=rr(r).Element;return r instanceof t||r instanceof Element}function yr(r){var t=rr(r).HTMLElement;return r instanceof t||r instanceof HTMLElement}function Bo(r){if(typeof ShadowRoot>"u")return!1;var t=rr(r).ShadowRoot;return r instanceof t||r instanceof ShadowRoot}function b2(r){var t=r.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},a=t.attributes[e]||{},u=t.elements[e];!yr(u)||!Kr(u)||(Object.assign(u.style,n),Object.keys(a).forEach(function(l){var c=a[l];c===!1?u.removeAttribute(l):u.setAttribute(l,c===!0?"":c)}))})}function w2(r){var t=r.state,e={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,e.popper),t.styles=e,t.elements.arrow&&Object.assign(t.elements.arrow.style,e.arrow),function(){Object.keys(t.elements).forEach(function(n){var a=t.elements[n],u=t.attributes[n]||{},l=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:e[n]),c=l.reduce(function(f,d){return f[d]="",f},{});!yr(a)||!Kr(a)||(Object.assign(a.style,c),Object.keys(u).forEach(function(f){a.removeAttribute(f)}))})}}const nf={name:"applyStyles",enabled:!0,phase:"write",fn:b2,effect:w2,requires:["computeStyles"]};function Jr(r){return r.split("-")[0]}var vn=Math.max,ja=Math.min,ts=Math.round;function Io(){var r=navigator.userAgentData;return r!=null&&r.brands&&Array.isArray(r.brands)?r.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function sf(){return!/^((?!chrome|android).)*safari/i.test(Io())}function es(r,t,e){t===void 0&&(t=!1),e===void 0&&(e=!1);var n=r.getBoundingClientRect(),a=1,u=1;t&&yr(r)&&(a=r.offsetWidth>0&&ts(n.width)/r.offsetWidth||1,u=r.offsetHeight>0&&ts(n.height)/r.offsetHeight||1);var l=yn(r)?rr(r):window,c=l.visualViewport,f=!sf()&&e,d=(n.left+(f&&c?c.offsetLeft:0))/a,y=(n.top+(f&&c?c.offsetTop:0))/u,A=n.width/a,_=n.height/u;return{width:A,height:_,top:y,right:d+A,bottom:y+_,left:d,x:d,y}}function Ro(r){var t=es(r),e=r.offsetWidth,n=r.offsetHeight;return Math.abs(t.width-e)<=1&&(e=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:r.offsetLeft,y:r.offsetTop,width:e,height:n}}function af(r,t){var e=t.getRootNode&&t.getRootNode();if(r.contains(t))return!0;if(e&&Bo(e)){var n=t;do{if(n&&r.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function xi(r){return rr(r).getComputedStyle(r)}function T2(r){return["table","td","th"].indexOf(Kr(r))>=0}function Vi(r){return((yn(r)?r.ownerDocument:r.document)||window.document).documentElement}function Ka(r){return Kr(r)==="html"?r:r.assignedSlot||r.parentNode||(Bo(r)?r.host:null)||Vi(r)}function uf(r){return!yr(r)||xi(r).position==="fixed"?null:r.offsetParent}function _2(r){var t=/firefox/i.test(Io()),e=/Trident/i.test(Io());if(e&&yr(r)){var n=xi(r);if(n.position==="fixed")return null}var a=Ka(r);for(Bo(a)&&(a=a.host);yr(a)&&["html","body"].indexOf(Kr(a))<0;){var u=xi(a);if(u.transform!=="none"||u.perspective!=="none"||u.contain==="paint"||["transform","perspective"].indexOf(u.willChange)!==-1||t&&u.willChange==="filter"||t&&u.filter&&u.filter!=="none")return a;a=a.parentNode}return null}function ta(r){for(var t=rr(r),e=uf(r);e&&T2(e)&&xi(e).position==="static";)e=uf(e);return e&&(Kr(e)==="html"||Kr(e)==="body"&&xi(e).position==="static")?t:e||_2(r)||t}function Lo(r){return["top","bottom"].indexOf(r)>=0?"x":"y"}function ea(r,t,e){return vn(r,ja(t,e))}function C2(r,t,e){var n=ea(r,t,e);return n>e?e:n}function of(){return{top:0,right:0,bottom:0,left:0}}function lf(r){return Object.assign({},of(),r)}function hf(r,t){return t.reduce(function(e,n){return e[n]=r,e},{})}var D2=function(t,e){return t=typeof t=="function"?t(Object.assign({},e.rects,{placement:e.placement})):t,lf(typeof t!="number"?t:hf(t,js))};function S2(r){var t,e=r.state,n=r.name,a=r.options,u=e.elements.arrow,l=e.modifiersData.popperOffsets,c=Jr(e.placement),f=Lo(c),d=[$e,gr].indexOf(c)>=0,y=d?"height":"width";if(!(!u||!l)){var A=D2(a.padding,e),_=Ro(u),C=f==="y"?Ve:$e,F=f==="y"?dr:gr,N=e.rects.reference[y]+e.rects.reference[f]-l[f]-e.rects.popper[y],M=l[f]-e.rects.reference[f],R=ta(u),q=R?f==="y"?R.clientHeight||0:R.clientWidth||0:0,z=N/2-M/2,w=A[C],L=q-_[y]-A[F],k=q/2-_[y]/2+z,j=ea(w,k,L),tt=f;e.modifiersData[n]=(t={},t[tt]=j,t.centerOffset=j-k,t)}}function O2(r){var t=r.state,e=r.options,n=e.element,a=n===void 0?"[data-popper-arrow]":n;a!=null&&(typeof a=="string"&&(a=t.elements.popper.querySelector(a),!a)||af(t.elements.popper,a)&&(t.elements.arrow=a))}const N2={name:"arrow",enabled:!0,phase:"main",fn:S2,effect:O2,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function rs(r){return r.split("-")[1]}var M2={top:"auto",right:"auto",bottom:"auto",left:"auto"};function B2(r,t){var e=r.x,n=r.y,a=t.devicePixelRatio||1;return{x:ts(e*a)/a||0,y:ts(n*a)/a||0}}function cf(r){var t,e=r.popper,n=r.popperRect,a=r.placement,u=r.variation,l=r.offsets,c=r.position,f=r.gpuAcceleration,d=r.adaptive,y=r.roundOffsets,A=r.isFixed,_=l.x,C=_===void 0?0:_,F=l.y,N=F===void 0?0:F,M=typeof y=="function"?y({x:C,y:N}):{x:C,y:N};C=M.x,N=M.y;var R=l.hasOwnProperty("x"),q=l.hasOwnProperty("y"),z=$e,w=Ve,L=window;if(d){var k=ta(e),j="clientHeight",tt="clientWidth";if(k===rr(e)&&(k=Vi(e),xi(k).position!=="static"&&c==="absolute"&&(j="scrollHeight",tt="scrollWidth")),k=k,a===Ve||(a===$e||a===gr)&&u===Ks){w=dr;var Z=A&&k===L&&L.visualViewport?L.visualViewport.height:k[j];N-=Z-n.height,N*=f?1:-1}if(a===$e||(a===Ve||a===dr)&&u===Ks){z=gr;var rt=A&&k===L&&L.visualViewport?L.visualViewport.width:k[tt];C-=rt-n.width,C*=f?1:-1}}var J=Object.assign({position:c},d&&M2),st=y===!0?B2({x:C,y:N},rr(e)):{x:C,y:N};if(C=st.x,N=st.y,f){var ht;return Object.assign({},J,(ht={},ht[w]=q?"0":"",ht[z]=R?"0":"",ht.transform=(L.devicePixelRatio||1)<=1?"translate("+C+"px, "+N+"px)":"translate3d("+C+"px, "+N+"px, 0)",ht))}return Object.assign({},J,(t={},t[w]=q?N+"px":"",t[z]=R?C+"px":"",t.transform="",t))}function I2(r){var t=r.state,e=r.options,n=e.gpuAcceleration,a=n===void 0?!0:n,u=e.adaptive,l=u===void 0?!0:u,c=e.roundOffsets,f=c===void 0?!0:c,d={placement:Jr(t.placement),variation:rs(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:a,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,cf(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:l,roundOffsets:f})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,cf(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:f})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const R2={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:I2,data:{}};var Ja={passive:!0};function L2(r){var t=r.state,e=r.instance,n=r.options,a=n.scroll,u=a===void 0?!0:a,l=n.resize,c=l===void 0?!0:l,f=rr(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return u&&d.forEach(function(y){y.addEventListener("scroll",e.update,Ja)}),c&&f.addEventListener("resize",e.update,Ja),function(){u&&d.forEach(function(y){y.removeEventListener("scroll",e.update,Ja)}),c&&f.removeEventListener("resize",e.update,Ja)}}const P2={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:L2,data:{}};var F2={left:"right",right:"left",bottom:"top",top:"bottom"};function tu(r){return r.replace(/left|right|bottom|top/g,function(t){return F2[t]})}var U2={start:"end",end:"start"};function ff(r){return r.replace(/start|end/g,function(t){return U2[t]})}function Po(r){var t=rr(r),e=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:e,scrollTop:n}}function Fo(r){return es(Vi(r)).left+Po(r).scrollLeft}function k2(r,t){var e=rr(r),n=Vi(r),a=e.visualViewport,u=n.clientWidth,l=n.clientHeight,c=0,f=0;if(a){u=a.width,l=a.height;var d=sf();(d||!d&&t==="fixed")&&(c=a.offsetLeft,f=a.offsetTop)}return{width:u,height:l,x:c+Fo(r),y:f}}function H2(r){var t,e=Vi(r),n=Po(r),a=(t=r.ownerDocument)==null?void 0:t.body,u=vn(e.scrollWidth,e.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),l=vn(e.scrollHeight,e.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0),c=-n.scrollLeft+Fo(r),f=-n.scrollTop;return xi(a||e).direction==="rtl"&&(c+=vn(e.clientWidth,a?a.clientWidth:0)-u),{width:u,height:l,x:c,y:f}}function Uo(r){var t=xi(r),e=t.overflow,n=t.overflowX,a=t.overflowY;return/auto|scroll|overlay|hidden/.test(e+a+n)}function pf(r){return["html","body","#document"].indexOf(Kr(r))>=0?r.ownerDocument.body:yr(r)&&Uo(r)?r:pf(Ka(r))}function ra(r,t){var e;t===void 0&&(t=[]);var n=pf(r),a=n===((e=r.ownerDocument)==null?void 0:e.body),u=rr(n),l=a?[u].concat(u.visualViewport||[],Uo(n)?n:[]):n,c=t.concat(l);return a?c:c.concat(ra(Ka(l)))}function ko(r){return Object.assign({},r,{left:r.x,top:r.y,right:r.x+r.width,bottom:r.y+r.height})}function q2(r,t){var e=es(r,!1,t==="fixed");return e.top=e.top+r.clientTop,e.left=e.left+r.clientLeft,e.bottom=e.top+r.clientHeight,e.right=e.left+r.clientWidth,e.width=r.clientWidth,e.height=r.clientHeight,e.x=e.left,e.y=e.top,e}function df(r,t,e){return t===tf?ko(k2(r,e)):yn(t)?q2(t,e):ko(H2(Vi(r)))}function W2(r){var t=ra(Ka(r)),e=["absolute","fixed"].indexOf(xi(r).position)>=0,n=e&&yr(r)?ta(r):r;return yn(n)?t.filter(function(a){return yn(a)&&af(a,n)&&Kr(a)!=="body"}):[]}function V2(r,t,e,n){var a=t==="clippingParents"?W2(r):[].concat(t),u=[].concat(a,[e]),l=u[0],c=u.reduce(function(f,d){var y=df(r,d,n);return f.top=vn(y.top,f.top),f.right=ja(y.right,f.right),f.bottom=ja(y.bottom,f.bottom),f.left=vn(y.left,f.left),f},df(r,l,n));return c.width=c.right-c.left,c.height=c.bottom-c.top,c.x=c.left,c.y=c.top,c}function gf(r){var t=r.reference,e=r.element,n=r.placement,a=n?Jr(n):null,u=n?rs(n):null,l=t.x+t.width/2-e.width/2,c=t.y+t.height/2-e.height/2,f;switch(a){case Ve:f={x:l,y:t.y-e.height};break;case dr:f={x:l,y:t.y+t.height};break;case gr:f={x:t.x+t.width,y:c};break;case $e:f={x:t.x-e.width,y:c};break;default:f={x:t.x,y:t.y}}var d=a?Lo(a):null;if(d!=null){var y=d==="y"?"height":"width";switch(u){case Jn:f[d]=f[d]-(t[y]/2-e[y]/2);break;case Ks:f[d]=f[d]+(t[y]/2-e[y]/2);break}}return f}function ia(r,t){t===void 0&&(t={});var e=t,n=e.placement,a=n===void 0?r.placement:n,u=e.strategy,l=u===void 0?r.strategy:u,c=e.boundary,f=c===void 0?h2:c,d=e.rootBoundary,y=d===void 0?tf:d,A=e.elementContext,_=A===void 0?Js:A,C=e.altBoundary,F=C===void 0?!1:C,N=e.padding,M=N===void 0?0:N,R=lf(typeof M!="number"?M:hf(M,js)),q=_===Js?c2:Js,z=r.rects.popper,w=r.elements[F?q:_],L=V2(yn(w)?w:w.contextElement||Vi(r.elements.popper),f,y,l),k=es(r.elements.reference),j=gf({reference:k,element:z,strategy:"absolute",placement:a}),tt=ko(Object.assign({},z,j)),Z=_===Js?tt:k,rt={top:L.top-Z.top+R.top,bottom:Z.bottom-L.bottom+R.bottom,left:L.left-Z.left+R.left,right:Z.right-L.right+R.right},J=r.modifiersData.offset;if(_===Js&&J){var st=J[a];Object.keys(rt).forEach(function(ht){var ct=[gr,dr].indexOf(ht)>=0?1:-1,ft=[Ve,dr].indexOf(ht)>=0?"y":"x";rt[ht]+=st[ft]*ct})}return rt}function $2(r,t){t===void 0&&(t={});var e=t,n=e.placement,a=e.boundary,u=e.rootBoundary,l=e.padding,c=e.flipVariations,f=e.allowedAutoPlacements,d=f===void 0?rf:f,y=rs(n),A=y?c?ef:ef.filter(function(F){return rs(F)===y}):js,_=A.filter(function(F){return d.indexOf(F)>=0});_.length===0&&(_=A);var C=_.reduce(function(F,N){return F[N]=ia(r,{placement:N,boundary:a,rootBoundary:u,padding:l})[Jr(N)],F},{});return Object.keys(C).sort(function(F,N){return C[F]-C[N]})}function z2(r){if(Jr(r)===Mo)return[];var t=tu(r);return[ff(r),t,ff(t)]}function G2(r){var t=r.state,e=r.options,n=r.name;if(!t.modifiersData[n]._skip){for(var a=e.mainAxis,u=a===void 0?!0:a,l=e.altAxis,c=l===void 0?!0:l,f=e.fallbackPlacements,d=e.padding,y=e.boundary,A=e.rootBoundary,_=e.altBoundary,C=e.flipVariations,F=C===void 0?!0:C,N=e.allowedAutoPlacements,M=t.options.placement,R=Jr(M),q=R===M,z=f||(q||!F?[tu(M)]:z2(M)),w=[M].concat(z).reduce(function(Le,ae){return Le.concat(Jr(ae)===Mo?$2(t,{placement:ae,boundary:y,rootBoundary:A,padding:d,flipVariations:F,allowedAutoPlacements:N}):ae)},[]),L=t.rects.reference,k=t.rects.popper,j=new Map,tt=!0,Z=w[0],rt=0;rt<w.length;rt++){var J=w[rt],st=Jr(J),ht=rs(J)===Jn,ct=[Ve,dr].indexOf(st)>=0,ft=ct?"width":"height",O=ia(t,{placement:J,boundary:y,rootBoundary:A,altBoundary:_,padding:d}),yt=ct?ht?gr:$e:ht?dr:Ve;L[ft]>k[ft]&&(yt=tu(yt));var Bt=tu(yt),Re=[];if(u&&Re.push(O[st]<=0),c&&Re.push(O[yt]<=0,O[Bt]<=0),Re.every(function(Le){return Le})){Z=J,tt=!1;break}j.set(J,Re)}if(tt)for(var be=F?3:1,se=function(ae){var Se=w.find(function(Vt){var Gt=j.get(Vt);if(Gt)return Gt.slice(0,ae).every(function(Ct){return Ct})});if(Se)return Z=Se,"break"},ve=be;ve>0;ve--){var qr=se(ve);if(qr==="break")break}t.placement!==Z&&(t.modifiersData[n]._skip=!0,t.placement=Z,t.reset=!0)}}const Y2={name:"flip",enabled:!0,phase:"main",fn:G2,requiresIfExists:["offset"],data:{_skip:!1}};function yf(r,t,e){return e===void 0&&(e={x:0,y:0}),{top:r.top-t.height-e.y,right:r.right-t.width+e.x,bottom:r.bottom-t.height+e.y,left:r.left-t.width-e.x}}function vf(r){return[Ve,gr,dr,$e].some(function(t){return r[t]>=0})}function X2(r){var t=r.state,e=r.name,n=t.rects.reference,a=t.rects.popper,u=t.modifiersData.preventOverflow,l=ia(t,{elementContext:"reference"}),c=ia(t,{altBoundary:!0}),f=yf(l,n),d=yf(c,a,u),y=vf(f),A=vf(d);t.modifiersData[e]={referenceClippingOffsets:f,popperEscapeOffsets:d,isReferenceHidden:y,hasPopperEscaped:A},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":y,"data-popper-escaped":A})}const Z2={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:X2};function Q2(r,t,e){var n=Jr(r),a=[$e,Ve].indexOf(n)>=0?-1:1,u=typeof e=="function"?e(Object.assign({},t,{placement:r})):e,l=u[0],c=u[1];return l=l||0,c=(c||0)*a,[$e,gr].indexOf(n)>=0?{x:c,y:l}:{x:l,y:c}}function j2(r){var t=r.state,e=r.options,n=r.name,a=e.offset,u=a===void 0?[0,0]:a,l=rf.reduce(function(y,A){return y[A]=Q2(A,t.rects,u),y},{}),c=l[t.placement],f=c.x,d=c.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=f,t.modifiersData.popperOffsets.y+=d),t.modifiersData[n]=l}const K2={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:j2};function J2(r){var t=r.state,e=r.name;t.modifiersData[e]=gf({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const ty={name:"popperOffsets",enabled:!0,phase:"read",fn:J2,data:{}};function ey(r){return r==="x"?"y":"x"}function ry(r){var t=r.state,e=r.options,n=r.name,a=e.mainAxis,u=a===void 0?!0:a,l=e.altAxis,c=l===void 0?!1:l,f=e.boundary,d=e.rootBoundary,y=e.altBoundary,A=e.padding,_=e.tether,C=_===void 0?!0:_,F=e.tetherOffset,N=F===void 0?0:F,M=ia(t,{boundary:f,rootBoundary:d,padding:A,altBoundary:y}),R=Jr(t.placement),q=rs(t.placement),z=!q,w=Lo(R),L=ey(w),k=t.modifiersData.popperOffsets,j=t.rects.reference,tt=t.rects.popper,Z=typeof N=="function"?N(Object.assign({},t.rects,{placement:t.placement})):N,rt=typeof Z=="number"?{mainAxis:Z,altAxis:Z}:Object.assign({mainAxis:0,altAxis:0},Z),J=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,st={x:0,y:0};if(k){if(u){var ht,ct=w==="y"?Ve:$e,ft=w==="y"?dr:gr,O=w==="y"?"height":"width",yt=k[w],Bt=yt+M[ct],Re=yt-M[ft],be=C?-tt[O]/2:0,se=q===Jn?j[O]:tt[O],ve=q===Jn?-tt[O]:-j[O],qr=t.elements.arrow,Le=C&&qr?Ro(qr):{width:0,height:0},ae=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:of(),Se=ae[ct],Vt=ae[ft],Gt=ea(0,j[O],Le[O]),Ct=z?j[O]/2-be-Gt-Se-rt.mainAxis:se-Gt-Se-rt.mainAxis,Ht=z?-j[O]/2+be+Gt+Vt+rt.mainAxis:ve+Gt+Vt+rt.mainAxis,Oe=t.elements.arrow&&ta(t.elements.arrow),Pe=Oe?w==="y"?Oe.clientTop||0:Oe.clientLeft||0:0,ze=(ht=J==null?void 0:J[w])!=null?ht:0,Qt=yt+Ct-ze-Pe,Ne=yt+Ht-ze,me=ea(C?ja(Bt,Qt):Bt,yt,C?vn(Re,Ne):Re);k[w]=me,st[w]=me-yt}if(c){var Yt,ii=w==="x"?Ve:$e,Ai=w==="x"?dr:gr,ue=k[L],Dt=L==="y"?"height":"width",nr=ue+M[ii],Ge=ue-M[Ai],bi=[Ve,$e].indexOf(R)!==-1,mr=(Yt=J==null?void 0:J[L])!=null?Yt:0,Gi=bi?nr:ue-j[Dt]-tt[Dt]-mr+rt.altAxis,sr=bi?ue+j[Dt]+tt[Dt]-mr-rt.altAxis:Ge,Ye=C&&bi?C2(Gi,ue,sr):ea(C?Gi:nr,ue,C?sr:Ge);k[L]=Ye,st[L]=Ye-ue}t.modifiersData[n]=st}}const iy={name:"preventOverflow",enabled:!0,phase:"main",fn:ry,requiresIfExists:["offset"]};function ny(r){return{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}}function sy(r){return r===rr(r)||!yr(r)?Po(r):ny(r)}function ay(r){var t=r.getBoundingClientRect(),e=ts(t.width)/r.offsetWidth||1,n=ts(t.height)/r.offsetHeight||1;return e!==1||n!==1}function uy(r,t,e){e===void 0&&(e=!1);var n=yr(t),a=yr(t)&&ay(t),u=Vi(t),l=es(r,a,e),c={scrollLeft:0,scrollTop:0},f={x:0,y:0};return(n||!n&&!e)&&((Kr(t)!=="body"||Uo(u))&&(c=sy(t)),yr(t)?(f=es(t,!0),f.x+=t.clientLeft,f.y+=t.clientTop):u&&(f.x=Fo(u))),{x:l.left+c.scrollLeft-f.x,y:l.top+c.scrollTop-f.y,width:l.width,height:l.height}}function oy(r){var t=new Map,e=new Set,n=[];r.forEach(function(u){t.set(u.name,u)});function a(u){e.add(u.name);var l=[].concat(u.requires||[],u.requiresIfExists||[]);l.forEach(function(c){if(!e.has(c)){var f=t.get(c);f&&a(f)}}),n.push(u)}return r.forEach(function(u){e.has(u.name)||a(u)}),n}function ly(r){var t=oy(r);return A2.reduce(function(e,n){return e.concat(t.filter(function(a){return a.phase===n}))},[])}function hy(r){var t;return function(){return t||(t=new Promise(function(e){Promise.resolve().then(function(){t=void 0,e(r())})})),t}}function cy(r){var t=r.reduce(function(e,n){var a=e[n.name];return e[n.name]=a?Object.assign({},a,n,{options:Object.assign({},a.options,n.options),data:Object.assign({},a.data,n.data)}):n,e},{});return Object.keys(t).map(function(e){return t[e]})}var mf={placement:"bottom",modifiers:[],strategy:"absolute"};function xf(){for(var r=arguments.length,t=new Array(r),e=0;e<r;e++)t[e]=arguments[e];return!t.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function fy(r){r===void 0&&(r={});var t=r,e=t.defaultModifiers,n=e===void 0?[]:e,a=t.defaultOptions,u=a===void 0?mf:a;return function(c,f,d){d===void 0&&(d=u);var y={placement:"bottom",orderedModifiers:[],options:Object.assign({},mf,u),modifiersData:{},elements:{reference:c,popper:f},attributes:{},styles:{}},A=[],_=!1,C={state:y,setOptions:function(R){var q=typeof R=="function"?R(y.options):R;N(),y.options=Object.assign({},u,y.options,q),y.scrollParents={reference:yn(c)?ra(c):c.contextElement?ra(c.contextElement):[],popper:ra(f)};var z=ly(cy([].concat(n,y.options.modifiers)));return y.orderedModifiers=z.filter(function(w){return w.enabled}),F(),C.update()},forceUpdate:function(){if(!_){var R=y.elements,q=R.reference,z=R.popper;if(xf(q,z)){y.rects={reference:uy(q,ta(z),y.options.strategy==="fixed"),popper:Ro(z)},y.reset=!1,y.placement=y.options.placement,y.orderedModifiers.forEach(function(rt){return y.modifiersData[rt.name]=Object.assign({},rt.data)});for(var w=0;w<y.orderedModifiers.length;w++){if(y.reset===!0){y.reset=!1,w=-1;continue}var L=y.orderedModifiers[w],k=L.fn,j=L.options,tt=j===void 0?{}:j,Z=L.name;typeof k=="function"&&(y=k({state:y,options:tt,name:Z,instance:C})||y)}}}},update:hy(function(){return new Promise(function(M){C.forceUpdate(),M(y)})}),destroy:function(){N(),_=!0}};if(!xf(c,f))return C;C.setOptions(d).then(function(M){!_&&d.onFirstUpdate&&d.onFirstUpdate(M)});function F(){y.orderedModifiers.forEach(function(M){var R=M.name,q=M.options,z=q===void 0?{}:q,w=M.effect;if(typeof w=="function"){var L=w({state:y,name:R,instance:C,options:z}),k=function(){};A.push(L||k)}})}function N(){A.forEach(function(M){return M()}),A=[]}return C}}var py=[P2,ty,R2,nf,K2,Y2,iy,N2,Z2],dy=fy({defaultModifiers:py}),gy="tippy-box",Ef="tippy-content",yy="tippy-backdrop",Af="tippy-arrow",bf="tippy-svg-arrow",mn={passive:!0,capture:!0},wf=function(){return document.body};function vy(r,t){return{}.hasOwnProperty.call(r,t)}function Ho(r,t,e){if(Array.isArray(r)){var n=r[t];return n??(Array.isArray(e)?e[t]:e)}return r}function qo(r,t){var e={}.toString.call(r);return e.indexOf("[object")===0&&e.indexOf(t+"]")>-1}function Tf(r,t){return typeof r=="function"?r.apply(void 0,t):r}function _f(r,t){if(t===0)return r;var e;return function(n){clearTimeout(e),e=setTimeout(function(){r(n)},t)}}function my(r,t){var e=Object.assign({},r);return t.forEach(function(n){delete e[n]}),e}function xy(r){return r.split(/\s+/).filter(Boolean)}function is(r){return[].concat(r)}function Cf(r,t){r.indexOf(t)===-1&&r.push(t)}function Ey(r){return r.filter(function(t,e){return r.indexOf(t)===e})}function Ay(r){return r.split("-")[0]}function eu(r){return[].slice.call(r)}function Df(r){return Object.keys(r).reduce(function(t,e){return r[e]!==void 0&&(t[e]=r[e]),t},{})}function na(){return document.createElement("div")}function sa(r){return["Element","Fragment"].some(function(t){return qo(r,t)})}function by(r){return qo(r,"NodeList")}function wy(r){return qo(r,"MouseEvent")}function Ty(r){return!!(r&&r._tippy&&r._tippy.reference===r)}function _y(r){return sa(r)?[r]:by(r)?eu(r):Array.isArray(r)?r:eu(document.querySelectorAll(r))}function Wo(r,t){r.forEach(function(e){e&&(e.style.transitionDuration=t+"ms")})}function Sf(r,t){r.forEach(function(e){e&&e.setAttribute("data-state",t)})}function Cy(r){var t,e=is(r),n=e[0];return n!=null&&(t=n.ownerDocument)!=null&&t.body?n.ownerDocument:document}function Dy(r,t){var e=t.clientX,n=t.clientY;return r.every(function(a){var u=a.popperRect,l=a.popperState,c=a.props,f=c.interactiveBorder,d=Ay(l.placement),y=l.modifiersData.offset;if(!y)return!0;var A=d==="bottom"?y.top.y:0,_=d==="top"?y.bottom.y:0,C=d==="right"?y.left.x:0,F=d==="left"?y.right.x:0,N=u.top-n+A>f,M=n-u.bottom-_>f,R=u.left-e+C>f,q=e-u.right-F>f;return N||M||R||q})}function Vo(r,t,e){var n=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(a){r[n](a,e)})}function Of(r,t){for(var e=t;e;){var n;if(r.contains(e))return!0;e=e.getRootNode==null||(n=e.getRootNode())==null?void 0:n.host}return!1}var ti={isTouch:!1},Nf=0;function Sy(){ti.isTouch||(ti.isTouch=!0,window.performance&&document.addEventListener("mousemove",Mf))}function Mf(){var r=performance.now();r-Nf<20&&(ti.isTouch=!1,document.removeEventListener("mousemove",Mf)),Nf=r}function Oy(){var r=document.activeElement;if(Ty(r)){var t=r._tippy;r.blur&&!t.state.isVisible&&r.blur()}}function Ny(){document.addEventListener("touchstart",Sy,mn),window.addEventListener("blur",Oy)}var My=typeof window<"u"&&typeof document<"u",By=My?!!window.msCrypto:!1;function ns(r){var t=r==="destroy"?"n already-":" ";return[r+"() was called on a"+t+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function Bf(r){var t=/[ \t]{2,}/g,e=/^[ \t]*/gm;return r.replace(t," ").replace(e,"").trim()}function Iy(r){return Bf(`
|
|
53
53
|
%ctippy.js
|
|
54
54
|
|
|
55
55
|
%c`+Bf(r)+`
|
|
56
56
|
|
|
57
57
|
%c👷 This is a development-only message. It will be removed in production.
|
|
58
|
-
`)}function If(r){return[
|
|
58
|
+
`)}function If(r){return[Iy(r),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}var aa;process.env.NODE_ENV!=="production"&&Ry();function Ry(){aa=new Set}function Ei(r,t){if(r&&!aa.has(t)){var e;aa.add(t),(e=console).warn.apply(e,If(t))}}function $o(r,t){if(r&&!aa.has(t)){var e;aa.add(t),(e=console).error.apply(e,If(t))}}function Ly(r){var t=!r,e=Object.prototype.toString.call(r)==="[object Object]"&&!r.addEventListener;$o(t,["tippy() was passed","`"+String(r)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),$o(e,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}var Rf={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Py={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},ir=Object.assign({appendTo:wf,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Rf,Py),Fy=Object.keys(ir),Uy=function(t){process.env.NODE_ENV!=="production"&&Ff(t,[]);var e=Object.keys(t);e.forEach(function(n){ir[n]=t[n]})};function Lf(r){var t=r.plugins||[],e=t.reduce(function(n,a){var u=a.name,l=a.defaultValue;if(u){var c;n[u]=r[u]!==void 0?r[u]:(c=ir[u])!=null?c:l}return n},{});return Object.assign({},r,e)}function ky(r,t){var e=t?Object.keys(Lf(Object.assign({},ir,{plugins:t}))):Fy,n=e.reduce(function(a,u){var l=(r.getAttribute("data-tippy-"+u)||"").trim();if(!l)return a;if(u==="content")a[u]=l;else try{a[u]=JSON.parse(l)}catch{a[u]=l}return a},{});return n}function Pf(r,t){var e=Object.assign({},t,{content:Tf(t.content,[r])},t.ignoreAttributes?{}:ky(r,t.plugins));return e.aria=Object.assign({},ir.aria,e.aria),e.aria={expanded:e.aria.expanded==="auto"?t.interactive:e.aria.expanded,content:e.aria.content==="auto"?t.interactive?null:"describedby":e.aria.content},e}function Ff(r,t){r===void 0&&(r={}),t===void 0&&(t=[]);var e=Object.keys(r);e.forEach(function(n){var a=my(ir,Object.keys(Rf)),u=!vy(a,n);u&&(u=t.filter(function(l){return l.name===n}).length===0),Ei(u,["`"+n+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.",`
|
|
59
59
|
|
|
60
60
|
`,`All props: https://atomiks.github.io/tippyjs/v6/all-props/
|
|
61
|
-
`,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var
|
|
61
|
+
`,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var Hy=function(){return"innerHTML"};function zo(r,t){r[Hy()]=t}function Uf(r){var t=na();return r===!0?t.className=Af:(t.className=bf,sa(r)?t.appendChild(r):zo(t,r)),t}function kf(r,t){sa(t.content)?(zo(r,""),r.appendChild(t.content)):typeof t.content!="function"&&(t.allowHTML?zo(r,t.content):r.textContent=t.content)}function Go(r){var t=r.firstElementChild,e=eu(t.children);return{box:t,content:e.find(function(n){return n.classList.contains(Ef)}),arrow:e.find(function(n){return n.classList.contains(Af)||n.classList.contains(bf)}),backdrop:e.find(function(n){return n.classList.contains(yy)})}}function Hf(r){var t=na(),e=na();e.className=gy,e.setAttribute("data-state","hidden"),e.setAttribute("tabindex","-1");var n=na();n.className=Ef,n.setAttribute("data-state","hidden"),kf(n,r.props),t.appendChild(e),e.appendChild(n),a(r.props,r.props);function a(u,l){var c=Go(t),f=c.box,d=c.content,y=c.arrow;l.theme?f.setAttribute("data-theme",l.theme):f.removeAttribute("data-theme"),typeof l.animation=="string"?f.setAttribute("data-animation",l.animation):f.removeAttribute("data-animation"),l.inertia?f.setAttribute("data-inertia",""):f.removeAttribute("data-inertia"),f.style.maxWidth=typeof l.maxWidth=="number"?l.maxWidth+"px":l.maxWidth,l.role?f.setAttribute("role",l.role):f.removeAttribute("role"),(u.content!==l.content||u.allowHTML!==l.allowHTML)&&kf(d,r.props),l.arrow?y?u.arrow!==l.arrow&&(f.removeChild(y),f.appendChild(Uf(l.arrow))):f.appendChild(Uf(l.arrow)):y&&f.removeChild(y)}return{popper:t,onUpdate:a}}Hf.$$tippy=!0;var qy=1,ru=[],Yo=[];function Wy(r,t){var e=Pf(r,Object.assign({},ir,Lf(Df(t)))),n,a,u,l=!1,c=!1,f=!1,d=!1,y,A,_,C=[],F=_f(Qt,e.interactiveDebounce),N,M=qy++,R=null,q=Ey(e.plugins),z={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},w={id:M,reference:r,popper:na(),popperInstance:R,props:e,state:z,plugins:q,clearDelayTimeouts:Gi,setProps:sr,setContent:Ye,show:Yi,hide:Xi,hideWithInteractivity:ni,enable:bi,disable:mr,unmount:wi,destroy:bn};if(!e.render)return process.env.NODE_ENV!=="production"&&$o(!0,"render() function has not been supplied."),w;var L=e.render(w),k=L.popper,j=L.onUpdate;k.setAttribute("data-tippy-root",""),k.id="tippy-"+w.id,w.popper=k,r._tippy=w,k._tippy=w;var tt=q.map(function(P){return P.fn(w)}),Z=r.hasAttribute("aria-expanded");return Oe(),be(),yt(),Bt("onCreate",[w]),e.showOnCreate&&nr(),k.addEventListener("mouseenter",function(){w.props.interactive&&w.state.isVisible&&w.clearDelayTimeouts()}),k.addEventListener("mouseleave",function(){w.props.interactive&&w.props.trigger.indexOf("mouseenter")>=0&&ct().addEventListener("mousemove",F)}),w;function rt(){var P=w.props.touch;return Array.isArray(P)?P:[P,0]}function J(){return rt()[0]==="hold"}function st(){var P;return!!((P=w.props.render)!=null&&P.$$tippy)}function ht(){return N||r}function ct(){var P=ht().parentNode;return P?Cy(P):document}function ft(){return Go(k)}function O(P){return w.state.isMounted&&!w.state.isVisible||ti.isTouch||y&&y.type==="focus"?0:Ho(w.props.delay,P?0:1,ir.delay)}function yt(P){P===void 0&&(P=!1),k.style.pointerEvents=w.props.interactive&&!P?"":"none",k.style.zIndex=""+w.props.zIndex}function Bt(P,it,at){if(at===void 0&&(at=!0),tt.forEach(function(vt){vt[P]&&vt[P].apply(vt,it)}),at){var wt;(wt=w.props)[P].apply(wt,it)}}function Re(){var P=w.props.aria;if(P.content){var it="aria-"+P.content,at=k.id,wt=is(w.props.triggerTarget||r);wt.forEach(function(vt){var fe=vt.getAttribute(it);if(w.state.isVisible)vt.setAttribute(it,fe?fe+" "+at:at);else{var Me=fe&&fe.replace(at,"").trim();Me?vt.setAttribute(it,Me):vt.removeAttribute(it)}})}}function be(){if(!(Z||!w.props.aria.expanded)){var P=is(w.props.triggerTarget||r);P.forEach(function(it){w.props.interactive?it.setAttribute("aria-expanded",w.state.isVisible&&it===ht()?"true":"false"):it.removeAttribute("aria-expanded")})}}function se(){ct().removeEventListener("mousemove",F),ru=ru.filter(function(P){return P!==F})}function ve(P){if(!(ti.isTouch&&(f||P.type==="mousedown"))){var it=P.composedPath&&P.composedPath()[0]||P.target;if(!(w.props.interactive&&Of(k,it))){if(is(w.props.triggerTarget||r).some(function(at){return Of(at,it)})){if(ti.isTouch||w.state.isVisible&&w.props.trigger.indexOf("click")>=0)return}else Bt("onClickOutside",[w,P]);w.props.hideOnClick===!0&&(w.clearDelayTimeouts(),w.hide(),c=!0,setTimeout(function(){c=!1}),w.state.isMounted||Se())}}}function qr(){f=!0}function Le(){f=!1}function ae(){var P=ct();P.addEventListener("mousedown",ve,!0),P.addEventListener("touchend",ve,mn),P.addEventListener("touchstart",Le,mn),P.addEventListener("touchmove",qr,mn)}function Se(){var P=ct();P.removeEventListener("mousedown",ve,!0),P.removeEventListener("touchend",ve,mn),P.removeEventListener("touchstart",Le,mn),P.removeEventListener("touchmove",qr,mn)}function Vt(P,it){Ct(P,function(){!w.state.isVisible&&k.parentNode&&k.parentNode.contains(k)&&it()})}function Gt(P,it){Ct(P,it)}function Ct(P,it){var at=ft().box;function wt(vt){vt.target===at&&(Vo(at,"remove",wt),it())}if(P===0)return it();Vo(at,"remove",A),Vo(at,"add",wt),A=wt}function Ht(P,it,at){at===void 0&&(at=!1);var wt=is(w.props.triggerTarget||r);wt.forEach(function(vt){vt.addEventListener(P,it,at),C.push({node:vt,eventType:P,handler:it,options:at})})}function Oe(){J()&&(Ht("touchstart",ze,{passive:!0}),Ht("touchend",Ne,{passive:!0})),xy(w.props.trigger).forEach(function(P){if(P!=="manual")switch(Ht(P,ze),P){case"mouseenter":Ht("mouseleave",Ne);break;case"focus":Ht(By?"focusout":"blur",me);break;case"focusin":Ht("focusout",me);break}})}function Pe(){C.forEach(function(P){var it=P.node,at=P.eventType,wt=P.handler,vt=P.options;it.removeEventListener(at,wt,vt)}),C=[]}function ze(P){var it,at=!1;if(!(!w.state.isEnabled||Yt(P)||c)){var wt=((it=y)==null?void 0:it.type)==="focus";y=P,N=P.currentTarget,be(),!w.state.isVisible&&wy(P)&&ru.forEach(function(vt){return vt(P)}),P.type==="click"&&(w.props.trigger.indexOf("mouseenter")<0||l)&&w.props.hideOnClick!==!1&&w.state.isVisible?at=!0:nr(P),P.type==="click"&&(l=!at),at&&!wt&&Ge(P)}}function Qt(P){var it=P.target,at=ht().contains(it)||k.contains(it);if(!(P.type==="mousemove"&&at)){var wt=Dt().concat(k).map(function(vt){var fe,Me=vt._tippy,xr=(fe=Me.popperInstance)==null?void 0:fe.state;return xr?{popperRect:vt.getBoundingClientRect(),popperState:xr,props:e}:null}).filter(Boolean);Dy(wt,P)&&(se(),Ge(P))}}function Ne(P){var it=Yt(P)||w.props.trigger.indexOf("click")>=0&&l;if(!it){if(w.props.interactive){w.hideWithInteractivity(P);return}Ge(P)}}function me(P){w.props.trigger.indexOf("focusin")<0&&P.target!==ht()||w.props.interactive&&P.relatedTarget&&k.contains(P.relatedTarget)||Ge(P)}function Yt(P){return ti.isTouch?J()!==P.type.indexOf("touch")>=0:!1}function ii(){Ai();var P=w.props,it=P.popperOptions,at=P.placement,wt=P.offset,vt=P.getReferenceClientRect,fe=P.moveTransition,Me=st()?Go(k).arrow:null,xr=vt?{getBoundingClientRect:vt,contextElement:vt.contextElement||ht()}:r,Zi={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Qi){var si=Qi.state;if(st()){var Tn=ft(),_n=Tn.box;["placement","reference-hidden","escaped"].forEach(function(ji){ji==="placement"?_n.setAttribute("data-placement",si.placement):si.attributes.popper["data-popper-"+ji]?_n.setAttribute("data-"+ji,""):_n.removeAttribute("data-"+ji)}),si.attributes.popper={}}}},ar=[{name:"offset",options:{offset:wt}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!fe}},Zi];st()&&Me&&ar.push({name:"arrow",options:{element:Me,padding:3}}),ar.push.apply(ar,(it==null?void 0:it.modifiers)||[]),w.popperInstance=dy(xr,k,Object.assign({},it,{placement:at,onFirstUpdate:_,modifiers:ar}))}function Ai(){w.popperInstance&&(w.popperInstance.destroy(),w.popperInstance=null)}function ue(){var P=w.props.appendTo,it,at=ht();w.props.interactive&&P===wf||P==="parent"?it=at.parentNode:it=Tf(P,[at]),it.contains(k)||it.appendChild(k),w.state.isMounted=!0,ii(),process.env.NODE_ENV!=="production"&&Ei(w.props.interactive&&P===ir.appendTo&&at.nextElementSibling!==k,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.",`
|
|
62
62
|
|
|
63
63
|
`,"Using a wrapper <div> or <span> tag around the reference element","solves this by creating a new parentNode context.",`
|
|
64
64
|
|
|
65
65
|
`,"Specifying `appendTo: document.body` silences this warning, but it","assumes you are using a focus management solution to handle","keyboard navigation.",`
|
|
66
66
|
|
|
67
|
-
`,"See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}function Dt(){return eu(k.querySelectorAll("[data-tippy-root]"))}function nr(P){w.clearDelayTimeouts(),P&&Bt("onTrigger",[w,P]),ae();var it=O(!0),at=rt(),wt=at[0],vt=at[1];ti.isTouch&&wt==="hold"&&vt&&(it=vt),it?n=setTimeout(function(){w.show()},it):w.show()}function Ge(P){if(w.clearDelayTimeouts(),Bt("onUntrigger",[w,P]),!w.state.isVisible){Se();return}if(!(w.props.trigger.indexOf("mouseenter")>=0&&w.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(P.type)>=0&&l)){var it=O(!1);it?a=setTimeout(function(){w.state.isVisible&&w.hide()},it):u=requestAnimationFrame(function(){w.hide()})}}function bi(){w.state.isEnabled=!0}function mr(){w.hide(),w.state.isEnabled=!1}function Gi(){clearTimeout(n),clearTimeout(a),cancelAnimationFrame(u)}function sr(P){if(process.env.NODE_ENV!=="production"&&Ei(w.state.isDestroyed,ns("setProps")),!w.state.isDestroyed){Bt("onBeforeUpdate",[w,P]),Pe();var it=w.props,at=Pf(r,Object.assign({},it,Df(P),{ignoreAttributes:!0}));w.props=at,Oe(),it.interactiveDebounce!==at.interactiveDebounce&&(se(),F=_f(Qt,at.interactiveDebounce)),it.triggerTarget&&!at.triggerTarget?is(it.triggerTarget).forEach(function(wt){wt.removeAttribute("aria-expanded")}):at.triggerTarget&&r.removeAttribute("aria-expanded"),be(),yt(),j&&j(it,at),w.popperInstance&&(ii(),Dt().forEach(function(wt){requestAnimationFrame(wt._tippy.popperInstance.forceUpdate)})),Bt("onAfterUpdate",[w,P])}}function Ye(P){w.setProps({content:P})}function Yi(){process.env.NODE_ENV!=="production"&&Ei(w.state.isDestroyed,ns("show"));var P=w.state.isVisible,it=w.state.isDestroyed,at=!w.state.isEnabled,wt=ti.isTouch&&!w.props.touch,vt=Ho(w.props.duration,0,ir.duration);if(!(P||it||at||wt)&&!ht().hasAttribute("disabled")&&(Bt("onShow",[w],!1),w.props.onShow(w)!==!1)){if(w.state.isVisible=!0,st()&&(k.style.visibility="visible"),yt(),ae(),w.state.isMounted||(k.style.transition="none"),st()){var fe=ft(),Me=fe.box,xr=fe.content;Wo([Me,xr],0)}_=function(){var ar;if(!(!w.state.isVisible||d)){if(d=!0,k.offsetHeight,k.style.transition=w.props.moveTransition,st()&&w.props.animation){var wn=ft(),Qi=wn.box,si=wn.content;Wo([Qi,si],vt),Sf([Qi,si],"visible")}Re(),be(),Cf(Yo,w),(ar=w.popperInstance)==null||ar.forceUpdate(),Bt("onMount",[w]),w.props.animation&&st()&&Gt(vt,function(){w.state.isShown=!0,Bt("onShown",[w])})}},ue()}}function Xi(){process.env.NODE_ENV!=="production"&&Ei(w.state.isDestroyed,ns("hide"));var P=!w.state.isVisible,it=w.state.isDestroyed,at=!w.state.isEnabled,wt=Ho(w.props.duration,1,ir.duration);if(!(P||it||at)&&(Bt("onHide",[w],!1),w.props.onHide(w)!==!1)){if(w.state.isVisible=!1,w.state.isShown=!1,d=!1,l=!1,st()&&(k.style.visibility="hidden"),se(),Se(),yt(!0),st()){var vt=ft(),fe=vt.box,Me=vt.content;w.props.animation&&(Wo([fe,Me],wt),Sf([fe,Me],"hidden"))}Re(),be(),w.props.animation?st()&&Vt(wt,w.unmount):w.unmount()}}function ni(P){process.env.NODE_ENV!=="production"&&Ei(w.state.isDestroyed,ns("hideWithInteractivity")),ct().addEventListener("mousemove",F),Cf(ru,F),F(P)}function wi(){process.env.NODE_ENV!=="production"&&Ei(w.state.isDestroyed,ns("unmount")),w.state.isVisible&&w.hide(),w.state.isMounted&&(Ai(),Dt().forEach(function(P){P._tippy.unmount()}),k.parentNode&&k.parentNode.removeChild(k),Yo=Yo.filter(function(P){return P!==w}),w.state.isMounted=!1,Bt("onHidden",[w]))}function bn(){process.env.NODE_ENV!=="production"&&Ei(w.state.isDestroyed,ns("destroy")),!w.state.isDestroyed&&(w.clearDelayTimeouts(),w.unmount(),Pe(),delete r._tippy,w.state.isDestroyed=!0,Bt("onDestroy",[w]))}}function ua(r,t){t===void 0&&(t={});var e=ir.plugins.concat(t.plugins||[]);process.env.NODE_ENV!=="production"&&(
|
|
67
|
+
`,"See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}function Dt(){return eu(k.querySelectorAll("[data-tippy-root]"))}function nr(P){w.clearDelayTimeouts(),P&&Bt("onTrigger",[w,P]),ae();var it=O(!0),at=rt(),wt=at[0],vt=at[1];ti.isTouch&&wt==="hold"&&vt&&(it=vt),it?n=setTimeout(function(){w.show()},it):w.show()}function Ge(P){if(w.clearDelayTimeouts(),Bt("onUntrigger",[w,P]),!w.state.isVisible){Se();return}if(!(w.props.trigger.indexOf("mouseenter")>=0&&w.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(P.type)>=0&&l)){var it=O(!1);it?a=setTimeout(function(){w.state.isVisible&&w.hide()},it):u=requestAnimationFrame(function(){w.hide()})}}function bi(){w.state.isEnabled=!0}function mr(){w.hide(),w.state.isEnabled=!1}function Gi(){clearTimeout(n),clearTimeout(a),cancelAnimationFrame(u)}function sr(P){if(process.env.NODE_ENV!=="production"&&Ei(w.state.isDestroyed,ns("setProps")),!w.state.isDestroyed){Bt("onBeforeUpdate",[w,P]),Pe();var it=w.props,at=Pf(r,Object.assign({},it,Df(P),{ignoreAttributes:!0}));w.props=at,Oe(),it.interactiveDebounce!==at.interactiveDebounce&&(se(),F=_f(Qt,at.interactiveDebounce)),it.triggerTarget&&!at.triggerTarget?is(it.triggerTarget).forEach(function(wt){wt.removeAttribute("aria-expanded")}):at.triggerTarget&&r.removeAttribute("aria-expanded"),be(),yt(),j&&j(it,at),w.popperInstance&&(ii(),Dt().forEach(function(wt){requestAnimationFrame(wt._tippy.popperInstance.forceUpdate)})),Bt("onAfterUpdate",[w,P])}}function Ye(P){w.setProps({content:P})}function Yi(){process.env.NODE_ENV!=="production"&&Ei(w.state.isDestroyed,ns("show"));var P=w.state.isVisible,it=w.state.isDestroyed,at=!w.state.isEnabled,wt=ti.isTouch&&!w.props.touch,vt=Ho(w.props.duration,0,ir.duration);if(!(P||it||at||wt)&&!ht().hasAttribute("disabled")&&(Bt("onShow",[w],!1),w.props.onShow(w)!==!1)){if(w.state.isVisible=!0,st()&&(k.style.visibility="visible"),yt(),ae(),w.state.isMounted||(k.style.transition="none"),st()){var fe=ft(),Me=fe.box,xr=fe.content;Wo([Me,xr],0)}_=function(){var ar;if(!(!w.state.isVisible||d)){if(d=!0,k.offsetHeight,k.style.transition=w.props.moveTransition,st()&&w.props.animation){var wn=ft(),Qi=wn.box,si=wn.content;Wo([Qi,si],vt),Sf([Qi,si],"visible")}Re(),be(),Cf(Yo,w),(ar=w.popperInstance)==null||ar.forceUpdate(),Bt("onMount",[w]),w.props.animation&&st()&&Gt(vt,function(){w.state.isShown=!0,Bt("onShown",[w])})}},ue()}}function Xi(){process.env.NODE_ENV!=="production"&&Ei(w.state.isDestroyed,ns("hide"));var P=!w.state.isVisible,it=w.state.isDestroyed,at=!w.state.isEnabled,wt=Ho(w.props.duration,1,ir.duration);if(!(P||it||at)&&(Bt("onHide",[w],!1),w.props.onHide(w)!==!1)){if(w.state.isVisible=!1,w.state.isShown=!1,d=!1,l=!1,st()&&(k.style.visibility="hidden"),se(),Se(),yt(!0),st()){var vt=ft(),fe=vt.box,Me=vt.content;w.props.animation&&(Wo([fe,Me],wt),Sf([fe,Me],"hidden"))}Re(),be(),w.props.animation?st()&&Vt(wt,w.unmount):w.unmount()}}function ni(P){process.env.NODE_ENV!=="production"&&Ei(w.state.isDestroyed,ns("hideWithInteractivity")),ct().addEventListener("mousemove",F),Cf(ru,F),F(P)}function wi(){process.env.NODE_ENV!=="production"&&Ei(w.state.isDestroyed,ns("unmount")),w.state.isVisible&&w.hide(),w.state.isMounted&&(Ai(),Dt().forEach(function(P){P._tippy.unmount()}),k.parentNode&&k.parentNode.removeChild(k),Yo=Yo.filter(function(P){return P!==w}),w.state.isMounted=!1,Bt("onHidden",[w]))}function bn(){process.env.NODE_ENV!=="production"&&Ei(w.state.isDestroyed,ns("destroy")),!w.state.isDestroyed&&(w.clearDelayTimeouts(),w.unmount(),Pe(),delete r._tippy,w.state.isDestroyed=!0,Bt("onDestroy",[w]))}}function ua(r,t){t===void 0&&(t={});var e=ir.plugins.concat(t.plugins||[]);process.env.NODE_ENV!=="production"&&(Ly(r),Ff(t,e)),Ny();var n=Object.assign({},t,{plugins:e}),a=_y(r);if(process.env.NODE_ENV!=="production"){var u=sa(n.content),l=a.length>1;Ei(u&&l,["tippy() was passed an Element as the `content` prop, but more than","one tippy instance was created by this invocation. This means the","content element will only be appended to the last tippy instance.",`
|
|
68
68
|
|
|
69
69
|
`,"Instead, pass the .innerHTML of the element, or use a function that","returns a cloned version of the element instead.",`
|
|
70
70
|
|
|
71
71
|
`,`1) content: element.innerHTML
|
|
72
|
-
`,"2) content: () => element.cloneNode(true)"].join(" "))}var c=a.reduce(function(f,d){var y=d&&Vy(d,n);return y&&f.push(y),f},[]);return sa(r)?c[0]:c}ua.defaultProps=ir,ua.setDefaultProps=ky,ua.currentInput=ti,Object.assign({},nf,{effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow)}}),ua.setDefaultProps({render:Hf});let $y=0;const $i=ua(document.body,{theme:"translucent",animation:"scale",inertia:!0,delay:[200,100],content:"",allowHTML:!0,placement:"left-start",trigger:"manual",arrow:!0});class Xo{constructor(t,e){this.container=t,this.text=e,t?this.container=t:this.container=document.getElementsByTagName("body")[0],this.text=e}name="Label";id="Label"+$y++;el;position=new Y;get isMounted(){return $i.state.isMounted}get isShown(){return $i.state.isShown}destroy(){this.text="",this.position.identity()}setHtml(t=""){return this.text=t,this}update(t){t&&(this.position.copy(t),$i.show())}async show(t){if(t)return await this.hide(),this.position.copy(t),$i.setContent(this.text),$i.setProps({getReferenceClientRect:()=>({width:0,height:0,right:this.position.x,left:this.position.x,bottom:this.position.y,top:this.position.y,x:this.position.x,y:this.position.y,toJSON(){}})}),$i.clearDelayTimeouts(),$i.show(),new Promise(e=>{Mt.delay(function(){e()},300)})}async hide(){return $i.hide(),new Promise(t=>{Mt.delay(function(){t()},100)})}}let zy=0;class Gy extends Ir{name="DummyPoint";id="dummyPoint"+zy++;container;offset=new Y;el;label;radius=10;position=new Y;worldPosition=new Y;userData;constructor(t,e){var a,u;super(),t?this.container=t:this.container=document.getElementsByTagName("body")[0];let n=this.container.getBoundingClientRect();this.offset.set(n.left,n.top),this.userData=e,(a=this.userData)!=null&&a.type||Mt.set(this,"userData.type",gn.DEFAULT),this.initDom(),this.setType((u=this.userData)==null?void 0:u.type),this.mount(),this.initLabel()}destroy(){var t;super.destroy(),this.unmount(),(t=this.label)==null||t.destroy()}get isMounted(){var t;return!!((t=this.el)!=null&&t.parentNode)}mount(){var t;this.el&&((t=this.el)!=null&&t.parentNode||this.container.appendChild(this.el))}unmount(){var t,e,n,a;(e=(t=this.el)==null?void 0:t.parentNode)==null||e.removeChild(this.el),(n=this.el)==null||n.remove(),(a=this.label)==null||a.hide()}setText(t=""){return this.el?(this.el.innerText=t,this):this}initDom(){var t;this.el=document.createElement("div"),this.el.setAttribute("id",this.id),this.el.setAttribute("class","dummy-point"),this.el.setAttribute(Kn+"-id",(t=this.userData)==null?void 0:t.value)}initLabel(){var t;(t=this.userData)!=null&&t.label&&(this.label=new Xo(this.container,this.userData.label))}setActive(t){return t?(Xs(this.el,"active"),this.showLabel()):(Zs(this.el,"active"),this.hideLabel()),this}showLabel(){var t;(t=this.label)==null||t.show(Yy.copy(this.position).add(this.offset).subScalar(this.radius))}hideLabel(){var t;(t=this.label)==null||t.hide()}setType(t){var n;if(!this.userData)return this;const e=(n=this.userData)==null?void 0:n.type;return t||(t=gn.DEFAULT),e&&Za(this.el,e)&&Zs(this.el,e),this.userData.type=t,Xs(this.el,this.userData.type),this}update(t,e=!1){!t||!this.isMounted||(e||t.subScalar(this.radius).round(),this.position.copy(t),this.el.style.transform=`translate3D(${this.position.x}px, ${this.position.y}px, 0)`)}}const Yy=new Y;let Xy=0;class Zy extends Ir{name="DummyRect";id="dummyRect"+Xy++;container;offset=new Y;el;radius=10;position=new Y;worldPosition=new Y;label;userData;constructor(t,e){super(),t?this.container=t:this.container=document.getElementsByTagName("body")[0];let n=this.container.getBoundingClientRect();this.offset.set(n.left,n.top),this.userData=e,this.initDom(),this.mount(),this.initLabel()}destroy(){var t;super.destroy(),this.unmount(),(t=this.label)==null||t.destroy()}get isMounted(){var t;return!!((t=this.el)!=null&&t.parentNode)}mount(){this.container.appendChild(this.el)}unmount(){var t,e,n,a;this.setText(""),(e=(t=this.el)==null?void 0:t.parentNode)==null||e.removeChild(this.el),(n=this.el)==null||n.remove(),(a=this.label)==null||a.hide()}initDom(){var t;this.el=document.createElement("div"),this.el.setAttribute("id",this.id),this.el.setAttribute("class","dummy-rect"),this.el.setAttribute(Kn+"-id",((t=this.userData)==null?void 0:t.rmId)||"undefined")}initLabel(){this.label=new Xo(this.container,"")}setText(t=""){return this.el.innerText=t,this}setActive(t){return t?Xs(this.el,"active"):Zs(this.el,"active"),this}showLabel(){var t;(t=this.label)==null||t.show(Qy.copy(this.position).add(this.offset).subScalar(this.radius))}hideLabel(){var t;(t=this.label)==null||t.hide()}setType(t){var n;if(!this.userData)return this;const e=(n=this.userData)==null?void 0:n.type;return t=gn.DEFAULT,e&&Za(this.el,e)&&Zs(this.el,e),this.userData.type=t,Xs(this.el,this.userData.type),this}update(t,e=!1){!t||!this.isMounted||(e||t.subScalar(this.radius).round(),this.position.copy(t),this.el.style.transform=`translate3D(${this.position.x}px, ${this.position.y}px, 0)`)}}const Qy=new Y;class jy extends Ir{name="Dummies";container;controller;scene;viewMatrix=new re;dummies=[];rmMap=new Map;mergedMap=new Map;cameraUpdateHandler=this.handleCameraUpdate.bind(this);controllerTapHandler=this.handleControllerTap.bind(this);constructor(t,e){super(),this.container=t,this.controller=e,this.bindEvents()}destroy(){this.unbindEvents(),super.destroy(),this.clearDummies()}bindEvents(){this.controller.camera.addEventListener(Qa.UPDATE,this.cameraUpdateHandler),this.controller.addEventListener(_t.TAP,this.controllerTapHandler)}unbindEvents(){this.controller.camera.removeEventListener(Qa.UPDATE,this.cameraUpdateHandler),this.controller.removeEventListener(_t.TAP,this.controllerTapHandler)}bindScene(t){this.scene=t}update(t){var e,n,a;if(t){this.viewMatrix.copy(t);for(let u=0,l=(this.dummies||[]).length;u<l;u++){const c=this.dummies[u],f=(n=this.scene)==null?void 0:n.getElementById((e=c.userData)==null?void 0:e.rmId);if(f){const d=(a=this.scene)==null?void 0:a.chef.getElementBoundingBox(f.id);d==null||d.getCenter(zi),zi.applyMatrix3(this.viewMatrix).round(),c.position.copy(zi)}else zi.copy(c.worldPosition).applyMatrix3(this.viewMatrix).round(),c.update(zi)}this.mergeDummies()}}setDummies(t){this.clearDummies();for(let e=0,n=(t||[]).length;e<n;e++)this.addDummy(t[e])}addDummy(t){var a,u;const e=new Gy(this.container,t);this.dummies.push(e);const n=(a=e.userData)==null?void 0:a.rmId;return n&&(this.rmMap.has(n)||this.rmMap.set(n,[]),(u=this.rmMap.get(n))==null||u.push(e)),e}removeDummy(t){var a;const e=this.dummies.indexOf(t);e>-1&&this.dummies.splice(e,1);const n=(a=t.userData)==null?void 0:a.rmId;if(n){const u=this.mergedMap.get(n);u==null||u.destroy(),this.mergedMap.delete(n);const l=this.rmMap.get(n);if(!l)return;if(l.length===1)this.rmMap.delete(n);else{const c=l.indexOf(t);c>-1&&(l.splice(c,1),this.rmMap.set(n,l))}}t.destroy()}clearDummies(t){var e,n,a;for(let u=(((e=this.dummies)==null?void 0:e.length)||0)-1;u>=0;u--){const l=this.dummies[u];(!t||(n=l==null?void 0:l.userData)!=null&&n.type&&(t!=null&&t.includes((a=l.userData)==null?void 0:a.type)))&&this.removeDummy(l)}t||(this.dummies.length=0,this.mergedMap.clear(),this.rmMap.clear())}mergeDummies(){this.rmMap.forEach((t,e)=>{var a,u,l,c;if((a=this.scene)==null?void 0:a.getElementById(e)){const f=(u=this.scene)==null?void 0:u.chef.getElementBoundingBox(e);if(!f)return;Zo.copy(f).applyMatrix3(this.viewMatrix).round(),Zo.getSize(zi);const d=t[0].radius,y=Zo.centralArrange(t.length,d*2,d*2);if(zi.x<d*3||zi.y<d*3){t.forEach(_=>_.unmount());const A=this.mergedMap.get(e);A==null||A.unmount()}else if(Array.isArray(y))this.mergedMap.has(e)&&((l=this.mergedMap.get(e))==null||l.unmount()),t.forEach((A,_)=>{A.isMounted||A.mount(),A.update(y[_])});else{t.forEach(C=>C.unmount());let A=this.mergedMap.get(e);if(A)A.isMounted||A.mount();else{const C=Mt.cloneDeep(t[0].userData)||{},F=Mt.reduce(t,(M,R)=>{var q,z;return(q=R.userData)!=null&&q.label&&M.push((z=R.userData)==null?void 0:z.label),M},[]);C.label=F.join(", ");const N=Mt.reduce(t,(M,R)=>{var q,z;return(q=R.userData)!=null&&q.value&&M.push((z=R.userData)==null?void 0:z.value),M},[]);C.value=N.join(","),C.rmId=e,A=new Zy(this.container,C),this.mergedMap.set(e,A)}A.setText(t.length.toString());const _=Mt.reduce(t,(C,F)=>{var N,M;return(N=F.userData)!=null&&N.label&&C.push((M=F.userData)==null?void 0:M.label),C},[]);(c=A.label)==null||c.setHtml(_.join(", <br />")),A.update(t[0].position)}}})}getDummyById(t){return this.dummies.find(e=>{var n;return((n=e.userData)==null?void 0:n.value)===t})}setActiveByIds(t){var e,n;if(this.resetActives(),!!t&&(Array.isArray(t)||(t=[t]),!!(t!=null&&t.length)))for(let a=0,u=t.length;a<u;a++){const l=this.getDummyById(t[a]);if(l&&l.setActive(!0),l&&((e=l.userData)!=null&&e.rmId)){const c=this.mergedMap.get((n=l.userData)==null?void 0:n.rmId);c&&c.setActive(!0)}}}resetActives(){this.dummies.forEach(t=>t.setActive(!1)),this.mergedMap.forEach(t=>t.setActive(!1))}showDummyLabel(t){if(!t)return;const e=this.getDummyById(t);e&&e.showLabel();const n=this.mergedMap.get(t);n&&n.showLabel()}async hideDummyLabel(){this.dummies.forEach(t=>t.hideLabel()),this.mergedMap.forEach(t=>t.hideLabel())}handleCameraUpdate(){this.update(this.controller.camera.viewMatrix)}handleControllerTap(t){var a,u,l,c,f;if((t==null?void 0:t.type)!==_t.TAP)return;const e=((a=t==null?void 0:t.e)==null?void 0:a.target)||((l=(u=t==null?void 0:t.e)==null?void 0:u.srcEvent)==null?void 0:l.target)||((f=(c=t==null?void 0:t.e)==null?void 0:c.srcEvent)==null?void 0:f.srcElement),n=e==null?void 0:e.getAttribute(Kn+"-id");n&&console.warn("【TODO】handleControllerTap: ",n)}}const zi=new Y,Zo=new St;(function(){return window[Wi.prefixed(window,"requestAnimationFrame")]||function(r){window.setTimeout(r,1e3/60)}})();class Ky extends Ir{name="DragController";dragFake=!1;container;offset=new Y;controller;scene;raycaster;dummies;_els=[];_hms=new Map;_vos=new Map;_elMap=new Map;_panType=gn.SUCCESS;onPanHandler=this.handleOnPan.bind(this);panEndHandler=Mt.debounce(this.handlePanEnd.bind(this),500);constructor(t,e,n=!0){super(),this.container=t;let a=this.container.getBoundingClientRect();this.offset.set(a.left,a.top),this.controller=e,this.dummies=new jy(t,e),this.raycaster=new h2,this.dragFake=n}destroy(){var t;super.destroy();for(let e=(((t=this._els)==null?void 0:t.length)||0)-1;e>=0;e--)this.drop(this._els[e]);this.dummies.destroy()}bindScene(t){var e;this.scene=t,(e=this.dummies)==null||e.bindScene(t)}drag(t,e){t&&(this._els.includes(t)||(this.bindEvent(t),this._els.push(t),this._vos.set(t,e)))}drop(t){if(!t)return;this.unbindEvent(t),this._vos.delete(t),this._elMap.delete(t);const e=this._els.findIndex(n=>n===t);e>-1&&this._els.splice(e,1)}bindEvent(t){if(!t)return;const e=new Wi.Manager(t,{domEvents:!0});e.add(new Wi.Pan({threshold:0,pointers:0})),e.on(["panstart","panmove","panend"].join(" "),this.onPanHandler),this._hms.set(t,e)}unbindEvent(t){if(!t)return;const e=this._hms.get(t);e&&(e.off(["panstart","panmove","panend"].join(" "),this.onPanHandler),e.destroy(),this._hms.delete(t))}handleOnPan(t){if(typeof t.preventDefault=="function"&&t.preventDefault(),typeof t.srcEvent.stopPropagation=="function"&&t.srcEvent.stopPropagation(),typeof t.srcEvent.stopImmediatePropagation=="function"&&t.srcEvent.stopImmediatePropagation(),!this.controller)return;t.type==="panstart"||t.isFirst?this.controller.enablePan=!1:t.type==="panmove"||t.type==="panend"&&(this.controller.enablePan=!0);const e=this._vos.get(t.target);if(!e)return;const n=Mt.cloneDeep(e);n.type=this._panType;const a=this._getDummy(t.target,n);oa.set(t.center.x,t.center.y).sub(this.offset),a.worldPosition.copy(oa).unproject(this.controller.camera),a.update(oa),this.panEndHandler({type:"panend",e:t})}handlePanEnd(t){if((t==null?void 0:t.type)!=="panend")return;const e=this.getDummies(!0);this.dispatchEvent({type:"panend",data:e})}getDummies(t=!0){const e=[];return this._els.forEach(n=>{var u;let a=this._vos.get(n);if(!(!a||a.type!==gn.SUCCESS)){if(t){const l=this._elMap.get(n);if(!l||!this.controller.camera)return;oa.copy(l.position),this.raycaster.setFromCamera(oa,this.controller.camera);const c=[];if((u=this.scene)==null||u.getIntersectObjects(this.raycaster,er.RM,c),!(c!=null&&c.length))return;a=Mt.cloneDeep(a),a.rmId=c[0].id}e.push(a)}}),e}setDummiesByVos(t){var e,n;for(let a=0,u=(t||[]).length;a<u;a++){const l=(e=this.dummies)==null?void 0:e.addDummy(t[a]);if(!l)continue;const c=Mt.cloneDeep(t[a]);delete c.rmId,delete c.wsId,this.drag(l.el,c)}(n=this.dummies)==null||n.update(this.controller.camera.viewMatrix)}clearDummies(t){var e,n;for(let a=(((e=this._els)==null?void 0:e.length)||0)-1;a>=0;a--){const u=this._vos.get(this._els[a]);(!t||t&&(u!=null&&u.type)&&t.includes(u.type))&&this.drop(this._els[a])}(n=this.dummies)==null||n.clearDummies(t)}getDummyById(t){return this.dummies.getDummyById(t)}highlightDummies(t){var e;(e=this.dummies)==null||e.setActiveByIds(t)}resetHighlightDummies(){var t;(t=this.dummies)==null||t.resetActives()}showDummyLabel(t){var e;(e=this.dummies)==null||e.showDummyLabel(t)}start(){}_getDummy(t,e){let n=this._elMap.get(t);if(n||(n=this.dummies.addDummy(e).setType(gn.SUCCESS),this._elMap.set(t,n)),n.isMounted||n.mount(),this.dummies.dummies.includes(n)||this.dummies.dummies.push(n),!this._elMap.get(n.el)){this._elMap.set(n.el,n);const u=Mt.cloneDeep(e);delete u.rmId,delete u.wsId,this.drag(n.el,u)}return n}}const oa=new Y;var ss=Object.freeze({Linear:Object.freeze({None:function(r){return r},In:function(r){return r},Out:function(r){return r},InOut:function(r){return r}}),Quadratic:Object.freeze({In:function(r){return r*r},Out:function(r){return r*(2-r)},InOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)}}),Cubic:Object.freeze({In:function(r){return r*r*r},Out:function(r){return--r*r*r+1},InOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)}}),Quartic:Object.freeze({In:function(r){return r*r*r*r},Out:function(r){return 1- --r*r*r*r},InOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)}}),Quintic:Object.freeze({In:function(r){return r*r*r*r*r},Out:function(r){return--r*r*r*r*r+1},InOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)}}),Sinusoidal:Object.freeze({In:function(r){return 1-Math.sin((1-r)*Math.PI/2)},Out:function(r){return Math.sin(r*Math.PI/2)},InOut:function(r){return .5*(1-Math.sin(Math.PI*(.5-r)))}}),Exponential:Object.freeze({In:function(r){return r===0?0:Math.pow(1024,r-1)},Out:function(r){return r===1?1:1-Math.pow(2,-10*r)},InOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)}}),Circular:Object.freeze({In:function(r){return 1-Math.sqrt(1-r*r)},Out:function(r){return Math.sqrt(1- --r*r)},InOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)}}),Elastic:Object.freeze({In:function(r){return r===0?0:r===1?1:-Math.pow(2,10*(r-1))*Math.sin((r-1.1)*5*Math.PI)},Out:function(r){return r===0?0:r===1?1:Math.pow(2,-10*r)*Math.sin((r-.1)*5*Math.PI)+1},InOut:function(r){return r===0?0:r===1?1:(r*=2,r<1?-.5*Math.pow(2,10*(r-1))*Math.sin((r-1.1)*5*Math.PI):.5*Math.pow(2,-10*(r-1))*Math.sin((r-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(r){var t=1.70158;return r===1?1:r*r*((t+1)*r-t)},Out:function(r){var t=1.70158;return r===0?0:--r*r*((t+1)*r+t)+1},InOut:function(r){var t=2.5949095;return(r*=2)<1?.5*(r*r*((t+1)*r-t)):.5*((r-=2)*r*((t+1)*r+t)+2)}}),Bounce:Object.freeze({In:function(r){return 1-ss.Bounce.Out(1-r)},Out:function(r){return r<1/2.75?7.5625*r*r:r<2/2.75?7.5625*(r-=1.5/2.75)*r+.75:r<2.5/2.75?7.5625*(r-=2.25/2.75)*r+.9375:7.5625*(r-=2.625/2.75)*r+.984375},InOut:function(r){return r<.5?ss.Bounce.In(r*2)*.5:ss.Bounce.Out(r*2-1)*.5+.5}}),generatePow:function(r){return r===void 0&&(r=4),r=r<Number.EPSILON?Number.EPSILON:r,r=r>1e4?1e4:r,{In:function(t){return Math.pow(t,r)},Out:function(t){return 1-Math.pow(1-t,r)},InOut:function(t){return t<.5?Math.pow(t*2,r)/2:(1-Math.pow(2-t*2,r))/2+.5}}}}),as=function(){return performance.now()},qf=function(){function r(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._tweens={},this._tweensAddedDuringUpdate={},this.add.apply(this,t)}return r.prototype.getAll=function(){var t=this;return Object.keys(this._tweens).map(function(e){return t._tweens[e]})},r.prototype.removeAll=function(){this._tweens={}},r.prototype.add=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];for(var a=0,u=e;a<u.length;a++){var l=u[a];(t=l._group)===null||t===void 0||t.remove(l),l._group=this,this._tweens[l.getId()]=l,this._tweensAddedDuringUpdate[l.getId()]=l}},r.prototype.remove=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=0,a=t;n<a.length;n++){var u=a[n];u._group=void 0,delete this._tweens[u.getId()],delete this._tweensAddedDuringUpdate[u.getId()]}},r.prototype.allStopped=function(){return this.getAll().every(function(t){return!t.isPlaying()})},r.prototype.update=function(t,e){t===void 0&&(t=as()),e===void 0&&(e=!0);var n=Object.keys(this._tweens);if(n.length!==0)for(;n.length>0;){this._tweensAddedDuringUpdate={};for(var a=0;a<n.length;a++){var u=this._tweens[n[a]],l=!e;u&&u.update(t,l)===!1&&!e&&this.remove(u)}n=Object.keys(this._tweensAddedDuringUpdate)}},r}(),xn={Linear:function(r,t){var e=r.length-1,n=e*t,a=Math.floor(n),u=xn.Utils.Linear;return t<0?u(r[0],r[1],n):t>1?u(r[e],r[e-1],e-n):u(r[a],r[a+1>e?e:a+1],n-a)},Bezier:function(r,t){for(var e=0,n=r.length-1,a=Math.pow,u=xn.Utils.Bernstein,l=0;l<=n;l++)e+=a(1-t,n-l)*a(t,l)*r[l]*u(n,l);return e},CatmullRom:function(r,t){var e=r.length-1,n=e*t,a=Math.floor(n),u=xn.Utils.CatmullRom;return r[0]===r[e]?(t<0&&(a=Math.floor(n=e*(1+t))),u(r[(a-1+e)%e],r[a],r[(a+1)%e],r[(a+2)%e],n-a)):t<0?r[0]-(u(r[0],r[0],r[1],r[1],-n)-r[0]):t>1?r[e]-(u(r[e],r[e],r[e-1],r[e-1],n-e)-r[e]):u(r[a?a-1:0],r[a],r[e<a+1?e:a+1],r[e<a+2?e:a+2],n-a)},Utils:{Linear:function(r,t,e){return(t-r)*e+r},Bernstein:function(r,t){var e=xn.Utils.Factorial;return e(r)/e(t)/e(r-t)},Factorial:function(){var r=[1];return function(t){var e=1;if(r[t])return r[t];for(var n=t;n>1;n--)e*=n;return r[t]=e,e}}(),CatmullRom:function(r,t,e,n,a){var u=(e-r)*.5,l=(n-t)*.5,c=a*a,f=a*c;return(2*t-2*e+u+l)*f+(-3*t+3*e-2*u-l)*c+u*a+t}}},Qo=function(){function r(){}return r.nextId=function(){return r._nextId++},r._nextId=0,r}(),jo=new qf,Jy=function(){function r(t,e){this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=ss.Linear.None,this._interpolationFunction=xn.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=Qo.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1,this._object=t,typeof e=="object"?(this._group=e,e.add(this)):e===!0&&(this._group=jo,jo.add(this))}return r.prototype.getId=function(){return this._id},r.prototype.isPlaying=function(){return this._isPlaying},r.prototype.isPaused=function(){return this._isPaused},r.prototype.getDuration=function(){return this._duration},r.prototype.to=function(t,e){if(e===void 0&&(e=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=t,this._propertiesAreSetUp=!1,this._duration=e<0?0:e,this},r.prototype.duration=function(t){return t===void 0&&(t=1e3),this._duration=t<0?0:t,this},r.prototype.dynamic=function(t){return t===void 0&&(t=!1),this._isDynamic=t,this},r.prototype.start=function(t,e){if(t===void 0&&(t=as()),e===void 0&&(e=!1),this._isPlaying)return this;if(this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var n in this._valuesStartRepeat)this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=t,this._startTime+=this._delayTime,!this._propertiesAreSetUp||e){if(this._propertiesAreSetUp=!0,!this._isDynamic){var a={};for(var u in this._valuesEnd)a[u]=this._valuesEnd[u];this._valuesEnd=a}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,e)}return this},r.prototype.startFromCurrentValues=function(t){return this.start(t,!0)},r.prototype._setupProperties=function(t,e,n,a,u){for(var l in n){var c=t[l],f=Array.isArray(c),d=f?"array":typeof c,y=!f&&Array.isArray(n[l]);if(!(d==="undefined"||d==="function")){if(y){var A=n[l];if(A.length===0)continue;for(var _=[c],C=0,F=A.length;C<F;C+=1){var N=this._handleRelativeValue(c,A[C]);if(isNaN(N)){y=!1,console.warn("Found invalid interpolation list. Skipping.");break}_.push(N)}y&&(n[l]=_)}if((d==="object"||f)&&c&&!y){e[l]=f?[]:{};var M=c;for(var R in M)e[l][R]=M[R];a[l]=f?[]:{};var A=n[l];if(!this._isDynamic){var q={};for(var R in A)q[R]=A[R];n[l]=A=q}this._setupProperties(M,e[l],A,a[l],u)}else(typeof e[l]>"u"||u)&&(e[l]=c),f||(e[l]*=1),y?a[l]=n[l].slice().reverse():a[l]=e[l]||0}}},r.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},r.prototype.end=function(){return this._goToEnd=!0,this.update(this._startTime+this._duration),this},r.prototype.pause=function(t){return t===void 0&&(t=as()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=t,this)},r.prototype.resume=function(t){return t===void 0&&(t=as()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=t-this._pauseStart,this._pauseStart=0,this)},r.prototype.stopChainedTweens=function(){for(var t=0,e=this._chainedTweens.length;t<e;t++)this._chainedTweens[t].stop();return this},r.prototype.group=function(t){return t?(t.add(this),this):(console.warn("tween.group() without args has been removed, use group.add(tween) instead."),this)},r.prototype.remove=function(){var t;return(t=this._group)===null||t===void 0||t.remove(this),this},r.prototype.delay=function(t){return t===void 0&&(t=0),this._delayTime=t,this},r.prototype.repeat=function(t){return t===void 0&&(t=0),this._initialRepeat=t,this._repeat=t,this},r.prototype.repeatDelay=function(t){return this._repeatDelayTime=t,this},r.prototype.yoyo=function(t){return t===void 0&&(t=!1),this._yoyo=t,this},r.prototype.easing=function(t){return t===void 0&&(t=ss.Linear.None),this._easingFunction=t,this},r.prototype.interpolation=function(t){return t===void 0&&(t=xn.Linear),this._interpolationFunction=t,this},r.prototype.chain=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this._chainedTweens=t,this},r.prototype.onStart=function(t){return this._onStartCallback=t,this},r.prototype.onEveryStart=function(t){return this._onEveryStartCallback=t,this},r.prototype.onUpdate=function(t){return this._onUpdateCallback=t,this},r.prototype.onRepeat=function(t){return this._onRepeatCallback=t,this},r.prototype.onComplete=function(t){return this._onCompleteCallback=t,this},r.prototype.onStop=function(t){return this._onStopCallback=t,this},r.prototype.update=function(t,e){var n=this,a;if(t===void 0&&(t=as()),e===void 0&&(e=r.autoStartOnUpdate),this._isPaused)return!0;var u;if(!this._goToEnd&&!this._isPlaying)if(e)this.start(t,!0);else return!1;if(this._goToEnd=!1,t<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var l=t-this._startTime,c=this._duration+((a=this._repeatDelayTime)!==null&&a!==void 0?a:this._delayTime),f=this._duration+this._repeat*c,d=function(){if(n._duration===0||l>f)return 1;var N=Math.trunc(l/c),M=l-N*c,R=Math.min(M/n._duration,1);return R===0&&l===n._duration?1:R},y=d(),A=this._easingFunction(y);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,A),this._onUpdateCallback&&this._onUpdateCallback(this._object,y),this._duration===0||l>=this._duration)if(this._repeat>0){var _=Math.min(Math.trunc((l-this._duration)/c)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=_);for(u in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[u]=="string"&&(this._valuesStartRepeat[u]=this._valuesStartRepeat[u]+parseFloat(this._valuesEnd[u])),this._yoyo&&this._swapEndStartRepeatValues(u),this._valuesStart[u]=this._valuesStartRepeat[u];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=c*_,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var C=0,F=this._chainedTweens.length;C<F;C++)this._chainedTweens[C].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},r.prototype._updateProperties=function(t,e,n,a){for(var u in n)if(e[u]!==void 0){var l=e[u]||0,c=n[u],f=Array.isArray(t[u]),d=Array.isArray(c),y=!f&&d;y?t[u]=this._interpolationFunction(c,a):typeof c=="object"&&c?this._updateProperties(t[u],l,c,a):(c=this._handleRelativeValue(l,c),typeof c=="number"&&(t[u]=l+(c-l)*a))}},r.prototype._handleRelativeValue=function(t,e){return typeof e!="string"?e:e.charAt(0)==="+"||e.charAt(0)==="-"?t+parseFloat(e):parseFloat(e)},r.prototype._swapEndStartRepeatValues=function(t){var e=this._valuesStartRepeat[t],n=this._valuesEnd[t];typeof n=="string"?this._valuesStartRepeat[t]=this._valuesStartRepeat[t]+parseFloat(n):this._valuesStartRepeat[t]=this._valuesEnd[t],this._valuesEnd[t]=e},r.autoStartOnUpdate=!1,r}(),tv="25.0.0",ev=Qo.nextId,ei=jo,rv=ei.getAll.bind(ei),iv=ei.removeAll.bind(ei),nv=ei.add.bind(ei),sv=ei.remove.bind(ei),av=ei.update.bind(ei),iu={Easing:ss,Group:qf,Interpolation:xn,now:as,Sequence:Qo,nextId:ev,Tween:Jy,VERSION:tv,getAll:rv,removeAll:iv,add:nv,remove:sv,update:av};class uv{name="View";params;visible=!0;cvs;scene;scenes=[];camera;controller;tween;animateDuration;constructor(t={}){this.params=t,this.animateDuration=this.params.animateDuration||300,this.cvs=t.cvs,this.camera=new jc(t.camera||{})}destroy(){this.controller&&this.controller.destroy(),this.camera&&this.camera.destroy(),this.scene&&this.scene.destroy(),this.scenes.forEach(t=>t.destroy()),this.scenes.length=0}bindScene(t){this.scenes.push(t),this.reset(),this.scene=t,t.isStatic}saveCameraPosition(t){us.copy(this.camera.boundingBoxWorld);const e=t?vr+t:vr;sessionStorage.setItem(e,JSON.stringify(us))}clearCameraPosition(t){const e=t?vr+t:vr;sessionStorage.setItem(e,"")}restoreCameraPosition(t){const e=t?vr+t:vr,n=sessionStorage.getItem(e);n&&(us.copy(JSON.parse(n)),this.resetCameraByBoundingBox(us,!0))}fullscreen(t=10,e=!1){this.scene&&(this.scene.boundingBox.isEmpty()&&this.scene.computeBoundingBox(),us.copy(this.scene.boundingBox).expandByVector(nu.set(t,t)),this.resetCameraByBoundingBox(us,e))}handleCameraChanged(t){console.warn("handleCameraChanged: ",t.target.camera.position.z,t.target.camera.scaled.x)}reset(){}async resetCameraByBoundingBox(t,e=!1){if(!this.camera)return;if(!t||t.isEmpty())throw new Error("BoundingBox empty");if(!e)return this.camera.setByBox(t),Promise.resolve();const n=this.camera.getCameraPosition();t.getCenter(nu),t.getSize(Ko);const a=Math.max(Ko.x/this.camera.width,Ko.y/this.camera.height),u={x:nu.x,y:nu.y,z:0,s:a,r:0};await this.animateCamera(n,u)}async animateCamera(t,e){return this.controller&&(this.controller.enabled=!1),this.tween&&this.tween.stop(),new Promise(n=>{this.tween=new iu.Tween(t).to(e,this.animateDuration).easing(iu.Easing.Exponential.Out).onUpdate(a=>{this.camera.position.set(a.x,a.y),this.camera.scaled.set(a.s,a.s),this.camera.rotation.set(a.r,a.r),this.camera.update()}).onComplete(()=>{this.controller&&(this.controller.enabled=!0),n()}).start()})}computeBoundingBox(t,e=new St){return!t||!t.length||(e.makeEmpty(),t.forEach(n=>e.union(n.computeBoundingBox()))),e}expandScenesBoundingBox(t,e=new St){t.forEach(n=>n.boundingBox.union(e))}update(t){this.tween&&this.tween.update(t)}}const vr="camera_position_",nu=new Y,Ko=new Y,us=new St;class ov extends Ir{name="SvgView";params;container;offset=new Y;camera;controller;scene;p1=new Y;p2=new Y;graph;multiSelector;dummiesController;zoomToSelectEnable=!1;zoomBox=new St;selectEnable=!1;multiSelectEnable=!1;tween;animateDuration;label;controllerPanStartHandler=this.handlePanStart.bind(this);controllerPanEndHandler=this.handlePanEnd.bind(this);controllerWheelStartHandler=this.handlePanStart.bind(this);controllerWheelEndHandler=this.handlePanEnd.bind(this);controllerPanMoveHandler=this.handleControllerPanMove.bind(this);controllerPointerOverHandler=this.handleControllerPointerOver.bind(this);multiSelectorSelectedHandler=this.handleMultiSelectorSelected.bind(this);_currentAssetId;constructor(t={}){super(),this.params=t,this.params.zoomToSelectEnable&&(this.zoomToSelectEnable=!0),this.params.selectEnable&&(this.selectEnable=!0),this.params.multiSelectEnable&&(this.multiSelectEnable=!0),this.params.camera||(this.params.camera={}),this.params.camera.flipY=!0,this.animateDuration=this.params.animateDuration||300,this.camera=new jc(this.params.camera),this.container=this.params.containerId?document.getElementById(this.params.containerId):Zt.window.document.getElementsByTagName("body")[0];let e=this.container.getBoundingClientRect();this.offset.set(e.left,e.top),this.controller=new Qc(this.container,this.camera,!0),this.graph=new Kc(this.container),this.multiSelector=new l2(this.container,this.controller),this.dummiesController=new Ky(this.container,this.controller),this.bindControllerEvents(),this.initLabel()}destroy(){var t;this.unbindControllerEvents(),super.destroy(),(t=this.label)==null||t.destroy()}initLabel(){this.label=new Xo(this.container,"")}showAssetsLabel(t,e,n){var u,l,c,f,d;if(!e)return;t||(t=(u=this.scene)==null?void 0:u.assetType);const a=(l=this.scene)==null?void 0:l.chef.getElementBoundingBox(e);a&&!a.isEmpty()&&(n||(n=(c=this.scene)==null?void 0:c.getAssetLabelById(t,e),n||(n=e)),(f=this.label)==null||f.setHtml(n),En.copy(a.min).applyMatrix3(this.camera.viewMatrix).add(this.offset).round(),(d=this.label)==null||d.show(En))}async hideAssetsLabel(){var t;return(t=this.label)==null?void 0:t.hide()}bindScene(t){var e;this.scene=t,this.multiSelector.bindScene(this.scene),(e=this.dummiesController)==null||e.bindScene(this.scene)}async setByBox(t,e=!0){await this.resetCameraByBoundingBox(t,e)}zoomIn(){this.controller.scaled=this.camera.scaled.x*.9,this.controller.update()}zoomOut(){this.controller.scaled=this.camera.scaled.x*1.1,this.controller.update()}zoomToSelectEnableChanged(t){console.log("TODO: zoomToSelectEnableChanged: ",t),this.zoomToSelectEnable=t,this.controller.enablePan=!this.zoomToSelectEnable}selectEnableChanged(t){this.selectEnable=!!t,this.multiSelector.selectEnableChanged(t)}multiSelectEnableChanged(t){this.multiSelectEnable=!!t,this.multiSelector.multiSelectEnableChanged(t)}getIntersectObjects(t,e,n=[]){return this.scene?this.scene.getIntersectObjects(t,e,n):n}async focusAt(t,e=500){return this.camera?(zt.setFromCenterAndSize(t,En.set(e*2,e*2)),this.resetCameraByBoundingBox(zt,!0)):Promise.resolve()}async focusAtById(t,e=500){var a;const n=(a=this.scene)==null?void 0:a.getBoundingBoxById(t);if(console.log("focusAtById: ",t,n==null?void 0:n.toString()),n){n.expandByScalar(e),zt.copy(this.camera.boundingBoxWorld),zt.containsBox(n)||await this.resetCameraByBoundingBox(n,!0);return}}async focusAtDummy(t,e=500){var u,l;const n=this.dummiesController.getDummyById(t),a=(u=n==null?void 0:n.userData)==null?void 0:u.rmId;if(a){const c=(l=this.scene)==null?void 0:l.getBoundingBoxById(a);if(c){c.expandByScalar(e),zt.copy(this.camera.boundingBoxWorld),zt.containsBox(c)||await this.resetCameraByBoundingBox(c,!0);return}}if(n!=null&&n.position&&!(n!=null&&n.position.isEmpty())){zt.setFromCenterAndSize(n.worldPosition,En.set(e*2,e*2)),this.camera.boundingBoxWorld.containsBox(zt)||await this.resetCameraByBoundingBox(zt,!0);return}}async resetCameraByBoundingBox(t,e=!1){if(!this.camera)return Promise.resolve();if(!t||t.isEmpty())throw new Error("BoundingBox empty");if(!e)return this.camera.setByBox(t),Promise.resolve();const n=this.camera.getCameraPosition();t.getCenter(En),t.getSize(Jo);const a=Math.max(Jo.x/this.camera.width,Jo.y/this.camera.height),u={x:En.x,y:En.y,z:0,s:a,r:0};await this.animateCamera(n,u)}async animateCamera(t,e){return this.controller&&(this.controller.enabled=!1),this.tween&&this.tween.stop(),new Promise(n=>{this.tween=new iu.Tween(t).to(e,this.animateDuration).easing(iu.Easing.Exponential.Out).onUpdate(a=>{this.camera.position.set(a.x,a.y),this.camera.scaled.set(a.s,a.s),this.camera.rotation.set(a.r,a.r),this.camera.update()}).onComplete(()=>{this.controller&&(this.controller.enabled=!0),n()}).start()})}fullscreen(){this.scene&&(this.scene&&!this.scene.viewBox.isEmpty()?zt.copy(this.scene.viewBox):(this.scene.updateMatrixWorld(!0),this.scene.computeBoundingBox(),zt.copy(this.scene.boundingBox)),this.resetCameraByBoundingBox(zt,!0))}saveCameraPosition(t){zt.copy(this.camera.boundingBoxWorld);const e=t?vr+t:vr;sessionStorage.setItem(e,JSON.stringify(zt))}restoreCameraPosition(t){const e=t?vr+t:vr,n=sessionStorage.getItem(e);if(!n)return this.fullscreen();zt.copy(JSON.parse(n)),this.resetCameraByBoundingBox(zt,!0)}clearCameraPosition(t){const e=t?vr+t:vr;sessionStorage.setItem(e,"")}bindControllerEvents(){this.controller.addEventListener(_t.PAN_START,this.controllerPanStartHandler),this.controller.addEventListener(_t.PAN_END,this.controllerPanEndHandler),this.controller.addEventListener(_t.WHEEL_START,this.controllerWheelStartHandler),this.controller.addEventListener(_t.WHEEL_END,this.controllerWheelEndHandler),this.controller.addEventListener(_t.PAN_MOVE,this.controllerPanMoveHandler),this.controller.addEventListener(_t.POINTEROVER,this.controllerPointerOverHandler),this.multiSelector.addEventListener(No.SELECTED,this.multiSelectorSelectedHandler)}unbindControllerEvents(){this.controller.removeEventListener(_t.PAN_START,this.controllerPanStartHandler),this.controller.removeEventListener(_t.PAN_END,this.controllerPanEndHandler),this.controller.removeEventListener(_t.WHEEL_START,this.controllerWheelStartHandler),this.controller.removeEventListener(_t.WHEEL_END,this.controllerWheelEndHandler),this.controller.removeEventListener(_t.PAN_MOVE,this.controllerPanMoveHandler),this.controller.removeEventListener(_t.POINTEROVER,this.controllerPointerOverHandler),this.multiSelector.removeEventListener(No.SELECTED,this.multiSelectorSelectedHandler)}handlePanStart(t){if(!((t==null?void 0:t.type)!==_t.PAN_START&&(t==null?void 0:t.type)!==_t.WHEEL_START)&&this.zoomToSelectEnable){this.p1.copy(t.data.screenCoords),zt.makeEmpty().expandByPoint(this.p1),this.graph.draw(zt);return}}handlePanEnd(t){if(!((t==null?void 0:t.type)!==_t.PAN_END&&(t==null?void 0:t.type)!==_t.WHEEL_END)&&this.zoomToSelectEnable){this.p2.copy(t.data.screenCoords),zt.makeEmpty().expandByPoint(this.p1).expandByPoint(this.p2).unproject(this.controller.camera),this.setByBox(zt),this.graph.hide(),zt.makeEmpty();return}}handleControllerPanMove(t){(t==null?void 0:t.type)===_t.PAN_MOVE&&this.zoomToSelectEnable&&(this.p2.copy(t.data.screenCoords),zt.makeEmpty().expandByPoint(this.p1).expandByPoint(this.p2),this.graph.draw(zt))}handleControllerPointerOver(t){var a,u,l,c,f;const e=((a=t==null?void 0:t.e)==null?void 0:a.target)||((l=(u=t==null?void 0:t.e)==null?void 0:u.srcEvent)==null?void 0:l.target);let n=e==null?void 0:e.id;(n==null?void 0:n.indexOf("dummy"))>-1?(n=e.getAttribute(Kn+"-id"),n&&this._currentAssetId!==n&&this.dispatchEvent({type:"POINTEROVER",data:{id:n,assetType:"dummy"},e:t.e})):n&&((c=this.scene)!=null&&c.isBelongsToAssetType(n,er.WS))?this._currentAssetId!==n&&this.dispatchEvent({type:"POINTEROVER",data:{id:n,assetType:er.WS},e:t.e}):n&&((f=this.scene)!=null&&f.isBelongsToAssetType(n,er.RM))?this._currentAssetId!==n&&this.dispatchEvent({type:"POINTEROVER",data:{id:n,assetType:er.RM},e:t.e}):(this._currentAssetId=void 0,this.dispatchEvent({type:"POINTERLEAVE",e:t.e})),this._currentAssetId=n}handleMultiSelectorSelected(t){console.warn("handleMultiSelectorSelected:",t.data),this.dispatchEvent({type:"SELECTED",data:t.data})}setDummies(t){this.dummiesController.setDummiesByVos(t)}clearDummies(t){this.dummiesController.clearDummies(t)}update(t){this.tween&&this.tween.update(t)}}const zt=new St,En=new Y,Jo=new Y;var An=(r=>(r.SELECTED="SELECTED",r.POINTEROVER="POINTEROVER",r.POINTERLEAVE="POINTERLEAVE",r))(An||{});class lv extends Ir{name="SvgApp";params;renderer;view;scene;loadingScene;mainScene;zoomToSelectEnable=!1;zoomBox=new St;selectEnable=!1;multiSelectEnable=!1;runningHandler=this.running.bind(this);pointerOverHandler=this.handlePointerOver.bind(this);pointerLeaveHandler=this.handlePointerLeave.bind(this);multiSelectorSelectedHandler=this.handleMultiSelectorSelected.bind(this);dragEndHandler=this.handleDragEnd.bind(this);constructor(t={}){super(),this.params=t,this.params.zoomToSelectEnable&&(this.zoomToSelectEnable=!0),this.params.selectEnable&&(this.selectEnable=!0),this.params.multiSelectEnable&&(this.multiSelectEnable=!0),this.params.defaultFill||(this.params.defaultFill=Wt.getMoreTransparent(he.white,.3)),this.params.defaultStroke||(this.params.defaultStroke=Wt.getMoreTransparent(he.darkWhite,.8)),this.params.infoFill||(this.params.infoFill=Wt.getMoreTransparent(he.gray,.3)),this.params.infoStroke||(this.params.infoStroke=Wt.getMoreTransparent(he.darkGray,.8)),this.params.primaryFill||(this.params.primaryFill=Wt.getMoreTransparent(he.blue,.3)),this.params.primaryStroke||(this.params.primaryStroke=Wt.getMoreTransparent(he.darkBlue,.8)),this.params.successFill||(this.params.successFill=Wt.getMoreTransparent(he.green,.3)),this.params.successStroke||(this.params.successStroke=Wt.getMoreTransparent(he.darkGreen,.8)),this.params.warningFill||(this.params.warningFill=Wt.getMoreTransparent(he.yellow,.3)),this.params.warningStroke||(this.params.warningStroke=Wt.getMoreTransparent(he.darkYellow,.8)),this.params.dangerFill||(this.params.dangerFill=Wt.getMoreTransparent(he.red,.3)),this.params.dangerStroke||(this.params.dangerStroke=Wt.getMoreTransparent(he.darkRed,.8)),this.params.activeFill||(this.params.activeFill=Wt.getMoreTransparent(he.brown,.3)),this.params.activeStroke||(this.params.activeStroke=Wt.getMoreTransparent(he.darkBrown,.8)),this.renderer=new r0(t),this.view=new ov(t),this.trans2LoadingScene()}get isLoadingScene(){var t;return((t=this.scene)==null?void 0:t.name)==="SvgLoadingScene"}destroy(){var t,e;this.unbindAssetsEvents(),super.destroy(),(t=this.view)==null||t.destroy(),(e=this.renderer)==null||e.destroy()}resize(){var t,e,n;(t=this.renderer)==null||t.resize(),(n=(e=this.view)==null?void 0:e.camera)==null||n.resize()}isScene(t){var e;return((e=this.scene)==null?void 0:e.uuid)===t.uuid}removeScene(t){this.scene=void 0,t==null||t.destroy()}trans2MainScene(){var t,e;(t=this.scene)==null||t.unmount(),this.scene=this.mainScene,this.scene.isMounted||this.scene.mount(),this.view.bindScene(this.scene),(e=this.loadingScene)==null||e.destroy()}trans2LoadingScene(){var e,n;this.loadingScene=new u2(this.params),(e=this.scene)==null||e.unmount(),this.scene=this.loadingScene,this.scene.isMounted||this.scene.mount();const t=new St().copy(this.loadingScene.viewBox).expandByVector(new Y(1,1).multiplyScalar(360));this.view.setByBox(t,!1),(n=this.mainScene)==null||n.destroy()}start(){requestAnimationFrame(this.runningHandler)}running(t){this.scene&&(this.scene.update(),this.renderer.render(this.scene,this.view.camera),this.view.update(t),requestAnimationFrame(this.runningHandler))}async load(t,e,n=2,a){this.isLoadingScene||this.trans2LoadingScene(),await lc(this.params.syncDelay);const u=await new Ac().loadAsync(t);this.mainScene=new Yc(this.params),this.mainScene.bind(u),this.view.setByBox(this.mainScene.viewBox);const l=this.mainScene.getLayers(n);return e!=null&&e.length||(e=Mt.map(l,"label")),this.mainScene.showDefaultLayers(e,!0),a!=null&&a.length&&this.setSkeletons(a),this.trans2MainScene(),this.bindAssetsEvents(),console.log("svgApp.load: ",l),l}setSkeletons(t){var e;(e=this.scene)==null||e.setSkeletonLayers(t)}getLayers(t=2){var e;return(e=this.scene)==null?void 0:e.getLayers(t)}updateLayersVisibility(t,e=!1){var n;(n=this.scene)==null||n.updateLayersVisibility(t,e)}selectByIds(t){var e;(e=this.scene)==null||e.selectByIds(t,this.multiSelectEnable)}getSelectedIds(){var t;return(t=this.scene)==null?void 0:t.getSelectedIds()}async targetByIds(t){var e;this.scene&&((e=this.scene)==null||e.selectByIds(t,!1),tl.copy(this.scene.getSelectedBoundingBox()).expandByVector(new Y(1,1).multiplyScalar(100)),await lc(100),tl.isEmpty()||await this.view.setByBox(tl))}linkAssetsByTree(t){var e;(e=this.scene)==null||e.linkAssetsByTree(t)}setViewAreaLimit(t){this.renderer.viewAreaLimit=t}setAssetType(t,e){var n;(n=this.scene)==null||n.setAssetType(t,e)}getAssetIdsByType(t){var e;return(e=this.scene)==null?void 0:e.getAssetIdsByType(t)}clearFill(){var t;(t=this.scene)==null||t.clearFillOrStroke("fill")}clearFillByIds(t){var e;(e=this.scene)==null||e.clearFillOrStrokeByIds(t,"fill")}setFillByIds(t,e){var n;(n=this.scene)==null||n.setFillOrStrokeByIds(t,e,"fill")}clearStroke(){var t;(t=this.scene)==null||t.clearFillOrStroke("stroke")}clearStrokeByIds(t){var e;(e=this.scene)==null||e.clearFillOrStrokeByIds(t,"stroke")}setStrokeByIds(t,e){var n;(n=this.scene)==null||n.setFillOrStrokeByIds(t,e,"stroke")}getLegend(){var t;return(t=this.scene)==null?void 0:t.getLegend()}setAssetLabels(t,e){var n;(n=this.scene)==null||n.setAssetLabels(t,e)}clearAssetLabels(){var t;(t=this.scene)==null||t.clearAssetLabels()}fullscreen(){this.view.fullscreen()}saveCameraPosition(t){this.view.saveCameraPosition(t)}restoreCameraPosition(t){this.view.restoreCameraPosition(t)}clearCameraPosition(t){this.view.clearCameraPosition(t)}zoomIn(){this.view.zoomIn()}zoomOut(){this.view.zoomOut()}focusAt(t,e=1e3){var n;(n=this.view)==null||n.focusAt(t,e)}async focusAtById(t,e=1e3){var n;return(n=this.view)==null?void 0:n.focusAtById(t,e)}async focusAtDummy(t,e=1e3){var n;return(n=this.view)==null?void 0:n.focusAtDummy(t,e)}showAssetsLabel(t,e,n){var a,u,l,c;e?t==="dummy"?(l=(u=(a=this.view)==null?void 0:a.dummiesController)==null?void 0:u.dummies)==null||l.showDummyLabel(e):(c=this.view)==null||c.showAssetsLabel(t,e,n):this.hideAssetsLabel()}hideAssetsLabel(){var t,e,n,a;(n=(e=(t=this.view)==null?void 0:t.dummiesController)==null?void 0:e.dummies)==null||n.hideDummyLabel(),(a=this.view)==null||a.hideAssetsLabel()}highlightAssets(t,e){var n;(n=this.scene)==null||n.highlightAssets(t,e)}resetHighlightAssets(t){var e;(e=this.scene)==null||e.resetHighlightAssets(t)}fontZoomIn(){var t;(t=this.scene)==null||t.chef.fontZoom("asset-labels",1.1)}fontZoomOut(){var t;(t=this.scene)==null||t.chef.fontZoom("asset-labels",.9)}zoomToSelectEnableChanged(t){this.view.zoomToSelectEnableChanged(t)}selectEnableChanged(t){this.selectEnable=!!t,this.view.selectEnableChanged(t)}multiSelectEnableChanged(t){this.multiSelectEnable=!!t,this.view.multiSelectEnableChanged(t)}clearSelected(){var t;(t=this.scene)==null||t.clearSelected()}socialDistanceEnableChanged(t){var e;(e=this.scene)==null||e.socialDistanceEnableChanged(t)}getBoundingBoxById(t,e=!0){var a;if(!t)return;const n=(a=this.scene)==null?void 0:a.getBoundingBoxById(t);return n&&e&&n.applyMatrix3(this.view.camera.viewMatrix).round(),n}setDummies(t){var e;(e=this.view)==null||e.setDummies(t)}clearDummies(t){var e;(e=this.view)==null||e.clearDummies(t)}highlightDummies(t){var e,n;(n=(e=this.view)==null?void 0:e.dummiesController)==null||n.highlightDummies(t)}resetHighlightDummies(){var t,e;(e=(t=this.view)==null?void 0:t.dummiesController)==null||e.resetHighlightDummies()}bindAssetsEvents(){var t,e;this.view.addEventListener(An.POINTEROVER,this.pointerOverHandler),this.view.addEventListener(An.POINTERLEAVE,this.pointerLeaveHandler),this.view.addEventListener(An.SELECTED,this.multiSelectorSelectedHandler),(e=(t=this.view)==null?void 0:t.dummiesController)==null||e.addEventListener("panend",this.dragEndHandler)}unbindAssetsEvents(){var t,e;this.view.removeEventListener(An.POINTEROVER,this.pointerOverHandler),this.view.removeEventListener(An.POINTERLEAVE,this.pointerLeaveHandler),this.view.removeEventListener(An.SELECTED,this.multiSelectorSelectedHandler),(e=(t=this.view)==null?void 0:t.dummiesController)==null||e.removeEventListener("panend",this.dragEndHandler)}handleMultiSelectorSelected(t){this.dispatchEvent({type:"SELECTED",data:t.data})}handlePointerOver(t){this.dispatchEvent({type:"pointerover",data:t.data,e:t.e})}handlePointerLeave(t){this.dispatchEvent({type:"pointerleave",data:t.data,e:t.e})}handleInitializeStart(){console.log("App.initializeStart ...")}async handleInitializeComplete(t){console.log("App.initializeComplete ...",t),t!=null&&t.data&&this.launch()}handleDragEnd(t){this.dispatchEvent(t)}launch(){console.log("App.launch ...")}}const tl=new St;var Wf=(r=>(r.SELECTED="SELECTED",r.POINTEROVER="pointerover",r.POINTERLEAVE="pointerleave",r.DRAG_END="panend",r))(Wf||{});class hv{static cached=new Map;static cachedCanvas=new Map;static destroy(){this.cached.clear(),this.cachedCanvas.clear()}static createCanvas(t){var a;if(!((a=Zt.window)!=null&&a.document))throw new Error("environment not support");let e;t.containerId&&(e=Zt.window.document.getElementById(t.containerId)),e||(e=Zt.window.document.getElementsByTagName("body")[0]);let n;if(t.canvasId&&(n=Zt.window.document.getElementById(t.canvasId)||void 0),t.width||(t.width=e==null?void 0:e.offsetWidth),t.height||(t.height=e==null?void 0:e.offsetHeight),t.dpr||(t.dpr=Zt.dpr),n)this.resizeCanvas(n,t.width,t.height,t.dpr);else{if(n=this.createHtmlCanvas(t.width,t.height,t.dpr),!n)throw new Error("error environment");t.canvasId&&n.setAttribute("id",t.canvasId),e==null||e.appendChild(n)}return n.style.background=t.background||"transparent",n}static getContext2D(t,e={}){const n={alpha:!0,willReadFrequently:!!e.willReadFrequently},a=t.getContext("2d",n);if(!a)throw new Error("getContext2D error");return a.scale(e.dpr||1,e.dpr||1),a}static resizeCanvas(t,e,n,a=1){t instanceof OffscreenCanvas?(t.width=e,t.height=n):t instanceof HTMLCanvasElement&&(t.setAttribute("width",(e*a).toString()),t.setAttribute("height",(n*a).toString()),t.style.width=e+"px",t.style.height=n+"px",t.style.padding="0",t.style.margin="0",t.style.border="0",t.style.imageRendering="pixelated",t.style.transform="translateZ(0)")}static async getImageBitmapByCanvasAsync(t){if(t)return t instanceof OffscreenCanvas?t.transferToImageBitmap():t instanceof HTMLCanvasElement?await createImageBitmap(t):void 0}static get(t,e,n,a=1){let u=this.cached.get(t);return u||(u=this.create(e,n,a),this.set(t,u)),this.resizeCanvas(u,e,n,a),u}static set(t,e){if(!t||!e)throw new Error("error input");return this.cached.set(t,e)}static remove(t){this.cached.has(t)&&this.cached.delete(t)}static create(t,e,n=1){var a;if((a=Zt.window)!=null&&a.OffscreenCanvas)return new OffscreenCanvas(t,e);throw new Error("environment does not support")}static createHtmlCanvas(t,e,n=1){if(!Zt.window.document)throw new Error("environment does not support");const a=Zt.window.document.createElement("canvas");return this.resizeCanvas(a,t,e,n),a}static measureText(t,e,n=new Y){if(!t)throw new Error("input error");const u=this.get("measureText",1,1).getContext("2d");if(!u)throw new Error("bufferCtx not found");e.render(u);const l=u.measureText(t);if(!l)throw new Error("measureText error");const c=l.actualBoundingBoxRight+l.actualBoundingBoxLeft,f=l.actualBoundingBoxAscent+l.actualBoundingBoxDescent;return n.set(c,f),n}}function Vf(r){return new Worker("/renderer.worker.js",{type:"module",name:r==null?void 0:r.name})}class cv extends uv{name="OpeView";constructor(t={}){super(t),this.initController(this.camera)}destroy(){this.controller&&this.controller.destroy(),super.destroy()}initController(t){let e=this.params.cvs;!e&&this.params.canvasId&&(e=document.getElementById(this.params.canvasId)),!(!this.params.controls||!t||!e)&&(this.controller&&this.controller.destroy(),this.controller=new Qc(e,t))}handleCameraChanged(t){console.warn("handleCameraChanged: ",t.target.camera.position.z,t.target.camera.scaled.x)}}var ri=(r=>(r.INIT="init",r.LOAD="load",r.LOADED="loaded",r.GET_LAYERS="getLayers",r.TERMINATE="terminate",r.CAMERA_SYNC="cameraSync",r.CAMERA_CHANGED="cameraChanged",r.SCENES_CHANGED="scenesChanged",r.UPDATE_LAYERS_VISIBILITY="updateLayersVisibility",r))(ri||{});class fv extends Ir{cvs;worker=new Vf;view;boundingBox=new St;workerMessageHandler=this.handleWorkerMessage.bind(this);cameraHandler=this.handleCameraChanged.bind(this);runningHandler=this.running.bind(this);constructor(t={}){super(),t.workerRender=!0,this.params=t,Zt.config=t;const e=hv.createCanvas(t);if(!e.transferControlToOffscreen)throw new Error("not support transferControlToOffscreen");this.cvs=e.transferControlToOffscreen(),this.view=new cv(t),this.view.camera.name="mainCamera",this.view.camera.resize(),this.bindEvents()}destroy(){super.destroy(),this.unbindEvents(),this.worker.postMessage({task:ri.TERMINATE}),this.worker.terminate()}bindEvents(){var t,e;(e=(t=this.view)==null?void 0:t.camera)==null||e.addEventListener(Qa.UPDATE,this.cameraHandler),this.worker.addEventListener("message",this.workerMessageHandler)}unbindEvents(){var t,e;(e=(t=this.view)==null?void 0:t.controller)==null||e.removeEventListener(_t.CAMERA_CHANGED,this.cameraHandler),this.worker.removeEventListener("message",this.workerMessageHandler)}handleWorkerMessage(t){var e,n,a,u,l;switch(t.data.task){case ri.CAMERA_SYNC:if(!((e=t==null?void 0:t.data)!=null&&e.data))break;const c=JSON.parse(t.data.data);(a=(n=this.view)==null?void 0:n.camera)==null||a.fromJSON(c),this.view.camera.computeBoundingBox(),console.log("CAMERA_SYNC: ",c);break;case ri.CAMERA_CHANGED:const{t:f,r:d,s:y}=t.data.data;console.log("CAMERA_CHANGED: ",this.view.camera.width,f,d,y),(l=(u=this.view)==null?void 0:u.camera)==null||l.setTRS(f,d,y);break;case ri.SCENES_CHANGED:const{box:A}=t.data.data;if(!A)return;this.boundingBox.fromString(A);break}}handleCameraChanged(t){this.worker.postMessage({task:ri.CAMERA_CHANGED,data:t.data})}promiseWorkerResponse(t,e){return new Promise((n,a)=>{const u=c=>{var f,d,y;((f=c==null?void 0:c.data)==null?void 0:f.task)===t&&(this.worker.removeEventListener("message",u),this.worker.removeEventListener("error",l),console.log("AppOffscreen::response: ",(d=c==null?void 0:c.data)==null?void 0:d.task,(y=c==null?void 0:c.data)==null?void 0:y.data),n(c.data.data))},l=c=>{this.worker.removeEventListener("message",u),this.worker.removeEventListener("error",l),a(c.error)};this.worker.addEventListener("message",u),this.worker.addEventListener("error",l),this.worker.postMessage({task:t,data:e})})}resize(){var t;(t=this.view.camera)==null||t.resize()}async load(t,e){return this.promiseWorkerResponse(ri.LOAD,{url:t,layers:e})}async getLayers(t=2){return this.promiseWorkerResponse(ri.GET_LAYERS,{lv:t})}async fullscreen(){await this.view.resetCameraByBoundingBox(this.boundingBox,!0)}saveCameraPosition(t){this.view.saveCameraPosition(t)}restoreCameraPosition(t){this.view.restoreCameraPosition(t)}clearCameraPosition(t){this.view.clearCameraPosition(t)}updateLayersVisibility(t,e=!1){this.worker.postMessage({task:ri.UPDATE_LAYERS_VISIBILITY,data:{ids:t,visible:e}})}start(){this.worker.postMessage({task:ri.INIT,data:{cvs:this.cvs,config:this.params}},[this.cvs]),requestAnimationFrame(this.runningHandler)}running(t){var e;(e=this.view)==null||e.update(t),requestAnimationFrame(this.runningHandler)}stop(){}}function pv(r){return new Worker("/environment.worker.js",{type:"module",name:r==null?void 0:r.name})}le.AppEnum=Wf,le.AppOffscreen=fv,le.AssetTypeEnum=er,le.Box2=Hg,le.Color=Wt,le.ColorsEnum=he,le.EnvironmentWorker=pv,le.GLOB=Zt,le.LayerTypeEnum=Vs,le.Monitor=Pt,le.RendererWorker=Vf,le.SvgApp=lv,le.Vector2=Ug,le.defaultConfig=kn,Object.defineProperty(le,Symbol.toStringTag,{value:"Module"})});
|
|
72
|
+
`,"2) content: () => element.cloneNode(true)"].join(" "))}var c=a.reduce(function(f,d){var y=d&&Wy(d,n);return y&&f.push(y),f},[]);return sa(r)?c[0]:c}ua.defaultProps=ir,ua.setDefaultProps=Uy,ua.currentInput=ti,Object.assign({},nf,{effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow)}}),ua.setDefaultProps({render:Hf});let Vy=0;const $i=ua(document.body,{theme:"translucent",animation:"scale",inertia:!0,delay:[200,100],content:"",allowHTML:!0,placement:"left-start",trigger:"manual",arrow:!0});class Xo{constructor(t,e){this.container=t,this.text=e,t?this.container=t:this.container=document.getElementsByTagName("body")[0],this.text=e}name="Label";id="Label"+Vy++;el;position=new Y;get isMounted(){return $i.state.isMounted}get isShown(){return $i.state.isShown}destroy(){this.text="",this.position.identity()}setHtml(t=""){return this.text=t,this}update(t){t&&(this.position.copy(t),$i.show())}async show(t){if(t)return await this.hide(),this.position.copy(t),$i.setContent(this.text),$i.setProps({getReferenceClientRect:()=>({width:0,height:0,right:this.position.x,left:this.position.x,bottom:this.position.y,top:this.position.y,x:this.position.x,y:this.position.y,toJSON(){}})}),$i.clearDelayTimeouts(),$i.show(),new Promise(e=>{Mt.delay(function(){e()},300)})}async hide(){return $i.hide(),new Promise(t=>{Mt.delay(function(){t()},100)})}}let $y=0;class zy extends Ir{name="DummyPoint";id="dummyPoint"+$y++;container;offset=new Y;el;label;radius=10;position=new Y;worldPosition=new Y;userData;constructor(t,e){var a,u;super(),t?this.container=t:this.container=document.getElementsByTagName("body")[0];let n=this.container.getBoundingClientRect();this.offset.set(n.left,n.top),this.userData=e,(a=this.userData)!=null&&a.type||Mt.set(this,"userData.type",gn.DEFAULT),this.initDom(),this.setType((u=this.userData)==null?void 0:u.type),this.mount(),this.initLabel()}destroy(){var t;super.destroy(),this.unmount(),(t=this.label)==null||t.destroy()}get isMounted(){var t;return!!((t=this.el)!=null&&t.parentNode)}mount(){var t;this.el&&((t=this.el)!=null&&t.parentNode||this.container.appendChild(this.el))}unmount(){var t,e,n,a;(e=(t=this.el)==null?void 0:t.parentNode)==null||e.removeChild(this.el),(n=this.el)==null||n.remove(),(a=this.label)==null||a.hide()}setText(t=""){return this.el?(this.el.innerText=t,this):this}initDom(){var t;this.el=document.createElement("div"),this.el.setAttribute("id",this.id),this.el.setAttribute("class","dummy-point"),this.el.setAttribute(Kn+"-id",(t=this.userData)==null?void 0:t.value)}initLabel(){var t;(t=this.userData)!=null&&t.label&&(this.label=new Xo(this.container,this.userData.label))}setActive(t){return t?(Xs(this.el,"active"),this.showLabel()):(Zs(this.el,"active"),this.hideLabel()),this}showLabel(){var t;(t=this.label)==null||t.show(Gy.copy(this.position).add(this.offset).subScalar(this.radius))}hideLabel(){var t;(t=this.label)==null||t.hide()}setType(t){var n;if(!this.userData)return this;const e=(n=this.userData)==null?void 0:n.type;return t||(t=gn.DEFAULT),e&&Za(this.el,e)&&Zs(this.el,e),this.userData.type=t,Xs(this.el,this.userData.type),this}update(t,e=!1){!t||!this.isMounted||(e||t.subScalar(this.radius).round(),this.position.copy(t),this.el.style.transform=`translate3D(${this.position.x}px, ${this.position.y}px, 0)`)}}const Gy=new Y;let Yy=0;class Xy extends Ir{name="DummyRect";id="dummyRect"+Yy++;container;offset=new Y;el;radius=10;position=new Y;worldPosition=new Y;label;userData;constructor(t,e){super(),t?this.container=t:this.container=document.getElementsByTagName("body")[0];let n=this.container.getBoundingClientRect();this.offset.set(n.left,n.top),this.userData=e,this.initDom(),this.mount(),this.initLabel()}destroy(){var t;super.destroy(),this.unmount(),(t=this.label)==null||t.destroy()}get isMounted(){var t;return!!((t=this.el)!=null&&t.parentNode)}mount(){this.container.appendChild(this.el)}unmount(){var t,e,n,a;this.setText(""),(e=(t=this.el)==null?void 0:t.parentNode)==null||e.removeChild(this.el),(n=this.el)==null||n.remove(),(a=this.label)==null||a.hide()}initDom(){var t;this.el=document.createElement("div"),this.el.setAttribute("id",this.id),this.el.setAttribute("class","dummy-rect"),this.el.setAttribute(Kn+"-id",((t=this.userData)==null?void 0:t.rmId)||"undefined")}initLabel(){this.label=new Xo(this.container,"")}setText(t=""){return this.el.innerText=t,this}setActive(t){return t?Xs(this.el,"active"):Zs(this.el,"active"),this}showLabel(){var t;(t=this.label)==null||t.show(Zy.copy(this.position).add(this.offset).subScalar(this.radius))}hideLabel(){var t;(t=this.label)==null||t.hide()}setType(t){var n;if(!this.userData)return this;const e=(n=this.userData)==null?void 0:n.type;return t=gn.DEFAULT,e&&Za(this.el,e)&&Zs(this.el,e),this.userData.type=t,Xs(this.el,this.userData.type),this}update(t,e=!1){!t||!this.isMounted||(e||t.subScalar(this.radius).round(),this.position.copy(t),this.el.style.transform=`translate3D(${this.position.x}px, ${this.position.y}px, 0)`)}}const Zy=new Y;class Qy extends Ir{name="Dummies";container;controller;scene;viewMatrix=new re;dummies=[];rmMap=new Map;mergedMap=new Map;cameraUpdateHandler=this.handleCameraUpdate.bind(this);controllerTapHandler=this.handleControllerTap.bind(this);constructor(t,e){super(),this.container=t,this.controller=e,this.bindEvents()}destroy(){this.unbindEvents(),super.destroy(),this.clearDummies()}bindEvents(){this.controller.camera.addEventListener(Qa.UPDATE,this.cameraUpdateHandler),this.controller.addEventListener(_t.TAP,this.controllerTapHandler)}unbindEvents(){this.controller.camera.removeEventListener(Qa.UPDATE,this.cameraUpdateHandler),this.controller.removeEventListener(_t.TAP,this.controllerTapHandler)}bindScene(t){this.scene=t}update(t){var e,n,a;if(t){this.viewMatrix.copy(t);for(let u=0,l=(this.dummies||[]).length;u<l;u++){const c=this.dummies[u],f=(n=this.scene)==null?void 0:n.getElementById((e=c.userData)==null?void 0:e.rmId);if(f){const d=(a=this.scene)==null?void 0:a.chef.getElementBoundingBox(f.id);d==null||d.getCenter(zi),zi.applyMatrix3(this.viewMatrix).round(),c.position.copy(zi)}else zi.copy(c.worldPosition).applyMatrix3(this.viewMatrix).round(),c.update(zi)}this.mergeDummies()}}setDummies(t){this.clearDummies();for(let e=0,n=(t||[]).length;e<n;e++)this.addDummy(t[e])}addDummy(t){var a,u;const e=new zy(this.container,t);this.dummies.push(e);const n=(a=e.userData)==null?void 0:a.rmId;return n&&(this.rmMap.has(n)||this.rmMap.set(n,[]),(u=this.rmMap.get(n))==null||u.push(e)),e}removeDummy(t){var a;const e=this.dummies.indexOf(t);e>-1&&this.dummies.splice(e,1);const n=(a=t.userData)==null?void 0:a.rmId;if(n){const u=this.mergedMap.get(n);u==null||u.destroy(),this.mergedMap.delete(n);const l=this.rmMap.get(n);if(!l)return;if(l.length===1)this.rmMap.delete(n);else{const c=l.indexOf(t);c>-1&&(l.splice(c,1),this.rmMap.set(n,l))}}t.destroy()}clearDummies(t){var e,n,a;for(let u=(((e=this.dummies)==null?void 0:e.length)||0)-1;u>=0;u--){const l=this.dummies[u];(!t||(n=l==null?void 0:l.userData)!=null&&n.type&&(t!=null&&t.includes((a=l.userData)==null?void 0:a.type)))&&this.removeDummy(l)}t||(this.dummies.length=0,this.mergedMap.clear(),this.rmMap.clear())}mergeDummies(){this.rmMap.forEach((t,e)=>{var a,u,l,c;if((a=this.scene)==null?void 0:a.getElementById(e)){const f=(u=this.scene)==null?void 0:u.chef.getElementBoundingBox(e);if(!f)return;Zo.copy(f).applyMatrix3(this.viewMatrix).round(),Zo.getSize(zi);const d=t[0].radius,y=Zo.centralArrange(t.length,d*2,d*2);if(zi.x<d*3||zi.y<d*3){t.forEach(_=>_.unmount());const A=this.mergedMap.get(e);A==null||A.unmount()}else if(Array.isArray(y))this.mergedMap.has(e)&&((l=this.mergedMap.get(e))==null||l.unmount()),t.forEach((A,_)=>{A.isMounted||A.mount(),A.update(y[_])});else{t.forEach(C=>C.unmount());let A=this.mergedMap.get(e);if(A)A.isMounted||A.mount();else{const C=Mt.cloneDeep(t[0].userData)||{},F=Mt.reduce(t,(M,R)=>{var q,z;return(q=R.userData)!=null&&q.label&&M.push((z=R.userData)==null?void 0:z.label),M},[]);C.label=F.join(", ");const N=Mt.reduce(t,(M,R)=>{var q,z;return(q=R.userData)!=null&&q.value&&M.push((z=R.userData)==null?void 0:z.value),M},[]);C.value=N.join(","),C.rmId=e,A=new Xy(this.container,C),this.mergedMap.set(e,A)}A.setText(t.length.toString());const _=Mt.reduce(t,(C,F)=>{var N,M;return(N=F.userData)!=null&&N.label&&C.push((M=F.userData)==null?void 0:M.label),C},[]);(c=A.label)==null||c.setHtml(_.join(", <br />")),A.update(t[0].position)}}})}getDummyById(t){return this.dummies.find(e=>{var n;return((n=e.userData)==null?void 0:n.value)===t})}setActiveByIds(t){var e,n;if(this.resetActives(),!!t&&(Array.isArray(t)||(t=[t]),!!(t!=null&&t.length)))for(let a=0,u=t.length;a<u;a++){const l=this.getDummyById(t[a]);if(l&&l.setActive(!0),l&&((e=l.userData)!=null&&e.rmId)){const c=this.mergedMap.get((n=l.userData)==null?void 0:n.rmId);c&&c.setActive(!0)}}}resetActives(){this.dummies.forEach(t=>t.setActive(!1)),this.mergedMap.forEach(t=>t.setActive(!1))}showDummyLabel(t){if(!t)return;const e=this.getDummyById(t);e&&e.showLabel();const n=this.mergedMap.get(t);n&&n.showLabel()}async hideDummyLabel(){this.dummies.forEach(t=>t.hideLabel()),this.mergedMap.forEach(t=>t.hideLabel())}handleCameraUpdate(){this.update(this.controller.camera.viewMatrix)}handleControllerTap(t){var a,u,l,c,f;if((t==null?void 0:t.type)!==_t.TAP)return;const e=((a=t==null?void 0:t.e)==null?void 0:a.target)||((l=(u=t==null?void 0:t.e)==null?void 0:u.srcEvent)==null?void 0:l.target)||((f=(c=t==null?void 0:t.e)==null?void 0:c.srcEvent)==null?void 0:f.srcElement),n=e==null?void 0:e.getAttribute(Kn+"-id");n&&console.warn("【TODO】handleControllerTap: ",n)}}const zi=new Y,Zo=new St;(function(){return window[Wi.prefixed(window,"requestAnimationFrame")]||function(r){window.setTimeout(r,1e3/60)}})();class jy extends Ir{name="DragController";dragFake=!1;container;offset=new Y;controller;scene;raycaster;dummies;_els=[];_hms=new Map;_vos=new Map;_elMap=new Map;_panType=gn.SUCCESS;onPanHandler=this.handleOnPan.bind(this);panEndHandler=Mt.debounce(this.handlePanEnd.bind(this),500);constructor(t,e,n=!0){super(),this.container=t;let a=this.container.getBoundingClientRect();this.offset.set(a.left,a.top),this.controller=e,this.dummies=new Qy(t,e),this.raycaster=new l2,this.dragFake=n}destroy(){var t;super.destroy();for(let e=(((t=this._els)==null?void 0:t.length)||0)-1;e>=0;e--)this.drop(this._els[e]);this.dummies.destroy()}bindScene(t){var e;this.scene=t,(e=this.dummies)==null||e.bindScene(t)}drag(t,e){t&&(this._els.includes(t)||(this.bindEvent(t),this._els.push(t),this._vos.set(t,e)))}drop(t){if(!t)return;this.unbindEvent(t),this._vos.delete(t),this._elMap.delete(t);const e=this._els.findIndex(n=>n===t);e>-1&&this._els.splice(e,1)}bindEvent(t){if(!t)return;const e=new Wi.Manager(t,{domEvents:!0});e.add(new Wi.Pan({threshold:0,pointers:0})),e.on(["panstart","panmove","panend"].join(" "),this.onPanHandler),this._hms.set(t,e)}unbindEvent(t){if(!t)return;const e=this._hms.get(t);e&&(e.off(["panstart","panmove","panend"].join(" "),this.onPanHandler),e.destroy(),this._hms.delete(t))}handleOnPan(t){if(typeof t.preventDefault=="function"&&t.preventDefault(),typeof t.srcEvent.stopPropagation=="function"&&t.srcEvent.stopPropagation(),typeof t.srcEvent.stopImmediatePropagation=="function"&&t.srcEvent.stopImmediatePropagation(),!this.controller)return;t.type==="panstart"||t.isFirst?this.controller.enablePan=!1:t.type==="panmove"||t.type==="panend"&&(this.controller.enablePan=!0);const e=this._vos.get(t.target);if(!e)return;const n=Mt.cloneDeep(e);n.type=this._panType;const a=this._getDummy(t.target,n);oa.set(t.center.x,t.center.y).sub(this.offset),a.worldPosition.copy(oa).unproject(this.controller.camera),a.update(oa),this.panEndHandler({type:"panend",e:t})}handlePanEnd(t){if((t==null?void 0:t.type)!=="panend")return;const e=this.getDummies(!0);this.dispatchEvent({type:"panend",data:e})}getDummies(t=!0){const e=[];return this._els.forEach(n=>{var u;let a=this._vos.get(n);if(!(!a||a.type!==gn.SUCCESS)){if(t){const l=this._elMap.get(n);if(!l||!this.controller.camera)return;oa.copy(l.position),this.raycaster.setFromCamera(oa,this.controller.camera);const c=[];if((u=this.scene)==null||u.getIntersectObjects(this.raycaster,er.RM,c),!(c!=null&&c.length))return;a=Mt.cloneDeep(a),a.rmId=c[0].id}e.push(a)}}),e}setDummiesByVos(t){var e,n;for(let a=0,u=(t||[]).length;a<u;a++){const l=(e=this.dummies)==null?void 0:e.addDummy(t[a]);if(!l)continue;const c=Mt.cloneDeep(t[a]);delete c.rmId,delete c.wsId,this.drag(l.el,c)}(n=this.dummies)==null||n.update(this.controller.camera.viewMatrix)}clearDummies(t){var e,n;for(let a=(((e=this._els)==null?void 0:e.length)||0)-1;a>=0;a--){const u=this._vos.get(this._els[a]);(!t||t&&(u!=null&&u.type)&&t.includes(u.type))&&this.drop(this._els[a])}(n=this.dummies)==null||n.clearDummies(t)}getDummyById(t){return this.dummies.getDummyById(t)}highlightDummies(t){var e;(e=this.dummies)==null||e.setActiveByIds(t)}resetHighlightDummies(){var t;(t=this.dummies)==null||t.resetActives()}showDummyLabel(t){var e;(e=this.dummies)==null||e.showDummyLabel(t)}start(){}_getDummy(t,e){let n=this._elMap.get(t);if(n||(n=this.dummies.addDummy(e).setType(gn.SUCCESS),this._elMap.set(t,n)),n.isMounted||n.mount(),this.dummies.dummies.includes(n)||this.dummies.dummies.push(n),!this._elMap.get(n.el)){this._elMap.set(n.el,n);const u=Mt.cloneDeep(e);delete u.rmId,delete u.wsId,this.drag(n.el,u)}return n}}const oa=new Y;var ss=Object.freeze({Linear:Object.freeze({None:function(r){return r},In:function(r){return r},Out:function(r){return r},InOut:function(r){return r}}),Quadratic:Object.freeze({In:function(r){return r*r},Out:function(r){return r*(2-r)},InOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)}}),Cubic:Object.freeze({In:function(r){return r*r*r},Out:function(r){return--r*r*r+1},InOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)}}),Quartic:Object.freeze({In:function(r){return r*r*r*r},Out:function(r){return 1- --r*r*r*r},InOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)}}),Quintic:Object.freeze({In:function(r){return r*r*r*r*r},Out:function(r){return--r*r*r*r*r+1},InOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)}}),Sinusoidal:Object.freeze({In:function(r){return 1-Math.sin((1-r)*Math.PI/2)},Out:function(r){return Math.sin(r*Math.PI/2)},InOut:function(r){return .5*(1-Math.sin(Math.PI*(.5-r)))}}),Exponential:Object.freeze({In:function(r){return r===0?0:Math.pow(1024,r-1)},Out:function(r){return r===1?1:1-Math.pow(2,-10*r)},InOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)}}),Circular:Object.freeze({In:function(r){return 1-Math.sqrt(1-r*r)},Out:function(r){return Math.sqrt(1- --r*r)},InOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)}}),Elastic:Object.freeze({In:function(r){return r===0?0:r===1?1:-Math.pow(2,10*(r-1))*Math.sin((r-1.1)*5*Math.PI)},Out:function(r){return r===0?0:r===1?1:Math.pow(2,-10*r)*Math.sin((r-.1)*5*Math.PI)+1},InOut:function(r){return r===0?0:r===1?1:(r*=2,r<1?-.5*Math.pow(2,10*(r-1))*Math.sin((r-1.1)*5*Math.PI):.5*Math.pow(2,-10*(r-1))*Math.sin((r-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(r){var t=1.70158;return r===1?1:r*r*((t+1)*r-t)},Out:function(r){var t=1.70158;return r===0?0:--r*r*((t+1)*r+t)+1},InOut:function(r){var t=2.5949095;return(r*=2)<1?.5*(r*r*((t+1)*r-t)):.5*((r-=2)*r*((t+1)*r+t)+2)}}),Bounce:Object.freeze({In:function(r){return 1-ss.Bounce.Out(1-r)},Out:function(r){return r<1/2.75?7.5625*r*r:r<2/2.75?7.5625*(r-=1.5/2.75)*r+.75:r<2.5/2.75?7.5625*(r-=2.25/2.75)*r+.9375:7.5625*(r-=2.625/2.75)*r+.984375},InOut:function(r){return r<.5?ss.Bounce.In(r*2)*.5:ss.Bounce.Out(r*2-1)*.5+.5}}),generatePow:function(r){return r===void 0&&(r=4),r=r<Number.EPSILON?Number.EPSILON:r,r=r>1e4?1e4:r,{In:function(t){return Math.pow(t,r)},Out:function(t){return 1-Math.pow(1-t,r)},InOut:function(t){return t<.5?Math.pow(t*2,r)/2:(1-Math.pow(2-t*2,r))/2+.5}}}}),as=function(){return performance.now()},qf=function(){function r(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._tweens={},this._tweensAddedDuringUpdate={},this.add.apply(this,t)}return r.prototype.getAll=function(){var t=this;return Object.keys(this._tweens).map(function(e){return t._tweens[e]})},r.prototype.removeAll=function(){this._tweens={}},r.prototype.add=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];for(var a=0,u=e;a<u.length;a++){var l=u[a];(t=l._group)===null||t===void 0||t.remove(l),l._group=this,this._tweens[l.getId()]=l,this._tweensAddedDuringUpdate[l.getId()]=l}},r.prototype.remove=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=0,a=t;n<a.length;n++){var u=a[n];u._group=void 0,delete this._tweens[u.getId()],delete this._tweensAddedDuringUpdate[u.getId()]}},r.prototype.allStopped=function(){return this.getAll().every(function(t){return!t.isPlaying()})},r.prototype.update=function(t,e){t===void 0&&(t=as()),e===void 0&&(e=!0);var n=Object.keys(this._tweens);if(n.length!==0)for(;n.length>0;){this._tweensAddedDuringUpdate={};for(var a=0;a<n.length;a++){var u=this._tweens[n[a]],l=!e;u&&u.update(t,l)===!1&&!e&&this.remove(u)}n=Object.keys(this._tweensAddedDuringUpdate)}},r}(),xn={Linear:function(r,t){var e=r.length-1,n=e*t,a=Math.floor(n),u=xn.Utils.Linear;return t<0?u(r[0],r[1],n):t>1?u(r[e],r[e-1],e-n):u(r[a],r[a+1>e?e:a+1],n-a)},Bezier:function(r,t){for(var e=0,n=r.length-1,a=Math.pow,u=xn.Utils.Bernstein,l=0;l<=n;l++)e+=a(1-t,n-l)*a(t,l)*r[l]*u(n,l);return e},CatmullRom:function(r,t){var e=r.length-1,n=e*t,a=Math.floor(n),u=xn.Utils.CatmullRom;return r[0]===r[e]?(t<0&&(a=Math.floor(n=e*(1+t))),u(r[(a-1+e)%e],r[a],r[(a+1)%e],r[(a+2)%e],n-a)):t<0?r[0]-(u(r[0],r[0],r[1],r[1],-n)-r[0]):t>1?r[e]-(u(r[e],r[e],r[e-1],r[e-1],n-e)-r[e]):u(r[a?a-1:0],r[a],r[e<a+1?e:a+1],r[e<a+2?e:a+2],n-a)},Utils:{Linear:function(r,t,e){return(t-r)*e+r},Bernstein:function(r,t){var e=xn.Utils.Factorial;return e(r)/e(t)/e(r-t)},Factorial:function(){var r=[1];return function(t){var e=1;if(r[t])return r[t];for(var n=t;n>1;n--)e*=n;return r[t]=e,e}}(),CatmullRom:function(r,t,e,n,a){var u=(e-r)*.5,l=(n-t)*.5,c=a*a,f=a*c;return(2*t-2*e+u+l)*f+(-3*t+3*e-2*u-l)*c+u*a+t}}},Qo=function(){function r(){}return r.nextId=function(){return r._nextId++},r._nextId=0,r}(),jo=new qf,Ky=function(){function r(t,e){this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=ss.Linear.None,this._interpolationFunction=xn.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=Qo.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1,this._object=t,typeof e=="object"?(this._group=e,e.add(this)):e===!0&&(this._group=jo,jo.add(this))}return r.prototype.getId=function(){return this._id},r.prototype.isPlaying=function(){return this._isPlaying},r.prototype.isPaused=function(){return this._isPaused},r.prototype.getDuration=function(){return this._duration},r.prototype.to=function(t,e){if(e===void 0&&(e=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=t,this._propertiesAreSetUp=!1,this._duration=e<0?0:e,this},r.prototype.duration=function(t){return t===void 0&&(t=1e3),this._duration=t<0?0:t,this},r.prototype.dynamic=function(t){return t===void 0&&(t=!1),this._isDynamic=t,this},r.prototype.start=function(t,e){if(t===void 0&&(t=as()),e===void 0&&(e=!1),this._isPlaying)return this;if(this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var n in this._valuesStartRepeat)this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=t,this._startTime+=this._delayTime,!this._propertiesAreSetUp||e){if(this._propertiesAreSetUp=!0,!this._isDynamic){var a={};for(var u in this._valuesEnd)a[u]=this._valuesEnd[u];this._valuesEnd=a}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,e)}return this},r.prototype.startFromCurrentValues=function(t){return this.start(t,!0)},r.prototype._setupProperties=function(t,e,n,a,u){for(var l in n){var c=t[l],f=Array.isArray(c),d=f?"array":typeof c,y=!f&&Array.isArray(n[l]);if(!(d==="undefined"||d==="function")){if(y){var A=n[l];if(A.length===0)continue;for(var _=[c],C=0,F=A.length;C<F;C+=1){var N=this._handleRelativeValue(c,A[C]);if(isNaN(N)){y=!1,console.warn("Found invalid interpolation list. Skipping.");break}_.push(N)}y&&(n[l]=_)}if((d==="object"||f)&&c&&!y){e[l]=f?[]:{};var M=c;for(var R in M)e[l][R]=M[R];a[l]=f?[]:{};var A=n[l];if(!this._isDynamic){var q={};for(var R in A)q[R]=A[R];n[l]=A=q}this._setupProperties(M,e[l],A,a[l],u)}else(typeof e[l]>"u"||u)&&(e[l]=c),f||(e[l]*=1),y?a[l]=n[l].slice().reverse():a[l]=e[l]||0}}},r.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},r.prototype.end=function(){return this._goToEnd=!0,this.update(this._startTime+this._duration),this},r.prototype.pause=function(t){return t===void 0&&(t=as()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=t,this)},r.prototype.resume=function(t){return t===void 0&&(t=as()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=t-this._pauseStart,this._pauseStart=0,this)},r.prototype.stopChainedTweens=function(){for(var t=0,e=this._chainedTweens.length;t<e;t++)this._chainedTweens[t].stop();return this},r.prototype.group=function(t){return t?(t.add(this),this):(console.warn("tween.group() without args has been removed, use group.add(tween) instead."),this)},r.prototype.remove=function(){var t;return(t=this._group)===null||t===void 0||t.remove(this),this},r.prototype.delay=function(t){return t===void 0&&(t=0),this._delayTime=t,this},r.prototype.repeat=function(t){return t===void 0&&(t=0),this._initialRepeat=t,this._repeat=t,this},r.prototype.repeatDelay=function(t){return this._repeatDelayTime=t,this},r.prototype.yoyo=function(t){return t===void 0&&(t=!1),this._yoyo=t,this},r.prototype.easing=function(t){return t===void 0&&(t=ss.Linear.None),this._easingFunction=t,this},r.prototype.interpolation=function(t){return t===void 0&&(t=xn.Linear),this._interpolationFunction=t,this},r.prototype.chain=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this._chainedTweens=t,this},r.prototype.onStart=function(t){return this._onStartCallback=t,this},r.prototype.onEveryStart=function(t){return this._onEveryStartCallback=t,this},r.prototype.onUpdate=function(t){return this._onUpdateCallback=t,this},r.prototype.onRepeat=function(t){return this._onRepeatCallback=t,this},r.prototype.onComplete=function(t){return this._onCompleteCallback=t,this},r.prototype.onStop=function(t){return this._onStopCallback=t,this},r.prototype.update=function(t,e){var n=this,a;if(t===void 0&&(t=as()),e===void 0&&(e=r.autoStartOnUpdate),this._isPaused)return!0;var u;if(!this._goToEnd&&!this._isPlaying)if(e)this.start(t,!0);else return!1;if(this._goToEnd=!1,t<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var l=t-this._startTime,c=this._duration+((a=this._repeatDelayTime)!==null&&a!==void 0?a:this._delayTime),f=this._duration+this._repeat*c,d=function(){if(n._duration===0||l>f)return 1;var N=Math.trunc(l/c),M=l-N*c,R=Math.min(M/n._duration,1);return R===0&&l===n._duration?1:R},y=d(),A=this._easingFunction(y);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,A),this._onUpdateCallback&&this._onUpdateCallback(this._object,y),this._duration===0||l>=this._duration)if(this._repeat>0){var _=Math.min(Math.trunc((l-this._duration)/c)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=_);for(u in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[u]=="string"&&(this._valuesStartRepeat[u]=this._valuesStartRepeat[u]+parseFloat(this._valuesEnd[u])),this._yoyo&&this._swapEndStartRepeatValues(u),this._valuesStart[u]=this._valuesStartRepeat[u];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=c*_,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var C=0,F=this._chainedTweens.length;C<F;C++)this._chainedTweens[C].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},r.prototype._updateProperties=function(t,e,n,a){for(var u in n)if(e[u]!==void 0){var l=e[u]||0,c=n[u],f=Array.isArray(t[u]),d=Array.isArray(c),y=!f&&d;y?t[u]=this._interpolationFunction(c,a):typeof c=="object"&&c?this._updateProperties(t[u],l,c,a):(c=this._handleRelativeValue(l,c),typeof c=="number"&&(t[u]=l+(c-l)*a))}},r.prototype._handleRelativeValue=function(t,e){return typeof e!="string"?e:e.charAt(0)==="+"||e.charAt(0)==="-"?t+parseFloat(e):parseFloat(e)},r.prototype._swapEndStartRepeatValues=function(t){var e=this._valuesStartRepeat[t],n=this._valuesEnd[t];typeof n=="string"?this._valuesStartRepeat[t]=this._valuesStartRepeat[t]+parseFloat(n):this._valuesStartRepeat[t]=this._valuesEnd[t],this._valuesEnd[t]=e},r.autoStartOnUpdate=!1,r}(),Jy="25.0.0",tv=Qo.nextId,ei=jo,ev=ei.getAll.bind(ei),rv=ei.removeAll.bind(ei),iv=ei.add.bind(ei),nv=ei.remove.bind(ei),sv=ei.update.bind(ei),iu={Easing:ss,Group:qf,Interpolation:xn,now:as,Sequence:Qo,nextId:tv,Tween:Ky,VERSION:Jy,getAll:ev,removeAll:rv,add:iv,remove:nv,update:sv};class av{name="View";params;visible=!0;cvs;scene;scenes=[];camera;controller;tween;animateDuration;constructor(t={}){this.params=t,this.animateDuration=this.params.animateDuration||300,this.cvs=t.cvs,this.camera=new jc(t.camera||{})}destroy(){this.controller&&this.controller.destroy(),this.camera&&this.camera.destroy(),this.scene&&this.scene.destroy(),this.scenes.forEach(t=>t.destroy()),this.scenes.length=0}bindScene(t){this.scenes.push(t),this.reset(),this.scene=t,t.isStatic}saveCameraPosition(t){us.copy(this.camera.boundingBoxWorld);const e=t?vr+t:vr;sessionStorage.setItem(e,JSON.stringify(us))}clearCameraPosition(t){const e=t?vr+t:vr;sessionStorage.setItem(e,"")}restoreCameraPosition(t){const e=t?vr+t:vr,n=sessionStorage.getItem(e);n&&(us.copy(JSON.parse(n)),this.resetCameraByBoundingBox(us,!0))}fullscreen(t=10,e=!1){this.scene&&(this.scene.boundingBox.isEmpty()&&this.scene.computeBoundingBox(),us.copy(this.scene.boundingBox).expandByVector(nu.set(t,t)),this.resetCameraByBoundingBox(us,e))}handleCameraChanged(t){console.warn("handleCameraChanged: ",t.target.camera.position.z,t.target.camera.scaled.x)}reset(){}async resetCameraByBoundingBox(t,e=!1){if(!this.camera)return;if(!t||t.isEmpty())throw new Error("BoundingBox empty");if(!e)return this.camera.setByBox(t),Promise.resolve();const n=this.camera.getCameraPosition();t.getCenter(nu),t.getSize(Ko);const a=Math.max(Ko.x/this.camera.width,Ko.y/this.camera.height),u={x:nu.x,y:nu.y,z:0,s:a,r:0};await this.animateCamera(n,u)}async animateCamera(t,e){return this.controller&&(this.controller.enabled=!1),this.tween&&this.tween.stop(),new Promise(n=>{this.tween=new iu.Tween(t).to(e,this.animateDuration).easing(iu.Easing.Exponential.Out).onUpdate(a=>{this.camera.position.set(a.x,a.y),this.camera.scaled.set(a.s,a.s),this.camera.rotation.set(a.r,a.r),this.camera.update()}).onComplete(()=>{this.controller&&(this.controller.enabled=!0),n()}).start()})}computeBoundingBox(t,e=new St){return!t||!t.length||(e.makeEmpty(),t.forEach(n=>e.union(n.computeBoundingBox()))),e}expandScenesBoundingBox(t,e=new St){t.forEach(n=>n.boundingBox.union(e))}update(t){this.tween&&this.tween.update(t)}}const vr="camera_position_",nu=new Y,Ko=new Y,us=new St;class uv extends Ir{name="SvgView";params;container;offset=new Y;camera;controller;scene;p1=new Y;p2=new Y;graph;multiSelector;dummiesController;zoomToSelectEnable=!1;zoomBox=new St;selectEnable=!1;multiSelectEnable=!1;tween;animateDuration;label;controllerPanStartHandler=this.handlePanStart.bind(this);controllerPanEndHandler=this.handlePanEnd.bind(this);controllerWheelStartHandler=this.handlePanStart.bind(this);controllerWheelEndHandler=this.handlePanEnd.bind(this);controllerPanMoveHandler=this.handleControllerPanMove.bind(this);controllerPointerOverHandler=this.handleControllerPointerOver.bind(this);multiSelectorSelectedHandler=this.handleMultiSelectorSelected.bind(this);_currentAssetId;constructor(t={}){super(),this.params=t,this.params.zoomToSelectEnable&&(this.zoomToSelectEnable=!0),this.params.selectEnable&&(this.selectEnable=!0),this.params.multiSelectEnable&&(this.multiSelectEnable=!0),this.params.camera||(this.params.camera={}),this.params.camera.flipY=!0,this.animateDuration=this.params.animateDuration||300,this.camera=new jc(this.params.camera),this.container=this.params.containerId?document.getElementById(this.params.containerId):Zt.window.document.getElementsByTagName("body")[0];let e=this.container.getBoundingClientRect();this.offset.set(e.left,e.top),this.controller=new Qc(this.container,this.camera,!0),this.graph=new Kc(this.container),this.multiSelector=new o2(this.container,this.controller),this.dummiesController=new jy(this.container,this.controller),this.bindControllerEvents(),this.initLabel()}destroy(){var t;this.unbindControllerEvents(),super.destroy(),(t=this.label)==null||t.destroy()}initLabel(){this.label=new Xo(this.container,"")}showAssetsLabel(t,e,n){var u,l,c,f,d;if(!e)return;t||(t=(u=this.scene)==null?void 0:u.assetType);const a=(l=this.scene)==null?void 0:l.chef.getElementBoundingBox(e);a&&!a.isEmpty()&&(n||(n=(c=this.scene)==null?void 0:c.getAssetLabelById(t,e),n||(n=e)),(f=this.label)==null||f.setHtml(n),En.copy(a.min).applyMatrix3(this.camera.viewMatrix).add(this.offset).round(),(d=this.label)==null||d.show(En))}async hideAssetsLabel(){var t;return(t=this.label)==null?void 0:t.hide()}bindScene(t){var e;this.scene=t,this.multiSelector.bindScene(this.scene),(e=this.dummiesController)==null||e.bindScene(this.scene)}async setByBox(t,e=!0){await this.resetCameraByBoundingBox(t,e)}zoomIn(){this.controller.scaled=this.camera.scaled.x*.9,this.controller.update()}zoomOut(){this.controller.scaled=this.camera.scaled.x*1.1,this.controller.update()}zoomToSelectEnableChanged(t){console.log("TODO: zoomToSelectEnableChanged: ",t),this.zoomToSelectEnable=t,this.controller.enablePan=!this.zoomToSelectEnable}selectEnableChanged(t){this.selectEnable=!!t,this.multiSelector.selectEnableChanged(t)}multiSelectEnableChanged(t){this.multiSelectEnable=!!t,this.multiSelector.multiSelectEnableChanged(t)}getIntersectObjects(t,e,n=[]){return this.scene?this.scene.getIntersectObjects(t,e,n):n}async focusAt(t,e=500){return this.camera?(zt.setFromCenterAndSize(t,En.set(e*2,e*2)),this.resetCameraByBoundingBox(zt,!0)):Promise.resolve()}async focusAtById(t,e=500){var a;const n=(a=this.scene)==null?void 0:a.getBoundingBoxById(t);if(console.log("focusAtById: ",t,n==null?void 0:n.toString()),n){n.expandByScalar(e),zt.copy(this.camera.boundingBoxWorld),zt.containsBox(n)||await this.resetCameraByBoundingBox(n,!0);return}}async focusAtDummy(t,e=500){var u,l;const n=this.dummiesController.getDummyById(t),a=(u=n==null?void 0:n.userData)==null?void 0:u.rmId;if(a){const c=(l=this.scene)==null?void 0:l.getBoundingBoxById(a);if(c){c.expandByScalar(e),zt.copy(this.camera.boundingBoxWorld),zt.containsBox(c)||await this.resetCameraByBoundingBox(c,!0);return}}if(n!=null&&n.position&&!(n!=null&&n.position.isEmpty())){zt.setFromCenterAndSize(n.worldPosition,En.set(e*2,e*2)),this.camera.boundingBoxWorld.containsBox(zt)||await this.resetCameraByBoundingBox(zt,!0);return}}async resetCameraByBoundingBox(t,e=!1){if(!this.camera)return Promise.resolve();if(!t||t.isEmpty())throw new Error("BoundingBox empty");if(!e)return this.camera.setByBox(t),Promise.resolve();const n=this.camera.getCameraPosition();t.getCenter(En),t.getSize(Jo);const a=Math.max(Jo.x/this.camera.width,Jo.y/this.camera.height),u={x:En.x,y:En.y,z:0,s:a,r:0};await this.animateCamera(n,u)}async animateCamera(t,e){return this.controller&&(this.controller.enabled=!1),this.tween&&this.tween.stop(),new Promise(n=>{this.tween=new iu.Tween(t).to(e,this.animateDuration).easing(iu.Easing.Exponential.Out).onUpdate(a=>{this.camera.position.set(a.x,a.y),this.camera.scaled.set(a.s,a.s),this.camera.rotation.set(a.r,a.r),this.camera.update()}).onComplete(()=>{this.controller&&(this.controller.enabled=!0),n()}).start()})}fullscreen(){this.scene&&(this.scene&&!this.scene.viewBox.isEmpty()?zt.copy(this.scene.viewBox):(this.scene.updateMatrixWorld(!0),this.scene.computeBoundingBox(),zt.copy(this.scene.boundingBox)),this.resetCameraByBoundingBox(zt,!0))}saveCameraPosition(t){zt.copy(this.camera.boundingBoxWorld);const e=t?vr+t:vr;sessionStorage.setItem(e,JSON.stringify(zt))}restoreCameraPosition(t){const e=t?vr+t:vr,n=sessionStorage.getItem(e);if(!n)return this.fullscreen();zt.copy(JSON.parse(n)),this.resetCameraByBoundingBox(zt,!0)}clearCameraPosition(t){const e=t?vr+t:vr;sessionStorage.setItem(e,"")}bindControllerEvents(){this.controller.addEventListener(_t.PAN_START,this.controllerPanStartHandler),this.controller.addEventListener(_t.PAN_END,this.controllerPanEndHandler),this.controller.addEventListener(_t.WHEEL_START,this.controllerWheelStartHandler),this.controller.addEventListener(_t.WHEEL_END,this.controllerWheelEndHandler),this.controller.addEventListener(_t.PAN_MOVE,this.controllerPanMoveHandler),this.controller.addEventListener(_t.POINTEROVER,this.controllerPointerOverHandler),this.multiSelector.addEventListener(No.SELECTED,this.multiSelectorSelectedHandler)}unbindControllerEvents(){this.controller.removeEventListener(_t.PAN_START,this.controllerPanStartHandler),this.controller.removeEventListener(_t.PAN_END,this.controllerPanEndHandler),this.controller.removeEventListener(_t.WHEEL_START,this.controllerWheelStartHandler),this.controller.removeEventListener(_t.WHEEL_END,this.controllerWheelEndHandler),this.controller.removeEventListener(_t.PAN_MOVE,this.controllerPanMoveHandler),this.controller.removeEventListener(_t.POINTEROVER,this.controllerPointerOverHandler),this.multiSelector.removeEventListener(No.SELECTED,this.multiSelectorSelectedHandler)}handlePanStart(t){if(!((t==null?void 0:t.type)!==_t.PAN_START&&(t==null?void 0:t.type)!==_t.WHEEL_START)&&this.zoomToSelectEnable){this.p1.copy(t.data.screenCoords),zt.makeEmpty().expandByPoint(this.p1),this.graph.draw(zt);return}}handlePanEnd(t){if(!((t==null?void 0:t.type)!==_t.PAN_END&&(t==null?void 0:t.type)!==_t.WHEEL_END)&&this.zoomToSelectEnable){this.p2.copy(t.data.screenCoords),zt.makeEmpty().expandByPoint(this.p1).expandByPoint(this.p2).unproject(this.controller.camera),this.setByBox(zt),this.graph.hide(),zt.makeEmpty();return}}handleControllerPanMove(t){(t==null?void 0:t.type)===_t.PAN_MOVE&&this.zoomToSelectEnable&&(this.p2.copy(t.data.screenCoords),zt.makeEmpty().expandByPoint(this.p1).expandByPoint(this.p2),this.graph.draw(zt))}handleControllerPointerOver(t){var a,u,l,c,f;const e=((a=t==null?void 0:t.e)==null?void 0:a.target)||((l=(u=t==null?void 0:t.e)==null?void 0:u.srcEvent)==null?void 0:l.target);let n=e==null?void 0:e.id;(n==null?void 0:n.indexOf("dummy"))>-1?(n=e.getAttribute(Kn+"-id"),n&&this._currentAssetId!==n&&this.dispatchEvent({type:"POINTEROVER",data:{id:n,assetType:"dummy"},e:t.e})):n&&((c=this.scene)!=null&&c.isBelongsToAssetType(n,er.WS))?this._currentAssetId!==n&&this.dispatchEvent({type:"POINTEROVER",data:{id:n,assetType:er.WS},e:t.e}):n&&((f=this.scene)!=null&&f.isBelongsToAssetType(n,er.RM))?this._currentAssetId!==n&&this.dispatchEvent({type:"POINTEROVER",data:{id:n,assetType:er.RM},e:t.e}):(this._currentAssetId=void 0,this.dispatchEvent({type:"POINTERLEAVE",e:t.e})),this._currentAssetId=n}handleMultiSelectorSelected(t){console.warn("handleMultiSelectorSelected:",t.data),this.dispatchEvent({type:"SELECTED",data:t.data})}setDummies(t){this.dummiesController.setDummiesByVos(t)}clearDummies(t){this.dummiesController.clearDummies(t)}update(t){this.tween&&this.tween.update(t)}}const zt=new St,En=new Y,Jo=new Y;var An=(r=>(r.SELECTED="SELECTED",r.POINTEROVER="POINTEROVER",r.POINTERLEAVE="POINTERLEAVE",r))(An||{});class ov extends Ir{name="SvgApp";params;renderer;view;scene;loadingScene;mainScene;zoomToSelectEnable=!1;zoomBox=new St;selectEnable=!1;multiSelectEnable=!1;runningHandler=this.running.bind(this);pointerOverHandler=this.handlePointerOver.bind(this);pointerLeaveHandler=this.handlePointerLeave.bind(this);multiSelectorSelectedHandler=this.handleMultiSelectorSelected.bind(this);dragEndHandler=this.handleDragEnd.bind(this);constructor(t={}){super(),this.params=t,this.params.zoomToSelectEnable&&(this.zoomToSelectEnable=!0),this.params.selectEnable&&(this.selectEnable=!0),this.params.multiSelectEnable&&(this.multiSelectEnable=!0),this.params.defaultFill||(this.params.defaultFill=Wt.getMoreTransparent(he.white,.3)),this.params.defaultStroke||(this.params.defaultStroke=Wt.getMoreTransparent(he.darkWhite,.8)),this.params.infoFill||(this.params.infoFill=Wt.getMoreTransparent(he.gray,.3)),this.params.infoStroke||(this.params.infoStroke=Wt.getMoreTransparent(he.darkGray,.8)),this.params.primaryFill||(this.params.primaryFill=Wt.getMoreTransparent(he.blue,.3)),this.params.primaryStroke||(this.params.primaryStroke=Wt.getMoreTransparent(he.darkBlue,.8)),this.params.successFill||(this.params.successFill=Wt.getMoreTransparent(he.green,.3)),this.params.successStroke||(this.params.successStroke=Wt.getMoreTransparent(he.darkGreen,.8)),this.params.warningFill||(this.params.warningFill=Wt.getMoreTransparent(he.yellow,.3)),this.params.warningStroke||(this.params.warningStroke=Wt.getMoreTransparent(he.darkYellow,.8)),this.params.dangerFill||(this.params.dangerFill=Wt.getMoreTransparent(he.red,.3)),this.params.dangerStroke||(this.params.dangerStroke=Wt.getMoreTransparent(he.darkRed,.8)),this.params.activeFill||(this.params.activeFill=Wt.getMoreTransparent(he.brown,.3)),this.params.activeStroke||(this.params.activeStroke=Wt.getMoreTransparent(he.darkBrown,.8)),this.renderer=new e0(t),this.view=new uv(t),this.trans2LoadingScene()}get isLoadingScene(){var t;return((t=this.scene)==null?void 0:t.name)==="SvgLoadingScene"}destroy(){var t,e;this.unbindAssetsEvents(),super.destroy(),(t=this.view)==null||t.destroy(),(e=this.renderer)==null||e.destroy()}resize(){var t,e,n;(t=this.renderer)==null||t.resize(),(n=(e=this.view)==null?void 0:e.camera)==null||n.resize()}isScene(t){var e;return((e=this.scene)==null?void 0:e.uuid)===t.uuid}removeScene(t){this.scene=void 0,t==null||t.destroy()}trans2MainScene(){var t,e;(t=this.scene)==null||t.unmount(),this.scene=this.mainScene,this.scene.isMounted||this.scene.mount(),this.view.bindScene(this.scene),(e=this.loadingScene)==null||e.destroy()}trans2LoadingScene(){var e,n;this.loadingScene=new a2(this.params),(e=this.scene)==null||e.unmount(),this.scene=this.loadingScene,this.scene.isMounted||this.scene.mount();const t=new St().copy(this.loadingScene.viewBox).expandByVector(new Y(1,1).multiplyScalar(360));this.view.setByBox(t,!1),(n=this.mainScene)==null||n.destroy()}start(){requestAnimationFrame(this.runningHandler)}running(t){this.scene&&(this.scene.update(),this.renderer.render(this.scene,this.view.camera),this.view.update(t),requestAnimationFrame(this.runningHandler))}async load(t,e,n=2,a){this.isLoadingScene||this.trans2LoadingScene(),await lc(this.params.syncDelay);const u=await new Ac().loadAsync(t);this.mainScene=new Yc(this.params),this.mainScene.bind(u),this.view.setByBox(this.mainScene.viewBox);const l=this.mainScene.getLayers(n);return e!=null&&e.length||(e=Mt.map(l,"label")),this.mainScene.showDefaultLayers(e,!0),a!=null&&a.length&&this.setSkeletons(a),this.trans2MainScene(),this.bindAssetsEvents(),console.log("svgApp.load: ",l),l}setSkeletons(t){var e;(e=this.scene)==null||e.setSkeletonLayers(t)}getLayers(t=2){var e;return(e=this.scene)==null?void 0:e.getLayers(t)}updateLayersVisibility(t,e=!1){var n;(n=this.scene)==null||n.updateLayersVisibility(t,e)}selectByIds(t){var e;(e=this.scene)==null||e.selectByIds(t,this.multiSelectEnable)}getSelectedIds(){var t;return(t=this.scene)==null?void 0:t.getSelectedIds()}async targetByIds(t){var e;this.scene&&((e=this.scene)==null||e.selectByIds(t,!1),tl.copy(this.scene.getSelectedBoundingBox()).expandByVector(new Y(1,1).multiplyScalar(100)),await lc(100),tl.isEmpty()||await this.view.setByBox(tl))}linkAssetsByTree(t){var e;(e=this.scene)==null||e.linkAssetsByTree(t)}setViewAreaLimit(t){this.renderer.viewAreaLimit=t}setAssetType(t,e){var n;(n=this.scene)==null||n.setAssetType(t,e)}getAssetIdsByType(t){var e;return(e=this.scene)==null?void 0:e.getAssetIdsByType(t)}clearFill(){var t;(t=this.scene)==null||t.clearFillOrStroke("fill")}clearFillByIds(t){var e;(e=this.scene)==null||e.clearFillOrStrokeByIds(t,"fill")}setFillByIds(t,e){var n;(n=this.scene)==null||n.setFillOrStrokeByIds(t,e,"fill")}clearStroke(){var t;(t=this.scene)==null||t.clearFillOrStroke("stroke")}clearStrokeByIds(t){var e;(e=this.scene)==null||e.clearFillOrStrokeByIds(t,"stroke")}setStrokeByIds(t,e){var n;(n=this.scene)==null||n.setFillOrStrokeByIds(t,e,"stroke")}getLegend(){var t;return(t=this.scene)==null?void 0:t.getLegend()}setAssetLabels(t,e){var n;(n=this.scene)==null||n.setAssetLabels(t,e)}clearAssetLabels(){var t;(t=this.scene)==null||t.clearAssetLabels()}fullscreen(){this.view.fullscreen()}saveCameraPosition(t){this.view.saveCameraPosition(t)}restoreCameraPosition(t){this.view.restoreCameraPosition(t)}clearCameraPosition(t){this.view.clearCameraPosition(t)}zoomIn(){this.view.zoomIn()}zoomOut(){this.view.zoomOut()}focusAt(t,e=1e3){var n;(n=this.view)==null||n.focusAt(t,e)}async focusAtById(t,e=1e3){var n;return(n=this.view)==null?void 0:n.focusAtById(t,e)}async focusAtDummy(t,e=1e3){var n;return(n=this.view)==null?void 0:n.focusAtDummy(t,e)}showAssetsLabel(t,e,n){var a,u,l,c;e?t==="dummy"?(l=(u=(a=this.view)==null?void 0:a.dummiesController)==null?void 0:u.dummies)==null||l.showDummyLabel(e):(c=this.view)==null||c.showAssetsLabel(t,e,n):this.hideAssetsLabel()}hideAssetsLabel(){var t,e,n,a;(n=(e=(t=this.view)==null?void 0:t.dummiesController)==null?void 0:e.dummies)==null||n.hideDummyLabel(),(a=this.view)==null||a.hideAssetsLabel()}highlightAssets(t,e){var n;(n=this.scene)==null||n.highlightAssets(t,e)}resetHighlightAssets(t){var e;(e=this.scene)==null||e.resetHighlightAssets(t)}fontZoomIn(){var t;(t=this.scene)==null||t.chef.fontZoom("asset-labels",1.1)}fontZoomOut(){var t;(t=this.scene)==null||t.chef.fontZoom("asset-labels",.9)}zoomToSelectEnableChanged(t){this.view.zoomToSelectEnableChanged(t)}selectEnableChanged(t){this.selectEnable=!!t,this.view.selectEnableChanged(t)}multiSelectEnableChanged(t){this.multiSelectEnable=!!t,this.view.multiSelectEnableChanged(t)}clearSelected(){var t;(t=this.scene)==null||t.clearSelected()}socialDistanceEnableChanged(t){var e;(e=this.scene)==null||e.socialDistanceEnableChanged(t)}getBoundingBoxById(t,e=!0){var a;if(!t)return;const n=(a=this.scene)==null?void 0:a.getBoundingBoxById(t);return n&&e&&n.applyMatrix3(this.view.camera.viewMatrix).round(),n}setDummies(t){var e;(e=this.view)==null||e.setDummies(t)}clearDummies(t){var e;(e=this.view)==null||e.clearDummies(t)}highlightDummies(t){var e,n;(n=(e=this.view)==null?void 0:e.dummiesController)==null||n.highlightDummies(t)}resetHighlightDummies(){var t,e;(e=(t=this.view)==null?void 0:t.dummiesController)==null||e.resetHighlightDummies()}bindAssetsEvents(){var t,e;this.view.addEventListener(An.POINTEROVER,this.pointerOverHandler),this.view.addEventListener(An.POINTERLEAVE,this.pointerLeaveHandler),this.view.addEventListener(An.SELECTED,this.multiSelectorSelectedHandler),(e=(t=this.view)==null?void 0:t.dummiesController)==null||e.addEventListener("panend",this.dragEndHandler)}unbindAssetsEvents(){var t,e;this.view.removeEventListener(An.POINTEROVER,this.pointerOverHandler),this.view.removeEventListener(An.POINTERLEAVE,this.pointerLeaveHandler),this.view.removeEventListener(An.SELECTED,this.multiSelectorSelectedHandler),(e=(t=this.view)==null?void 0:t.dummiesController)==null||e.removeEventListener("panend",this.dragEndHandler)}handleMultiSelectorSelected(t){this.dispatchEvent({type:"SELECTED",data:t.data})}handlePointerOver(t){this.dispatchEvent({type:"pointerover",data:t.data,e:t.e})}handlePointerLeave(t){this.dispatchEvent({type:"pointerleave",data:t.data,e:t.e})}handleInitializeStart(){console.log("App.initializeStart ...")}async handleInitializeComplete(t){console.log("App.initializeComplete ...",t),t!=null&&t.data&&this.launch()}handleDragEnd(t){this.dispatchEvent(t)}launch(){console.log("App.launch ...")}}const tl=new St;var Wf=(r=>(r.SELECTED="SELECTED",r.POINTEROVER="pointerover",r.POINTERLEAVE="pointerleave",r.DRAG_END="panend",r))(Wf||{});class lv{static cached=new Map;static cachedCanvas=new Map;static destroy(){this.cached.clear(),this.cachedCanvas.clear()}static createCanvas(t){var a;if(!((a=Zt.window)!=null&&a.document))throw new Error("environment not support");let e;t.containerId&&(e=Zt.window.document.getElementById(t.containerId)),e||(e=Zt.window.document.getElementsByTagName("body")[0]);let n;if(t.canvasId&&(n=Zt.window.document.getElementById(t.canvasId)||void 0),t.width||(t.width=e==null?void 0:e.offsetWidth),t.height||(t.height=e==null?void 0:e.offsetHeight),t.dpr||(t.dpr=Zt.dpr),n)this.resizeCanvas(n,t.width,t.height,t.dpr);else{if(n=this.createHtmlCanvas(t.width,t.height,t.dpr),!n)throw new Error("error environment");t.canvasId&&n.setAttribute("id",t.canvasId),e==null||e.appendChild(n)}return n.style.background=t.background||"transparent",n}static getContext2D(t,e={}){const n={alpha:!0,willReadFrequently:!!e.willReadFrequently},a=t.getContext("2d",n);if(!a)throw new Error("getContext2D error");return a.scale(e.dpr||1,e.dpr||1),a}static resizeCanvas(t,e,n,a=1){t instanceof OffscreenCanvas?(t.width=e,t.height=n):t instanceof HTMLCanvasElement&&(t.setAttribute("width",(e*a).toString()),t.setAttribute("height",(n*a).toString()),t.style.width=e+"px",t.style.height=n+"px",t.style.padding="0",t.style.margin="0",t.style.border="0",t.style.imageRendering="pixelated",t.style.transform="translateZ(0)")}static async getImageBitmapByCanvasAsync(t){if(t)return t instanceof OffscreenCanvas?t.transferToImageBitmap():t instanceof HTMLCanvasElement?await createImageBitmap(t):void 0}static get(t,e,n,a=1){let u=this.cached.get(t);return u||(u=this.create(e,n,a),this.set(t,u)),this.resizeCanvas(u,e,n,a),u}static set(t,e){if(!t||!e)throw new Error("error input");return this.cached.set(t,e)}static remove(t){this.cached.has(t)&&this.cached.delete(t)}static create(t,e,n=1){var a;if((a=Zt.window)!=null&&a.OffscreenCanvas)return new OffscreenCanvas(t,e);throw new Error("environment does not support")}static createHtmlCanvas(t,e,n=1){if(!Zt.window.document)throw new Error("environment does not support");const a=Zt.window.document.createElement("canvas");return this.resizeCanvas(a,t,e,n),a}static measureText(t,e,n=new Y){if(!t)throw new Error("input error");const u=this.get("measureText",1,1).getContext("2d");if(!u)throw new Error("bufferCtx not found");e.render(u);const l=u.measureText(t);if(!l)throw new Error("measureText error");const c=l.actualBoundingBoxRight+l.actualBoundingBoxLeft,f=l.actualBoundingBoxAscent+l.actualBoundingBoxDescent;return n.set(c,f),n}}class hv extends av{name="OpeView";constructor(t={}){super(t),this.initController(this.camera)}destroy(){this.controller&&this.controller.destroy(),super.destroy()}initController(t){let e=this.params.cvs;!e&&this.params.canvasId&&(e=document.getElementById(this.params.canvasId)),!(!this.params.controls||!t||!e)&&(this.controller&&this.controller.destroy(),this.controller=new Qc(e,t))}handleCameraChanged(t){console.warn("handleCameraChanged: ",t.target.camera.position.z,t.target.camera.scaled.x)}}var ri=(r=>(r.INIT="init",r.LOAD="load",r.LOADED="loaded",r.GET_LAYERS="getLayers",r.TERMINATE="terminate",r.CAMERA_SYNC="cameraSync",r.CAMERA_CHANGED="cameraChanged",r.SCENES_CHANGED="scenesChanged",r.UPDATE_LAYERS_VISIBILITY="updateLayersVisibility",r))(ri||{});class cv extends Ir{cvs;worker;view;boundingBox=new St;workerMessageHandler=this.handleWorkerMessage.bind(this);cameraHandler=this.handleCameraChanged.bind(this);runningHandler=this.running.bind(this);constructor(t={},e){super(),t.workerRender=!0,this.params=t,Zt.config=t;const n=lv.createCanvas(t);if(!n.transferControlToOffscreen)throw new Error("not support transferControlToOffscreen");this.cvs=n.transferControlToOffscreen(),this.view=new hv(t),this.view.camera.name="mainCamera",this.view.camera.resize(),this.worker=e,this.bindEvents()}destroy(){super.destroy(),this.unbindEvents(),this.worker.postMessage({task:ri.TERMINATE}),this.worker.terminate()}bindEvents(){var t,e;(e=(t=this.view)==null?void 0:t.camera)==null||e.addEventListener(Qa.UPDATE,this.cameraHandler),this.worker.addEventListener("message",this.workerMessageHandler)}unbindEvents(){var t,e;(e=(t=this.view)==null?void 0:t.controller)==null||e.removeEventListener(_t.CAMERA_CHANGED,this.cameraHandler),this.worker.removeEventListener("message",this.workerMessageHandler)}handleWorkerMessage(t){var e,n,a,u,l;switch(t.data.task){case ri.CAMERA_SYNC:if(!((e=t==null?void 0:t.data)!=null&&e.data))break;const c=JSON.parse(t.data.data);(a=(n=this.view)==null?void 0:n.camera)==null||a.fromJSON(c),this.view.camera.computeBoundingBox(),console.log("CAMERA_SYNC: ",c);break;case ri.CAMERA_CHANGED:const{t:f,r:d,s:y}=t.data.data;console.log("CAMERA_CHANGED: ",this.view.camera.width,f,d,y),(l=(u=this.view)==null?void 0:u.camera)==null||l.setTRS(f,d,y);break;case ri.SCENES_CHANGED:const{box:A}=t.data.data;if(!A)return;this.boundingBox.fromString(A);break;case"pong":console.log("response: pong");break}}handleCameraChanged(t){this.worker.postMessage({task:ri.CAMERA_CHANGED,data:t.data})}promiseWorkerResponse(t,e){return new Promise((n,a)=>{const u=c=>{var f,d,y;((f=c==null?void 0:c.data)==null?void 0:f.task)===t&&(this.worker.removeEventListener("message",u),this.worker.removeEventListener("error",l),console.log("AppOffscreen::response: ",(d=c==null?void 0:c.data)==null?void 0:d.task,(y=c==null?void 0:c.data)==null?void 0:y.data),n(c.data.data))},l=c=>{this.worker.removeEventListener("message",u),this.worker.removeEventListener("error",l),a(c.error)};this.worker.addEventListener("message",u),this.worker.addEventListener("error",l),this.worker.postMessage({task:t,data:e})})}resize(){var t;(t=this.view.camera)==null||t.resize()}async load(t,e){return this.promiseWorkerResponse(ri.LOAD,{url:t,layers:e})}async getLayers(t=2){return this.promiseWorkerResponse(ri.GET_LAYERS,{lv:t})}async fullscreen(){await this.view.resetCameraByBoundingBox(this.boundingBox,!0)}saveCameraPosition(t){this.view.saveCameraPosition(t)}restoreCameraPosition(t){this.view.restoreCameraPosition(t)}clearCameraPosition(t){this.view.clearCameraPosition(t)}updateLayersVisibility(t,e=!1){this.worker.postMessage({task:ri.UPDATE_LAYERS_VISIBILITY,data:{ids:t,visible:e}})}start(){const t=this.cvs,e=JSON.stringify(this.params);this.worker.postMessage({task:ri.INIT,data:{cvs:t,config:e}},[t]),requestAnimationFrame(this.runningHandler)}running(t){var e;(e=this.view)==null||e.update(t),requestAnimationFrame(this.runningHandler)}stop(){}}function fv(r){return new Worker("/environment.worker.js",{type:"module",name:r==null?void 0:r.name})}function pv(r){return new Worker("/renderer.worker.js",{type:"module",name:r==null?void 0:r.name})}le.AppEnum=Wf,le.AppOffscreen=cv,le.AssetTypeEnum=er,le.Box2=kg,le.Color=Wt,le.ColorsEnum=he,le.EnvironmentWorker=fv,le.GLOB=Zt,le.LayerTypeEnum=Vs,le.Monitor=Pt,le.RendererWorker=pv,le.SvgApp=ov,le.Vector2=Fg,le.defaultConfig=kn,Object.defineProperty(le,Symbol.toStringTag,{value:"Module"})});
|