@gramlot/gramlot 0.3.24 → 0.3.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/editors/__init__.py +2 -2
- package/dist/components/editors/assets/collection.js +20 -19
- package/dist/components/editors/assets/index.js +1 -1
- package/dist/components/editors/assets/modules/chunk-74O4WKIV.js +1 -0
- package/dist/components/editors/assets/modules/{code-mirror-engine-QX4A5FVO.js → code-mirror-engine-RWQTR5G5.js} +29 -29
- package/dist/components/editors/assets/modules/{jodit-engine-MMSPIWM7.js → jodit-engine-MTSA4GZ3.js} +292 -292
- package/dist/components/editors/assets/modules/markdown-document-VFC23FAY.js +1 -0
- package/dist/components/editors/assets/modules/{prose-mirror-engine-IXTRTG6B.js → prose-mirror-engine-GMZPJPNN.js} +13 -13
- package/dist/components/grid/__init__.py +3 -2
- package/dist/components/grid/assets/collection.js +68 -17
- package/dist/components/grid/assets/index.js +1 -1
- package/dist/components/grid/grammar.json +57 -1
- package/dist/components/grouplets/__init__.py +2 -2
- package/dist/components/grouplets/assets/collection.js +3 -20
- package/dist/components/grouplets/assets/index.js +1 -1
- package/dist/components/grouplets/assets/modules/chunk-BLMUM44K.js +1 -0
- package/dist/components/grouplets/assets/modules/markdown-document-YWNZTOKK.js +1 -0
- package/dist/components/inputs/__init__.py +1 -1
- package/dist/components/inputs/assets/collection.js +59 -34
- package/dist/components/inputs/assets/index.js +1 -1
- package/dist/components/inputs/grammar.json +64 -0
- package/dist/components/layout/__init__.py +1 -1
- package/dist/components/layout/assets/collection.js +67 -57
- package/dist/components/layout/assets/index.js +1 -1
- package/dist/components/layout/grammar.json +35 -0
- package/dist/components/selection_trial/__init__.py +1 -1
- package/dist/components/selection_trial/assets/collection.js +3 -3
- package/dist/components/selection_trial/assets/index.js +1 -1
- package/dist/components/selection_trial/grammar.json +35 -0
- package/dist/components/tree/__init__.py +1 -1
- package/dist/components/tree/assets/collection.js +26 -23
- package/dist/components/tree/assets/index.js +1 -1
- package/dist/components/tree/grammar.json +341 -1
- package/dist/components/uploads/__init__.py +13 -0
- package/dist/components/uploads/assets/collection.js +67 -0
- package/dist/components/uploads/assets/index.js +3 -0
- package/dist/components/uploads/commands.json +7 -0
- package/dist/components/uploads/grammar.json +789 -0
- package/dist/{components/editors/assets/modules/chunk-OCFLP2K4.js → gramlot-markdown.js} +12 -12
- package/dist/gramlot.js +4910 -566
- package/dist/gramlot.min.js +1587 -43
- package/dist/runtime-notices.json +28 -0
- package/package.json +4 -2
- package/src/binding/grid-struct.js +1 -1
- package/src/binding/providers.js +4 -1
- package/src/binding/remote-resolver.js +1 -8
- package/src/binding/runtime.js +40 -1
- package/src/binding/validation-context.js +40 -0
- package/src/browser-camera-provider.d.ts +8 -0
- package/src/browser-camera-provider.js +104 -0
- package/src/builder/source.js +13 -2
- package/src/components/attachment-manager.js +160 -0
- package/src/components/bases.js +17 -6
- package/src/components/border-container.js +86 -8
- package/src/components/buttons.js +11 -1
- package/src/components/choice-editor.js +20 -7
- package/src/components/database-choices.js +4 -2
- package/src/components/editing-status-styles.js +26 -0
- package/src/components/editing-status.js +115 -0
- package/src/components/field-state.js +37 -58
- package/src/components/grid-cell-editor.js +181 -0
- package/src/components/grid-grammar.json +21 -0
- package/src/components/grid-structure.js +2 -1
- package/src/components/grid-styles.js +51 -1
- package/src/components/grid.js +87 -10
- package/src/components/grouplet-card.js +11 -3
- package/src/components/html-preview.js +17 -4
- package/src/components/image-crop-dialog.js +272 -0
- package/src/components/image-crop.js +79 -0
- package/src/components/image-uploader.js +252 -0
- package/src/components/inputs.js +2 -1
- package/src/components/jodit-engine.js +1 -1
- package/src/components/markdown-document.js +2 -2
- package/src/components/screen-capture.js +43 -0
- package/src/components/selected-container.js +6 -2
- package/src/components/tree.js +416 -17
- package/src/components/typed-editor.js +19 -9
- package/src/components/upload-engine.js +156 -0
- package/src/components/uploader.js +208 -0
- package/src/components/uploads.js +7 -0
- package/src/editing-session.d.ts +25 -0
- package/src/editing-session.js +396 -0
- package/src/experiments/selection-trial.js +18 -2
- package/src/format.js +22 -7
- package/src/gramlot.d.ts +2 -0
- package/src/gramlot.js +2 -1
- package/src/handlers/device-handler.d.ts +2 -1
- package/src/handlers/rpc-handler.d.ts +3 -3
- package/src/index-page-styles.js +1 -0
- package/src/index.d.ts +13 -0
- package/src/index.js +13 -0
- package/src/inout.d.ts +2 -0
- package/src/inout.js +6 -0
- package/src/markdown-loader.d.ts +1 -0
- package/src/markdown-loader.js +4 -0
- package/src/markdown.d.ts +1 -0
- package/src/markdown.js +2 -0
- package/src/media-frame.js +9 -0
- package/src/renderer/attributes.js +7 -1
- package/src/renderer/gramlot-renderer.d.ts +2 -0
- package/src/renderer/gramlot-renderer.js +31 -2
- package/src/server/assets.d.ts +1 -1
- package/src/server/assets.js +1 -1
- package/src/server/gramlot-server.d.ts +8 -1
- package/src/server/gramlot-server.js +83 -7
- package/src/server/index.d.ts +2 -0
- package/src/server/index.js +2 -0
- package/src/server/page-base.js +17 -4
- package/src/server/page.d.ts +13 -1
- package/src/server/page.js +6 -0
- package/src/server/source-import.d.ts +2 -0
- package/src/server/source-import.js +31 -0
- package/src/server/upload.d.ts +20 -0
- package/src/server/upload.js +142 -0
- package/src/server/visual-editor.d.ts +11 -0
- package/src/server/visual-editor.js +149 -0
- package/src/source-picker.d.ts +9 -0
- package/src/source-picker.js +57 -0
- package/src/tree-store.d.ts +24 -0
- package/src/tree-store.js +193 -0
- package/src/validation-run.js +50 -0
- package/src/view/button.js +8 -5
- package/src/view/controls.js +9 -42
- package/src/view/html.js +10 -2
- package/src/visual-editor-icons.js +10 -0
- package/src/visual-editor.d.ts +56 -0
- package/src/visual-editor.js +844 -0
- package/themes/gramlot-base/theme.css +99 -0
- package/dist/components/editors/assets/modules/chunk-MMJXUHRQ.js +0 -3
- package/src/form-state.d.ts +0 -20
- package/src/form-state.js +0 -198
|
@@ -1,49 +1,50 @@
|
|
|
1
|
-
import{c as ii}from"./modules/chunk-OCFLP2K4.js";import"./modules/chunk-MMJXUHRQ.js";import{b as Ge,c as ni,d as qr,e as ai}from"./modules/chunk-AU4HFPIY.js";var mt=Ge(se=>{"use strict";function Eu(t,e,r){if(r===void 0&&(r=Array.prototype),t&&typeof r.find=="function")return r.find.call(t,e);for(var n=0;n<t.length;n++)if(ht(t,n)){var a=t[n];if(e.call(void 0,a,n,t))return a}}function Tt(t,e){return e===void 0&&(e=Object),e&&typeof e.getOwnPropertyDescriptors=="function"&&(t=e.create(null,e.getOwnPropertyDescriptors(t))),e&&typeof e.freeze=="function"?e.freeze(t):t}function ht(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function xu(t,e){if(t===null||typeof t!="object")throw new TypeError("target is not an object");for(var r in e)ht(e,r)&&(t[r]=e[r]);return t}var ji=Tt({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 Du(t){return ht(ji,t.toLowerCase())}var Vi=Tt({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 Au(t){return ht(Vi,t.toLowerCase())}var ir=Tt({script:!1,style:!1,textarea:!0,title:!0});function Tu(t){var e=t.toLowerCase();return ht(ir,e)&&!ir[e]}function Cu(t){var e=t.toLowerCase();return ht(ir,e)&&ir[e]}function zi(t){return t===sr.HTML}function Nu(t){return zi(t)||t===sr.XML_XHTML_APPLICATION}var sr=Tt({HTML:"text/html",XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),Su=Object.keys(sr).map(function(t){return sr[t]});function Ou(t){return Su.indexOf(t)>-1}var Bu=Tt({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/"});se.assign=xu;se.find=Eu;se.freeze=Tt;se.HTML_BOOLEAN_ATTRIBUTES=ji;se.HTML_RAW_TEXT_ELEMENTS=ir;se.HTML_VOID_ELEMENTS=Vi;se.hasDefaultHTMLNamespace=Nu;se.hasOwn=ht;se.isHTMLBooleanAttribute=Du;se.isHTMLRawTextElement=Tu;se.isHTMLEscapableRawTextElement=Cu;se.isHTMLMimeType=zi;se.isHTMLVoidElement=Au;se.isValidMimeType=Ou;se.MIME_TYPE=sr;se.NAMESPACE=Bu});var dr=Ge(cr=>{"use strict";var Iu=mt();function Wi(t,e){t.prototype=Object.create(Error.prototype,{constructor:{value:t},name:{value:t.name,enumerable:!0,writable:e}})}var lr=Iu.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"}),Gi=Object.keys(lr);function Xi(t){return typeof t=="number"&&t>=1&&t<=25}function Mu(t){return typeof t=="string"&&t.substring(t.length-lr.Error.length)===lr.Error}function ur(t,e){Xi(t)?(this.name=Gi[t],this.message=e||""):(this.message=t,this.name=Mu(e)?e:lr.Error),Error.captureStackTrace&&Error.captureStackTrace(this,ur)}Wi(ur,!0);Object.defineProperties(ur.prototype,{code:{enumerable:!0,get:function(){var t=Gi.indexOf(this.name);return Xi(t)?t:0}}});var Yi={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},aa=Object.entries(Yi);for(or=0;or<aa.length;or++)Hi=aa[or][0],ur[Hi]=aa[or][1];var Hi,or;function ia(t,e,r){this.message=t,this.locator=e,this.cause=r,Error.captureStackTrace&&Error.captureStackTrace(this,ia)}Wi(ia);cr.DOMException=ur;cr.DOMExceptionName=lr;cr.ExceptionCode=Yi;cr.ParseError=ia});var fa=Ge(C=>{"use strict";function ts(t){try{typeof t!="function"&&(t=RegExp);var e=new t("\u{1D306}","u").exec("\u{1D306}");return!!e&&e[0].length===2}catch{}return!1}var St=ts();function rt(t){if(t.source[0]!=="[")throw new Error(t+" can not be used with chars");return t.source.slice(1,t.source.lastIndexOf("]"))}function Ct(t,e){if(t.source[0]!=="[")throw new Error("/"+t.source+"/ can not be used with chars_without");if(!e||typeof e!="string")throw new Error(JSON.stringify(e)+" is not a valid search");if(t.source.indexOf(e)===-1)throw new Error('"'+e+'" is not is /'+t.source+"/");if(e==="-"&&t.source.indexOf(e)!==1)throw new Error('"'+e+'" is not at the first postion of /'+t.source+"/");return new RegExp(t.source.replace(e,""),St?"u":"")}function O(t){var e=this;return new RegExp(Array.prototype.slice.call(arguments).map(function(r){var n=typeof r=="string";if(n&&e===void 0&&r==="|")throw new Error("use regg instead of reg to wrap expressions with `|`!");return n?r:r.source}).join(""),St?"u":"")}function A(t){if(arguments.length===0)throw new Error("no parameters provided");return O.apply(A,["(?:"].concat(Array.prototype.slice.call(arguments),[")"]))}var Ru="\uFFFD",nt=/[-\x09\x0A\x0D\x20-\x2C\x2E-\uD7FF\uE000-\uFFFD]/;St&&(nt=O("[",rt(nt),"\\u{10000}-\\u{10FFFF}","]"));var Lu=new RegExp("[^"+rt(nt)+"]",St?"u":""),an=/[\x20\x09\x0D\x0A]/,Pu=rt(an),$=O(an,"+"),q=O(an,"*"),fr=/[:_a-zA-Z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;St&&(fr=O("[",rt(fr),"\\u{10000}-\\u{10FFFF}","]"));var $u=rt(fr),la=O("[",$u,rt(/[-.0-9\xB7]/),rt(/[\u0300-\u036F\u203F-\u2040]/),"]"),_e=O(fr,la,"*"),Fu=O("^",_e,"$"),Zi=O(la,"+"),Uu=O("&",_e,";"),qu=A(/&#[0-9]+;|&#x[0-9a-fA-F]+;/),pr=A(Uu,"|",qu),hr=O("%",_e,";"),ua=A(O('"',A(/[^%&"]/,"|",hr,"|",pr),"*",'"'),"|",O("'",A(/[^%&']/,"|",hr,"|",pr),"*","'")),ju=A('"',A(/[^<&"]/,"|",pr),"*",'"',"|","'",A(/[^<&']/,"|",pr),"*","'"),Vu=Ct(fr,":"),zu=Ct(la,":"),sa=O(Vu,zu,"*"),Hu=O("^",sa,"$"),mr=O(sa,A(":",sa),"?"),Wu=O("^",mr,"$"),Gu=O("(",mr,")"),Nt=A(/"[^"]*"|'[^']*'/),Xu=O(/^<\?/,"(",_e,")",A($,"(?!",an,")(",nt,"*?)"),"?",/\?>/),Ji=/[\x20\x0D\x0Aa-zA-Z0-9-'()+,./:=?;!*#@$_%]/,gr=A('"',Ji,'*"',"|","'",Ct(Ji,"'"),"*'"),rs="<!--",ns="-->",Yu=O(rs,A(Ct(nt,"-"),"|",O("-",Ct(nt,"-"))),"*",ns),Ki="#PCDATA",Zu=A(O(/\(/,q,Ki,A(q,/\|/,q,mr),"*",q,/\)\*/),"|",O(/\(/,q,Ki,q,/\)/)),Ju=/[?*+]?/,Ku=O(/\([^>]+\)/,Ju),Qu=A("EMPTY","|","ANY","|",Zu,"|",Ku),ec="<!ELEMENT",tc=O(ec,$,A(mr,"|",hr),$,A(Qu,"|",hr),q,">"),rc=O("NOTATION",$,/\(/,q,_e,A(q,/\|/,q,_e),"*",q,/\)/),nc=O(/\(/,q,Zi,A(q,/\|/,q,Zi),"*",q,/\)/),ac=A(rc,"|",nc),ic=A(/CDATA|ID|IDREF|IDREFS|ENTITY|ENTITIES|NMTOKEN|NMTOKENS/,"|",ac),sc=A(/#REQUIRED|#IMPLIED/,"|",A(A("#FIXED",$),"?",ju)),oc=A($,_e,$,ic,$,sc),lc="<!ATTLIST",uc=O(lc,$,_e,oc,"*",q,">"),oa="about:legacy-compat",cc=A('"'+oa+'"',"|","'"+oa+"'"),ca="SYSTEM",sn="PUBLIC",on=A(A(ca,$,Nt),"|",A(sn,$,gr,$,Nt)),dc=O("^",A(A(ca,$,"(?<SystemLiteralOnly>",Nt,")"),"|",A(sn,$,"(?<PubidLiteral>",gr,")",$,"(?<SystemLiteral>",Nt,")"))),fc=O("^",gr,"$"),pc=O("^",Nt,"$"),hc=A($,"NDATA",$,_e),mc=A(ua,"|",A(on,hc,"?")),as="<!ENTITY",gc=O(as,$,_e,$,mc,q,">"),_c=A(ua,"|",on),bc=O(as,$,"%",$,_e,$,_c,q,">"),wc=A(gc,"|",bc),yc=O(sn,$,gr),vc=O("<!NOTATION",$,_e,$,A(on,"|",yc),q,">"),da=O(q,"=",q),Qi=/1[.]\d+/,kc=O($,"version",da,A("'",Qi,"'","|",'"',Qi,'"')),es=/[A-Za-z][-A-Za-z0-9._]*/,Ec=A($,"encoding",da,A('"',es,'"',"|","'",es,"'")),xc=A($,"standalone",da,A("'",A("yes","|","no"),"'","|",'"',A("yes","|","no"),'"')),Dc=O(/^<\?xml/,kc,Ec,"?",xc,"?",q,/\?>/),Ac="<!DOCTYPE",Tc="<![CDATA[",Cc="]]>",Nc=/<!\[CDATA\[/,Sc=/\]\]>/,Oc=O(nt,"*?",Sc),Bc=O(Nc,Oc);C.chars=rt;C.chars_without=Ct;C.detectUnicodeSupport=ts;C.reg=O;C.regg=A;C.ABOUT_LEGACY_COMPAT=oa;C.ABOUT_LEGACY_COMPAT_SystemLiteral=cc;C.AttlistDecl=uc;C.CDATA_START=Tc;C.CDATA_END=Cc;C.CDSect=Bc;C.Char=nt;C.Comment=Yu;C.COMMENT_START=rs;C.COMMENT_END=ns;C.DOCTYPE_DECL_START=Ac;C.elementdecl=tc;C.EntityDecl=wc;C.EntityValue=ua;C.ExternalID=on;C.ExternalID_match=dc;C.Name=_e;C.Name_exact=Fu;C.NCName_exact=Hu;C.NotationDecl=vc;C.Reference=pr;C.PEReference=hr;C.PI=Xu;C.PUBLIC=sn;C.PubidLiteral=gr;C.PubidLiteral_match=fc;C.QName=mr;C.QName_exact=Wu;C.QName_group=Gu;C.S=$;C.SChar_s=Pu;C.S_OPT=q;C.SYSTEM=ca;C.SystemLiteral=Nt;C.SystemLiteral_match=pc;C.InvalidChar=Lu;C.UNICODE_REPLACEMENT_CHARACTER=Ru;C.UNICODE_SUPPORT=St;C.XMLDecl=Dc});var ka=Ge(z=>{"use strict";var ke=mt(),Be=ke.find,Ic=ke.hasDefaultHTMLNamespace,Bt=ke.hasOwn,Mc=ke.isHTMLMimeType,Rc=ke.isHTMLRawTextElement,Lc=ke.isHTMLVoidElement,_r=ke.MIME_TYPE,Ie=ke.NAMESPACE,fe=Symbol(),ds=dr(),y=ds.DOMException,ce=ds.DOMExceptionName,V=fa();function he(t){if(t!==fe)throw new TypeError("Illegal constructor")}function Pc(t){return t!==""}function $c(t){return t?t.split(/[\t\n\f\r ]+/).filter(Pc):[]}function Fc(t,e){return Bt(t,e)||(t[e]=!0),t}function is(t){if(!t)return[];var e=$c(t);return Object.keys(e.reduce(Fc,{}))}function Uc(t){return function(e){return t&&t.indexOf(e)!==-1}}function fs(t){if(!V.QName_exact.test(t))throw new y(y.INVALID_CHARACTER_ERR,'invalid character in qualified name "'+t+'"')}function ha(t,e){fs(e),t=t||null;var r=null,n=e;if(e.indexOf(":")>=0){var a=e.split(":");r=a[0],n=a[1]}if(r!==null&&t===null)throw new y(y.NAMESPACE_ERR,"prefix is non-null and namespace is null");if(r==="xml"&&t!==ke.NAMESPACE.XML)throw new y(y.NAMESPACE_ERR,'prefix is "xml" and namespace is not the XML namespace');if((r==="xmlns"||e==="xmlns")&&t!==ke.NAMESPACE.XMLNS)throw new y(y.NAMESPACE_ERR,'either qualifiedName or prefix is "xmlns" and namespace is not the XMLNS namespace');if(t===ke.NAMESPACE.XMLNS&&r!=="xmlns"&&e!=="xmlns")throw new y(y.NAMESPACE_ERR,'namespace is the XMLNS namespace and neither qualifiedName nor prefix is "xmlns"');return[t,r,n]}function Rt(t,e){for(var r in t)Bt(t,r)&&(e[r]=t[r])}function me(t,e){var r=t.prototype;if(!(r instanceof e)){let n=function(){};n.prototype=e.prototype,n=new n,Rt(r,n),t.prototype=r=n}r.constructor!=t&&(typeof t!="function"&&console.error("unknown Class:"+t),r.constructor=t)}var ge={},ve=ge.ELEMENT_NODE=1,It=ge.ATTRIBUTE_NODE=2,br=ge.TEXT_NODE=3,ps=ge.CDATA_SECTION_NODE=4,hs=ge.ENTITY_REFERENCE_NODE=5,qc=ge.ENTITY_NODE=6,ma=ge.PROCESSING_INSTRUCTION_NODE=7,ga=ge.COMMENT_NODE=8,Ot=ge.DOCUMENT_NODE=9,ms=ge.DOCUMENT_TYPE_NODE=10,at=ge.DOCUMENT_FRAGMENT_NODE=11,jc=ge.NOTATION_NODE=12,j=ke.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 gs(t,e){if(e.length<t.length)return gs(e,t);var r=null;for(var n in t){if(t[n]!==e[n])return r;r=t[n]}return r}function ss(t){return t.guid||(t.guid=Math.random()),t.guid}function K(){}K.prototype={length:0,item:function(t){return t>=0&&t<this.length?this[t]:null},toString:function(t){var e;typeof t=="function"?e={requireWellFormed:!1,splitCDATASections:!0,nodeFilter:t}:t?e={requireWellFormed:!!t.requireWellFormed,splitCDATASections:t.splitCDATASections!==!1,nodeFilter:t.nodeFilter||null}:e={requireWellFormed:!1,splitCDATASections:!0,nodeFilter:null};for(var r=[],n=0;n<this.length;n++)va(this[n],r,null,e);return r.join("")},filter:function(t){return Array.prototype.filter.call(this,t)},indexOf:function(t){return Array.prototype.indexOf.call(this,t)}};K.prototype[Symbol.iterator]=function(){var t=this,e=0;return{next:function(){return e<t.length?{value:t[e++],done:!1}:{done:!0}},return:function(){return{done:!0}}}};function Oe(t,e){this._node=t,this._refresh=e,dn(this)}function dn(t){var e=t._node._inc||t._node.ownerDocument._inc;if(t._inc!==e){var r=t._refresh(t._node);if(Ts(t,"length",r.length),!t.$$length||r.length<t.$$length)for(var n=r.length;n in t;n++)Bt(t,n)&&delete t[n];Rt(r,t),t._inc=e}}Oe.prototype.item=function(t){return dn(this),this[t]||null};me(Oe,K);function Mt(){this._nsIndex=Object.create(null),this._noNsIndex=Object.create(null)}function _s(t,e){for(var r=0;r<t.length;){if(t[r]===e)return r;r++}}function _a(t,e,r){if(!e)return t._noNsIndex;var n=t._nsIndex[e];return!n&&r&&(n=t._nsIndex[e]=Object.create(null)),n}function Vc(t,e,r){var n=_a(t,e,!1),a=n&&n[r];return a||null}function zc(t,e){_a(t,e.namespaceURI,!0)[e.localName]=e}function Hc(t,e){var r=_a(t,e.namespaceURI,!1);r&&delete r[e.localName]}function Wc(t,e,r,n){if(n?e[_s(e,n)]=r:(e[e.length]=r,e.length++),zc(e,r),t){r.ownerElement=t;var a=t.ownerDocument;a&&(n&&ys(a,t,n),Gc(a,t,r))}}function os(t,e,r){var n=_s(e,r);if(n>=0){for(var a=e.length-1;n<=a;)e[n]=e[++n];if(e.length=a,Hc(e,r),t){var i=t.ownerDocument;i&&ys(i,t,r),r.ownerElement=null}}}Mt.prototype={length:0,item:K.prototype.item,getNamedItem:function(t){this._ownerElement&&this._ownerElement._isInHTMLDocumentAndNamespace()&&(t=t.toLowerCase());for(var e=0;e<this.length;){var r=this[e];if(r.nodeName===t)return r;e++}return null},setNamedItem:function(t){var e=t.ownerElement;if(e&&e!==this._ownerElement)throw new y(y.INUSE_ATTRIBUTE_ERR);var r=Vc(this,t.namespaceURI,t.localName);return r===t?t:(Wc(this._ownerElement,this,t,r),r)},setNamedItemNS:function(t){return this.setNamedItem(t)},removeNamedItem:function(t){var e=this.getNamedItem(t);if(!e)throw new y(y.NOT_FOUND_ERR,t);return os(this._ownerElement,this,e),e},removeNamedItemNS:function(t,e){var r=this.getNamedItemNS(t,e);if(!r)throw new y(y.NOT_FOUND_ERR,t?t+" : "+e:e);return os(this._ownerElement,this,r),r},getNamedItemNS:function(t,e){t||(t=null);for(var r=0;r<this.length;){var n=this[r];if(n.localName===e&&n.namespaceURI===t)return n;r++}return null}};Mt.prototype[Symbol.iterator]=function(){var t=this,e=0;return{next:function(){return e<t.length?{value:t[e++],done:!1}:{done:!0}},return:function(){return{done:!0}}}};function bs(){}bs.prototype={hasFeature:function(t,e){return!0},createDocument:function(t,e,r){var n=_r.XML_APPLICATION;t===Ie.HTML?n=_r.XML_XHTML_APPLICATION:t===Ie.SVG&&(n=_r.XML_SVG_IMAGE);var a=new Ue(fe,{contentType:n});if(a.implementation=this,a.childNodes=new K,a.doctype=r||null,r&&a.appendChild(r),e){var i=a.createElementNS(t,e);a.appendChild(i)}return a},createDocumentType:function(t,e,r,n){fs(t);var a=new hn(fe);return a.name=t,a.nodeName=t,a.publicId=e||"",a.systemId=r||"",a.internalSubset=n||"",a.childNodes=new K,a},createHTMLDocument:function(t){var e=new Ue(fe,{contentType:_r.HTML});if(e.implementation=this,e.childNodes=new K,t!==!1){e.doctype=this.createDocumentType("html"),e.doctype.ownerDocument=e,e.appendChild(e.doctype);var r=e.createElement("html");e.appendChild(r);var n=e.createElement("head");if(r.appendChild(n),typeof t=="string"){var a=e.createElement("title");a.appendChild(e.createTextNode(t)),n.appendChild(a)}r.appendChild(e.createElement("body"))}return e}};function I(t){he(t)}I.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 t=this.getRootNode();return t&&t.nodeType===t.DOCUMENT_NODE},contains:function(t){if(!t)return!1;var e=t;do{if(this===e)return!0;e=e.parentNode}while(e);return!1},getRootNode:function(t){var e=this;do{if(!e.parentNode)return e;e=e.parentNode}while(e)},isEqualNode:function(t){if(!t)return!1;for(var e=[{node:this,other:t}];e.length>0;){var r=e.pop(),n=r.node,a=r.other;if(n.nodeType!==a.nodeType)return!1;switch(n.nodeType){case n.DOCUMENT_TYPE_NODE:if(n.name!==a.name||n.publicId!==a.publicId||n.systemId!==a.systemId)return!1;break;case n.ELEMENT_NODE:if(n.namespaceURI!==a.namespaceURI||n.prefix!==a.prefix||n.localName!==a.localName||n.attributes.length!==a.attributes.length)return!1;for(var i=0;i<n.attributes.length;i++){var s=n.attributes.item(i),o=a.getAttributeNodeNS(s.namespaceURI,s.localName);if(!o)return!1;e.push({node:s,other:o})}break;case n.ATTRIBUTE_NODE:if(n.namespaceURI!==a.namespaceURI||n.localName!==a.localName||n.value!==a.value)return!1;break;case n.PROCESSING_INSTRUCTION_NODE:if(n.target!==a.target||n.data!==a.data)return!1;break;case n.TEXT_NODE:case n.CDATA_SECTION_NODE:case n.COMMENT_NODE:if(n.data!==a.data)return!1;break}if(n.childNodes.length!==a.childNodes.length)return!1;for(var i=n.childNodes.length-1;i>=0;i--)e.push({node:n.childNodes[i],other:a.childNodes[i]})}return!0},isSameNode:function(t){return this===t},insertBefore:function(t,e){return cn(this,t,e)},replaceChild:function(t,e){cn(this,t,e,Es),e&&this.removeChild(e)},removeChild:function(t){return vs(this,t)},appendChild:function(t){return this.insertBefore(t,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(t){return As(this.ownerDocument||this,this,t)},normalize:function(){oe(this,null,{enter:function(t){for(var e=t.firstChild;e;){var r=e.nextSibling;if(r!==null&&r.nodeType===br&&e.nodeType===br){for(var n=[],a=r;a!==null&&a.nodeType===br;)n.push(a.data),a=a.nextSibling;for(var i=e.nextSibling;i!==a;){var s=i.nextSibling;i.parentNode=null,i.previousSibling=null,i.nextSibling=null,i=s}e.nextSibling=a,a!==null?a.previousSibling=e:t.lastChild=e,e.appendData(n.join("")),ba(t.ownerDocument,t),e=a}else e=r}return!0}})},isSupported:function(t,e){return this.ownerDocument.implementation.hasFeature(t,e)},lookupPrefix:function(t){for(var e=this;e;){var r=e._nsMap;if(r){for(var n in r)if(Bt(r,n)&&r[n]===t)return n}e=e.nodeType==It?e.ownerDocument:e.parentNode}return null},lookupNamespaceURI:function(t){for(var e=this;e;){var r=e._nsMap;if(r&&Bt(r,t))return r[t];e=e.nodeType==It?e.ownerDocument:e.parentNode}return null},isDefaultNamespace:function(t){var e=this.lookupPrefix(t);return e==null},compareDocumentPosition:function(t){if(this===t)return 0;var e=t,r=this,n=null,a=null;if(e instanceof gt&&(n=e,e=n.ownerElement),r instanceof gt&&(a=r,r=a.ownerElement,n&&e&&r===e))for(var i=0,s;s=r.attributes[i];i++){if(s===n)return j.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+j.DOCUMENT_POSITION_PRECEDING;if(s===a)return j.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+j.DOCUMENT_POSITION_FOLLOWING}if(!e||!r||r.ownerDocument!==e.ownerDocument)return j.DOCUMENT_POSITION_DISCONNECTED+j.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+(ss(r.ownerDocument)>ss(e.ownerDocument)?j.DOCUMENT_POSITION_FOLLOWING:j.DOCUMENT_POSITION_PRECEDING);if(a&&e===r)return j.DOCUMENT_POSITION_CONTAINS+j.DOCUMENT_POSITION_PRECEDING;if(n&&e===r)return j.DOCUMENT_POSITION_CONTAINED_BY+j.DOCUMENT_POSITION_FOLLOWING;for(var o=[],u=e.parentNode;u;){if(!a&&u===r)return j.DOCUMENT_POSITION_CONTAINED_BY+j.DOCUMENT_POSITION_FOLLOWING;o.push(u),u=u.parentNode}o.reverse();for(var l=[],c=r.parentNode;c;){if(!n&&c===e)return j.DOCUMENT_POSITION_CONTAINS+j.DOCUMENT_POSITION_PRECEDING;l.push(c),c=c.parentNode}l.reverse();var d=gs(o,l);for(var f in d.childNodes){var p=d.childNodes[f];if(p===r)return j.DOCUMENT_POSITION_FOLLOWING;if(p===e)return j.DOCUMENT_POSITION_PRECEDING;if(l.indexOf(p)>=0)return j.DOCUMENT_POSITION_FOLLOWING;if(o.indexOf(p)>=0)return j.DOCUMENT_POSITION_PRECEDING}return 0}};function ws(t){return t=="<"&&"<"||t==">"&&">"||t=="&"&&"&"||t=='"'&&"""||"&#"+t.charCodeAt()+";"}Rt(ge,I);Rt(ge,I.prototype);Rt(j,I);Rt(j,I.prototype);function un(t,e){oe(t,null,{enter:function(r){return e(r)?oe.STOP:!0}})}function oe(t,e,r){for(var n=[{node:t,context:e,phase:oe.ENTER}];n.length>0;){var a=n.pop();if(a.phase===oe.ENTER){var i=r.enter(a.node,a.context);if(i===oe.STOP)return oe.STOP;if(n.push({node:a.node,context:i,phase:oe.EXIT}),i==null)continue;for(var s=a.node.lastChild;s;)n.push({node:s,context:i,phase:oe.ENTER}),s=s.previousSibling}else r.exit&&r.exit(a.node,a.context)}}oe.STOP=Symbol("walkDOM.STOP");oe.ENTER=0;oe.EXIT=1;function Ue(t,e){he(t);var r=e||{};this.ownerDocument=this,this.contentType=r.contentType||_r.XML_APPLICATION,this.type=Mc(this.contentType)?"html":"xml"}function Gc(t,e,r){t&&t._inc++;var n=r.namespaceURI;n===Ie.XMLNS&&(e._nsMap[r.prefix?r.localName:""]=r.value)}function ys(t,e,r,n){t&&t._inc++;var a=r.namespaceURI;a===Ie.XMLNS&&delete e._nsMap[r.prefix?r.localName:""]}function ba(t,e,r){if(t&&t._inc){t._inc++;var n=e.childNodes;if(r&&!r.nextSibling)n[n.length++]=r;else{for(var a=e.firstChild,i=0;a;)n[i++]=a,a=a.nextSibling;n.length=i,delete n[n.length]}}}function vs(t,e){if(t!==e.parentNode)throw new y(y.NOT_FOUND_ERR,"child's parent is not parent");var r=e.previousSibling,n=e.nextSibling;return r?r.nextSibling=n:t.firstChild=n,n?n.previousSibling=r:t.lastChild=r,ba(t.ownerDocument,t),e.parentNode=null,e.previousSibling=null,e.nextSibling=null,e}function Xc(t){return t&&(t.nodeType===I.DOCUMENT_NODE||t.nodeType===I.DOCUMENT_FRAGMENT_NODE||t.nodeType===I.ELEMENT_NODE)}function Yc(t){return t&&(t.nodeType===I.CDATA_SECTION_NODE||t.nodeType===I.COMMENT_NODE||t.nodeType===I.DOCUMENT_FRAGMENT_NODE||t.nodeType===I.DOCUMENT_TYPE_NODE||t.nodeType===I.ELEMENT_NODE||t.nodeType===I.PROCESSING_INSTRUCTION_NODE||t.nodeType===I.TEXT_NODE)}function it(t){return t&&t.nodeType===I.DOCUMENT_TYPE_NODE}function Fe(t){return t&&t.nodeType===I.ELEMENT_NODE}function ks(t){return t&&t.nodeType===I.TEXT_NODE}function ls(t,e){var r=t.childNodes||[];if(Be(r,Fe)||it(e))return!1;var n=Be(r,it);return!(e&&n&&r.indexOf(n)>r.indexOf(e))}function us(t,e){var r=t.childNodes||[];function n(i){return Fe(i)&&i!==e}if(Be(r,n))return!1;var a=Be(r,it);return!(e&&a&&r.indexOf(a)>r.indexOf(e))}function Zc(t,e,r){if(!Xc(t))throw new y(y.HIERARCHY_REQUEST_ERR,"Unexpected parent node type "+t.nodeType);if(r&&r.parentNode!==t)throw new y(y.NOT_FOUND_ERR,"child not in parent");if(!Yc(e)||it(e)&&t.nodeType!==I.DOCUMENT_NODE)throw new y(y.HIERARCHY_REQUEST_ERR,"Unexpected node type "+e.nodeType+" for parent node type "+t.nodeType)}function Jc(t,e,r){var n=t.childNodes||[],a=e.childNodes||[];if(e.nodeType===I.DOCUMENT_FRAGMENT_NODE){var i=a.filter(Fe);if(i.length>1||Be(a,ks))throw new y(y.HIERARCHY_REQUEST_ERR,"More than one element or text in fragment");if(i.length===1&&!ls(t,r))throw new y(y.HIERARCHY_REQUEST_ERR,"Element in fragment can not be inserted before doctype")}if(Fe(e)&&!ls(t,r))throw new y(y.HIERARCHY_REQUEST_ERR,"Only one element can be added and only after doctype");if(it(e)){if(Be(n,it))throw new y(y.HIERARCHY_REQUEST_ERR,"Only one doctype is allowed");var s=Be(n,Fe);if(r&&n.indexOf(s)<n.indexOf(r))throw new y(y.HIERARCHY_REQUEST_ERR,"Doctype can only be inserted before an element");if(!r&&s)throw new y(y.HIERARCHY_REQUEST_ERR,"Doctype can not be appended since element is present")}}function Es(t,e,r){var n=t.childNodes||[],a=e.childNodes||[];if(e.nodeType===I.DOCUMENT_FRAGMENT_NODE){var i=a.filter(Fe);if(i.length>1||Be(a,ks))throw new y(y.HIERARCHY_REQUEST_ERR,"More than one element or text in fragment");if(i.length===1&&!us(t,r))throw new y(y.HIERARCHY_REQUEST_ERR,"Element in fragment can not be inserted before doctype")}if(Fe(e)&&!us(t,r))throw new y(y.HIERARCHY_REQUEST_ERR,"Only one element can be added and only after doctype");if(it(e)){if(Be(n,function(u){return it(u)&&u!==r}))throw new y(y.HIERARCHY_REQUEST_ERR,"Only one doctype is allowed");var s=Be(n,Fe);if(r&&n.indexOf(s)<n.indexOf(r))throw new y(y.HIERARCHY_REQUEST_ERR,"Doctype can only be inserted before an element")}}function cn(t,e,r,n){Zc(t,e,r),t.nodeType===I.DOCUMENT_NODE&&(n||Jc)(t,e,r);var a=e.parentNode;if(a&&a.removeChild(e),e.nodeType===at){var i=e.firstChild;if(i==null)return e;var s=e.lastChild}else i=s=e;var o=r?r.previousSibling:t.lastChild;i.previousSibling=o,s.nextSibling=r,o?o.nextSibling=i:t.firstChild=i,r==null?t.lastChild=s:r.previousSibling=s;do i.parentNode=t;while(i!==s&&(i=i.nextSibling));return ba(t.ownerDocument||t,t,e),e.nodeType==at&&(e.firstChild=e.lastChild=null),e}Ue.prototype={implementation:null,nodeName:"#document",nodeType:Ot,doctype:null,documentElement:null,_inc:1,insertBefore:function(t,e){if(t.nodeType===at){for(var r=t.firstChild;r;){var n=r.nextSibling;this.insertBefore(r,e),r=n}return t}return cn(this,t,e),t.ownerDocument=this,this.documentElement===null&&t.nodeType===ve&&(this.documentElement=t),t},removeChild:function(t){var e=vs(this,t);return e===this.documentElement&&(this.documentElement=null),e},replaceChild:function(t,e){cn(this,t,e,Es),t.ownerDocument=this,e&&this.removeChild(e),Fe(t)&&(this.documentElement=t)},importNode:function(t,e){return Kc(this,t,e)},getElementById:function(t){var e=null;return un(this.documentElement,function(r){if(r.nodeType==ve&&r.getAttribute("id")==t)return e=r,!0}),e},createElement:function(t){var e=new qe(fe);e.ownerDocument=this,this.type==="html"&&(t=t.toLowerCase()),Ic(this.contentType)&&(e.namespaceURI=Ie.HTML),e.nodeName=t,e.tagName=t,e.localName=t,e.childNodes=new K;var r=e.attributes=new Mt;return r._ownerElement=e,e},createDocumentFragment:function(){var t=new Lt(fe);return t.ownerDocument=this,t.childNodes=new K,t},createTextNode:function(t){var e=new wr(fe);return e.ownerDocument=this,e.childNodes=new K,e.appendData(t),e},createComment:function(t){var e=new fn(fe);return e.ownerDocument=this,e.childNodes=new K,e.appendData(t),e},createCDATASection:function(t){if(t.indexOf("]]>")!==-1)throw new y(y.INVALID_CHARACTER_ERR,'data contains "]]>"');var e=new pn(fe);return e.ownerDocument=this,e.childNodes=new K,e.appendData(t),e},createProcessingInstruction:function(t,e){var r=new gn(fe);return r.ownerDocument=this,r.childNodes=new K,r.nodeName=r.target=t,r.nodeValue=r.data=e,r},createAttribute:function(t){if(!V.QName_exact.test(t))throw new y(y.INVALID_CHARACTER_ERR,'invalid character in name "'+t+'"');return this.type==="html"&&(t=t.toLowerCase()),this._createAttribute(t)},_createAttribute:function(t){var e=new gt(fe);return e.ownerDocument=this,e.childNodes=new K,e.name=t,e.nodeName=t,e.localName=t,e.specified=!0,e},createEntityReference:function(t){if(!V.Name_exact.test(t))throw new y(y.INVALID_CHARACTER_ERR,'not a valid xml name "'+t+'"');if(this.type==="html")throw new y("document is an html document",ce.NotSupportedError);var e=new mn(fe);return e.ownerDocument=this,e.childNodes=new K,e.nodeName=t,e},createElementNS:function(t,e){var r=ha(t,e),n=new qe(fe),a=n.attributes=new Mt;return n.childNodes=new K,n.ownerDocument=this,n.nodeName=e,n.tagName=e,n.namespaceURI=r[0],n.prefix=r[1],n.localName=r[2],a._ownerElement=n,n},createAttributeNS:function(t,e){var r=ha(t,e),n=new gt(fe);return n.ownerDocument=this,n.childNodes=new K,n.nodeName=e,n.name=e,n.specified=!0,n.namespaceURI=r[0],n.prefix=r[1],n.localName=r[2],n}};me(Ue,I);function qe(t){he(t),this._nsMap=Object.create(null)}qe.prototype={nodeType:ve,attributes:null,getQualifiedName:function(){return this.prefix?this.prefix+":"+this.localName:this.localName},_isInHTMLDocumentAndNamespace:function(){return this.ownerDocument.type==="html"&&this.namespaceURI===Ie.HTML},hasAttributes:function(){return!!(this.attributes&&this.attributes.length)},hasAttribute:function(t){return!!this.getAttributeNode(t)},getAttribute:function(t){var e=this.getAttributeNode(t);return e?e.value:null},getAttributeNode:function(t){return this._isInHTMLDocumentAndNamespace()&&(t=t.toLowerCase()),this.attributes.getNamedItem(t)},setAttribute:function(t,e){this._isInHTMLDocumentAndNamespace()&&(t=t.toLowerCase());var r=this.getAttributeNode(t);r?r.value=r.nodeValue=""+e:(r=this.ownerDocument._createAttribute(t),r.value=r.nodeValue=""+e,this.setAttributeNode(r))},removeAttribute:function(t){var e=this.getAttributeNode(t);e&&this.removeAttributeNode(e)},setAttributeNode:function(t){return this.attributes.setNamedItem(t)},setAttributeNodeNS:function(t){return this.attributes.setNamedItemNS(t)},removeAttributeNode:function(t){return this.attributes.removeNamedItem(t.nodeName)},removeAttributeNS:function(t,e){var r=this.getAttributeNodeNS(t,e);r&&this.removeAttributeNode(r)},hasAttributeNS:function(t,e){return this.getAttributeNodeNS(t,e)!=null},getAttributeNS:function(t,e){var r=this.getAttributeNodeNS(t,e);return r?r.value:null},setAttributeNS:function(t,e,r){var n=ha(t,e),a=n[2],i=this.getAttributeNodeNS(t,a);i?i.value=i.nodeValue=""+r:(i=this.ownerDocument.createAttributeNS(t,e),i.value=i.nodeValue=""+r,this.setAttributeNode(i))},getAttributeNodeNS:function(t,e){return this.attributes.getNamedItemNS(t,e)},getElementsByClassName:function(t){var e=is(t);return new Oe(this,function(r){var n=[];return e.length>0&&un(r,function(a){if(a!==r&&a.nodeType===ve){var i=a.getAttribute("class");if(i){var s=t===i;if(!s){var o=is(i);s=e.every(Uc(o))}s&&n.push(a)}}}),n})},getElementsByTagName:function(t){var e=(this.nodeType===Ot?this:this.ownerDocument).type==="html",r=t.toLowerCase();return new Oe(this,function(n){var a=[];return un(n,function(i){if(!(i===n||i.nodeType!==ve))if(t==="*")a.push(i);else{var s=i.getQualifiedName(),o=e&&i.namespaceURI===Ie.HTML?r:t;s===o&&a.push(i)}}),a})},getElementsByTagNameNS:function(t,e){return new Oe(this,function(r){var n=[];return un(r,function(a){a!==r&&a.nodeType===ve&&(t==="*"||a.namespaceURI===t)&&(e==="*"||a.localName==e)&&n.push(a)}),n})}};Ue.prototype.getElementsByClassName=qe.prototype.getElementsByClassName;Ue.prototype.getElementsByTagName=qe.prototype.getElementsByTagName;Ue.prototype.getElementsByTagNameNS=qe.prototype.getElementsByTagNameNS;me(qe,I);function gt(t){he(t),this.namespaceURI=null,this.prefix=null,this.ownerElement=null}gt.prototype.nodeType=It;me(gt,I);function st(t){he(t)}st.prototype={data:"",substringData:function(t,e){return this.data.substring(t,t+e)},appendData:function(t){t=this.data+t,this.nodeValue=this.data=t,this.length=t.length},insertData:function(t,e){this.replaceData(t,0,e)},deleteData:function(t,e){this.replaceData(t,e,"")},replaceData:function(t,e,r){var n=this.data.substring(0,t),a=this.data.substring(t+e);r=n+r+a,this.nodeValue=this.data=r,this.length=r.length}};me(st,I);function wr(t){he(t)}wr.prototype={nodeName:"#text",nodeType:br,splitText:function(t){var e=this.data,r=e.substring(t);e=e.substring(0,t),this.data=this.nodeValue=e,this.length=e.length;var n=this.ownerDocument.createTextNode(r);return this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling),n}};me(wr,st);function fn(t){he(t)}fn.prototype={nodeName:"#comment",nodeType:ga};me(fn,st);function pn(t){he(t)}pn.prototype={nodeName:"#cdata-section",nodeType:ps};me(pn,wr);function hn(t){he(t)}hn.prototype.nodeType=ms;me(hn,I);function wa(t){he(t)}wa.prototype.nodeType=jc;me(wa,I);function ya(t){he(t)}ya.prototype.nodeType=qc;me(ya,I);function mn(t){he(t)}mn.prototype.nodeType=hs;me(mn,I);function Lt(t){he(t)}Lt.prototype.nodeName="#document-fragment";Lt.prototype.nodeType=at;me(Lt,I);function gn(t){he(t)}gn.prototype.nodeType=ma;me(gn,st);function xs(){}xs.prototype.serializeToString=function(t,e){return Ds.call(t,e)};I.prototype.toString=Ds;function Ds(t){var e;typeof t=="function"?e={requireWellFormed:!1,splitCDATASections:!0,nodeFilter:t}:t!=null?e={requireWellFormed:!!t.requireWellFormed,splitCDATASections:t.splitCDATASections!==!1,nodeFilter:t.nodeFilter||null}:e={requireWellFormed:!1,splitCDATASections:!0,nodeFilter:null};var r=[],n=this.nodeType===Ot&&this.documentElement||this,a=n.prefix,i=n.namespaceURI;if(i&&a==null){var a=n.lookupPrefix(i);if(a==null)var s=[{namespace:i,prefix:null}]}return va(this,r,s,e),r.join("")}function cs(t,e,r){var n=t.prefix||"",a=t.namespaceURI;if(!a||n==="xml"&&a===Ie.XML||a===Ie.XMLNS)return!1;for(var i=r.length;i--;){var s=r[i];if(s.prefix===n)return s.namespace!==a}return!0}function ln(t,e,r,n){if(n&&!V.QName_exact.test(e))throw new y('The attribute name "'+e+'" is not a valid XML QName',ce.InvalidStateError);t.push(" ",e,'="',r.replace(/[<>&"\t\n\r]/g,ws),'"')}function va(t,e,r,n){r||(r=[]);var a=n.nodeFilter,i=n.requireWellFormed,s=n.splitCDATASections,o=t.nodeType===Ot?t:t.ownerDocument,u=o.type==="html";oe(t,{ns:r},{enter:function(l,c){var d=c.ns;if(a)if(l=a(l),l){if(typeof l=="string")return e.push(l),null}else return null;switch(l.nodeType){case ve:var f=l.attributes,p=f.length,h=l.tagName,m=h;if(!u&&!l.prefix&&l.namespaceURI){for(var _,b=0;b<f.length;b++)if(f.item(b).name==="xmlns"){_=f.item(b).value;break}if(!_)for(var v=d.length-1;v>=0;v--){var w=d[v];if(w.prefix===""&&w.namespace===l.namespaceURI){_=w.namespace;break}}if(_!==l.namespaceURI)for(var v=d.length-1;v>=0;v--){var w=d[v];if(w.namespace===l.namespaceURI){w.prefix&&(m=w.prefix+":"+h);break}}}if(i&&!V.QName_exact.test(m))throw new y('The element name "'+m+'" is not a valid XML QName',ce.InvalidStateError);e.push("<",m);for(var x=d.slice(),B=0;B<p;B++){var L=f.item(B);L.prefix=="xmlns"?x.push({prefix:L.localName,namespace:L.value}):L.nodeName=="xmlns"&&x.push({prefix:"",namespace:L.value})}for(var B=0;B<p;B++){var L=f.item(B);if(cs(L,u,x)){var G=L.prefix||"",re=L.namespaceURI;ln(e,G?"xmlns:"+G:"xmlns",re,i),x.push({prefix:G,namespace:re})}var ne=a?a(L):L;ne&&(typeof ne=="string"?e.push(ne):ln(e,ne.name,ne.value,i))}if(h===m&&cs(l,u,x)){var Pe=l.prefix||"",re=l.namespaceURI;ln(e,Pe?"xmlns:"+Pe:"xmlns",re,i),x.push({prefix:Pe,namespace:re})}var Y=!l.firstChild;if(Y&&(u||l.namespaceURI===Ie.HTML)&&(Y=Lc(h)),Y)return e.push("/>"),null;if(e.push(">"),u&&Rc(h)){for(var de=l.firstChild;de;)de.data?e.push(de.data):va(de,e,x.slice(),n),de=de.nextSibling;return e.push("</",m,">"),null}return{ns:x,tag:m};case Ot:case at:if(i&&l.nodeType===Ot&&l.documentElement==null)throw new y("The Document has no documentElement",ce.InvalidStateError);return{ns:d};case It:return ln(e,l.name,l.value,i),null;case br:if(i&&V.InvalidChar.test(l.data))throw new y("The Text node data contains characters outside the XML Char production",ce.InvalidStateError);return e.push(l.data.replace(/[<&>]/g,ws)),null;case ps:if(i&&l.data.indexOf("]]>")!==-1)throw new y('The CDATASection data contains "]]>"',ce.InvalidStateError);return s?e.push(V.CDATA_START,l.data.replace(/]]>/g,"]]]]><![CDATA[>"),V.CDATA_END):e.push(V.CDATA_START,l.data,V.CDATA_END),null;case ga:if(i){if(V.InvalidChar.test(l.data))throw new y("The comment node data contains characters outside the XML Char production",ce.InvalidStateError);if(l.data.indexOf("--")!==-1||l.data[l.data.length-1]==="-")throw new y('The comment node data contains "--" or ends with "-"',ce.InvalidStateError)}return e.push(V.COMMENT_START,l.data,V.COMMENT_END),null;case ms:var we=l.publicId,F=l.systemId;if(i){if(!V.Name_exact.test(l.name))throw new y('The doctype name "'+l.name+'" is not a valid XML Name',ce.InvalidStateError);if(we&&!V.PubidLiteral_match.test(we))throw new y("DocumentType publicId is not a valid PubidLiteral",ce.InvalidStateError);if(F&&F!=="."&&!V.SystemLiteral_match.test(F))throw new y("DocumentType systemId is not a valid SystemLiteral",ce.InvalidStateError);if(l.internalSubset&&l.internalSubset.indexOf("]>")!==-1)throw new y('DocumentType internalSubset contains "]>"',ce.InvalidStateError)}return e.push(V.DOCTYPE_DECL_START," ",l.name),we?(e.push(" ",V.PUBLIC," ",we),F&&F!=="."&&e.push(" ",F)):F&&F!=="."&&e.push(" ",V.SYSTEM," ",F),l.internalSubset&&e.push(" [",l.internalSubset,"]"),e.push(">"),null;case ma:if(i){if(!V.NCName_exact.test(l.target)||l.target.toLowerCase()==="xml")throw new y('The processing instruction target "'+l.target+'" is not a valid XML NCName or is reserved',ce.InvalidStateError);if(V.InvalidChar.test(l.data))throw new y("The ProcessingInstruction data contains characters outside the XML Char production",ce.InvalidStateError);if(l.data.indexOf("?>")!==-1)throw new y('The ProcessingInstruction data contains "?>"',ce.InvalidStateError)}return e.push("<?",l.target," ",l.data,"?>"),null;case hs:if(i&&!V.Name_exact.test(l.nodeName))throw new y('The entity reference name "'+l.nodeName+'" is not a valid XML Name',ce.InvalidStateError);return e.push("&",l.nodeName,";"),null;default:return e.push("??",l.nodeName),null}},exit:function(l,c){c&&c.tag&&e.push("</",c.tag,">")}})}function Kc(t,e,r){var n;return oe(e,null,{enter:function(a,i){var s=a.cloneNode(!1);s.ownerDocument=t,s.parentNode=null,i===null?n=s:i.appendChild(s);var o=a.nodeType===It||r;return o?s:null}}),n}function As(t,e,r){var n;return oe(e,null,{enter:function(a,i){var s=new a.constructor(fe);for(var o in a)if(Bt(a,o)){var u=a[o];typeof u!="object"&&u!=s[o]&&(s[o]=u)}a.childNodes&&(s.childNodes=new K),s.ownerDocument=t;var l=r;switch(s.nodeType){case ve:var c=a.attributes,d=s.attributes=new Mt,f=c.length;d._ownerElement=s;for(var p=0;p<f;p++)s.setAttributeNode(As(t,c.item(p),!0));break;case It:l=!0}return i!==null?i.appendChild(s):n=s,l?s:null}}),n}function Ts(t,e,r){t[e]=r}function pa(t){for(var e=[],r=t.firstChild;r;)r.nodeType===ve&&e.push(r),r=r.nextSibling;return e}try{Object.defineProperty&&(Object.defineProperty(Oe.prototype,"length",{get:function(){return dn(this),this.$$length}}),Object.defineProperty(I.prototype,"textContent",{get:function(){if(this.nodeType===ve||this.nodeType===at){var t=[];return oe(this,null,{enter:function(e){if(e.nodeType===ve||e.nodeType===at)return!0;if(e.nodeType===ma||e.nodeType===ga)return null;t.push(e.nodeValue)}}),t.join("")}return this.nodeValue},set:function(t){switch(this.nodeType){case ve:case at:for(;this.firstChild;)this.removeChild(this.firstChild);(t||String(t))&&this.appendChild(this.ownerDocument.createTextNode(t));break;default:this.data=t,this.value=t,this.nodeValue=t}}}),Object.defineProperty(st.prototype,"data",{get:function(){return this._data!=null?this._data:""},set:function(t){this._data=t,this.length=typeof t=="string"?t.length:0}}),Object.defineProperty(st.prototype,"nodeValue",{get:function(){return this.data},set:function(t){this.data=t},enumerable:!0,configurable:!0}),Object.defineProperty(qe.prototype,"children",{get:function(){return new Oe(this,pa)}}),Object.defineProperty(Ue.prototype,"children",{get:function(){return new Oe(this,pa)}}),Object.defineProperty(Lt.prototype,"children",{get:function(){return new Oe(this,pa)}}),Ts=function(t,e,r){t["$$"+e]=r})}catch{}z._updateLiveList=dn;z.Attr=gt;z.CDATASection=pn;z.CharacterData=st;z.Comment=fn;z.Document=Ue;z.DocumentFragment=Lt;z.DocumentType=hn;z.DOMImplementation=bs;z.Element=qe;z.Entity=ya;z.EntityReference=mn;z.LiveNodeList=Oe;z.NamedNodeMap=Mt;z.Node=I;z.NodeList=K;z.Notation=wa;z.Text=wr;z.ProcessingInstruction=gn;z.walkDOM=oe;z.XMLSerializer=xs});var Ns=Ge(yr=>{"use strict";var Cs=mt().freeze;yr.XML_ENTITIES=Cs({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'});yr.HTML_ENTITIES=Cs({Aacute:"\xC1",aacute:"\xE1",Abreve:"\u0102",abreve:"\u0103",ac:"\u223E",acd:"\u223F",acE:"\u223E\u0333",Acirc:"\xC2",acirc:"\xE2",acute:"\xB4",Acy:"\u0410",acy:"\u0430",AElig:"\xC6",aelig:"\xE6",af:"\u2061",Afr:"\u{1D504}",afr:"\u{1D51E}",Agrave:"\xC0",agrave:"\xE0",alefsym:"\u2135",aleph:"\u2135",Alpha:"\u0391",alpha:"\u03B1",Amacr:"\u0100",amacr:"\u0101",amalg:"\u2A3F",AMP:"&",amp:"&",And:"\u2A53",and:"\u2227",andand:"\u2A55",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",ange:"\u29A4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angst:"\xC5",angzarr:"\u237C",Aogon:"\u0104",aogon:"\u0105",Aopf:"\u{1D538}",aopf:"\u{1D552}",ap:"\u2248",apacir:"\u2A6F",apE:"\u2A70",ape:"\u224A",apid:"\u224B",apos:"'",ApplyFunction:"\u2061",approx:"\u2248",approxeq:"\u224A",Aring:"\xC5",aring:"\xE5",Ascr:"\u{1D49C}",ascr:"\u{1D4B6}",Assign:"\u2254",ast:"*",asymp:"\u2248",asympeq:"\u224D",Atilde:"\xC3",atilde:"\xE3",Auml:"\xC4",auml:"\xE4",awconint:"\u2233",awint:"\u2A11",backcong:"\u224C",backepsilon:"\u03F6",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",Backslash:"\u2216",Barv:"\u2AE7",barvee:"\u22BD",Barwed:"\u2306",barwed:"\u2305",barwedge:"\u2305",bbrk:"\u23B5",bbrktbrk:"\u23B6",bcong:"\u224C",Bcy:"\u0411",bcy:"\u0431",bdquo:"\u201E",becaus:"\u2235",Because:"\u2235",because:"\u2235",bemptyv:"\u29B0",bepsi:"\u03F6",bernou:"\u212C",Bernoullis:"\u212C",Beta:"\u0392",beta:"\u03B2",beth:"\u2136",between:"\u226C",Bfr:"\u{1D505}",bfr:"\u{1D51F}",bigcap:"\u22C2",bigcirc:"\u25EF",bigcup:"\u22C3",bigodot:"\u2A00",bigoplus:"\u2A01",bigotimes:"\u2A02",bigsqcup:"\u2A06",bigstar:"\u2605",bigtriangledown:"\u25BD",bigtriangleup:"\u25B3",biguplus:"\u2A04",bigvee:"\u22C1",bigwedge:"\u22C0",bkarow:"\u290D",blacklozenge:"\u29EB",blacksquare:"\u25AA",blacktriangle:"\u25B4",blacktriangledown:"\u25BE",blacktriangleleft:"\u25C2",blacktriangleright:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bNot:"\u2AED",bnot:"\u2310",Bopf:"\u{1D539}",bopf:"\u{1D553}",bot:"\u22A5",bottom:"\u22A5",bowtie:"\u22C8",boxbox:"\u29C9",boxDL:"\u2557",boxDl:"\u2556",boxdL:"\u2555",boxdl:"\u2510",boxDR:"\u2554",boxDr:"\u2553",boxdR:"\u2552",boxdr:"\u250C",boxH:"\u2550",boxh:"\u2500",boxHD:"\u2566",boxHd:"\u2564",boxhD:"\u2565",boxhd:"\u252C",boxHU:"\u2569",boxHu:"\u2567",boxhU:"\u2568",boxhu:"\u2534",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",boxUL:"\u255D",boxUl:"\u255C",boxuL:"\u255B",boxul:"\u2518",boxUR:"\u255A",boxUr:"\u2559",boxuR:"\u2558",boxur:"\u2514",boxV:"\u2551",boxv:"\u2502",boxVH:"\u256C",boxVh:"\u256B",boxvH:"\u256A",boxvh:"\u253C",boxVL:"\u2563",boxVl:"\u2562",boxvL:"\u2561",boxvl:"\u2524",boxVR:"\u2560",boxVr:"\u255F",boxvR:"\u255E",boxvr:"\u251C",bprime:"\u2035",Breve:"\u02D8",breve:"\u02D8",brvbar:"\xA6",Bscr:"\u212C",bscr:"\u{1D4B7}",bsemi:"\u204F",bsim:"\u223D",bsime:"\u22CD",bsol:"\\",bsolb:"\u29C5",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bump:"\u224E",bumpE:"\u2AAE",bumpe:"\u224F",Bumpeq:"\u224E",bumpeq:"\u224F",Cacute:"\u0106",cacute:"\u0107",Cap:"\u22D2",cap:"\u2229",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",capcup:"\u2A47",capdot:"\u2A40",CapitalDifferentialD:"\u2145",caps:"\u2229\uFE00",caret:"\u2041",caron:"\u02C7",Cayleys:"\u212D",ccaps:"\u2A4D",Ccaron:"\u010C",ccaron:"\u010D",Ccedil:"\xC7",ccedil:"\xE7",Ccirc:"\u0108",ccirc:"\u0109",Cconint:"\u2230",ccups:"\u2A4C",ccupssm:"\u2A50",Cdot:"\u010A",cdot:"\u010B",cedil:"\xB8",Cedilla:"\xB8",cemptyv:"\u29B2",cent:"\xA2",CenterDot:"\xB7",centerdot:"\xB7",Cfr:"\u212D",cfr:"\u{1D520}",CHcy:"\u0427",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",Chi:"\u03A7",chi:"\u03C7",cir:"\u25CB",circ:"\u02C6",circeq:"\u2257",circlearrowleft:"\u21BA",circlearrowright:"\u21BB",circledast:"\u229B",circledcirc:"\u229A",circleddash:"\u229D",CircleDot:"\u2299",circledR:"\xAE",circledS:"\u24C8",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",cirE:"\u29C3",cire:"\u2257",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201D",CloseCurlyQuote:"\u2019",clubs:"\u2663",clubsuit:"\u2663",Colon:"\u2237",colon:":",Colone:"\u2A74",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2A6D",Congruent:"\u2261",Conint:"\u222F",conint:"\u222E",ContourIntegral:"\u222E",Copf:"\u2102",copf:"\u{1D554}",coprod:"\u2210",Coproduct:"\u2210",COPY:"\xA9",copy:"\xA9",copysr:"\u2117",CounterClockwiseContourIntegral:"\u2233",crarr:"\u21B5",Cross:"\u2A2F",cross:"\u2717",Cscr:"\u{1D49E}",cscr:"\u{1D4B8}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",cuesc:"\u22DF",cularr:"\u21B6",cularrp:"\u293D",Cup:"\u22D3",cup:"\u222A",cupbrcap:"\u2A48",CupCap:"\u224D",cupcap:"\u2A46",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curarrm:"\u293C",curlyeqprec:"\u22DE",curlyeqsucc:"\u22DF",curlyvee:"\u22CE",curlywedge:"\u22CF",curren:"\xA4",curvearrowleft:"\u21B6",curvearrowright:"\u21B7",cuvee:"\u22CE",cuwed:"\u22CF",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232D",Dagger:"\u2021",dagger:"\u2020",daleth:"\u2138",Darr:"\u21A1",dArr:"\u21D3",darr:"\u2193",dash:"\u2010",Dashv:"\u2AE4",dashv:"\u22A3",dbkarow:"\u290F",dblac:"\u02DD",Dcaron:"\u010E",dcaron:"\u010F",Dcy:"\u0414",dcy:"\u0434",DD:"\u2145",dd:"\u2146",ddagger:"\u2021",ddarr:"\u21CA",DDotrahd:"\u2911",ddotseq:"\u2A77",deg:"\xB0",Del:"\u2207",Delta:"\u0394",delta:"\u03B4",demptyv:"\u29B1",dfisht:"\u297F",Dfr:"\u{1D507}",dfr:"\u{1D521}",dHar:"\u2965",dharl:"\u21C3",dharr:"\u21C2",DiacriticalAcute:"\xB4",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",DiacriticalGrave:"`",DiacriticalTilde:"\u02DC",diam:"\u22C4",Diamond:"\u22C4",diamond:"\u22C4",diamondsuit:"\u2666",diams:"\u2666",die:"\xA8",DifferentialD:"\u2146",digamma:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",DJcy:"\u0402",djcy:"\u0452",dlcorn:"\u231E",dlcrop:"\u230D",dollar:"$",Dopf:"\u{1D53B}",dopf:"\u{1D555}",Dot:"\xA8",dot:"\u02D9",DotDot:"\u20DC",doteq:"\u2250",doteqdot:"\u2251",DotEqual:"\u2250",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22A1",doublebarwedge:"\u2306",DoubleContourIntegral:"\u222F",DoubleDot:"\xA8",DoubleDownArrow:"\u21D3",DoubleLeftArrow:"\u21D0",DoubleLeftRightArrow:"\u21D4",DoubleLeftTee:"\u2AE4",DoubleLongLeftArrow:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",DoubleLongRightArrow:"\u27F9",DoubleRightArrow:"\u21D2",DoubleRightTee:"\u22A8",DoubleUpArrow:"\u21D1",DoubleUpDownArrow:"\u21D5",DoubleVerticalBar:"\u2225",DownArrow:"\u2193",Downarrow:"\u21D3",downarrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21F5",DownBreve:"\u0311",downdownarrows:"\u21CA",downharpoonleft:"\u21C3",downharpoonright:"\u21C2",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVector:"\u21BD",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295F",DownRightVector:"\u21C1",DownRightVectorBar:"\u2957",DownTee:"\u22A4",DownTeeArrow:"\u21A7",drbkarow:"\u2910",drcorn:"\u231F",drcrop:"\u230C",Dscr:"\u{1D49F}",dscr:"\u{1D4B9}",DScy:"\u0405",dscy:"\u0455",dsol:"\u29F6",Dstrok:"\u0110",dstrok:"\u0111",dtdot:"\u22F1",dtri:"\u25BF",dtrif:"\u25BE",duarr:"\u21F5",duhar:"\u296F",dwangle:"\u29A6",DZcy:"\u040F",dzcy:"\u045F",dzigrarr:"\u27FF",Eacute:"\xC9",eacute:"\xE9",easter:"\u2A6E",Ecaron:"\u011A",ecaron:"\u011B",ecir:"\u2256",Ecirc:"\xCA",ecirc:"\xEA",ecolon:"\u2255",Ecy:"\u042D",ecy:"\u044D",eDDot:"\u2A77",Edot:"\u0116",eDot:"\u2251",edot:"\u0117",ee:"\u2147",efDot:"\u2252",Efr:"\u{1D508}",efr:"\u{1D522}",eg:"\u2A9A",Egrave:"\xC8",egrave:"\xE8",egs:"\u2A96",egsdot:"\u2A98",el:"\u2A99",Element:"\u2208",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",elsdot:"\u2A97",Emacr:"\u0112",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",EmptySmallSquare:"\u25FB",emptyv:"\u2205",EmptyVerySmallSquare:"\u25AB",emsp:"\u2003",emsp13:"\u2004",emsp14:"\u2005",ENG:"\u014A",eng:"\u014B",ensp:"\u2002",Eogon:"\u0118",eogon:"\u0119",Eopf:"\u{1D53C}",eopf:"\u{1D556}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",Epsilon:"\u0395",epsilon:"\u03B5",epsiv:"\u03F5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2A96",eqslantless:"\u2A95",Equal:"\u2A75",equals:"=",EqualTilde:"\u2242",equest:"\u225F",Equilibrium:"\u21CC",equiv:"\u2261",equivDD:"\u2A78",eqvparsl:"\u29E5",erarr:"\u2971",erDot:"\u2253",Escr:"\u2130",escr:"\u212F",esdot:"\u2250",Esim:"\u2A73",esim:"\u2242",Eta:"\u0397",eta:"\u03B7",ETH:"\xD0",eth:"\xF0",Euml:"\xCB",euml:"\xEB",euro:"\u20AC",excl:"!",exist:"\u2203",Exists:"\u2203",expectation:"\u2130",ExponentialE:"\u2147",exponentiale:"\u2147",fallingdotseq:"\u2252",Fcy:"\u0424",fcy:"\u0444",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",Ffr:"\u{1D509}",ffr:"\u{1D523}",filig:"\uFB01",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",Fopf:"\u{1D53D}",fopf:"\u{1D557}",ForAll:"\u2200",forall:"\u2200",fork:"\u22D4",forkv:"\u2AD9",Fouriertrf:"\u2131",fpartint:"\u2A0D",frac12:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",Fscr:"\u2131",fscr:"\u{1D4BB}",gacute:"\u01F5",Gamma:"\u0393",gamma:"\u03B3",Gammad:"\u03DC",gammad:"\u03DD",gap:"\u2A86",Gbreve:"\u011E",gbreve:"\u011F",Gcedil:"\u0122",Gcirc:"\u011C",gcirc:"\u011D",Gcy:"\u0413",gcy:"\u0433",Gdot:"\u0120",gdot:"\u0121",gE:"\u2267",ge:"\u2265",gEl:"\u2A8C",gel:"\u22DB",geq:"\u2265",geqq:"\u2267",geqslant:"\u2A7E",ges:"\u2A7E",gescc:"\u2AA9",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",Gfr:"\u{1D50A}",gfr:"\u{1D524}",Gg:"\u22D9",gg:"\u226B",ggg:"\u22D9",gimel:"\u2137",GJcy:"\u0403",gjcy:"\u0453",gl:"\u2277",gla:"\u2AA5",glE:"\u2A92",glj:"\u2AA4",gnap:"\u2A8A",gnapprox:"\u2A8A",gnE:"\u2269",gne:"\u2A88",gneq:"\u2A88",gneqq:"\u2269",gnsim:"\u22E7",Gopf:"\u{1D53E}",gopf:"\u{1D558}",grave:"`",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",Gscr:"\u{1D4A2}",gscr:"\u210A",gsim:"\u2273",gsime:"\u2A8E",gsiml:"\u2A90",Gt:"\u226B",GT:">",gt:">",gtcc:"\u2AA7",gtcir:"\u2A7A",gtdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrapprox:"\u2A86",gtrarr:"\u2978",gtrdot:"\u22D7",gtreqless:"\u22DB",gtreqqless:"\u2A8C",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",Hacek:"\u02C7",hairsp:"\u200A",half:"\xBD",hamilt:"\u210B",HARDcy:"\u042A",hardcy:"\u044A",hArr:"\u21D4",harr:"\u2194",harrcir:"\u2948",harrw:"\u21AD",Hat:"^",hbar:"\u210F",Hcirc:"\u0124",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22B9",Hfr:"\u210C",hfr:"\u{1D525}",HilbertSpace:"\u210B",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",Hopf:"\u210D",hopf:"\u{1D559}",horbar:"\u2015",HorizontalLine:"\u2500",Hscr:"\u210B",hscr:"\u{1D4BD}",hslash:"\u210F",Hstrok:"\u0126",hstrok:"\u0127",HumpDownHump:"\u224E",HumpEqual:"\u224F",hybull:"\u2043",hyphen:"\u2010",Iacute:"\xCD",iacute:"\xED",ic:"\u2063",Icirc:"\xCE",icirc:"\xEE",Icy:"\u0418",icy:"\u0438",Idot:"\u0130",IEcy:"\u0415",iecy:"\u0435",iexcl:"\xA1",iff:"\u21D4",Ifr:"\u2111",ifr:"\u{1D526}",Igrave:"\xCC",igrave:"\xEC",ii:"\u2148",iiiint:"\u2A0C",iiint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",IJlig:"\u0132",ijlig:"\u0133",Im:"\u2111",Imacr:"\u012A",imacr:"\u012B",image:"\u2111",ImaginaryI:"\u2148",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22B7",imped:"\u01B5",Implies:"\u21D2",in:"\u2208",incare:"\u2105",infin:"\u221E",infintie:"\u29DD",inodot:"\u0131",Int:"\u222C",int:"\u222B",intcal:"\u22BA",integers:"\u2124",Integral:"\u222B",intercal:"\u22BA",Intersection:"\u22C2",intlarhk:"\u2A17",intprod:"\u2A3C",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",IOcy:"\u0401",iocy:"\u0451",Iogon:"\u012E",iogon:"\u012F",Iopf:"\u{1D540}",iopf:"\u{1D55A}",Iota:"\u0399",iota:"\u03B9",iprod:"\u2A3C",iquest:"\xBF",Iscr:"\u2110",iscr:"\u{1D4BE}",isin:"\u2208",isindot:"\u22F5",isinE:"\u22F9",isins:"\u22F4",isinsv:"\u22F3",isinv:"\u2208",it:"\u2062",Itilde:"\u0128",itilde:"\u0129",Iukcy:"\u0406",iukcy:"\u0456",Iuml:"\xCF",iuml:"\xEF",Jcirc:"\u0134",jcirc:"\u0135",Jcy:"\u0419",jcy:"\u0439",Jfr:"\u{1D50D}",jfr:"\u{1D527}",jmath:"\u0237",Jopf:"\u{1D541}",jopf:"\u{1D55B}",Jscr:"\u{1D4A5}",jscr:"\u{1D4BF}",Jsercy:"\u0408",jsercy:"\u0458",Jukcy:"\u0404",jukcy:"\u0454",Kappa:"\u039A",kappa:"\u03BA",kappav:"\u03F0",Kcedil:"\u0136",kcedil:"\u0137",Kcy:"\u041A",kcy:"\u043A",Kfr:"\u{1D50E}",kfr:"\u{1D528}",kgreen:"\u0138",KHcy:"\u0425",khcy:"\u0445",KJcy:"\u040C",kjcy:"\u045C",Kopf:"\u{1D542}",kopf:"\u{1D55C}",Kscr:"\u{1D4A6}",kscr:"\u{1D4C0}",lAarr:"\u21DA",Lacute:"\u0139",lacute:"\u013A",laemptyv:"\u29B4",lagran:"\u2112",Lambda:"\u039B",lambda:"\u03BB",Lang:"\u27EA",lang:"\u27E8",langd:"\u2991",langle:"\u27E8",lap:"\u2A85",Laplacetrf:"\u2112",laquo:"\xAB",Larr:"\u219E",lArr:"\u21D0",larr:"\u2190",larrb:"\u21E4",larrbfs:"\u291F",larrfs:"\u291D",larrhk:"\u21A9",larrlp:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",lat:"\u2AAB",lAtail:"\u291B",latail:"\u2919",late:"\u2AAD",lates:"\u2AAD\uFE00",lBarr:"\u290E",lbarr:"\u290C",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",Lcaron:"\u013D",lcaron:"\u013E",Lcedil:"\u013B",lcedil:"\u013C",lceil:"\u2308",lcub:"{",Lcy:"\u041B",lcy:"\u043B",ldca:"\u2936",ldquo:"\u201C",ldquor:"\u201E",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",lE:"\u2266",le:"\u2264",LeftAngleBracket:"\u27E8",LeftArrow:"\u2190",Leftarrow:"\u21D0",leftarrow:"\u2190",LeftArrowBar:"\u21E4",LeftArrowRightArrow:"\u21C6",leftarrowtail:"\u21A2",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21C3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230A",leftharpoondown:"\u21BD",leftharpoonup:"\u21BC",leftleftarrows:"\u21C7",LeftRightArrow:"\u2194",Leftrightarrow:"\u21D4",leftrightarrow:"\u2194",leftrightarrows:"\u21C6",leftrightharpoons:"\u21CB",leftrightsquigarrow:"\u21AD",LeftRightVector:"\u294E",LeftTee:"\u22A3",LeftTeeArrow:"\u21A4",LeftTeeVector:"\u295A",leftthreetimes:"\u22CB",LeftTriangle:"\u22B2",LeftTriangleBar:"\u29CF",LeftTriangleEqual:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21BF",LeftUpVectorBar:"\u2958",LeftVector:"\u21BC",LeftVectorBar:"\u2952",lEg:"\u2A8B",leg:"\u22DA",leq:"\u2264",leqq:"\u2266",leqslant:"\u2A7D",les:"\u2A7D",lescc:"\u2AA8",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessapprox:"\u2A85",lessdot:"\u22D6",lesseqgtr:"\u22DA",lesseqqgtr:"\u2A8B",LessEqualGreater:"\u22DA",LessFullEqual:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",LessLess:"\u2AA1",lesssim:"\u2272",LessSlantEqual:"\u2A7D",LessTilde:"\u2272",lfisht:"\u297C",lfloor:"\u230A",Lfr:"\u{1D50F}",lfr:"\u{1D529}",lg:"\u2276",lgE:"\u2A91",lHar:"\u2962",lhard:"\u21BD",lharu:"\u21BC",lharul:"\u296A",lhblk:"\u2584",LJcy:"\u0409",ljcy:"\u0459",Ll:"\u22D8",ll:"\u226A",llarr:"\u21C7",llcorner:"\u231E",Lleftarrow:"\u21DA",llhard:"\u296B",lltri:"\u25FA",Lmidot:"\u013F",lmidot:"\u0140",lmoust:"\u23B0",lmoustache:"\u23B0",lnap:"\u2A89",lnapprox:"\u2A89",lnE:"\u2268",lne:"\u2A87",lneq:"\u2A87",lneqq:"\u2268",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",lobrk:"\u27E6",LongLeftArrow:"\u27F5",Longleftarrow:"\u27F8",longleftarrow:"\u27F5",LongLeftRightArrow:"\u27F7",Longleftrightarrow:"\u27FA",longleftrightarrow:"\u27F7",longmapsto:"\u27FC",LongRightArrow:"\u27F6",Longrightarrow:"\u27F9",longrightarrow:"\u27F6",looparrowleft:"\u21AB",looparrowright:"\u21AC",lopar:"\u2985",Lopf:"\u{1D543}",lopf:"\u{1D55D}",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",lowbar:"_",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",loz:"\u25CA",lozenge:"\u25CA",lozf:"\u29EB",lpar:"(",lparlt:"\u2993",lrarr:"\u21C6",lrcorner:"\u231F",lrhar:"\u21CB",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",Lscr:"\u2112",lscr:"\u{1D4C1}",Lsh:"\u21B0",lsh:"\u21B0",lsim:"\u2272",lsime:"\u2A8D",lsimg:"\u2A8F",lsqb:"[",lsquo:"\u2018",lsquor:"\u201A",Lstrok:"\u0141",lstrok:"\u0142",Lt:"\u226A",LT:"<",lt:"<",ltcc:"\u2AA6",ltcir:"\u2A79",ltdot:"\u22D6",lthree:"\u22CB",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltri:"\u25C3",ltrie:"\u22B4",ltrif:"\u25C2",ltrPar:"\u2996",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",macr:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",Map:"\u2905",map:"\u21A6",mapsto:"\u21A6",mapstodown:"\u21A7",mapstoleft:"\u21A4",mapstoup:"\u21A5",marker:"\u25AE",mcomma:"\u2A29",Mcy:"\u041C",mcy:"\u043C",mdash:"\u2014",mDDot:"\u223A",measuredangle:"\u2221",MediumSpace:"\u205F",Mellintrf:"\u2133",Mfr:"\u{1D510}",mfr:"\u{1D52A}",mho:"\u2127",micro:"\xB5",mid:"\u2223",midast:"*",midcir:"\u2AF0",middot:"\xB7",minus:"\u2212",minusb:"\u229F",minusd:"\u2238",minusdu:"\u2A2A",MinusPlus:"\u2213",mlcp:"\u2ADB",mldr:"\u2026",mnplus:"\u2213",models:"\u22A7",Mopf:"\u{1D544}",mopf:"\u{1D55E}",mp:"\u2213",Mscr:"\u2133",mscr:"\u{1D4C2}",mstpos:"\u223E",Mu:"\u039C",mu:"\u03BC",multimap:"\u22B8",mumap:"\u22B8",nabla:"\u2207",Nacute:"\u0143",nacute:"\u0144",nang:"\u2220\u20D2",nap:"\u2249",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266E",natural:"\u266E",naturals:"\u2115",nbsp:"\xA0",nbump:"\u224E\u0338",nbumpe:"\u224F\u0338",ncap:"\u2A43",Ncaron:"\u0147",ncaron:"\u0148",Ncedil:"\u0145",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",Ncy:"\u041D",ncy:"\u043D",ndash:"\u2013",ne:"\u2260",nearhk:"\u2924",neArr:"\u21D7",nearr:"\u2197",nearrow:"\u2197",nedot:"\u2250\u0338",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",NestedGreaterGreater:"\u226B",NestedLessLess:"\u226A",NewLine:`
|
|
2
|
-
`,nexist:"\u2204",nexists:"\u2204",Nfr:"\u{1D511}",nfr:"\u{1D52B}",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",nGg:"\u22D9\u0338",ngsim:"\u2275",nGt:"\u226B\u20D2",ngt:"\u226F",ngtr:"\u226F",nGtv:"\u226B\u0338",nhArr:"\u21CE",nharr:"\u21AE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",NJcy:"\u040A",njcy:"\u045A",nlArr:"\u21CD",nlarr:"\u219A",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nLeftarrow:"\u21CD",nleftarrow:"\u219A",nLeftrightarrow:"\u21CE",nleftrightarrow:"\u21AE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nLl:"\u22D8\u0338",nlsim:"\u2274",nLt:"\u226A\u20D2",nlt:"\u226E",nltri:"\u22EA",nltrie:"\u22EC",nLtv:"\u226A\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xA0",Nopf:"\u2115",nopf:"\u{1D55F}",Not:"\u2AEC",not:"\xAC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",notin:"\u2209",notindot:"\u22F5\u0338",notinE:"\u22F9\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",npre:"\u2AAF\u0338",nprec:"\u2280",npreceq:"\u2AAF\u0338",nrArr:"\u21CF",nrarr:"\u219B",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nRightarrow:"\u21CF",nrightarrow:"\u219B",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",Nscr:"\u{1D4A9}",nscr:"\u{1D4C3}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsube:"\u2288",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",Ntilde:"\xD1",ntilde:"\xF1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",Nu:"\u039D",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224D\u20D2",nVDash:"\u22AF",nVdash:"\u22AE",nvDash:"\u22AD",nvdash:"\u22AC",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvHarr:"\u2904",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwarhk:"\u2923",nwArr:"\u21D6",nwarr:"\u2196",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\xD3",oacute:"\xF3",oast:"\u229B",ocir:"\u229A",Ocirc:"\xD4",ocirc:"\xF4",Ocy:"\u041E",ocy:"\u043E",odash:"\u229D",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",OElig:"\u0152",oelig:"\u0153",ofcir:"\u29BF",Ofr:"\u{1D512}",ofr:"\u{1D52C}",ogon:"\u02DB",Ograve:"\xD2",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",Omacr:"\u014C",omacr:"\u014D",Omega:"\u03A9",omega:"\u03C9",Omicron:"\u039F",omicron:"\u03BF",omid:"\u29B6",ominus:"\u2296",Oopf:"\u{1D546}",oopf:"\u{1D560}",opar:"\u29B7",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",operp:"\u29B9",oplus:"\u2295",Or:"\u2A54",or:"\u2228",orarr:"\u21BB",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oS:"\u24C8",Oscr:"\u{1D4AA}",oscr:"\u2134",Oslash:"\xD8",oslash:"\xF8",osol:"\u2298",Otilde:"\xD5",otilde:"\xF5",Otimes:"\u2A37",otimes:"\u2297",otimesas:"\u2A36",Ouml:"\xD6",ouml:"\xF6",ovbar:"\u233D",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",par:"\u2225",para:"\xB6",parallel:"\u2225",parsim:"\u2AF3",parsl:"\u2AFD",part:"\u2202",PartialD:"\u2202",Pcy:"\u041F",pcy:"\u043F",percnt:"%",period:".",permil:"\u2030",perp:"\u22A5",pertenk:"\u2031",Pfr:"\u{1D513}",pfr:"\u{1D52D}",Phi:"\u03A6",phi:"\u03C6",phiv:"\u03D5",phmmat:"\u2133",phone:"\u260E",Pi:"\u03A0",pi:"\u03C0",pitchfork:"\u22D4",piv:"\u03D6",planck:"\u210F",planckh:"\u210E",plankv:"\u210F",plus:"+",plusacir:"\u2A23",plusb:"\u229E",pluscir:"\u2A22",plusdo:"\u2214",plusdu:"\u2A25",pluse:"\u2A72",PlusMinus:"\xB1",plusmn:"\xB1",plussim:"\u2A26",plustwo:"\u2A27",pm:"\xB1",Poincareplane:"\u210C",pointint:"\u2A15",Popf:"\u2119",popf:"\u{1D561}",pound:"\xA3",Pr:"\u2ABB",pr:"\u227A",prap:"\u2AB7",prcue:"\u227C",prE:"\u2AB3",pre:"\u2AAF",prec:"\u227A",precapprox:"\u2AB7",preccurlyeq:"\u227C",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",preceq:"\u2AAF",precnapprox:"\u2AB9",precneqq:"\u2AB5",precnsim:"\u22E8",precsim:"\u227E",Prime:"\u2033",prime:"\u2032",primes:"\u2119",prnap:"\u2AB9",prnE:"\u2AB5",prnsim:"\u22E8",prod:"\u220F",Product:"\u220F",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prop:"\u221D",Proportion:"\u2237",Proportional:"\u221D",propto:"\u221D",prsim:"\u227E",prurel:"\u22B0",Pscr:"\u{1D4AB}",pscr:"\u{1D4C5}",Psi:"\u03A8",psi:"\u03C8",puncsp:"\u2008",Qfr:"\u{1D514}",qfr:"\u{1D52E}",qint:"\u2A0C",Qopf:"\u211A",qopf:"\u{1D562}",qprime:"\u2057",Qscr:"\u{1D4AC}",qscr:"\u{1D4C6}",quaternions:"\u210D",quatint:"\u2A16",quest:"?",questeq:"\u225F",QUOT:'"',quot:'"',rAarr:"\u21DB",race:"\u223D\u0331",Racute:"\u0154",racute:"\u0155",radic:"\u221A",raemptyv:"\u29B3",Rang:"\u27EB",rang:"\u27E9",rangd:"\u2992",range:"\u29A5",rangle:"\u27E9",raquo:"\xBB",Rarr:"\u21A0",rArr:"\u21D2",rarr:"\u2192",rarrap:"\u2975",rarrb:"\u21E5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291E",rarrhk:"\u21AA",rarrlp:"\u21AC",rarrpl:"\u2945",rarrsim:"\u2974",Rarrtl:"\u2916",rarrtl:"\u21A3",rarrw:"\u219D",rAtail:"\u291C",ratail:"\u291A",ratio:"\u2236",rationals:"\u211A",RBarr:"\u2910",rBarr:"\u290F",rbarr:"\u290D",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",Rcaron:"\u0158",rcaron:"\u0159",Rcedil:"\u0156",rcedil:"\u0157",rceil:"\u2309",rcub:"}",Rcy:"\u0420",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201D",rdquor:"\u201D",rdsh:"\u21B3",Re:"\u211C",real:"\u211C",realine:"\u211B",realpart:"\u211C",reals:"\u211D",rect:"\u25AD",REG:"\xAE",reg:"\xAE",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",rfisht:"\u297D",rfloor:"\u230B",Rfr:"\u211C",rfr:"\u{1D52F}",rHar:"\u2964",rhard:"\u21C1",rharu:"\u21C0",rharul:"\u296C",Rho:"\u03A1",rho:"\u03C1",rhov:"\u03F1",RightAngleBracket:"\u27E9",RightArrow:"\u2192",Rightarrow:"\u21D2",rightarrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",rightarrowtail:"\u21A3",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",rightharpoondown:"\u21C1",rightharpoonup:"\u21C0",rightleftarrows:"\u21C4",rightleftharpoons:"\u21CC",rightrightarrows:"\u21C9",rightsquigarrow:"\u219D",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",rightthreetimes:"\u22CC",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",ring:"\u02DA",risingdotseq:"\u2253",rlarr:"\u21C4",rlhar:"\u21CC",rlm:"\u200F",rmoust:"\u23B1",rmoustache:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",robrk:"\u27E7",ropar:"\u2986",Ropf:"\u211D",ropf:"\u{1D563}",roplus:"\u2A2E",rotimes:"\u2A35",RoundImplies:"\u2970",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",Rrightarrow:"\u21DB",rsaquo:"\u203A",Rscr:"\u211B",rscr:"\u{1D4C7}",Rsh:"\u21B1",rsh:"\u21B1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22CC",rtimes:"\u22CA",rtri:"\u25B9",rtrie:"\u22B5",rtrif:"\u25B8",rtriltri:"\u29CE",RuleDelayed:"\u29F4",ruluhar:"\u2968",rx:"\u211E",Sacute:"\u015A",sacute:"\u015B",sbquo:"\u201A",Sc:"\u2ABC",sc:"\u227B",scap:"\u2AB8",Scaron:"\u0160",scaron:"\u0161",sccue:"\u227D",scE:"\u2AB4",sce:"\u2AB0",Scedil:"\u015E",scedil:"\u015F",Scirc:"\u015C",scirc:"\u015D",scnap:"\u2ABA",scnE:"\u2AB6",scnsim:"\u22E9",scpolint:"\u2A13",scsim:"\u227F",Scy:"\u0421",scy:"\u0441",sdot:"\u22C5",sdotb:"\u22A1",sdote:"\u2A66",searhk:"\u2925",seArr:"\u21D8",searr:"\u2198",searrow:"\u2198",sect:"\xA7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",Sfr:"\u{1D516}",sfr:"\u{1D530}",sfrown:"\u2322",sharp:"\u266F",SHCHcy:"\u0429",shchcy:"\u0449",SHcy:"\u0428",shcy:"\u0448",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",shortmid:"\u2223",shortparallel:"\u2225",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",shy:"\xAD",Sigma:"\u03A3",sigma:"\u03C3",sigmaf:"\u03C2",sigmav:"\u03C2",sim:"\u223C",simdot:"\u2A6A",sime:"\u2243",simeq:"\u2243",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",slarr:"\u2190",SmallCircle:"\u2218",smallsetminus:"\u2216",smashp:"\u2A33",smeparsl:"\u29E4",smid:"\u2223",smile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",SOFTcy:"\u042C",softcy:"\u044C",sol:"/",solb:"\u29C4",solbar:"\u233F",Sopf:"\u{1D54A}",sopf:"\u{1D564}",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\uFE00",sqcup:"\u2294",sqcups:"\u2294\uFE00",Sqrt:"\u221A",sqsub:"\u228F",sqsube:"\u2291",sqsubset:"\u228F",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25A1",Square:"\u25A1",square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",squarf:"\u25AA",squf:"\u25AA",srarr:"\u2192",Sscr:"\u{1D4AE}",sscr:"\u{1D4C8}",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22C6",Star:"\u22C6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03F5",straightphi:"\u03D5",strns:"\xAF",Sub:"\u22D0",sub:"\u2282",subdot:"\u2ABD",subE:"\u2AC5",sube:"\u2286",subedot:"\u2AC3",submult:"\u2AC1",subnE:"\u2ACB",subne:"\u228A",subplus:"\u2ABF",subrarr:"\u2979",Subset:"\u22D0",subset:"\u2282",subseteq:"\u2286",subseteqq:"\u2AC5",SubsetEqual:"\u2286",subsetneq:"\u228A",subsetneqq:"\u2ACB",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",succ:"\u227B",succapprox:"\u2AB8",succcurlyeq:"\u227D",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",succeq:"\u2AB0",succnapprox:"\u2ABA",succneqq:"\u2AB6",succnsim:"\u22E9",succsim:"\u227F",SuchThat:"\u220B",Sum:"\u2211",sum:"\u2211",sung:"\u266A",Sup:"\u22D1",sup:"\u2283",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",supdot:"\u2ABE",supdsub:"\u2AD8",supE:"\u2AC6",supe:"\u2287",supedot:"\u2AC4",Superset:"\u2283",SupersetEqual:"\u2287",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supnE:"\u2ACC",supne:"\u228B",supplus:"\u2AC0",Supset:"\u22D1",supset:"\u2283",supseteq:"\u2287",supseteqq:"\u2AC6",supsetneq:"\u228B",supsetneqq:"\u2ACC",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swarhk:"\u2926",swArr:"\u21D9",swarr:"\u2199",swarrow:"\u2199",swnwar:"\u292A",szlig:"\xDF",Tab:" ",target:"\u2316",Tau:"\u03A4",tau:"\u03C4",tbrk:"\u23B4",Tcaron:"\u0164",tcaron:"\u0165",Tcedil:"\u0162",tcedil:"\u0163",Tcy:"\u0422",tcy:"\u0442",tdot:"\u20DB",telrec:"\u2315",Tfr:"\u{1D517}",tfr:"\u{1D531}",there4:"\u2234",Therefore:"\u2234",therefore:"\u2234",Theta:"\u0398",theta:"\u03B8",thetasym:"\u03D1",thetav:"\u03D1",thickapprox:"\u2248",thicksim:"\u223C",ThickSpace:"\u205F\u200A",thinsp:"\u2009",ThinSpace:"\u2009",thkap:"\u2248",thksim:"\u223C",THORN:"\xDE",thorn:"\xFE",Tilde:"\u223C",tilde:"\u02DC",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",times:"\xD7",timesb:"\u22A0",timesbar:"\u2A31",timesd:"\u2A30",tint:"\u222D",toea:"\u2928",top:"\u22A4",topbot:"\u2336",topcir:"\u2AF1",Topf:"\u{1D54B}",topf:"\u{1D565}",topfork:"\u2ADA",tosa:"\u2929",tprime:"\u2034",TRADE:"\u2122",trade:"\u2122",triangle:"\u25B5",triangledown:"\u25BF",triangleleft:"\u25C3",trianglelefteq:"\u22B4",triangleq:"\u225C",triangleright:"\u25B9",trianglerighteq:"\u22B5",tridot:"\u25EC",trie:"\u225C",triminus:"\u2A3A",TripleDot:"\u20DB",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",Tscr:"\u{1D4AF}",tscr:"\u{1D4C9}",TScy:"\u0426",tscy:"\u0446",TSHcy:"\u040B",tshcy:"\u045B",Tstrok:"\u0166",tstrok:"\u0167",twixt:"\u226C",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",Uacute:"\xDA",uacute:"\xFA",Uarr:"\u219F",uArr:"\u21D1",uarr:"\u2191",Uarrocir:"\u2949",Ubrcy:"\u040E",ubrcy:"\u045E",Ubreve:"\u016C",ubreve:"\u016D",Ucirc:"\xDB",ucirc:"\xFB",Ucy:"\u0423",ucy:"\u0443",udarr:"\u21C5",Udblac:"\u0170",udblac:"\u0171",udhar:"\u296E",ufisht:"\u297E",Ufr:"\u{1D518}",ufr:"\u{1D532}",Ugrave:"\xD9",ugrave:"\xF9",uHar:"\u2963",uharl:"\u21BF",uharr:"\u21BE",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",Umacr:"\u016A",umacr:"\u016B",uml:"\xA8",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",Uogon:"\u0172",uogon:"\u0173",Uopf:"\u{1D54C}",uopf:"\u{1D566}",UpArrow:"\u2191",Uparrow:"\u21D1",uparrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",UpDownArrow:"\u2195",Updownarrow:"\u21D5",updownarrow:"\u2195",UpEquilibrium:"\u296E",upharpoonleft:"\u21BF",upharpoonright:"\u21BE",uplus:"\u228E",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",Upsi:"\u03D2",upsi:"\u03C5",upsih:"\u03D2",Upsilon:"\u03A5",upsilon:"\u03C5",UpTee:"\u22A5",UpTeeArrow:"\u21A5",upuparrows:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",Uring:"\u016E",uring:"\u016F",urtri:"\u25F9",Uscr:"\u{1D4B0}",uscr:"\u{1D4CA}",utdot:"\u22F0",Utilde:"\u0168",utilde:"\u0169",utri:"\u25B5",utrif:"\u25B4",uuarr:"\u21C8",Uuml:"\xDC",uuml:"\xFC",uwangle:"\u29A7",vangrt:"\u299C",varepsilon:"\u03F5",varkappa:"\u03F0",varnothing:"\u2205",varphi:"\u03D5",varpi:"\u03D6",varpropto:"\u221D",vArr:"\u21D5",varr:"\u2195",varrho:"\u03F1",varsigma:"\u03C2",varsubsetneq:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vartheta:"\u03D1",vartriangleleft:"\u22B2",vartriangleright:"\u22B3",Vbar:"\u2AEB",vBar:"\u2AE8",vBarv:"\u2AE9",Vcy:"\u0412",vcy:"\u0432",VDash:"\u22AB",Vdash:"\u22A9",vDash:"\u22A8",vdash:"\u22A2",Vdashl:"\u2AE6",Vee:"\u22C1",vee:"\u2228",veebar:"\u22BB",veeeq:"\u225A",vellip:"\u22EE",Verbar:"\u2016",verbar:"|",Vert:"\u2016",vert:"|",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200A",Vfr:"\u{1D519}",vfr:"\u{1D533}",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",Vopf:"\u{1D54D}",vopf:"\u{1D567}",vprop:"\u221D",vrtri:"\u22B3",Vscr:"\u{1D4B1}",vscr:"\u{1D4CB}",vsubnE:"\u2ACB\uFE00",vsubne:"\u228A\uFE00",vsupnE:"\u2ACC\uFE00",vsupne:"\u228B\uFE00",Vvdash:"\u22AA",vzigzag:"\u299A",Wcirc:"\u0174",wcirc:"\u0175",wedbar:"\u2A5F",Wedge:"\u22C0",wedge:"\u2227",wedgeq:"\u2259",weierp:"\u2118",Wfr:"\u{1D51A}",wfr:"\u{1D534}",Wopf:"\u{1D54E}",wopf:"\u{1D568}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",Wscr:"\u{1D4B2}",wscr:"\u{1D4CC}",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",Xfr:"\u{1D51B}",xfr:"\u{1D535}",xhArr:"\u27FA",xharr:"\u27F7",Xi:"\u039E",xi:"\u03BE",xlArr:"\u27F8",xlarr:"\u27F5",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",Xopf:"\u{1D54F}",xopf:"\u{1D569}",xoplus:"\u2A01",xotime:"\u2A02",xrArr:"\u27F9",xrarr:"\u27F6",Xscr:"\u{1D4B3}",xscr:"\u{1D4CD}",xsqcup:"\u2A06",xuplus:"\u2A04",xutri:"\u25B3",xvee:"\u22C1",xwedge:"\u22C0",Yacute:"\xDD",yacute:"\xFD",YAcy:"\u042F",yacy:"\u044F",Ycirc:"\u0176",ycirc:"\u0177",Ycy:"\u042B",ycy:"\u044B",yen:"\xA5",Yfr:"\u{1D51C}",yfr:"\u{1D536}",YIcy:"\u0407",yicy:"\u0457",Yopf:"\u{1D550}",yopf:"\u{1D56A}",Yscr:"\u{1D4B4}",yscr:"\u{1D4CE}",YUcy:"\u042E",yucy:"\u044E",Yuml:"\u0178",yuml:"\xFF",Zacute:"\u0179",zacute:"\u017A",Zcaron:"\u017D",zcaron:"\u017E",Zcy:"\u0417",zcy:"\u0437",Zdot:"\u017B",zdot:"\u017C",zeetrf:"\u2128",ZeroWidthSpace:"\u200B",Zeta:"\u0396",zeta:"\u03B6",Zfr:"\u2128",zfr:"\u{1D537}",ZHcy:"\u0416",zhcy:"\u0436",zigrarr:"\u21DD",Zopf:"\u2124",zopf:"\u{1D56B}",Zscr:"\u{1D4B5}",zscr:"\u{1D4CF}",zwj:"\u200D",zwnj:"\u200C"});yr.entityMap=yr.HTML_ENTITIES});var $s=Ge(bn=>{"use strict";var qt=mt(),N=fa(),Is=dr(),Qc=qt.isHTMLEscapableRawTextElement,ed=qt.isHTMLMimeType,td=qt.isHTMLRawTextElement,Er=qt.hasOwn,Ss=qt.NAMESPACE,rd=Is.ParseError,nd=Is.DOMException,Pt=0,ot=1,$t=2,vr=3,Ft=4,Ut=5,kr=6,_n=7;function Ms(){}Ms.prototype={parse:function(t,e,r){var n=this.domBuilder;n.startDocument(),od(e,e=Object.create(null)),ad(t,e,r,n,this.errorHandler),n.endDocument()}};var Ea=/&#?\w+;?/g;function ad(t,e,r,n,a){var i=ed(n.mimeType);t.indexOf(N.UNICODE_REPLACEMENT_CHARACTER)>=0&&a.warning("Unicode replacement character detected, source encoding issues?");function s(R){if(R>65535){R-=65536;var ye=55296+(R>>10),Fr=56320+(R&1023);return String.fromCharCode(ye,Fr)}else return String.fromCharCode(R)}function o(R){var ye=R[R.length-1]===";"?R:R+";";if(!i&&ye!==R)return a.error("EntityRef: expecting ;"),R;var Fr=N.Reference.exec(ye);if(!Fr||Fr[0].length!==ye.length)return a.error("entity not matching Reference production: "+R),R;var Ur=ye.slice(1,-1);return Er(r,Ur)?r[Ur]:Ur.charAt(0)==="#"?s(parseInt(Ur.substring(1).replace("x","0x"))):(a.error("entity not found:"+R),R)}function u(R){if(R>_){var ye=t.substring(_,R).replace(Ea,o);f&&p(_),n.characters(ye,0,R-_),_=R}}var l=0,c=0,d=/\r\n?|\n|$/g,f=n.locator;function p(R,ye){for(;R>=c&&(ye=d.exec(t));)l=c,c=ye.index+ye[0].length,f.lineNumber++;f.columnNumber=R-l+1}for(var h=[{currentNSMap:e}],m=[],_=0;;){try{var b=t.indexOf("<",_);if(b<0){if(!i&&m.length>0)return a.fatalError("unclosed xml tag(s): "+m.join(", "));if(!t.substring(_).match(/^\s*$/)){var v=n.doc,w=v.createTextNode(t.substring(_));if(v.documentElement)return a.error("Extra content at the end of the document");v.appendChild(w),n.currentElement=w}return}if(b>_){var x=t.substring(_,b);!i&&m.length===0&&(x=x.replace(new RegExp(N.S_OPT.source,"g"),""),x&&a.error("Unexpected content outside root element: '"+x+"'")),u(b)}switch(t.charAt(b+1)){case"/":var S=t.indexOf(">",b+2),B=t.substring(b+2,S>0?S:void 0);if(!B)return a.fatalError("end tag name missing");var L=N.reg("^",N.QName_group,N.S_OPT,"$"),G=S>0&&L.exec(B);if(!G){var re=S>0&&N.reg("^",N.QName_group).exec(B);if(i&&re)a.warning('end tag name contains invalid trailing characters: "'+B+'"'),G=re;else if(re&&new RegExp(L.source,L.flags+"m").test(B))a.error('end tag name is followed by a line break and trailing content: "'+B+'"'),G=re;else return a.fatalError('end tag name contains invalid characters: "'+B+'"')}if(!n.currentElement&&!n.doc.documentElement)return;var ne=m[m.length-1]||n.currentElement.tagName||n.doc.documentElement.tagName||"";if(ne!==G[1]){var Pe=G[1].toLowerCase();if(!i||ne.toLowerCase()!==Pe)return a.fatalError('Opening and ending tag mismatch: "'+ne+'" != "'+B+'"')}var Y=h.pop();m.pop();var de=Y.localNSMap;if(n.endElement(Y.uri,Y.localName,ne),de)for(var we in de)Er(de,we)&&n.endPrefixMapping(we);S++;break;case"?":f&&p(b),S=ud(t,b,n,a);break;case"!":f&&p(b),S=Ls(t,b,n,a,i);break;default:f&&p(b);var F=new Ps,X=h[h.length-1].currentNSMap,S=id(t,b,F,X,o,a,i),ti=F.length;if(F.closed||(i&&qt.isHTMLVoidElement(F.tagName)?F.closed=!0:m.push(F.tagName)),f&&ti){for(var Jo=Os(f,{}),$n=0;$n<ti;$n++){var ri=F[$n];p(ri.offset),ri.locator=Os(f,{})}n.locator=Jo,Bs(F,n,X)&&h.push(F),n.locator=f}else Bs(F,n,X)&&h.push(F);i&&!F.closed?S=sd(t,S,F.tagName,o,n):S++}}catch(R){if(R instanceof rd)throw R;if(R instanceof nd)return a.fatalError("Error constructing the DOM: "+R.name+": "+R.message,R);a.error("element parse error: "+R),S=-1}S>_?_=S:u(Math.max(b,_)+1)}}function Os(t,e){return e.lineNumber=t.lineNumber,e.columnNumber=t.columnNumber,e}function id(t,e,r,n,a,i,s){function o(p,h,m){if(Er(r.attributeNames,p))return i.fatalError("Attribute "+p+" redefined");if(!s&&h.indexOf("<")>=0)return i.fatalError("Unescaped '<' not allowed in attributes values");r.addValue(p,h.replace(/[\t\n\r]/g," ").replace(Ea,a),m)}for(var u,l,c=++e,d=Pt;;){var f=t.charAt(c);if(d===Pt&&f==="<")throw new Error("unexpected < in tag name: "+t.slice(e,c));switch(f){case"=":if(d===ot)u=t.slice(e,c),d=vr;else if(d===$t)d=vr;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(d===vr||d===ot)if(d===ot&&(i.warning('attribute value must after "="'),u=t.slice(e,c)),e=c+1,c=t.indexOf(f,e),c>0)l=t.slice(e,c),o(u,l,e-1),d=Ut;else throw new Error("attribute value no end '"+f+"' match");else if(d==Ft)l=t.slice(e,c),o(u,l,e),i.warning('attribute "'+u+'" missed start quot('+f+")!!"),e=c+1,d=Ut;else throw new Error('attribute value must after "="');break;case"/":switch(d){case Pt:r.setTagName(t.slice(e,c));case Ut:case kr:case _n:d=_n,r.closed=!0;case Ft:case ot:break;case $t:r.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return i.error("unexpected end of input"),d==Pt&&r.setTagName(t.slice(e,c)),c;case">":switch(d){case Pt:r.setTagName(t.slice(e,c));case Ut:case kr:case _n:break;case Ft:case ot:l=t.slice(e,c),l.slice(-1)==="/"&&(r.closed=!0,l=l.slice(0,-1));case $t:d===$t&&(l=u),d==Ft?(i.warning('attribute "'+l+'" missed quot(")!'),o(u,l,e)):(s||i.warning('attribute "'+l+'" missed value!! "'+l+'" instead!!'),o(l,l,e));break;case vr:if(!s)return i.fatalError(`AttValue: ' or " expected`)}return c;case"\x80":f=" ";default:if(f<=" ")switch(d){case Pt:r.setTagName(t.slice(e,c)),d=kr;break;case ot:u=t.slice(e,c),d=$t;break;case Ft:var l=t.slice(e,c);i.warning('attribute "'+l+'" missed quot(")!!'),o(u,l,e);case Ut:d=kr;break}else switch(d){case $t:s||i.warning('attribute "'+u+'" missed value!! "'+u+'" instead2!!'),o(u,u,e),e=c,d=ot;break;case Ut:i.warning('attribute space is required"'+u+'"!!');case kr:d=ot,e=c;break;case vr:d=Ft,e=c;break;case _n:throw new Error("elements closed character '/' and '>' must be connected to")}}c++}}function Bs(t,e,r){for(var n=t.tagName,a=null,d=t.length;d--;){var i=t[d],s=i.qName,o=i.value,f=s.indexOf(":");if(f>0)var u=i.prefix=s.slice(0,f),l=s.slice(f+1),c=u==="xmlns"&&l;else l=s,u=null,c=s==="xmlns"&&"";i.localName=l,c!==!1&&(a==null&&(a=Object.create(null),r=Object.create(r)),r[c]=a[c]=o,i.uri=Ss.XMLNS,e.startPrefixMapping(c,o))}for(var d=t.length;d--;)i=t[d],i.prefix&&(i.prefix==="xml"&&(i.uri=Ss.XML),i.prefix!=="xmlns"&&(i.uri=r[i.prefix]));var f=n.indexOf(":");f>0?(u=t.prefix=n.slice(0,f),l=t.localName=n.slice(f+1)):(u=null,l=t.localName=n);var p=t.uri=r[u||""];if(e.startElement(p,l,n,t),t.closed){if(e.endElement(p,l,n),a)for(u in a)Er(a,u)&&e.endPrefixMapping(u)}else return t.currentNSMap=r,t.localNSMap=a,!0}function sd(t,e,r,n,a){var i=Qc(r);if(i||td(r)){var s=new RegExp("</"+r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+">","ig");s.lastIndex=e;var o=s.exec(t),u=o?o.index:-1;if(u<0)return e+1;var l=t.substring(e+1,u);return i&&(l=l.replace(Ea,n)),a.characters(l,0,l.length),u}return e+1}function od(t,e){for(var r in t)Er(t,r)&&(e[r]=t[r])}function Rs(t,e){var r=e;function n(c){return c=c||0,t.charAt(r+c)}function a(c){c=c||1,r+=c}function i(){for(var c=0;r<t.length;){var d=n();if(d!==" "&&d!==`
|
|
3
|
-
`&&d!==" "&&d!=="\r")return c;c++,a()}return-1}function s(){return t.substring(r)}function o(c){return t.substring(r,r+c.length)===c}function u(c){return t.substring(r,r+c.length).toUpperCase()===c.toUpperCase()}function l(c){var d=N.reg("^",c),f=d.exec(s());return f?(a(f[0].length),f[0]):null}return{char:n,getIndex:function(){return r},getMatch:l,getSource:function(){return t},skip:a,skipBlanks:i,substringFromIndex:s,substringStartsWith:o,substringStartsWithCaseInsensitive:u}}function ld(t,e){function r(o,u){var l=N.PI.exec(o.substringFromIndex());return l?l[1].toLowerCase()==="xml"?u.fatalError("xml declaration is only allowed at the start of the document, but found at position "+o.getIndex()):(o.skip(l[0].length),l[0]):u.fatalError("processing instruction is not well-formed at position "+o.getIndex())}var n=t.getSource();if(t.char()==="["){t.skip(1);for(var a=t.getIndex();t.getIndex()<n.length;){if(t.skipBlanks(),t.char()==="]"){var i=n.substring(a,t.getIndex());return t.skip(1),i}var s=null;if(t.char()==="<"&&t.char(1)==="!")switch(t.char(2)){case"E":t.char(3)==="L"?s=t.getMatch(N.elementdecl):t.char(3)==="N"&&(s=t.getMatch(N.EntityDecl));break;case"A":s=t.getMatch(N.AttlistDecl);break;case"N":s=t.getMatch(N.NotationDecl);break;case"-":s=t.getMatch(N.Comment);break}else if(t.char()==="<"&&t.char(1)==="?")s=r(t,e);else if(t.char()==="%")s=t.getMatch(N.PEReference);else return e.fatalError("Error detected in Markup declaration");if(!s)return e.fatalError("Error in internal subset at position "+t.getIndex())}return e.fatalError("doctype internal subset is not well-formed, missing ]")}}function
|
|
1
|
+
import{b as Ge,c as ii,d as qr,e as si}from"./modules/chunk-AU4HFPIY.js";var mt=Ge(se=>{"use strict";function Eu(t,e,r){if(r===void 0&&(r=Array.prototype),t&&typeof r.find=="function")return r.find.call(t,e);for(var n=0;n<t.length;n++)if(ht(t,n)){var a=t[n];if(e.call(void 0,a,n,t))return a}}function Tt(t,e){return e===void 0&&(e=Object),e&&typeof e.getOwnPropertyDescriptors=="function"&&(t=e.create(null,e.getOwnPropertyDescriptors(t))),e&&typeof e.freeze=="function"?e.freeze(t):t}function ht(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function xu(t,e){if(t===null||typeof t!="object")throw new TypeError("target is not an object");for(var r in e)ht(e,r)&&(t[r]=e[r]);return t}var Vi=Tt({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 Du(t){return ht(Vi,t.toLowerCase())}var zi=Tt({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 Au(t){return ht(zi,t.toLowerCase())}var ir=Tt({script:!1,style:!1,textarea:!0,title:!0});function Tu(t){var e=t.toLowerCase();return ht(ir,e)&&!ir[e]}function Cu(t){var e=t.toLowerCase();return ht(ir,e)&&ir[e]}function Hi(t){return t===sr.HTML}function Nu(t){return Hi(t)||t===sr.XML_XHTML_APPLICATION}var sr=Tt({HTML:"text/html",XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),Su=Object.keys(sr).map(function(t){return sr[t]});function Ou(t){return Su.indexOf(t)>-1}var Bu=Tt({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/"});se.assign=xu;se.find=Eu;se.freeze=Tt;se.HTML_BOOLEAN_ATTRIBUTES=Vi;se.HTML_RAW_TEXT_ELEMENTS=ir;se.HTML_VOID_ELEMENTS=zi;se.hasDefaultHTMLNamespace=Nu;se.hasOwn=ht;se.isHTMLBooleanAttribute=Du;se.isHTMLRawTextElement=Tu;se.isHTMLEscapableRawTextElement=Cu;se.isHTMLMimeType=Hi;se.isHTMLVoidElement=Au;se.isValidMimeType=Ou;se.MIME_TYPE=sr;se.NAMESPACE=Bu});var dr=Ge(cr=>{"use strict";var Iu=mt();function Gi(t,e){t.prototype=Object.create(Error.prototype,{constructor:{value:t},name:{value:t.name,enumerable:!0,writable:e}})}var lr=Iu.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"}),Xi=Object.keys(lr);function Yi(t){return typeof t=="number"&&t>=1&&t<=25}function Mu(t){return typeof t=="string"&&t.substring(t.length-lr.Error.length)===lr.Error}function ur(t,e){Yi(t)?(this.name=Xi[t],this.message=e||""):(this.message=t,this.name=Mu(e)?e:lr.Error),Error.captureStackTrace&&Error.captureStackTrace(this,ur)}Gi(ur,!0);Object.defineProperties(ur.prototype,{code:{enumerable:!0,get:function(){var t=Xi.indexOf(this.name);return Yi(t)?t:0}}});var Zi={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},ia=Object.entries(Zi);for(or=0;or<ia.length;or++)Wi=ia[or][0],ur[Wi]=ia[or][1];var Wi,or;function sa(t,e,r){this.message=t,this.locator=e,this.cause=r,Error.captureStackTrace&&Error.captureStackTrace(this,sa)}Gi(sa);cr.DOMException=ur;cr.DOMExceptionName=lr;cr.ExceptionCode=Zi;cr.ParseError=sa});var pa=Ge(C=>{"use strict";function rs(t){try{typeof t!="function"&&(t=RegExp);var e=new t("\u{1D306}","u").exec("\u{1D306}");return!!e&&e[0].length===2}catch{}return!1}var St=rs();function rt(t){if(t.source[0]!=="[")throw new Error(t+" can not be used with chars");return t.source.slice(1,t.source.lastIndexOf("]"))}function Ct(t,e){if(t.source[0]!=="[")throw new Error("/"+t.source+"/ can not be used with chars_without");if(!e||typeof e!="string")throw new Error(JSON.stringify(e)+" is not a valid search");if(t.source.indexOf(e)===-1)throw new Error('"'+e+'" is not is /'+t.source+"/");if(e==="-"&&t.source.indexOf(e)!==1)throw new Error('"'+e+'" is not at the first postion of /'+t.source+"/");return new RegExp(t.source.replace(e,""),St?"u":"")}function O(t){var e=this;return new RegExp(Array.prototype.slice.call(arguments).map(function(r){var n=typeof r=="string";if(n&&e===void 0&&r==="|")throw new Error("use regg instead of reg to wrap expressions with `|`!");return n?r:r.source}).join(""),St?"u":"")}function A(t){if(arguments.length===0)throw new Error("no parameters provided");return O.apply(A,["(?:"].concat(Array.prototype.slice.call(arguments),[")"]))}var Ru="\uFFFD",nt=/[-\x09\x0A\x0D\x20-\x2C\x2E-\uD7FF\uE000-\uFFFD]/;St&&(nt=O("[",rt(nt),"\\u{10000}-\\u{10FFFF}","]"));var Lu=new RegExp("[^"+rt(nt)+"]",St?"u":""),an=/[\x20\x09\x0D\x0A]/,Pu=rt(an),$=O(an,"+"),q=O(an,"*"),fr=/[:_a-zA-Z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;St&&(fr=O("[",rt(fr),"\\u{10000}-\\u{10FFFF}","]"));var $u=rt(fr),ua=O("[",$u,rt(/[-.0-9\xB7]/),rt(/[\u0300-\u036F\u203F-\u2040]/),"]"),_e=O(fr,ua,"*"),Fu=O("^",_e,"$"),Ji=O(ua,"+"),Uu=O("&",_e,";"),qu=A(/&#[0-9]+;|&#x[0-9a-fA-F]+;/),pr=A(Uu,"|",qu),hr=O("%",_e,";"),ca=A(O('"',A(/[^%&"]/,"|",hr,"|",pr),"*",'"'),"|",O("'",A(/[^%&']/,"|",hr,"|",pr),"*","'")),ju=A('"',A(/[^<&"]/,"|",pr),"*",'"',"|","'",A(/[^<&']/,"|",pr),"*","'"),Vu=Ct(fr,":"),zu=Ct(ua,":"),oa=O(Vu,zu,"*"),Hu=O("^",oa,"$"),mr=O(oa,A(":",oa),"?"),Wu=O("^",mr,"$"),Gu=O("(",mr,")"),Nt=A(/"[^"]*"|'[^']*'/),Xu=O(/^<\?/,"(",_e,")",A($,"(?!",an,")(",nt,"*?)"),"?",/\?>/),Ki=/[\x20\x0D\x0Aa-zA-Z0-9-'()+,./:=?;!*#@$_%]/,gr=A('"',Ki,'*"',"|","'",Ct(Ki,"'"),"*'"),ns="<!--",as="-->",Yu=O(ns,A(Ct(nt,"-"),"|",O("-",Ct(nt,"-"))),"*",as),Qi="#PCDATA",Zu=A(O(/\(/,q,Qi,A(q,/\|/,q,mr),"*",q,/\)\*/),"|",O(/\(/,q,Qi,q,/\)/)),Ju=/[?*+]?/,Ku=O(/\([^>]+\)/,Ju),Qu=A("EMPTY","|","ANY","|",Zu,"|",Ku),ec="<!ELEMENT",tc=O(ec,$,A(mr,"|",hr),$,A(Qu,"|",hr),q,">"),rc=O("NOTATION",$,/\(/,q,_e,A(q,/\|/,q,_e),"*",q,/\)/),nc=O(/\(/,q,Ji,A(q,/\|/,q,Ji),"*",q,/\)/),ac=A(rc,"|",nc),ic=A(/CDATA|ID|IDREF|IDREFS|ENTITY|ENTITIES|NMTOKEN|NMTOKENS/,"|",ac),sc=A(/#REQUIRED|#IMPLIED/,"|",A(A("#FIXED",$),"?",ju)),oc=A($,_e,$,ic,$,sc),lc="<!ATTLIST",uc=O(lc,$,_e,oc,"*",q,">"),la="about:legacy-compat",cc=A('"'+la+'"',"|","'"+la+"'"),da="SYSTEM",sn="PUBLIC",on=A(A(da,$,Nt),"|",A(sn,$,gr,$,Nt)),dc=O("^",A(A(da,$,"(?<SystemLiteralOnly>",Nt,")"),"|",A(sn,$,"(?<PubidLiteral>",gr,")",$,"(?<SystemLiteral>",Nt,")"))),fc=O("^",gr,"$"),pc=O("^",Nt,"$"),hc=A($,"NDATA",$,_e),mc=A(ca,"|",A(on,hc,"?")),is="<!ENTITY",gc=O(is,$,_e,$,mc,q,">"),_c=A(ca,"|",on),bc=O(is,$,"%",$,_e,$,_c,q,">"),wc=A(gc,"|",bc),yc=O(sn,$,gr),vc=O("<!NOTATION",$,_e,$,A(on,"|",yc),q,">"),fa=O(q,"=",q),es=/1[.]\d+/,kc=O($,"version",fa,A("'",es,"'","|",'"',es,'"')),ts=/[A-Za-z][-A-Za-z0-9._]*/,Ec=A($,"encoding",fa,A('"',ts,'"',"|","'",ts,"'")),xc=A($,"standalone",fa,A("'",A("yes","|","no"),"'","|",'"',A("yes","|","no"),'"')),Dc=O(/^<\?xml/,kc,Ec,"?",xc,"?",q,/\?>/),Ac="<!DOCTYPE",Tc="<![CDATA[",Cc="]]>",Nc=/<!\[CDATA\[/,Sc=/\]\]>/,Oc=O(nt,"*?",Sc),Bc=O(Nc,Oc);C.chars=rt;C.chars_without=Ct;C.detectUnicodeSupport=rs;C.reg=O;C.regg=A;C.ABOUT_LEGACY_COMPAT=la;C.ABOUT_LEGACY_COMPAT_SystemLiteral=cc;C.AttlistDecl=uc;C.CDATA_START=Tc;C.CDATA_END=Cc;C.CDSect=Bc;C.Char=nt;C.Comment=Yu;C.COMMENT_START=ns;C.COMMENT_END=as;C.DOCTYPE_DECL_START=Ac;C.elementdecl=tc;C.EntityDecl=wc;C.EntityValue=ca;C.ExternalID=on;C.ExternalID_match=dc;C.Name=_e;C.Name_exact=Fu;C.NCName_exact=Hu;C.NotationDecl=vc;C.Reference=pr;C.PEReference=hr;C.PI=Xu;C.PUBLIC=sn;C.PubidLiteral=gr;C.PubidLiteral_match=fc;C.QName=mr;C.QName_exact=Wu;C.QName_group=Gu;C.S=$;C.SChar_s=Pu;C.S_OPT=q;C.SYSTEM=da;C.SystemLiteral=Nt;C.SystemLiteral_match=pc;C.InvalidChar=Lu;C.UNICODE_REPLACEMENT_CHARACTER=Ru;C.UNICODE_SUPPORT=St;C.XMLDecl=Dc});var Ea=Ge(z=>{"use strict";var ke=mt(),Be=ke.find,Ic=ke.hasDefaultHTMLNamespace,Bt=ke.hasOwn,Mc=ke.isHTMLMimeType,Rc=ke.isHTMLRawTextElement,Lc=ke.isHTMLVoidElement,_r=ke.MIME_TYPE,Ie=ke.NAMESPACE,fe=Symbol(),fs=dr(),y=fs.DOMException,ce=fs.DOMExceptionName,V=pa();function he(t){if(t!==fe)throw new TypeError("Illegal constructor")}function Pc(t){return t!==""}function $c(t){return t?t.split(/[\t\n\f\r ]+/).filter(Pc):[]}function Fc(t,e){return Bt(t,e)||(t[e]=!0),t}function ss(t){if(!t)return[];var e=$c(t);return Object.keys(e.reduce(Fc,{}))}function Uc(t){return function(e){return t&&t.indexOf(e)!==-1}}function ps(t){if(!V.QName_exact.test(t))throw new y(y.INVALID_CHARACTER_ERR,'invalid character in qualified name "'+t+'"')}function ma(t,e){ps(e),t=t||null;var r=null,n=e;if(e.indexOf(":")>=0){var a=e.split(":");r=a[0],n=a[1]}if(r!==null&&t===null)throw new y(y.NAMESPACE_ERR,"prefix is non-null and namespace is null");if(r==="xml"&&t!==ke.NAMESPACE.XML)throw new y(y.NAMESPACE_ERR,'prefix is "xml" and namespace is not the XML namespace');if((r==="xmlns"||e==="xmlns")&&t!==ke.NAMESPACE.XMLNS)throw new y(y.NAMESPACE_ERR,'either qualifiedName or prefix is "xmlns" and namespace is not the XMLNS namespace');if(t===ke.NAMESPACE.XMLNS&&r!=="xmlns"&&e!=="xmlns")throw new y(y.NAMESPACE_ERR,'namespace is the XMLNS namespace and neither qualifiedName nor prefix is "xmlns"');return[t,r,n]}function Rt(t,e){for(var r in t)Bt(t,r)&&(e[r]=t[r])}function me(t,e){var r=t.prototype;if(!(r instanceof e)){let n=function(){};n.prototype=e.prototype,n=new n,Rt(r,n),t.prototype=r=n}r.constructor!=t&&(typeof t!="function"&&console.error("unknown Class:"+t),r.constructor=t)}var ge={},ve=ge.ELEMENT_NODE=1,It=ge.ATTRIBUTE_NODE=2,br=ge.TEXT_NODE=3,hs=ge.CDATA_SECTION_NODE=4,ms=ge.ENTITY_REFERENCE_NODE=5,qc=ge.ENTITY_NODE=6,ga=ge.PROCESSING_INSTRUCTION_NODE=7,_a=ge.COMMENT_NODE=8,Ot=ge.DOCUMENT_NODE=9,gs=ge.DOCUMENT_TYPE_NODE=10,at=ge.DOCUMENT_FRAGMENT_NODE=11,jc=ge.NOTATION_NODE=12,j=ke.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 _s(t,e){if(e.length<t.length)return _s(e,t);var r=null;for(var n in t){if(t[n]!==e[n])return r;r=t[n]}return r}function os(t){return t.guid||(t.guid=Math.random()),t.guid}function K(){}K.prototype={length:0,item:function(t){return t>=0&&t<this.length?this[t]:null},toString:function(t){var e;typeof t=="function"?e={requireWellFormed:!1,splitCDATASections:!0,nodeFilter:t}:t?e={requireWellFormed:!!t.requireWellFormed,splitCDATASections:t.splitCDATASections!==!1,nodeFilter:t.nodeFilter||null}:e={requireWellFormed:!1,splitCDATASections:!0,nodeFilter:null};for(var r=[],n=0;n<this.length;n++)ka(this[n],r,null,e);return r.join("")},filter:function(t){return Array.prototype.filter.call(this,t)},indexOf:function(t){return Array.prototype.indexOf.call(this,t)}};K.prototype[Symbol.iterator]=function(){var t=this,e=0;return{next:function(){return e<t.length?{value:t[e++],done:!1}:{done:!0}},return:function(){return{done:!0}}}};function Oe(t,e){this._node=t,this._refresh=e,dn(this)}function dn(t){var e=t._node._inc||t._node.ownerDocument._inc;if(t._inc!==e){var r=t._refresh(t._node);if(Cs(t,"length",r.length),!t.$$length||r.length<t.$$length)for(var n=r.length;n in t;n++)Bt(t,n)&&delete t[n];Rt(r,t),t._inc=e}}Oe.prototype.item=function(t){return dn(this),this[t]||null};me(Oe,K);function Mt(){this._nsIndex=Object.create(null),this._noNsIndex=Object.create(null)}function bs(t,e){for(var r=0;r<t.length;){if(t[r]===e)return r;r++}}function ba(t,e,r){if(!e)return t._noNsIndex;var n=t._nsIndex[e];return!n&&r&&(n=t._nsIndex[e]=Object.create(null)),n}function Vc(t,e,r){var n=ba(t,e,!1),a=n&&n[r];return a||null}function zc(t,e){ba(t,e.namespaceURI,!0)[e.localName]=e}function Hc(t,e){var r=ba(t,e.namespaceURI,!1);r&&delete r[e.localName]}function Wc(t,e,r,n){if(n?e[bs(e,n)]=r:(e[e.length]=r,e.length++),zc(e,r),t){r.ownerElement=t;var a=t.ownerDocument;a&&(n&&vs(a,t,n),Gc(a,t,r))}}function ls(t,e,r){var n=bs(e,r);if(n>=0){for(var a=e.length-1;n<=a;)e[n]=e[++n];if(e.length=a,Hc(e,r),t){var i=t.ownerDocument;i&&vs(i,t,r),r.ownerElement=null}}}Mt.prototype={length:0,item:K.prototype.item,getNamedItem:function(t){this._ownerElement&&this._ownerElement._isInHTMLDocumentAndNamespace()&&(t=t.toLowerCase());for(var e=0;e<this.length;){var r=this[e];if(r.nodeName===t)return r;e++}return null},setNamedItem:function(t){var e=t.ownerElement;if(e&&e!==this._ownerElement)throw new y(y.INUSE_ATTRIBUTE_ERR);var r=Vc(this,t.namespaceURI,t.localName);return r===t?t:(Wc(this._ownerElement,this,t,r),r)},setNamedItemNS:function(t){return this.setNamedItem(t)},removeNamedItem:function(t){var e=this.getNamedItem(t);if(!e)throw new y(y.NOT_FOUND_ERR,t);return ls(this._ownerElement,this,e),e},removeNamedItemNS:function(t,e){var r=this.getNamedItemNS(t,e);if(!r)throw new y(y.NOT_FOUND_ERR,t?t+" : "+e:e);return ls(this._ownerElement,this,r),r},getNamedItemNS:function(t,e){t||(t=null);for(var r=0;r<this.length;){var n=this[r];if(n.localName===e&&n.namespaceURI===t)return n;r++}return null}};Mt.prototype[Symbol.iterator]=function(){var t=this,e=0;return{next:function(){return e<t.length?{value:t[e++],done:!1}:{done:!0}},return:function(){return{done:!0}}}};function ws(){}ws.prototype={hasFeature:function(t,e){return!0},createDocument:function(t,e,r){var n=_r.XML_APPLICATION;t===Ie.HTML?n=_r.XML_XHTML_APPLICATION:t===Ie.SVG&&(n=_r.XML_SVG_IMAGE);var a=new Ue(fe,{contentType:n});if(a.implementation=this,a.childNodes=new K,a.doctype=r||null,r&&a.appendChild(r),e){var i=a.createElementNS(t,e);a.appendChild(i)}return a},createDocumentType:function(t,e,r,n){ps(t);var a=new hn(fe);return a.name=t,a.nodeName=t,a.publicId=e||"",a.systemId=r||"",a.internalSubset=n||"",a.childNodes=new K,a},createHTMLDocument:function(t){var e=new Ue(fe,{contentType:_r.HTML});if(e.implementation=this,e.childNodes=new K,t!==!1){e.doctype=this.createDocumentType("html"),e.doctype.ownerDocument=e,e.appendChild(e.doctype);var r=e.createElement("html");e.appendChild(r);var n=e.createElement("head");if(r.appendChild(n),typeof t=="string"){var a=e.createElement("title");a.appendChild(e.createTextNode(t)),n.appendChild(a)}r.appendChild(e.createElement("body"))}return e}};function I(t){he(t)}I.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 t=this.getRootNode();return t&&t.nodeType===t.DOCUMENT_NODE},contains:function(t){if(!t)return!1;var e=t;do{if(this===e)return!0;e=e.parentNode}while(e);return!1},getRootNode:function(t){var e=this;do{if(!e.parentNode)return e;e=e.parentNode}while(e)},isEqualNode:function(t){if(!t)return!1;for(var e=[{node:this,other:t}];e.length>0;){var r=e.pop(),n=r.node,a=r.other;if(n.nodeType!==a.nodeType)return!1;switch(n.nodeType){case n.DOCUMENT_TYPE_NODE:if(n.name!==a.name||n.publicId!==a.publicId||n.systemId!==a.systemId)return!1;break;case n.ELEMENT_NODE:if(n.namespaceURI!==a.namespaceURI||n.prefix!==a.prefix||n.localName!==a.localName||n.attributes.length!==a.attributes.length)return!1;for(var i=0;i<n.attributes.length;i++){var s=n.attributes.item(i),o=a.getAttributeNodeNS(s.namespaceURI,s.localName);if(!o)return!1;e.push({node:s,other:o})}break;case n.ATTRIBUTE_NODE:if(n.namespaceURI!==a.namespaceURI||n.localName!==a.localName||n.value!==a.value)return!1;break;case n.PROCESSING_INSTRUCTION_NODE:if(n.target!==a.target||n.data!==a.data)return!1;break;case n.TEXT_NODE:case n.CDATA_SECTION_NODE:case n.COMMENT_NODE:if(n.data!==a.data)return!1;break}if(n.childNodes.length!==a.childNodes.length)return!1;for(var i=n.childNodes.length-1;i>=0;i--)e.push({node:n.childNodes[i],other:a.childNodes[i]})}return!0},isSameNode:function(t){return this===t},insertBefore:function(t,e){return cn(this,t,e)},replaceChild:function(t,e){cn(this,t,e,xs),e&&this.removeChild(e)},removeChild:function(t){return ks(this,t)},appendChild:function(t){return this.insertBefore(t,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(t){return Ts(this.ownerDocument||this,this,t)},normalize:function(){oe(this,null,{enter:function(t){for(var e=t.firstChild;e;){var r=e.nextSibling;if(r!==null&&r.nodeType===br&&e.nodeType===br){for(var n=[],a=r;a!==null&&a.nodeType===br;)n.push(a.data),a=a.nextSibling;for(var i=e.nextSibling;i!==a;){var s=i.nextSibling;i.parentNode=null,i.previousSibling=null,i.nextSibling=null,i=s}e.nextSibling=a,a!==null?a.previousSibling=e:t.lastChild=e,e.appendData(n.join("")),wa(t.ownerDocument,t),e=a}else e=r}return!0}})},isSupported:function(t,e){return this.ownerDocument.implementation.hasFeature(t,e)},lookupPrefix:function(t){for(var e=this;e;){var r=e._nsMap;if(r){for(var n in r)if(Bt(r,n)&&r[n]===t)return n}e=e.nodeType==It?e.ownerDocument:e.parentNode}return null},lookupNamespaceURI:function(t){for(var e=this;e;){var r=e._nsMap;if(r&&Bt(r,t))return r[t];e=e.nodeType==It?e.ownerDocument:e.parentNode}return null},isDefaultNamespace:function(t){var e=this.lookupPrefix(t);return e==null},compareDocumentPosition:function(t){if(this===t)return 0;var e=t,r=this,n=null,a=null;if(e instanceof gt&&(n=e,e=n.ownerElement),r instanceof gt&&(a=r,r=a.ownerElement,n&&e&&r===e))for(var i=0,s;s=r.attributes[i];i++){if(s===n)return j.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+j.DOCUMENT_POSITION_PRECEDING;if(s===a)return j.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+j.DOCUMENT_POSITION_FOLLOWING}if(!e||!r||r.ownerDocument!==e.ownerDocument)return j.DOCUMENT_POSITION_DISCONNECTED+j.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+(os(r.ownerDocument)>os(e.ownerDocument)?j.DOCUMENT_POSITION_FOLLOWING:j.DOCUMENT_POSITION_PRECEDING);if(a&&e===r)return j.DOCUMENT_POSITION_CONTAINS+j.DOCUMENT_POSITION_PRECEDING;if(n&&e===r)return j.DOCUMENT_POSITION_CONTAINED_BY+j.DOCUMENT_POSITION_FOLLOWING;for(var o=[],u=e.parentNode;u;){if(!a&&u===r)return j.DOCUMENT_POSITION_CONTAINED_BY+j.DOCUMENT_POSITION_FOLLOWING;o.push(u),u=u.parentNode}o.reverse();for(var l=[],c=r.parentNode;c;){if(!n&&c===e)return j.DOCUMENT_POSITION_CONTAINS+j.DOCUMENT_POSITION_PRECEDING;l.push(c),c=c.parentNode}l.reverse();var d=_s(o,l);for(var f in d.childNodes){var p=d.childNodes[f];if(p===r)return j.DOCUMENT_POSITION_FOLLOWING;if(p===e)return j.DOCUMENT_POSITION_PRECEDING;if(l.indexOf(p)>=0)return j.DOCUMENT_POSITION_FOLLOWING;if(o.indexOf(p)>=0)return j.DOCUMENT_POSITION_PRECEDING}return 0}};function ys(t){return t=="<"&&"<"||t==">"&&">"||t=="&"&&"&"||t=='"'&&"""||"&#"+t.charCodeAt()+";"}Rt(ge,I);Rt(ge,I.prototype);Rt(j,I);Rt(j,I.prototype);function un(t,e){oe(t,null,{enter:function(r){return e(r)?oe.STOP:!0}})}function oe(t,e,r){for(var n=[{node:t,context:e,phase:oe.ENTER}];n.length>0;){var a=n.pop();if(a.phase===oe.ENTER){var i=r.enter(a.node,a.context);if(i===oe.STOP)return oe.STOP;if(n.push({node:a.node,context:i,phase:oe.EXIT}),i==null)continue;for(var s=a.node.lastChild;s;)n.push({node:s,context:i,phase:oe.ENTER}),s=s.previousSibling}else r.exit&&r.exit(a.node,a.context)}}oe.STOP=Symbol("walkDOM.STOP");oe.ENTER=0;oe.EXIT=1;function Ue(t,e){he(t);var r=e||{};this.ownerDocument=this,this.contentType=r.contentType||_r.XML_APPLICATION,this.type=Mc(this.contentType)?"html":"xml"}function Gc(t,e,r){t&&t._inc++;var n=r.namespaceURI;n===Ie.XMLNS&&(e._nsMap[r.prefix?r.localName:""]=r.value)}function vs(t,e,r,n){t&&t._inc++;var a=r.namespaceURI;a===Ie.XMLNS&&delete e._nsMap[r.prefix?r.localName:""]}function wa(t,e,r){if(t&&t._inc){t._inc++;var n=e.childNodes;if(r&&!r.nextSibling)n[n.length++]=r;else{for(var a=e.firstChild,i=0;a;)n[i++]=a,a=a.nextSibling;n.length=i,delete n[n.length]}}}function ks(t,e){if(t!==e.parentNode)throw new y(y.NOT_FOUND_ERR,"child's parent is not parent");var r=e.previousSibling,n=e.nextSibling;return r?r.nextSibling=n:t.firstChild=n,n?n.previousSibling=r:t.lastChild=r,wa(t.ownerDocument,t),e.parentNode=null,e.previousSibling=null,e.nextSibling=null,e}function Xc(t){return t&&(t.nodeType===I.DOCUMENT_NODE||t.nodeType===I.DOCUMENT_FRAGMENT_NODE||t.nodeType===I.ELEMENT_NODE)}function Yc(t){return t&&(t.nodeType===I.CDATA_SECTION_NODE||t.nodeType===I.COMMENT_NODE||t.nodeType===I.DOCUMENT_FRAGMENT_NODE||t.nodeType===I.DOCUMENT_TYPE_NODE||t.nodeType===I.ELEMENT_NODE||t.nodeType===I.PROCESSING_INSTRUCTION_NODE||t.nodeType===I.TEXT_NODE)}function it(t){return t&&t.nodeType===I.DOCUMENT_TYPE_NODE}function Fe(t){return t&&t.nodeType===I.ELEMENT_NODE}function Es(t){return t&&t.nodeType===I.TEXT_NODE}function us(t,e){var r=t.childNodes||[];if(Be(r,Fe)||it(e))return!1;var n=Be(r,it);return!(e&&n&&r.indexOf(n)>r.indexOf(e))}function cs(t,e){var r=t.childNodes||[];function n(i){return Fe(i)&&i!==e}if(Be(r,n))return!1;var a=Be(r,it);return!(e&&a&&r.indexOf(a)>r.indexOf(e))}function Zc(t,e,r){if(!Xc(t))throw new y(y.HIERARCHY_REQUEST_ERR,"Unexpected parent node type "+t.nodeType);if(r&&r.parentNode!==t)throw new y(y.NOT_FOUND_ERR,"child not in parent");if(!Yc(e)||it(e)&&t.nodeType!==I.DOCUMENT_NODE)throw new y(y.HIERARCHY_REQUEST_ERR,"Unexpected node type "+e.nodeType+" for parent node type "+t.nodeType)}function Jc(t,e,r){var n=t.childNodes||[],a=e.childNodes||[];if(e.nodeType===I.DOCUMENT_FRAGMENT_NODE){var i=a.filter(Fe);if(i.length>1||Be(a,Es))throw new y(y.HIERARCHY_REQUEST_ERR,"More than one element or text in fragment");if(i.length===1&&!us(t,r))throw new y(y.HIERARCHY_REQUEST_ERR,"Element in fragment can not be inserted before doctype")}if(Fe(e)&&!us(t,r))throw new y(y.HIERARCHY_REQUEST_ERR,"Only one element can be added and only after doctype");if(it(e)){if(Be(n,it))throw new y(y.HIERARCHY_REQUEST_ERR,"Only one doctype is allowed");var s=Be(n,Fe);if(r&&n.indexOf(s)<n.indexOf(r))throw new y(y.HIERARCHY_REQUEST_ERR,"Doctype can only be inserted before an element");if(!r&&s)throw new y(y.HIERARCHY_REQUEST_ERR,"Doctype can not be appended since element is present")}}function xs(t,e,r){var n=t.childNodes||[],a=e.childNodes||[];if(e.nodeType===I.DOCUMENT_FRAGMENT_NODE){var i=a.filter(Fe);if(i.length>1||Be(a,Es))throw new y(y.HIERARCHY_REQUEST_ERR,"More than one element or text in fragment");if(i.length===1&&!cs(t,r))throw new y(y.HIERARCHY_REQUEST_ERR,"Element in fragment can not be inserted before doctype")}if(Fe(e)&&!cs(t,r))throw new y(y.HIERARCHY_REQUEST_ERR,"Only one element can be added and only after doctype");if(it(e)){if(Be(n,function(u){return it(u)&&u!==r}))throw new y(y.HIERARCHY_REQUEST_ERR,"Only one doctype is allowed");var s=Be(n,Fe);if(r&&n.indexOf(s)<n.indexOf(r))throw new y(y.HIERARCHY_REQUEST_ERR,"Doctype can only be inserted before an element")}}function cn(t,e,r,n){Zc(t,e,r),t.nodeType===I.DOCUMENT_NODE&&(n||Jc)(t,e,r);var a=e.parentNode;if(a&&a.removeChild(e),e.nodeType===at){var i=e.firstChild;if(i==null)return e;var s=e.lastChild}else i=s=e;var o=r?r.previousSibling:t.lastChild;i.previousSibling=o,s.nextSibling=r,o?o.nextSibling=i:t.firstChild=i,r==null?t.lastChild=s:r.previousSibling=s;do i.parentNode=t;while(i!==s&&(i=i.nextSibling));return wa(t.ownerDocument||t,t,e),e.nodeType==at&&(e.firstChild=e.lastChild=null),e}Ue.prototype={implementation:null,nodeName:"#document",nodeType:Ot,doctype:null,documentElement:null,_inc:1,insertBefore:function(t,e){if(t.nodeType===at){for(var r=t.firstChild;r;){var n=r.nextSibling;this.insertBefore(r,e),r=n}return t}return cn(this,t,e),t.ownerDocument=this,this.documentElement===null&&t.nodeType===ve&&(this.documentElement=t),t},removeChild:function(t){var e=ks(this,t);return e===this.documentElement&&(this.documentElement=null),e},replaceChild:function(t,e){cn(this,t,e,xs),t.ownerDocument=this,e&&this.removeChild(e),Fe(t)&&(this.documentElement=t)},importNode:function(t,e){return Kc(this,t,e)},getElementById:function(t){var e=null;return un(this.documentElement,function(r){if(r.nodeType==ve&&r.getAttribute("id")==t)return e=r,!0}),e},createElement:function(t){var e=new qe(fe);e.ownerDocument=this,this.type==="html"&&(t=t.toLowerCase()),Ic(this.contentType)&&(e.namespaceURI=Ie.HTML),e.nodeName=t,e.tagName=t,e.localName=t,e.childNodes=new K;var r=e.attributes=new Mt;return r._ownerElement=e,e},createDocumentFragment:function(){var t=new Lt(fe);return t.ownerDocument=this,t.childNodes=new K,t},createTextNode:function(t){var e=new wr(fe);return e.ownerDocument=this,e.childNodes=new K,e.appendData(t),e},createComment:function(t){var e=new fn(fe);return e.ownerDocument=this,e.childNodes=new K,e.appendData(t),e},createCDATASection:function(t){if(t.indexOf("]]>")!==-1)throw new y(y.INVALID_CHARACTER_ERR,'data contains "]]>"');var e=new pn(fe);return e.ownerDocument=this,e.childNodes=new K,e.appendData(t),e},createProcessingInstruction:function(t,e){var r=new gn(fe);return r.ownerDocument=this,r.childNodes=new K,r.nodeName=r.target=t,r.nodeValue=r.data=e,r},createAttribute:function(t){if(!V.QName_exact.test(t))throw new y(y.INVALID_CHARACTER_ERR,'invalid character in name "'+t+'"');return this.type==="html"&&(t=t.toLowerCase()),this._createAttribute(t)},_createAttribute:function(t){var e=new gt(fe);return e.ownerDocument=this,e.childNodes=new K,e.name=t,e.nodeName=t,e.localName=t,e.specified=!0,e},createEntityReference:function(t){if(!V.Name_exact.test(t))throw new y(y.INVALID_CHARACTER_ERR,'not a valid xml name "'+t+'"');if(this.type==="html")throw new y("document is an html document",ce.NotSupportedError);var e=new mn(fe);return e.ownerDocument=this,e.childNodes=new K,e.nodeName=t,e},createElementNS:function(t,e){var r=ma(t,e),n=new qe(fe),a=n.attributes=new Mt;return n.childNodes=new K,n.ownerDocument=this,n.nodeName=e,n.tagName=e,n.namespaceURI=r[0],n.prefix=r[1],n.localName=r[2],a._ownerElement=n,n},createAttributeNS:function(t,e){var r=ma(t,e),n=new gt(fe);return n.ownerDocument=this,n.childNodes=new K,n.nodeName=e,n.name=e,n.specified=!0,n.namespaceURI=r[0],n.prefix=r[1],n.localName=r[2],n}};me(Ue,I);function qe(t){he(t),this._nsMap=Object.create(null)}qe.prototype={nodeType:ve,attributes:null,getQualifiedName:function(){return this.prefix?this.prefix+":"+this.localName:this.localName},_isInHTMLDocumentAndNamespace:function(){return this.ownerDocument.type==="html"&&this.namespaceURI===Ie.HTML},hasAttributes:function(){return!!(this.attributes&&this.attributes.length)},hasAttribute:function(t){return!!this.getAttributeNode(t)},getAttribute:function(t){var e=this.getAttributeNode(t);return e?e.value:null},getAttributeNode:function(t){return this._isInHTMLDocumentAndNamespace()&&(t=t.toLowerCase()),this.attributes.getNamedItem(t)},setAttribute:function(t,e){this._isInHTMLDocumentAndNamespace()&&(t=t.toLowerCase());var r=this.getAttributeNode(t);r?r.value=r.nodeValue=""+e:(r=this.ownerDocument._createAttribute(t),r.value=r.nodeValue=""+e,this.setAttributeNode(r))},removeAttribute:function(t){var e=this.getAttributeNode(t);e&&this.removeAttributeNode(e)},setAttributeNode:function(t){return this.attributes.setNamedItem(t)},setAttributeNodeNS:function(t){return this.attributes.setNamedItemNS(t)},removeAttributeNode:function(t){return this.attributes.removeNamedItem(t.nodeName)},removeAttributeNS:function(t,e){var r=this.getAttributeNodeNS(t,e);r&&this.removeAttributeNode(r)},hasAttributeNS:function(t,e){return this.getAttributeNodeNS(t,e)!=null},getAttributeNS:function(t,e){var r=this.getAttributeNodeNS(t,e);return r?r.value:null},setAttributeNS:function(t,e,r){var n=ma(t,e),a=n[2],i=this.getAttributeNodeNS(t,a);i?i.value=i.nodeValue=""+r:(i=this.ownerDocument.createAttributeNS(t,e),i.value=i.nodeValue=""+r,this.setAttributeNode(i))},getAttributeNodeNS:function(t,e){return this.attributes.getNamedItemNS(t,e)},getElementsByClassName:function(t){var e=ss(t);return new Oe(this,function(r){var n=[];return e.length>0&&un(r,function(a){if(a!==r&&a.nodeType===ve){var i=a.getAttribute("class");if(i){var s=t===i;if(!s){var o=ss(i);s=e.every(Uc(o))}s&&n.push(a)}}}),n})},getElementsByTagName:function(t){var e=(this.nodeType===Ot?this:this.ownerDocument).type==="html",r=t.toLowerCase();return new Oe(this,function(n){var a=[];return un(n,function(i){if(!(i===n||i.nodeType!==ve))if(t==="*")a.push(i);else{var s=i.getQualifiedName(),o=e&&i.namespaceURI===Ie.HTML?r:t;s===o&&a.push(i)}}),a})},getElementsByTagNameNS:function(t,e){return new Oe(this,function(r){var n=[];return un(r,function(a){a!==r&&a.nodeType===ve&&(t==="*"||a.namespaceURI===t)&&(e==="*"||a.localName==e)&&n.push(a)}),n})}};Ue.prototype.getElementsByClassName=qe.prototype.getElementsByClassName;Ue.prototype.getElementsByTagName=qe.prototype.getElementsByTagName;Ue.prototype.getElementsByTagNameNS=qe.prototype.getElementsByTagNameNS;me(qe,I);function gt(t){he(t),this.namespaceURI=null,this.prefix=null,this.ownerElement=null}gt.prototype.nodeType=It;me(gt,I);function st(t){he(t)}st.prototype={data:"",substringData:function(t,e){return this.data.substring(t,t+e)},appendData:function(t){t=this.data+t,this.nodeValue=this.data=t,this.length=t.length},insertData:function(t,e){this.replaceData(t,0,e)},deleteData:function(t,e){this.replaceData(t,e,"")},replaceData:function(t,e,r){var n=this.data.substring(0,t),a=this.data.substring(t+e);r=n+r+a,this.nodeValue=this.data=r,this.length=r.length}};me(st,I);function wr(t){he(t)}wr.prototype={nodeName:"#text",nodeType:br,splitText:function(t){var e=this.data,r=e.substring(t);e=e.substring(0,t),this.data=this.nodeValue=e,this.length=e.length;var n=this.ownerDocument.createTextNode(r);return this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling),n}};me(wr,st);function fn(t){he(t)}fn.prototype={nodeName:"#comment",nodeType:_a};me(fn,st);function pn(t){he(t)}pn.prototype={nodeName:"#cdata-section",nodeType:hs};me(pn,wr);function hn(t){he(t)}hn.prototype.nodeType=gs;me(hn,I);function ya(t){he(t)}ya.prototype.nodeType=jc;me(ya,I);function va(t){he(t)}va.prototype.nodeType=qc;me(va,I);function mn(t){he(t)}mn.prototype.nodeType=ms;me(mn,I);function Lt(t){he(t)}Lt.prototype.nodeName="#document-fragment";Lt.prototype.nodeType=at;me(Lt,I);function gn(t){he(t)}gn.prototype.nodeType=ga;me(gn,st);function Ds(){}Ds.prototype.serializeToString=function(t,e){return As.call(t,e)};I.prototype.toString=As;function As(t){var e;typeof t=="function"?e={requireWellFormed:!1,splitCDATASections:!0,nodeFilter:t}:t!=null?e={requireWellFormed:!!t.requireWellFormed,splitCDATASections:t.splitCDATASections!==!1,nodeFilter:t.nodeFilter||null}:e={requireWellFormed:!1,splitCDATASections:!0,nodeFilter:null};var r=[],n=this.nodeType===Ot&&this.documentElement||this,a=n.prefix,i=n.namespaceURI;if(i&&a==null){var a=n.lookupPrefix(i);if(a==null)var s=[{namespace:i,prefix:null}]}return ka(this,r,s,e),r.join("")}function ds(t,e,r){var n=t.prefix||"",a=t.namespaceURI;if(!a||n==="xml"&&a===Ie.XML||a===Ie.XMLNS)return!1;for(var i=r.length;i--;){var s=r[i];if(s.prefix===n)return s.namespace!==a}return!0}function ln(t,e,r,n){if(n&&!V.QName_exact.test(e))throw new y('The attribute name "'+e+'" is not a valid XML QName',ce.InvalidStateError);t.push(" ",e,'="',r.replace(/[<>&"\t\n\r]/g,ys),'"')}function ka(t,e,r,n){r||(r=[]);var a=n.nodeFilter,i=n.requireWellFormed,s=n.splitCDATASections,o=t.nodeType===Ot?t:t.ownerDocument,u=o.type==="html";oe(t,{ns:r},{enter:function(l,c){var d=c.ns;if(a)if(l=a(l),l){if(typeof l=="string")return e.push(l),null}else return null;switch(l.nodeType){case ve:var f=l.attributes,p=f.length,h=l.tagName,m=h;if(!u&&!l.prefix&&l.namespaceURI){for(var g,b=0;b<f.length;b++)if(f.item(b).name==="xmlns"){g=f.item(b).value;break}if(!g)for(var v=d.length-1;v>=0;v--){var w=d[v];if(w.prefix===""&&w.namespace===l.namespaceURI){g=w.namespace;break}}if(g!==l.namespaceURI)for(var v=d.length-1;v>=0;v--){var w=d[v];if(w.namespace===l.namespaceURI){w.prefix&&(m=w.prefix+":"+h);break}}}if(i&&!V.QName_exact.test(m))throw new y('The element name "'+m+'" is not a valid XML QName',ce.InvalidStateError);e.push("<",m);for(var x=d.slice(),B=0;B<p;B++){var L=f.item(B);L.prefix=="xmlns"?x.push({prefix:L.localName,namespace:L.value}):L.nodeName=="xmlns"&&x.push({prefix:"",namespace:L.value})}for(var B=0;B<p;B++){var L=f.item(B);if(ds(L,u,x)){var G=L.prefix||"",re=L.namespaceURI;ln(e,G?"xmlns:"+G:"xmlns",re,i),x.push({prefix:G,namespace:re})}var ne=a?a(L):L;ne&&(typeof ne=="string"?e.push(ne):ln(e,ne.name,ne.value,i))}if(h===m&&ds(l,u,x)){var Pe=l.prefix||"",re=l.namespaceURI;ln(e,Pe?"xmlns:"+Pe:"xmlns",re,i),x.push({prefix:Pe,namespace:re})}var Y=!l.firstChild;if(Y&&(u||l.namespaceURI===Ie.HTML)&&(Y=Lc(h)),Y)return e.push("/>"),null;if(e.push(">"),u&&Rc(h)){for(var de=l.firstChild;de;)de.data?e.push(de.data):ka(de,e,x.slice(),n),de=de.nextSibling;return e.push("</",m,">"),null}return{ns:x,tag:m};case Ot:case at:if(i&&l.nodeType===Ot&&l.documentElement==null)throw new y("The Document has no documentElement",ce.InvalidStateError);return{ns:d};case It:return ln(e,l.name,l.value,i),null;case br:if(i&&V.InvalidChar.test(l.data))throw new y("The Text node data contains characters outside the XML Char production",ce.InvalidStateError);return e.push(l.data.replace(/[<&>]/g,ys)),null;case hs:if(i&&l.data.indexOf("]]>")!==-1)throw new y('The CDATASection data contains "]]>"',ce.InvalidStateError);return s?e.push(V.CDATA_START,l.data.replace(/]]>/g,"]]]]><![CDATA[>"),V.CDATA_END):e.push(V.CDATA_START,l.data,V.CDATA_END),null;case _a:if(i){if(V.InvalidChar.test(l.data))throw new y("The comment node data contains characters outside the XML Char production",ce.InvalidStateError);if(l.data.indexOf("--")!==-1||l.data[l.data.length-1]==="-")throw new y('The comment node data contains "--" or ends with "-"',ce.InvalidStateError)}return e.push(V.COMMENT_START,l.data,V.COMMENT_END),null;case gs:var we=l.publicId,F=l.systemId;if(i){if(!V.Name_exact.test(l.name))throw new y('The doctype name "'+l.name+'" is not a valid XML Name',ce.InvalidStateError);if(we&&!V.PubidLiteral_match.test(we))throw new y("DocumentType publicId is not a valid PubidLiteral",ce.InvalidStateError);if(F&&F!=="."&&!V.SystemLiteral_match.test(F))throw new y("DocumentType systemId is not a valid SystemLiteral",ce.InvalidStateError);if(l.internalSubset&&l.internalSubset.indexOf("]>")!==-1)throw new y('DocumentType internalSubset contains "]>"',ce.InvalidStateError)}return e.push(V.DOCTYPE_DECL_START," ",l.name),we?(e.push(" ",V.PUBLIC," ",we),F&&F!=="."&&e.push(" ",F)):F&&F!=="."&&e.push(" ",V.SYSTEM," ",F),l.internalSubset&&e.push(" [",l.internalSubset,"]"),e.push(">"),null;case ga:if(i){if(!V.NCName_exact.test(l.target)||l.target.toLowerCase()==="xml")throw new y('The processing instruction target "'+l.target+'" is not a valid XML NCName or is reserved',ce.InvalidStateError);if(V.InvalidChar.test(l.data))throw new y("The ProcessingInstruction data contains characters outside the XML Char production",ce.InvalidStateError);if(l.data.indexOf("?>")!==-1)throw new y('The ProcessingInstruction data contains "?>"',ce.InvalidStateError)}return e.push("<?",l.target," ",l.data,"?>"),null;case ms:if(i&&!V.Name_exact.test(l.nodeName))throw new y('The entity reference name "'+l.nodeName+'" is not a valid XML Name',ce.InvalidStateError);return e.push("&",l.nodeName,";"),null;default:return e.push("??",l.nodeName),null}},exit:function(l,c){c&&c.tag&&e.push("</",c.tag,">")}})}function Kc(t,e,r){var n;return oe(e,null,{enter:function(a,i){var s=a.cloneNode(!1);s.ownerDocument=t,s.parentNode=null,i===null?n=s:i.appendChild(s);var o=a.nodeType===It||r;return o?s:null}}),n}function Ts(t,e,r){var n;return oe(e,null,{enter:function(a,i){var s=new a.constructor(fe);for(var o in a)if(Bt(a,o)){var u=a[o];typeof u!="object"&&u!=s[o]&&(s[o]=u)}a.childNodes&&(s.childNodes=new K),s.ownerDocument=t;var l=r;switch(s.nodeType){case ve:var c=a.attributes,d=s.attributes=new Mt,f=c.length;d._ownerElement=s;for(var p=0;p<f;p++)s.setAttributeNode(Ts(t,c.item(p),!0));break;case It:l=!0}return i!==null?i.appendChild(s):n=s,l?s:null}}),n}function Cs(t,e,r){t[e]=r}function ha(t){for(var e=[],r=t.firstChild;r;)r.nodeType===ve&&e.push(r),r=r.nextSibling;return e}try{Object.defineProperty&&(Object.defineProperty(Oe.prototype,"length",{get:function(){return dn(this),this.$$length}}),Object.defineProperty(I.prototype,"textContent",{get:function(){if(this.nodeType===ve||this.nodeType===at){var t=[];return oe(this,null,{enter:function(e){if(e.nodeType===ve||e.nodeType===at)return!0;if(e.nodeType===ga||e.nodeType===_a)return null;t.push(e.nodeValue)}}),t.join("")}return this.nodeValue},set:function(t){switch(this.nodeType){case ve:case at:for(;this.firstChild;)this.removeChild(this.firstChild);(t||String(t))&&this.appendChild(this.ownerDocument.createTextNode(t));break;default:this.data=t,this.value=t,this.nodeValue=t}}}),Object.defineProperty(st.prototype,"data",{get:function(){return this._data!=null?this._data:""},set:function(t){this._data=t,this.length=typeof t=="string"?t.length:0}}),Object.defineProperty(st.prototype,"nodeValue",{get:function(){return this.data},set:function(t){this.data=t},enumerable:!0,configurable:!0}),Object.defineProperty(qe.prototype,"children",{get:function(){return new Oe(this,ha)}}),Object.defineProperty(Ue.prototype,"children",{get:function(){return new Oe(this,ha)}}),Object.defineProperty(Lt.prototype,"children",{get:function(){return new Oe(this,ha)}}),Cs=function(t,e,r){t["$$"+e]=r})}catch{}z._updateLiveList=dn;z.Attr=gt;z.CDATASection=pn;z.CharacterData=st;z.Comment=fn;z.Document=Ue;z.DocumentFragment=Lt;z.DocumentType=hn;z.DOMImplementation=ws;z.Element=qe;z.Entity=va;z.EntityReference=mn;z.LiveNodeList=Oe;z.NamedNodeMap=Mt;z.Node=I;z.NodeList=K;z.Notation=ya;z.Text=wr;z.ProcessingInstruction=gn;z.walkDOM=oe;z.XMLSerializer=Ds});var Ss=Ge(yr=>{"use strict";var Ns=mt().freeze;yr.XML_ENTITIES=Ns({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'});yr.HTML_ENTITIES=Ns({Aacute:"\xC1",aacute:"\xE1",Abreve:"\u0102",abreve:"\u0103",ac:"\u223E",acd:"\u223F",acE:"\u223E\u0333",Acirc:"\xC2",acirc:"\xE2",acute:"\xB4",Acy:"\u0410",acy:"\u0430",AElig:"\xC6",aelig:"\xE6",af:"\u2061",Afr:"\u{1D504}",afr:"\u{1D51E}",Agrave:"\xC0",agrave:"\xE0",alefsym:"\u2135",aleph:"\u2135",Alpha:"\u0391",alpha:"\u03B1",Amacr:"\u0100",amacr:"\u0101",amalg:"\u2A3F",AMP:"&",amp:"&",And:"\u2A53",and:"\u2227",andand:"\u2A55",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",ange:"\u29A4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angst:"\xC5",angzarr:"\u237C",Aogon:"\u0104",aogon:"\u0105",Aopf:"\u{1D538}",aopf:"\u{1D552}",ap:"\u2248",apacir:"\u2A6F",apE:"\u2A70",ape:"\u224A",apid:"\u224B",apos:"'",ApplyFunction:"\u2061",approx:"\u2248",approxeq:"\u224A",Aring:"\xC5",aring:"\xE5",Ascr:"\u{1D49C}",ascr:"\u{1D4B6}",Assign:"\u2254",ast:"*",asymp:"\u2248",asympeq:"\u224D",Atilde:"\xC3",atilde:"\xE3",Auml:"\xC4",auml:"\xE4",awconint:"\u2233",awint:"\u2A11",backcong:"\u224C",backepsilon:"\u03F6",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",Backslash:"\u2216",Barv:"\u2AE7",barvee:"\u22BD",Barwed:"\u2306",barwed:"\u2305",barwedge:"\u2305",bbrk:"\u23B5",bbrktbrk:"\u23B6",bcong:"\u224C",Bcy:"\u0411",bcy:"\u0431",bdquo:"\u201E",becaus:"\u2235",Because:"\u2235",because:"\u2235",bemptyv:"\u29B0",bepsi:"\u03F6",bernou:"\u212C",Bernoullis:"\u212C",Beta:"\u0392",beta:"\u03B2",beth:"\u2136",between:"\u226C",Bfr:"\u{1D505}",bfr:"\u{1D51F}",bigcap:"\u22C2",bigcirc:"\u25EF",bigcup:"\u22C3",bigodot:"\u2A00",bigoplus:"\u2A01",bigotimes:"\u2A02",bigsqcup:"\u2A06",bigstar:"\u2605",bigtriangledown:"\u25BD",bigtriangleup:"\u25B3",biguplus:"\u2A04",bigvee:"\u22C1",bigwedge:"\u22C0",bkarow:"\u290D",blacklozenge:"\u29EB",blacksquare:"\u25AA",blacktriangle:"\u25B4",blacktriangledown:"\u25BE",blacktriangleleft:"\u25C2",blacktriangleright:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bNot:"\u2AED",bnot:"\u2310",Bopf:"\u{1D539}",bopf:"\u{1D553}",bot:"\u22A5",bottom:"\u22A5",bowtie:"\u22C8",boxbox:"\u29C9",boxDL:"\u2557",boxDl:"\u2556",boxdL:"\u2555",boxdl:"\u2510",boxDR:"\u2554",boxDr:"\u2553",boxdR:"\u2552",boxdr:"\u250C",boxH:"\u2550",boxh:"\u2500",boxHD:"\u2566",boxHd:"\u2564",boxhD:"\u2565",boxhd:"\u252C",boxHU:"\u2569",boxHu:"\u2567",boxhU:"\u2568",boxhu:"\u2534",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",boxUL:"\u255D",boxUl:"\u255C",boxuL:"\u255B",boxul:"\u2518",boxUR:"\u255A",boxUr:"\u2559",boxuR:"\u2558",boxur:"\u2514",boxV:"\u2551",boxv:"\u2502",boxVH:"\u256C",boxVh:"\u256B",boxvH:"\u256A",boxvh:"\u253C",boxVL:"\u2563",boxVl:"\u2562",boxvL:"\u2561",boxvl:"\u2524",boxVR:"\u2560",boxVr:"\u255F",boxvR:"\u255E",boxvr:"\u251C",bprime:"\u2035",Breve:"\u02D8",breve:"\u02D8",brvbar:"\xA6",Bscr:"\u212C",bscr:"\u{1D4B7}",bsemi:"\u204F",bsim:"\u223D",bsime:"\u22CD",bsol:"\\",bsolb:"\u29C5",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bump:"\u224E",bumpE:"\u2AAE",bumpe:"\u224F",Bumpeq:"\u224E",bumpeq:"\u224F",Cacute:"\u0106",cacute:"\u0107",Cap:"\u22D2",cap:"\u2229",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",capcup:"\u2A47",capdot:"\u2A40",CapitalDifferentialD:"\u2145",caps:"\u2229\uFE00",caret:"\u2041",caron:"\u02C7",Cayleys:"\u212D",ccaps:"\u2A4D",Ccaron:"\u010C",ccaron:"\u010D",Ccedil:"\xC7",ccedil:"\xE7",Ccirc:"\u0108",ccirc:"\u0109",Cconint:"\u2230",ccups:"\u2A4C",ccupssm:"\u2A50",Cdot:"\u010A",cdot:"\u010B",cedil:"\xB8",Cedilla:"\xB8",cemptyv:"\u29B2",cent:"\xA2",CenterDot:"\xB7",centerdot:"\xB7",Cfr:"\u212D",cfr:"\u{1D520}",CHcy:"\u0427",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",Chi:"\u03A7",chi:"\u03C7",cir:"\u25CB",circ:"\u02C6",circeq:"\u2257",circlearrowleft:"\u21BA",circlearrowright:"\u21BB",circledast:"\u229B",circledcirc:"\u229A",circleddash:"\u229D",CircleDot:"\u2299",circledR:"\xAE",circledS:"\u24C8",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",cirE:"\u29C3",cire:"\u2257",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201D",CloseCurlyQuote:"\u2019",clubs:"\u2663",clubsuit:"\u2663",Colon:"\u2237",colon:":",Colone:"\u2A74",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2A6D",Congruent:"\u2261",Conint:"\u222F",conint:"\u222E",ContourIntegral:"\u222E",Copf:"\u2102",copf:"\u{1D554}",coprod:"\u2210",Coproduct:"\u2210",COPY:"\xA9",copy:"\xA9",copysr:"\u2117",CounterClockwiseContourIntegral:"\u2233",crarr:"\u21B5",Cross:"\u2A2F",cross:"\u2717",Cscr:"\u{1D49E}",cscr:"\u{1D4B8}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",cuesc:"\u22DF",cularr:"\u21B6",cularrp:"\u293D",Cup:"\u22D3",cup:"\u222A",cupbrcap:"\u2A48",CupCap:"\u224D",cupcap:"\u2A46",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curarrm:"\u293C",curlyeqprec:"\u22DE",curlyeqsucc:"\u22DF",curlyvee:"\u22CE",curlywedge:"\u22CF",curren:"\xA4",curvearrowleft:"\u21B6",curvearrowright:"\u21B7",cuvee:"\u22CE",cuwed:"\u22CF",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232D",Dagger:"\u2021",dagger:"\u2020",daleth:"\u2138",Darr:"\u21A1",dArr:"\u21D3",darr:"\u2193",dash:"\u2010",Dashv:"\u2AE4",dashv:"\u22A3",dbkarow:"\u290F",dblac:"\u02DD",Dcaron:"\u010E",dcaron:"\u010F",Dcy:"\u0414",dcy:"\u0434",DD:"\u2145",dd:"\u2146",ddagger:"\u2021",ddarr:"\u21CA",DDotrahd:"\u2911",ddotseq:"\u2A77",deg:"\xB0",Del:"\u2207",Delta:"\u0394",delta:"\u03B4",demptyv:"\u29B1",dfisht:"\u297F",Dfr:"\u{1D507}",dfr:"\u{1D521}",dHar:"\u2965",dharl:"\u21C3",dharr:"\u21C2",DiacriticalAcute:"\xB4",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",DiacriticalGrave:"`",DiacriticalTilde:"\u02DC",diam:"\u22C4",Diamond:"\u22C4",diamond:"\u22C4",diamondsuit:"\u2666",diams:"\u2666",die:"\xA8",DifferentialD:"\u2146",digamma:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",DJcy:"\u0402",djcy:"\u0452",dlcorn:"\u231E",dlcrop:"\u230D",dollar:"$",Dopf:"\u{1D53B}",dopf:"\u{1D555}",Dot:"\xA8",dot:"\u02D9",DotDot:"\u20DC",doteq:"\u2250",doteqdot:"\u2251",DotEqual:"\u2250",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22A1",doublebarwedge:"\u2306",DoubleContourIntegral:"\u222F",DoubleDot:"\xA8",DoubleDownArrow:"\u21D3",DoubleLeftArrow:"\u21D0",DoubleLeftRightArrow:"\u21D4",DoubleLeftTee:"\u2AE4",DoubleLongLeftArrow:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",DoubleLongRightArrow:"\u27F9",DoubleRightArrow:"\u21D2",DoubleRightTee:"\u22A8",DoubleUpArrow:"\u21D1",DoubleUpDownArrow:"\u21D5",DoubleVerticalBar:"\u2225",DownArrow:"\u2193",Downarrow:"\u21D3",downarrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21F5",DownBreve:"\u0311",downdownarrows:"\u21CA",downharpoonleft:"\u21C3",downharpoonright:"\u21C2",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVector:"\u21BD",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295F",DownRightVector:"\u21C1",DownRightVectorBar:"\u2957",DownTee:"\u22A4",DownTeeArrow:"\u21A7",drbkarow:"\u2910",drcorn:"\u231F",drcrop:"\u230C",Dscr:"\u{1D49F}",dscr:"\u{1D4B9}",DScy:"\u0405",dscy:"\u0455",dsol:"\u29F6",Dstrok:"\u0110",dstrok:"\u0111",dtdot:"\u22F1",dtri:"\u25BF",dtrif:"\u25BE",duarr:"\u21F5",duhar:"\u296F",dwangle:"\u29A6",DZcy:"\u040F",dzcy:"\u045F",dzigrarr:"\u27FF",Eacute:"\xC9",eacute:"\xE9",easter:"\u2A6E",Ecaron:"\u011A",ecaron:"\u011B",ecir:"\u2256",Ecirc:"\xCA",ecirc:"\xEA",ecolon:"\u2255",Ecy:"\u042D",ecy:"\u044D",eDDot:"\u2A77",Edot:"\u0116",eDot:"\u2251",edot:"\u0117",ee:"\u2147",efDot:"\u2252",Efr:"\u{1D508}",efr:"\u{1D522}",eg:"\u2A9A",Egrave:"\xC8",egrave:"\xE8",egs:"\u2A96",egsdot:"\u2A98",el:"\u2A99",Element:"\u2208",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",elsdot:"\u2A97",Emacr:"\u0112",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",EmptySmallSquare:"\u25FB",emptyv:"\u2205",EmptyVerySmallSquare:"\u25AB",emsp:"\u2003",emsp13:"\u2004",emsp14:"\u2005",ENG:"\u014A",eng:"\u014B",ensp:"\u2002",Eogon:"\u0118",eogon:"\u0119",Eopf:"\u{1D53C}",eopf:"\u{1D556}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",Epsilon:"\u0395",epsilon:"\u03B5",epsiv:"\u03F5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2A96",eqslantless:"\u2A95",Equal:"\u2A75",equals:"=",EqualTilde:"\u2242",equest:"\u225F",Equilibrium:"\u21CC",equiv:"\u2261",equivDD:"\u2A78",eqvparsl:"\u29E5",erarr:"\u2971",erDot:"\u2253",Escr:"\u2130",escr:"\u212F",esdot:"\u2250",Esim:"\u2A73",esim:"\u2242",Eta:"\u0397",eta:"\u03B7",ETH:"\xD0",eth:"\xF0",Euml:"\xCB",euml:"\xEB",euro:"\u20AC",excl:"!",exist:"\u2203",Exists:"\u2203",expectation:"\u2130",ExponentialE:"\u2147",exponentiale:"\u2147",fallingdotseq:"\u2252",Fcy:"\u0424",fcy:"\u0444",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",Ffr:"\u{1D509}",ffr:"\u{1D523}",filig:"\uFB01",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",Fopf:"\u{1D53D}",fopf:"\u{1D557}",ForAll:"\u2200",forall:"\u2200",fork:"\u22D4",forkv:"\u2AD9",Fouriertrf:"\u2131",fpartint:"\u2A0D",frac12:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",Fscr:"\u2131",fscr:"\u{1D4BB}",gacute:"\u01F5",Gamma:"\u0393",gamma:"\u03B3",Gammad:"\u03DC",gammad:"\u03DD",gap:"\u2A86",Gbreve:"\u011E",gbreve:"\u011F",Gcedil:"\u0122",Gcirc:"\u011C",gcirc:"\u011D",Gcy:"\u0413",gcy:"\u0433",Gdot:"\u0120",gdot:"\u0121",gE:"\u2267",ge:"\u2265",gEl:"\u2A8C",gel:"\u22DB",geq:"\u2265",geqq:"\u2267",geqslant:"\u2A7E",ges:"\u2A7E",gescc:"\u2AA9",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",Gfr:"\u{1D50A}",gfr:"\u{1D524}",Gg:"\u22D9",gg:"\u226B",ggg:"\u22D9",gimel:"\u2137",GJcy:"\u0403",gjcy:"\u0453",gl:"\u2277",gla:"\u2AA5",glE:"\u2A92",glj:"\u2AA4",gnap:"\u2A8A",gnapprox:"\u2A8A",gnE:"\u2269",gne:"\u2A88",gneq:"\u2A88",gneqq:"\u2269",gnsim:"\u22E7",Gopf:"\u{1D53E}",gopf:"\u{1D558}",grave:"`",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",Gscr:"\u{1D4A2}",gscr:"\u210A",gsim:"\u2273",gsime:"\u2A8E",gsiml:"\u2A90",Gt:"\u226B",GT:">",gt:">",gtcc:"\u2AA7",gtcir:"\u2A7A",gtdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrapprox:"\u2A86",gtrarr:"\u2978",gtrdot:"\u22D7",gtreqless:"\u22DB",gtreqqless:"\u2A8C",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",Hacek:"\u02C7",hairsp:"\u200A",half:"\xBD",hamilt:"\u210B",HARDcy:"\u042A",hardcy:"\u044A",hArr:"\u21D4",harr:"\u2194",harrcir:"\u2948",harrw:"\u21AD",Hat:"^",hbar:"\u210F",Hcirc:"\u0124",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22B9",Hfr:"\u210C",hfr:"\u{1D525}",HilbertSpace:"\u210B",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",Hopf:"\u210D",hopf:"\u{1D559}",horbar:"\u2015",HorizontalLine:"\u2500",Hscr:"\u210B",hscr:"\u{1D4BD}",hslash:"\u210F",Hstrok:"\u0126",hstrok:"\u0127",HumpDownHump:"\u224E",HumpEqual:"\u224F",hybull:"\u2043",hyphen:"\u2010",Iacute:"\xCD",iacute:"\xED",ic:"\u2063",Icirc:"\xCE",icirc:"\xEE",Icy:"\u0418",icy:"\u0438",Idot:"\u0130",IEcy:"\u0415",iecy:"\u0435",iexcl:"\xA1",iff:"\u21D4",Ifr:"\u2111",ifr:"\u{1D526}",Igrave:"\xCC",igrave:"\xEC",ii:"\u2148",iiiint:"\u2A0C",iiint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",IJlig:"\u0132",ijlig:"\u0133",Im:"\u2111",Imacr:"\u012A",imacr:"\u012B",image:"\u2111",ImaginaryI:"\u2148",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22B7",imped:"\u01B5",Implies:"\u21D2",in:"\u2208",incare:"\u2105",infin:"\u221E",infintie:"\u29DD",inodot:"\u0131",Int:"\u222C",int:"\u222B",intcal:"\u22BA",integers:"\u2124",Integral:"\u222B",intercal:"\u22BA",Intersection:"\u22C2",intlarhk:"\u2A17",intprod:"\u2A3C",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",IOcy:"\u0401",iocy:"\u0451",Iogon:"\u012E",iogon:"\u012F",Iopf:"\u{1D540}",iopf:"\u{1D55A}",Iota:"\u0399",iota:"\u03B9",iprod:"\u2A3C",iquest:"\xBF",Iscr:"\u2110",iscr:"\u{1D4BE}",isin:"\u2208",isindot:"\u22F5",isinE:"\u22F9",isins:"\u22F4",isinsv:"\u22F3",isinv:"\u2208",it:"\u2062",Itilde:"\u0128",itilde:"\u0129",Iukcy:"\u0406",iukcy:"\u0456",Iuml:"\xCF",iuml:"\xEF",Jcirc:"\u0134",jcirc:"\u0135",Jcy:"\u0419",jcy:"\u0439",Jfr:"\u{1D50D}",jfr:"\u{1D527}",jmath:"\u0237",Jopf:"\u{1D541}",jopf:"\u{1D55B}",Jscr:"\u{1D4A5}",jscr:"\u{1D4BF}",Jsercy:"\u0408",jsercy:"\u0458",Jukcy:"\u0404",jukcy:"\u0454",Kappa:"\u039A",kappa:"\u03BA",kappav:"\u03F0",Kcedil:"\u0136",kcedil:"\u0137",Kcy:"\u041A",kcy:"\u043A",Kfr:"\u{1D50E}",kfr:"\u{1D528}",kgreen:"\u0138",KHcy:"\u0425",khcy:"\u0445",KJcy:"\u040C",kjcy:"\u045C",Kopf:"\u{1D542}",kopf:"\u{1D55C}",Kscr:"\u{1D4A6}",kscr:"\u{1D4C0}",lAarr:"\u21DA",Lacute:"\u0139",lacute:"\u013A",laemptyv:"\u29B4",lagran:"\u2112",Lambda:"\u039B",lambda:"\u03BB",Lang:"\u27EA",lang:"\u27E8",langd:"\u2991",langle:"\u27E8",lap:"\u2A85",Laplacetrf:"\u2112",laquo:"\xAB",Larr:"\u219E",lArr:"\u21D0",larr:"\u2190",larrb:"\u21E4",larrbfs:"\u291F",larrfs:"\u291D",larrhk:"\u21A9",larrlp:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",lat:"\u2AAB",lAtail:"\u291B",latail:"\u2919",late:"\u2AAD",lates:"\u2AAD\uFE00",lBarr:"\u290E",lbarr:"\u290C",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",Lcaron:"\u013D",lcaron:"\u013E",Lcedil:"\u013B",lcedil:"\u013C",lceil:"\u2308",lcub:"{",Lcy:"\u041B",lcy:"\u043B",ldca:"\u2936",ldquo:"\u201C",ldquor:"\u201E",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",lE:"\u2266",le:"\u2264",LeftAngleBracket:"\u27E8",LeftArrow:"\u2190",Leftarrow:"\u21D0",leftarrow:"\u2190",LeftArrowBar:"\u21E4",LeftArrowRightArrow:"\u21C6",leftarrowtail:"\u21A2",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21C3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230A",leftharpoondown:"\u21BD",leftharpoonup:"\u21BC",leftleftarrows:"\u21C7",LeftRightArrow:"\u2194",Leftrightarrow:"\u21D4",leftrightarrow:"\u2194",leftrightarrows:"\u21C6",leftrightharpoons:"\u21CB",leftrightsquigarrow:"\u21AD",LeftRightVector:"\u294E",LeftTee:"\u22A3",LeftTeeArrow:"\u21A4",LeftTeeVector:"\u295A",leftthreetimes:"\u22CB",LeftTriangle:"\u22B2",LeftTriangleBar:"\u29CF",LeftTriangleEqual:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21BF",LeftUpVectorBar:"\u2958",LeftVector:"\u21BC",LeftVectorBar:"\u2952",lEg:"\u2A8B",leg:"\u22DA",leq:"\u2264",leqq:"\u2266",leqslant:"\u2A7D",les:"\u2A7D",lescc:"\u2AA8",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessapprox:"\u2A85",lessdot:"\u22D6",lesseqgtr:"\u22DA",lesseqqgtr:"\u2A8B",LessEqualGreater:"\u22DA",LessFullEqual:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",LessLess:"\u2AA1",lesssim:"\u2272",LessSlantEqual:"\u2A7D",LessTilde:"\u2272",lfisht:"\u297C",lfloor:"\u230A",Lfr:"\u{1D50F}",lfr:"\u{1D529}",lg:"\u2276",lgE:"\u2A91",lHar:"\u2962",lhard:"\u21BD",lharu:"\u21BC",lharul:"\u296A",lhblk:"\u2584",LJcy:"\u0409",ljcy:"\u0459",Ll:"\u22D8",ll:"\u226A",llarr:"\u21C7",llcorner:"\u231E",Lleftarrow:"\u21DA",llhard:"\u296B",lltri:"\u25FA",Lmidot:"\u013F",lmidot:"\u0140",lmoust:"\u23B0",lmoustache:"\u23B0",lnap:"\u2A89",lnapprox:"\u2A89",lnE:"\u2268",lne:"\u2A87",lneq:"\u2A87",lneqq:"\u2268",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",lobrk:"\u27E6",LongLeftArrow:"\u27F5",Longleftarrow:"\u27F8",longleftarrow:"\u27F5",LongLeftRightArrow:"\u27F7",Longleftrightarrow:"\u27FA",longleftrightarrow:"\u27F7",longmapsto:"\u27FC",LongRightArrow:"\u27F6",Longrightarrow:"\u27F9",longrightarrow:"\u27F6",looparrowleft:"\u21AB",looparrowright:"\u21AC",lopar:"\u2985",Lopf:"\u{1D543}",lopf:"\u{1D55D}",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",lowbar:"_",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",loz:"\u25CA",lozenge:"\u25CA",lozf:"\u29EB",lpar:"(",lparlt:"\u2993",lrarr:"\u21C6",lrcorner:"\u231F",lrhar:"\u21CB",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",Lscr:"\u2112",lscr:"\u{1D4C1}",Lsh:"\u21B0",lsh:"\u21B0",lsim:"\u2272",lsime:"\u2A8D",lsimg:"\u2A8F",lsqb:"[",lsquo:"\u2018",lsquor:"\u201A",Lstrok:"\u0141",lstrok:"\u0142",Lt:"\u226A",LT:"<",lt:"<",ltcc:"\u2AA6",ltcir:"\u2A79",ltdot:"\u22D6",lthree:"\u22CB",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltri:"\u25C3",ltrie:"\u22B4",ltrif:"\u25C2",ltrPar:"\u2996",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",macr:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",Map:"\u2905",map:"\u21A6",mapsto:"\u21A6",mapstodown:"\u21A7",mapstoleft:"\u21A4",mapstoup:"\u21A5",marker:"\u25AE",mcomma:"\u2A29",Mcy:"\u041C",mcy:"\u043C",mdash:"\u2014",mDDot:"\u223A",measuredangle:"\u2221",MediumSpace:"\u205F",Mellintrf:"\u2133",Mfr:"\u{1D510}",mfr:"\u{1D52A}",mho:"\u2127",micro:"\xB5",mid:"\u2223",midast:"*",midcir:"\u2AF0",middot:"\xB7",minus:"\u2212",minusb:"\u229F",minusd:"\u2238",minusdu:"\u2A2A",MinusPlus:"\u2213",mlcp:"\u2ADB",mldr:"\u2026",mnplus:"\u2213",models:"\u22A7",Mopf:"\u{1D544}",mopf:"\u{1D55E}",mp:"\u2213",Mscr:"\u2133",mscr:"\u{1D4C2}",mstpos:"\u223E",Mu:"\u039C",mu:"\u03BC",multimap:"\u22B8",mumap:"\u22B8",nabla:"\u2207",Nacute:"\u0143",nacute:"\u0144",nang:"\u2220\u20D2",nap:"\u2249",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266E",natural:"\u266E",naturals:"\u2115",nbsp:"\xA0",nbump:"\u224E\u0338",nbumpe:"\u224F\u0338",ncap:"\u2A43",Ncaron:"\u0147",ncaron:"\u0148",Ncedil:"\u0145",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",Ncy:"\u041D",ncy:"\u043D",ndash:"\u2013",ne:"\u2260",nearhk:"\u2924",neArr:"\u21D7",nearr:"\u2197",nearrow:"\u2197",nedot:"\u2250\u0338",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",NestedGreaterGreater:"\u226B",NestedLessLess:"\u226A",NewLine:`
|
|
2
|
+
`,nexist:"\u2204",nexists:"\u2204",Nfr:"\u{1D511}",nfr:"\u{1D52B}",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",nGg:"\u22D9\u0338",ngsim:"\u2275",nGt:"\u226B\u20D2",ngt:"\u226F",ngtr:"\u226F",nGtv:"\u226B\u0338",nhArr:"\u21CE",nharr:"\u21AE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",NJcy:"\u040A",njcy:"\u045A",nlArr:"\u21CD",nlarr:"\u219A",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nLeftarrow:"\u21CD",nleftarrow:"\u219A",nLeftrightarrow:"\u21CE",nleftrightarrow:"\u21AE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nLl:"\u22D8\u0338",nlsim:"\u2274",nLt:"\u226A\u20D2",nlt:"\u226E",nltri:"\u22EA",nltrie:"\u22EC",nLtv:"\u226A\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xA0",Nopf:"\u2115",nopf:"\u{1D55F}",Not:"\u2AEC",not:"\xAC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",notin:"\u2209",notindot:"\u22F5\u0338",notinE:"\u22F9\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",npre:"\u2AAF\u0338",nprec:"\u2280",npreceq:"\u2AAF\u0338",nrArr:"\u21CF",nrarr:"\u219B",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nRightarrow:"\u21CF",nrightarrow:"\u219B",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",Nscr:"\u{1D4A9}",nscr:"\u{1D4C3}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsube:"\u2288",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",Ntilde:"\xD1",ntilde:"\xF1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",Nu:"\u039D",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224D\u20D2",nVDash:"\u22AF",nVdash:"\u22AE",nvDash:"\u22AD",nvdash:"\u22AC",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvHarr:"\u2904",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwarhk:"\u2923",nwArr:"\u21D6",nwarr:"\u2196",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\xD3",oacute:"\xF3",oast:"\u229B",ocir:"\u229A",Ocirc:"\xD4",ocirc:"\xF4",Ocy:"\u041E",ocy:"\u043E",odash:"\u229D",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",OElig:"\u0152",oelig:"\u0153",ofcir:"\u29BF",Ofr:"\u{1D512}",ofr:"\u{1D52C}",ogon:"\u02DB",Ograve:"\xD2",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",Omacr:"\u014C",omacr:"\u014D",Omega:"\u03A9",omega:"\u03C9",Omicron:"\u039F",omicron:"\u03BF",omid:"\u29B6",ominus:"\u2296",Oopf:"\u{1D546}",oopf:"\u{1D560}",opar:"\u29B7",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",operp:"\u29B9",oplus:"\u2295",Or:"\u2A54",or:"\u2228",orarr:"\u21BB",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oS:"\u24C8",Oscr:"\u{1D4AA}",oscr:"\u2134",Oslash:"\xD8",oslash:"\xF8",osol:"\u2298",Otilde:"\xD5",otilde:"\xF5",Otimes:"\u2A37",otimes:"\u2297",otimesas:"\u2A36",Ouml:"\xD6",ouml:"\xF6",ovbar:"\u233D",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",par:"\u2225",para:"\xB6",parallel:"\u2225",parsim:"\u2AF3",parsl:"\u2AFD",part:"\u2202",PartialD:"\u2202",Pcy:"\u041F",pcy:"\u043F",percnt:"%",period:".",permil:"\u2030",perp:"\u22A5",pertenk:"\u2031",Pfr:"\u{1D513}",pfr:"\u{1D52D}",Phi:"\u03A6",phi:"\u03C6",phiv:"\u03D5",phmmat:"\u2133",phone:"\u260E",Pi:"\u03A0",pi:"\u03C0",pitchfork:"\u22D4",piv:"\u03D6",planck:"\u210F",planckh:"\u210E",plankv:"\u210F",plus:"+",plusacir:"\u2A23",plusb:"\u229E",pluscir:"\u2A22",plusdo:"\u2214",plusdu:"\u2A25",pluse:"\u2A72",PlusMinus:"\xB1",plusmn:"\xB1",plussim:"\u2A26",plustwo:"\u2A27",pm:"\xB1",Poincareplane:"\u210C",pointint:"\u2A15",Popf:"\u2119",popf:"\u{1D561}",pound:"\xA3",Pr:"\u2ABB",pr:"\u227A",prap:"\u2AB7",prcue:"\u227C",prE:"\u2AB3",pre:"\u2AAF",prec:"\u227A",precapprox:"\u2AB7",preccurlyeq:"\u227C",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",preceq:"\u2AAF",precnapprox:"\u2AB9",precneqq:"\u2AB5",precnsim:"\u22E8",precsim:"\u227E",Prime:"\u2033",prime:"\u2032",primes:"\u2119",prnap:"\u2AB9",prnE:"\u2AB5",prnsim:"\u22E8",prod:"\u220F",Product:"\u220F",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prop:"\u221D",Proportion:"\u2237",Proportional:"\u221D",propto:"\u221D",prsim:"\u227E",prurel:"\u22B0",Pscr:"\u{1D4AB}",pscr:"\u{1D4C5}",Psi:"\u03A8",psi:"\u03C8",puncsp:"\u2008",Qfr:"\u{1D514}",qfr:"\u{1D52E}",qint:"\u2A0C",Qopf:"\u211A",qopf:"\u{1D562}",qprime:"\u2057",Qscr:"\u{1D4AC}",qscr:"\u{1D4C6}",quaternions:"\u210D",quatint:"\u2A16",quest:"?",questeq:"\u225F",QUOT:'"',quot:'"',rAarr:"\u21DB",race:"\u223D\u0331",Racute:"\u0154",racute:"\u0155",radic:"\u221A",raemptyv:"\u29B3",Rang:"\u27EB",rang:"\u27E9",rangd:"\u2992",range:"\u29A5",rangle:"\u27E9",raquo:"\xBB",Rarr:"\u21A0",rArr:"\u21D2",rarr:"\u2192",rarrap:"\u2975",rarrb:"\u21E5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291E",rarrhk:"\u21AA",rarrlp:"\u21AC",rarrpl:"\u2945",rarrsim:"\u2974",Rarrtl:"\u2916",rarrtl:"\u21A3",rarrw:"\u219D",rAtail:"\u291C",ratail:"\u291A",ratio:"\u2236",rationals:"\u211A",RBarr:"\u2910",rBarr:"\u290F",rbarr:"\u290D",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",Rcaron:"\u0158",rcaron:"\u0159",Rcedil:"\u0156",rcedil:"\u0157",rceil:"\u2309",rcub:"}",Rcy:"\u0420",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201D",rdquor:"\u201D",rdsh:"\u21B3",Re:"\u211C",real:"\u211C",realine:"\u211B",realpart:"\u211C",reals:"\u211D",rect:"\u25AD",REG:"\xAE",reg:"\xAE",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",rfisht:"\u297D",rfloor:"\u230B",Rfr:"\u211C",rfr:"\u{1D52F}",rHar:"\u2964",rhard:"\u21C1",rharu:"\u21C0",rharul:"\u296C",Rho:"\u03A1",rho:"\u03C1",rhov:"\u03F1",RightAngleBracket:"\u27E9",RightArrow:"\u2192",Rightarrow:"\u21D2",rightarrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",rightarrowtail:"\u21A3",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",rightharpoondown:"\u21C1",rightharpoonup:"\u21C0",rightleftarrows:"\u21C4",rightleftharpoons:"\u21CC",rightrightarrows:"\u21C9",rightsquigarrow:"\u219D",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",rightthreetimes:"\u22CC",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",ring:"\u02DA",risingdotseq:"\u2253",rlarr:"\u21C4",rlhar:"\u21CC",rlm:"\u200F",rmoust:"\u23B1",rmoustache:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",robrk:"\u27E7",ropar:"\u2986",Ropf:"\u211D",ropf:"\u{1D563}",roplus:"\u2A2E",rotimes:"\u2A35",RoundImplies:"\u2970",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",Rrightarrow:"\u21DB",rsaquo:"\u203A",Rscr:"\u211B",rscr:"\u{1D4C7}",Rsh:"\u21B1",rsh:"\u21B1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22CC",rtimes:"\u22CA",rtri:"\u25B9",rtrie:"\u22B5",rtrif:"\u25B8",rtriltri:"\u29CE",RuleDelayed:"\u29F4",ruluhar:"\u2968",rx:"\u211E",Sacute:"\u015A",sacute:"\u015B",sbquo:"\u201A",Sc:"\u2ABC",sc:"\u227B",scap:"\u2AB8",Scaron:"\u0160",scaron:"\u0161",sccue:"\u227D",scE:"\u2AB4",sce:"\u2AB0",Scedil:"\u015E",scedil:"\u015F",Scirc:"\u015C",scirc:"\u015D",scnap:"\u2ABA",scnE:"\u2AB6",scnsim:"\u22E9",scpolint:"\u2A13",scsim:"\u227F",Scy:"\u0421",scy:"\u0441",sdot:"\u22C5",sdotb:"\u22A1",sdote:"\u2A66",searhk:"\u2925",seArr:"\u21D8",searr:"\u2198",searrow:"\u2198",sect:"\xA7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",Sfr:"\u{1D516}",sfr:"\u{1D530}",sfrown:"\u2322",sharp:"\u266F",SHCHcy:"\u0429",shchcy:"\u0449",SHcy:"\u0428",shcy:"\u0448",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",shortmid:"\u2223",shortparallel:"\u2225",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",shy:"\xAD",Sigma:"\u03A3",sigma:"\u03C3",sigmaf:"\u03C2",sigmav:"\u03C2",sim:"\u223C",simdot:"\u2A6A",sime:"\u2243",simeq:"\u2243",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",slarr:"\u2190",SmallCircle:"\u2218",smallsetminus:"\u2216",smashp:"\u2A33",smeparsl:"\u29E4",smid:"\u2223",smile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",SOFTcy:"\u042C",softcy:"\u044C",sol:"/",solb:"\u29C4",solbar:"\u233F",Sopf:"\u{1D54A}",sopf:"\u{1D564}",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\uFE00",sqcup:"\u2294",sqcups:"\u2294\uFE00",Sqrt:"\u221A",sqsub:"\u228F",sqsube:"\u2291",sqsubset:"\u228F",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25A1",Square:"\u25A1",square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",squarf:"\u25AA",squf:"\u25AA",srarr:"\u2192",Sscr:"\u{1D4AE}",sscr:"\u{1D4C8}",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22C6",Star:"\u22C6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03F5",straightphi:"\u03D5",strns:"\xAF",Sub:"\u22D0",sub:"\u2282",subdot:"\u2ABD",subE:"\u2AC5",sube:"\u2286",subedot:"\u2AC3",submult:"\u2AC1",subnE:"\u2ACB",subne:"\u228A",subplus:"\u2ABF",subrarr:"\u2979",Subset:"\u22D0",subset:"\u2282",subseteq:"\u2286",subseteqq:"\u2AC5",SubsetEqual:"\u2286",subsetneq:"\u228A",subsetneqq:"\u2ACB",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",succ:"\u227B",succapprox:"\u2AB8",succcurlyeq:"\u227D",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",succeq:"\u2AB0",succnapprox:"\u2ABA",succneqq:"\u2AB6",succnsim:"\u22E9",succsim:"\u227F",SuchThat:"\u220B",Sum:"\u2211",sum:"\u2211",sung:"\u266A",Sup:"\u22D1",sup:"\u2283",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",supdot:"\u2ABE",supdsub:"\u2AD8",supE:"\u2AC6",supe:"\u2287",supedot:"\u2AC4",Superset:"\u2283",SupersetEqual:"\u2287",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supnE:"\u2ACC",supne:"\u228B",supplus:"\u2AC0",Supset:"\u22D1",supset:"\u2283",supseteq:"\u2287",supseteqq:"\u2AC6",supsetneq:"\u228B",supsetneqq:"\u2ACC",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swarhk:"\u2926",swArr:"\u21D9",swarr:"\u2199",swarrow:"\u2199",swnwar:"\u292A",szlig:"\xDF",Tab:" ",target:"\u2316",Tau:"\u03A4",tau:"\u03C4",tbrk:"\u23B4",Tcaron:"\u0164",tcaron:"\u0165",Tcedil:"\u0162",tcedil:"\u0163",Tcy:"\u0422",tcy:"\u0442",tdot:"\u20DB",telrec:"\u2315",Tfr:"\u{1D517}",tfr:"\u{1D531}",there4:"\u2234",Therefore:"\u2234",therefore:"\u2234",Theta:"\u0398",theta:"\u03B8",thetasym:"\u03D1",thetav:"\u03D1",thickapprox:"\u2248",thicksim:"\u223C",ThickSpace:"\u205F\u200A",thinsp:"\u2009",ThinSpace:"\u2009",thkap:"\u2248",thksim:"\u223C",THORN:"\xDE",thorn:"\xFE",Tilde:"\u223C",tilde:"\u02DC",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",times:"\xD7",timesb:"\u22A0",timesbar:"\u2A31",timesd:"\u2A30",tint:"\u222D",toea:"\u2928",top:"\u22A4",topbot:"\u2336",topcir:"\u2AF1",Topf:"\u{1D54B}",topf:"\u{1D565}",topfork:"\u2ADA",tosa:"\u2929",tprime:"\u2034",TRADE:"\u2122",trade:"\u2122",triangle:"\u25B5",triangledown:"\u25BF",triangleleft:"\u25C3",trianglelefteq:"\u22B4",triangleq:"\u225C",triangleright:"\u25B9",trianglerighteq:"\u22B5",tridot:"\u25EC",trie:"\u225C",triminus:"\u2A3A",TripleDot:"\u20DB",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",Tscr:"\u{1D4AF}",tscr:"\u{1D4C9}",TScy:"\u0426",tscy:"\u0446",TSHcy:"\u040B",tshcy:"\u045B",Tstrok:"\u0166",tstrok:"\u0167",twixt:"\u226C",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",Uacute:"\xDA",uacute:"\xFA",Uarr:"\u219F",uArr:"\u21D1",uarr:"\u2191",Uarrocir:"\u2949",Ubrcy:"\u040E",ubrcy:"\u045E",Ubreve:"\u016C",ubreve:"\u016D",Ucirc:"\xDB",ucirc:"\xFB",Ucy:"\u0423",ucy:"\u0443",udarr:"\u21C5",Udblac:"\u0170",udblac:"\u0171",udhar:"\u296E",ufisht:"\u297E",Ufr:"\u{1D518}",ufr:"\u{1D532}",Ugrave:"\xD9",ugrave:"\xF9",uHar:"\u2963",uharl:"\u21BF",uharr:"\u21BE",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",Umacr:"\u016A",umacr:"\u016B",uml:"\xA8",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",Uogon:"\u0172",uogon:"\u0173",Uopf:"\u{1D54C}",uopf:"\u{1D566}",UpArrow:"\u2191",Uparrow:"\u21D1",uparrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",UpDownArrow:"\u2195",Updownarrow:"\u21D5",updownarrow:"\u2195",UpEquilibrium:"\u296E",upharpoonleft:"\u21BF",upharpoonright:"\u21BE",uplus:"\u228E",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",Upsi:"\u03D2",upsi:"\u03C5",upsih:"\u03D2",Upsilon:"\u03A5",upsilon:"\u03C5",UpTee:"\u22A5",UpTeeArrow:"\u21A5",upuparrows:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",Uring:"\u016E",uring:"\u016F",urtri:"\u25F9",Uscr:"\u{1D4B0}",uscr:"\u{1D4CA}",utdot:"\u22F0",Utilde:"\u0168",utilde:"\u0169",utri:"\u25B5",utrif:"\u25B4",uuarr:"\u21C8",Uuml:"\xDC",uuml:"\xFC",uwangle:"\u29A7",vangrt:"\u299C",varepsilon:"\u03F5",varkappa:"\u03F0",varnothing:"\u2205",varphi:"\u03D5",varpi:"\u03D6",varpropto:"\u221D",vArr:"\u21D5",varr:"\u2195",varrho:"\u03F1",varsigma:"\u03C2",varsubsetneq:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vartheta:"\u03D1",vartriangleleft:"\u22B2",vartriangleright:"\u22B3",Vbar:"\u2AEB",vBar:"\u2AE8",vBarv:"\u2AE9",Vcy:"\u0412",vcy:"\u0432",VDash:"\u22AB",Vdash:"\u22A9",vDash:"\u22A8",vdash:"\u22A2",Vdashl:"\u2AE6",Vee:"\u22C1",vee:"\u2228",veebar:"\u22BB",veeeq:"\u225A",vellip:"\u22EE",Verbar:"\u2016",verbar:"|",Vert:"\u2016",vert:"|",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200A",Vfr:"\u{1D519}",vfr:"\u{1D533}",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",Vopf:"\u{1D54D}",vopf:"\u{1D567}",vprop:"\u221D",vrtri:"\u22B3",Vscr:"\u{1D4B1}",vscr:"\u{1D4CB}",vsubnE:"\u2ACB\uFE00",vsubne:"\u228A\uFE00",vsupnE:"\u2ACC\uFE00",vsupne:"\u228B\uFE00",Vvdash:"\u22AA",vzigzag:"\u299A",Wcirc:"\u0174",wcirc:"\u0175",wedbar:"\u2A5F",Wedge:"\u22C0",wedge:"\u2227",wedgeq:"\u2259",weierp:"\u2118",Wfr:"\u{1D51A}",wfr:"\u{1D534}",Wopf:"\u{1D54E}",wopf:"\u{1D568}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",Wscr:"\u{1D4B2}",wscr:"\u{1D4CC}",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",Xfr:"\u{1D51B}",xfr:"\u{1D535}",xhArr:"\u27FA",xharr:"\u27F7",Xi:"\u039E",xi:"\u03BE",xlArr:"\u27F8",xlarr:"\u27F5",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",Xopf:"\u{1D54F}",xopf:"\u{1D569}",xoplus:"\u2A01",xotime:"\u2A02",xrArr:"\u27F9",xrarr:"\u27F6",Xscr:"\u{1D4B3}",xscr:"\u{1D4CD}",xsqcup:"\u2A06",xuplus:"\u2A04",xutri:"\u25B3",xvee:"\u22C1",xwedge:"\u22C0",Yacute:"\xDD",yacute:"\xFD",YAcy:"\u042F",yacy:"\u044F",Ycirc:"\u0176",ycirc:"\u0177",Ycy:"\u042B",ycy:"\u044B",yen:"\xA5",Yfr:"\u{1D51C}",yfr:"\u{1D536}",YIcy:"\u0407",yicy:"\u0457",Yopf:"\u{1D550}",yopf:"\u{1D56A}",Yscr:"\u{1D4B4}",yscr:"\u{1D4CE}",YUcy:"\u042E",yucy:"\u044E",Yuml:"\u0178",yuml:"\xFF",Zacute:"\u0179",zacute:"\u017A",Zcaron:"\u017D",zcaron:"\u017E",Zcy:"\u0417",zcy:"\u0437",Zdot:"\u017B",zdot:"\u017C",zeetrf:"\u2128",ZeroWidthSpace:"\u200B",Zeta:"\u0396",zeta:"\u03B6",Zfr:"\u2128",zfr:"\u{1D537}",ZHcy:"\u0416",zhcy:"\u0436",zigrarr:"\u21DD",Zopf:"\u2124",zopf:"\u{1D56B}",Zscr:"\u{1D4B5}",zscr:"\u{1D4CF}",zwj:"\u200D",zwnj:"\u200C"});yr.entityMap=yr.HTML_ENTITIES});var Fs=Ge(bn=>{"use strict";var qt=mt(),N=pa(),Ms=dr(),Qc=qt.isHTMLEscapableRawTextElement,ed=qt.isHTMLMimeType,td=qt.isHTMLRawTextElement,Er=qt.hasOwn,Os=qt.NAMESPACE,rd=Ms.ParseError,nd=Ms.DOMException,Pt=0,ot=1,$t=2,vr=3,Ft=4,Ut=5,kr=6,_n=7;function Rs(){}Rs.prototype={parse:function(t,e,r){var n=this.domBuilder;n.startDocument(),od(e,e=Object.create(null)),ad(t,e,r,n,this.errorHandler),n.endDocument()}};var xa=/&#?\w+;?/g;function ad(t,e,r,n,a){var i=ed(n.mimeType);t.indexOf(N.UNICODE_REPLACEMENT_CHARACTER)>=0&&a.warning("Unicode replacement character detected, source encoding issues?");function s(R){if(R>65535){R-=65536;var ye=55296+(R>>10),Fr=56320+(R&1023);return String.fromCharCode(ye,Fr)}else return String.fromCharCode(R)}function o(R){var ye=R[R.length-1]===";"?R:R+";";if(!i&&ye!==R)return a.error("EntityRef: expecting ;"),R;var Fr=N.Reference.exec(ye);if(!Fr||Fr[0].length!==ye.length)return a.error("entity not matching Reference production: "+R),R;var Ur=ye.slice(1,-1);return Er(r,Ur)?r[Ur]:Ur.charAt(0)==="#"?s(parseInt(Ur.substring(1).replace("x","0x"))):(a.error("entity not found:"+R),R)}function u(R){if(R>g){var ye=t.substring(g,R).replace(xa,o);f&&p(g),n.characters(ye,0,R-g),g=R}}var l=0,c=0,d=/\r\n?|\n|$/g,f=n.locator;function p(R,ye){for(;R>=c&&(ye=d.exec(t));)l=c,c=ye.index+ye[0].length,f.lineNumber++;f.columnNumber=R-l+1}for(var h=[{currentNSMap:e}],m=[],g=0;;){try{var b=t.indexOf("<",g);if(b<0){if(!i&&m.length>0)return a.fatalError("unclosed xml tag(s): "+m.join(", "));if(!t.substring(g).match(/^\s*$/)){var v=n.doc,w=v.createTextNode(t.substring(g));if(v.documentElement)return a.error("Extra content at the end of the document");v.appendChild(w),n.currentElement=w}return}if(b>g){var x=t.substring(g,b);!i&&m.length===0&&(x=x.replace(new RegExp(N.S_OPT.source,"g"),""),x&&a.error("Unexpected content outside root element: '"+x+"'")),u(b)}switch(t.charAt(b+1)){case"/":var S=t.indexOf(">",b+2),B=t.substring(b+2,S>0?S:void 0);if(!B)return a.fatalError("end tag name missing");var L=N.reg("^",N.QName_group,N.S_OPT,"$"),G=S>0&&L.exec(B);if(!G){var re=S>0&&N.reg("^",N.QName_group).exec(B);if(i&&re)a.warning('end tag name contains invalid trailing characters: "'+B+'"'),G=re;else if(re&&new RegExp(L.source,L.flags+"m").test(B))a.error('end tag name is followed by a line break and trailing content: "'+B+'"'),G=re;else return a.fatalError('end tag name contains invalid characters: "'+B+'"')}if(!n.currentElement&&!n.doc.documentElement)return;var ne=m[m.length-1]||n.currentElement.tagName||n.doc.documentElement.tagName||"";if(ne!==G[1]){var Pe=G[1].toLowerCase();if(!i||ne.toLowerCase()!==Pe)return a.fatalError('Opening and ending tag mismatch: "'+ne+'" != "'+B+'"')}var Y=h.pop();m.pop();var de=Y.localNSMap;if(n.endElement(Y.uri,Y.localName,ne),de)for(var we in de)Er(de,we)&&n.endPrefixMapping(we);S++;break;case"?":f&&p(b),S=ud(t,b,n,a);break;case"!":f&&p(b),S=Ps(t,b,n,a,i);break;default:f&&p(b);var F=new $s,X=h[h.length-1].currentNSMap,S=id(t,b,F,X,o,a,i),ni=F.length;if(F.closed||(i&&qt.isHTMLVoidElement(F.tagName)?F.closed=!0:m.push(F.tagName)),f&&ni){for(var Jo=Bs(f,{}),Fn=0;Fn<ni;Fn++){var ai=F[Fn];p(ai.offset),ai.locator=Bs(f,{})}n.locator=Jo,Is(F,n,X)&&h.push(F),n.locator=f}else Is(F,n,X)&&h.push(F);i&&!F.closed?S=sd(t,S,F.tagName,o,n):S++}}catch(R){if(R instanceof rd)throw R;if(R instanceof nd)return a.fatalError("Error constructing the DOM: "+R.name+": "+R.message,R);a.error("element parse error: "+R),S=-1}S>g?g=S:u(Math.max(b,g)+1)}}function Bs(t,e){return e.lineNumber=t.lineNumber,e.columnNumber=t.columnNumber,e}function id(t,e,r,n,a,i,s){function o(p,h,m){if(Er(r.attributeNames,p))return i.fatalError("Attribute "+p+" redefined");if(!s&&h.indexOf("<")>=0)return i.fatalError("Unescaped '<' not allowed in attributes values");r.addValue(p,h.replace(/[\t\n\r]/g," ").replace(xa,a),m)}for(var u,l,c=++e,d=Pt;;){var f=t.charAt(c);if(d===Pt&&f==="<")throw new Error("unexpected < in tag name: "+t.slice(e,c));switch(f){case"=":if(d===ot)u=t.slice(e,c),d=vr;else if(d===$t)d=vr;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(d===vr||d===ot)if(d===ot&&(i.warning('attribute value must after "="'),u=t.slice(e,c)),e=c+1,c=t.indexOf(f,e),c>0)l=t.slice(e,c),o(u,l,e-1),d=Ut;else throw new Error("attribute value no end '"+f+"' match");else if(d==Ft)l=t.slice(e,c),o(u,l,e),i.warning('attribute "'+u+'" missed start quot('+f+")!!"),e=c+1,d=Ut;else throw new Error('attribute value must after "="');break;case"/":switch(d){case Pt:r.setTagName(t.slice(e,c));case Ut:case kr:case _n:d=_n,r.closed=!0;case Ft:case ot:break;case $t:r.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return i.error("unexpected end of input"),d==Pt&&r.setTagName(t.slice(e,c)),c;case">":switch(d){case Pt:r.setTagName(t.slice(e,c));case Ut:case kr:case _n:break;case Ft:case ot:l=t.slice(e,c),l.slice(-1)==="/"&&(r.closed=!0,l=l.slice(0,-1));case $t:d===$t&&(l=u),d==Ft?(i.warning('attribute "'+l+'" missed quot(")!'),o(u,l,e)):(s||i.warning('attribute "'+l+'" missed value!! "'+l+'" instead!!'),o(l,l,e));break;case vr:if(!s)return i.fatalError(`AttValue: ' or " expected`)}return c;case"\x80":f=" ";default:if(f<=" ")switch(d){case Pt:r.setTagName(t.slice(e,c)),d=kr;break;case ot:u=t.slice(e,c),d=$t;break;case Ft:var l=t.slice(e,c);i.warning('attribute "'+l+'" missed quot(")!!'),o(u,l,e);case Ut:d=kr;break}else switch(d){case $t:s||i.warning('attribute "'+u+'" missed value!! "'+u+'" instead2!!'),o(u,u,e),e=c,d=ot;break;case Ut:i.warning('attribute space is required"'+u+'"!!');case kr:d=ot,e=c;break;case vr:d=Ft,e=c;break;case _n:throw new Error("elements closed character '/' and '>' must be connected to")}}c++}}function Is(t,e,r){for(var n=t.tagName,a=null,d=t.length;d--;){var i=t[d],s=i.qName,o=i.value,f=s.indexOf(":");if(f>0)var u=i.prefix=s.slice(0,f),l=s.slice(f+1),c=u==="xmlns"&&l;else l=s,u=null,c=s==="xmlns"&&"";i.localName=l,c!==!1&&(a==null&&(a=Object.create(null),r=Object.create(r)),r[c]=a[c]=o,i.uri=Os.XMLNS,e.startPrefixMapping(c,o))}for(var d=t.length;d--;)i=t[d],i.prefix&&(i.prefix==="xml"&&(i.uri=Os.XML),i.prefix!=="xmlns"&&(i.uri=r[i.prefix]));var f=n.indexOf(":");f>0?(u=t.prefix=n.slice(0,f),l=t.localName=n.slice(f+1)):(u=null,l=t.localName=n);var p=t.uri=r[u||""];if(e.startElement(p,l,n,t),t.closed){if(e.endElement(p,l,n),a)for(u in a)Er(a,u)&&e.endPrefixMapping(u)}else return t.currentNSMap=r,t.localNSMap=a,!0}function sd(t,e,r,n,a){var i=Qc(r);if(i||td(r)){var s=new RegExp("</"+r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+">","ig");s.lastIndex=e;var o=s.exec(t),u=o?o.index:-1;if(u<0)return e+1;var l=t.substring(e+1,u);return i&&(l=l.replace(xa,n)),a.characters(l,0,l.length),u}return e+1}function od(t,e){for(var r in t)Er(t,r)&&(e[r]=t[r])}function Ls(t,e){var r=e;function n(c){return c=c||0,t.charAt(r+c)}function a(c){c=c||1,r+=c}function i(){for(var c=0;r<t.length;){var d=n();if(d!==" "&&d!==`
|
|
3
|
+
`&&d!==" "&&d!=="\r")return c;c++,a()}return-1}function s(){return t.substring(r)}function o(c){return t.substring(r,r+c.length)===c}function u(c){return t.substring(r,r+c.length).toUpperCase()===c.toUpperCase()}function l(c){var d=N.reg("^",c),f=d.exec(s());return f?(a(f[0].length),f[0]):null}return{char:n,getIndex:function(){return r},getMatch:l,getSource:function(){return t},skip:a,skipBlanks:i,substringFromIndex:s,substringStartsWith:o,substringStartsWithCaseInsensitive:u}}function ld(t,e){function r(o,u){var l=N.PI.exec(o.substringFromIndex());return l?l[1].toLowerCase()==="xml"?u.fatalError("xml declaration is only allowed at the start of the document, but found at position "+o.getIndex()):(o.skip(l[0].length),l[0]):u.fatalError("processing instruction is not well-formed at position "+o.getIndex())}var n=t.getSource();if(t.char()==="["){t.skip(1);for(var a=t.getIndex();t.getIndex()<n.length;){if(t.skipBlanks(),t.char()==="]"){var i=n.substring(a,t.getIndex());return t.skip(1),i}var s=null;if(t.char()==="<"&&t.char(1)==="!")switch(t.char(2)){case"E":t.char(3)==="L"?s=t.getMatch(N.elementdecl):t.char(3)==="N"&&(s=t.getMatch(N.EntityDecl));break;case"A":s=t.getMatch(N.AttlistDecl);break;case"N":s=t.getMatch(N.NotationDecl);break;case"-":s=t.getMatch(N.Comment);break}else if(t.char()==="<"&&t.char(1)==="?")s=r(t,e);else if(t.char()==="%")s=t.getMatch(N.PEReference);else return e.fatalError("Error detected in Markup declaration");if(!s)return e.fatalError("Error in internal subset at position "+t.getIndex())}return e.fatalError("doctype internal subset is not well-formed, missing ]")}}function Ps(t,e,r,n,a){var i=Ls(t,e);switch(a?i.char(2).toUpperCase():i.char(2)){case"-":var s=i.getMatch(N.Comment);return s?(r.comment(s,N.COMMENT_START.length,s.length-N.COMMENT_START.length-N.COMMENT_END.length),i.getIndex()):n.fatalError("comment is not well-formed at position "+i.getIndex());case"[":var o=i.getMatch(N.CDSect);return o?!a&&!r.currentElement?n.fatalError("CDATA outside of element"):(r.startCDATA(),r.characters(o,N.CDATA_START.length,o.length-N.CDATA_START.length-N.CDATA_END.length),r.endCDATA(),i.getIndex()):n.fatalError("Invalid CDATA starting at position "+e);case"D":{if(r.doc&&r.doc.documentElement)return n.fatalError("Doctype not allowed inside or after documentElement at position "+i.getIndex());if(a?!i.substringStartsWithCaseInsensitive(N.DOCTYPE_DECL_START):!i.substringStartsWith(N.DOCTYPE_DECL_START))return n.fatalError("Expected "+N.DOCTYPE_DECL_START+" at position "+i.getIndex());if(i.skip(N.DOCTYPE_DECL_START.length),i.skipBlanks()<1)return n.fatalError("Expected whitespace after "+N.DOCTYPE_DECL_START+" at position "+i.getIndex());var u={name:void 0,publicId:void 0,systemId:void 0,internalSubset:void 0};if(u.name=i.getMatch(N.Name),!u.name)return n.fatalError("doctype name missing or contains unexpected characters at position "+i.getIndex());if(a&&u.name.toLowerCase()!=="html"&&n.warning("Unexpected DOCTYPE in HTML document at position "+i.getIndex()),i.skipBlanks(),i.substringStartsWith(N.PUBLIC)||i.substringStartsWith(N.SYSTEM)){var l=N.ExternalID_match.exec(i.substringFromIndex());if(!l)return n.fatalError("doctype external id is not well-formed at position "+i.getIndex());l.groups.SystemLiteralOnly!==void 0?u.systemId=l.groups.SystemLiteralOnly:(u.systemId=l.groups.SystemLiteral,u.publicId=l.groups.PubidLiteral),i.skip(l[0].length)}else if(a&&i.substringStartsWithCaseInsensitive(N.SYSTEM)){if(i.skip(N.SYSTEM.length),i.skipBlanks()<1)return n.fatalError("Expected whitespace after "+N.SYSTEM+" at position "+i.getIndex());if(u.systemId=i.getMatch(N.ABOUT_LEGACY_COMPAT_SystemLiteral),!u.systemId)return n.fatalError("Expected "+N.ABOUT_LEGACY_COMPAT+" in single or double quotes after "+N.SYSTEM+" at position "+i.getIndex())}return a&&u.systemId&&!N.ABOUT_LEGACY_COMPAT_SystemLiteral.test(u.systemId)&&n.warning("Unexpected doctype.systemId in HTML document at position "+i.getIndex()),a||(i.skipBlanks(),u.internalSubset=ld(i,n)),i.skipBlanks(),i.char()!==">"?n.fatalError("doctype not terminated with > at position "+i.getIndex()):(i.skip(1),r.startDTD(u.name,u.publicId,u.systemId,u.internalSubset),r.endDTD(),i.getIndex())}default:return n.fatalError('Not well-formed XML starting with "<!" at position '+e)}}function ud(t,e,r,n){var a=t.substring(e).match(N.PI);if(!a)return n.fatalError("Invalid processing instruction starting at position "+e);if(a[1].toLowerCase()==="xml"){if(e>0)return n.fatalError("processing instruction at position "+e+" is an xml declaration which is only at the start of the document");if(!N.XMLDecl.test(t.substring(e)))return n.fatalError("xml declaration is not well-formed")}return r.processingInstruction(a[1],a[2]),e+a[0].length}function $s(){this.attributeNames=Object.create(null)}$s.prototype={setTagName:function(t){if(!N.QName_exact.test(t))throw new Error("invalid tagName:"+t);this.tagName=t},addValue:function(t,e,r){if(!N.QName_exact.test(t))throw new Error("invalid attribute:"+t);this.attributeNames[t]=this.length,this[this.length++]={qName:t,value:e,offset:r}},length:0,getLocalName:function(t){return this[t].localName},getLocator:function(t){return this[t].locator},getQName:function(t){return this[t].qName},getURI:function(t){return this[t].uri},getValue:function(t){return this[t].value}};bn.XMLReader=Rs;bn.parseUtils=Ls;bn.parseDoctypeCommentOrCData=Ps});var Ws=Ge(Vt=>{"use strict";var _t=mt(),cd=Ea(),dd=dr(),Us=Ss(),fd=Fs(),pd=cd.DOMImplementation,hd=_t.hasDefaultHTMLNamespace,md=_t.isHTMLMimeType,gd=_t.isValidMimeType,Vs=_t.MIME_TYPE,Da=_t.NAMESPACE,qs=dd.ParseError,_d=fd.XMLReader;function zs(t){return t.replace(/\r[\n\u0085]/g,`
|
|
4
4
|
`).replace(/[\r\u0085\u2028\u2029]/g,`
|
|
5
|
-
`)}function
|
|
6
|
-
@#[line:`+t.lineNumber+",col:"+t.columnNumber+"]"}function
|
|
5
|
+
`)}function Hs(t){if(t=t||{},t.locator===void 0&&(t.locator=!0),this.assign=t.assign||_t.assign,this.domHandler=t.domHandler||yn,this.onError=t.onError||t.errorHandler,t.errorHandler&&typeof t.errorHandler!="function")throw new TypeError("errorHandler object is no longer supported, switch to onError!");t.errorHandler&&t.errorHandler("warning","The `errorHandler` option has been deprecated, use `onError` instead!",this),this.normalizeLineEndings=t.normalizeLineEndings||zs,this.locator=!!t.locator,this.xmlns=this.assign(Object.create(null),t.xmlns)}Hs.prototype.parseFromString=function(t,e){if(!gd(e))throw new TypeError('DOMParser.parseFromString: the provided mimeType "'+e+'" is not valid.');var r=this.assign(Object.create(null),this.xmlns),n=Us.XML_ENTITIES,a=r[""]||null;hd(e)?(n=Us.HTML_ENTITIES,a=Da.HTML):e===Vs.XML_SVG_IMAGE&&(a=Da.SVG),r[""]=a,r.xml=r.xml||Da.XML;var i=new this.domHandler({mimeType:e,defaultNamespace:a,onError:this.onError}),s=this.locator?{}:void 0;this.locator&&i.setDocumentLocator(s);var o=new _d;o.errorHandler=i,o.domBuilder=i;var u=!_t.isHTMLMimeType(e);return u&&typeof t!="string"&&o.errorHandler.fatalError("source is not a string"),o.parse(this.normalizeLineEndings(String(t)),r,n),i.doc.documentElement||o.errorHandler.fatalError("missing root element"),i.doc};function yn(t){var e=t||{};this.mimeType=e.mimeType||Vs.XML_APPLICATION,this.defaultNamespace=e.defaultNamespace||null,this.cdata=!1,this.currentElement=void 0,this.doc=void 0,this.locator=void 0,this.onError=e.onError}function jt(t,e){e.lineNumber=t.lineNumber,e.columnNumber=t.columnNumber}yn.prototype={startDocument:function(){var t=new pd;this.doc=md(this.mimeType)?t.createHTMLDocument(!1):t.createDocument(this.defaultNamespace,"")},startElement:function(t,e,r,n){var a=this.doc,i=a.createElementNS(t,r||e),s=n.length;wn(this,i),this.currentElement=i,this.locator&&jt(this.locator,i);for(var o=0;o<s;o++){var t=n.getURI(o),u=n.getValue(o),r=n.getQName(o),l=a.createAttributeNS(t,r);this.locator&&jt(n.getLocator(o),l),l.value=l.nodeValue=u,i.setAttributeNode(l)}},endElement:function(t,e,r){this.currentElement=this.currentElement.parentNode},startPrefixMapping:function(t,e){},endPrefixMapping:function(t){},processingInstruction:function(t,e){var r=this.doc.createProcessingInstruction(t,e);this.locator&&jt(this.locator,r),wn(this,r)},ignorableWhitespace:function(t,e,r){},characters:function(t,e,r){if(t=js.apply(this,arguments),t){if(this.cdata)var n=this.doc.createCDATASection(t);else var n=this.doc.createTextNode(t);this.currentElement?this.currentElement.appendChild(n):/^\s*$/.test(t)&&this.doc.appendChild(n),this.locator&&jt(this.locator,n)}},skippedEntity:function(t){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(t){t&&(t.lineNumber=0),this.locator=t},comment:function(t,e,r){t=js.apply(this,arguments);var n=this.doc.createComment(t);this.locator&&jt(this.locator,n),wn(this,n)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(t,e,r,n){var a=this.doc.implementation;if(a&&a.createDocumentType){var i=a.createDocumentType(t,e,r,n);this.locator&&jt(this.locator,i),wn(this,i),this.doc.doctype=i}},reportError:function(t,e){if(typeof this.onError=="function")try{this.onError(t,e,this)}catch(r){throw new qs("Reporting "+t+' "'+e+'" caused '+r,this.locator)}else console.error("[xmldom "+t+"] "+e,bd(this.locator))},warning:function(t){this.reportError("warning",t)},error:function(t){this.reportError("error",t)},fatalError:function(t,e){throw this.reportError("fatalError",t),new qs(t,this.locator,e)}};function bd(t){if(t)return`
|
|
6
|
+
@#[line:`+t.lineNumber+",col:"+t.columnNumber+"]"}function js(t,e,r){return typeof t=="string"?t.substr(e,r):t.length>=e+r||e?new java.lang.String(t,e,r)+"":t}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(t){yn.prototype[t]=function(){return null}});function wn(t,e){t.currentElement?t.currentElement.appendChild(e):t.doc.appendChild(e)}function wd(t){if(t==="error")throw"onErrorStopParsing"}function yd(){throw"onWarningStopParsing"}Vt.__DOMHandler=yn;Vt.DOMParser=Hs;Vt.normalizeLineEndings=zs;Vt.onErrorStopParsing=wd;Vt.onWarningStopParsing=yd});var Aa=Ge(M=>{"use strict";var zt=mt();M.assign=zt.assign;M.hasDefaultHTMLNamespace=zt.hasDefaultHTMLNamespace;M.isHTMLMimeType=zt.isHTMLMimeType;M.isValidMimeType=zt.isValidMimeType;M.MIME_TYPE=zt.MIME_TYPE;M.NAMESPACE=zt.NAMESPACE;var vn=dr();M.DOMException=vn.DOMException;M.DOMExceptionName=vn.DOMExceptionName;M.ExceptionCode=vn.ExceptionCode;M.ParseError=vn.ParseError;var Q=Ea();M.Attr=Q.Attr;M.CDATASection=Q.CDATASection;M.CharacterData=Q.CharacterData;M.Comment=Q.Comment;M.Document=Q.Document;M.DocumentFragment=Q.DocumentFragment;M.DocumentType=Q.DocumentType;M.DOMImplementation=Q.DOMImplementation;M.Element=Q.Element;M.Entity=Q.Entity;M.EntityReference=Q.EntityReference;M.LiveNodeList=Q.LiveNodeList;M.NamedNodeMap=Q.NamedNodeMap;M.Node=Q.Node;M.NodeList=Q.NodeList;M.Notation=Q.Notation;M.ProcessingInstruction=Q.ProcessingInstruction;M.Text=Q.Text;M.XMLSerializer=Q.XMLSerializer;var kn=Ws();M.DOMParser=kn.DOMParser;M.normalizeLineEndings=kn.normalizeLineEndings;M.onErrorStopParsing=kn.onErrorStopParsing;M.onWarningStopParsing=kn.onWarningStopParsing});var Z={};ii(Z,{defineCollection:()=>Un});qr(Z,Vf);import*as Vf from"@gramlot/gramlot/components";import{defineCollection as Ko}from"@gramlot/gramlot/components";function Un(t){if(t.name!=="editors")throw new Error("Unexpected bundled collection");let e=[],r={};t.css?.forEach((n,a)=>{n.href=e[a].href});for(let[n,a]of Object.entries(t.assets??{}))a.href=r[n].href;return Ko({...t,css:e,assets:r})}function jr(t,e){return t.parameters=Object.fromEntries(Object.entries(t.constructor.gramlotComponent.parameters).map(([r,n])=>[r,Object.hasOwn(e,r)?e[r]:n.default])),Object.fromEntries(Object.entries(e).filter(([r])=>!Object.hasOwn(t.parameters,r)))}function oi(t,e=","){if(typeof e!="string"||!e)throw new TypeError("separator must be a nonempty string");if(t==="")return[];let r=new Set;return t.split(e).map(n=>{let a=n.indexOf(":"),i=a<0?n:n.slice(0,a),s=a<0?n:n.slice(a+1);if(!i||r.has(i))throw new Error("Invalid or duplicate choice code");return r.add(i),{id:i,caption:s}})}function Xe(t){return class extends t{constructor(){super();let e=this.attachShadow({mode:"open"}),r=this.ownerDocument.createElement("style");r.textContent=`:host{display:inline-block;font:inherit} *,*::before,*::after{box-sizing:border-box}
|
|
7
7
|
input,textarea{font:inherit;max-width:100%} .control-box{min-width:0;color:var(--gramlot-ink,CanvasText)}
|
|
8
8
|
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),textarea{
|
|
9
9
|
appearance:none;box-sizing:border-box;width:100%;border:1px solid var(--gramlot-border-control,#7a8798);
|
|
10
|
-
border-radius:var(--gramlot-radius-sm,4px);background:var(--gramlot-field-background,Canvas);color:var(--gramlot-ink,CanvasText);
|
|
11
|
-
min-height:var(--gramlot-field-height,28px);padding:var(--gramlot-field-padding,.25em .5em);font-size:var(--gramlot-field-font-size,1em);line-height:var(--gramlot-field-line-height,inherit)}
|
|
10
|
+
border-radius:var(--gramlot-field-radius,var(--gramlot-radius-sm,4px));background:var(--gramlot-field-background,Canvas);color:var(--gramlot-ink,CanvasText);
|
|
11
|
+
height:var(--gramlot-field-block-size,auto);min-height:var(--gramlot-field-height,28px);padding:var(--gramlot-field-padding,.25em .5em);font-size:var(--gramlot-field-font-size,1em);line-height:var(--gramlot-field-line-height,inherit)}
|
|
12
12
|
input:read-only:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),textarea:read-only{
|
|
13
13
|
background:var(--gramlot-field-readonly-background,Canvas)}
|
|
14
14
|
input:disabled,textarea:disabled{opacity:.6;cursor:not-allowed}
|
|
15
15
|
input::placeholder,textarea::placeholder{color:var(--gramlot-text-secondary,GrayText)}
|
|
16
|
-
input:focus-visible,textarea:focus-visible,button:focus-visible{outline:2px solid var(--gramlot-focus-ring,Highlight);outline-offset:1px}
|
|
16
|
+
input:focus-visible,textarea:focus-visible,button:focus-visible{outline:var(--gramlot-field-focus-outline,2px solid var(--gramlot-focus-ring,Highlight));outline-offset:var(--gramlot-field-focus-offset,1px)}
|
|
17
|
+
textarea{resize:var(--gramlot-field-resize,both)}
|
|
17
18
|
input[type=checkbox],input[type=radio],input[type=range]{accent-color:var(--gramlot-brand-blue,Highlight)}
|
|
18
19
|
input[type=range],input[type=color],button{min-width:var(--gramlot-touch-target,0px);min-height:var(--gramlot-touch-target,0px)}
|
|
19
20
|
input[type=checkbox],input[type=radio]{min-width:calc(var(--gramlot-touch-target,0px) / 2);min-height:calc(var(--gramlot-touch-target,0px) / 2)}
|
|
20
21
|
.options{display:grid;gap:.3em .8em} .option{display:flex;align-items:center;gap:.35em;min-width:var(--gramlot-touch-target,0px);min-height:var(--gramlot-touch-target,0px)}
|
|
21
|
-
.caption:empty{display:none}`,this.controlBox=this.ownerDocument.createElement("div"),this.controlBox.className="control-box",e.append(r,this.controlBox)}projectAttributes(e){return jr(this,e)}setPageContext(e){this.pageContext=e}connectedCallback(){}releaseControl(){}get liveWrites(){return this.control.localName==="textarea"||["text","password","range","color"].includes(this.control.type)}validateCandidate(e,r){return r(e),{ok:!0,value:e,isCurrent:()=>this.pageContext.isActive()}}finishValidation(){}
|
|
22
|
-
`,i),i<0&&(i=t.length),n+=t.slice(s,i);continue}if(t.startsWith("/*",i)){let c=t.indexOf("*/",i+2);i=c<0?t.length:c+2,n+=t.slice(s,i);continue}if(o==="/"&&a){let c=!1;for(i++;i<t.length;){let d=t[i++];if(d==="\\"){i++;continue}if(d==="[")c=!0;else if(d==="]")c=!1;else if(d==="/"&&!c)break}for(;/[a-z]/i.test(t[i]??"")&&i<t.length;)i++;n+=t.slice(s,i),a=!1;continue}let u=o==="{"?t.slice(i).match(
|
|
22
|
+
.caption:empty{display:none}`,this.controlBox=this.ownerDocument.createElement("div"),this.controlBox.className="control-box",e.append(r,this.controlBox)}projectAttributes(e){return jr(this,e)}setPageContext(e){this.pageContext=e}connectedCallback(){}releaseControl(){}get liveWrites(){return this.control.localName==="textarea"||["text","password","range","color"].includes(this.control.type)}validateCandidate(e,r){return r(e),{ok:!0,value:e,isCurrent:()=>this.pageContext.isActive()}}finishValidation(){}validationValueCheck(){let e=this.constructor.gramlotComponent.parameters.value.nullable;return(r,n)=>{if(r==null&&!e)throw new TypeError("This component requires a non-null value.");if(r!=null&&n!=null&&typeof r!=typeof n)throw new TypeError("Validation must preserve the component value type.")}}validationSelection(){return()=>{throw new TypeError("validate_select requires a constrained choice editor.")}}validateSelection(e){return this.validationSelection()(e)}shouldProjectControlValue(){return!0}acceptControlValue(){let e=this.readControlValue();return this.validateCandidate(e,r=>{this.validationValueCheck()(r,e),this.sameControlValue(e,r)||this.writeControlValue(r)})}restoreFormDraft(e){this.control.value=e}restoreFormValue(e){this.writeControlValue(e)}sameControlValue(e,r){return Object.is(e,r)}focus(e){this.control.focus(e)}}}function Qo(t){return class extends Xe(t){constructor(){super(),this.control=this.createControl(),(this.control.localName==="textarea"||this.control.localName==="input"&&["text","password"].includes(this.control.type))&&(this.control.setAttribute("autocomplete","off"),this.control.setAttribute("autocorrect","off"),this.control.setAttribute("autocapitalize","off"),this.control.setAttribute("spellcheck","false")),this.control.id="control";let e=this.ownerDocument.createElement("label");e.className="option",this.optionCaption=this.ownerDocument.createElement("span"),this.optionCaption.className="caption",e.append(this.control,this.optionCaption),this.controlBox.append(e)}projectAttributes(e,r){let n=super.projectAttributes(e,r),{disabled:a,readonly:i}=this.parameters;this.control.disabled=!!a,this.control.readOnly=!!i;for(let[s,o]of Object.entries(this.constructor.gramlotComponent.parameters)){if(o.target==="control"){let u=this.parameters[s]??"";String(this.control[s])!==String(u)&&(this.control[s]=u)}o.target==="optionCaption"&&(this.optionCaption.textContent=this.parameters[s]??"")}return n}}}Qo.parameters={disabled:{dtype:"B",default:!1,binding:"read"},readonly:{dtype:"B",default:!1,binding:"read"},live:{dtype:"B",default:!1,binding:"read"}};function el(t){return class extends Xe(t){#e=new Map;#t;#r=null;constructor(){super(),this.control=this.ownerDocument.createElement("div"),this.control.className="options",this.control.id="control",this.control.setAttribute("role",this.multiple?"group":"radiogroup"),this.controlBox.append(this.control),this.control.addEventListener("keydown",e=>{if(!this.multiple||!["ArrowDown","ArrowUp","ArrowLeft","ArrowRight","Home","End"].includes(e.key))return;let r=[...this.control.querySelectorAll("input:not(:disabled)")],n=r.indexOf(e.target);if(n<0)return;e.preventDefault();let a=e.key==="Home"?0:e.key==="End"?r.length-1:Math.max(0,Math.min(r.length-1,n+(["ArrowDown","ArrowRight"].includes(e.key)?1:-1)));r[a].focus()})}projectAttributes(e,r){let n=super.projectAttributes(e,r),a=this.parameters.values??"";if(a!==this.#t){let s=oi(a),o=new Set,u=null;for(let{id:l,caption:c}of s){let d=this.#e.get(l);if(!d){let p=this.ownerDocument.createElement("label");p.className="option";let h=this.ownerDocument.createElement("input");h.type=this.choiceType,h.name="choice",h.value=l;let m=this.ownerDocument.createElement("span");p.append(h,m),d={label:p,input:h,text:m},this.#e.set(l,d)}d.text.textContent=c;let f=u?u.nextSibling:this.control.firstChild;f!==d.label&&this.control.insertBefore(d.label,f),u=d.label,o.add(l)}for(let[l,c]of this.#e)o.has(l)||(c.label.remove(),this.#e.delete(l));this.#t=a}let i=this.parameters.cols;if(!Number.isInteger(i)||i<1)throw new TypeError("cols must be a positive integer");this.control.style.gridTemplateColumns=`repeat(${i}, minmax(0, 1fr))`,this.control.disabled=!!this.parameters.disabled,this.control.readOnly=!!this.parameters.readonly;for(let{input:s}of this.#e.values())s.disabled=this.control.disabled||this.control.readOnly;return n}readControlValue(){if(this.multiple){let r=(this.#r?this.#r.split(","):[]).filter(n=>!this.#e.has(n)||this.#e.get(n).input.checked);for(let[n,{input:a}]of this.#e)a.checked&&!r.includes(n)&&r.push(n);return r.join(",")||null}for(let[e,{input:r}]of this.#e)if(r.checked)return e;return null}writeControlValue(e){this.#r=e;let r=this.multiple?new Set(e?e.split(","):[]):null;for(let[n,{input:a}]of this.#e)a.checked=this.multiple?r.has(n):n===e}acceptControlValue(){let e=this.readControlValue();return this.validateCandidate(e,r=>this.writeControlValue(r))}focus(e){let r=[...this.#e.values()];(r.find(({input:n})=>n.checked&&!n.disabled)??r.find(({input:n})=>!n.disabled))?.input.focus(e)}}}el.parameters={disabled:{dtype:"B",default:!1,binding:"read"},readonly:{dtype:"B",default:!1,binding:"read"}};var li=["TL","TC","TR","L","R","BL","BC","BR"];function Ye(t){return class extends t{setLabelbox(e){let{box:r,labelBox:n,fieldLabel:a}=e;Object.assign(this,{box:r,labelBox:n,fieldLabel:a}),a.addEventListener("click",()=>{this.control.focus(),this.control.localName==="input"&&["checkbox","radio"].includes(this.control.type)&&this.control.click()})}projectAttributes(e,r){let n=super.projectAttributes(e,r),a=this.parameters.lbl??"";return a?this.control.setAttribute("aria-label",a):this.control.removeAttribute("aria-label"),n}}}Ye.labelbox=!0;Ye.parameters={lbl:{dtype:"T",qualification:"intl_str",nullable:!0,binding:"read"},lbl_position:{dtype:"T",default:"TL",binding:"read",enum:li}};import{Bag as Mf}from"@gramlot/gramlot";function Ze(t){if(typeof t!="string"||!["^","="].includes(t[0])||t.startsWith("=="))return null;let e=t.indexOf(":");if(e<0)return null;let r=t[e+1]==="=";return{pointer:t.slice(0,e),expression:r,body:t.slice(e+(r?2:1))}}var ui=/^\{(\??[A-Za-z_][A-Za-z0-9_]*|\?)?\}/;function Jt(t,e){let r="",n=!1;for(let a=0;a<t.length;){if(t[a]!=="{"&&t[a]!=="}"){r+=t[a++];continue}let i=t.slice(a).match(ui);if(!i)throw new SyntaxError("Invalid pointer template placeholder");let s=i[1]??"",o=s.startsWith("?"),u=e(o?s.slice(1):s);u==null||u===""&&!o?n=!0:r+=String(u),a+=i[0].length}return n?null:r}function qn(t){let e=[],r=new Set,n="",a=!0;for(let i=0;i<t.length;){let s=i,o=t[i];if(o==='"'||o==="'"||o==="`"){for(i++;i<t.length;){if(t[i]==="\\"){i+=2;continue}if(t[i++]===o)break}n+=t.slice(s,i),a=!1;continue}if(t.startsWith("//",i)){i=t.indexOf(`
|
|
23
|
+
`,i),i<0&&(i=t.length),n+=t.slice(s,i);continue}if(t.startsWith("/*",i)){let c=t.indexOf("*/",i+2);i=c<0?t.length:c+2,n+=t.slice(s,i);continue}if(o==="/"&&a){let c=!1;for(i++;i<t.length;){let d=t[i++];if(d==="\\"){i++;continue}if(d==="[")c=!0;else if(d==="]")c=!1;else if(d==="/"&&!c)break}for(;/[a-z]/i.test(t[i]??"")&&i<t.length;)i++;n+=t.slice(s,i),a=!1;continue}let u=o==="{"?t.slice(i).match(ui):null;if(u){let c=u[1]??"";if(c.startsWith("?"))throw new SyntaxError("Optional slots are supported in pointer templates only");n+=`_pointerValues[${e.length}]`,e.push(c),i+=u[0].length,a=!1;continue}let l=t.slice(i).match(/^[A-Za-z_$][\w$]*/);if(l){r.add(l[0]),n+=l[0],i+=l[0].length,a=["return","typeof","void","delete","new","in","instanceof","yield","await"].includes(l[0]);continue}n+=o,i++,/\s/.test(o)||(a=/[([{,:;=!?&|+*%~<>\/-]/.test(o))}return{text:n,slots:e,identifiers:r}}function ci(t,e,r=()=>null){let n=new Map,a=[],i=s=>{if(n.has(s))return n.get(s);if(!t.has(s))throw new Error(`Referenced Source attribute '${s}' does not exist`);if(a.includes(s))throw new Error(`Cyclic attribute dependency: ${[...a,s].join(" -> ")}`);a.push(s);try{let o=t.get(s),u=typeof s=="string"?Ze(o):null,l=e.get(s);if(u){let c=d=>d?i(d):e.get(s);if(u.expression){let d=qn(u.body);l=r(s,o,d,d.slots.map(c))}else l=Jt(u.body,c),e.get(s)==null&&(l=null)}return n.set(s,l),l}finally{a.pop()}};return new Map([...t.keys()].map(s=>[s,i(s)]))}function jn(t,e){let r=new Map([...Object.entries(t.getAttr()),...t.fixedAttrItems()]),n=new Set,a=[],i=s=>{let o=Ze(s);if(!o)return;let u=[];o.expression?u.push(...qn(o.body).slots):Jt(o.body,l=>(u.push(l),""));for(let l of u.filter(Boolean)){if(!r.has(l))throw new Error(`Referenced Source attribute '${l}' does not exist`);if(a.includes(l))throw new Error(`Cyclic attribute dependency: ${[...a,l].join(" -> ")}`);n.has(l)||(a.push(l),i(r.get(l)),a.pop(),n.add(l))}};return i(e),n}/*!
|
|
23
24
|
* decimal.js v10.6.0
|
|
24
25
|
* An arbitrary-precision Decimal type for JavaScript.
|
|
25
26
|
* https://github.com/MikeMcl/decimal.js
|
|
26
27
|
* Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
|
|
27
28
|
* MIT Licence
|
|
28
|
-
*/var xt=9e15,et=1e9,jn="0123456789abcdef",Hr="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Wr="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Vn={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-xt,maxE:xt,crypto:!1},pi,$e,T=!0,Xr="[DecimalError] ",Qe=Xr+"Invalid argument: ",hi=Xr+"Precision limit exceeded",mi=Xr+"crypto unavailable",gi="[object Decimal]",le=Math.floor,J=Math.pow,tl=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,rl=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,nl=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,_i=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Ee=1e7,D=7,al=9007199254740991,il=Hr.length-1,zn=Wr.length-1,g={toStringTag:gi};g.absoluteValue=g.abs=function(){var t=new this.constructor(this);return t.s<0&&(t.s=1),E(t)};g.ceil=function(){return E(new this.constructor(this),this.e+1,2)};g.clampedTo=g.clamp=function(t,e){var r,n=this,a=n.constructor;if(t=new a(t),e=new a(e),!t.s||!e.s)return new a(NaN);if(t.gt(e))throw Error(Qe+e);return r=n.cmp(t),r<0?t:n.cmp(e)>0?e:new a(n)};g.comparedTo=g.cmp=function(t){var e,r,n,a,i=this,s=i.d,o=(t=new i.constructor(t)).d,u=i.s,l=t.s;if(!s||!o)return!u||!l?NaN:u!==l?u:s===o?0:!s^u<0?1:-1;if(!s[0]||!o[0])return s[0]?u:o[0]?-l:0;if(u!==l)return u;if(i.e!==t.e)return i.e>t.e^u<0?1:-1;for(n=s.length,a=o.length,e=0,r=n<a?n:a;e<r;++e)if(s[e]!==o[e])return s[e]>o[e]^u<0?1:-1;return n===a?0:n>a^u<0?1:-1};g.cosine=g.cos=function(){var t,e,r=this,n=r.constructor;return r.d?r.d[0]?(t=n.precision,e=n.rounding,n.precision=t+Math.max(r.e,r.sd())+D,n.rounding=1,r=sl(n,ki(n,r)),n.precision=t,n.rounding=e,E($e==2||$e==3?r.neg():r,t,e,!0)):new n(1):new n(NaN)};g.cubeRoot=g.cbrt=function(){var t,e,r,n,a,i,s,o,u,l,c=this,d=c.constructor;if(!c.isFinite()||c.isZero())return new d(c);for(T=!1,i=c.s*J(c.s*c,1/3),!i||Math.abs(i)==1/0?(r=ie(c.d),t=c.e,(i=(t-r.length+1)%3)&&(r+=i==1||i==-2?"0":"00"),i=J(r,1/3),t=le((t+1)/3)-(t%3==(t<0?-1:2)),i==1/0?r="5e"+t:(r=i.toExponential(),r=r.slice(0,r.indexOf("e")+1)+t),n=new d(r),n.s=c.s):n=new d(i.toString()),s=(t=d.precision)+3;;)if(o=n,u=o.times(o).times(o),l=u.plus(c),n=U(l.plus(c).times(o),l.plus(u),s+2,1),ie(o.d).slice(0,s)===(r=ie(n.d)).slice(0,s))if(r=r.slice(s-3,s+1),r=="9999"||!a&&r=="4999"){if(!a&&(E(o,t+1,0),o.times(o).times(o).eq(c))){n=o;break}s+=4,a=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(E(n,t+1,1),e=!n.times(n).times(n).eq(c));break}return T=!0,E(n,t,d.rounding,e)};g.decimalPlaces=g.dp=function(){var t,e=this.d,r=NaN;if(e){if(t=e.length-1,r=(t-le(this.e/D))*D,t=e[t],t)for(;t%10==0;t/=10)r--;r<0&&(r=0)}return r};g.dividedBy=g.div=function(t){return U(this,new this.constructor(t))};g.dividedToIntegerBy=g.divToInt=function(t){var e=this,r=e.constructor;return E(U(e,new r(t),0,1,1),r.precision,r.rounding)};g.equals=g.eq=function(t){return this.cmp(t)===0};g.floor=function(){return E(new this.constructor(this),this.e+1,3)};g.greaterThan=g.gt=function(t){return this.cmp(t)>0};g.greaterThanOrEqualTo=g.gte=function(t){var e=this.cmp(t);return e==1||e===0};g.hyperbolicCosine=g.cosh=function(){var t,e,r,n,a,i=this,s=i.constructor,o=new s(1);if(!i.isFinite())return new s(i.s?1/0:NaN);if(i.isZero())return o;r=s.precision,n=s.rounding,s.precision=r+Math.max(i.e,i.sd())+4,s.rounding=1,a=i.d.length,a<32?(t=Math.ceil(a/3),e=(1/Zr(4,t)).toString()):(t=16,e="2.3283064365386962890625e-10"),i=Dt(s,1,i.times(e),new s(1),!0);for(var u,l=t,c=new s(8);l--;)u=i.times(i),i=o.minus(u.times(c.minus(u.times(c))));return E(i,s.precision=r,s.rounding=n,!0)};g.hyperbolicSine=g.sinh=function(){var t,e,r,n,a=this,i=a.constructor;if(!a.isFinite()||a.isZero())return new i(a);if(e=i.precision,r=i.rounding,i.precision=e+Math.max(a.e,a.sd())+4,i.rounding=1,n=a.d.length,n<3)a=Dt(i,2,a,a,!0);else{t=1.4*Math.sqrt(n),t=t>16?16:t|0,a=a.times(1/Zr(5,t)),a=Dt(i,2,a,a,!0);for(var s,o=new i(5),u=new i(16),l=new i(20);t--;)s=a.times(a),a=a.times(o.plus(s.times(u.times(s).plus(l))))}return i.precision=e,i.rounding=r,E(a,e,r,!0)};g.hyperbolicTangent=g.tanh=function(){var t,e,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(t=n.precision,e=n.rounding,n.precision=t+7,n.rounding=1,U(r.sinh(),r.cosh(),n.precision=t,n.rounding=e)):new n(r.s)};g.inverseCosine=g.acos=function(){var t=this,e=t.constructor,r=t.abs().cmp(1),n=e.precision,a=e.rounding;return r!==-1?r===0?t.isNeg()?Ce(e,n,a):new e(0):new e(NaN):t.isZero()?Ce(e,n+4,a).times(.5):(e.precision=n+6,e.rounding=1,t=new e(1).minus(t).div(t.plus(1)).sqrt().atan(),e.precision=n,e.rounding=a,t.times(2))};g.inverseHyperbolicCosine=g.acosh=function(){var t,e,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(t=n.precision,e=n.rounding,n.precision=t+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,T=!1,r=r.times(r).minus(1).sqrt().plus(r),T=!0,n.precision=t,n.rounding=e,r.ln()):new n(r)};g.inverseHyperbolicSine=g.asinh=function(){var t,e,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(t=n.precision,e=n.rounding,n.precision=t+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,T=!1,r=r.times(r).plus(1).sqrt().plus(r),T=!0,n.precision=t,n.rounding=e,r.ln())};g.inverseHyperbolicTangent=g.atanh=function(){var t,e,r,n,a=this,i=a.constructor;return a.isFinite()?a.e>=0?new i(a.abs().eq(1)?a.s/0:a.isZero()?a:NaN):(t=i.precision,e=i.rounding,n=a.sd(),Math.max(n,t)<2*-a.e-1?E(new i(a),t,e,!0):(i.precision=r=n-a.e,a=U(a.plus(1),new i(1).minus(a),r+t,1),i.precision=t+4,i.rounding=1,a=a.ln(),i.precision=t,i.rounding=e,a.times(.5))):new i(NaN)};g.inverseSine=g.asin=function(){var t,e,r,n,a=this,i=a.constructor;return a.isZero()?new i(a):(e=a.abs().cmp(1),r=i.precision,n=i.rounding,e!==-1?e===0?(t=Ce(i,r+4,n).times(.5),t.s=a.s,t):new i(NaN):(i.precision=r+6,i.rounding=1,a=a.div(new i(1).minus(a.times(a)).sqrt().plus(1)).atan(),i.precision=r,i.rounding=n,a.times(2)))};g.inverseTangent=g.atan=function(){var t,e,r,n,a,i,s,o,u,l=this,c=l.constructor,d=c.precision,f=c.rounding;if(l.isFinite()){if(l.isZero())return new c(l);if(l.abs().eq(1)&&d+4<=zn)return s=Ce(c,d+4,f).times(.25),s.s=l.s,s}else{if(!l.s)return new c(NaN);if(d+4<=zn)return s=Ce(c,d+4,f).times(.5),s.s=l.s,s}for(c.precision=o=d+10,c.rounding=1,r=Math.min(28,o/D+2|0),t=r;t;--t)l=l.div(l.times(l).plus(1).sqrt().plus(1));for(T=!1,e=Math.ceil(o/D),n=1,u=l.times(l),s=new c(l),a=l;t!==-1;)if(a=a.times(u),i=s.minus(a.div(n+=2)),a=a.times(u),s=i.plus(a.div(n+=2)),s.d[e]!==void 0)for(t=e;s.d[t]===i.d[t]&&t--;);return r&&(s=s.times(2<<r-1)),T=!0,E(s,c.precision=d,c.rounding=f,!0)};g.isFinite=function(){return!!this.d};g.isInteger=g.isInt=function(){return!!this.d&&le(this.e/D)>this.d.length-2};g.isNaN=function(){return!this.s};g.isNegative=g.isNeg=function(){return this.s<0};g.isPositive=g.isPos=function(){return this.s>0};g.isZero=function(){return!!this.d&&this.d[0]===0};g.lessThan=g.lt=function(t){return this.cmp(t)<0};g.lessThanOrEqualTo=g.lte=function(t){return this.cmp(t)<1};g.logarithm=g.log=function(t){var e,r,n,a,i,s,o,u,l=this,c=l.constructor,d=c.precision,f=c.rounding,p=5;if(t==null)t=new c(10),e=!0;else{if(t=new c(t),r=t.d,t.s<0||!r||!r[0]||t.eq(1))return new c(NaN);e=t.eq(10)}if(r=l.d,l.s<0||!r||!r[0]||l.eq(1))return new c(r&&!r[0]?-1/0:l.s!=1?NaN:r?0:1/0);if(e)if(r.length>1)i=!0;else{for(a=r[0];a%10===0;)a/=10;i=a!==1}if(T=!1,o=d+p,s=Ke(l,o),n=e?Gr(c,o+10):Ke(t,o),u=U(s,n,o,1),Kt(u.d,a=d,f))do if(o+=10,s=Ke(l,o),n=e?Gr(c,o+10):Ke(t,o),u=U(s,n,o,1),!i){+ie(u.d).slice(a+1,a+15)+1==1e14&&(u=E(u,d+1,0));break}while(Kt(u.d,a+=10,f));return T=!0,E(u,d,f)};g.minus=g.sub=function(t){var e,r,n,a,i,s,o,u,l,c,d,f,p=this,h=p.constructor;if(t=new h(t),!p.d||!t.d)return!p.s||!t.s?t=new h(NaN):p.d?t.s=-t.s:t=new h(t.d||p.s!==t.s?p:NaN),t;if(p.s!=t.s)return t.s=-t.s,p.plus(t);if(l=p.d,f=t.d,o=h.precision,u=h.rounding,!l[0]||!f[0]){if(f[0])t.s=-t.s;else if(l[0])t=new h(p);else return new h(u===3?-0:0);return T?E(t,o,u):t}if(r=le(t.e/D),c=le(p.e/D),l=l.slice(),i=c-r,i){for(d=i<0,d?(e=l,i=-i,s=f.length):(e=f,r=c,s=l.length),n=Math.max(Math.ceil(o/D),s)+2,i>n&&(i=n,e.length=1),e.reverse(),n=i;n--;)e.push(0);e.reverse()}else{for(n=l.length,s=f.length,d=n<s,d&&(s=n),n=0;n<s;n++)if(l[n]!=f[n]){d=l[n]<f[n];break}i=0}for(d&&(e=l,l=f,f=e,t.s=-t.s),s=l.length,n=f.length-s;n>0;--n)l[s++]=0;for(n=f.length;n>i;){if(l[--n]<f[n]){for(a=n;a&&l[--a]===0;)l[a]=Ee-1;--l[a],l[n]+=Ee}l[n]-=f[n]}for(;l[--s]===0;)l.pop();for(;l[0]===0;l.shift())--r;return l[0]?(t.d=l,t.e=Yr(l,r),T?E(t,o,u):t):new h(u===3?-0:0)};g.modulo=g.mod=function(t){var e,r=this,n=r.constructor;return t=new n(t),!r.d||!t.s||t.d&&!t.d[0]?new n(NaN):!t.d||r.d&&!r.d[0]?E(new n(r),n.precision,n.rounding):(T=!1,n.modulo==9?(e=U(r,t.abs(),0,3,1),e.s*=t.s):e=U(r,t,0,n.modulo,1),e=e.times(t),T=!0,r.minus(e))};g.naturalExponential=g.exp=function(){return Hn(this)};g.naturalLogarithm=g.ln=function(){return Ke(this)};g.negated=g.neg=function(){var t=new this.constructor(this);return t.s=-t.s,E(t)};g.plus=g.add=function(t){var e,r,n,a,i,s,o,u,l,c,d=this,f=d.constructor;if(t=new f(t),!d.d||!t.d)return!d.s||!t.s?t=new f(NaN):d.d||(t=new f(t.d||d.s===t.s?d:NaN)),t;if(d.s!=t.s)return t.s=-t.s,d.minus(t);if(l=d.d,c=t.d,o=f.precision,u=f.rounding,!l[0]||!c[0])return c[0]||(t=new f(d)),T?E(t,o,u):t;if(i=le(d.e/D),n=le(t.e/D),l=l.slice(),a=i-n,a){for(a<0?(r=l,a=-a,s=c.length):(r=c,n=i,s=l.length),i=Math.ceil(o/D),s=i>s?i+1:s+1,a>s&&(a=s,r.length=1),r.reverse();a--;)r.push(0);r.reverse()}for(s=l.length,a=c.length,s-a<0&&(a=s,r=c,c=l,l=r),e=0;a;)e=(l[--a]=l[a]+c[a]+e)/Ee|0,l[a]%=Ee;for(e&&(l.unshift(e),++n),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=Yr(l,n),T?E(t,o,u):t};g.precision=g.sd=function(t){var e,r=this;if(t!==void 0&&t!==!!t&&t!==1&&t!==0)throw Error(Qe+t);return r.d?(e=bi(r.d),t&&r.e+1>e&&(e=r.e+1)):e=NaN,e};g.round=function(){var t=this,e=t.constructor;return E(new e(t),t.e+1,e.rounding)};g.sine=g.sin=function(){var t,e,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(t=n.precision,e=n.rounding,n.precision=t+Math.max(r.e,r.sd())+D,n.rounding=1,r=ll(n,ki(n,r)),n.precision=t,n.rounding=e,E($e>2?r.neg():r,t,e,!0)):new n(NaN)};g.squareRoot=g.sqrt=function(){var t,e,r,n,a,i,s=this,o=s.d,u=s.e,l=s.s,c=s.constructor;if(l!==1||!o||!o[0])return new c(!l||l<0&&(!o||o[0])?NaN:o?s:1/0);for(T=!1,l=Math.sqrt(+s),l==0||l==1/0?(e=ie(o),(e.length+u)%2==0&&(e+="0"),l=Math.sqrt(e),u=le((u+1)/2)-(u<0||u%2),l==1/0?e="5e"+u:(e=l.toExponential(),e=e.slice(0,e.indexOf("e")+1)+u),n=new c(e)):n=new c(l.toString()),r=(u=c.precision)+3;;)if(i=n,n=i.plus(U(s,i,r+2,1)).times(.5),ie(i.d).slice(0,r)===(e=ie(n.d)).slice(0,r))if(e=e.slice(r-3,r+1),e=="9999"||!a&&e=="4999"){if(!a&&(E(i,u+1,0),i.times(i).eq(s))){n=i;break}r+=4,a=1}else{(!+e||!+e.slice(1)&&e.charAt(0)=="5")&&(E(n,u+1,1),t=!n.times(n).eq(s));break}return T=!0,E(n,u,c.rounding,t)};g.tangent=g.tan=function(){var t,e,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(t=n.precision,e=n.rounding,n.precision=t+10,n.rounding=1,r=r.sin(),r.s=1,r=U(r,new n(1).minus(r.times(r)).sqrt(),t+10,0),n.precision=t,n.rounding=e,E($e==2||$e==4?r.neg():r,t,e,!0)):new n(NaN)};g.times=g.mul=function(t){var e,r,n,a,i,s,o,u,l,c=this,d=c.constructor,f=c.d,p=(t=new d(t)).d;if(t.s*=c.s,!f||!f[0]||!p||!p[0])return new d(!t.s||f&&!f[0]&&!p||p&&!p[0]&&!f?NaN:!f||!p?t.s/0:t.s*0);for(r=le(c.e/D)+le(t.e/D),u=f.length,l=p.length,u<l&&(i=f,f=p,p=i,s=u,u=l,l=s),i=[],s=u+l,n=s;n--;)i.push(0);for(n=l;--n>=0;){for(e=0,a=u+n;a>n;)o=i[a]+p[n]*f[a-n-1]+e,i[a--]=o%Ee|0,e=o/Ee|0;i[a]=(i[a]+e)%Ee|0}for(;!i[--s];)i.pop();return e?++r:i.shift(),t.d=i,t.e=Yr(i,r),T?E(t,d.precision,d.rounding):t};g.toBinary=function(t,e){return Wn(this,2,t,e)};g.toDecimalPlaces=g.toDP=function(t,e){var r=this,n=r.constructor;return r=new n(r),t===void 0?r:(pe(t,0,et),e===void 0?e=n.rounding:pe(e,0,8),E(r,t+r.e+1,e))};g.toExponential=function(t,e){var r,n=this,a=n.constructor;return t===void 0?r=Ne(n,!0):(pe(t,0,et),e===void 0?e=a.rounding:pe(e,0,8),n=E(new a(n),t+1,e),r=Ne(n,!0,t+1)),n.isNeg()&&!n.isZero()?"-"+r:r};g.toFixed=function(t,e){var r,n,a=this,i=a.constructor;return t===void 0?r=Ne(a):(pe(t,0,et),e===void 0?e=i.rounding:pe(e,0,8),n=E(new i(a),t+a.e+1,e),r=Ne(n,!1,t+n.e+1)),a.isNeg()&&!a.isZero()?"-"+r:r};g.toFraction=function(t){var e,r,n,a,i,s,o,u,l,c,d,f,p=this,h=p.d,m=p.constructor;if(!h)return new m(p);if(l=r=new m(1),n=u=new m(0),e=new m(n),i=e.e=bi(h)-p.e-1,s=i%D,e.d[0]=J(10,s<0?D+s:s),t==null)t=i>0?e:l;else{if(o=new m(t),!o.isInt()||o.lt(l))throw Error(Qe+o);t=o.gt(e)?i>0?e:l:o}for(T=!1,o=new m(ie(h)),c=m.precision,m.precision=i=h.length*D*2;d=U(o,e,0,1,1),a=r.plus(d.times(n)),a.cmp(t)!=1;)r=n,n=a,a=l,l=u.plus(d.times(a)),u=a,a=e,e=o.minus(d.times(a)),o=a;return a=U(t.minus(r),n,0,1,1),u=u.plus(a.times(l)),r=r.plus(a.times(n)),u.s=l.s=p.s,f=U(l,n,i,1).minus(p).abs().cmp(U(u,r,i,1).minus(p).abs())<1?[l,n]:[u,r],m.precision=c,T=!0,f};g.toHexadecimal=g.toHex=function(t,e){return Wn(this,16,t,e)};g.toNearest=function(t,e){var r=this,n=r.constructor;if(r=new n(r),t==null){if(!r.d)return r;t=new n(1),e=n.rounding}else{if(t=new n(t),e===void 0?e=n.rounding:pe(e,0,8),!r.d)return t.s?r:t;if(!t.d)return t.s&&(t.s=r.s),t}return t.d[0]?(T=!1,r=U(r,t,0,e,1).times(t),T=!0,E(r)):(t.s=r.s,r=t),r};g.toNumber=function(){return+this};g.toOctal=function(t,e){return Wn(this,8,t,e)};g.toPower=g.pow=function(t){var e,r,n,a,i,s,o=this,u=o.constructor,l=+(t=new u(t));if(!o.d||!t.d||!o.d[0]||!t.d[0])return new u(J(+o,l));if(o=new u(o),o.eq(1))return o;if(n=u.precision,i=u.rounding,t.eq(1))return E(o,n,i);if(e=le(t.e/D),e>=t.d.length-1&&(r=l<0?-l:l)<=al)return a=wi(u,o,r,n),t.s<0?new u(1).div(a):E(a,n,i);if(s=o.s,s<0){if(e<t.d.length-1)return new u(NaN);if((t.d[e]&1)==0&&(s=1),o.e==0&&o.d[0]==1&&o.d.length==1)return o.s=s,o}return r=J(+o,l),e=r==0||!isFinite(r)?le(l*(Math.log("0."+ie(o.d))/Math.LN10+o.e+1)):new u(r+"").e,e>u.maxE+1||e<u.minE-1?new u(e>0?s/0:0):(T=!1,u.rounding=o.s=1,r=Math.min(12,(e+"").length),a=Hn(t.times(Ke(o,n+r)),n),a.d&&(a=E(a,n+5,1),Kt(a.d,n,i)&&(e=n+10,a=E(Hn(t.times(Ke(o,e+r)),e),e+5,1),+ie(a.d).slice(n+1,n+15)+1==1e14&&(a=E(a,n+1,0)))),a.s=s,T=!0,u.rounding=i,E(a,n,i))};g.toPrecision=function(t,e){var r,n=this,a=n.constructor;return t===void 0?r=Ne(n,n.e<=a.toExpNeg||n.e>=a.toExpPos):(pe(t,1,et),e===void 0?e=a.rounding:pe(e,0,8),n=E(new a(n),t,e),r=Ne(n,t<=n.e||n.e<=a.toExpNeg,t)),n.isNeg()&&!n.isZero()?"-"+r:r};g.toSignificantDigits=g.toSD=function(t,e){var r=this,n=r.constructor;return t===void 0?(t=n.precision,e=n.rounding):(pe(t,1,et),e===void 0?e=n.rounding:pe(e,0,8)),E(new n(r),t,e)};g.toString=function(){var t=this,e=t.constructor,r=Ne(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()&&!t.isZero()?"-"+r:r};g.truncated=g.trunc=function(){return E(new this.constructor(this),this.e+1,1)};g.valueOf=g.toJSON=function(){var t=this,e=t.constructor,r=Ne(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()?"-"+r:r};function ie(t){var e,r,n,a=t.length-1,i="",s=t[0];if(a>0){for(i+=s,e=1;e<a;e++)n=t[e]+"",r=D-n.length,r&&(i+=Je(r)),i+=n;s=t[e],n=s+"",r=D-n.length,r&&(i+=Je(r))}else if(s===0)return"0";for(;s%10===0;)s/=10;return i+s}function pe(t,e,r){if(t!==~~t||t<e||t>r)throw Error(Qe+t)}function Kt(t,e,r,n){var a,i,s,o;for(i=t[0];i>=10;i/=10)--e;return--e<0?(e+=D,a=0):(a=Math.ceil((e+1)/D),e%=D),i=J(10,D-e),o=t[a]%i|0,n==null?e<3?(e==0?o=o/100|0:e==1&&(o=o/10|0),s=r<4&&o==99999||r>3&&o==49999||o==5e4||o==0):s=(r<4&&o+1==i||r>3&&o+1==i/2)&&(t[a+1]/i/100|0)==J(10,e-2)-1||(o==i/2||o==0)&&(t[a+1]/i/100|0)==0:e<4?(e==0?o=o/1e3|0:e==1?o=o/100|0:e==2&&(o=o/10|0),s=(n||r<4)&&o==9999||!n&&r>3&&o==4999):s=((n||r<4)&&o+1==i||!n&&r>3&&o+1==i/2)&&(t[a+1]/i/1e3|0)==J(10,e-3)-1,s}function Vr(t,e,r){for(var n,a=[0],i,s=0,o=t.length;s<o;){for(i=a.length;i--;)a[i]*=e;for(a[0]+=jn.indexOf(t.charAt(s++)),n=0;n<a.length;n++)a[n]>r-1&&(a[n+1]===void 0&&(a[n+1]=0),a[n+1]+=a[n]/r|0,a[n]%=r)}return a.reverse()}function sl(t,e){var r,n,a;if(e.isZero())return e;n=e.d.length,n<32?(r=Math.ceil(n/3),a=(1/Zr(4,r)).toString()):(r=16,a="2.3283064365386962890625e-10"),t.precision+=r,e=Dt(t,1,e.times(a),new t(1));for(var i=r;i--;){var s=e.times(e);e=s.times(s).minus(s).times(8).plus(1)}return t.precision-=r,e}var U=(function(){function t(n,a,i){var s,o=0,u=n.length;for(n=n.slice();u--;)s=n[u]*a+o,n[u]=s%i|0,o=s/i|0;return o&&n.unshift(o),n}function e(n,a,i,s){var o,u;if(i!=s)u=i>s?1:-1;else for(o=u=0;o<i;o++)if(n[o]!=a[o]){u=n[o]>a[o]?1:-1;break}return u}function r(n,a,i,s){for(var o=0;i--;)n[i]-=o,o=n[i]<a[i]?1:0,n[i]=o*s+n[i]-a[i];for(;!n[0]&&n.length>1;)n.shift()}return function(n,a,i,s,o,u){var l,c,d,f,p,h,m,_,b,v,w,x,B,L,G,re,ne,Pe,Y,de,we=n.constructor,F=n.s==a.s?1:-1,X=n.d,S=a.d;if(!X||!X[0]||!S||!S[0])return new we(!n.s||!a.s||(X?S&&X[0]==S[0]:!S)?NaN:X&&X[0]==0||!S?F*0:F/0);for(u?(p=1,c=n.e-a.e):(u=Ee,p=D,c=le(n.e/p)-le(a.e/p)),Y=S.length,ne=X.length,b=new we(F),v=b.d=[],d=0;S[d]==(X[d]||0);d++);if(S[d]>(X[d]||0)&&c--,i==null?(L=i=we.precision,s=we.rounding):o?L=i+(n.e-a.e)+1:L=i,L<0)v.push(1),h=!0;else{if(L=L/p+2|0,d=0,Y==1){for(f=0,S=S[0],L++;(d<ne||f)&&L--;d++)G=f*u+(X[d]||0),v[d]=G/S|0,f=G%S|0;h=f||d<ne}else{for(f=u/(S[0]+1)|0,f>1&&(S=t(S,f,u),X=t(X,f,u),Y=S.length,ne=X.length),re=Y,w=X.slice(0,Y),x=w.length;x<Y;)w[x++]=0;de=S.slice(),de.unshift(0),Pe=S[0],S[1]>=u/2&&++Pe;do f=0,l=e(S,w,Y,x),l<0?(B=w[0],Y!=x&&(B=B*u+(w[1]||0)),f=B/Pe|0,f>1?(f>=u&&(f=u-1),m=t(S,f,u),_=m.length,x=w.length,l=e(m,w,_,x),l==1&&(f--,r(m,Y<_?de:S,_,u))):(f==0&&(l=f=1),m=S.slice()),_=m.length,_<x&&m.unshift(0),r(w,m,x,u),l==-1&&(x=w.length,l=e(S,w,Y,x),l<1&&(f++,r(w,Y<x?de:S,x,u))),x=w.length):l===0&&(f++,w=[0]),v[d++]=f,l&&w[0]?w[x++]=X[re]||0:(w=[X[re]],x=1);while((re++<ne||w[0]!==void 0)&&L--);h=w[0]!==void 0}v[0]||v.shift()}if(p==1)b.e=c,pi=h;else{for(d=1,f=v[0];f>=10;f/=10)d++;b.e=d+c*p-1,E(b,o?i+b.e+1:i,s,h)}return b}})();function E(t,e,r,n){var a,i,s,o,u,l,c,d,f,p=t.constructor;e:if(e!=null){if(d=t.d,!d)return t;for(a=1,o=d[0];o>=10;o/=10)a++;if(i=e-a,i<0)i+=D,s=e,c=d[f=0],u=c/J(10,a-s-1)%10|0;else if(f=Math.ceil((i+1)/D),o=d.length,f>=o)if(n){for(;o++<=f;)d.push(0);c=u=0,a=1,i%=D,s=i-D+1}else break e;else{for(c=o=d[f],a=1;o>=10;o/=10)a++;i%=D,s=i-D+a,u=s<0?0:c/J(10,a-s-1)%10|0}if(n=n||e<0||d[f+1]!==void 0||(s<0?c:c%J(10,a-s-1)),l=r<4?(u||n)&&(r==0||r==(t.s<0?3:2)):u>5||u==5&&(r==4||n||r==6&&(i>0?s>0?c/J(10,a-s):0:d[f-1])%10&1||r==(t.s<0?8:7)),e<1||!d[0])return d.length=0,l?(e-=t.e+1,d[0]=J(10,(D-e%D)%D),t.e=-e||0):d[0]=t.e=0,t;if(i==0?(d.length=f,o=1,f--):(d.length=f+1,o=J(10,D-i),d[f]=s>0?(c/J(10,a-s)%J(10,s)|0)*o:0),l)for(;;)if(f==0){for(i=1,s=d[0];s>=10;s/=10)i++;for(s=d[0]+=o,o=1;s>=10;s/=10)o++;i!=o&&(t.e++,d[0]==Ee&&(d[0]=1));break}else{if(d[f]+=o,d[f]!=Ee)break;d[f--]=0,o=1}for(i=d.length;d[--i]===0;)d.pop()}return T&&(t.e>p.maxE?(t.d=null,t.e=NaN):t.e<p.minE&&(t.e=0,t.d=[0])),t}function Ne(t,e,r){if(!t.isFinite())return vi(t);var n,a=t.e,i=ie(t.d),s=i.length;return e?(r&&(n=r-s)>0?i=i.charAt(0)+"."+i.slice(1)+Je(n):s>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(t.e<0?"e":"e+")+t.e):a<0?(i="0."+Je(-a-1)+i,r&&(n=r-s)>0&&(i+=Je(n))):a>=s?(i+=Je(a+1-s),r&&(n=r-a-1)>0&&(i=i+"."+Je(n))):((n=a+1)<s&&(i=i.slice(0,n)+"."+i.slice(n)),r&&(n=r-s)>0&&(a+1===s&&(i+="."),i+=Je(n))),i}function Yr(t,e){var r=t[0];for(e*=D;r>=10;r/=10)e++;return e}function Gr(t,e,r){if(e>il)throw T=!0,r&&(t.precision=r),Error(hi);return E(new t(Hr),e,1,!0)}function Ce(t,e,r){if(e>zn)throw Error(hi);return E(new t(Wr),e,r,!0)}function bi(t){var e=t.length-1,r=e*D+1;if(e=t[e],e){for(;e%10==0;e/=10)r--;for(e=t[0];e>=10;e/=10)r++}return r}function Je(t){for(var e="";t--;)e+="0";return e}function wi(t,e,r,n){var a,i=new t(1),s=Math.ceil(n/D+4);for(T=!1;;){if(r%2&&(i=i.times(e),di(i.d,s)&&(a=!0)),r=le(r/2),r===0){r=i.d.length-1,a&&i.d[r]===0&&++i.d[r];break}e=e.times(e),di(e.d,s)}return T=!0,i}function ci(t){return t.d[t.d.length-1]&1}function yi(t,e,r){for(var n,a,i=new t(e[0]),s=0;++s<e.length;){if(a=new t(e[s]),!a.s){i=a;break}n=i.cmp(a),(n===r||n===0&&i.s===r)&&(i=a)}return i}function Hn(t,e){var r,n,a,i,s,o,u,l=0,c=0,d=0,f=t.constructor,p=f.rounding,h=f.precision;if(!t.d||!t.d[0]||t.e>17)return new f(t.d?t.d[0]?t.s<0?0:1/0:1:t.s?t.s<0?0:t:NaN);for(e==null?(T=!1,u=h):u=e,o=new f(.03125);t.e>-2;)t=t.times(o),d+=5;for(n=Math.log(J(2,d))/Math.LN10*2+5|0,u+=n,r=i=s=new f(1),f.precision=u;;){if(i=E(i.times(t),u,1),r=r.times(++c),o=s.plus(U(i,r,u,1)),ie(o.d).slice(0,u)===ie(s.d).slice(0,u)){for(a=d;a--;)s=E(s.times(s),u,1);if(e==null)if(l<3&&Kt(s.d,u-n,p,l))f.precision=u+=10,r=i=o=new f(1),c=0,l++;else return E(s,f.precision=h,p,T=!0);else return f.precision=h,s}s=o}}function Ke(t,e){var r,n,a,i,s,o,u,l,c,d,f,p=1,h=10,m=t,_=m.d,b=m.constructor,v=b.rounding,w=b.precision;if(m.s<0||!_||!_[0]||!m.e&&_[0]==1&&_.length==1)return new b(_&&!_[0]?-1/0:m.s!=1?NaN:_?0:m);if(e==null?(T=!1,c=w):c=e,b.precision=c+=h,r=ie(_),n=r.charAt(0),Math.abs(i=m.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)m=m.times(t),r=ie(m.d),n=r.charAt(0),p++;i=m.e,n>1?(m=new b("0."+r),i++):m=new b(n+"."+r.slice(1))}else return l=Gr(b,c+2,w).times(i+""),m=Ke(new b(n+"."+r.slice(1)),c-h).plus(l),b.precision=w,e==null?E(m,w,v,T=!0):m;for(d=m,u=s=m=U(m.minus(1),m.plus(1),c,1),f=E(m.times(m),c,1),a=3;;){if(s=E(s.times(f),c,1),l=u.plus(U(s,new b(a),c,1)),ie(l.d).slice(0,c)===ie(u.d).slice(0,c))if(u=u.times(2),i!==0&&(u=u.plus(Gr(b,c+2,w).times(i+""))),u=U(u,new b(p),c,1),e==null)if(Kt(u.d,c-h,v,o))b.precision=c+=h,l=s=m=U(d.minus(1),d.plus(1),c,1),f=E(m.times(m),c,1),a=o=1;else return E(u,b.precision=w,v,T=!0);else return b.precision=w,u;u=l,a+=2}}function vi(t){return String(t.s*t.s/0)}function zr(t,e){var r,n,a;for((r=e.indexOf("."))>-1&&(e=e.replace(".","")),(n=e.search(/e/i))>0?(r<0&&(r=n),r+=+e.slice(n+1),e=e.substring(0,n)):r<0&&(r=e.length),n=0;e.charCodeAt(n)===48;n++);for(a=e.length;e.charCodeAt(a-1)===48;--a);if(e=e.slice(n,a),e){if(a-=n,t.e=r=r-n-1,t.d=[],n=(r+1)%D,r<0&&(n+=D),n<a){for(n&&t.d.push(+e.slice(0,n)),a-=D;n<a;)t.d.push(+e.slice(n,n+=D));e=e.slice(n),n=D-e.length}else n-=a;for(;n--;)e+="0";t.d.push(+e),T&&(t.e>t.constructor.maxE?(t.d=null,t.e=NaN):t.e<t.constructor.minE&&(t.e=0,t.d=[0]))}else t.e=0,t.d=[0];return t}function ol(t,e){var r,n,a,i,s,o,u,l,c;if(e.indexOf("_")>-1){if(e=e.replace(/(\d)_(?=\d)/g,"$1"),_i.test(e))return zr(t,e)}else if(e==="Infinity"||e==="NaN")return+e||(t.s=NaN),t.e=NaN,t.d=null,t;if(rl.test(e))r=16,e=e.toLowerCase();else if(tl.test(e))r=2;else if(nl.test(e))r=8;else throw Error(Qe+e);for(i=e.search(/p/i),i>0?(u=+e.slice(i+1),e=e.substring(2,i)):e=e.slice(2),i=e.indexOf("."),s=i>=0,n=t.constructor,s&&(e=e.replace(".",""),o=e.length,i=o-i,a=wi(n,new n(r),i,i*2)),l=Vr(e,r,Ee),c=l.length-1,i=c;l[i]===0;--i)l.pop();return i<0?new n(t.s*0):(t.e=Yr(l,c),t.d=l,T=!1,s&&(t=U(t,a,o*4)),u&&(t=t.times(Math.abs(u)<54?J(2,u):Qt.pow(2,u))),T=!0,t)}function ll(t,e){var r,n=e.d.length;if(n<3)return e.isZero()?e:Dt(t,2,e,e);r=1.4*Math.sqrt(n),r=r>16?16:r|0,e=e.times(1/Zr(5,r)),e=Dt(t,2,e,e);for(var a,i=new t(5),s=new t(16),o=new t(20);r--;)a=e.times(e),e=e.times(i.plus(a.times(s.times(a).minus(o))));return e}function Dt(t,e,r,n,a){var i,s,o,u,l=1,c=t.precision,d=Math.ceil(c/D);for(T=!1,u=r.times(r),o=new t(n);;){if(s=U(o.times(u),new t(e++*e++),c,1),o=a?n.plus(s):n.minus(s),n=U(s.times(u),new t(e++*e++),c,1),s=o.plus(n),s.d[d]!==void 0){for(i=d;s.d[i]===o.d[i]&&i--;);if(i==-1)break}i=o,o=n,n=s,s=i,l++}return T=!0,s.d.length=d+1,s}function Zr(t,e){for(var r=t;--e;)r*=t;return r}function ki(t,e){var r,n=e.s<0,a=Ce(t,t.precision,1),i=a.times(.5);if(e=e.abs(),e.lte(i))return $e=n?4:1,e;if(r=e.divToInt(a),r.isZero())$e=n?3:2;else{if(e=e.minus(r.times(a)),e.lte(i))return $e=ci(r)?n?2:3:n?4:1,e;$e=ci(r)?n?1:4:n?3:2}return e.minus(a).abs()}function Wn(t,e,r,n){var a,i,s,o,u,l,c,d,f,p=t.constructor,h=r!==void 0;if(h?(pe(r,1,et),n===void 0?n=p.rounding:pe(n,0,8)):(r=p.precision,n=p.rounding),!t.isFinite())c=vi(t);else{for(c=Ne(t),s=c.indexOf("."),h?(a=2,e==16?r=r*4-3:e==8&&(r=r*3-2)):a=e,s>=0&&(c=c.replace(".",""),f=new p(1),f.e=c.length-s,f.d=Vr(Ne(f),10,a),f.e=f.d.length),d=Vr(c,10,a),i=u=d.length;d[--u]==0;)d.pop();if(!d[0])c=h?"0p+0":"0";else{if(s<0?i--:(t=new p(t),t.d=d,t.e=i,t=U(t,f,r,n,0,a),d=t.d,i=t.e,l=pi),s=d[r],o=a/2,l=l||d[r+1]!==void 0,l=n<4?(s!==void 0||l)&&(n===0||n===(t.s<0?3:2)):s>o||s===o&&(n===4||l||n===6&&d[r-1]&1||n===(t.s<0?8:7)),d.length=r,l)for(;++d[--r]>a-1;)d[r]=0,r||(++i,d.unshift(1));for(u=d.length;!d[u-1];--u);for(s=0,c="";s<u;s++)c+=jn.charAt(d[s]);if(h){if(u>1)if(e==16||e==8){for(s=e==16?4:3,--u;u%s;u++)c+="0";for(d=Vr(c,a,e),u=d.length;!d[u-1];--u);for(s=1,c="1.";s<u;s++)c+=jn.charAt(d[s])}else c=c.charAt(0)+"."+c.slice(1);c=c+(i<0?"p":"p+")+i}else if(i<0){for(;++i;)c="0"+c;c="0."+c}else if(++i>u)for(i-=u;i--;)c+="0";else i<u&&(c=c.slice(0,i)+"."+c.slice(i))}c=(e==16?"0x":e==2?"0b":e==8?"0o":"")+c}return t.s<0?"-"+c:c}function di(t,e){if(t.length>e)return t.length=e,!0}function ul(t){return new this(t).abs()}function cl(t){return new this(t).acos()}function dl(t){return new this(t).acosh()}function fl(t,e){return new this(t).plus(e)}function pl(t){return new this(t).asin()}function hl(t){return new this(t).asinh()}function ml(t){return new this(t).atan()}function gl(t){return new this(t).atanh()}function _l(t,e){t=new this(t),e=new this(e);var r,n=this.precision,a=this.rounding,i=n+4;return!t.s||!e.s?r=new this(NaN):!t.d&&!e.d?(r=Ce(this,i,1).times(e.s>0?.25:.75),r.s=t.s):!e.d||t.isZero()?(r=e.s<0?Ce(this,n,a):new this(0),r.s=t.s):!t.d||e.isZero()?(r=Ce(this,i,1).times(.5),r.s=t.s):e.s<0?(this.precision=i,this.rounding=1,r=this.atan(U(t,e,i,1)),e=Ce(this,i,1),this.precision=n,this.rounding=a,r=t.s<0?r.minus(e):r.plus(e)):r=this.atan(U(t,e,i,1)),r}function bl(t){return new this(t).cbrt()}function wl(t){return E(t=new this(t),t.e+1,2)}function yl(t,e,r){return new this(t).clamp(e,r)}function vl(t){if(!t||typeof t!="object")throw Error(Xr+"Object expected");var e,r,n,a=t.defaults===!0,i=["precision",1,et,"rounding",0,8,"toExpNeg",-xt,0,"toExpPos",0,xt,"maxE",0,xt,"minE",-xt,0,"modulo",0,9];for(e=0;e<i.length;e+=3)if(r=i[e],a&&(this[r]=Vn[r]),(n=t[r])!==void 0)if(le(n)===n&&n>=i[e+1]&&n<=i[e+2])this[r]=n;else throw Error(Qe+r+": "+n);if(r="crypto",a&&(this[r]=Vn[r]),(n=t[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(mi);else this[r]=!1;else throw Error(Qe+r+": "+n);return this}function kl(t){return new this(t).cos()}function El(t){return new this(t).cosh()}function Ei(t){var e,r,n;function a(i){var s,o,u,l=this;if(!(l instanceof a))return new a(i);if(l.constructor=a,fi(i)){l.s=i.s,T?!i.d||i.e>a.maxE?(l.e=NaN,l.d=null):i.e<a.minE?(l.e=0,l.d=[0]):(l.e=i.e,l.d=i.d.slice()):(l.e=i.e,l.d=i.d?i.d.slice():i.d);return}if(u=typeof i,u==="number"){if(i===0){l.s=1/i<0?-1:1,l.e=0,l.d=[0];return}if(i<0?(i=-i,l.s=-1):l.s=1,i===~~i&&i<1e7){for(s=0,o=i;o>=10;o/=10)s++;T?s>a.maxE?(l.e=NaN,l.d=null):s<a.minE?(l.e=0,l.d=[0]):(l.e=s,l.d=[i]):(l.e=s,l.d=[i]);return}if(i*0!==0){i||(l.s=NaN),l.e=NaN,l.d=null;return}return zr(l,i.toString())}if(u==="string")return(o=i.charCodeAt(0))===45?(i=i.slice(1),l.s=-1):(o===43&&(i=i.slice(1)),l.s=1),_i.test(i)?zr(l,i):ol(l,i);if(u==="bigint")return i<0?(i=-i,l.s=-1):l.s=1,zr(l,i.toString());throw Error(Qe+i)}if(a.prototype=g,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.EUCLID=9,a.config=a.set=vl,a.clone=Ei,a.isDecimal=fi,a.abs=ul,a.acos=cl,a.acosh=dl,a.add=fl,a.asin=pl,a.asinh=hl,a.atan=ml,a.atanh=gl,a.atan2=_l,a.cbrt=bl,a.ceil=wl,a.clamp=yl,a.cos=kl,a.cosh=El,a.div=xl,a.exp=Dl,a.floor=Al,a.hypot=Tl,a.ln=Cl,a.log=Nl,a.log10=Ol,a.log2=Sl,a.max=Bl,a.min=Il,a.mod=Ml,a.mul=Rl,a.pow=Ll,a.random=Pl,a.round=$l,a.sign=Fl,a.sin=Ul,a.sinh=ql,a.sqrt=jl,a.sub=Vl,a.sum=zl,a.tan=Hl,a.tanh=Wl,a.trunc=Gl,t===void 0&&(t={}),t&&t.defaults!==!0)for(n=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],e=0;e<n.length;)t.hasOwnProperty(r=n[e++])||(t[r]=this[r]);return a.config(t),a}function xl(t,e){return new this(t).div(e)}function Dl(t){return new this(t).exp()}function Al(t){return E(t=new this(t),t.e+1,3)}function Tl(){var t,e,r=new this(0);for(T=!1,t=0;t<arguments.length;)if(e=new this(arguments[t++]),e.d)r.d&&(r=r.plus(e.times(e)));else{if(e.s)return T=!0,new this(1/0);r=e}return T=!0,r.sqrt()}function fi(t){return t instanceof Qt||t&&t.toStringTag===gi||!1}function Cl(t){return new this(t).ln()}function Nl(t,e){return new this(t).log(e)}function Sl(t){return new this(t).log(2)}function Ol(t){return new this(t).log(10)}function Bl(){return yi(this,arguments,-1)}function Il(){return yi(this,arguments,1)}function Ml(t,e){return new this(t).mod(e)}function Rl(t,e){return new this(t).mul(e)}function Ll(t,e){return new this(t).pow(e)}function Pl(t){var e,r,n,a,i=0,s=new this(1),o=[];if(t===void 0?t=this.precision:pe(t,1,et),n=Math.ceil(t/D),this.crypto)if(crypto.getRandomValues)for(e=crypto.getRandomValues(new Uint32Array(n));i<n;)a=e[i],a>=429e7?e[i]=crypto.getRandomValues(new Uint32Array(1))[0]:o[i++]=a%1e7;else if(crypto.randomBytes){for(e=crypto.randomBytes(n*=4);i<n;)a=e[i]+(e[i+1]<<8)+(e[i+2]<<16)+((e[i+3]&127)<<24),a>=214e7?crypto.randomBytes(4).copy(e,i):(o.push(a%1e7),i+=4);i=n/4}else throw Error(mi);else for(;i<n;)o[i++]=Math.random()*1e7|0;for(n=o[--i],t%=D,n&&t&&(a=J(10,D-t),o[i]=(n/a|0)*a);o[i]===0;i--)o.pop();if(i<0)r=0,o=[0];else{for(r=-1;o[0]===0;r-=D)o.shift();for(n=1,a=o[0];a>=10;a/=10)n++;n<D&&(r-=D-n)}return s.e=r,s.d=o,s}function $l(t){return E(t=new this(t),t.e+1,this.rounding)}function Fl(t){return t=new this(t),t.d?t.d[0]?t.s:0*t.s:t.s||NaN}function Ul(t){return new this(t).sin()}function ql(t){return new this(t).sinh()}function jl(t){return new this(t).sqrt()}function Vl(t,e){return new this(t).sub(e)}function zl(){var t=0,e=arguments,r=new this(e[t]);for(T=!1;r.s&&++t<e.length;)r=r.plus(e[t]);return T=!0,E(r,this.precision,this.rounding)}function Hl(t){return new this(t).tan()}function Wl(t){return new this(t).tanh()}function Gl(t){return E(t=new this(t),t.e+1,1)}g[Symbol.for("nodejs.util.inspect.custom")]=g.toString;g[Symbol.toStringTag]="Decimal";var Qt=g.constructor=Ei(Vn);Hr=new Qt(Hr);Wr=new Qt(Wr);var xi=Qt;var Xl=20,Yl=1,ct=1e6,Di=1e6,Zl=-7,Jl=21,Kl=!1,er="[big.js] ",dt=er+"Invalid ",Jr=dt+"decimal places",Ql=dt+"rounding mode",Ai=er+"Division by zero",P={},Se=void 0,eu=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function Ti(){function t(e){var r=this;if(!(r instanceof t))return e===Se?Ti():new t(e);if(e instanceof t)r.s=e.s,r.e=e.e,r.c=e.c.slice();else{if(typeof e!="string"){if(t.strict===!0&&typeof e!="bigint")throw TypeError(dt+"value");e=e===0&&1/e<0?"-0":String(e)}tu(r,e)}r.constructor=t}return t.prototype=P,t.DP=Xl,t.RM=Yl,t.NE=Zl,t.PE=Jl,t.strict=Kl,t.roundDown=0,t.roundHalfUp=1,t.roundHalfEven=2,t.roundUp=3,t}function tu(t,e){var r,n,a;if(!eu.test(e))throw Error(dt+"number");for(t.s=e.charAt(0)=="-"?(e=e.slice(1),-1):1,(r=e.indexOf("."))>-1&&(e=e.replace(".","")),(n=e.search(/e/i))>0?(r<0&&(r=n),r+=+e.slice(n+1),e=e.substring(0,n)):r<0&&(r=e.length),a=e.length,n=0;n<a&&e.charAt(n)=="0";)++n;if(n==a)t.c=[t.e=0];else{for(;a>0&&e.charAt(--a)=="0";);for(t.e=r-n-1,t.c=[],r=0;n<=a;)t.c[r++]=+e.charAt(n++)}return t}function ft(t,e,r,n){var a=t.c;if(r===Se&&(r=t.constructor.RM),r!==0&&r!==1&&r!==2&&r!==3)throw Error(Ql);if(e<1)n=r===3&&(n||!!a[0])||e===0&&(r===1&&a[0]>=5||r===2&&(a[0]>5||a[0]===5&&(n||a[1]!==Se))),a.length=1,n?(t.e=t.e-e+1,a[0]=1):a[0]=t.e=0;else if(e<a.length){if(n=r===1&&a[e]>=5||r===2&&(a[e]>5||a[e]===5&&(n||a[e+1]!==Se||a[e-1]&1))||r===3&&(n||!!a[0]),a.length=e,n){for(;++a[--e]>9;)if(a[e]=0,e===0){++t.e,a.unshift(1);break}}for(e=a.length;!a[--e];)a.pop()}return t}function pt(t,e,r){var n=t.e,a=t.c.join(""),i=a.length;if(e)a=a.charAt(0)+(i>1?"."+a.slice(1):"")+(n<0?"e":"e+")+n;else if(n<0){for(;++n;)a="0"+a;a="0."+a}else if(n>0)if(++n>i)for(n-=i;n--;)a+="0";else n<i&&(a=a.slice(0,n)+"."+a.slice(n));else i>1&&(a=a.charAt(0)+"."+a.slice(1));return t.s<0&&r?"-"+a:a}P.abs=function(){var t=new this.constructor(this);return t.s=1,t};P.cmp=function(t){var e,r=this,n=r.c,a=(t=new r.constructor(t)).c,i=r.s,s=t.s,o=r.e,u=t.e;if(!n[0]||!a[0])return n[0]?i:a[0]?-s:0;if(i!=s)return i;if(e=i<0,o!=u)return o>u^e?1:-1;for(s=(o=n.length)<(u=a.length)?o:u,i=-1;++i<s;)if(n[i]!=a[i])return n[i]>a[i]^e?1:-1;return o==u?0:o>u^e?1:-1};P.div=function(t){var e=this,r=e.constructor,n=e.c,a=(t=new r(t)).c,i=e.s==t.s?1:-1,s=r.DP;if(s!==~~s||s<0||s>ct)throw Error(Jr);if(!a[0])throw Error(Ai);if(!n[0])return t.s=i,t.c=[t.e=0],t;var o,u,l,c,d,f=a.slice(),p=o=a.length,h=n.length,m=n.slice(0,o),_=m.length,b=t,v=b.c=[],w=0,x=s+(b.e=e.e-t.e)+1;for(b.s=i,i=x<0?0:x,f.unshift(0);_++<o;)m.push(0);do{for(l=0;l<10;l++){if(o!=(_=m.length))c=o>_?1:-1;else for(d=-1,c=0;++d<o;)if(a[d]!=m[d]){c=a[d]>m[d]?1:-1;break}if(c<0){for(u=_==o?a:f;_;){if(m[--_]<u[_]){for(d=_;d&&!m[--d];)m[d]=9;--m[d],m[_]+=10}m[_]-=u[_]}for(;!m[0];)m.shift()}else break}v[w++]=c?l:++l,m[0]&&c?m[_]=n[p]||0:m=[n[p]]}while((p++<h||m[0]!==Se)&&i--);return!v[0]&&w!=1&&(v.shift(),b.e--,x--),w>x&&ft(b,x,r.RM,m[0]!==Se),b};P.eq=function(t){return this.cmp(t)===0};P.gt=function(t){return this.cmp(t)>0};P.gte=function(t){return this.cmp(t)>-1};P.lt=function(t){return this.cmp(t)<0};P.lte=function(t){return this.cmp(t)<1};P.minus=P.sub=function(t){var e,r,n,a,i=this,s=i.constructor,o=i.s,u=(t=new s(t)).s;if(o!=u)return t.s=-u,i.plus(t);var l=i.c.slice(),c=i.e,d=t.c,f=t.e;if(!l[0]||!d[0])return d[0]?t.s=-u:l[0]?t=new s(i):t.s=1,t;if(o=c-f){for((a=o<0)?(o=-o,n=l):(f=c,n=d),n.reverse(),u=o;u--;)n.push(0);n.reverse()}else for(r=((a=l.length<d.length)?l:d).length,o=u=0;u<r;u++)if(l[u]!=d[u]){a=l[u]<d[u];break}if(a&&(n=l,l=d,d=n,t.s=-t.s),(u=(r=d.length)-(e=l.length))>0)for(;u--;)l[e++]=0;for(u=e;r>o;){if(l[--r]<d[r]){for(e=r;e&&!l[--e];)l[e]=9;--l[e],l[r]+=10}l[r]-=d[r]}for(;l[--u]===0;)l.pop();for(;l[0]===0;)l.shift(),--f;return l[0]||(t.s=1,l=[f=0]),t.c=l,t.e=f,t};P.mod=function(t){var e,r=this,n=r.constructor,a=r.s,i=(t=new n(t)).s;if(!t.c[0])throw Error(Ai);return r.s=t.s=1,e=t.cmp(r)==1,r.s=a,t.s=i,e?new n(r):(a=n.DP,i=n.RM,n.DP=n.RM=0,r=r.div(t),n.DP=a,n.RM=i,this.minus(r.times(t)))};P.neg=function(){var t=new this.constructor(this);return t.s=-t.s,t};P.plus=P.add=function(t){var e,r,n,a=this,i=a.constructor;if(t=new i(t),a.s!=t.s)return t.s=-t.s,a.minus(t);var s=a.e,o=a.c,u=t.e,l=t.c;if(!o[0]||!l[0])return l[0]||(o[0]?t=new i(a):t.s=a.s),t;if(o=o.slice(),e=s-u){for(e>0?(u=s,n=l):(e=-e,n=o),n.reverse();e--;)n.push(0);n.reverse()}for(o.length-l.length<0&&(n=l,l=o,o=n),e=l.length,r=0;e;o[e]%=10)r=(o[--e]=o[e]+l[e]+r)/10|0;for(r&&(o.unshift(r),++u),e=o.length;o[--e]===0;)o.pop();return t.c=o,t.e=u,t};P.pow=function(t){var e=this,r=new e.constructor("1"),n=r,a=t<0;if(t!==~~t||t<-Di||t>Di)throw Error(dt+"exponent");for(a&&(t=-t);t&1&&(n=n.times(e)),t>>=1,!!t;)e=e.times(e);return a?r.div(n):n};P.prec=function(t,e){if(t!==~~t||t<1||t>ct)throw Error(dt+"precision");return ft(new this.constructor(this),t,e)};P.round=function(t,e){if(t===Se)t=0;else if(t!==~~t||t<-ct||t>ct)throw Error(Jr);return ft(new this.constructor(this),t+this.e+1,e)};P.sqrt=function(){var t,e,r,n=this,a=n.constructor,i=n.s,s=n.e,o=new a("0.5");if(!n.c[0])return new a(n);if(i<0)throw Error(er+"No square root");i=Math.sqrt(+pt(n,!0,!0)),i===0||i===1/0?(e=n.c.join(""),e.length+s&1||(e+="0"),i=Math.sqrt(e),s=((s+1)/2|0)-(s<0||s&1),t=new a((i==1/0?"5e":(i=i.toExponential()).slice(0,i.indexOf("e")+1))+s)):t=new a(i+""),s=t.e+(a.DP+=4);do r=t,t=o.times(r.plus(n.div(r)));while(r.c.slice(0,s).join("")!==t.c.slice(0,s).join(""));return ft(t,(a.DP-=4)+t.e+1,a.RM)};P.times=P.mul=function(t){var e,r=this,n=r.constructor,a=r.c,i=(t=new n(t)).c,s=a.length,o=i.length,u=r.e,l=t.e;if(t.s=r.s==t.s?1:-1,!a[0]||!i[0])return t.c=[t.e=0],t;for(t.e=u+l,s<o&&(e=a,a=i,i=e,l=s,s=o,o=l),e=new Array(l=s+o);l--;)e[l]=0;for(u=o;u--;){for(o=0,l=s+u;l>u;)o=e[l]+i[u]*a[l-u-1]+o,e[l--]=o%10,o=o/10|0;e[l]=o}for(o?++t.e:e.shift(),u=e.length;!e[--u];)e.pop();return t.c=e,t};P.toExponential=function(t,e){var r=this,n=r.c[0];if(t!==Se){if(t!==~~t||t<0||t>ct)throw Error(Jr);for(r=ft(new r.constructor(r),++t,e);r.c.length<t;)r.c.push(0)}return pt(r,!0,!!n)};P.toFixed=function(t,e){var r=this,n=r.c[0];if(t!==Se){if(t!==~~t||t<0||t>ct)throw Error(Jr);for(r=ft(new r.constructor(r),t+r.e+1,e),t=t+r.e+1;r.c.length<t;)r.c.push(0)}return pt(r,!1,!!n)};P[Symbol.for("nodejs.util.inspect.custom")]=P.toJSON=P.toString=function(){var t=this,e=t.constructor;return pt(t,t.e<=e.NE||t.e>=e.PE,!!t.c[0])};P.toNumber=function(){var t=+pt(this,!0,!0);if(this.constructor.strict===!0&&!this.eq(t.toString()))throw Error(er+"Imprecise conversion");return t};P.toPrecision=function(t,e){var r=this,n=r.constructor,a=r.c[0];if(t!==Se){if(t!==~~t||t<1||t>ct)throw Error(dt+"precision");for(r=ft(new n(r),t,e);r.c.length<t;)r.c.push(0)}return pt(r,t<=r.e||r.e<=n.NE||r.e>=n.PE,!!a)};P.valueOf=function(){var t=this,e=t.constructor;if(e.strict===!0)throw Error(er+"valueOf disallowed");return pt(t,t.e<=e.NE||t.e>=e.PE,!0)};var ru=Ti(),Ci=ru;var na={};ni(na,{DecodeError:()=>ue,Decoder:()=>De,EXT_TIMESTAMP:()=>Xn,Encoder:()=>At,ExtData:()=>xe,ExtensionCodec:()=>tt,decode:()=>Pi,decodeArrayStream:()=>Ui,decodeAsync:()=>Fi,decodeMulti:()=>$i,decodeMultiStream:()=>qi,decodeTimestampExtension:()=>Qn,decodeTimestampToTimeSpec:()=>Kn,encode:()=>en,encodeDateToTimeSpec:()=>Zn,encodeTimeSpecToTimestamp:()=>Yn,encodeTimestampExtension:()=>Jn});function Ni(t){let e=t.length,r=0,n=0;for(;n<e;){let a=t.charCodeAt(n++);if((a&4294967168)===0){r++;continue}else if((a&4294965248)===0)r+=2;else{if(a>=55296&&a<=56319&&n<e){let i=t.charCodeAt(n);(i&64512)===56320&&(++n,a=((a&1023)<<10)+(i&1023)+65536)}(a&4294901760)===0?r+=3:r+=4}}return r}function nu(t,e,r){let n=t.length,a=r,i=0;for(;i<n;){let s=t.charCodeAt(i++);if((s&4294967168)===0){e[a++]=s;continue}else if((s&4294965248)===0)e[a++]=s>>6&31|192;else{if(s>=55296&&s<=56319&&i<n){let o=t.charCodeAt(i);(o&64512)===56320&&(++i,s=((s&1023)<<10)+(o&1023)+65536)}(s&4294901760)===0?(e[a++]=s>>12&15|224,e[a++]=s>>6&63|128):(e[a++]=s>>18&7|240,e[a++]=s>>12&63|128,e[a++]=s>>6&63|128)}e[a++]=s&63|128}}var au=new TextEncoder,iu=50;function su(t,e,r){au.encodeInto(t,e.subarray(r))}function Si(t,e,r){t.length>iu?su(t,e,r):nu(t,e,r)}var ou=4096;function Gn(t,e,r){let n=e,a=n+r,i=[],s="";for(;n<a;){let o=t[n++];if((o&128)===0)i.push(o);else if((o&224)===192){let u=t[n++]&63;i.push((o&31)<<6|u)}else if((o&240)===224){let u=t[n++]&63,l=t[n++]&63;i.push((o&31)<<12|u<<6|l)}else if((o&248)===240){let u=t[n++]&63,l=t[n++]&63,c=t[n++]&63,d=(o&7)<<18|u<<12|l<<6|c;d>65535&&(d-=65536,i.push(d>>>10&1023|55296),d=56320|d&1023),i.push(d)}else i.push(o);i.length>=ou&&(s+=String.fromCharCode(...i),i.length=0)}return i.length>0&&(s+=String.fromCharCode(...i)),s}var lu=new TextDecoder,uu=200;function cu(t,e,r){let n=t.subarray(e,e+r);return lu.decode(n)}function Oi(t,e,r){return r>uu?cu(t,e,r):Gn(t,e,r)}var xe=class{type;data;constructor(e,r){this.type=e,this.data=r}};var ue=class t extends Error{constructor(e){super(e);let r=Object.create(t.prototype);Object.setPrototypeOf(this,r),Object.defineProperty(this,"name",{configurable:!0,enumerable:!1,value:t.name})}};function Bi(t,e,r){let n=r/4294967296,a=r;t.setUint32(e,n),t.setUint32(e+4,a)}function Kr(t,e,r){let n=Math.floor(r/4294967296),a=r;t.setUint32(e,n),t.setUint32(e+4,a)}function Qr(t,e){let r=t.getInt32(e),n=t.getUint32(e+4);return r*4294967296+n}function Ii(t,e){let r=t.getUint32(e),n=t.getUint32(e+4);return r*4294967296+n}var Xn=-1,du=4294967296-1,fu=17179869184-1;function Yn({sec:t,nsec:e}){if(t>=0&&e>=0&&t<=fu)if(e===0&&t<=du){let r=new Uint8Array(4);return new DataView(r.buffer).setUint32(0,t),r}else{let r=t/4294967296,n=t&4294967295,a=new Uint8Array(8),i=new DataView(a.buffer);return i.setUint32(0,e<<2|r&3),i.setUint32(4,n),a}else{let r=new Uint8Array(12),n=new DataView(r.buffer);return n.setUint32(0,e),Kr(n,4,t),r}}function Zn(t){let e=t.getTime(),r=Math.floor(e/1e3),n=(e-r*1e3)*1e6,a=Math.floor(n/1e9);return{sec:r+a,nsec:n-a*1e9}}function Jn(t){if(t instanceof Date){let e=Zn(t);return Yn(e)}else return null}function Kn(t){let e=new DataView(t.buffer,t.byteOffset,t.byteLength);switch(t.byteLength){case 4:return{sec:e.getUint32(0),nsec:0};case 8:{let r=e.getUint32(0),n=e.getUint32(4),a=(r&3)*4294967296+n,i=r>>>2;return{sec:a,nsec:i}}case 12:{let r=Qr(e,4),n=e.getUint32(0);return{sec:r,nsec:n}}default:throw new ue(`Unrecognized data size for timestamp (expected 4, 8, or 12): ${t.length}`)}}function Qn(t){let e=Kn(t);return new Date(e.sec*1e3+e.nsec/1e6)}var Mi={type:Xn,encode:Jn,decode:Qn};var tt=class t{static defaultCodec=new t;__brand;builtInEncoders=[];builtInDecoders=[];encoders=[];decoders=[];constructor(){this.register(Mi)}register({type:e,encode:r,decode:n}){if(e>=0)this.encoders[e]=r,this.decoders[e]=n;else{let a=-1-e;this.builtInEncoders[a]=r,this.builtInDecoders[a]=n}}tryToEncode(e,r){for(let n=0;n<this.builtInEncoders.length;n++){let a=this.builtInEncoders[n];if(a!=null){let i=a(e,r);if(i!=null){let s=-1-n;return new xe(s,i)}}}for(let n=0;n<this.encoders.length;n++){let a=this.encoders[n];if(a!=null){let i=a(e,r);if(i!=null){let s=n;return new xe(s,i)}}}return e instanceof xe?e:null}decode(e,r,n){let a=r<0?this.builtInDecoders[-1-r]:this.decoders[r];return a?a(e,r,n):new xe(r,e)}};function pu(t){return t instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer}function tr(t){return t instanceof Uint8Array?t:ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):pu(t)?new Uint8Array(t):Uint8Array.from(t)}var hu=100,mu=2048,At=class t{extensionCodec;context;useBigInt64;maxDepth;initialBufferSize;sortKeys;forceFloat32;ignoreUndefined;forceIntegerToFloat;pos;view;bytes;entered=!1;constructor(e){this.extensionCodec=e?.extensionCodec??tt.defaultCodec,this.context=e?.context,this.useBigInt64=e?.useBigInt64??!1,this.maxDepth=e?.maxDepth??hu,this.initialBufferSize=e?.initialBufferSize??mu,this.sortKeys=e?.sortKeys??!1,this.forceFloat32=e?.forceFloat32??!1,this.ignoreUndefined=e?.ignoreUndefined??!1,this.forceIntegerToFloat=e?.forceIntegerToFloat??!1,this.pos=0,this.view=new DataView(new ArrayBuffer(this.initialBufferSize)),this.bytes=new Uint8Array(this.view.buffer)}clone(){return new t({extensionCodec:this.extensionCodec,context:this.context,useBigInt64:this.useBigInt64,maxDepth:this.maxDepth,initialBufferSize:this.initialBufferSize,sortKeys:this.sortKeys,forceFloat32:this.forceFloat32,ignoreUndefined:this.ignoreUndefined,forceIntegerToFloat:this.forceIntegerToFloat})}reinitializeState(){this.pos=0}encodeSharedRef(e){if(this.entered)return this.clone().encodeSharedRef(e);try{return this.entered=!0,this.reinitializeState(),this.doEncode(e,1),this.bytes.subarray(0,this.pos)}finally{this.entered=!1}}encode(e){if(this.entered)return this.clone().encode(e);try{return this.entered=!0,this.reinitializeState(),this.doEncode(e,1),this.bytes.slice(0,this.pos)}finally{this.entered=!1}}doEncode(e,r){if(r>this.maxDepth)throw new Error(`Too deep objects in depth ${r}`);e==null?this.encodeNil():typeof e=="boolean"?this.encodeBoolean(e):typeof e=="number"?this.forceIntegerToFloat?this.encodeNumberAsFloat(e):this.encodeNumber(e):typeof e=="string"?this.encodeString(e):this.useBigInt64&&typeof e=="bigint"?this.encodeBigInt64(e):this.encodeObject(e,r)}ensureBufferSizeToWrite(e){let r=this.pos+e;this.view.byteLength<r&&this.resizeBuffer(r*2)}resizeBuffer(e){let r=new ArrayBuffer(e),n=new Uint8Array(r),a=new DataView(r);n.set(this.bytes),this.view=a,this.bytes=n}encodeNil(){this.writeU8(192)}encodeBoolean(e){e===!1?this.writeU8(194):this.writeU8(195)}encodeNumber(e){!this.forceIntegerToFloat&&Number.isSafeInteger(e)?e>=0?e<128?this.writeU8(e):e<256?(this.writeU8(204),this.writeU8(e)):e<65536?(this.writeU8(205),this.writeU16(e)):e<4294967296?(this.writeU8(206),this.writeU32(e)):this.useBigInt64?this.encodeNumberAsFloat(e):(this.writeU8(207),this.writeU64(e)):e>=-32?this.writeU8(224|e+32):e>=-128?(this.writeU8(208),this.writeI8(e)):e>=-32768?(this.writeU8(209),this.writeI16(e)):e>=-2147483648?(this.writeU8(210),this.writeI32(e)):this.useBigInt64?this.encodeNumberAsFloat(e):(this.writeU8(211),this.writeI64(e)):this.encodeNumberAsFloat(e)}encodeNumberAsFloat(e){this.forceFloat32?(this.writeU8(202),this.writeF32(e)):(this.writeU8(203),this.writeF64(e))}encodeBigInt64(e){e>=BigInt(0)?(this.writeU8(207),this.writeBigUint64(e)):(this.writeU8(211),this.writeBigInt64(e))}writeStringHeader(e){if(e<32)this.writeU8(160+e);else if(e<256)this.writeU8(217),this.writeU8(e);else if(e<65536)this.writeU8(218),this.writeU16(e);else if(e<4294967296)this.writeU8(219),this.writeU32(e);else throw new Error(`Too long string: ${e} bytes in UTF-8`)}encodeString(e){let n=Ni(e);this.ensureBufferSizeToWrite(5+n),this.writeStringHeader(n),Si(e,this.bytes,this.pos),this.pos+=n}encodeObject(e,r){let n=this.extensionCodec.tryToEncode(e,this.context);if(n!=null)this.encodeExtension(n);else if(Array.isArray(e))this.encodeArray(e,r);else if(ArrayBuffer.isView(e))this.encodeBinary(e);else if(typeof e=="object")this.encodeMap(e,r);else throw new Error(`Unrecognized object: ${Object.prototype.toString.apply(e)}`)}encodeBinary(e){let r=e.byteLength;if(r<256)this.writeU8(196),this.writeU8(r);else if(r<65536)this.writeU8(197),this.writeU16(r);else if(r<4294967296)this.writeU8(198),this.writeU32(r);else throw new Error(`Too large binary: ${r}`);let n=tr(e);this.writeU8a(n)}encodeArray(e,r){let n=e.length;if(n<16)this.writeU8(144+n);else if(n<65536)this.writeU8(220),this.writeU16(n);else if(n<4294967296)this.writeU8(221),this.writeU32(n);else throw new Error(`Too large array: ${n}`);for(let a of e)this.doEncode(a,r+1)}countWithoutUndefined(e,r){let n=0;for(let a of r)e[a]!==void 0&&n++;return n}encodeMap(e,r){let n=Object.keys(e);this.sortKeys&&n.sort();let a=this.ignoreUndefined?this.countWithoutUndefined(e,n):n.length;if(a<16)this.writeU8(128+a);else if(a<65536)this.writeU8(222),this.writeU16(a);else if(a<4294967296)this.writeU8(223),this.writeU32(a);else throw new Error(`Too large map object: ${a}`);for(let i of n){let s=e[i];this.ignoreUndefined&&s===void 0||(this.encodeString(i),this.doEncode(s,r+1))}}encodeExtension(e){if(typeof e.data=="function"){let n=e.data(this.pos+6),a=n.length;if(a>=4294967296)throw new Error(`Too large extension object: ${a}`);this.writeU8(201),this.writeU32(a),this.writeI8(e.type),this.writeU8a(n);return}let r=e.data.length;if(r===1)this.writeU8(212);else if(r===2)this.writeU8(213);else if(r===4)this.writeU8(214);else if(r===8)this.writeU8(215);else if(r===16)this.writeU8(216);else if(r<256)this.writeU8(199),this.writeU8(r);else if(r<65536)this.writeU8(200),this.writeU16(r);else if(r<4294967296)this.writeU8(201),this.writeU32(r);else throw new Error(`Too large extension object: ${r}`);this.writeI8(e.type),this.writeU8a(e.data)}writeU8(e){this.ensureBufferSizeToWrite(1),this.view.setUint8(this.pos,e),this.pos++}writeU8a(e){let r=e.length;this.ensureBufferSizeToWrite(r),this.bytes.set(e,this.pos),this.pos+=r}writeI8(e){this.ensureBufferSizeToWrite(1),this.view.setInt8(this.pos,e),this.pos++}writeU16(e){this.ensureBufferSizeToWrite(2),this.view.setUint16(this.pos,e),this.pos+=2}writeI16(e){this.ensureBufferSizeToWrite(2),this.view.setInt16(this.pos,e),this.pos+=2}writeU32(e){this.ensureBufferSizeToWrite(4),this.view.setUint32(this.pos,e),this.pos+=4}writeI32(e){this.ensureBufferSizeToWrite(4),this.view.setInt32(this.pos,e),this.pos+=4}writeF32(e){this.ensureBufferSizeToWrite(4),this.view.setFloat32(this.pos,e),this.pos+=4}writeF64(e){this.ensureBufferSizeToWrite(8),this.view.setFloat64(this.pos,e),this.pos+=8}writeU64(e){this.ensureBufferSizeToWrite(8),Bi(this.view,this.pos,e),this.pos+=8}writeI64(e){this.ensureBufferSizeToWrite(8),Kr(this.view,this.pos,e),this.pos+=8}writeBigUint64(e){this.ensureBufferSizeToWrite(8),this.view.setBigUint64(this.pos,e),this.pos+=8}writeBigInt64(e){this.ensureBufferSizeToWrite(8),this.view.setBigInt64(this.pos,e),this.pos+=8}};function en(t,e){return new At(e).encodeSharedRef(t)}function tn(t){return`${t<0?"-":""}0x${Math.abs(t).toString(16).padStart(2,"0")}`}var gu=16,_u=16,rn=class{hit=0;miss=0;caches;maxKeyLength;maxLengthPerKey;constructor(e=gu,r=_u){this.maxKeyLength=e,this.maxLengthPerKey=r,this.caches=[];for(let n=0;n<this.maxKeyLength;n++)this.caches.push([])}canBeCached(e){return e>0&&e<=this.maxKeyLength}find(e,r,n){let a=this.caches[n-1];e:for(let i of a){let s=i.bytes;for(let o=0;o<n;o++)if(s[o]!==e[r+o])continue e;return i.str}return null}store(e,r){let n=this.caches[e.length-1],a={bytes:e,str:r};n.length>=this.maxLengthPerKey?n[Math.random()*n.length|0]=a:n.push(a)}decode(e,r,n){let a=this.find(e,r,n);if(a!=null)return this.hit++,a;this.miss++;let i=Gn(e,r,n),s=Uint8Array.prototype.slice.call(e,r,r+n);return this.store(s,i),i}};var ea="array",ar="map_key",Li="map_value",bu=t=>{if(typeof t=="string"||typeof t=="number")return t;throw new ue("The type of key must be string or number but "+typeof t)},ta=class{stack=[];stackHeadPosition=-1;get length(){return this.stackHeadPosition+1}top(){return this.stack[this.stackHeadPosition]}pushArrayState(e){let r=this.getUninitializedStateFromPool();r.type=ea,r.position=0,r.size=e,r.array=new Array(e)}pushMapState(e){let r=this.getUninitializedStateFromPool();r.type=ar,r.readCount=0,r.size=e,r.map={}}getUninitializedStateFromPool(){if(this.stackHeadPosition++,this.stackHeadPosition===this.stack.length){let e={type:void 0,size:0,array:void 0,position:0,readCount:0,map:void 0,key:null};this.stack.push(e)}return this.stack[this.stackHeadPosition]}release(e){if(this.stack[this.stackHeadPosition]!==e)throw new Error("Invalid stack state. Released state is not on top of the stack.");if(e.type===ea){let n=e;n.size=0,n.array=void 0,n.position=0,n.type=void 0}if(e.type===ar||e.type===Li){let n=e;n.size=0,n.map=void 0,n.readCount=0,n.type=void 0}this.stackHeadPosition--}reset(){this.stack.length=0,this.stackHeadPosition=-1}},nr=-1,ra=new DataView(new ArrayBuffer(0)),wu=new Uint8Array(ra.buffer);try{ra.getInt8(0)}catch(t){if(!(t instanceof RangeError))throw new Error("This module is not supported in the current JavaScript engine because DataView does not throw RangeError on out-of-bounds access")}var Ri=new RangeError("Insufficient data"),yu=new rn,De=class t{extensionCodec;context;useBigInt64;rawStrings;maxStrLength;maxBinLength;maxArrayLength;maxMapLength;maxExtLength;keyDecoder;mapKeyConverter;totalPos=0;pos=0;view=ra;bytes=wu;headByte=nr;stack=new ta;entered=!1;constructor(e){this.extensionCodec=e?.extensionCodec??tt.defaultCodec,this.context=e?.context,this.useBigInt64=e?.useBigInt64??!1,this.rawStrings=e?.rawStrings??!1,this.maxStrLength=e?.maxStrLength??4294967295,this.maxBinLength=e?.maxBinLength??4294967295,this.maxArrayLength=e?.maxArrayLength??4294967295,this.maxMapLength=e?.maxMapLength??4294967295,this.maxExtLength=e?.maxExtLength??4294967295,this.keyDecoder=e?.keyDecoder!==void 0?e.keyDecoder:yu,this.mapKeyConverter=e?.mapKeyConverter??bu}clone(){return new t({extensionCodec:this.extensionCodec,context:this.context,useBigInt64:this.useBigInt64,rawStrings:this.rawStrings,maxStrLength:this.maxStrLength,maxBinLength:this.maxBinLength,maxArrayLength:this.maxArrayLength,maxMapLength:this.maxMapLength,maxExtLength:this.maxExtLength,keyDecoder:this.keyDecoder})}reinitializeState(){this.totalPos=0,this.headByte=nr,this.stack.reset()}setBuffer(e){let r=tr(e);this.bytes=r,this.view=new DataView(r.buffer,r.byteOffset,r.byteLength),this.pos=0}appendBuffer(e){if(this.headByte===nr&&!this.hasRemaining(1))this.setBuffer(e);else{let r=this.bytes.subarray(this.pos),n=tr(e),a=new Uint8Array(r.length+n.length);a.set(r),a.set(n,r.length),this.setBuffer(a)}}hasRemaining(e){return this.view.byteLength-this.pos>=e}createExtraByteError(e){let{view:r,pos:n}=this;return new RangeError(`Extra ${r.byteLength-n} of ${r.byteLength} byte(s) found at buffer[${e}]`)}decode(e){if(this.entered)return this.clone().decode(e);try{this.entered=!0,this.reinitializeState(),this.setBuffer(e);let r=this.doDecodeSync();if(this.hasRemaining(1))throw this.createExtraByteError(this.pos);return r}finally{this.entered=!1}}*decodeMulti(e){if(this.entered){yield*this.clone().decodeMulti(e);return}try{for(this.entered=!0,this.reinitializeState(),this.setBuffer(e);this.hasRemaining(1);)yield this.doDecodeSync()}finally{this.entered=!1}}async decodeAsync(e){if(this.entered)return this.clone().decodeAsync(e);try{this.entered=!0;let r=!1,n;for await(let o of e){if(r)throw this.entered=!1,this.createExtraByteError(this.totalPos);this.appendBuffer(o);try{n=this.doDecodeSync(),r=!0}catch(u){if(!(u instanceof RangeError))throw u}this.totalPos+=this.pos}if(r){if(this.hasRemaining(1))throw this.createExtraByteError(this.totalPos);return n}let{headByte:a,pos:i,totalPos:s}=this;throw new RangeError(`Insufficient data in parsing ${tn(a)} at ${s} (${i} in the current buffer)`)}finally{this.entered=!1}}decodeArrayStream(e){return this.decodeMultiAsync(e,!0)}decodeStream(e){return this.decodeMultiAsync(e,!1)}async*decodeMultiAsync(e,r){if(this.entered){yield*this.clone().decodeMultiAsync(e,r);return}try{this.entered=!0;let n=r,a=-1;for await(let i of e){if(r&&a===0)throw this.createExtraByteError(this.totalPos);this.appendBuffer(i),n&&(a=this.readArraySize(),n=!1,this.complete());try{for(;yield this.doDecodeSync(),--a!==0;);}catch(s){if(!(s instanceof RangeError))throw s}this.totalPos+=this.pos}}finally{this.entered=!1}}doDecodeSync(){e:for(;;){let e=this.readHeadByte(),r;if(e>=224)r=e-256;else if(e<192)if(e<128)r=e;else if(e<144){let a=e-128;if(a!==0){this.pushMapState(a),this.complete();continue e}else r={}}else if(e<160){let a=e-144;if(a!==0){this.pushArrayState(a),this.complete();continue e}else r=[]}else{let a=e-160;r=this.decodeString(a,0)}else if(e===192)r=null;else if(e===194)r=!1;else if(e===195)r=!0;else if(e===202)r=this.readF32();else if(e===203)r=this.readF64();else if(e===204)r=this.readU8();else if(e===205)r=this.readU16();else if(e===206)r=this.readU32();else if(e===207)this.useBigInt64?r=this.readU64AsBigInt():r=this.readU64();else if(e===208)r=this.readI8();else if(e===209)r=this.readI16();else if(e===210)r=this.readI32();else if(e===211)this.useBigInt64?r=this.readI64AsBigInt():r=this.readI64();else if(e===217){let a=this.lookU8();r=this.decodeString(a,1)}else if(e===218){let a=this.lookU16();r=this.decodeString(a,2)}else if(e===219){let a=this.lookU32();r=this.decodeString(a,4)}else if(e===220){let a=this.readU16();if(a!==0){this.pushArrayState(a),this.complete();continue e}else r=[]}else if(e===221){let a=this.readU32();if(a!==0){this.pushArrayState(a),this.complete();continue e}else r=[]}else if(e===222){let a=this.readU16();if(a!==0){this.pushMapState(a),this.complete();continue e}else r={}}else if(e===223){let a=this.readU32();if(a!==0){this.pushMapState(a),this.complete();continue e}else r={}}else if(e===196){let a=this.lookU8();r=this.decodeBinary(a,1)}else if(e===197){let a=this.lookU16();r=this.decodeBinary(a,2)}else if(e===198){let a=this.lookU32();r=this.decodeBinary(a,4)}else if(e===212)r=this.decodeExtension(1,0);else if(e===213)r=this.decodeExtension(2,0);else if(e===214)r=this.decodeExtension(4,0);else if(e===215)r=this.decodeExtension(8,0);else if(e===216)r=this.decodeExtension(16,0);else if(e===199){let a=this.lookU8();r=this.decodeExtension(a,1)}else if(e===200){let a=this.lookU16();r=this.decodeExtension(a,2)}else if(e===201){let a=this.lookU32();r=this.decodeExtension(a,4)}else throw new ue(`Unrecognized type byte: ${tn(e)}`);this.complete();let n=this.stack;for(;n.length>0;){let a=n.top();if(a.type===ea)if(a.array[a.position]=r,a.position++,a.position===a.size)r=a.array,n.release(a);else continue e;else if(a.type===ar){if(r==="__proto__")throw new ue("The key __proto__ is not allowed");a.key=this.mapKeyConverter(r),a.type=Li;continue e}else if(a.map[a.key]=r,a.readCount++,a.readCount===a.size)r=a.map,n.release(a);else{a.key=null,a.type=ar;continue e}}return r}}readHeadByte(){return this.headByte===nr&&(this.headByte=this.readU8()),this.headByte}complete(){this.headByte=nr}readArraySize(){let e=this.readHeadByte();switch(e){case 220:return this.readU16();case 221:return this.readU32();default:{if(e<160)return e-144;throw new ue(`Unrecognized array type byte: ${tn(e)}`)}}}pushMapState(e){if(e>this.maxMapLength)throw new ue(`Max length exceeded: map length (${e}) > maxMapLengthLength (${this.maxMapLength})`);this.stack.pushMapState(e)}pushArrayState(e){if(e>this.maxArrayLength)throw new ue(`Max length exceeded: array length (${e}) > maxArrayLength (${this.maxArrayLength})`);this.stack.pushArrayState(e)}decodeString(e,r){return!this.rawStrings||this.stateIsMapKey()?this.decodeUtf8String(e,r):this.decodeBinary(e,r)}decodeUtf8String(e,r){if(e>this.maxStrLength)throw new ue(`Max length exceeded: UTF-8 byte length (${e}) > maxStrLength (${this.maxStrLength})`);if(this.bytes.byteLength<this.pos+r+e)throw Ri;let n=this.pos+r,a;return this.stateIsMapKey()&&this.keyDecoder?.canBeCached(e)?a=this.keyDecoder.decode(this.bytes,n,e):a=Oi(this.bytes,n,e),this.pos+=r+e,a}stateIsMapKey(){return this.stack.length>0?this.stack.top().type===ar:!1}decodeBinary(e,r){if(e>this.maxBinLength)throw new ue(`Max length exceeded: bin length (${e}) > maxBinLength (${this.maxBinLength})`);if(!this.hasRemaining(e+r))throw Ri;let n=this.pos+r,a=this.bytes.subarray(n,n+e);return this.pos+=r+e,a}decodeExtension(e,r){if(e>this.maxExtLength)throw new ue(`Max length exceeded: ext length (${e}) > maxExtLength (${this.maxExtLength})`);let n=this.view.getInt8(this.pos+r),a=this.decodeBinary(e,r+1);return this.extensionCodec.decode(a,n,this.context)}lookU8(){return this.view.getUint8(this.pos)}lookU16(){return this.view.getUint16(this.pos)}lookU32(){return this.view.getUint32(this.pos)}readU8(){let e=this.view.getUint8(this.pos);return this.pos++,e}readI8(){let e=this.view.getInt8(this.pos);return this.pos++,e}readU16(){let e=this.view.getUint16(this.pos);return this.pos+=2,e}readI16(){let e=this.view.getInt16(this.pos);return this.pos+=2,e}readU32(){let e=this.view.getUint32(this.pos);return this.pos+=4,e}readI32(){let e=this.view.getInt32(this.pos);return this.pos+=4,e}readU64(){let e=Ii(this.view,this.pos);return this.pos+=8,e}readI64(){let e=Qr(this.view,this.pos);return this.pos+=8,e}readU64AsBigInt(){let e=this.view.getBigUint64(this.pos);return this.pos+=8,e}readI64AsBigInt(){let e=this.view.getBigInt64(this.pos);return this.pos+=8,e}readF32(){let e=this.view.getFloat32(this.pos);return this.pos+=4,e}readF64(){let e=this.view.getFloat64(this.pos);return this.pos+=8,e}};function Pi(t,e){return new De(e).decode(t)}function $i(t,e){return new De(e).decodeMulti(t)}function vu(t){return t[Symbol.asyncIterator]!=null}async function*ku(t){let e=t.getReader();try{for(;;){let{done:r,value:n}=await e.read();if(r)return;yield n}}finally{e.releaseLock()}}function nn(t){return vu(t)?t:ku(t)}async function Fi(t,e){let r=nn(t);return new De(e).decodeAsync(r)}function Ui(t,e){let r=nn(t);return new De(e).decodeArrayStream(r)}function qi(t,e){let r=nn(t);return new De(e).decodeStream(r)}var En=ai(Da(),1),Aa=xi,Ta=Ci,Me=na,Ws=En.DOMParser,Gs=En.XMLSerializer;var Xs=Me!==null;function Ys(){if(!Xs)throw new Error("@msgpack/msgpack is required for MessagePack support. Install with: npm install @msgpack/msgpack")}var Zs=vd();function vd(){if(!Xs)return null;let t=new TextEncoder,e=new TextDecoder,r=new Me.ExtensionCodec;return r.register({type:-1,encode:n=>{if(n instanceof Date){let a=Ht(n);if(a==="D"||a==="H")return null}return Me.encodeTimestampExtension(n)},decode:n=>Me.decodeTimestampExtension(n)}),r.register({type:1,encode:n=>Ae(n)?t.encode(n.toString()):null,decode:n=>xn(e.decode(n))}),r.register({type:2,encode:n=>{if(n instanceof Date&&Ht(n)==="D"){let a=n.getUTCFullYear(),i=String(n.getUTCMonth()+1).padStart(2,"0"),s=String(n.getUTCDate()).padStart(2,"0");return t.encode(`${a}-${i}-${s}`)}return null},decode:n=>new Date(e.decode(n)+"T00:00:00.000Z")}),r.register({type:3,encode:n=>{if(n instanceof Date&&Ht(n)==="H"){let a=String(n.getUTCHours()).padStart(2,"0"),i=String(n.getUTCMinutes()).padStart(2,"0"),s=String(n.getUTCSeconds()).padStart(2,"0"),o=String(n.getUTCMilliseconds()).padStart(3,"0");return t.encode(`${a}:${i}:${s}.${o}`)}return null},decode:n=>{let a=e.decode(n),i=a.indexOf("."),s=i>=0?a.substring(0,i):a,o=i>=0?a.substring(i+1):"0",[u,l,c]=s.split(":"),d=Math.round(+o.substring(0,3));return new Date(Date.UTC(1970,0,1,+u,+l,+c,d))}}),r.register({type:4,encode:n=>{let a=Ca(n);if(a!==null){let[i,s]=a;return t.encode(`${i}:${s(n)}`)}return null},decode:n=>{let a=e.decode(n),i=a.indexOf(":"),s=a.slice(0,i),o=a.slice(i+1),u=lt[s];if(u!==void 0){let[,l]=u;return l(o)}return`${o}::${s}`}}),r}function Js(t){return Ys(),Me.encode(t,{extensionCodec:Zs})}function Ks(t){return Ys(),Me.decode(t,{extensionCodec:Zs})}function An(t,e=!1){let r=Tn(t);if(r===null)return[!1,String(t)];let[n,a,i]=r;return i&&!e?[!1,String(t)]:[!0,`${a(t)}::${n}`]}function Na(t){if(!t.includes("::"))return[!1,t];let e=t.lastIndexOf("::"),r=t.slice(0,e),n=t.slice(e+2),a=lt[n];if(a===void 0)return[!1,t];let[,i]=a;return[!0,i(r)]}function Dn(t,e,r){if(t!==null&&typeof t=="object"&&!Array.isArray(t)){let n={};for(let[a,i]of Object.entries(t))n[a]=Dn(i,e,r);return n}return Array.isArray(t)?t.map(n=>Dn(n,e,r)):r(t)?e(t):t}function Sa(t){let e=Tn(t);if(e!==null){let[r,n,a]=e;return a?[t,!1]:[`${n(t)}::${r}`,!0]}if(Array.isArray(t)){let r=!1;return[t.map(a=>{let[i,s]=Sa(a);return s&&(r=!0),i}),r]}if(t!==null&&typeof t=="object"){let r=!1,n={};for(let[a,i]of Object.entries(t)){let[s,o]=Sa(i);o&&(r=!0),n[a]=s}return[n,r]}return[t,!1]}function kd(t,e=!1){let[r,n]=An(t,e);if(r)return n;let[a,i]=Sa(t),s=JSON.stringify(a);return i?`${s}::JS`:s}function Ed(t){return JSON.stringify(t)}function xd(t){if(!Me)throw new Error("@msgpack/msgpack is required for MessagePack support");return Me.encode(t)}function be(t,e=null,{raw:r=!1,qs:n=!1,_forceSuffix:a=!1}={}){if(n)return`${eo(t)}::QS`;if(r){if(e===null||e==="json")return Ed(t);if(e==="msgpack")return xd(t);throw e==="xml"?new Error("raw=true is not supported for XML transport"):new Error(`Unknown transport: ${e}`)}if(e===null||e==="json"){let i=kd(t,a);return e==="json"?`"${i}"`:i}else{if(e==="xml")return`<?xml version="1.0" ?><tytx_root>${Qs(t)}</tytx_root>`;if(e==="msgpack")return Js(t);throw new Error(`Unknown transport: ${e}`)}}var Wt,Oa;typeof window<"u"&&window.DOMParser?(Wt=window.DOMParser,Oa=window.XMLSerializer):(Wt=Ws,Oa=Gs);function to(t){if(t===null||typeof t!="object"||Array.isArray(t))return!1;let e=Object.keys(t);if(e.length!==1)return!1;let r=t[e[0]];return r!==null&&typeof r=="object"&&"value"in r}function ro(t,e,r){let n=t.createElement(e),a=r.attrs||{},i=r.value;for(let[s,o]of Object.entries(a))n.setAttribute(s,be(o,null,{_forceSuffix:!0}));if(Array.isArray(i))for(let s of i)if(to(s)){let[o]=Object.keys(s),u=s[o],l=ro(t,o,u);n.appendChild(l)}else{n.textContent=be(i);break}else n.textContent=be(i);return n}function Qs(t){if(!Wt)throw new Error("XML support requires @xmldom/xmldom package in Node.js");if(to(t)){let[e]=Object.keys(t),r=t[e],n=new Wt().parseFromString("<root/>","text/xml"),a=ro(n,e,r);return new Oa().serializeToString(a)}else return be(t)}function Ba(t){let e={};for(let n=0;n<t.attributes.length;n++){let a=t.attributes[n];e[a.name]=ee(a.value)}let r=[];for(let n=0;n<t.childNodes.length;n++){let a=t.childNodes[n];a.nodeType===1&&r.push(a)}if(r.length>0)if(r.length===1){let n=r[0],a=Ba(n);return{attrs:e,value:{[n.tagName]:a}}}else{let n=[];for(let a of r){let i=Ba(a);n.push({[a.tagName]:i})}return{attrs:e,value:n}}return{attrs:e,value:ee(t.textContent)}}function no(t){if(!Wt)throw new Error("XML support requires @xmldom/xmldom package in Node.js");let n=new Wt().parseFromString(t,"text/xml").documentElement;if(n.tagName==="tytx_root"){let i=null;for(let s=0;s<n.childNodes.length;s++)if(n.childNodes[s].nodeType===1){i=n.childNodes[s];break}if(!i)return ee(n.textContent);n=i}let a=Ba(n);return{[n.tagName]:a}}function Dd(t){return typeof t=="string"}function Ad(t){let[e,r]=Na(t);if(e)return r;let n=t;n.endsWith("::JS")&&(n=n.slice(0,-4));let a;try{a=JSON.parse(n)}catch{return t}return Dn(a,Td,Dd)}function Td(t){return t.includes("::")?Na(t)[1]:t}function Cd(t){let e=no(t);return typeof e=="string"?ee(e):e}function Nd(t){return Ks(t)}function ee(t,e=null){if(t===null)return null;if(e===null||e==="json"){let r=t;return e==="json"&&t.startsWith('"')&&t.endsWith('"')&&(r=t.slice(1,-1)),Ad(r)}else{if(e==="xml")return Cd(t);if(e==="msgpack")return Nd(t);throw new Error(`Unknown transport: ${e}`)}}function eo(t){if(Array.isArray(t))return t.map(e=>String(e)).join("&");if(t!==null&&typeof t=="object"){let e=[];for(let[r,n]of Object.entries(t)){let[a,i]=An(n,!0);a?e.push(`${r}=${i}`):e.push(`${r}=${n}`)}return e.join("&")}throw new TypeError(`toQs expects object or array, got ${typeof t}`)}function ao(t){if(!t)return[];let e=t.split("&"),r=e.map(s=>s.includes("=")),n=r.every(Boolean),a=!r.some(Boolean);if(!n&&!a)throw new Error("QS format error: mixed items with and without '='");if(a)return e.map(s=>ee(s));let i={};for(let s of e){let o=s.indexOf("="),u=s.slice(0,o),l=s.slice(o+1);i[u]=ee(l)}return i}var so=Aa||Ta||Number,Sd=Aa?"decimal.js":Ta?"big.js":"number";function xn(t){return new so(t)}function Ae(t){return Sd==="number"?!1:t instanceof so}function Ht(t){let e=t.getUTCFullYear()===1970&&t.getUTCMonth()===0&&t.getUTCDate()===1,r=t.getUTCHours()===0&&t.getUTCMinutes()===0&&t.getUTCSeconds()===0&&t.getUTCMilliseconds()===0;return e&&!r?"H":r&&!e?"D":"DHZ"}function Od(t){return t.toString()}function Bd(t){let e=t.getUTCFullYear(),r=String(t.getUTCMonth()+1).padStart(2,"0"),n=String(t.getUTCDate()).padStart(2,"0");return`${e}-${r}-${n}`}function Id(t){return t.toISOString()}function Md(t){let e=String(t.getUTCHours()).padStart(2,"0"),r=String(t.getUTCMinutes()).padStart(2,"0"),n=String(t.getUTCSeconds()).padStart(2,"0"),a=String(t.getUTCMilliseconds()).padStart(3,"0");return`${e}:${r}:${n}.${a}`}function Rd(t){return t?"true":"false"}function Ld(t){return t.toString()}function Pd(t){return t.toString()}function $d(t){let e="";for(let r=0;r<t.length;r+=32768)e+=String.fromCharCode.apply(null,t.subarray(r,r+32768));return btoa(e)}var Cn=[],Ia=new Map;function Ca(t){if(t===null||typeof t!="object")return null;for(let e=Object.getPrototypeOf(t);e!==null;e=Object.getPrototypeOf(e))for(let[r,n,a,i]of Cn)if(r.prototype===e)return[n,a,i];return null}function Tn(t){if(t===null)return["NN",()=>"",!0];if(Ae(t))return["N",Od,!1];if(t instanceof Uint8Array)return["RAW",$d,!1];if(t instanceof Date){let e=Ht(t);return e==="D"?["D",Bd,!1]:e==="H"?["H",Md,!1]:["DHZ",Id,!1]}return typeof t=="boolean"?["B",Rd,!0]:typeof t=="number"?Number.isInteger(t)?["L",Ld,!0]:["R",Pd,!0]:Ca(t)}function Fd(t){return xn(t)}function Ud(t){let[e,r,n]=t.split("-").map(Number);return new Date(Date.UTC(e,r-1,n,0,0,0,0))}function io(t){return new Date(t)}function qd(t){let[e,r,n]=t.split(":"),[a,i]=n.split(".");return new Date(Date.UTC(1970,0,1,Number(e),Number(r),Number(a),Number(i||0)))}function jd(t){return t.toLowerCase()==="true"}function Vd(t){return parseInt(t,10)}function zd(t){return parseFloat(t)}function Hd(t){return t}function Wd(t){return null}var Gd=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/;function Xd(t){if(!Gd.test(t))throw new Error(`RAW payload is not standard padded base64: '${t}'`);let e=atob(t),r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=e.charCodeAt(n);return r}function Yd(t){return ao(t)}var Zd=/^[A-Z]+$/,lt={N:[Object,Fd],D:[Date,Ud],DH:[Date,io],DHZ:[Date,io],H:[Date,qd],L:[Number,Vd],R:[Number,zd],T:[String,Hd],B:[Boolean,jd],QS:[Object,Yd],NN:[null,Wd],RAW:[Uint8Array,Xd]};function xr(t){return Object.hasOwn(lt,t)?lt[t][0]:null}function Ma(t,e,r,n,a=!1){if(typeof e!="string"||!Zd.test(e))throw new Error(`TYTX suffix '${e}' is invalid: expected uppercase ASCII letters only`);let i=lt[e];if(i!==void 0&&i[0]!==t){let s=i[0]===null?"null":i[0].name;throw new Error(`TYTX suffix '${e}' is already registered for ${s}`)}Cn=Cn.filter(([s])=>s!==t),Cn.push([t,e,r,a]),lt[e]=[t,n]}function Dr(t,e){Ia.set(t,e)}function je(t){return Ia.has(t)?Ia.get(t):{}}var oo={network:{maxAttempts:3,delay:1,backoff:2,jitter:!0,on:["TypeError","NetworkError","AbortError"]},aggressive:{maxAttempts:5,delay:.5,backoff:2,jitter:!0,on:["Error"]},gentle:{maxAttempts:2,delay:2,backoff:1.5,jitter:!1,on:["TypeError","NetworkError"]}};function Kd(t){let e=t._retryPolicy;return e==null?null:typeof e=="string"?oo[e]||null:e}function Qd(t,e){return e.some(r=>r==="Error"?!0:t.name===r||t.constructor.name===r)}function ef(t){return new Promise(e=>setTimeout(e,t))}async function tf(t,e){if(!e)return t();let r=e.maxAttempts||3,n=e.delay||1,a=e.backoff||2,i=e.jitter!==!1,s=e.on||["Error"],o=null,u=n*1e3;for(let l=0;l<r;l++)try{let c=t();return c instanceof Promise?await c:c}catch(c){if(o=c,l<r-1&&Qd(c,s)){let d=u;i&&(d*=1+Math.random()*.1),await ef(d),u*=a}else throw c}throw o}var te=class t{static classKwargs={cacheTime:0,readOnly:!1,asBag:null,retryPolicy:null};static classArgs=[];static internalParams=new Set(["cacheTime","readOnly","asBag","retryPolicy"]);constructor(e={}){let n={...this.constructor.classKwargs,...e};for(let i of["interval","reactive"])if(Object.hasOwn(n,i))throw new TypeError(`Removed resolver option: ${i}. Schedule updates in the application; use reset() and read explicitly.`);this.cacheTime=n.cacheTime,this._readOnly=n.readOnly,this._asBag=n.asBag,this._retryPolicy=n.retryPolicy,this._kw={};let a=this.constructor.internalParams;for(let[i,s]of Object.entries(n))a.has(i)||(this._kw[i]=s);this._lastUpdate=null,this._node=null,this._lastEffectiveFingerprint=null,this._cachedValue=null,this.init()}init(){}setNode(e){e!==this._node&&!this.readOnly&&this._lastUpdate!==null&&this.reset(),this._node=e,this.onSetResolver(e)}onSetResolver(e){}get node(){return this._node}get cacheTime(){return this._cacheTime}set cacheTime(e){if(typeof e=="boolean")throw new TypeError("cacheTime must be numeric; use a negative value for infinite caching");this._cacheTime=e}get readOnly(){return this._readOnly}get expired(){return this._cacheTime<0?this._lastUpdate===null:this._cacheTime===0||this._lastUpdate===null?!0:(Date.now()-this._lastUpdate)/1e3>this._cacheTime}reset(...e){if(e.length)throw new TypeError("reset() takes no arguments. It invalidates the cache for the next explicit read.");this._lastUpdate=null,this._lastEffectiveFingerprint=null}get cachedValue(){return!this.readOnly&&this._node?this._node._value:this._cachedValue}set cachedValue(e){!this.readOnly&&this._node?this._node.setValue(e,!1):this._cachedValue=e}_computeEffectiveFingerprint(e){return JSON.stringify(Object.entries(e).sort())}resolve(e={}){let{static:r=!1,...n}=e;if(r)return this._node?this._node._value:this.cachedValue;let a={...this._kw};if(this._node&&this._node.attr){let l=this.constructor.internalParams;for(let[c,d]of Object.entries(this._node.attr))l.has(c)||(a[c]=d)}Object.assign(a,n);let i=this._computeEffectiveFingerprint(a);if(i===this._lastEffectiveFingerprint&&!this.expired)return this.cachedValue;this._lastEffectiveFingerprint=i;let s=Kd(this),o=()=>this.load(a);if(s)return tf(o,s).then(l=>this._finalize(l));let u=o();return u&&typeof u.then=="function"?u.then(l=>this._finalize(l)):this._finalize(u)}_finalize(e){let r;return this._asBag===!0?r=!0:this._asBag===!1?r=!1:r=!this._readOnly,r&&e!==null&&e!==void 0&&(e=this._convertToBag(e)),this._lastUpdate=Date.now(),(!this.readOnly||this.cacheTime!==0)&&(this.cachedValue=e),e}_convertToBag(e){let r=t._BagClass;if(!r||e&&typeof e._htraverse=="function")return e;if(typeof e=="string"){if(e=e.trim(),e.startsWith("<")&&r.fromXml)return r.fromXml(e);if((e.startsWith("{")||e.startsWith("["))&&r.fromTytx)return r.fromTytx(e)}return e}static registerBagClass(e){t._BagClass=e}load(e){return null}};te._BagClass=null;var Ar=class extends te{static classKwargs={cacheTime:0,readOnly:!1,asBag:!1,retryPolicy:null,callback:null};static classArgs=["callback"];static internalParams=new Set(["cacheTime","readOnly","asBag","retryPolicy","callback"]);constructor(e={}){typeof e=="function"&&(e={callback:e}),super(e),this._callback=e.callback||null}load(e){return this._callback?this._callback.call(this,e):null}};var Ve=class t{constructor(e,r,n=null,a=null,i=null,s=null,o=null,u=!0){this.label=r,this._value=null,this._attr={},this._parentBag=null,this._resolver=null,this._nodeSubscribers={},this._onChangedValue=null,this.nodeTag=s,this.xmlTag=o,this._compiled=null,this.parentBag=e,a&&this.setAttr(a,!1,!0,u),n!==null&&this.setValue(n,!1),i&&(this.resolver=i)}get parentBag(){return this._parentBag}set parentBag(e){e===null&&this._value?.parentNode===this&&this._value.setBackref(),this._parentBag=e,e?.backref&&this._value&&typeof this._value._htraverse=="function"&&this._value.setBackref(this,e)}get value(){return this.getValue()}set value(e){this.setValue(e)}getValue(e=!1,r=null,n={}){if(r!==null){let a=ee(`${r}::QS`);if(Array.isArray(a)){let i=a.length?a:Object.keys(this._attr),s=i.map(u=>{let l=this.getAttr(u);return!e&&l instanceof te?l.resolve():l}),o=u=>a.length===0?Object.fromEntries(i.map((l,c)=>[l,u[c]])):u.length===1?u[0]:u;return s.some(u=>u&&typeof u.then=="function")?Promise.all(s).then(o):o(s)}else{if(!this._resolver)throw new Error("Cannot use kwargs syntax without resolver");n={...n,...a}}}return this._resolver!==null?this._resolver.resolve({static:e,...n}):this._value}setValue(e,r=!0,n=null,a=null,i=!0,s=null,o=!1){e instanceof te?(this.resolver=e,e=null):e instanceof t&&(n=n||{},Object.assign(n,e._attr),e.resolver&&(this.resolver=e.resolver),e=e._value);let u=this._value;u!==e&&u?.parentNode===this&&u.setBackref(),this._value=e;let l=u!==this._value,c=r??!0,d=null;if(n!==null){let p={...this._attr};this.setAttr(n,!1,a,i);let h=this._buildAttrDiff(p,this._attr);d=Object.keys(h).length>0?h:null}r=c&&(l||d!==null);let f=d?l?"upd_value_attr":"upd_attrs":"upd_value";if(this._onChangedValue&&this._onChangedValue(this,e,u,c),r){let p=d!==null?{oldvalue:u,attrs_diff:d}:{oldvalue:u};for(let h of Object.values(this._nodeSubscribers))h({node:this,info:p,evt:f})}this._parentBag!==null&&this._parentBag.backref&&(e&&typeof e._htraverse=="function"&&e.setBackref(this,this._parentBag),r&&this._parentBag._onNodeChanged(this,[this.label],f,u,d,s,o))}replace(e){if(!(e instanceof t))throw new TypeError("BagNode.replace expects a BagNode");if(e===this)return this;let r=e.staticValue;r&&typeof r._htraverse=="function"&&(r=r.createChildBag().replace(r));let n=null;e.resolver&&(n=Object.create(Object.getPrototypeOf(e.resolver),Object.getOwnPropertyDescriptors(e.resolver)),n._node=null,n._kw={...e.resolver._kw});let a=this._value,i={...this._attr},s=this.resolver;s&&s._node===this&&(s._node=null),this.resolver=n,this.setValue(r,!1,{...e.attr},!1,!1,null);let o=this._buildAttrDiff(i,this._attr),u=Object.keys(o).length?o:null,l=a!==r||s!==n;if(l||u){let c=u?l?"upd_value_attr":"upd_attrs":"upd_value",d=u?{oldvalue:a,attrs_diff:u}:{oldvalue:a};for(let f of Object.values(this._nodeSubscribers))f({node:this,info:d,evt:c});this._parentBag!==null&&this._parentBag.backref&&this._parentBag._onNodeChanged(this,[this.label],c,a,u)}return this}get staticValue(){return this._value}set staticValue(e){this._value=e}get resolver(){return this._resolver}set resolver(e){this._resolver=e,e&&e.setNode&&e.setNode(this)}resetResolver(){if(!this._resolver)throw new Error("Cannot reset resolver: node has no resolver");this._resolver.reset(),this.setValue(null)}get attr(){return this._attr}getAttr(e=null,r=null){return e?e in this._attr?this._attr[e]:r:this._attr}_buildAttrDiff(e,r){let n={},a=new Set([...Object.keys(e),...Object.keys(r)]);for(let i of a){let s=i in e?e[i]:null,o=i in r?r[i]:null;s!==o&&(n[i]={old:s,new:o})}return n}setAttr(e=null,r=!0,n=!0,a=!0){let i=e||{},s=Object.keys(this._nodeSubscribers).length>0,u=r&&(s||this._parentBag!==null&&this._parentBag.backref)?{...this._attr}:null;if(n?Object.assign(this._attr,i):this._attr={...i},a)for(let l of Object.keys(this._attr))this._attr[l]===null&&delete this._attr[l];if(r&&u!==null){let l=this._buildAttrDiff(u,this._attr);if(Object.keys(l).length>0&&s)for(let c of Object.values(this._nodeSubscribers))c({node:this,info:{attrs_diff:l},evt:"upd_attrs"});if(Object.keys(l).length>0&&this._parentBag!==null&&this._parentBag.backref){let c=r===!0?"true":String(r);this._parentBag._onNodeChanged(this,[this.label],"upd_attrs",null,l,c)}}}delAttr(...e){for(let r of e)if(typeof r=="string"&&r.includes(","))for(let n of r.split(","))delete this._attr[n.trim()];else delete this._attr[r]}hasAttr(e,r=null){return e in this._attr?r!==null?this._attr[e]===r:!0:!1}getInheritedAttributes(){let e={};return this._parentBag&&this._parentBag.parentNode&&(e=this._parentBag.parentNode.getInheritedAttributes()),{...e,...this._attr}}subscribe(e,r){this._nodeSubscribers[e]=r}unsubscribe(e){delete this._nodeSubscribers[e]}get compiled(){return this._compiled||(this._compiled={}),this._compiled}get isBranch(){return this._value!=null&&typeof this._value._htraverse=="function"}get position(){return this._parentBag===null?null:this._parentBag._nodes.index(this.label)}get fullpath(){if(this._parentBag!==null){let e=this._parentBag.fullpath;return e?`${e}.${this.label}`:this.label}return null}get parentNode(){return this._parentBag?this._parentBag.parentNode:null}attributeOwnerNode(e,r=null){let n=this;if(r===null)for(;n&&!(e in n._attr);)n=n.parentNode;else for(;n&&n._attr[e]!==r;)n=n.parentNode;return n}asTuple(){return[this.label,this.value,this._attr,this._resolver||null]}isEqual(e){if(!(e instanceof t)||this.label!==e.label)return!1;let r=Object.keys(this._attr),n=Object.keys(e._attr);if(r.length!==n.length)return!1;for(let a of r)if(this._attr[a]!==e._attr[a])return!1;return this._resolver!==null?this._resolver===e._resolver:this._value&&typeof this._value.equalTo=="function"?this._value.equalTo(e._value):this._value&&typeof this._value.isEqual=="function"?this._value.isEqual(e._value):this._value===e._value}diff(e){if(this.label!==e.label)return`Other label: ${e.label}`;let r=Object.keys(this._attr),n=Object.keys(e._attr);return r.length!==n.length||r.some(a=>this._attr[a]!==e._attr[a])?`attributes self:${JSON.stringify(this._attr)} --- other:${JSON.stringify(e._attr)}`:this._value!==e._value?`value self:${this._value} --- other:${e._value}`:null}toJson(e=!0){let r=this.value;return r&&typeof r.toJson=="function"&&(r=r.toJson(e,!0)),{label:this.label,value:r,attr:this._attr}}toString(){return`BagNode : ${this.label}`}};var Tr=class t{constructor(){this._dict=Object.create(null),this._list=[],this._parentBag=null}index(e){if(e in this._dict)return this._list.findIndex(n=>n.label===e);let r=e.match(/^#(\d+)$/);if(r){let n=parseInt(r[1],10);return n<this._list.length?n:-1}if(r=e.match(/^#(\w*)=(.*)$/),r){let[,n,a]=r,i=a.includes("::")?ee(a):a;return n?this._list.findIndex(s=>s.getAttr(n)===i):this._list.findIndex(s=>s._value===i)}return-1}_parsePosition(e){let r=this._list.length;if(e==null||e===">")return r;if(typeof e=="number")return e<0&&(e=r+e),Math.max(0,Math.min(e,r));if(e==="<")return 0;if(e.startsWith("#")){let n=this._parseSharpIndex(e.slice(1),e);return Math.min(n,r)}if(e.startsWith("<")){let n=e.slice(1);if(n.startsWith("#")){let i=this._parseSharpIndex(n.slice(1),e);return Math.min(i,r)}let a=this.index(n);if(a<0)throw new Error(`Invalid node_position '${e}': label '${n}' not found`);return a}if(e.startsWith(">")){let n=e.slice(1);if(n.startsWith("#")){let i=this._parseSharpIndex(n.slice(1),e);return Math.min(i+1,r)}let a=this.index(n);if(a<0)throw new Error(`Invalid node_position '${e}': label '${n}' not found`);return a+1}throw new Error(`Invalid node_position '${e}': unrecognized syntax`)}_parseSharpIndex(e,r){if(!/^-?\d+$/.test(e))throw new Error(`Invalid node_position '${r}': '${e}' is not an integer`);let n=parseInt(e,10);if(n<0)throw new Error(`Invalid node_position '${r}': negative index not allowed in '#n' syntax`);return n}get(e){if(typeof e=="number")return e>=0&&e<this._list.length?this._list[e]:null;if(e.startsWith("#")){let r=this.index(e);return r>=0?this._list[r]:null}return this._dict[e]||null}set(e,r,n=">",a=null,i=null,s=null,o=!1,u=!0,l=null,c=!0,d=!1,f=null){let p=null;if(e.includes("?")&&([e,p]=e.split("?",2)),e==null||e.startsWith("#"))throw new Error("Cannot create new node with #n syntax");if(p){let m=p.split("&");if(m.length===1)a={[m[0]]:r};else{if(!Array.isArray(r)||r.length!==m.length)throw new Error("Wrong attributes assignment");a={};for(let _=0;_<m.length;_++)a[m[_]]=r[_]}r=null}let h=this._dict[e];if(h)f&&(h.nodeTag=f),s!==null&&(s===!1?h.resolver=null:h.resolver=s),p?h.setAttr(a,c,!0,u):h.setValue(r,c,a,o,u,l,d);else{let m=i&&i.nodeClass?i.nodeClass:Ve;h=new m(i,e,p?null:r,a,s,f,null,u);let _=this._parsePosition(n);this._dict[e]=h,this._list.splice(_,0,h),c&&i&&i.backref&&i._onNodeInserted(h,_,null,l,d)}return d&&h.setValue(null,!1),h}pop(e){let r=this.get(e);if(r){delete this._dict[r.label];let n=this._list.indexOf(r);return n>=0&&this._list.splice(n,1),r}return null}has(e){return e in this._dict}get length(){return this._list.length}clear(){this._dict=Object.create(null),this._list=[]}keys(){return this._list.map(e=>e.label)}values(){return this._list.map(e=>e.getValue())}items(){return this._list.map(e=>[e.label,e.getValue()])}[Symbol.iterator](){return this._list[Symbol.iterator]()}move(e,r,n=!0){if(r<0)return;let a=Array.isArray(e)?e:[e];if(a.length===0||r>=this._list.length)return;let i=this._list[r].label;if(a.length>1){let s=[...a].sort((c,d)=>c-d),o=s[0]<r?1:0,u=[];for(let c=s.length-1;c>=0;c--){let d=s[c];if(d>=0&&d<this._list.length){let f=this._list[d];this._list.splice(d,1),u.push(f),n&&this._parentBag&&this._parentBag.backref&&this._parentBag._onNodeDeleted(f,d)}}let l=this.index(i);l<0&&(l=this._list.length),l+=o;for(let c of u)this._list.splice(l,0,c),n&&this._parentBag&&this._parentBag.backref&&this._parentBag._onNodeInserted(c,l)}else{let s=a[0];if(s===r||s<0||s>=this._list.length)return;let o=this._list[s];this._list.splice(s,1),n&&this._parentBag&&this._parentBag.backref&&this._parentBag._onNodeDeleted(o,s),this._list.splice(r,0,o),n&&this._parentBag&&this._parentBag.backref&&this._parentBag._onNodeInserted(o,r)}}isEqual(e){if(!(e instanceof t)||this._list.length!==e._list.length)return!1;for(let r=0;r<this._list.length;r++){let n=this._list[r],a=e._list[r];if(!n.isEqual(a))return!1}return!0}};var fo=ai(Da(),1);var Ra="::RSLV:",rf=new Map,nf=new Map,Nn=new WeakMap,W=class extends Error{constructor(e){super(e),this.name="BagSerializationError"}},Cr=class extends te{constructor(e){super({asBag:!1}),Nn.set(this,e)}get payload(){return Nn.get(this)}load(){throw new W("This resolver is opaque; local execution is unavailable")}};function lo(t){if(!t||typeof t!="object"||Array.isArray(t)||typeof t.resolver_module!="string"||typeof t.resolver_class!="string"||!Array.isArray(t.args??[])||!t.kwargs||typeof t.kwargs!="object"||Array.isArray(t.kwargs))throw new W("Invalid resolver description")}function uo(t,e=new Set){if(!(t===null||typeof t=="string"||typeof t=="boolean")&&!(typeof t=="number"&&Number.isFinite(t))){if(typeof t!="object"||e.has(t)||!Array.isArray(t)&&Object.getPrototypeOf(t)!==Object.prototype&&Object.getPrototypeOf(t)!==null)throw new W("Resolver parameters must be JSON data; callbacks cannot travel");e.add(t);for(let r of Object.values(t))uo(r,e);e.delete(t)}}function Nr(t){if(Nn.has(t))return Nn.get(t);let e=nf.get(t.constructor);if(!e)throw new W(`Unregistered resolver: ${t.constructor.name}`);let r=e.encode(t),n={resolver_module:e.module,resolver_class:e.name,args:r.args??[],kwargs:r.kwargs??{}};return lo(n),uo(n),Ra+JSON.stringify(n)}function Sn(t){if(typeof t!="string"||!t.startsWith(Ra))return null;let e=t.slice(Ra.length);if(/^[A-Za-z0-9_-]+\.[A-Za-z0-9_-]*\.[A-Za-z0-9_-]+$/.test(e))return new Cr(t);let r;try{r=JSON.parse(e)}catch{throw new W("Invalid resolver JSON or signed token")}lo(r);let n=rf.get(JSON.stringify([r.resolver_module,r.resolver_class]));if(!n)return new Cr(t);let a=n.decode({args:r.args??[],kwargs:r.kwargs});if(!(a instanceof n.cls))throw new W("Resolver decoder returned an incompatible instance");return a}function On(t){return Object.fromEntries(Object.entries(t||{}).map(([e,r])=>[e,r instanceof te?Nr(r):r]))}function La(t){return Object.fromEntries(Object.entries(t||{}).map(([e,r])=>[e,Sn(r)??r]))}var Te="__cls";function Gt(t,e){return t!==null&&t.tytxSuffix===e?t:xr(e)}function af(t){let e=t.tytxSuffix,r=Object.entries(je(e)).filter(([,n])=>n===t).map(([n])=>n);if(r.length===0)throw new W(`${t.name} is not in the TYTX subtype dictionary of '${e}'`);if(r.length>1)throw new W(`${t.name} is in the TYTX subtype dictionary of '${e}' under several names: ${r.sort().join(", ")}`);return r[0]}function Pa(t,e){let r=je(t);if(!Object.hasOwn(r,e))throw new W(`Unknown Bag class '${e}' for TYTX type '${t}'`);return r[e]}function $a(t,e){return t===e?null:af(t)}function*po(t,e=[]){for(let r of t){let n=[...e,r.label];yield[n,r];let a=r.getValue(!0);!r.resolver&&a instanceof ae&&(yield*po(a,n))}}function sf(t){let e=t.toISOString(),r=t.getUTCFullYear()===1970&&t.getUTCMonth()===0&&t.getUTCDate()===1,n=t.getUTCHours()===0&&t.getUTCMinutes()===0&&t.getUTCSeconds()===0&&t.getUTCMilliseconds()===0;if(n&&!r)return e.slice(0,e.indexOf("T"));let a=e.replace(/\.000Z$/,"Z");return r&&!n?a.slice(a.indexOf("T")+1):a}function Xt(t){if(t===null||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null}function ut(t){return typeof t=="string"?t.includes("::")?`${t}::T`:t:Array.isArray(t)?t.map(ut):Xt(t)?Object.fromEntries(Object.entries(t).map(([e,r])=>[e,ut(r)])):t}function Fa(t){if(!Xt(t))throw new TypeError("Bag options must be an object");let{recursive:e=!0}=t;if(typeof e!="boolean")throw new TypeError("recursive must be a boolean");return e}var co=!1,ae=class t{static tytxSuffix="X";constructor(e=null,r={}){this._nodes=new Tr,this._backref=!1,this._parent=null,this._parentNode=null,this._rootAttributes=null,this._updSubscribers={},this._insSubscribers={},this._delSubscribers={},Fa(r),e!=null&&this.fillFrom(e,r)}get parent(){return this._parent}set parent(e){this._parent=e}get parentNode(){return this._parentNode}set parentNode(e){this._parentNode=e}get backref(){return!!this._backref}get nodeClass(){return Ve}createChildBag(){return new this.constructor}get fullpath(){if(this._parent!==null&&this._parentNode!==null){let e=this._parent.fullpath;return e?`${e}.${this._parentNode.label}`:this._parentNode.label}return null}relativePath(e){let r=[],n=e;for(;n!==null;){if(n.parentBag===this)return r.push(n.label),r.reverse(),r.join(".");r.push(n.label),n=n.parentNode}return null}get length(){return this._nodes.length}get root(){let e=this;for(;e.parent!==null;)e=e.parent;return e}get attributes(){return this._parentNode!==null?this._parentNode.getAttr():{}}get rootAttributes(){return this._rootAttributes}set rootAttributes(e){this._rootAttributes=e!==null?{...e}:null}_htraverseBefore(e){let r=this,n;for(typeof e=="string"?(e=e.replace(/\.\.\//g,"#parent."),n=e.split(".").filter(a=>a)):n=[...e];n.length&&n[0]==="#parent"&&r!==null;)n.shift(),r=r.parent;return[r,n]}_htraverse(e,r=!1,n=!0){let[a,i]=this._htraverseBefore(e);if(a===null)return[null,null];if(i.length===0)return[a,""];for(;i.length>1&&a instanceof t;){let s=i[0];if(s==="#parent"){if(a.parent===null||a.parent===void 0)break;i.shift(),a=a.parent;continue}let o=a._nodes.get(s);if(!o)break;let u=o.getValue(n);if(u instanceof t)i.shift(),a=u;else if(r){let l=a.createChildBag();o.setValue(l,!0,null,!0,!0,"autocreate"),i.shift(),a=l}else break}if(!r)return i.length>1?[null,null]:[a,i[0]];for(;i.length>1;){let s=i.shift();if(s.startsWith("#"))throw new Sr("Not existing index in #n syntax");let o=a.createChildBag();a._nodes.set(s,o,">",null,a,null,!1,!0,"autocreate"),a=o}return[a,i[0]]}get(e,r=null,n=!0,a={}){if(!e)return this;if(e==="#parent")return this.parent;let i=null;e.includes("?")&&([e,i]=e.split("?",2));let s=this._nodes.get(e);return s?s.getValue(n,i,a):r}getItem(e,r=null,n=!1,a={}){if(!e)return this;let[i,s]=this._htraverse(e,!1,n);return i instanceof t?i.get(s,r,n,a):r}setItem(e,r,n=null,a=">",i=!1,s=!0,o=null,u=!1,l=!0,c=null,d=null){if(e==="")throw new RangeError("setItem requires a non-empty path");let[f,p]=this._htraverse(e,!0);return f._nodes.set(p,r,a,n,f,c,i,s,o,l,u,d)}_pop(e,r=null){let n=this._nodes.index(e);if(n>=0){let a=this._nodes.pop(n);return this.backref&&this._onNodeDeleted(a,n,null,r),a}return null}pop(e,r=null,n=null){let a=this.popNode(e,n);return a?a.value:r}delItem(e,r=null,n=null){return this.pop(e,r,n)}popNode(e,r=null){let[n,a]=this._htraverse(e,!1,!0);if(!n||!a)return null;let i=n._nodes.get(a);if(!i)return null;try{return n._pop(a,r)}finally{i.parentBag===n&&n._nodes._dict[i.label]!==i&&(i.parentBag=null)}}clear(){let e=[...this._nodes];this._nodes.clear(),this.backref&&this._onNodeDeleted(e,-1);for(let r of e)r.parentBag=null}getNode(e,r=!0,n=!1,a=null){if(e==null||e==="")return this.parentNode;if(typeof e=="number")return this._nodes.get(e);typeof e=="string"&&(e=e.split("?",1)[0]);let[i,s]=this._htraverse(e,n,r);if(i instanceof t&&s){let o=i._nodes.get(s);if(o)return o;if(n)return i._nodes.set(s,a,">",null,i,null,!1,!0,"autocreate"),i._nodes.get(s)}return null}setBackref(e=null,r=null){let n=this._backref;if(this._backref=!0,this._parent=r,this._parentNode=e,!n){this._nodes._parentBag=this;for(let a of this)a.parentBag=this}}delParentRef(){this._parent=null,this._parentNode=null,this._backref=!1}clearBackref(){if(this._backref){this._backref=!1,this._parent=null,this._parentNode=null,this._nodes._parentBag=null;for(let e of this){e.parentBag=null;let r=e.getValue(!0);r instanceof t&&r.clearBackref()}}}_onNodeChanged(e,r,n,a=null,i=null,s=null,o=!1){for(let u of Object.values(this._updSubscribers))u({node:e,pathlist:r,oldvalue:a,attrs_diff:i,evt:n,reason:s,fired:o});this._parent&&this._parentNode&&this._parent._onNodeChanged(e,[this._parentNode.label,...r],n,a,i,s,o)}_onNodeInserted(e,r,n=null,a=null,i=!1){let s=e.parentBag,o=e.getValue(!0);s!==null&&s.backref&&o instanceof t&&o.setBackref(e,s),n===null&&(n=[]);for(let u of Object.values(this._insSubscribers))u({node:e,pathlist:n,ind:r,evt:"ins",reason:a,fired:i});this._parent&&this._parentNode&&this._parent._onNodeInserted(e,r,[this._parentNode.label,...n],a,i)}_onNodeDeleted(e,r,n=null,a=null){for(let i of Object.values(this._delSubscribers))i({node:e,pathlist:n,ind:r,evt:"del",reason:a});this._parent&&this._parentNode&&(n===null&&(n=[]),this._parent._onNodeDeleted(e,r,[this._parentNode.label,...n],a))}_subscribe(e,r,n){n!=null&&(r[e]=n)}subscribe(e,r={}){if(Object.hasOwn(r,"timer")||Object.hasOwn(r,"interval"))throw new TypeError("Timer subscriptions were removed. Schedule polling in the application.");let{update:n=null,insert:a=null,delete:i=null,any:s=null}=r;this.backref||this.setBackref(),this._subscribe(e,this._updSubscribers,n||s),this._subscribe(e,this._insSubscribers,a||s),this._subscribe(e,this._delSubscribers,i||s)}unsubscribe(e,r={}){if(Object.hasOwn(r,"timer")||Object.hasOwn(r,"interval"))throw new TypeError("Timer subscriptions were removed. Schedule polling in the application.");let{update:n=!1,insert:a=!1,delete:i=!1,any:s=!1}=r;(n||s)&&delete this._updSubscribers[e],(a||s)&&delete this._insSubscribers[e],(i||s)&&delete this._delSubscribers[e]}[Symbol.iterator](){return this._nodes[Symbol.iterator]()}keys(){return this._nodes.keys()}values(){return this._nodes.values()}items(){return[...this._nodes].map(e=>({key:e.label,value:e.getValue()}))}get nodes(){return this.getNodes()}node(e){return this._nodes.get(e)}setAttr(e=null,r=null,n=!0){let a=t.prototype.getNode.call(this,e,!0,!0);a&&a.setAttr(r,!0,!0,n)}getAttr(e=null,r=null,n=null){let a=this.getNode(e);return a?a.getAttr(r,n):n}delAttr(e=null,...r){let n=this.getNode(e);n&&n.delAttr(...r)}getInheritedAttributes(){return this._parentNode?this._parentNode.getInheritedAttributes():{}}getNodes(e=null){return e?[...this._nodes].filter(r=>e(r)):[...this._nodes]}getNodeByValue(e,r){for(let n of this._nodes){let a=n.value;if(a instanceof t){if(a.getItem(e)===r)return n}else if(a&&a.get&&a.get(e)===r)return n}return null}getNodeByAttr(e,r,n=!1,a=!1){let i=r===void 0,s=n&&typeof r=="string"?r.toLowerCase():r,o=u=>{let l=[];for(let c of u._nodes){if(e in c.attr){let d=n&&typeof c.attr[e]=="string"?c.attr[e].toLowerCase():c.attr[e];if(i||d==s)return c}if(c._value instanceof t)if(a){let d=o(c._value);if(d)return d}else l.push(c._value)}for(let c of l){let d=o(c);if(d)return d}return null};return o(this)}isEmpty(e=!1,r=!1){if(this._nodes.length===0)return!0;for(let n of this._nodes){if(n._resolver!==null)return!1;let a=n.getValue(!0);if(a!=null&&!(e&&a===0)&&!(r&&a===""))return!1}return!0}query(e=null,r=null,n=!1,a=!1,i=!0,s=!0,o=null,u=!0){e||(e="#k,#v,#a");let l=this,c;if(typeof e=="string"){if(e.includes(":")){let[p,h]=e.split(":");l=this.getItem(p),e=h}c=e.split(",").map(p=>p.trim())}else c=e;let d=(p,h,m,_,b)=>{if(h==="#k")return p.label;if(h==="#p")return m;if(h==="#n")return p;if(typeof h=="function")return h(p);if(h==="#v"){let v=b();return _&&v instanceof t?null:v}else if(h.startsWith("#v.")){let v=h.split(".").slice(1).join("."),w=b();return w&&w.getItem?w.getItem(v):null}else{if(h==="#__v")return p.getValue(!0);if(h.startsWith("#a")){let v=h.includes(".")?h.split(".").slice(1).join("."):null;return p.getAttr(v)}else{let v=b();return v&&v.getItem?v.getItem(h):null}}};function*f(){let p=0;function*h(m,_){for(let b of m._nodes){let v=_?`${_}.${b.label}`:b.label,w=!1,x,B=()=>(w||(x=b.getValue(u),w=!0),x);if((i&&s||(B()instanceof t?s:i))&&(r===null||r(b))&&(yield c.length===1?d(b,c[0],v,a,B):c.map(G=>d(b,G,v,a,B)),p++,o!==null&&p>=o))return;if(a){let G=B();if(G instanceof t&&(yield*h(G,v),o!==null&&p>=o))return}}}yield*h(l,"")}return n?f():[...f()]}getLeaves(){let e=[],r=(n,a)=>{for(let i of n._nodes){let s=a?`${a}.${i.label}`:i.label,o=i.getValue(!1);o instanceof t?r(o,s):e.push([s,o])}};return r(this,""),e}digest(e=null,r=null,n=!1){typeof r=="boolean"&&(console.warn("Bag.digest(what, asColumns) is deprecated; use digest(what, null, asColumns)."),n=r,r=null);let a=this.query(e,r,!1,!1,!0,!0,null,!1);if(n){if(!a||a.length===0)return(typeof e=="string"?e:"#k,#v,#a").split(",").map(u=>u.trim()).map(()=>[]);let i=[...a];if(i.length&&Array.isArray(i[0])){let s=i[0].length,o=[];for(let u=0;u<s;u++)o.push(i.map(l=>l[u]));return o}return[i]}return[...a]}columns(e,r=!1){typeof e=="string"&&(e=e.split(","));let n=r?"#a.":"",a=e.map(i=>`${n}${i}`).join(",");return this.digest(a,null,!0)}sum(e="#v",r=!1,n=null){if(r!=null&&typeof r!="boolean")throw new TypeError("sum strict must be a boolean; pass condition as the third argument");if(n!=null&&typeof n!="function")throw new TypeError("sum condition must be callable; deep is no longer supported");let a=i=>{let s=0,o=!1;for(let u of this.query(i,n)){if(u==null||u===""){o=!0;continue}if(typeof u!="number"&&typeof u!="boolean"){if(r)throw new TypeError(`sum encountered non-numeric value: ${typeof u}`);continue}s+=u}return r&&o?null:s};return e.includes(",")?e.split(",").map(i=>a(i.trim())):a(e)}sort(e="#k:a"){let r=(a,i)=>a==null?[-1,""]:i&&typeof a=="string"?[0,a.toLowerCase()]:[0,a],n=(a,i)=>a[0]!==i[0]?a[0]-i[0]:a[1]<i[1]?-1:a[1]>i[1]?1:0;if(typeof e=="function")this._nodes._list.sort((a,i)=>{let s=e(a),o=e(i);return s<o?-1:s>o?1:0});else{let a=e.split(",");a.reverse();for(let i of a){let s,o;i.includes(":")?[s,o]=i.split(":",2):(s=i,o="a"),s=s.trim(),o=o.trim();let u=o==="d"||o==="D",l=o==="a"||o==="d",c;if(s.toLowerCase()==="#k")c=d=>r(d.label,l);else if(s.toLowerCase()==="#v")c=d=>r(d.value,l);else if(s.toLowerCase().startsWith("#a.")){let d=s.slice(3);c=f=>r(f.getAttr(d),l)}else c=d=>{let f=d.value,p=f instanceof t?f.getItem(s):f?f[s]:null;return r(p,l)};this._nodes._list.sort((d,f)=>{let p=n(c(d),c(f));return u?-p:p})}}return this}equalTo(e){return e instanceof t?this._nodes.isEqual(e._nodes):!1}has(e){if(typeof e=="string"){let r=null;e.includes("?")&&([e,r]=e.split("?",2));let n=this.getNode(e);return n===null?!1:r===null?!0:r.split("&").every(a=>a in n.attr)}else if(e&&e.label!==void 0)return[...this._nodes].includes(e);return!1}getResolver(e){let r=this.getNode(e);return r?r.resolver:null}setResolver(e,r){let n=this.getNode(e);n||(this.setItem(e,null),n=this.getNode(e)),n.resolver=r}setCallbackItem(e,r,n={}){let a=new Ar({callback:r,...n});this.setResolver(e,a)}move(e,r,n=!0){this._nodes.move(e,r,n)}asDict(e=!1,r=!1,n=!1,a=!1){let i={};for(let s of this._nodes){let o=s.value;if(a&&o==null)continue;let u=s.label;e&&(u=String(u)),r&&(u=u.toLowerCase()),n&&o instanceof t&&(o=t.prototype.asDict.call(o,e,r,n,a)),Object.defineProperty(i,u,{value:o,enumerable:!0,writable:!0,configurable:!0})}return i}setdefault(e,r=null){let n=this.getNode(e);return n?n.value:(this.setItem(e,r),r)}deepcopy(e=!1){let r=this.createChildBag();for(let n of this._nodes){let a=n.getValue(!e);a instanceof t&&(a=a.deepcopy(e));let i=new r.nodeClass(r,n.label,a);i.setAttr({...n.attr},!1,!1,!1),i.nodeTag=n.nodeTag,i.xmlTag=n.xmlTag,r._nodes._list.push(i),r._nodes._dict[i.label]=i}return r}update(e,r=null,n=null,a=!1){if(!(e instanceof t)){for(let i in e){let s=e[i];(!a||s!==null||!this._nodes.has(i))&&this.setItem(i,s,null,">",!1,!1,n,!1,n!==!1)}return}for(let i of[...e]){let s=i.label,o=r==="static"?i.resolver:null,u=o?null:i.getValue(),l=i.attr.__replace;delete i.attr.__replace;let c=this._nodes.get(s);if(c)if(c.setAttr(i.attr,n===null?!0:n,!0,!1),i.nodeTag!=null&&(c.nodeTag=i.nodeTag),i.xmlTag!=null&&(c.xmlTag=i.xmlTag),o)c.resolver=o,c.setValue(null,n===null?!0:n,null,null,!1,n);else{i.resolver&&(c.resolver=null);let d=c.getValue();u instanceof t&&d instanceof t&&!l?d.update(u,r,n,a):(!a||u!==null)&&c.setValue(u,n===null?!0:n,null,null,!1,n)}else{let d=this.setItem(s,o||u,i.attr,">",!1,!1,n,!1,n!==!1);d.nodeTag=i.nodeTag,d.xmlTag=i.xmlTag}}}_fillFromBag(e){this.clear();for(let r of e){let n=new this.nodeClass(this,r.label);n.replace(r),n.nodeTag=r.nodeTag,n.xmlTag=r.xmlTag,this._nodes._list.push(n),this._nodes._dict[n.label]=n}}_appendLiteral(e,r,n=null,a=null,i=null){if(typeof e!="string")throw new TypeError("Bag labels must be strings");let s=new this.nodeClass(this,e,null,n,a,i,null,!1);return r instanceof te?s.resolver=r:s._value=r,this._nodes._dict[e]=s,this._nodes._list.push(s),s}fillFrom(e=null,r={}){let n=Fa(r);if(e!=null&&!Xt(e)&&!Array.isArray(e))throw new TypeError("Bag source must be a dictionary, array or null");let a=this.createChildBag(),i=new Set,s=(o,u,l)=>{if(i.has(u))throw new TypeError(`Cyclic Bag source at ${l}`);i.add(u);try{let c=Array.isArray(u)?String(u.length).length+1:0,d=Array.isArray(u)?Array.from(u,(f,p)=>[`r_${String(p).padStart(c,"0")}`,f]):Object.entries(u);if(!Array.isArray(u)&&Object.getOwnPropertySymbols(u).some(f=>Object.prototype.propertyIsEnumerable.call(u,f)))throw new TypeError(`Bag labels must be strings at ${l}`);for(let[f,p]of d){let h=p;n&&(Xt(h)||Array.isArray(h))&&(h=this.createChildBag(),s(h,p,`${l}[${JSON.stringify(f)}]`)),o._appendLiteral(f,h)}}finally{i.delete(u)}};return e!=null&&s(a,e,"$"),this._replacePrepared(a)}_loadSource(e,r={}){return this.fillFrom(e,r)}replace(e){if(!(e instanceof t))throw new TypeError("Bag.replace expects a Bag");if(e===this)return this;let r=this.createChildBag();return r._fillFromBag(e),this._replacePrepared(r)}_replacePrepared(e){for(let n of this._nodes){n.parentBag=null;let a=n.getValue(!0);a instanceof t&&a.clearBackref()}let r=this._nodes;this._nodes=e._nodes,e._nodes=r,this._nodes._parentBag=this.backref?this:null,e._nodes._parentBag=null;for(let n of this._nodes)n.parentBag=this;for(let n of e._nodes)n._parentBag=e;return this.backref&&this.parent&&this.parentNode&&this.parent._onNodeChanged(this.parentNode,[this.parentNode.label],"upd_value",e),this}forEach(e,{static:r=!0,deep:n=!1,kwargs:a={}}={}){if(typeof e!="function")throw new TypeError("forEach requires a callback");let i=(s,o)=>{for(let u=0;u<s._nodes.length;u++){let l=s._nodes._list[u],c={...o};"_pathlist"in o&&(c._pathlist=[...o._pathlist,l.label]),"_indexlist"in o&&(c._indexlist=[...o._indexlist,u]);let d=e(l,c,u);if(d)return d;if(d==null&&n){let f=l.getValue(r);if(f instanceof t){let p=i(f,c);if(p)return p}}}return null};return i(this,a)}*traverse(){for(let e of this._nodes){yield e;let r=e.getValue(!0);r instanceof t&&(yield*r.traverse())}}*_iterNodesWithPaths(e=!0,r=""){for(let n of this._nodes){let a=r?`${r}.${n.label}`:n.label;yield[a,n];let i=n.getValue(e);i instanceof t&&(yield*i._iterNodesWithPaths(e,a))}}*_nodeFlattener(e=null){let r=e!==null,n=r?Object.create(null):null,a=0,i=new Map([["[]",this.constructor]]);for(let[s,o]of po(this)){let u=s.slice(0,-1),l=JSON.stringify(s),c=JSON.stringify(u),d=o.getValue(!0),f,p=null;if(o.resolver)f=Nr(o.resolver);else if(d instanceof t){let _=d.constructor,b=_.tytxSuffix;i.set(l,_),p=$a(_,Gt(i.get(c),b)),f=`::${b}`}else d===null?f="::NN":f=ut(d);if(o.attr&&Object.hasOwn(o.attr,Te))throw new W(`node '${s}': the attribute '${Te}' is reserved for the Bag class name`);let h=On(ut(o.attr));p!==null&&(h[Te]=p);let m=o.nodeTag;r?(yield[u.length?n[c]:null,o.label,m,f,h],d instanceof t&&(n[l]=a,e[a]=s,a++)):yield[u,o.label,m,f,h]}}toTytx(e="json",r=!1){let n=this._toTytxPayload(r),a=this.constructor.tytxSuffix;if(e==="json")return`${n}::${a}`;if(e==="msgpack")return en(new xe(4,new TextEncoder().encode(`${a}:${n}`)));throw new TypeError(`Unsupported transport: ${e}`)}_toTytxPayload(e=!1){let r;if(e){let i={};r={rows:[...this._nodeFlattener(i)],paths:i}}else r={rows:[...this._nodeFlattener(null)]};let n=this.constructor,a=$a(n,Gt(null,n.tytxSuffix));return a!==null&&(r[Te]=a),r.rows=r.rows.map(([i,s,o,u,l])=>[ut(i),ut(s),ut(o),u,l]),r.paths&&(r.paths=ut(r.paths)),be(r)}static fromTytx(e,r="json",n={}){if(Xt(r)&&(n=r,r="json"),Fa(n),typeof e!="string"&&!(e instanceof Uint8Array))throw new TypeError("fromTytx requires serialized text or bytes");if(r!=="json"&&r!=="msgpack")throw new TypeError(`Unsupported transport: ${r}`);r==="json"&&e instanceof Uint8Array&&(e=new TextDecoder().decode(e));let a=ee(e,r==="json"?null:r);if(a instanceof t)return a;if(!Xt(a)&&!Array.isArray(a))throw new TypeError("fromTytx requires a dictionary, array or typed Bag root");return new this(a,n)}static _fromTytxPayload(e){let r=this.tytxSuffix;if(e==="")return new(Gt(null,r));let n=ee(e);if(!n||!Array.isArray(n.rows))throw new W("Invalid TYTX Bag: expected rows");let a=n.paths,i=a!=null,s=Object.hasOwn(n,Te)?Pa(r,n[Te]):Gt(null,r),o=new s,u=new Map([["[]",o]]);for(let l of n.rows){if(!Array.isArray(l)||l.length!==5)throw new W("Invalid TYTX Bag row");let[c,d,f,p,h]=l,m=c??"";if(i){if(c!==null&&!Object.hasOwn(a,c))throw new W(`Unknown TYTX parent reference: ${c}`);m=c===null?"":a[c]}if(typeof m=="string"&&(m=m?m.split("."):[]),!Array.isArray(m))throw new W("Invalid TYTX parent path");let _=JSON.stringify(m);if(!u.has(_))throw new W(`Missing or undecodable TYTX parent branch: ${m}`);let b=u.get(_),v=JSON.stringify([...m,d]),w=p,x=Sn(w),B=La(h),L=Object.hasOwn(B,Te)?B[Te]:null;if(delete B[Te],w instanceof t){let re=w.constructor.tytxSuffix,ne=L!==null?Pa(re,L):Gt(b.constructor,re);w=new ne,u.set(v,w)}else if(L!==null)throw new W(`node '${v}': the attribute '${Te}' is reserved for the Bag class name of a branch`);let G=b._appendLiteral(d,x?null:w,B,x);G.nodeTag=f??null}return o}toXml(e={}){let{pretty:r=!1,encoding:n="UTF-8",docHeader:a=null,selfClosedTags:i=null}=e,s=this._bagToXml(i,r);return a===!0?s=`<?xml version='1.0' encoding='${n}'?>
|
|
29
|
+
*/var xt=9e15,et=1e9,Vn="0123456789abcdef",Hr="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Wr="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",zn={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-xt,maxE:xt,crypto:!1},hi,$e,T=!0,Xr="[DecimalError] ",Qe=Xr+"Invalid argument: ",mi=Xr+"Precision limit exceeded",gi=Xr+"crypto unavailable",_i="[object Decimal]",le=Math.floor,J=Math.pow,tl=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,rl=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,nl=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,bi=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Ee=1e7,D=7,al=9007199254740991,il=Hr.length-1,Hn=Wr.length-1,_={toStringTag:_i};_.absoluteValue=_.abs=function(){var t=new this.constructor(this);return t.s<0&&(t.s=1),E(t)};_.ceil=function(){return E(new this.constructor(this),this.e+1,2)};_.clampedTo=_.clamp=function(t,e){var r,n=this,a=n.constructor;if(t=new a(t),e=new a(e),!t.s||!e.s)return new a(NaN);if(t.gt(e))throw Error(Qe+e);return r=n.cmp(t),r<0?t:n.cmp(e)>0?e:new a(n)};_.comparedTo=_.cmp=function(t){var e,r,n,a,i=this,s=i.d,o=(t=new i.constructor(t)).d,u=i.s,l=t.s;if(!s||!o)return!u||!l?NaN:u!==l?u:s===o?0:!s^u<0?1:-1;if(!s[0]||!o[0])return s[0]?u:o[0]?-l:0;if(u!==l)return u;if(i.e!==t.e)return i.e>t.e^u<0?1:-1;for(n=s.length,a=o.length,e=0,r=n<a?n:a;e<r;++e)if(s[e]!==o[e])return s[e]>o[e]^u<0?1:-1;return n===a?0:n>a^u<0?1:-1};_.cosine=_.cos=function(){var t,e,r=this,n=r.constructor;return r.d?r.d[0]?(t=n.precision,e=n.rounding,n.precision=t+Math.max(r.e,r.sd())+D,n.rounding=1,r=sl(n,Ei(n,r)),n.precision=t,n.rounding=e,E($e==2||$e==3?r.neg():r,t,e,!0)):new n(1):new n(NaN)};_.cubeRoot=_.cbrt=function(){var t,e,r,n,a,i,s,o,u,l,c=this,d=c.constructor;if(!c.isFinite()||c.isZero())return new d(c);for(T=!1,i=c.s*J(c.s*c,1/3),!i||Math.abs(i)==1/0?(r=ie(c.d),t=c.e,(i=(t-r.length+1)%3)&&(r+=i==1||i==-2?"0":"00"),i=J(r,1/3),t=le((t+1)/3)-(t%3==(t<0?-1:2)),i==1/0?r="5e"+t:(r=i.toExponential(),r=r.slice(0,r.indexOf("e")+1)+t),n=new d(r),n.s=c.s):n=new d(i.toString()),s=(t=d.precision)+3;;)if(o=n,u=o.times(o).times(o),l=u.plus(c),n=U(l.plus(c).times(o),l.plus(u),s+2,1),ie(o.d).slice(0,s)===(r=ie(n.d)).slice(0,s))if(r=r.slice(s-3,s+1),r=="9999"||!a&&r=="4999"){if(!a&&(E(o,t+1,0),o.times(o).times(o).eq(c))){n=o;break}s+=4,a=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(E(n,t+1,1),e=!n.times(n).times(n).eq(c));break}return T=!0,E(n,t,d.rounding,e)};_.decimalPlaces=_.dp=function(){var t,e=this.d,r=NaN;if(e){if(t=e.length-1,r=(t-le(this.e/D))*D,t=e[t],t)for(;t%10==0;t/=10)r--;r<0&&(r=0)}return r};_.dividedBy=_.div=function(t){return U(this,new this.constructor(t))};_.dividedToIntegerBy=_.divToInt=function(t){var e=this,r=e.constructor;return E(U(e,new r(t),0,1,1),r.precision,r.rounding)};_.equals=_.eq=function(t){return this.cmp(t)===0};_.floor=function(){return E(new this.constructor(this),this.e+1,3)};_.greaterThan=_.gt=function(t){return this.cmp(t)>0};_.greaterThanOrEqualTo=_.gte=function(t){var e=this.cmp(t);return e==1||e===0};_.hyperbolicCosine=_.cosh=function(){var t,e,r,n,a,i=this,s=i.constructor,o=new s(1);if(!i.isFinite())return new s(i.s?1/0:NaN);if(i.isZero())return o;r=s.precision,n=s.rounding,s.precision=r+Math.max(i.e,i.sd())+4,s.rounding=1,a=i.d.length,a<32?(t=Math.ceil(a/3),e=(1/Zr(4,t)).toString()):(t=16,e="2.3283064365386962890625e-10"),i=Dt(s,1,i.times(e),new s(1),!0);for(var u,l=t,c=new s(8);l--;)u=i.times(i),i=o.minus(u.times(c.minus(u.times(c))));return E(i,s.precision=r,s.rounding=n,!0)};_.hyperbolicSine=_.sinh=function(){var t,e,r,n,a=this,i=a.constructor;if(!a.isFinite()||a.isZero())return new i(a);if(e=i.precision,r=i.rounding,i.precision=e+Math.max(a.e,a.sd())+4,i.rounding=1,n=a.d.length,n<3)a=Dt(i,2,a,a,!0);else{t=1.4*Math.sqrt(n),t=t>16?16:t|0,a=a.times(1/Zr(5,t)),a=Dt(i,2,a,a,!0);for(var s,o=new i(5),u=new i(16),l=new i(20);t--;)s=a.times(a),a=a.times(o.plus(s.times(u.times(s).plus(l))))}return i.precision=e,i.rounding=r,E(a,e,r,!0)};_.hyperbolicTangent=_.tanh=function(){var t,e,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(t=n.precision,e=n.rounding,n.precision=t+7,n.rounding=1,U(r.sinh(),r.cosh(),n.precision=t,n.rounding=e)):new n(r.s)};_.inverseCosine=_.acos=function(){var t=this,e=t.constructor,r=t.abs().cmp(1),n=e.precision,a=e.rounding;return r!==-1?r===0?t.isNeg()?Ce(e,n,a):new e(0):new e(NaN):t.isZero()?Ce(e,n+4,a).times(.5):(e.precision=n+6,e.rounding=1,t=new e(1).minus(t).div(t.plus(1)).sqrt().atan(),e.precision=n,e.rounding=a,t.times(2))};_.inverseHyperbolicCosine=_.acosh=function(){var t,e,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(t=n.precision,e=n.rounding,n.precision=t+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,T=!1,r=r.times(r).minus(1).sqrt().plus(r),T=!0,n.precision=t,n.rounding=e,r.ln()):new n(r)};_.inverseHyperbolicSine=_.asinh=function(){var t,e,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(t=n.precision,e=n.rounding,n.precision=t+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,T=!1,r=r.times(r).plus(1).sqrt().plus(r),T=!0,n.precision=t,n.rounding=e,r.ln())};_.inverseHyperbolicTangent=_.atanh=function(){var t,e,r,n,a=this,i=a.constructor;return a.isFinite()?a.e>=0?new i(a.abs().eq(1)?a.s/0:a.isZero()?a:NaN):(t=i.precision,e=i.rounding,n=a.sd(),Math.max(n,t)<2*-a.e-1?E(new i(a),t,e,!0):(i.precision=r=n-a.e,a=U(a.plus(1),new i(1).minus(a),r+t,1),i.precision=t+4,i.rounding=1,a=a.ln(),i.precision=t,i.rounding=e,a.times(.5))):new i(NaN)};_.inverseSine=_.asin=function(){var t,e,r,n,a=this,i=a.constructor;return a.isZero()?new i(a):(e=a.abs().cmp(1),r=i.precision,n=i.rounding,e!==-1?e===0?(t=Ce(i,r+4,n).times(.5),t.s=a.s,t):new i(NaN):(i.precision=r+6,i.rounding=1,a=a.div(new i(1).minus(a.times(a)).sqrt().plus(1)).atan(),i.precision=r,i.rounding=n,a.times(2)))};_.inverseTangent=_.atan=function(){var t,e,r,n,a,i,s,o,u,l=this,c=l.constructor,d=c.precision,f=c.rounding;if(l.isFinite()){if(l.isZero())return new c(l);if(l.abs().eq(1)&&d+4<=Hn)return s=Ce(c,d+4,f).times(.25),s.s=l.s,s}else{if(!l.s)return new c(NaN);if(d+4<=Hn)return s=Ce(c,d+4,f).times(.5),s.s=l.s,s}for(c.precision=o=d+10,c.rounding=1,r=Math.min(28,o/D+2|0),t=r;t;--t)l=l.div(l.times(l).plus(1).sqrt().plus(1));for(T=!1,e=Math.ceil(o/D),n=1,u=l.times(l),s=new c(l),a=l;t!==-1;)if(a=a.times(u),i=s.minus(a.div(n+=2)),a=a.times(u),s=i.plus(a.div(n+=2)),s.d[e]!==void 0)for(t=e;s.d[t]===i.d[t]&&t--;);return r&&(s=s.times(2<<r-1)),T=!0,E(s,c.precision=d,c.rounding=f,!0)};_.isFinite=function(){return!!this.d};_.isInteger=_.isInt=function(){return!!this.d&&le(this.e/D)>this.d.length-2};_.isNaN=function(){return!this.s};_.isNegative=_.isNeg=function(){return this.s<0};_.isPositive=_.isPos=function(){return this.s>0};_.isZero=function(){return!!this.d&&this.d[0]===0};_.lessThan=_.lt=function(t){return this.cmp(t)<0};_.lessThanOrEqualTo=_.lte=function(t){return this.cmp(t)<1};_.logarithm=_.log=function(t){var e,r,n,a,i,s,o,u,l=this,c=l.constructor,d=c.precision,f=c.rounding,p=5;if(t==null)t=new c(10),e=!0;else{if(t=new c(t),r=t.d,t.s<0||!r||!r[0]||t.eq(1))return new c(NaN);e=t.eq(10)}if(r=l.d,l.s<0||!r||!r[0]||l.eq(1))return new c(r&&!r[0]?-1/0:l.s!=1?NaN:r?0:1/0);if(e)if(r.length>1)i=!0;else{for(a=r[0];a%10===0;)a/=10;i=a!==1}if(T=!1,o=d+p,s=Ke(l,o),n=e?Gr(c,o+10):Ke(t,o),u=U(s,n,o,1),Kt(u.d,a=d,f))do if(o+=10,s=Ke(l,o),n=e?Gr(c,o+10):Ke(t,o),u=U(s,n,o,1),!i){+ie(u.d).slice(a+1,a+15)+1==1e14&&(u=E(u,d+1,0));break}while(Kt(u.d,a+=10,f));return T=!0,E(u,d,f)};_.minus=_.sub=function(t){var e,r,n,a,i,s,o,u,l,c,d,f,p=this,h=p.constructor;if(t=new h(t),!p.d||!t.d)return!p.s||!t.s?t=new h(NaN):p.d?t.s=-t.s:t=new h(t.d||p.s!==t.s?p:NaN),t;if(p.s!=t.s)return t.s=-t.s,p.plus(t);if(l=p.d,f=t.d,o=h.precision,u=h.rounding,!l[0]||!f[0]){if(f[0])t.s=-t.s;else if(l[0])t=new h(p);else return new h(u===3?-0:0);return T?E(t,o,u):t}if(r=le(t.e/D),c=le(p.e/D),l=l.slice(),i=c-r,i){for(d=i<0,d?(e=l,i=-i,s=f.length):(e=f,r=c,s=l.length),n=Math.max(Math.ceil(o/D),s)+2,i>n&&(i=n,e.length=1),e.reverse(),n=i;n--;)e.push(0);e.reverse()}else{for(n=l.length,s=f.length,d=n<s,d&&(s=n),n=0;n<s;n++)if(l[n]!=f[n]){d=l[n]<f[n];break}i=0}for(d&&(e=l,l=f,f=e,t.s=-t.s),s=l.length,n=f.length-s;n>0;--n)l[s++]=0;for(n=f.length;n>i;){if(l[--n]<f[n]){for(a=n;a&&l[--a]===0;)l[a]=Ee-1;--l[a],l[n]+=Ee}l[n]-=f[n]}for(;l[--s]===0;)l.pop();for(;l[0]===0;l.shift())--r;return l[0]?(t.d=l,t.e=Yr(l,r),T?E(t,o,u):t):new h(u===3?-0:0)};_.modulo=_.mod=function(t){var e,r=this,n=r.constructor;return t=new n(t),!r.d||!t.s||t.d&&!t.d[0]?new n(NaN):!t.d||r.d&&!r.d[0]?E(new n(r),n.precision,n.rounding):(T=!1,n.modulo==9?(e=U(r,t.abs(),0,3,1),e.s*=t.s):e=U(r,t,0,n.modulo,1),e=e.times(t),T=!0,r.minus(e))};_.naturalExponential=_.exp=function(){return Wn(this)};_.naturalLogarithm=_.ln=function(){return Ke(this)};_.negated=_.neg=function(){var t=new this.constructor(this);return t.s=-t.s,E(t)};_.plus=_.add=function(t){var e,r,n,a,i,s,o,u,l,c,d=this,f=d.constructor;if(t=new f(t),!d.d||!t.d)return!d.s||!t.s?t=new f(NaN):d.d||(t=new f(t.d||d.s===t.s?d:NaN)),t;if(d.s!=t.s)return t.s=-t.s,d.minus(t);if(l=d.d,c=t.d,o=f.precision,u=f.rounding,!l[0]||!c[0])return c[0]||(t=new f(d)),T?E(t,o,u):t;if(i=le(d.e/D),n=le(t.e/D),l=l.slice(),a=i-n,a){for(a<0?(r=l,a=-a,s=c.length):(r=c,n=i,s=l.length),i=Math.ceil(o/D),s=i>s?i+1:s+1,a>s&&(a=s,r.length=1),r.reverse();a--;)r.push(0);r.reverse()}for(s=l.length,a=c.length,s-a<0&&(a=s,r=c,c=l,l=r),e=0;a;)e=(l[--a]=l[a]+c[a]+e)/Ee|0,l[a]%=Ee;for(e&&(l.unshift(e),++n),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=Yr(l,n),T?E(t,o,u):t};_.precision=_.sd=function(t){var e,r=this;if(t!==void 0&&t!==!!t&&t!==1&&t!==0)throw Error(Qe+t);return r.d?(e=wi(r.d),t&&r.e+1>e&&(e=r.e+1)):e=NaN,e};_.round=function(){var t=this,e=t.constructor;return E(new e(t),t.e+1,e.rounding)};_.sine=_.sin=function(){var t,e,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(t=n.precision,e=n.rounding,n.precision=t+Math.max(r.e,r.sd())+D,n.rounding=1,r=ll(n,Ei(n,r)),n.precision=t,n.rounding=e,E($e>2?r.neg():r,t,e,!0)):new n(NaN)};_.squareRoot=_.sqrt=function(){var t,e,r,n,a,i,s=this,o=s.d,u=s.e,l=s.s,c=s.constructor;if(l!==1||!o||!o[0])return new c(!l||l<0&&(!o||o[0])?NaN:o?s:1/0);for(T=!1,l=Math.sqrt(+s),l==0||l==1/0?(e=ie(o),(e.length+u)%2==0&&(e+="0"),l=Math.sqrt(e),u=le((u+1)/2)-(u<0||u%2),l==1/0?e="5e"+u:(e=l.toExponential(),e=e.slice(0,e.indexOf("e")+1)+u),n=new c(e)):n=new c(l.toString()),r=(u=c.precision)+3;;)if(i=n,n=i.plus(U(s,i,r+2,1)).times(.5),ie(i.d).slice(0,r)===(e=ie(n.d)).slice(0,r))if(e=e.slice(r-3,r+1),e=="9999"||!a&&e=="4999"){if(!a&&(E(i,u+1,0),i.times(i).eq(s))){n=i;break}r+=4,a=1}else{(!+e||!+e.slice(1)&&e.charAt(0)=="5")&&(E(n,u+1,1),t=!n.times(n).eq(s));break}return T=!0,E(n,u,c.rounding,t)};_.tangent=_.tan=function(){var t,e,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(t=n.precision,e=n.rounding,n.precision=t+10,n.rounding=1,r=r.sin(),r.s=1,r=U(r,new n(1).minus(r.times(r)).sqrt(),t+10,0),n.precision=t,n.rounding=e,E($e==2||$e==4?r.neg():r,t,e,!0)):new n(NaN)};_.times=_.mul=function(t){var e,r,n,a,i,s,o,u,l,c=this,d=c.constructor,f=c.d,p=(t=new d(t)).d;if(t.s*=c.s,!f||!f[0]||!p||!p[0])return new d(!t.s||f&&!f[0]&&!p||p&&!p[0]&&!f?NaN:!f||!p?t.s/0:t.s*0);for(r=le(c.e/D)+le(t.e/D),u=f.length,l=p.length,u<l&&(i=f,f=p,p=i,s=u,u=l,l=s),i=[],s=u+l,n=s;n--;)i.push(0);for(n=l;--n>=0;){for(e=0,a=u+n;a>n;)o=i[a]+p[n]*f[a-n-1]+e,i[a--]=o%Ee|0,e=o/Ee|0;i[a]=(i[a]+e)%Ee|0}for(;!i[--s];)i.pop();return e?++r:i.shift(),t.d=i,t.e=Yr(i,r),T?E(t,d.precision,d.rounding):t};_.toBinary=function(t,e){return Gn(this,2,t,e)};_.toDecimalPlaces=_.toDP=function(t,e){var r=this,n=r.constructor;return r=new n(r),t===void 0?r:(pe(t,0,et),e===void 0?e=n.rounding:pe(e,0,8),E(r,t+r.e+1,e))};_.toExponential=function(t,e){var r,n=this,a=n.constructor;return t===void 0?r=Ne(n,!0):(pe(t,0,et),e===void 0?e=a.rounding:pe(e,0,8),n=E(new a(n),t+1,e),r=Ne(n,!0,t+1)),n.isNeg()&&!n.isZero()?"-"+r:r};_.toFixed=function(t,e){var r,n,a=this,i=a.constructor;return t===void 0?r=Ne(a):(pe(t,0,et),e===void 0?e=i.rounding:pe(e,0,8),n=E(new i(a),t+a.e+1,e),r=Ne(n,!1,t+n.e+1)),a.isNeg()&&!a.isZero()?"-"+r:r};_.toFraction=function(t){var e,r,n,a,i,s,o,u,l,c,d,f,p=this,h=p.d,m=p.constructor;if(!h)return new m(p);if(l=r=new m(1),n=u=new m(0),e=new m(n),i=e.e=wi(h)-p.e-1,s=i%D,e.d[0]=J(10,s<0?D+s:s),t==null)t=i>0?e:l;else{if(o=new m(t),!o.isInt()||o.lt(l))throw Error(Qe+o);t=o.gt(e)?i>0?e:l:o}for(T=!1,o=new m(ie(h)),c=m.precision,m.precision=i=h.length*D*2;d=U(o,e,0,1,1),a=r.plus(d.times(n)),a.cmp(t)!=1;)r=n,n=a,a=l,l=u.plus(d.times(a)),u=a,a=e,e=o.minus(d.times(a)),o=a;return a=U(t.minus(r),n,0,1,1),u=u.plus(a.times(l)),r=r.plus(a.times(n)),u.s=l.s=p.s,f=U(l,n,i,1).minus(p).abs().cmp(U(u,r,i,1).minus(p).abs())<1?[l,n]:[u,r],m.precision=c,T=!0,f};_.toHexadecimal=_.toHex=function(t,e){return Gn(this,16,t,e)};_.toNearest=function(t,e){var r=this,n=r.constructor;if(r=new n(r),t==null){if(!r.d)return r;t=new n(1),e=n.rounding}else{if(t=new n(t),e===void 0?e=n.rounding:pe(e,0,8),!r.d)return t.s?r:t;if(!t.d)return t.s&&(t.s=r.s),t}return t.d[0]?(T=!1,r=U(r,t,0,e,1).times(t),T=!0,E(r)):(t.s=r.s,r=t),r};_.toNumber=function(){return+this};_.toOctal=function(t,e){return Gn(this,8,t,e)};_.toPower=_.pow=function(t){var e,r,n,a,i,s,o=this,u=o.constructor,l=+(t=new u(t));if(!o.d||!t.d||!o.d[0]||!t.d[0])return new u(J(+o,l));if(o=new u(o),o.eq(1))return o;if(n=u.precision,i=u.rounding,t.eq(1))return E(o,n,i);if(e=le(t.e/D),e>=t.d.length-1&&(r=l<0?-l:l)<=al)return a=yi(u,o,r,n),t.s<0?new u(1).div(a):E(a,n,i);if(s=o.s,s<0){if(e<t.d.length-1)return new u(NaN);if((t.d[e]&1)==0&&(s=1),o.e==0&&o.d[0]==1&&o.d.length==1)return o.s=s,o}return r=J(+o,l),e=r==0||!isFinite(r)?le(l*(Math.log("0."+ie(o.d))/Math.LN10+o.e+1)):new u(r+"").e,e>u.maxE+1||e<u.minE-1?new u(e>0?s/0:0):(T=!1,u.rounding=o.s=1,r=Math.min(12,(e+"").length),a=Wn(t.times(Ke(o,n+r)),n),a.d&&(a=E(a,n+5,1),Kt(a.d,n,i)&&(e=n+10,a=E(Wn(t.times(Ke(o,e+r)),e),e+5,1),+ie(a.d).slice(n+1,n+15)+1==1e14&&(a=E(a,n+1,0)))),a.s=s,T=!0,u.rounding=i,E(a,n,i))};_.toPrecision=function(t,e){var r,n=this,a=n.constructor;return t===void 0?r=Ne(n,n.e<=a.toExpNeg||n.e>=a.toExpPos):(pe(t,1,et),e===void 0?e=a.rounding:pe(e,0,8),n=E(new a(n),t,e),r=Ne(n,t<=n.e||n.e<=a.toExpNeg,t)),n.isNeg()&&!n.isZero()?"-"+r:r};_.toSignificantDigits=_.toSD=function(t,e){var r=this,n=r.constructor;return t===void 0?(t=n.precision,e=n.rounding):(pe(t,1,et),e===void 0?e=n.rounding:pe(e,0,8)),E(new n(r),t,e)};_.toString=function(){var t=this,e=t.constructor,r=Ne(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()&&!t.isZero()?"-"+r:r};_.truncated=_.trunc=function(){return E(new this.constructor(this),this.e+1,1)};_.valueOf=_.toJSON=function(){var t=this,e=t.constructor,r=Ne(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()?"-"+r:r};function ie(t){var e,r,n,a=t.length-1,i="",s=t[0];if(a>0){for(i+=s,e=1;e<a;e++)n=t[e]+"",r=D-n.length,r&&(i+=Je(r)),i+=n;s=t[e],n=s+"",r=D-n.length,r&&(i+=Je(r))}else if(s===0)return"0";for(;s%10===0;)s/=10;return i+s}function pe(t,e,r){if(t!==~~t||t<e||t>r)throw Error(Qe+t)}function Kt(t,e,r,n){var a,i,s,o;for(i=t[0];i>=10;i/=10)--e;return--e<0?(e+=D,a=0):(a=Math.ceil((e+1)/D),e%=D),i=J(10,D-e),o=t[a]%i|0,n==null?e<3?(e==0?o=o/100|0:e==1&&(o=o/10|0),s=r<4&&o==99999||r>3&&o==49999||o==5e4||o==0):s=(r<4&&o+1==i||r>3&&o+1==i/2)&&(t[a+1]/i/100|0)==J(10,e-2)-1||(o==i/2||o==0)&&(t[a+1]/i/100|0)==0:e<4?(e==0?o=o/1e3|0:e==1?o=o/100|0:e==2&&(o=o/10|0),s=(n||r<4)&&o==9999||!n&&r>3&&o==4999):s=((n||r<4)&&o+1==i||!n&&r>3&&o+1==i/2)&&(t[a+1]/i/1e3|0)==J(10,e-3)-1,s}function Vr(t,e,r){for(var n,a=[0],i,s=0,o=t.length;s<o;){for(i=a.length;i--;)a[i]*=e;for(a[0]+=Vn.indexOf(t.charAt(s++)),n=0;n<a.length;n++)a[n]>r-1&&(a[n+1]===void 0&&(a[n+1]=0),a[n+1]+=a[n]/r|0,a[n]%=r)}return a.reverse()}function sl(t,e){var r,n,a;if(e.isZero())return e;n=e.d.length,n<32?(r=Math.ceil(n/3),a=(1/Zr(4,r)).toString()):(r=16,a="2.3283064365386962890625e-10"),t.precision+=r,e=Dt(t,1,e.times(a),new t(1));for(var i=r;i--;){var s=e.times(e);e=s.times(s).minus(s).times(8).plus(1)}return t.precision-=r,e}var U=(function(){function t(n,a,i){var s,o=0,u=n.length;for(n=n.slice();u--;)s=n[u]*a+o,n[u]=s%i|0,o=s/i|0;return o&&n.unshift(o),n}function e(n,a,i,s){var o,u;if(i!=s)u=i>s?1:-1;else for(o=u=0;o<i;o++)if(n[o]!=a[o]){u=n[o]>a[o]?1:-1;break}return u}function r(n,a,i,s){for(var o=0;i--;)n[i]-=o,o=n[i]<a[i]?1:0,n[i]=o*s+n[i]-a[i];for(;!n[0]&&n.length>1;)n.shift()}return function(n,a,i,s,o,u){var l,c,d,f,p,h,m,g,b,v,w,x,B,L,G,re,ne,Pe,Y,de,we=n.constructor,F=n.s==a.s?1:-1,X=n.d,S=a.d;if(!X||!X[0]||!S||!S[0])return new we(!n.s||!a.s||(X?S&&X[0]==S[0]:!S)?NaN:X&&X[0]==0||!S?F*0:F/0);for(u?(p=1,c=n.e-a.e):(u=Ee,p=D,c=le(n.e/p)-le(a.e/p)),Y=S.length,ne=X.length,b=new we(F),v=b.d=[],d=0;S[d]==(X[d]||0);d++);if(S[d]>(X[d]||0)&&c--,i==null?(L=i=we.precision,s=we.rounding):o?L=i+(n.e-a.e)+1:L=i,L<0)v.push(1),h=!0;else{if(L=L/p+2|0,d=0,Y==1){for(f=0,S=S[0],L++;(d<ne||f)&&L--;d++)G=f*u+(X[d]||0),v[d]=G/S|0,f=G%S|0;h=f||d<ne}else{for(f=u/(S[0]+1)|0,f>1&&(S=t(S,f,u),X=t(X,f,u),Y=S.length,ne=X.length),re=Y,w=X.slice(0,Y),x=w.length;x<Y;)w[x++]=0;de=S.slice(),de.unshift(0),Pe=S[0],S[1]>=u/2&&++Pe;do f=0,l=e(S,w,Y,x),l<0?(B=w[0],Y!=x&&(B=B*u+(w[1]||0)),f=B/Pe|0,f>1?(f>=u&&(f=u-1),m=t(S,f,u),g=m.length,x=w.length,l=e(m,w,g,x),l==1&&(f--,r(m,Y<g?de:S,g,u))):(f==0&&(l=f=1),m=S.slice()),g=m.length,g<x&&m.unshift(0),r(w,m,x,u),l==-1&&(x=w.length,l=e(S,w,Y,x),l<1&&(f++,r(w,Y<x?de:S,x,u))),x=w.length):l===0&&(f++,w=[0]),v[d++]=f,l&&w[0]?w[x++]=X[re]||0:(w=[X[re]],x=1);while((re++<ne||w[0]!==void 0)&&L--);h=w[0]!==void 0}v[0]||v.shift()}if(p==1)b.e=c,hi=h;else{for(d=1,f=v[0];f>=10;f/=10)d++;b.e=d+c*p-1,E(b,o?i+b.e+1:i,s,h)}return b}})();function E(t,e,r,n){var a,i,s,o,u,l,c,d,f,p=t.constructor;e:if(e!=null){if(d=t.d,!d)return t;for(a=1,o=d[0];o>=10;o/=10)a++;if(i=e-a,i<0)i+=D,s=e,c=d[f=0],u=c/J(10,a-s-1)%10|0;else if(f=Math.ceil((i+1)/D),o=d.length,f>=o)if(n){for(;o++<=f;)d.push(0);c=u=0,a=1,i%=D,s=i-D+1}else break e;else{for(c=o=d[f],a=1;o>=10;o/=10)a++;i%=D,s=i-D+a,u=s<0?0:c/J(10,a-s-1)%10|0}if(n=n||e<0||d[f+1]!==void 0||(s<0?c:c%J(10,a-s-1)),l=r<4?(u||n)&&(r==0||r==(t.s<0?3:2)):u>5||u==5&&(r==4||n||r==6&&(i>0?s>0?c/J(10,a-s):0:d[f-1])%10&1||r==(t.s<0?8:7)),e<1||!d[0])return d.length=0,l?(e-=t.e+1,d[0]=J(10,(D-e%D)%D),t.e=-e||0):d[0]=t.e=0,t;if(i==0?(d.length=f,o=1,f--):(d.length=f+1,o=J(10,D-i),d[f]=s>0?(c/J(10,a-s)%J(10,s)|0)*o:0),l)for(;;)if(f==0){for(i=1,s=d[0];s>=10;s/=10)i++;for(s=d[0]+=o,o=1;s>=10;s/=10)o++;i!=o&&(t.e++,d[0]==Ee&&(d[0]=1));break}else{if(d[f]+=o,d[f]!=Ee)break;d[f--]=0,o=1}for(i=d.length;d[--i]===0;)d.pop()}return T&&(t.e>p.maxE?(t.d=null,t.e=NaN):t.e<p.minE&&(t.e=0,t.d=[0])),t}function Ne(t,e,r){if(!t.isFinite())return ki(t);var n,a=t.e,i=ie(t.d),s=i.length;return e?(r&&(n=r-s)>0?i=i.charAt(0)+"."+i.slice(1)+Je(n):s>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(t.e<0?"e":"e+")+t.e):a<0?(i="0."+Je(-a-1)+i,r&&(n=r-s)>0&&(i+=Je(n))):a>=s?(i+=Je(a+1-s),r&&(n=r-a-1)>0&&(i=i+"."+Je(n))):((n=a+1)<s&&(i=i.slice(0,n)+"."+i.slice(n)),r&&(n=r-s)>0&&(a+1===s&&(i+="."),i+=Je(n))),i}function Yr(t,e){var r=t[0];for(e*=D;r>=10;r/=10)e++;return e}function Gr(t,e,r){if(e>il)throw T=!0,r&&(t.precision=r),Error(mi);return E(new t(Hr),e,1,!0)}function Ce(t,e,r){if(e>Hn)throw Error(mi);return E(new t(Wr),e,r,!0)}function wi(t){var e=t.length-1,r=e*D+1;if(e=t[e],e){for(;e%10==0;e/=10)r--;for(e=t[0];e>=10;e/=10)r++}return r}function Je(t){for(var e="";t--;)e+="0";return e}function yi(t,e,r,n){var a,i=new t(1),s=Math.ceil(n/D+4);for(T=!1;;){if(r%2&&(i=i.times(e),fi(i.d,s)&&(a=!0)),r=le(r/2),r===0){r=i.d.length-1,a&&i.d[r]===0&&++i.d[r];break}e=e.times(e),fi(e.d,s)}return T=!0,i}function di(t){return t.d[t.d.length-1]&1}function vi(t,e,r){for(var n,a,i=new t(e[0]),s=0;++s<e.length;){if(a=new t(e[s]),!a.s){i=a;break}n=i.cmp(a),(n===r||n===0&&i.s===r)&&(i=a)}return i}function Wn(t,e){var r,n,a,i,s,o,u,l=0,c=0,d=0,f=t.constructor,p=f.rounding,h=f.precision;if(!t.d||!t.d[0]||t.e>17)return new f(t.d?t.d[0]?t.s<0?0:1/0:1:t.s?t.s<0?0:t:NaN);for(e==null?(T=!1,u=h):u=e,o=new f(.03125);t.e>-2;)t=t.times(o),d+=5;for(n=Math.log(J(2,d))/Math.LN10*2+5|0,u+=n,r=i=s=new f(1),f.precision=u;;){if(i=E(i.times(t),u,1),r=r.times(++c),o=s.plus(U(i,r,u,1)),ie(o.d).slice(0,u)===ie(s.d).slice(0,u)){for(a=d;a--;)s=E(s.times(s),u,1);if(e==null)if(l<3&&Kt(s.d,u-n,p,l))f.precision=u+=10,r=i=o=new f(1),c=0,l++;else return E(s,f.precision=h,p,T=!0);else return f.precision=h,s}s=o}}function Ke(t,e){var r,n,a,i,s,o,u,l,c,d,f,p=1,h=10,m=t,g=m.d,b=m.constructor,v=b.rounding,w=b.precision;if(m.s<0||!g||!g[0]||!m.e&&g[0]==1&&g.length==1)return new b(g&&!g[0]?-1/0:m.s!=1?NaN:g?0:m);if(e==null?(T=!1,c=w):c=e,b.precision=c+=h,r=ie(g),n=r.charAt(0),Math.abs(i=m.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)m=m.times(t),r=ie(m.d),n=r.charAt(0),p++;i=m.e,n>1?(m=new b("0."+r),i++):m=new b(n+"."+r.slice(1))}else return l=Gr(b,c+2,w).times(i+""),m=Ke(new b(n+"."+r.slice(1)),c-h).plus(l),b.precision=w,e==null?E(m,w,v,T=!0):m;for(d=m,u=s=m=U(m.minus(1),m.plus(1),c,1),f=E(m.times(m),c,1),a=3;;){if(s=E(s.times(f),c,1),l=u.plus(U(s,new b(a),c,1)),ie(l.d).slice(0,c)===ie(u.d).slice(0,c))if(u=u.times(2),i!==0&&(u=u.plus(Gr(b,c+2,w).times(i+""))),u=U(u,new b(p),c,1),e==null)if(Kt(u.d,c-h,v,o))b.precision=c+=h,l=s=m=U(d.minus(1),d.plus(1),c,1),f=E(m.times(m),c,1),a=o=1;else return E(u,b.precision=w,v,T=!0);else return b.precision=w,u;u=l,a+=2}}function ki(t){return String(t.s*t.s/0)}function zr(t,e){var r,n,a;for((r=e.indexOf("."))>-1&&(e=e.replace(".","")),(n=e.search(/e/i))>0?(r<0&&(r=n),r+=+e.slice(n+1),e=e.substring(0,n)):r<0&&(r=e.length),n=0;e.charCodeAt(n)===48;n++);for(a=e.length;e.charCodeAt(a-1)===48;--a);if(e=e.slice(n,a),e){if(a-=n,t.e=r=r-n-1,t.d=[],n=(r+1)%D,r<0&&(n+=D),n<a){for(n&&t.d.push(+e.slice(0,n)),a-=D;n<a;)t.d.push(+e.slice(n,n+=D));e=e.slice(n),n=D-e.length}else n-=a;for(;n--;)e+="0";t.d.push(+e),T&&(t.e>t.constructor.maxE?(t.d=null,t.e=NaN):t.e<t.constructor.minE&&(t.e=0,t.d=[0]))}else t.e=0,t.d=[0];return t}function ol(t,e){var r,n,a,i,s,o,u,l,c;if(e.indexOf("_")>-1){if(e=e.replace(/(\d)_(?=\d)/g,"$1"),bi.test(e))return zr(t,e)}else if(e==="Infinity"||e==="NaN")return+e||(t.s=NaN),t.e=NaN,t.d=null,t;if(rl.test(e))r=16,e=e.toLowerCase();else if(tl.test(e))r=2;else if(nl.test(e))r=8;else throw Error(Qe+e);for(i=e.search(/p/i),i>0?(u=+e.slice(i+1),e=e.substring(2,i)):e=e.slice(2),i=e.indexOf("."),s=i>=0,n=t.constructor,s&&(e=e.replace(".",""),o=e.length,i=o-i,a=yi(n,new n(r),i,i*2)),l=Vr(e,r,Ee),c=l.length-1,i=c;l[i]===0;--i)l.pop();return i<0?new n(t.s*0):(t.e=Yr(l,c),t.d=l,T=!1,s&&(t=U(t,a,o*4)),u&&(t=t.times(Math.abs(u)<54?J(2,u):Qt.pow(2,u))),T=!0,t)}function ll(t,e){var r,n=e.d.length;if(n<3)return e.isZero()?e:Dt(t,2,e,e);r=1.4*Math.sqrt(n),r=r>16?16:r|0,e=e.times(1/Zr(5,r)),e=Dt(t,2,e,e);for(var a,i=new t(5),s=new t(16),o=new t(20);r--;)a=e.times(e),e=e.times(i.plus(a.times(s.times(a).minus(o))));return e}function Dt(t,e,r,n,a){var i,s,o,u,l=1,c=t.precision,d=Math.ceil(c/D);for(T=!1,u=r.times(r),o=new t(n);;){if(s=U(o.times(u),new t(e++*e++),c,1),o=a?n.plus(s):n.minus(s),n=U(s.times(u),new t(e++*e++),c,1),s=o.plus(n),s.d[d]!==void 0){for(i=d;s.d[i]===o.d[i]&&i--;);if(i==-1)break}i=o,o=n,n=s,s=i,l++}return T=!0,s.d.length=d+1,s}function Zr(t,e){for(var r=t;--e;)r*=t;return r}function Ei(t,e){var r,n=e.s<0,a=Ce(t,t.precision,1),i=a.times(.5);if(e=e.abs(),e.lte(i))return $e=n?4:1,e;if(r=e.divToInt(a),r.isZero())$e=n?3:2;else{if(e=e.minus(r.times(a)),e.lte(i))return $e=di(r)?n?2:3:n?4:1,e;$e=di(r)?n?1:4:n?3:2}return e.minus(a).abs()}function Gn(t,e,r,n){var a,i,s,o,u,l,c,d,f,p=t.constructor,h=r!==void 0;if(h?(pe(r,1,et),n===void 0?n=p.rounding:pe(n,0,8)):(r=p.precision,n=p.rounding),!t.isFinite())c=ki(t);else{for(c=Ne(t),s=c.indexOf("."),h?(a=2,e==16?r=r*4-3:e==8&&(r=r*3-2)):a=e,s>=0&&(c=c.replace(".",""),f=new p(1),f.e=c.length-s,f.d=Vr(Ne(f),10,a),f.e=f.d.length),d=Vr(c,10,a),i=u=d.length;d[--u]==0;)d.pop();if(!d[0])c=h?"0p+0":"0";else{if(s<0?i--:(t=new p(t),t.d=d,t.e=i,t=U(t,f,r,n,0,a),d=t.d,i=t.e,l=hi),s=d[r],o=a/2,l=l||d[r+1]!==void 0,l=n<4?(s!==void 0||l)&&(n===0||n===(t.s<0?3:2)):s>o||s===o&&(n===4||l||n===6&&d[r-1]&1||n===(t.s<0?8:7)),d.length=r,l)for(;++d[--r]>a-1;)d[r]=0,r||(++i,d.unshift(1));for(u=d.length;!d[u-1];--u);for(s=0,c="";s<u;s++)c+=Vn.charAt(d[s]);if(h){if(u>1)if(e==16||e==8){for(s=e==16?4:3,--u;u%s;u++)c+="0";for(d=Vr(c,a,e),u=d.length;!d[u-1];--u);for(s=1,c="1.";s<u;s++)c+=Vn.charAt(d[s])}else c=c.charAt(0)+"."+c.slice(1);c=c+(i<0?"p":"p+")+i}else if(i<0){for(;++i;)c="0"+c;c="0."+c}else if(++i>u)for(i-=u;i--;)c+="0";else i<u&&(c=c.slice(0,i)+"."+c.slice(i))}c=(e==16?"0x":e==2?"0b":e==8?"0o":"")+c}return t.s<0?"-"+c:c}function fi(t,e){if(t.length>e)return t.length=e,!0}function ul(t){return new this(t).abs()}function cl(t){return new this(t).acos()}function dl(t){return new this(t).acosh()}function fl(t,e){return new this(t).plus(e)}function pl(t){return new this(t).asin()}function hl(t){return new this(t).asinh()}function ml(t){return new this(t).atan()}function gl(t){return new this(t).atanh()}function _l(t,e){t=new this(t),e=new this(e);var r,n=this.precision,a=this.rounding,i=n+4;return!t.s||!e.s?r=new this(NaN):!t.d&&!e.d?(r=Ce(this,i,1).times(e.s>0?.25:.75),r.s=t.s):!e.d||t.isZero()?(r=e.s<0?Ce(this,n,a):new this(0),r.s=t.s):!t.d||e.isZero()?(r=Ce(this,i,1).times(.5),r.s=t.s):e.s<0?(this.precision=i,this.rounding=1,r=this.atan(U(t,e,i,1)),e=Ce(this,i,1),this.precision=n,this.rounding=a,r=t.s<0?r.minus(e):r.plus(e)):r=this.atan(U(t,e,i,1)),r}function bl(t){return new this(t).cbrt()}function wl(t){return E(t=new this(t),t.e+1,2)}function yl(t,e,r){return new this(t).clamp(e,r)}function vl(t){if(!t||typeof t!="object")throw Error(Xr+"Object expected");var e,r,n,a=t.defaults===!0,i=["precision",1,et,"rounding",0,8,"toExpNeg",-xt,0,"toExpPos",0,xt,"maxE",0,xt,"minE",-xt,0,"modulo",0,9];for(e=0;e<i.length;e+=3)if(r=i[e],a&&(this[r]=zn[r]),(n=t[r])!==void 0)if(le(n)===n&&n>=i[e+1]&&n<=i[e+2])this[r]=n;else throw Error(Qe+r+": "+n);if(r="crypto",a&&(this[r]=zn[r]),(n=t[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(gi);else this[r]=!1;else throw Error(Qe+r+": "+n);return this}function kl(t){return new this(t).cos()}function El(t){return new this(t).cosh()}function xi(t){var e,r,n;function a(i){var s,o,u,l=this;if(!(l instanceof a))return new a(i);if(l.constructor=a,pi(i)){l.s=i.s,T?!i.d||i.e>a.maxE?(l.e=NaN,l.d=null):i.e<a.minE?(l.e=0,l.d=[0]):(l.e=i.e,l.d=i.d.slice()):(l.e=i.e,l.d=i.d?i.d.slice():i.d);return}if(u=typeof i,u==="number"){if(i===0){l.s=1/i<0?-1:1,l.e=0,l.d=[0];return}if(i<0?(i=-i,l.s=-1):l.s=1,i===~~i&&i<1e7){for(s=0,o=i;o>=10;o/=10)s++;T?s>a.maxE?(l.e=NaN,l.d=null):s<a.minE?(l.e=0,l.d=[0]):(l.e=s,l.d=[i]):(l.e=s,l.d=[i]);return}if(i*0!==0){i||(l.s=NaN),l.e=NaN,l.d=null;return}return zr(l,i.toString())}if(u==="string")return(o=i.charCodeAt(0))===45?(i=i.slice(1),l.s=-1):(o===43&&(i=i.slice(1)),l.s=1),bi.test(i)?zr(l,i):ol(l,i);if(u==="bigint")return i<0?(i=-i,l.s=-1):l.s=1,zr(l,i.toString());throw Error(Qe+i)}if(a.prototype=_,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.EUCLID=9,a.config=a.set=vl,a.clone=xi,a.isDecimal=pi,a.abs=ul,a.acos=cl,a.acosh=dl,a.add=fl,a.asin=pl,a.asinh=hl,a.atan=ml,a.atanh=gl,a.atan2=_l,a.cbrt=bl,a.ceil=wl,a.clamp=yl,a.cos=kl,a.cosh=El,a.div=xl,a.exp=Dl,a.floor=Al,a.hypot=Tl,a.ln=Cl,a.log=Nl,a.log10=Ol,a.log2=Sl,a.max=Bl,a.min=Il,a.mod=Ml,a.mul=Rl,a.pow=Ll,a.random=Pl,a.round=$l,a.sign=Fl,a.sin=Ul,a.sinh=ql,a.sqrt=jl,a.sub=Vl,a.sum=zl,a.tan=Hl,a.tanh=Wl,a.trunc=Gl,t===void 0&&(t={}),t&&t.defaults!==!0)for(n=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],e=0;e<n.length;)t.hasOwnProperty(r=n[e++])||(t[r]=this[r]);return a.config(t),a}function xl(t,e){return new this(t).div(e)}function Dl(t){return new this(t).exp()}function Al(t){return E(t=new this(t),t.e+1,3)}function Tl(){var t,e,r=new this(0);for(T=!1,t=0;t<arguments.length;)if(e=new this(arguments[t++]),e.d)r.d&&(r=r.plus(e.times(e)));else{if(e.s)return T=!0,new this(1/0);r=e}return T=!0,r.sqrt()}function pi(t){return t instanceof Qt||t&&t.toStringTag===_i||!1}function Cl(t){return new this(t).ln()}function Nl(t,e){return new this(t).log(e)}function Sl(t){return new this(t).log(2)}function Ol(t){return new this(t).log(10)}function Bl(){return vi(this,arguments,-1)}function Il(){return vi(this,arguments,1)}function Ml(t,e){return new this(t).mod(e)}function Rl(t,e){return new this(t).mul(e)}function Ll(t,e){return new this(t).pow(e)}function Pl(t){var e,r,n,a,i=0,s=new this(1),o=[];if(t===void 0?t=this.precision:pe(t,1,et),n=Math.ceil(t/D),this.crypto)if(crypto.getRandomValues)for(e=crypto.getRandomValues(new Uint32Array(n));i<n;)a=e[i],a>=429e7?e[i]=crypto.getRandomValues(new Uint32Array(1))[0]:o[i++]=a%1e7;else if(crypto.randomBytes){for(e=crypto.randomBytes(n*=4);i<n;)a=e[i]+(e[i+1]<<8)+(e[i+2]<<16)+((e[i+3]&127)<<24),a>=214e7?crypto.randomBytes(4).copy(e,i):(o.push(a%1e7),i+=4);i=n/4}else throw Error(gi);else for(;i<n;)o[i++]=Math.random()*1e7|0;for(n=o[--i],t%=D,n&&t&&(a=J(10,D-t),o[i]=(n/a|0)*a);o[i]===0;i--)o.pop();if(i<0)r=0,o=[0];else{for(r=-1;o[0]===0;r-=D)o.shift();for(n=1,a=o[0];a>=10;a/=10)n++;n<D&&(r-=D-n)}return s.e=r,s.d=o,s}function $l(t){return E(t=new this(t),t.e+1,this.rounding)}function Fl(t){return t=new this(t),t.d?t.d[0]?t.s:0*t.s:t.s||NaN}function Ul(t){return new this(t).sin()}function ql(t){return new this(t).sinh()}function jl(t){return new this(t).sqrt()}function Vl(t,e){return new this(t).sub(e)}function zl(){var t=0,e=arguments,r=new this(e[t]);for(T=!1;r.s&&++t<e.length;)r=r.plus(e[t]);return T=!0,E(r,this.precision,this.rounding)}function Hl(t){return new this(t).tan()}function Wl(t){return new this(t).tanh()}function Gl(t){return E(t=new this(t),t.e+1,1)}_[Symbol.for("nodejs.util.inspect.custom")]=_.toString;_[Symbol.toStringTag]="Decimal";var Qt=_.constructor=xi(zn);Hr=new Qt(Hr);Wr=new Qt(Wr);var Di=Qt;var Xl=20,Yl=1,ct=1e6,Ai=1e6,Zl=-7,Jl=21,Kl=!1,er="[big.js] ",dt=er+"Invalid ",Jr=dt+"decimal places",Ql=dt+"rounding mode",Ti=er+"Division by zero",P={},Se=void 0,eu=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function Ci(){function t(e){var r=this;if(!(r instanceof t))return e===Se?Ci():new t(e);if(e instanceof t)r.s=e.s,r.e=e.e,r.c=e.c.slice();else{if(typeof e!="string"){if(t.strict===!0&&typeof e!="bigint")throw TypeError(dt+"value");e=e===0&&1/e<0?"-0":String(e)}tu(r,e)}r.constructor=t}return t.prototype=P,t.DP=Xl,t.RM=Yl,t.NE=Zl,t.PE=Jl,t.strict=Kl,t.roundDown=0,t.roundHalfUp=1,t.roundHalfEven=2,t.roundUp=3,t}function tu(t,e){var r,n,a;if(!eu.test(e))throw Error(dt+"number");for(t.s=e.charAt(0)=="-"?(e=e.slice(1),-1):1,(r=e.indexOf("."))>-1&&(e=e.replace(".","")),(n=e.search(/e/i))>0?(r<0&&(r=n),r+=+e.slice(n+1),e=e.substring(0,n)):r<0&&(r=e.length),a=e.length,n=0;n<a&&e.charAt(n)=="0";)++n;if(n==a)t.c=[t.e=0];else{for(;a>0&&e.charAt(--a)=="0";);for(t.e=r-n-1,t.c=[],r=0;n<=a;)t.c[r++]=+e.charAt(n++)}return t}function ft(t,e,r,n){var a=t.c;if(r===Se&&(r=t.constructor.RM),r!==0&&r!==1&&r!==2&&r!==3)throw Error(Ql);if(e<1)n=r===3&&(n||!!a[0])||e===0&&(r===1&&a[0]>=5||r===2&&(a[0]>5||a[0]===5&&(n||a[1]!==Se))),a.length=1,n?(t.e=t.e-e+1,a[0]=1):a[0]=t.e=0;else if(e<a.length){if(n=r===1&&a[e]>=5||r===2&&(a[e]>5||a[e]===5&&(n||a[e+1]!==Se||a[e-1]&1))||r===3&&(n||!!a[0]),a.length=e,n){for(;++a[--e]>9;)if(a[e]=0,e===0){++t.e,a.unshift(1);break}}for(e=a.length;!a[--e];)a.pop()}return t}function pt(t,e,r){var n=t.e,a=t.c.join(""),i=a.length;if(e)a=a.charAt(0)+(i>1?"."+a.slice(1):"")+(n<0?"e":"e+")+n;else if(n<0){for(;++n;)a="0"+a;a="0."+a}else if(n>0)if(++n>i)for(n-=i;n--;)a+="0";else n<i&&(a=a.slice(0,n)+"."+a.slice(n));else i>1&&(a=a.charAt(0)+"."+a.slice(1));return t.s<0&&r?"-"+a:a}P.abs=function(){var t=new this.constructor(this);return t.s=1,t};P.cmp=function(t){var e,r=this,n=r.c,a=(t=new r.constructor(t)).c,i=r.s,s=t.s,o=r.e,u=t.e;if(!n[0]||!a[0])return n[0]?i:a[0]?-s:0;if(i!=s)return i;if(e=i<0,o!=u)return o>u^e?1:-1;for(s=(o=n.length)<(u=a.length)?o:u,i=-1;++i<s;)if(n[i]!=a[i])return n[i]>a[i]^e?1:-1;return o==u?0:o>u^e?1:-1};P.div=function(t){var e=this,r=e.constructor,n=e.c,a=(t=new r(t)).c,i=e.s==t.s?1:-1,s=r.DP;if(s!==~~s||s<0||s>ct)throw Error(Jr);if(!a[0])throw Error(Ti);if(!n[0])return t.s=i,t.c=[t.e=0],t;var o,u,l,c,d,f=a.slice(),p=o=a.length,h=n.length,m=n.slice(0,o),g=m.length,b=t,v=b.c=[],w=0,x=s+(b.e=e.e-t.e)+1;for(b.s=i,i=x<0?0:x,f.unshift(0);g++<o;)m.push(0);do{for(l=0;l<10;l++){if(o!=(g=m.length))c=o>g?1:-1;else for(d=-1,c=0;++d<o;)if(a[d]!=m[d]){c=a[d]>m[d]?1:-1;break}if(c<0){for(u=g==o?a:f;g;){if(m[--g]<u[g]){for(d=g;d&&!m[--d];)m[d]=9;--m[d],m[g]+=10}m[g]-=u[g]}for(;!m[0];)m.shift()}else break}v[w++]=c?l:++l,m[0]&&c?m[g]=n[p]||0:m=[n[p]]}while((p++<h||m[0]!==Se)&&i--);return!v[0]&&w!=1&&(v.shift(),b.e--,x--),w>x&&ft(b,x,r.RM,m[0]!==Se),b};P.eq=function(t){return this.cmp(t)===0};P.gt=function(t){return this.cmp(t)>0};P.gte=function(t){return this.cmp(t)>-1};P.lt=function(t){return this.cmp(t)<0};P.lte=function(t){return this.cmp(t)<1};P.minus=P.sub=function(t){var e,r,n,a,i=this,s=i.constructor,o=i.s,u=(t=new s(t)).s;if(o!=u)return t.s=-u,i.plus(t);var l=i.c.slice(),c=i.e,d=t.c,f=t.e;if(!l[0]||!d[0])return d[0]?t.s=-u:l[0]?t=new s(i):t.s=1,t;if(o=c-f){for((a=o<0)?(o=-o,n=l):(f=c,n=d),n.reverse(),u=o;u--;)n.push(0);n.reverse()}else for(r=((a=l.length<d.length)?l:d).length,o=u=0;u<r;u++)if(l[u]!=d[u]){a=l[u]<d[u];break}if(a&&(n=l,l=d,d=n,t.s=-t.s),(u=(r=d.length)-(e=l.length))>0)for(;u--;)l[e++]=0;for(u=e;r>o;){if(l[--r]<d[r]){for(e=r;e&&!l[--e];)l[e]=9;--l[e],l[r]+=10}l[r]-=d[r]}for(;l[--u]===0;)l.pop();for(;l[0]===0;)l.shift(),--f;return l[0]||(t.s=1,l=[f=0]),t.c=l,t.e=f,t};P.mod=function(t){var e,r=this,n=r.constructor,a=r.s,i=(t=new n(t)).s;if(!t.c[0])throw Error(Ti);return r.s=t.s=1,e=t.cmp(r)==1,r.s=a,t.s=i,e?new n(r):(a=n.DP,i=n.RM,n.DP=n.RM=0,r=r.div(t),n.DP=a,n.RM=i,this.minus(r.times(t)))};P.neg=function(){var t=new this.constructor(this);return t.s=-t.s,t};P.plus=P.add=function(t){var e,r,n,a=this,i=a.constructor;if(t=new i(t),a.s!=t.s)return t.s=-t.s,a.minus(t);var s=a.e,o=a.c,u=t.e,l=t.c;if(!o[0]||!l[0])return l[0]||(o[0]?t=new i(a):t.s=a.s),t;if(o=o.slice(),e=s-u){for(e>0?(u=s,n=l):(e=-e,n=o),n.reverse();e--;)n.push(0);n.reverse()}for(o.length-l.length<0&&(n=l,l=o,o=n),e=l.length,r=0;e;o[e]%=10)r=(o[--e]=o[e]+l[e]+r)/10|0;for(r&&(o.unshift(r),++u),e=o.length;o[--e]===0;)o.pop();return t.c=o,t.e=u,t};P.pow=function(t){var e=this,r=new e.constructor("1"),n=r,a=t<0;if(t!==~~t||t<-Ai||t>Ai)throw Error(dt+"exponent");for(a&&(t=-t);t&1&&(n=n.times(e)),t>>=1,!!t;)e=e.times(e);return a?r.div(n):n};P.prec=function(t,e){if(t!==~~t||t<1||t>ct)throw Error(dt+"precision");return ft(new this.constructor(this),t,e)};P.round=function(t,e){if(t===Se)t=0;else if(t!==~~t||t<-ct||t>ct)throw Error(Jr);return ft(new this.constructor(this),t+this.e+1,e)};P.sqrt=function(){var t,e,r,n=this,a=n.constructor,i=n.s,s=n.e,o=new a("0.5");if(!n.c[0])return new a(n);if(i<0)throw Error(er+"No square root");i=Math.sqrt(+pt(n,!0,!0)),i===0||i===1/0?(e=n.c.join(""),e.length+s&1||(e+="0"),i=Math.sqrt(e),s=((s+1)/2|0)-(s<0||s&1),t=new a((i==1/0?"5e":(i=i.toExponential()).slice(0,i.indexOf("e")+1))+s)):t=new a(i+""),s=t.e+(a.DP+=4);do r=t,t=o.times(r.plus(n.div(r)));while(r.c.slice(0,s).join("")!==t.c.slice(0,s).join(""));return ft(t,(a.DP-=4)+t.e+1,a.RM)};P.times=P.mul=function(t){var e,r=this,n=r.constructor,a=r.c,i=(t=new n(t)).c,s=a.length,o=i.length,u=r.e,l=t.e;if(t.s=r.s==t.s?1:-1,!a[0]||!i[0])return t.c=[t.e=0],t;for(t.e=u+l,s<o&&(e=a,a=i,i=e,l=s,s=o,o=l),e=new Array(l=s+o);l--;)e[l]=0;for(u=o;u--;){for(o=0,l=s+u;l>u;)o=e[l]+i[u]*a[l-u-1]+o,e[l--]=o%10,o=o/10|0;e[l]=o}for(o?++t.e:e.shift(),u=e.length;!e[--u];)e.pop();return t.c=e,t};P.toExponential=function(t,e){var r=this,n=r.c[0];if(t!==Se){if(t!==~~t||t<0||t>ct)throw Error(Jr);for(r=ft(new r.constructor(r),++t,e);r.c.length<t;)r.c.push(0)}return pt(r,!0,!!n)};P.toFixed=function(t,e){var r=this,n=r.c[0];if(t!==Se){if(t!==~~t||t<0||t>ct)throw Error(Jr);for(r=ft(new r.constructor(r),t+r.e+1,e),t=t+r.e+1;r.c.length<t;)r.c.push(0)}return pt(r,!1,!!n)};P[Symbol.for("nodejs.util.inspect.custom")]=P.toJSON=P.toString=function(){var t=this,e=t.constructor;return pt(t,t.e<=e.NE||t.e>=e.PE,!!t.c[0])};P.toNumber=function(){var t=+pt(this,!0,!0);if(this.constructor.strict===!0&&!this.eq(t.toString()))throw Error(er+"Imprecise conversion");return t};P.toPrecision=function(t,e){var r=this,n=r.constructor,a=r.c[0];if(t!==Se){if(t!==~~t||t<1||t>ct)throw Error(dt+"precision");for(r=ft(new n(r),t,e);r.c.length<t;)r.c.push(0)}return pt(r,t<=r.e||r.e<=n.NE||r.e>=n.PE,!!a)};P.valueOf=function(){var t=this,e=t.constructor;if(e.strict===!0)throw Error(er+"valueOf disallowed");return pt(t,t.e<=e.NE||t.e>=e.PE,!0)};var ru=Ci(),Ni=ru;var aa={};ii(aa,{DecodeError:()=>ue,Decoder:()=>De,EXT_TIMESTAMP:()=>Yn,Encoder:()=>At,ExtData:()=>xe,ExtensionCodec:()=>tt,decode:()=>$i,decodeArrayStream:()=>qi,decodeAsync:()=>Ui,decodeMulti:()=>Fi,decodeMultiStream:()=>ji,decodeTimestampExtension:()=>ea,decodeTimestampToTimeSpec:()=>Qn,encode:()=>en,encodeDateToTimeSpec:()=>Jn,encodeTimeSpecToTimestamp:()=>Zn,encodeTimestampExtension:()=>Kn});function Si(t){let e=t.length,r=0,n=0;for(;n<e;){let a=t.charCodeAt(n++);if((a&4294967168)===0){r++;continue}else if((a&4294965248)===0)r+=2;else{if(a>=55296&&a<=56319&&n<e){let i=t.charCodeAt(n);(i&64512)===56320&&(++n,a=((a&1023)<<10)+(i&1023)+65536)}(a&4294901760)===0?r+=3:r+=4}}return r}function nu(t,e,r){let n=t.length,a=r,i=0;for(;i<n;){let s=t.charCodeAt(i++);if((s&4294967168)===0){e[a++]=s;continue}else if((s&4294965248)===0)e[a++]=s>>6&31|192;else{if(s>=55296&&s<=56319&&i<n){let o=t.charCodeAt(i);(o&64512)===56320&&(++i,s=((s&1023)<<10)+(o&1023)+65536)}(s&4294901760)===0?(e[a++]=s>>12&15|224,e[a++]=s>>6&63|128):(e[a++]=s>>18&7|240,e[a++]=s>>12&63|128,e[a++]=s>>6&63|128)}e[a++]=s&63|128}}var au=new TextEncoder,iu=50;function su(t,e,r){au.encodeInto(t,e.subarray(r))}function Oi(t,e,r){t.length>iu?su(t,e,r):nu(t,e,r)}var ou=4096;function Xn(t,e,r){let n=e,a=n+r,i=[],s="";for(;n<a;){let o=t[n++];if((o&128)===0)i.push(o);else if((o&224)===192){let u=t[n++]&63;i.push((o&31)<<6|u)}else if((o&240)===224){let u=t[n++]&63,l=t[n++]&63;i.push((o&31)<<12|u<<6|l)}else if((o&248)===240){let u=t[n++]&63,l=t[n++]&63,c=t[n++]&63,d=(o&7)<<18|u<<12|l<<6|c;d>65535&&(d-=65536,i.push(d>>>10&1023|55296),d=56320|d&1023),i.push(d)}else i.push(o);i.length>=ou&&(s+=String.fromCharCode(...i),i.length=0)}return i.length>0&&(s+=String.fromCharCode(...i)),s}var lu=new TextDecoder,uu=200;function cu(t,e,r){let n=t.subarray(e,e+r);return lu.decode(n)}function Bi(t,e,r){return r>uu?cu(t,e,r):Xn(t,e,r)}var xe=class{type;data;constructor(e,r){this.type=e,this.data=r}};var ue=class t extends Error{constructor(e){super(e);let r=Object.create(t.prototype);Object.setPrototypeOf(this,r),Object.defineProperty(this,"name",{configurable:!0,enumerable:!1,value:t.name})}};function Ii(t,e,r){let n=r/4294967296,a=r;t.setUint32(e,n),t.setUint32(e+4,a)}function Kr(t,e,r){let n=Math.floor(r/4294967296),a=r;t.setUint32(e,n),t.setUint32(e+4,a)}function Qr(t,e){let r=t.getInt32(e),n=t.getUint32(e+4);return r*4294967296+n}function Mi(t,e){let r=t.getUint32(e),n=t.getUint32(e+4);return r*4294967296+n}var Yn=-1,du=4294967296-1,fu=17179869184-1;function Zn({sec:t,nsec:e}){if(t>=0&&e>=0&&t<=fu)if(e===0&&t<=du){let r=new Uint8Array(4);return new DataView(r.buffer).setUint32(0,t),r}else{let r=t/4294967296,n=t&4294967295,a=new Uint8Array(8),i=new DataView(a.buffer);return i.setUint32(0,e<<2|r&3),i.setUint32(4,n),a}else{let r=new Uint8Array(12),n=new DataView(r.buffer);return n.setUint32(0,e),Kr(n,4,t),r}}function Jn(t){let e=t.getTime(),r=Math.floor(e/1e3),n=(e-r*1e3)*1e6,a=Math.floor(n/1e9);return{sec:r+a,nsec:n-a*1e9}}function Kn(t){if(t instanceof Date){let e=Jn(t);return Zn(e)}else return null}function Qn(t){let e=new DataView(t.buffer,t.byteOffset,t.byteLength);switch(t.byteLength){case 4:return{sec:e.getUint32(0),nsec:0};case 8:{let r=e.getUint32(0),n=e.getUint32(4),a=(r&3)*4294967296+n,i=r>>>2;return{sec:a,nsec:i}}case 12:{let r=Qr(e,4),n=e.getUint32(0);return{sec:r,nsec:n}}default:throw new ue(`Unrecognized data size for timestamp (expected 4, 8, or 12): ${t.length}`)}}function ea(t){let e=Qn(t);return new Date(e.sec*1e3+e.nsec/1e6)}var Ri={type:Yn,encode:Kn,decode:ea};var tt=class t{static defaultCodec=new t;__brand;builtInEncoders=[];builtInDecoders=[];encoders=[];decoders=[];constructor(){this.register(Ri)}register({type:e,encode:r,decode:n}){if(e>=0)this.encoders[e]=r,this.decoders[e]=n;else{let a=-1-e;this.builtInEncoders[a]=r,this.builtInDecoders[a]=n}}tryToEncode(e,r){for(let n=0;n<this.builtInEncoders.length;n++){let a=this.builtInEncoders[n];if(a!=null){let i=a(e,r);if(i!=null){let s=-1-n;return new xe(s,i)}}}for(let n=0;n<this.encoders.length;n++){let a=this.encoders[n];if(a!=null){let i=a(e,r);if(i!=null){let s=n;return new xe(s,i)}}}return e instanceof xe?e:null}decode(e,r,n){let a=r<0?this.builtInDecoders[-1-r]:this.decoders[r];return a?a(e,r,n):new xe(r,e)}};function pu(t){return t instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer}function tr(t){return t instanceof Uint8Array?t:ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):pu(t)?new Uint8Array(t):Uint8Array.from(t)}var hu=100,mu=2048,At=class t{extensionCodec;context;useBigInt64;maxDepth;initialBufferSize;sortKeys;forceFloat32;ignoreUndefined;forceIntegerToFloat;pos;view;bytes;entered=!1;constructor(e){this.extensionCodec=e?.extensionCodec??tt.defaultCodec,this.context=e?.context,this.useBigInt64=e?.useBigInt64??!1,this.maxDepth=e?.maxDepth??hu,this.initialBufferSize=e?.initialBufferSize??mu,this.sortKeys=e?.sortKeys??!1,this.forceFloat32=e?.forceFloat32??!1,this.ignoreUndefined=e?.ignoreUndefined??!1,this.forceIntegerToFloat=e?.forceIntegerToFloat??!1,this.pos=0,this.view=new DataView(new ArrayBuffer(this.initialBufferSize)),this.bytes=new Uint8Array(this.view.buffer)}clone(){return new t({extensionCodec:this.extensionCodec,context:this.context,useBigInt64:this.useBigInt64,maxDepth:this.maxDepth,initialBufferSize:this.initialBufferSize,sortKeys:this.sortKeys,forceFloat32:this.forceFloat32,ignoreUndefined:this.ignoreUndefined,forceIntegerToFloat:this.forceIntegerToFloat})}reinitializeState(){this.pos=0}encodeSharedRef(e){if(this.entered)return this.clone().encodeSharedRef(e);try{return this.entered=!0,this.reinitializeState(),this.doEncode(e,1),this.bytes.subarray(0,this.pos)}finally{this.entered=!1}}encode(e){if(this.entered)return this.clone().encode(e);try{return this.entered=!0,this.reinitializeState(),this.doEncode(e,1),this.bytes.slice(0,this.pos)}finally{this.entered=!1}}doEncode(e,r){if(r>this.maxDepth)throw new Error(`Too deep objects in depth ${r}`);e==null?this.encodeNil():typeof e=="boolean"?this.encodeBoolean(e):typeof e=="number"?this.forceIntegerToFloat?this.encodeNumberAsFloat(e):this.encodeNumber(e):typeof e=="string"?this.encodeString(e):this.useBigInt64&&typeof e=="bigint"?this.encodeBigInt64(e):this.encodeObject(e,r)}ensureBufferSizeToWrite(e){let r=this.pos+e;this.view.byteLength<r&&this.resizeBuffer(r*2)}resizeBuffer(e){let r=new ArrayBuffer(e),n=new Uint8Array(r),a=new DataView(r);n.set(this.bytes),this.view=a,this.bytes=n}encodeNil(){this.writeU8(192)}encodeBoolean(e){e===!1?this.writeU8(194):this.writeU8(195)}encodeNumber(e){!this.forceIntegerToFloat&&Number.isSafeInteger(e)?e>=0?e<128?this.writeU8(e):e<256?(this.writeU8(204),this.writeU8(e)):e<65536?(this.writeU8(205),this.writeU16(e)):e<4294967296?(this.writeU8(206),this.writeU32(e)):this.useBigInt64?this.encodeNumberAsFloat(e):(this.writeU8(207),this.writeU64(e)):e>=-32?this.writeU8(224|e+32):e>=-128?(this.writeU8(208),this.writeI8(e)):e>=-32768?(this.writeU8(209),this.writeI16(e)):e>=-2147483648?(this.writeU8(210),this.writeI32(e)):this.useBigInt64?this.encodeNumberAsFloat(e):(this.writeU8(211),this.writeI64(e)):this.encodeNumberAsFloat(e)}encodeNumberAsFloat(e){this.forceFloat32?(this.writeU8(202),this.writeF32(e)):(this.writeU8(203),this.writeF64(e))}encodeBigInt64(e){e>=BigInt(0)?(this.writeU8(207),this.writeBigUint64(e)):(this.writeU8(211),this.writeBigInt64(e))}writeStringHeader(e){if(e<32)this.writeU8(160+e);else if(e<256)this.writeU8(217),this.writeU8(e);else if(e<65536)this.writeU8(218),this.writeU16(e);else if(e<4294967296)this.writeU8(219),this.writeU32(e);else throw new Error(`Too long string: ${e} bytes in UTF-8`)}encodeString(e){let n=Si(e);this.ensureBufferSizeToWrite(5+n),this.writeStringHeader(n),Oi(e,this.bytes,this.pos),this.pos+=n}encodeObject(e,r){let n=this.extensionCodec.tryToEncode(e,this.context);if(n!=null)this.encodeExtension(n);else if(Array.isArray(e))this.encodeArray(e,r);else if(ArrayBuffer.isView(e))this.encodeBinary(e);else if(typeof e=="object")this.encodeMap(e,r);else throw new Error(`Unrecognized object: ${Object.prototype.toString.apply(e)}`)}encodeBinary(e){let r=e.byteLength;if(r<256)this.writeU8(196),this.writeU8(r);else if(r<65536)this.writeU8(197),this.writeU16(r);else if(r<4294967296)this.writeU8(198),this.writeU32(r);else throw new Error(`Too large binary: ${r}`);let n=tr(e);this.writeU8a(n)}encodeArray(e,r){let n=e.length;if(n<16)this.writeU8(144+n);else if(n<65536)this.writeU8(220),this.writeU16(n);else if(n<4294967296)this.writeU8(221),this.writeU32(n);else throw new Error(`Too large array: ${n}`);for(let a of e)this.doEncode(a,r+1)}countWithoutUndefined(e,r){let n=0;for(let a of r)e[a]!==void 0&&n++;return n}encodeMap(e,r){let n=Object.keys(e);this.sortKeys&&n.sort();let a=this.ignoreUndefined?this.countWithoutUndefined(e,n):n.length;if(a<16)this.writeU8(128+a);else if(a<65536)this.writeU8(222),this.writeU16(a);else if(a<4294967296)this.writeU8(223),this.writeU32(a);else throw new Error(`Too large map object: ${a}`);for(let i of n){let s=e[i];this.ignoreUndefined&&s===void 0||(this.encodeString(i),this.doEncode(s,r+1))}}encodeExtension(e){if(typeof e.data=="function"){let n=e.data(this.pos+6),a=n.length;if(a>=4294967296)throw new Error(`Too large extension object: ${a}`);this.writeU8(201),this.writeU32(a),this.writeI8(e.type),this.writeU8a(n);return}let r=e.data.length;if(r===1)this.writeU8(212);else if(r===2)this.writeU8(213);else if(r===4)this.writeU8(214);else if(r===8)this.writeU8(215);else if(r===16)this.writeU8(216);else if(r<256)this.writeU8(199),this.writeU8(r);else if(r<65536)this.writeU8(200),this.writeU16(r);else if(r<4294967296)this.writeU8(201),this.writeU32(r);else throw new Error(`Too large extension object: ${r}`);this.writeI8(e.type),this.writeU8a(e.data)}writeU8(e){this.ensureBufferSizeToWrite(1),this.view.setUint8(this.pos,e),this.pos++}writeU8a(e){let r=e.length;this.ensureBufferSizeToWrite(r),this.bytes.set(e,this.pos),this.pos+=r}writeI8(e){this.ensureBufferSizeToWrite(1),this.view.setInt8(this.pos,e),this.pos++}writeU16(e){this.ensureBufferSizeToWrite(2),this.view.setUint16(this.pos,e),this.pos+=2}writeI16(e){this.ensureBufferSizeToWrite(2),this.view.setInt16(this.pos,e),this.pos+=2}writeU32(e){this.ensureBufferSizeToWrite(4),this.view.setUint32(this.pos,e),this.pos+=4}writeI32(e){this.ensureBufferSizeToWrite(4),this.view.setInt32(this.pos,e),this.pos+=4}writeF32(e){this.ensureBufferSizeToWrite(4),this.view.setFloat32(this.pos,e),this.pos+=4}writeF64(e){this.ensureBufferSizeToWrite(8),this.view.setFloat64(this.pos,e),this.pos+=8}writeU64(e){this.ensureBufferSizeToWrite(8),Ii(this.view,this.pos,e),this.pos+=8}writeI64(e){this.ensureBufferSizeToWrite(8),Kr(this.view,this.pos,e),this.pos+=8}writeBigUint64(e){this.ensureBufferSizeToWrite(8),this.view.setBigUint64(this.pos,e),this.pos+=8}writeBigInt64(e){this.ensureBufferSizeToWrite(8),this.view.setBigInt64(this.pos,e),this.pos+=8}};function en(t,e){return new At(e).encodeSharedRef(t)}function tn(t){return`${t<0?"-":""}0x${Math.abs(t).toString(16).padStart(2,"0")}`}var gu=16,_u=16,rn=class{hit=0;miss=0;caches;maxKeyLength;maxLengthPerKey;constructor(e=gu,r=_u){this.maxKeyLength=e,this.maxLengthPerKey=r,this.caches=[];for(let n=0;n<this.maxKeyLength;n++)this.caches.push([])}canBeCached(e){return e>0&&e<=this.maxKeyLength}find(e,r,n){let a=this.caches[n-1];e:for(let i of a){let s=i.bytes;for(let o=0;o<n;o++)if(s[o]!==e[r+o])continue e;return i.str}return null}store(e,r){let n=this.caches[e.length-1],a={bytes:e,str:r};n.length>=this.maxLengthPerKey?n[Math.random()*n.length|0]=a:n.push(a)}decode(e,r,n){let a=this.find(e,r,n);if(a!=null)return this.hit++,a;this.miss++;let i=Xn(e,r,n),s=Uint8Array.prototype.slice.call(e,r,r+n);return this.store(s,i),i}};var ta="array",ar="map_key",Pi="map_value",bu=t=>{if(typeof t=="string"||typeof t=="number")return t;throw new ue("The type of key must be string or number but "+typeof t)},ra=class{stack=[];stackHeadPosition=-1;get length(){return this.stackHeadPosition+1}top(){return this.stack[this.stackHeadPosition]}pushArrayState(e){let r=this.getUninitializedStateFromPool();r.type=ta,r.position=0,r.size=e,r.array=new Array(e)}pushMapState(e){let r=this.getUninitializedStateFromPool();r.type=ar,r.readCount=0,r.size=e,r.map={}}getUninitializedStateFromPool(){if(this.stackHeadPosition++,this.stackHeadPosition===this.stack.length){let e={type:void 0,size:0,array:void 0,position:0,readCount:0,map:void 0,key:null};this.stack.push(e)}return this.stack[this.stackHeadPosition]}release(e){if(this.stack[this.stackHeadPosition]!==e)throw new Error("Invalid stack state. Released state is not on top of the stack.");if(e.type===ta){let n=e;n.size=0,n.array=void 0,n.position=0,n.type=void 0}if(e.type===ar||e.type===Pi){let n=e;n.size=0,n.map=void 0,n.readCount=0,n.type=void 0}this.stackHeadPosition--}reset(){this.stack.length=0,this.stackHeadPosition=-1}},nr=-1,na=new DataView(new ArrayBuffer(0)),wu=new Uint8Array(na.buffer);try{na.getInt8(0)}catch(t){if(!(t instanceof RangeError))throw new Error("This module is not supported in the current JavaScript engine because DataView does not throw RangeError on out-of-bounds access")}var Li=new RangeError("Insufficient data"),yu=new rn,De=class t{extensionCodec;context;useBigInt64;rawStrings;maxStrLength;maxBinLength;maxArrayLength;maxMapLength;maxExtLength;keyDecoder;mapKeyConverter;totalPos=0;pos=0;view=na;bytes=wu;headByte=nr;stack=new ra;entered=!1;constructor(e){this.extensionCodec=e?.extensionCodec??tt.defaultCodec,this.context=e?.context,this.useBigInt64=e?.useBigInt64??!1,this.rawStrings=e?.rawStrings??!1,this.maxStrLength=e?.maxStrLength??4294967295,this.maxBinLength=e?.maxBinLength??4294967295,this.maxArrayLength=e?.maxArrayLength??4294967295,this.maxMapLength=e?.maxMapLength??4294967295,this.maxExtLength=e?.maxExtLength??4294967295,this.keyDecoder=e?.keyDecoder!==void 0?e.keyDecoder:yu,this.mapKeyConverter=e?.mapKeyConverter??bu}clone(){return new t({extensionCodec:this.extensionCodec,context:this.context,useBigInt64:this.useBigInt64,rawStrings:this.rawStrings,maxStrLength:this.maxStrLength,maxBinLength:this.maxBinLength,maxArrayLength:this.maxArrayLength,maxMapLength:this.maxMapLength,maxExtLength:this.maxExtLength,keyDecoder:this.keyDecoder})}reinitializeState(){this.totalPos=0,this.headByte=nr,this.stack.reset()}setBuffer(e){let r=tr(e);this.bytes=r,this.view=new DataView(r.buffer,r.byteOffset,r.byteLength),this.pos=0}appendBuffer(e){if(this.headByte===nr&&!this.hasRemaining(1))this.setBuffer(e);else{let r=this.bytes.subarray(this.pos),n=tr(e),a=new Uint8Array(r.length+n.length);a.set(r),a.set(n,r.length),this.setBuffer(a)}}hasRemaining(e){return this.view.byteLength-this.pos>=e}createExtraByteError(e){let{view:r,pos:n}=this;return new RangeError(`Extra ${r.byteLength-n} of ${r.byteLength} byte(s) found at buffer[${e}]`)}decode(e){if(this.entered)return this.clone().decode(e);try{this.entered=!0,this.reinitializeState(),this.setBuffer(e);let r=this.doDecodeSync();if(this.hasRemaining(1))throw this.createExtraByteError(this.pos);return r}finally{this.entered=!1}}*decodeMulti(e){if(this.entered){yield*this.clone().decodeMulti(e);return}try{for(this.entered=!0,this.reinitializeState(),this.setBuffer(e);this.hasRemaining(1);)yield this.doDecodeSync()}finally{this.entered=!1}}async decodeAsync(e){if(this.entered)return this.clone().decodeAsync(e);try{this.entered=!0;let r=!1,n;for await(let o of e){if(r)throw this.entered=!1,this.createExtraByteError(this.totalPos);this.appendBuffer(o);try{n=this.doDecodeSync(),r=!0}catch(u){if(!(u instanceof RangeError))throw u}this.totalPos+=this.pos}if(r){if(this.hasRemaining(1))throw this.createExtraByteError(this.totalPos);return n}let{headByte:a,pos:i,totalPos:s}=this;throw new RangeError(`Insufficient data in parsing ${tn(a)} at ${s} (${i} in the current buffer)`)}finally{this.entered=!1}}decodeArrayStream(e){return this.decodeMultiAsync(e,!0)}decodeStream(e){return this.decodeMultiAsync(e,!1)}async*decodeMultiAsync(e,r){if(this.entered){yield*this.clone().decodeMultiAsync(e,r);return}try{this.entered=!0;let n=r,a=-1;for await(let i of e){if(r&&a===0)throw this.createExtraByteError(this.totalPos);this.appendBuffer(i),n&&(a=this.readArraySize(),n=!1,this.complete());try{for(;yield this.doDecodeSync(),--a!==0;);}catch(s){if(!(s instanceof RangeError))throw s}this.totalPos+=this.pos}}finally{this.entered=!1}}doDecodeSync(){e:for(;;){let e=this.readHeadByte(),r;if(e>=224)r=e-256;else if(e<192)if(e<128)r=e;else if(e<144){let a=e-128;if(a!==0){this.pushMapState(a),this.complete();continue e}else r={}}else if(e<160){let a=e-144;if(a!==0){this.pushArrayState(a),this.complete();continue e}else r=[]}else{let a=e-160;r=this.decodeString(a,0)}else if(e===192)r=null;else if(e===194)r=!1;else if(e===195)r=!0;else if(e===202)r=this.readF32();else if(e===203)r=this.readF64();else if(e===204)r=this.readU8();else if(e===205)r=this.readU16();else if(e===206)r=this.readU32();else if(e===207)this.useBigInt64?r=this.readU64AsBigInt():r=this.readU64();else if(e===208)r=this.readI8();else if(e===209)r=this.readI16();else if(e===210)r=this.readI32();else if(e===211)this.useBigInt64?r=this.readI64AsBigInt():r=this.readI64();else if(e===217){let a=this.lookU8();r=this.decodeString(a,1)}else if(e===218){let a=this.lookU16();r=this.decodeString(a,2)}else if(e===219){let a=this.lookU32();r=this.decodeString(a,4)}else if(e===220){let a=this.readU16();if(a!==0){this.pushArrayState(a),this.complete();continue e}else r=[]}else if(e===221){let a=this.readU32();if(a!==0){this.pushArrayState(a),this.complete();continue e}else r=[]}else if(e===222){let a=this.readU16();if(a!==0){this.pushMapState(a),this.complete();continue e}else r={}}else if(e===223){let a=this.readU32();if(a!==0){this.pushMapState(a),this.complete();continue e}else r={}}else if(e===196){let a=this.lookU8();r=this.decodeBinary(a,1)}else if(e===197){let a=this.lookU16();r=this.decodeBinary(a,2)}else if(e===198){let a=this.lookU32();r=this.decodeBinary(a,4)}else if(e===212)r=this.decodeExtension(1,0);else if(e===213)r=this.decodeExtension(2,0);else if(e===214)r=this.decodeExtension(4,0);else if(e===215)r=this.decodeExtension(8,0);else if(e===216)r=this.decodeExtension(16,0);else if(e===199){let a=this.lookU8();r=this.decodeExtension(a,1)}else if(e===200){let a=this.lookU16();r=this.decodeExtension(a,2)}else if(e===201){let a=this.lookU32();r=this.decodeExtension(a,4)}else throw new ue(`Unrecognized type byte: ${tn(e)}`);this.complete();let n=this.stack;for(;n.length>0;){let a=n.top();if(a.type===ta)if(a.array[a.position]=r,a.position++,a.position===a.size)r=a.array,n.release(a);else continue e;else if(a.type===ar){if(r==="__proto__")throw new ue("The key __proto__ is not allowed");a.key=this.mapKeyConverter(r),a.type=Pi;continue e}else if(a.map[a.key]=r,a.readCount++,a.readCount===a.size)r=a.map,n.release(a);else{a.key=null,a.type=ar;continue e}}return r}}readHeadByte(){return this.headByte===nr&&(this.headByte=this.readU8()),this.headByte}complete(){this.headByte=nr}readArraySize(){let e=this.readHeadByte();switch(e){case 220:return this.readU16();case 221:return this.readU32();default:{if(e<160)return e-144;throw new ue(`Unrecognized array type byte: ${tn(e)}`)}}}pushMapState(e){if(e>this.maxMapLength)throw new ue(`Max length exceeded: map length (${e}) > maxMapLengthLength (${this.maxMapLength})`);this.stack.pushMapState(e)}pushArrayState(e){if(e>this.maxArrayLength)throw new ue(`Max length exceeded: array length (${e}) > maxArrayLength (${this.maxArrayLength})`);this.stack.pushArrayState(e)}decodeString(e,r){return!this.rawStrings||this.stateIsMapKey()?this.decodeUtf8String(e,r):this.decodeBinary(e,r)}decodeUtf8String(e,r){if(e>this.maxStrLength)throw new ue(`Max length exceeded: UTF-8 byte length (${e}) > maxStrLength (${this.maxStrLength})`);if(this.bytes.byteLength<this.pos+r+e)throw Li;let n=this.pos+r,a;return this.stateIsMapKey()&&this.keyDecoder?.canBeCached(e)?a=this.keyDecoder.decode(this.bytes,n,e):a=Bi(this.bytes,n,e),this.pos+=r+e,a}stateIsMapKey(){return this.stack.length>0?this.stack.top().type===ar:!1}decodeBinary(e,r){if(e>this.maxBinLength)throw new ue(`Max length exceeded: bin length (${e}) > maxBinLength (${this.maxBinLength})`);if(!this.hasRemaining(e+r))throw Li;let n=this.pos+r,a=this.bytes.subarray(n,n+e);return this.pos+=r+e,a}decodeExtension(e,r){if(e>this.maxExtLength)throw new ue(`Max length exceeded: ext length (${e}) > maxExtLength (${this.maxExtLength})`);let n=this.view.getInt8(this.pos+r),a=this.decodeBinary(e,r+1);return this.extensionCodec.decode(a,n,this.context)}lookU8(){return this.view.getUint8(this.pos)}lookU16(){return this.view.getUint16(this.pos)}lookU32(){return this.view.getUint32(this.pos)}readU8(){let e=this.view.getUint8(this.pos);return this.pos++,e}readI8(){let e=this.view.getInt8(this.pos);return this.pos++,e}readU16(){let e=this.view.getUint16(this.pos);return this.pos+=2,e}readI16(){let e=this.view.getInt16(this.pos);return this.pos+=2,e}readU32(){let e=this.view.getUint32(this.pos);return this.pos+=4,e}readI32(){let e=this.view.getInt32(this.pos);return this.pos+=4,e}readU64(){let e=Mi(this.view,this.pos);return this.pos+=8,e}readI64(){let e=Qr(this.view,this.pos);return this.pos+=8,e}readU64AsBigInt(){let e=this.view.getBigUint64(this.pos);return this.pos+=8,e}readI64AsBigInt(){let e=this.view.getBigInt64(this.pos);return this.pos+=8,e}readF32(){let e=this.view.getFloat32(this.pos);return this.pos+=4,e}readF64(){let e=this.view.getFloat64(this.pos);return this.pos+=8,e}};function $i(t,e){return new De(e).decode(t)}function Fi(t,e){return new De(e).decodeMulti(t)}function vu(t){return t[Symbol.asyncIterator]!=null}async function*ku(t){let e=t.getReader();try{for(;;){let{done:r,value:n}=await e.read();if(r)return;yield n}}finally{e.releaseLock()}}function nn(t){return vu(t)?t:ku(t)}async function Ui(t,e){let r=nn(t);return new De(e).decodeAsync(r)}function qi(t,e){let r=nn(t);return new De(e).decodeArrayStream(r)}function ji(t,e){let r=nn(t);return new De(e).decodeStream(r)}var En=si(Aa(),1),Ta=Di,Ca=Ni,Me=aa,Gs=En.DOMParser,Xs=En.XMLSerializer;var Ys=Me!==null;function Zs(){if(!Ys)throw new Error("@msgpack/msgpack is required for MessagePack support. Install with: npm install @msgpack/msgpack")}var Js=vd();function vd(){if(!Ys)return null;let t=new TextEncoder,e=new TextDecoder,r=new Me.ExtensionCodec;return r.register({type:-1,encode:n=>{if(n instanceof Date){let a=Ht(n);if(a==="D"||a==="H")return null}return Me.encodeTimestampExtension(n)},decode:n=>Me.decodeTimestampExtension(n)}),r.register({type:1,encode:n=>Ae(n)?t.encode(n.toString()):null,decode:n=>xn(e.decode(n))}),r.register({type:2,encode:n=>{if(n instanceof Date&&Ht(n)==="D"){let a=n.getUTCFullYear(),i=String(n.getUTCMonth()+1).padStart(2,"0"),s=String(n.getUTCDate()).padStart(2,"0");return t.encode(`${a}-${i}-${s}`)}return null},decode:n=>new Date(e.decode(n)+"T00:00:00.000Z")}),r.register({type:3,encode:n=>{if(n instanceof Date&&Ht(n)==="H"){let a=String(n.getUTCHours()).padStart(2,"0"),i=String(n.getUTCMinutes()).padStart(2,"0"),s=String(n.getUTCSeconds()).padStart(2,"0"),o=String(n.getUTCMilliseconds()).padStart(3,"0");return t.encode(`${a}:${i}:${s}.${o}`)}return null},decode:n=>{let a=e.decode(n),i=a.indexOf("."),s=i>=0?a.substring(0,i):a,o=i>=0?a.substring(i+1):"0",[u,l,c]=s.split(":"),d=Math.round(+o.substring(0,3));return new Date(Date.UTC(1970,0,1,+u,+l,+c,d))}}),r.register({type:4,encode:n=>{let a=Na(n);if(a!==null){let[i,s]=a;return t.encode(`${i}:${s(n)}`)}return null},decode:n=>{let a=e.decode(n),i=a.indexOf(":"),s=a.slice(0,i),o=a.slice(i+1),u=lt[s];if(u!==void 0){let[,l]=u;return l(o)}return`${o}::${s}`}}),r}function Ks(t){return Zs(),Me.encode(t,{extensionCodec:Js})}function Qs(t){return Zs(),Me.decode(t,{extensionCodec:Js})}function An(t,e=!1){let r=Tn(t);if(r===null)return[!1,String(t)];let[n,a,i]=r;return i&&!e?[!1,String(t)]:[!0,`${a(t)}::${n}`]}function Sa(t){if(!t.includes("::"))return[!1,t];let e=t.lastIndexOf("::"),r=t.slice(0,e),n=t.slice(e+2),a=lt[n];if(a===void 0)return[!1,t];let[,i]=a;return[!0,i(r)]}function Dn(t,e,r){if(t!==null&&typeof t=="object"&&!Array.isArray(t)){let n={};for(let[a,i]of Object.entries(t))n[a]=Dn(i,e,r);return n}return Array.isArray(t)?t.map(n=>Dn(n,e,r)):r(t)?e(t):t}function Oa(t){let e=Tn(t);if(e!==null){let[r,n,a]=e;return a?[t,!1]:[`${n(t)}::${r}`,!0]}if(Array.isArray(t)){let r=!1;return[t.map(a=>{let[i,s]=Oa(a);return s&&(r=!0),i}),r]}if(t!==null&&typeof t=="object"){let r=!1,n={};for(let[a,i]of Object.entries(t)){let[s,o]=Oa(i);o&&(r=!0),n[a]=s}return[n,r]}return[t,!1]}function kd(t,e=!1){let[r,n]=An(t,e);if(r)return n;let[a,i]=Oa(t),s=JSON.stringify(a);return i?`${s}::JS`:s}function Ed(t){return JSON.stringify(t)}function xd(t){if(!Me)throw new Error("@msgpack/msgpack is required for MessagePack support");return Me.encode(t)}function be(t,e=null,{raw:r=!1,qs:n=!1,_forceSuffix:a=!1}={}){if(n)return`${to(t)}::QS`;if(r){if(e===null||e==="json")return Ed(t);if(e==="msgpack")return xd(t);throw e==="xml"?new Error("raw=true is not supported for XML transport"):new Error(`Unknown transport: ${e}`)}if(e===null||e==="json"){let i=kd(t,a);return e==="json"?`"${i}"`:i}else{if(e==="xml")return`<?xml version="1.0" ?><tytx_root>${eo(t)}</tytx_root>`;if(e==="msgpack")return Ks(t);throw new Error(`Unknown transport: ${e}`)}}var Wt,Ba;typeof window<"u"&&window.DOMParser?(Wt=window.DOMParser,Ba=window.XMLSerializer):(Wt=Gs,Ba=Xs);function ro(t){if(t===null||typeof t!="object"||Array.isArray(t))return!1;let e=Object.keys(t);if(e.length!==1)return!1;let r=t[e[0]];return r!==null&&typeof r=="object"&&"value"in r}function no(t,e,r){let n=t.createElement(e),a=r.attrs||{},i=r.value;for(let[s,o]of Object.entries(a))n.setAttribute(s,be(o,null,{_forceSuffix:!0}));if(Array.isArray(i))for(let s of i)if(ro(s)){let[o]=Object.keys(s),u=s[o],l=no(t,o,u);n.appendChild(l)}else{n.textContent=be(i);break}else n.textContent=be(i);return n}function eo(t){if(!Wt)throw new Error("XML support requires @xmldom/xmldom package in Node.js");if(ro(t)){let[e]=Object.keys(t),r=t[e],n=new Wt().parseFromString("<root/>","text/xml"),a=no(n,e,r);return new Ba().serializeToString(a)}else return be(t)}function Ia(t){let e={};for(let n=0;n<t.attributes.length;n++){let a=t.attributes[n];e[a.name]=ee(a.value)}let r=[];for(let n=0;n<t.childNodes.length;n++){let a=t.childNodes[n];a.nodeType===1&&r.push(a)}if(r.length>0)if(r.length===1){let n=r[0],a=Ia(n);return{attrs:e,value:{[n.tagName]:a}}}else{let n=[];for(let a of r){let i=Ia(a);n.push({[a.tagName]:i})}return{attrs:e,value:n}}return{attrs:e,value:ee(t.textContent)}}function ao(t){if(!Wt)throw new Error("XML support requires @xmldom/xmldom package in Node.js");let n=new Wt().parseFromString(t,"text/xml").documentElement;if(n.tagName==="tytx_root"){let i=null;for(let s=0;s<n.childNodes.length;s++)if(n.childNodes[s].nodeType===1){i=n.childNodes[s];break}if(!i)return ee(n.textContent);n=i}let a=Ia(n);return{[n.tagName]:a}}function Dd(t){return typeof t=="string"}function Ad(t){let[e,r]=Sa(t);if(e)return r;let n=t;n.endsWith("::JS")&&(n=n.slice(0,-4));let a;try{a=JSON.parse(n)}catch{return t}return Dn(a,Td,Dd)}function Td(t){return t.includes("::")?Sa(t)[1]:t}function Cd(t){let e=ao(t);return typeof e=="string"?ee(e):e}function Nd(t){return Qs(t)}function ee(t,e=null){if(t===null)return null;if(e===null||e==="json"){let r=t;return e==="json"&&t.startsWith('"')&&t.endsWith('"')&&(r=t.slice(1,-1)),Ad(r)}else{if(e==="xml")return Cd(t);if(e==="msgpack")return Nd(t);throw new Error(`Unknown transport: ${e}`)}}function to(t){if(Array.isArray(t))return t.map(e=>String(e)).join("&");if(t!==null&&typeof t=="object"){let e=[];for(let[r,n]of Object.entries(t)){let[a,i]=An(n,!0);a?e.push(`${r}=${i}`):e.push(`${r}=${n}`)}return e.join("&")}throw new TypeError(`toQs expects object or array, got ${typeof t}`)}function io(t){if(!t)return[];let e=t.split("&"),r=e.map(s=>s.includes("=")),n=r.every(Boolean),a=!r.some(Boolean);if(!n&&!a)throw new Error("QS format error: mixed items with and without '='");if(a)return e.map(s=>ee(s));let i={};for(let s of e){let o=s.indexOf("="),u=s.slice(0,o),l=s.slice(o+1);i[u]=ee(l)}return i}var oo=Ta||Ca||Number,Sd=Ta?"decimal.js":Ca?"big.js":"number";function xn(t){return new oo(t)}function Ae(t){return Sd==="number"?!1:t instanceof oo}function Ht(t){let e=t.getUTCFullYear()===1970&&t.getUTCMonth()===0&&t.getUTCDate()===1,r=t.getUTCHours()===0&&t.getUTCMinutes()===0&&t.getUTCSeconds()===0&&t.getUTCMilliseconds()===0;return e&&!r?"H":r&&!e?"D":"DHZ"}function Od(t){return t.toString()}function Bd(t){let e=t.getUTCFullYear(),r=String(t.getUTCMonth()+1).padStart(2,"0"),n=String(t.getUTCDate()).padStart(2,"0");return`${e}-${r}-${n}`}function Id(t){return t.toISOString()}function Md(t){let e=String(t.getUTCHours()).padStart(2,"0"),r=String(t.getUTCMinutes()).padStart(2,"0"),n=String(t.getUTCSeconds()).padStart(2,"0"),a=String(t.getUTCMilliseconds()).padStart(3,"0");return`${e}:${r}:${n}.${a}`}function Rd(t){return t?"true":"false"}function Ld(t){return t.toString()}function Pd(t){return t.toString()}function $d(t){let e="";for(let r=0;r<t.length;r+=32768)e+=String.fromCharCode.apply(null,t.subarray(r,r+32768));return btoa(e)}var Cn=[],Ma=new Map;function Na(t){if(t===null||typeof t!="object")return null;for(let e=Object.getPrototypeOf(t);e!==null;e=Object.getPrototypeOf(e))for(let[r,n,a,i]of Cn)if(r.prototype===e)return[n,a,i];return null}function Tn(t){if(t===null)return["NN",()=>"",!0];if(Ae(t))return["N",Od,!1];if(t instanceof Uint8Array)return["RAW",$d,!1];if(t instanceof Date){let e=Ht(t);return e==="D"?["D",Bd,!1]:e==="H"?["H",Md,!1]:["DHZ",Id,!1]}return typeof t=="boolean"?["B",Rd,!0]:typeof t=="number"?Number.isInteger(t)?["L",Ld,!0]:["R",Pd,!0]:Na(t)}function Fd(t){return xn(t)}function Ud(t){let[e,r,n]=t.split("-").map(Number);return new Date(Date.UTC(e,r-1,n,0,0,0,0))}function so(t){return new Date(t)}function qd(t){let[e,r,n]=t.split(":"),[a,i]=n.split(".");return new Date(Date.UTC(1970,0,1,Number(e),Number(r),Number(a),Number(i||0)))}function jd(t){return t.toLowerCase()==="true"}function Vd(t){return parseInt(t,10)}function zd(t){return parseFloat(t)}function Hd(t){return t}function Wd(t){return null}var Gd=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/;function Xd(t){if(!Gd.test(t))throw new Error(`RAW payload is not standard padded base64: '${t}'`);let e=atob(t),r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=e.charCodeAt(n);return r}function Yd(t){return io(t)}var Zd=/^[A-Z]+$/,lt={N:[Object,Fd],D:[Date,Ud],DH:[Date,so],DHZ:[Date,so],H:[Date,qd],L:[Number,Vd],R:[Number,zd],T:[String,Hd],B:[Boolean,jd],QS:[Object,Yd],NN:[null,Wd],RAW:[Uint8Array,Xd]};function xr(t){return Object.hasOwn(lt,t)?lt[t][0]:null}function Ra(t,e,r,n,a=!1){if(typeof e!="string"||!Zd.test(e))throw new Error(`TYTX suffix '${e}' is invalid: expected uppercase ASCII letters only`);let i=lt[e];if(i!==void 0&&i[0]!==t){let s=i[0]===null?"null":i[0].name;throw new Error(`TYTX suffix '${e}' is already registered for ${s}`)}Cn=Cn.filter(([s])=>s!==t),Cn.push([t,e,r,a]),lt[e]=[t,n]}function Dr(t,e){Ma.set(t,e)}function je(t){return Ma.has(t)?Ma.get(t):{}}var lo={network:{maxAttempts:3,delay:1,backoff:2,jitter:!0,on:["TypeError","NetworkError","AbortError"]},aggressive:{maxAttempts:5,delay:.5,backoff:2,jitter:!0,on:["Error"]},gentle:{maxAttempts:2,delay:2,backoff:1.5,jitter:!1,on:["TypeError","NetworkError"]}};function Kd(t){let e=t._retryPolicy;return e==null?null:typeof e=="string"?lo[e]||null:e}function Qd(t,e){return e.some(r=>r==="Error"?!0:t.name===r||t.constructor.name===r)}function ef(t){return new Promise(e=>setTimeout(e,t))}async function tf(t,e){if(!e)return t();let r=e.maxAttempts||3,n=e.delay||1,a=e.backoff||2,i=e.jitter!==!1,s=e.on||["Error"],o=null,u=n*1e3;for(let l=0;l<r;l++)try{let c=t();return c instanceof Promise?await c:c}catch(c){if(o=c,l<r-1&&Qd(c,s)){let d=u;i&&(d*=1+Math.random()*.1),await ef(d),u*=a}else throw c}throw o}var te=class t{static classKwargs={cacheTime:0,readOnly:!1,asBag:null,retryPolicy:null};static classArgs=[];static internalParams=new Set(["cacheTime","readOnly","asBag","retryPolicy"]);constructor(e={}){let n={...this.constructor.classKwargs,...e};for(let i of["interval","reactive"])if(Object.hasOwn(n,i))throw new TypeError(`Removed resolver option: ${i}. Schedule updates in the application; use reset() and read explicitly.`);this.cacheTime=n.cacheTime,this._readOnly=n.readOnly,this._asBag=n.asBag,this._retryPolicy=n.retryPolicy,this._kw={};let a=this.constructor.internalParams;for(let[i,s]of Object.entries(n))a.has(i)||(this._kw[i]=s);this._lastUpdate=null,this._node=null,this._lastEffectiveFingerprint=null,this._cachedValue=null,this.init()}init(){}setNode(e){e!==this._node&&!this.readOnly&&this._lastUpdate!==null&&this.reset(),this._node=e,this.onSetResolver(e)}onSetResolver(e){}get node(){return this._node}get cacheTime(){return this._cacheTime}set cacheTime(e){if(typeof e=="boolean")throw new TypeError("cacheTime must be numeric; use a negative value for infinite caching");this._cacheTime=e}get readOnly(){return this._readOnly}get expired(){return this._cacheTime<0?this._lastUpdate===null:this._cacheTime===0||this._lastUpdate===null?!0:(Date.now()-this._lastUpdate)/1e3>this._cacheTime}reset(...e){if(e.length)throw new TypeError("reset() takes no arguments. It invalidates the cache for the next explicit read.");this._lastUpdate=null,this._lastEffectiveFingerprint=null}get cachedValue(){return!this.readOnly&&this._node?this._node._value:this._cachedValue}set cachedValue(e){!this.readOnly&&this._node?this._node.setValue(e,!1):this._cachedValue=e}_computeEffectiveFingerprint(e){return JSON.stringify(Object.entries(e).sort())}_buildEffectiveKw(){let e={...this._kw};if(this._node&&this._node.attr)for(let r of Object.keys(this._kw))Object.hasOwn(this._node.attr,r)&&(e[r]=this._node.attr[r]);return e}resolve(e={}){let{static:r=!1,...n}=e;if(r)return this._node?this._node._value:this.cachedValue;let a=this._buildEffectiveKw();if(Object.keys(n).length>0)return this._load({...a,...n},s=>this._prepareValue(s));let i=this._computeEffectiveFingerprint(a);return i===this._lastEffectiveFingerprint&&!this.expired?this.cachedValue:(this._lastEffectiveFingerprint=i,this._load(a,s=>this._finalize(s)))}_load(e,r){let n=Kd(this),a=()=>this.load(e);if(n)return tf(a,n).then(r);let i=a();return i&&typeof i.then=="function"?i.then(r):r(i)}_finalize(e){return e=this._prepareValue(e),this._lastUpdate=Date.now(),(!this.readOnly||this.cacheTime!==0)&&(this.cachedValue=e),e}_prepareValue(e){let r;return this._asBag===!0?r=!0:this._asBag===!1?r=!1:r=!this._readOnly,r&&e!==null&&e!==void 0&&(e=this._convertToBag(e)),e}_convertToBag(e){let r=t._BagClass;if(!r||e&&typeof e._htraverse=="function")return e;if(typeof e=="string"){if(e=e.trim(),e.startsWith("<")&&r.fromXml)return r.fromXml(e);if((e.startsWith("{")||e.startsWith("["))&&r.fromTytx)return r.fromTytx(e)}return e}static registerBagClass(e){t._BagClass=e}load(e){return null}};te._BagClass=null;var Ar=class extends te{static classKwargs={cacheTime:0,readOnly:!1,asBag:!1,retryPolicy:null,callback:null};static classArgs=["callback"];static internalParams=new Set(["cacheTime","readOnly","asBag","retryPolicy","callback"]);constructor(e={}){typeof e=="function"&&(e={callback:e}),super(e),this._callback=e.callback||null}load(e){return this._callback?this._callback.call(this,e):null}};var Ve=class t{constructor(e,r,n=null,a=null,i=null,s=null,o=null,u=!0){this.label=r,this._value=null,this._attr={},this._parentBag=null,this._resolver=null,this._nodeSubscribers={},this._onChangedValue=null,this.nodeTag=s,this.xmlTag=o,this._compiled=null,this.parentBag=e,a&&this.setAttr(a,!1,!0,u),n!==null&&this.setValue(n,!1),i&&(this.resolver=i)}get parentBag(){return this._parentBag}set parentBag(e){e===null&&this._value?.parentNode===this&&this._value.setBackref(),this._parentBag=e,e?.backref&&this._value&&typeof this._value._htraverse=="function"&&this._value.setBackref(this,e)}get value(){return this.getValue()}set value(e){this.setValue(e)}getValue(e=!1,r=null,n={}){if(r!==null){let a=ee(`${r}::QS`);if(Array.isArray(a)){let i=a.length?a:Object.keys(this._attr),s=i.map(u=>{let l=this.getAttr(u);return!e&&l instanceof te?l.resolve():l}),o=u=>a.length===0?Object.fromEntries(i.map((l,c)=>[l,u[c]])):u.length===1?u[0]:u;return s.some(u=>u&&typeof u.then=="function")?Promise.all(s).then(o):o(s)}else{if(!this._resolver)throw new Error("Cannot use kwargs syntax without resolver");n={...n,...a}}}return this._resolver!==null?this._resolver.resolve({static:e,...n}):this._value}setValue(e,r=!0,n=null,a=null,i=!0,s=null,o=!1){e instanceof te?(this.resolver=e,e=null):e instanceof t&&(n=n||{},Object.assign(n,e._attr),e.resolver&&(this.resolver=e.resolver),e=e._value);let u=this._value;u!==e&&u?.parentNode===this&&u.setBackref(),this._value=e;let l=u!==this._value,c=r??!0,d=null;if(n!==null){let p={...this._attr};this.setAttr(n,!1,a,i);let h=this._buildAttrDiff(p,this._attr);d=Object.keys(h).length>0?h:null}r=c&&(l||d!==null);let f=d?l?"upd_value_attr":"upd_attrs":"upd_value";if(this._onChangedValue&&this._onChangedValue(this,e,u,c),r){let p=d!==null?{oldvalue:u,attrs_diff:d}:{oldvalue:u};for(let h of Object.values(this._nodeSubscribers))h({node:this,info:p,evt:f})}this._parentBag!==null&&this._parentBag.backref&&(e&&typeof e._htraverse=="function"&&e.setBackref(this,this._parentBag),r&&this._parentBag._onNodeChanged(this,[this.label],f,u,d,s,o))}replace(e){if(!(e instanceof t))throw new TypeError("BagNode.replace expects a BagNode");if(e===this)return this;let r=e.staticValue;r&&typeof r._htraverse=="function"&&(r=r.createChildBag().replace(r));let n=null;e.resolver&&(n=Object.create(Object.getPrototypeOf(e.resolver),Object.getOwnPropertyDescriptors(e.resolver)),n._node=null,n._kw={...e.resolver._kw});let a=this._value,i={...this._attr},s=this.resolver;s&&s._node===this&&(s._node=null),this.resolver=n,this.setValue(r,!1,{...e.attr},!1,!1,null);let o=this._buildAttrDiff(i,this._attr),u=Object.keys(o).length?o:null,l=a!==r||s!==n;if(l||u){let c=u?l?"upd_value_attr":"upd_attrs":"upd_value",d=u?{oldvalue:a,attrs_diff:u}:{oldvalue:a};for(let f of Object.values(this._nodeSubscribers))f({node:this,info:d,evt:c});this._parentBag!==null&&this._parentBag.backref&&this._parentBag._onNodeChanged(this,[this.label],c,a,u)}return this}get staticValue(){return this._value}set staticValue(e){this._value=e}get resolver(){return this._resolver}set resolver(e){this._resolver=e,e&&e.setNode&&e.setNode(this)}resetResolver(){if(!this._resolver)throw new Error("Cannot reset resolver: node has no resolver");this._resolver.reset(),this.setValue(null)}get attr(){return this._attr}getAttr(e=null,r=null){return e?e in this._attr?this._attr[e]:r:this._attr}_buildAttrDiff(e,r){let n={},a=new Set([...Object.keys(e),...Object.keys(r)]);for(let i of a){let s=i in e?e[i]:null,o=i in r?r[i]:null;s!==o&&(n[i]={old:s,new:o})}return n}setAttr(e=null,r=!0,n=!0,a=!0){let i=e||{},s=Object.keys(this._nodeSubscribers).length>0,u=r&&(s||this._parentBag!==null&&this._parentBag.backref)?{...this._attr}:null;if(n?Object.assign(this._attr,i):this._attr={...i},a)for(let l of Object.keys(this._attr))this._attr[l]===null&&delete this._attr[l];if(r&&u!==null){let l=this._buildAttrDiff(u,this._attr);if(Object.keys(l).length>0&&s)for(let c of Object.values(this._nodeSubscribers))c({node:this,info:{attrs_diff:l},evt:"upd_attrs"});if(Object.keys(l).length>0&&this._parentBag!==null&&this._parentBag.backref){let c=r===!0?"true":String(r);this._parentBag._onNodeChanged(this,[this.label],"upd_attrs",null,l,c)}}}delAttr(...e){for(let r of e)if(typeof r=="string"&&r.includes(","))for(let n of r.split(","))delete this._attr[n.trim()];else delete this._attr[r]}hasAttr(e,r=null){return e in this._attr?r!==null?this._attr[e]===r:!0:!1}getInheritedAttributes(){let e={};return this._parentBag&&this._parentBag.parentNode&&(e=this._parentBag.parentNode.getInheritedAttributes()),{...e,...this._attr}}subscribe(e,r){this._nodeSubscribers[e]=r}unsubscribe(e){delete this._nodeSubscribers[e]}get compiled(){return this._compiled||(this._compiled={}),this._compiled}get isBranch(){return this._value!=null&&typeof this._value._htraverse=="function"}get position(){return this._parentBag===null?null:this._parentBag._nodes.index(this.label)}get fullpath(){if(this._parentBag!==null){let e=this._parentBag.fullpath;return e?`${e}.${this.label}`:this.label}return null}get parentNode(){return this._parentBag?this._parentBag.parentNode:null}attributeOwnerNode(e,r=null){let n=this;if(r===null)for(;n&&!(e in n._attr);)n=n.parentNode;else for(;n&&n._attr[e]!==r;)n=n.parentNode;return n}asTuple(){return[this.label,this.value,this._attr,this._resolver||null]}isEqual(e){if(!(e instanceof t)||this.label!==e.label)return!1;let r=Object.keys(this._attr),n=Object.keys(e._attr);if(r.length!==n.length)return!1;for(let a of r)if(this._attr[a]!==e._attr[a])return!1;return this._resolver!==null?this._resolver===e._resolver:this._value&&typeof this._value.equalTo=="function"?this._value.equalTo(e._value):this._value&&typeof this._value.isEqual=="function"?this._value.isEqual(e._value):this._value===e._value}diff(e){if(this.label!==e.label)return`Other label: ${e.label}`;let r=Object.keys(this._attr),n=Object.keys(e._attr);return r.length!==n.length||r.some(a=>this._attr[a]!==e._attr[a])?`attributes self:${JSON.stringify(this._attr)} --- other:${JSON.stringify(e._attr)}`:this._value!==e._value?`value self:${this._value} --- other:${e._value}`:null}toJson(e=!0){let r=this.value;return r&&typeof r.toJson=="function"&&(r=r.toJson(e,!0)),{label:this.label,value:r,attr:this._attr}}toString(){return`BagNode : ${this.label}`}};var Tr=class t{constructor(){this._dict=Object.create(null),this._list=[],this._parentBag=null}index(e){if(e in this._dict)return this._list.findIndex(n=>n.label===e);let r=e.match(/^#(\d+)$/);if(r){let n=parseInt(r[1],10);return n<this._list.length?n:-1}if(r=e.match(/^#(\w*)=(.*)$/),r){let[,n,a]=r,i=a.includes("::")?ee(a):a;return n?this._list.findIndex(s=>s.getAttr(n)===i):this._list.findIndex(s=>s._value===i)}return-1}_parsePosition(e){let r=this._list.length;if(e==null||e===">")return r;if(typeof e=="number")return e<0&&(e=r+e),Math.max(0,Math.min(e,r));if(e==="<")return 0;if(e.startsWith("#")){let n=this._parseSharpIndex(e.slice(1),e);return Math.min(n,r)}if(e.startsWith("<")){let n=e.slice(1);if(n.startsWith("#")){let i=this._parseSharpIndex(n.slice(1),e);return Math.min(i,r)}let a=this.index(n);if(a<0)throw new Error(`Invalid node_position '${e}': label '${n}' not found`);return a}if(e.startsWith(">")){let n=e.slice(1);if(n.startsWith("#")){let i=this._parseSharpIndex(n.slice(1),e);return Math.min(i+1,r)}let a=this.index(n);if(a<0)throw new Error(`Invalid node_position '${e}': label '${n}' not found`);return a+1}throw new Error(`Invalid node_position '${e}': unrecognized syntax`)}_parseSharpIndex(e,r){if(!/^-?\d+$/.test(e))throw new Error(`Invalid node_position '${r}': '${e}' is not an integer`);let n=parseInt(e,10);if(n<0)throw new Error(`Invalid node_position '${r}': negative index not allowed in '#n' syntax`);return n}get(e){if(typeof e=="number")return e>=0&&e<this._list.length?this._list[e]:null;if(e.startsWith("#")){let r=this.index(e);return r>=0?this._list[r]:null}return this._dict[e]||null}set(e,r,n=">",a=null,i=null,s=null,o=!1,u=!0,l=null,c=!0,d=!1,f=null){let p=null;if(e.includes("?")&&([e,p]=e.split("?",2)),e==null||e.startsWith("#"))throw new Error("Cannot create new node with #n syntax");if(p){let m=p.split("&");if(m.length===1)a={[m[0]]:r};else{if(!Array.isArray(r)||r.length!==m.length)throw new Error("Wrong attributes assignment");a={};for(let g=0;g<m.length;g++)a[m[g]]=r[g]}r=null}let h=this._dict[e];if(h)f&&(h.nodeTag=f),s!==null&&(s===!1?h.resolver=null:h.resolver=s),p?h.setAttr(a,c,!0,u):h.setValue(r,c,a,o,u,l,d);else{let m=i&&i.nodeClass?i.nodeClass:Ve;h=new m(i,e,p?null:r,a,s,f,null,u);let g=this._parsePosition(n);this._dict[e]=h,this._list.splice(g,0,h),c&&i&&i.backref&&i._onNodeInserted(h,g,null,l,d)}return d&&h.setValue(null,!1),h}pop(e){let r=this.get(e);if(r){delete this._dict[r.label];let n=this._list.indexOf(r);return n>=0&&this._list.splice(n,1),r}return null}has(e){return e in this._dict}get length(){return this._list.length}clear(){this._dict=Object.create(null),this._list=[]}keys(){return this._list.map(e=>e.label)}values(){return this._list.map(e=>e.getValue())}items(){return this._list.map(e=>[e.label,e.getValue()])}[Symbol.iterator](){return this._list[Symbol.iterator]()}move(e,r,n=!0){if(r<0)return;let a=Array.isArray(e)?e:[e];if(a.length===0||r>=this._list.length)return;let i=this._list[r].label;if(a.length>1){let s=[...a].sort((c,d)=>c-d),o=s[0]<r?1:0,u=[];for(let c=s.length-1;c>=0;c--){let d=s[c];if(d>=0&&d<this._list.length){let f=this._list[d];this._list.splice(d,1),u.push(f),n&&this._parentBag&&this._parentBag.backref&&this._parentBag._onNodeDeleted(f,d)}}let l=this.index(i);l<0&&(l=this._list.length),l+=o;for(let c of u)this._list.splice(l,0,c),n&&this._parentBag&&this._parentBag.backref&&this._parentBag._onNodeInserted(c,l)}else{let s=a[0];if(s===r||s<0||s>=this._list.length)return;let o=this._list[s];this._list.splice(s,1),n&&this._parentBag&&this._parentBag.backref&&this._parentBag._onNodeDeleted(o,s),this._list.splice(r,0,o),n&&this._parentBag&&this._parentBag.backref&&this._parentBag._onNodeInserted(o,r)}}isEqual(e){if(!(e instanceof t)||this._list.length!==e._list.length)return!1;for(let r=0;r<this._list.length;r++){let n=this._list[r],a=e._list[r];if(!n.isEqual(a))return!1}return!0}};var po=si(Aa(),1);var La="::RSLV:",rf=new Map,nf=new Map,Nn=new WeakMap,W=class extends Error{constructor(e){super(e),this.name="BagSerializationError"}},Cr=class extends te{constructor(e){super({asBag:!1}),Nn.set(this,e)}get payload(){return Nn.get(this)}load(){throw new W("This resolver is opaque; local execution is unavailable")}};function uo(t){if(!t||typeof t!="object"||Array.isArray(t)||typeof t.resolver_module!="string"||typeof t.resolver_class!="string"||!Array.isArray(t.args??[])||!t.kwargs||typeof t.kwargs!="object"||Array.isArray(t.kwargs))throw new W("Invalid resolver description")}function co(t,e=new Set){if(!(t===null||typeof t=="string"||typeof t=="boolean")&&!(typeof t=="number"&&Number.isFinite(t))){if(typeof t!="object"||e.has(t)||!Array.isArray(t)&&Object.getPrototypeOf(t)!==Object.prototype&&Object.getPrototypeOf(t)!==null)throw new W("Resolver parameters must be JSON data; callbacks cannot travel");e.add(t);for(let r of Object.values(t))co(r,e);e.delete(t)}}function Nr(t){if(Nn.has(t))return Nn.get(t);let e=nf.get(t.constructor);if(!e)throw new W(`Unregistered resolver: ${t.constructor.name}`);let r=e.encode(t),n={resolver_module:e.module,resolver_class:e.name,args:r.args??[],kwargs:r.kwargs??{}};return uo(n),co(n),La+JSON.stringify(n)}function Sn(t){if(typeof t!="string"||!t.startsWith(La))return null;let e=t.slice(La.length);if(/^[A-Za-z0-9_-]+\.[A-Za-z0-9_-]*\.[A-Za-z0-9_-]+$/.test(e))return new Cr(t);let r;try{r=JSON.parse(e)}catch{throw new W("Invalid resolver JSON or signed token")}uo(r);let n=rf.get(JSON.stringify([r.resolver_module,r.resolver_class]));if(!n)return new Cr(t);let a=n.decode({args:r.args??[],kwargs:r.kwargs});if(!(a instanceof n.cls))throw new W("Resolver decoder returned an incompatible instance");return a}function On(t){return Object.fromEntries(Object.entries(t||{}).map(([e,r])=>[e,r instanceof te?Nr(r):r]))}function Pa(t){return Object.fromEntries(Object.entries(t||{}).map(([e,r])=>[e,Sn(r)??r]))}var Te="__cls";function Gt(t,e){return t!==null&&t.tytxSuffix===e?t:xr(e)}function af(t){let e=t.tytxSuffix,r=Object.entries(je(e)).filter(([,n])=>n===t).map(([n])=>n);if(r.length===0)throw new W(`${t.name} is not in the TYTX subtype dictionary of '${e}'`);if(r.length>1)throw new W(`${t.name} is in the TYTX subtype dictionary of '${e}' under several names: ${r.sort().join(", ")}`);return r[0]}function $a(t,e){let r=je(t);if(!Object.hasOwn(r,e))throw new W(`Unknown Bag class '${e}' for TYTX type '${t}'`);return r[e]}function Fa(t,e){return t===e?null:af(t)}function*ho(t,e=[]){for(let r of t){let n=[...e,r.label];yield[n,r];let a=r.getValue(!0);!r.resolver&&a instanceof ae&&(yield*ho(a,n))}}function sf(t){let e=t.toISOString(),r=t.getUTCFullYear()===1970&&t.getUTCMonth()===0&&t.getUTCDate()===1,n=t.getUTCHours()===0&&t.getUTCMinutes()===0&&t.getUTCSeconds()===0&&t.getUTCMilliseconds()===0;if(n&&!r)return e.slice(0,e.indexOf("T"));let a=e.replace(/\.000Z$/,"Z");return r&&!n?a.slice(a.indexOf("T")+1):a}function Xt(t){if(t===null||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null}function ut(t){return typeof t=="string"?t.includes("::")?`${t}::T`:t:Array.isArray(t)?t.map(ut):Xt(t)?Object.fromEntries(Object.entries(t).map(([e,r])=>[e,ut(r)])):t}function Ua(t){if(!Xt(t))throw new TypeError("Bag options must be an object");let{recursive:e=!0}=t;if(typeof e!="boolean")throw new TypeError("recursive must be a boolean");return e}var fo=!1,ae=class t{static tytxSuffix="X";constructor(e=null,r={}){this._nodes=new Tr,this._backref=!1,this._parent=null,this._parentNode=null,this._rootAttributes=null,this._updSubscribers={},this._insSubscribers={},this._delSubscribers={},Ua(r),e!=null&&this.fillFrom(e,r)}get parent(){return this._parent}set parent(e){this._parent=e}get parentNode(){return this._parentNode}set parentNode(e){this._parentNode=e}get backref(){return!!this._backref}get nodeClass(){return Ve}createChildBag(){return new this.constructor}get fullpath(){if(this._parent!==null&&this._parentNode!==null){let e=this._parent.fullpath;return e?`${e}.${this._parentNode.label}`:this._parentNode.label}return null}relativePath(e){let r=[],n=e;for(;n!==null;){if(n.parentBag===this)return r.push(n.label),r.reverse(),r.join(".");r.push(n.label),n=n.parentNode}return null}get length(){return this._nodes.length}get root(){let e=this;for(;e.parent!==null;)e=e.parent;return e}get attributes(){return this._parentNode!==null?this._parentNode.getAttr():{}}get rootAttributes(){return this._rootAttributes}set rootAttributes(e){this._rootAttributes=e!==null?{...e}:null}_htraverseBefore(e){let r=this,n;for(typeof e=="string"?(e=e.replace(/\.\.\//g,"#parent."),n=e.split(".").filter(a=>a)):n=[...e];n.length&&n[0]==="#parent"&&r!==null;)n.shift(),r=r.parent;return[r,n]}_htraverse(e,r=!1,n=!0){let[a,i]=this._htraverseBefore(e);if(a===null)return[null,null];if(i.length===0)return[a,""];for(;i.length>1&&a instanceof t;){let s=i[0];if(s==="#parent"){if(a.parent===null||a.parent===void 0)break;i.shift(),a=a.parent;continue}let o=a._nodes.get(s);if(!o)break;let u=o.getValue(n);if(u instanceof t)i.shift(),a=u;else if(r){let l=a.createChildBag();o.setValue(l,!0,null,!0,!0,"autocreate"),i.shift(),a=l}else break}if(!r)return i.length>1?[null,null]:[a,i[0]];for(;i.length>1;){let s=i.shift();if(s.startsWith("#"))throw new Sr("Not existing index in #n syntax");let o=a.createChildBag();a._nodes.set(s,o,">",null,a,null,!1,!0,"autocreate"),a=o}return[a,i[0]]}get(e,r=null,n=!0,a={}){if(!e)return this;if(e==="#parent")return this.parent;let i=null;e.includes("?")&&([e,i]=e.split("?",2));let s=this._nodes.get(e);return s?s.getValue(n,i,a):r}getItem(e,r=null,n=!1,a={}){if(!e)return this;let[i,s]=this._htraverse(e,!1,n);return i instanceof t?i.get(s,r,n,a):r}setItem(e,r,n=null,a=">",i=!1,s=!0,o=null,u=!1,l=!0,c=null,d=null){if(e==="")throw new RangeError("setItem requires a non-empty path");let[f,p]=this._htraverse(e,!0);return f._nodes.set(p,r,a,n,f,c,i,s,o,l,u,d)}_pop(e,r=null){let n=this._nodes.index(e);if(n>=0){let a=this._nodes.pop(n);return this.backref&&this._onNodeDeleted(a,n,null,r),a}return null}pop(e,r=null,n=null){let a=this.popNode(e,n);return a?a.value:r}delItem(e,r=null,n=null){return this.pop(e,r,n)}popNode(e,r=null){let[n,a]=this._htraverse(e,!1,!0);if(!n||!a)return null;let i=n._nodes.get(a);if(!i)return null;try{return n._pop(a,r)}finally{i.parentBag===n&&n._nodes._dict[i.label]!==i&&(i.parentBag=null)}}clear(){let e=[...this._nodes];this._nodes.clear(),this.backref&&this._onNodeDeleted(e,-1);for(let r of e)r.parentBag=null}getNode(e,r=!0,n=!1,a=null){if(e==null||e==="")return this.parentNode;if(typeof e=="number")return this._nodes.get(e);typeof e=="string"&&(e=e.split("?",1)[0]);let[i,s]=this._htraverse(e,n,r);if(i instanceof t&&s){let o=i._nodes.get(s);if(o)return o;if(n)return i._nodes.set(s,a,">",null,i,null,!1,!0,"autocreate"),i._nodes.get(s)}return null}setBackref(e=null,r=null){let n=this._backref;if(this._backref=!0,this._parent=r,this._parentNode=e,!n){this._nodes._parentBag=this;for(let a of this)a.parentBag=this}}delParentRef(){this._parent=null,this._parentNode=null,this._backref=!1}clearBackref(){if(this._backref){this._backref=!1,this._parent=null,this._parentNode=null,this._nodes._parentBag=null;for(let e of this){e.parentBag=null;let r=e.getValue(!0);r instanceof t&&r.clearBackref()}}}_onNodeChanged(e,r,n,a=null,i=null,s=null,o=!1){for(let u of Object.values(this._updSubscribers))u({node:e,pathlist:r,oldvalue:a,attrs_diff:i,evt:n,reason:s,fired:o});this._parent&&this._parentNode&&this._parent._onNodeChanged(e,[this._parentNode.label,...r],n,a,i,s,o)}_onNodeInserted(e,r,n=null,a=null,i=!1){let s=e.parentBag,o=e.getValue(!0);s!==null&&s.backref&&o instanceof t&&o.setBackref(e,s),n===null&&(n=[]);for(let u of Object.values(this._insSubscribers))u({node:e,pathlist:n,ind:r,evt:"ins",reason:a,fired:i});this._parent&&this._parentNode&&this._parent._onNodeInserted(e,r,[this._parentNode.label,...n],a,i)}_onNodeDeleted(e,r,n=null,a=null){for(let i of Object.values(this._delSubscribers))i({node:e,pathlist:n,ind:r,evt:"del",reason:a});this._parent&&this._parentNode&&(n===null&&(n=[]),this._parent._onNodeDeleted(e,r,[this._parentNode.label,...n],a))}_subscribe(e,r,n){n!=null&&(r[e]=n)}subscribe(e,r={}){if(Object.hasOwn(r,"timer")||Object.hasOwn(r,"interval"))throw new TypeError("Timer subscriptions were removed. Schedule polling in the application.");let{update:n=null,insert:a=null,delete:i=null,any:s=null}=r;this.backref||this.setBackref(),this._subscribe(e,this._updSubscribers,n||s),this._subscribe(e,this._insSubscribers,a||s),this._subscribe(e,this._delSubscribers,i||s)}unsubscribe(e,r={}){if(Object.hasOwn(r,"timer")||Object.hasOwn(r,"interval"))throw new TypeError("Timer subscriptions were removed. Schedule polling in the application.");let{update:n=!1,insert:a=!1,delete:i=!1,any:s=!1}=r;(n||s)&&delete this._updSubscribers[e],(a||s)&&delete this._insSubscribers[e],(i||s)&&delete this._delSubscribers[e]}[Symbol.iterator](){return this._nodes[Symbol.iterator]()}keys(){return this._nodes.keys()}values(){return this._nodes.values()}items(){return[...this._nodes].map(e=>({key:e.label,value:e.getValue()}))}get nodes(){return this.getNodes()}node(e){return this._nodes.get(e)}setAttr(e=null,r=null,n=!0){let a=t.prototype.getNode.call(this,e,!0,!0);a&&a.setAttr(r,!0,!0,n)}getAttr(e=null,r=null,n=null){let a=this.getNode(e);return a?a.getAttr(r,n):n}delAttr(e=null,...r){let n=this.getNode(e);n&&n.delAttr(...r)}getInheritedAttributes(){return this._parentNode?this._parentNode.getInheritedAttributes():{}}getNodes(e=null){return e?[...this._nodes].filter(r=>e(r)):[...this._nodes]}getNodeByValue(e,r){for(let n of this._nodes){let a=n.value;if(a instanceof t){if(a.getItem(e)===r)return n}else if(a&&a.get&&a.get(e)===r)return n}return null}getNodeByAttr(e,r,n=!1,a=!1){let i=r===void 0,s=n&&typeof r=="string"?r.toLowerCase():r,o=u=>{let l=[];for(let c of u._nodes){if(e in c.attr){let d=n&&typeof c.attr[e]=="string"?c.attr[e].toLowerCase():c.attr[e];if(i||d==s)return c}if(c._value instanceof t)if(a){let d=o(c._value);if(d)return d}else l.push(c._value)}for(let c of l){let d=o(c);if(d)return d}return null};return o(this)}isEmpty(e=!1,r=!1){if(this._nodes.length===0)return!0;for(let n of this._nodes){if(n._resolver!==null)return!1;let a=n.getValue(!0);if(a!=null&&!(e&&a===0)&&!(r&&a===""))return!1}return!0}query(e=null,r=null,n=!1,a=!1,i=!0,s=!0,o=null,u=!0){e||(e="#k,#v,#a");let l=this,c;if(typeof e=="string"){if(e.includes(":")){let[p,h]=e.split(":");l=this.getItem(p),e=h}c=e.split(",").map(p=>p.trim())}else c=e;let d=(p,h,m,g,b)=>{if(h==="#k")return p.label;if(h==="#p")return m;if(h==="#n")return p;if(typeof h=="function")return h(p);if(h==="#v"){let v=b();return g&&v instanceof t?null:v}else if(h.startsWith("#v.")){let v=h.split(".").slice(1).join("."),w=b();return w&&w.getItem?w.getItem(v):null}else{if(h==="#__v")return p.getValue(!0);if(h.startsWith("#a")){let v=h.includes(".")?h.split(".").slice(1).join("."):null;return p.getAttr(v)}else{let v=b();return v&&v.getItem?v.getItem(h):null}}};function*f(){let p=0;function*h(m,g){for(let b of m._nodes){let v=g?`${g}.${b.label}`:b.label,w=!1,x,B=()=>(w||(x=b.getValue(u),w=!0),x);if((i&&s||(B()instanceof t?s:i))&&(r===null||r(b))&&(yield c.length===1?d(b,c[0],v,a,B):c.map(G=>d(b,G,v,a,B)),p++,o!==null&&p>=o))return;if(a){let G=B();if(G instanceof t&&(yield*h(G,v),o!==null&&p>=o))return}}}yield*h(l,"")}return n?f():[...f()]}getLeaves(){let e=[],r=(n,a)=>{for(let i of n._nodes){let s=a?`${a}.${i.label}`:i.label,o=i.getValue(!1);o instanceof t?r(o,s):e.push([s,o])}};return r(this,""),e}digest(e=null,r=null,n=!1){typeof r=="boolean"&&(console.warn("Bag.digest(what, asColumns) is deprecated; use digest(what, null, asColumns)."),n=r,r=null);let a=this.query(e,r,!1,!1,!0,!0,null,!1);if(n){if(!a||a.length===0)return(typeof e=="string"?e:"#k,#v,#a").split(",").map(u=>u.trim()).map(()=>[]);let i=[...a];if(i.length&&Array.isArray(i[0])){let s=i[0].length,o=[];for(let u=0;u<s;u++)o.push(i.map(l=>l[u]));return o}return[i]}return[...a]}columns(e,r=!1){typeof e=="string"&&(e=e.split(","));let n=r?"#a.":"",a=e.map(i=>`${n}${i}`).join(",");return this.digest(a,null,!0)}sum(e="#v",r=!1,n=null){if(r!=null&&typeof r!="boolean")throw new TypeError("sum strict must be a boolean; pass condition as the third argument");if(n!=null&&typeof n!="function")throw new TypeError("sum condition must be callable; deep is no longer supported");let a=i=>{let s=0,o=!1;for(let u of this.query(i,n)){if(u==null||u===""){o=!0;continue}if(typeof u!="number"&&typeof u!="boolean"){if(r)throw new TypeError(`sum encountered non-numeric value: ${typeof u}`);continue}s+=u}return r&&o?null:s};return e.includes(",")?e.split(",").map(i=>a(i.trim())):a(e)}sort(e="#k:a"){let r=(a,i)=>a==null?[-1,""]:i&&typeof a=="string"?[0,a.toLowerCase()]:[0,a],n=(a,i)=>a[0]!==i[0]?a[0]-i[0]:a[1]<i[1]?-1:a[1]>i[1]?1:0;if(typeof e=="function")this._nodes._list.sort((a,i)=>{let s=e(a),o=e(i);return s<o?-1:s>o?1:0});else{let a=e.split(",");a.reverse();for(let i of a){let s,o;i.includes(":")?[s,o]=i.split(":",2):(s=i,o="a"),s=s.trim(),o=o.trim();let u=o==="d"||o==="D",l=o==="a"||o==="d",c;if(s.toLowerCase()==="#k")c=d=>r(d.label,l);else if(s.toLowerCase()==="#v")c=d=>r(d.value,l);else if(s.toLowerCase().startsWith("#a.")){let d=s.slice(3);c=f=>r(f.getAttr(d),l)}else c=d=>{let f=d.value,p=f instanceof t?f.getItem(s):f?f[s]:null;return r(p,l)};this._nodes._list.sort((d,f)=>{let p=n(c(d),c(f));return u?-p:p})}}return this}equalTo(e){return e instanceof t?this._nodes.isEqual(e._nodes):!1}has(e){if(typeof e=="string"){let r=null;e.includes("?")&&([e,r]=e.split("?",2));let n=this.getNode(e);return n===null?!1:r===null?!0:r.split("&").every(a=>a in n.attr)}else if(e&&e.label!==void 0)return[...this._nodes].includes(e);return!1}getResolver(e){let r=this.getNode(e);return r?r.resolver:null}setResolver(e,r){let n=this.getNode(e);n||(this.setItem(e,null),n=this.getNode(e)),n.resolver=r}setCallbackItem(e,r,n={}){let a=new Ar({callback:r,...n});this.setResolver(e,a)}move(e,r,n=!0){this._nodes.move(e,r,n)}asDict(e=!1,r=!1,n=!1,a=!1){let i={};for(let s of this._nodes){let o=s.value;if(a&&o==null)continue;let u=s.label;e&&(u=String(u)),r&&(u=u.toLowerCase()),n&&o instanceof t&&(o=t.prototype.asDict.call(o,e,r,n,a)),Object.defineProperty(i,u,{value:o,enumerable:!0,writable:!0,configurable:!0})}return i}setdefault(e,r=null){let n=this.getNode(e);return n?n.value:(this.setItem(e,r),r)}deepcopy(e=!1){let r=this.createChildBag();for(let n of this._nodes){let a=n.getValue(!e);a instanceof t&&(a=a.deepcopy(e));let i=new r.nodeClass(r,n.label,a);i.setAttr({...n.attr},!1,!1,!1),i.nodeTag=n.nodeTag,i.xmlTag=n.xmlTag,r._nodes._list.push(i),r._nodes._dict[i.label]=i}return r}update(e,r=null,n=null,a=!1){if(!(e instanceof t)){for(let i in e){let s=e[i];(!a||s!==null||!this._nodes.has(i))&&this.setItem(i,s,null,">",!1,!1,n,!1,n!==!1)}return}for(let i of[...e]){let s=i.label,o=r==="static"?i.resolver:null,u=o?null:i.getValue(),l=i.attr.__replace;delete i.attr.__replace;let c=this._nodes.get(s);if(c)if(c.setAttr(i.attr,n===null?!0:n,!0,!1),i.nodeTag!=null&&(c.nodeTag=i.nodeTag),i.xmlTag!=null&&(c.xmlTag=i.xmlTag),o)c.resolver=o,c.setValue(null,n===null?!0:n,null,null,!1,n);else{i.resolver&&(c.resolver=null);let d=c.getValue();u instanceof t&&d instanceof t&&!l?d.update(u,r,n,a):(!a||u!==null)&&c.setValue(u,n===null?!0:n,null,null,!1,n)}else{let d=this.setItem(s,o||u,i.attr,">",!1,!1,n,!1,n!==!1);d.nodeTag=i.nodeTag,d.xmlTag=i.xmlTag}}}_fillFromBag(e){this.clear();for(let r of e){let n=new this.nodeClass(this,r.label);n.replace(r),n.nodeTag=r.nodeTag,n.xmlTag=r.xmlTag,this._nodes._list.push(n),this._nodes._dict[n.label]=n}}_appendLiteral(e,r,n=null,a=null,i=null){if(typeof e!="string")throw new TypeError("Bag labels must be strings");let s=new this.nodeClass(this,e,null,n,a,i,null,!1);return r instanceof te?s.resolver=r:s._value=r,this._nodes._dict[e]=s,this._nodes._list.push(s),s}fillFrom(e=null,r={}){let n=Ua(r);if(e!=null&&!Xt(e)&&!Array.isArray(e))throw new TypeError("Bag source must be a dictionary, array or null");let a=this.createChildBag(),i=new Set,s=(o,u,l)=>{if(i.has(u))throw new TypeError(`Cyclic Bag source at ${l}`);i.add(u);try{let c=Array.isArray(u)?String(u.length).length+1:0,d=Array.isArray(u)?Array.from(u,(f,p)=>[`r_${String(p).padStart(c,"0")}`,f]):Object.entries(u);if(!Array.isArray(u)&&Object.getOwnPropertySymbols(u).some(f=>Object.prototype.propertyIsEnumerable.call(u,f)))throw new TypeError(`Bag labels must be strings at ${l}`);for(let[f,p]of d){let h=p;n&&(Xt(h)||Array.isArray(h))&&(h=this.createChildBag(),s(h,p,`${l}[${JSON.stringify(f)}]`)),o._appendLiteral(f,h)}}finally{i.delete(u)}};return e!=null&&s(a,e,"$"),this._replacePrepared(a)}_loadSource(e,r={}){return this.fillFrom(e,r)}replace(e){if(!(e instanceof t))throw new TypeError("Bag.replace expects a Bag");if(e===this)return this;let r=this.createChildBag();return r._fillFromBag(e),this._replacePrepared(r)}_replacePrepared(e){for(let n of this._nodes){n.parentBag=null;let a=n.getValue(!0);a instanceof t&&a.clearBackref()}let r=this._nodes;this._nodes=e._nodes,e._nodes=r,this._nodes._parentBag=this.backref?this:null,e._nodes._parentBag=null;for(let n of this._nodes)n.parentBag=this;for(let n of e._nodes)n._parentBag=e;return this.backref&&this.parent&&this.parentNode&&this.parent._onNodeChanged(this.parentNode,[this.parentNode.label],"upd_value",e),this}forEach(e,{static:r=!0,deep:n=!1,kwargs:a={}}={}){if(typeof e!="function")throw new TypeError("forEach requires a callback");let i=(s,o)=>{for(let u=0;u<s._nodes.length;u++){let l=s._nodes._list[u],c={...o};"_pathlist"in o&&(c._pathlist=[...o._pathlist,l.label]),"_indexlist"in o&&(c._indexlist=[...o._indexlist,u]);let d=e(l,c,u);if(d)return d;if(d==null&&n){let f=l.getValue(r);if(f instanceof t){let p=i(f,c);if(p)return p}}}return null};return i(this,a)}*traverse(){for(let e of this._nodes){yield e;let r=e.getValue(!0);r instanceof t&&(yield*r.traverse())}}*_iterNodesWithPaths(e=!0,r=""){for(let n of this._nodes){let a=r?`${r}.${n.label}`:n.label;yield[a,n];let i=n.getValue(e);i instanceof t&&(yield*i._iterNodesWithPaths(e,a))}}*_nodeFlattener(e=null){let r=e!==null,n=r?Object.create(null):null,a=0,i=new Map([["[]",this.constructor]]);for(let[s,o]of ho(this)){let u=s.slice(0,-1),l=JSON.stringify(s),c=JSON.stringify(u),d=o.getValue(!0),f,p=null;if(o.resolver)f=Nr(o.resolver);else if(d instanceof t){let g=d.constructor,b=g.tytxSuffix;i.set(l,g),p=Fa(g,Gt(i.get(c),b)),f=`::${b}`}else d===null?f="::NN":f=ut(d);if(o.attr&&Object.hasOwn(o.attr,Te))throw new W(`node '${s}': the attribute '${Te}' is reserved for the Bag class name`);let h=On(ut(o.attr));p!==null&&(h[Te]=p);let m=o.nodeTag;r?(yield[u.length?n[c]:null,o.label,m,f,h],d instanceof t&&(n[l]=a,e[a]=s,a++)):yield[u,o.label,m,f,h]}}toTytx(e="json",r=!1){let n=this._toTytxPayload(r),a=this.constructor.tytxSuffix;if(e==="json")return`${n}::${a}`;if(e==="msgpack")return en(new xe(4,new TextEncoder().encode(`${a}:${n}`)));throw new TypeError(`Unsupported transport: ${e}`)}_toTytxPayload(e=!1){let r;if(e){let i={};r={rows:[...this._nodeFlattener(i)],paths:i}}else r={rows:[...this._nodeFlattener(null)]};let n=this.constructor,a=Fa(n,Gt(null,n.tytxSuffix));return a!==null&&(r[Te]=a),r.rows=r.rows.map(([i,s,o,u,l])=>[ut(i),ut(s),ut(o),u,l]),r.paths&&(r.paths=ut(r.paths)),be(r)}static fromTytx(e,r="json",n={}){if(Xt(r)&&(n=r,r="json"),Ua(n),typeof e!="string"&&!(e instanceof Uint8Array))throw new TypeError("fromTytx requires serialized text or bytes");if(r!=="json"&&r!=="msgpack")throw new TypeError(`Unsupported transport: ${r}`);r==="json"&&e instanceof Uint8Array&&(e=new TextDecoder().decode(e));let a=ee(e,r==="json"?null:r);if(a instanceof t)return a;if(!Xt(a)&&!Array.isArray(a))throw new TypeError("fromTytx requires a dictionary, array or typed Bag root");return new this(a,n)}static _fromTytxPayload(e){let r=this.tytxSuffix;if(e==="")return new(Gt(null,r));let n=ee(e);if(!n||!Array.isArray(n.rows))throw new W("Invalid TYTX Bag: expected rows");let a=n.paths,i=a!=null,s=Object.hasOwn(n,Te)?$a(r,n[Te]):Gt(null,r),o=new s,u=new Map([["[]",o]]);for(let l of n.rows){if(!Array.isArray(l)||l.length!==5)throw new W("Invalid TYTX Bag row");let[c,d,f,p,h]=l,m=c??"";if(i){if(c!==null&&!Object.hasOwn(a,c))throw new W(`Unknown TYTX parent reference: ${c}`);m=c===null?"":a[c]}if(typeof m=="string"&&(m=m?m.split("."):[]),!Array.isArray(m))throw new W("Invalid TYTX parent path");let g=JSON.stringify(m);if(!u.has(g))throw new W(`Missing or undecodable TYTX parent branch: ${m}`);let b=u.get(g),v=JSON.stringify([...m,d]),w=p,x=Sn(w),B=Pa(h),L=Object.hasOwn(B,Te)?B[Te]:null;if(delete B[Te],w instanceof t){let re=w.constructor.tytxSuffix,ne=L!==null?$a(re,L):Gt(b.constructor,re);w=new ne,u.set(v,w)}else if(L!==null)throw new W(`node '${v}': the attribute '${Te}' is reserved for the Bag class name of a branch`);let G=b._appendLiteral(d,x?null:w,B,x);G.nodeTag=f??null}return o}toXml(e={}){let{pretty:r=!1,encoding:n="UTF-8",docHeader:a=null,selfClosedTags:i=null}=e,s=this._bagToXml(i,r);return a===!0?s=`<?xml version='1.0' encoding='${n}'?>
|
|
29
30
|
${s}`:typeof a=="string"&&(s=`${a}
|
|
30
31
|
${s}`),s}_bagToXml(e=null,r=!1,n=0){let a=[];for(let i of this._nodes)a.push((r?" ".repeat(n):"")+this._nodeToXml(i,e,r,n));return a.join(r?`
|
|
31
32
|
`:"")}_nodeToXml(e,r=null,n=!1,a=0){let i=e.xmlTag||e.nodeTag||e.label,s=this._sanitizeTag(i),o=[];if(s!==i&&o.push(`_tag="${this._escapeAttr(i)}"`),e.resolver&&o.push(`_resolver="${this._escapeAttr(Nr(e.resolver))}"`),e.attr)for(let[f,p]of Object.entries(On(e.attr)))p!==null&&p!==!1&&p!==void 0&&o.push(`${f}="${this._escapeAttr(String(p))}"`);let u=o.length?" "+o.join(" "):"",l=e.resolver?null:e.getValue(!0);if(l&&typeof l._bagToXml=="function"){n=n&&e.attr?.["xml:space"]!=="preserve";let f=l._bagToXml(r,n,a+1);return f?n?`<${s}${u}>
|
|
32
33
|
${f}
|
|
33
|
-
${" ".repeat(a)}</${s}>`:`<${s}${u}>${f}</${s}>`:r===null||r.includes(s)?`<${s}${u}/>`:`<${s}${u}></${s}>`}if(l==null||l==="")return r===null||r.includes(s)?`<${s}${u}/>`:`<${s}${u}></${s}>`;let c=l instanceof Date&&!Number.isNaN(l.getTime())?sf(l):String(l),d=this._escapeXml(c);return`<${s}${u}>${d}</${s}>`}_sanitizeTag(e){return e?e.replace(/[^a-zA-Z0-9_\-.:]/g,"_"):"_none_"}_escapeXml(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}_escapeAttr(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}static fromXml(e,r={}){let{tagAttribute:n=null}=r,a;if(typeof DOMParser<"u"){a=new DOMParser().parseFromString(e,"application/xml");let s=a.querySelector("parsererror");if(s)throw new Error(`XML parse error: ${s.textContent}`)}else a=new
|
|
34
|
-
`)}toString(e=!0,r=null,n=""){r||(r=new Set);let a=[],i=[...this._nodes];for(let s=0;s<i.length;s++){let o=i[s],u=s===i.length-1,l=o.getValue(e),c="",d=o.attr;d&&Object.keys(d).length>0&&(c=` [${Object.entries(d).map(([m,
|
|
35
|
-
`)}},Sr=class extends Error{constructor(e){super(e),this.name="BagException"}};te.registerBagClass(ae);Ma(ae,"X",t=>t._toTytxPayload(),t=>ae._fromTytxPayload(t));Dr(ae.tytxSuffix,{...je(ae.tytxSuffix),Bag:ae});var ho=new Set(["False","None","True","and","as","assert","async","await","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","nonlocal","not","or","pass","raise","return","try","while","with","yield"]);function mo(t){return t.endsWith("_")&&ho.has(t.slice(0,-1))?t.slice(0,-1):t}function go(t){let e=mo(t);return e!==t?e:t.startsWith("_")&&ho.has(t.slice(1))?t.slice(1):t}function Ua(t,{renderTag:e=null,ns:r=null,dialectName:n=null}={}){let a=e||t;if(!a)return a;if(a=mo(a),r&&!e){let i=`${n}_`;a.startsWith(i)&&(a=a.slice(i.length)),a=`${r}:${a}`}return a}var Zt=Symbol("value"),bo=new Set(["_meta","datapath","nodeId","ns","form","formId","_anchor","updateOn"]);function wo(t){return Object.entries(t||{}).filter(([e])=>!bo.has(e)).map(([e,r])=>[go(e),r])}var Yt=class extends Ve{constructor(e,r,n=null,a=null,i=null,s=null,o=null){super(e,r,n,a,i,s,o),this._builder=e?._insertingBuilder??e?._builder??null,this._targetId=null}get builder(){if(this._builder)return this._builder;let e=this.parentBag;return e?e._builder:null}get data(){return this.builder.data}get rootBuilder(){return this.parentBag.root._builder}_getMeta(e){let r=this.getAttr("_meta")||{},n=e.split(",").map(a=>a.trim());return n.length===1?r[n[0]]!==void 0?r[n[0]]:null:n.map(a=>r[a]!==void 0?r[a]:null)}pointerType(e){return typeof e=="string"&&(e[0]==="^"||e[0]==="=")&&!e.startsWith("==")?e[0]:null}pointers(){this.builder.validateCustomTypes(this);let e=[];for(let[r,n]of Object.entries(this.getAttr()||{}))this.pointerType(n)==="^"&&e.push([r,n.split(":",1)[0]]);return this.pointerType(this.value)==="^"&&e.push(["",this.value.split(":",1)[0]]),e}fixedAttrItems(){return wo(this.getAttr())}runtimeToEvaluate(){let e=new Map(this.fixedAttrItems());return e.set(Zt,this.value),e}absDatapath(e){let r=e;this.pointerType(e)&&(e=(Ze(e)?.pointer??e).slice(1));let n=null;return e.includes("?")&&([e,n]=e.split("?",2)),e.startsWith("#")?this._finalizeAbsPath(this._resolveSymbolicDatapath(e,r),n):(e.startsWith(".")&&(e=this._composeRelativeDatapath(e,r)),this._finalizeAbsPath(e,n))}_finalizeAbsPath(e,r){return e=this._collapseParentDatapath(e,e),r?`${e}?${r}`:e}_composeRelativeDatapath(e,r){let n=this;for(;n!==null&&e.startsWith(".");){let a=n.getAttr("datapath");a!=null&&(e=e==="."?a:a+e),n=n.parentNode}if(e.startsWith("."))throw new Error(`unresolved relative datapath: ${r}`);return e}_collapseParentDatapath(e,r){let n=[];for(let a of e.split("."))if(a==="#parent"){if(n.length===0)throw new Error(`#parent has no segment to cancel: ${r}`);n.pop()}else n.push(a);return n.join(".")}_resolveSymbolicDatapath(e,r){let n=e.slice(1),a=n.indexOf("."),i=a===-1?n:n.slice(0,a),s=a===-1?"":n.slice(a+1),o;if(i==="FORM")o=this._findMarkedDatapathAncestor(!0,!1,r);else if(i==="ANCHOR")o=this._findMarkedDatapathAncestor(!1,!0,r);else{let u=this.rootBuilder;if(!u)throw new Error(`#<id>: cannot resolve ${r} on a node without builder`);if(o=u.source.getNodeByAttr("nodeId",i),o==null)throw new Error(`#<id>: cannot resolve ${r}`)}return o.absDatapath(s?`.${s}`:".")}_findMarkedDatapathAncestor(e,r,n){let a=this;for(;a!=null;){let s=a.getAttr()||{};if(e&&(s.formId!=null||s.form===!0)||r&&"_anchor"in s)return a;a=a.parentNode}let i=e?"FORM":"ANCHOR";throw new Error(`#${i}: no marked ancestor found for ${n}`)}getRelativeData(e,r=null,{autocreate:n=!1}={}){let a=this.data,i=this.absDatapath(e);return n&&a.getItem(i)==null&&a.setItem(i,r),a.getItem(i,r)}setRelativeData(e,r,{attributes:n=null,fired:a=!1,reason:i=null}={}){let s=this.data,o=this.absDatapath(e);s.setItem(o,r,n,">",!1,!0,i===null?!0:i,a)}fireEvent(e,r=!0,{attributes:n=null,reason:a=null}={}){this.setRelativeData(e,r,{attributes:n,fired:!0,reason:a})}SET(e,r){this.setRelativeData(e,r)}GET(e){return this.getRelativeData(e)}PUT(e,r){this.setRelativeData(e,r,{reason:!1})}FIRE(e,r=!0){this.setRelativeData(e,r,{fired:!0})}},H=class t extends ae{constructor(e=null,r=null){super(e),this._builder=r,this._insertingBuilder=null}get nodeClass(){return Yt}_setBuilderItem(e,r,n,...a){let i=r?.map(([o])=>[o,o._builder])||null;if(r)for(let[o,u]of r)o._builder=u;let s=this._insertingBuilder;this._insertingBuilder=e;try{return this.setItem(n,...a)}catch(o){if(this.node(n)==null&&i)for(let[u,l]of i)u._builder=l;throw o}finally{this._insertingBuilder=s}}bindBuilder(e){if(!e)throw new Error("SourceBag.bindBuilder requires a builder");let r=this._builderBindingPlan(e);for(let[n,a]of r)n._builder=a;return this.setBackref(),this}_builderBindingPlan(e){let r=[],n=new WeakSet,a=(i,s)=>{if(n.has(i))throw new Error("source contains a cyclic or shared SourceBag branch");n.add(i),r.push([i,s]);for(let o of i.getNodes()){let u=s,l=o._getMeta("subbuilder");l!=null&&(u=s._resolveSubbuilderReference(l,o.getAttr()||{},o.nodeTag)),r.push([o,u]);let c=o.getValue(!0);c instanceof t&&a(c,u)}};return a(this,e),r}};if((je(H.tytxSuffix).SourceBag??H)!==H)throw new Error("TYTX subtype name 'SourceBag' is already registered for another class");Dr(H.tytxSuffix,{...je(H.tytxSuffix),SourceBag:H});function cf(t){if(t.length===0)return{value:null,attrs:{}};let e=t[0];if(e!==null&&typeof e=="object"){let r=Object.getPrototypeOf(e);if(r===Object.prototype||r===null)return{value:null,attrs:e}}return{value:e,attrs:t[1]||{}}}var df=new Set(["then","toJSON"]),yo=new WeakMap;function Or(t){return yo.get(t)||t}function qa(t){if(t==null)return t;t=Or(t);let e=t._builder||t.parentBag&&t.parentBag._builder;return e?e.wrapSource(t):t}function vo(t,e){let r=e instanceof ae,n=new Proxy(e,{get(a,i){if(typeof i=="symbol"||i.startsWith("_")||df.has(i))return Reflect.get(a,i,a);let s=t.schemaTag(i);if(r&&s)return _o(t,a,s,r);if(i in a){let u=Reflect.get(a,i,a);return typeof u=="function"?u.bind(a):u}if(s)return _o(t,a,s,r);let o=t.containerMethod(i);if(o)return(...u)=>t[o](t.wrapSource(a),...u)}});return yo.set(n,e),n}function _o(t,e,r,n){return(...a)=>{let{value:i,attrs:s}=cf(a),o=n?t.bagCall(e,r,i,s):t.commandOnNode(e,r,i,s);return o.builder.wrapSource(o)}}var Eo=/^[A-Za-z_][A-Za-z0-9_]*$/,ff=new Set(["positional_only","positional_or_keyword","keyword_only","var_positional","var_keyword"]),pf=new Set(["framework","value","attribute"]),hf=new Map([["builtins.str",t=>typeof t=="string"],["builtins.int",t=>Number.isInteger(t)],["builtins.float",t=>typeof t=="number"&&Number.isFinite(t)],["builtins.bool",t=>typeof t=="boolean"],["builtins.list",t=>Array.isArray(t)],["builtins.dict",t=>t!==null&&typeof t=="object"&&!Array.isArray(t)],["builtins.tuple",t=>Array.isArray(t)],["builtins.set",t=>Array.isArray(t)||t instanceof Set],["builtins.NoneType",t=>t===null],["builtins.object",t=>!0]]);function wt(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function k(t,e){throw new TypeError(`${t}: ${e}`)}function Re(t,e,r,n){wt(t)||k(n,"must be an object");for(let a of Object.keys(t))e.includes(a)||k(n,`unknown field '${a}'`);for(let a of r)Object.hasOwn(t,a)||k(n,`missing field '${a}'`)}function yt(t,e){if(!(t===null||typeof t=="string"||typeof t=="boolean")&&!(typeof t=="number"&&Number.isFinite(t))){if(Array.isArray(t))return t.forEach((r,n)=>yt(r,`${e}[${n}]`));if(wt(t))return Object.entries(t).forEach(([r,n])=>yt(n,`${e}.${r}`));k(e,"must be lossless JSON data")}}function mf(t,e){let r="",n=!1;for(let a=0;a<t.length;a++){let i=t[a];if(i==="\\"){r+=i+(t[++a]??"");continue}i==="["&&(n=!0),!n&&i==="."&&!(e&16)?r+="[^\\n]":!n&&i==="^"&&e&8?r+="(?:^|(?<=\\n))":!n&&i==="$"?r+=e&8?"(?=\\n|(?![\\s\\S]))":"(?=\\n?(?![\\s\\S]))":r+=i,i==="]"&&(n=!1)}return r}function bt(t,e,r=!1,n=null){if(t===null)return null;switch(Re(t,["kind","dtype","module","name","origin","arguments","items","values","base","metadata","pattern","flags","ge","le","gt","lt","value"],["kind"],e),t.kind){case"custom":return Re(t,["kind","name"],["kind","name"],e),n||k(e,"custom references require a catalog; nested catalog references are unsupported"),n.resolve(t.name,e);case"dtype":{Re(t,["kind","dtype"],["kind","dtype"],e);let a=t.dtype;typeof a!="string"&&k(e,"dtype must be a string");let i=xr(a);return!i&&a!=="NN"&&k(e,`unknown dtype '${a}'`),{...t,test:o=>a==="NN"?o===null:a==="N"?Ae(o)&&!["NaN","Infinity","-Infinity"].includes(o.toString()):i===Number?typeof o=="number"&&Number.isFinite(o)&&(a!=="L"||Number.isInteger(o)):i===String?typeof o=="string":i===Boolean?typeof o=="boolean":i===Date?o instanceof Date&&Number.isFinite(o.getTime()):i===Object?wt(o)&&[Object.prototype,null].includes(Object.getPrototypeOf(o)):o instanceof i}}case"any":return{...t,test:a=>!0};case"type":{(typeof t.module!="string"||typeof t.name!="string")&&k(e,"type requires string module/name");let a=`${t.module}.${t.name}`;if(a==="collections.abc.Callable")return{...t,test:s=>typeof s=="function",portable:!1};let i=hf.get(a);return i||k(e,`unsupported type '${a}'`),{...t,test:i}}case"union":{(!Array.isArray(t.items)||!t.items.length)&&k(e,"union items must be non-empty");let a=t.items.map((i,s)=>bt(i,`${e}.items[${s}]`,!0,n));return{...t,items:a,inputConstraint:a.some(i=>i.inputConstraint),test:i=>a.some(s=>s.test&&s.test(i))}}case"literal":return Array.isArray(t.values)||k(e,"literal values must be an array"),t.values.forEach((a,i)=>yt(a,`${e}.values[${i}]`)),{...t,test:a=>t.values.some(i=>Object.is(i,a))};case"annotated":{Array.isArray(t.metadata)||k(e,"annotated metadata must be an array"),t.metadata.some(s=>!["regex","range","value"].includes(s?.kind))&&k(e,"unsupported annotation metadata kind");let a=bt(t.base,`${e}.base`,!0,n),i=t.metadata.map((s,o)=>bt(s,`${e}.metadata[${o}]`,!0,n));return{...t,base:a,metadata:i,inputConstraint:a.inputConstraint,test:s=>a.test(s)&&i.every(o=>!o.test||o.test(s))}}case"range":{for(let a of["ge","le","gt","lt"])Object.hasOwn(t,a)||k(e,`range missing '${a}'`);for(let a of["ge","le","gt","lt"])t[a]!==null&&(typeof t[a]!="number"||!Number.isFinite(t[a]))&&k(e,`${a} must be finite number or null`);return{...t,test:a=>typeof a=="number"&&(t.ge===null||a>=t.ge)&&(t.le===null||a<=t.le)&&(t.gt===null||a>t.gt)&&(t.lt===null||a<t.lt)}}case"regex":{(typeof t.pattern!="string"||!Number.isInteger(t.flags)||t.flags<0)&&k(e,"regex requires pattern and non-negative integer flags");let a=t.flags&-59;a&&k(e,`unsupported Python regex flags ${a}`),t.flags&2&&k(e,"IGNORECASE is not portable across Python and JavaScript Unicode rules"),/\\[AZzUwWdDsSabBN0-9]|\(\?P[<=!]|\(\?\(|\(\?>|\(\?#|\(\?[aiLmsux-]|[+*?}]\+|\{,/.test(t.pattern.replaceAll(String.raw`[\s\S]`,"."))&&k(e,"regex uses a non-portable construct or character class");let i="uy";t.flags&16&&(i+="s");let s;try{s=new RegExp(`(?:${mf(t.pattern,t.flags)})(?![\\s\\S])`,i)}catch(o){k(e,`invalid portable regex: ${o.message}`)}return{...t,test:o=>typeof o!="string"?!1:(s.lastIndex=0,s.test(o))}}case"value":return yt(t.value,`${e}.value`),{...t};case"generic":{let a=bt(t.origin,`${e}.origin`,!0,n);(t.origin?.kind!=="type"||t.origin.module!=="builtins"||!["list","dict","tuple","set"].includes(t.origin.name))&&k(e,"only list, dict, tuple and set generic origins are supported"),Array.isArray(t.arguments)||k(e,"generic arguments must be an array");let i=t.arguments.map((s,o)=>bt(s,`${e}.arguments[${o}]`,!0,n));return{...t,origin:a,arguments:i,inputConstraint:i.some(s=>s.inputConstraint),test:s=>a.test(s)&&gf(t.origin,i,s)}}case"arguments":k(e,"Callable argument-list descriptors are not supported by Python validation");case"ellipsis":return r||k(e,"ellipsis is only valid as a nested descriptor"),{...t};default:k(e,`unknown annotation kind '${t.kind}'`)}}function gf(t,e,r){let n=`${t.module}.${t.name}`;return n==="builtins.tuple"&&e.length&&e[1]?.kind!=="ellipsis"?r.length===e.length&&r.every((a,i)=>e[i].test(a)):n==="builtins.list"||n==="builtins.set"||n==="builtins.tuple"?[...r].every(a=>!e[0]?.test||e[0].test(a)):n==="builtins.dict"?Object.entries(r).every(([a,i])=>(!e[0]?.test||e[0].test(a))&&(!e[1]?.test||e[1].test(i))):!1}function xo(t,e){if(t===null)return null;if(typeof t!="string"&&k(e,"must be string or null"),t==="")return new Map;let r=new Map;for(let n of t.split(",")){let a=n.trim();/^[A-Za-z_][A-Za-z0-9_]*\[\]$/.test(a)&&k(e,`invalid cardinality item '${n}'`);let i=a.match(/^([A-Za-z_][A-Za-z0-9_]*|\*)(?:\[(?:(\d+)|(?:(\d*):(\d*)))\])?$/);i||k(e,`invalid cardinality item '${n}'`);let[,s,o,u,l]=i;r.has(s)&&k(e,`duplicate tag '${s}'`);let c=0,d=1/0;a.includes("[")&&(a.includes(":")?(c=u?Number(u):0,d=l?Number(l):1/0):c=d=Number(o)),d<c&&k(e,`maximum ${d} is below minimum ${c}`),r.set(s,{min:c,max:d})}return r.has("*")&&r.size>1&&k(e,"wildcard '*' cannot be combined with named tags"),r}function Do(t,e){if(t===null)return null;typeof t!="string"&&k(e,"must be string or null");let r=new Set;for(let n of t.split(",")){let a=n.trim();a&&((!Eo.test(a)||r.has(a))&&k(e,`invalid or duplicate parent '${n}'`),r.add(a))}return r}function _f(t,e,r){if(t===null)return null;Re(t,["parameters","accepts_var_keyword","accepts_var_positional"],[],e);let n=t.parameters??[];Array.isArray(n)||k(e,"parameters must be an array"),t={parameters:n,accepts_var_keyword:n.some(u=>u.kind==="var_keyword"),accepts_var_positional:n.some(u=>u.kind==="var_positional"),...t},(!Array.isArray(t.parameters)||typeof t.accepts_var_keyword!="boolean"||typeof t.accepts_var_positional!="boolean")&&k(e,"invalid signature descriptor");let a=new Set,i=!1,s=!1,o=t.parameters.map((u,l)=>{let c=`${e}.parameters[${l}]`;return Re(u,["name","kind","role","annotation","has_default","default"],["name","kind","role","annotation","has_default"],c),(typeof u.name!="string"||!Eo.test(u.name)||a.has(u.name))&&k(c,"invalid or duplicate parameter name"),a.add(u.name),(!ff.has(u.kind)||!pf.has(u.role)||typeof u.has_default!="boolean")&&k(c,"invalid kind, role, or has_default"),u.has_default!==Object.hasOwn(u,"default")&&k(c,"default presence must equal has_default"),u.has_default&&yt(u.default,`${c}.default`),i||=u.kind==="var_keyword",s||=u.kind==="var_positional",{...u,annotation:bt(u.annotation,`${c}.annotation`,!1,r)}});return(i!==t.accepts_var_keyword||s!==t.accepts_var_positional)&&k(e,"variadic summary flags do not match parameters"),{...t,parameters:o}}function ko(t,e,r,n){let a=["doc","sub_tags","parent_tags","inherits_from","ns","attributes",...r?["node_label","collection_key"]:[],"_meta"];Re(t,a,[],e),t={...Object.fromEntries(a.map(i=>[i,null])),...t};for(let i of["doc","inherits_from","ns",...r?["node_label","collection_key"]:[]])t[i]!==null&&typeof t[i]!="string"&&k(e,`${i} must be string or null`);return t._meta!==null&&(wt(t._meta)||k(e,"_meta must be object or null"),yt(t._meta,`${e}._meta`)),xo(t.sub_tags,`${e}.sub_tags`),Do(t.parent_tags,`${e}.parent_tags`),{...t,attributes:_f(t.attributes,`${e}.attributes`,n)}}function Ao(t){return t?t.split(",").map(e=>e.trim()).filter(Boolean):[]}function To(t,e){let r={...e};for(let[n,a]of Object.entries(t))n==="inherits_from"||n.startsWith("_")||r[n]||(r[n]=a);return r._meta={...t._meta||{},...e._meta||{}},r}function Co(t){let e={...t};return e._subSpec=Object.hasOwn(e,"sub_tags")?xo(e.sub_tags,"resolved.sub_tags"):null,e._parentSpec=Object.hasOwn(e,"parent_tags")?Do(e.parent_tags,"resolved.parent_tags"):null,e}function No(t,e,r,n){if(r.get(t)===1&&k(n,`inheritance cycle at '${t}'`),r.get(t)===2)return e[t];let a=e[t];a||k(n,`unknown abstract '${t}'`),r.set(t,1);let i={...a};for(let s of Ao(a.inherits_from))i=To(No(s,e,r,n),i);return i=Co(i),r.set(t,2),e[t]=i,i}function ja({abstracts:t={},elements:e={}}){let r={...t},n=new Map;for(let i of Object.keys(r))No(i,r,n,`abstracts.${i}.inherits_from`);let a={};for(let[i,s]of Object.entries(e)){let o={...s};for(let u of Ao(s.inherits_from)){let l=r[u];l||k(`elements.${i}.inherits_from`,`unknown abstract '${u}'`),o=To(l,o)}a[i]=Co(o)}return{abstracts:r,elements:a}}function Va(t){Re(t,["document_format","grammar","abstracts","elements","custom_types"],["document_format","grammar","abstracts","elements"],"grammar document"),Re(t.document_format,["name","version"],["name","version"],"document_format"),(t.document_format.name!=="builder_grammar"||!["1.1","1.2"].includes(t.document_format.version))&&k("document_format","expected builder_grammar version 1.1 or 1.2"),Re(t.grammar,["name","version","title","description"],["name","version","title","description"],"grammar"),(typeof t.grammar.name!="string"||!t.grammar.name)&&k("grammar.name","must be non-empty string");for(let a of["version","title","description"])t.grammar[a]!==null&&typeof t.grammar[a]!="string"&&k(`grammar.${a}`,"must be string or null");(!wt(t.abstracts)||!wt(t.elements))&&k("grammar document","abstracts/elements must be objects"),Object.hasOwn(t,"custom_types")&&t.document_format.version!=="1.2"&&k("custom_types","requires version 1.2");let e=Bn.fromJSON(t.custom_types??{}),r={};for(let[a,i]of Object.entries(t.abstracts))(!a||a.startsWith("_"))&&k("abstracts",`invalid public name '${a}'`),r[a]=ko(i,`abstracts.${a}`,!1,e);let n={};for(let[a,i]of Object.entries(t.elements))(!a||a.startsWith("_"))&&k("elements",`invalid public name '${a}'`),n[a]=ko(i,`elements.${a}`,!0,e);return{grammar:structuredClone(t.grammar),abstracts:r,elements:n}}function So(t,e,r,n){let a=e.attributes;if(!a)return;let i={...n};r!=null&&(i.node_value=r);let s=new Set(a.parameters.filter(l=>l.role==="attribute").map(l=>l.name)),o=new Set(["node_label","node_position","nodeId","target_id","datapath","iterate","store","_tag","_meta","ns"]);if(!a.accepts_var_keyword)for(let l of Object.keys(n))!s.has(l)&&!o.has(l)&&k(t,`unknown attribute '${l}'`);let u=e._meta?.component?a.parameters.find(l=>l.role!=="framework"&&["positional_only","positional_or_keyword"].includes(l.kind))?.name:null;for(let l of a.parameters){if(l.name===u||l.role==="framework"||l.kind.startsWith("var_"))continue;let c=Object.hasOwn(i,l.name);!c&&!l.has_default&&k(t,`missing required ${l.role} '${l.name}'`),c&&l.annotation!==null&&(!l.annotation.test||!l.annotation.test(i[l.name]))&&k(t,`invalid value for ${l.role} '${l.name}'`)}}var Bn=class t{#e=new Map;#t=new Map;register(e,r,n){let a=new Map([[String,"str"],[Number,"float"],["string","str"],["integer","int"],["number","float"]]),i=a.has(r)?{kind:"type",module:"builtins",name:a.get(r)}:r;return this.#r(e,{kind:"annotated",base:i,metadata:[n]})}#r(e,r){(typeof e!="string"||!/^[A-Za-z][A-Za-z0-9_]*$/.test(e)||e in this||["to_dict","from_dict"].includes(e)||bf.has(e))&&k("custom_types",`invalid, reserved or duplicate name '${e}'`),Re(r,["kind","base","metadata"],["kind","base","metadata"],`custom_types.${e}`),(r.kind!=="annotated"||!Array.isArray(r.metadata)||r.metadata.length!==1||!["regex","range"].includes(r.metadata[0]?.kind))&&k(`custom_types.${e}`,"requires an annotated base with one Regex or Range validator");let n=r.metadata[0].kind==="regex"?["str"]:["int","float"];(r.base?.kind!=="type"||r.base.module!=="builtins"||!n.includes(r.base.name))&&k(`custom_types.${e}`,"portable Regex requires str; portable Range requires int or float"),yt(r,`custom_types.${e}`);let a=structuredClone(r),i=bt(a,`custom_types.${e}`),s=Object.freeze({kind:"custom",name:e});return Object.defineProperty(this,e,{value:s,enumerable:!0}),this.#e.set(e,a),this.#t.set(e,{...s,inputConstraint:!0,test:i.test}),s}resolve(e,r="custom_types"){return this.#t.has(e)||k(r,`unknown custom type '${e}'`),{...this.#t.get(e)}}validate(e,r){return this.resolve(e).test(r)||k(`custom_types.${e}`,"invalid input value"),!0}toJSON(){return structuredClone(Object.fromEntries(this.#e))}static fromJSON(e){wt(e)||k("custom_types","must be an object");let r=new t;for(let[n,a]of Object.entries(e))r.#r(n,a);return r}},bf=new Set("False None True and as assert async await break class continue def del elif else except finally for from global if import in is lambda nonlocal not or pass raise return try while with yield".split(" "));function Oo(t,e,r,n){let a=e?.attributes;if(a)for(let i of a.parameters){if(!i.annotation?.inputConstraint||i.role==="framework"||["var_keyword","var_positional"].includes(i.kind))continue;let s=i.role==="value"?r:n[i.name];s!==void 0&&(i.annotation.test(s)||k(t,`invalid input for '${i.name}' (custom type)`))}}function Bo(t,e,r=[]){if(e===null)return structuredClone(t);if(r.length===2&&r[0]==="custom_types"&&t!==void 0){if(!za(t,e))throw new TypeError(`conflicting custom type '${r[1]}'`);return structuredClone(t)}if(r.length===2&&["abstracts","elements"].includes(r[0]))return structuredClone(e);if(ze(t)&&ze(e)){let n=structuredClone(t);for(let[a,i]of Object.entries(e))i!==null&&Object.defineProperty(n,a,{value:Bo(n[a],i,[...r,a]),enumerable:!0,writable:!0,configurable:!0});return n}return structuredClone(e)}function za(t,e){return Object.is(t,e)?!0:Array.isArray(t)&&Array.isArray(e)?t.length===e.length&&t.every((r,n)=>za(r,e[n])):ze(t)&&ze(e)?Object.keys(t).length===Object.keys(e).length&&Object.keys(t).every(r=>Object.hasOwn(e,r)&&za(t[r],e[r])):!1}function ze(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&Object.getPrototypeOf(t)===Object.prototype}function Ha(t){if(!(t===null||typeof t=="string"||typeof t=="boolean")&&!(typeof t=="number"&&Number.isFinite(t))){if(Array.isArray(t)){t.forEach(Ha);return}if(ze(t)){Object.values(t).forEach(Ha);return}throw new TypeError("collection must contain only finite JSON values")}}var He=class t{#e;constructor(e){Ha(e);let r=["document_format","grammar","abstracts","elements"];if(!ze(e)||Object.keys(e).some(a=>![...r,"custom_types"].includes(a))||r.some(a=>!Object.hasOwn(e,a)))throw new TypeError("collection requires document_format, grammar, abstracts and elements");let n=e.document_format;if(!ze(n)||Object.keys(n).length!==2||n.name!=="builder_grammar"||!["1.1","1.2"].includes(n.version))throw new TypeError("expected builder_grammar version 1.1 or 1.2");for(let a of["grammar","abstracts","elements"])if(!ze(e[a]))throw new TypeError(`${a} must be an object`);if(Object.hasOwn(e,"custom_types")&&(n.version!=="1.2"||!ze(e.custom_types)))throw new TypeError("custom_types requires an object catalog and version 1.2");this.#e=structuredClone(e)}update(e){let r=new t(e),n=Bo(this.#e,r.#e);return(this.#e.document_format.version==="1.2"||r.#e.document_format.version==="1.2")&&(n.document_format.version="1.2"),this.#e=n,this}toDocument(){return structuredClone(this.#e)}};var vt=class{static renderType="string";static mode=null;constructor(e){this._builder=e,this.renders=new Map([[e,this]])}get builder(){return this._builder}get renderType(){return this.constructor.renderType}get mode(){return this.constructor.mode}addRender(e,r){this.renders.set(e,r)}getRender(e){let r=this.renders.get(e);if(r!==void 0)return r;let n=e.getRenderer();return this.renders.set(e,n),n}render(e,r={}){let n=e.builder,[a,i]=n.runtimeValues(e);if(e._getMeta("data_element"))return null;if(e._getMeta("component"))return this._renderComponent(e,i,r);let s=this.getRender(n),o;return[o,i]=s._handleMeta(e,i),e._getMeta("subbuilder")||(i=s.adaptAttrs(i)),e.value instanceof H&&(a=this.renderChildren(e.value,r)),s.renderedItem(e,a,i,{tag:o,...r})}renderChildren(e,r={}){let n=[];for(let a of e.getNodes()){let i=this.render(a,r);i!==null&&(Array.isArray(i)?n.push(...i):n.push(i))}return n}_renderComponent(e,r,n){let[a,i,s,o]=this._expansionInputs(e,r);if(!Object.hasOwn(e.getAttr(),"iterate"))return this._expandBlock(e,a,s,o,n);if(i==null)return[];if(!(i instanceof ae))throw new TypeError(`component '${e.nodeTag}': iterate must resolve to a Bag, got ${i?.constructor?.name||typeof i}`);return i.getNodes().map(u=>this._expandBlock(e,a,s,{node_label:u.label},n))}_expansionInputs(e,r){let n=e.builder,a=n.componentMethod(e.nodeTag),i=a&&n[a];if(typeof i!="function")throw new Error(`component '${e.nodeTag}' has no implementation`);let s=r.iterate;delete r.iterate,delete r.store;let o=e.getAttr("iterate")||e.getAttr("store");o!=null?(e.pointerType(o)&&(o=o.slice(1)),o.startsWith(".")&&(o=e._composeRelativeDatapath(o,o))):o=null;for(let u of Object.keys(r)){let l=e.getAttr(u);e.pointerType(l)==="^"&&(r[u]=`^${e.absDatapath(l)}`)}return[i,s,o,r]}_expandBlock(e,r,n,a,i){let s=e.builder._expansionRoot(n);r.call(e.builder,qa(s),a);let o=s.getNodes();if(o.length!==1)throw new Error(`component '${e.nodeTag}' must build a tree, not a forest: ${o.length} root nodes`);let u={...i,depthOffset:this._nodeDepth(e,i.depthOffset||0)};return this.render(o[0],u)}preprocess(e){return e}renderedItem(e,r,n,a){throw new Error(`${this.constructor.name} does not implement renderedItem`)}_handleMeta(e,r){let[n,a]=e._getMeta("render_tag,render_attributes"),i=Ua(e.nodeTag,{renderTag:n,ns:e.getAttr("ns"),dialectName:e.builder?.constructor._name});if(!i)throw new Error(`node ${e.label} has no tag to render (no render_tag, no node_tag)`);return a&&(r={...r,...a}),[i,r]}adaptAttrs(e){return e}adapt(e){let r=`${this.builder.constructor._name}_`;return e.startsWith(r)?e.slice(r.length):e}finalize(e,r=null,n={}){let a=this._composeStringFragments(e);if(r==null)return a;if(typeof r=="string")throw new TypeError("string render targets require filesystem support, which is unavailable in the portable renderer; pass a callable or writable target instead");if(typeof r.full=="function"&&typeof r.write!="function")return r.full(a),null;if(typeof r.write=="function")return r.write(a),null;if(typeof r=="function")return r(a),null;throw new TypeError("render target must be writable (.write), callable, or expose .full")}_composeStringFragments(e){if(!Array.isArray(e))return e;if(e.some(r=>typeof r!="string"))throw new TypeError("String composition requires string fragments; object renderers must define their own composition");return e.join("")}_escapeText(e){return String(e).replaceAll("&","&").replaceAll("<","<").replaceAll(">",">")}_escapeAttr(e){return this._escapeText(e).replaceAll('"',""")}_nodeDepth(e,r=0){let a=((e.fullpath||"").match(/\./g)||[]).length;return Math.max(a-1,0)+r}};var kt=class extends vt{static mode="xml";renderedItem(e,r,n,{tag:a,pretty:i=!1,depthOffset:s=0}={}){let o=this._formatAttrs(n),u=i?" ".repeat(this._nodeDepth(e,s)):"",l=i?`
|
|
36
|
-
`:"";if(Array.isArray(r)){let c=this._composeStringFragments(r);return`${u}<${a}${o}>${l}${c}${u}</${a}>${l}`}return r==null?`${u}<${a}${o}></${a}>${l}`:`${u}<${a}${o}>${this._escapeText(r)}</${a}>${l}`}finalize(e,r=null,{docHeader:n=null}={}){let a=this._composeStringFragments(e);return n===!0?a=`<?xml version='1.0' encoding='UTF-8'?>${a}`:typeof n=="string"&&(a=n+a),super.finalize(a,r)}_formatAttrs(e){return Object.entries(e||{}).map(([r,n])=>` ${r.startsWith("xmlns_")?`xmlns:${r.slice(6)}`:r}="${this._escapeAttr(n)}"`).join("")}};var Io={document_format:{name:"builder_grammar",version:"1.1"},grammar:{name:"base",version:null,title:null,description:null},abstracts:{},elements:{dataSetter:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"destination",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"type",module:"builtins",name:"str"},has_default:!1},{name:"value",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"any"},has_default:!1},{name:"attr",kind:"var_keyword",role:"attribute",annotation:{kind:"any"},has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{data_element:!0}},dataFormula:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"destination",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"type",module:"builtins",name:"str"},has_default:!1},{name:"func",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"union",items:[{kind:"type",module:"builtins",name:"str"},{kind:"type",module:"collections.abc",name:"Callable"}]},has_default:!1},{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{data_element:!0}},dataController:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"func",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"union",items:[{kind:"type",module:"builtins",name:"str"},{kind:"type",module:"collections.abc",name:"Callable"}]},has_default:!1},{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{data_element:!0}}}};function Mo(t){let e=[];for(;t&&t!==Function.prototype;)e.push(t),t=Object.getPrototypeOf(t);return e.reverse()}function yf(t){let e=Object.create(null),r=(n,a)=>{let i=n.toLowerCase(),s=e[i];if(s!==void 0&&s!==a)throw new Error(`container '${n}' is already tied to implementation method '${s}' (cannot rebind to '${a}')`);e[i]=a};for(let n of Mo(t))if(Object.hasOwn(n,"containers"))for(let a of n.containers||[])r(a,a);return e}function Br(t){let e=Object.create(null);for(let r of Object.keys(t)){let n=r.toLowerCase();if(Object.hasOwn(e,n))throw new Error(`element declaration '${r}' has a case-insensitive collision with '${e[n]}'`);e[n]=r}return e}var Ir="_root_",Wa="_root_",Ro=new Set(["destination","func","value","_on_start"]),Le=class t{static _sourceClass=H;static registerBuilder(e){if(typeof e!="function"||!(e.prototype instanceof t))throw new TypeError("registerBuilder requires a BuilderBase subclass");let r=e._name;if(typeof r!="string"||!r)throw new TypeError("registered builders require a non-empty static _name");let n=t._registry.get(r);if(n&&n!==e)throw new Error(`Builder name '${r}' is already registered to ${n.name}; cannot register ${e.name}`);return t._registry.set(r,e),e}static getBuilderClass(e){let r=t._registry.get(e);if(!r)throw new Error(`No builder registered with name '${e}'`);return r}constructor(e=null){this.name=e||this.constructor._name,this._dataroot=new ae,this._dataroot.setBackref(),this._dataroot.setItem(Wa,new ae),this.data=this._dataroot.getItem(Wa),this._defaultTargets=new Map,this.materialized=Object.create(null),this._collection=null,this._schemaOverride=null,this._tagNamesOverride=null,this._componentMap=null,this._targetSerial=0,this._subbuilders=new Map,this._sourceHandles=new WeakMap;let r=this.constructor._sourceClass;this._sourceroot=new r(null,this),this._sourceroot.setBackref(),this._sourceroot.setItem(Ir,new r(null,this)),this.source=this._sourceroot.getItem(Ir)}wrapSource(e){if(e=Or(e),!(e instanceof H)&&!(e instanceof Yt))throw new TypeError("wrapSource requires a SourceBag or SourceBagNode");let r=this._sourceHandles.get(e);return r||(r=vo(this,e),this._sourceHandles.set(e,r)),r}get root(){return this.wrapSource(this.source)}getSubbuilder(e){if(typeof e!="string"||!e||e.includes(":"))throw new Error(`unsupported subbuilder reference '${e}'`);let r=this._subbuilders.get(e);if(!r){let n=t.getBuilderClass(e);r=new n,this._subbuilders.set(e,r)}return r._dataroot=this._dataroot,r.data=this.data,r}_resolveSubbuilderReference(e,r,n){if(typeof e!="string"||!e)throw new Error(`'${n}': subbuilder declaration must be a non-empty string`);if(e.includes(":"))throw new Error(`'${n}': runtime subbuilder reference '${e}' is unsupported`);return this.getSubbuilder(e)}static defineGrammar(e){let r=this._classCollection,n=r?new He(r.toDocument()).update(e):new He(e),a=Va(n.toDocument()),i=ja(a),s=Br(i.elements);this._classCollection=n,this._classSchema=i.elements,this._abstracts=i.abstracts,this._tagNames=s}static{this.defineGrammar(Io)}get _containers(){return yf(this.constructor)}containerMethod(e){return this._containers[e.toLowerCase()]||null}componentMethod(e){return this._componentMap?.[e.toLowerCase()]||null}get schema(){return this._schemaOverride||this.constructor._classSchema||{}}get schemaTagNames(){return this._schemaOverride?this._tagNamesOverride??=Br(this.schema):this.constructor._tagNames??=Br(this.schema)}schemaTag(e){let r=e.toLowerCase(),n=this.schemaTagNames[r];if(n)return n;let a=`${this.constructor._name}_`;return r.startsWith(a)&&this.schemaTagNames[r.slice(a.length)]||null}loadGrammar(e,{replace:r=!1}={}){let n=this._collection||this.constructor._classCollection,a=r?new He(e):new He(n.toDocument()).update(e),i=Va(a.toDocument()),s=ja(i),o=Br(s.elements);return this._collection=a,this._schemaOverride=s.elements,this._tagNamesOverride=o,this}validateCustomTypes(e){let r=e.parentBag?.parentNode?.builder||e.parentBag?._builder,n=r&&r!==this&&r.schema[e.nodeTag]?._meta?.subbuilder?r:this;Oo(e.nodeTag,n.schema[e.nodeTag],e.value,e.getAttr()||{})}validateNodeValues(e,r,n={}){let a=this.schemaTag(e);if(!a)throw new Error(`unknown element '${e}'`);return So(a,this.schema[a],r,n),!0}validateNode(e,{value:r,attrs:n,childTags:a}={}){if(!e||typeof e.nodeTag!="string")throw new TypeError("validateNode requires a source node");let i=r!==void 0?r:e.value instanceof H?null:e.value;this.validateNodeValues(e.nodeTag,i,n||e.getAttr?.()||{});let s=this.schema[this.schemaTag(e.nodeTag)],o=a||(e.value instanceof H?e.value.getNodes().map(u=>u.nodeTag):null);return o&&this._validateChildren(e.nodeTag,s,o,!1),!0}validateChildren(e,r,{includeMinimum:n=!1}={}){let a=this.schemaTag(e);if(!a)throw new Error(`unknown element '${e}'`);if(!Array.isArray(r)||r.some(i=>typeof i!="string"))throw new TypeError("childTags must be an array of strings");return this._validateChildren(a,this.schema[a],r,n)}validateParent(e,r=null){let n=this.schemaTag(e);if(!n)throw new Error(`unknown element '${e}'`);let a=this.schema[n];if(!this._countsForGrammar(a))return!0;let i=a._parentSpec;if(i==null||i.has("*"))return!0;if(r===null)throw new Error(`'${n}' requires a declared parent`);let s=this.schemaTag(r);if(!s)throw new Error(`unknown parent element '${r}'`);return this._validateParent(n,a,s),!0}bagCall(e,r,n,a){return this.setChild(e,r,n,a)}commandOnNode(e,r,n,a){if(e=Or(e),e.value instanceof H)return this.setChild(e.value,r,n,a);let i=e.value,s=new e.parentBag.constructor(null,e.builder||this),o=this.setChild(s,r,n,a,e);return this.promoteNodeValue(e,i,s),o}promoteNodeValue(e,r,n){e.setValue(n)}setChild(e,r,n,a,i=null){let s={...a},o=this.schema[r];if(!o)throw new Error(`unknown element '${r}'`);this.validateNodeValues(r,n,s);let u=o._meta?.subbuilder,c=(u==null?null:this._resolveSubbuilderReference(u,s,r))||this,d=n instanceof H?n._builderBindingPlan(c):null,f=i?.rootBuilder||e.root._builder||this;if(s.nodeId!=null&&f.source.getNodeByAttr("nodeId",s.nodeId))throw new Error(`Duplicate nodeId '${s.nodeId}'`);n instanceof H&&this._validateChildren(r,o,n.getNodes().map(w=>w.nodeTag),!1);let p=i||e.parentNode,h=p?.nodeTag?this.schema[p.nodeTag]:null;if(h&&!p._getMeta("subbuilder")&&this._countsForGrammar(o))this._validateParent(r,o,p.nodeTag),this._validateChildren(p.nodeTag,h,[...e.getNodes().map(w=>w.nodeTag),r],!1);else if(!h&&!p?._getMeta("subbuilder")&&o._parentSpec!=null&&this._countsForGrammar(o))throw new Error(`'${r}' requires a declared parent`);o._meta&&!("_meta"in s)&&(s._meta=o._meta),o.ns&&!("ns"in s)&&(s.ns=o.ns);let m=s.node_position;delete s.node_position;let _=s.node_label;delete s.node_label;let b;if(h?.collection_key){if(_!=null)throw new Error(`'${r}': node_label is not allowed in a collection`);b=this._collectionLabel(h.collection_key,r,s)}else{let w=h?._subSpec?.get(r);if(w&&w.max===1){if(_!=null)throw new Error(`'${r}': node_label is not allowed on a singleton`);b=r}else b=_||o.node_label||this._autoLabel(e,r)}if(e.node(b)!=null)throw new Error(`duplicate node label '${b}'`);return e._setBuilderItem(c,d,b,n,s,m||">",!1,!0,null,!1,!0,null,r)}_countsForGrammar(e){let r=e?._meta||{};return!(r.data_element||r.subbuilder||r.component)}_validateParent(e,r,n){let a=r._parentSpec;if(!(a==null||a.has("*")||!this._countsForGrammar(r))&&!a.has(n))throw new Error(`'${e}' not allowed as child of '${n}'`)}_validateChildren(e,r,n,a){let i=r._subSpec;if(i==null||i.has("*")||r._meta?.subbuilder)return[];let s=new Map;for(let o of n){let u=this.schema[o];if(u&&!this._countsForGrammar(u))continue;let l=i.get(o);if(!l)throw new Error(`'${o}' not allowed as child of '${e}'`);let c=(s.get(o)||0)+1;if(s.set(o,c),c>l.max)throw new Error(`too many '${o}' in '${e}'`)}return a?[...i].filter(([o,u])=>(s.get(o)||0)<u.min).map(([o])=>o):[]}_collectionLabel(e,r,n){let a=i=>{if(n[i]===null||n[i]===void 0)throw new Error(`'${r}': collection key needs attribute '${i}'`);return String(n[i])};return e.includes("${")?e.replace(/\$\{([^}]+)\}/g,(i,s)=>a(s)):a(e)}validateSource(){let e=[],r=(n,a="")=>{for(let i of n.getNodes()){let s=a?`${a}.${i.label}`:i.label,o=i.builder;o.validateCustomTypes(i);let u=o.schema[i.nodeTag];if(u&&!i._getMeta("data_element,subbuilder,component").some(Boolean)){let l=i.value instanceof H?i.value.getNodes().map(d=>d.nodeTag):[],c=o._validateChildren(i.nodeTag,u,l,!0);c.length&&e.push([s,c])}i.value instanceof H&&r(i.value,s)}};return r(this.source),e}_autoLabel(e,r){let n=0;for(;e.node(`${r}_${n}`)!==null&&e.node(`${r}_${n}`)!==void 0;)n+=1;return`${r}_${n}`}nodeById(e){let r=this.source.getNodeByAttr("nodeId",e);if(r==null)throw new Error(`nodeId not found: ${e}`);return r.builder.wrapSource(r)}runtimeValues(e){e.builder.validateCustomTypes(e);let r=new Map,n={},a=e.runtimeToEvaluate(),i=new Set(a.keys()),s=new Map([...Object.entries(e.getAttr()),...e.fixedAttrItems()]);for(let[c,d]of[...a])if(!(typeof c!="string"||!Ze(d)))for(let f of qn(e,d))a.has(f)||a.set(f,s.get(f));let o=e._getMeta("data_element");for(let[c,d]of a){if(d instanceof te){r.set(c,d.resolve());continue}let f=typeof c=="string"?Ze(d)?.pointer??d:d;if(!e.pointerType(f)){r.set(c,typeof c=="string"&&typeof d=="string"&&d.startsWith("==")?null:d);continue}let p=e.absDatapath(f);if(r.set(c,this.data.getItem(p)),!o&&!p.includes("?")&&c===Zt){let h=this.data.getNode(p);h&&Object.assign(n,h.getAttr("_wdg"))}}let u=ui(a,r,(c,d,f,p)=>this.evaluatePointerExpression(e,c,d,f,p)),l=u.get(Zt);u.delete(Zt);for(let c of u.keys())i.has(c)||u.delete(c);return[l,{...Object.fromEntries(u),...n}]}evaluatePointerExpression(e,r,n,a,i){return null}targetId(e){if(e._targetId)return e._targetId;let r=e.rootBuilder;return e.parentBag.root!==r.source.root?null:(r._targetSerial+=1,e._targetId=`n${r._targetSerial}`,e._targetId)}get dataLogic(){if(!this._dataLogic){let e=this._buildDataLogic();this._dataLogic=Array.isArray(e)?e:[e]}return this._dataLogic}_buildDataLogic(){return this}_resolveLogicFunc(e){if(typeof e=="function")return e;if(typeof e!="string")throw new Error("data-element func must be a name or a function");for(let r of this.dataLogic){let a=(typeof r=="function"?r:r.constructor)[e];if(typeof a=="function")return a}throw new Error(`data-element func '${e}' not found on any data_logic source`)}_bindings(e){let[,r]=this.runtimeValues(e),n={};for(let[a,i]of Object.entries(r))Ro.has(a)||(n[a]=i);return n}computeLogic(e){for(let r of e)this._computeNode(r)}_computeNode(e){let r=e.getAttr()||{};if(e.nodeTag==="dataSetter"){let n={};for(let[a,i]of Object.entries(r))a!=="destination"&&a!=="value"&&!a.startsWith("_")&&(n[a]=i);e.setRelativeData(r.destination,r.value,{attributes:Object.keys(n).length?n:null})}else if(e.nodeTag==="dataFormula"){let n=this._resolveLogicFunc(r.func);e.setRelativeData(r.destination,n(this._bindings(e)))}else e.nodeTag==="dataController"&&this._resolveLogicFunc(r.func)(e,this._bindings(e))}_dataElementNodes(){let e=[],r=n=>{for(let a of n.getNodes())a._getMeta("data_element")&&e.push(a),a.value instanceof H&&r(a.value)};return r(this.source),e}setup(e){}main(e){throw new Error(`${this.constructor.name}.main() not implemented: a bare builder is grammar, not a renderable page`)}_resolveComponents(){let e={};for(let o of Mo(this.constructor))if(Object.hasOwn(o,"components"))for(let u of o.components||[])e[u]=u;if(!Object.keys(e).length)return;let r={...this.schema},n={};for(let[o,u]of Object.entries(e))r[o]={sub_tags:"",_meta:{component:!0}},n[o.toLowerCase()]=u;let a=Br(r),i=this._collection||this.constructor._classCollection,s=i.toDocument();s.abstracts={},s.elements=Object.fromEntries(Object.keys(e).map(o=>[o,r[o]])),this._collection=new He(i.toDocument()).update(s),this._schemaOverride=r,this._componentMap=n,this._tagNamesOverride=a}_expansionRoot(e=null){let r=this.constructor._sourceClass,n=new r(null,this);return n.setBackref(),n.setItem(Ir,new r(null,this),e?{datapath:e}:null),n.getItem(Ir)}create(){this.setup(this.data),this._resolveComponents(),this.main(this.root),this.computeLogic(this._dataElementNodes())}get renderer_xml(){return new kt(this)}getRenderer(e=null){e??=this.constructor._defaultRenderMode;let r=this[`renderer_${e}`];if(!r)throw new Error(`${this.constructor.name} does not expose renderer_${e}`);return r}materialize(e=null,r={}){e??=this.constructor._defaultRenderMode;let n=this.getRenderer(e),a=n.renderChildren(n.preprocess(this.source),r);return this.materialized[e]=a,a}setRenderTarget(e,r=null){r??=this.constructor._defaultRenderMode,this._defaultTargets.set(r,e)}render({mode:e=null,target:r=null,...n}={}){e??=this.constructor._defaultRenderMode;let a=this.getRenderer(e);if(r===!1&&a.renderType!=="string")throw new TypeError("target=false is not valid for an object renderer");let i=r===!1?null:r||this._defaultTargets.get(a.mode)||null,s={...i?.renderOpts,...n};return a.finalize(this.materialize(e,s),i,s)}};Le._registry=new Map;var vf=new Set(["short","medium","long","full"]),kf=/('(?:[^']|'')*'|[a-zA-Z]+|[^a-zA-Z']+)/g;function Ef(t,e){if(!(t instanceof Date))throw new TypeError("Temporal formats require a typed Date value");if(!Number.isFinite(t.getTime()))throw new RangeError("Invalid date");let r=e||be(t).split("::").at(-1);if(!["D","H","DH","DHZ"].includes(r))throw new RangeError(`Unsupported temporal dtype: ${r}`);return r}function xf(t,e,r,n){let a=e.match(kf)||[];if(a.join("")!==e)throw new RangeError("Unclosed format literal");let i=(c,d=2)=>String(c).padStart(d,"0"),s=c=>new Intl.DateTimeFormat(r,{timeZone:"UTC",...c}).format(t),l={...n==="H"?{}:{y:()=>String(t.getUTCFullYear()),yy:()=>i(t.getUTCFullYear()%100),yyyy:()=>i(t.getUTCFullYear(),4),M:()=>String(t.getUTCMonth()+1),MM:()=>i(t.getUTCMonth()+1),MMM:()=>s({month:"short"}),MMMM:()=>s({month:"long"}),d:()=>String(t.getUTCDate()),dd:()=>i(t.getUTCDate()),EEE:()=>s({weekday:"short"}),EEEE:()=>s({weekday:"long"})},...n==="D"?{}:{H:()=>String(t.getUTCHours()),HH:()=>i(t.getUTCHours()),h:()=>String(t.getUTCHours()%12||12),hh:()=>i(t.getUTCHours()%12||12),m:()=>String(t.getUTCMinutes()),mm:()=>i(t.getUTCMinutes()),s:()=>String(t.getUTCSeconds()),ss:()=>i(t.getUTCSeconds()),a:()=>new Intl.DateTimeFormat(r,{hour:"numeric",hour12:!0,timeZone:"UTC"}).formatToParts(t).find(c=>c.type==="dayPeriod").value}};return a.map(c=>{if(c.startsWith("'"))return c==="''"?"'":c.slice(1,-1).replaceAll("''","'");if(!/^[a-zA-Z]/.test(c))return c;if(!l[c])throw new RangeError(`Unsupported date format token: ${c}`);return l[c]()}).join("")}function Lo(t,{format:e,mask:r,locale:n,dtype:a,places:i}={}){let s=t==null?"":String(t);if(t!=null&&t!==""&&(e!=null&&e!==""||i!=null))if(typeof t=="number"||Ae(t))s=Af(t,{format:e,locale:n,places:i});else{let o=Ef(t,a);if(vf.has(e)){let u={timeZone:"UTC"};o!=="H"&&(u.dateStyle=e),o!=="D"&&(u.timeStyle=e),s=new Intl.DateTimeFormat(n||void 0,u).format(t)}else s=xf(t,String(e),n||void 0,o)}return r==null?s:String(r).replaceAll("%s",()=>s)}function Df({format:t="decimal",places:e}={}){let r={maximumFractionDigits:20};if(!t||t==="decimal")r.style="decimal";else if(t==="percent")r.style="percent";else if(t==="scientific")r.notation="scientific";else{let n=/^(0|#,##0)(?:\.(0*)(#*))?$/.exec(t);if(!n||t.includes(".")&&!n[2]&&!n[3])throw new RangeError(`Unsupported number format: ${t}`);r.useGrouping=n[1].includes(","),r.minimumFractionDigits=(n[2]||"").length,r.maximumFractionDigits=(n[2]||"").length+(n[3]||"").length}if(e!=null&&e!==""){let n=Number(e);if(!Number.isInteger(n)||n<0||n>20)throw new RangeError("places must be an integer from 0 to 20");r.minimumFractionDigits=n,r.maximumFractionDigits=n}return r}function Af(t,e={}){if(typeof t!="number"&&!Ae(t))throw new TypeError("Number formatting requires a Number or Decimal");if(!Number.isFinite(Number(t)))throw new RangeError("Number must be finite");let r=new Intl.NumberFormat(e.locale||void 0,Df(e));if(Ae(t)&&new Intl.NumberFormat("en",{useGrouping:!1}).format("9007199254740993")!=="9007199254740993")throw new Error("This browser cannot format Decimal values without precision loss");return r.format(Ae(t)?t.toString():t)}var Tf=new Set(["style","script"]),Cf=new Set(["allowfullscreen","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","inert","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"]),Po=new Set(["width","height","top","left","right","bottom","padding","margin","border","position","display","overflow","float","clear","resize","z_index","min_width","min_height","max_width","max_height","color","background","font","text","line_height","white_space","vertical_align","flex","gap","row_gap","column_gap","grid","align_content","justify_content","align_items","justify_items","visibility","opacity","cursor"]),Mr=new Set(["rounded","gradient","shadow","transform","transition","zoom","filter"]),$o=t=>t===!0?"true":t===!1?"false":String(t),In=t=>typeof t=="number"&&Number.isFinite(t)?`${t}px`:String(t);function Nf(t){if(Po.has(t))return!0;for(let e of Po)if(t.startsWith(`${e}_`))return!0;return!1}function Sf(t){let e=new Map;if(!t)return e;let r=[],n=0,a=null,i=!1,s=!1,o=0,u=String(t);for(let l=0;l<u.length;l+=1){let c=u[l],d=u[l+1];if(s){c==="*"&&d==="/"&&(s=!1,l+=1);continue}if(i){i=!1;continue}if(c==="\\"){i=!0;continue}if(a){c===a&&(a=null);continue}c==='"'||c==="'"?a=c:c==="/"&&d==="*"?(s=!0,l+=1):"([{".includes(c)?o+=1:")]}".includes(c)&&o>0?o-=1:c===";"&&o===0&&(r.push(u.slice(n,l)),n=l+1)}r.push(u.slice(n));for(let l of r){let c=l.trim();if(!c)continue;let d=c.indexOf(":");if(d<0)throw new TypeError(`malformed style declaration '${c}'`);e.set(c.slice(0,d).trim(),c.slice(d+1).trim())}return e}var Rr=class extends vt{static mode="html";renderedItem(e,r,n,{tag:a,xml:i=!0,pretty:s=!1,depthOffset:o=0,includeDatapath:u=!1}={}){e.parentNode?._getMeta("subbuilder")==="html"&&(n={xmlns:"http://www.w3.org/1999/xhtml",...n});let{format:c,mask:d,locale:f,places:p,dtype:h,...m}=n;!Array.isArray(r)&&(c!=null||d!=null||p!=null)&&(r=Lo(r,{format:c,mask:d,places:p,dtype:h,locale:this._displayLocale(e,f)}));let _=this._formatAttrs(m);if(u){if(!Object.hasOwn(n,"id")){let x=this.builder.targetId(e);x!==null&&(_+=` id="${this._htmlAttrValue(x)}"`)}for(let[x,B]of Object.entries(e.getAttr()))e.pointerType(B)&&(_+=` data-${this.adapt(x)}-pointer="${this._htmlAttrValue(e.absDatapath(B))}"`)}let b=s?" ".repeat(this._nodeDepth(e,o)):"",v=s?`
|
|
37
|
-
`:"";if(e._getMeta("void"))return`${b}<${a}${_}${i?"/":""}>${v}`;if(Array.isArray(r)){let x=this._composeStringFragments(r);return`${b}<${a}${_}>${v}${x}${b}</${a}>${v}`}if(r==null)return`${b}<${a}${_}></${a}>${v}`;let w=typeof r=="string"&&r.endsWith("::HTML")?r.slice(0,-6):Tf.has(a)?String(r):this._escapeText(r);return`${b}<${a}${_}>${w}</${a}>${v}`}_displayLocale(e,r){if(r)return r;for(let n=e.parentNode;n;n=n.parentNode){let a=n.getAttr("locale");if(a==null)continue;let i=n.pointerType(a)?n.data.getItem(n.absDatapath(a)):a;if(i)return i}}adaptAttrs(e){let r={},n={};for(let[i,s]of Object.entries(e||{}))if(i.startsWith(`${this.builder.constructor._name}_`))r[this.adapt(i)]=s;else if(i==="dtype")r.dtype=s;else{if(this.builder.constructor.retainedAttrPrefixes.some(o=>i.startsWith(o)))continue;this._isStyleContribution(i)?n[i]=s:r[i]=s}let a=this._adaptStyle(n);return a&&(r.style=a),r}_isStyleContribution(e){if(e==="style"||e.startsWith("style_")||Mr.has(e))return!0;let r=e.includes("_")?e.slice(0,e.indexOf("_")):null;return r!==null&&Mr.has(r)||Nf(e)}_adaptStyle(e){let r=Sf(e.style),n=new Map,a=new Map;for(let[i,s]of Object.entries(e))if(i!=="style")if(i.startsWith("style_"))r.set(i.slice(6).replaceAll("_","-"),$o(s));else if(Mr.has(i))n.set(i,s);else{let o=i.indexOf("_"),u=o<0?i:i.slice(0,o);o>=0&&Mr.has(u)?(a.has(u)||a.set(u,{}),a.get(u)[i.slice(o+1)]=s):r.set(i.replaceAll("_","-"),$o(s))}for(let i of Mr)(n.has(i)||a.has(i))&&this[`_macro_${i}`](n.get(i),a.get(i)||{},r);return[...r].map(([i,s])=>`${i}: ${s}`).join("; ")}_formatAttrs(e){let r=[];for(let[n,a]of Object.entries(e||{}))Cf.has(n)?a&&r.push(` ${n}`):r.push(` ${n}="${this._htmlAttrValue(a)}"`);return r.join("")}_htmlAttrValue(e){return(e===!0?"true":e===!1?"false":String(e)).replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""")}_macro_rounded(e,r,n){let a=e===void 0?{}:{top_left:e,top_right:e,bottom_left:e,bottom_right:e};for(let[i,s]of Object.entries(r))if(i==="top"||i==="bottom")a[`${i}_left`]=s,a[`${i}_right`]=s;else if(i==="left"||i==="right")a[`top_${i}`]=s,a[`bottom_${i}`]=s;else if(["top_left","top_right","bottom_left","bottom_right"].includes(i))a[i]=s;else throw new TypeError(`rounded: unknown sub-kwarg '${i}'`);for(let[i,s]of Object.entries(a))n.set(`border-${i.replaceAll("_","-")}-radius`,In(s))}_macro_transform(e,r,n){let a=e===void 0?[]:[String(e)];for(let[i,s]of Object.entries(r))i==="rotate"?a.push(`rotate(${s}deg)`):i==="scale"||i==="translate"?a.push(`${i}(${s})`):i==="translate_x"?a.push(`translateX(${In(s)})`):i==="translate_y"?a.push(`translateY(${In(s)})`):i==="skew_x"?a.push(`skewX(${s}deg)`):i==="skew_y"?a.push(`skewY(${s}deg)`):a.push(`${i.replaceAll("_","-")}(${s})`);a.length&&n.set("transform",a.join(" "))}_macro_filter(e,r,n){let a=e===void 0?[]:[String(e)];for(let[i,s]of Object.entries(r))i==="rotate"?a.push(`hue-rotate(${s}deg)`):i==="blur"?a.push(`blur(${In(s)})`):i==="drop_shadow"?a.push(`drop-shadow(${s})`):a.push(`${i.replaceAll("_","-")}(${s})`);a.length&&n.set("filter",a.join(" "))}_macro_transition(e,r,n){e!==void 0&&n.set("transition",String(e));for(let[a,i]of Object.entries(r))n.set(`transition-${a.replaceAll("_","-")}`,String(i))}_macro_zoom(e,r,n){e!==void 0&&n.set("zoom",String(e))}_macro_shadow(e,r,n){e!==void 0&&n.set("box-shadow",String(e));for(let[a,i]of Object.entries(r))n.set(`box-shadow-${a.replaceAll("_","-")}`,String(i))}_macro_gradient(e,r,n){e!==void 0&&n.set("background-image",String(e))}};var Of=new Set(["alignment_baseline","baseline_shift","clip_path","clip_rule","color_interpolation","color_interpolation_filters","dominant_baseline","fill_opacity","fill_rule","flood_color","flood_opacity","font_family","font_size","font_size_adjust","font_stretch","font_style","font_variant","font_weight","glyph_orientation_horizontal","glyph_orientation_vertical","image_rendering","letter_spacing","lighting_color","marker_end","marker_mid","marker_start","overline_position","overline_thickness","paint_order","pointer_events","shape_rendering","stop_color","stop_opacity","strikethrough_position","strikethrough_thickness","stroke_dasharray","stroke_dashoffset","stroke_linecap","stroke_linejoin","stroke_miterlimit","stroke_opacity","stroke_width","text_anchor","text_decoration","text_rendering","underline_position","underline_thickness","unicode_bidi","word_spacing","writing_mode"]);function Fo(t){return Object.fromEntries(Object.entries(t||{}).map(([e,r])=>[Of.has(e)?e.replaceAll("_","-"):e,r]))}var Lr=class extends kt{static mode="svg";adaptAttrs(e){return Fo(e)}};var Uo={document_format:{name:"builder_grammar",version:"1.1"},grammar:{name:"html",version:null,title:null,description:null},abstracts:{},elements:{svg:{doc:"Switch to the SVG dialect from this node down (BLD.2).\n\n A sub-builder element: ``_meta['subbuilder']`` switches the active\n dialect to SVG from this node down. No ``render_tag``: ``<svg>`` is\n emitted verbatim (HTML5 has a native ``<svg>`` tag).",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{subbuilder:"svg"}},a:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},abbr:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},address:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},area:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},article:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},aside:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},audio:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},b:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},base:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},bdi:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},bdo:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},blockquote:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},body:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},br:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},button:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},canvas:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},caption:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},cite:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},code:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},col:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},colgroup:{doc:null,sub_tags:"col,script,template",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},data:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},datalist:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,option,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},dd:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},del_:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},details:{doc:null,sub_tags:"summary[0:1],a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},dfn:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},dialog:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},div:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},dl:{doc:null,sub_tags:"dd,div,dt,script,template",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},dt:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},em:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},embed:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},fieldset:{doc:null,sub_tags:"legend[0:1],a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},figcaption:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},figure:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figcaption[0:1],figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},footer:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},form:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},h1:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},h2:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},h3:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},h4:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},h5:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},h6:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},head:{doc:null,sub_tags:"base[0:1],link,meta,noscript,script,style,template,title[0:1]",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},header:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},hgroup:{doc:null,sub_tags:"h1,h2,h3,h4,h5,h6,p,script,template",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},hr:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},html:{doc:null,sub_tags:"head[0:1],body[0:1]",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},i:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},iframe:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},img:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},input:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},ins:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},kbd:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},label:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},legend:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,h1,h2,h3,h4,h5,h6,hgroup,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},li:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},link:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},main:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},map:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},mark:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},menu:{doc:null,sub_tags:"li,script,template",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},meta:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},meter:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},nav:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},noscript:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},object:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},ol:{doc:null,sub_tags:"li,script,template",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},optgroup:{doc:null,sub_tags:"div,legend,noscript,option,script,template",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},option:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,div,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},output:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},p:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},picture:{doc:null,sub_tags:"img[0:1],script,source,template",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},pre:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},progress:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},q:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},rp:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},rt:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},ruby:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},s:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},samp:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},script:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},search:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},section:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},select:{doc:null,sub_tags:"button,div,hr,noscript,optgroup,option,script,template",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},slot:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},small:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},source:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},span:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},strong:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},style:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},sub:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},summary:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,h1,h2,h3,h4,h5,h6,hgroup,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},sup:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},table:{doc:null,sub_tags:"caption[0:1],colgroup,script,tbody,template,tfoot[0:1],thead[0:1],tr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},tbody:{doc:null,sub_tags:"script,template,tr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},td:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},template:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,caption,cite,code,col,colgroup,data,datalist,del_,details,dfn,dialog,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,legend,li,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,optgroup,option,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,source,span,strong,style,sub,summary,sup,table,tbody,td,template,textarea,tfoot,th,thead,time,tr,track,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},textarea:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},tfoot:{doc:null,sub_tags:"script,template,tr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},th:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},thead:{doc:null,sub_tags:"script,template,tr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},time:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},title:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},tr:{doc:null,sub_tags:"script,td,template,th",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},track:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},u:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},ul:{doc:null,sub_tags:"li,script,template",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},var:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},video:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},wbr:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},selectedcontent:{doc:"Mirror of the selected option for Customizable Select (HTML 2024).",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},dataSetter:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"destination",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"type",module:"builtins",name:"str"},has_default:!1},{name:"value",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"any"},has_default:!1},{name:"attr",kind:"var_keyword",role:"attribute",annotation:{kind:"any"},has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{data_element:!0}},dataFormula:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"destination",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"type",module:"builtins",name:"str"},has_default:!1},{name:"func",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"union",items:[{kind:"type",module:"builtins",name:"str"},{kind:"type",module:"collections.abc",name:"Callable"}]},has_default:!1},{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{data_element:!0}},dataController:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"func",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"union",items:[{kind:"type",module:"builtins",name:"str"},{kind:"type",module:"collections.abc",name:"Callable"}]},has_default:!1},{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{data_element:!0}}}};var Mn=class extends Le{static _name="html";static _defaultRenderMode="html";static retainedAttrPrefixes=["validate_","dtype"];static{this.defineGrammar(Uo)}get renderer_html(){return new Rr(this)}};Le.registerBuilder(Mn);var qo={document_format:{name:"builder_grammar",version:"1.1"},grammar:{name:"svg",version:null,title:null,description:null},abstracts:{graphics:{doc:"SVG graphics content: any graphical element.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},_meta:null},containerElement:{doc:"SVG container content: elements that can hold children.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},_meta:null}},elements:{html:{doc:"Switch to the HTML dialect from this node down (BLD.2).\n\n A sub-builder element: ``_meta['subbuilder']`` switches the active\n dialect to HTML from this node down. The source tag ``html`` is\n rendered as ``_meta['render_tag']`` (``<foreignObject>``) carrying\n ``_meta['render_attributes']`` (the SVG namespace). The immediate\n HTML child declares XHTML so both sides of the XML boundary retain\n their native namespace.\n ",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{subbuilder:"html",render_tag:"foreignObject",render_attributes:{xmlns:"http://www.w3.org/2000/svg"}}},svg:{doc:"Root SVG container or nested SVG viewport.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},g:{doc:"Group container for applying transforms and styles.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},defs:{doc:"Container for referenced elements (gradients, patterns, etc.).",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},symbol:{doc:"Reusable graphical template, rendered only when referenced by <use>.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},use:{doc:"Reference and render a <symbol> or other element.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},rect:{doc:"Rectangle.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},circle:{doc:"Circle.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},ellipse:{doc:"Ellipse.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},line:{doc:"Line segment between two points.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},polyline:{doc:"Open shape of connected line segments.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},polygon:{doc:"Closed shape of connected line segments.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},path:{doc:"Arbitrary shape defined by path commands (d attribute).",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},image:{doc:"Embedded raster image.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},text:{doc:"Text block. Contains text content and optional <tspan>/<textPath>.",sub_tags:"tspan,textPath",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},tspan:{doc:"Inline text span within <text>.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},textPath:{doc:"Text rendered along a path shape.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},linearGradient:{doc:"Linear gradient definition. Place inside <defs>.",sub_tags:"stop",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},radialGradient:{doc:"Radial gradient definition. Place inside <defs>.",sub_tags:"stop",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},stop:{doc:"Gradient stop (color and offset).",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},pattern:{doc:"Tile pattern definition. Place inside <defs>.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},clipPath:{doc:"Clipping path definition.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},mask:{doc:"Alpha mask definition.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},marker:{doc:"Marker symbol for line endpoints or vertices.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},filter:{doc:"Filter effect container. Place inside <defs>.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feGaussianBlur:{doc:"Gaussian blur filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feOffset:{doc:"Offset filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feBlend:{doc:"Blend filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feColorMatrix:{doc:"Color matrix filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feComposite:{doc:"Composite filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feFlood:{doc:"Flood fill filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feMerge:{doc:"Merge filter primitive (container for feMergeNode).",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feMergeNode:{doc:"Single input for feMerge.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feDropShadow:{doc:"Drop shadow filter primitive (SVG 2).",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feDiffuseLighting:{doc:"Diffuse lighting filter primitive.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feSpecularLighting:{doc:"Specular lighting filter primitive.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},fePointLight:{doc:"Point light source for lighting filters.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feDistantLight:{doc:"Distant light source for lighting filters.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feSpotLight:{doc:"Spot light source for lighting filters.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feMorphology:{doc:"Morphology filter primitive (erode/dilate).",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feTurbulence:{doc:"Turbulence noise filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feDisplacementMap:{doc:"Displacement map filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feConvolveMatrix:{doc:"Convolution matrix filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feImage:{doc:"Image filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feTile:{doc:"Tile filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},animate:{doc:"Animate an attribute over time.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},animateTransform:{doc:"Animate a transform attribute.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},animateMotion:{doc:"Animate motion along a path.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},set:{doc:"Set an attribute to a value for a duration.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},title:{doc:"Accessible title (tooltip in browsers).",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},desc:{doc:"Accessible description.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},metadata:{doc:"Metadata container (RDF, Dublin Core, etc.).",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},a:{doc:"Hyperlink wrapper.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},foreignObject:{doc:"Container for non-SVG content (HTML, MathML).",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},switch:{doc:"Conditional processing (renders first matching child).",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},dataSetter:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"destination",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"type",module:"builtins",name:"str"},has_default:!1},{name:"value",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"any"},has_default:!1},{name:"attr",kind:"var_keyword",role:"attribute",annotation:{kind:"any"},has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{data_element:!0}},dataFormula:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"destination",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"type",module:"builtins",name:"str"},has_default:!1},{name:"func",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"union",items:[{kind:"type",module:"builtins",name:"str"},{kind:"type",module:"collections.abc",name:"Callable"}]},has_default:!1},{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{data_element:!0}},dataController:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"func",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"union",items:[{kind:"type",module:"builtins",name:"str"},{kind:"type",module:"collections.abc",name:"Callable"}]},has_default:!1},{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{data_element:!0}}}};var Rn=class extends Le{static _name="svg";static _defaultRenderMode="svg";static{this.defineGrammar(qo)}get renderer_svg(){return new Lr(this)}};Le.registerBuilder(Rn);var Ya=["select","notnull","empty","case","len","min","max","email","regex","call","remote"],Rf=["nodup","exist","gridnodup"],Ln=t=>t==null||t==="",Ga=(t,e)=>t instanceof Promise?t.then(e):e(t);function jo(t,e,r={}){let n={value:t,modified:!1,error:null,warnings:[],issues:[],datachanges:[]},a=Object.fromEntries(Object.entries(e).map(([l,c])=>[l.slice(9),c])),i=l=>Object.hasOwn(e,`validate_${l}`)&&e[`validate_${l}`]!=null;for(let l of Rf)if(i(l))throw new Error(`validate_${l} requires the DB/grid integration.`);let s=(l,c,d=!1)=>r.invoke(l,e[l],{...a,value:c,result:n,validations:a,userChange:!0,signal:r.signal},d),o=(l,c)=>{if(c==null||c===!0)return;if(typeof c!="boolean"&&typeof c!="string"&&(typeof c!="object"||Array.isArray(c)))throw new TypeError("A validator returns true, false, null, an error code, or a result object/Bag.");let d=`validate_${l}`,f=c instanceof Mf?Object.fromEntries(c.getNodes().map(b=>[b.label,b.value])):typeof c=="object"?c:{errorcode:c===!1?"error":c};if(Object.hasOwn(f,"value")&&(n.modified||=!Object.is(n.value,f.value),n.value=f.value),f.data!=null&&(r.checkDataPatch(f.data),n.datachanges.push(f.data)),!f.errorcode)return;let p=e[`${d}_iswarning`]??f.iswarning??!!(e[`${d}_warning`]&&!e[`${d}_error`]),h=e[`${d}_${f.errorcode}`]||e[`${d}_${p?"warning":"error"}`]||f.message||e[`${d}_${p?"error":"warning"}`]||String(f.errorcode),m=Jt(h,b=>b?{...a,...f,value:n.value}[b]:n.value);if(m==null)throw new Error("A validation message references a missing value.");let _={rule:l,code:f.errorcode,severity:p?"warning":"error",message:m};n.issues.push(_),p?n.warnings.push(m):(n.error=m,n.required=!!f.required)},u=l=>{if(r.signal?.aborted)throw r.signal.reason;if(n.error||l===Ya.length)return n;let c=Ya[l],d=`validate_${c}`,f=e[d];if(!i(c)||f===!1&&c!=="empty")return u(l+1);let p=m=>{if(!m)return u(l+1);let _;return c==="remote"&&n.value==null?u(l+1):(c==="call"?_=s(d,n.value):c==="remote"?_=r.remote(f,{...Lf(e),value:n.value},r.signal):_=Pf(c,f,n.value,r),Ga(_,b=>{if(r.signal?.aborted)throw r.signal.reason;let v=()=>(o(c,b),u(l+1));return c==="remote"&&e.validate__onResult?Ga(r.invoke("validate__onResult",e.validate__onResult,{result:b,value:n.value,validations:a,signal:r.signal}),v):v()}))},h=e[`${d}_if`];return Ga(h==null?!0:typeof h=="boolean"?h:s(`${d}_if`,n.value,!0),p)};return u(0)}function Lf(t){let e=new Set(["if","error","warning","iswarning"]);return Object.fromEntries(Object.entries(t).filter(([r])=>r.startsWith("validate_remote_")&&!e.has(r.slice(16))).map(([r,n])=>[r.slice(16),n]))}function Pr(t,e,r={}){return{errorcode:t,message:e,...r}}function Pf(t,e,r,n){if(t==="select")return n.selection(r);if(t==="notnull")return Ln(r)&&e?Pr("notnull","A value is required.",{required:!0}):null;if(t==="empty")return Ln(r)?{value:e}:null;if(t==="len"){if(typeof e!="string"||!/^(?:\d+|\d+:\d*|:\d+)$/.test(e))throw new Error("Invalid validate_len: use a length or min:max.");let[a,i]=e.split(":"),s=Number(a||0),o=i===void 0?s:i===""?1/0:Number(i);if(s>o)throw new Error("Invalid validate_len: minimum exceeds maximum.");if(Ln(r))return;if(typeof r!="string")throw new TypeError("validate_len requires a text value.");return r.length<s||r.length>o?Pr(s===o?"wrong length":r.length<s?"too short":"too long",s===o?`Enter exactly ${s} characters.`:o===1/0?`Enter at least ${s} characters.`:s===0?`Enter no more than ${o} characters.`:`Enter between ${s} and ${o} characters.`):void 0}if(!Ln(r)){if(t==="case"){if(typeof r!="string")throw new TypeError("validate_case requires a text value.");switch(e){case"upper":case"u":return{value:r.toUpperCase()};case"lower":case"l":return{value:r.toLowerCase()};case"title":case"t":return{value:r.replace(/\p{L}[\p{L}\p{M}]*/gu,a=>a[0].toUpperCase()+a.slice(1).toLowerCase())};case"capitalize":case"c":return{value:r[0].toUpperCase()+r.slice(1).toLowerCase()};default:throw new Error("Invalid validate_case: use upper, lower, title or capitalize.")}}if(t==="min"||t==="max"){let a;if(n.isDecimal?.(r))a=r.comparedTo(e);else if(r instanceof Date&&e instanceof Date)a=r.getTime()-e.getTime();else if(typeof r=="number"&&Number.isFinite(r)&&typeof e=="number"&&Number.isFinite(e))a=r-e;else throw new TypeError(`validate_${t} requires matching numeric or date/time values.`);return(t==="min"?a<0:a>0)?Pr(t,`Value must be ${t==="min"?"at least":"at most"} ${e}.`):void 0}if(t==="email"){if(typeof r!="string")throw new TypeError("validate_email requires a text value.");return/^[^\s@]+@[^\s@]+\.[^\s@]+$/u.test(r)?null:Pr("email","Check email format.",{iswarning:!0})}if(t==="regex"){if(typeof r!="string"||typeof e!="string")throw new TypeError("validate_regex requires text.");let a=e.trim(),i=a.startsWith("!");return new RegExp(i?a.slice(1):a,"u").test(r)!==i?null:Pr("regex","The value does not match the required pattern.")}}}var $r={dtype:"T",nullable:!0,binding:"read"},Pn={dtype:"B",nullable:!0,binding:"read"},Xa={dtype:["T","L","N","R","B","D","H","DH","DHZ"],nullable:!0,binding:"read"},Vo={validate_select:Pn,validate_notnull:{...Pn,default:!1},validate_empty:Xa,validate_case:{...$r,enum:["upper","lower","title","capitalize","u","l","t","c"]},validate_len:$r,validate_min:Xa,validate_max:Xa,validate_email:Pn,validate_regex:$r,validate_call:{dtype:"T",nullable:!0},validate_remote:$r,validate_onAccept:{dtype:"T",nullable:!0},validate_onReject:{dtype:"T",nullable:!0},validate__onResult:{dtype:"T",nullable:!0},validate_timeout:{dtype:"L",nullable:!0,binding:"read"},...Object.fromEntries(Ya.flatMap(t=>[[`validate_${t}_if`,{dtype:["T","B"],nullable:!0}],[`validate_${t}_iswarning`,Pn],...["error","warning"].map(e=>[`validate_${t}_${e}`,{...$r,qualification:"intl_str"}])]))};function zo(t,e,{align:r="start",matchWidth:n=!1,inset:a=0,placement:i="bottom",point:s=null}={}){let o=e.ownerDocument.defaultView,u=s?{left:s.x,right:s.x,top:s.y,bottom:s.y,width:0}:e.getBoundingClientRect(),l=Math.max(0,o.innerWidth-16);t.style.setProperty("--gramlot-popup-available-width",`${l}px`),n&&(t.style.width=`${Math.min(Math.max(0,u.width-2*a),l)}px`),t.style.removeProperty("--gramlot-popup-available-height");let c=t.getBoundingClientRect();if(i==="side"){let b=Math.max(0,o.innerWidth-8-u.right-3),v=Math.max(0,u.left-8-3),w=c.width>b&&v>b;t.style.setProperty("--gramlot-popup-available-width",`${w?v:b}px`),t.style.setProperty("--gramlot-popup-available-height",`${Math.max(0,o.innerHeight-16)}px`);let x=t.getBoundingClientRect(),B=w?u.left-x.width-3:u.right+3;t.style.left=`${Math.max(8,Math.min(B,o.innerWidth-x.width-8))}px`,t.style.top=`${Math.max(8,Math.min(u.top,o.innerHeight-x.height-8))}px`;return}let d=Math.max(0,o.innerHeight-8-u.bottom-3),f=Math.max(0,u.top-8-3),p=c.height>d&&f>d;t.style.setProperty("--gramlot-popup-available-height",`${p?f:d}px`);let h=t.getBoundingClientRect(),m=r==="end"?u.right-h.width-a:u.left+a,_=p?u.top-h.height-3:u.bottom+3;t.style.left=`${Math.max(8,Math.min(m,o.innerWidth-h.width-8))}px`,t.style.top=`${Math.max(8,Math.min(_,o.innerHeight-h.height-8))}px`}var $f=1800,Ho=200;function Et(t){return class extends t{get supportsFormValidation(){return!0}connectedCallback(){super.connectedCallback(),this.pageContext?.form&&this.pageContext.formValidate()}#e=!1;#t;#r;#o;#a;#u=0;#i;#s={};validationResult=null;constructor(){super(),this.message=this.ownerDocument.createElement("small"),this.message.id="field-message",this.message.hidden=!0,this.message.setAttribute("aria-live","polite"),this.message.setAttribute("popover","manual"),this.message.setAttribute("role","tooltip");let e=this.ownerDocument.createElement("style");e.textContent=`#control[aria-invalid="true"]{background:var(--gramlot-error-background,#fff1f0)}
|
|
34
|
+
${" ".repeat(a)}</${s}>`:`<${s}${u}>${f}</${s}>`:r===null||r.includes(s)?`<${s}${u}/>`:`<${s}${u}></${s}>`}if(l==null||l==="")return r===null||r.includes(s)?`<${s}${u}/>`:`<${s}${u}></${s}>`;let c=l instanceof Date&&!Number.isNaN(l.getTime())?sf(l):String(l),d=this._escapeXml(c);return`<${s}${u}>${d}</${s}>`}_sanitizeTag(e){return e?e.replace(/[^a-zA-Z0-9_\-.:]/g,"_"):"_none_"}_escapeXml(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}_escapeAttr(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}static fromXml(e,r={}){let{tagAttribute:n=null}=r,a;if(typeof DOMParser<"u"){a=new DOMParser().parseFromString(e,"application/xml");let s=a.querySelector("parsererror");if(s)throw new Error(`XML parse error: ${s.textContent}`)}else a=new po.DOMParser().parseFromString(e,"application/xml");return this._xmlElementToBag(a.documentElement,n)}static _xmlElementToBag(e,r=null){let n=new this,a=Array.from(e.childNodes).filter(i=>i.nodeType===1);for(let i of a){let s=i.tagName,o={};for(let m=0;m<i.attributes.length;m++){let g=i.attributes[m];o[g.name]=g.value}let u=Sn(o._resolver);u&&delete o._resolver;let l=String(o._T||"").toUpperCase()==="BAG";Object.assign(o,Pa(o));let c=s;"_tag"in o&&(c=o._tag,delete o._tag),r&&r in o&&(c=o[r],delete o[r]);let d=c,f=1;for(;n.getNode(c);)c=`${d}_${f++}`;let p=Array.from(i.childNodes).filter(m=>m.nodeType===1),h;if(p.length>0||l){let m=this._xmlElementToBag(i,r);h=n.setItem(c,m,Object.keys(o).length>0?o:null)}else{let m=i.textContent||"";h=n.setItem(c,m,Object.keys(o).length>0?o:null)}u&&(h.resolver=u),h.xmlTag=s}return n}static async fromUrl(e,r={}){let{timeout:n=30}=r,a={};n&&(a.signal=AbortSignal.timeout(n*1e3));let i=await fetch(e,a),s=i.headers.get("content-type")||"",o=await i.text();if(s.includes("json"))return t.fromTytx(o);if(s.includes("xml"))return t.fromXml(o);let u=o.trim();if(u.startsWith("<"))return t.fromXml(o);if(u.startsWith("{")||u.startsWith("["))return t.fromTytx(o);throw new Sr(`Unsupported content-type: ${s}`)}toJson(e=!0){let r=[];for(let n of this._nodes)r.push(this._nodeToJsonDict(n,e));return e?be(r):JSON.stringify(r)}_nodeToJsonDict(e,r){let n=e.resolver?null:e.getValue(!0);if(n&&typeof n._nodeToJsonDict=="function"){let i=[];for(let s of n._nodes)i.push(n._nodeToJsonDict(s,r));n=i}let a={label:e.label,value:n,attr:On(e.attr)};return e.nodeTag!==null&&(a.tag=e.nodeTag),e.resolver&&(a.resolver=Nr(e.resolver)),a}static fromJson(e,r={}){return fo||(console.warn("Bag.fromJson is deprecated; use Bag.fromTytx"),fo=!0),this.fromTytx(e,"json",r)}toStringTree(e=!0,r=null,n="",a=!0){r===null&&(r=new Map);let i=[],s=[...this._nodes];for(let o=0;o<s.length;o++){let u=s[o],l=o===s.length-1,c=u.getValue(e),d=u.getAttr(),f="",p=Object.keys(d);p.length>0&&(f=" ["+p.map(b=>`${b}=${JSON.stringify(d[b])}`).join(", ")+"]");let h=l?"\u2514\u2500\u2500 ":"\u251C\u2500\u2500 ",m=n+(l?" ":"\u2502 ");if(c instanceof t){let g=u,b=c.backref?"(*)":"";if(r.has(g))i.push(`${n}${h}${u.label}${b}${f} \u2192 (circular ref)`);else{r.set(g,u.label),i.push(`${n}${h}${u.label}${b}${f}`);let v=c.toStringTree(e,r,m,l);v&&i.push(v)}}else{let g;if(c===null)g="null";else if(c===void 0)g="undefined";else if(c instanceof ArrayBuffer||c instanceof Uint8Array){let b=new TextDecoder("utf-8",{fatal:!1}),v=c instanceof ArrayBuffer?new Uint8Array(c):c;g=b.decode(v)}else typeof c=="string"?c.length>50?g=JSON.stringify(c.slice(0,47)+"..."):g=JSON.stringify(c):g=String(c);i.push(`${n}${h}${u.label}: ${g}${f}`)}}return i.join(`
|
|
35
|
+
`)}toString(e=!0,r=null,n=""){r||(r=new Set);let a=[],i=[...this._nodes];for(let s=0;s<i.length;s++){let o=i[s],u=s===i.length-1,l=o.getValue(e),c="",d=o.attr;d&&Object.keys(d).length>0&&(c=` [${Object.entries(d).map(([m,g])=>`${m}=${JSON.stringify(g)}`).join(", ")}]`);let f=u?"\u2514\u2500\u2500 ":"\u251C\u2500\u2500 ",p=n+(u?" ":"\u2502 ");if(l&&typeof l._htraverse=="function"){let h=o;if(r.has(h))a.push(`${n}${f}${o.label}${c} \u2192 (circular ref)`);else{r.add(h),a.push(`${n}${f}${o.label}${c}`);let m=l.toString(e,r,p);m&&a.push(m)}}else{let h;l==null?h="null":typeof l=="string"&&l.length>50?h=JSON.stringify(l.slice(0,47)+"..."):typeof l=="string"?h=JSON.stringify(l):h=String(l),a.push(`${n}${f}${o.label}: ${h}${c}`)}}return a.join(`
|
|
36
|
+
`)}},Sr=class extends Error{constructor(e){super(e),this.name="BagException"}};te.registerBagClass(ae);Ra(ae,"X",t=>t._toTytxPayload(),t=>ae._fromTytxPayload(t));Dr(ae.tytxSuffix,{...je(ae.tytxSuffix),Bag:ae});var mo=new Set(["False","None","True","and","as","assert","async","await","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","nonlocal","not","or","pass","raise","return","try","while","with","yield"]);function go(t){return t.endsWith("_")&&mo.has(t.slice(0,-1))?t.slice(0,-1):t}function _o(t){let e=go(t);return e!==t?e:t.startsWith("_")&&mo.has(t.slice(1))?t.slice(1):t}function qa(t,{renderTag:e=null,ns:r=null,dialectName:n=null}={}){let a=e||t;if(!a)return a;if(a=go(a),r&&!e){let i=`${n}_`;a.startsWith(i)&&(a=a.slice(i.length)),a=`${r}:${a}`}return a}var Zt=Symbol("value"),wo=new Set(["_meta","datapath","nodeId","ns","form","formId","_anchor","updateOn"]);function yo(t){return Object.entries(t||{}).filter(([e])=>!wo.has(e)).map(([e,r])=>[_o(e),r])}var Yt=class extends Ve{constructor(e,r,n=null,a=null,i=null,s=null,o=null){super(e,r,n,a,i,s,o),this._builder=e?._insertingBuilder??e?._builder??null,this._targetId=null}get builder(){if(this._builder)return this._builder;let e=this.parentBag;return e?e._builder:null}get data(){return this.builder.data}get rootBuilder(){return this.parentBag.root._builder}_getMeta(e){let r=this.getAttr("_meta")||{},n=e.split(",").map(a=>a.trim());return n.length===1?r[n[0]]!==void 0?r[n[0]]:null:n.map(a=>r[a]!==void 0?r[a]:null)}pointerType(e){return typeof e=="string"&&(e[0]==="^"||e[0]==="=")&&!e.startsWith("==")?e[0]:null}pointers(){this.builder.validateCustomTypes(this);let e=[];for(let[r,n]of Object.entries(this.getAttr()||{}))this.pointerType(n)==="^"&&e.push([r,n.split(":",1)[0]]);return this.pointerType(this.value)==="^"&&e.push(["",this.value.split(":",1)[0]]),e}fixedAttrItems(){return yo(this.getAttr())}runtimeToEvaluate(){let e=new Map(this.fixedAttrItems());return e.set(Zt,this.value),e}absDatapath(e){let r=e;this.pointerType(e)&&(e=(Ze(e)?.pointer??e).slice(1));let n=null;return e.includes("?")&&([e,n]=e.split("?",2)),e.startsWith("#")?this._finalizeAbsPath(this._resolveSymbolicDatapath(e,r),n):(e.startsWith(".")&&(e=this._composeRelativeDatapath(e,r)),this._finalizeAbsPath(e,n))}_finalizeAbsPath(e,r){return e=this._collapseParentDatapath(e,e),r?`${e}?${r}`:e}_composeRelativeDatapath(e,r){let n=this;for(;n!==null&&e.startsWith(".");){let a=n.getAttr("datapath");a!=null&&(e=e==="."?a:a+e),n=n.parentNode}if(e.startsWith("."))throw new Error(`unresolved relative datapath: ${r}`);return e}_collapseParentDatapath(e,r){let n=[];for(let a of e.split("."))if(a==="#parent"){if(n.length===0)throw new Error(`#parent has no segment to cancel: ${r}`);n.pop()}else n.push(a);return n.join(".")}_resolveSymbolicDatapath(e,r){let n=e.slice(1),a=n.indexOf("."),i=a===-1?n:n.slice(0,a),s=a===-1?"":n.slice(a+1),o;if(i==="FORM")o=this._findMarkedDatapathAncestor(!0,!1,r);else if(i==="ANCHOR")o=this._findMarkedDatapathAncestor(!1,!0,r);else{let u=this.rootBuilder;if(!u)throw new Error(`#<id>: cannot resolve ${r} on a node without builder`);if(o=u.source.getNodeByAttr("nodeId",i),o==null)throw new Error(`#<id>: cannot resolve ${r}`)}return o.absDatapath(s?`.${s}`:".")}_findMarkedDatapathAncestor(e,r,n){let a=this;for(;a!=null;){let s=a.getAttr()||{};if(e&&(s.formId!=null||s.form===!0)||r&&"_anchor"in s)return a;a=a.parentNode}let i=e?"FORM":"ANCHOR";throw new Error(`#${i}: no marked ancestor found for ${n}`)}getRelativeData(e,r=null,{autocreate:n=!1}={}){let a=this.data,i=this.absDatapath(e);return n&&a.getItem(i)==null&&a.setItem(i,r),a.getItem(i,r)}setRelativeData(e,r,{attributes:n=null,fired:a=!1,reason:i=null}={}){let s=this.data,o=this.absDatapath(e);s.setItem(o,r,n,">",!1,!0,i===null?!0:i,a)}fireEvent(e,r=!0,{attributes:n=null,reason:a=null}={}){this.setRelativeData(e,r,{attributes:n,fired:!0,reason:a})}SET(e,r){this.setRelativeData(e,r)}GET(e){return this.getRelativeData(e)}PUT(e,r){this.setRelativeData(e,r,{reason:!1})}FIRE(e,r=!0){this.setRelativeData(e,r,{fired:!0})}},H=class t extends ae{constructor(e=null,r=null){super(e),this._builder=r,this._insertingBuilder=null}get nodeClass(){return Yt}_setBuilderItem(e,r,n,...a){let i=r?.map(([o])=>[o,o._builder])||null;if(r)for(let[o,u]of r)o._builder=u;let s=this._insertingBuilder;this._insertingBuilder=e;try{return this.setItem(n,...a)}catch(o){if(this.node(n)==null&&i)for(let[u,l]of i)u._builder=l;throw o}finally{this._insertingBuilder=s}}bindBuilder(e){if(!e)throw new Error("SourceBag.bindBuilder requires a builder");let r=this._builderBindingPlan(e);for(let[n,a]of r)n._builder=a;return this.setBackref(),this}_builderBindingPlan(e){let r=[],n=new WeakSet,a=(i,s)=>{if(n.has(i))throw new Error("source contains a cyclic or shared SourceBag branch");n.add(i),r.push([i,s]);for(let o of i.getNodes()){let u=s,l=o._getMeta("subbuilder");l!=null&&(u=s._resolveSubbuilderReference(l,o.getAttr()||{},o.nodeTag)),r.push([o,u]);let c=o.getValue(!0);c instanceof t&&a(c,u)}};return a(this,e),r}};if((je(H.tytxSuffix).SourceBag??H)!==H)throw new Error("TYTX subtype name 'SourceBag' is already registered for another class");Dr(H.tytxSuffix,{...je(H.tytxSuffix),SourceBag:H});function cf(t){if(t.length===0)return{value:null,attrs:{}};let e=t[0];if(e!==null&&typeof e=="object"){let r=Object.getPrototypeOf(e);if(r===Object.prototype||r===null)return{value:null,attrs:e}}return{value:e,attrs:t[1]||{}}}var df=new Set(["then","toJSON"]),vo=new WeakMap;function Or(t){return vo.get(t)||t}function ja(t){if(t==null)return t;t=Or(t);let e=t._builder||t.parentBag&&t.parentBag._builder;return e?e.wrapSource(t):t}function ko(t,e){let r=e instanceof ae,n=new Proxy(e,{get(a,i){if(typeof i=="symbol"||i.startsWith("_")||df.has(i))return Reflect.get(a,i,a);let s=t.schemaTag(i);if(r&&s)return bo(t,a,s,r);if(i in a){let u=Reflect.get(a,i,a);return typeof u=="function"?u.bind(a):u}if(s)return bo(t,a,s,r);let o=t.containerMethod(i);if(o)return(...u)=>t[o](t.wrapSource(a),...u)}});return vo.set(n,e),n}function bo(t,e,r,n){return(...a)=>{let{value:i,attrs:s}=cf(a),o=n?t.bagCall(e,r,i,s):t.commandOnNode(e,r,i,s);return o.builder.wrapSource(o)}}var xo=/^[A-Za-z_][A-Za-z0-9_]*$/,ff=new Set(["positional_only","positional_or_keyword","keyword_only","var_positional","var_keyword"]),pf=new Set(["framework","value","attribute"]),hf=new Map([["builtins.str",t=>typeof t=="string"],["builtins.int",t=>Number.isInteger(t)],["builtins.float",t=>typeof t=="number"&&Number.isFinite(t)],["builtins.bool",t=>typeof t=="boolean"],["builtins.list",t=>Array.isArray(t)],["builtins.dict",t=>t!==null&&typeof t=="object"&&!Array.isArray(t)],["builtins.tuple",t=>Array.isArray(t)],["builtins.set",t=>Array.isArray(t)||t instanceof Set],["builtins.NoneType",t=>t===null],["builtins.object",t=>!0]]);function wt(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function k(t,e){throw new TypeError(`${t}: ${e}`)}function Re(t,e,r,n){wt(t)||k(n,"must be an object");for(let a of Object.keys(t))e.includes(a)||k(n,`unknown field '${a}'`);for(let a of r)Object.hasOwn(t,a)||k(n,`missing field '${a}'`)}function yt(t,e){if(!(t===null||typeof t=="string"||typeof t=="boolean")&&!(typeof t=="number"&&Number.isFinite(t))){if(Array.isArray(t))return t.forEach((r,n)=>yt(r,`${e}[${n}]`));if(wt(t))return Object.entries(t).forEach(([r,n])=>yt(n,`${e}.${r}`));k(e,"must be lossless JSON data")}}function mf(t,e){let r="",n=!1;for(let a=0;a<t.length;a++){let i=t[a];if(i==="\\"){r+=i+(t[++a]??"");continue}i==="["&&(n=!0),!n&&i==="."&&!(e&16)?r+="[^\\n]":!n&&i==="^"&&e&8?r+="(?:^|(?<=\\n))":!n&&i==="$"?r+=e&8?"(?=\\n|(?![\\s\\S]))":"(?=\\n?(?![\\s\\S]))":r+=i,i==="]"&&(n=!1)}return r}function bt(t,e,r=!1,n=null){if(t===null)return null;switch(Re(t,["kind","dtype","module","name","origin","arguments","items","values","base","metadata","pattern","flags","ge","le","gt","lt","value"],["kind"],e),t.kind){case"custom":return Re(t,["kind","name"],["kind","name"],e),n||k(e,"custom references require a catalog; nested catalog references are unsupported"),n.resolve(t.name,e);case"dtype":{Re(t,["kind","dtype"],["kind","dtype"],e);let a=t.dtype;typeof a!="string"&&k(e,"dtype must be a string");let i=xr(a);return!i&&a!=="NN"&&k(e,`unknown dtype '${a}'`),{...t,test:o=>a==="NN"?o===null:a==="N"?Ae(o)&&!["NaN","Infinity","-Infinity"].includes(o.toString()):i===Number?typeof o=="number"&&Number.isFinite(o)&&(a!=="L"||Number.isInteger(o)):i===String?typeof o=="string":i===Boolean?typeof o=="boolean":i===Date?o instanceof Date&&Number.isFinite(o.getTime()):i===Object?wt(o)&&[Object.prototype,null].includes(Object.getPrototypeOf(o)):o instanceof i}}case"any":return{...t,test:a=>!0};case"type":{(typeof t.module!="string"||typeof t.name!="string")&&k(e,"type requires string module/name");let a=`${t.module}.${t.name}`;if(a==="collections.abc.Callable")return{...t,test:s=>typeof s=="function",portable:!1};let i=hf.get(a);return i||k(e,`unsupported type '${a}'`),{...t,test:i}}case"union":{(!Array.isArray(t.items)||!t.items.length)&&k(e,"union items must be non-empty");let a=t.items.map((i,s)=>bt(i,`${e}.items[${s}]`,!0,n));return{...t,items:a,inputConstraint:a.some(i=>i.inputConstraint),test:i=>a.some(s=>s.test&&s.test(i))}}case"literal":return Array.isArray(t.values)||k(e,"literal values must be an array"),t.values.forEach((a,i)=>yt(a,`${e}.values[${i}]`)),{...t,test:a=>t.values.some(i=>Object.is(i,a))};case"annotated":{Array.isArray(t.metadata)||k(e,"annotated metadata must be an array"),t.metadata.some(s=>!["regex","range","value"].includes(s?.kind))&&k(e,"unsupported annotation metadata kind");let a=bt(t.base,`${e}.base`,!0,n),i=t.metadata.map((s,o)=>bt(s,`${e}.metadata[${o}]`,!0,n));return{...t,base:a,metadata:i,inputConstraint:a.inputConstraint,test:s=>a.test(s)&&i.every(o=>!o.test||o.test(s))}}case"range":{for(let a of["ge","le","gt","lt"])Object.hasOwn(t,a)||k(e,`range missing '${a}'`);for(let a of["ge","le","gt","lt"])t[a]!==null&&(typeof t[a]!="number"||!Number.isFinite(t[a]))&&k(e,`${a} must be finite number or null`);return{...t,test:a=>typeof a=="number"&&(t.ge===null||a>=t.ge)&&(t.le===null||a<=t.le)&&(t.gt===null||a>t.gt)&&(t.lt===null||a<t.lt)}}case"regex":{(typeof t.pattern!="string"||!Number.isInteger(t.flags)||t.flags<0)&&k(e,"regex requires pattern and non-negative integer flags");let a=t.flags&-59;a&&k(e,`unsupported Python regex flags ${a}`),t.flags&2&&k(e,"IGNORECASE is not portable across Python and JavaScript Unicode rules"),/\\[AZzUwWdDsSabBN0-9]|\(\?P[<=!]|\(\?\(|\(\?>|\(\?#|\(\?[aiLmsux-]|[+*?}]\+|\{,/.test(t.pattern.replaceAll(String.raw`[\s\S]`,"."))&&k(e,"regex uses a non-portable construct or character class");let i="uy";t.flags&16&&(i+="s");let s;try{s=new RegExp(`(?:${mf(t.pattern,t.flags)})(?![\\s\\S])`,i)}catch(o){k(e,`invalid portable regex: ${o.message}`)}return{...t,test:o=>typeof o!="string"?!1:(s.lastIndex=0,s.test(o))}}case"value":return yt(t.value,`${e}.value`),{...t};case"generic":{let a=bt(t.origin,`${e}.origin`,!0,n);(t.origin?.kind!=="type"||t.origin.module!=="builtins"||!["list","dict","tuple","set"].includes(t.origin.name))&&k(e,"only list, dict, tuple and set generic origins are supported"),Array.isArray(t.arguments)||k(e,"generic arguments must be an array");let i=t.arguments.map((s,o)=>bt(s,`${e}.arguments[${o}]`,!0,n));return{...t,origin:a,arguments:i,inputConstraint:i.some(s=>s.inputConstraint),test:s=>a.test(s)&&gf(t.origin,i,s)}}case"arguments":k(e,"Callable argument-list descriptors are not supported by Python validation");case"ellipsis":return r||k(e,"ellipsis is only valid as a nested descriptor"),{...t};default:k(e,`unknown annotation kind '${t.kind}'`)}}function gf(t,e,r){let n=`${t.module}.${t.name}`;return n==="builtins.tuple"&&e.length&&e[1]?.kind!=="ellipsis"?r.length===e.length&&r.every((a,i)=>e[i].test(a)):n==="builtins.list"||n==="builtins.set"||n==="builtins.tuple"?[...r].every(a=>!e[0]?.test||e[0].test(a)):n==="builtins.dict"?Object.entries(r).every(([a,i])=>(!e[0]?.test||e[0].test(a))&&(!e[1]?.test||e[1].test(i))):!1}function Do(t,e){if(t===null)return null;if(typeof t!="string"&&k(e,"must be string or null"),t==="")return new Map;let r=new Map;for(let n of t.split(",")){let a=n.trim();/^[A-Za-z_][A-Za-z0-9_]*\[\]$/.test(a)&&k(e,`invalid cardinality item '${n}'`);let i=a.match(/^([A-Za-z_][A-Za-z0-9_]*|\*)(?:\[(?:(\d+)|(?:(\d*):(\d*)))\])?$/);i||k(e,`invalid cardinality item '${n}'`);let[,s,o,u,l]=i;r.has(s)&&k(e,`duplicate tag '${s}'`);let c=0,d=1/0;a.includes("[")&&(a.includes(":")?(c=u?Number(u):0,d=l?Number(l):1/0):c=d=Number(o)),d<c&&k(e,`maximum ${d} is below minimum ${c}`),r.set(s,{min:c,max:d})}return r.has("*")&&r.size>1&&k(e,"wildcard '*' cannot be combined with named tags"),r}function Ao(t,e){if(t===null)return null;typeof t!="string"&&k(e,"must be string or null");let r=new Set;for(let n of t.split(",")){let a=n.trim();a&&((!xo.test(a)||r.has(a))&&k(e,`invalid or duplicate parent '${n}'`),r.add(a))}return r}function _f(t,e,r){if(t===null)return null;Re(t,["parameters","accepts_var_keyword","accepts_var_positional"],[],e);let n=t.parameters??[];Array.isArray(n)||k(e,"parameters must be an array"),t={parameters:n,accepts_var_keyword:n.some(u=>u.kind==="var_keyword"),accepts_var_positional:n.some(u=>u.kind==="var_positional"),...t},(!Array.isArray(t.parameters)||typeof t.accepts_var_keyword!="boolean"||typeof t.accepts_var_positional!="boolean")&&k(e,"invalid signature descriptor");let a=new Set,i=!1,s=!1,o=t.parameters.map((u,l)=>{let c=`${e}.parameters[${l}]`;return Re(u,["name","kind","role","annotation","has_default","default"],["name","kind","role","annotation","has_default"],c),(typeof u.name!="string"||!xo.test(u.name)||a.has(u.name))&&k(c,"invalid or duplicate parameter name"),a.add(u.name),(!ff.has(u.kind)||!pf.has(u.role)||typeof u.has_default!="boolean")&&k(c,"invalid kind, role, or has_default"),u.has_default!==Object.hasOwn(u,"default")&&k(c,"default presence must equal has_default"),u.has_default&&yt(u.default,`${c}.default`),i||=u.kind==="var_keyword",s||=u.kind==="var_positional",{...u,annotation:bt(u.annotation,`${c}.annotation`,!1,r)}});return(i!==t.accepts_var_keyword||s!==t.accepts_var_positional)&&k(e,"variadic summary flags do not match parameters"),{...t,parameters:o}}function Eo(t,e,r,n){let a=["doc","sub_tags","parent_tags","inherits_from","ns","attributes",...r?["node_label","collection_key"]:[],"_meta"];Re(t,a,[],e),t={...Object.fromEntries(a.map(i=>[i,null])),...t};for(let i of["doc","inherits_from","ns",...r?["node_label","collection_key"]:[]])t[i]!==null&&typeof t[i]!="string"&&k(e,`${i} must be string or null`);return t._meta!==null&&(wt(t._meta)||k(e,"_meta must be object or null"),yt(t._meta,`${e}._meta`)),Do(t.sub_tags,`${e}.sub_tags`),Ao(t.parent_tags,`${e}.parent_tags`),{...t,attributes:_f(t.attributes,`${e}.attributes`,n)}}function To(t){return t?t.split(",").map(e=>e.trim()).filter(Boolean):[]}function Co(t,e){let r={...e};for(let[n,a]of Object.entries(t))n==="inherits_from"||n.startsWith("_")||r[n]||(r[n]=a);return r._meta={...t._meta||{},...e._meta||{}},r}function No(t){let e={...t};return e._subSpec=Object.hasOwn(e,"sub_tags")?Do(e.sub_tags,"resolved.sub_tags"):null,e._parentSpec=Object.hasOwn(e,"parent_tags")?Ao(e.parent_tags,"resolved.parent_tags"):null,e}function So(t,e,r,n){if(r.get(t)===1&&k(n,`inheritance cycle at '${t}'`),r.get(t)===2)return e[t];let a=e[t];a||k(n,`unknown abstract '${t}'`),r.set(t,1);let i={...a};for(let s of To(a.inherits_from))i=Co(So(s,e,r,n),i);return i=No(i),r.set(t,2),e[t]=i,i}function Va({abstracts:t={},elements:e={}}){let r={...t},n=new Map;for(let i of Object.keys(r))So(i,r,n,`abstracts.${i}.inherits_from`);let a={};for(let[i,s]of Object.entries(e)){let o={...s};for(let u of To(s.inherits_from)){let l=r[u];l||k(`elements.${i}.inherits_from`,`unknown abstract '${u}'`),o=Co(l,o)}a[i]=No(o)}return{abstracts:r,elements:a}}function za(t){Re(t,["document_format","grammar","abstracts","elements","custom_types"],["document_format","grammar","abstracts","elements"],"grammar document"),Re(t.document_format,["name","version"],["name","version"],"document_format"),(t.document_format.name!=="builder_grammar"||!["1.1","1.2"].includes(t.document_format.version))&&k("document_format","expected builder_grammar version 1.1 or 1.2"),Re(t.grammar,["name","version","title","description"],["name","version","title","description"],"grammar"),(typeof t.grammar.name!="string"||!t.grammar.name)&&k("grammar.name","must be non-empty string");for(let a of["version","title","description"])t.grammar[a]!==null&&typeof t.grammar[a]!="string"&&k(`grammar.${a}`,"must be string or null");(!wt(t.abstracts)||!wt(t.elements))&&k("grammar document","abstracts/elements must be objects"),Object.hasOwn(t,"custom_types")&&t.document_format.version!=="1.2"&&k("custom_types","requires version 1.2");let e=Bn.fromJSON(t.custom_types??{}),r={};for(let[a,i]of Object.entries(t.abstracts))(!a||a.startsWith("_"))&&k("abstracts",`invalid public name '${a}'`),r[a]=Eo(i,`abstracts.${a}`,!1,e);let n={};for(let[a,i]of Object.entries(t.elements))(!a||a.startsWith("_"))&&k("elements",`invalid public name '${a}'`),n[a]=Eo(i,`elements.${a}`,!0,e);return{grammar:structuredClone(t.grammar),abstracts:r,elements:n}}function Oo(t,e,r,n){let a=e.attributes;if(!a)return;let i={...n};r!=null&&(i.node_value=r);let s=new Set(a.parameters.filter(l=>l.role==="attribute").map(l=>l.name)),o=new Set(["node_label","node_position","nodeId","target_id","datapath","iterate","store","_tag","_meta","ns"]);if(!a.accepts_var_keyword)for(let l of Object.keys(n))!s.has(l)&&!o.has(l)&&k(t,`unknown attribute '${l}'`);let u=e._meta?.component?a.parameters.find(l=>l.role!=="framework"&&["positional_only","positional_or_keyword"].includes(l.kind))?.name:null;for(let l of a.parameters){if(l.name===u||l.role==="framework"||l.kind.startsWith("var_"))continue;let c=Object.hasOwn(i,l.name);!c&&!l.has_default&&k(t,`missing required ${l.role} '${l.name}'`),c&&l.annotation!==null&&(!l.annotation.test||!l.annotation.test(i[l.name]))&&k(t,`invalid value for ${l.role} '${l.name}'`)}}var Bn=class t{#e=new Map;#t=new Map;register(e,r,n){let a=new Map([[String,"str"],[Number,"float"],["string","str"],["integer","int"],["number","float"]]),i=a.has(r)?{kind:"type",module:"builtins",name:a.get(r)}:r;return this.#r(e,{kind:"annotated",base:i,metadata:[n]})}#r(e,r){(typeof e!="string"||!/^[A-Za-z][A-Za-z0-9_]*$/.test(e)||e in this||["to_dict","from_dict"].includes(e)||bf.has(e))&&k("custom_types",`invalid, reserved or duplicate name '${e}'`),Re(r,["kind","base","metadata"],["kind","base","metadata"],`custom_types.${e}`),(r.kind!=="annotated"||!Array.isArray(r.metadata)||r.metadata.length!==1||!["regex","range"].includes(r.metadata[0]?.kind))&&k(`custom_types.${e}`,"requires an annotated base with one Regex or Range validator");let n=r.metadata[0].kind==="regex"?["str"]:["int","float"];(r.base?.kind!=="type"||r.base.module!=="builtins"||!n.includes(r.base.name))&&k(`custom_types.${e}`,"portable Regex requires str; portable Range requires int or float"),yt(r,`custom_types.${e}`);let a=structuredClone(r),i=bt(a,`custom_types.${e}`),s=Object.freeze({kind:"custom",name:e});return Object.defineProperty(this,e,{value:s,enumerable:!0}),this.#e.set(e,a),this.#t.set(e,{...s,inputConstraint:!0,test:i.test}),s}resolve(e,r="custom_types"){return this.#t.has(e)||k(r,`unknown custom type '${e}'`),{...this.#t.get(e)}}validate(e,r){return this.resolve(e).test(r)||k(`custom_types.${e}`,"invalid input value"),!0}toJSON(){return structuredClone(Object.fromEntries(this.#e))}static fromJSON(e){wt(e)||k("custom_types","must be an object");let r=new t;for(let[n,a]of Object.entries(e))r.#r(n,a);return r}},bf=new Set("False None True and as assert async await break class continue def del elif else except finally for from global if import in is lambda nonlocal not or pass raise return try while with yield".split(" "));function Bo(t,e,r,n){let a=e?.attributes;if(a)for(let i of a.parameters){if(!i.annotation?.inputConstraint||i.role==="framework"||["var_keyword","var_positional"].includes(i.kind))continue;let s=i.role==="value"?r:n[i.name];s!==void 0&&(i.annotation.test(s)||k(t,`invalid input for '${i.name}' (custom type)`))}}function Io(t,e,r=[]){if(e===null)return structuredClone(t);if(r.length===2&&r[0]==="custom_types"&&t!==void 0){if(!Ha(t,e))throw new TypeError(`conflicting custom type '${r[1]}'`);return structuredClone(t)}if(r.length===2&&["abstracts","elements"].includes(r[0]))return structuredClone(e);if(ze(t)&&ze(e)){let n=structuredClone(t);for(let[a,i]of Object.entries(e))i!==null&&Object.defineProperty(n,a,{value:Io(n[a],i,[...r,a]),enumerable:!0,writable:!0,configurable:!0});return n}return structuredClone(e)}function Ha(t,e){return Object.is(t,e)?!0:Array.isArray(t)&&Array.isArray(e)?t.length===e.length&&t.every((r,n)=>Ha(r,e[n])):ze(t)&&ze(e)?Object.keys(t).length===Object.keys(e).length&&Object.keys(t).every(r=>Object.hasOwn(e,r)&&Ha(t[r],e[r])):!1}function ze(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&Object.getPrototypeOf(t)===Object.prototype}function Wa(t){if(!(t===null||typeof t=="string"||typeof t=="boolean")&&!(typeof t=="number"&&Number.isFinite(t))){if(Array.isArray(t)){t.forEach(Wa);return}if(ze(t)){Object.values(t).forEach(Wa);return}throw new TypeError("collection must contain only finite JSON values")}}var He=class t{#e;constructor(e){Wa(e);let r=["document_format","grammar","abstracts","elements"];if(!ze(e)||Object.keys(e).some(a=>![...r,"custom_types"].includes(a))||r.some(a=>!Object.hasOwn(e,a)))throw new TypeError("collection requires document_format, grammar, abstracts and elements");let n=e.document_format;if(!ze(n)||Object.keys(n).length!==2||n.name!=="builder_grammar"||!["1.1","1.2"].includes(n.version))throw new TypeError("expected builder_grammar version 1.1 or 1.2");for(let a of["grammar","abstracts","elements"])if(!ze(e[a]))throw new TypeError(`${a} must be an object`);if(Object.hasOwn(e,"custom_types")&&(n.version!=="1.2"||!ze(e.custom_types)))throw new TypeError("custom_types requires an object catalog and version 1.2");this.#e=structuredClone(e)}update(e){let r=new t(e),n=Io(this.#e,r.#e);return(this.#e.document_format.version==="1.2"||r.#e.document_format.version==="1.2")&&(n.document_format.version="1.2"),this.#e=n,this}toDocument(){return structuredClone(this.#e)}};var vt=class{static renderType="string";static mode=null;constructor(e){this._builder=e,this.renders=new Map([[e,this]])}get builder(){return this._builder}get renderType(){return this.constructor.renderType}get mode(){return this.constructor.mode}addRender(e,r){this.renders.set(e,r)}getRender(e){let r=this.renders.get(e);if(r!==void 0)return r;let n=e.getRenderer();return this.renders.set(e,n),n}render(e,r={}){let n=e.builder,[a,i]=n.runtimeValues(e);if(e._getMeta("data_element"))return null;if(e._getMeta("component"))return this._renderComponent(e,i,r);let s=this.getRender(n),o;return[o,i]=s._handleMeta(e,i),e._getMeta("subbuilder")||(i=s.adaptAttrs(i)),e.value instanceof H&&(a=this.renderChildren(e.value,r)),s.renderedItem(e,a,i,{tag:o,...r})}renderChildren(e,r={}){let n=[];for(let a of e.getNodes()){let i=this.render(a,r);i!==null&&(Array.isArray(i)?n.push(...i):n.push(i))}return n}_renderComponent(e,r,n){let[a,i,s,o]=this._expansionInputs(e,r);if(!Object.hasOwn(e.getAttr(),"iterate"))return this._expandBlock(e,a,s,o,n);if(i==null)return[];if(!(i instanceof ae))throw new TypeError(`component '${e.nodeTag}': iterate must resolve to a Bag, got ${i?.constructor?.name||typeof i}`);return i.getNodes().map(u=>this._expandBlock(e,a,s,{node_label:u.label},n))}_expansionInputs(e,r){let n=e.builder,a=n.componentMethod(e.nodeTag),i=a&&n[a];if(typeof i!="function")throw new Error(`component '${e.nodeTag}' has no implementation`);let s=r.iterate;delete r.iterate,delete r.store;let o=e.getAttr("iterate")||e.getAttr("store");o!=null?(e.pointerType(o)&&(o=o.slice(1)),o.startsWith(".")&&(o=e._composeRelativeDatapath(o,o))):o=null;for(let u of Object.keys(r)){let l=e.getAttr(u);e.pointerType(l)==="^"&&(r[u]=`^${e.absDatapath(l)}`)}return[i,s,o,r]}_expandBlock(e,r,n,a,i){let s=e.builder._expansionRoot(n);r.call(e.builder,ja(s),a);let o=s.getNodes();if(o.length!==1)throw new Error(`component '${e.nodeTag}' must build a tree, not a forest: ${o.length} root nodes`);let u={...i,depthOffset:this._nodeDepth(e,i.depthOffset||0)};return this.render(o[0],u)}preprocess(e){return e}renderedItem(e,r,n,a){throw new Error(`${this.constructor.name} does not implement renderedItem`)}_handleMeta(e,r){let[n,a]=e._getMeta("render_tag,render_attributes"),i=qa(e.nodeTag,{renderTag:n,ns:e.getAttr("ns"),dialectName:e.builder?.constructor._name});if(!i)throw new Error(`node ${e.label} has no tag to render (no render_tag, no node_tag)`);return a&&(r={...r,...a}),[i,r]}adaptAttrs(e){return e}adapt(e){let r=`${this.builder.constructor._name}_`;return e.startsWith(r)?e.slice(r.length):e}finalize(e,r=null,n={}){let a=this._composeStringFragments(e);if(r==null)return a;if(typeof r=="string")throw new TypeError("string render targets require filesystem support, which is unavailable in the portable renderer; pass a callable or writable target instead");if(typeof r.full=="function"&&typeof r.write!="function")return r.full(a),null;if(typeof r.write=="function")return r.write(a),null;if(typeof r=="function")return r(a),null;throw new TypeError("render target must be writable (.write), callable, or expose .full")}_composeStringFragments(e){if(!Array.isArray(e))return e;if(e.some(r=>typeof r!="string"))throw new TypeError("String composition requires string fragments; object renderers must define their own composition");return e.join("")}_escapeText(e){return String(e).replaceAll("&","&").replaceAll("<","<").replaceAll(">",">")}_escapeAttr(e){return this._escapeText(e).replaceAll('"',""")}_nodeDepth(e,r=0){let a=((e.fullpath||"").match(/\./g)||[]).length;return Math.max(a-1,0)+r}};var kt=class extends vt{static mode="xml";renderedItem(e,r,n,{tag:a,pretty:i=!1,depthOffset:s=0}={}){let o=this._formatAttrs(n),u=i?" ".repeat(this._nodeDepth(e,s)):"",l=i?`
|
|
37
|
+
`:"";if(Array.isArray(r)){let c=this._composeStringFragments(r);return`${u}<${a}${o}>${l}${c}${u}</${a}>${l}`}return r==null?`${u}<${a}${o}></${a}>${l}`:`${u}<${a}${o}>${this._escapeText(r)}</${a}>${l}`}finalize(e,r=null,{docHeader:n=null}={}){let a=this._composeStringFragments(e);return n===!0?a=`<?xml version='1.0' encoding='UTF-8'?>${a}`:typeof n=="string"&&(a=n+a),super.finalize(a,r)}_formatAttrs(e){return Object.entries(e||{}).map(([r,n])=>` ${r.startsWith("xmlns_")?`xmlns:${r.slice(6)}`:r}="${this._escapeAttr(n)}"`).join("")}};var Mo={document_format:{name:"builder_grammar",version:"1.1"},grammar:{name:"base",version:null,title:null,description:null},abstracts:{},elements:{dataSetter:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"destination",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"type",module:"builtins",name:"str"},has_default:!1},{name:"value",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"any"},has_default:!1},{name:"attr",kind:"var_keyword",role:"attribute",annotation:{kind:"any"},has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{data_element:!0}},dataFormula:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"destination",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"type",module:"builtins",name:"str"},has_default:!1},{name:"func",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"union",items:[{kind:"type",module:"builtins",name:"str"},{kind:"type",module:"collections.abc",name:"Callable"}]},has_default:!1},{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{data_element:!0}},dataController:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"func",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"union",items:[{kind:"type",module:"builtins",name:"str"},{kind:"type",module:"collections.abc",name:"Callable"}]},has_default:!1},{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{data_element:!0}}}};function Ro(t){let e=[];for(;t&&t!==Function.prototype;)e.push(t),t=Object.getPrototypeOf(t);return e.reverse()}function yf(t){let e=Object.create(null),r=(n,a)=>{let i=n.toLowerCase(),s=e[i];if(s!==void 0&&s!==a)throw new Error(`container '${n}' is already tied to implementation method '${s}' (cannot rebind to '${a}')`);e[i]=a};for(let n of Ro(t))if(Object.hasOwn(n,"containers"))for(let a of n.containers||[])r(a,a);return e}function Br(t){let e=Object.create(null);for(let r of Object.keys(t)){let n=r.toLowerCase();if(Object.hasOwn(e,n))throw new Error(`element declaration '${r}' has a case-insensitive collision with '${e[n]}'`);e[n]=r}return e}var Ir="_root_",Ga="_root_",Lo=new Set(["destination","func","value","_on_start"]),Le=class t{static _sourceClass=H;static registerBuilder(e){if(typeof e!="function"||!(e.prototype instanceof t))throw new TypeError("registerBuilder requires a BuilderBase subclass");let r=e._name;if(typeof r!="string"||!r)throw new TypeError("registered builders require a non-empty static _name");let n=t._registry.get(r);if(n&&n!==e)throw new Error(`Builder name '${r}' is already registered to ${n.name}; cannot register ${e.name}`);return t._registry.set(r,e),e}static getBuilderClass(e){let r=t._registry.get(e);if(!r)throw new Error(`No builder registered with name '${e}'`);return r}constructor(e=null){this.name=e||this.constructor._name,this._dataroot=new ae,this._dataroot.setBackref(),this._dataroot.setItem(Ga,new ae),this.data=this._dataroot.getItem(Ga),this._defaultTargets=new Map,this.materialized=Object.create(null),this._collection=null,this._schemaOverride=null,this._tagNamesOverride=null,this._componentMap=null,this._targetSerial=0,this._subbuilders=new Map,this._sourceHandles=new WeakMap;let r=this.constructor._sourceClass;this._sourceroot=new r(null,this),this._sourceroot.setBackref(),this._sourceroot.setItem(Ir,new r(null,this)),this.source=this._sourceroot.getItem(Ir)}wrapSource(e){if(e=Or(e),!(e instanceof H)&&!(e instanceof Yt))throw new TypeError("wrapSource requires a SourceBag or SourceBagNode");let r=this._sourceHandles.get(e);return r||(r=ko(this,e),this._sourceHandles.set(e,r)),r}get root(){return this.wrapSource(this.source)}getSubbuilder(e){if(typeof e!="string"||!e||e.includes(":"))throw new Error(`unsupported subbuilder reference '${e}'`);let r=this._subbuilders.get(e);if(!r){let n=t.getBuilderClass(e);r=new n,this._subbuilders.set(e,r)}return r._dataroot=this._dataroot,r.data=this.data,r}_resolveSubbuilderReference(e,r,n){if(typeof e!="string"||!e)throw new Error(`'${n}': subbuilder declaration must be a non-empty string`);if(e.includes(":"))throw new Error(`'${n}': runtime subbuilder reference '${e}' is unsupported`);return this.getSubbuilder(e)}static defineGrammar(e){let r=this._classCollection,n=r?new He(r.toDocument()).update(e):new He(e),a=za(n.toDocument()),i=Va(a),s=Br(i.elements);this._classCollection=n,this._classSchema=i.elements,this._abstracts=i.abstracts,this._tagNames=s}static{this.defineGrammar(Mo)}get _containers(){return yf(this.constructor)}containerMethod(e){return this._containers[e.toLowerCase()]||null}componentMethod(e){return this._componentMap?.[e.toLowerCase()]||null}get schema(){return this._schemaOverride||this.constructor._classSchema||{}}get schemaTagNames(){return this._schemaOverride?this._tagNamesOverride??=Br(this.schema):this.constructor._tagNames??=Br(this.schema)}schemaTag(e){let r=e.toLowerCase(),n=this.schemaTagNames[r];if(n)return n;let a=`${this.constructor._name}_`;return r.startsWith(a)&&this.schemaTagNames[r.slice(a.length)]||null}loadGrammar(e,{replace:r=!1}={}){let n=this._collection||this.constructor._classCollection,a=r?new He(e):new He(n.toDocument()).update(e),i=za(a.toDocument()),s=Va(i),o=Br(s.elements);return this._collection=a,this._schemaOverride=s.elements,this._tagNamesOverride=o,this}validateCustomTypes(e){let r=e.parentBag?.parentNode?.builder||e.parentBag?._builder,n=r&&r!==this&&r.schema[e.nodeTag]?._meta?.subbuilder?r:this;Bo(e.nodeTag,n.schema[e.nodeTag],e.value,e.getAttr()||{})}validateNodeValues(e,r,n={}){let a=this.schemaTag(e);if(!a)throw new Error(`unknown element '${e}'`);return Oo(a,this.schema[a],r,n),!0}validateNode(e,{value:r,attrs:n,childTags:a}={}){if(!e||typeof e.nodeTag!="string")throw new TypeError("validateNode requires a source node");let i=r!==void 0?r:e.value instanceof H?null:e.value;this.validateNodeValues(e.nodeTag,i,n||e.getAttr?.()||{});let s=this.schema[this.schemaTag(e.nodeTag)],o=a||(e.value instanceof H?e.value.getNodes().map(u=>u.nodeTag):null);return o&&this._validateChildren(e.nodeTag,s,o,!1),!0}validateChildren(e,r,{includeMinimum:n=!1}={}){let a=this.schemaTag(e);if(!a)throw new Error(`unknown element '${e}'`);if(!Array.isArray(r)||r.some(i=>typeof i!="string"))throw new TypeError("childTags must be an array of strings");return this._validateChildren(a,this.schema[a],r,n)}validateParent(e,r=null){let n=this.schemaTag(e);if(!n)throw new Error(`unknown element '${e}'`);let a=this.schema[n];if(!this._countsForGrammar(a))return!0;let i=a._parentSpec;if(i==null||i.has("*"))return!0;if(r===null)throw new Error(`'${n}' requires a declared parent`);let s=this.schemaTag(r);if(!s)throw new Error(`unknown parent element '${r}'`);return this._validateParent(n,a,s),!0}bagCall(e,r,n,a){return this.setChild(e,r,n,a)}commandOnNode(e,r,n,a){if(e=Or(e),e.value instanceof H)return this.setChild(e.value,r,n,a);let i=e.value,s=new e.parentBag.constructor(null,e.builder||this),o=this.setChild(s,r,n,a,e);return this.promoteNodeValue(e,i,s),o}promoteNodeValue(e,r,n){e.setValue(n)}setChild(e,r,n,a,i=null){let s={...a},o=this.schema[r];if(!o)throw new Error(`unknown element '${r}'`);this.validateNodeValues(r,n,s);let u=o._meta?.subbuilder,c=(u==null?null:this._resolveSubbuilderReference(u,s,r))||this,d=n instanceof H?n._builderBindingPlan(c):null,f=i?.rootBuilder||e.root._builder||this;if(s.nodeId!=null&&f.source.getNodeByAttr("nodeId",s.nodeId))throw new Error(`Duplicate nodeId '${s.nodeId}'`);n instanceof H&&this._validateChildren(r,o,n.getNodes().map(w=>w.nodeTag),!1);let p=i||e.parentNode,h=p?.nodeTag?this.schema[p.nodeTag]:null;if(h&&!p._getMeta("subbuilder")&&this._countsForGrammar(o))this._validateParent(r,o,p.nodeTag),this._validateChildren(p.nodeTag,h,[...e.getNodes().map(w=>w.nodeTag),r],!1);else if(!h&&!p?._getMeta("subbuilder")&&o._parentSpec!=null&&this._countsForGrammar(o))throw new Error(`'${r}' requires a declared parent`);o._meta&&!("_meta"in s)&&(s._meta=o._meta),o.ns&&!("ns"in s)&&(s.ns=o.ns);let m=s.node_position;delete s.node_position;let g=s.node_label;delete s.node_label;let b;if(h?.collection_key){if(g!=null)throw new Error(`'${r}': node_label is not allowed in a collection`);b=this._collectionLabel(h.collection_key,r,s)}else{let w=h?._subSpec?.get(r);if(w&&w.max===1){if(g!=null)throw new Error(`'${r}': node_label is not allowed on a singleton`);b=r}else b=g||o.node_label||this._autoLabel(e,r)}if(e.node(b)!=null)throw new Error(`duplicate node label '${b}'`);return e._setBuilderItem(c,d,b,n,s,m||">",!1,!0,null,!1,!0,null,r)}_countsForGrammar(e){let r=e?._meta||{};return!(r.data_element||r.subbuilder||r.component)}_validateParent(e,r,n){let a=r._parentSpec;if(!(a==null||a.has("*")||!this._countsForGrammar(r))&&!a.has(n))throw new Error(`'${e}' not allowed as child of '${n}'`)}_validateChildren(e,r,n,a){let i=r._subSpec;if(i==null||i.has("*")||r._meta?.subbuilder)return[];let s=new Map;for(let o of n){let u=this.schema[o];if(u&&!this._countsForGrammar(u))continue;let l=i.get(o);if(!l)throw new Error(`'${o}' not allowed as child of '${e}'`);let c=(s.get(o)||0)+1;if(s.set(o,c),c>l.max)throw new Error(`too many '${o}' in '${e}'`)}return a?[...i].filter(([o,u])=>(s.get(o)||0)<u.min).map(([o])=>o):[]}_collectionLabel(e,r,n){let a=i=>{if(n[i]===null||n[i]===void 0)throw new Error(`'${r}': collection key needs attribute '${i}'`);return String(n[i])};return e.includes("${")?e.replace(/\$\{([^}]+)\}/g,(i,s)=>a(s)):a(e)}validateSource(){let e=[],r=(n,a="")=>{for(let i of n.getNodes()){let s=a?`${a}.${i.label}`:i.label,o=i.builder;o.validateCustomTypes(i);let u=o.schema[i.nodeTag];if(u&&!i._getMeta("data_element,subbuilder,component").some(Boolean)){let l=i.value instanceof H?i.value.getNodes().map(d=>d.nodeTag):[],c=o._validateChildren(i.nodeTag,u,l,!0);c.length&&e.push([s,c])}i.value instanceof H&&r(i.value,s)}};return r(this.source),e}_autoLabel(e,r){let n=0;for(;e.node(`${r}_${n}`)!==null&&e.node(`${r}_${n}`)!==void 0;)n+=1;return`${r}_${n}`}nodeById(e){let r=this.source.getNodeByAttr("nodeId",e);if(r==null)throw new Error(`nodeId not found: ${e}`);return r.builder.wrapSource(r)}runtimeValues(e){e.builder.validateCustomTypes(e);let r=new Map,n={},a=e.runtimeToEvaluate(),i=new Set(a.keys()),s=new Map([...Object.entries(e.getAttr()),...e.fixedAttrItems()]);for(let[c,d]of[...a])if(!(typeof c!="string"||!Ze(d)))for(let f of jn(e,d))a.has(f)||a.set(f,s.get(f));let o=e._getMeta("data_element");for(let[c,d]of a){if(d instanceof te){r.set(c,d.resolve());continue}let f=typeof c=="string"?Ze(d)?.pointer??d:d;if(!e.pointerType(f)){r.set(c,typeof c=="string"&&typeof d=="string"&&d.startsWith("==")?null:d);continue}let p=e.absDatapath(f);if(r.set(c,this.data.getItem(p)),!o&&!p.includes("?")&&c===Zt){let h=this.data.getNode(p);h&&Object.assign(n,h.getAttr("_wdg"))}}let u=ci(a,r,(c,d,f,p)=>this.evaluatePointerExpression(e,c,d,f,p)),l=u.get(Zt);u.delete(Zt);for(let c of u.keys())i.has(c)||u.delete(c);return[l,{...Object.fromEntries(u),...n}]}evaluatePointerExpression(e,r,n,a,i){return null}targetId(e){if(e._targetId)return e._targetId;let r=e.rootBuilder;return e.parentBag.root!==r.source.root?null:(r._targetSerial+=1,e._targetId=`n${r._targetSerial}`,e._targetId)}get dataLogic(){if(!this._dataLogic){let e=this._buildDataLogic();this._dataLogic=Array.isArray(e)?e:[e]}return this._dataLogic}_buildDataLogic(){return this}_resolveLogicFunc(e){if(typeof e=="function")return e;if(typeof e!="string")throw new Error("data-element func must be a name or a function");for(let r of this.dataLogic){let a=(typeof r=="function"?r:r.constructor)[e];if(typeof a=="function")return a}throw new Error(`data-element func '${e}' not found on any data_logic source`)}_bindings(e){let[,r]=this.runtimeValues(e),n={};for(let[a,i]of Object.entries(r))Lo.has(a)||(n[a]=i);return n}computeLogic(e){for(let r of e)this._computeNode(r)}_computeNode(e){let r=e.getAttr()||{};if(e.nodeTag==="dataSetter"){let n={};for(let[a,i]of Object.entries(r))a!=="destination"&&a!=="value"&&!a.startsWith("_")&&(n[a]=i);e.setRelativeData(r.destination,r.value,{attributes:Object.keys(n).length?n:null})}else if(e.nodeTag==="dataFormula"){let n=this._resolveLogicFunc(r.func);e.setRelativeData(r.destination,n(this._bindings(e)))}else e.nodeTag==="dataController"&&this._resolveLogicFunc(r.func)(e,this._bindings(e))}_dataElementNodes(){let e=[],r=n=>{for(let a of n.getNodes())a._getMeta("data_element")&&e.push(a),a.value instanceof H&&r(a.value)};return r(this.source),e}setup(e){}main(e){throw new Error(`${this.constructor.name}.main() not implemented: a bare builder is grammar, not a renderable page`)}_resolveComponents(){let e={};for(let o of Ro(this.constructor))if(Object.hasOwn(o,"components"))for(let u of o.components||[])e[u]=u;if(!Object.keys(e).length)return;let r={...this.schema},n={};for(let[o,u]of Object.entries(e))r[o]={sub_tags:"",_meta:{component:!0}},n[o.toLowerCase()]=u;let a=Br(r),i=this._collection||this.constructor._classCollection,s=i.toDocument();s.abstracts={},s.elements=Object.fromEntries(Object.keys(e).map(o=>[o,r[o]])),this._collection=new He(i.toDocument()).update(s),this._schemaOverride=r,this._componentMap=n,this._tagNamesOverride=a}_expansionRoot(e=null){let r=this.constructor._sourceClass,n=new r(null,this);return n.setBackref(),n.setItem(Ir,new r(null,this),e?{datapath:e}:null),n.getItem(Ir)}create(){this.setup(this.data),this._resolveComponents(),this.main(this.root),this.computeLogic(this._dataElementNodes())}get renderer_xml(){return new kt(this)}getRenderer(e=null){e??=this.constructor._defaultRenderMode;let r=this[`renderer_${e}`];if(!r)throw new Error(`${this.constructor.name} does not expose renderer_${e}`);return r}materialize(e=null,r={}){e??=this.constructor._defaultRenderMode;let n=this.getRenderer(e),a=n.renderChildren(n.preprocess(this.source),r);return this.materialized[e]=a,a}setRenderTarget(e,r=null){r??=this.constructor._defaultRenderMode,this._defaultTargets.set(r,e)}render({mode:e=null,target:r=null,...n}={}){e??=this.constructor._defaultRenderMode;let a=this.getRenderer(e);if(r===!1&&a.renderType!=="string")throw new TypeError("target=false is not valid for an object renderer");let i=r===!1?null:r||this._defaultTargets.get(a.mode)||null,s={...i?.renderOpts,...n};return a.finalize(this.materialize(e,s),i,s)}};Le._registry=new Map;var vf=new Set(["short","medium","long","full"]),kf=/('(?:[^']|'')*'|[a-zA-Z]+|[^a-zA-Z']+)/g;function Ef(t,e){if(!(t instanceof Date))throw new TypeError("Temporal formats require a typed Date value");if(!Number.isFinite(t.getTime()))throw new RangeError("Invalid date");let r=e||be(t).split("::").at(-1);if(!["D","H","DH","DHZ"].includes(r))throw new RangeError(`Unsupported temporal dtype: ${r}`);return r}function xf(t,e,r,n){let a=e.match(kf)||[];if(a.join("")!==e)throw new RangeError("Unclosed format literal");let i=(c,d=2)=>String(c).padStart(d,"0"),s=c=>new Intl.DateTimeFormat(r,{timeZone:"UTC",...c}).format(t),l={...n==="H"?{}:{y:()=>String(t.getUTCFullYear()),yy:()=>i(t.getUTCFullYear()%100),yyyy:()=>i(t.getUTCFullYear(),4),M:()=>String(t.getUTCMonth()+1),MM:()=>i(t.getUTCMonth()+1),MMM:()=>s({month:"short"}),MMMM:()=>s({month:"long"}),d:()=>String(t.getUTCDate()),dd:()=>i(t.getUTCDate()),EEE:()=>s({weekday:"short"}),EEEE:()=>s({weekday:"long"})},...n==="D"?{}:{H:()=>String(t.getUTCHours()),HH:()=>i(t.getUTCHours()),h:()=>String(t.getUTCHours()%12||12),hh:()=>i(t.getUTCHours()%12||12),m:()=>String(t.getUTCMinutes()),mm:()=>i(t.getUTCMinutes()),s:()=>String(t.getUTCSeconds()),ss:()=>i(t.getUTCSeconds()),a:()=>new Intl.DateTimeFormat(r,{hour:"numeric",hour12:!0,timeZone:"UTC"}).formatToParts(t).find(c=>c.type==="dayPeriod").value}};return a.map(c=>{if(c.startsWith("'"))return c==="''"?"'":c.slice(1,-1).replaceAll("''","'");if(!/^[a-zA-Z]/.test(c))return c;if(!l[c])throw new RangeError(`Unsupported date format token: ${c}`);return l[c]()}).join("")}function Po(t,{format:e,mask:r,locale:n,dtype:a,places:i}={}){let s=t==null?"":String(t);if(t!=null&&t!==""&&(e!=null&&e!==""||i!=null))if(typeof t=="number"||Ae(t))s=Af(t,{format:e,locale:n,places:i});else{let o=Ef(t,a);if(vf.has(e)){let u={timeZone:"UTC"};o!=="H"&&(u.dateStyle=e),o!=="D"&&(u.timeStyle=e),s=new Intl.DateTimeFormat(n||void 0,u).format(t)}else s=xf(t,String(e),n||void 0,o)}return r==null?s:String(r).replaceAll("%s",()=>s)}function Df({format:t="decimal",places:e}={}){let r={maximumFractionDigits:20};if(!t||t==="decimal")r.style="decimal";else if(t==="percent")r.style="percent";else if(t==="scientific")r.notation="scientific";else{let n=/^(0|#,##0)(?:\.(0*)(#*))?$/.exec(t);if(!n||t.includes(".")&&!n[2]&&!n[3])throw new RangeError(`Unsupported number format: ${t}`);r.useGrouping=n[1].includes(","),r.minimumFractionDigits=(n[2]||"").length,r.maximumFractionDigits=(n[2]||"").length+(n[3]||"").length}if(e!=null&&e!==""){let n=Number(e);if(!Number.isInteger(n)||n<0||n>20)throw new RangeError("places must be an integer from 0 to 20");r.minimumFractionDigits=n,r.maximumFractionDigits=n}return r}function Af(t,e={}){if(typeof t!="number"&&!Ae(t))throw new TypeError("Number formatting requires a Number or Decimal");if(!Number.isFinite(Number(t)))throw new RangeError("Number must be finite");let r=new Intl.NumberFormat(e.locale||void 0,Df(e));if(Ae(t)&&new Intl.NumberFormat("en",{useGrouping:!1}).format("9007199254740993")!=="9007199254740993")throw new Error("This browser cannot format Decimal values without precision loss");return r.format(Ae(t)?t.toString():t)}var Tf=new Set(["style","script"]),Cf=new Set(["allowfullscreen","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","inert","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"]),$o=new Set(["width","height","top","left","right","bottom","padding","margin","border","position","display","overflow","float","clear","resize","z_index","min_width","min_height","max_width","max_height","color","background","font","text","line_height","white_space","vertical_align","flex","gap","row_gap","column_gap","grid","align_content","justify_content","align_items","justify_items","visibility","opacity","cursor"]),Mr=new Set(["rounded","gradient","shadow","transform","transition","zoom","filter"]),Fo=t=>t===!0?"true":t===!1?"false":String(t),In=t=>typeof t=="number"&&Number.isFinite(t)?`${t}px`:String(t);function Nf(t){if($o.has(t))return!0;for(let e of $o)if(t.startsWith(`${e}_`))return!0;return!1}function Sf(t){let e=new Map;if(!t)return e;let r=[],n=0,a=null,i=!1,s=!1,o=0,u=String(t);for(let l=0;l<u.length;l+=1){let c=u[l],d=u[l+1];if(s){c==="*"&&d==="/"&&(s=!1,l+=1);continue}if(i){i=!1;continue}if(c==="\\"){i=!0;continue}if(a){c===a&&(a=null);continue}c==='"'||c==="'"?a=c:c==="/"&&d==="*"?(s=!0,l+=1):"([{".includes(c)?o+=1:")]}".includes(c)&&o>0?o-=1:c===";"&&o===0&&(r.push(u.slice(n,l)),n=l+1)}r.push(u.slice(n));for(let l of r){let c=l.trim();if(!c)continue;let d=c.indexOf(":");if(d<0)throw new TypeError(`malformed style declaration '${c}'`);e.set(c.slice(0,d).trim(),c.slice(d+1).trim())}return e}var Rr=class extends vt{static mode="html";renderedItem(e,r,n,{tag:a,xml:i=!0,pretty:s=!1,depthOffset:o=0,includeDatapath:u=!1}={}){e.parentNode?._getMeta("subbuilder")==="html"&&(n={xmlns:"http://www.w3.org/1999/xhtml",...n});let{format:c,mask:d,locale:f,places:p,dtype:h,...m}=n;!Array.isArray(r)&&(c!=null||d!=null||p!=null)&&(r=Po(r,{format:c,mask:d,places:p,dtype:h,locale:this._displayLocale(e,f)}));let g=this._formatAttrs(m);if(u){if(!Object.hasOwn(n,"id")){let x=this.builder.targetId(e);x!==null&&(g+=` id="${this._htmlAttrValue(x)}"`)}for(let[x,B]of Object.entries(e.getAttr()))e.pointerType(B)&&(g+=` data-${this.adapt(x)}-pointer="${this._htmlAttrValue(e.absDatapath(B))}"`)}let b=s?" ".repeat(this._nodeDepth(e,o)):"",v=s?`
|
|
38
|
+
`:"";if(e._getMeta("void"))return`${b}<${a}${g}${i?"/":""}>${v}`;if(Array.isArray(r)){let x=this._composeStringFragments(r);return`${b}<${a}${g}>${v}${x}${b}</${a}>${v}`}if(r==null)return`${b}<${a}${g}></${a}>${v}`;let w=typeof r=="string"&&r.endsWith("::HTML")?r.slice(0,-6):Tf.has(a)?String(r):this._escapeText(r);return`${b}<${a}${g}>${w}</${a}>${v}`}_displayLocale(e,r){if(r)return r;for(let n=e.parentNode;n;n=n.parentNode){let a=n.getAttr("locale");if(a==null)continue;let i=n.pointerType(a)?n.data.getItem(n.absDatapath(a)):a;if(i)return i}}adaptAttrs(e){let r={},n={};for(let[i,s]of Object.entries(e||{}))if(i.startsWith(`${this.builder.constructor._name}_`))r[this.adapt(i)]=s;else if(i==="dtype")r.dtype=s;else{if(this.builder.constructor.retainedAttrPrefixes.some(o=>i.startsWith(o)))continue;this._isStyleContribution(i)?n[i]=s:r[i]=s}let a=this._adaptStyle(n);return a&&(r.style=a),r}_isStyleContribution(e){if(e==="style"||e.startsWith("style_")||Mr.has(e))return!0;let r=e.includes("_")?e.slice(0,e.indexOf("_")):null;return r!==null&&Mr.has(r)||Nf(e)}_adaptStyle(e){let r=Sf(e.style),n=new Map,a=new Map;for(let[i,s]of Object.entries(e))if(i!=="style")if(i.startsWith("style_"))r.set(i.slice(6).replaceAll("_","-"),Fo(s));else if(Mr.has(i))n.set(i,s);else{let o=i.indexOf("_"),u=o<0?i:i.slice(0,o);o>=0&&Mr.has(u)?(a.has(u)||a.set(u,{}),a.get(u)[i.slice(o+1)]=s):r.set(i.replaceAll("_","-"),Fo(s))}for(let i of Mr)(n.has(i)||a.has(i))&&this[`_macro_${i}`](n.get(i),a.get(i)||{},r);return[...r].map(([i,s])=>`${i}: ${s}`).join("; ")}_formatAttrs(e){let r=[];for(let[n,a]of Object.entries(e||{}))Cf.has(n)?a&&r.push(` ${n}`):r.push(` ${n}="${this._htmlAttrValue(a)}"`);return r.join("")}_htmlAttrValue(e){return(e===!0?"true":e===!1?"false":String(e)).replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""")}_macro_rounded(e,r,n){let a=e===void 0?{}:{top_left:e,top_right:e,bottom_left:e,bottom_right:e};for(let[i,s]of Object.entries(r))if(i==="top"||i==="bottom")a[`${i}_left`]=s,a[`${i}_right`]=s;else if(i==="left"||i==="right")a[`top_${i}`]=s,a[`bottom_${i}`]=s;else if(["top_left","top_right","bottom_left","bottom_right"].includes(i))a[i]=s;else throw new TypeError(`rounded: unknown sub-kwarg '${i}'`);for(let[i,s]of Object.entries(a))n.set(`border-${i.replaceAll("_","-")}-radius`,In(s))}_macro_transform(e,r,n){let a=e===void 0?[]:[String(e)];for(let[i,s]of Object.entries(r))i==="rotate"?a.push(`rotate(${s}deg)`):i==="scale"||i==="translate"?a.push(`${i}(${s})`):i==="translate_x"?a.push(`translateX(${In(s)})`):i==="translate_y"?a.push(`translateY(${In(s)})`):i==="skew_x"?a.push(`skewX(${s}deg)`):i==="skew_y"?a.push(`skewY(${s}deg)`):a.push(`${i.replaceAll("_","-")}(${s})`);a.length&&n.set("transform",a.join(" "))}_macro_filter(e,r,n){let a=e===void 0?[]:[String(e)];for(let[i,s]of Object.entries(r))i==="rotate"?a.push(`hue-rotate(${s}deg)`):i==="blur"?a.push(`blur(${In(s)})`):i==="drop_shadow"?a.push(`drop-shadow(${s})`):a.push(`${i.replaceAll("_","-")}(${s})`);a.length&&n.set("filter",a.join(" "))}_macro_transition(e,r,n){e!==void 0&&n.set("transition",String(e));for(let[a,i]of Object.entries(r))n.set(`transition-${a.replaceAll("_","-")}`,String(i))}_macro_zoom(e,r,n){e!==void 0&&n.set("zoom",String(e))}_macro_shadow(e,r,n){e!==void 0&&n.set("box-shadow",String(e));for(let[a,i]of Object.entries(r))n.set(`box-shadow-${a.replaceAll("_","-")}`,String(i))}_macro_gradient(e,r,n){e!==void 0&&n.set("background-image",String(e))}};var Of=new Set(["alignment_baseline","baseline_shift","clip_path","clip_rule","color_interpolation","color_interpolation_filters","dominant_baseline","fill_opacity","fill_rule","flood_color","flood_opacity","font_family","font_size","font_size_adjust","font_stretch","font_style","font_variant","font_weight","glyph_orientation_horizontal","glyph_orientation_vertical","image_rendering","letter_spacing","lighting_color","marker_end","marker_mid","marker_start","overline_position","overline_thickness","paint_order","pointer_events","shape_rendering","stop_color","stop_opacity","strikethrough_position","strikethrough_thickness","stroke_dasharray","stroke_dashoffset","stroke_linecap","stroke_linejoin","stroke_miterlimit","stroke_opacity","stroke_width","text_anchor","text_decoration","text_rendering","underline_position","underline_thickness","unicode_bidi","word_spacing","writing_mode"]);function Uo(t){return Object.fromEntries(Object.entries(t||{}).map(([e,r])=>[Of.has(e)?e.replaceAll("_","-"):e,r]))}var Lr=class extends kt{static mode="svg";adaptAttrs(e){return Uo(e)}};var qo={document_format:{name:"builder_grammar",version:"1.1"},grammar:{name:"html",version:null,title:null,description:null},abstracts:{},elements:{svg:{doc:"Switch to the SVG dialect from this node down (BLD.2).\n\n A sub-builder element: ``_meta['subbuilder']`` switches the active\n dialect to SVG from this node down. No ``render_tag``: ``<svg>`` is\n emitted verbatim (HTML5 has a native ``<svg>`` tag).",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{subbuilder:"svg"}},a:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},abbr:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},address:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},area:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},article:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},aside:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},audio:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},b:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},base:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},bdi:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},bdo:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},blockquote:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},body:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},br:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},button:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},canvas:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},caption:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},cite:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},code:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},col:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},colgroup:{doc:null,sub_tags:"col,script,template",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},data:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},datalist:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,option,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},dd:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},del_:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},details:{doc:null,sub_tags:"summary[0:1],a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},dfn:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},dialog:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},div:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},dl:{doc:null,sub_tags:"dd,div,dt,script,template",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},dt:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},em:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},embed:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},fieldset:{doc:null,sub_tags:"legend[0:1],a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},figcaption:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},figure:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figcaption[0:1],figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},footer:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},form:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},h1:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},h2:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},h3:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},h4:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},h5:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},h6:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},head:{doc:null,sub_tags:"base[0:1],link,meta,noscript,script,style,template,title[0:1]",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},header:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},hgroup:{doc:null,sub_tags:"h1,h2,h3,h4,h5,h6,p,script,template",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},hr:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},html:{doc:null,sub_tags:"head[0:1],body[0:1]",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},i:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},iframe:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},img:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},input:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},ins:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},kbd:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},label:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},legend:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,h1,h2,h3,h4,h5,h6,hgroup,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},li:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},link:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},main:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},map:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},mark:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},menu:{doc:null,sub_tags:"li,script,template",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},meta:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},meter:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},nav:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},noscript:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},object:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},ol:{doc:null,sub_tags:"li,script,template",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},optgroup:{doc:null,sub_tags:"div,legend,noscript,option,script,template",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},option:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,div,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},output:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},p:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},picture:{doc:null,sub_tags:"img[0:1],script,source,template",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},pre:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},progress:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},q:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},rp:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},rt:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},ruby:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},s:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},samp:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},script:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},search:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},section:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},select:{doc:null,sub_tags:"button,div,hr,noscript,optgroup,option,script,template",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},slot:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},small:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},source:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},span:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},strong:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},style:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},sub:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},summary:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,h1,h2,h3,h4,h5,h6,hgroup,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},sup:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},table:{doc:null,sub_tags:"caption[0:1],colgroup,script,tbody,template,tfoot[0:1],thead[0:1],tr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},tbody:{doc:null,sub_tags:"script,template,tr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},td:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},template:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,caption,cite,code,col,colgroup,data,datalist,del_,details,dfn,dialog,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,legend,li,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,optgroup,option,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,source,span,strong,style,sub,summary,sup,table,tbody,td,template,textarea,tfoot,th,thead,time,tr,track,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},textarea:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},tfoot:{doc:null,sub_tags:"script,template,tr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},th:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},thead:{doc:null,sub_tags:"script,template,tr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},time:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},title:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},tr:{doc:null,sub_tags:"script,td,template,th",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},track:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},u:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},ul:{doc:null,sub_tags:"li,script,template",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},var:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},video:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},wbr:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},selectedcontent:{doc:"Mirror of the selected option for Customizable Select (HTML 2024).",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},dataSetter:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"destination",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"type",module:"builtins",name:"str"},has_default:!1},{name:"value",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"any"},has_default:!1},{name:"attr",kind:"var_keyword",role:"attribute",annotation:{kind:"any"},has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{data_element:!0}},dataFormula:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"destination",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"type",module:"builtins",name:"str"},has_default:!1},{name:"func",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"union",items:[{kind:"type",module:"builtins",name:"str"},{kind:"type",module:"collections.abc",name:"Callable"}]},has_default:!1},{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{data_element:!0}},dataController:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"func",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"union",items:[{kind:"type",module:"builtins",name:"str"},{kind:"type",module:"collections.abc",name:"Callable"}]},has_default:!1},{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{data_element:!0}}}};var Mn=class extends Le{static _name="html";static _defaultRenderMode="html";static retainedAttrPrefixes=["validate_","dtype"];static{this.defineGrammar(qo)}get renderer_html(){return new Rr(this)}};Le.registerBuilder(Mn);var jo={document_format:{name:"builder_grammar",version:"1.1"},grammar:{name:"svg",version:null,title:null,description:null},abstracts:{graphics:{doc:"SVG graphics content: any graphical element.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},_meta:null},containerElement:{doc:"SVG container content: elements that can hold children.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},_meta:null}},elements:{html:{doc:"Switch to the HTML dialect from this node down (BLD.2).\n\n A sub-builder element: ``_meta['subbuilder']`` switches the active\n dialect to HTML from this node down. The source tag ``html`` is\n rendered as ``_meta['render_tag']`` (``<foreignObject>``) carrying\n ``_meta['render_attributes']`` (the SVG namespace). The immediate\n HTML child declares XHTML so both sides of the XML boundary retain\n their native namespace.\n ",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{subbuilder:"html",render_tag:"foreignObject",render_attributes:{xmlns:"http://www.w3.org/2000/svg"}}},svg:{doc:"Root SVG container or nested SVG viewport.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},g:{doc:"Group container for applying transforms and styles.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},defs:{doc:"Container for referenced elements (gradients, patterns, etc.).",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},symbol:{doc:"Reusable graphical template, rendered only when referenced by <use>.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},use:{doc:"Reference and render a <symbol> or other element.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},rect:{doc:"Rectangle.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},circle:{doc:"Circle.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},ellipse:{doc:"Ellipse.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},line:{doc:"Line segment between two points.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},polyline:{doc:"Open shape of connected line segments.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},polygon:{doc:"Closed shape of connected line segments.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},path:{doc:"Arbitrary shape defined by path commands (d attribute).",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},image:{doc:"Embedded raster image.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},text:{doc:"Text block. Contains text content and optional <tspan>/<textPath>.",sub_tags:"tspan,textPath",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},tspan:{doc:"Inline text span within <text>.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},textPath:{doc:"Text rendered along a path shape.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},linearGradient:{doc:"Linear gradient definition. Place inside <defs>.",sub_tags:"stop",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},radialGradient:{doc:"Radial gradient definition. Place inside <defs>.",sub_tags:"stop",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},stop:{doc:"Gradient stop (color and offset).",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},pattern:{doc:"Tile pattern definition. Place inside <defs>.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},clipPath:{doc:"Clipping path definition.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},mask:{doc:"Alpha mask definition.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},marker:{doc:"Marker symbol for line endpoints or vertices.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},filter:{doc:"Filter effect container. Place inside <defs>.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feGaussianBlur:{doc:"Gaussian blur filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feOffset:{doc:"Offset filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feBlend:{doc:"Blend filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feColorMatrix:{doc:"Color matrix filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feComposite:{doc:"Composite filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feFlood:{doc:"Flood fill filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feMerge:{doc:"Merge filter primitive (container for feMergeNode).",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feMergeNode:{doc:"Single input for feMerge.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feDropShadow:{doc:"Drop shadow filter primitive (SVG 2).",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feDiffuseLighting:{doc:"Diffuse lighting filter primitive.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feSpecularLighting:{doc:"Specular lighting filter primitive.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},fePointLight:{doc:"Point light source for lighting filters.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feDistantLight:{doc:"Distant light source for lighting filters.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feSpotLight:{doc:"Spot light source for lighting filters.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feMorphology:{doc:"Morphology filter primitive (erode/dilate).",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feTurbulence:{doc:"Turbulence noise filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feDisplacementMap:{doc:"Displacement map filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feConvolveMatrix:{doc:"Convolution matrix filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feImage:{doc:"Image filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feTile:{doc:"Tile filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},animate:{doc:"Animate an attribute over time.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},animateTransform:{doc:"Animate a transform attribute.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},animateMotion:{doc:"Animate motion along a path.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},set:{doc:"Set an attribute to a value for a duration.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},title:{doc:"Accessible title (tooltip in browsers).",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},desc:{doc:"Accessible description.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},metadata:{doc:"Metadata container (RDF, Dublin Core, etc.).",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},a:{doc:"Hyperlink wrapper.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},foreignObject:{doc:"Container for non-SVG content (HTML, MathML).",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},switch:{doc:"Conditional processing (renders first matching child).",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},dataSetter:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"destination",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"type",module:"builtins",name:"str"},has_default:!1},{name:"value",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"any"},has_default:!1},{name:"attr",kind:"var_keyword",role:"attribute",annotation:{kind:"any"},has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{data_element:!0}},dataFormula:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"destination",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"type",module:"builtins",name:"str"},has_default:!1},{name:"func",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"union",items:[{kind:"type",module:"builtins",name:"str"},{kind:"type",module:"collections.abc",name:"Callable"}]},has_default:!1},{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{data_element:!0}},dataController:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"func",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"union",items:[{kind:"type",module:"builtins",name:"str"},{kind:"type",module:"collections.abc",name:"Callable"}]},has_default:!1},{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{data_element:!0}}}};var Rn=class extends Le{static _name="svg";static _defaultRenderMode="svg";static{this.defineGrammar(jo)}get renderer_svg(){return new Lr(this)}};Le.registerBuilder(Rn);var Za=["select","notnull","empty","case","len","min","max","email","regex","call","remote"],Rf=["nodup","exist","gridnodup"],Ln=t=>t==null||t==="",Xa=(t,e)=>t instanceof Promise?t.then(e):e(t);function Ja(t,e,r={}){let n={value:t,modified:!1,error:null,warnings:[],issues:[],datachanges:[]},a=Object.fromEntries(Object.entries(e).map(([l,c])=>[l.slice(9),c])),i=l=>Object.hasOwn(e,`validate_${l}`)&&e[`validate_${l}`]!=null;for(let l of Rf)if(i(l))throw new Error(`validate_${l} requires the DB/grid integration.`);let s=(l,c,d=!1)=>r.invoke(l,e[l],{...a,value:c,result:n,validations:a,userChange:!0,signal:r.signal},d),o=(l,c)=>{if(c==null||c===!0)return;if(typeof c!="boolean"&&typeof c!="string"&&(typeof c!="object"||Array.isArray(c)))throw new TypeError("A validator returns true, false, null, an error code, or a result object/Bag.");let d=`validate_${l}`,f=c instanceof Mf?Object.fromEntries(c.getNodes().map(b=>[b.label,b.value])):typeof c=="object"?c:{errorcode:c===!1?"error":c};if(Object.hasOwn(f,"value")&&(n.modified||=!Object.is(n.value,f.value),n.value=f.value),f.data!=null&&(r.checkDataPatch(f.data),n.datachanges.push(f.data)),!f.errorcode)return;let p=e[`${d}_iswarning`]??f.iswarning??!!(e[`${d}_warning`]&&!e[`${d}_error`]),h=e[`${d}_${f.errorcode}`]||e[`${d}_${p?"warning":"error"}`]||f.message||e[`${d}_${p?"error":"warning"}`]||String(f.errorcode),m=Jt(h,b=>b?{...a,...f,value:n.value}[b]:n.value);if(m==null)throw new Error("A validation message references a missing value.");let g={rule:l,code:f.errorcode,severity:p?"warning":"error",message:m};n.issues.push(g),p?n.warnings.push(m):(n.error=m,n.required=!!f.required)},u=l=>{if(r.signal?.aborted)throw r.signal.reason;if(n.error||l===Za.length)return n;let c=Za[l],d=`validate_${c}`,f=e[d];if(!i(c)||f===!1&&c!=="empty")return u(l+1);let p=m=>{if(!m)return u(l+1);let g;return c==="remote"&&n.value==null?u(l+1):(c==="call"?g=s(d,n.value):c==="remote"?g=r.remote(f,{...Lf(e),value:n.value},r.signal):g=Pf(c,f,n.value,r),Xa(g,b=>{if(r.signal?.aborted)throw r.signal.reason;let v=()=>(o(c,b),u(l+1));return c==="remote"&&e.validate__onResult?Xa(r.invoke("validate__onResult",e.validate__onResult,{result:b,value:n.value,validations:a,signal:r.signal}),v):v()}))},h=e[`${d}_if`];return Xa(h==null?!0:typeof h=="boolean"?h:s(`${d}_if`,n.value,!0),p)};return u(0)}function Lf(t){let e=new Set(["if","error","warning","iswarning"]);return Object.fromEntries(Object.entries(t).filter(([r])=>r.startsWith("validate_remote_")&&!e.has(r.slice(16))).map(([r,n])=>[r.slice(16),n]))}function Pr(t,e,r={}){return{errorcode:t,message:e,...r}}function Pf(t,e,r,n){if(t==="select")return n.selection(r);if(t==="notnull")return Ln(r)&&e?Pr("notnull","A value is required.",{required:!0}):null;if(t==="empty")return Ln(r)?{value:e}:null;if(t==="len"){if(typeof e!="string"||!/^(?:\d+|\d+:\d*|:\d+)$/.test(e))throw new Error("Invalid validate_len: use a length or min:max.");let[a,i]=e.split(":"),s=Number(a||0),o=i===void 0?s:i===""?1/0:Number(i);if(s>o)throw new Error("Invalid validate_len: minimum exceeds maximum.");if(Ln(r))return;if(typeof r!="string")throw new TypeError("validate_len requires a text value.");return r.length<s||r.length>o?Pr(s===o?"wrong length":r.length<s?"too short":"too long",s===o?`Enter exactly ${s} characters.`:o===1/0?`Enter at least ${s} characters.`:s===0?`Enter no more than ${o} characters.`:`Enter between ${s} and ${o} characters.`):void 0}if(!Ln(r)){if(t==="case"){if(typeof r!="string")throw new TypeError("validate_case requires a text value.");switch(e){case"upper":case"u":return{value:r.toUpperCase()};case"lower":case"l":return{value:r.toLowerCase()};case"title":case"t":return{value:r.replace(/\p{L}[\p{L}\p{M}]*/gu,a=>a[0].toUpperCase()+a.slice(1).toLowerCase())};case"capitalize":case"c":return{value:r[0].toUpperCase()+r.slice(1).toLowerCase()};default:throw new Error("Invalid validate_case: use upper, lower, title or capitalize.")}}if(t==="min"||t==="max"){let a;if(n.isDecimal?.(r))a=r.comparedTo(e);else if(r instanceof Date&&e instanceof Date)a=r.getTime()-e.getTime();else if(typeof r=="number"&&Number.isFinite(r)&&typeof e=="number"&&Number.isFinite(e))a=r-e;else throw new TypeError(`validate_${t} requires matching numeric or date/time values.`);return(t==="min"?a<0:a>0)?Pr(t,`Value must be ${t==="min"?"at least":"at most"} ${e}.`):void 0}if(t==="email"){if(typeof r!="string")throw new TypeError("validate_email requires a text value.");return/^[^\s@]+@[^\s@]+\.[^\s@]+$/u.test(r)?null:Pr("email","Check email format.",{iswarning:!0})}if(t==="regex"){if(typeof r!="string"||typeof e!="string")throw new TypeError("validate_regex requires text.");let a=e.trim(),i=a.startsWith("!");return new RegExp(i?a.slice(1):a,"u").test(r)!==i?null:Pr("regex","The value does not match the required pattern.")}}}var $r={dtype:"T",nullable:!0,binding:"read"},Pn={dtype:"B",nullable:!0,binding:"read"},Ya={dtype:["T","L","N","R","B","D","H","DH","DHZ"],nullable:!0,binding:"read"},Vo={validate_select:Pn,validate_notnull:{...Pn,default:!1},validate_empty:Ya,validate_case:{...$r,enum:["upper","lower","title","capitalize","u","l","t","c"]},validate_len:$r,validate_min:Ya,validate_max:Ya,validate_email:Pn,validate_regex:$r,validate_call:{dtype:"T",nullable:!0},validate_remote:$r,validate_onAccept:{dtype:"T",nullable:!0},validate_onReject:{dtype:"T",nullable:!0},validate__onResult:{dtype:"T",nullable:!0},validate_timeout:{dtype:"L",nullable:!0,binding:"read"},...Object.fromEntries(Za.flatMap(t=>[[`validate_${t}_if`,{dtype:["T","B"],nullable:!0}],[`validate_${t}_iswarning`,Pn],...["error","warning"].map(e=>[`validate_${t}_${e}`,{...$r,qualification:"intl_str"}])]))};var $n=class{epoch=0;controller=null;cancel(){this.epoch++,this.controller?.abort(),this.controller=null}start(e,r,n,a,i,s=()=>{}){this.cancel();let o=new AbortController,u=this.epoch;this.controller=o;let l=n.validationCurrent(),c=()=>u===this.epoch&&!o.signal.aborted&&l(),d=m=>({value:e,modified:!1,error:m.message,warnings:[],issues:[],datachanges:[]}),f=!1,p=m=>{if(f||!c())return{ok:!1};f=!0,this.controller=null;let g={ok:!m.error,value:m.value,result:m,rules:r,isCurrent:c};return i(g),g},h;try{if(r.validate_timeout!=null&&(!Number.isInteger(r.validate_timeout)||r.validate_timeout<=0))throw new TypeError("validate_timeout must be a positive integer in milliseconds.");h=a(e,r,{...n,signal:o.signal})}catch(m){return p(d(m))}return h instanceof Promise?(s(),new Promise(m=>{let g,b=()=>{clearTimeout(g),m({ok:!1})};o.signal.addEventListener("abort",b,{once:!0});let v=w=>{clearTimeout(g),o.signal.removeEventListener("abort",b);try{m(p(w))}catch(x){n.reportError(x,"Validation completion failed"),m({ok:!1})}};r.validate_timeout!=null&&(g=setTimeout(()=>{v(d(new Error("Validation timed out."))),o.abort()},r.validate_timeout)),h.then(v,w=>v(d(w)))})):p(h)}};function zo(t,e,{align:r="start",matchWidth:n=!1,inset:a=0,placement:i="bottom",point:s=null}={}){let o=e.ownerDocument.defaultView,u=s?{left:s.x,right:s.x,top:s.y,bottom:s.y,width:0}:e.getBoundingClientRect(),l=Math.max(0,o.innerWidth-16);t.style.setProperty("--gramlot-popup-available-width",`${l}px`),n&&(t.style.width=`${Math.min(Math.max(0,u.width-2*a),l)}px`),t.style.removeProperty("--gramlot-popup-available-height");let c=t.getBoundingClientRect();if(i==="side"){let b=Math.max(0,o.innerWidth-8-u.right-3),v=Math.max(0,u.left-8-3),w=c.width>b&&v>b;t.style.setProperty("--gramlot-popup-available-width",`${w?v:b}px`),t.style.setProperty("--gramlot-popup-available-height",`${Math.max(0,o.innerHeight-16)}px`);let x=t.getBoundingClientRect(),B=w?u.left-x.width-3:u.right+3;t.style.left=`${Math.max(8,Math.min(B,o.innerWidth-x.width-8))}px`,t.style.top=`${Math.max(8,Math.min(u.top,o.innerHeight-x.height-8))}px`;return}let d=Math.max(0,o.innerHeight-8-u.bottom-3),f=Math.max(0,u.top-8-3),p=c.height>d&&f>d;t.style.setProperty("--gramlot-popup-available-height",`${p?f:d}px`);let h=t.getBoundingClientRect(),m=r==="end"?u.right-h.width-a:u.left+a,g=p?u.top-h.height-3:u.bottom+3;t.style.left=`${Math.max(8,Math.min(m,o.innerWidth-h.width-8))}px`,t.style.top=`${Math.max(8,Math.min(g,o.innerHeight-h.height-8))}px`}var $f=1800,Ho=200;function Et(t){return class extends t{get supportsFormValidation(){return!0}get validationExecutor(){return Ja}connectedCallback(){super.connectedCallback(),this.pageContext?.form&&this.pageContext.formValidate()}#e=!1;#t;#r;#s;#l=new $n;#a;#i={};validationResult=null;constructor(){super(),this.message=this.ownerDocument.createElement("small"),this.message.id="field-message",this.message.hidden=!0,this.message.setAttribute("aria-live","polite"),this.message.setAttribute("popover","manual"),this.message.setAttribute("role","tooltip");let e=this.ownerDocument.createElement("style");e.textContent=`#control[aria-invalid="true"]{background:var(--gramlot-error-background,#fff1f0)}
|
|
38
39
|
input#control[aria-invalid="true"],textarea#control[aria-invalid="true"]{color:var(--gramlot-error,#8c1d18)}
|
|
39
40
|
#field-message{position:fixed;inset:auto;margin:0;padding:.4em .65em;border:1px solid var(--gramlot-error,#b3261e);border-radius:var(--gramlot-radius-sm,4px);
|
|
40
41
|
color:var(--gramlot-error,#8c1d18);background:var(--gramlot-error-background,#fff1f0);font:inherit;font-size:.85em;box-shadow:var(--gramlot-shadow,0 2px 8px #0003);
|
|
41
42
|
max-width:min(28em,var(--gramlot-popup-available-width,100vw));max-height:var(--gramlot-popup-available-height,100vh);overflow:auto;overflow-wrap:anywhere;opacity:1;transition:opacity ${Ho}ms ease-out}
|
|
42
43
|
#field-message[data-severity="warning"]{color:var(--gramlot-warning,#805600);border-color:var(--gramlot-warning,#805600);background:var(--gramlot-warning-background,#fff8df)}
|
|
43
44
|
#field-message[data-fading]{opacity:0}
|
|
44
|
-
@media(prefers-reduced-motion:reduce){#field-message{transition:none}}`,this.shadowRoot.append(e),this.control.setAttribute("aria-describedby",this.message.id),this.controlBox.append(this.message),this.control.addEventListener("input",()=>this.cancelValidation()),this.control.addEventListener("compositionstart",()=>this.cancelValidation()),this.control.addEventListener("focusin",()=>this.#
|
|
45
|
-
`),this.#
|
|
45
|
+
@media(prefers-reduced-motion:reduce){#field-message{transition:none}}`,this.shadowRoot.append(e),this.control.setAttribute("aria-describedby",this.message.id),this.controlBox.append(this.message),this.control.addEventListener("input",()=>this.cancelValidation()),this.control.addEventListener("compositionstart",()=>this.cancelValidation()),this.control.addEventListener("focusin",()=>this.#o()),this.control.addEventListener("mouseenter",()=>this.#o()),this.control.addEventListener("keydown",r=>{r.key==="Escape"&&(this.cancelValidation(),this.#n())})}#n(){this.ownerDocument.defaultView.clearTimeout(this.#r),this.#s?.abort(),this.#s=null,this.message.hidden||this.message.hidePopover(),this.message.hidden=!0,this.message.removeAttribute("data-fading")}#o(){if(!this.message.textContent||!this.isConnected)return;this.#n();let e=this.ownerDocument.defaultView;this.message.hidden=!1,this.message.showPopover(),zo(this.message,this.control),this.#r=e.setTimeout(()=>{this.message.hidden||(this.message.setAttribute("data-fading",""),this.#r=e.setTimeout(()=>this.#n(),Ho))},$f),this.#s=new e.AbortController;let r={capture:!0,signal:this.#s.signal};e.addEventListener("scroll",()=>this.#n(),r),e.addEventListener("resize",()=>this.#n(),r)}releaseControl(){this.#l.cancel(),this.#n(),super.releaseControl()}disconnectedCallback(){this.releaseControl()}setFieldState({invalid:e=!1,pending:r=!1}={}){this.control.setAttribute("aria-invalid",String(e)),this.control.setAttribute("aria-busy",String(r))}error(e){this.#e=!1,["input","textarea"].includes(this.control.localName)&&this.control.setCustomValidity(e),this.control.setAttribute("aria-invalid",String(!!e)),this.message.textContent=e,e?this.#o():this.#n()}restoreFormValue(e){this.error(""),this.#e=!1,super.restoreFormValue(e)}cancelValidation(){this.pageContext?.form&&this.pageContext.formCancelValidation(),this.#l.cancel(),this.#a=null,this.control.setAttribute("aria-busy","false")}presentValidation(e){this.validationResult=e,this.control.setAttribute("aria-busy","false"),this.error(e.error||""),this.message.dataset.severity=e.error?"error":"warning",this.#e=!!e.error,!e.error&&e.warnings.length&&(this.message.textContent=e.warnings.join(`
|
|
46
|
+
`),this.#o())}validateCandidate(e,r){if(this.pageContext.form){let n=this.validationSelection();return r(e),this.pageContext.formValidateCandidate(e,n)}return this.cancelValidation(),this.#a=this.pageContext.validationCurrent(),this.#l.start(e,this.#i,{...this.pageContext,selection:n=>this.validateSelection(n)},Ja,n=>{if(this.#a=null,n.ok)try{r(n.value)}catch(a){n.ok=!1,n.result.error=a.message}this.presentValidation(n.result),n.ok||this.finishValidation(n)},()=>this.control.setAttribute("aria-busy","true"))}finishValidation(e){e.result&&this.pageContext.finishValidation(e)}shouldProjectControlValue(e){!this.pageContext?.form&&this.#a&&!this.#a()&&this.cancelValidation();let r=this.sameControlValue(e,this.#t);return r&&this.#e?!1:(!r&&!this.pageContext?.form&&this.cancelValidation(),this.#t=e,!r&&this.#e&&this.error(""),!0)}projectAttributes(e,r){let n=super.projectAttributes(e,r),a=Object.fromEntries(Object.entries(e).filter(([u])=>u.startsWith("validate_"))),i=new Set([...Object.keys(a),...Object.keys(this.#i)]);!this.pageContext?.form&&([...i].some(u=>!Object.is(a[u],this.#i[u]))||e.disabled||e.readonly)&&this.cancelValidation();let s=[...i].some(u=>!Object.is(a[u],this.#i[u]));this.#i=a,s&&this.pageContext?.form&&this.pageContext.formValidate();for(let u of Object.keys(a))delete n[u];let o=!!this.parameters.validate_notnull;return this.control.setAttribute("aria-required",String(o)),(this.control.localName==="textarea"||this.control.localName==="input"&&["text","password"].includes(this.control.type))&&(this.control.required=o),n}}}Et.parameters=Vo;var Wo=["text","python","javascript","typescript","json","html","css","xml","markdown","sql","typst"],Ff;function Go(t){return class extends Xe(t){#e="";#t=0;constructor(){super(),this.control=this.ownerDocument.createElement("div"),this.control.id="control",this.control.className="editor-control",this.controlBox.append(this.control);let e=this.ownerDocument.createElement("style");e.textContent=`:host{display:block;height:300px;min-height:0;min-width:0}
|
|
46
47
|
.control-box,.editor-control{height:100%;min-height:0;min-width:0}
|
|
47
48
|
.editor-control{border:1px solid var(--gramlot-border-control,GrayText);border-radius:var(--gramlot-radius-sm,4px);overflow:hidden}
|
|
48
49
|
:host([data-editor-disabled]) .editor-control{opacity:.6}
|
|
49
|
-
.editor-status{padding:1em;color:var(--gramlot-text-secondary,GrayText)}`,this.shadowRoot.append(e);for(let r of["input","change"])this.control.addEventListener(r,n=>{n.target!==this.control&&n.stopImmediatePropagation()});this.control.addEventListener("focusout",()=>this.#r("change"))}get liveWrites(){return!0}connectedCallback(){let e=++this.#t;this.control.textContent="Loading editor\u2026",this.ready=(Ff??=import("./modules/code-mirror-engine-
|
|
50
|
+
.editor-status{padding:1em;color:var(--gramlot-text-secondary,GrayText)}`,this.shadowRoot.append(e);for(let r of["input","change"])this.control.addEventListener(r,n=>{n.target!==this.control&&n.stopImmediatePropagation()});this.control.addEventListener("focusout",()=>this.#r("change"))}get liveWrites(){return!0}connectedCallback(){let e=++this.#t;this.control.textContent="Loading editor\u2026",this.ready=(Ff??=import("./modules/code-mirror-engine-RWQTR5G5.js")).then(r=>{e!==this.#t||!this.isConnected||(this.control.textContent="",this.editor=r.createEditor(this),this.editor.publishHistory())}).catch(r=>{if(e===this.#t)throw this.control.textContent=`CodeMirror could not start: ${r.message}`,this.control.setAttribute("role","alert"),r}),this.ready.catch(r=>console.error(r))}releaseControl(){++this.#t,this.editor?.destroy(),this.editor=null,super.releaseControl()}projectAttributes(e){let r=super.projectAttributes(e),n=this.parameters;if(!Wo.includes(n.language))throw new TypeError(`Unsupported CodeMirror language: ${n.language}`);if(!Number.isInteger(n.indentUnit)||n.indentUnit<1||n.indentUnit>16)throw new TypeError("indentUnit must be an integer from 1 to 16");if(!Number.isFinite(n.fontSize)||n.fontSize<8||n.fontSize>48)throw new TypeError("fontSize must be from 8 to 48");return this.control.disabled=n.disabled,this.control.readOnly=n.readonly,this.toggleAttribute("data-editor-disabled",n.disabled),this.control.style.fontFamily=n.fontFamily,this.control.style.fontSize=`${n.fontSize}px`,this.editor?.configure(),r}#r(e){this.control.dispatchEvent(new this.ownerDocument.defaultView.Event(e,{bubbles:!0}))}editorChanged(e){this.#e=e,this.#r("input")}readControlValue(){return this.#e}writeControlValue(e){if(typeof e!="string")throw new TypeError("CodeMirror value must be a string");e!==this.#e&&(this.#e=e,this.editor?.replace(e))}focus(){this.parameters.disabled||this.editor?.view.focus()}setDiagnostics(e){this.editor.diagnostics(e)}revealPosition(e){this.editor.reveal(e)}undo(){return this.editor?this.editor.undo():!1}redo(){return this.editor?this.editor.redo():!1}}}Go.parameters={disabled:{dtype:"B",default:!1,binding:"read"},readonly:{dtype:"B",default:!1,binding:"read"},live:{dtype:"B",default:!0,binding:"read"}};var We={dtype:"B",default:!0,binding:"read"},Ka=(0,Z.defineComponent)({name:"codeMirror",tag:"gramlot-code-mirror",base:Go,mixins:[Ye,Et],parameters:{value:{dtype:"T",default:"",binding:"twoWay"},language:{dtype:"T",default:"text",binding:"read",enum:Wo},lineNumbers:We,lineWrapping:We,indentUnit:{dtype:"L",default:4,binding:"read"},fontSize:{dtype:"L",default:14,binding:"read"},fontFamily:{dtype:"T",default:"monospace",binding:"read"},folding:We,bracketMatching:We,autoCloseBrackets:We,autoIndent:We,autocompletion:We,highlightActiveLine:We,highlightSelectionMatches:We},implementation:t=>class extends t{}});var Uf;function Xo(t){return class extends Xe(t){#e="";#t=0;constructor(){super(),this.control=this.ownerDocument.createElement("div"),this.control.className="html-editor-control",this.controlBox.append(this.control);let e=this.ownerDocument.createElement("style");e.textContent=":host{display:block;height:400px;min-height:0}.control-box,.html-editor-control{height:100%;min-height:0}.html-editor-control{overflow:hidden}.html-editor-status{font:inherit;color:var(--gramlot-text-secondary,GrayText)}.html-editor-status:empty{display:none}",this.shadowRoot.append(e);for(let r of["input","change"])this.control.addEventListener(r,n=>{n.target!==this.control&&n.stopImmediatePropagation()})}get liveWrites(){return!0}connectedCallback(){this.load()}load(){let e=++this.#t;this.engine?.destroy(),this.engine=null,this.control.textContent="Loading HTML editor\u2026",this.ready=(Uf??=import("./modules/jodit-engine-MTSA4GZ3.js")).then(r=>{e!==this.#t||!this.isConnected||(this.control.textContent="",this.engine=r.createHtmlEditor(this))}).catch(r=>{if(e===this.#t)throw this.control.textContent=`HTML editor could not start: ${r.message}`,this.control.setAttribute("role","alert"),r}),this.ready.catch(r=>console.error(r))}projectAttributes(e){let r=super.projectAttributes(e);return this.control.disabled=this.parameters.disabled,this.control.readOnly=this.parameters.readonly,this.engine?.configure(),r}readControlValue(){return this.#e}writeControlValue(e){if(typeof e!="string")throw new TypeError("HTML editor value must be a string");e!==this.#e&&(this.#e=e,this.engine?.replace(e))}editorChanged(e){this.#e=e,this.control.dispatchEvent(new this.ownerDocument.defaultView.Event("input",{bubbles:!0}))}editorBlurred(){this.control.dispatchEvent(new this.ownerDocument.defaultView.Event("change",{bubbles:!0}))}undo(){return this.engine?this.engine.undo():!1}redo(){return this.engine?this.engine.redo():!1}focus(){this.parameters.disabled||this.engine?.focus()}releaseControl(){++this.#t,this.engine?.destroy(),this.engine=null,super.releaseControl()}}}Xo.parameters={disabled:{dtype:"B",default:!1,binding:"read"},readonly:{dtype:"B",default:!1,binding:"read"},live:{dtype:"B",default:!0,binding:"read"}};var Qa=(0,Z.defineComponent)({name:"htmlEditor",tag:"gramlot-html-editor",base:Xo,mixins:[Ye,Et],parameters:{value:{dtype:"T",default:"",binding:"twoWay"}},implementation:t=>class extends t{}});function Yo(t){return class extends t{constructor(){super();let e=this.attachShadow({mode:"open"}),r=this.ownerDocument.createElement("style");r.textContent=":host{display:block;height:100%;min-height:0}iframe{display:block;width:100%;height:100%;border:0;background:white}",this.frame=this.ownerDocument.createElement("iframe"),this.frame.setAttribute("sandbox",""),this.frame.title="HTML preview",e.append(r,this.frame)}renderDocument(e){return e}render(){let e=this.renderDocument(this.parameters.value);this.frame.srcdoc!==e&&(this.frame.srcdoc=e)}projectAttributes(e){let r=jr(this,e);return this.render(),r}}}var ei=(0,Z.defineComponent)({name:"htmlPreview",tag:"gramlot-html-preview",base:Yo,parameters:{value:{dtype:"T",default:"",binding:"read"}},implementation:t=>class extends t{}}),ti=(0,Z.defineComponent)({name:"markdownPreview",tag:"gramlot-markdown-preview",base:Yo,parameters:{value:{dtype:"T",default:"",binding:"read"},allowHtml:{dtype:"B",default:!1,binding:"read"}},implementation:t=>class extends t{#e;constructor(){super(),this.frame.title="Markdown preview"}connectedCallback(){this.render()}render(){if(this.#e){super.render();return}this.ready||(this.ready=import("./modules/markdown-document-VFC23FAY.js").then(e=>{this.#e=e.renderMarkdownDocument,this.isConnected&&this.render()}),this.ready.catch(e=>console.error(e)))}renderDocument(e){return this.#e(e,{allowHtml:this.parameters.allowHtml,document:this.ownerDocument})}}});var qf;function Zo(t){return class extends Xe(t){#e="";#t=0;constructor(){super(),this.control=this.ownerDocument.createElement("div"),this.control.className="markdown-editor-control",this.controlBox.append(this.control);let e=this.ownerDocument.createElement("style");e.textContent=":host{display:block;height:400px;min-height:0}.control-box,.markdown-editor-control{height:100%;min-height:0}.markdown-editor-control{overflow:hidden}.markdown-editor-status{font:inherit;color:var(--gramlot-text-secondary,GrayText)}.markdown-editor-status:empty{display:none}",this.shadowRoot.append(e);for(let r of["input","change"])this.control.addEventListener(r,n=>{n.target!==this.control&&n.stopImmediatePropagation()})}get liveWrites(){return!0}connectedCallback(){this.load()}load(){let e=++this.#t;this.engine?.destroy(),this.engine=null,this.control.textContent="Loading Markdown editor\u2026",this.ready=(qf??=import("./modules/prose-mirror-engine-GMZPJPNN.js")).then(r=>{e!==this.#t||!this.isConnected||(this.control.textContent="",this.engine=r.createMarkdownEditor(this))}).catch(r=>{if(e===this.#t)throw this.control.textContent=`Markdown editor could not start: ${r.message}`,this.control.setAttribute("role","alert"),r}),this.ready.catch(r=>console.error(r))}projectAttributes(e){let r=super.projectAttributes(e);return this.control.disabled=this.parameters.disabled,this.control.readOnly=this.parameters.readonly,this.engine?.configure(),r}readControlValue(){return this.#e}writeControlValue(e){if(typeof e!="string")throw new TypeError("Markdown editor value must be a string");e!==this.#e&&(this.#e=e,this.engine?.replace(e))}editorChanged(e){this.#e=e,this.control.dispatchEvent(new this.ownerDocument.defaultView.Event("input",{bubbles:!0}))}editorBlurred(){this.control.dispatchEvent(new this.ownerDocument.defaultView.Event("change",{bubbles:!0}))}undo(){return this.engine?this.engine.undo():!1}redo(){return this.engine?this.engine.redo():!1}focus(){this.parameters.disabled||this.engine?.focus()}releaseControl(){++this.#t,this.engine?.destroy(),this.engine=null,super.releaseControl()}}}Zo.parameters={disabled:{dtype:"B",default:!1,binding:"read"},readonly:{dtype:"B",default:!1,binding:"read"},live:{dtype:"B",default:!0,binding:"read"}};var ri=(0,Z.defineComponent)({name:"markdownEditor",tag:"gramlot-markdown-editor",base:Zo,mixins:[Ye,Et],parameters:{value:{dtype:"T",default:"",binding:"twoWay"}},implementation:t=>class extends t{}});var A_=Un({name:"editors",components:[Ka,Qa,ei,ri,ti]});export{Ka as CodeMirror,Qa as HtmlEditor,ei as HtmlPreview,ri as MarkdownEditor,ti as MarkdownPreview,A_ as default};
|