@dotgui/embed 0.1.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,115 +1 @@
1
- var oJ=(J,$)=>()=>($||J(($={exports:{}}).exports,$),$.exports);var sJ=oJ((w1)=>{function M1(J,$,Q){if(Q===void 0)Q=Array.prototype;if(J&&typeof Q.find==="function")return Q.find.call(J,$);for(var K=0;K<J.length;K++)if(iJ(J,K)){var Z=J[K];if($.call(void 0,Z,K,J))return Z}}function Q8(J,$){if($===void 0)$=Object;if($&&typeof $.getOwnPropertyDescriptors==="function")J=$.create(null,$.getOwnPropertyDescriptors(J));return $&&typeof $.freeze==="function"?$.freeze(J):J}function iJ(J,$){return Object.prototype.hasOwnProperty.call(J,$)}function I1(J,$){if(J===null||typeof J!=="object")throw TypeError("target is not an object");for(var Q in $)if(iJ($,Q))J[Q]=$[Q];return J}var j0=Q8({allowfullscreen:!0,async:!0,autofocus:!0,autoplay:!0,checked:!0,controls:!0,default:!0,defer:!0,disabled:!0,formnovalidate:!0,hidden:!0,ismap:!0,itemscope:!0,loop:!0,multiple:!0,muted:!0,nomodule:!0,novalidate:!0,open:!0,playsinline:!0,readonly:!0,required:!0,reversed:!0,selected:!0});function P1(J){return iJ(j0,J.toLowerCase())}var X0=Q8({area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function z1(J){return iJ(X0,J.toLowerCase())}var _8=Q8({script:!1,style:!1,textarea:!0,title:!0});function R1(J){var $=J.toLowerCase();return iJ(_8,$)&&!_8[$]}function A1(J){var $=J.toLowerCase();return iJ(_8,$)&&_8[$]}function Y0(J){return J===N8.HTML}function C1(J){return Y0(J)||J===N8.XML_XHTML_APPLICATION}var N8=Q8({HTML:"text/html",XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),T1=Object.keys(N8).map(function(J){return N8[J]});function _1(J){return T1.indexOf(J)>-1}var N1=Q8({HTML:"http://www.w3.org/1999/xhtml",SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});w1.assign=I1;w1.find=M1;w1.freeze=Q8;w1.HTML_BOOLEAN_ATTRIBUTES=j0;w1.HTML_RAW_TEXT_ELEMENTS=_8;w1.HTML_VOID_ELEMENTS=X0;w1.hasDefaultHTMLNamespace=C1;w1.hasOwn=iJ;w1.isHTMLBooleanAttribute=P1;w1.isHTMLRawTextElement=R1;w1.isHTMLEscapableRawTextElement=A1;w1.isHTMLMimeType=Y0;w1.isHTMLVoidElement=z1;w1.isValidMimeType=_1;w1.MIME_TYPE=N8;w1.NAMESPACE=N1});var S8=oJ((i1)=>{var d1=sJ();function B0(J,$){J.prototype=Object.create(Error.prototype,{constructor:{value:J},name:{value:J.name,enumerable:!0,writable:$}})}var w8=d1.freeze({Error:"Error",IndexSizeError:"IndexSizeError",DomstringSizeError:"DomstringSizeError",HierarchyRequestError:"HierarchyRequestError",WrongDocumentError:"WrongDocumentError",InvalidCharacterError:"InvalidCharacterError",NoDataAllowedError:"NoDataAllowedError",NoModificationAllowedError:"NoModificationAllowedError",NotFoundError:"NotFoundError",NotSupportedError:"NotSupportedError",InUseAttributeError:"InUseAttributeError",InvalidStateError:"InvalidStateError",SyntaxError:"SyntaxError",InvalidModificationError:"InvalidModificationError",NamespaceError:"NamespaceError",InvalidAccessError:"InvalidAccessError",ValidationError:"ValidationError",TypeMismatchError:"TypeMismatchError",SecurityError:"SecurityError",NetworkError:"NetworkError",AbortError:"AbortError",URLMismatchError:"URLMismatchError",QuotaExceededError:"QuotaExceededError",TimeoutError:"TimeoutError",InvalidNodeTypeError:"InvalidNodeTypeError",DataCloneError:"DataCloneError",EncodingError:"EncodingError",NotReadableError:"NotReadableError",UnknownError:"UnknownError",ConstraintError:"ConstraintError",DataError:"DataError",TransactionInactiveError:"TransactionInactiveError",ReadOnlyError:"ReadOnlyError",VersionError:"VersionError",OperationError:"OperationError",NotAllowedError:"NotAllowedError",OptOutError:"OptOutError"}),W0=Object.keys(w8);function G0(J){return typeof J==="number"&&J>=1&&J<=25}function o1(J){return typeof J==="string"&&J.substring(J.length-w8.Error.length)===w8.Error}function E8(J,$){if(G0(J))this.name=W0[J],this.message=$||"";else this.message=J,this.name=o1($)?$:w8.Error;if(Error.captureStackTrace)Error.captureStackTrace(this,E8)}B0(E8,!0);Object.defineProperties(E8.prototype,{code:{enumerable:!0,get:function(){var J=W0.indexOf(this.name);if(G0(J))return J;return 0}}});var q0={INDEX_SIZE_ERR:1,DOMSTRING_SIZE_ERR:2,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,INVALID_CHARACTER_ERR:5,NO_DATA_ALLOWED_ERR:6,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INUSE_ATTRIBUTE_ERR:10,INVALID_STATE_ERR:11,SYNTAX_ERR:12,INVALID_MODIFICATION_ERR:13,NAMESPACE_ERR:14,INVALID_ACCESS_ERR:15,VALIDATION_ERR:16,TYPE_MISMATCH_ERR:17,SECURITY_ERR:18,NETWORK_ERR:19,ABORT_ERR:20,URL_MISMATCH_ERR:21,QUOTA_EXCEEDED_ERR:22,TIMEOUT_ERR:23,INVALID_NODE_TYPE_ERR:24,DATA_CLONE_ERR:25},t$=Object.entries(q0);for(K8=0;K8<t$.length;K8++)e$=t$[K8][0],E8[e$]=t$[K8][1];var e$,K8;function J6(J,$){if(this.message=J,this.locator=$,Error.captureStackTrace)Error.captureStackTrace(this,J6)}B0(J6);i1.DOMException=E8;i1.DOMExceptionName=w8;i1.ExceptionCode=q0;i1.ParseError=J6});var Y6=oJ((sK)=>{function O0(J){try{if(typeof J!=="function")J=RegExp;var $=new J("\uD834\uDF06","u").exec("\uD834\uDF06");return!!$&&$[0].length===2}catch(Q){}return!1}var X8=O0();function pJ(J){if(J.source[0]!=="[")throw Error(J+" can not be used with chars");return J.source.slice(1,J.source.lastIndexOf("]"))}function Z8(J,$){if(J.source[0]!=="[")throw Error("/"+J.source+"/ can not be used with chars_without");if(!$||typeof $!=="string")throw Error(JSON.stringify($)+" is not a valid search");if(J.source.indexOf($)===-1)throw Error('"'+$+'" is not is /'+J.source+"/");if($==="-"&&J.source.indexOf($)!==1)throw Error('"'+$+'" is not at the first postion of /'+J.source+"/");return new RegExp(J.source.replace($,""),X8?"u":"")}function n(J){var $=this;return new RegExp(Array.prototype.slice.call(arguments).map(function(Q){var K=typeof Q==="string";if(K&&$===void 0&&Q==="|")throw Error("use regg instead of reg to wrap expressions with `|`!");return K?Q:Q.source}).join(""),X8?"mu":"m")}function m(J){if(arguments.length===0)throw Error("no parameters provided");return n.apply(m,["(?:"].concat(Array.prototype.slice.call(arguments),[")"]))}var e1="�",cJ=/[-\x09\x0A\x0D\x20-\x2C\x2E-\uD7FF\uE000-\uFFFD]/;if(X8)cJ=n("[",pJ(cJ),"\\u{10000}-\\u{10FFFF}","]");var JK=new RegExp("[^"+pJ(cJ)+"]",X8?"u":""),Q6=/[\x20\x09\x0D\x0A]/,$K=pJ(Q6),l=n(Q6,"+"),QJ=n(Q6,"*"),k8=/[:_a-zA-Z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;if(X8)k8=n("[",pJ(k8),"\\u{10000}-\\u{10FFFF}","]");var QK=pJ(k8),K6=n("[",QK,pJ(/[-.0-9\xB7]/),pJ(/[\u0300-\u036F\u203F-\u2040]/),"]"),AJ=n(k8,K6,"*"),U0=n(K6,"+"),KK=n("&",AJ,";"),ZK=m(/&#[0-9]+;|&#x[0-9a-fA-F]+;/),x8=m(KK,"|",ZK),y8=n("%",AJ,";"),Z6=m(n('"',m(/[^%&"]/,"|",y8,"|",x8),"*",'"'),"|",n("'",m(/[^%&']/,"|",y8,"|",x8),"*","'")),jK=m('"',m(/[^<&"]/,"|",x8),"*",'"',"|","'",m(/[^<&']/,"|",x8),"*","'"),XK=Z8(k8,":"),YK=Z8(K6,":"),F0=n(XK,YK,"*"),b8=n(F0,m(":",F0),"?"),BK=n("^",b8,"$"),WK=n("(",b8,")"),j8=m(/"[^"]*"|'[^']*'/),GK=n(/^<\?/,"(",AJ,")",m(l,"(",cJ,"*?)"),"?",/\?>/),L0=/[\x20\x0D\x0Aa-zA-Z0-9-'()+,./:=?;!*#@$_%]/,v8=m('"',L0,'*"',"|","'",Z8(L0,"'"),"*'"),M0="<!--",I0="-->",qK=n(M0,m(Z8(cJ,"-"),"|",n("-",Z8(cJ,"-"))),"*",I0),D0="#PCDATA",UK=m(n(/\(/,QJ,D0,m(QJ,/\|/,QJ,b8),"*",QJ,/\)\*/),"|",n(/\(/,QJ,D0,QJ,/\)/)),FK=/[?*+]?/,LK=n(/\([^>]+\)/,FK),DK=m("EMPTY","|","ANY","|",UK,"|",LK),VK="<!ELEMENT",HK=n(VK,l,m(b8,"|",y8),l,m(DK,"|",y8),QJ,">"),OK=n("NOTATION",l,/\(/,QJ,AJ,m(QJ,/\|/,QJ,AJ),"*",QJ,/\)/),MK=n(/\(/,QJ,U0,m(QJ,/\|/,QJ,U0),"*",QJ,/\)/),IK=m(OK,"|",MK),PK=m(/CDATA|ID|IDREF|IDREFS|ENTITY|ENTITIES|NMTOKEN|NMTOKENS/,"|",IK),zK=m(/#REQUIRED|#IMPLIED/,"|",m(m("#FIXED",l),"?",jK)),RK=m(l,AJ,l,PK,l,zK),AK="<!ATTLIST",CK=n(AK,l,AJ,RK,"*",QJ,">"),$6="about:legacy-compat",TK=m('"'+$6+'"',"|","'"+$6+"'"),j6="SYSTEM",j$="PUBLIC",X$=m(m(j6,l,j8),"|",m(j$,l,v8,l,j8)),_K=n("^",m(m(j6,l,"(?<SystemLiteralOnly>",j8,")"),"|",m(j$,l,"(?<PubidLiteral>",v8,")",l,"(?<SystemLiteral>",j8,")"))),NK=n("^",v8,"$"),wK=n("^",j8,"$"),EK=m(l,"NDATA",l,AJ),SK=m(Z6,"|",m(X$,EK,"?")),P0="<!ENTITY",kK=n(P0,l,AJ,l,SK,QJ,">"),xK=m(Z6,"|",X$),yK=n(P0,l,"%",l,AJ,l,xK,QJ,">"),bK=m(kK,"|",yK),vK=n(j$,l,v8),gK=n("<!NOTATION",l,AJ,l,m(X$,"|",vK),QJ,">"),X6=n(QJ,"=",QJ),V0=/1[.]\d+/,uK=n(l,"version",X6,m("'",V0,"'","|",'"',V0,'"')),H0=/[A-Za-z][-A-Za-z0-9._]*/,hK=m(l,"encoding",X6,m('"',H0,'"',"|","'",H0,"'")),fK=m(l,"standalone",X6,m("'",m("yes","|","no"),"'","|",'"',m("yes","|","no"),'"')),mK=n(/^<\?xml/,uK,hK,"?",fK,"?",QJ,/\?>/),pK="<!DOCTYPE",cK="<![CDATA[",nK="]]>",rK=/<!\[CDATA\[/,dK=/\]\]>/,oK=n(cJ,"*?",dK),iK=n(rK,oK);sK.chars=pJ;sK.chars_without=Z8;sK.detectUnicodeSupport=O0;sK.reg=n;sK.regg=m;sK.ABOUT_LEGACY_COMPAT=$6;sK.ABOUT_LEGACY_COMPAT_SystemLiteral=TK;sK.AttlistDecl=CK;sK.CDATA_START=cK;sK.CDATA_END=nK;sK.CDSect=iK;sK.Char=cJ;sK.Comment=qK;sK.COMMENT_START=M0;sK.COMMENT_END=I0;sK.DOCTYPE_DECL_START=pK;sK.elementdecl=HK;sK.EntityDecl=bK;sK.EntityValue=Z6;sK.ExternalID=X$;sK.ExternalID_match=_K;sK.Name=AJ;sK.NotationDecl=gK;sK.Reference=x8;sK.PEReference=y8;sK.PI=GK;sK.PUBLIC=j$;sK.PubidLiteral=v8;sK.PubidLiteral_match=NK;sK.QName=b8;sK.QName_exact=BK;sK.QName_group=WK;sK.S=l;sK.SChar_s=$K;sK.S_OPT=QJ;sK.SYSTEM=j6;sK.SystemLiteral=j8;sK.SystemLiteral_match=wK;sK.InvalidChar=JK;sK.UNICODE_REPLACEMENT_CHARACTER=e1;sK.UNICODE_SUPPORT=X8;sK.XMLDecl=mK});var D6=oJ(($7)=>{var _J=sJ(),bJ=_J.find,u4=_J.hasDefaultHTMLNamespace,B8=_J.hasOwn,h4=_J.isHTMLMimeType,f4=_J.isHTMLRawTextElement,m4=_J.isHTMLVoidElement,g8=_J.MIME_TYPE,vJ=_J.NAMESPACE,HJ=Symbol(),N0=S8(),h=N0.DOMException,CJ=N0.DOMExceptionName,UJ=Y6();function MJ(J){if(J!==HJ)throw TypeError("Illegal constructor")}function p4(J){return J!==""}function c4(J){return J?J.split(/[\t\n\f\r ]+/).filter(p4):[]}function n4(J,$){if(!B8(J,$))J[$]=!0;return J}function z0(J){if(!J)return[];var $=c4(J);return Object.keys($.reduce(n4,{}))}function r4(J){return function($){return J&&J.indexOf($)!==-1}}function w0(J){if(!UJ.QName_exact.test(J))throw new h(h.INVALID_CHARACTER_ERR,'invalid character in qualified name "'+J+'"')}function W6(J,$){w0($),J=J||null;var Q=null,K=$;if($.indexOf(":")>=0){var Z=$.split(":");Q=Z[0],K=Z[1]}if(Q!==null&&J===null)throw new h(h.NAMESPACE_ERR,"prefix is non-null and namespace is null");if(Q==="xml"&&J!==_J.NAMESPACE.XML)throw new h(h.NAMESPACE_ERR,'prefix is "xml" and namespace is not the XML namespace');if((Q==="xmlns"||$==="xmlns")&&J!==_J.NAMESPACE.XMLNS)throw new h(h.NAMESPACE_ERR,'either qualifiedName or prefix is "xmlns" and namespace is not the XMLNS namespace');if(J===_J.NAMESPACE.XMLNS&&Q!=="xmlns"&&$!=="xmlns")throw new h(h.NAMESPACE_ERR,'namespace is the XMLNS namespace and neither qualifiedName nor prefix is "xmlns"');return[J,Q,K]}function q8(J,$){for(var Q in J)if(B8(J,Q))$[Q]=J[Q]}function IJ(J,$){var Q=J.prototype;if(!(Q instanceof $)){let K=function(){};K.prototype=$.prototype,K=new K,q8(Q,K),J.prototype=Q=K}if(Q.constructor!=J){if(typeof J!="function")console.error("unknown Class:"+J);Q.constructor=J}}var PJ={},TJ=PJ.ELEMENT_NODE=1,W8=PJ.ATTRIBUTE_NODE=2,W$=PJ.TEXT_NODE=3,E0=PJ.CDATA_SECTION_NODE=4,S0=PJ.ENTITY_REFERENCE_NODE=5,d4=PJ.ENTITY_NODE=6,G6=PJ.PROCESSING_INSTRUCTION_NODE=7,q6=PJ.COMMENT_NODE=8,Y8=PJ.DOCUMENT_NODE=9,k0=PJ.DOCUMENT_TYPE_NODE=10,nJ=PJ.DOCUMENT_FRAGMENT_NODE=11,o4=PJ.NOTATION_NODE=12,ZJ=_J.freeze({DOCUMENT_POSITION_DISCONNECTED:1,DOCUMENT_POSITION_PRECEDING:2,DOCUMENT_POSITION_FOLLOWING:4,DOCUMENT_POSITION_CONTAINS:8,DOCUMENT_POSITION_CONTAINED_BY:16,DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:32});function x0(J,$){if($.length<J.length)return x0($,J);var Q=null;for(var K in J){if(J[K]!==$[K])return Q;Q=J[K]}return Q}function R0(J){if(!J.guid)J.guid=Math.random();return J.guid}function XJ(){}XJ.prototype={length:0,item:function(J){return J>=0&&J<this.length?this[J]:null},toString:function(J){var $;if(typeof J==="function")$={requireWellFormed:!1,splitCDATASections:!0,nodeFilter:J};else if(J)$={requireWellFormed:!!J.requireWellFormed,splitCDATASections:J.splitCDATASections!==!1,nodeFilter:J.nodeFilter||null};else $={requireWellFormed:!1,splitCDATASections:!0,nodeFilter:null};for(var Q=[],K=0;K<this.length;K++)L6(this[K],Q,null,$);return Q.join("")},filter:function(J){return Array.prototype.filter.call(this,J)},indexOf:function(J){return Array.prototype.indexOf.call(this,J)}};XJ.prototype[Symbol.iterator]=function(){var J=this,$=0;return{next:function(){if($<J.length)return{value:J[$++],done:!1};else return{done:!0}},return:function(){return{done:!0}}}};function yJ(J,$){this._node=J,this._refresh=$,q$(this)}function q$(J){var $=J._node._inc||J._node.ownerDocument._inc;if(J._inc!==$){var Q=J._refresh(J._node);if(r0(J,"length",Q.length),!J.$$length||Q.length<J.$$length){for(var K=Q.length;K in J;K++)if(B8(J,K))delete J[K]}q8(Q,J),J._inc=$}}yJ.prototype.item=function(J){return q$(this),this[J]||null};IJ(yJ,XJ);function G8(){}function y0(J,$){var Q=0;while(Q<J.length){if(J[Q]===$)return Q;Q++}}function i4(J,$,Q,K){if(K)$[y0($,K)]=Q;else $[$.length]=Q,$.length++;if(J){Q.ownerElement=J;var Z=J.ownerDocument;if(Z)K&&g0(Z,J,K),s4(Z,J,Q)}}function A0(J,$,Q){var K=y0($,Q);if(K>=0){var Z=$.length-1;while(K<=Z)$[K]=$[++K];if($.length=Z,J){var j=J.ownerDocument;if(j)g0(j,J,Q);Q.ownerElement=null}}}G8.prototype={length:0,item:XJ.prototype.item,getNamedItem:function(J){if(this._ownerElement&&this._ownerElement._isInHTMLDocumentAndNamespace())J=J.toLowerCase();var $=0;while($<this.length){var Q=this[$];if(Q.nodeName===J)return Q;$++}return null},setNamedItem:function(J){var $=J.ownerElement;if($&&$!==this._ownerElement)throw new h(h.INUSE_ATTRIBUTE_ERR);var Q=this.getNamedItemNS(J.namespaceURI,J.localName);if(Q===J)return J;return i4(this._ownerElement,this,J,Q),Q},setNamedItemNS:function(J){return this.setNamedItem(J)},removeNamedItem:function(J){var $=this.getNamedItem(J);if(!$)throw new h(h.NOT_FOUND_ERR,J);return A0(this._ownerElement,this,$),$},removeNamedItemNS:function(J,$){var Q=this.getNamedItemNS(J,$);if(!Q)throw new h(h.NOT_FOUND_ERR,J?J+" : "+$:$);return A0(this._ownerElement,this,Q),Q},getNamedItemNS:function(J,$){if(!J)J=null;var Q=0;while(Q<this.length){var K=this[Q];if(K.localName===$&&K.namespaceURI===J)return K;Q++}return null}};G8.prototype[Symbol.iterator]=function(){var J=this,$=0;return{next:function(){if($<J.length)return{value:J[$++],done:!1};else return{done:!0}},return:function(){return{done:!0}}}};function b0(){}b0.prototype={hasFeature:function(J,$){return!0},createDocument:function(J,$,Q){var K=g8.XML_APPLICATION;if(J===vJ.HTML)K=g8.XML_XHTML_APPLICATION;else if(J===vJ.SVG)K=g8.XML_SVG_IMAGE;var Z=new hJ(HJ,{contentType:K});if(Z.implementation=this,Z.childNodes=new XJ,Z.doctype=Q||null,Q)Z.appendChild(Q);if($){var j=Z.createElementNS(J,$);Z.appendChild(j)}return Z},createDocumentType:function(J,$,Q,K){w0(J);var Z=new L$(HJ);return Z.name=J,Z.nodeName=J,Z.publicId=$||"",Z.systemId=Q||"",Z.internalSubset=K||"",Z.childNodes=new XJ,Z},createHTMLDocument:function(J){var $=new hJ(HJ,{contentType:g8.HTML});if($.implementation=this,$.childNodes=new XJ,J!==!1){$.doctype=this.createDocumentType("html"),$.doctype.ownerDocument=$,$.appendChild($.doctype);var Q=$.createElement("html");$.appendChild(Q);var K=$.createElement("head");if(Q.appendChild(K),typeof J==="string"){var Z=$.createElement("title");Z.appendChild($.createTextNode(J)),K.appendChild(Z)}Q.appendChild($.createElement("body"))}return $}};function o(J){MJ(J)}o.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,parentNode:null,get parentElement(){return this.parentNode&&this.parentNode.nodeType===this.ELEMENT_NODE?this.parentNode:null},childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,baseURI:"about:blank",get isConnected(){var J=this.getRootNode();return J&&J.nodeType===J.DOCUMENT_NODE},contains:function(J){if(!J)return!1;var $=J;do{if(this===$)return!0;$=$.parentNode}while($);return!1},getRootNode:function(J){var $=this;do{if(!$.parentNode)return $;$=$.parentNode}while($)},isEqualNode:function(J){if(!J)return!1;var $=[{node:this,other:J}];while($.length>0){var Q=$.pop(),K=Q.node,Z=Q.other;if(K.nodeType!==Z.nodeType)return!1;switch(K.nodeType){case K.DOCUMENT_TYPE_NODE:if(K.name!==Z.name)return!1;if(K.publicId!==Z.publicId)return!1;if(K.systemId!==Z.systemId)return!1;break;case K.ELEMENT_NODE:if(K.namespaceURI!==Z.namespaceURI)return!1;if(K.prefix!==Z.prefix)return!1;if(K.localName!==Z.localName)return!1;if(K.attributes.length!==Z.attributes.length)return!1;for(var j=0;j<K.attributes.length;j++){var X=K.attributes.item(j),W=Z.getAttributeNodeNS(X.namespaceURI,X.localName);if(!W)return!1;$.push({node:X,other:W})}break;case K.ATTRIBUTE_NODE:if(K.namespaceURI!==Z.namespaceURI)return!1;if(K.localName!==Z.localName)return!1;if(K.value!==Z.value)return!1;break;case K.PROCESSING_INSTRUCTION_NODE:if(K.target!==Z.target||K.data!==Z.data)return!1;break;case K.TEXT_NODE:case K.CDATA_SECTION_NODE:case K.COMMENT_NODE:if(K.data!==Z.data)return!1;break}if(K.childNodes.length!==Z.childNodes.length)return!1;for(var j=K.childNodes.length-1;j>=0;j--)$.push({node:K.childNodes[j],other:Z.childNodes[j]})}return!0},isSameNode:function(J){return this===J},insertBefore:function(J,$){return G$(this,J,$)},replaceChild:function(J,$){if(G$(this,J,$,m0),$)this.removeChild($)},removeChild:function(J){return h0(this,J)},appendChild:function(J){return this.insertBefore(J,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(J){return n0(this.ownerDocument||this,this,J)},normalize:function(){FJ(this,null,{enter:function(J){var $=J.firstChild;while($){var Q=$.nextSibling;if(Q!==null&&Q.nodeType===W$&&$.nodeType===W$)J.removeChild(Q),$.appendData(Q.data);else $=Q}return!0}})},isSupported:function(J,$){return this.ownerDocument.implementation.hasFeature(J,$)},lookupPrefix:function(J){var $=this;while($){var Q=$._nsMap;if(Q){for(var K in Q)if(B8(Q,K)&&Q[K]===J)return K}$=$.nodeType==W8?$.ownerDocument:$.parentNode}return null},lookupNamespaceURI:function(J){var $=this;while($){var Q=$._nsMap;if(Q){if(B8(Q,J))return Q[J]}$=$.nodeType==W8?$.ownerDocument:$.parentNode}return null},isDefaultNamespace:function(J){var $=this.lookupPrefix(J);return $==null},compareDocumentPosition:function(J){if(this===J)return 0;var $=J,Q=this,K=null,Z=null;if($ instanceof aJ)K=$,$=K.ownerElement;if(Q instanceof aJ){if(Z=Q,Q=Z.ownerElement,K&&$&&Q===$)for(var j=0,X;X=Q.attributes[j];j++){if(X===K)return ZJ.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+ZJ.DOCUMENT_POSITION_PRECEDING;if(X===Z)return ZJ.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+ZJ.DOCUMENT_POSITION_FOLLOWING}}if(!$||!Q||Q.ownerDocument!==$.ownerDocument)return ZJ.DOCUMENT_POSITION_DISCONNECTED+ZJ.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+(R0(Q.ownerDocument)>R0($.ownerDocument)?ZJ.DOCUMENT_POSITION_FOLLOWING:ZJ.DOCUMENT_POSITION_PRECEDING);if(Z&&$===Q)return ZJ.DOCUMENT_POSITION_CONTAINS+ZJ.DOCUMENT_POSITION_PRECEDING;if(K&&$===Q)return ZJ.DOCUMENT_POSITION_CONTAINED_BY+ZJ.DOCUMENT_POSITION_FOLLOWING;var W=[],B=$.parentNode;while(B){if(!Z&&B===Q)return ZJ.DOCUMENT_POSITION_CONTAINED_BY+ZJ.DOCUMENT_POSITION_FOLLOWING;W.push(B),B=B.parentNode}W.reverse();var Y=[],G=Q.parentNode;while(G){if(!K&&G===$)return ZJ.DOCUMENT_POSITION_CONTAINS+ZJ.DOCUMENT_POSITION_PRECEDING;Y.push(G),G=G.parentNode}Y.reverse();var q=x0(W,Y);for(var U in q.childNodes){var L=q.childNodes[U];if(L===Q)return ZJ.DOCUMENT_POSITION_FOLLOWING;if(L===$)return ZJ.DOCUMENT_POSITION_PRECEDING;if(Y.indexOf(L)>=0)return ZJ.DOCUMENT_POSITION_FOLLOWING;if(W.indexOf(L)>=0)return ZJ.DOCUMENT_POSITION_PRECEDING}return 0}};function v0(J){return J=="<"&&"&lt;"||J==">"&&"&gt;"||J=="&"&&"&amp;"||J=='"'&&"&quot;"||"&#"+J.charCodeAt()+";"}q8(PJ,o);q8(PJ,o.prototype);q8(ZJ,o);q8(ZJ,o.prototype);function B$(J,$){FJ(J,null,{enter:function(Q){return $(Q)?FJ.STOP:!0}})}function FJ(J,$,Q){var K=[{node:J,context:$,phase:FJ.ENTER}];while(K.length>0){var Z=K.pop();if(Z.phase===FJ.ENTER){var j=Q.enter(Z.node,Z.context);if(j===FJ.STOP)return FJ.STOP;if(K.push({node:Z.node,context:j,phase:FJ.EXIT}),j===null||j===void 0)continue;var X=Z.node.lastChild;while(X)K.push({node:X,context:j,phase:FJ.ENTER}),X=X.previousSibling}else if(Q.exit)Q.exit(Z.node,Z.context)}}FJ.STOP=Symbol("walkDOM.STOP");FJ.ENTER=0;FJ.EXIT=1;function hJ(J,$){MJ(J);var Q=$||{};this.ownerDocument=this,this.contentType=Q.contentType||g8.XML_APPLICATION,this.type=h4(this.contentType)?"html":"xml"}function s4(J,$,Q){J&&J._inc++;var K=Q.namespaceURI;if(K===vJ.XMLNS)$._nsMap[Q.prefix?Q.localName:""]=Q.value}function g0(J,$,Q,K){J&&J._inc++;var Z=Q.namespaceURI;if(Z===vJ.XMLNS)delete $._nsMap[Q.prefix?Q.localName:""]}function u0(J,$,Q){if(J&&J._inc){J._inc++;var K=$.childNodes;if(Q&&!Q.nextSibling)K[K.length++]=Q;else{var Z=$.firstChild,j=0;while(Z)K[j++]=Z,Z=Z.nextSibling;K.length=j,delete K[K.length]}}}function h0(J,$){if(J!==$.parentNode)throw new h(h.NOT_FOUND_ERR,"child's parent is not parent");var{previousSibling:Q,nextSibling:K}=$;if(Q)Q.nextSibling=K;else J.firstChild=K;if(K)K.previousSibling=Q;else J.lastChild=Q;return u0(J.ownerDocument,J),$.parentNode=null,$.previousSibling=null,$.nextSibling=null,$}function a4(J){return J&&(J.nodeType===o.DOCUMENT_NODE||J.nodeType===o.DOCUMENT_FRAGMENT_NODE||J.nodeType===o.ELEMENT_NODE)}function l4(J){return J&&(J.nodeType===o.CDATA_SECTION_NODE||J.nodeType===o.COMMENT_NODE||J.nodeType===o.DOCUMENT_FRAGMENT_NODE||J.nodeType===o.DOCUMENT_TYPE_NODE||J.nodeType===o.ELEMENT_NODE||J.nodeType===o.PROCESSING_INSTRUCTION_NODE||J.nodeType===o.TEXT_NODE)}function rJ(J){return J&&J.nodeType===o.DOCUMENT_TYPE_NODE}function uJ(J){return J&&J.nodeType===o.ELEMENT_NODE}function f0(J){return J&&J.nodeType===o.TEXT_NODE}function C0(J,$){var Q=J.childNodes||[];if(bJ(Q,uJ)||rJ($))return!1;var K=bJ(Q,rJ);return!($&&K&&Q.indexOf(K)>Q.indexOf($))}function T0(J,$){var Q=J.childNodes||[];function K(j){return uJ(j)&&j!==$}if(bJ(Q,K))return!1;var Z=bJ(Q,rJ);return!($&&Z&&Q.indexOf(Z)>Q.indexOf($))}function t4(J,$,Q){if(!a4(J))throw new h(h.HIERARCHY_REQUEST_ERR,"Unexpected parent node type "+J.nodeType);if(Q&&Q.parentNode!==J)throw new h(h.NOT_FOUND_ERR,"child not in parent");if(!l4($)||rJ($)&&J.nodeType!==o.DOCUMENT_NODE)throw new h(h.HIERARCHY_REQUEST_ERR,"Unexpected node type "+$.nodeType+" for parent node type "+J.nodeType)}function e4(J,$,Q){var K=J.childNodes||[],Z=$.childNodes||[];if($.nodeType===o.DOCUMENT_FRAGMENT_NODE){var j=Z.filter(uJ);if(j.length>1||bJ(Z,f0))throw new h(h.HIERARCHY_REQUEST_ERR,"More than one element or text in fragment");if(j.length===1&&!C0(J,Q))throw new h(h.HIERARCHY_REQUEST_ERR,"Element in fragment can not be inserted before doctype")}if(uJ($)){if(!C0(J,Q))throw new h(h.HIERARCHY_REQUEST_ERR,"Only one element can be added and only after doctype")}if(rJ($)){if(bJ(K,rJ))throw new h(h.HIERARCHY_REQUEST_ERR,"Only one doctype is allowed");var X=bJ(K,uJ);if(Q&&K.indexOf(X)<K.indexOf(Q))throw new h(h.HIERARCHY_REQUEST_ERR,"Doctype can only be inserted before an element");if(!Q&&X)throw new h(h.HIERARCHY_REQUEST_ERR,"Doctype can not be appended since element is present")}}function m0(J,$,Q){var K=J.childNodes||[],Z=$.childNodes||[];if($.nodeType===o.DOCUMENT_FRAGMENT_NODE){var j=Z.filter(uJ);if(j.length>1||bJ(Z,f0))throw new h(h.HIERARCHY_REQUEST_ERR,"More than one element or text in fragment");if(j.length===1&&!T0(J,Q))throw new h(h.HIERARCHY_REQUEST_ERR,"Element in fragment can not be inserted before doctype")}if(uJ($)){if(!T0(J,Q))throw new h(h.HIERARCHY_REQUEST_ERR,"Only one element can be added and only after doctype")}if(rJ($)){if(bJ(K,function(B){return rJ(B)&&B!==Q}))throw new h(h.HIERARCHY_REQUEST_ERR,"Only one doctype is allowed");var X=bJ(K,uJ);if(Q&&K.indexOf(X)<K.indexOf(Q))throw new h(h.HIERARCHY_REQUEST_ERR,"Doctype can only be inserted before an element")}}function G$(J,$,Q,K){if(t4(J,$,Q),J.nodeType===o.DOCUMENT_NODE)(K||e4)(J,$,Q);var Z=$.parentNode;if(Z)Z.removeChild($);if($.nodeType===nJ){var j=$.firstChild;if(j==null)return $;var X=$.lastChild}else j=X=$;var W=Q?Q.previousSibling:J.lastChild;if(j.previousSibling=W,X.nextSibling=Q,W)W.nextSibling=j;else J.firstChild=j;if(Q==null)J.lastChild=X;else Q.previousSibling=X;do j.parentNode=J;while(j!==X&&(j=j.nextSibling));if(u0(J.ownerDocument||J,J,$),$.nodeType==nJ)$.firstChild=$.lastChild=null;return $}hJ.prototype={implementation:null,nodeName:"#document",nodeType:Y8,doctype:null,documentElement:null,_inc:1,insertBefore:function(J,$){if(J.nodeType===nJ){var Q=J.firstChild;while(Q){var K=Q.nextSibling;this.insertBefore(Q,$),Q=K}return J}if(G$(this,J,$),J.ownerDocument=this,this.documentElement===null&&J.nodeType===TJ)this.documentElement=J;return J},removeChild:function(J){var $=h0(this,J);if($===this.documentElement)this.documentElement=null;return $},replaceChild:function(J,$){if(G$(this,J,$,m0),J.ownerDocument=this,$)this.removeChild($);if(uJ(J))this.documentElement=J},importNode:function(J,$){return J7(this,J,$)},getElementById:function(J){var $=null;return B$(this.documentElement,function(Q){if(Q.nodeType==TJ){if(Q.getAttribute("id")==J)return $=Q,!0}}),$},createElement:function(J){var $=new fJ(HJ);if($.ownerDocument=this,this.type==="html")J=J.toLowerCase();if(u4(this.contentType))$.namespaceURI=vJ.HTML;$.nodeName=J,$.tagName=J,$.localName=J,$.childNodes=new XJ;var Q=$.attributes=new G8;return Q._ownerElement=$,$},createDocumentFragment:function(){var J=new F8(HJ);return J.ownerDocument=this,J.childNodes=new XJ,J},createTextNode:function(J){var $=new u8(HJ);return $.ownerDocument=this,$.childNodes=new XJ,$.appendData(J),$},createComment:function(J){var $=new U$(HJ);return $.ownerDocument=this,$.childNodes=new XJ,$.appendData(J),$},createCDATASection:function(J){if(J.indexOf("]]>")!==-1)throw new h(h.INVALID_CHARACTER_ERR,'data contains "]]>"');var $=new F$(HJ);return $.ownerDocument=this,$.childNodes=new XJ,$.appendData(J),$},createProcessingInstruction:function(J,$){var Q=new V$(HJ);return Q.ownerDocument=this,Q.childNodes=new XJ,Q.nodeName=Q.target=J,Q.nodeValue=Q.data=$,Q},createAttribute:function(J){if(!UJ.QName_exact.test(J))throw new h(h.INVALID_CHARACTER_ERR,'invalid character in name "'+J+'"');if(this.type==="html")J=J.toLowerCase();return this._createAttribute(J)},_createAttribute:function(J){var $=new aJ(HJ);return $.ownerDocument=this,$.childNodes=new XJ,$.name=J,$.nodeName=J,$.localName=J,$.specified=!0,$},createEntityReference:function(J){if(!UJ.Name.test(J))throw new h(h.INVALID_CHARACTER_ERR,'not a valid xml name "'+J+'"');if(this.type==="html")throw new h("document is an html document",CJ.NotSupportedError);var $=new D$(HJ);return $.ownerDocument=this,$.childNodes=new XJ,$.nodeName=J,$},createElementNS:function(J,$){var Q=W6(J,$),K=new fJ(HJ),Z=K.attributes=new G8;return K.childNodes=new XJ,K.ownerDocument=this,K.nodeName=$,K.tagName=$,K.namespaceURI=Q[0],K.prefix=Q[1],K.localName=Q[2],Z._ownerElement=K,K},createAttributeNS:function(J,$){var Q=W6(J,$),K=new aJ(HJ);return K.ownerDocument=this,K.childNodes=new XJ,K.nodeName=$,K.name=$,K.specified=!0,K.namespaceURI=Q[0],K.prefix=Q[1],K.localName=Q[2],K}};IJ(hJ,o);function fJ(J){MJ(J),this._nsMap=Object.create(null)}fJ.prototype={nodeType:TJ,attributes:null,getQualifiedName:function(){return this.prefix?this.prefix+":"+this.localName:this.localName},_isInHTMLDocumentAndNamespace:function(){return this.ownerDocument.type==="html"&&this.namespaceURI===vJ.HTML},hasAttributes:function(){return!!(this.attributes&&this.attributes.length)},hasAttribute:function(J){return!!this.getAttributeNode(J)},getAttribute:function(J){var $=this.getAttributeNode(J);return $?$.value:null},getAttributeNode:function(J){if(this._isInHTMLDocumentAndNamespace())J=J.toLowerCase();return this.attributes.getNamedItem(J)},setAttribute:function(J,$){if(this._isInHTMLDocumentAndNamespace())J=J.toLowerCase();var Q=this.getAttributeNode(J);if(Q)Q.value=Q.nodeValue=""+$;else Q=this.ownerDocument._createAttribute(J),Q.value=Q.nodeValue=""+$,this.setAttributeNode(Q)},removeAttribute:function(J){var $=this.getAttributeNode(J);$&&this.removeAttributeNode($)},setAttributeNode:function(J){return this.attributes.setNamedItem(J)},setAttributeNodeNS:function(J){return this.attributes.setNamedItemNS(J)},removeAttributeNode:function(J){return this.attributes.removeNamedItem(J.nodeName)},removeAttributeNS:function(J,$){var Q=this.getAttributeNodeNS(J,$);Q&&this.removeAttributeNode(Q)},hasAttributeNS:function(J,$){return this.getAttributeNodeNS(J,$)!=null},getAttributeNS:function(J,$){var Q=this.getAttributeNodeNS(J,$);return Q?Q.value:null},setAttributeNS:function(J,$,Q){var K=W6(J,$),Z=K[2],j=this.getAttributeNodeNS(J,Z);if(j)j.value=j.nodeValue=""+Q;else j=this.ownerDocument.createAttributeNS(J,$),j.value=j.nodeValue=""+Q,this.setAttributeNode(j)},getAttributeNodeNS:function(J,$){return this.attributes.getNamedItemNS(J,$)},getElementsByClassName:function(J){var $=z0(J);return new yJ(this,function(Q){var K=[];if($.length>0)B$(Q,function(Z){if(Z!==Q&&Z.nodeType===TJ){var j=Z.getAttribute("class");if(j){var X=J===j;if(!X){var W=z0(j);X=$.every(r4(W))}if(X)K.push(Z)}}});return K})},getElementsByTagName:function(J){var $=(this.nodeType===Y8?this:this.ownerDocument).type==="html",Q=J.toLowerCase();return new yJ(this,function(K){var Z=[];return B$(K,function(j){if(j===K||j.nodeType!==TJ)return;if(J==="*")Z.push(j);else{var X=j.getQualifiedName(),W=$&&j.namespaceURI===vJ.HTML?Q:J;if(X===W)Z.push(j)}}),Z})},getElementsByTagNameNS:function(J,$){return new yJ(this,function(Q){var K=[];return B$(Q,function(Z){if(Z!==Q&&Z.nodeType===TJ&&(J==="*"||Z.namespaceURI===J)&&($==="*"||Z.localName==$))K.push(Z)}),K})}};hJ.prototype.getElementsByClassName=fJ.prototype.getElementsByClassName;hJ.prototype.getElementsByTagName=fJ.prototype.getElementsByTagName;hJ.prototype.getElementsByTagNameNS=fJ.prototype.getElementsByTagNameNS;IJ(fJ,o);function aJ(J){MJ(J),this.namespaceURI=null,this.prefix=null,this.ownerElement=null}aJ.prototype.nodeType=W8;IJ(aJ,o);function U8(J){MJ(J)}U8.prototype={data:"",substringData:function(J,$){return this.data.substring(J,J+$)},appendData:function(J){J=this.data+J,this.nodeValue=this.data=J,this.length=J.length},insertData:function(J,$){this.replaceData(J,0,$)},deleteData:function(J,$){this.replaceData(J,$,"")},replaceData:function(J,$,Q){var K=this.data.substring(0,J),Z=this.data.substring(J+$);Q=K+Q+Z,this.nodeValue=this.data=Q,this.length=Q.length}};IJ(U8,o);function u8(J){MJ(J)}u8.prototype={nodeName:"#text",nodeType:W$,splitText:function(J){var $=this.data,Q=$.substring(J);$=$.substring(0,J),this.data=this.nodeValue=$,this.length=$.length;var K=this.ownerDocument.createTextNode(Q);if(this.parentNode)this.parentNode.insertBefore(K,this.nextSibling);return K}};IJ(u8,U8);function U$(J){MJ(J)}U$.prototype={nodeName:"#comment",nodeType:q6};IJ(U$,U8);function F$(J){MJ(J)}F$.prototype={nodeName:"#cdata-section",nodeType:E0};IJ(F$,u8);function L$(J){MJ(J)}L$.prototype.nodeType=k0;IJ(L$,o);function U6(J){MJ(J)}U6.prototype.nodeType=o4;IJ(U6,o);function F6(J){MJ(J)}F6.prototype.nodeType=d4;IJ(F6,o);function D$(J){MJ(J)}D$.prototype.nodeType=S0;IJ(D$,o);function F8(J){MJ(J)}F8.prototype.nodeName="#document-fragment";F8.prototype.nodeType=nJ;IJ(F8,o);function V$(J){MJ(J)}V$.prototype.nodeType=G6;IJ(V$,U8);function p0(){}p0.prototype.serializeToString=function(J,$){return c0.call(J,$)};o.prototype.toString=c0;function c0(J){var $;if(typeof J==="function")$={requireWellFormed:!1,splitCDATASections:!0,nodeFilter:J};else if(J!=null)$={requireWellFormed:!!J.requireWellFormed,splitCDATASections:J.splitCDATASections!==!1,nodeFilter:J.nodeFilter||null};else $={requireWellFormed:!1,splitCDATASections:!0,nodeFilter:null};var Q=[],K=this.nodeType===Y8&&this.documentElement||this,Z=K.prefix,j=K.namespaceURI;if(j&&Z==null){var Z=K.lookupPrefix(j);if(Z==null)var X=[{namespace:j,prefix:null}]}return L6(this,Q,X,$),Q.join("")}function _0(J,$,Q){var K=J.prefix||"",Z=J.namespaceURI;if(!Z)return!1;if(K==="xml"&&Z===vJ.XML||Z===vJ.XMLNS)return!1;var j=Q.length;while(j--){var X=Q[j];if(X.prefix===K)return X.namespace!==Z}return!0}function Y$(J,$,Q){J.push(" ",$,'="',Q.replace(/[<>&"\t\n\r]/g,v0),'"')}function L6(J,$,Q,K){if(!Q)Q=[];var{nodeFilter:Z,requireWellFormed:j,splitCDATASections:X}=K,W=J.nodeType===Y8?J:J.ownerDocument,B=W.type==="html";FJ(J,{ns:Q},{enter:function(Y,G){var q=G.ns;if(Z)if(Y=Z(Y),Y){if(typeof Y=="string")return $.push(Y),null}else return null;switch(Y.nodeType){case TJ:var U=Y.attributes,L=U.length,D=Y.tagName,H=D;if(!B&&!Y.prefix&&Y.namespaceURI){var O;for(var M=0;M<U.length;M++)if(U.item(M).name==="xmlns"){O=U.item(M).value;break}if(!O)for(var P=q.length-1;P>=0;P--){var I=q[P];if(I.prefix===""&&I.namespace===Y.namespaceURI){O=I.namespace;break}}if(O!==Y.namespaceURI)for(var P=q.length-1;P>=0;P--){var I=q[P];if(I.namespace===Y.namespaceURI){if(I.prefix)H=I.prefix+":"+D;break}}}$.push("<",H);var z=q.slice();for(var k=0;k<L;k++){var x=U.item(k);if(x.prefix=="xmlns")z.push({prefix:x.localName,namespace:x.value});else if(x.nodeName=="xmlns")z.push({prefix:"",namespace:x.value})}for(var k=0;k<L;k++){var x=U.item(k);if(_0(x,B,z)){var E=x.prefix||"",A=x.namespaceURI;Y$($,E?"xmlns:"+E:"xmlns",A),z.push({prefix:E,namespace:A})}var R=Z?Z(x):x;if(R)if(typeof R==="string")$.push(R);else Y$($,R.name,R.value)}if(D===H&&_0(Y,B,z)){var y=Y.prefix||"",A=Y.namespaceURI;Y$($,y?"xmlns:"+y:"xmlns",A),z.push({prefix:y,namespace:A})}var f=!Y.firstChild;if(f&&(B||Y.namespaceURI===vJ.HTML))f=m4(D);if(f)return $.push("/>"),null;if($.push(">"),B&&f4(D)){var w=Y.firstChild;while(w){if(w.data)$.push(w.data);else L6(w,$,z.slice(),K);w=w.nextSibling}return $.push("</",H,">"),null}return{ns:z,tag:H};case Y8:case nJ:if(j&&Y.nodeType===Y8&&Y.documentElement==null)throw new h("The Document has no documentElement",CJ.InvalidStateError);return{ns:q};case W8:return Y$($,Y.name,Y.value),null;case W$:if(j&&UJ.InvalidChar.test(Y.data))throw new h("The Text node data contains characters outside the XML Char production",CJ.InvalidStateError);return $.push(Y.data.replace(/[<&>]/g,v0)),null;case E0:if(j&&Y.data.indexOf("]]>")!==-1)throw new h('The CDATASection data contains "]]>"',CJ.InvalidStateError);if(X)$.push(UJ.CDATA_START,Y.data.replace(/]]>/g,"]]]]><![CDATA[>"),UJ.CDATA_END);else $.push(UJ.CDATA_START,Y.data,UJ.CDATA_END);return null;case q6:if(j){if(UJ.InvalidChar.test(Y.data))throw new h("The comment node data contains characters outside the XML Char production",CJ.InvalidStateError);if(Y.data.indexOf("--")!==-1||Y.data[Y.data.length-1]==="-")throw new h('The comment node data contains "--" or ends with "-"',CJ.InvalidStateError)}return $.push(UJ.COMMENT_START,Y.data,UJ.COMMENT_END),null;case k0:var{publicId:u,systemId:C}=Y;if(j){if(u&&!UJ.PubidLiteral_match.test(u))throw new h("DocumentType publicId is not a valid PubidLiteral",CJ.InvalidStateError);if(C&&C!=="."&&!UJ.SystemLiteral_match.test(C))throw new h("DocumentType systemId is not a valid SystemLiteral",CJ.InvalidStateError);if(Y.internalSubset&&Y.internalSubset.indexOf("]>")!==-1)throw new h('DocumentType internalSubset contains "]>"',CJ.InvalidStateError)}if($.push(UJ.DOCTYPE_DECL_START," ",Y.name),u){if($.push(" ",UJ.PUBLIC," ",u),C&&C!==".")$.push(" ",C)}else if(C&&C!==".")$.push(" ",UJ.SYSTEM," ",C);if(Y.internalSubset)$.push(" [",Y.internalSubset,"]");return $.push(">"),null;case G6:if(j){if(Y.target.indexOf(":")!==-1||Y.target.toLowerCase()==="xml")throw new h("The ProcessingInstruction target is not well-formed",CJ.InvalidStateError);if(UJ.InvalidChar.test(Y.data))throw new h("The ProcessingInstruction data contains characters outside the XML Char production",CJ.InvalidStateError);if(Y.data.indexOf("?>")!==-1)throw new h('The ProcessingInstruction data contains "?>"',CJ.InvalidStateError)}return $.push("<?",Y.target," ",Y.data,"?>"),null;case S0:return $.push("&",Y.nodeName,";"),null;default:return $.push("??",Y.nodeName),null}},exit:function(Y,G){if(G&&G.tag)$.push("</",G.tag,">")}})}function J7(J,$,Q){var K;return FJ($,null,{enter:function(Z,j){var X=Z.cloneNode(!1);if(X.ownerDocument=J,X.parentNode=null,j===null)K=X;else j.appendChild(X);var W=Z.nodeType===W8||Q;return W?X:null}}),K}function n0(J,$,Q){var K;return FJ($,null,{enter:function(Z,j){var X=new Z.constructor(HJ);for(var W in Z)if(B8(Z,W)){var B=Z[W];if(typeof B!="object"){if(B!=X[W])X[W]=B}}if(Z.childNodes)X.childNodes=new XJ;X.ownerDocument=J;var Y=Q;switch(X.nodeType){case TJ:var G=Z.attributes,q=X.attributes=new G8,U=G.length;q._ownerElement=X;for(var L=0;L<U;L++)X.setAttributeNode(n0(J,G.item(L),!0));break;case W8:Y=!0}if(j!==null)j.appendChild(X);else K=X;return Y?X:null}}),K}function r0(J,$,Q){J[$]=Q}function B6(J){var $=[],Q=J.firstChild;while(Q){if(Q.nodeType===TJ)$.push(Q);Q=Q.nextSibling}return $}try{if(Object.defineProperty)Object.defineProperty(yJ.prototype,"length",{get:function(){return q$(this),this.$$length}}),Object.defineProperty(o.prototype,"textContent",{get:function(){if(this.nodeType===TJ||this.nodeType===nJ){var J=[];return FJ(this,null,{enter:function($){if($.nodeType===TJ||$.nodeType===nJ)return!0;if($.nodeType===G6||$.nodeType===q6)return null;J.push($.nodeValue)}}),J.join("")}return this.nodeValue},set:function(J){switch(this.nodeType){case TJ:case nJ:while(this.firstChild)this.removeChild(this.firstChild);if(J||String(J))this.appendChild(this.ownerDocument.createTextNode(J));break;default:this.data=J,this.value=J,this.nodeValue=J}}}),Object.defineProperty(fJ.prototype,"children",{get:function(){return new yJ(this,B6)}}),Object.defineProperty(hJ.prototype,"children",{get:function(){return new yJ(this,B6)}}),Object.defineProperty(F8.prototype,"children",{get:function(){return new yJ(this,B6)}}),r0=function(J,$,Q){J["$$"+$]=Q}}catch(J){}$7._updateLiveList=q$;$7.Attr=aJ;$7.CDATASection=F$;$7.CharacterData=U8;$7.Comment=U$;$7.Document=hJ;$7.DocumentFragment=F8;$7.DocumentType=L$;$7.DOMImplementation=b0;$7.Element=fJ;$7.Entity=F6;$7.EntityReference=D$;$7.LiveNodeList=yJ;$7.NamedNodeMap=G8;$7.Node=o;$7.NodeList=XJ;$7.Notation=U6;$7.Text=u8;$7.ProcessingInstruction=V$;$7.walkDOM=FJ;$7.XMLSerializer=p0});var i0=oJ((R7)=>{var d0=sJ().freeze;R7.XML_ENTITIES=d0({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'});R7.HTML_ENTITIES=d0({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"\uD835\uDD04",afr:"\uD835\uDD1E",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:"\uD835\uDD38",aopf:"\uD835\uDD52",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"\uD835\uDC9C",ascr:"\uD835\uDCB6",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:"\uD835\uDD05",bfr:"\uD835\uDD1F",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:"\uD835\uDD39",bopf:"\uD835\uDD53",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:"\uD835\uDCB7",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:"\uD835\uDD20",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:"\uD835\uDD54",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"\uD835\uDC9E",cscr:"\uD835\uDCB8",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:"\uD835\uDD07",dfr:"\uD835\uDD21",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:"\uD835\uDD3B",dopf:"\uD835\uDD55",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:"\uD835\uDC9F",dscr:"\uD835\uDCB9",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:"\uD835\uDD08",efr:"\uD835\uDD22",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:"\uD835\uDD3C",eopf:"\uD835\uDD56",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:"\uD835\uDD09",ffr:"\uD835\uDD23",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"\uD835\uDD3D",fopf:"\uD835\uDD57",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:"\uD835\uDCBB",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:"\uD835\uDD0A",gfr:"\uD835\uDD24",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"\uD835\uDD3E",gopf:"\uD835\uDD58",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"\uD835\uDCA2",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:"\uD835\uDD25",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"\uD835\uDD59",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"\uD835\uDCBD",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"\uD835\uDD26",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:"\uD835\uDD40",iopf:"\uD835\uDD5A",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"\uD835\uDCBE",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"\uD835\uDD0D",jfr:"\uD835\uDD27",jmath:"ȷ",Jopf:"\uD835\uDD41",jopf:"\uD835\uDD5B",Jscr:"\uD835\uDCA5",jscr:"\uD835\uDCBF",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"\uD835\uDD0E",kfr:"\uD835\uDD28",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"\uD835\uDD42",kopf:"\uD835\uDD5C",Kscr:"\uD835\uDCA6",kscr:"\uD835\uDCC0",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:"\uD835\uDD0F",lfr:"\uD835\uDD29",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:"\uD835\uDD43",lopf:"\uD835\uDD5D",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"\uD835\uDCC1",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:"\uD835\uDD10",mfr:"\uD835\uDD2A",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"\uD835\uDD44",mopf:"\uD835\uDD5E",mp:"∓",Mscr:"ℳ",mscr:"\uD835\uDCC2",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:"\uD835\uDD11",nfr:"\uD835\uDD2B",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:"\uD835\uDD5F",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:"\uD835\uDCA9",nscr:"\uD835\uDCC3",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:"\uD835\uDD12",ofr:"\uD835\uDD2C",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"\uD835\uDD46",oopf:"\uD835\uDD60",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"\uD835\uDCAA",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:"\uD835\uDD13",pfr:"\uD835\uDD2D",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:"\uD835\uDD61",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:"\uD835\uDCAB",pscr:"\uD835\uDCC5",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"\uD835\uDD14",qfr:"\uD835\uDD2E",qint:"⨌",Qopf:"ℚ",qopf:"\uD835\uDD62",qprime:"⁗",Qscr:"\uD835\uDCAC",qscr:"\uD835\uDCC6",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:"\uD835\uDD2F",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:"\uD835\uDD63",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"\uD835\uDCC7",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:"\uD835\uDD16",sfr:"\uD835\uDD30",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:"\uD835\uDD4A",sopf:"\uD835\uDD64",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:"\uD835\uDCAE",sscr:"\uD835\uDCC8",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:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"\uD835\uDD17",tfr:"\uD835\uDD31",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:"\uD835\uDD4B",topf:"\uD835\uDD65",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"\uD835\uDCAF",tscr:"\uD835\uDCC9",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:"\uD835\uDD18",ufr:"\uD835\uDD32",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"\uD835\uDD4C",uopf:"\uD835\uDD66",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:"\uD835\uDCB0",uscr:"\uD835\uDCCA",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:"\uD835\uDD19",vfr:"\uD835\uDD33",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"\uD835\uDD4D",vopf:"\uD835\uDD67",vprop:"∝",vrtri:"⊳",Vscr:"\uD835\uDCB1",vscr:"\uD835\uDCCB",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"\uD835\uDD1A",wfr:"\uD835\uDD34",Wopf:"\uD835\uDD4E",wopf:"\uD835\uDD68",wp:"℘",wr:"≀",wreath:"≀",Wscr:"\uD835\uDCB2",wscr:"\uD835\uDCCC",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"\uD835\uDD1B",xfr:"\uD835\uDD35",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"\uD835\uDD4F",xopf:"\uD835\uDD69",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"\uD835\uDCB3",xscr:"\uD835\uDCCD",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"\uD835\uDD1C",yfr:"\uD835\uDD36",YIcy:"Ї",yicy:"ї",Yopf:"\uD835\uDD50",yopf:"\uD835\uDD6A",Yscr:"\uD835\uDCB4",yscr:"\uD835\uDCCE",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"\uD835\uDD37",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"\uD835\uDD6B",Zscr:"\uD835\uDCB5",zscr:"\uD835\uDCCF",zwj:"‍",zwnj:"‌"});R7.entityMap=R7.HTML_ENTITIES});var jQ=oJ((b7)=>{var H8=sJ(),c=Y6(),e0=S8(),T7=H8.isHTMLEscapableRawTextElement,_7=H8.isHTMLMimeType,N7=H8.isHTMLRawTextElement,p8=H8.hasOwn,s0=H8.NAMESPACE,a0=e0.ParseError,w7=e0.DOMException,h8=0,dJ=1,L8=2,f8=3,D8=4,V8=5,m8=6,H$=7;function JQ(){}JQ.prototype={parse:function(J,$,Q){var K=this.domBuilder;K.startDocument(),$Q($,$=Object.create(null)),E7(J,$,Q,K,this.errorHandler),K.endDocument()}};var V6=/&#?\w+;?/g;function E7(J,$,Q,K,Z){var j=_7(K.mimeType);if(J.indexOf(c.UNICODE_REPLACEMENT_CHARACTER)>=0)Z.warning("Unicode replacement character detected, source encoding issues?");function X(V){if(V>65535){V-=65536;var T=55296+(V>>10),g=56320+(V&1023);return String.fromCharCode(T,g)}else return String.fromCharCode(V)}function W(V){var T=V[V.length-1]===";"?V:V+";";if(!j&&T!==V)return Z.error("EntityRef: expecting ;"),V;var g=c.Reference.exec(T);if(!g||g[0].length!==T.length)return Z.error("entity not matching Reference production: "+V),V;var b=T.slice(1,-1);if(p8(Q,b))return Q[b];else if(b.charAt(0)==="#")return X(parseInt(b.substring(1).replace("x","0x")));else return Z.error("entity not found:"+V),V}function B(V){if(V>O){var T=J.substring(O,V).replace(V6,W);U&&L(O),K.characters(T,0,V-O),O=V}}var Y=0,G=0,q=/\r\n?|\n|$/g,U=K.locator;function L(V,T){while(V>=G&&(T=q.exec(J)))Y=G,G=T.index+T[0].length,U.lineNumber++;U.columnNumber=V-Y+1}var D=[{currentNSMap:$}],H=[],O=0;while(!0){try{var M=J.indexOf("<",O);if(M<0){if(!j&&H.length>0)return Z.fatalError("unclosed xml tag(s): "+H.join(", "));if(!J.substring(O).match(/^\s*$/)){var P=K.doc,I=P.createTextNode(J.substring(O));if(P.documentElement)return Z.error("Extra content at the end of the document");P.appendChild(I),K.currentElement=I}return}if(M>O){var z=J.substring(O,M);if(!j&&H.length===0)z=z.replace(new RegExp(c.S_OPT.source,"g"),""),z&&Z.error("Unexpected content outside root element: '"+z+"'");B(M)}switch(J.charAt(M+1)){case"/":var C=J.indexOf(">",M+2),k=J.substring(M+2,C>0?C:void 0);if(!k)return Z.fatalError("end tag name missing");var x=C>0&&c.reg("^",c.QName_group,c.S_OPT,"$").exec(k);if(!x)return Z.fatalError('end tag name contains invalid characters: "'+k+'"');if(!K.currentElement&&!K.doc.documentElement)return;var E=H[H.length-1]||K.currentElement.tagName||K.doc.documentElement.tagName||"";if(E!==x[1]){var A=x[1].toLowerCase();if(!j||E.toLowerCase()!==A)return Z.fatalError('Opening and ending tag mismatch: "'+E+'" != "'+k+'"')}var R=D.pop();H.pop();var y=R.localNSMap;if(K.endElement(R.uri,R.localName,E),y){for(var f in y)if(p8(y,f))K.endPrefixMapping(f)}C++;break;case"?":U&&L(M),C=y7(J,M,K,Z);break;case"!":U&&L(M),C=KQ(J,M,K,Z,j);break;default:U&&L(M);var w=new ZQ,u=D[D.length-1].currentNSMap,C=S7(J,M,w,u,W,Z,j),v=w.length;if(!w.closed)if(j&&H8.isHTMLVoidElement(w.tagName))w.closed=!0;else H.push(w.tagName);if(U&&v){var r=l0(U,{});for(var p=0;p<v;p++){var e=w[p];L(e.offset),e.locator=l0(U,{})}if(K.locator=r,t0(w,K,u))D.push(w);K.locator=U}else if(t0(w,K,u))D.push(w);if(j&&!w.closed)C=k7(J,C,w.tagName,W,K);else C++}}catch(V){if(V instanceof a0)throw V;else if(V instanceof w7)throw new a0(V.name+": "+V.message,K.locator,V);Z.error("element parse error: "+V),C=-1}if(C>O)O=C;else B(Math.max(M,O)+1)}}function l0(J,$){return $.lineNumber=J.lineNumber,$.columnNumber=J.columnNumber,$}function S7(J,$,Q,K,Z,j,X){function W(L,D,H){if(p8(Q.attributeNames,L))return j.fatalError("Attribute "+L+" redefined");if(!X&&D.indexOf("<")>=0)return j.fatalError("Unescaped '<' not allowed in attributes values");Q.addValue(L,D.replace(/[\t\n\r]/g," ").replace(V6,Z),H)}var B,Y,G=++$,q=h8;while(!0){var U=J.charAt(G);switch(U){case"=":if(q===dJ)B=J.slice($,G),q=f8;else if(q===L8)q=f8;else throw Error("attribute equal must after attrName");break;case"'":case'"':if(q===f8||q===dJ){if(q===dJ)j.warning('attribute value must after "="'),B=J.slice($,G);if($=G+1,G=J.indexOf(U,$),G>0)Y=J.slice($,G),W(B,Y,$-1),q=V8;else throw Error("attribute value no end '"+U+"' match")}else if(q==D8)Y=J.slice($,G),W(B,Y,$),j.warning('attribute "'+B+'" missed start quot('+U+")!!"),$=G+1,q=V8;else throw Error('attribute value must after "="');break;case"/":switch(q){case h8:Q.setTagName(J.slice($,G));case V8:case m8:case H$:q=H$,Q.closed=!0;case D8:case dJ:break;case L8:Q.closed=!0;break;default:throw Error("attribute invalid close char('/')")}break;case"":if(j.error("unexpected end of input"),q==h8)Q.setTagName(J.slice($,G));return G;case">":switch(q){case h8:Q.setTagName(J.slice($,G));case V8:case m8:case H$:break;case D8:case dJ:if(Y=J.slice($,G),Y.slice(-1)==="/")Q.closed=!0,Y=Y.slice(0,-1);case L8:if(q===L8)Y=B;if(q==D8)j.warning('attribute "'+Y+'" missed quot(")!'),W(B,Y,$);else{if(!X)j.warning('attribute "'+Y+'" missed value!! "'+Y+'" instead!!');W(Y,Y,$)}break;case f8:if(!X)return j.fatalError(`AttValue: ' or " expected`)}return G;case"€":U=" ";default:if(U<=" ")switch(q){case h8:Q.setTagName(J.slice($,G)),q=m8;break;case dJ:B=J.slice($,G),q=L8;break;case D8:var Y=J.slice($,G);j.warning('attribute "'+Y+'" missed quot(")!!'),W(B,Y,$);case V8:q=m8;break}else switch(q){case L8:if(!X)j.warning('attribute "'+B+'" missed value!! "'+B+'" instead2!!');W(B,B,$),$=G,q=dJ;break;case V8:j.warning('attribute space is required"'+B+'"!!');case m8:q=dJ,$=G;break;case f8:q=D8,$=G;break;case H$:throw Error("elements closed character '/' and '>' must be connected to")}}G++}}function t0(J,$,Q){var K=J.tagName,Z=null,q=J.length;while(q--){var j=J[q],X=j.qName,W=j.value,U=X.indexOf(":");if(U>0)var B=j.prefix=X.slice(0,U),Y=X.slice(U+1),G=B==="xmlns"&&Y;else Y=X,B=null,G=X==="xmlns"&&"";if(j.localName=Y,G!==!1){if(Z==null)Z=Object.create(null),$Q(Q,Q=Object.create(null));Q[G]=Z[G]=W,j.uri=s0.XMLNS,$.startPrefixMapping(G,W)}}var q=J.length;while(q--)if(j=J[q],j.prefix){if(j.prefix==="xml")j.uri=s0.XML;if(j.prefix!=="xmlns")j.uri=Q[j.prefix]}var U=K.indexOf(":");if(U>0)B=J.prefix=K.slice(0,U),Y=J.localName=K.slice(U+1);else B=null,Y=J.localName=K;var L=J.uri=Q[B||""];if($.startElement(L,Y,K,J),J.closed){if($.endElement(L,Y,K),Z){for(B in Z)if(p8(Z,B))$.endPrefixMapping(B)}}else return J.currentNSMap=Q,J.localNSMap=Z,!0}function k7(J,$,Q,K,Z){var j=T7(Q);if(j||N7(Q)){var X=J.indexOf("</"+Q+">",$),W=J.substring($+1,X);if(j)W=W.replace(V6,K);return Z.characters(W,0,W.length),X}return $+1}function $Q(J,$){for(var Q in J)if(p8(J,Q))$[Q]=J[Q]}function QQ(J,$){var Q=$;function K(G){return G=G||0,J.charAt(Q+G)}function Z(G){G=G||1,Q+=G}function j(){var G=0;while(Q<J.length){var q=K();if(q!==" "&&q!==`
3
- `&&q!=="\t"&&q!=="\r")return G;G++,Z()}return-1}function X(){return J.substring(Q)}function W(G){return J.substring(Q,Q+G.length)===G}function B(G){return J.substring(Q,Q+G.length).toUpperCase()===G.toUpperCase()}function Y(G){var q=c.reg("^",G),U=q.exec(X());if(U)return Z(U[0].length),U[0];return null}return{char:K,getIndex:function(){return Q},getMatch:Y,getSource:function(){return J},skip:Z,skipBlanks:j,substringFromIndex:X,substringStartsWith:W,substringStartsWithCaseInsensitive:B}}function x7(J,$){function Q(W,B){var Y=c.PI.exec(W.substringFromIndex());if(!Y)return B.fatalError("processing instruction is not well-formed at position "+W.getIndex());if(Y[1].toLowerCase()==="xml")return B.fatalError("xml declaration is only allowed at the start of the document, but found at position "+W.getIndex());return W.skip(Y[0].length),Y[0]}var K=J.getSource();if(J.char()==="["){J.skip(1);var Z=J.getIndex();while(J.getIndex()<K.length){if(J.skipBlanks(),J.char()==="]"){var j=K.substring(Z,J.getIndex());return J.skip(1),j}var X=null;if(J.char()==="<"&&J.char(1)==="!")switch(J.char(2)){case"E":if(J.char(3)==="L")X=J.getMatch(c.elementdecl);else if(J.char(3)==="N")X=J.getMatch(c.EntityDecl);break;case"A":X=J.getMatch(c.AttlistDecl);break;case"N":X=J.getMatch(c.NotationDecl);break;case"-":X=J.getMatch(c.Comment);break}else if(J.char()==="<"&&J.char(1)==="?")X=Q(J,$);else if(J.char()==="%")X=J.getMatch(c.PEReference);else return $.fatalError("Error detected in Markup declaration");if(!X)return $.fatalError("Error in internal subset at position "+J.getIndex())}return $.fatalError("doctype internal subset is not well-formed, missing ]")}}function KQ(J,$,Q,K,Z){var j=QQ(J,$);switch(Z?j.char(2).toUpperCase():j.char(2)){case"-":var X=j.getMatch(c.Comment);if(X)return Q.comment(X,c.COMMENT_START.length,X.length-c.COMMENT_START.length-c.COMMENT_END.length),j.getIndex();else return K.fatalError("comment is not well-formed at position "+j.getIndex());case"[":var W=j.getMatch(c.CDSect);if(W){if(!Z&&!Q.currentElement)return K.fatalError("CDATA outside of element");return Q.startCDATA(),Q.characters(W,c.CDATA_START.length,W.length-c.CDATA_START.length-c.CDATA_END.length),Q.endCDATA(),j.getIndex()}else return K.fatalError("Invalid CDATA starting at position "+$);case"D":{if(Q.doc&&Q.doc.documentElement)return K.fatalError("Doctype not allowed inside or after documentElement at position "+j.getIndex());if(Z?!j.substringStartsWithCaseInsensitive(c.DOCTYPE_DECL_START):!j.substringStartsWith(c.DOCTYPE_DECL_START))return K.fatalError("Expected "+c.DOCTYPE_DECL_START+" at position "+j.getIndex());if(j.skip(c.DOCTYPE_DECL_START.length),j.skipBlanks()<1)return K.fatalError("Expected whitespace after "+c.DOCTYPE_DECL_START+" at position "+j.getIndex());var B={name:void 0,publicId:void 0,systemId:void 0,internalSubset:void 0};if(B.name=j.getMatch(c.Name),!B.name)return K.fatalError("doctype name missing or contains unexpected characters at position "+j.getIndex());if(Z&&B.name.toLowerCase()!=="html")K.warning("Unexpected DOCTYPE in HTML document at position "+j.getIndex());if(j.skipBlanks(),j.substringStartsWith(c.PUBLIC)||j.substringStartsWith(c.SYSTEM)){var Y=c.ExternalID_match.exec(j.substringFromIndex());if(!Y)return K.fatalError("doctype external id is not well-formed at position "+j.getIndex());if(Y.groups.SystemLiteralOnly!==void 0)B.systemId=Y.groups.SystemLiteralOnly;else B.systemId=Y.groups.SystemLiteral,B.publicId=Y.groups.PubidLiteral;j.skip(Y[0].length)}else if(Z&&j.substringStartsWithCaseInsensitive(c.SYSTEM)){if(j.skip(c.SYSTEM.length),j.skipBlanks()<1)return K.fatalError("Expected whitespace after "+c.SYSTEM+" at position "+j.getIndex());if(B.systemId=j.getMatch(c.ABOUT_LEGACY_COMPAT_SystemLiteral),!B.systemId)return K.fatalError("Expected "+c.ABOUT_LEGACY_COMPAT+" in single or double quotes after "+c.SYSTEM+" at position "+j.getIndex())}if(Z&&B.systemId&&!c.ABOUT_LEGACY_COMPAT_SystemLiteral.test(B.systemId))K.warning("Unexpected doctype.systemId in HTML document at position "+j.getIndex());if(!Z)j.skipBlanks(),B.internalSubset=x7(j,K);if(j.skipBlanks(),j.char()!==">")return K.fatalError("doctype not terminated with > at position "+j.getIndex());return j.skip(1),Q.startDTD(B.name,B.publicId,B.systemId,B.internalSubset),Q.endDTD(),j.getIndex()}default:return K.fatalError('Not well-formed XML starting with "<!" at position '+$)}}function y7(J,$,Q,K){var Z=J.substring($).match(c.PI);if(!Z)return K.fatalError("Invalid processing instruction starting at position "+$);if(Z[1].toLowerCase()==="xml"){if($>0)return K.fatalError("processing instruction at position "+$+" is an xml declaration which is only at the start of the document");if(!c.XMLDecl.test(J.substring($)))return K.fatalError("xml declaration is not well-formed")}return Q.processingInstruction(Z[1],Z[2]),$+Z[0].length}function ZQ(){this.attributeNames=Object.create(null)}ZQ.prototype={setTagName:function(J){if(!c.QName_exact.test(J))throw Error("invalid tagName:"+J);this.tagName=J},addValue:function(J,$,Q){if(!c.QName_exact.test(J))throw Error("invalid attribute:"+J);this.attributeNames[J]=this.length,this[this.length++]={qName:J,value:$,offset:Q}},length:0,getLocalName:function(J){return this[J].localName},getLocator:function(J){return this[J].locator},getQName:function(J){return this[J].qName},getURI:function(J){return this[J].uri},getValue:function(J){return this[J].value}};b7.XMLReader=JQ;b7.parseUtils=QQ;b7.parseDoctypeCommentOrCData=KQ});var UQ=oJ((a7)=>{var lJ=sJ(),h7=D6(),f7=S8(),XQ=i0(),m7=jQ(),p7=h7.DOMImplementation,c7=lJ.hasDefaultHTMLNamespace,n7=lJ.isHTMLMimeType,r7=lJ.isValidMimeType,WQ=lJ.MIME_TYPE,H6=lJ.NAMESPACE,YQ=f7.ParseError,d7=m7.XMLReader;function GQ(J){return J.replace(/\r[\n\u0085]/g,`
4
- `).replace(/[\r\u0085\u2028\u2029]/g,`
5
- `)}function qQ(J){if(J=J||{},J.locator===void 0)J.locator=!0;if(this.assign=J.assign||lJ.assign,this.domHandler=J.domHandler||M$,this.onError=J.onError||J.errorHandler,J.errorHandler&&typeof J.errorHandler!=="function")throw TypeError("errorHandler object is no longer supported, switch to onError!");else if(J.errorHandler)J.errorHandler("warning","The `errorHandler` option has been deprecated, use `onError` instead!",this);this.normalizeLineEndings=J.normalizeLineEndings||GQ,this.locator=!!J.locator,this.xmlns=this.assign(Object.create(null),J.xmlns)}qQ.prototype.parseFromString=function(J,$){if(!r7($))throw TypeError('DOMParser.parseFromString: the provided mimeType "'+$+'" is not valid.');var Q=this.assign(Object.create(null),this.xmlns),K=XQ.XML_ENTITIES,Z=Q[""]||null;if(c7($))K=XQ.HTML_ENTITIES,Z=H6.HTML;else if($===WQ.XML_SVG_IMAGE)Z=H6.SVG;Q[""]=Z,Q.xml=Q.xml||H6.XML;var j=new this.domHandler({mimeType:$,defaultNamespace:Z,onError:this.onError}),X=this.locator?{}:void 0;if(this.locator)j.setDocumentLocator(X);var W=new d7;W.errorHandler=j,W.domBuilder=j;var B=!lJ.isHTMLMimeType($);if(B&&typeof J!=="string")W.errorHandler.fatalError("source is not a string");if(W.parse(this.normalizeLineEndings(String(J)),Q,K),!j.doc.documentElement)W.errorHandler.fatalError("missing root element");return j.doc};function M$(J){var $=J||{};this.mimeType=$.mimeType||WQ.XML_APPLICATION,this.defaultNamespace=$.defaultNamespace||null,this.cdata=!1,this.currentElement=void 0,this.doc=void 0,this.locator=void 0,this.onError=$.onError}function O8(J,$){$.lineNumber=J.lineNumber,$.columnNumber=J.columnNumber}M$.prototype={startDocument:function(){var J=new p7;this.doc=n7(this.mimeType)?J.createHTMLDocument(!1):J.createDocument(this.defaultNamespace,"")},startElement:function(J,$,Q,K){var Z=this.doc,j=Z.createElementNS(J,Q||$),X=K.length;O$(this,j),this.currentElement=j,this.locator&&O8(this.locator,j);for(var W=0;W<X;W++){var J=K.getURI(W),B=K.getValue(W),Q=K.getQName(W),Y=Z.createAttributeNS(J,Q);this.locator&&O8(K.getLocator(W),Y),Y.value=Y.nodeValue=B,j.setAttributeNode(Y)}},endElement:function(J,$,Q){this.currentElement=this.currentElement.parentNode},startPrefixMapping:function(J,$){},endPrefixMapping:function(J){},processingInstruction:function(J,$){var Q=this.doc.createProcessingInstruction(J,$);this.locator&&O8(this.locator,Q),O$(this,Q)},ignorableWhitespace:function(J,$,Q){},characters:function(J,$,Q){if(J=BQ.apply(this,arguments),J){if(this.cdata)var K=this.doc.createCDATASection(J);else var K=this.doc.createTextNode(J);if(this.currentElement)this.currentElement.appendChild(K);else if(/^\s*$/.test(J))this.doc.appendChild(K);this.locator&&O8(this.locator,K)}},skippedEntity:function(J){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(J){if(J)J.lineNumber=0;this.locator=J},comment:function(J,$,Q){J=BQ.apply(this,arguments);var K=this.doc.createComment(J);this.locator&&O8(this.locator,K),O$(this,K)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(J,$,Q,K){var Z=this.doc.implementation;if(Z&&Z.createDocumentType){var j=Z.createDocumentType(J,$,Q,K);this.locator&&O8(this.locator,j),O$(this,j),this.doc.doctype=j}},reportError:function(J,$){if(typeof this.onError==="function")try{this.onError(J,$,this)}catch(Q){throw new YQ("Reporting "+J+' "'+$+'" caused '+Q,this.locator)}else console.error("[xmldom "+J+"]\t"+$,o7(this.locator))},warning:function(J){this.reportError("warning",J)},error:function(J){this.reportError("error",J)},fatalError:function(J){throw this.reportError("fatalError",J),new YQ(J,this.locator)}};function o7(J){if(J)return`
6
- @#[line:`+J.lineNumber+",col:"+J.columnNumber+"]"}function BQ(J,$,Q){if(typeof J=="string")return J.substr($,Q);else{if(J.length>=$+Q||$)return new java.lang.String(J,$,Q)+"";return J}}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(J){M$.prototype[J]=function(){return null}});function O$(J,$){if(!J.currentElement)J.doc.appendChild($);else J.currentElement.appendChild($)}function i7(J){if(J==="error")throw"onErrorStopParsing"}function s7(){throw"onWarningStopParsing"}a7.__DOMHandler=M$;a7.DOMParser=qQ;a7.normalizeLineEndings=GQ;a7.onErrorStopParsing=i7;a7.onWarningStopParsing=s7});if(typeof window<"u"){if(window.NodeList&&!NodeList.prototype.forEach)NodeList.prototype.forEach=Array.prototype.forEach;if(typeof window.CustomEvent!=="function")window.CustomEvent=function($,Q){Q=Q||{bubbles:!1,cancelable:!1,detail:null};var K=document.createEvent("CustomEvent");return K.initCustomEvent($,Q.bubbles,Q.cancelable,Q.detail),K}}var mQ=typeof document<"u"&&!!document.documentMode,k$;function pQ(){if(k$)return k$;return k$=document.createElement("div").style}var f6=["webkit","moz","ms"],t8={};function u$(J){if(t8[J])return t8[J];let $=pQ();if(J in $)return t8[J]=J;let Q=J[0].toUpperCase()+J.slice(1),K=f6.length;while(K--){let Z=`${f6[K]}${Q}`;if(Z in $)return t8[J]=Z}}function e8(J,$){return parseFloat($[u$(J)])||0}function J$(J,$,Q=window.getComputedStyle(J)){let K=$==="border"?"Width":"";return{left:e8(`${$}Left${K}`,Q),right:e8(`${$}Right${K}`,Q),top:e8(`${$}Top${K}`,Q),bottom:e8(`${$}Bottom${K}`,Q)}}function $8(J,$,Q){J.style[u$($)]=Q}function cQ(J,$){let Q=u$("transform");$8(J,"transition",`${Q} ${$.duration}ms ${$.easing}`)}function nQ(J,{x:$,y:Q,scale:K,isSVG:Z},j){if($8(J,"transform",`scale(${K}) translate(${$}px, ${Q}px)`),Z&&mQ){let X=window.getComputedStyle(J).getPropertyValue("transform");J.setAttribute("transform",X)}}function x$(J){let $=J.parentNode;if(!$||$.nodeType!==1)$=document.documentElement;let Q=window.getComputedStyle(J),K=window.getComputedStyle($),Z=J.getBoundingClientRect(),j=$.getBoundingClientRect();return{elem:{style:Q,width:Z.width,height:Z.height,top:Z.top,bottom:Z.bottom,left:Z.left,right:Z.right,margin:J$(J,"margin",Q),border:J$(J,"border",Q)},parent:{style:K,width:j.width,height:j.height,top:j.top,bottom:j.bottom,left:j.left,right:j.right,padding:J$($,"padding",K),border:J$($,"border",K)}}}var z8={down:"mousedown",move:"mousemove",up:"mouseup mouseleave"};if(typeof window<"u"){if(typeof window.PointerEvent==="function")z8={down:"pointerdown",move:"pointermove",up:"pointerup pointerleave pointercancel"};else if(typeof window.TouchEvent==="function")z8={down:"touchstart",move:"touchmove",up:"touchend touchcancel"}}function y$(J,$,Q,K){z8[J].split(" ").forEach((Z)=>{$.addEventListener(Z,Q,K)})}function b$(J,$,Q){z8[J].split(" ").forEach((K)=>{$.removeEventListener(K,Q)})}function p6(J,$){let Q=J.length;while(Q--)if(J[Q].pointerId===$.pointerId)return Q;return-1}function g$(J,$){let Q;if($.touches){Q=0;for(let K of $.touches)K.pointerId=Q++,g$(J,K);return}if(Q=p6(J,$),Q>-1)J.splice(Q,1);J.push($)}function rQ(J,$){if($.touches){while(J.length)J.pop();return}let Q=p6(J,$);if(Q>-1)J.splice(Q,1)}function m6(J){J=J.slice(0);let $=J.pop(),Q;while(Q=J.pop())$={clientX:(Q.clientX-$.clientX)/2+$.clientX,clientY:(Q.clientY-$.clientY)/2+$.clientY};return $}function v$(J){if(J.length<2)return 0;let $=J[0],Q=J[1];return Math.sqrt(Math.pow(Math.abs(Q.clientX-$.clientX),2)+Math.pow(Math.abs(Q.clientY-$.clientY),2))}function dQ(J){let $=J;while($&&$.parentNode){if($.parentNode===document)return!0;$=$.parentNode instanceof ShadowRoot?$.parentNode.host:$.parentNode}return!1}function oQ(J){return(J.getAttribute("class")||"").trim()}function iQ(J,$){return J.nodeType===1&&` ${oQ(J)} `.indexOf(` ${$} `)>-1}function sQ(J,$){for(let Q=J;Q!=null;Q=Q.parentNode)if(iQ(Q,$.excludeClass)||$.exclude.indexOf(Q)>-1)return!0;return!1}var aQ=/^http:[\w\.\/]+svg$/;function lQ(J){return aQ.test(J.namespaceURI)&&J.nodeName.toLowerCase()!=="svg"}function tQ(J){let $={};for(let Q in J)if(J.hasOwnProperty(Q))$[Q]=J[Q];return $}var c6={animate:!1,canvas:!1,cursor:"move",disablePan:!1,disableZoom:!1,disableXAxis:!1,disableYAxis:!1,duration:200,easing:"ease-in-out",exclude:[],excludeClass:"panzoom-exclude",handleStartEvent:(J)=>{J.preventDefault(),J.stopPropagation()},maxScale:4,minScale:0.125,overflow:"hidden",panOnlyWhenZoomed:!1,pinchAndPan:!1,relative:!1,setTransform:nQ,startX:0,startY:0,startScale:1,step:0.3,touchAction:"none"};function h$(J,$){if(!J)throw Error("Panzoom requires an element as an argument");if(J.nodeType!==1)throw Error("Panzoom requires an element with a nodeType of 1");if(!dQ(J))throw Error("Panzoom should be called on elements that have been attached to the DOM");$={...c6,...$};let Q=lQ(J),K=J.parentNode;K.style.overflow=$.overflow,K.style.userSelect="none",K.style.touchAction=$.touchAction,($.canvas?K:J).style.cursor=$.cursor,J.style.userSelect="none",J.style.touchAction=$.touchAction,$8(J,"transformOrigin",typeof $.origin==="string"?$.origin:Q?"0 0":"50% 50%");function Z(){K.style.overflow="",K.style.userSelect="",K.style.touchAction="",K.style.cursor="",J.style.cursor="",J.style.userSelect="",J.style.touchAction="",$8(J,"transformOrigin","")}function j(V={}){for(let T in V)if(V.hasOwnProperty(T))$[T]=V[T];if(V.hasOwnProperty("cursor")||V.hasOwnProperty("canvas"))K.style.cursor=J.style.cursor="",($.canvas?K:J).style.cursor=$.cursor;if(V.hasOwnProperty("overflow"))K.style.overflow=V.overflow;if(V.hasOwnProperty("touchAction"))K.style.touchAction=V.touchAction,J.style.touchAction=V.touchAction}let X=0,W=0,B=1,Y=!1;H($.startScale,{animate:!1,force:!0}),setTimeout(()=>{D($.startX,$.startY,{animate:!1,force:!0})});function G(V,T,g){if(g.silent)return;let b=new CustomEvent(V,{detail:T});J.dispatchEvent(b)}function q(V,T,g){let b={x:X,y:W,scale:B,isSVG:Q,originalEvent:g};return requestAnimationFrame(()=>{if(typeof T.animate==="boolean")if(T.animate)cQ(J,T);else $8(J,"transition","none");T.setTransform(J,b,T),G(V,b,T),G("panzoomchange",b,T)}),b}function U(V,T,g,b){let N={...$,...b},_={x:X,y:W,opts:N};if(!b?.force&&(N.disablePan||N.panOnlyWhenZoomed&&B===N.startScale))return _;if(V=parseFloat(V),T=parseFloat(T),!N.disableXAxis)_.x=(N.relative?X:0)+V;if(!N.disableYAxis)_.y=(N.relative?W:0)+T;if(N.contain){let S=x$(J),i=S.elem.width/B,JJ=S.elem.height/B,BJ=i*g,VJ=JJ*g,WJ=(BJ-i)/2,jJ=(VJ-JJ)/2;if(N.contain==="inside"){let LJ=(-S.elem.margin.left-S.parent.padding.left+WJ)/g,$J=(S.parent.width-BJ-S.parent.padding.left-S.elem.margin.left-S.parent.border.left-S.parent.border.right+WJ)/g;_.x=Math.max(Math.min(_.x,$J),LJ);let GJ=(-S.elem.margin.top-S.parent.padding.top+jJ)/g,OJ=(S.parent.height-VJ-S.parent.padding.top-S.elem.margin.top-S.parent.border.top-S.parent.border.bottom+jJ)/g;_.y=Math.max(Math.min(_.y,OJ),GJ)}else if(N.contain==="outside"){let LJ=(-(BJ-S.parent.width)-S.parent.padding.left-S.parent.border.left-S.parent.border.right+WJ)/g,$J=(WJ-S.parent.padding.left)/g;_.x=Math.max(Math.min(_.x,$J),LJ);let GJ=(-(VJ-S.parent.height)-S.parent.padding.top-S.parent.border.top-S.parent.border.bottom+jJ)/g,OJ=(jJ-S.parent.padding.top)/g;_.y=Math.max(Math.min(_.y,OJ),GJ)}}if(N.roundPixels)_.x=Math.round(_.x),_.y=Math.round(_.y);return _}function L(V,T){let g={...$,...T},b={scale:B,opts:g};if(!T?.force&&g.disableZoom)return b;let{minScale:N,maxScale:_}=$;if(g.contain){let S=x$(J),i=S.elem.width/B,JJ=S.elem.height/B;if(i>1&&JJ>1){let BJ=S.parent.width-S.parent.border.left-S.parent.border.right,VJ=S.parent.height-S.parent.border.top-S.parent.border.bottom,WJ=BJ/i,jJ=VJ/JJ;if($.contain==="inside")_=Math.min(_,WJ,jJ);else if($.contain==="outside")N=Math.max(N,WJ,jJ)}}return b.scale=Math.min(Math.max(V,N),_),b}function D(V,T,g,b){let N=U(V,T,B,g);if(X!==N.x||W!==N.y)return X=N.x,W=N.y,q("panzoompan",N.opts,b);return{x:X,y:W,scale:B,isSVG:Q,originalEvent:b}}function H(V,T,g){let b=L(V,T),N=b.opts;if(!T?.force&&N.disableZoom)return;V=b.scale;let _=X,S=W;if(N.focal){let JJ=N.focal;_=(JJ.x/V-JJ.x/B+X*V)/V,S=(JJ.y/V-JJ.y/B+W*V)/V}let i=U(_,S,V,{relative:!1,force:!0});return X=i.x,W=i.y,B=V,q("panzoomzoom",N,g)}function O(V,T){let g={...$,animate:!0,...T};return H(B*Math.exp((V?1:-1)*g.step),g)}function M(V){return O(!0,V)}function P(V){return O(!1,V)}function I(V,T,g,b){let N=x$(J),_={width:N.parent.width-N.parent.padding.left-N.parent.padding.right-N.parent.border.left-N.parent.border.right,height:N.parent.height-N.parent.padding.top-N.parent.padding.bottom-N.parent.border.top-N.parent.border.bottom},S=T.clientX-N.parent.left-N.parent.padding.left-N.parent.border.left-N.elem.margin.left,i=T.clientY-N.parent.top-N.parent.padding.top-N.parent.border.top-N.elem.margin.top;if(!Q)S-=N.elem.width/B/2,i-=N.elem.height/B/2;let JJ={x:S/_.width*(_.width*V),y:i/_.height*(_.height*V)};return H(V,{...g,animate:!1,focal:JJ},b)}function z(V,T){V.preventDefault();let g={...$,...T,animate:!1},N=(V.deltaY===0&&V.deltaX?V.deltaX:V.deltaY)<0?1:-1,_=L(B*Math.exp(N*g.step/3),g).scale;return I(_,V,g,V)}function k(V){let T={...$,animate:!0,force:!0,...V};B=L(T.startScale,T).scale;let g=U(T.startX,T.startY,B,T);return X=g.x,W=g.y,q("panzoomreset",T)}let x,E,A,R,y,f,w=[];function u(V){if(sQ(V.target,$))return;g$(w,V),Y=!0,$.handleStartEvent(V),x=X,E=W,G("panzoomstart",{x:X,y:W,scale:B,isSVG:Q,originalEvent:V},$);let T=m6(w);A=T.clientX,R=T.clientY,y=B,f=v$(w)}function C(V){if(!Y||x===void 0||E===void 0||A===void 0||R===void 0)return;g$(w,V);let T=m6(w),g=w.length>1,b=B;if(g){if(f===0)f=v$(w);let N=v$(w)-f;b=L(N*$.step/80+y).scale,I(b,T,{animate:!1},V)}if(!g||$.pinchAndPan)D(x+(T.clientX-A)/b,E+(T.clientY-R)/b,{animate:!1},V)}function v(V){if(w.length===1)G("panzoomend",{x:X,y:W,scale:B,isSVG:Q,originalEvent:V},$);if(rQ(w,V),!Y)return;Y=!1,x=E=A=R=void 0}let r=!1;function p(){if(r)return;r=!0,y$("down",$.canvas?K:J,u),y$("move",document,C,{passive:!0}),y$("up",document,v,{passive:!0})}function e(){r=!1,b$("down",$.canvas?K:J,u),b$("move",document,C),b$("up",document,v)}if(!$.noBind)p();return{bind:p,destroy:e,eventNames:z8,getPan:()=>({x:X,y:W}),getScale:()=>B,getOptions:()=>tQ($),handleDown:u,handleMove:C,handleUp:v,pan:D,reset:k,resetStyle:Z,setOptions:j,setStyle:(V,T)=>$8(J,V,T),zoom:H,zoomIn:M,zoomOut:P,zoomToPoint:I,zoomWithWheel:z}}h$.defaultOptions=c6;var KJ=Uint8Array,zJ=Uint16Array,a$=Int32Array,Q$=new KJ([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),K$=new KJ([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),n$=new KJ([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s6=function(J,$){var Q=new zJ(31);for(var K=0;K<31;++K)Q[K]=$+=1<<J[K-1];var Z=new a$(Q[30]);for(var K=1;K<30;++K)for(var j=Q[K];j<Q[K+1];++j)Z[j]=j-Q[K]<<5|K;return{b:Q,r:Z}},a6=s6(Q$,2),l6=a6.b,r$=a6.r;l6[28]=258,r$[258]=28;var t6=s6(K$,0),eQ=t6.b,n6=t6.r,d$=new zJ(32768);for(d=0;d<32768;++d)SJ=(d&43690)>>1|(d&21845)<<1,SJ=(SJ&52428)>>2|(SJ&13107)<<2,SJ=(SJ&61680)>>4|(SJ&3855)<<4,d$[d]=((SJ&65280)>>8|(SJ&255)<<8)>>1;var SJ,d,xJ=function(J,$,Q){var K=J.length,Z=0,j=new zJ($);for(;Z<K;++Z)if(J[Z])++j[J[Z]-1];var X=new zJ($);for(Z=1;Z<$;++Z)X[Z]=X[Z-1]+j[Z-1]<<1;var W;if(Q){W=new zJ(1<<$);var B=15-$;for(Z=0;Z<K;++Z)if(J[Z]){var Y=Z<<4|J[Z],G=$-J[Z],q=X[J[Z]-1]++<<G;for(var U=q|(1<<G)-1;q<=U;++q)W[d$[q]>>B]=Y}}else{W=new zJ(K);for(Z=0;Z<K;++Z)if(J[Z])W[Z]=d$[X[J[Z]-1]++]>>15-J[Z]}return W},mJ=new KJ(288);for(d=0;d<144;++d)mJ[d]=8;var d;for(d=144;d<256;++d)mJ[d]=9;var d;for(d=256;d<280;++d)mJ[d]=7;var d;for(d=280;d<288;++d)mJ[d]=8;var d,C8=new KJ(32);for(d=0;d<32;++d)C8[d]=5;var d,J1=xJ(mJ,9,0),$1=xJ(mJ,9,1),Q1=xJ(C8,5,0),K1=xJ(C8,5,1),f$=function(J){var $=J[0];for(var Q=1;Q<J.length;++Q)if(J[Q]>$)$=J[Q];return $},wJ=function(J,$,Q){var K=$/8|0;return(J[K]|J[K+1]<<8)>>($&7)&Q},m$=function(J,$){var Q=$/8|0;return(J[Q]|J[Q+1]<<8|J[Q+2]<<16)>>($&7)},l$=function(J){return(J+7)/8|0},T8=function(J,$,Q){if($==null||$<0)$=0;if(Q==null||Q>J.length)Q=J.length;return new KJ(J.subarray($,Q))};var Z1=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],DJ=function(J,$,Q){var K=Error($||Z1[J]);if(K.code=J,Error.captureStackTrace)Error.captureStackTrace(K,DJ);if(!Q)throw K;return K},j1=function(J,$,Q,K){var Z=J.length,j=K?K.length:0;if(!Z||$.f&&!$.l)return Q||new KJ(0);var X=!Q,W=X||$.i!=2,B=$.i;if(X)Q=new KJ(Z*3);var Y=function(jJ){var LJ=Q.length;if(jJ>LJ){var $J=new KJ(Math.max(LJ*2,jJ));$J.set(Q),Q=$J}},G=$.f||0,q=$.p||0,U=$.b||0,L=$.l,D=$.d,H=$.m,O=$.n,M=Z*8;do{if(!L){G=wJ(J,q,1);var P=wJ(J,q+1,3);if(q+=3,!P){var I=l$(q)+4,z=J[I-4]|J[I-3]<<8,k=I+z;if(k>Z){if(B)DJ(0);break}if(W)Y(U+z);Q.set(J.subarray(I,k),U),$.b=U+=z,$.p=q=k*8,$.f=G;continue}else if(P==1)L=$1,D=K1,H=9,O=5;else if(P==2){var x=wJ(J,q,31)+257,E=wJ(J,q+10,15)+4,A=x+wJ(J,q+5,31)+1;q+=14;var R=new KJ(A),y=new KJ(19);for(var f=0;f<E;++f)y[n$[f]]=wJ(J,q+f*3,7);q+=E*3;var w=f$(y),u=(1<<w)-1,C=xJ(y,w,1);for(var f=0;f<A;){var v=C[wJ(J,q,u)];q+=v&15;var I=v>>4;if(I<16)R[f++]=I;else{var r=0,p=0;if(I==16)p=3+wJ(J,q,3),q+=2,r=R[f-1];else if(I==17)p=3+wJ(J,q,7),q+=3;else if(I==18)p=11+wJ(J,q,127),q+=7;while(p--)R[f++]=r}}var e=R.subarray(0,x),V=R.subarray(x);H=f$(e),O=f$(V),L=xJ(e,H,1),D=xJ(V,O,1)}else DJ(1);if(q>M){if(B)DJ(0);break}}if(W)Y(U+131072);var T=(1<<H)-1,g=(1<<O)-1,b=q;for(;;b=q){var r=L[m$(J,q)&T],N=r>>4;if(q+=r&15,q>M){if(B)DJ(0);break}if(!r)DJ(2);if(N<256)Q[U++]=N;else if(N==256){b=q,L=null;break}else{var _=N-254;if(N>264){var f=N-257,S=Q$[f];_=wJ(J,q,(1<<S)-1)+l6[f],q+=S}var i=D[m$(J,q)&g],JJ=i>>4;if(!i)DJ(3);q+=i&15;var V=eQ[JJ];if(JJ>3){var S=K$[JJ];V+=m$(J,q)&(1<<S)-1,q+=S}if(q>M){if(B)DJ(0);break}if(W)Y(U+131072);var BJ=U+_;if(U<V){var VJ=j-V,WJ=Math.min(V,BJ);if(VJ+U<0)DJ(3);for(;U<WJ;++U)Q[U]=K[VJ+U]}for(;U<BJ;++U)Q[U]=Q[U-V]}}if($.l=L,$.p=b,$.b=U,$.f=G,L)G=1,$.m=H,$.d=D,$.n=O}while(!G);return U!=Q.length&&X?T8(Q,0,U):Q.subarray(0,U)},gJ=function(J,$,Q){Q<<=$&7;var K=$/8|0;J[K]|=Q,J[K+1]|=Q>>8},R8=function(J,$,Q){Q<<=$&7;var K=$/8|0;J[K]|=Q,J[K+1]|=Q>>8,J[K+2]|=Q>>16},p$=function(J,$){var Q=[];for(var K=0;K<J.length;++K)if(J[K])Q.push({s:K,f:J[K]});var Z=Q.length,j=Q.slice();if(!Z)return{t:J0,l:0};if(Z==1){var X=new KJ(Q[0].s+1);return X[Q[0].s]=1,{t:X,l:1}}Q.sort(function(k,x){return k.f-x.f}),Q.push({s:-1,f:25001});var W=Q[0],B=Q[1],Y=0,G=1,q=2;Q[0]={s:-1,f:W.f+B.f,l:W,r:B};while(G!=Z-1)W=Q[Q[Y].f<Q[q].f?Y++:q++],B=Q[Y!=G&&Q[Y].f<Q[q].f?Y++:q++],Q[G++]={s:-1,f:W.f+B.f,l:W,r:B};var U=j[0].s;for(var K=1;K<Z;++K)if(j[K].s>U)U=j[K].s;var L=new zJ(U+1),D=o$(Q[G-1],L,0);if(D>$){var K=0,H=0,O=D-$,M=1<<O;j.sort(function(x,E){return L[E.s]-L[x.s]||x.f-E.f});for(;K<Z;++K){var P=j[K].s;if(L[P]>$)H+=M-(1<<D-L[P]),L[P]=$;else break}H>>=O;while(H>0){var I=j[K].s;if(L[I]<$)H-=1<<$-L[I]++-1;else++K}for(;K>=0&&H;--K){var z=j[K].s;if(L[z]==$)--L[z],++H}D=$}return{t:new KJ(L),l:D}},o$=function(J,$,Q){return J.s==-1?Math.max(o$(J.l,$,Q+1),o$(J.r,$,Q+1)):$[J.s]=Q},r6=function(J){var $=J.length;while($&&!J[--$]);var Q=new zJ(++$),K=0,Z=J[0],j=1,X=function(B){Q[K++]=B};for(var W=1;W<=$;++W)if(J[W]==Z&&W!=$)++j;else{if(!Z&&j>2){for(;j>138;j-=138)X(32754);if(j>2)X(j>10?j-11<<5|28690:j-3<<5|12305),j=0}else if(j>3){X(Z),--j;for(;j>6;j-=6)X(8304);if(j>2)X(j-3<<5|8208),j=0}while(j--)X(Z);j=1,Z=J[W]}return{c:Q.subarray(0,K),n:$}},A8=function(J,$){var Q=0;for(var K=0;K<$.length;++K)Q+=J[K]*$[K];return Q},e6=function(J,$,Q){var K=Q.length,Z=l$($+2);J[Z]=K&255,J[Z+1]=K>>8,J[Z+2]=J[Z]^255,J[Z+3]=J[Z+1]^255;for(var j=0;j<K;++j)J[Z+j+4]=Q[j];return(Z+4+K)*8},d6=function(J,$,Q,K,Z,j,X,W,B,Y,G){gJ($,G++,Q),++Z[256];var q=p$(Z,15),U=q.t,L=q.l,D=p$(j,15),H=D.t,O=D.l,M=r6(U),P=M.c,I=M.n,z=r6(H),k=z.c,x=z.n,E=new zJ(19);for(var A=0;A<P.length;++A)++E[P[A]&31];for(var A=0;A<k.length;++A)++E[k[A]&31];var R=p$(E,7),y=R.t,f=R.l,w=19;for(;w>4&&!y[n$[w-1]];--w);var u=Y+5<<3,C=A8(Z,mJ)+A8(j,C8)+X,v=A8(Z,U)+A8(j,H)+X+14+3*w+A8(E,y)+2*E[16]+3*E[17]+7*E[18];if(B>=0&&u<=C&&u<=v)return e6($,G,J.subarray(B,B+Y));var r,p,e,V;if(gJ($,G,1+(v<C)),G+=2,v<C){r=xJ(U,L,0),p=U,e=xJ(H,O,0),V=H;var T=xJ(y,f,0);gJ($,G,I-257),gJ($,G+5,x-1),gJ($,G+10,w-4),G+=14;for(var A=0;A<w;++A)gJ($,G+3*A,y[n$[A]]);G+=3*w;var g=[P,k];for(var b=0;b<2;++b){var N=g[b];for(var A=0;A<N.length;++A){var _=N[A]&31;if(gJ($,G,T[_]),G+=y[_],_>15)gJ($,G,N[A]>>5&127),G+=N[A]>>12}}}else r=J1,p=mJ,e=Q1,V=C8;for(var A=0;A<W;++A){var S=K[A];if(S>255){var _=S>>18&31;if(R8($,G,r[_+257]),G+=p[_+257],_>7)gJ($,G,S>>23&31),G+=Q$[_];var i=S&31;if(R8($,G,e[i]),G+=V[i],i>3)R8($,G,S>>5&8191),G+=K$[i]}else R8($,G,r[S]),G+=p[S]}return R8($,G,r[256]),G+p[256]},X1=new a$([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),J0=new KJ(0),Y1=function(J,$,Q,K,Z,j){var X=j.z||J.length,W=new KJ(K+X+5*(1+Math.ceil(X/7000))+Z),B=W.subarray(K,W.length-Z),Y=j.l,G=(j.r||0)&7;if($){if(G)B[0]=j.r>>3;var q=X1[$-1],U=q>>13,L=q&8191,D=(1<<Q)-1,H=j.p||new zJ(32768),O=j.h||new zJ(D+1),M=Math.ceil(Q/3),P=2*M,I=function(GJ){return(J[GJ]^J[GJ+1]<<M^J[GJ+2]<<P)&D},z=new a$(25000),k=new zJ(288),x=new zJ(32),E=0,A=0,R=j.i||0,y=0,f=j.w||0,w=0;for(;R+2<X;++R){var u=I(R),C=R&32767,v=O[u];if(H[C]=v,O[u]=C,f<=R){var r=X-R;if((E>7000||y>24576)&&(r>423||!Y)){G=d6(J,B,0,z,k,x,A,y,w,R-w,G),y=E=A=0,w=R;for(var p=0;p<286;++p)k[p]=0;for(var p=0;p<30;++p)x[p]=0}var e=2,V=0,T=L,g=C-v&32767;if(r>2&&u==I(R-g)){var b=Math.min(U,r)-1,N=Math.min(32767,R),_=Math.min(258,r);while(g<=N&&--T&&C!=v){if(J[R+e]==J[R+e-g]){var S=0;for(;S<_&&J[R+S]==J[R+S-g];++S);if(S>e){if(e=S,V=g,S>b)break;var i=Math.min(g,S-2),JJ=0;for(var p=0;p<i;++p){var BJ=R-g+p&32767,VJ=H[BJ],WJ=BJ-VJ&32767;if(WJ>JJ)JJ=WJ,v=BJ}}}C=v,v=H[C],g+=C-v&32767}}if(V){z[y++]=268435456|r$[e]<<18|n6[V];var jJ=r$[e]&31,LJ=n6[V]&31;A+=Q$[jJ]+K$[LJ],++k[257+jJ],++x[LJ],f=R+e,++E}else z[y++]=J[R],++k[J[R]]}}for(R=Math.max(R,f);R<X;++R)z[y++]=J[R],++k[J[R]];if(G=d6(J,B,Y,z,k,x,A,y,w,R-w,G),!Y)j.r=G&7|B[G/8|0]<<3,G-=7,j.h=O,j.p=H,j.i=R,j.w=f}else{for(var R=j.w||0;R<X+Y;R+=65535){var $J=R+65535;if($J>=X)B[G/8|0]=Y,$J=X;G=e6(B,G+1,J.subarray(R,$J))}j.i=X}return T8(W,0,K+l$(G)+Z)},B1=function(){var J=new Int32Array(256);for(var $=0;$<256;++$){var Q=$,K=9;while(--K)Q=(Q&1&&-306674912)^Q>>>1;J[$]=Q}return J}(),W1=function(){var J=-1;return{p:function($){var Q=J;for(var K=0;K<$.length;++K)Q=B1[Q&255^$[K]]^Q>>>8;J=Q},d:function(){return~J}}};var G1=function(J,$,Q,K,Z){if(!Z){if(Z={l:1},$.dictionary){var j=$.dictionary.subarray(-32768),X=new KJ(j.length+J.length);X.set(j),X.set(J,j.length),J=X,Z.w=j.length}}return Y1(J,$.level==null?6:$.level,$.mem==null?Z.l?Math.ceil(Math.max(8,Math.min(13,Math.log(J.length)))*1.5):20:12+$.mem,Q,K,Z)},$0=function(J,$){var Q={};for(var K in J)Q[K]=J[K];for(var K in $)Q[K]=$[K];return Q};var kJ=function(J,$){return J[$]|J[$+1]<<8},RJ=function(J,$){return(J[$]|J[$+1]<<8|J[$+2]<<16|J[$+3]<<24)>>>0},c$=function(J,$){return RJ(J,$)+RJ(J,$+4)*4294967296},qJ=function(J,$,Q){for(;Q;++$)J[$]=Q,Q>>>=8};function q1(J,$){return G1(J,$||{},0,0)}function U1(J,$){return j1(J,{i:2},$&&$.out,$&&$.dictionary)}var Q0=function(J,$,Q,K){for(var Z in J){var j=J[Z],X=$+Z,W=K;if(Array.isArray(j))W=$0(K,j[1]),j=j[0];if(ArrayBuffer.isView(j))Q[X]=[j,W];else Q[X+="/"]=[new KJ(0),W],Q0(j,X,Q,K)}},o6=typeof TextEncoder<"u"&&new TextEncoder,i$=typeof TextDecoder<"u"&&new TextDecoder,F1=0;try{i$.decode(J0,{stream:!0}),F1=1}catch(J){}var L1=function(J){for(var $="",Q=0;;){var K=J[Q++],Z=(K>127)+(K>223)+(K>239);if(Q+Z>J.length)return{s:$,r:T8(J,Q-1)};if(!Z)$+=String.fromCharCode(K);else if(Z==3)K=((K&15)<<18|(J[Q++]&63)<<12|(J[Q++]&63)<<6|J[Q++]&63)-65536,$+=String.fromCharCode(55296|K>>10,56320|K&1023);else if(Z&1)$+=String.fromCharCode((K&31)<<6|J[Q++]&63);else $+=String.fromCharCode((K&15)<<12|(J[Q++]&63)<<6|J[Q++]&63)}};function $$(J,$){if($){var Q=new KJ(J.length);for(var K=0;K<J.length;++K)Q[K]=J.charCodeAt(K);return Q}if(o6)return o6.encode(J);var Z=J.length,j=new KJ(J.length+(J.length>>1)),X=0,W=function(G){j[X++]=G};for(var K=0;K<Z;++K){if(X+5>j.length){var B=new KJ(X+8+(Z-K<<1));B.set(j),j=B}var Y=J.charCodeAt(K);if(Y<128||$)W(Y);else if(Y<2048)W(192|Y>>6),W(128|Y&63);else if(Y>55295&&Y<57344)Y=65536+(Y&1047552)|J.charCodeAt(++K)&1023,W(240|Y>>18),W(128|Y>>12&63),W(128|Y>>6&63),W(128|Y&63);else W(224|Y>>12),W(128|Y>>6&63),W(128|Y&63)}return T8(j,0,X)}function Z$(J,$){if($){var Q="";for(var K=0;K<J.length;K+=16384)Q+=String.fromCharCode.apply(null,J.subarray(K,K+16384));return Q}else if(i$)return i$.decode(J);else{var Z=L1(J),j=Z.s,Q=Z.r;if(Q.length)DJ(8);return j}}var D1=function(J,$){return $+30+kJ(J,$+26)+kJ(J,$+28)},V1=function(J,$,Q){var K=kJ(J,$+28),Z=kJ(J,$+30),j=Z$(J.subarray($+46,$+46+K),!(kJ(J,$+8)&2048)),X=$+46+K,W=H1(J,X,Z,Q,RJ(J,$+20),RJ(J,$+24),RJ(J,$+42)),B=W[0],Y=W[1],G=W[2];return[kJ(J,$+10),B,Y,j,X+Z+kJ(J,$+32),G]},H1=function(J,$,Q,K,Z,j,X){var W=Z==4294967295,B=j==4294967295,Y=X==4294967295,G=$+Q,q=W+B+Y;if(K&&q){for(;$+4<G;$+=4+kJ(J,$+2))if(kJ(J,$)==1)return[W?c$(J,$+4+8*B):Z,B?c$(J,$+4):j,Y?c$(J,$+4+8*(B+W)):X,1];if(K<2)DJ(13)}return[Z,j,X,0]},s$=function(J){var $=0;if(J)for(var Q in J){var K=J[Q].length;if(K>65535)DJ(9);$+=K+4}return $},i6=function(J,$,Q,K,Z,j,X,W){var B=K.length,Y=Q.extra,G=W&&W.length,q=s$(Y);if(qJ(J,$,X!=null?33639248:67324752),$+=4,X!=null)J[$++]=20,J[$++]=Q.os;J[$]=20,$+=2,J[$++]=Q.flag<<1|(j<0&&8),J[$++]=Z&&8,J[$++]=Q.compression&255,J[$++]=Q.compression>>8;var U=new Date(Q.mtime==null?Date.now():Q.mtime),L=U.getFullYear()-1980;if(L<0||L>119)DJ(10);if(qJ(J,$,L<<25|U.getMonth()+1<<21|U.getDate()<<16|U.getHours()<<11|U.getMinutes()<<5|U.getSeconds()>>1),$+=4,j!=-1)qJ(J,$,Q.crc),qJ(J,$+4,j<0?-j-2:j),qJ(J,$+8,Q.size);if(qJ(J,$+12,B),qJ(J,$+14,q),$+=16,X!=null)qJ(J,$,G),qJ(J,$+6,Q.attrs),qJ(J,$+10,X),$+=14;if(J.set(K,$),$+=B,q)for(var D in Y){var H=Y[D],O=H.length;qJ(J,$,+D),qJ(J,$+2,O),J.set(H,$+4),$+=4+O}if(G)J.set(W,$),$+=G;return $},O1=function(J,$,Q,K,Z){qJ(J,$,101010256),qJ(J,$+8,Q),qJ(J,$+10,Q),qJ(J,$+12,K),qJ(J,$+16,Z)};function K0(J,$){if(!$)$={};var Q={},K=[];Q0(J,"",Q,$);var Z=0,j=0;for(var X in Q){var W=Q[X],B=W[0],Y=W[1],G=Y.level==0?0:8,q=$$(X),U=q.length,L=Y.comment,D=L&&$$(L),H=D&&D.length,O=s$(Y.extra);if(U>65535)DJ(11);var M=G?q1(B,Y):B,P=M.length,I=W1();I.p(B),K.push($0(Y,{size:B.length,crc:I.d(),c:M,f:q,m:D,u:U!=X.length||D&&L.length!=H,o:Z,compression:G})),Z+=30+U+O+P,j+=76+2*(U+O)+(H||0)+P}var z=new KJ(j+22),k=Z,x=j-Z;for(var E=0;E<K.length;++E){var q=K[E];i6(z,q.o,q,q.f,q.u,q.c.length);var A=30+q.f.length+s$(q.extra);z.set(q.c,q.o+A),i6(z,Z,q,q.f,q.u,q.c.length,q.o,q.m),Z+=16+A+(q.m?q.m.length:0)}return O1(z,Z,K.length,x,k),z}function Z0(J,$){var Q={},K=J.length-22;for(;RJ(J,K)!=101010256;--K)if(!K||J.length-K>65558)DJ(13);var Z=kJ(J,K+8);if(!Z)return{};var j=RJ(J,K+16),X=RJ(J,K-20)==117853008;if(X){var W=RJ(J,K-12);if(X=RJ(J,W)==101075792,X)Z=RJ(J,W+32),j=RJ(J,W+48)}var B=$&&$.filter;for(var Y=0;Y<Z;++Y){var G=V1(J,j,X),q=G[0],U=G[1],L=G[2],D=G[3],H=G[4],O=G[5],M=D1(J,O);if(j=H,!B||B({name:D,size:U,originalSize:L,compression:q}))if(!q)Q[D]=T8(J,M,M+U);else if(q==8)Q[D]=U1(J.subarray(M,M+U),{out:new KJ(L)});else DJ(14,"unknown compression type "+q)}return Q}var M8=sJ();var{assign:Q5,hasDefaultHTMLNamespace:K5,isHTMLMimeType:Z5,isValidMimeType:j5,MIME_TYPE:X5,NAMESPACE:Y5}=M8;var I$=S8();var{DOMException:B5,DOMExceptionName:W5,ExceptionCode:G5,ParseError:q5}=I$;var YJ=D6();var{Attr:U5,CDATASection:F5,CharacterData:L5,Comment:D5,Document:V5,DocumentFragment:H5,DocumentType:O5,DOMImplementation:M5,Element:I5,Entity:P5,EntityReference:z5,LiveNodeList:R5,NamedNodeMap:A5,Node:C5,NodeList:T5,Notation:_5,ProcessingInstruction:N5,Text:w5,XMLSerializer:E5}=YJ;var P$=UQ();var{DOMParser:O6,normalizeLineEndings:S5,onErrorStopParsing:k5,onWarningStopParsing:x5}=P$;var y5=new Set(["x","y","w","h","opacity","rotation","radius","spread","font-size","font-weight","line-height","letter-spacing","arc-start","arc-end","arc-inner","border-width","min-width","max-width","min-height","max-height","columns","corner-smoothing","paragraph-spacing","paragraph-indent","pt","pr","pb","pl","max-lines","mask-x","mask-y","mask-width","mask-height","miter-limit","unit","col-span","row-span"]),b5=new Set(["wrap","clip","mask","abs","truncate","reverse-z"]);function n8(J,$){if($==="true")return!0;if($==="false")return!1;if(b5.has(J)&&$==="")return!0;if(y5.has(J)){if((J==="w"||J==="h")&&($==="fill"||$==="hug"))return $;let Q=Number($);return Number.isFinite(Q)?Q:$}return $}function FQ(J,$,Q,K){let Z={},j={};for(let B=0;B<J.attributes.length;B++){let{name:Y,value:G}=J.attributes[B],q=I8(G,$);Z[Y]=n8(Y,q);let U=z$(G,$);if(U)j[Y]=U}let X=J.getAttribute("fill-style");if(X&&Q[X]!==void 0)Z.fill=I8(Q[X],$),delete Z["fill-style"],delete j["fill-style"],Z.fillStyle=X;let W=J.getAttribute("text-style");if(W&&K[W]){let B=K[W];for(let Y of Object.keys(B))if(J.getAttribute(Y)===null)Z[Y]=n8(Y,I8(B[Y],$));delete Z["text-style"],delete j["text-style"],Z.textStyle=W}if(Object.keys(j).length)Z.tokens=j;return Z}function I8(J,$){if(!J||J.indexOf("$")===-1)return J;return J.replace(/\$([A-Za-z0-9_.-]+)/g,(Q,K)=>$[K]??Q)}function z$(J,$){if(!J||J.indexOf("$")===-1)return;let Q=J.match(/\$([A-Za-z0-9_.-]+)/g);if(!Q)return;for(let K of Q){let Z=K.slice(1);if($[Z]!==void 0)return Z}return}function M6(J,$,Q){if(J.axis&&J.byValue){let K=$[J.axis]?$[J.axis].default:void 0,Z=Q[J.axis]!==void 0?Q[J.axis]:K;if(Z!==void 0&&J.byValue[Z]!==void 0)return J.byValue[Z];if(K!==void 0&&J.byValue[K]!==void 0)return J.byValue[K]}return J.value}function v5(J,$,Q){let K={};for(let Z of Object.keys(J)){let j=M6(J[Z],$,Q);if(j!==void 0)K[Z]=j}return K}var g5={abs:"true",clip:"true",gap:"auto",mask:"true","reverse-z":"true",truncate:"true",wrap:"true"};function u5(J){let $="",Q=0;while(Q<J.length){let K=J[Q];if(K==='"'||K==="'"){let G=K,q=Q;Q++;while(Q<J.length&&J[Q]!==G)Q++;if(Q<J.length)Q++;$+=J.slice(q,Q);continue}if(!/\s/.test(K)){$+=K,Q++;continue}let j=Q;while(Q<J.length&&/\s/.test(J[Q]))Q++;let X=Q;if(!/[A-Za-z]/.test(J[Q]||"")){$+=J.slice(j,Q+1),Q++;continue}while(Q<J.length&&/[\w-]/.test(J[Q]))Q++;let W=J.slice(X,Q),B=J[Q],Y=g5[W];if(Y&&(/\s/.test(B||"")||B==="/"||B===">"))$+=`${J.slice(j,X)}${W}="${Y}"`;else $+=J.slice(j,Q)}return $}function h5(J){let $="",Q=0;while(Q<J.length){let K=J.indexOf("<",Q);if(K===-1){$+=J.slice(Q);break}if($+=J.slice(Q,K),J.startsWith("<!--",K)){let B=J.indexOf("-->",K+4),Y=B===-1?J.length:B+3;$+=J.slice(K,Y),Q=Y;continue}let Z=K+1,j=null;while(Z<J.length){let B=J[Z];if(j){if(B===j)j=null}else if(B==='"'||B==="'")j=B;else if(B===">")break;Z++}let X=Z<J.length?Z+1:J.length,W=J.slice(K,X);if(/^<\/|^<\?|^<!/.test(W))$+=W;else $+=u5(W);Q=X}return $}function f5(J){let $={},Q=(K)=>{let Z=K.getAttribute("name"),j=K.getAttribute("values");if(!Z||!j)return;let X=j.trim().split(/\s+/).filter(Boolean);if(!X.length)return;let W=K.getAttribute("default"),B=W&&X.indexOf(W)!==-1?W:X[0];$[Z]={values:X,default:B}};for(let K of Array.from(J.children))if(K.tagName==="mode")Q(K);else if(K.tagName==="modes"){for(let Z of Array.from(K.children))if(Z.tagName==="mode")Q(Z)}return $}var m5={color:"color",number:"number",string:"string"};function p5(J,$){let Q={};for(let K of Array.from(J.children)){if(K.tagName!=="tokens")continue;for(let Z of Array.from(K.children)){let j=m5[Z.tagName];if(!j)continue;let X=Z.getAttribute("name");if(!X)continue;let W={type:j},B=Z.getAttribute("value");if(B!==null)W.value=B;let Y,G={};for(let q=0;q<Z.attributes.length;q++){let U=Z.attributes[q],L,D;for(let H of Object.keys($)){let O=H+"-";if(U.name.indexOf(O)!==0)continue;let M=U.name.slice(O.length);if($[H].values.indexOf(M)===-1)continue;if(L===void 0||H.length>L.length)L=H,D=M}if(L===void 0||D===void 0)continue;if(Y===void 0)Y=L;if(L!==Y)continue;G[D]=U.value}if(Y!==void 0&&Object.keys(G).length>0)W.axis=Y,W.byValue=G;Q[X]=W}}return Q}function c5(J){let $={};for(let Q of Array.from(J.children)){if(Q.tagName!=="fonts")continue;for(let K of Array.from(Q.children)){if(K.tagName!=="font")continue;let Z=K.getAttribute("family"),j=K.getAttribute("source");if(!Z||!j)continue;$[Z]={source:j,category:K.getAttribute("category")||void 0,weights:K.getAttribute("weights")||void 0,styles:K.getAttribute("styles")||void 0,variants:K.getAttribute("variants")||void 0}}}return $}var n5=["font-family","font-size","font-weight","font-style","font-variation","font-feature","line-height","letter-spacing","decoration","decoration-color","decoration-style","decoration-thickness","text-case"];function r5(J){let $={};for(let Q of Array.from(J.children)){if(Q.tagName!=="styles")continue;for(let K of Array.from(Q.children)){if(K.tagName!=="text-style")continue;let Z=K.getAttribute("name");if(!Z)continue;let j={};for(let X of n5){let W=K.getAttribute(X);if(W!==null)j[X]=W}$[Z]=j}}return $}function d5(J){let $={};for(let Q of Array.from(J.children)){if(Q.tagName!=="styles")continue;for(let K of Array.from(Q.children)){if(K.tagName!=="fill-style")continue;let Z=K.getAttribute("name"),j=K.getAttribute("value");if(Z&&j!==null)$[Z]=j}}return $}function o5(J,$){let Q={};for(let K of Array.from(J.children)){if(K.tagName!=="styles")continue;for(let Z of Array.from(K.children)){if(Z.tagName!=="effect-style")continue;let j=Z.getAttribute("name");if(!j)continue;Q[j]=Array.from(Z.children).filter((X)=>X.tagName==="effect").map((X)=>DQ(X,$))}}return Q}function i5(J,$){if(Object.keys($).length>0)return $;let Q={};for(let K of Array.from(J.children)){if(K.tagName!=="assets")continue;for(let Z of Array.from(K.children)){if(Z.tagName!=="image")continue;let j=Z.getAttribute("id"),X=Z.getAttribute("format")||"png",W=Z.getAttribute("src")||"";if(!j)continue;let B=X==="svg"?"svg+xml":X;if(W.startsWith("base64:"))Q[`assets/${j}.${X}`]=`data:image/${B};base64,${W.slice(7)}`;else if(W)Q[`assets/${j}.${X}`]=W}}return Q}var s5=new Set(["frame","stack","row","col","grid","group"]),a5=new Set(["text","img","rect","ellipse","line","svg","shape","instance"]),l5=new Set([...s5,...a5]);function DQ(J,$){let Q={};for(let K=0;K<J.attributes.length;K++){let{name:Z,value:j}=J.attributes[K];if(Q[Z]=n8(Z,I8(j,$)),Z==="color"){let X=z$(j,$);if(X)Q.token=X}}return Q}function t5(J,$,Q,K,Z){let j=[],X=[],W=[];for(let B of Array.from(J.children))if(B.tagName==="fill"){let Y={};for(let G=0;G<B.attributes.length;G++){let{name:q,value:U}=B.attributes[G],L=I8(U,$);if(q==="value"){let D=z$(U,$);if(D)Y.token=D}if(q==="src")L=Z[L]||L;Y[q]=n8(q,L)}j.push(Y)}else if(B.tagName==="effect")X.push(DQ(B,$));else if(B.tagName==="border"){let Y={};for(let G=0;G<B.attributes.length;G++){let{name:q,value:U}=B.attributes[G];if(Y[q]=n8(q,I8(U,$)),q==="color"){let L=z$(U,$);if(L)Y.token=L}}W.push(Y)}return{fills:j,effects:X,borders:W}}function c8(J,$,Q,K,Z,j){let X=FQ(J,$,Q,K),W=J.getAttribute("src");if(W&&j[W])X.src=j[W];let B=J.getAttribute("effect-style"),Y={type:J.tagName,...X};if(B)delete Y["effect-style"],Y.effectStyle=B;if(J.tagName==="svg"&&!J.getAttribute("src")){let D=new XMLSerializer,H=Array.from(J.children);if(H.length>0){let O="";for(let M=0;M<H.length;M++)O+=D.serializeToString(H[M]);Y.svgContent=O.replace(/\s+xmlns=""/g,"")}return Y}let G=[],q=[],U=[],L;for(let D of Array.from(J.children))if(D.tagName==="appearance")L=t5(D,$,Q,Z,j);else if(D.tagName==="segment"){let H=FQ(D,$,Q,K);q.push({type:"segment",...H})}else if(D.tagName==="path"){let H=D.getAttribute("d");if(H)U.push(H)}else if(l5.has(D.tagName))G.push(c8(D,$,Q,K,Z,j));if(B&&Z[B]){let D=Z[B];if(!L)L={fills:[],effects:[],borders:[]};L.effects=[...D,...L.effects]}if(L)Y.appearance=L;if(q.length)Y.segments=q;if(U.length)Y.paths=U;if(G.length)Y.children=G;return Y}function e5(J,$,Q,K,Z,j){let X={};for(let W of Array.from(J.children)){if(W.tagName!=="components")continue;for(let B of Array.from(W.children))if(B.tagName==="component"){let Y=B.getAttribute("id");if(!Y)continue;let G=Array.from(B.children).find((U)=>U.tagName==="props"),q=Array.from(B.children).find((U)=>U.tagName!=="props");X[Y]={id:Y,name:B.getAttribute("name")||void 0,props:G?LQ(G):[],body:q?c8(q,$,Q,K,Z,j):null}}else if(B.tagName==="component-set"){let Y=B.getAttribute("id");if(!Y)continue;let G=[];for(let q of Array.from(B.children)){if(q.tagName!=="variant")continue;let U=q.getAttribute("id");if(!U)continue;let L={};for(let O=0;O<q.attributes.length;O++){let{name:M,value:P}=q.attributes[O];if(M!=="id")L[M]=P}let D=Array.from(q.children).find((O)=>O.tagName!=="props");G.push({id:U,attrs:L,body:D?c8(D,$,Q,K,Z,j):null});let H=Array.from(q.children).find((O)=>O.tagName==="props");X[U]={id:U,props:H?LQ(H):[],body:D?c8(D,$,Q,K,Z,j):null}}X[Y]={id:Y,name:B.getAttribute("name")||void 0,props:[],body:null,variants:G}}}return X}function LQ(J){let $=[];for(let Q of Array.from(J.children)){if(Q.tagName!=="prop")continue;let K=Q.getAttribute("name"),Z=Q.getAttribute("type"),j=Q.getAttribute("target"),X=Q.getAttribute("bind");if(!K||!Z||!j)continue;let W={name:K,type:Z,target:j};if(X)W.bind=X;$.push(W)}return $}function R$(J,$){let Q;try{let O=h5(J).replace(/&(?!amp;|lt;|gt;|quot;|apos;|#)/g,"&amp;"),M=globalThis.DOMParser;if(M){if(Q=new M().parseFromString(O,"text/xml"),Q.querySelector?.("parsererror"))return null}else Q=new O6({onError:(P,I)=>{if(P==="fatalError")throw Error(I)}}).parseFromString(O,"text/xml")}catch{return null}let K=Q.documentElement;if(!K||K.tagName!=="gui")return null;let Z=f5(K),j=p5(K,Z),X=v5(j,Z,{}),W=c5(K),B=r5(K),Y=d5(K),G=o5(K,X),q=i5(K,$||{}),U=e5(K,X,Y,B,G,q),L=new Set(["stack","row","col","grid"]),D=null;for(let O of Array.from(K.children))if(O.tagName==="frame"||L.has(O.tagName)){D=O;break}let H=D?c8(D,X,Y,B,G,q):null;return{version:K.getAttribute("version"),name:K.getAttribute("name"),platform:K.getAttribute("platform"),fonts:W,modes:Z,tokenDefs:j,tokens:X,textStyles:B,styles:B,fillStyles:Y,effectStyles:G,assets:q,components:U,root:H}}var P6={},A6={},zQ={},o8={},RQ={},C6={},eJ={},AQ={},CQ=new Map,JZ={abs:"true",clip:"true",gap:"auto",mask:"true","reverse-z":"true",truncate:"true",wrap:"true"};function $Z(J){let $="",Q=0;while(Q<J.length){let K=J[Q];if(K==='"'||K==="'"){let G=K,q=Q;Q++;while(Q<J.length&&J[Q]!==G)Q++;if(Q<J.length)Q++;$+=J.slice(q,Q);continue}if(!/\s/.test(K)){$+=K,Q++;continue}let j=Q;while(Q<J.length&&/\s/.test(J[Q]))Q++;let X=Q;if(!/[A-Za-z]/.test(J[Q]||"")){$+=J.slice(j,Q+1),Q++;continue}while(Q<J.length&&/[\w-]/.test(J[Q]))Q++;let W=J.slice(X,Q),B=J[Q],Y=JZ[W];if(Y&&(/\s/.test(B||"")||B==="/"||B===">"))$+=`${J.slice(j,X)}${W}="${Y}"`;else $+=J.slice(j,Q)}return $}function QZ(J){let $="",Q=0;while(Q<J.length){let K=J.indexOf("<",Q);if(K===-1){$+=J.slice(Q);break}if($+=J.slice(Q,K),J.startsWith("<!--",K)){let B=J.indexOf("-->",K+4),Y=B===-1?J.length:B+3;$+=J.slice(K,Y),Q=Y;continue}let Z=K+1,j=null;while(Z<J.length){let B=J[Z];if(j){if(B===j)j=null}else if(B==='"'||B==="'")j=B;else if(B===">")break;Z++}let X=Z<J.length?Z+1:J.length,W=J.slice(K,X);if(/^<\/|^<\?|^<!/.test(W))$+=W;else $+=$Z(W);Q=X}return $}function T6(J){if(!J||J.indexOf("$")===-1)return J;return J.replace(/\$([A-Za-z0-9_.-]+)/g,($,Q)=>{let K=zQ[Q];if(K){let Z=M6(K,A6,o8);if(Z!==void 0)return Z}return P6[Q]!==void 0?P6[Q]:$})}function TQ(J,$){let Q=null;for(let K=0;K<J.attributes.length;K++){let Z=J.attributes[K].name;if(Z.indexOf("mode-")!==0)continue;let j=Z.slice(5);if(!A6[j])continue;if(!Q)Q={...$};Q[j]=J.attributes[K].value}return Q||$}function _6(J,$){if(!J)return null;if($[J])return $[J];if(J.startsWith("https://")||J.startsWith("http://")||J.startsWith("data:"))return J;return null}function F(J,$){return T6(J.getAttribute($))}function t(J,$){return J.getAttribute($)}function EJ(J){return/^-?\d+(\.\d+)?$/.test(J)?`${J}px`:J}function d8(J){if(!J)return"auto";if(J==="fill")return"100%";if(J==="hug")return"fit-content";return EJ(J)}function VQ(J){let $=parseInt(J.slice(0,2),16),Q=parseInt(J.slice(2,4),16),K=parseInt(J.slice(4,6),16),Z=(parseInt(J.slice(6,8),16)/255).toFixed(3);return`rgba(${$},${Q},${K},${Z})`}function s(J){if(!J)return"transparent";if(J.startsWith("rgba(")||J.startsWith("oklch("))return J;if(J.startsWith("linear-gradient")||J.startsWith("radial-gradient")||J.startsWith("conic-gradient"))return J.replace(/#([0-9a-fA-F]{8})\b/g,($,Q)=>VQ(Q));if(J.length===9&&J[0]==="#")return VQ(J.slice(1));return J}function P8(J){if(!J)return"none";if(J.startsWith("linear-gradient")||J.startsWith("radial-gradient")||J.startsWith("conic-gradient")){let $=J.match(/rgba?\([^)]+\)|#[0-9a-fA-F]{6,8}/);return $?s($[0]):"none"}return s(J)}function T$(J){if(!J)return"0";return J.split(" ").map(EJ).join(" ")}function KZ(J){if(!J)return"0";return J.split(" ").map(EJ).join(" ")}function _$(J){if(!J)return null;let $=J.split(" ");if($.length>=5)return`${$[0]}px ${$[1]}px ${$[2]}px ${$[3]}px ${s($[4])}`;return null}function ZZ(J){if(!/^-?\d+(\.\d+)?$/.test(J))return J;let $=parseFloat(J);if(Number.isFinite($)&&$>0&&$<=4)return String($);return`${J}px`}function jZ(J){return`"${J.replace(/\\/g,"\\\\").replace(/"/g,"\\\"")}"`}function XZ(J,$){if(J?.source==="system")return'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif';if(J?.category==="serif")return"serif";if(J?.category==="monospace"||/mono|code|console/i.test($))return"ui-monospace, SFMono-Regular, Menlo, Consolas, monospace";if(J?.category==="handwriting")return"cursive";return"sans-serif"}function YZ(J){return`${jZ(J)}, ${XZ(RQ[J],J)}`}function BZ(J,$,Q){if(Q===null)return null;let K=(Q===""?"auto":Q).trim().split(/\s+/),Z=K[0],j=K[1]||null,X=null;if(Z==="auto")J.style.justifyContent="space-between";else if(/^-\d+(\.\d+)?$/.test(Z))X=parseFloat(Z);else{let W=EJ(Z);if($==="horizontal")J.style.columnGap=W;else J.style.rowGap=W}if(j!==null)if(j==="auto")J.style.alignContent="space-between";else{let W=EJ(j);if($==="horizontal")J.style.rowGap=W;else J.style.columnGap=W}return X}var WZ=`
7
- /* ── Base reset ──────────────────────────────────────────────────────────── */
8
- gui-frame, gui-stack, gui-row, gui-col, gui-grid,
9
- gui-text, gui-img, gui-svg, gui-shape, gui-group {
10
- box-sizing: border-box;
11
- min-width: 0;
12
- min-height: 0;
13
- }
14
-
15
- /* ── Frame ───────────────────────────────────────────────────────────────── */
16
- gui-frame { position: relative; display: block; }
17
-
18
- /* ── Group ───────────────────────────────────────────────────────────────── */
19
- gui-group { position: relative; display: block; }
20
-
21
- /* ── Stack / row / col ───────────────────────────────────────────────────── */
22
- gui-stack, gui-row, gui-col { display: flex; position: relative; }
23
- gui-stack[direction="horizontal"], gui-row { flex-direction: row; }
24
- gui-stack[direction="vertical"], gui-col,
25
- gui-stack:not([direction]) { flex-direction: column; }
26
-
27
- /* ── Grid ────────────────────────────────────────────────────────────────── */
28
- gui-grid { display: grid; position: relative; }
29
-
30
- /* ── Wrap ────────────────────────────────────────────────────────────────── */
31
- [wrap="true"] { flex-wrap: wrap; }
32
-
33
- /* ── Overflow ────────────────────────────────────────────────────────────── */
34
- [clip="true"] { overflow: hidden; }
35
-
36
- /* ── Text ────────────────────────────────────────────────────────────────── */
37
- /* Default to grayscale antialiasing to match Figma's text rendering. Browsers
38
- (esp. macOS) default to subpixel-antialiased, which renders text heavier and
39
- slightly wider — enough to shift line wrapping. An explicit font-smoothing
40
- attribute still overrides this via inline style. */
41
- gui-text { display: block; white-space: pre-wrap; line-height: normal; font-size: initial; font-family: initial; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
42
- gui-text[data-h-mode="hug"] { height: auto; min-height: max-content; }
43
-
44
- /* ── Image ───────────────────────────────────────────────────────────────── */
45
- gui-img { display: block; position: relative; }
46
- gui-img > img { display: block; width: 100%; height: 100%; }
47
- gui-img[fit="cover"] > img { object-fit: cover; }
48
- gui-img[fit="contain"] > img { object-fit: contain; }
49
- gui-img[fit="fill"] > img { object-fit: fill; }
50
- gui-img[fit="none"] > img { object-fit: none; }
51
-
52
- /* ── Sizing ──────────────────────────────────────────────────────────────── */
53
- [data-w-mode="fixed"] { width: var(--gui-w); flex-shrink: 0; }
54
- [data-w-mode="hug"] { width: fit-content; flex-shrink: 0; }
55
- [data-w-mode="fill"] { width: 100%; }
56
- [data-h-mode="fixed"] { height: var(--gui-h); flex-shrink: 0; }
57
- [data-h-mode="hug"] { height: fit-content; }
58
- [data-h-mode="fill"] { height: 100%; }
59
-
60
- /* Fill / hug adjusted for flex parent direction */
61
- [data-parent-dir="horizontal"][data-w-mode="fill"] { flex: 1 1 0; width: auto; min-width: 0; flex-shrink: 1; }
62
- [data-parent-dir="horizontal"][data-w-mode="hug"] { width: auto; }
63
- [data-parent-dir="vertical"][data-h-mode="fill"] { flex: 1 1 0; height: auto; min-height: 0; flex-shrink: 1; }
64
- [data-parent-dir="vertical"][data-h-mode="hug"] { height: auto; }
65
-
66
- /* ── Position ────────────────────────────────────────────────────────────── */
67
- [data-pos="absolute"] { position: absolute; left: var(--gui-x, 0px); top: var(--gui-y, 0px); }
68
-
69
- /* ── 9-point align — horizontal stacks ──────────────────────────────────── */
70
- gui-stack[direction="horizontal"][align="top-left"], gui-row[align="top-left"] { align-items: flex-start; justify-content: flex-start; }
71
- gui-stack[direction="horizontal"][align="top-center"], gui-row[align="top-center"] { align-items: flex-start; justify-content: center; }
72
- gui-stack[direction="horizontal"][align="top-right"], gui-row[align="top-right"] { align-items: flex-start; justify-content: flex-end; }
73
- gui-stack[direction="horizontal"][align="middle-left"], gui-row[align="middle-left"] { align-items: center; justify-content: flex-start; }
74
- gui-stack[direction="horizontal"][align="middle-center"], gui-row[align="middle-center"] { align-items: center; justify-content: center; }
75
- gui-stack[direction="horizontal"][align="middle-right"], gui-row[align="middle-right"] { align-items: center; justify-content: flex-end; }
76
- gui-stack[direction="horizontal"][align="bottom-left"], gui-row[align="bottom-left"] { align-items: flex-end; justify-content: flex-start; }
77
- gui-stack[direction="horizontal"][align="bottom-center"], gui-row[align="bottom-center"] { align-items: flex-end; justify-content: center; }
78
- gui-stack[direction="horizontal"][align="bottom-right"], gui-row[align="bottom-right"] { align-items: flex-end; justify-content: flex-end; }
79
- gui-stack[direction="horizontal"][align="stretch"], gui-row[align="stretch"] { align-items: stretch; }
80
- gui-stack[direction="horizontal"][align="baseline"], gui-row[align="baseline"] { align-items: baseline; }
81
-
82
- /* ── 9-point align — vertical stacks ────────────────────────────────────── */
83
- gui-stack[direction="vertical"][align="top-left"], gui-col[align="top-left"] { justify-content: flex-start; align-items: flex-start; }
84
- gui-stack[direction="vertical"][align="top-center"], gui-col[align="top-center"] { justify-content: flex-start; align-items: center; }
85
- gui-stack[direction="vertical"][align="top-right"], gui-col[align="top-right"] { justify-content: flex-start; align-items: flex-end; }
86
- gui-stack[direction="vertical"][align="middle-left"], gui-col[align="middle-left"] { justify-content: center; align-items: flex-start; }
87
- gui-stack[direction="vertical"][align="middle-center"], gui-col[align="middle-center"] { justify-content: center; align-items: center; }
88
- gui-stack[direction="vertical"][align="middle-right"], gui-col[align="middle-right"] { justify-content: center; align-items: flex-end; }
89
- gui-stack[direction="vertical"][align="bottom-left"], gui-col[align="bottom-left"] { justify-content: flex-end; align-items: flex-start; }
90
- gui-stack[direction="vertical"][align="bottom-center"], gui-col[align="bottom-center"] { justify-content: flex-end; align-items: center; }
91
- gui-stack[direction="vertical"][align="bottom-right"], gui-col[align="bottom-right"] { justify-content: flex-end; align-items: flex-end; }
92
- gui-stack[direction="vertical"][align="stretch"], gui-col[align="stretch"] { align-items: stretch; }
93
-
94
- /* Default alignment (top-left) when no align attr — prevents CSS stretch default */
95
- gui-stack[direction="horizontal"]:not([align]), gui-row:not([align]) { align-items: flex-start; justify-content: flex-start; }
96
- gui-stack[direction="vertical"]:not([align]), gui-col:not([align]) { justify-content: flex-start; align-items: flex-start; }
97
-
98
- /* gap="auto" → space-between (inline style overrides this when combined with numeric align) */
99
- gui-stack[gap="auto"], gui-row[gap="auto"], gui-col[gap="auto"] { justify-content: space-between; }
100
-
101
- /* ── Internal overlay utilities (used by renderer for fill/stroke layers) ── */
102
- .gui-layer { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
103
- .gui-pointer-events-none { pointer-events: none; }
104
- .gui-block { display: block; }
105
- .gui-w-full { width: 100%; }
106
- .gui-h-full { height: 100%; }
107
- .gui-overflow-hidden { overflow: hidden; }
108
- .gui-overflow-visible { overflow: visible; }
109
- .gui-pre-wrap { white-space: pre-wrap; }
110
- .gui-fit-fill { object-fit: fill; }
111
- .gui-fit-cover { object-fit: cover; }
112
- .gui-fit-contain { object-fit: contain; }
113
- .gui-fit-none { object-fit: none; }
114
- .gui-relative { position: relative; }
115
- `;function GZ(){if(typeof document>"u")return;if(document.querySelector("style[data-gui-render-utilities]"))return;let J=document.createElement("style");J.setAttribute("data-gui-render-utilities","true"),J.textContent=WZ,document.head.appendChild(J)}function a(J,$){J.classList.add($)}var N6=0,C$=0;function w6(J,$,Q,K){let Z=(y)=>Math.round(y*1e4)/1e4,j=(y)=>y*Math.PI/180,X=Math.min(J,$)/2,W=Math.min(Math.max(Q,0),X);if(W<=0)return`M 0 0 L ${Z(J)} 0 L ${Z(J)} ${Z($)} L 0 ${Z($)} Z`;let B=Math.min(1,Math.max(0,K)),Y=(1+B)*W,G=X/W-1;B=Math.max(0,Math.min(B,G)),Y=Math.min(Y,X);let q=90*(1-B),U=Math.sin(j(q/2))*W*Math.SQRT2,L=(90-q)/2,D=W*Math.tan(j(L/2)),H=45*B,O=D*Math.cos(j(H)),M=O*Math.tan(j(H)),P=(Y-U-O-M)/3,I=2*P,z=W,k=U,x=`c ${Z(I)} 0 ${Z(I+P)} 0 ${Z(I+P+O)} ${Z(M)} a ${Z(z)} ${Z(z)} 0 0 1 ${Z(k)} ${Z(k)} c ${Z(M)} ${Z(O)} ${Z(M)} ${Z(P+O)} ${Z(M)} ${Z(I+P+O)}`,E=`c 0 ${Z(I)} 0 ${Z(I+P)} ${Z(-M)} ${Z(I+P+O)} a ${Z(z)} ${Z(z)} 0 0 1 ${Z(-k)} ${Z(k)} c ${Z(-O)} ${Z(M)} ${Z(-(P+O))} ${Z(M)} ${Z(-(I+P+O))} ${Z(M)}`,A=`c ${Z(-I)} 0 ${Z(-(I+P))} 0 ${Z(-(I+P+O))} ${Z(-M)} a ${Z(z)} ${Z(z)} 0 0 1 ${Z(-k)} ${Z(-k)} c ${Z(-M)} ${Z(-O)} ${Z(-M)} ${Z(-(P+O))} ${Z(-M)} ${Z(-(I+P+O))}`,R=`c 0 ${Z(-I)} 0 ${Z(-(I+P))} ${Z(M)} ${Z(-(I+P+O))} a ${Z(z)} ${Z(z)} 0 0 1 ${Z(k)} ${Z(-k)} c ${Z(O)} ${Z(-M)} ${Z(P+O)} ${Z(-M)} ${Z(I+P+O)} ${Z(-M)}`;return`M ${Z(J-Y)} 0 ${x} L ${Z(J)} ${Z($-Y)} ${E} L ${Z(Y)} ${Z($)} ${A} L 0 ${Z(Y)} ${R} Z`}function qZ(J,$,Q,K){let Z=`gui-squircle-${++C$}`,j="http://www.w3.org/2000/svg",X=w6(J,$,Q,K),W=document.createElementNS("http://www.w3.org/2000/svg","svg");W.setAttribute("width","0"),W.setAttribute("height","0"),W.style.position="absolute",W.style.pointerEvents="none";let B=document.createElementNS("http://www.w3.org/2000/svg","defs"),Y=document.createElementNS("http://www.w3.org/2000/svg","clipPath");Y.setAttribute("id",Z),Y.setAttribute("clipPathUnits","userSpaceOnUse");let G=document.createElementNS("http://www.w3.org/2000/svg","path");return G.setAttribute("d",X),Y.appendChild(G),B.appendChild(Y),W.appendChild(B),[W,Z]}function UZ(J,$,Q,K,Z,j,X,W,B,Y){let q=w6($,Q,K,Z),U=document.createElementNS("http://www.w3.org/2000/svg","svg");if(U.setAttribute("width",String($)),U.setAttribute("height",String(Q)),U.style.position="absolute",U.style.left="0",U.style.top="0",U.style.overflow="visible",U.style.pointerEvents="none",U.style.zIndex="2",B)U.style.opacity=B;if(Y)U.style.mixBlendMode=Y;let L=`gui-ssclip-${++C$}`,D=document.createElementNS("http://www.w3.org/2000/svg","defs"),H=document.createElementNS("http://www.w3.org/2000/svg","clipPath");H.setAttribute("id",L),H.setAttribute("clipPathUnits","userSpaceOnUse");let O=document.createElementNS("http://www.w3.org/2000/svg","path");O.setAttribute("d",q),H.appendChild(O),D.appendChild(H),U.appendChild(D);let M=document.createElementNS("http://www.w3.org/2000/svg","path");if(M.setAttribute("d",q),M.setAttribute("fill","none"),M.setAttribute("stroke",s(X)),W==="inside")M.setAttribute("stroke-width",String(j*2)),M.setAttribute("clip-path",`url(#${L})`);else M.setAttribute("stroke-width",String(j)),M.setAttribute("clip-path",`url(#${L})`);U.appendChild(M),J.appendChild(U)}function _Q(J,$){let Q=F($,"corner-smoothing");if(!Q)return;let K=parseFloat(Q);if(!Number.isFinite(K)||K<=0)return;let Z=F($,"radius");if(!Z)return;let j=parseFloat(Z);if(!Number.isFinite(j)||j<=0)return;let X=F($,"w"),W=F($,"h"),B=X?parseFloat(X):NaN,Y=W?parseFloat(W):NaN;if(!Number.isFinite(B)||!Number.isFinite(Y)||B<=0||Y<=0)return;J.style.borderRadius="";let[G,q]=qZ(B,Y,j,K);J.insertBefore(G,J.firstChild),J.style.clipPath=`url(#${q})`}function NJ(J,$,Q){let K=F($,"w"),Z=F($,"h"),j=K===null||K==="hug"?"hug":K==="fill"?"fill":"fixed",X=Z===null||Z==="hug"?"hug":Z==="fill"?"fill":"fixed";J.setAttribute("data-w-mode",j),J.setAttribute("data-h-mode",X);let W=t($,"data-uid");if(W!==null)J.setAttribute("data-uid",W);if(j==="fixed")J.style.setProperty("--gui-w",EJ(K));if(X==="fixed")J.style.setProperty("--gui-h",EJ(Z));if(Q.parentDirection)J.setAttribute("data-parent-dir",Q.parentDirection);let B=F($,"min-width"),Y=F($,"max-width"),G=F($,"min-height"),q=F($,"max-height");if(B)J.style.minWidth=EJ(B);if(Y)J.style.maxWidth=EJ(Y);if(G)J.style.minHeight=EJ(G);if(q)J.style.maxHeight=EJ(q);let U=F($,"opacity");if(U)J.style.opacity=U;let L=F($,"blend");if(L)J.style.mixBlendMode=L;let D=t($,"mask");if(D!==null&&D!=="false")J.setAttribute("data-mask","true");DZ(J,$);let H=F($,"filter");if(H)J.style.filter=H;let O=F($,"isolation");if(O&&O!=="false")J.style.isolation="isolate";let M=F($,"aspect-ratio");if(M)J.style.aspectRatio=M;let P=F($,"z-index");if(P)J.style.zIndex=P;if(F($,"visible")==="false")J.style.display="none";if(Q.absolute){let z=parseFloat(F($,"x")||"0")-(Q.offsetX||0),k=parseFloat(F($,"y")||"0")-(Q.offsetY||0);J.setAttribute("data-pos","absolute"),J.style.setProperty("--gui-x",`${z}px`),J.style.setProperty("--gui-y",`${k}px`)}}var FZ={"top-left":"0% 0%","top-center":"50% 0%","top-right":"100% 0%","middle-left":"0% 50%",center:"50% 50%","middle-center":"50% 50%","middle-right":"100% 50%","bottom-left":"0% 100%","bottom-center":"50% 100%","bottom-right":"100% 100%"};function LZ(J,$){let Q=F($,"rotation"),K=F($,"flip"),Z=F($,"scale-x"),j=F($,"scale-y"),X=F($,"skew-x"),W=F($,"skew-y"),B=[],Y=Q?parseFloat(Q):0;if(Number.isFinite(Y)&&Y!==0)B.push(`rotate(${Y}deg)`);if(K==="h")B.push("scaleX(-1)");else if(K==="v")B.push("scaleY(-1)");else if(K==="both")B.push("scaleX(-1) scaleY(-1)");if(Z!==null){let q=parseFloat(Z);if(Number.isFinite(q))B.push(`scaleX(${q})`)}if(j!==null){let q=parseFloat(j);if(Number.isFinite(q))B.push(`scaleY(${q})`)}if(X!==null){let q=parseFloat(X);if(Number.isFinite(q))B.push(`skewX(${q}deg)`)}if(W!==null){let q=parseFloat(W);if(Number.isFinite(q))B.push(`skewY(${q}deg)`)}if(B.length>0)J.style.transform=B.join(" "),J.style.transformBox="fill-box";let G=F($,"transform-origin");if(G)J.style.transformOrigin=FZ[G]||G;else if(B.length>0)J.style.transformOrigin="center"}function DZ(J,$){LZ(J,$)}function VZ(J){let $=F(J,"rotation"),Q=$?parseFloat($):0;if(!Number.isFinite(Q))return null;let K=(Q%360+360)%360,Z=Math.round(K/90)*90;if(Math.abs(K-Z)>0.001)return null;return Z%360}function E6(J){let $=new Set(["inside","outside","center"]),Q=new Set(["solid","dashed","dotted"]),K="",Z=1,j="solid",X="center";for(let W of J.trim().split(/\s+/))if(W.startsWith("#")||W.startsWith("$")||/^rgba?/.test(W))K=W;else if($.has(W))X=W;else if(Q.has(W))j=W;else if(/^\d/.test(W))Z=parseFloat(W);return K?{color:K,width:Z,style:j,align:X}:null}function HZ(J){let $=document.createElement("div");$.style.position="relative";for(let K of["data-w-mode","data-h-mode","data-parent-dir"]){let Z=J.getAttribute(K);if(Z!==null)$.setAttribute(K,Z),J.removeAttribute(K)}let Q=["--gui-w","--gui-h","width","height","flexShrink","flexGrow","alignSelf","justifySelf","marginLeft","marginTop","marginRight","marginBottom","gridColumn","gridRow","zIndex","position","left","top","right","bottom","transform","transformOrigin"];for(let K of Q)if(K.startsWith("--")){let Z=J.style.getPropertyValue(K);if(Z)$.style.setProperty(K,Z),J.style.removeProperty(K)}else{let Z=K,j=J.style[Z];if(j)$.style[K]=j,J.style[K]=""}for(let K of["gui-absolute","gui-relative","gui-fill-w","gui-fill-h"])if(J.classList.contains(K))$.classList.add(K),J.classList.remove(K);return J.style.position="absolute",J.style.inset="0",$.appendChild(J),$}function i8(J,$,Q){if(MZ($))return null;let K=F($,"border"),Z,j,X,W;if(K){let I=E6(K);if(!I)return null;Z=I.color,j=I.width,X=I.align,W=I.style}else{let I=F($,"stroke"),z=F($,"stroke-width");if(!I||!z)return null;Z=I,j=parseFloat(z),X=F($,"stroke-position")||"center",W="solid"}if(!Number.isFinite(j)||j<=0)return null;let B=F($,"corner-smoothing"),Y=F($,"radius"),G=F($,"w"),q=F($,"h"),U=B?parseFloat(B):NaN,L=Y?parseFloat(Y):NaN,D=G?parseFloat(G):NaN,H=q?parseFloat(q):NaN;if(Number.isFinite(U)&&U>0&&Number.isFinite(L)&&L>0&&Number.isFinite(D)&&D>0&&Number.isFinite(H)&&H>0&&W==="solid")if(X==="outside"||X==="center"){let I=HZ(J),z=X==="outside"?j:j/2,k="http://www.w3.org/2000/svg",x=D+z*2,E=H+z*2,A=document.createElementNS("http://www.w3.org/2000/svg","svg");A.setAttribute("width",String(x)),A.setAttribute("height",String(E)),A.style.position="absolute",A.style.left=`${-z}px`,A.style.top=`${-z}px`,A.style.overflow="visible",A.style.pointerEvents="none",A.style.zIndex="2",a(A,"gui-pointer-events-none");let R=w6(D,H,L,U);if(X==="outside"){let y=`gui-ssclip-${++C$}`,f=document.createElementNS("http://www.w3.org/2000/svg","defs"),w=document.createElementNS("http://www.w3.org/2000/svg","clipPath");w.setAttribute("id",y),w.setAttribute("clipPathUnits","userSpaceOnUse");let u=document.createElementNS("http://www.w3.org/2000/svg","path");u.setAttribute("d",`M -9999 -9999 H 99999 V 99999 H -9999 Z ${R}`),u.setAttribute("fill-rule","evenodd"),w.appendChild(u),f.appendChild(w),A.appendChild(f);let C=document.createElementNS("http://www.w3.org/2000/svg","g");C.setAttribute("transform",`translate(${z},${z})`);let v=document.createElementNS("http://www.w3.org/2000/svg","path");v.setAttribute("d",R),v.setAttribute("fill","none"),v.setAttribute("stroke",s(Z)),v.setAttribute("stroke-width",String(j*2)),v.setAttribute("clip-path",`url(#${y})`),C.appendChild(v),A.appendChild(C)}else{let y=`gui-ssclip-${++C$}`,f=document.createElementNS("http://www.w3.org/2000/svg","defs"),w=document.createElementNS("http://www.w3.org/2000/svg","clipPath");w.setAttribute("id",y),w.setAttribute("clipPathUnits","userSpaceOnUse");let u=document.createElementNS("http://www.w3.org/2000/svg","path");u.setAttribute("d",R),w.appendChild(u),f.appendChild(w),A.appendChild(f);let C=document.createElementNS("http://www.w3.org/2000/svg","g");C.setAttribute("transform",`translate(${z},${z})`);let v=document.createElementNS("http://www.w3.org/2000/svg","path");v.setAttribute("d",R),v.setAttribute("fill","none"),v.setAttribute("stroke",s(Z)),v.setAttribute("stroke-width",String(j)),C.appendChild(v),A.appendChild(C)}return I.appendChild(A),I}else return UZ(J,D,H,L,U,j,Z,"inside"),null;if(W==="solid"){let I;if(X==="inside")I=`inset 0 0 0 ${j}px ${s(Z)}`;else if(X==="outside")I=`0 0 0 ${j}px ${s(Z)}`;else I=`inset 0 0 0 ${j/2}px ${s(Z)}, 0 0 0 ${j/2}px ${s(Z)}`;return J8(J,I),null}let M=X==="outside"?j:X==="center"?j/2:0,P=document.createElement("div");if(P.style.position="absolute",a(P,"gui-pointer-events-none"),P.style.left=`${-M}px`,P.style.top=`${-M}px`,P.style.right=`${-M}px`,P.style.bottom=`${-M}px`,P.style.border=`${j}px ${W} ${s(Z)}`,P.style.boxSizing="border-box",P.style.zIndex="2",Q)P.style.borderRadius=Q;return J.appendChild(P),null}var OZ=[{attr:"border-top",prop:"borderTop"},{attr:"border-right",prop:"borderRight"},{attr:"border-bottom",prop:"borderBottom"},{attr:"border-left",prop:"borderLeft"}];function s8(J,$,Q){let K=OZ.filter((j)=>F($,j.attr)!==null);if(!K.length)return;let Z=document.createElement("div");if(Z.style.position="absolute",Z.style.left="0",Z.style.top="0",Z.style.right="0",Z.style.bottom="0",Z.style.boxSizing="border-box",a(Z,"gui-pointer-events-none"),Z.style.zIndex="2",Q)Z.style.borderRadius=Q;for(let{attr:j,prop:X}of K){let W=F($,j);if(!W)continue;let B=E6(W);if(!B)continue;Z.style[X]=`${B.width}px ${B.style} ${s(B.color)}`}J.appendChild(Z)}function J8(J,$){J.style.boxShadow=J.style.boxShadow?`${J.style.boxShadow}, ${$}`:$}function HQ(J,$,Q){if(J.style[$]=J.style[$]?`${J.style[$]} ${Q}`:Q,$==="backdropFilter")J.style.webkitBackdropFilter=J.style[$]}function a8(J){return Array.from(J.children).find(($)=>$.tagName==="appearance")||null}function NQ(J){return!!a8(J)}function N$(J){let $=a8(J);if(!$)return!1;return Array.from($.children).some((Q)=>Q.tagName==="fill")}function MZ(J){let $=a8(J);if(!$)return!1;return Array.from($.children).some((Q)=>Q.tagName==="border")}function wQ(J,$){if(!J)return!1;return J==="linear-gradient"||J==="radial-gradient"||J==="angular-gradient"||J.startsWith("gradient")||J==="color"&&!!$&&($.startsWith("linear-gradient")||$.startsWith("radial-gradient")||$.startsWith("conic-gradient"))}function IZ(J){let $=a8(J);if(!$)return null;for(let Q of Array.from($.children)){if(Q.tagName!=="fill")continue;if(F(Q,"visible")==="false")continue;let K=F(Q,"type"),Z=F(Q,"value"),j=F(Q,"gradient");if(wQ(K,Z))return j||Z}return null}function PZ(J,$,Q){if(F($,"visible")==="false")return;let K=F($,"color"),Z=F($,"paint"),j=F($,"w")||"1",X=parseFloat(j);if(!Number.isFinite(X)||X<=0)return;let W=K?s(K):Z?P8(Z):null;if(!W)return;let B=F($,"align")||"center",Y=F($,"style")||"solid",G=B==="outside"?X:B==="center"?X/2:0,q=document.createElement("div");if(q.style.position="absolute",a(q,"gui-pointer-events-none"),q.style.left=`${-G}px`,q.style.top=`${-G}px`,q.style.right=`${-G}px`,q.style.bottom=`${-G}px`,q.style.border=`${X}px ${Y} ${W}`,q.style.boxSizing="border-box",q.style.zIndex="2",Q)q.style.borderRadius=Q;let U=F($,"opacity");if(U)q.style.opacity=U;let L=F($,"blend");if(L)q.style.mixBlendMode=L;J.appendChild(q)}function zZ(J,$){let Q=J.match(/rgba?\((\d+),(\d+),(\d+)(?:,([0-9.]+))?\)/);if(Q){let K=Q[4]!==void 0?parseFloat(Q[4]):1;return"rgba("+Q[1]+","+Q[2]+","+Q[3]+","+(K*$).toFixed(3)+")"}return J}function EQ(J,$){if($.visible===!1)return;let Q=$.type,K=String($.radius??0),Z=typeof $.opacity==="number"?$.opacity:1;if(Q==="drop-shadow"||Q==="inner-shadow"){let j=String($.x??0),X=String($.y??0),W=String($.spread??0),B=s($.color??null);if(Z!==1&&Number.isFinite(Z))B=zZ(B,Z);J8(J,(Q==="inner-shadow"?"inset ":"")+j+"px "+X+"px "+K+"px "+W+"px "+B)}else if(Q==="layer-blur")HQ(J,"filter","blur("+K+"px)");else if(Q==="background-blur"||Q==="glass"){let j=String($.saturation??180);HQ(J,"backdropFilter","blur("+K+"px) saturate("+j+"%)")}}function RZ(J,$){if(F($,"visible")==="false")return;EQ(J,{type:F($,"type")||"",visible:!0,radius:parseFloat(F($,"radius")||"0"),x:parseFloat(F($,"x")||"0"),y:parseFloat(F($,"y")||"0"),spread:parseFloat(F($,"spread")||"0"),color:F($,"color")||void 0,opacity:F($,"opacity")!==null?parseFloat(F($,"opacity")):void 0,blend:F($,"blend")||void 0,...F($,"saturation")!==null?{saturation:parseFloat(F($,"saturation"))}:{}})}function w$(J,$){let Q=AQ[$];if(!Q)return;for(let K=0;K<Q.length;K++)EQ(J,Q[K])}function AZ(J,$,Q){if(F($,"visible")==="false")return;let K=F($,"color");if(!K)return;let Z=F($,"width")||"1",j=parseFloat(Z);if(!Number.isFinite(j)||j<=0)return;let X=F($,"dash-array"),W=F($,"dash-offset"),B=F($,"align")||"center",Y=F($,"style")||"solid",G=F($,"opacity"),q=F($,"blend");if(X){let L=document.createElementNS("http://www.w3.org/2000/svg","svg");if(L.setAttribute("width","100%"),L.setAttribute("height","100%"),L.style.position="absolute",L.style.left="0",L.style.top="0",L.style.overflow="visible",L.style.zIndex="2",L.style.pointerEvents="none",G)L.style.opacity=G;if(q)L.style.mixBlendMode=q;let D=document.createElementNS("http://www.w3.org/2000/svg","rect");if(D.setAttribute("x","0"),D.setAttribute("y","0"),D.setAttribute("width","100%"),D.setAttribute("height","100%"),D.setAttribute("fill","none"),D.setAttribute("stroke",s(K)),D.setAttribute("stroke-width",String(j)),D.setAttribute("stroke-dasharray",X),W)D.setAttribute("stroke-dashoffset",W);if(D.setAttribute("vector-effect","non-scaling-stroke"),Q){let H=Q.match(/^([0-9.]+)/);if(H){let O=H[1];D.setAttribute("rx",O),D.setAttribute("ry",O)}}if(B==="inside"){D.setAttribute("stroke-width",String(j*2));let H="gui-sclip-"+ ++N6,O=document.createElementNS("http://www.w3.org/2000/svg","defs"),M=document.createElementNS("http://www.w3.org/2000/svg","clipPath");M.setAttribute("id",H);let P=document.createElementNS("http://www.w3.org/2000/svg","rect");if(P.setAttribute("x","0"),P.setAttribute("y","0"),P.setAttribute("width","100%"),P.setAttribute("height","100%"),Q){let I=Q.match(/^([0-9.]+)/);if(I)P.setAttribute("rx",I[1]),P.setAttribute("ry",I[1])}M.appendChild(P),O.appendChild(M),L.appendChild(O),D.setAttribute("clip-path","url(#"+H+")")}L.appendChild(D),J.appendChild(L)}else if(Y==="solid"&&!G&&!q){let U;if(B==="inside")U=`inset 0 0 0 ${j}px ${s(K)}`;else if(B==="outside")U=`0 0 0 ${j}px ${s(K)}`;else U=`inset 0 0 0 ${j/2}px ${s(K)}, 0 0 0 ${j/2}px ${s(K)}`;J8(J,U)}else{let U=B==="outside"?j:B==="center"?j/2:0,L=document.createElement("div");if(L.style.position="absolute",a(L,"gui-pointer-events-none"),L.style.left=-U+"px",L.style.top=-U+"px",L.style.right=-U+"px",L.style.bottom=-U+"px",L.style.border=j+"px "+Y+" "+s(K),L.style.boxSizing="border-box",L.style.zIndex="2",Q)L.style.borderRadius=Q;if(G)L.style.opacity=G;if(q)L.style.mixBlendMode=q;J.appendChild(L)}}function l8(J,$,Q,K,Z){let j=a8(J);if(!j)return;for(let X of Array.from(j.children)){if(X.tagName==="effect"){RZ($,X);continue}if(X.tagName==="border"){PZ($,X,K);continue}if(X.tagName==="stroke"){AZ($,X,K);continue}if(X.tagName!=="fill")continue;if(F(X,"visible")==="false")continue;let W=F(X,"type"),B=F(X,"value");if(Z&&wQ(W,B))continue;let Y=document.createElement("div");if(a(Y,"gui-layer"),K)Y.style.borderRadius=K;let G=F(X,"opacity");if(G)Y.style.opacity=G;let q=F(X,"blend");if(q)Y.style.mixBlendMode=q;if(W==="image"){let U=F(X,"src"),L=_6(U,Q);if(!L)continue;if(F(X,"fit")==="tile"){Y.style.backgroundImage=`url("${L}")`,Y.style.backgroundRepeat="repeat",Y.style.backgroundSize="auto",$.appendChild(Y);continue}let D=document.createElement("img");D.src=L,a(D,"gui-block");let H=F(X,"x")!==null&&F(X,"y")!==null&&F(X,"w")!==null&&F(X,"h")!==null;if(F(X,"fit")==="crop"&&H)a(Y,"gui-overflow-hidden"),D.style.position="absolute",D.style.left=d8(F(X,"x")||"0"),D.style.top=d8(F(X,"y")||"0"),D.style.width=d8(F(X,"w")||"fill"),D.style.height=d8(F(X,"h")||"fill"),a(D,"gui-fit-fill");else a(D,"gui-w-full"),a(D,"gui-h-full"),a(D,`gui-fit-${F(X,"fit")||"cover"}`);if(K)D.style.borderRadius=K;let O=[],M=F(X,"filter-exposure"),P=F(X,"filter-contrast"),I=F(X,"filter-saturation");if(M!==null){let z=parseFloat(M);if(Number.isFinite(z))O.push(`brightness(${1+z})`)}if(P!==null){let z=parseFloat(P);if(Number.isFinite(z))O.push(`contrast(${1+z})`)}if(I!==null){let z=parseFloat(I);if(Number.isFinite(z))O.push(`saturate(${1+z})`)}if(O.length>0)Y.style.filter=O.join(" ");Y.appendChild(D)}else{if(!B)continue;Y.style.background=s(B)}$.appendChild(Y)}}function OQ(J){let $=J.trim();if(/^\d+$/.test($))return`repeat(${$}, 1fr)`;if($.startsWith("fill ")){let Q=$.slice(5).trim();return`repeat(auto-fill, minmax(${/^\d+$/.test(Q)?`${Q}px`:Q}, 1fr))`}return $.split(/\s+/).map((Q)=>/^\d+$/.test(Q)?`${Q}px`:Q).join(" ")}function MQ(J){let $=J.indexOf("/");if($===-1)return J;let Q=J.slice(0,$).trim(),K=J.slice($+1).trim(),Z=parseInt(K,10);if(isNaN(Z)||Z<0)return`${Q} / ${K}`;return`${Q} / ${Z+1}`}function CZ(J,$){let Q=$.getAttribute("gc"),K=$.getAttribute("gr"),Z=$.getAttribute("col-span"),j=$.getAttribute("row-span"),X=$.getAttribute("w"),W=$.getAttribute("h");if(Q!==null)if(Q.includes("/")){if(J.style.gridColumn=MQ(Q),X===null)J.style.width="100%",J.setAttribute("data-w-mode","fill")}else if(Z!==null){let B=Z==="all"?"-1":Z;J.style.gridColumn=`${Q} / span ${B}`}else J.style.gridColumn=Q;else if(Z!==null)J.style.gridColumn=Z==="all"?"1 / -1":`span ${Z}`;if(K!==null)if(K.includes("/")){if(J.style.gridRow=MQ(K),W===null)J.style.height="100%",J.setAttribute("data-h-mode","fill")}else if(j!==null)J.style.gridRow=`${K} / span ${j}`;else J.style.gridRow=K;else if(j!==null)J.style.gridRow=`span ${j}`}function z6(J,$,Q,K){let Z=J.tagName,j;if(K)if(Z==="row")j="gui-row";else if(Z==="col")j="gui-col";else if(Z==="grid")j="gui-grid";else j="gui-stack";else j="gui-frame";let X=document.createElement(j);NJ(X,J,Q);let W=NQ(J),B=N$(J),Y=t(J,"fill-style"),G=Y?eJ[Y]||null:F(J,"fill");if(G&&!B)X.style.background=s(G);let q=F(J,"radius"),U=q?T$(q):null;if(U)X.style.borderRadius=U;_Q(X,J);let L=t(J,"clip");if(L!==null&&L!=="false")X.setAttribute("clip","true");let D=_$(F(J,"shadow"));if(D)J8(X,D);let H=F(J,"clip-path");if(H)X.style.clipPath=H;let O=F(J,"overflow-x");if(O)X.style.overflowX=O;let M=F(J,"overflow-y");if(M)X.style.overflowY=M;let P=F(J,"border-image");if(P)X.style.borderImage=P;let I=F(J,"outline");if(I)if(I.includes("px"))X.style.outline=I;else{let V=E6(I);if(V)X.style.outline=`${V.width}px ${V.style} ${s(V.color)}`}let z=F(J,"outline-offset");if(z)X.style.outlineOffset=`${z}px`;l8(J,X,$,U);let k=t(J,"effect-style");if(k)w$(X,k);let x,E=null,A=!1;if(K){let V=Z==="row"?"horizontal":Z==="col"?"vertical":Z==="grid"?"grid":F(J,"direction")||"vertical",T=F(J,"p")||F(J,"padding");if(T)X.style.padding=KZ(T);let g=F(J,"pt");if(g)X.style.paddingTop=`${g}px`;let b=F(J,"pr");if(b)X.style.paddingRight=`${b}px`;let N=F(J,"pb");if(N)X.style.paddingBottom=`${N}px`;let _=F(J,"pl");if(_)X.style.paddingLeft=`${_}px`;if(j==="gui-stack"&&V!=="grid")X.setAttribute("direction",V);let S=t(J,"align");if(S)X.setAttribute("align",S);let i=t(J,"gap");if(i!==null)X.setAttribute("gap",i);let JJ=t(J,"wrap");if(JJ!==null&&JJ!=="false")X.setAttribute("wrap","true");if(V==="grid"){x="grid";let BJ=Z==="grid",VJ=BJ?t(J,"gap"):null;if(BJ){let WJ=t(J,"unit"),jJ=t(J,"cols")||t(J,"columns"),LJ=t(J,"rows");if(WJ!==null){let $J=parseFloat(WJ),GJ=parseFloat(F(J,"w")||"0"),OJ=parseFloat(F(J,"h")||"0");if($J>0){if(GJ>0)X.style.gridTemplateColumns=`repeat(${Math.round(GJ/$J)}, ${$J}px)`;if(OJ>0)X.style.gridTemplateRows=`repeat(${Math.round(OJ/$J)}, ${$J}px)`}}else if(jJ!==null||LJ!==null){if(jJ)X.style.gridTemplateColumns=OQ(jJ);if(LJ)X.style.gridTemplateRows=OQ(LJ);if(VJ!==null){let $J=(VJ||"0").trim().split(/\s+/),GJ=$J[0],OJ=$J[1]||$J[0];if(GJ&&GJ!=="auto")X.style.columnGap=`${GJ}px`;if(OJ&&OJ!=="auto")X.style.rowGap=`${OJ}px`}}else{let $J=F(J,"columns")||F(J,"cols");if($J)X.style.gridTemplateColumns=`repeat(${$J}, 1fr)`;if(VJ){let GJ=VJ.trim().split(/\s+/),OJ=GJ[0],S$=GJ[1]||GJ[0];if(OJ==="auto")X.style.columnGap="0px";else if(OJ)X.style.columnGap=`${OJ}px`;if(S$==="auto")X.style.rowGap="0px";else if(S$)X.style.rowGap=`${S$}px`}}}else{let WJ=F(J,"grid-columns"),jJ=F(J,"grid-rows"),LJ=F(J,"grid-col-gap"),$J=F(J,"grid-row-gap");if(WJ)X.style.gridTemplateColumns=`repeat(${WJ}, 1fr)`;if(jJ)X.style.gridTemplateRows=`repeat(${jJ}, 1fr)`;if(LJ)X.style.columnGap=`${LJ}px`;if($J)X.style.rowGap=`${$J}px`}}else{x=V==="horizontal"?"horizontal":"vertical";let BJ=t(J,"reverse-z");A=BJ!==null&&BJ!=="false",E=BZ(X,x,i)}}SQ(X,J,$);let R=kQ(X,J),y=Array.from(J.children);function f(V){let T=t(V,"abs");if(T!==null&&T!=="false")return!0;return t(V,"layout-position")==="absolute"}let w=y.filter((V)=>V.tagName!=="appearance"&&!(K&&f(V))).length,C=K&&w>0&&w<y.filter((V)=>V.tagName!=="appearance").length&&E===null&&!A&&!W,v=0,r=0,p=null;for(let V of y){if(V.tagName==="appearance")continue;let T=!K||f(V),b=S6(V,$,{absolute:T,parentDirection:T?void 0:x});if(b){if(V===R)b.style.display="none";if(x==="grid"&&!T)CZ(b,V);if(!T&&E!==null){if(!b.classList.contains("gui-absolute"))a(b,"gui-relative");if(b.style.zIndex=String(v),v>0){let N=p?parseFloat(x==="horizontal"?F(p,"w")||"":F(p,"h")||""):NaN,_=!isNaN(N)?Math.max(E,-N):E;if(x==="horizontal")b.style.marginLeft=`${_}px`;else if(x==="vertical")b.style.marginTop=`${_}px`}}if(!T&&A){if(!b.classList.contains("gui-absolute"))a(b,"gui-relative");b.style.zIndex=String(w-v-1)}if(W){if(!T&&!b.classList.contains("gui-absolute"))a(b,"gui-relative");if(!A||T)b.style.zIndex="1"}if(C){if(!T)a(b,"gui-relative");b.style.zIndex=String(r)}if(X.appendChild(b),r++,!T)v++,p=V}}let e=i8(X,J,U);return s8(X,J,U),e||X}function SQ(J,$,Q){let K=F($,"mask-src");if(K&&Q[K]){let Z=F($,"mask-x")||"0",j=F($,"mask-y")||"0",X=F($,"mask-width")||String(F($,"w")||"100%"),W=F($,"mask-height")||String(F($,"h")||"100%"),Y=`url("${Q[K]}")`;J.style.webkitMaskImage=Y,J.style.maskImage=Y,J.style.webkitMaskSize=`${X}px ${W}px`,J.style.maskSize=`${X}px ${W}px`,J.style.webkitMaskPosition=`${Z}px ${j}px`,J.style.maskPosition=`${Z}px ${j}px`,J.style.webkitMaskRepeat="no-repeat",J.style.maskRepeat="no-repeat";let G=F($,"mask-mode");if(G)J.style.maskMode=G,J.style.webkitMaskMode=G;let q=F($,"mask-composite");if(q)J.style.maskComposite=q}}function kQ(J,$){let Q=Array.from($.children);for(let K=0;K<Q.length;K++){let Z=Q[K];if(t(Z,"mask")!=="true"&&t(Z,"mask")!=="")continue;let j=parseFloat(F(Z,"x")||"0"),X=parseFloat(F(Z,"y")||"0"),W=parseFloat(F(Z,"w")||"0"),B=parseFloat(F(Z,"h")||"0");if(!W||!B)continue;let Y="";if(Z.tagName==="ellipse"){let L=W/2,D=B/2;Y=`<ellipse cx="${L}" cy="${D}" rx="${L}" ry="${D}" fill="white"/>`}else{let L=F(Z,"radius"),D=L?parseFloat(L.split(" ")[0]):0;Y=`<rect width="${W}" height="${B}" rx="${D}" ry="${D}" fill="white"/>`}let G=`<svg xmlns="http://www.w3.org/2000/svg" width="${W}" height="${B}" viewBox="0 0 ${W} ${B}">${Y}</svg>`,U=`url("${"data:image/svg+xml;base64,"+btoa(G)}")`;return J.style.webkitMaskImage=U,J.style.maskImage=U,J.style.webkitMaskSize=`${W}px ${B}px`,J.style.maskSize=`${W}px ${B}px`,J.style.webkitMaskPosition=`${j}px ${X}px`,J.style.maskPosition=`${j}px ${X}px`,J.style.webkitMaskRepeat="no-repeat",J.style.maskRepeat="no-repeat",Z}return null}function TZ(J,$,Q){let K=document.createElement("gui-group");NJ(K,J,Q),SQ(K,J,$);let Z=kQ(K,J),j={absolute:!0};for(let X of Array.from(J.children)){let W=S6(X,$,j);if(W){if(X===Z)W.style.display="none";K.appendChild(W)}}return K}function I6(J,$){let Q=t($,"text-style"),K=Q?C6[Q]:null;function Z(k){let x=F($,k);if(x!==null)return x;if(K&&K[k]!==void 0)return T6(K[k]);return null}let j=Z("font-family"),X=Z("font-size"),W=Z("font-weight"),B=Z("font-style"),Y=Z("font-variation"),G=Z("font-feature"),q=Z("line-height"),U=Z("letter-spacing"),L=F($,"baseline-shift"),D=t($,"fill-style"),H=D?eJ[D]||null:F($,"fill")||F($,"color"),O=Z("decoration"),M=Z("decoration-color"),P=Z("decoration-style"),I=Z("decoration-thickness"),z=Z("text-case");if(j)J.style.fontFamily=YZ(j);if(X)J.style.fontSize=`${X}px`;if(W)J.style.fontWeight=W;if(B)J.style.fontStyle=B;if(Y)J.style.fontVariationSettings=Y;if(G)J.style.fontFeatureSettings=G;if(q)J.style.lineHeight=ZZ(q);if(U)J.style.letterSpacing=U.includes("%")?U:`${U}px`;if(L)J.style.verticalAlign=`${L}px`;if(H)J.style.color=s(H);if(O==="underline"||O==="strikethrough"){if(J.style.textDecoration=O==="underline"?"underline":"line-through",M)J.style.textDecorationColor=s(M);if(P)J.style.textDecorationStyle=P;if(I)J.style.textDecorationThickness=`${I}px`}if(z==="small-caps"||z==="small-caps-forced")J.style.fontVariant="small-caps";else if(z)J.style.textTransform=z}function r8(J,$){if(!$)return J;let Q=document.createElement("a");return Q.href=$,Q.style.color="inherit",Q.style.textDecoration="inherit",Q.appendChild(J),Q}var _Z=0.01;function IQ(J,$){let Q=F(J,$);if(Q!==null)return Q;let K=t(J,"text-style"),Z=K?C6[K]:null;if(Z&&Z[$]!==void 0)return T6(Z[$]);return null}function NZ(J,$){let Q=J.trim();if(/^-?\d+(\.\d+)?$/.test(Q)){let K=parseFloat(Q);return K>0&&K<=4?K*$:K}if(Q.endsWith("%"))return parseFloat(Q)/100*$;if(Q.endsWith("px"))return parseFloat(Q);return NaN}function wZ(J,$,Q){let K=document.createElement("gui-text");NJ(K,J,Q);let Z=F(J,"align"),j=F(J,"vertical-align"),X=t(J,"truncate"),W=X!==null&&X!=="false",B=F(J,"max-lines"),Y=F(J,"overflow"),G=F(J,"leading-trim"),q=F(J,"list"),U=F(J,"list-level"),L=F(J,"list-marker"),D=F(J,"h")!==null,H=F(J,"w"),O=H===null?NaN:parseFloat(H);if(!Number.isNaN(O)&&H!=="hug"&&H!=="fill"&&!(Y==="ellipsis"&&!W&&!B))K.style.setProperty("--gui-w",`${O*(1+_Z)}px`);let I=!1;if(D&&!W&&!B){let _=parseFloat(F(J,"h")||""),S=IQ(J,"font-size"),i=IQ(J,"line-height");if(Number.isFinite(_)&&S&&i){let JJ=NZ(i,parseFloat(S));if(Number.isFinite(JJ)&&JJ>0)I=Math.round(_/JJ)<=1}}if(Z)K.style.textAlign=Z;if(Y==="ellipsis"&&!W&&!B)K.style.overflow="hidden",K.style.textOverflow="ellipsis",K.style.whiteSpace="nowrap";else if(Y==="clip")K.style.overflow="hidden";if(q&&q!=="none"){let _=U?parseInt(U,10)*16:0;if(K.style.display="list-item",K.style.listStyleType=q==="decimal"?"decimal":"disc",K.style.listStylePosition="inside",_)K.style.paddingLeft=`${_}px`;if(L)K.setAttribute("data-list-marker",L),K.style.listStyleType="none"}if(G&&G!=="none")K.style.textBoxTrim="both",K.style.textBoxEdge="cap alphabetic";let z=F(J,"font-stretch");if(z)K.style.fontStretch=z;let k=F(J,"direction");if(k)K.style.direction=k;let x=F(J,"writing-mode");if(x)K.style.writingMode=x;let E=F(J,"white-space");if(E)K.style.whiteSpace=E;let A=F(J,"word-break");if(A)K.style.wordBreak=A;let R=F(J,"word-spacing");if(R)K.style.wordSpacing=`${R}px`;let y=F(J,"text-underline-offset");if(y)K.style.textUnderlineOffset=`${y}px`;let f=F(J,"text-decoration-skip-ink");if(f!==null)K.style.textDecorationSkipInk=f==="false"?"none":"auto";let w=F(J,"text-wrap");if(w)K.style.textWrap=w;let u=F(J,"font-optical-sizing");if(u)K.style.fontOpticalSizing=u;let C=F(J,"font-smoothing");if(C){if(C==="antialiased")K.style.webkitFontSmoothing="antialiased",K.style.mozOsxFontSmoothing="grayscale";else if(C==="subpixel-antialiased")K.style.webkitFontSmoothing="subpixel-antialiased";else if(C==="none")K.style.webkitFontSmoothing="none"}let v=F(J,"text-rendering");if(v)K.style.textRendering=v;let r=F(J,"paragraph-spacing");if(r)K.style.marginBottom=`${r}px`;let p=F(J,"paragraph-indent");if(p)K.style.textIndent=`${p}px`;let e=IZ(J),V=!!e;if(l8(J,K,$,void 0,V),V)K.style.backgroundImage=s(e),K.style.webkitBackgroundClip="text",K.style.backgroundClip="text",K.style.webkitTextFillColor="transparent",K.style.color="transparent";let T=Array.from(J.children).filter((_)=>_.tagName==="segment");if(T.length>0){if(I6(K,J),j&&j!=="top")K.style.display="flex",K.style.alignItems=j==="center"?"center":"flex-end";let _=document.createElement("span");if(!(Y==="ellipsis"&&!W&&!B))a(_,"gui-pre-wrap");for(let S of T){let i=document.createElement("span");i.textContent=F(S,"value")||"",I6(i,S),_.appendChild(r8(i,F(S,"href")))}return K.appendChild(_),K}I6(K,J);let g=F(J,"value")||"",b=F(J,"href"),N=B||(W?"1":null);if(I&&!N)K.style.whiteSpace="nowrap";else if(D||N)a(K,"gui-overflow-hidden");if(j&&j!=="top")if(K.style.display="flex",K.style.alignItems=j==="center"?"center":"flex-end",N){let _=document.createElement("span");_.textContent=g,_.style.display="-webkit-box",_.style.webkitLineClamp=N,_.style.WebkitBoxOrient="vertical",a(_,"gui-overflow-hidden"),_.style.width="100%",K.appendChild(r8(_,b))}else{let _=document.createElement("span");_.textContent=g,K.appendChild(r8(_,b))}else if(N){if(K.textContent=g,K.style.display="-webkit-box",K.style.webkitLineClamp=N,K.style.WebkitBoxOrient="vertical",a(K,"gui-overflow-hidden"),b){a(K,"gui-block"),K.textContent="";let _=document.createElement("span");_.textContent=g,_.style.display="-webkit-box",_.style.webkitLineClamp=N,_.style.WebkitBoxOrient="vertical",a(_,"gui-overflow-hidden"),K.appendChild(r8(_,b))}}else if(b){let _=document.createElement("span");_.textContent=g,K.appendChild(r8(_,b))}else K.textContent=g;return K}function EZ(J,$,Q){let K=document.createElement("gui-img");NJ(K,J,Q);let Z=F(J,"fit");if(Z)K.setAttribute("fit",Z);let j=document.createElement("img");a(j,"gui-block");let X=F(J,"src"),W=_6(X,$);if(W)j.src=W;let B=F(J,"radius"),Y=B?T$(B):null;if(Y)K.style.borderRadius=Y,j.style.borderRadius=Y;let G=F(J,"object-position");if(G)j.style.objectPosition=G;let q=F(J,"image-rendering");if(q)j.style.imageRendering=q;K.appendChild(j);let U=i8(K,J,Y);return s8(K,J,Y),U||K}function SZ(J,$,Q){let K=F(J,"src"),Z=document.createElement("gui-svg");NJ(Z,J,Q);let j=document.createElement("img");a(j,"gui-block"),a(j,"gui-fit-fill"),j.style.width="100%",j.style.height="100%";let X=_6(K,$);if(X)j.src=X;return Z.appendChild(j),Z}function kZ(J,$,Q,K,Z){let j=parseFloat(F(J,"w")||"24"),X=parseFloat(F(J,"h")||"24"),W=parseFloat(F(J,"arc-start")||"0"),B=parseFloat(F(J,"arc-end")||"360"),Y=parseFloat(F(J,"arc-inner")||"0"),G=parseFloat(Z||"0"),q="http://www.w3.org/2000/svg",U=document.createElementNS("http://www.w3.org/2000/svg","svg");U.setAttribute("viewBox",`0 0 ${j} ${X}`),NJ(U,J,$),a(U,"gui-block"),a(U,"gui-overflow-visible");let L=j/2,D=X/2,H=j/2,O=X/2,M=W*Math.PI/180,P=B*Math.PI/180,z=((B-W+360)%360||360)>180?1:0,k=(R,y)=>L+y*Math.cos(R),x=(R,y)=>D+y*Math.sin(R),E;if(Y>0){let R=H*Y,y=O*Y;E=[`M ${k(M,H)} ${x(M,O)}`,`A ${H} ${O} 0 ${z} 1 ${k(P,H)} ${x(P,O)}`,`L ${k(P,R)} ${x(P,y)}`,`A ${R} ${y} 0 ${z} 0 ${k(M,R)} ${x(M,y)}`,"Z"].join(" ")}else E=[`M ${L} ${D}`,`L ${k(M,H)} ${x(M,O)}`,`A ${H} ${O} 0 ${z} 1 ${k(P,H)} ${x(P,O)}`,"Z"].join(" ");let A=document.createElementNS("http://www.w3.org/2000/svg","path");if(A.setAttribute("d",E),A.setAttribute("fill",Q?P8(Q):"none"),K&&G>0)A.setAttribute("stroke",P8(K)),A.setAttribute("stroke-width",String(G));return U.appendChild(A),U}function xZ(J,$,Q){let K=document.createElement("gui-shape");K.setAttribute("type","rect"),NJ(K,J,Q);let Z=N$(J),j=t(J,"fill-style"),X=j?eJ[j]||null:F(J,"fill");if(X&&!Z)K.style.background=s(X);let W=F(J,"radius");if(W)K.style.borderRadius=T$(W);let B=_$(F(J,"shadow"));if(B)J8(K,B);l8(J,K,$,K.style.borderRadius||null);let Y=t(J,"effect-style");if(Y)w$(K,Y);let G=i8(K,J,K.style.borderRadius||null);return s8(K,J,K.style.borderRadius||null),G||K}function yZ(J,$,Q){let K=document.createElement("gui-shape");K.setAttribute("type","ellipse"),NJ(K,J,Q);let Z=N$(J),j=t(J,"fill-style"),X=j?eJ[j]||null:F(J,"fill");if(X&&!Z)K.style.background=s(X);K.style.borderRadius="50%";let W=_$(F(J,"shadow"));if(W)J8(K,W);l8(J,K,$,"50%");let B=t(J,"effect-style");if(B)w$(K,B);let Y=i8(K,J,"50%");return s8(K,J,"50%"),Y||K}function bZ(J,$){let Q=document.createElement("gui-shape");Q.setAttribute("type","line"),NJ(Q,J,$);let K=F(J,"direction")||"horizontal",Z=F(J,"thickness")||"1",j=t(J,"fill-style"),X=j?eJ[j]||null:F(J,"fill");if(K==="vertical")Q.style.width=`${Z}px`,Q.style.alignSelf="stretch";else Q.style.height=`${Z}px`,Q.style.alignSelf="stretch";if(X)Q.style.background=s(X);return Q}function vZ(J,$,Q){let K=F(J,"type");if(K==="path")return gZ(J,Q);if(K==="ellipse"){let U=F(J,"arc-start"),L=F(J,"arc-end"),D=F(J,"arc-inner");if(U!==null||L!==null||D!==null)return kZ(J,Q,F(J,"fill"),F(J,"stroke"),F(J,"stroke-width"))}let Z=document.createElement("gui-shape");if(K)Z.setAttribute("type",K);if(NJ(Z,J,Q),K==="line"){let U=F(J,"stroke-width")||"1",L=F(J,"stroke-cap"),D=F(J,"dash-array"),H=F(J,"dash-offset");if(L||D){let I=parseFloat(F(J,"w")||"0"),z=parseFloat(U),k=L==="arrow-lines"||L==="arrow-equilateral"||L==="triangle"||L==="triangle-filled",x=z*3,E=k?x:z,A=document.createElementNS("http://www.w3.org/2000/svg","svg");A.setAttribute("viewBox",-E+" "+-E/2+" "+(I+E*2)+" "+(z+E)),NJ(A,J,Q),a(A,"gui-block"),A.style.width=I+"px",A.style.height=z+"px",A.style.overflow="visible";let R=P8(F(J,"stroke"));if(k){let y=document.createElementNS("http://www.w3.org/2000/svg","defs"),f="gui-arrow-"+ ++N6,w=document.createElementNS("http://www.w3.org/2000/svg","marker");w.setAttribute("id",f),w.setAttribute("markerWidth","6"),w.setAttribute("markerHeight","6"),w.setAttribute("refX","6"),w.setAttribute("refY","3"),w.setAttribute("orient","auto");let u=L==="triangle-filled";if(L==="arrow-lines"){let v=document.createElementNS("http://www.w3.org/2000/svg","path");v.setAttribute("d","M 0 0 L 6 3 L 0 6"),v.setAttribute("fill","none"),v.setAttribute("stroke",R),v.setAttribute("stroke-width","1"),w.appendChild(v)}else{let v=document.createElementNS("http://www.w3.org/2000/svg","polygon");v.setAttribute("points","0 0, 6 3, 0 6"),v.setAttribute("fill",u?R:"none"),v.setAttribute("stroke",R),v.setAttribute("stroke-width","0.5"),w.appendChild(v)}y.appendChild(w),A.appendChild(y);let C=document.createElementNS("http://www.w3.org/2000/svg","line");C.setAttribute("x1","0"),C.setAttribute("y1","0"),C.setAttribute("x2",String(I-z)),C.setAttribute("y2","0"),C.setAttribute("stroke",R),C.setAttribute("stroke-width",U),C.setAttribute("stroke-linecap","butt"),C.setAttribute("marker-end","url(#"+f+")"),A.appendChild(C)}else{let y=document.createElementNS("http://www.w3.org/2000/svg","line");if(y.setAttribute("x1","0"),y.setAttribute("y1","0"),y.setAttribute("x2",String(I)),y.setAttribute("y2","0"),y.setAttribute("stroke",R),y.setAttribute("stroke-width",U),L==="round")y.setAttribute("stroke-linecap","round");else if(L==="square")y.setAttribute("stroke-linecap","square");else y.setAttribute("stroke-linecap","butt");if(D)y.setAttribute("stroke-dasharray",D);if(H)y.setAttribute("stroke-dashoffset",H);A.appendChild(y)}return A}let O=VZ(J),M=F(J,"w")||"0";if(O!==null)if(Z.style.transform="",Z.style.transformOrigin="",O===90||O===270)Z.style.width=`${U}px`,Z.style.height=`${M}px`;else Z.style.width=`${M}px`,Z.style.height=`${U}px`;else Z.style.width=d8(F(J,"w")),Z.style.height=`${U}px`;if(Z.style.background=s(F(J,"stroke")),L==="round")Z.style.borderRadius="9999px";return Z}let j=NQ(J),X=N$(J),W=t(J,"fill-style"),B=W?eJ[W]||null:F(J,"fill");if(B&&!X)Z.style.background=s(B);let Y=_$(F(J,"shadow"));if(Y)J8(Z,Y);if(K==="ellipse")Z.style.borderRadius="50%";else if(K==="rect"){let U=F(J,"radius");if(U)Z.style.borderRadius=T$(U);_Q(Z,J)}l8(J,Z,$,Z.style.borderRadius||null);let G=t(J,"effect-style");if(G)w$(Z,G);let q=i8(Z,J,Z.style.borderRadius||null);return s8(Z,J,Z.style.borderRadius||null),q||Z}function gZ(J,$){let Q=F(J,"w")||"24",K=F(J,"h")||"24",Z=F(J,"fill"),j=F(J,"stroke"),X=F(J,"stroke-width"),W=F(J,"stroke-position")||"center",B=F(J,"fill-rule"),Y=F(J,"dash-array"),G=F(J,"dash-offset"),q="http://www.w3.org/2000/svg",U=document.createElementNS("http://www.w3.org/2000/svg","svg");U.setAttribute("viewBox",`0 0 ${Q} ${K}`),NJ(U,J,$),a(U,"gui-block");let L=Array.from(J.querySelectorAll("path"));for(let D of L){let H=D.getAttribute("d");if(!H)continue;let O=Z?P8(Z):"none",M=j?P8(j):null;if(!M||!X||W==="center"){let I=tJ("http://www.w3.org/2000/svg",H,O,M,X);if(B)I.setAttribute("fill-rule",B);if(Y)I.setAttribute("stroke-dasharray",Y);if(G)I.setAttribute("stroke-dashoffset",G);U.appendChild(I);continue}let P=parseFloat(X);if(!Number.isFinite(P)||P<=0){let I=tJ("http://www.w3.org/2000/svg",H,O,null,null);if(B)I.setAttribute("fill-rule",B);U.appendChild(I);continue}if(W==="inside"){let I=`gui-clip-${++N6}`,z=document.createElementNS("http://www.w3.org/2000/svg","defs"),k=document.createElementNS("http://www.w3.org/2000/svg","clipPath"),x=tJ("http://www.w3.org/2000/svg",H,"black",null,null);k.setAttribute("id",I),k.appendChild(x),z.appendChild(k),U.appendChild(z);let E=tJ("http://www.w3.org/2000/svg",H,O,null,null);if(B)E.setAttribute("fill-rule",B);let A=tJ("http://www.w3.org/2000/svg",H,"none",M,String(P*2));if(A.setAttribute("clip-path",`url(#${I})`),Y)A.setAttribute("stroke-dasharray",Y);if(G)A.setAttribute("stroke-dashoffset",G);U.appendChild(E),U.appendChild(A)}else{let I=tJ("http://www.w3.org/2000/svg",H,"none",M,String(P*2));if(Y)I.setAttribute("stroke-dasharray",Y);if(G)I.setAttribute("stroke-dashoffset",G);let z=tJ("http://www.w3.org/2000/svg",H,O,null,null);if(B)z.setAttribute("fill-rule",B);U.appendChild(I),U.appendChild(z)}}return U}function tJ(J,$,Q,K,Z){let j=document.createElementNS(J,"path");if(j.setAttribute("d",$),j.setAttribute("fill",Q),K&&Z)j.setAttribute("stroke",K),j.setAttribute("stroke-width",Z);return j}function uZ(J){let $=new Map;for(let Q of Array.from(J.children)){if(Q.tagName!=="components")continue;for(let K of Array.from(Q.children))if(K.tagName==="component"){let Z=K.getAttribute("id");if(Z)$.set(Z,K)}else if(K.tagName==="component-set"){for(let Z of Array.from(K.children))if(Z.tagName==="variant"){let j=Z.getAttribute("id");if(j)$.set(j,Z)}}}return $}function A$(J,$){if(J.getAttribute("id")===$)return J;for(let Q of Array.from(J.children)){let K=A$(Q,$);if(K)return K}return null}function R6(J){for(let $ of Array.from(J.children)){if($.tagName==="text")return $;let Q=R6($);if(Q)return Q}return null}var hZ=new Set(["component","name","x","y","w","h","constraint-h","constraint-v","abs","rotation","opacity","blend","min-width","max-width","min-height","max-height"]);function fZ(J,$,Q){let K={},Z=Array.from(Q.children).find((X)=>X.tagName==="props");if(Z)for(let X of Array.from(Z.children)){if(X.tagName!=="prop")continue;let W=X.getAttribute("name"),B=X.getAttribute("type"),Y=X.getAttribute("target"),G=X.getAttribute("bind");if(!W||!B||!Y)continue;let q=Y.trim().split(/\s+/).filter(Boolean);K[W]={type:B,targets:q,bind:G};let U=$.getAttribute(W);if(U===null)continue;for(let L of q){let D=A$(J,L);if(!D)continue;let O=(B==="string"||B==="text")&&D.tagName!=="text"?R6(D)||D:D;PQ(O,B,U,G)}}let j=[{suffix:"-stroke-style",type:"style",bind:"stroke-style"},{suffix:"-text",type:"style",bind:"text-style"},{suffix:"-fill",type:"style",bind:"fill-style"},{suffix:"-effect",type:"style",bind:"effect-style"},{suffix:"-stroke",type:"color",bind:"stroke"},{suffix:"-radius",type:"number",bind:"radius"},{suffix:"-opacity",type:"number",bind:"opacity"}];for(let X of Array.from($.attributes)){if(hZ.has(X.name))continue;if(K[X.name]!==void 0)continue;let W=A$(J,X.name),B="",Y=null;if(W)B=W.tagName==="text"?"string":X.value==="false"||X.value==="true"?"boolean":W.tagName==="instance"?"component":W.getAttribute("src")!==null?"image":"string";else{for(let q of j){if(!X.name.endsWith(q.suffix))continue;let U=X.name.slice(0,X.name.length-q.suffix.length),L=A$(J,U);if(!L)continue;W=L,B=q.type,Y=q.bind;break}if(!W)continue}let G=B==="string"&&W.tagName!=="text"?R6(W)||W:W;PQ(G,B,X.value,Y)}}function PQ(J,$,Q,K){if($==="string"||$==="text")J.setAttribute(K||"value",Q);else if(($==="boolean"||$==="visible")&&Q==="false")J.parentNode&&J.parentNode.removeChild(J);else if($==="color"||$==="fill")J.setAttribute(K||"fill",Q);else if($==="image"||$==="src")J.setAttribute("src",Q);else if($==="component")J.setAttribute("component",Q);else if($==="number"&&K)J.setAttribute(K,Q);else if($==="style"&&K){if(J.setAttribute(K,Q),K==="text-style"){let Z=["font-size","font-weight","font-style","line-height","letter-spacing","font-family","font-postscript","font-style-name","font-stretch","font-variation","font-feature","text-case","decoration"];for(let j=0;j<Z.length;j++)J.removeAttribute(Z[j])}}}function xQ(J,$,Q){for(let K=0;K<J.children.length;K++){let Z=J.children[K],j=Z.getAttribute("constraint-h"),X=Z.getAttribute("constraint-v"),W=j==="scale"||j==="left-right",B=X==="scale"||X==="top-bottom";if(W||B){if(W){let Y=parseFloat(Z.getAttribute("x")||"0"),G=parseFloat(Z.getAttribute("w")||"0");if(G>0)Z.setAttribute("w",String(Math.round(G*$)));if(Y!==0)Z.setAttribute("x",String(Math.round(Y*$)))}if(B){let Y=parseFloat(Z.getAttribute("y")||"0"),G=parseFloat(Z.getAttribute("h")||"0");if(G>0)Z.setAttribute("h",String(Math.round(G*Q)));if(Y!==0)Z.setAttribute("y",String(Math.round(Y*Q)))}}if(Z.children.length>0)xQ(Z,$,Q)}}function mZ(J,$,Q){let K=F(J,"component");if(!K)return null;let Z=CQ.get(K);if(!Z)return null;let j=Array.from(Z.children).find((D)=>D.tagName!=="props");if(!j)return null;let X=j.cloneNode(!0);fZ(X,J,Z);let W=parseFloat(j.getAttribute("w")||"0"),B=parseFloat(j.getAttribute("h")||"0"),Y=parseFloat(J.getAttribute("w")||"0"),G=parseFloat(J.getAttribute("h")||"0"),q=W>0&&Y>0?Y/W:1,U=B>0&&G>0?G/B:1;for(let D of["x","y","w","h","constraint-h","constraint-v","abs","rotation","opacity","blend","visible","min-width","max-width","min-height","max-height","radius","fill","fill-style","shadow","clip","overflow-x","overflow-y"]){let H=J.getAttribute(D);if(H!==null)X.setAttribute(D,H)}let L=J.getAttribute("radius");if(L!==null){if(X.getAttribute("clip")===null)X.setAttribute("clip","true");for(let D=0;D<X.children.length;D++){let H=X.children[D];if(H.getAttribute("constraint-h")==="scale"&&H.getAttribute("constraint-v")==="scale")H.setAttribute("radius",L)}}if(q!==1||U!==1)xQ(X,q,U);return S6(X,$,Q)}function S6(J,$,Q){let K=o8;o8=TQ(J,K);try{switch(J.tagName){case"frame":return z6(J,$,Q,!1);case"stack":case"row":case"col":case"grid":return z6(J,$,Q,!0);case"group":return TZ(J,$,Q);case"text":return wZ(J,$,Q);case"img":return EZ(J,$,Q);case"rect":return xZ(J,$,Q);case"ellipse":return yZ(J,$,Q);case"line":return bZ(J,Q);case"svg":return SZ(J,$,Q);case"shape":return vZ(J,$,Q);case"instance":return mZ(J,$,Q);default:return null}}finally{o8=K}}function pZ(J){let $=J.getAttribute("family");if(!$)return null;let Q=(J.getAttribute("weights")||"400").split(/[\s,]+/).filter(Boolean).sort((B,Y)=>parseInt(B)-parseInt(Y)),K=(J.getAttribute("styles")||"normal").split(/[\s,]+/).filter(Boolean),Z=(J.getAttribute("variants")||"").split(/[\s,]+/).filter(Boolean),j=Z.reduce((B,Y)=>{return B[Y]=!0,B},{}),X=encodeURIComponent($).replace(/%20/g,"+");if(!Q.length)return X;if(K.indexOf("italic")!==-1){let B=[];for(let Y of Q)if(!Z.length||j[Y==="400"?"regular":Y])B.push(`0,${Y}`);for(let Y of Q)if(!Z.length||j[Y==="400"?"italic":`${Y}italic`])B.push(`1,${Y}`);if(!B.length)return X;return`${X}:ital,wght@${B.join(";")}`}let W=Z.length?Q.filter((B)=>j[B==="400"?"regular":B]):Q;if(!W.length)return X;return`${X}:wght@${W.join(";")}`}function cZ(J){let $=[];for(let[K,Z]of Object.entries(J)){if(Z.source!=="google")continue;let j=document.createElement("span");if(j.setAttribute("family",K),Z.weights)j.setAttribute("weights",Z.weights);if(Z.styles)j.setAttribute("styles",Z.styles);if(Z.variants)j.setAttribute("variants",Z.variants);let X=pZ(j);if(X&&$.indexOf(X)===-1)$.push(X)}if(!$.length||typeof document>"u")return;if(!document.querySelector('link[data-gui-fonts-preconnect="google-fonts"]')){let K=document.createElement("link");K.rel="preconnect",K.href="https://fonts.gstatic.com",K.crossOrigin="anonymous",K.setAttribute("data-gui-fonts-preconnect","google-fonts"),document.head.appendChild(K)}let Q=Array.from(document.querySelectorAll("link[data-gui-fonts]"));for(let K of $){let Z=`https://fonts.googleapis.com/css2?family=${K}&display=swap`;if(Q.some((X)=>X.href===Z||X.getAttribute("href")===Z))continue;let j=document.createElement("link");j.rel="stylesheet",j.href=Z,j.setAttribute("data-gui-fonts",Z),document.head.appendChild(j)}}function E$(J,$,Q,K){GZ(),$.innerHTML="";let Z=R$(J,Q);if(!Z)return $.innerHTML='<div style="color:#888;padding:24px;font-size:12px">Invalid .gui</div>',null;P6=Z.tokens,A6=Z.modes,zQ=Z.tokenDefs,RQ=Z.fonts,C6=Z.textStyles,eJ=Z.fillStyles,AQ=Z.effectStyles,cZ(Z.fonts);let j=Z.assets,X;try{let u=QZ(J).replace(/&(?!amp;|lt;|gt;|quot;|apos;|#)/g,"&amp;");if(X=new DOMParser().parseFromString(u,"text/xml"),X.querySelector("parsererror"))throw Error()}catch{return $.innerHTML='<div style="color:#888;padding:24px;font-size:12px">Invalid .gui</div>',null}let W=X.documentElement;CQ=uZ(W);let B=new Set(["stack","row","col","grid"]),Y=null;for(let u of Array.from(W.children))if(u.tagName==="frame"||B.has(u.tagName)){Y=u;break}if(!Y)return null;o8=TQ(Y,K&&K.mode?{...K.mode}:{});let G=Y.getAttribute("w"),q=Y.getAttribute("h"),U=G&&G!=="fill"?parseInt(G)||390:390,L=q&&q!=="fill"?parseInt(q):null,D=z6(Y,j,{absolute:!1},B.has(Y.tagName));if(D.style.width=`${U}px`,L!==null)D.style.height=`${L}px`;if(a(D,"gui-relative"),D.style.flexShrink="0",D.style.outline="1px solid #0d99ff",!K?.zoom)return $.appendChild(D),null;let H=document.createElement("div"),O=L!==null?`height:${L}px;`:"";H.style.cssText=`position:absolute;left:0;top:0;width:${U}px;${O}transform-origin:0 0;will-change:transform;`,H.appendChild(D);let M=document.createElement("div");M.style.cssText="position:relative;width:100%;height:100%;overflow:hidden;cursor:default;touch-action:none;user-select:none;",M.appendChild(H),$.appendChild(M);let P=K?.view;function I(){return L!==null?L:D.offsetHeight||D.scrollHeight||844}function z(){let u=I();return Math.min((M.clientWidth-48)/U,(M.clientHeight-48)/u,1)}function k(u){let C=I();return{x:(M.clientWidth-U)/(2*u),y:(M.clientHeight-C)/(2*u)}}function x(u){let C=I();return{x:(M.clientWidth-U*u)/2,y:(M.clientHeight-C*u)/2}}let E=z(),A=1,R=null;if(P?.transform)H.style.transform=P.transform;else if(E>0){let{x:u,y:C}=x(E);H.style.transform=`matrix(${E}, 0, 0, ${E}, ${u}, ${C})`}function y(u){let C=E*u;if(!R){let{x:r,y:p}=x(C);H.style.transform=`matrix(${C}, 0, 0, ${C}, ${r}, ${p})`;return}let v=k(C);R.zoom(C,{animate:!1,force:!0}),R.pan(v.x,v.y,{animate:!1,force:!0})}function f(u,C,v){let r=Math.max(0.1,Math.min(u,16)),p=E*r;if(!p)return;if(C===void 0||v===void 0){A=r,y(r);return}if(A=r,!R){y(r);return}let e=M.getBoundingClientRect();R.zoomToPoint(p,{clientX:e.left+C,clientY:e.top+v},{animate:!1,force:!0})}requestAnimationFrame(()=>{if(!H.isConnected)return;E=z();let u=k(E);R=h$(H,{canvas:!0,cursor:"default",disablePan:!0,maxScale:E*16,minScale:E*0.1,overflow:"hidden",startScale:P?P.scale:E,startX:P?P.x:u.x,startY:P?P.y:u.y,step:0.18,touchAction:"none"})}),M.addEventListener("wheel",(u)=>{if(!R)return;if(u.preventDefault(),u.ctrlKey||u.metaKey){let C=R.getScale(),v=Math.min(Math.max(C*Math.exp(-u.deltaY*0.0125),E*0.1),E*16);R.zoomToPoint(v,u,{animate:!1,force:!0}),A=v/E}else{let C=R.getScale(),v=R.getPan();R.pan(v.x-u.deltaX/C,v.y-u.deltaY/C,{animate:!1,force:!0})}},{passive:!1});let w=f;return w.getView=()=>R?{scale:R.getScale(),x:R.getPan().x,y:R.getPan().y,transform:H.style.transform}:null,w}var nZ=new Set(["frame","stack","row","col","grid","group"]);var rZ=new Set(["text","img","svg","shape","instance"]),dZ=new Set([...nZ,...rZ]),oZ=new Set(["preview","tokens","styles","fonts","assets","meta","components"]),L9=new Set([...dZ,...oZ,"gui","color","number","string","text-style","fill-style","effect-style","font","image","appearance","fill","effect","segment","path","component","component-set","variant","props","prop"]);var iZ="design.guix",yQ="preview.webp",k6="assets/";function sZ(J){return J[0]===80&&J[1]===75}function aZ(J){return J.startsWith(k6)?J:k6+J}function bQ(J){if(!sZ(J))return{xml:Z$(J),assets:{}};let $=Z0(J),Q=Object.keys($).find((Z)=>Z.endsWith(".guix"));if(!Q)throw Error("no .guix entry inside the .gui package");let K={xml:Z$($[Q]),assets:{}};for(let[Z,j]of Object.entries($)){if(Z===Q)continue;if(Z===yQ){K.preview=j;continue}if(Z.startsWith(k6))K.assets[Z]=j}return K}function vQ(J){let $={[iZ]:$$(J.xml)};if(J.preview)$[yQ]=J.preview;for(let[Q,K]of Object.entries(J.assets))$[aZ(Q)]=K;return K0($)}function lZ(J){if(J==="svg")return"image/svg+xml";if(J==="jpg"||J==="jpeg")return"image/jpeg";return`image/${J}`}function gQ(J){let $=bQ(J),Q={};for(let[K,Z]of Object.entries($.assets)){let j=K.split(".").pop()||"png",X=new Blob([Z],{type:lZ(j)});Q[K]=URL.createObjectURL(X)}return{xml:$.xml,assetMap:Q,pkg:$}}function x6(J){return{xml:J,assetMap:{},pkg:{xml:J,assets:{}}}}async function y6(J){let $=await fetch(J);if(!$.ok)throw Error(`gui-embed: failed to fetch "${J}" (${$.status})`);let Q=new Uint8Array(await $.arrayBuffer());return gQ(Q)}function uQ(J){return vQ(J)}function b6(J){for(let $ of Object.values(J))if($.startsWith("blob:"))URL.revokeObjectURL($)}function v6(J){try{return R$(J)?.modes??{}}catch{return{}}}function g6(J){return Object.keys(J).filter(($)=>J[$].values.length>1)}var hQ="gui-embed";class u6 extends HTMLElement{_canvas;_bar;_zoomCtl=null;_decoded=null;_modes={};_mode={};_ro=null;_userZoomed=!1;static get observedAttributes(){return["src"]}connectedCallback(){if(!this._canvas)this._build();this._load()}disconnectedCallback(){if(this._ro?.disconnect(),this._ro=null,this._decoded)b6(this._decoded.assetMap);this._decoded=null}attributeChangedCallback(J){if(J==="src"&&this._canvas)this._load()}_build(){let J=getComputedStyle(this);if(J.position==="static")this.style.position="relative";if(J.display==="inline")this.style.display="block";this.style.overflow="hidden";let $=document.createElement("div");$.className="gui-embed-canvas";let Q=this.getAttribute("grid")!=="false";$.style.cssText=["position:absolute;inset:0","background-color:var(--gui-embed-bg, #fafaf8)",Q?"background-image:radial-gradient(var(--gui-embed-dot, rgba(0,0,0,.14)) 1px, transparent 1.4px);background-size:var(--gui-embed-dot-gap, 18px) var(--gui-embed-dot-gap, 18px);background-position:center":""].filter(Boolean).join(";"),this.appendChild($),this._canvas=$;let K=()=>this._userZoomed=!0;$.addEventListener("wheel",K,{passive:!0}),$.addEventListener("pointerdown",K),this._ro=new ResizeObserver(()=>{if(!this._userZoomed)this._zoomCtl?.(1)}),this._ro.observe(this);let Z=document.createElement("div");Z.className="gui-embed-controls",Z.style.cssText=["position:absolute;top:8px;right:8px;z-index:2","display:flex;gap:4px;padding:4px","border-radius:8px;background:rgba(20,20,20,.55)","backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)","opacity:0;transition:opacity .15s ease"].join(";"),this.appendChild(Z),this._bar=Z,this.addEventListener("pointerenter",()=>Z.style.opacity="1"),this.addEventListener("pointerleave",()=>Z.style.opacity="0")}async _load(){try{let J,$=this.getAttribute("src");if($)J=await y6($);else{let Q=this.querySelector(':scope > script[type="application/gui"]');if(!Q)return;J=x6(Q.textContent??"")}if(this._decoded)b6(this._decoded.assetMap);this._decoded=J,this._userZoomed=!1,this._modes=v6(J.xml),this._mode={};for(let[Q,K]of Object.entries(this._modes))this._mode[Q]=K.default;this._render(),this._buildControls()}catch(J){this._canvas.textContent=String(J?.message??J),this._canvas.style.cssText+=";display:flex;align-items:center;justify-content:center;font:13px system-ui;color:#c00;padding:12px;text-align:center"}}_render(){if(!this._decoded)return;let{xml:J,assetMap:$}=this._decoded,Q=this.getAttribute("zoom")!=="false";if(!this._hasHeight()){E$(J,this._canvas,$,{mode:this._mode});let K=this._canvas.querySelector(".gui-relative"),Z=K?.offsetWidth??0,j=K?.offsetHeight??0;if(Z>0&&j>0)if(this.style.width)this.style.aspectRatio=`${Z} / ${j}`;else this.style.width=`${Z}px`,this.style.height=`${j}px`;requestAnimationFrame(()=>{this._zoomCtl=E$(J,this._canvas,$,{zoom:Q,mode:this._mode})});return}this._zoomCtl=E$(J,this._canvas,$,{zoom:Q,mode:this._mode})}_hasHeight(){if(this.style.height||this.style.aspectRatio)return!0;let J=getComputedStyle(this).height;return!!J&&J!=="auto"&&parseFloat(J)>1}_buildControls(){let J=this._bar;if(J.innerHTML="",this.getAttribute("zoom")!=="false")J.appendChild(this._btn("Fit","Reset zoom",()=>this._zoomCtl?.(1)));let $=g6(this._modes);if(this.hasAttribute("mode-switch")&&$.length)for(let Q of $)J.appendChild(this._modeSelect(Q));if(this.hasAttribute("copy"))J.appendChild(this._btn("Copy","Copy .gui markup",async()=>{if(this._decoded)await navigator.clipboard.writeText(this._decoded.xml)}));if(this.hasAttribute("download"))J.appendChild(this._btn("Download","Download .gui file",()=>this._download()));J.style.display=J.children.length?"flex":"none"}_btn(J,$,Q){let K=document.createElement("button");return K.type="button",K.textContent=J,K.title=$,K.style.cssText=["all:unset;cursor:pointer;font:600 12px/1 system-ui","color:#fff;padding:6px 9px;border-radius:5px"].join(";"),K.addEventListener("pointerenter",()=>K.style.background="rgba(255,255,255,.18)"),K.addEventListener("pointerleave",()=>K.style.background="transparent"),K.addEventListener("click",Q),K}_modeSelect(J){let $=document.createElement("select");$.title=`Mode: ${J}`,$.style.cssText=["all:unset;cursor:pointer;font:600 12px/1 system-ui","color:#fff;padding:6px 9px;border-radius:5px"].join(";");for(let Q of this._modes[J].values){let K=document.createElement("option");if(K.value=Q,K.textContent=Q,K.style.color="#000",Q===this._mode[J])K.selected=!0;$.appendChild(K)}return $.addEventListener("change",()=>{this._mode[J]=$.value,this._render()}),$}_download(){if(!this._decoded)return;let J=uQ(this._decoded.pkg),$=(this.getAttribute("src")?.split("/").pop()||"design.gui").replace(/\.guix$/,".gui"),Q=URL.createObjectURL(new Blob([J],{type:"application/octet-stream"})),K=document.createElement("a");K.href=Q,K.download=$.endsWith(".gui")?$:$+".gui",K.click(),setTimeout(()=>URL.revokeObjectURL(Q),1000)}}function h6(){if(typeof customElements<"u"&&!customElements.get(hQ))customElements.define(hQ,u6)}var fQ=!1;function w9(){if(fQ||typeof window>"u")return;fQ=!0,h6()}export{g6 as switchableAxes,w9 as install,y6 as fetchGui,v6 as detectModes,h6 as defineGuiEmbed,x6 as decodeMarkup,gQ as decodeBytes,u6 as GuiEmbedElement};
1
+ import"@dotgui/render/canvas";import{pack as S}from"@dotgui/kit/package";var P="gui-embed",U=0.25,V=8;class J extends HTMLElement{_stage;_view;_canvas;_bar;_ro=null;_bytes=null;_markup="";_size=null;_scale=1;_x=0;_y=0;_userZoomed=!1;_settle=null;static get observedAttributes(){return["src"]}connectedCallback(){if(!this._stage)this._build();this._load()}disconnectedCallback(){this._ro?.disconnect(),this._ro=null}attributeChangedCallback(j){if(j==="src"&&this._stage)this._load()}get canvas(){return this._canvas}_build(){let j=getComputedStyle(this);if(j.position==="static")this.style.position="relative";if(j.display==="inline")this.style.display="block";this.style.overflow="hidden";let q=document.createElement("div");q.className="gui-embed-canvas";let z=this.getAttribute("grid")!=="false";q.style.cssText=["position:absolute;inset:0;touch-action:none","background-color:var(--gui-embed-bg, #fafaf8)",z?"background-image:radial-gradient(var(--gui-embed-dot, rgba(0,0,0,.14)) 1px, transparent 1.4px);background-size:var(--gui-embed-dot-gap, 18px) var(--gui-embed-dot-gap, 18px);background-position:center":""].filter(Boolean).join(";"),this.appendChild(q),this._stage=q;let B=document.createElement("div");B.style.cssText="position:absolute;left:0;top:0;width:max-content;transform-origin:0 0",q.appendChild(B),this._view=B;let D=document.createElement("gui-canvas");D.addEventListener("render",(H)=>this._rendered(H.detail)),D.addEventListener("error",(H)=>this._fail(H.detail.message)),B.appendChild(D),this._canvas=D,this._bindZoom(),this._ro=new ResizeObserver(()=>{if(!this._userZoomed)this.fit()}),this._ro.observe(this);let F=document.createElement("div");F.className="gui-embed-controls",F.style.cssText=["position:absolute;top:8px;right:8px;z-index:2","display:flex;gap:4px;padding:4px","border-radius:8px;background:rgba(20,20,20,.55)","backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)","opacity:0;transition:opacity .15s ease"].join(";"),this.appendChild(F),this._bar=F,this.addEventListener("pointerenter",()=>F.style.opacity="1"),this.addEventListener("pointerleave",()=>F.style.opacity="0")}async _load(){this._size=null,this._userZoomed=!1,this._canvas.mode={};try{let j=this.getAttribute("src");if(j){let q=await fetch(j);if(!q.ok)throw Error(`gui-embed: failed to fetch "${j}" (${q.status})`);this._bytes=new Uint8Array(await q.arrayBuffer()),this._markup="",await this._canvas.loadBytes(this._bytes)}else{let q=this.querySelector(':scope > script[type="application/gui"]');if(!q){if(document.readyState==="loading")document.addEventListener("DOMContentLoaded",()=>void this._load(),{once:!0});return}this._bytes=null,this._markup=q.textContent??"",await this._canvas.loadMarkup(this._markup)}this._buildControls()}catch(j){this._fail(String(j?.message??j))}}_fail(j){let q=this.querySelector(":scope > .gui-embed-error");if(!q)q=document.createElement("div"),q.className="gui-embed-error",q.style.cssText="position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font:13px system-ui;color:#c00;padding:12px;text-align:center",this.appendChild(q);q.textContent=j}_rendered(j){this.querySelector(":scope > .gui-embed-error")?.remove();let q=!this._size||this._size.width!==j.width||this._size.height!==j.height;if(this._size={width:j.width,height:j.height},!q)return;if(!this._hasHeight())if(this.style.width)this.style.aspectRatio=`${j.width} / ${j.height}`;else this.style.width=`${j.width}px`,this.style.height=`${j.height}px`;if(!this._userZoomed)this.fit()}_hasHeight(){if(this.style.height||this.style.aspectRatio)return!0;let j=getComputedStyle(this);if(j.aspectRatio&&j.aspectRatio!=="auto")return!0;return this.clientHeight>1}fit(){if(!this._size)return;let{width:j,height:q}=this._size,z=this._stage.getBoundingClientRect();if(z.width<1||z.height<1)return;this._scale=Math.min(z.width/j,z.height/q),this._x=(z.width-j*this._scale)/2,this._y=(z.height-q*this._scale)/2,this._userZoomed=!1,this._apply()}zoomBy(j,q,z){if(!this._size)return;let B=this._stage.getBoundingClientRect(),D=Math.min(B.width/this._size.width,B.height/this._size.height),F=Math.min(Math.max(this._scale*j,D*U),D*V),H=q??B.width/2,L=z??B.height/2;this._x=H-(H-this._x)*F/this._scale,this._y=L-(L-this._y)*F/this._scale,this._scale=F,this._userZoomed=!0,this._apply()}_apply(){if(this._view.style.transform=`translate(${this._x}px, ${this._y}px) scale(${this._scale})`,this._settle)clearTimeout(this._settle);this._settle=setTimeout(()=>{let j=Math.min(Math.max(2,Math.ceil((window.devicePixelRatio||1)*this._scale)),4);if(Number(this._canvas.getAttribute("density"))!==j)this._canvas.setAttribute("density",String(j))},150)}_bindZoom(){let j=this._stage,q=()=>this.getAttribute("zoom")!=="false";j.addEventListener("wheel",(D)=>{if(!q()||!(D.ctrlKey||D.metaKey))return;D.preventDefault();let F=j.getBoundingClientRect();this.zoomBy(Math.exp(-D.deltaY*0.01),D.clientX-F.left,D.clientY-F.top)},{passive:!1});let z=null;j.addEventListener("pointerdown",(D)=>{if(!q()||D.button!==0)return;z={id:D.pointerId,x:D.clientX,y:D.clientY},j.setPointerCapture(D.pointerId)}),j.addEventListener("pointermove",(D)=>{if(!z||z.id!==D.pointerId)return;this._x+=D.clientX-z.x,this._y+=D.clientY-z.y,z.x=D.clientX,z.y=D.clientY,this._userZoomed=!0,this._view.style.transform=`translate(${this._x}px, ${this._y}px) scale(${this._scale})`});let B=()=>z=null;j.addEventListener("pointerup",B),j.addEventListener("pointercancel",B),j.addEventListener("dblclick",()=>q()&&this.fit())}_buildControls(){let j=this._bar;if(j.innerHTML="",this.getAttribute("zoom")!=="false")j.appendChild(this._btn("Fit","Reset zoom",()=>this.fit()));let q=this._canvas.modes,z=Object.keys(q).filter((B)=>q[B].values.length>1);if(this.hasAttribute("mode-switch")&&z.length)for(let B of z)j.appendChild(this._modeSelect(B,q[B]));if(this.hasAttribute("copy"))j.appendChild(this._btn("Copy","Copy .gui markup",async()=>{await navigator.clipboard.writeText(this._canvas.source)}));if(this.hasAttribute("download"))j.appendChild(this._btn("Download","Download .gui file",()=>this._download()));j.style.display=j.children.length?"flex":"none"}_btn(j,q,z){let B=document.createElement("button");return B.type="button",B.textContent=j,B.title=q,B.style.cssText=["all:unset;cursor:pointer;font:600 12px/1 system-ui","color:#fff;padding:6px 9px;border-radius:5px"].join(";"),B.addEventListener("pointerenter",()=>B.style.background="rgba(255,255,255,.18)"),B.addEventListener("pointerleave",()=>B.style.background="transparent"),B.addEventListener("click",z),B}_modeSelect(j,q){let z=document.createElement("select");z.title=`Mode: ${j}`,z.style.cssText=["all:unset;cursor:pointer;font:600 12px/1 system-ui","color:#fff;padding:6px 9px;border-radius:5px"].join(";");let B=this._canvas.mode[j]??q.default;for(let D of q.values){let F=document.createElement("option");if(F.value=D,F.textContent=D,F.style.color="#000",D===B)F.selected=!0;z.appendChild(F)}return z.addEventListener("change",()=>this._canvas.setMode(j,z.value)),z}_download(){let j=this._bytes??S({xml:this._markup,assets:{}}),q=(this.getAttribute("src")?.split("/").pop()||"design.gui").replace(/\.guix$/,".gui"),z=URL.createObjectURL(new Blob([j],{type:"application/octet-stream"})),B=document.createElement("a");B.href=z,B.download=q.endsWith(".gui")?q:q+".gui",B.click(),setTimeout(()=>URL.revokeObjectURL(z),1000)}}function K(){if(typeof customElements<"u"&&!customElements.get(P))customElements.define(P,J)}import{GuiCanvas as _,config as A}from"@dotgui/render/canvas";var Q=!1;function C(){if(Q||typeof window>"u")return;Q=!0,K()}export{C as install,K as defineGuiEmbed,A as config,J as GuiEmbedElement,_ as GuiCanvas};