@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.
Files changed (131) hide show
  1. package/dist/components/editors/__init__.py +2 -2
  2. package/dist/components/editors/assets/collection.js +20 -19
  3. package/dist/components/editors/assets/index.js +1 -1
  4. package/dist/components/editors/assets/modules/chunk-74O4WKIV.js +1 -0
  5. package/dist/components/editors/assets/modules/{code-mirror-engine-QX4A5FVO.js → code-mirror-engine-RWQTR5G5.js} +29 -29
  6. package/dist/components/editors/assets/modules/{jodit-engine-MMSPIWM7.js → jodit-engine-MTSA4GZ3.js} +292 -292
  7. package/dist/components/editors/assets/modules/markdown-document-VFC23FAY.js +1 -0
  8. package/dist/components/editors/assets/modules/{prose-mirror-engine-IXTRTG6B.js → prose-mirror-engine-GMZPJPNN.js} +13 -13
  9. package/dist/components/grid/__init__.py +3 -2
  10. package/dist/components/grid/assets/collection.js +68 -17
  11. package/dist/components/grid/assets/index.js +1 -1
  12. package/dist/components/grid/grammar.json +57 -1
  13. package/dist/components/grouplets/__init__.py +2 -2
  14. package/dist/components/grouplets/assets/collection.js +3 -20
  15. package/dist/components/grouplets/assets/index.js +1 -1
  16. package/dist/components/grouplets/assets/modules/chunk-BLMUM44K.js +1 -0
  17. package/dist/components/grouplets/assets/modules/markdown-document-YWNZTOKK.js +1 -0
  18. package/dist/components/inputs/__init__.py +1 -1
  19. package/dist/components/inputs/assets/collection.js +59 -34
  20. package/dist/components/inputs/assets/index.js +1 -1
  21. package/dist/components/inputs/grammar.json +64 -0
  22. package/dist/components/layout/__init__.py +1 -1
  23. package/dist/components/layout/assets/collection.js +67 -57
  24. package/dist/components/layout/assets/index.js +1 -1
  25. package/dist/components/layout/grammar.json +35 -0
  26. package/dist/components/selection_trial/__init__.py +1 -1
  27. package/dist/components/selection_trial/assets/collection.js +3 -3
  28. package/dist/components/selection_trial/assets/index.js +1 -1
  29. package/dist/components/selection_trial/grammar.json +35 -0
  30. package/dist/components/tree/__init__.py +1 -1
  31. package/dist/components/tree/assets/collection.js +26 -23
  32. package/dist/components/tree/assets/index.js +1 -1
  33. package/dist/components/tree/grammar.json +341 -1
  34. package/dist/components/uploads/__init__.py +13 -0
  35. package/dist/components/uploads/assets/collection.js +67 -0
  36. package/dist/components/uploads/assets/index.js +3 -0
  37. package/dist/components/uploads/commands.json +7 -0
  38. package/dist/components/uploads/grammar.json +789 -0
  39. package/dist/{components/editors/assets/modules/chunk-OCFLP2K4.js → gramlot-markdown.js} +12 -12
  40. package/dist/gramlot.js +4910 -566
  41. package/dist/gramlot.min.js +1587 -43
  42. package/dist/runtime-notices.json +28 -0
  43. package/package.json +4 -2
  44. package/src/binding/grid-struct.js +1 -1
  45. package/src/binding/providers.js +4 -1
  46. package/src/binding/remote-resolver.js +1 -8
  47. package/src/binding/runtime.js +40 -1
  48. package/src/binding/validation-context.js +40 -0
  49. package/src/browser-camera-provider.d.ts +8 -0
  50. package/src/browser-camera-provider.js +104 -0
  51. package/src/builder/source.js +13 -2
  52. package/src/components/attachment-manager.js +160 -0
  53. package/src/components/bases.js +17 -6
  54. package/src/components/border-container.js +86 -8
  55. package/src/components/buttons.js +11 -1
  56. package/src/components/choice-editor.js +20 -7
  57. package/src/components/database-choices.js +4 -2
  58. package/src/components/editing-status-styles.js +26 -0
  59. package/src/components/editing-status.js +115 -0
  60. package/src/components/field-state.js +37 -58
  61. package/src/components/grid-cell-editor.js +181 -0
  62. package/src/components/grid-grammar.json +21 -0
  63. package/src/components/grid-structure.js +2 -1
  64. package/src/components/grid-styles.js +51 -1
  65. package/src/components/grid.js +87 -10
  66. package/src/components/grouplet-card.js +11 -3
  67. package/src/components/html-preview.js +17 -4
  68. package/src/components/image-crop-dialog.js +272 -0
  69. package/src/components/image-crop.js +79 -0
  70. package/src/components/image-uploader.js +252 -0
  71. package/src/components/inputs.js +2 -1
  72. package/src/components/jodit-engine.js +1 -1
  73. package/src/components/markdown-document.js +2 -2
  74. package/src/components/screen-capture.js +43 -0
  75. package/src/components/selected-container.js +6 -2
  76. package/src/components/tree.js +416 -17
  77. package/src/components/typed-editor.js +19 -9
  78. package/src/components/upload-engine.js +156 -0
  79. package/src/components/uploader.js +208 -0
  80. package/src/components/uploads.js +7 -0
  81. package/src/editing-session.d.ts +25 -0
  82. package/src/editing-session.js +396 -0
  83. package/src/experiments/selection-trial.js +18 -2
  84. package/src/format.js +22 -7
  85. package/src/gramlot.d.ts +2 -0
  86. package/src/gramlot.js +2 -1
  87. package/src/handlers/device-handler.d.ts +2 -1
  88. package/src/handlers/rpc-handler.d.ts +3 -3
  89. package/src/index-page-styles.js +1 -0
  90. package/src/index.d.ts +13 -0
  91. package/src/index.js +13 -0
  92. package/src/inout.d.ts +2 -0
  93. package/src/inout.js +6 -0
  94. package/src/markdown-loader.d.ts +1 -0
  95. package/src/markdown-loader.js +4 -0
  96. package/src/markdown.d.ts +1 -0
  97. package/src/markdown.js +2 -0
  98. package/src/media-frame.js +9 -0
  99. package/src/renderer/attributes.js +7 -1
  100. package/src/renderer/gramlot-renderer.d.ts +2 -0
  101. package/src/renderer/gramlot-renderer.js +31 -2
  102. package/src/server/assets.d.ts +1 -1
  103. package/src/server/assets.js +1 -1
  104. package/src/server/gramlot-server.d.ts +8 -1
  105. package/src/server/gramlot-server.js +83 -7
  106. package/src/server/index.d.ts +2 -0
  107. package/src/server/index.js +2 -0
  108. package/src/server/page-base.js +17 -4
  109. package/src/server/page.d.ts +13 -1
  110. package/src/server/page.js +6 -0
  111. package/src/server/source-import.d.ts +2 -0
  112. package/src/server/source-import.js +31 -0
  113. package/src/server/upload.d.ts +20 -0
  114. package/src/server/upload.js +142 -0
  115. package/src/server/visual-editor.d.ts +11 -0
  116. package/src/server/visual-editor.js +149 -0
  117. package/src/source-picker.d.ts +9 -0
  118. package/src/source-picker.js +57 -0
  119. package/src/tree-store.d.ts +24 -0
  120. package/src/tree-store.js +193 -0
  121. package/src/validation-run.js +50 -0
  122. package/src/view/button.js +8 -5
  123. package/src/view/controls.js +9 -42
  124. package/src/view/html.js +10 -2
  125. package/src/visual-editor-icons.js +10 -0
  126. package/src/visual-editor.d.ts +56 -0
  127. package/src/visual-editor.js +844 -0
  128. package/themes/gramlot-base/theme.css +99 -0
  129. package/dist/components/editors/assets/modules/chunk-MMJXUHRQ.js +0 -3
  130. package/src/form-state.d.ts +0 -20
  131. package/src/form-state.js +0 -198
@@ -1,29 +1,28 @@
1
- var Xc=Object.create;var bs=Object.defineProperty;var Yc=Object.getOwnPropertyDescriptor;var Zc=Object.getOwnPropertyNames;var Jc=Object.getPrototypeOf,Kc=Object.prototype.hasOwnProperty;var Nt=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}},go=(t,e)=>{for(var r in e)bs(t,r,{get:e[r],enumerable:!0})},gs=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Zc(e))!Kc.call(t,i)&&i!==r&&bs(t,i,{get:()=>e[i],enumerable:!(n=Yc(e,i))||n.enumerable});return t},Qn=(t,e,r)=>(gs(t,e,"default"),r&&gs(r,e,"default")),bo=(t,e,r)=>(r=t!=null?Xc(Jc(t)):{},gs(e||!t||!t.__esModule?bs(r,"default",{value:t,enumerable:!0}):r,t));var nr=Nt(Se=>{"use strict";function tp(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(rr(t,n)){var i=t[n];if(e.call(void 0,i,n,t))return i}}function Dr(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 rr(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function rp(t,e){if(t===null||typeof t!="object")throw new TypeError("target is not an object");for(var r in e)rr(e,r)&&(t[r]=e[r]);return t}var El=Dr({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 np(t){return rr(El,t.toLowerCase())}var kl=Dr({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 ip(t){return rr(kl,t.toLowerCase())}var dn=Dr({script:!1,style:!1,textarea:!0,title:!0});function sp(t){var e=t.toLowerCase();return rr(dn,e)&&!dn[e]}function ap(t){var e=t.toLowerCase();return rr(dn,e)&&dn[e]}function Al(t){return t===pn.HTML}function op(t){return Al(t)||t===pn.XML_XHTML_APPLICATION}var pn=Dr({HTML:"text/html",XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),lp=Object.keys(pn).map(function(t){return pn[t]});function up(t){return lp.indexOf(t)>-1}var cp=Dr({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=rp;Se.find=tp;Se.freeze=Dr;Se.HTML_BOOLEAN_ATTRIBUTES=El;Se.HTML_RAW_TEXT_ELEMENTS=dn;Se.HTML_VOID_ELEMENTS=kl;Se.hasDefaultHTMLNamespace=op;Se.hasOwn=rr;Se.isHTMLBooleanAttribute=np;Se.isHTMLRawTextElement=sp;Se.isHTMLEscapableRawTextElement=ap;Se.isHTMLMimeType=Al;Se.isHTMLVoidElement=ip;Se.isValidMimeType=up;Se.MIME_TYPE=pn;Se.NAMESPACE=cp});var bn=Nt(gn=>{"use strict";var fp=nr();function Dl(t,e){t.prototype=Object.create(Error.prototype,{constructor:{value:t},name:{value:t.name,enumerable:!0,writable:e}})}var hn=fp.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"}),xl=Object.keys(hn);function Sl(t){return typeof t=="number"&&t>=1&&t<=25}function dp(t){return typeof t=="string"&&t.substring(t.length-hn.Error.length)===hn.Error}function _n(t,e){Sl(t)?(this.name=xl[t],this.message=e||""):(this.message=t,this.name=dp(e)?e:hn.Error),Error.captureStackTrace&&Error.captureStackTrace(this,_n)}Dl(_n,!0);Object.defineProperties(_n.prototype,{code:{enumerable:!0,get:function(){var t=xl.indexOf(this.name);return Sl(t)?t:0}}});var Cl={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},Js=Object.entries(Cl);for(mn=0;mn<Js.length;mn++)Tl=Js[mn][0],_n[Tl]=Js[mn][1];var Tl,mn;function Ks(t,e,r){this.message=t,this.locator=e,this.cause=r,Error.captureStackTrace&&Error.captureStackTrace(this,Ks)}Dl(Ks);gn.DOMException=_n;gn.DOMExceptionName=hn;gn.ExceptionCode=Cl;gn.ParseError=Ks});var sa=Nt($=>{"use strict";function Ml(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 Cr=Ml();function Ft(t){if(t.source[0]!=="[")throw new Error(t+" can not be used with chars");return t.source.slice(1,t.source.lastIndexOf("]"))}function xr(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,""),Cr?"u":"")}function H(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(""),Cr?"u":"")}function L(t){if(arguments.length===0)throw new Error("no parameters provided");return H.apply(L,["(?:"].concat(Array.prototype.slice.call(arguments),[")"]))}var pp="\uFFFD",$t=/[-\x09\x0A\x0D\x20-\x2C\x2E-\uD7FF\uE000-\uFFFD]/;Cr&&($t=H("[",Ft($t),"\\u{10000}-\\u{10FFFF}","]"));var mp=new RegExp("[^"+Ft($t)+"]",Cr?"u":""),gi=/[\x20\x09\x0D\x0A]/,hp=Ft(gi),ee=H(gi,"+"),oe=H(gi,"*"),wn=/[:_a-zA-Z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;Cr&&(wn=H("[",Ft(wn),"\\u{10000}-\\u{10FFFF}","]"));var _p=Ft(wn),ta=H("[",_p,Ft(/[-.0-9\xB7]/),Ft(/[\u0300-\u036F\u203F-\u2040]/),"]"),He=H(wn,ta,"*"),gp=H("^",He,"$"),Nl=H(ta,"+"),bp=H("&",He,";"),wp=L(/&#[0-9]+;|&#x[0-9a-fA-F]+;/),yn=L(bp,"|",wp),vn=H("%",He,";"),ra=L(H('"',L(/[^%&"]/,"|",vn,"|",yn),"*",'"'),"|",H("'",L(/[^%&']/,"|",vn,"|",yn),"*","'")),yp=L('"',L(/[^<&"]/,"|",yn),"*",'"',"|","'",L(/[^<&']/,"|",yn),"*","'"),vp=xr(wn,":"),Ep=xr(ta,":"),Qs=H(vp,Ep,"*"),kp=H("^",Qs,"$"),En=H(Qs,L(":",Qs),"?"),Ap=H("^",En,"$"),Tp=H("(",En,")"),Sr=L(/"[^"]*"|'[^']*'/),Dp=H(/^<\?/,"(",He,")",L(ee,"(?!",gi,")(",$t,"*?)"),"?",/\?>/),Ol=/[\x20\x0D\x0Aa-zA-Z0-9-'()+,./:=?;!*#@$_%]/,kn=L('"',Ol,'*"',"|","'",xr(Ol,"'"),"*'"),Ll="<!--",Pl="-->",xp=H(Ll,L(xr($t,"-"),"|",H("-",xr($t,"-"))),"*",Pl),Il="#PCDATA",Sp=L(H(/\(/,oe,Il,L(oe,/\|/,oe,En),"*",oe,/\)\*/),"|",H(/\(/,oe,Il,oe,/\)/)),Cp=/[?*+]?/,Np=H(/\([^>]+\)/,Cp),Op=L("EMPTY","|","ANY","|",Sp,"|",Np),Ip="<!ELEMENT",Bp=H(Ip,ee,L(En,"|",vn),ee,L(Op,"|",vn),oe,">"),Rp=H("NOTATION",ee,/\(/,oe,He,L(oe,/\|/,oe,He),"*",oe,/\)/),Mp=H(/\(/,oe,Nl,L(oe,/\|/,oe,Nl),"*",oe,/\)/),Lp=L(Rp,"|",Mp),Pp=L(/CDATA|ID|IDREF|IDREFS|ENTITY|ENTITIES|NMTOKEN|NMTOKENS/,"|",Lp),Up=L(/#REQUIRED|#IMPLIED/,"|",L(L("#FIXED",ee),"?",yp)),Fp=L(ee,He,ee,Pp,ee,Up),$p="<!ATTLIST",qp=H($p,ee,He,Fp,"*",oe,">"),ea="about:legacy-compat",jp=L('"'+ea+'"',"|","'"+ea+"'"),na="SYSTEM",bi="PUBLIC",wi=L(L(na,ee,Sr),"|",L(bi,ee,kn,ee,Sr)),zp=H("^",L(L(na,ee,"(?<SystemLiteralOnly>",Sr,")"),"|",L(bi,ee,"(?<PubidLiteral>",kn,")",ee,"(?<SystemLiteral>",Sr,")"))),Vp=H("^",kn,"$"),Hp=H("^",Sr,"$"),Wp=L(ee,"NDATA",ee,He),Gp=L(ra,"|",L(wi,Wp,"?")),Ul="<!ENTITY",Xp=H(Ul,ee,He,ee,Gp,oe,">"),Yp=L(ra,"|",wi),Zp=H(Ul,ee,"%",ee,He,ee,Yp,oe,">"),Jp=L(Xp,"|",Zp),Kp=H(bi,ee,kn),Qp=H("<!NOTATION",ee,He,ee,L(wi,"|",Kp),oe,">"),ia=H(oe,"=",oe),Bl=/1[.]\d+/,em=H(ee,"version",ia,L("'",Bl,"'","|",'"',Bl,'"')),Rl=/[A-Za-z][-A-Za-z0-9._]*/,tm=L(ee,"encoding",ia,L('"',Rl,'"',"|","'",Rl,"'")),rm=L(ee,"standalone",ia,L("'",L("yes","|","no"),"'","|",'"',L("yes","|","no"),'"')),nm=H(/^<\?xml/,em,tm,"?",rm,"?",oe,/\?>/),im="<!DOCTYPE",sm="<![CDATA[",am="]]>",om=/<!\[CDATA\[/,lm=/\]\]>/,um=H($t,"*?",lm),cm=H(om,um);$.chars=Ft;$.chars_without=xr;$.detectUnicodeSupport=Ml;$.reg=H;$.regg=L;$.ABOUT_LEGACY_COMPAT=ea;$.ABOUT_LEGACY_COMPAT_SystemLiteral=jp;$.AttlistDecl=qp;$.CDATA_START=sm;$.CDATA_END=am;$.CDSect=cm;$.Char=$t;$.Comment=xp;$.COMMENT_START=Ll;$.COMMENT_END=Pl;$.DOCTYPE_DECL_START=im;$.elementdecl=Bp;$.EntityDecl=Jp;$.EntityValue=ra;$.ExternalID=wi;$.ExternalID_match=zp;$.Name=He;$.Name_exact=gp;$.NCName_exact=kp;$.NotationDecl=Qp;$.Reference=yn;$.PEReference=vn;$.PI=Dp;$.PUBLIC=bi;$.PubidLiteral=kn;$.PubidLiteral_match=Vp;$.QName=En;$.QName_exact=Ap;$.QName_group=Tp;$.S=ee;$.SChar_s=hp;$.S_OPT=oe;$.SYSTEM=na;$.SystemLiteral=Sr;$.SystemLiteral_match=Hp;$.InvalidChar=mp;$.UNICODE_REPLACEMENT_CHARACTER=pp;$.UNICODE_SUPPORT=Cr;$.XMLDecl=nm});var ha=Nt(ce=>{"use strict";var Ye=nr(),ct=Ye.find,fm=Ye.hasDefaultHTMLNamespace,Or=Ye.hasOwn,dm=Ye.isHTMLMimeType,pm=Ye.isHTMLRawTextElement,mm=Ye.isHTMLVoidElement,An=Ye.MIME_TYPE,ft=Ye.NAMESPACE,Le=Symbol(),Hl=bn(),x=Hl.DOMException,Be=Hl.DOMExceptionName,ue=sa();function qe(t){if(t!==Le)throw new TypeError("Illegal constructor")}function hm(t){return t!==""}function _m(t){return t?t.split(/[\t\n\f\r ]+/).filter(hm):[]}function gm(t,e){return Or(t,e)||(t[e]=!0),t}function Fl(t){if(!t)return[];var e=_m(t);return Object.keys(e.reduce(gm,{}))}function bm(t){return function(e){return t&&t.indexOf(e)!==-1}}function Wl(t){if(!ue.QName_exact.test(t))throw new x(x.INVALID_CHARACTER_ERR,'invalid character in qualified name "'+t+'"')}function oa(t,e){Wl(e),t=t||null;var r=null,n=e;if(e.indexOf(":")>=0){var i=e.split(":");r=i[0],n=i[1]}if(r!==null&&t===null)throw new x(x.NAMESPACE_ERR,"prefix is non-null and namespace is null");if(r==="xml"&&t!==Ye.NAMESPACE.XML)throw new x(x.NAMESPACE_ERR,'prefix is "xml" and namespace is not the XML namespace');if((r==="xmlns"||e==="xmlns")&&t!==Ye.NAMESPACE.XMLNS)throw new x(x.NAMESPACE_ERR,'either qualifiedName or prefix is "xmlns" and namespace is not the XMLNS namespace');if(t===Ye.NAMESPACE.XMLNS&&r!=="xmlns"&&e!=="xmlns")throw new x(x.NAMESPACE_ERR,'namespace is the XMLNS namespace and neither qualifiedName nor prefix is "xmlns"');return[t,r,n]}function Rr(t,e){for(var r in t)Or(t,r)&&(e[r]=t[r])}function je(t,e){var r=t.prototype;if(!(r instanceof e)){let n=function(){};n.prototype=e.prototype,n=new n,Rr(r,n),t.prototype=r=n}r.constructor!=t&&(typeof t!="function"&&console.error("unknown Class:"+t),r.constructor=t)}var ze={},Xe=ze.ELEMENT_NODE=1,Ir=ze.ATTRIBUTE_NODE=2,Tn=ze.TEXT_NODE=3,Gl=ze.CDATA_SECTION_NODE=4,Xl=ze.ENTITY_REFERENCE_NODE=5,wm=ze.ENTITY_NODE=6,la=ze.PROCESSING_INSTRUCTION_NODE=7,ua=ze.COMMENT_NODE=8,Nr=ze.DOCUMENT_NODE=9,Yl=ze.DOCUMENT_TYPE_NODE=10,qt=ze.DOCUMENT_FRAGMENT_NODE=11,ym=ze.NOTATION_NODE=12,le=Ye.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 Zl(t,e){if(e.length<t.length)return Zl(e,t);var r=null;for(var n in t){if(t[n]!==e[n])return r;r=t[n]}return r}function $l(t){return t.guid||(t.guid=Math.random()),t.guid}function ge(){}ge.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++)ma(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)}};ge.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 ut(t,e){this._node=t,this._refresh=e,ki(this)}function ki(t){var e=t._node._inc||t._node.ownerDocument._inc;if(t._inc!==e){var r=t._refresh(t._node);if(ou(t,"length",r.length),!t.$$length||r.length<t.$$length)for(var n=r.length;n in t;n++)Or(t,n)&&delete t[n];Rr(r,t),t._inc=e}}ut.prototype.item=function(t){return ki(this),this[t]||null};je(ut,ge);function Br(){this._nsIndex=Object.create(null),this._noNsIndex=Object.create(null)}function Jl(t,e){for(var r=0;r<t.length;){if(t[r]===e)return r;r++}}function ca(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 vm(t,e,r){var n=ca(t,e,!1),i=n&&n[r];return i||null}function Em(t,e){ca(t,e.namespaceURI,!0)[e.localName]=e}function km(t,e){var r=ca(t,e.namespaceURI,!1);r&&delete r[e.localName]}function Am(t,e,r,n){if(n?e[Jl(e,n)]=r:(e[e.length]=r,e.length++),Em(e,r),t){r.ownerElement=t;var i=t.ownerDocument;i&&(n&&eu(i,t,n),Tm(i,t,r))}}function ql(t,e,r){var n=Jl(e,r);if(n>=0){for(var i=e.length-1;n<=i;)e[n]=e[++n];if(e.length=i,km(e,r),t){var s=t.ownerDocument;s&&eu(s,t,r),r.ownerElement=null}}}Br.prototype={length:0,item:ge.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 x(x.INUSE_ATTRIBUTE_ERR);var r=vm(this,t.namespaceURI,t.localName);return r===t?t:(Am(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 x(x.NOT_FOUND_ERR,t);return ql(this._ownerElement,this,e),e},removeNamedItemNS:function(t,e){var r=this.getNamedItemNS(t,e);if(!r)throw new x(x.NOT_FOUND_ERR,t?t+" : "+e:e);return ql(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}};Br.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 Kl(){}Kl.prototype={hasFeature:function(t,e){return!0},createDocument:function(t,e,r){var n=An.XML_APPLICATION;t===ft.HTML?n=An.XML_XHTML_APPLICATION:t===ft.SVG&&(n=An.XML_SVG_IMAGE);var i=new vt(Le,{contentType:n});if(i.implementation=this,i.childNodes=new ge,i.doctype=r||null,r&&i.appendChild(r),e){var s=i.createElementNS(t,e);i.appendChild(s)}return i},createDocumentType:function(t,e,r,n){Wl(t);var i=new Di(Le);return i.name=t,i.nodeName=t,i.publicId=e||"",i.systemId=r||"",i.internalSubset=n||"",i.childNodes=new ge,i},createHTMLDocument:function(t){var e=new vt(Le,{contentType:An.HTML});if(e.implementation=this,e.childNodes=new ge,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 i=e.createElement("title");i.appendChild(e.createTextNode(t)),n.appendChild(i)}r.appendChild(e.createElement("body"))}return e}};function Z(t){qe(t)}Z.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,i=r.other;if(n.nodeType!==i.nodeType)return!1;switch(n.nodeType){case n.DOCUMENT_TYPE_NODE:if(n.name!==i.name||n.publicId!==i.publicId||n.systemId!==i.systemId)return!1;break;case n.ELEMENT_NODE:if(n.namespaceURI!==i.namespaceURI||n.prefix!==i.prefix||n.localName!==i.localName||n.attributes.length!==i.attributes.length)return!1;for(var s=0;s<n.attributes.length;s++){var a=n.attributes.item(s),o=i.getAttributeNodeNS(a.namespaceURI,a.localName);if(!o)return!1;e.push({node:a,other:o})}break;case n.ATTRIBUTE_NODE:if(n.namespaceURI!==i.namespaceURI||n.localName!==i.localName||n.value!==i.value)return!1;break;case n.PROCESSING_INSTRUCTION_NODE:if(n.target!==i.target||n.data!==i.data)return!1;break;case n.TEXT_NODE:case n.CDATA_SECTION_NODE:case n.COMMENT_NODE:if(n.data!==i.data)return!1;break}if(n.childNodes.length!==i.childNodes.length)return!1;for(var s=n.childNodes.length-1;s>=0;s--)e.push({node:n.childNodes[s],other:i.childNodes[s]})}return!0},isSameNode:function(t){return this===t},insertBefore:function(t,e){return Ei(this,t,e)},replaceChild:function(t,e){Ei(this,t,e,nu),e&&this.removeChild(e)},removeChild:function(t){return tu(this,t)},appendChild:function(t){return this.insertBefore(t,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(t){return au(this.ownerDocument||this,this,t)},normalize:function(){Ce(this,null,{enter:function(t){for(var e=t.firstChild;e;){var r=e.nextSibling;if(r!==null&&r.nodeType===Tn&&e.nodeType===Tn){for(var n=[],i=r;i!==null&&i.nodeType===Tn;)n.push(i.data),i=i.nextSibling;for(var s=e.nextSibling;s!==i;){var a=s.nextSibling;s.parentNode=null,s.previousSibling=null,s.nextSibling=null,s=a}e.nextSibling=i,i!==null?i.previousSibling=e:t.lastChild=e,e.appendData(n.join("")),fa(t.ownerDocument,t),e=i}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(Or(r,n)&&r[n]===t)return n}e=e.nodeType==Ir?e.ownerDocument:e.parentNode}return null},lookupNamespaceURI:function(t){for(var e=this;e;){var r=e._nsMap;if(r&&Or(r,t))return r[t];e=e.nodeType==Ir?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,i=null;if(e instanceof ir&&(n=e,e=n.ownerElement),r instanceof ir&&(i=r,r=i.ownerElement,n&&e&&r===e))for(var s=0,a;a=r.attributes[s];s++){if(a===n)return le.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+le.DOCUMENT_POSITION_PRECEDING;if(a===i)return le.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+le.DOCUMENT_POSITION_FOLLOWING}if(!e||!r||r.ownerDocument!==e.ownerDocument)return le.DOCUMENT_POSITION_DISCONNECTED+le.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+($l(r.ownerDocument)>$l(e.ownerDocument)?le.DOCUMENT_POSITION_FOLLOWING:le.DOCUMENT_POSITION_PRECEDING);if(i&&e===r)return le.DOCUMENT_POSITION_CONTAINS+le.DOCUMENT_POSITION_PRECEDING;if(n&&e===r)return le.DOCUMENT_POSITION_CONTAINED_BY+le.DOCUMENT_POSITION_FOLLOWING;for(var o=[],l=e.parentNode;l;){if(!i&&l===r)return le.DOCUMENT_POSITION_CONTAINED_BY+le.DOCUMENT_POSITION_FOLLOWING;o.push(l),l=l.parentNode}o.reverse();for(var u=[],c=r.parentNode;c;){if(!n&&c===e)return le.DOCUMENT_POSITION_CONTAINS+le.DOCUMENT_POSITION_PRECEDING;u.push(c),c=c.parentNode}u.reverse();var f=Zl(o,u);for(var p in f.childNodes){var h=f.childNodes[p];if(h===r)return le.DOCUMENT_POSITION_FOLLOWING;if(h===e)return le.DOCUMENT_POSITION_PRECEDING;if(u.indexOf(h)>=0)return le.DOCUMENT_POSITION_FOLLOWING;if(o.indexOf(h)>=0)return le.DOCUMENT_POSITION_PRECEDING}return 0}};function Ql(t){return t=="<"&&"&lt;"||t==">"&&"&gt;"||t=="&"&&"&amp;"||t=='"'&&"&quot;"||"&#"+t.charCodeAt()+";"}Rr(ze,Z);Rr(ze,Z.prototype);Rr(le,Z);Rr(le,Z.prototype);function vi(t,e){Ce(t,null,{enter:function(r){return e(r)?Ce.STOP:!0}})}function Ce(t,e,r){for(var n=[{node:t,context:e,phase:Ce.ENTER}];n.length>0;){var i=n.pop();if(i.phase===Ce.ENTER){var s=r.enter(i.node,i.context);if(s===Ce.STOP)return Ce.STOP;if(n.push({node:i.node,context:s,phase:Ce.EXIT}),s==null)continue;for(var a=i.node.lastChild;a;)n.push({node:a,context:s,phase:Ce.ENTER}),a=a.previousSibling}else r.exit&&r.exit(i.node,i.context)}}Ce.STOP=Symbol("walkDOM.STOP");Ce.ENTER=0;Ce.EXIT=1;function vt(t,e){qe(t);var r=e||{};this.ownerDocument=this,this.contentType=r.contentType||An.XML_APPLICATION,this.type=dm(this.contentType)?"html":"xml"}function Tm(t,e,r){t&&t._inc++;var n=r.namespaceURI;n===ft.XMLNS&&(e._nsMap[r.prefix?r.localName:""]=r.value)}function eu(t,e,r,n){t&&t._inc++;var i=r.namespaceURI;i===ft.XMLNS&&delete e._nsMap[r.prefix?r.localName:""]}function fa(t,e,r){if(t&&t._inc){t._inc++;var n=e.childNodes;if(r&&!r.nextSibling)n[n.length++]=r;else{for(var i=e.firstChild,s=0;i;)n[s++]=i,i=i.nextSibling;n.length=s,delete n[n.length]}}}function tu(t,e){if(t!==e.parentNode)throw new x(x.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,fa(t.ownerDocument,t),e.parentNode=null,e.previousSibling=null,e.nextSibling=null,e}function Dm(t){return t&&(t.nodeType===Z.DOCUMENT_NODE||t.nodeType===Z.DOCUMENT_FRAGMENT_NODE||t.nodeType===Z.ELEMENT_NODE)}function xm(t){return t&&(t.nodeType===Z.CDATA_SECTION_NODE||t.nodeType===Z.COMMENT_NODE||t.nodeType===Z.DOCUMENT_FRAGMENT_NODE||t.nodeType===Z.DOCUMENT_TYPE_NODE||t.nodeType===Z.ELEMENT_NODE||t.nodeType===Z.PROCESSING_INSTRUCTION_NODE||t.nodeType===Z.TEXT_NODE)}function jt(t){return t&&t.nodeType===Z.DOCUMENT_TYPE_NODE}function yt(t){return t&&t.nodeType===Z.ELEMENT_NODE}function ru(t){return t&&t.nodeType===Z.TEXT_NODE}function jl(t,e){var r=t.childNodes||[];if(ct(r,yt)||jt(e))return!1;var n=ct(r,jt);return!(e&&n&&r.indexOf(n)>r.indexOf(e))}function zl(t,e){var r=t.childNodes||[];function n(s){return yt(s)&&s!==e}if(ct(r,n))return!1;var i=ct(r,jt);return!(e&&i&&r.indexOf(i)>r.indexOf(e))}function Sm(t,e,r){if(!Dm(t))throw new x(x.HIERARCHY_REQUEST_ERR,"Unexpected parent node type "+t.nodeType);if(r&&r.parentNode!==t)throw new x(x.NOT_FOUND_ERR,"child not in parent");if(!xm(e)||jt(e)&&t.nodeType!==Z.DOCUMENT_NODE)throw new x(x.HIERARCHY_REQUEST_ERR,"Unexpected node type "+e.nodeType+" for parent node type "+t.nodeType)}function Cm(t,e,r){var n=t.childNodes||[],i=e.childNodes||[];if(e.nodeType===Z.DOCUMENT_FRAGMENT_NODE){var s=i.filter(yt);if(s.length>1||ct(i,ru))throw new x(x.HIERARCHY_REQUEST_ERR,"More than one element or text in fragment");if(s.length===1&&!jl(t,r))throw new x(x.HIERARCHY_REQUEST_ERR,"Element in fragment can not be inserted before doctype")}if(yt(e)&&!jl(t,r))throw new x(x.HIERARCHY_REQUEST_ERR,"Only one element can be added and only after doctype");if(jt(e)){if(ct(n,jt))throw new x(x.HIERARCHY_REQUEST_ERR,"Only one doctype is allowed");var a=ct(n,yt);if(r&&n.indexOf(a)<n.indexOf(r))throw new x(x.HIERARCHY_REQUEST_ERR,"Doctype can only be inserted before an element");if(!r&&a)throw new x(x.HIERARCHY_REQUEST_ERR,"Doctype can not be appended since element is present")}}function nu(t,e,r){var n=t.childNodes||[],i=e.childNodes||[];if(e.nodeType===Z.DOCUMENT_FRAGMENT_NODE){var s=i.filter(yt);if(s.length>1||ct(i,ru))throw new x(x.HIERARCHY_REQUEST_ERR,"More than one element or text in fragment");if(s.length===1&&!zl(t,r))throw new x(x.HIERARCHY_REQUEST_ERR,"Element in fragment can not be inserted before doctype")}if(yt(e)&&!zl(t,r))throw new x(x.HIERARCHY_REQUEST_ERR,"Only one element can be added and only after doctype");if(jt(e)){if(ct(n,function(l){return jt(l)&&l!==r}))throw new x(x.HIERARCHY_REQUEST_ERR,"Only one doctype is allowed");var a=ct(n,yt);if(r&&n.indexOf(a)<n.indexOf(r))throw new x(x.HIERARCHY_REQUEST_ERR,"Doctype can only be inserted before an element")}}function Ei(t,e,r,n){Sm(t,e,r),t.nodeType===Z.DOCUMENT_NODE&&(n||Cm)(t,e,r);var i=e.parentNode;if(i&&i.removeChild(e),e.nodeType===qt){var s=e.firstChild;if(s==null)return e;var a=e.lastChild}else s=a=e;var o=r?r.previousSibling:t.lastChild;s.previousSibling=o,a.nextSibling=r,o?o.nextSibling=s:t.firstChild=s,r==null?t.lastChild=a:r.previousSibling=a;do s.parentNode=t;while(s!==a&&(s=s.nextSibling));return fa(t.ownerDocument||t,t,e),e.nodeType==qt&&(e.firstChild=e.lastChild=null),e}vt.prototype={implementation:null,nodeName:"#document",nodeType:Nr,doctype:null,documentElement:null,_inc:1,insertBefore:function(t,e){if(t.nodeType===qt){for(var r=t.firstChild;r;){var n=r.nextSibling;this.insertBefore(r,e),r=n}return t}return Ei(this,t,e),t.ownerDocument=this,this.documentElement===null&&t.nodeType===Xe&&(this.documentElement=t),t},removeChild:function(t){var e=tu(this,t);return e===this.documentElement&&(this.documentElement=null),e},replaceChild:function(t,e){Ei(this,t,e,nu),t.ownerDocument=this,e&&this.removeChild(e),yt(t)&&(this.documentElement=t)},importNode:function(t,e){return Nm(this,t,e)},getElementById:function(t){var e=null;return vi(this.documentElement,function(r){if(r.nodeType==Xe&&r.getAttribute("id")==t)return e=r,!0}),e},createElement:function(t){var e=new Et(Le);e.ownerDocument=this,this.type==="html"&&(t=t.toLowerCase()),fm(this.contentType)&&(e.namespaceURI=ft.HTML),e.nodeName=t,e.tagName=t,e.localName=t,e.childNodes=new ge;var r=e.attributes=new Br;return r._ownerElement=e,e},createDocumentFragment:function(){var t=new Mr(Le);return t.ownerDocument=this,t.childNodes=new ge,t},createTextNode:function(t){var e=new Dn(Le);return e.ownerDocument=this,e.childNodes=new ge,e.appendData(t),e},createComment:function(t){var e=new Ai(Le);return e.ownerDocument=this,e.childNodes=new ge,e.appendData(t),e},createCDATASection:function(t){if(t.indexOf("]]>")!==-1)throw new x(x.INVALID_CHARACTER_ERR,'data contains "]]>"');var e=new Ti(Le);return e.ownerDocument=this,e.childNodes=new ge,e.appendData(t),e},createProcessingInstruction:function(t,e){var r=new Si(Le);return r.ownerDocument=this,r.childNodes=new ge,r.nodeName=r.target=t,r.nodeValue=r.data=e,r},createAttribute:function(t){if(!ue.QName_exact.test(t))throw new x(x.INVALID_CHARACTER_ERR,'invalid character in name "'+t+'"');return this.type==="html"&&(t=t.toLowerCase()),this._createAttribute(t)},_createAttribute:function(t){var e=new ir(Le);return e.ownerDocument=this,e.childNodes=new ge,e.name=t,e.nodeName=t,e.localName=t,e.specified=!0,e},createEntityReference:function(t){if(!ue.Name_exact.test(t))throw new x(x.INVALID_CHARACTER_ERR,'not a valid xml name "'+t+'"');if(this.type==="html")throw new x("document is an html document",Be.NotSupportedError);var e=new xi(Le);return e.ownerDocument=this,e.childNodes=new ge,e.nodeName=t,e},createElementNS:function(t,e){var r=oa(t,e),n=new Et(Le),i=n.attributes=new Br;return n.childNodes=new ge,n.ownerDocument=this,n.nodeName=e,n.tagName=e,n.namespaceURI=r[0],n.prefix=r[1],n.localName=r[2],i._ownerElement=n,n},createAttributeNS:function(t,e){var r=oa(t,e),n=new ir(Le);return n.ownerDocument=this,n.childNodes=new ge,n.nodeName=e,n.name=e,n.specified=!0,n.namespaceURI=r[0],n.prefix=r[1],n.localName=r[2],n}};je(vt,Z);function Et(t){qe(t),this._nsMap=Object.create(null)}Et.prototype={nodeType:Xe,attributes:null,getQualifiedName:function(){return this.prefix?this.prefix+":"+this.localName:this.localName},_isInHTMLDocumentAndNamespace:function(){return this.ownerDocument.type==="html"&&this.namespaceURI===ft.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=oa(t,e),i=n[2],s=this.getAttributeNodeNS(t,i);s?s.value=s.nodeValue=""+r:(s=this.ownerDocument.createAttributeNS(t,e),s.value=s.nodeValue=""+r,this.setAttributeNode(s))},getAttributeNodeNS:function(t,e){return this.attributes.getNamedItemNS(t,e)},getElementsByClassName:function(t){var e=Fl(t);return new ut(this,function(r){var n=[];return e.length>0&&vi(r,function(i){if(i!==r&&i.nodeType===Xe){var s=i.getAttribute("class");if(s){var a=t===s;if(!a){var o=Fl(s);a=e.every(bm(o))}a&&n.push(i)}}}),n})},getElementsByTagName:function(t){var e=(this.nodeType===Nr?this:this.ownerDocument).type==="html",r=t.toLowerCase();return new ut(this,function(n){var i=[];return vi(n,function(s){if(!(s===n||s.nodeType!==Xe))if(t==="*")i.push(s);else{var a=s.getQualifiedName(),o=e&&s.namespaceURI===ft.HTML?r:t;a===o&&i.push(s)}}),i})},getElementsByTagNameNS:function(t,e){return new ut(this,function(r){var n=[];return vi(r,function(i){i!==r&&i.nodeType===Xe&&(t==="*"||i.namespaceURI===t)&&(e==="*"||i.localName==e)&&n.push(i)}),n})}};vt.prototype.getElementsByClassName=Et.prototype.getElementsByClassName;vt.prototype.getElementsByTagName=Et.prototype.getElementsByTagName;vt.prototype.getElementsByTagNameNS=Et.prototype.getElementsByTagNameNS;je(Et,Z);function ir(t){qe(t),this.namespaceURI=null,this.prefix=null,this.ownerElement=null}ir.prototype.nodeType=Ir;je(ir,Z);function zt(t){qe(t)}zt.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),i=this.data.substring(t+e);r=n+r+i,this.nodeValue=this.data=r,this.length=r.length}};je(zt,Z);function Dn(t){qe(t)}Dn.prototype={nodeName:"#text",nodeType:Tn,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}};je(Dn,zt);function Ai(t){qe(t)}Ai.prototype={nodeName:"#comment",nodeType:ua};je(Ai,zt);function Ti(t){qe(t)}Ti.prototype={nodeName:"#cdata-section",nodeType:Gl};je(Ti,Dn);function Di(t){qe(t)}Di.prototype.nodeType=Yl;je(Di,Z);function da(t){qe(t)}da.prototype.nodeType=ym;je(da,Z);function pa(t){qe(t)}pa.prototype.nodeType=wm;je(pa,Z);function xi(t){qe(t)}xi.prototype.nodeType=Xl;je(xi,Z);function Mr(t){qe(t)}Mr.prototype.nodeName="#document-fragment";Mr.prototype.nodeType=qt;je(Mr,Z);function Si(t){qe(t)}Si.prototype.nodeType=la;je(Si,zt);function iu(){}iu.prototype.serializeToString=function(t,e){return su.call(t,e)};Z.prototype.toString=su;function su(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===Nr&&this.documentElement||this,i=n.prefix,s=n.namespaceURI;if(s&&i==null){var i=n.lookupPrefix(s);if(i==null)var a=[{namespace:s,prefix:null}]}return ma(this,r,a,e),r.join("")}function Vl(t,e,r){var n=t.prefix||"",i=t.namespaceURI;if(!i||n==="xml"&&i===ft.XML||i===ft.XMLNS)return!1;for(var s=r.length;s--;){var a=r[s];if(a.prefix===n)return a.namespace!==i}return!0}function yi(t,e,r,n){if(n&&!ue.QName_exact.test(e))throw new x('The attribute name "'+e+'" is not a valid XML QName',Be.InvalidStateError);t.push(" ",e,'="',r.replace(/[<>&"\t\n\r]/g,Ql),'"')}function ma(t,e,r,n){r||(r=[]);var i=n.nodeFilter,s=n.requireWellFormed,a=n.splitCDATASections,o=t.nodeType===Nr?t:t.ownerDocument,l=o.type==="html";Ce(t,{ns:r},{enter:function(u,c){var f=c.ns;if(i)if(u=i(u),u){if(typeof u=="string")return e.push(u),null}else return null;switch(u.nodeType){case Xe:var p=u.attributes,h=p.length,_=u.tagName,g=_;if(!l&&!u.prefix&&u.namespaceURI){for(var b,k=0;k<p.length;k++)if(p.item(k).name==="xmlns"){b=p.item(k).value;break}if(!b)for(var T=f.length-1;T>=0;T--){var A=f[T];if(A.prefix===""&&A.namespace===u.namespaceURI){b=A.namespace;break}}if(b!==u.namespaceURI)for(var T=f.length-1;T>=0;T--){var A=f[T];if(A.namespace===u.namespaceURI){A.prefix&&(g=A.prefix+":"+_);break}}}if(s&&!ue.QName_exact.test(g))throw new x('The element name "'+g+'" is not a valid XML QName',Be.InvalidStateError);e.push("<",g);for(var S=f.slice(),B=0;B<h;B++){var F=p.item(B);F.prefix=="xmlns"?S.push({prefix:F.localName,namespace:F.value}):F.nodeName=="xmlns"&&S.push({prefix:"",namespace:F.value})}for(var B=0;B<h;B++){var F=p.item(B);if(Vl(F,l,S)){var j=F.prefix||"",Y=F.namespaceURI;yi(e,j?"xmlns:"+j:"xmlns",Y,s),S.push({prefix:j,namespace:Y})}var re=i?i(F):F;re&&(typeof re=="string"?e.push(re):yi(e,re.name,re.value,s))}if(_===g&&Vl(u,l,S)){var Ne=u.prefix||"",Y=u.namespaceURI;yi(e,Ne?"xmlns:"+Ne:"xmlns",Y,s),S.push({prefix:Ne,namespace:Y})}var G=!u.firstChild;if(G&&(l||u.namespaceURI===ft.HTML)&&(G=mm(_)),G)return e.push("/>"),null;if(e.push(">"),l&&pm(_)){for(var D=u.firstChild;D;)D.data?e.push(D.data):ma(D,e,S.slice(),n),D=D.nextSibling;return e.push("</",g,">"),null}return{ns:S,tag:g};case Nr:case qt:if(s&&u.nodeType===Nr&&u.documentElement==null)throw new x("The Document has no documentElement",Be.InvalidStateError);return{ns:f};case Ir:return yi(e,u.name,u.value,s),null;case Tn:if(s&&ue.InvalidChar.test(u.data))throw new x("The Text node data contains characters outside the XML Char production",Be.InvalidStateError);return e.push(u.data.replace(/[<&>]/g,Ql)),null;case Gl:if(s&&u.data.indexOf("]]>")!==-1)throw new x('The CDATASection data contains "]]>"',Be.InvalidStateError);return a?e.push(ue.CDATA_START,u.data.replace(/]]>/g,"]]]]><![CDATA[>"),ue.CDATA_END):e.push(ue.CDATA_START,u.data,ue.CDATA_END),null;case ua:if(s){if(ue.InvalidChar.test(u.data))throw new x("The comment node data contains characters outside the XML Char production",Be.InvalidStateError);if(u.data.indexOf("--")!==-1||u.data[u.data.length-1]==="-")throw new x('The comment node data contains "--" or ends with "-"',Be.InvalidStateError)}return e.push(ue.COMMENT_START,u.data,ue.COMMENT_END),null;case Yl:var V=u.publicId,z=u.systemId;if(s){if(!ue.Name_exact.test(u.name))throw new x('The doctype name "'+u.name+'" is not a valid XML Name',Be.InvalidStateError);if(V&&!ue.PubidLiteral_match.test(V))throw new x("DocumentType publicId is not a valid PubidLiteral",Be.InvalidStateError);if(z&&z!=="."&&!ue.SystemLiteral_match.test(z))throw new x("DocumentType systemId is not a valid SystemLiteral",Be.InvalidStateError);if(u.internalSubset&&u.internalSubset.indexOf("]>")!==-1)throw new x('DocumentType internalSubset contains "]>"',Be.InvalidStateError)}return e.push(ue.DOCTYPE_DECL_START," ",u.name),V?(e.push(" ",ue.PUBLIC," ",V),z&&z!=="."&&e.push(" ",z)):z&&z!=="."&&e.push(" ",ue.SYSTEM," ",z),u.internalSubset&&e.push(" [",u.internalSubset,"]"),e.push(">"),null;case la:if(s){if(!ue.NCName_exact.test(u.target)||u.target.toLowerCase()==="xml")throw new x('The processing instruction target "'+u.target+'" is not a valid XML NCName or is reserved',Be.InvalidStateError);if(ue.InvalidChar.test(u.data))throw new x("The ProcessingInstruction data contains characters outside the XML Char production",Be.InvalidStateError);if(u.data.indexOf("?>")!==-1)throw new x('The ProcessingInstruction data contains "?>"',Be.InvalidStateError)}return e.push("<?",u.target," ",u.data,"?>"),null;case Xl:if(s&&!ue.Name_exact.test(u.nodeName))throw new x('The entity reference name "'+u.nodeName+'" is not a valid XML Name',Be.InvalidStateError);return e.push("&",u.nodeName,";"),null;default:return e.push("??",u.nodeName),null}},exit:function(u,c){c&&c.tag&&e.push("</",c.tag,">")}})}function Nm(t,e,r){var n;return Ce(e,null,{enter:function(i,s){var a=i.cloneNode(!1);a.ownerDocument=t,a.parentNode=null,s===null?n=a:s.appendChild(a);var o=i.nodeType===Ir||r;return o?a:null}}),n}function au(t,e,r){var n;return Ce(e,null,{enter:function(i,s){var a=new i.constructor(Le);for(var o in i)if(Or(i,o)){var l=i[o];typeof l!="object"&&l!=a[o]&&(a[o]=l)}i.childNodes&&(a.childNodes=new ge),a.ownerDocument=t;var u=r;switch(a.nodeType){case Xe:var c=i.attributes,f=a.attributes=new Br,p=c.length;f._ownerElement=a;for(var h=0;h<p;h++)a.setAttributeNode(au(t,c.item(h),!0));break;case Ir:u=!0}return s!==null?s.appendChild(a):n=a,u?a:null}}),n}function ou(t,e,r){t[e]=r}function aa(t){for(var e=[],r=t.firstChild;r;)r.nodeType===Xe&&e.push(r),r=r.nextSibling;return e}try{Object.defineProperty&&(Object.defineProperty(ut.prototype,"length",{get:function(){return ki(this),this.$$length}}),Object.defineProperty(Z.prototype,"textContent",{get:function(){if(this.nodeType===Xe||this.nodeType===qt){var t=[];return Ce(this,null,{enter:function(e){if(e.nodeType===Xe||e.nodeType===qt)return!0;if(e.nodeType===la||e.nodeType===ua)return null;t.push(e.nodeValue)}}),t.join("")}return this.nodeValue},set:function(t){switch(this.nodeType){case Xe:case qt: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(zt.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(zt.prototype,"nodeValue",{get:function(){return this.data},set:function(t){this.data=t},enumerable:!0,configurable:!0}),Object.defineProperty(Et.prototype,"children",{get:function(){return new ut(this,aa)}}),Object.defineProperty(vt.prototype,"children",{get:function(){return new ut(this,aa)}}),Object.defineProperty(Mr.prototype,"children",{get:function(){return new ut(this,aa)}}),ou=function(t,e,r){t["$$"+e]=r})}catch{}ce._updateLiveList=ki;ce.Attr=ir;ce.CDATASection=Ti;ce.CharacterData=zt;ce.Comment=Ai;ce.Document=vt;ce.DocumentFragment=Mr;ce.DocumentType=Di;ce.DOMImplementation=Kl;ce.Element=Et;ce.Entity=pa;ce.EntityReference=xi;ce.LiveNodeList=ut;ce.NamedNodeMap=Br;ce.Node=Z;ce.NodeList=ge;ce.Notation=da;ce.Text=Dn;ce.ProcessingInstruction=Si;ce.walkDOM=Ce;ce.XMLSerializer=iu});var uu=Nt(xn=>{"use strict";var lu=nr().freeze;xn.XML_ENTITIES=lu({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'});xn.HTML_ENTITIES=lu({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"});xn.entityMap=xn.HTML_ENTITIES});var bu=Nt(Ni=>{"use strict";var $r=nr(),q=sa(),pu=bn(),Om=$r.isHTMLEscapableRawTextElement,Im=$r.isHTMLMimeType,Bm=$r.isHTMLRawTextElement,Nn=$r.hasOwn,cu=$r.NAMESPACE,Rm=pu.ParseError,Mm=pu.DOMException,Lr=0,Vt=1,Pr=2,Sn=3,Ur=4,Fr=5,Cn=6,Ci=7;function mu(){}mu.prototype={parse:function(t,e,r){var n=this.domBuilder;n.startDocument(),Fm(e,e=Object.create(null)),Lm(t,e,r,n,this.errorHandler),n.endDocument()}};var _a=/&#?\w+;?/g;function Lm(t,e,r,n,i){var s=Im(n.mimeType);t.indexOf(q.UNICODE_REPLACEMENT_CHARACTER)>=0&&i.warning("Unicode replacement character detected, source encoding issues?");function a(W){if(W>65535){W-=65536;var Re=55296+(W>>10),dr=56320+(W&1023);return String.fromCharCode(Re,dr)}else return String.fromCharCode(W)}function o(W){var Re=W[W.length-1]===";"?W:W+";";if(!s&&Re!==W)return i.error("EntityRef: expecting ;"),W;var dr=q.Reference.exec(Re);if(!dr||dr[0].length!==Re.length)return i.error("entity not matching Reference production: "+W),W;var pr=Re.slice(1,-1);return Nn(r,pr)?r[pr]:pr.charAt(0)==="#"?a(parseInt(pr.substring(1).replace("x","0x"))):(i.error("entity not found:"+W),W)}function l(W){if(W>b){var Re=t.substring(b,W).replace(_a,o);p&&h(b),n.characters(Re,0,W-b),b=W}}var u=0,c=0,f=/\r\n?|\n|$/g,p=n.locator;function h(W,Re){for(;W>=c&&(Re=f.exec(t));)u=c,c=Re.index+Re[0].length,p.lineNumber++;p.columnNumber=W-u+1}for(var _=[{currentNSMap:e}],g=[],b=0;;){try{var k=t.indexOf("<",b);if(k<0){if(!s&&g.length>0)return i.fatalError("unclosed xml tag(s): "+g.join(", "));if(!t.substring(b).match(/^\s*$/)){var T=n.doc,A=T.createTextNode(t.substring(b));if(T.documentElement)return i.error("Extra content at the end of the document");T.appendChild(A),n.currentElement=A}return}if(k>b){var S=t.substring(b,k);!s&&g.length===0&&(S=S.replace(new RegExp(q.S_OPT.source,"g"),""),S&&i.error("Unexpected content outside root element: '"+S+"'")),l(k)}switch(t.charAt(k+1)){case"/":var N=t.indexOf(">",k+2),B=t.substring(k+2,N>0?N:void 0);if(!B)return i.fatalError("end tag name missing");var F=q.reg("^",q.QName_group,q.S_OPT,"$"),j=N>0&&F.exec(B);if(!j){var Y=N>0&&q.reg("^",q.QName_group).exec(B);if(s&&Y)i.warning('end tag name contains invalid trailing characters: "'+B+'"'),j=Y;else if(Y&&new RegExp(F.source,F.flags+"m").test(B))i.error('end tag name is followed by a line break and trailing content: "'+B+'"'),j=Y;else return i.fatalError('end tag name contains invalid characters: "'+B+'"')}if(!n.currentElement&&!n.doc.documentElement)return;var re=g[g.length-1]||n.currentElement.tagName||n.doc.documentElement.tagName||"";if(re!==j[1]){var Ne=j[1].toLowerCase();if(!s||re.toLowerCase()!==Ne)return i.fatalError('Opening and ending tag mismatch: "'+re+'" != "'+B+'"')}var G=_.pop();g.pop();var D=G.localNSMap;if(n.endElement(G.uri,G.localName,re),D)for(var V in D)Nn(D,V)&&n.endPrefixMapping(V);N++;break;case"?":p&&h(k),N=qm(t,k,n,i);break;case"!":p&&h(k),N=_u(t,k,n,i,s);break;default:p&&h(k);var z=new gu,P=_[_.length-1].currentNSMap,N=Pm(t,k,z,P,o,i,s),ke=z.length;if(z.closed||(s&&$r.isHTMLVoidElement(z.tagName)?z.closed=!0:g.push(z.tagName)),p&&ke){for(var ht=fu(p,{}),Ae=0;Ae<ke;Ae++){var rt=z[Ae];h(rt.offset),rt.locator=fu(p,{})}n.locator=ht,du(z,n,P)&&_.push(z),n.locator=p}else du(z,n,P)&&_.push(z);s&&!z.closed?N=Um(t,N,z.tagName,o,n):N++}}catch(W){if(W instanceof Rm)throw W;if(W instanceof Mm)return i.fatalError("Error constructing the DOM: "+W.name+": "+W.message,W);i.error("element parse error: "+W),N=-1}N>b?b=N:l(Math.max(k,b)+1)}}function fu(t,e){return e.lineNumber=t.lineNumber,e.columnNumber=t.columnNumber,e}function Pm(t,e,r,n,i,s,a){function o(h,_,g){if(Nn(r.attributeNames,h))return s.fatalError("Attribute "+h+" redefined");if(!a&&_.indexOf("<")>=0)return s.fatalError("Unescaped '<' not allowed in attributes values");r.addValue(h,_.replace(/[\t\n\r]/g," ").replace(_a,i),g)}for(var l,u,c=++e,f=Lr;;){var p=t.charAt(c);if(f===Lr&&p==="<")throw new Error("unexpected < in tag name: "+t.slice(e,c));switch(p){case"=":if(f===Vt)l=t.slice(e,c),f=Sn;else if(f===Pr)f=Sn;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(f===Sn||f===Vt)if(f===Vt&&(s.warning('attribute value must after "="'),l=t.slice(e,c)),e=c+1,c=t.indexOf(p,e),c>0)u=t.slice(e,c),o(l,u,e-1),f=Fr;else throw new Error("attribute value no end '"+p+"' match");else if(f==Ur)u=t.slice(e,c),o(l,u,e),s.warning('attribute "'+l+'" missed start quot('+p+")!!"),e=c+1,f=Fr;else throw new Error('attribute value must after "="');break;case"/":switch(f){case Lr:r.setTagName(t.slice(e,c));case Fr:case Cn:case Ci:f=Ci,r.closed=!0;case Ur:case Vt:break;case Pr:r.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return s.error("unexpected end of input"),f==Lr&&r.setTagName(t.slice(e,c)),c;case">":switch(f){case Lr:r.setTagName(t.slice(e,c));case Fr:case Cn:case Ci:break;case Ur:case Vt:u=t.slice(e,c),u.slice(-1)==="/"&&(r.closed=!0,u=u.slice(0,-1));case Pr:f===Pr&&(u=l),f==Ur?(s.warning('attribute "'+u+'" missed quot(")!'),o(l,u,e)):(a||s.warning('attribute "'+u+'" missed value!! "'+u+'" instead!!'),o(u,u,e));break;case Sn:if(!a)return s.fatalError(`AttValue: ' or " expected`)}return c;case"\x80":p=" ";default:if(p<=" ")switch(f){case Lr:r.setTagName(t.slice(e,c)),f=Cn;break;case Vt:l=t.slice(e,c),f=Pr;break;case Ur:var u=t.slice(e,c);s.warning('attribute "'+u+'" missed quot(")!!'),o(l,u,e);case Fr:f=Cn;break}else switch(f){case Pr:a||s.warning('attribute "'+l+'" missed value!! "'+l+'" instead2!!'),o(l,l,e),e=c,f=Vt;break;case Fr:s.warning('attribute space is required"'+l+'"!!');case Cn:f=Vt,e=c;break;case Sn:f=Ur,e=c;break;case Ci:throw new Error("elements closed character '/' and '>' must be connected to")}}c++}}function du(t,e,r){for(var n=t.tagName,i=null,f=t.length;f--;){var s=t[f],a=s.qName,o=s.value,p=a.indexOf(":");if(p>0)var l=s.prefix=a.slice(0,p),u=a.slice(p+1),c=l==="xmlns"&&u;else u=a,l=null,c=a==="xmlns"&&"";s.localName=u,c!==!1&&(i==null&&(i=Object.create(null),r=Object.create(r)),r[c]=i[c]=o,s.uri=cu.XMLNS,e.startPrefixMapping(c,o))}for(var f=t.length;f--;)s=t[f],s.prefix&&(s.prefix==="xml"&&(s.uri=cu.XML),s.prefix!=="xmlns"&&(s.uri=r[s.prefix]));var p=n.indexOf(":");p>0?(l=t.prefix=n.slice(0,p),u=t.localName=n.slice(p+1)):(l=null,u=t.localName=n);var h=t.uri=r[l||""];if(e.startElement(h,u,n,t),t.closed){if(e.endElement(h,u,n),i)for(l in i)Nn(i,l)&&e.endPrefixMapping(l)}else return t.currentNSMap=r,t.localNSMap=i,!0}function Um(t,e,r,n,i){var s=Om(r);if(s||Bm(r)){var a=new RegExp("</"+r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+">","ig");a.lastIndex=e;var o=a.exec(t),l=o?o.index:-1;if(l<0)return e+1;var u=t.substring(e+1,l);return s&&(u=u.replace(_a,n)),i.characters(u,0,u.length),l}return e+1}function Fm(t,e){for(var r in t)Nn(t,r)&&(e[r]=t[r])}function hu(t,e){var r=e;function n(c){return c=c||0,t.charAt(r+c)}function i(c){c=c||1,r+=c}function s(){for(var c=0;r<t.length;){var f=n();if(f!==" "&&f!==`
3
- `&&f!==" "&&f!=="\r")return c;c++,i()}return-1}function a(){return t.substring(r)}function o(c){return t.substring(r,r+c.length)===c}function l(c){return t.substring(r,r+c.length).toUpperCase()===c.toUpperCase()}function u(c){var f=q.reg("^",c),p=f.exec(a());return p?(i(p[0].length),p[0]):null}return{char:n,getIndex:function(){return r},getMatch:u,getSource:function(){return t},skip:i,skipBlanks:s,substringFromIndex:a,substringStartsWith:o,substringStartsWithCaseInsensitive:l}}function $m(t,e){function r(o,l){var u=q.PI.exec(o.substringFromIndex());return u?u[1].toLowerCase()==="xml"?l.fatalError("xml declaration is only allowed at the start of the document, but found at position "+o.getIndex()):(o.skip(u[0].length),u[0]):l.fatalError("processing instruction is not well-formed at position "+o.getIndex())}var n=t.getSource();if(t.char()==="["){t.skip(1);for(var i=t.getIndex();t.getIndex()<n.length;){if(t.skipBlanks(),t.char()==="]"){var s=n.substring(i,t.getIndex());return t.skip(1),s}var a=null;if(t.char()==="<"&&t.char(1)==="!")switch(t.char(2)){case"E":t.char(3)==="L"?a=t.getMatch(q.elementdecl):t.char(3)==="N"&&(a=t.getMatch(q.EntityDecl));break;case"A":a=t.getMatch(q.AttlistDecl);break;case"N":a=t.getMatch(q.NotationDecl);break;case"-":a=t.getMatch(q.Comment);break}else if(t.char()==="<"&&t.char(1)==="?")a=r(t,e);else if(t.char()==="%")a=t.getMatch(q.PEReference);else return e.fatalError("Error detected in Markup declaration");if(!a)return e.fatalError("Error in internal subset at position "+t.getIndex())}return e.fatalError("doctype internal subset is not well-formed, missing ]")}}function _u(t,e,r,n,i){var s=hu(t,e);switch(i?s.char(2).toUpperCase():s.char(2)){case"-":var a=s.getMatch(q.Comment);return a?(r.comment(a,q.COMMENT_START.length,a.length-q.COMMENT_START.length-q.COMMENT_END.length),s.getIndex()):n.fatalError("comment is not well-formed at position "+s.getIndex());case"[":var o=s.getMatch(q.CDSect);return o?!i&&!r.currentElement?n.fatalError("CDATA outside of element"):(r.startCDATA(),r.characters(o,q.CDATA_START.length,o.length-q.CDATA_START.length-q.CDATA_END.length),r.endCDATA(),s.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 "+s.getIndex());if(i?!s.substringStartsWithCaseInsensitive(q.DOCTYPE_DECL_START):!s.substringStartsWith(q.DOCTYPE_DECL_START))return n.fatalError("Expected "+q.DOCTYPE_DECL_START+" at position "+s.getIndex());if(s.skip(q.DOCTYPE_DECL_START.length),s.skipBlanks()<1)return n.fatalError("Expected whitespace after "+q.DOCTYPE_DECL_START+" at position "+s.getIndex());var l={name:void 0,publicId:void 0,systemId:void 0,internalSubset:void 0};if(l.name=s.getMatch(q.Name),!l.name)return n.fatalError("doctype name missing or contains unexpected characters at position "+s.getIndex());if(i&&l.name.toLowerCase()!=="html"&&n.warning("Unexpected DOCTYPE in HTML document at position "+s.getIndex()),s.skipBlanks(),s.substringStartsWith(q.PUBLIC)||s.substringStartsWith(q.SYSTEM)){var u=q.ExternalID_match.exec(s.substringFromIndex());if(!u)return n.fatalError("doctype external id is not well-formed at position "+s.getIndex());u.groups.SystemLiteralOnly!==void 0?l.systemId=u.groups.SystemLiteralOnly:(l.systemId=u.groups.SystemLiteral,l.publicId=u.groups.PubidLiteral),s.skip(u[0].length)}else if(i&&s.substringStartsWithCaseInsensitive(q.SYSTEM)){if(s.skip(q.SYSTEM.length),s.skipBlanks()<1)return n.fatalError("Expected whitespace after "+q.SYSTEM+" at position "+s.getIndex());if(l.systemId=s.getMatch(q.ABOUT_LEGACY_COMPAT_SystemLiteral),!l.systemId)return n.fatalError("Expected "+q.ABOUT_LEGACY_COMPAT+" in single or double quotes after "+q.SYSTEM+" at position "+s.getIndex())}return i&&l.systemId&&!q.ABOUT_LEGACY_COMPAT_SystemLiteral.test(l.systemId)&&n.warning("Unexpected doctype.systemId in HTML document at position "+s.getIndex()),i||(s.skipBlanks(),l.internalSubset=$m(s,n)),s.skipBlanks(),s.char()!==">"?n.fatalError("doctype not terminated with > at position "+s.getIndex()):(s.skip(1),r.startDTD(l.name,l.publicId,l.systemId,l.internalSubset),r.endDTD(),s.getIndex())}default:return n.fatalError('Not well-formed XML starting with "<!" at position '+e)}}function qm(t,e,r,n){var i=t.substring(e).match(q.PI);if(!i)return n.fatalError("Invalid processing instruction starting at position "+e);if(i[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(!q.XMLDecl.test(t.substring(e)))return n.fatalError("xml declaration is not well-formed")}return r.processingInstruction(i[1],i[2]),e+i[0].length}function gu(){this.attributeNames=Object.create(null)}gu.prototype={setTagName:function(t){if(!q.QName_exact.test(t))throw new Error("invalid tagName:"+t);this.tagName=t},addValue:function(t,e,r){if(!q.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}};Ni.XMLReader=mu;Ni.parseUtils=hu;Ni.parseDoctypeCommentOrCData=_u});var Tu=Nt(jr=>{"use strict";var sr=nr(),jm=ha(),zm=bn(),wu=uu(),Vm=bu(),Hm=jm.DOMImplementation,Wm=sr.hasDefaultHTMLNamespace,Gm=sr.isHTMLMimeType,Xm=sr.isValidMimeType,Eu=sr.MIME_TYPE,ga=sr.NAMESPACE,yu=zm.ParseError,Ym=Vm.XMLReader;function ku(t){return t.replace(/\r[\n\u0085]/g,`
1
+ var Uo=Object.create;var Vn=Object.defineProperty;var Po=Object.getOwnPropertyDescriptor;var qo=Object.getOwnPropertyNames;var jo=Object.getPrototypeOf,Vo=Object.prototype.hasOwnProperty;var tt=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}},na=(t,e)=>{for(var r in e)Vn(t,r,{get:e[r],enumerable:!0})},jn=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of qo(e))!Vo.call(t,s)&&s!==r&&Vn(t,s,{get:()=>e[s],enumerable:!(n=Po(e,s))||n.enumerable});return t},Wr=(t,e,r)=>(jn(t,e,"default"),r&&jn(r,e,"default")),sa=(t,e,r)=>(r=t!=null?Uo(jo(t)):{},jn(e||!t||!t.__esModule?Vn(r,"default",{value:t,enumerable:!0}):r,t));var kt=tt(pe=>{"use strict";function pu(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(vt(t,n)){var s=t[n];if(e.call(void 0,s,n,t))return s}}function Rt(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 vt(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function hu(t,e){if(t===null||typeof t!="object")throw new TypeError("target is not an object");for(var r in e)vt(e,r)&&(t[r]=e[r]);return t}var Pa=Rt({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 mu(t){return vt(Pa,t.toLowerCase())}var qa=Rt({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 _u(t){return vt(qa,t.toLowerCase())}var pr=Rt({script:!1,style:!1,textarea:!0,title:!0});function gu(t){var e=t.toLowerCase();return vt(pr,e)&&!pr[e]}function bu(t){var e=t.toLowerCase();return vt(pr,e)&&pr[e]}function ja(t){return t===hr.HTML}function wu(t){return ja(t)||t===hr.XML_XHTML_APPLICATION}var hr=Rt({HTML:"text/html",XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),yu=Object.keys(hr).map(function(t){return hr[t]});function vu(t){return yu.indexOf(t)>-1}var ku=Rt({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/"});pe.assign=hu;pe.find=pu;pe.freeze=Rt;pe.HTML_BOOLEAN_ATTRIBUTES=Pa;pe.HTML_RAW_TEXT_ELEMENTS=pr;pe.HTML_VOID_ELEMENTS=qa;pe.hasDefaultHTMLNamespace=wu;pe.hasOwn=vt;pe.isHTMLBooleanAttribute=mu;pe.isHTMLRawTextElement=gu;pe.isHTMLEscapableRawTextElement=bu;pe.isHTMLMimeType=ja;pe.isHTMLVoidElement=_u;pe.isValidMimeType=vu;pe.MIME_TYPE=hr;pe.NAMESPACE=ku});var wr=tt(br=>{"use strict";var Eu=kt();function za(t,e){t.prototype=Object.create(Error.prototype,{constructor:{value:t},name:{value:t.name,enumerable:!0,writable:e}})}var _r=Eu.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"}),Ha=Object.keys(_r);function Wa(t){return typeof t=="number"&&t>=1&&t<=25}function Du(t){return typeof t=="string"&&t.substring(t.length-_r.Error.length)===_r.Error}function gr(t,e){Wa(t)?(this.name=Ha[t],this.message=e||""):(this.message=t,this.name=Du(e)?e:_r.Error),Error.captureStackTrace&&Error.captureStackTrace(this,gr)}za(gr,!0);Object.defineProperties(gr.prototype,{code:{enumerable:!0,get:function(){var t=Ha.indexOf(this.name);return Wa(t)?t:0}}});var Xa={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},cs=Object.entries(Xa);for(mr=0;mr<cs.length;mr++)Va=cs[mr][0],gr[Va]=cs[mr][1];var Va,mr;function ds(t,e,r){this.message=t,this.locator=e,this.cause=r,Error.captureStackTrace&&Error.captureStackTrace(this,ds)}za(ds);br.DOMException=gr;br.DOMExceptionName=_r;br.ExceptionCode=Xa;br.ParseError=ds});var bs=tt(M=>{"use strict";function Qa(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 Ft=Qa();function lt(t){if(t.source[0]!=="[")throw new Error(t+" can not be used with chars");return t.source.slice(1,t.source.lastIndexOf("]"))}function Lt(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,""),Ft?"u":"")}function L(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(""),Ft?"u":"")}function O(t){if(arguments.length===0)throw new Error("no parameters provided");return L.apply(O,["(?:"].concat(Array.prototype.slice.call(arguments),[")"]))}var Au="\uFFFD",ut=/[-\x09\x0A\x0D\x20-\x2C\x2E-\uD7FF\uE000-\uFFFD]/;Ft&&(ut=L("[",lt(ut),"\\u{10000}-\\u{10FFFF}","]"));var xu=new RegExp("[^"+lt(ut)+"]",Ft?"u":""),cn=/[\x20\x09\x0D\x0A]/,Tu=lt(cn),H=L(cn,"+"),Z=L(cn,"*"),yr=/[:_a-zA-Z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;Ft&&(yr=L("[",lt(yr),"\\u{10000}-\\u{10FFFF}","]"));var Cu=lt(yr),hs=L("[",Cu,lt(/[-.0-9\xB7]/),lt(/[\u0300-\u036F\u203F-\u2040]/),"]"),Ae=L(yr,hs,"*"),Nu=L("^",Ae,"$"),Ga=L(hs,"+"),Su=L("&",Ae,";"),Ou=O(/&#[0-9]+;|&#x[0-9a-fA-F]+;/),vr=O(Su,"|",Ou),kr=L("%",Ae,";"),ms=O(L('"',O(/[^%&"]/,"|",kr,"|",vr),"*",'"'),"|",L("'",O(/[^%&']/,"|",kr,"|",vr),"*","'")),Bu=O('"',O(/[^<&"]/,"|",vr),"*",'"',"|","'",O(/[^<&']/,"|",vr),"*","'"),Iu=Lt(yr,":"),Mu=Lt(hs,":"),fs=L(Iu,Mu,"*"),Ru=L("^",fs,"$"),Er=L(fs,O(":",fs),"?"),Lu=L("^",Er,"$"),$u=L("(",Er,")"),$t=O(/"[^"]*"|'[^']*'/),Fu=L(/^<\?/,"(",Ae,")",O(H,"(?!",cn,")(",ut,"*?)"),"?",/\?>/),Ya=/[\x20\x0D\x0Aa-zA-Z0-9-'()+,./:=?;!*#@$_%]/,Dr=O('"',Ya,'*"',"|","'",Lt(Ya,"'"),"*'"),ei="<!--",ti="-->",Uu=L(ei,O(Lt(ut,"-"),"|",L("-",Lt(ut,"-"))),"*",ti),Za="#PCDATA",Pu=O(L(/\(/,Z,Za,O(Z,/\|/,Z,Er),"*",Z,/\)\*/),"|",L(/\(/,Z,Za,Z,/\)/)),qu=/[?*+]?/,ju=L(/\([^>]+\)/,qu),Vu=O("EMPTY","|","ANY","|",Pu,"|",ju),zu="<!ELEMENT",Hu=L(zu,H,O(Er,"|",kr),H,O(Vu,"|",kr),Z,">"),Wu=L("NOTATION",H,/\(/,Z,Ae,O(Z,/\|/,Z,Ae),"*",Z,/\)/),Xu=L(/\(/,Z,Ga,O(Z,/\|/,Z,Ga),"*",Z,/\)/),Gu=O(Wu,"|",Xu),Yu=O(/CDATA|ID|IDREF|IDREFS|ENTITY|ENTITIES|NMTOKEN|NMTOKENS/,"|",Gu),Zu=O(/#REQUIRED|#IMPLIED/,"|",O(O("#FIXED",H),"?",Bu)),Ju=O(H,Ae,H,Yu,H,Zu),Ku="<!ATTLIST",Qu=L(Ku,H,Ae,Ju,"*",Z,">"),ps="about:legacy-compat",ec=O('"'+ps+'"',"|","'"+ps+"'"),_s="SYSTEM",dn="PUBLIC",fn=O(O(_s,H,$t),"|",O(dn,H,Dr,H,$t)),tc=L("^",O(O(_s,H,"(?<SystemLiteralOnly>",$t,")"),"|",O(dn,H,"(?<PubidLiteral>",Dr,")",H,"(?<SystemLiteral>",$t,")"))),rc=L("^",Dr,"$"),nc=L("^",$t,"$"),sc=O(H,"NDATA",H,Ae),ac=O(ms,"|",O(fn,sc,"?")),ri="<!ENTITY",ic=L(ri,H,Ae,H,ac,Z,">"),oc=O(ms,"|",fn),lc=L(ri,H,"%",H,Ae,H,oc,Z,">"),uc=O(ic,"|",lc),cc=L(dn,H,Dr),dc=L("<!NOTATION",H,Ae,H,O(fn,"|",cc),Z,">"),gs=L(Z,"=",Z),Ja=/1[.]\d+/,fc=L(H,"version",gs,O("'",Ja,"'","|",'"',Ja,'"')),Ka=/[A-Za-z][-A-Za-z0-9._]*/,pc=O(H,"encoding",gs,O('"',Ka,'"',"|","'",Ka,"'")),hc=O(H,"standalone",gs,O("'",O("yes","|","no"),"'","|",'"',O("yes","|","no"),'"')),mc=L(/^<\?xml/,fc,pc,"?",hc,"?",Z,/\?>/),_c="<!DOCTYPE",gc="<![CDATA[",bc="]]>",wc=/<!\[CDATA\[/,yc=/\]\]>/,vc=L(ut,"*?",yc),kc=L(wc,vc);M.chars=lt;M.chars_without=Lt;M.detectUnicodeSupport=Qa;M.reg=L;M.regg=O;M.ABOUT_LEGACY_COMPAT=ps;M.ABOUT_LEGACY_COMPAT_SystemLiteral=ec;M.AttlistDecl=Qu;M.CDATA_START=gc;M.CDATA_END=bc;M.CDSect=kc;M.Char=ut;M.Comment=Uu;M.COMMENT_START=ei;M.COMMENT_END=ti;M.DOCTYPE_DECL_START=_c;M.elementdecl=Hu;M.EntityDecl=uc;M.EntityValue=ms;M.ExternalID=fn;M.ExternalID_match=tc;M.Name=Ae;M.Name_exact=Nu;M.NCName_exact=Ru;M.NotationDecl=dc;M.Reference=vr;M.PEReference=kr;M.PI=Fu;M.PUBLIC=dn;M.PubidLiteral=Dr;M.PubidLiteral_match=rc;M.QName=Er;M.QName_exact=Lu;M.QName_group=$u;M.S=H;M.SChar_s=Tu;M.S_OPT=Z;M.SYSTEM=_s;M.SystemLiteral=$t;M.SystemLiteral_match=nc;M.InvalidChar=xu;M.UNICODE_REPLACEMENT_CHARACTER=Au;M.UNICODE_SUPPORT=Ft;M.XMLDecl=mc});var Cs=tt(ee=>{"use strict";var Ce=kt(),qe=Ce.find,Ec=Ce.hasDefaultHTMLNamespace,Pt=Ce.hasOwn,Dc=Ce.isHTMLMimeType,Ac=Ce.isHTMLRawTextElement,xc=Ce.isHTMLVoidElement,Ar=Ce.MIME_TYPE,je=Ce.NAMESPACE,we=Symbol(),ui=wr(),E=ui.DOMException,ge=ui.DOMExceptionName,Q=bs();function ke(t){if(t!==we)throw new TypeError("Illegal constructor")}function Tc(t){return t!==""}function Cc(t){return t?t.split(/[\t\n\f\r ]+/).filter(Tc):[]}function Nc(t,e){return Pt(t,e)||(t[e]=!0),t}function ni(t){if(!t)return[];var e=Cc(t);return Object.keys(e.reduce(Nc,{}))}function Sc(t){return function(e){return t&&t.indexOf(e)!==-1}}function ci(t){if(!Q.QName_exact.test(t))throw new E(E.INVALID_CHARACTER_ERR,'invalid character in qualified name "'+t+'"')}function ys(t,e){ci(e),t=t||null;var r=null,n=e;if(e.indexOf(":")>=0){var s=e.split(":");r=s[0],n=s[1]}if(r!==null&&t===null)throw new E(E.NAMESPACE_ERR,"prefix is non-null and namespace is null");if(r==="xml"&&t!==Ce.NAMESPACE.XML)throw new E(E.NAMESPACE_ERR,'prefix is "xml" and namespace is not the XML namespace');if((r==="xmlns"||e==="xmlns")&&t!==Ce.NAMESPACE.XMLNS)throw new E(E.NAMESPACE_ERR,'either qualifiedName or prefix is "xmlns" and namespace is not the XMLNS namespace');if(t===Ce.NAMESPACE.XMLNS&&r!=="xmlns"&&e!=="xmlns")throw new E(E.NAMESPACE_ERR,'namespace is the XMLNS namespace and neither qualifiedName nor prefix is "xmlns"');return[t,r,n]}function Vt(t,e){for(var r in t)Pt(t,r)&&(e[r]=t[r])}function Ee(t,e){var r=t.prototype;if(!(r instanceof e)){let n=function(){};n.prototype=e.prototype,n=new n,Vt(r,n),t.prototype=r=n}r.constructor!=t&&(typeof t!="function"&&console.error("unknown Class:"+t),r.constructor=t)}var De={},Te=De.ELEMENT_NODE=1,qt=De.ATTRIBUTE_NODE=2,xr=De.TEXT_NODE=3,di=De.CDATA_SECTION_NODE=4,fi=De.ENTITY_REFERENCE_NODE=5,Oc=De.ENTITY_NODE=6,vs=De.PROCESSING_INSTRUCTION_NODE=7,ks=De.COMMENT_NODE=8,Ut=De.DOCUMENT_NODE=9,pi=De.DOCUMENT_TYPE_NODE=10,ct=De.DOCUMENT_FRAGMENT_NODE=11,Bc=De.NOTATION_NODE=12,K=Ce.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 hi(t,e){if(e.length<t.length)return hi(e,t);var r=null;for(var n in t){if(t[n]!==e[n])return r;r=t[n]}return r}function si(t){return t.guid||(t.guid=Math.random()),t.guid}function oe(){}oe.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++)Ts(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)}};oe.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 Pe(t,e){this._node=t,this._refresh=e,_n(this)}function _n(t){var e=t._node._inc||t._node.ownerDocument._inc;if(t._inc!==e){var r=t._refresh(t._node);if(Ai(t,"length",r.length),!t.$$length||r.length<t.$$length)for(var n=r.length;n in t;n++)Pt(t,n)&&delete t[n];Vt(r,t),t._inc=e}}Pe.prototype.item=function(t){return _n(this),this[t]||null};Ee(Pe,oe);function jt(){this._nsIndex=Object.create(null),this._noNsIndex=Object.create(null)}function mi(t,e){for(var r=0;r<t.length;){if(t[r]===e)return r;r++}}function Es(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 Ic(t,e,r){var n=Es(t,e,!1),s=n&&n[r];return s||null}function Mc(t,e){Es(t,e.namespaceURI,!0)[e.localName]=e}function Rc(t,e){var r=Es(t,e.namespaceURI,!1);r&&delete r[e.localName]}function Lc(t,e,r,n){if(n?e[mi(e,n)]=r:(e[e.length]=r,e.length++),Mc(e,r),t){r.ownerElement=t;var s=t.ownerDocument;s&&(n&&bi(s,t,n),$c(s,t,r))}}function ai(t,e,r){var n=mi(e,r);if(n>=0){for(var s=e.length-1;n<=s;)e[n]=e[++n];if(e.length=s,Rc(e,r),t){var a=t.ownerDocument;a&&bi(a,t,r),r.ownerElement=null}}}jt.prototype={length:0,item:oe.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 E(E.INUSE_ATTRIBUTE_ERR);var r=Ic(this,t.namespaceURI,t.localName);return r===t?t:(Lc(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 E(E.NOT_FOUND_ERR,t);return ai(this._ownerElement,this,e),e},removeNamedItemNS:function(t,e){var r=this.getNamedItemNS(t,e);if(!r)throw new E(E.NOT_FOUND_ERR,t?t+" : "+e:e);return ai(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}};jt.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 _i(){}_i.prototype={hasFeature:function(t,e){return!0},createDocument:function(t,e,r){var n=Ar.XML_APPLICATION;t===je.HTML?n=Ar.XML_XHTML_APPLICATION:t===je.SVG&&(n=Ar.XML_SVG_IMAGE);var s=new Ye(we,{contentType:n});if(s.implementation=this,s.childNodes=new oe,s.doctype=r||null,r&&s.appendChild(r),e){var a=s.createElementNS(t,e);s.appendChild(a)}return s},createDocumentType:function(t,e,r,n){ci(t);var s=new wn(we);return s.name=t,s.nodeName=t,s.publicId=e||"",s.systemId=r||"",s.internalSubset=n||"",s.childNodes=new oe,s},createHTMLDocument:function(t){var e=new Ye(we,{contentType:Ar.HTML});if(e.implementation=this,e.childNodes=new oe,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 s=e.createElement("title");s.appendChild(e.createTextNode(t)),n.appendChild(s)}r.appendChild(e.createElement("body"))}return e}};function P(t){ke(t)}P.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,s=r.other;if(n.nodeType!==s.nodeType)return!1;switch(n.nodeType){case n.DOCUMENT_TYPE_NODE:if(n.name!==s.name||n.publicId!==s.publicId||n.systemId!==s.systemId)return!1;break;case n.ELEMENT_NODE:if(n.namespaceURI!==s.namespaceURI||n.prefix!==s.prefix||n.localName!==s.localName||n.attributes.length!==s.attributes.length)return!1;for(var a=0;a<n.attributes.length;a++){var i=n.attributes.item(a),o=s.getAttributeNodeNS(i.namespaceURI,i.localName);if(!o)return!1;e.push({node:i,other:o})}break;case n.ATTRIBUTE_NODE:if(n.namespaceURI!==s.namespaceURI||n.localName!==s.localName||n.value!==s.value)return!1;break;case n.PROCESSING_INSTRUCTION_NODE:if(n.target!==s.target||n.data!==s.data)return!1;break;case n.TEXT_NODE:case n.CDATA_SECTION_NODE:case n.COMMENT_NODE:if(n.data!==s.data)return!1;break}if(n.childNodes.length!==s.childNodes.length)return!1;for(var a=n.childNodes.length-1;a>=0;a--)e.push({node:n.childNodes[a],other:s.childNodes[a]})}return!0},isSameNode:function(t){return this===t},insertBefore:function(t,e){return mn(this,t,e)},replaceChild:function(t,e){mn(this,t,e,vi),e&&this.removeChild(e)},removeChild:function(t){return wi(this,t)},appendChild:function(t){return this.insertBefore(t,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(t){return Di(this.ownerDocument||this,this,t)},normalize:function(){he(this,null,{enter:function(t){for(var e=t.firstChild;e;){var r=e.nextSibling;if(r!==null&&r.nodeType===xr&&e.nodeType===xr){for(var n=[],s=r;s!==null&&s.nodeType===xr;)n.push(s.data),s=s.nextSibling;for(var a=e.nextSibling;a!==s;){var i=a.nextSibling;a.parentNode=null,a.previousSibling=null,a.nextSibling=null,a=i}e.nextSibling=s,s!==null?s.previousSibling=e:t.lastChild=e,e.appendData(n.join("")),Ds(t.ownerDocument,t),e=s}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(Pt(r,n)&&r[n]===t)return n}e=e.nodeType==qt?e.ownerDocument:e.parentNode}return null},lookupNamespaceURI:function(t){for(var e=this;e;){var r=e._nsMap;if(r&&Pt(r,t))return r[t];e=e.nodeType==qt?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,s=null;if(e instanceof Et&&(n=e,e=n.ownerElement),r instanceof Et&&(s=r,r=s.ownerElement,n&&e&&r===e))for(var a=0,i;i=r.attributes[a];a++){if(i===n)return K.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+K.DOCUMENT_POSITION_PRECEDING;if(i===s)return K.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+K.DOCUMENT_POSITION_FOLLOWING}if(!e||!r||r.ownerDocument!==e.ownerDocument)return K.DOCUMENT_POSITION_DISCONNECTED+K.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+(si(r.ownerDocument)>si(e.ownerDocument)?K.DOCUMENT_POSITION_FOLLOWING:K.DOCUMENT_POSITION_PRECEDING);if(s&&e===r)return K.DOCUMENT_POSITION_CONTAINS+K.DOCUMENT_POSITION_PRECEDING;if(n&&e===r)return K.DOCUMENT_POSITION_CONTAINED_BY+K.DOCUMENT_POSITION_FOLLOWING;for(var o=[],l=e.parentNode;l;){if(!s&&l===r)return K.DOCUMENT_POSITION_CONTAINED_BY+K.DOCUMENT_POSITION_FOLLOWING;o.push(l),l=l.parentNode}o.reverse();for(var u=[],c=r.parentNode;c;){if(!n&&c===e)return K.DOCUMENT_POSITION_CONTAINS+K.DOCUMENT_POSITION_PRECEDING;u.push(c),c=c.parentNode}u.reverse();var d=hi(o,u);for(var f in d.childNodes){var p=d.childNodes[f];if(p===r)return K.DOCUMENT_POSITION_FOLLOWING;if(p===e)return K.DOCUMENT_POSITION_PRECEDING;if(u.indexOf(p)>=0)return K.DOCUMENT_POSITION_FOLLOWING;if(o.indexOf(p)>=0)return K.DOCUMENT_POSITION_PRECEDING}return 0}};function gi(t){return t=="<"&&"&lt;"||t==">"&&"&gt;"||t=="&"&&"&amp;"||t=='"'&&"&quot;"||"&#"+t.charCodeAt()+";"}Vt(De,P);Vt(De,P.prototype);Vt(K,P);Vt(K,P.prototype);function hn(t,e){he(t,null,{enter:function(r){return e(r)?he.STOP:!0}})}function he(t,e,r){for(var n=[{node:t,context:e,phase:he.ENTER}];n.length>0;){var s=n.pop();if(s.phase===he.ENTER){var a=r.enter(s.node,s.context);if(a===he.STOP)return he.STOP;if(n.push({node:s.node,context:a,phase:he.EXIT}),a==null)continue;for(var i=s.node.lastChild;i;)n.push({node:i,context:a,phase:he.ENTER}),i=i.previousSibling}else r.exit&&r.exit(s.node,s.context)}}he.STOP=Symbol("walkDOM.STOP");he.ENTER=0;he.EXIT=1;function Ye(t,e){ke(t);var r=e||{};this.ownerDocument=this,this.contentType=r.contentType||Ar.XML_APPLICATION,this.type=Dc(this.contentType)?"html":"xml"}function $c(t,e,r){t&&t._inc++;var n=r.namespaceURI;n===je.XMLNS&&(e._nsMap[r.prefix?r.localName:""]=r.value)}function bi(t,e,r,n){t&&t._inc++;var s=r.namespaceURI;s===je.XMLNS&&delete e._nsMap[r.prefix?r.localName:""]}function Ds(t,e,r){if(t&&t._inc){t._inc++;var n=e.childNodes;if(r&&!r.nextSibling)n[n.length++]=r;else{for(var s=e.firstChild,a=0;s;)n[a++]=s,s=s.nextSibling;n.length=a,delete n[n.length]}}}function wi(t,e){if(t!==e.parentNode)throw new E(E.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,Ds(t.ownerDocument,t),e.parentNode=null,e.previousSibling=null,e.nextSibling=null,e}function Fc(t){return t&&(t.nodeType===P.DOCUMENT_NODE||t.nodeType===P.DOCUMENT_FRAGMENT_NODE||t.nodeType===P.ELEMENT_NODE)}function Uc(t){return t&&(t.nodeType===P.CDATA_SECTION_NODE||t.nodeType===P.COMMENT_NODE||t.nodeType===P.DOCUMENT_FRAGMENT_NODE||t.nodeType===P.DOCUMENT_TYPE_NODE||t.nodeType===P.ELEMENT_NODE||t.nodeType===P.PROCESSING_INSTRUCTION_NODE||t.nodeType===P.TEXT_NODE)}function dt(t){return t&&t.nodeType===P.DOCUMENT_TYPE_NODE}function Ge(t){return t&&t.nodeType===P.ELEMENT_NODE}function yi(t){return t&&t.nodeType===P.TEXT_NODE}function ii(t,e){var r=t.childNodes||[];if(qe(r,Ge)||dt(e))return!1;var n=qe(r,dt);return!(e&&n&&r.indexOf(n)>r.indexOf(e))}function oi(t,e){var r=t.childNodes||[];function n(a){return Ge(a)&&a!==e}if(qe(r,n))return!1;var s=qe(r,dt);return!(e&&s&&r.indexOf(s)>r.indexOf(e))}function Pc(t,e,r){if(!Fc(t))throw new E(E.HIERARCHY_REQUEST_ERR,"Unexpected parent node type "+t.nodeType);if(r&&r.parentNode!==t)throw new E(E.NOT_FOUND_ERR,"child not in parent");if(!Uc(e)||dt(e)&&t.nodeType!==P.DOCUMENT_NODE)throw new E(E.HIERARCHY_REQUEST_ERR,"Unexpected node type "+e.nodeType+" for parent node type "+t.nodeType)}function qc(t,e,r){var n=t.childNodes||[],s=e.childNodes||[];if(e.nodeType===P.DOCUMENT_FRAGMENT_NODE){var a=s.filter(Ge);if(a.length>1||qe(s,yi))throw new E(E.HIERARCHY_REQUEST_ERR,"More than one element or text in fragment");if(a.length===1&&!ii(t,r))throw new E(E.HIERARCHY_REQUEST_ERR,"Element in fragment can not be inserted before doctype")}if(Ge(e)&&!ii(t,r))throw new E(E.HIERARCHY_REQUEST_ERR,"Only one element can be added and only after doctype");if(dt(e)){if(qe(n,dt))throw new E(E.HIERARCHY_REQUEST_ERR,"Only one doctype is allowed");var i=qe(n,Ge);if(r&&n.indexOf(i)<n.indexOf(r))throw new E(E.HIERARCHY_REQUEST_ERR,"Doctype can only be inserted before an element");if(!r&&i)throw new E(E.HIERARCHY_REQUEST_ERR,"Doctype can not be appended since element is present")}}function vi(t,e,r){var n=t.childNodes||[],s=e.childNodes||[];if(e.nodeType===P.DOCUMENT_FRAGMENT_NODE){var a=s.filter(Ge);if(a.length>1||qe(s,yi))throw new E(E.HIERARCHY_REQUEST_ERR,"More than one element or text in fragment");if(a.length===1&&!oi(t,r))throw new E(E.HIERARCHY_REQUEST_ERR,"Element in fragment can not be inserted before doctype")}if(Ge(e)&&!oi(t,r))throw new E(E.HIERARCHY_REQUEST_ERR,"Only one element can be added and only after doctype");if(dt(e)){if(qe(n,function(l){return dt(l)&&l!==r}))throw new E(E.HIERARCHY_REQUEST_ERR,"Only one doctype is allowed");var i=qe(n,Ge);if(r&&n.indexOf(i)<n.indexOf(r))throw new E(E.HIERARCHY_REQUEST_ERR,"Doctype can only be inserted before an element")}}function mn(t,e,r,n){Pc(t,e,r),t.nodeType===P.DOCUMENT_NODE&&(n||qc)(t,e,r);var s=e.parentNode;if(s&&s.removeChild(e),e.nodeType===ct){var a=e.firstChild;if(a==null)return e;var i=e.lastChild}else a=i=e;var o=r?r.previousSibling:t.lastChild;a.previousSibling=o,i.nextSibling=r,o?o.nextSibling=a:t.firstChild=a,r==null?t.lastChild=i:r.previousSibling=i;do a.parentNode=t;while(a!==i&&(a=a.nextSibling));return Ds(t.ownerDocument||t,t,e),e.nodeType==ct&&(e.firstChild=e.lastChild=null),e}Ye.prototype={implementation:null,nodeName:"#document",nodeType:Ut,doctype:null,documentElement:null,_inc:1,insertBefore:function(t,e){if(t.nodeType===ct){for(var r=t.firstChild;r;){var n=r.nextSibling;this.insertBefore(r,e),r=n}return t}return mn(this,t,e),t.ownerDocument=this,this.documentElement===null&&t.nodeType===Te&&(this.documentElement=t),t},removeChild:function(t){var e=wi(this,t);return e===this.documentElement&&(this.documentElement=null),e},replaceChild:function(t,e){mn(this,t,e,vi),t.ownerDocument=this,e&&this.removeChild(e),Ge(t)&&(this.documentElement=t)},importNode:function(t,e){return jc(this,t,e)},getElementById:function(t){var e=null;return hn(this.documentElement,function(r){if(r.nodeType==Te&&r.getAttribute("id")==t)return e=r,!0}),e},createElement:function(t){var e=new Ze(we);e.ownerDocument=this,this.type==="html"&&(t=t.toLowerCase()),Ec(this.contentType)&&(e.namespaceURI=je.HTML),e.nodeName=t,e.tagName=t,e.localName=t,e.childNodes=new oe;var r=e.attributes=new jt;return r._ownerElement=e,e},createDocumentFragment:function(){var t=new zt(we);return t.ownerDocument=this,t.childNodes=new oe,t},createTextNode:function(t){var e=new Tr(we);return e.ownerDocument=this,e.childNodes=new oe,e.appendData(t),e},createComment:function(t){var e=new gn(we);return e.ownerDocument=this,e.childNodes=new oe,e.appendData(t),e},createCDATASection:function(t){if(t.indexOf("]]>")!==-1)throw new E(E.INVALID_CHARACTER_ERR,'data contains "]]>"');var e=new bn(we);return e.ownerDocument=this,e.childNodes=new oe,e.appendData(t),e},createProcessingInstruction:function(t,e){var r=new vn(we);return r.ownerDocument=this,r.childNodes=new oe,r.nodeName=r.target=t,r.nodeValue=r.data=e,r},createAttribute:function(t){if(!Q.QName_exact.test(t))throw new E(E.INVALID_CHARACTER_ERR,'invalid character in name "'+t+'"');return this.type==="html"&&(t=t.toLowerCase()),this._createAttribute(t)},_createAttribute:function(t){var e=new Et(we);return e.ownerDocument=this,e.childNodes=new oe,e.name=t,e.nodeName=t,e.localName=t,e.specified=!0,e},createEntityReference:function(t){if(!Q.Name_exact.test(t))throw new E(E.INVALID_CHARACTER_ERR,'not a valid xml name "'+t+'"');if(this.type==="html")throw new E("document is an html document",ge.NotSupportedError);var e=new yn(we);return e.ownerDocument=this,e.childNodes=new oe,e.nodeName=t,e},createElementNS:function(t,e){var r=ys(t,e),n=new Ze(we),s=n.attributes=new jt;return n.childNodes=new oe,n.ownerDocument=this,n.nodeName=e,n.tagName=e,n.namespaceURI=r[0],n.prefix=r[1],n.localName=r[2],s._ownerElement=n,n},createAttributeNS:function(t,e){var r=ys(t,e),n=new Et(we);return n.ownerDocument=this,n.childNodes=new oe,n.nodeName=e,n.name=e,n.specified=!0,n.namespaceURI=r[0],n.prefix=r[1],n.localName=r[2],n}};Ee(Ye,P);function Ze(t){ke(t),this._nsMap=Object.create(null)}Ze.prototype={nodeType:Te,attributes:null,getQualifiedName:function(){return this.prefix?this.prefix+":"+this.localName:this.localName},_isInHTMLDocumentAndNamespace:function(){return this.ownerDocument.type==="html"&&this.namespaceURI===je.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=ys(t,e),s=n[2],a=this.getAttributeNodeNS(t,s);a?a.value=a.nodeValue=""+r:(a=this.ownerDocument.createAttributeNS(t,e),a.value=a.nodeValue=""+r,this.setAttributeNode(a))},getAttributeNodeNS:function(t,e){return this.attributes.getNamedItemNS(t,e)},getElementsByClassName:function(t){var e=ni(t);return new Pe(this,function(r){var n=[];return e.length>0&&hn(r,function(s){if(s!==r&&s.nodeType===Te){var a=s.getAttribute("class");if(a){var i=t===a;if(!i){var o=ni(a);i=e.every(Sc(o))}i&&n.push(s)}}}),n})},getElementsByTagName:function(t){var e=(this.nodeType===Ut?this:this.ownerDocument).type==="html",r=t.toLowerCase();return new Pe(this,function(n){var s=[];return hn(n,function(a){if(!(a===n||a.nodeType!==Te))if(t==="*")s.push(a);else{var i=a.getQualifiedName(),o=e&&a.namespaceURI===je.HTML?r:t;i===o&&s.push(a)}}),s})},getElementsByTagNameNS:function(t,e){return new Pe(this,function(r){var n=[];return hn(r,function(s){s!==r&&s.nodeType===Te&&(t==="*"||s.namespaceURI===t)&&(e==="*"||s.localName==e)&&n.push(s)}),n})}};Ye.prototype.getElementsByClassName=Ze.prototype.getElementsByClassName;Ye.prototype.getElementsByTagName=Ze.prototype.getElementsByTagName;Ye.prototype.getElementsByTagNameNS=Ze.prototype.getElementsByTagNameNS;Ee(Ze,P);function Et(t){ke(t),this.namespaceURI=null,this.prefix=null,this.ownerElement=null}Et.prototype.nodeType=qt;Ee(Et,P);function ft(t){ke(t)}ft.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),s=this.data.substring(t+e);r=n+r+s,this.nodeValue=this.data=r,this.length=r.length}};Ee(ft,P);function Tr(t){ke(t)}Tr.prototype={nodeName:"#text",nodeType:xr,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}};Ee(Tr,ft);function gn(t){ke(t)}gn.prototype={nodeName:"#comment",nodeType:ks};Ee(gn,ft);function bn(t){ke(t)}bn.prototype={nodeName:"#cdata-section",nodeType:di};Ee(bn,Tr);function wn(t){ke(t)}wn.prototype.nodeType=pi;Ee(wn,P);function As(t){ke(t)}As.prototype.nodeType=Bc;Ee(As,P);function xs(t){ke(t)}xs.prototype.nodeType=Oc;Ee(xs,P);function yn(t){ke(t)}yn.prototype.nodeType=fi;Ee(yn,P);function zt(t){ke(t)}zt.prototype.nodeName="#document-fragment";zt.prototype.nodeType=ct;Ee(zt,P);function vn(t){ke(t)}vn.prototype.nodeType=vs;Ee(vn,ft);function ki(){}ki.prototype.serializeToString=function(t,e){return Ei.call(t,e)};P.prototype.toString=Ei;function Ei(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===Ut&&this.documentElement||this,s=n.prefix,a=n.namespaceURI;if(a&&s==null){var s=n.lookupPrefix(a);if(s==null)var i=[{namespace:a,prefix:null}]}return Ts(this,r,i,e),r.join("")}function li(t,e,r){var n=t.prefix||"",s=t.namespaceURI;if(!s||n==="xml"&&s===je.XML||s===je.XMLNS)return!1;for(var a=r.length;a--;){var i=r[a];if(i.prefix===n)return i.namespace!==s}return!0}function pn(t,e,r,n){if(n&&!Q.QName_exact.test(e))throw new E('The attribute name "'+e+'" is not a valid XML QName',ge.InvalidStateError);t.push(" ",e,'="',r.replace(/[<>&"\t\n\r]/g,gi),'"')}function Ts(t,e,r,n){r||(r=[]);var s=n.nodeFilter,a=n.requireWellFormed,i=n.splitCDATASections,o=t.nodeType===Ut?t:t.ownerDocument,l=o.type==="html";he(t,{ns:r},{enter:function(u,c){var d=c.ns;if(s)if(u=s(u),u){if(typeof u=="string")return e.push(u),null}else return null;switch(u.nodeType){case Te:var f=u.attributes,p=f.length,h=u.tagName,m=h;if(!l&&!u.prefix&&u.namespaceURI){for(var g,w=0;w<f.length;w++)if(f.item(w).name==="xmlns"){g=f.item(w).value;break}if(!g)for(var b=d.length-1;b>=0;b--){var v=d[b];if(v.prefix===""&&v.namespace===u.namespaceURI){g=v.namespace;break}}if(g!==u.namespaceURI)for(var b=d.length-1;b>=0;b--){var v=d[b];if(v.namespace===u.namespaceURI){v.prefix&&(m=v.prefix+":"+h);break}}}if(a&&!Q.QName_exact.test(m))throw new E('The element name "'+m+'" is not a valid XML QName',ge.InvalidStateError);e.push("<",m);for(var k=d.slice(),D=0;D<p;D++){var y=f.item(D);y.prefix=="xmlns"?k.push({prefix:y.localName,namespace:y.value}):y.nodeName=="xmlns"&&k.push({prefix:"",namespace:y.value})}for(var D=0;D<p;D++){var y=f.item(D);if(li(y,l,k)){var C=y.prefix||"",V=y.namespaceURI;pn(e,C?"xmlns:"+C:"xmlns",V,a),k.push({prefix:C,namespace:V})}var Y=s?s(y):y;Y&&(typeof Y=="string"?e.push(Y):pn(e,Y.name,Y.value,a))}if(h===m&&li(u,l,k)){var U=u.prefix||"",V=u.namespaceURI;pn(e,U?"xmlns:"+U:"xmlns",V,a),k.push({prefix:U,namespace:V})}var B=!u.firstChild;if(B&&(l||u.namespaceURI===je.HTML)&&(B=xc(h)),B)return e.push("/>"),null;if(e.push(">"),l&&Ac(h)){for(var X=u.firstChild;X;)X.data?e.push(X.data):Ts(X,e,k.slice(),n),X=X.nextSibling;return e.push("</",m,">"),null}return{ns:k,tag:m};case Ut:case ct:if(a&&u.nodeType===Ut&&u.documentElement==null)throw new E("The Document has no documentElement",ge.InvalidStateError);return{ns:d};case qt:return pn(e,u.name,u.value,a),null;case xr:if(a&&Q.InvalidChar.test(u.data))throw new E("The Text node data contains characters outside the XML Char production",ge.InvalidStateError);return e.push(u.data.replace(/[<&>]/g,gi)),null;case di:if(a&&u.data.indexOf("]]>")!==-1)throw new E('The CDATASection data contains "]]>"',ge.InvalidStateError);return i?e.push(Q.CDATA_START,u.data.replace(/]]>/g,"]]]]><![CDATA[>"),Q.CDATA_END):e.push(Q.CDATA_START,u.data,Q.CDATA_END),null;case ks:if(a){if(Q.InvalidChar.test(u.data))throw new E("The comment node data contains characters outside the XML Char production",ge.InvalidStateError);if(u.data.indexOf("--")!==-1||u.data[u.data.length-1]==="-")throw new E('The comment node data contains "--" or ends with "-"',ge.InvalidStateError)}return e.push(Q.COMMENT_START,u.data,Q.COMMENT_END),null;case pi:var J=u.publicId,$=u.systemId;if(a){if(!Q.Name_exact.test(u.name))throw new E('The doctype name "'+u.name+'" is not a valid XML Name',ge.InvalidStateError);if(J&&!Q.PubidLiteral_match.test(J))throw new E("DocumentType publicId is not a valid PubidLiteral",ge.InvalidStateError);if($&&$!=="."&&!Q.SystemLiteral_match.test($))throw new E("DocumentType systemId is not a valid SystemLiteral",ge.InvalidStateError);if(u.internalSubset&&u.internalSubset.indexOf("]>")!==-1)throw new E('DocumentType internalSubset contains "]>"',ge.InvalidStateError)}return e.push(Q.DOCTYPE_DECL_START," ",u.name),J?(e.push(" ",Q.PUBLIC," ",J),$&&$!=="."&&e.push(" ",$)):$&&$!=="."&&e.push(" ",Q.SYSTEM," ",$),u.internalSubset&&e.push(" [",u.internalSubset,"]"),e.push(">"),null;case vs:if(a){if(!Q.NCName_exact.test(u.target)||u.target.toLowerCase()==="xml")throw new E('The processing instruction target "'+u.target+'" is not a valid XML NCName or is reserved',ge.InvalidStateError);if(Q.InvalidChar.test(u.data))throw new E("The ProcessingInstruction data contains characters outside the XML Char production",ge.InvalidStateError);if(u.data.indexOf("?>")!==-1)throw new E('The ProcessingInstruction data contains "?>"',ge.InvalidStateError)}return e.push("<?",u.target," ",u.data,"?>"),null;case fi:if(a&&!Q.Name_exact.test(u.nodeName))throw new E('The entity reference name "'+u.nodeName+'" is not a valid XML Name',ge.InvalidStateError);return e.push("&",u.nodeName,";"),null;default:return e.push("??",u.nodeName),null}},exit:function(u,c){c&&c.tag&&e.push("</",c.tag,">")}})}function jc(t,e,r){var n;return he(e,null,{enter:function(s,a){var i=s.cloneNode(!1);i.ownerDocument=t,i.parentNode=null,a===null?n=i:a.appendChild(i);var o=s.nodeType===qt||r;return o?i:null}}),n}function Di(t,e,r){var n;return he(e,null,{enter:function(s,a){var i=new s.constructor(we);for(var o in s)if(Pt(s,o)){var l=s[o];typeof l!="object"&&l!=i[o]&&(i[o]=l)}s.childNodes&&(i.childNodes=new oe),i.ownerDocument=t;var u=r;switch(i.nodeType){case Te:var c=s.attributes,d=i.attributes=new jt,f=c.length;d._ownerElement=i;for(var p=0;p<f;p++)i.setAttributeNode(Di(t,c.item(p),!0));break;case qt:u=!0}return a!==null?a.appendChild(i):n=i,u?i:null}}),n}function Ai(t,e,r){t[e]=r}function ws(t){for(var e=[],r=t.firstChild;r;)r.nodeType===Te&&e.push(r),r=r.nextSibling;return e}try{Object.defineProperty&&(Object.defineProperty(Pe.prototype,"length",{get:function(){return _n(this),this.$$length}}),Object.defineProperty(P.prototype,"textContent",{get:function(){if(this.nodeType===Te||this.nodeType===ct){var t=[];return he(this,null,{enter:function(e){if(e.nodeType===Te||e.nodeType===ct)return!0;if(e.nodeType===vs||e.nodeType===ks)return null;t.push(e.nodeValue)}}),t.join("")}return this.nodeValue},set:function(t){switch(this.nodeType){case Te:case ct: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(ft.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(ft.prototype,"nodeValue",{get:function(){return this.data},set:function(t){this.data=t},enumerable:!0,configurable:!0}),Object.defineProperty(Ze.prototype,"children",{get:function(){return new Pe(this,ws)}}),Object.defineProperty(Ye.prototype,"children",{get:function(){return new Pe(this,ws)}}),Object.defineProperty(zt.prototype,"children",{get:function(){return new Pe(this,ws)}}),Ai=function(t,e,r){t["$$"+e]=r})}catch{}ee._updateLiveList=_n;ee.Attr=Et;ee.CDATASection=bn;ee.CharacterData=ft;ee.Comment=gn;ee.Document=Ye;ee.DocumentFragment=zt;ee.DocumentType=wn;ee.DOMImplementation=_i;ee.Element=Ze;ee.Entity=xs;ee.EntityReference=yn;ee.LiveNodeList=Pe;ee.NamedNodeMap=jt;ee.Node=P;ee.NodeList=oe;ee.Notation=As;ee.Text=Tr;ee.ProcessingInstruction=vn;ee.walkDOM=he;ee.XMLSerializer=ki});var Ti=tt(Cr=>{"use strict";var xi=kt().freeze;Cr.XML_ENTITIES=xi({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'});Cr.HTML_ENTITIES=xi({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"});Cr.entityMap=Cr.HTML_ENTITIES});var Li=tt(En=>{"use strict";var Yt=kt(),R=bs(),Oi=wr(),Vc=Yt.isHTMLEscapableRawTextElement,zc=Yt.isHTMLMimeType,Hc=Yt.isHTMLRawTextElement,Or=Yt.hasOwn,Ci=Yt.NAMESPACE,Wc=Oi.ParseError,Xc=Oi.DOMException,Ht=0,pt=1,Wt=2,Nr=3,Xt=4,Gt=5,Sr=6,kn=7;function Bi(){}Bi.prototype={parse:function(t,e,r){var n=this.domBuilder;n.startDocument(),Jc(e,e=Object.create(null)),Gc(t,e,r,n,this.errorHandler),n.endDocument()}};var Ns=/&#?\w+;?/g;function Gc(t,e,r,n,s){var a=zc(n.mimeType);t.indexOf(R.UNICODE_REPLACEMENT_CHARACTER)>=0&&s.warning("Unicode replacement character detected, source encoding issues?");function i(F){if(F>65535){F-=65536;var A=55296+(F>>10),j=56320+(F&1023);return String.fromCharCode(A,j)}else return String.fromCharCode(F)}function o(F){var A=F[F.length-1]===";"?F:F+";";if(!a&&A!==F)return s.error("EntityRef: expecting ;"),F;var j=R.Reference.exec(A);if(!j||j[0].length!==A.length)return s.error("entity not matching Reference production: "+F),F;var se=A.slice(1,-1);return Or(r,se)?r[se]:se.charAt(0)==="#"?i(parseInt(se.substring(1).replace("x","0x"))):(s.error("entity not found:"+F),F)}function l(F){if(F>g){var A=t.substring(g,F).replace(Ns,o);f&&p(g),n.characters(A,0,F-g),g=F}}var u=0,c=0,d=/\r\n?|\n|$/g,f=n.locator;function p(F,A){for(;F>=c&&(A=d.exec(t));)u=c,c=A.index+A[0].length,f.lineNumber++;f.columnNumber=F-u+1}for(var h=[{currentNSMap:e}],m=[],g=0;;){try{var w=t.indexOf("<",g);if(w<0){if(!a&&m.length>0)return s.fatalError("unclosed xml tag(s): "+m.join(", "));if(!t.substring(g).match(/^\s*$/)){var b=n.doc,v=b.createTextNode(t.substring(g));if(b.documentElement)return s.error("Extra content at the end of the document");b.appendChild(v),n.currentElement=v}return}if(w>g){var k=t.substring(g,w);!a&&m.length===0&&(k=k.replace(new RegExp(R.S_OPT.source,"g"),""),k&&s.error("Unexpected content outside root element: '"+k+"'")),l(w)}switch(t.charAt(w+1)){case"/":var N=t.indexOf(">",w+2),D=t.substring(w+2,N>0?N:void 0);if(!D)return s.fatalError("end tag name missing");var y=R.reg("^",R.QName_group,R.S_OPT,"$"),C=N>0&&y.exec(D);if(!C){var V=N>0&&R.reg("^",R.QName_group).exec(D);if(a&&V)s.warning('end tag name contains invalid trailing characters: "'+D+'"'),C=V;else if(V&&new RegExp(y.source,y.flags+"m").test(D))s.error('end tag name is followed by a line break and trailing content: "'+D+'"'),C=V;else return s.fatalError('end tag name contains invalid characters: "'+D+'"')}if(!n.currentElement&&!n.doc.documentElement)return;var Y=m[m.length-1]||n.currentElement.tagName||n.doc.documentElement.tagName||"";if(Y!==C[1]){var U=C[1].toLowerCase();if(!a||Y.toLowerCase()!==U)return s.fatalError('Opening and ending tag mismatch: "'+Y+'" != "'+D+'"')}var B=h.pop();m.pop();var X=B.localNSMap;if(n.endElement(B.uri,B.localName,Y),X)for(var J in X)Or(X,J)&&n.endPrefixMapping(J);N++;break;case"?":f&&p(w),N=Qc(t,w,n,s);break;case"!":f&&p(w),N=Mi(t,w,n,s,a);break;default:f&&p(w);var $=new Ri,W=h[h.length-1].currentNSMap,N=Yc(t,w,$,W,o,s,a),ne=$.length;if($.closed||(a&&Yt.isHTMLVoidElement($.tagName)?$.closed=!0:m.push($.tagName)),f&&ne){for(var Se=Ni(f,{}),_t=0;_t<ne;_t++){var ar=$[_t];p(ar.offset),ar.locator=Ni(f,{})}n.locator=Se,Si($,n,W)&&h.push($),n.locator=f}else Si($,n,W)&&h.push($);a&&!$.closed?N=Zc(t,N,$.tagName,o,n):N++}}catch(F){if(F instanceof Wc)throw F;if(F instanceof Xc)return s.fatalError("Error constructing the DOM: "+F.name+": "+F.message,F);s.error("element parse error: "+F),N=-1}N>g?g=N:l(Math.max(w,g)+1)}}function Ni(t,e){return e.lineNumber=t.lineNumber,e.columnNumber=t.columnNumber,e}function Yc(t,e,r,n,s,a,i){function o(p,h,m){if(Or(r.attributeNames,p))return a.fatalError("Attribute "+p+" redefined");if(!i&&h.indexOf("<")>=0)return a.fatalError("Unescaped '<' not allowed in attributes values");r.addValue(p,h.replace(/[\t\n\r]/g," ").replace(Ns,s),m)}for(var l,u,c=++e,d=Ht;;){var f=t.charAt(c);if(d===Ht&&f==="<")throw new Error("unexpected < in tag name: "+t.slice(e,c));switch(f){case"=":if(d===pt)l=t.slice(e,c),d=Nr;else if(d===Wt)d=Nr;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(d===Nr||d===pt)if(d===pt&&(a.warning('attribute value must after "="'),l=t.slice(e,c)),e=c+1,c=t.indexOf(f,e),c>0)u=t.slice(e,c),o(l,u,e-1),d=Gt;else throw new Error("attribute value no end '"+f+"' match");else if(d==Xt)u=t.slice(e,c),o(l,u,e),a.warning('attribute "'+l+'" missed start quot('+f+")!!"),e=c+1,d=Gt;else throw new Error('attribute value must after "="');break;case"/":switch(d){case Ht:r.setTagName(t.slice(e,c));case Gt:case Sr:case kn:d=kn,r.closed=!0;case Xt:case pt:break;case Wt:r.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return a.error("unexpected end of input"),d==Ht&&r.setTagName(t.slice(e,c)),c;case">":switch(d){case Ht:r.setTagName(t.slice(e,c));case Gt:case Sr:case kn:break;case Xt:case pt:u=t.slice(e,c),u.slice(-1)==="/"&&(r.closed=!0,u=u.slice(0,-1));case Wt:d===Wt&&(u=l),d==Xt?(a.warning('attribute "'+u+'" missed quot(")!'),o(l,u,e)):(i||a.warning('attribute "'+u+'" missed value!! "'+u+'" instead!!'),o(u,u,e));break;case Nr:if(!i)return a.fatalError(`AttValue: ' or " expected`)}return c;case"\x80":f=" ";default:if(f<=" ")switch(d){case Ht:r.setTagName(t.slice(e,c)),d=Sr;break;case pt:l=t.slice(e,c),d=Wt;break;case Xt:var u=t.slice(e,c);a.warning('attribute "'+u+'" missed quot(")!!'),o(l,u,e);case Gt:d=Sr;break}else switch(d){case Wt:i||a.warning('attribute "'+l+'" missed value!! "'+l+'" instead2!!'),o(l,l,e),e=c,d=pt;break;case Gt:a.warning('attribute space is required"'+l+'"!!');case Sr:d=pt,e=c;break;case Nr:d=Xt,e=c;break;case kn:throw new Error("elements closed character '/' and '>' must be connected to")}}c++}}function Si(t,e,r){for(var n=t.tagName,s=null,d=t.length;d--;){var a=t[d],i=a.qName,o=a.value,f=i.indexOf(":");if(f>0)var l=a.prefix=i.slice(0,f),u=i.slice(f+1),c=l==="xmlns"&&u;else u=i,l=null,c=i==="xmlns"&&"";a.localName=u,c!==!1&&(s==null&&(s=Object.create(null),r=Object.create(r)),r[c]=s[c]=o,a.uri=Ci.XMLNS,e.startPrefixMapping(c,o))}for(var d=t.length;d--;)a=t[d],a.prefix&&(a.prefix==="xml"&&(a.uri=Ci.XML),a.prefix!=="xmlns"&&(a.uri=r[a.prefix]));var f=n.indexOf(":");f>0?(l=t.prefix=n.slice(0,f),u=t.localName=n.slice(f+1)):(l=null,u=t.localName=n);var p=t.uri=r[l||""];if(e.startElement(p,u,n,t),t.closed){if(e.endElement(p,u,n),s)for(l in s)Or(s,l)&&e.endPrefixMapping(l)}else return t.currentNSMap=r,t.localNSMap=s,!0}function Zc(t,e,r,n,s){var a=Vc(r);if(a||Hc(r)){var i=new RegExp("</"+r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+">","ig");i.lastIndex=e;var o=i.exec(t),l=o?o.index:-1;if(l<0)return e+1;var u=t.substring(e+1,l);return a&&(u=u.replace(Ns,n)),s.characters(u,0,u.length),l}return e+1}function Jc(t,e){for(var r in t)Or(t,r)&&(e[r]=t[r])}function Ii(t,e){var r=e;function n(c){return c=c||0,t.charAt(r+c)}function s(c){c=c||1,r+=c}function a(){for(var c=0;r<t.length;){var d=n();if(d!==" "&&d!==`
3
+ `&&d!==" "&&d!=="\r")return c;c++,s()}return-1}function i(){return t.substring(r)}function o(c){return t.substring(r,r+c.length)===c}function l(c){return t.substring(r,r+c.length).toUpperCase()===c.toUpperCase()}function u(c){var d=R.reg("^",c),f=d.exec(i());return f?(s(f[0].length),f[0]):null}return{char:n,getIndex:function(){return r},getMatch:u,getSource:function(){return t},skip:s,skipBlanks:a,substringFromIndex:i,substringStartsWith:o,substringStartsWithCaseInsensitive:l}}function Kc(t,e){function r(o,l){var u=R.PI.exec(o.substringFromIndex());return u?u[1].toLowerCase()==="xml"?l.fatalError("xml declaration is only allowed at the start of the document, but found at position "+o.getIndex()):(o.skip(u[0].length),u[0]):l.fatalError("processing instruction is not well-formed at position "+o.getIndex())}var n=t.getSource();if(t.char()==="["){t.skip(1);for(var s=t.getIndex();t.getIndex()<n.length;){if(t.skipBlanks(),t.char()==="]"){var a=n.substring(s,t.getIndex());return t.skip(1),a}var i=null;if(t.char()==="<"&&t.char(1)==="!")switch(t.char(2)){case"E":t.char(3)==="L"?i=t.getMatch(R.elementdecl):t.char(3)==="N"&&(i=t.getMatch(R.EntityDecl));break;case"A":i=t.getMatch(R.AttlistDecl);break;case"N":i=t.getMatch(R.NotationDecl);break;case"-":i=t.getMatch(R.Comment);break}else if(t.char()==="<"&&t.char(1)==="?")i=r(t,e);else if(t.char()==="%")i=t.getMatch(R.PEReference);else return e.fatalError("Error detected in Markup declaration");if(!i)return e.fatalError("Error in internal subset at position "+t.getIndex())}return e.fatalError("doctype internal subset is not well-formed, missing ]")}}function Mi(t,e,r,n,s){var a=Ii(t,e);switch(s?a.char(2).toUpperCase():a.char(2)){case"-":var i=a.getMatch(R.Comment);return i?(r.comment(i,R.COMMENT_START.length,i.length-R.COMMENT_START.length-R.COMMENT_END.length),a.getIndex()):n.fatalError("comment is not well-formed at position "+a.getIndex());case"[":var o=a.getMatch(R.CDSect);return o?!s&&!r.currentElement?n.fatalError("CDATA outside of element"):(r.startCDATA(),r.characters(o,R.CDATA_START.length,o.length-R.CDATA_START.length-R.CDATA_END.length),r.endCDATA(),a.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 "+a.getIndex());if(s?!a.substringStartsWithCaseInsensitive(R.DOCTYPE_DECL_START):!a.substringStartsWith(R.DOCTYPE_DECL_START))return n.fatalError("Expected "+R.DOCTYPE_DECL_START+" at position "+a.getIndex());if(a.skip(R.DOCTYPE_DECL_START.length),a.skipBlanks()<1)return n.fatalError("Expected whitespace after "+R.DOCTYPE_DECL_START+" at position "+a.getIndex());var l={name:void 0,publicId:void 0,systemId:void 0,internalSubset:void 0};if(l.name=a.getMatch(R.Name),!l.name)return n.fatalError("doctype name missing or contains unexpected characters at position "+a.getIndex());if(s&&l.name.toLowerCase()!=="html"&&n.warning("Unexpected DOCTYPE in HTML document at position "+a.getIndex()),a.skipBlanks(),a.substringStartsWith(R.PUBLIC)||a.substringStartsWith(R.SYSTEM)){var u=R.ExternalID_match.exec(a.substringFromIndex());if(!u)return n.fatalError("doctype external id is not well-formed at position "+a.getIndex());u.groups.SystemLiteralOnly!==void 0?l.systemId=u.groups.SystemLiteralOnly:(l.systemId=u.groups.SystemLiteral,l.publicId=u.groups.PubidLiteral),a.skip(u[0].length)}else if(s&&a.substringStartsWithCaseInsensitive(R.SYSTEM)){if(a.skip(R.SYSTEM.length),a.skipBlanks()<1)return n.fatalError("Expected whitespace after "+R.SYSTEM+" at position "+a.getIndex());if(l.systemId=a.getMatch(R.ABOUT_LEGACY_COMPAT_SystemLiteral),!l.systemId)return n.fatalError("Expected "+R.ABOUT_LEGACY_COMPAT+" in single or double quotes after "+R.SYSTEM+" at position "+a.getIndex())}return s&&l.systemId&&!R.ABOUT_LEGACY_COMPAT_SystemLiteral.test(l.systemId)&&n.warning("Unexpected doctype.systemId in HTML document at position "+a.getIndex()),s||(a.skipBlanks(),l.internalSubset=Kc(a,n)),a.skipBlanks(),a.char()!==">"?n.fatalError("doctype not terminated with > at position "+a.getIndex()):(a.skip(1),r.startDTD(l.name,l.publicId,l.systemId,l.internalSubset),r.endDTD(),a.getIndex())}default:return n.fatalError('Not well-formed XML starting with "<!" at position '+e)}}function Qc(t,e,r,n){var s=t.substring(e).match(R.PI);if(!s)return n.fatalError("Invalid processing instruction starting at position "+e);if(s[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(!R.XMLDecl.test(t.substring(e)))return n.fatalError("xml declaration is not well-formed")}return r.processingInstruction(s[1],s[2]),e+s[0].length}function Ri(){this.attributeNames=Object.create(null)}Ri.prototype={setTagName:function(t){if(!R.QName_exact.test(t))throw new Error("invalid tagName:"+t);this.tagName=t},addValue:function(t,e,r){if(!R.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}};En.XMLReader=Bi;En.parseUtils=Ii;En.parseDoctypeCommentOrCData=Mi});var Vi=tt(Jt=>{"use strict";var Dt=kt(),ed=Cs(),td=wr(),$i=Ti(),rd=Li(),nd=ed.DOMImplementation,sd=Dt.hasDefaultHTMLNamespace,ad=Dt.isHTMLMimeType,id=Dt.isValidMimeType,Pi=Dt.MIME_TYPE,Ss=Dt.NAMESPACE,Fi=td.ParseError,od=rd.XMLReader;function qi(t){return t.replace(/\r[\n\u0085]/g,`
4
4
  `).replace(/[\r\u0085\u2028\u2029]/g,`
5
- `)}function Au(t){if(t=t||{},t.locator===void 0&&(t.locator=!0),this.assign=t.assign||sr.assign,this.domHandler=t.domHandler||Ii,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||ku,this.locator=!!t.locator,this.xmlns=this.assign(Object.create(null),t.xmlns)}Au.prototype.parseFromString=function(t,e){if(!Xm(e))throw new TypeError('DOMParser.parseFromString: the provided mimeType "'+e+'" is not valid.');var r=this.assign(Object.create(null),this.xmlns),n=wu.XML_ENTITIES,i=r[""]||null;Wm(e)?(n=wu.HTML_ENTITIES,i=ga.HTML):e===Eu.XML_SVG_IMAGE&&(i=ga.SVG),r[""]=i,r.xml=r.xml||ga.XML;var s=new this.domHandler({mimeType:e,defaultNamespace:i,onError:this.onError}),a=this.locator?{}:void 0;this.locator&&s.setDocumentLocator(a);var o=new Ym;o.errorHandler=s,o.domBuilder=s;var l=!sr.isHTMLMimeType(e);return l&&typeof t!="string"&&o.errorHandler.fatalError("source is not a string"),o.parse(this.normalizeLineEndings(String(t)),r,n),s.doc.documentElement||o.errorHandler.fatalError("missing root element"),s.doc};function Ii(t){var e=t||{};this.mimeType=e.mimeType||Eu.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 qr(t,e){e.lineNumber=t.lineNumber,e.columnNumber=t.columnNumber}Ii.prototype={startDocument:function(){var t=new Hm;this.doc=Gm(this.mimeType)?t.createHTMLDocument(!1):t.createDocument(this.defaultNamespace,"")},startElement:function(t,e,r,n){var i=this.doc,s=i.createElementNS(t,r||e),a=n.length;Oi(this,s),this.currentElement=s,this.locator&&qr(this.locator,s);for(var o=0;o<a;o++){var t=n.getURI(o),l=n.getValue(o),r=n.getQName(o),u=i.createAttributeNS(t,r);this.locator&&qr(n.getLocator(o),u),u.value=u.nodeValue=l,s.setAttributeNode(u)}},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&&qr(this.locator,r),Oi(this,r)},ignorableWhitespace:function(t,e,r){},characters:function(t,e,r){if(t=vu.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&&qr(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=vu.apply(this,arguments);var n=this.doc.createComment(t);this.locator&&qr(this.locator,n),Oi(this,n)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(t,e,r,n){var i=this.doc.implementation;if(i&&i.createDocumentType){var s=i.createDocumentType(t,e,r,n);this.locator&&qr(this.locator,s),Oi(this,s),this.doc.doctype=s}},reportError:function(t,e){if(typeof this.onError=="function")try{this.onError(t,e,this)}catch(r){throw new yu("Reporting "+t+' "'+e+'" caused '+r,this.locator)}else console.error("[xmldom "+t+"] "+e,Zm(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 yu(t,this.locator,e)}};function Zm(t){if(t)return`
6
- @#[line:`+t.lineNumber+",col:"+t.columnNumber+"]"}function vu(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){Ii.prototype[t]=function(){return null}});function Oi(t,e){t.currentElement?t.currentElement.appendChild(e):t.doc.appendChild(e)}function Jm(t){if(t==="error")throw"onErrorStopParsing"}function Km(){throw"onWarningStopParsing"}jr.__DOMHandler=Ii;jr.DOMParser=Au;jr.normalizeLineEndings=ku;jr.onErrorStopParsing=Jm;jr.onWarningStopParsing=Km});var ba=Nt(J=>{"use strict";var zr=nr();J.assign=zr.assign;J.hasDefaultHTMLNamespace=zr.hasDefaultHTMLNamespace;J.isHTMLMimeType=zr.isHTMLMimeType;J.isValidMimeType=zr.isValidMimeType;J.MIME_TYPE=zr.MIME_TYPE;J.NAMESPACE=zr.NAMESPACE;var Bi=bn();J.DOMException=Bi.DOMException;J.DOMExceptionName=Bi.DOMExceptionName;J.ExceptionCode=Bi.ExceptionCode;J.ParseError=Bi.ParseError;var be=ha();J.Attr=be.Attr;J.CDATASection=be.CDATASection;J.CharacterData=be.CharacterData;J.Comment=be.Comment;J.Document=be.Document;J.DocumentFragment=be.DocumentFragment;J.DocumentType=be.DocumentType;J.DOMImplementation=be.DOMImplementation;J.Element=be.Element;J.Entity=be.Entity;J.EntityReference=be.EntityReference;J.LiveNodeList=be.LiveNodeList;J.NamedNodeMap=be.NamedNodeMap;J.Node=be.Node;J.NodeList=be.NodeList;J.Notation=be.Notation;J.ProcessingInstruction=be.ProcessingInstruction;J.Text=be.Text;J.XMLSerializer=be.XMLSerializer;var Ri=Tu();J.DOMParser=Ri.DOMParser;J.normalizeLineEndings=Ri.normalizeLineEndings;J.onErrorStopParsing=Ri.onErrorStopParsing;J.onWarningStopParsing=Ri.onWarningStopParsing});import{Bag as Xi}from"@gramlot/gramlot";/*! @license DOMPurify 3.4.17 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.17/LICENSE */function Qc(t,e){this.v=t,this.k=e}function wo(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function ef(t){if(Array.isArray(t))return t}function tf(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,s,a,o=[],l=!0,u=!1;try{if(s=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=s.call(r)).done)&&(o.push(n.value),o.length!==e);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function rf(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
7
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */function nf(t,e){return ef(t)||tf(t,e)||sf(t,e)||rf()}function sf(t,e){if(t){if(typeof t=="string")return wo(t,e);var r={}.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?wo(t,e):void 0}}function ei(t){var e,r;function n(s,a){try{var o=t[s](a),l=o.value,u=l instanceof Qc;Promise.resolve(u?l.v:l).then(function(c){if(u){var f=s==="return"&&l.k?s:"next";if(!l.k||c.done)return n(f,c);c=t[f](c).value}i(!!o.done,c)},function(c){n("throw",c)})}catch(c){i(2,c)}}function i(s,a){s===2?e.reject(a):e.resolve({value:a,done:s}),(e=e.next)?n(e.key,e.arg):r=null}this._invoke=function(s,a){return new Promise(function(o,l){var u={key:s,arg:a,resolve:o,reject:l,next:null};r?r=r.next=u:(e=r=u,n(s,a))})},typeof t.return!="function"&&(this.return=void 0)}ei.prototype[typeof Symbol=="function"&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},ei.prototype.next=function(t){return this._invoke("next",t)},ei.prototype.throw=function(t){return this._invoke("throw",t)},ei.prototype.return=function(t){return this._invoke("return",t)};var Ro=Object.entries,yo=Object.setPrototypeOf,af=Object.isFrozen,Mo=Object.getPrototypeOf,Lo=Object.getOwnPropertyDescriptor,ve=Object.freeze,De=Object.seal,vr=Object.create,Po=typeof Reflect<"u"&&Reflect,Ss=Po.apply,Cs=Po.construct;ve||(ve=function(e){return e});De||(De=function(e){return e});Ss||(Ss=function(e,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),s=2;s<n;s++)i[s-2]=arguments[s];return e.apply(r,i)});Cs||(Cs=function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return new e(...n)});var gt=ae(Array.prototype.forEach);Array.prototype.indexOf;var of=ae(Array.prototype.lastIndexOf),vo=ae(Array.prototype.pop),en=ae(Array.prototype.push),lf=ae(Array.prototype.slice),uf=ae(Array.prototype.splice),Er=Array.isArray,ws=Uo(Set),ys=ae(Set.prototype.add),tn=ae(Set.prototype.has),Jt=ae(String.prototype.toLowerCase),vs=ae(String.prototype.toString),Eo=ae(String.prototype.match),rn=ae(String.prototype.replace),ko=ae(String.prototype.indexOf),cf=ae(String.prototype.trim),ff=ae(Number.prototype.toString),df=ae(Boolean.prototype.toString),Ao=typeof BigInt>"u"?null:ae(BigInt.prototype.toString),To=typeof Symbol>"u"?null:ae(Symbol.prototype.toString),Fe=ae(Object.prototype.hasOwnProperty),nn=ae(Object.prototype.toString),Te=ae(RegExp.prototype.test),bt=Uo(TypeError);function ae(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return Ss(t,e,n)}}function Uo(t){return function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Cs(t,r)}}function K(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Jt;if(yo&&yo(t,null),!Er(e))return t;let n=e.length;for(;n--;){let i=e[n];if(typeof i=="string"){let s=r(i);s!==i&&(af(e)||(e[n]=s),i=s)}t[i]=!0}return t}function pf(t){for(let e=0;e<t.length;e++)Fe(t,e)||(t[e]=null);return t}function Ve(t){let e=vr(null);for(let n of Ro(t)){var r=nf(n,2);let i=r[0],s=r[1];Fe(t,i)&&(Er(s)?e[i]=pf(s):s&&typeof s=="object"&&s.constructor===Object?e[i]=Ve(s):e[i]=s)}return e}function mf(t){switch(typeof t){case"string":return t;case"number":return ff(t);case"boolean":return df(t);case"bigint":return Ao?Ao(t):"0";case"symbol":return To?To(t):"Symbol()";case"undefined":return nn(t);case"function":case"object":{if(t===null)return nn(t);let e=t,r=Ge(e,"toString");if(typeof r=="function"){let n=r(e);return typeof n=="string"?n:nn(n)}return nn(t)}default:return nn(t)}}function Ge(t,e){for(;t!==null;){let n=Lo(t,e);if(n){if(n.get)return ae(n.get);if(typeof n.value=="function")return ae(n.value)}t=Mo(t)}function r(){return null}return r}function hf(t,e){for(;t!==null;){let r=Lo(t,e);if(r)return r.get?ae(r.get):null;t=Mo(t)}return null}function _f(t){try{return Te(t,""),!0}catch{return!1}}var Do=ve(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Es=ve(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ks=ve(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),gf=ve(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),As=ve(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),bf=ve(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),xo=ve(["#text"]),So=ve(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Ts=ve(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Co=ve(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ti=ve(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),wf=De(/{{[\w\W]*|^[\w\W]*}}/g),yf=De(/<%[\w\W]*|^[\w\W]*%>/g),vf=De(/\${[\w\W]*/g),Ef=De(/^data-[\-\w.\u00B7-\uFFFF]+$/),kf=De(/^aria-[\-\w]+$/),No=De(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Af=De(/^(?:\w+script|data):/i),Tf=De(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Df=De(/^html$/i),xf=De(/^[a-z][.\w]*(-[.\w]+)+$/i),Ds=De(/<[/\w!]/g),Oo=De(/<[/\w]/g),Sf=De(/<\/no(script|embed|frames)/i),Io=De(/\/>/i),me={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Cf=ve(K({},["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"])),Nf=function(){return typeof window>"u"?null:window},Of=function(e,r){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null,i="data-tt-policy-suffix";r&&r.hasAttribute(i)&&(n=r.getAttribute(i));let s="dompurify"+(n?"#"+n:"");try{return e.createPolicy(s,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},Bo=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Ot=function(e,r,n,i){return Fe(e,r)&&Er(e[r])?K(i.base?Ve(i.base):{},e[r],i.transform):n},xs=function(e,r,n){let i=Fe(e,r)?e[r]:void 0;return i&&typeof i=="object"?Ve(i):n()};function Fo(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Nf(),e=E=>Fo(E);if(e.version="3.4.17",e.removed=[],!t||!t.document||t.document.nodeType!==me.document||!t.Element)return e.isSupported=!1,e;let r=t.document,n=r,i=n.currentScript;t.DocumentFragment;let s=t.HTMLTemplateElement,a=t.Node,o=t.Element,l=t.NodeFilter;t.NamedNodeMap===void 0&&(t.NamedNodeMap||t.MozNamedAttrMap),t.HTMLFormElement;let u=t.DOMParser,c=t.trustedTypes,f=o.prototype,p=Ge(f,"cloneNode"),h=Ge(f,"remove"),_=Ge(f,"removeAttributeNode"),g=Ge(f,"nextSibling"),b=Ge(f,"childNodes"),k=Ge(f,"parentNode"),T=Ge(f,"shadowRoot"),A=Ge(f,"attributes"),S=a&&a.prototype?Ge(a.prototype,"nodeType"):null,B=a&&a.prototype?Ge(a.prototype,"nodeName"):null,F=a&&a.prototype?Ge(a.prototype,"ownerDocument"):null,j=function(d){return S?S(d):d.nodeType},Y=function(d){return B?B(d):d.nodeName},re=hf(f,"namespaceURI"),Ne=function(d){return re?re(d):d.namespaceURI};if(typeof s=="function"){let E=r.createElement("template");E.content&&E.content.ownerDocument&&(r=E.content.ownerDocument)}let G,D="",V,z=!1,P=0,N=function(){if(P>0)throw bt('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},ke=function(d){N(),P++;try{return G.createHTML(d)}finally{P--}},ht=function(d){N(),P++;try{return G.createScriptURL(d)}finally{P--}},Ae=function(){return z||(V=Of(c,i),z=!0),V},rt=r,W=rt.implementation,Re=rt.createNodeIterator,dr=rt.createDocumentFragment,pr=rt.getElementsByTagName,yc=n.importNode,ne=Bo();e.isSupported=typeof Ro=="function"&&typeof k=="function"&&W&&W.createHTMLDocument!==void 0;let vc=wf,Ec=yf,kc=vf,Ac=Ef,Tc=kf,Dc=Af,qa=Tf,xc=xf,ja=No,ie=null,Yi=K({},[...Do,...Es,...ks,...As,...xo]),se=null,Zi=K({},[...So,...Ts,...Co,...ti]),nt=Object.seal(vr(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Zr=null,za=null,xt=Object.seal(vr(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Va=!0,Ji=!0,Ha=!1,Ki=!0,_t=!1,Gt=!0,Xt=!1,Qi=!1,Vn=null,Hn=null,es=!1,mr=!1,Wn=!1,Gn=!1,Wa=!0,Ga=!1,Xa="user-content-",ts=!0,rs=!1,Yt=null,hr={},Zt=null,Ya=K({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]),Za=null,Ja=K({},["audio","video","img","source","image","track"]),Ka=null,Qa=K({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Xn="http://www.w3.org/1998/Math/MathML",Yn="http://www.w3.org/2000/svg",it="http://www.w3.org/1999/xhtml",_r=it,ns=!1,is=null,Sc=K({},[Xn,Yn,it],vs),eo=ve(["mi","mo","mn","ms","mtext"]),ss=K({},eo),to=ve(["annotation-xml"]),as=K({},to),Cc=K({},["title","style","font","a","script"]),Jr=null,Nc=["application/xhtml+xml","text/html"],Oc="text/html",de=null,gr=null,Ic=r.createElement("form"),ro=function(d){return d instanceof RegExp||d instanceof Function},os=function(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(gr&&gr===d)return;(!d||typeof d!="object")&&(d={}),d=Ve(d),Jr=Nc.indexOf(d.PARSER_MEDIA_TYPE)===-1?Oc:d.PARSER_MEDIA_TYPE,de=Jr==="application/xhtml+xml"?vs:Jt,ie=Ot(d,"ALLOWED_TAGS",Yi,{transform:de}),se=Ot(d,"ALLOWED_ATTR",Zi,{transform:de}),is=Ot(d,"ALLOWED_NAMESPACES",Sc,{transform:vs}),Ka=Ot(d,"ADD_URI_SAFE_ATTR",Qa,{transform:de,base:Qa}),Za=Ot(d,"ADD_DATA_URI_TAGS",Ja,{transform:de,base:Ja}),Zt=Ot(d,"FORBID_CONTENTS",Ya,{transform:de}),Zr=Ot(d,"FORBID_TAGS",Ve({}),{transform:de}),za=Ot(d,"FORBID_ATTR",Ve({}),{transform:de}),hr=Fe(d,"USE_PROFILES")?d.USE_PROFILES&&typeof d.USE_PROFILES=="object"?Ve(d.USE_PROFILES):d.USE_PROFILES:!1,Va=d.ALLOW_ARIA_ATTR!==!1,Ji=d.ALLOW_DATA_ATTR!==!1,Ha=d.ALLOW_UNKNOWN_PROTOCOLS||!1,Ki=d.ALLOW_SELF_CLOSE_IN_ATTR!==!1,_t=d.SAFE_FOR_TEMPLATES||!1,Gt=d.SAFE_FOR_XML!==!1,Xt=d.WHOLE_DOCUMENT||!1,mr=d.RETURN_DOM||!1,Wn=d.RETURN_DOM_FRAGMENT||!1,Gn=d.RETURN_TRUSTED_TYPE||!1,es=d.FORCE_BODY||!1,Wa=d.SANITIZE_DOM!==!1,Ga=d.SANITIZE_NAMED_PROPS||!1,ts=d.KEEP_CONTENT!==!1,rs=d.IN_PLACE||!1,ja=_f(d.ALLOWED_URI_REGEXP)?d.ALLOWED_URI_REGEXP:No,_r=typeof d.NAMESPACE=="string"?d.NAMESPACE:it,ss=xs(d,"MATHML_TEXT_INTEGRATION_POINTS",()=>K({},eo)),as=xs(d,"HTML_INTEGRATION_POINTS",()=>K({},to));let m=xs(d,"CUSTOM_ELEMENT_HANDLING",()=>vr(null));if(nt=vr(null),Fe(m,"tagNameCheck")&&ro(m.tagNameCheck)&&(nt.tagNameCheck=m.tagNameCheck),Fe(m,"attributeNameCheck")&&ro(m.attributeNameCheck)&&(nt.attributeNameCheck=m.attributeNameCheck),Fe(m,"allowCustomizedBuiltInElements")&&typeof m.allowCustomizedBuiltInElements=="boolean"&&(nt.allowCustomizedBuiltInElements=m.allowCustomizedBuiltInElements),De(nt),_t&&(Ji=!1),Wn&&(mr=!0),hr&&(ie=K({},xo),se=vr(null),hr.html===!0&&(K(ie,Do),K(se,So)),hr.svg===!0&&(K(ie,Es),K(se,Ts),K(se,ti)),hr.svgFilters===!0&&(K(ie,ks),K(se,Ts),K(se,ti)),hr.mathMl===!0&&(K(ie,As),K(se,Co),K(se,ti))),xt.tagCheck=null,xt.attributeCheck=null,Fe(d,"ADD_TAGS")&&(typeof d.ADD_TAGS=="function"?xt.tagCheck=d.ADD_TAGS:Er(d.ADD_TAGS)&&(ie===Yi&&(ie=Ve(ie)),K(ie,d.ADD_TAGS,de))),Fe(d,"ADD_ATTR")&&(typeof d.ADD_ATTR=="function"?xt.attributeCheck=d.ADD_ATTR:Er(d.ADD_ATTR)&&(se===Zi&&(se=Ve(se)),K(se,d.ADD_ATTR,de))),Fe(d,"ADD_FORBID_CONTENTS")&&Er(d.ADD_FORBID_CONTENTS)&&(Zt===Ya&&(Zt=Ve(Zt)),K(Zt,d.ADD_FORBID_CONTENTS,de)),ts&&(ie["#text"]=!0),Xt&&K(ie,["html","head","body"]),ie.table&&(K(ie,["tbody"]),delete Zr.tbody),d.TRUSTED_TYPES_POLICY){if(typeof d.TRUSTED_TYPES_POLICY.createHTML!="function")throw bt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof d.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw bt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let w=G;G=d.TRUSTED_TYPES_POLICY;try{D=ke("")}catch(y){throw G=w,y}}else d.TRUSTED_TYPES_POLICY===null?(G=void 0,D=""):(G===void 0&&(G=Ae()),G&&typeof D=="string"&&(D=ke("")));ve&&ve(d),gr=d},no=K({},[...Es,...ks,...gf]),io=K({},[...As,...bf]),Bc=function(d,m,w){return m.namespaceURI===it?d==="svg":m.namespaceURI===Xn?d==="svg"&&(w==="annotation-xml"||ss[w]):!!no[d]},Rc=function(d,m,w){return m.namespaceURI===it?d==="math":m.namespaceURI===Yn?d==="math"&&as[w]:!!io[d]},Mc=function(d,m,w){return m.namespaceURI===Yn&&!as[w]||m.namespaceURI===Xn&&!ss[w]?!1:!io[d]&&(Cc[d]||!no[d])},Lc=function(d){let m=Ne(d),w=Jt(Y(d)),y=k(d),O,M;return y&&j(y)===me.element?(O={namespaceURI:Ne(y)},M=Jt(Y(y))):(O={namespaceURI:_r},M="template"),is[m]?m===Yn?Bc(w,O,M):m===Xn?Rc(w,O,M):m===it?Mc(w,O,M):!!(Jr==="application/xhtml+xml"&&is[m]):!1},St=function(d){en(e.removed,{element:d});try{k(d).removeChild(d)}catch{if(h(d),!k(d))throw bt("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},so=function(d,m,w){try{_(d,m)}catch{try{d.removeAttribute(w)}catch{}}},ls=function(d){cs(d);let m=b(d);m&&gt(lf(m),y=>{try{h(y)}catch{}});let w=j(d)===me.element?A(d):null;if(w)for(let y=w.length-1;y>=0;--y){let O=w[y],M=O&&O.name;typeof M=="string"&&so(d,O,M)}},br=function(d,m,w){if(!w)try{w=m.getAttributeNode(d)}catch{w=null}en(e.removed,{attribute:w||null,from:m});try{w?_(m,w):m.removeAttribute(d)}catch{try{m.removeAttribute(d)}catch{}}if(d==="is")if(mr||Wn)try{St(m)}catch{}else try{m.setAttribute(d,"")}catch{}},ao=function(d){let m=A(d);if(m)for(let w=m.length-1;w>=0;--w){let y=m[w],O=y&&y.name;typeof O!="string"||se[de(O)]||so(d,y,O)}},us=function(d,m){let w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,y=[d];for(;y.length>0;){let O=y.pop();if(m(O)===!1)continue;if(w&&j(O)===me.element){let X=T(O);Ct(X)&&y.push(X)}let M=b(O);if(M)for(let X=M.length-1;X>=0;--X)y.push(M[X])}},cs=function(d){us(d,m=>{j(m)===me.element&&ao(m)})},fs=function(d){let m=[];return us(d,w=>{m.push(w)},!0),m},Pc=function(d,m){let w=ws();gt(fs(d),y=>{j(y)===me.element&&ys(w,y)}),gt(m,y=>{j(y)===me.element&&!tn(w,y)&&ao(y)})},oo=function(d,m){let w=!1;return gt(e.removed,y=>{y.element&&(w=w||y.element===d,cs(y.element))}),Pc(d,m),w},Uc=8,Fc=function(d,m){let w=Yt,y=null,O=()=>(y||(y=ws(),gt(m,M=>{ys(y,M)})),y);for(let M=0;;M++){let X=fs(d),he=[d],st=!1;if(gt(X,Me=>{j(Me)===me.documentFragment?en(he,Me):!st&&!tn(w,Me)&&(st=tn(O(),Me))}),!st)return;if(M>=Uc)throw bt("the tree kept changing during in-place sanitization; refusing to return it");gt(he,(Me,Pe)=>{$c(Me,Pe>0,d,O())})}},$c=function(d,m,w,y){let O=ds(d),M;for(;M=O.nextNode();)!tn(y,M)||tn(Yt,M)||(m&&Je(ne.uponSanitizeShadowNode,M,null),ms(M,w),hs(M,w),Ct(M.content)&&Qr(M.content))},qc=function(d){Yt&&ys(Yt,d)},lo=function(d,m){return Gt?d==="patchsrc"?!0:d==="for"&&m!=="label"&&m!=="output":!1},jc=function(d){Gt&&us(d,m=>{let w=j(m);if(w===me.processingInstruction||w===me.comment&&Te(Oo,m.data)){try{h(m)}catch{}return!1}if(w===me.element){let y=m,O=de(Y(m));try{y.hasAttribute&&y.hasAttribute("patchsrc")&&y.removeAttribute("patchsrc"),y.hasAttribute&&y.hasAttribute("for")&&lo("for",O)&&y.removeAttribute("for")}catch{}}return!0})},uo=function(d){let m=null,w=null;if(es)d="<remove></remove>"+d;else{let M=Eo(d,/^[\r\n\t ]+/);w=M&&M[0]}Jr==="application/xhtml+xml"&&_r===it&&(d='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+d+"</body></html>");let y=G?ke(d):d;if(_r===it)try{m=new u().parseFromString(y,Jr)}catch{}if(!m||!m.documentElement){m=W.createDocument(_r,"template",null);try{m.documentElement.innerHTML=ns?D:y}catch{}}let O=m.body||m.documentElement;return d&&w&&O.insertBefore(r.createTextNode(w),O.childNodes[0]||null),_r===it?pr.call(m,Xt?"html":"body")[0]:Xt?m.documentElement:O},ds=function(d){let m=F?F(d):d.ownerDocument;return Re.call(m||d,d,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},Zn=function(d){return d=rn(d,vc," "),d=rn(d,Ec," "),d=rn(d,kc," "),d},ps=function(d){var m;co(d);let w=(m=d.querySelectorAll)===null||m===void 0?void 0:m.call(d,"template");w&&gt(w,y=>{Ct(y.content)&&ps(y.content)})},co=function(d){d.normalize();let m=F?F(d):d.ownerDocument,w=Re.call(m||d,d,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null),y=w.nextNode();for(;y;)y.data=Zn(y.data),y=w.nextNode()},Jn=function(d){let m=B?B(d):null;return typeof m!="string"||de(m)!=="form"?!1:typeof d.nodeName!="string"||typeof d.textContent!="string"||typeof d.removeChild!="function"||d.attributes!==A(d)||typeof d.removeAttribute!="function"||typeof d.removeAttributeNode!="function"||typeof d.getAttributeNode!="function"||typeof d.setAttribute!="function"||typeof d.namespaceURI!="string"||typeof d.insertBefore!="function"||typeof d.hasChildNodes!="function"||d.nodeType!==S(d)||d.childNodes!==b(d)},Ct=function(d){if(!S||typeof d!="object"||d===null)return!1;try{return S(d)===me.documentFragment}catch{return!1}},Kr=function(d){if(!S||typeof d!="object"||d===null)return!1;try{return typeof S(d)=="number"}catch{return!1}};function Je(E,d,m){E.length!==0&&gt(E,w=>{w.call(e,d,m,gr)})}let zc=function(d,m){return!!(Gt&&d.hasChildNodes()&&!Kr(d.firstElementChild)&&Te(Ds,d.textContent)&&Te(Ds,d.innerHTML)||Gt&&Cf[m]&&j(d)===me.element&&Ne(d)===it&&(Kr(d.firstElementChild)||typeof d.textContent=="string"&&Te(Ds,d.textContent))||d.nodeType===me.processingInstruction||Gt&&d.nodeType===me.comment&&Te(Oo,d.data))},Kn=function(d,m){if(d instanceof RegExp)return Te(d,m);if(d instanceof Function){for(var w=arguments.length,y=new Array(w>2?w-2:0),O=2;O<w;O++)y[O-2]=arguments[O];return!!d(m,...y)}return!1},Vc=function(d,m,w){if(!Zr[m]&&mo(m)&&Kn(nt.tagNameCheck,m))return!1;if(ts&&!Zt[m]&&!Zt[Jt(m)]){let y=k(d),O=b(d);if(O&&y){let M=O.length;for(let X=M-1;X>=0;--X){let he=d===w?p(O[X],!0):O[X];y.insertBefore(he,g(d))}}}return St(d),!0},fo=function(d,m,w,y){return d.length===0?m:m===w||m===y?Ve(m):m},wr=function(d,m){return d===m||k(d)!==null?!1:(rs&&cs(d),!0)},ms=function(d,m){if(qc(d),Je(ne.beforeSanitizeElements,d,null),wr(d,m))return!0;if(Jn(d))return St(d),!0;let w=de(Y(d));if(ie=fo(ne.uponSanitizeElement,ie,Yi,Vn),Je(ne.uponSanitizeElement,d,{tagName:w,allowedTags:ie}),wr(d,m))return!0;if(zc(d,w))return St(d),!0;if(Zr[w]||!(xt.tagCheck instanceof Function&&xt.tagCheck(w))&&!ie[w]){let y=Vc(d,w,m);return y===!1&&(Je(ne.afterSanitizeElements,d,null),wr(d,m))?!0:y}if(j(d)===me.element&&!Lc(d)||(w==="noscript"||w==="noembed"||w==="noframes")&&Te(Sf,d.innerHTML))return St(d),!0;if(_t&&d.nodeType===me.text){let y=Zn(d.textContent);d.textContent!==y&&(en(e.removed,{element:d.cloneNode()}),d.textContent=y)}return Je(ne.afterSanitizeElements,d,null),wr(d,m)},po=function(d,m,w){if(za[m]||lo(m,d)||Wa&&(m==="id"||m==="name")&&(w in r||w in Ic))return!1;let y=se[m]||xt.attributeCheck instanceof Function&&xt.attributeCheck(m,d);return Ji&&Te(Ac,m)||Va&&Te(Tc,m)?!0:y?Ka[m]||Te(ja,rn(w,qa,""))||(m==="src"||m==="xlink:href"||m==="href")&&d!=="script"&&ko(w,"data:")===0&&Za[d]||Ha&&!Te(Dc,rn(w,qa,""))?!0:!w:mo(d)&&Kn(nt.tagNameCheck,d)&&Kn(nt.attributeNameCheck,m,d)||m==="is"&&nt.allowCustomizedBuiltInElements&&Kn(nt.tagNameCheck,w)},Hc=K({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),mo=function(d){return!Hc[Jt(d)]&&Te(xc,d)},Wc=function(d,m,w,y){if(G&&typeof c=="object"&&typeof c.getAttributeType=="function"&&!w)switch(c.getAttributeType(d,m)){case"TrustedHTML":return ke(y);case"TrustedScriptURL":return ht(y)}return y},Gc=function(d,m,w,y){try{return w?d.setAttributeNS(w,m,y):d.setAttribute(m,y),Jn(d)?(St(d),!1):!0}catch{return br(m,d),!1}},ho=function(d,m){return Gt&&Te(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,m)?!0:Jt(d)==="attributename"&&Eo(m,"href")!==null},hs=function(d,m){if(Je(ne.beforeSanitizeAttributes,d,null),wr(d,m))return;let w=d.attributes;if(!w||Jn(d))return;se=fo(ne.uponSanitizeAttribute,se,Zi,Hn);let y={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:se,forceKeepAttr:void 0},O=w.length,M=de(d.nodeName);for(;O--;){let X=w[O],he=X.name,st=X.namespaceURI,Me=X.value,Pe=de(he),yr=Me,Ue=he==="value"?yr:cf(yr),_o=!1;if(y.attrName=Pe,y.attrValue=Ue,y.keepAttr=!0,y.forceKeepAttr=void 0,Je(ne.uponSanitizeAttribute,d,y),Ue=y.attrValue,Ga&&(Pe==="id"||Pe==="name")&&ko(Ue,Xa)!==0&&(br(he,d,X),Ue=Xa+Ue,_o=!0),ho(he,Ue)){br(he,d,X);continue}if(!y.forceKeepAttr){if(!y.keepAttr){br(he,d,X);continue}if(!Ki&&Te(Io,Ue)){br(he,d,X);continue}if(_t&&(Ue=Zn(Ue)),!po(M,Pe,Ue)){br(he,d,X);continue}Ue=Wc(M,Pe,st,Ue),Ue!==yr&&Gc(d,he,st,Ue)&&_o&&vo(e.removed)}}Je(ne.afterSanitizeAttributes,d,null),wr(d,m)},Qr=function(d){let m=null,w=ds(d);for(Je(ne.beforeSanitizeShadowDOM,d,null);m=w.nextNode();)if(Je(ne.uponSanitizeShadowNode,m,null),ms(m,d),hs(m,d),Ct(m.content)&&Qr(m.content),j(m)===me.element){let y=T(m);Ct(y)&&(_s(y),Qr(y))}_t&&co(d),Je(ne.afterSanitizeShadowDOM,d,null)},_s=function(d){let m=[{node:d,shadow:null}];for(;m.length>0;){let w=m.pop();if(w.shadow){Qr(w.shadow);continue}let y=w.node,O=j(y)===me.element,M=b(y);if(M)for(let X=M.length-1;X>=0;--X)m.push({node:M[X],shadow:null});if(O){let X=B?B(y):null;if(typeof X=="string"&&de(X)==="template"){let he=y.content;Ct(he)&&m.push({node:he,shadow:null})}}if(O){let X=T(y);Ct(X)&&m.push({node:null,shadow:X},{node:X,shadow:null})}}};return e.sanitize=function(E){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},m=null,w=null,y=null,O=null;if(ns=!E,ns&&(E="<!-->"),typeof E!="string"&&!Kr(E)&&(E=mf(E),typeof E!="string"))throw bt("dirty is not a string, aborting");if(!e.isSupported)return E;Qi?(ie=Vn,se=Hn):os(d),(ne.uponSanitizeElement.length>0||ne.uponSanitizeAttribute.length>0)&&(ie=Ve(ie)),ne.uponSanitizeAttribute.length>0&&(se=Ve(se)),e.removed=[];let M=rs&&typeof E!="string"&&Kr(E),X=[],he=Yt;if(M){jc(E);let Pe=Y(E);if(typeof Pe=="string"){let yr=de(Pe);if(!ie[yr]||Zr[yr])throw ls(E),bt("root node is forbidden and cannot be sanitized in-place")}if(Jn(E))throw ls(E),bt("root node is clobbered and cannot be sanitized in-place");X=fs(E),Yt=ws()}else if(Kr(E))m=uo("<!---->"),w=m.ownerDocument.importNode(E,!0),w.nodeType===me.element&&w.nodeName==="BODY"||w.nodeName==="HTML"?m=w:m.appendChild(w),_s(m);else{if(!mr&&!_t&&!Xt&&E.indexOf("<")===-1)return G&&Gn?ke(E):E;if(m=uo(E),!m)return mr?null:Gn?D:""}m&&es&&St(m.firstChild);let st=M?E:m;try{M&&_s(E);let Pe=ds(st);for(;y=Pe.nextNode();)ms(y,st),hs(y,st),Ct(y.content)&&Qr(y.content);M&&Fc(E,X)}catch(Pe){throw M&&(ls(E),oo(E,X)),Pe}finally{Yt=he}if(M){if(oo(E,X))throw bt("a node selected for removal could not be safely returned; refusing to sanitize in place");return _t&&ps(E),E}if(mr){if(_t&&ps(m),Wn)for(O=dr.call(m.ownerDocument);m.firstChild;)O.appendChild(m.firstChild);else O=m;return(se.shadowroot||se.shadowrootmode)&&(O=yc.call(n,O,!0)),O}let Me=Xt?m.outerHTML:m.innerHTML;return Xt&&ie["!doctype"]&&m.ownerDocument&&m.ownerDocument.doctype&&m.ownerDocument.doctype.name&&Te(Df,m.ownerDocument.doctype.name)&&(Me="<!DOCTYPE "+m.ownerDocument.doctype.name+`>
8
- `+Me),_t&&(Me=Zn(Me)),G&&Gn?ke(Me):Me},e.setConfig=function(){let E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};os(E),Qi=!0,Vn=ie,Hn=se},e.clearConfig=function(){gr=null,Qi=!1,Vn=null,Hn=null,G=V,D=""},e.isValidAttribute=function(E,d,m){gr||os({});let w=de(E),y=de(d);return typeof m=="string"&&(ho(d,m)||!Ki&&Te(Io,m))?!1:po(w,y,m)},e.addHook=function(E,d){typeof d=="function"&&Fe(ne,E)&&en(ne[E],d)},e.removeHook=function(E,d){if(Fe(ne,E)){if(d!==void 0){let m=of(ne[E],d);return m===-1?void 0:uf(ne[E],m,1)[0]}return vo(ne[E])}},e.removeHooks=function(E){Fe(ne,E)&&(ne[E]=[])},e.removeAllHooks=function(){ne=Bo()},e}var $o=Fo();var It={};go(It,{defineCollection:()=>Ns});Qn(It,h_);import*as h_ from"@gramlot/gramlot/components";import{defineCollection as If}from"@gramlot/gramlot/components";function Ns(t){if(t.name!=="tree")throw new Error("Unexpected bundled collection");let e=[],r={};t.css?.forEach((n,i)=>{n.href=e[i].href});for(let[n,i]of Object.entries(t.assets??{}))i.href=r[n].href;return If({...t,css:e,assets:r})}function qo(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 Os(t){return class extends t{constructor(){super();let e=this.attachShadow({mode:"open"}),r=this.ownerDocument.createElement("style");r.textContent=`:host{box-sizing:border-box;display:block;min-width:0;font:inherit;color:var(--gramlot-ink,CanvasText)}
5
+ `)}function ji(t){if(t=t||{},t.locator===void 0&&(t.locator=!0),this.assign=t.assign||Dt.assign,this.domHandler=t.domHandler||An,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||qi,this.locator=!!t.locator,this.xmlns=this.assign(Object.create(null),t.xmlns)}ji.prototype.parseFromString=function(t,e){if(!id(e))throw new TypeError('DOMParser.parseFromString: the provided mimeType "'+e+'" is not valid.');var r=this.assign(Object.create(null),this.xmlns),n=$i.XML_ENTITIES,s=r[""]||null;sd(e)?(n=$i.HTML_ENTITIES,s=Ss.HTML):e===Pi.XML_SVG_IMAGE&&(s=Ss.SVG),r[""]=s,r.xml=r.xml||Ss.XML;var a=new this.domHandler({mimeType:e,defaultNamespace:s,onError:this.onError}),i=this.locator?{}:void 0;this.locator&&a.setDocumentLocator(i);var o=new od;o.errorHandler=a,o.domBuilder=a;var l=!Dt.isHTMLMimeType(e);return l&&typeof t!="string"&&o.errorHandler.fatalError("source is not a string"),o.parse(this.normalizeLineEndings(String(t)),r,n),a.doc.documentElement||o.errorHandler.fatalError("missing root element"),a.doc};function An(t){var e=t||{};this.mimeType=e.mimeType||Pi.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 Zt(t,e){e.lineNumber=t.lineNumber,e.columnNumber=t.columnNumber}An.prototype={startDocument:function(){var t=new nd;this.doc=ad(this.mimeType)?t.createHTMLDocument(!1):t.createDocument(this.defaultNamespace,"")},startElement:function(t,e,r,n){var s=this.doc,a=s.createElementNS(t,r||e),i=n.length;Dn(this,a),this.currentElement=a,this.locator&&Zt(this.locator,a);for(var o=0;o<i;o++){var t=n.getURI(o),l=n.getValue(o),r=n.getQName(o),u=s.createAttributeNS(t,r);this.locator&&Zt(n.getLocator(o),u),u.value=u.nodeValue=l,a.setAttributeNode(u)}},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&&Zt(this.locator,r),Dn(this,r)},ignorableWhitespace:function(t,e,r){},characters:function(t,e,r){if(t=Ui.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&&Zt(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=Ui.apply(this,arguments);var n=this.doc.createComment(t);this.locator&&Zt(this.locator,n),Dn(this,n)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(t,e,r,n){var s=this.doc.implementation;if(s&&s.createDocumentType){var a=s.createDocumentType(t,e,r,n);this.locator&&Zt(this.locator,a),Dn(this,a),this.doc.doctype=a}},reportError:function(t,e){if(typeof this.onError=="function")try{this.onError(t,e,this)}catch(r){throw new Fi("Reporting "+t+' "'+e+'" caused '+r,this.locator)}else console.error("[xmldom "+t+"] "+e,ld(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 Fi(t,this.locator,e)}};function ld(t){if(t)return`
6
+ @#[line:`+t.lineNumber+",col:"+t.columnNumber+"]"}function Ui(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){An.prototype[t]=function(){return null}});function Dn(t,e){t.currentElement?t.currentElement.appendChild(e):t.doc.appendChild(e)}function ud(t){if(t==="error")throw"onErrorStopParsing"}function cd(){throw"onWarningStopParsing"}Jt.__DOMHandler=An;Jt.DOMParser=ji;Jt.normalizeLineEndings=qi;Jt.onErrorStopParsing=ud;Jt.onWarningStopParsing=cd});var Os=tt(q=>{"use strict";var Kt=kt();q.assign=Kt.assign;q.hasDefaultHTMLNamespace=Kt.hasDefaultHTMLNamespace;q.isHTMLMimeType=Kt.isHTMLMimeType;q.isValidMimeType=Kt.isValidMimeType;q.MIME_TYPE=Kt.MIME_TYPE;q.NAMESPACE=Kt.NAMESPACE;var xn=wr();q.DOMException=xn.DOMException;q.DOMExceptionName=xn.DOMExceptionName;q.ExceptionCode=xn.ExceptionCode;q.ParseError=xn.ParseError;var le=Cs();q.Attr=le.Attr;q.CDATASection=le.CDATASection;q.CharacterData=le.CharacterData;q.Comment=le.Comment;q.Document=le.Document;q.DocumentFragment=le.DocumentFragment;q.DocumentType=le.DocumentType;q.DOMImplementation=le.DOMImplementation;q.Element=le.Element;q.Entity=le.Entity;q.EntityReference=le.EntityReference;q.LiveNodeList=le.LiveNodeList;q.NamedNodeMap=le.NamedNodeMap;q.Node=le.Node;q.NodeList=le.NodeList;q.Notation=le.Notation;q.ProcessingInstruction=le.ProcessingInstruction;q.Text=le.Text;q.XMLSerializer=le.XMLSerializer;var Tn=Vi();q.DOMParser=Tn.DOMParser;q.normalizeLineEndings=Tn.normalizeLineEndings;q.onErrorStopParsing=Tn.onErrorStopParsing;q.onWarningStopParsing=Tn.onWarningStopParsing});import{Bag as be,createDOMPurify as Df}from"@gramlot/gramlot";var We={};na(We,{defineCollection:()=>zn});Wr(We,Nf);import*as Nf from"@gramlot/gramlot/components";import{defineCollection as zo}from"@gramlot/gramlot/components";function zn(t){if(t.name!=="tree")throw new Error("Unexpected bundled collection");let e=[],r={};t.css?.forEach((n,s)=>{n.href=e[s].href});for(let[n,s]of Object.entries(t.assets??{}))s.href=r[n].href;return zo({...t,css:e,assets:r})}function aa(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 Xr(t){return class extends t{constructor(){super();let e=this.attachShadow({mode:"open"}),r=this.ownerDocument.createElement("style");r.textContent=`:host{box-sizing:border-box;display:block;min-width:0;font:inherit;color:var(--gramlot-ink,CanvasText)}
9
7
  *,*::before,*::after{box-sizing:border-box}.control-box{min-width:0}slot{display:contents}
10
- ::slotted(*){min-width:0;max-width:100%}`,this.controlBox=this.ownerDocument.createElement("div"),this.controlBox.className="control-box",this.control=this.controlBox,this.control.id="control",this.control.append(this.ownerDocument.createElement("slot")),e.append(r,this.controlBox)}projectAttributes(e){return qo(this,e)}}}Os.parameters={};function Bt(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 jo=/^\{(\??[A-Za-z_][A-Za-z0-9_]*|\?)?\}/;function Is(t,e){let r="",n=!1;for(let i=0;i<t.length;){if(t[i]!=="{"&&t[i]!=="}"){r+=t[i++];continue}let s=t.slice(i).match(jo);if(!s)throw new SyntaxError("Invalid pointer template placeholder");let a=s[1]??"",o=a.startsWith("?"),l=e(o?a.slice(1):a);l==null||l===""&&!o?n=!0:r+=String(l),i+=s[0].length}return n?null:r}function Bs(t){let e=[],r=new Set,n="",i=!0;for(let s=0;s<t.length;){let a=s,o=t[s];if(o==='"'||o==="'"||o==="`"){for(s++;s<t.length;){if(t[s]==="\\"){s+=2;continue}if(t[s++]===o)break}n+=t.slice(a,s),i=!1;continue}if(t.startsWith("//",s)){s=t.indexOf(`
11
- `,s),s<0&&(s=t.length),n+=t.slice(a,s);continue}if(t.startsWith("/*",s)){let c=t.indexOf("*/",s+2);s=c<0?t.length:c+2,n+=t.slice(a,s);continue}if(o==="/"&&i){let c=!1;for(s++;s<t.length;){let f=t[s++];if(f==="\\"){s++;continue}if(f==="[")c=!0;else if(f==="]")c=!1;else if(f==="/"&&!c)break}for(;/[a-z]/i.test(t[s]??"")&&s<t.length;)s++;n+=t.slice(a,s),i=!1;continue}let l=o==="{"?t.slice(s).match(jo):null;if(l){let c=l[1]??"";if(c.startsWith("?"))throw new SyntaxError("Optional slots are supported in pointer templates only");n+=`_pointerValues[${e.length}]`,e.push(c),s+=l[0].length,i=!1;continue}let u=t.slice(s).match(/^[A-Za-z_$][\w$]*/);if(u){r.add(u[0]),n+=u[0],s+=u[0].length,i=["return","typeof","void","delete","new","in","instanceof","yield","await"].includes(u[0]);continue}n+=o,s++,/\s/.test(o)||(i=/[([{,:;=!?&|+*%~<>\/-]/.test(o))}return{text:n,slots:e,identifiers:r}}function zo(t,e,r=()=>null){let n=new Map,i=[],s=a=>{if(n.has(a))return n.get(a);if(!t.has(a))throw new Error(`Referenced Source attribute '${a}' does not exist`);if(i.includes(a))throw new Error(`Cyclic attribute dependency: ${[...i,a].join(" -> ")}`);i.push(a);try{let o=t.get(a),l=typeof a=="string"?Bt(o):null,u=e.get(a);if(l){let c=f=>f?s(f):e.get(a);if(l.expression){let f=Bs(l.body);u=r(a,o,f,f.slots.map(c))}else u=Is(l.body,c),e.get(a)==null&&(u=null)}return n.set(a,u),u}finally{i.pop()}};return new Map([...t.keys()].map(a=>[a,s(a)]))}function Rs(t,e){let r=new Map([...Object.entries(t.getAttr()),...t.fixedAttrItems()]),n=new Set,i=[],s=a=>{let o=Bt(a);if(!o)return;let l=[];o.expression?l.push(...Bs(o.body).slots):Is(o.body,u=>(l.push(u),""));for(let u of l.filter(Boolean)){if(!r.has(u))throw new Error(`Referenced Source attribute '${u}' does not exist`);if(i.includes(u))throw new Error(`Cyclic attribute dependency: ${[...i,u].join(" -> ")}`);n.has(u)||(i.push(u),s(r.get(u)),i.pop(),n.add(u))}};return s(e),n}/*!
8
+ ::slotted(*){min-width:0;max-width:100%}`,this.controlBox=this.ownerDocument.createElement("div"),this.controlBox.className="control-box",this.control=this.controlBox,this.control.id="control",this.control.append(this.ownerDocument.createElement("slot")),e.append(r,this.controlBox)}projectAttributes(e){return aa(this,e)}}}Xr.parameters={};function rt(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 ia=/^\{(\??[A-Za-z_][A-Za-z0-9_]*|\?)?\}/;function Hn(t,e){let r="",n=!1;for(let s=0;s<t.length;){if(t[s]!=="{"&&t[s]!=="}"){r+=t[s++];continue}let a=t.slice(s).match(ia);if(!a)throw new SyntaxError("Invalid pointer template placeholder");let i=a[1]??"",o=i.startsWith("?"),l=e(o?i.slice(1):i);l==null||l===""&&!o?n=!0:r+=String(l),s+=a[0].length}return n?null:r}function Wn(t){let e=[],r=new Set,n="",s=!0;for(let a=0;a<t.length;){let i=a,o=t[a];if(o==='"'||o==="'"||o==="`"){for(a++;a<t.length;){if(t[a]==="\\"){a+=2;continue}if(t[a++]===o)break}n+=t.slice(i,a),s=!1;continue}if(t.startsWith("//",a)){a=t.indexOf(`
9
+ `,a),a<0&&(a=t.length),n+=t.slice(i,a);continue}if(t.startsWith("/*",a)){let c=t.indexOf("*/",a+2);a=c<0?t.length:c+2,n+=t.slice(i,a);continue}if(o==="/"&&s){let c=!1;for(a++;a<t.length;){let d=t[a++];if(d==="\\"){a++;continue}if(d==="[")c=!0;else if(d==="]")c=!1;else if(d==="/"&&!c)break}for(;/[a-z]/i.test(t[a]??"")&&a<t.length;)a++;n+=t.slice(i,a),s=!1;continue}let l=o==="{"?t.slice(a).match(ia):null;if(l){let c=l[1]??"";if(c.startsWith("?"))throw new SyntaxError("Optional slots are supported in pointer templates only");n+=`_pointerValues[${e.length}]`,e.push(c),a+=l[0].length,s=!1;continue}let u=t.slice(a).match(/^[A-Za-z_$][\w$]*/);if(u){r.add(u[0]),n+=u[0],a+=u[0].length,s=["return","typeof","void","delete","new","in","instanceof","yield","await"].includes(u[0]);continue}n+=o,a++,/\s/.test(o)||(s=/[([{,:;=!?&|+*%~<>\/-]/.test(o))}return{text:n,slots:e,identifiers:r}}function oa(t,e,r=()=>null){let n=new Map,s=[],a=i=>{if(n.has(i))return n.get(i);if(!t.has(i))throw new Error(`Referenced Source attribute '${i}' does not exist`);if(s.includes(i))throw new Error(`Cyclic attribute dependency: ${[...s,i].join(" -> ")}`);s.push(i);try{let o=t.get(i),l=typeof i=="string"?rt(o):null,u=e.get(i);if(l){let c=d=>d?a(d):e.get(i);if(l.expression){let d=Wn(l.body);u=r(i,o,d,d.slots.map(c))}else u=Hn(l.body,c),e.get(i)==null&&(u=null)}return n.set(i,u),u}finally{s.pop()}};return new Map([...t.keys()].map(i=>[i,a(i)]))}function Xn(t,e){let r=new Map([...Object.entries(t.getAttr()),...t.fixedAttrItems()]),n=new Set,s=[],a=i=>{let o=rt(i);if(!o)return;let l=[];o.expression?l.push(...Wn(o.body).slots):Hn(o.body,u=>(l.push(u),""));for(let u of l.filter(Boolean)){if(!r.has(u))throw new Error(`Referenced Source attribute '${u}' does not exist`);if(s.includes(u))throw new Error(`Cyclic attribute dependency: ${[...s,u].join(" -> ")}`);n.has(u)||(s.push(u),a(r.get(u)),s.pop(),n.add(u))}};return a(e),n}/*!
12
10
  * decimal.js v10.6.0
13
11
  * An arbitrary-precision Decimal type for JavaScript.
14
12
  * https://github.com/MikeMcl/decimal.js
15
13
  * Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
16
14
  * MIT Licence
17
- */var kr=9e15,Pt=1e9,Ms="0123456789abcdef",ii="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",si="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Ls={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-kr,maxE:kr,crypto:!1},Go,wt,U=!0,oi="[DecimalError] ",Lt=oi+"Invalid argument: ",Xo=oi+"Precision limit exceeded",Yo=oi+"crypto unavailable",Zo="[object Decimal]",Oe=Math.floor,_e=Math.pow,Bf=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,Rf=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Mf=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Jo=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Ke=1e7,R=7,Lf=9007199254740991,Pf=ii.length-1,Ps=si.length-1,v={toStringTag:Zo};v.absoluteValue=v.abs=function(){var t=new this.constructor(this);return t.s<0&&(t.s=1),I(t)};v.ceil=function(){return I(new this.constructor(this),this.e+1,2)};v.clampedTo=v.clamp=function(t,e){var r,n=this,i=n.constructor;if(t=new i(t),e=new i(e),!t.s||!e.s)return new i(NaN);if(t.gt(e))throw Error(Lt+e);return r=n.cmp(t),r<0?t:n.cmp(e)>0?e:new i(n)};v.comparedTo=v.cmp=function(t){var e,r,n,i,s=this,a=s.d,o=(t=new s.constructor(t)).d,l=s.s,u=t.s;if(!a||!o)return!l||!u?NaN:l!==u?l:a===o?0:!a^l<0?1:-1;if(!a[0]||!o[0])return a[0]?l:o[0]?-u:0;if(l!==u)return l;if(s.e!==t.e)return s.e>t.e^l<0?1:-1;for(n=a.length,i=o.length,e=0,r=n<i?n:i;e<r;++e)if(a[e]!==o[e])return a[e]>o[e]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1};v.cosine=v.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())+R,n.rounding=1,r=Uf(n,rl(n,r)),n.precision=t,n.rounding=e,I(wt==2||wt==3?r.neg():r,t,e,!0)):new n(1):new n(NaN)};v.cubeRoot=v.cbrt=function(){var t,e,r,n,i,s,a,o,l,u,c=this,f=c.constructor;if(!c.isFinite()||c.isZero())return new f(c);for(U=!1,s=c.s*_e(c.s*c,1/3),!s||Math.abs(s)==1/0?(r=xe(c.d),t=c.e,(s=(t-r.length+1)%3)&&(r+=s==1||s==-2?"0":"00"),s=_e(r,1/3),t=Oe((t+1)/3)-(t%3==(t<0?-1:2)),s==1/0?r="5e"+t:(r=s.toExponential(),r=r.slice(0,r.indexOf("e")+1)+t),n=new f(r),n.s=c.s):n=new f(s.toString()),a=(t=f.precision)+3;;)if(o=n,l=o.times(o).times(o),u=l.plus(c),n=te(u.plus(c).times(o),u.plus(l),a+2,1),xe(o.d).slice(0,a)===(r=xe(n.d)).slice(0,a))if(r=r.slice(a-3,a+1),r=="9999"||!i&&r=="4999"){if(!i&&(I(o,t+1,0),o.times(o).times(o).eq(c))){n=o;break}a+=4,i=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(I(n,t+1,1),e=!n.times(n).times(n).eq(c));break}return U=!0,I(n,t,f.rounding,e)};v.decimalPlaces=v.dp=function(){var t,e=this.d,r=NaN;if(e){if(t=e.length-1,r=(t-Oe(this.e/R))*R,t=e[t],t)for(;t%10==0;t/=10)r--;r<0&&(r=0)}return r};v.dividedBy=v.div=function(t){return te(this,new this.constructor(t))};v.dividedToIntegerBy=v.divToInt=function(t){var e=this,r=e.constructor;return I(te(e,new r(t),0,1,1),r.precision,r.rounding)};v.equals=v.eq=function(t){return this.cmp(t)===0};v.floor=function(){return I(new this.constructor(this),this.e+1,3)};v.greaterThan=v.gt=function(t){return this.cmp(t)>0};v.greaterThanOrEqualTo=v.gte=function(t){var e=this.cmp(t);return e==1||e===0};v.hyperbolicCosine=v.cosh=function(){var t,e,r,n,i,s=this,a=s.constructor,o=new a(1);if(!s.isFinite())return new a(s.s?1/0:NaN);if(s.isZero())return o;r=a.precision,n=a.rounding,a.precision=r+Math.max(s.e,s.sd())+4,a.rounding=1,i=s.d.length,i<32?(t=Math.ceil(i/3),e=(1/ui(4,t)).toString()):(t=16,e="2.3283064365386962890625e-10"),s=Ar(a,1,s.times(e),new a(1),!0);for(var l,u=t,c=new a(8);u--;)l=s.times(s),s=o.minus(l.times(c.minus(l.times(c))));return I(s,a.precision=r,a.rounding=n,!0)};v.hyperbolicSine=v.sinh=function(){var t,e,r,n,i=this,s=i.constructor;if(!i.isFinite()||i.isZero())return new s(i);if(e=s.precision,r=s.rounding,s.precision=e+Math.max(i.e,i.sd())+4,s.rounding=1,n=i.d.length,n<3)i=Ar(s,2,i,i,!0);else{t=1.4*Math.sqrt(n),t=t>16?16:t|0,i=i.times(1/ui(5,t)),i=Ar(s,2,i,i,!0);for(var a,o=new s(5),l=new s(16),u=new s(20);t--;)a=i.times(i),i=i.times(o.plus(a.times(l.times(a).plus(u))))}return s.precision=e,s.rounding=r,I(i,e,r,!0)};v.hyperbolicTangent=v.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,te(r.sinh(),r.cosh(),n.precision=t,n.rounding=e)):new n(r.s)};v.inverseCosine=v.acos=function(){var t=this,e=t.constructor,r=t.abs().cmp(1),n=e.precision,i=e.rounding;return r!==-1?r===0?t.isNeg()?at(e,n,i):new e(0):new e(NaN):t.isZero()?at(e,n+4,i).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=i,t.times(2))};v.inverseHyperbolicCosine=v.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,U=!1,r=r.times(r).minus(1).sqrt().plus(r),U=!0,n.precision=t,n.rounding=e,r.ln()):new n(r)};v.inverseHyperbolicSine=v.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,U=!1,r=r.times(r).plus(1).sqrt().plus(r),U=!0,n.precision=t,n.rounding=e,r.ln())};v.inverseHyperbolicTangent=v.atanh=function(){var t,e,r,n,i=this,s=i.constructor;return i.isFinite()?i.e>=0?new s(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(t=s.precision,e=s.rounding,n=i.sd(),Math.max(n,t)<2*-i.e-1?I(new s(i),t,e,!0):(s.precision=r=n-i.e,i=te(i.plus(1),new s(1).minus(i),r+t,1),s.precision=t+4,s.rounding=1,i=i.ln(),s.precision=t,s.rounding=e,i.times(.5))):new s(NaN)};v.inverseSine=v.asin=function(){var t,e,r,n,i=this,s=i.constructor;return i.isZero()?new s(i):(e=i.abs().cmp(1),r=s.precision,n=s.rounding,e!==-1?e===0?(t=at(s,r+4,n).times(.5),t.s=i.s,t):new s(NaN):(s.precision=r+6,s.rounding=1,i=i.div(new s(1).minus(i.times(i)).sqrt().plus(1)).atan(),s.precision=r,s.rounding=n,i.times(2)))};v.inverseTangent=v.atan=function(){var t,e,r,n,i,s,a,o,l,u=this,c=u.constructor,f=c.precision,p=c.rounding;if(u.isFinite()){if(u.isZero())return new c(u);if(u.abs().eq(1)&&f+4<=Ps)return a=at(c,f+4,p).times(.25),a.s=u.s,a}else{if(!u.s)return new c(NaN);if(f+4<=Ps)return a=at(c,f+4,p).times(.5),a.s=u.s,a}for(c.precision=o=f+10,c.rounding=1,r=Math.min(28,o/R+2|0),t=r;t;--t)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(U=!1,e=Math.ceil(o/R),n=1,l=u.times(u),a=new c(u),i=u;t!==-1;)if(i=i.times(l),s=a.minus(i.div(n+=2)),i=i.times(l),a=s.plus(i.div(n+=2)),a.d[e]!==void 0)for(t=e;a.d[t]===s.d[t]&&t--;);return r&&(a=a.times(2<<r-1)),U=!0,I(a,c.precision=f,c.rounding=p,!0)};v.isFinite=function(){return!!this.d};v.isInteger=v.isInt=function(){return!!this.d&&Oe(this.e/R)>this.d.length-2};v.isNaN=function(){return!this.s};v.isNegative=v.isNeg=function(){return this.s<0};v.isPositive=v.isPos=function(){return this.s>0};v.isZero=function(){return!!this.d&&this.d[0]===0};v.lessThan=v.lt=function(t){return this.cmp(t)<0};v.lessThanOrEqualTo=v.lte=function(t){return this.cmp(t)<1};v.logarithm=v.log=function(t){var e,r,n,i,s,a,o,l,u=this,c=u.constructor,f=c.precision,p=c.rounding,h=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=u.d,u.s<0||!r||!r[0]||u.eq(1))return new c(r&&!r[0]?-1/0:u.s!=1?NaN:r?0:1/0);if(e)if(r.length>1)s=!0;else{for(i=r[0];i%10===0;)i/=10;s=i!==1}if(U=!1,o=f+h,a=Mt(u,o),n=e?ai(c,o+10):Mt(t,o),l=te(a,n,o,1),sn(l.d,i=f,p))do if(o+=10,a=Mt(u,o),n=e?ai(c,o+10):Mt(t,o),l=te(a,n,o,1),!s){+xe(l.d).slice(i+1,i+15)+1==1e14&&(l=I(l,f+1,0));break}while(sn(l.d,i+=10,p));return U=!0,I(l,f,p)};v.minus=v.sub=function(t){var e,r,n,i,s,a,o,l,u,c,f,p,h=this,_=h.constructor;if(t=new _(t),!h.d||!t.d)return!h.s||!t.s?t=new _(NaN):h.d?t.s=-t.s:t=new _(t.d||h.s!==t.s?h:NaN),t;if(h.s!=t.s)return t.s=-t.s,h.plus(t);if(u=h.d,p=t.d,o=_.precision,l=_.rounding,!u[0]||!p[0]){if(p[0])t.s=-t.s;else if(u[0])t=new _(h);else return new _(l===3?-0:0);return U?I(t,o,l):t}if(r=Oe(t.e/R),c=Oe(h.e/R),u=u.slice(),s=c-r,s){for(f=s<0,f?(e=u,s=-s,a=p.length):(e=p,r=c,a=u.length),n=Math.max(Math.ceil(o/R),a)+2,s>n&&(s=n,e.length=1),e.reverse(),n=s;n--;)e.push(0);e.reverse()}else{for(n=u.length,a=p.length,f=n<a,f&&(a=n),n=0;n<a;n++)if(u[n]!=p[n]){f=u[n]<p[n];break}s=0}for(f&&(e=u,u=p,p=e,t.s=-t.s),a=u.length,n=p.length-a;n>0;--n)u[a++]=0;for(n=p.length;n>s;){if(u[--n]<p[n]){for(i=n;i&&u[--i]===0;)u[i]=Ke-1;--u[i],u[n]+=Ke}u[n]-=p[n]}for(;u[--a]===0;)u.pop();for(;u[0]===0;u.shift())--r;return u[0]?(t.d=u,t.e=li(u,r),U?I(t,o,l):t):new _(l===3?-0:0)};v.modulo=v.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]?I(new n(r),n.precision,n.rounding):(U=!1,n.modulo==9?(e=te(r,t.abs(),0,3,1),e.s*=t.s):e=te(r,t,0,n.modulo,1),e=e.times(t),U=!0,r.minus(e))};v.naturalExponential=v.exp=function(){return Us(this)};v.naturalLogarithm=v.ln=function(){return Mt(this)};v.negated=v.neg=function(){var t=new this.constructor(this);return t.s=-t.s,I(t)};v.plus=v.add=function(t){var e,r,n,i,s,a,o,l,u,c,f=this,p=f.constructor;if(t=new p(t),!f.d||!t.d)return!f.s||!t.s?t=new p(NaN):f.d||(t=new p(t.d||f.s===t.s?f:NaN)),t;if(f.s!=t.s)return t.s=-t.s,f.minus(t);if(u=f.d,c=t.d,o=p.precision,l=p.rounding,!u[0]||!c[0])return c[0]||(t=new p(f)),U?I(t,o,l):t;if(s=Oe(f.e/R),n=Oe(t.e/R),u=u.slice(),i=s-n,i){for(i<0?(r=u,i=-i,a=c.length):(r=c,n=s,a=u.length),s=Math.ceil(o/R),a=s>a?s+1:a+1,i>a&&(i=a,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(a=u.length,i=c.length,a-i<0&&(i=a,r=c,c=u,u=r),e=0;i;)e=(u[--i]=u[i]+c[i]+e)/Ke|0,u[i]%=Ke;for(e&&(u.unshift(e),++n),a=u.length;u[--a]==0;)u.pop();return t.d=u,t.e=li(u,n),U?I(t,o,l):t};v.precision=v.sd=function(t){var e,r=this;if(t!==void 0&&t!==!!t&&t!==1&&t!==0)throw Error(Lt+t);return r.d?(e=Ko(r.d),t&&r.e+1>e&&(e=r.e+1)):e=NaN,e};v.round=function(){var t=this,e=t.constructor;return I(new e(t),t.e+1,e.rounding)};v.sine=v.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())+R,n.rounding=1,r=$f(n,rl(n,r)),n.precision=t,n.rounding=e,I(wt>2?r.neg():r,t,e,!0)):new n(NaN)};v.squareRoot=v.sqrt=function(){var t,e,r,n,i,s,a=this,o=a.d,l=a.e,u=a.s,c=a.constructor;if(u!==1||!o||!o[0])return new c(!u||u<0&&(!o||o[0])?NaN:o?a:1/0);for(U=!1,u=Math.sqrt(+a),u==0||u==1/0?(e=xe(o),(e.length+l)%2==0&&(e+="0"),u=Math.sqrt(e),l=Oe((l+1)/2)-(l<0||l%2),u==1/0?e="5e"+l:(e=u.toExponential(),e=e.slice(0,e.indexOf("e")+1)+l),n=new c(e)):n=new c(u.toString()),r=(l=c.precision)+3;;)if(s=n,n=s.plus(te(a,s,r+2,1)).times(.5),xe(s.d).slice(0,r)===(e=xe(n.d)).slice(0,r))if(e=e.slice(r-3,r+1),e=="9999"||!i&&e=="4999"){if(!i&&(I(s,l+1,0),s.times(s).eq(a))){n=s;break}r+=4,i=1}else{(!+e||!+e.slice(1)&&e.charAt(0)=="5")&&(I(n,l+1,1),t=!n.times(n).eq(a));break}return U=!0,I(n,l,c.rounding,t)};v.tangent=v.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=te(r,new n(1).minus(r.times(r)).sqrt(),t+10,0),n.precision=t,n.rounding=e,I(wt==2||wt==4?r.neg():r,t,e,!0)):new n(NaN)};v.times=v.mul=function(t){var e,r,n,i,s,a,o,l,u,c=this,f=c.constructor,p=c.d,h=(t=new f(t)).d;if(t.s*=c.s,!p||!p[0]||!h||!h[0])return new f(!t.s||p&&!p[0]&&!h||h&&!h[0]&&!p?NaN:!p||!h?t.s/0:t.s*0);for(r=Oe(c.e/R)+Oe(t.e/R),l=p.length,u=h.length,l<u&&(s=p,p=h,h=s,a=l,l=u,u=a),s=[],a=l+u,n=a;n--;)s.push(0);for(n=u;--n>=0;){for(e=0,i=l+n;i>n;)o=s[i]+h[n]*p[i-n-1]+e,s[i--]=o%Ke|0,e=o/Ke|0;s[i]=(s[i]+e)%Ke|0}for(;!s[--a];)s.pop();return e?++r:s.shift(),t.d=s,t.e=li(s,r),U?I(t,f.precision,f.rounding):t};v.toBinary=function(t,e){return Fs(this,2,t,e)};v.toDecimalPlaces=v.toDP=function(t,e){var r=this,n=r.constructor;return r=new n(r),t===void 0?r:($e(t,0,Pt),e===void 0?e=n.rounding:$e(e,0,8),I(r,t+r.e+1,e))};v.toExponential=function(t,e){var r,n=this,i=n.constructor;return t===void 0?r=ot(n,!0):($e(t,0,Pt),e===void 0?e=i.rounding:$e(e,0,8),n=I(new i(n),t+1,e),r=ot(n,!0,t+1)),n.isNeg()&&!n.isZero()?"-"+r:r};v.toFixed=function(t,e){var r,n,i=this,s=i.constructor;return t===void 0?r=ot(i):($e(t,0,Pt),e===void 0?e=s.rounding:$e(e,0,8),n=I(new s(i),t+i.e+1,e),r=ot(n,!1,t+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};v.toFraction=function(t){var e,r,n,i,s,a,o,l,u,c,f,p,h=this,_=h.d,g=h.constructor;if(!_)return new g(h);if(u=r=new g(1),n=l=new g(0),e=new g(n),s=e.e=Ko(_)-h.e-1,a=s%R,e.d[0]=_e(10,a<0?R+a:a),t==null)t=s>0?e:u;else{if(o=new g(t),!o.isInt()||o.lt(u))throw Error(Lt+o);t=o.gt(e)?s>0?e:u:o}for(U=!1,o=new g(xe(_)),c=g.precision,g.precision=s=_.length*R*2;f=te(o,e,0,1,1),i=r.plus(f.times(n)),i.cmp(t)!=1;)r=n,n=i,i=u,u=l.plus(f.times(i)),l=i,i=e,e=o.minus(f.times(i)),o=i;return i=te(t.minus(r),n,0,1,1),l=l.plus(i.times(u)),r=r.plus(i.times(n)),l.s=u.s=h.s,p=te(u,n,s,1).minus(h).abs().cmp(te(l,r,s,1).minus(h).abs())<1?[u,n]:[l,r],g.precision=c,U=!0,p};v.toHexadecimal=v.toHex=function(t,e){return Fs(this,16,t,e)};v.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:$e(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]?(U=!1,r=te(r,t,0,e,1).times(t),U=!0,I(r)):(t.s=r.s,r=t),r};v.toNumber=function(){return+this};v.toOctal=function(t,e){return Fs(this,8,t,e)};v.toPower=v.pow=function(t){var e,r,n,i,s,a,o=this,l=o.constructor,u=+(t=new l(t));if(!o.d||!t.d||!o.d[0]||!t.d[0])return new l(_e(+o,u));if(o=new l(o),o.eq(1))return o;if(n=l.precision,s=l.rounding,t.eq(1))return I(o,n,s);if(e=Oe(t.e/R),e>=t.d.length-1&&(r=u<0?-u:u)<=Lf)return i=Qo(l,o,r,n),t.s<0?new l(1).div(i):I(i,n,s);if(a=o.s,a<0){if(e<t.d.length-1)return new l(NaN);if((t.d[e]&1)==0&&(a=1),o.e==0&&o.d[0]==1&&o.d.length==1)return o.s=a,o}return r=_e(+o,u),e=r==0||!isFinite(r)?Oe(u*(Math.log("0."+xe(o.d))/Math.LN10+o.e+1)):new l(r+"").e,e>l.maxE+1||e<l.minE-1?new l(e>0?a/0:0):(U=!1,l.rounding=o.s=1,r=Math.min(12,(e+"").length),i=Us(t.times(Mt(o,n+r)),n),i.d&&(i=I(i,n+5,1),sn(i.d,n,s)&&(e=n+10,i=I(Us(t.times(Mt(o,e+r)),e),e+5,1),+xe(i.d).slice(n+1,n+15)+1==1e14&&(i=I(i,n+1,0)))),i.s=a,U=!0,l.rounding=s,I(i,n,s))};v.toPrecision=function(t,e){var r,n=this,i=n.constructor;return t===void 0?r=ot(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):($e(t,1,Pt),e===void 0?e=i.rounding:$e(e,0,8),n=I(new i(n),t,e),r=ot(n,t<=n.e||n.e<=i.toExpNeg,t)),n.isNeg()&&!n.isZero()?"-"+r:r};v.toSignificantDigits=v.toSD=function(t,e){var r=this,n=r.constructor;return t===void 0?(t=n.precision,e=n.rounding):($e(t,1,Pt),e===void 0?e=n.rounding:$e(e,0,8)),I(new n(r),t,e)};v.toString=function(){var t=this,e=t.constructor,r=ot(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()&&!t.isZero()?"-"+r:r};v.truncated=v.trunc=function(){return I(new this.constructor(this),this.e+1,1)};v.valueOf=v.toJSON=function(){var t=this,e=t.constructor,r=ot(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()?"-"+r:r};function xe(t){var e,r,n,i=t.length-1,s="",a=t[0];if(i>0){for(s+=a,e=1;e<i;e++)n=t[e]+"",r=R-n.length,r&&(s+=Rt(r)),s+=n;a=t[e],n=a+"",r=R-n.length,r&&(s+=Rt(r))}else if(a===0)return"0";for(;a%10===0;)a/=10;return s+a}function $e(t,e,r){if(t!==~~t||t<e||t>r)throw Error(Lt+t)}function sn(t,e,r,n){var i,s,a,o;for(s=t[0];s>=10;s/=10)--e;return--e<0?(e+=R,i=0):(i=Math.ceil((e+1)/R),e%=R),s=_e(10,R-e),o=t[i]%s|0,n==null?e<3?(e==0?o=o/100|0:e==1&&(o=o/10|0),a=r<4&&o==99999||r>3&&o==49999||o==5e4||o==0):a=(r<4&&o+1==s||r>3&&o+1==s/2)&&(t[i+1]/s/100|0)==_e(10,e-2)-1||(o==s/2||o==0)&&(t[i+1]/s/100|0)==0:e<4?(e==0?o=o/1e3|0:e==1?o=o/100|0:e==2&&(o=o/10|0),a=(n||r<4)&&o==9999||!n&&r>3&&o==4999):a=((n||r<4)&&o+1==s||!n&&r>3&&o+1==s/2)&&(t[i+1]/s/1e3|0)==_e(10,e-3)-1,a}function ri(t,e,r){for(var n,i=[0],s,a=0,o=t.length;a<o;){for(s=i.length;s--;)i[s]*=e;for(i[0]+=Ms.indexOf(t.charAt(a++)),n=0;n<i.length;n++)i[n]>r-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/r|0,i[n]%=r)}return i.reverse()}function Uf(t,e){var r,n,i;if(e.isZero())return e;n=e.d.length,n<32?(r=Math.ceil(n/3),i=(1/ui(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),t.precision+=r,e=Ar(t,1,e.times(i),new t(1));for(var s=r;s--;){var a=e.times(e);e=a.times(a).minus(a).times(8).plus(1)}return t.precision-=r,e}var te=(function(){function t(n,i,s){var a,o=0,l=n.length;for(n=n.slice();l--;)a=n[l]*i+o,n[l]=a%s|0,o=a/s|0;return o&&n.unshift(o),n}function e(n,i,s,a){var o,l;if(s!=a)l=s>a?1:-1;else for(o=l=0;o<s;o++)if(n[o]!=i[o]){l=n[o]>i[o]?1:-1;break}return l}function r(n,i,s,a){for(var o=0;s--;)n[s]-=o,o=n[s]<i[s]?1:0,n[s]=o*a+n[s]-i[s];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,s,a,o,l){var u,c,f,p,h,_,g,b,k,T,A,S,B,F,j,Y,re,Ne,G,D,V=n.constructor,z=n.s==i.s?1:-1,P=n.d,N=i.d;if(!P||!P[0]||!N||!N[0])return new V(!n.s||!i.s||(P?N&&P[0]==N[0]:!N)?NaN:P&&P[0]==0||!N?z*0:z/0);for(l?(h=1,c=n.e-i.e):(l=Ke,h=R,c=Oe(n.e/h)-Oe(i.e/h)),G=N.length,re=P.length,k=new V(z),T=k.d=[],f=0;N[f]==(P[f]||0);f++);if(N[f]>(P[f]||0)&&c--,s==null?(F=s=V.precision,a=V.rounding):o?F=s+(n.e-i.e)+1:F=s,F<0)T.push(1),_=!0;else{if(F=F/h+2|0,f=0,G==1){for(p=0,N=N[0],F++;(f<re||p)&&F--;f++)j=p*l+(P[f]||0),T[f]=j/N|0,p=j%N|0;_=p||f<re}else{for(p=l/(N[0]+1)|0,p>1&&(N=t(N,p,l),P=t(P,p,l),G=N.length,re=P.length),Y=G,A=P.slice(0,G),S=A.length;S<G;)A[S++]=0;D=N.slice(),D.unshift(0),Ne=N[0],N[1]>=l/2&&++Ne;do p=0,u=e(N,A,G,S),u<0?(B=A[0],G!=S&&(B=B*l+(A[1]||0)),p=B/Ne|0,p>1?(p>=l&&(p=l-1),g=t(N,p,l),b=g.length,S=A.length,u=e(g,A,b,S),u==1&&(p--,r(g,G<b?D:N,b,l))):(p==0&&(u=p=1),g=N.slice()),b=g.length,b<S&&g.unshift(0),r(A,g,S,l),u==-1&&(S=A.length,u=e(N,A,G,S),u<1&&(p++,r(A,G<S?D:N,S,l))),S=A.length):u===0&&(p++,A=[0]),T[f++]=p,u&&A[0]?A[S++]=P[Y]||0:(A=[P[Y]],S=1);while((Y++<re||A[0]!==void 0)&&F--);_=A[0]!==void 0}T[0]||T.shift()}if(h==1)k.e=c,Go=_;else{for(f=1,p=T[0];p>=10;p/=10)f++;k.e=f+c*h-1,I(k,o?s+k.e+1:s,a,_)}return k}})();function I(t,e,r,n){var i,s,a,o,l,u,c,f,p,h=t.constructor;e:if(e!=null){if(f=t.d,!f)return t;for(i=1,o=f[0];o>=10;o/=10)i++;if(s=e-i,s<0)s+=R,a=e,c=f[p=0],l=c/_e(10,i-a-1)%10|0;else if(p=Math.ceil((s+1)/R),o=f.length,p>=o)if(n){for(;o++<=p;)f.push(0);c=l=0,i=1,s%=R,a=s-R+1}else break e;else{for(c=o=f[p],i=1;o>=10;o/=10)i++;s%=R,a=s-R+i,l=a<0?0:c/_e(10,i-a-1)%10|0}if(n=n||e<0||f[p+1]!==void 0||(a<0?c:c%_e(10,i-a-1)),u=r<4?(l||n)&&(r==0||r==(t.s<0?3:2)):l>5||l==5&&(r==4||n||r==6&&(s>0?a>0?c/_e(10,i-a):0:f[p-1])%10&1||r==(t.s<0?8:7)),e<1||!f[0])return f.length=0,u?(e-=t.e+1,f[0]=_e(10,(R-e%R)%R),t.e=-e||0):f[0]=t.e=0,t;if(s==0?(f.length=p,o=1,p--):(f.length=p+1,o=_e(10,R-s),f[p]=a>0?(c/_e(10,i-a)%_e(10,a)|0)*o:0),u)for(;;)if(p==0){for(s=1,a=f[0];a>=10;a/=10)s++;for(a=f[0]+=o,o=1;a>=10;a/=10)o++;s!=o&&(t.e++,f[0]==Ke&&(f[0]=1));break}else{if(f[p]+=o,f[p]!=Ke)break;f[p--]=0,o=1}for(s=f.length;f[--s]===0;)f.pop()}return U&&(t.e>h.maxE?(t.d=null,t.e=NaN):t.e<h.minE&&(t.e=0,t.d=[0])),t}function ot(t,e,r){if(!t.isFinite())return tl(t);var n,i=t.e,s=xe(t.d),a=s.length;return e?(r&&(n=r-a)>0?s=s.charAt(0)+"."+s.slice(1)+Rt(n):a>1&&(s=s.charAt(0)+"."+s.slice(1)),s=s+(t.e<0?"e":"e+")+t.e):i<0?(s="0."+Rt(-i-1)+s,r&&(n=r-a)>0&&(s+=Rt(n))):i>=a?(s+=Rt(i+1-a),r&&(n=r-i-1)>0&&(s=s+"."+Rt(n))):((n=i+1)<a&&(s=s.slice(0,n)+"."+s.slice(n)),r&&(n=r-a)>0&&(i+1===a&&(s+="."),s+=Rt(n))),s}function li(t,e){var r=t[0];for(e*=R;r>=10;r/=10)e++;return e}function ai(t,e,r){if(e>Pf)throw U=!0,r&&(t.precision=r),Error(Xo);return I(new t(ii),e,1,!0)}function at(t,e,r){if(e>Ps)throw Error(Xo);return I(new t(si),e,r,!0)}function Ko(t){var e=t.length-1,r=e*R+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 Rt(t){for(var e="";t--;)e+="0";return e}function Qo(t,e,r,n){var i,s=new t(1),a=Math.ceil(n/R+4);for(U=!1;;){if(r%2&&(s=s.times(e),Ho(s.d,a)&&(i=!0)),r=Oe(r/2),r===0){r=s.d.length-1,i&&s.d[r]===0&&++s.d[r];break}e=e.times(e),Ho(e.d,a)}return U=!0,s}function Vo(t){return t.d[t.d.length-1]&1}function el(t,e,r){for(var n,i,s=new t(e[0]),a=0;++a<e.length;){if(i=new t(e[a]),!i.s){s=i;break}n=s.cmp(i),(n===r||n===0&&s.s===r)&&(s=i)}return s}function Us(t,e){var r,n,i,s,a,o,l,u=0,c=0,f=0,p=t.constructor,h=p.rounding,_=p.precision;if(!t.d||!t.d[0]||t.e>17)return new p(t.d?t.d[0]?t.s<0?0:1/0:1:t.s?t.s<0?0:t:NaN);for(e==null?(U=!1,l=_):l=e,o=new p(.03125);t.e>-2;)t=t.times(o),f+=5;for(n=Math.log(_e(2,f))/Math.LN10*2+5|0,l+=n,r=s=a=new p(1),p.precision=l;;){if(s=I(s.times(t),l,1),r=r.times(++c),o=a.plus(te(s,r,l,1)),xe(o.d).slice(0,l)===xe(a.d).slice(0,l)){for(i=f;i--;)a=I(a.times(a),l,1);if(e==null)if(u<3&&sn(a.d,l-n,h,u))p.precision=l+=10,r=s=o=new p(1),c=0,u++;else return I(a,p.precision=_,h,U=!0);else return p.precision=_,a}a=o}}function Mt(t,e){var r,n,i,s,a,o,l,u,c,f,p,h=1,_=10,g=t,b=g.d,k=g.constructor,T=k.rounding,A=k.precision;if(g.s<0||!b||!b[0]||!g.e&&b[0]==1&&b.length==1)return new k(b&&!b[0]?-1/0:g.s!=1?NaN:b?0:g);if(e==null?(U=!1,c=A):c=e,k.precision=c+=_,r=xe(b),n=r.charAt(0),Math.abs(s=g.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)g=g.times(t),r=xe(g.d),n=r.charAt(0),h++;s=g.e,n>1?(g=new k("0."+r),s++):g=new k(n+"."+r.slice(1))}else return u=ai(k,c+2,A).times(s+""),g=Mt(new k(n+"."+r.slice(1)),c-_).plus(u),k.precision=A,e==null?I(g,A,T,U=!0):g;for(f=g,l=a=g=te(g.minus(1),g.plus(1),c,1),p=I(g.times(g),c,1),i=3;;){if(a=I(a.times(p),c,1),u=l.plus(te(a,new k(i),c,1)),xe(u.d).slice(0,c)===xe(l.d).slice(0,c))if(l=l.times(2),s!==0&&(l=l.plus(ai(k,c+2,A).times(s+""))),l=te(l,new k(h),c,1),e==null)if(sn(l.d,c-_,T,o))k.precision=c+=_,u=a=g=te(f.minus(1),f.plus(1),c,1),p=I(g.times(g),c,1),i=o=1;else return I(l,k.precision=A,T,U=!0);else return k.precision=A,l;l=u,i+=2}}function tl(t){return String(t.s*t.s/0)}function ni(t,e){var r,n,i;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(i=e.length;e.charCodeAt(i-1)===48;--i);if(e=e.slice(n,i),e){if(i-=n,t.e=r=r-n-1,t.d=[],n=(r+1)%R,r<0&&(n+=R),n<i){for(n&&t.d.push(+e.slice(0,n)),i-=R;n<i;)t.d.push(+e.slice(n,n+=R));e=e.slice(n),n=R-e.length}else n-=i;for(;n--;)e+="0";t.d.push(+e),U&&(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 Ff(t,e){var r,n,i,s,a,o,l,u,c;if(e.indexOf("_")>-1){if(e=e.replace(/(\d)_(?=\d)/g,"$1"),Jo.test(e))return ni(t,e)}else if(e==="Infinity"||e==="NaN")return+e||(t.s=NaN),t.e=NaN,t.d=null,t;if(Rf.test(e))r=16,e=e.toLowerCase();else if(Bf.test(e))r=2;else if(Mf.test(e))r=8;else throw Error(Lt+e);for(s=e.search(/p/i),s>0?(l=+e.slice(s+1),e=e.substring(2,s)):e=e.slice(2),s=e.indexOf("."),a=s>=0,n=t.constructor,a&&(e=e.replace(".",""),o=e.length,s=o-s,i=Qo(n,new n(r),s,s*2)),u=ri(e,r,Ke),c=u.length-1,s=c;u[s]===0;--s)u.pop();return s<0?new n(t.s*0):(t.e=li(u,c),t.d=u,U=!1,a&&(t=te(t,i,o*4)),l&&(t=t.times(Math.abs(l)<54?_e(2,l):an.pow(2,l))),U=!0,t)}function $f(t,e){var r,n=e.d.length;if(n<3)return e.isZero()?e:Ar(t,2,e,e);r=1.4*Math.sqrt(n),r=r>16?16:r|0,e=e.times(1/ui(5,r)),e=Ar(t,2,e,e);for(var i,s=new t(5),a=new t(16),o=new t(20);r--;)i=e.times(e),e=e.times(s.plus(i.times(a.times(i).minus(o))));return e}function Ar(t,e,r,n,i){var s,a,o,l,u=1,c=t.precision,f=Math.ceil(c/R);for(U=!1,l=r.times(r),o=new t(n);;){if(a=te(o.times(l),new t(e++*e++),c,1),o=i?n.plus(a):n.minus(a),n=te(a.times(l),new t(e++*e++),c,1),a=o.plus(n),a.d[f]!==void 0){for(s=f;a.d[s]===o.d[s]&&s--;);if(s==-1)break}s=o,o=n,n=a,a=s,u++}return U=!0,a.d.length=f+1,a}function ui(t,e){for(var r=t;--e;)r*=t;return r}function rl(t,e){var r,n=e.s<0,i=at(t,t.precision,1),s=i.times(.5);if(e=e.abs(),e.lte(s))return wt=n?4:1,e;if(r=e.divToInt(i),r.isZero())wt=n?3:2;else{if(e=e.minus(r.times(i)),e.lte(s))return wt=Vo(r)?n?2:3:n?4:1,e;wt=Vo(r)?n?1:4:n?3:2}return e.minus(i).abs()}function Fs(t,e,r,n){var i,s,a,o,l,u,c,f,p,h=t.constructor,_=r!==void 0;if(_?($e(r,1,Pt),n===void 0?n=h.rounding:$e(n,0,8)):(r=h.precision,n=h.rounding),!t.isFinite())c=tl(t);else{for(c=ot(t),a=c.indexOf("."),_?(i=2,e==16?r=r*4-3:e==8&&(r=r*3-2)):i=e,a>=0&&(c=c.replace(".",""),p=new h(1),p.e=c.length-a,p.d=ri(ot(p),10,i),p.e=p.d.length),f=ri(c,10,i),s=l=f.length;f[--l]==0;)f.pop();if(!f[0])c=_?"0p+0":"0";else{if(a<0?s--:(t=new h(t),t.d=f,t.e=s,t=te(t,p,r,n,0,i),f=t.d,s=t.e,u=Go),a=f[r],o=i/2,u=u||f[r+1]!==void 0,u=n<4?(a!==void 0||u)&&(n===0||n===(t.s<0?3:2)):a>o||a===o&&(n===4||u||n===6&&f[r-1]&1||n===(t.s<0?8:7)),f.length=r,u)for(;++f[--r]>i-1;)f[r]=0,r||(++s,f.unshift(1));for(l=f.length;!f[l-1];--l);for(a=0,c="";a<l;a++)c+=Ms.charAt(f[a]);if(_){if(l>1)if(e==16||e==8){for(a=e==16?4:3,--l;l%a;l++)c+="0";for(f=ri(c,i,e),l=f.length;!f[l-1];--l);for(a=1,c="1.";a<l;a++)c+=Ms.charAt(f[a])}else c=c.charAt(0)+"."+c.slice(1);c=c+(s<0?"p":"p+")+s}else if(s<0){for(;++s;)c="0"+c;c="0."+c}else if(++s>l)for(s-=l;s--;)c+="0";else s<l&&(c=c.slice(0,s)+"."+c.slice(s))}c=(e==16?"0x":e==2?"0b":e==8?"0o":"")+c}return t.s<0?"-"+c:c}function Ho(t,e){if(t.length>e)return t.length=e,!0}function qf(t){return new this(t).abs()}function jf(t){return new this(t).acos()}function zf(t){return new this(t).acosh()}function Vf(t,e){return new this(t).plus(e)}function Hf(t){return new this(t).asin()}function Wf(t){return new this(t).asinh()}function Gf(t){return new this(t).atan()}function Xf(t){return new this(t).atanh()}function Yf(t,e){t=new this(t),e=new this(e);var r,n=this.precision,i=this.rounding,s=n+4;return!t.s||!e.s?r=new this(NaN):!t.d&&!e.d?(r=at(this,s,1).times(e.s>0?.25:.75),r.s=t.s):!e.d||t.isZero()?(r=e.s<0?at(this,n,i):new this(0),r.s=t.s):!t.d||e.isZero()?(r=at(this,s,1).times(.5),r.s=t.s):e.s<0?(this.precision=s,this.rounding=1,r=this.atan(te(t,e,s,1)),e=at(this,s,1),this.precision=n,this.rounding=i,r=t.s<0?r.minus(e):r.plus(e)):r=this.atan(te(t,e,s,1)),r}function Zf(t){return new this(t).cbrt()}function Jf(t){return I(t=new this(t),t.e+1,2)}function Kf(t,e,r){return new this(t).clamp(e,r)}function Qf(t){if(!t||typeof t!="object")throw Error(oi+"Object expected");var e,r,n,i=t.defaults===!0,s=["precision",1,Pt,"rounding",0,8,"toExpNeg",-kr,0,"toExpPos",0,kr,"maxE",0,kr,"minE",-kr,0,"modulo",0,9];for(e=0;e<s.length;e+=3)if(r=s[e],i&&(this[r]=Ls[r]),(n=t[r])!==void 0)if(Oe(n)===n&&n>=s[e+1]&&n<=s[e+2])this[r]=n;else throw Error(Lt+r+": "+n);if(r="crypto",i&&(this[r]=Ls[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(Yo);else this[r]=!1;else throw Error(Lt+r+": "+n);return this}function ed(t){return new this(t).cos()}function td(t){return new this(t).cosh()}function nl(t){var e,r,n;function i(s){var a,o,l,u=this;if(!(u instanceof i))return new i(s);if(u.constructor=i,Wo(s)){u.s=s.s,U?!s.d||s.e>i.maxE?(u.e=NaN,u.d=null):s.e<i.minE?(u.e=0,u.d=[0]):(u.e=s.e,u.d=s.d.slice()):(u.e=s.e,u.d=s.d?s.d.slice():s.d);return}if(l=typeof s,l==="number"){if(s===0){u.s=1/s<0?-1:1,u.e=0,u.d=[0];return}if(s<0?(s=-s,u.s=-1):u.s=1,s===~~s&&s<1e7){for(a=0,o=s;o>=10;o/=10)a++;U?a>i.maxE?(u.e=NaN,u.d=null):a<i.minE?(u.e=0,u.d=[0]):(u.e=a,u.d=[s]):(u.e=a,u.d=[s]);return}if(s*0!==0){s||(u.s=NaN),u.e=NaN,u.d=null;return}return ni(u,s.toString())}if(l==="string")return(o=s.charCodeAt(0))===45?(s=s.slice(1),u.s=-1):(o===43&&(s=s.slice(1)),u.s=1),Jo.test(s)?ni(u,s):Ff(u,s);if(l==="bigint")return s<0?(s=-s,u.s=-1):u.s=1,ni(u,s.toString());throw Error(Lt+s)}if(i.prototype=v,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.EUCLID=9,i.config=i.set=Qf,i.clone=nl,i.isDecimal=Wo,i.abs=qf,i.acos=jf,i.acosh=zf,i.add=Vf,i.asin=Hf,i.asinh=Wf,i.atan=Gf,i.atanh=Xf,i.atan2=Yf,i.cbrt=Zf,i.ceil=Jf,i.clamp=Kf,i.cos=ed,i.cosh=td,i.div=rd,i.exp=nd,i.floor=id,i.hypot=sd,i.ln=ad,i.log=od,i.log10=ud,i.log2=ld,i.max=cd,i.min=fd,i.mod=dd,i.mul=pd,i.pow=md,i.random=hd,i.round=_d,i.sign=gd,i.sin=bd,i.sinh=wd,i.sqrt=yd,i.sub=vd,i.sum=Ed,i.tan=kd,i.tanh=Ad,i.trunc=Td,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 i.config(t),i}function rd(t,e){return new this(t).div(e)}function nd(t){return new this(t).exp()}function id(t){return I(t=new this(t),t.e+1,3)}function sd(){var t,e,r=new this(0);for(U=!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 U=!0,new this(1/0);r=e}return U=!0,r.sqrt()}function Wo(t){return t instanceof an||t&&t.toStringTag===Zo||!1}function ad(t){return new this(t).ln()}function od(t,e){return new this(t).log(e)}function ld(t){return new this(t).log(2)}function ud(t){return new this(t).log(10)}function cd(){return el(this,arguments,-1)}function fd(){return el(this,arguments,1)}function dd(t,e){return new this(t).mod(e)}function pd(t,e){return new this(t).mul(e)}function md(t,e){return new this(t).pow(e)}function hd(t){var e,r,n,i,s=0,a=new this(1),o=[];if(t===void 0?t=this.precision:$e(t,1,Pt),n=Math.ceil(t/R),this.crypto)if(crypto.getRandomValues)for(e=crypto.getRandomValues(new Uint32Array(n));s<n;)i=e[s],i>=429e7?e[s]=crypto.getRandomValues(new Uint32Array(1))[0]:o[s++]=i%1e7;else if(crypto.randomBytes){for(e=crypto.randomBytes(n*=4);s<n;)i=e[s]+(e[s+1]<<8)+(e[s+2]<<16)+((e[s+3]&127)<<24),i>=214e7?crypto.randomBytes(4).copy(e,s):(o.push(i%1e7),s+=4);s=n/4}else throw Error(Yo);else for(;s<n;)o[s++]=Math.random()*1e7|0;for(n=o[--s],t%=R,n&&t&&(i=_e(10,R-t),o[s]=(n/i|0)*i);o[s]===0;s--)o.pop();if(s<0)r=0,o=[0];else{for(r=-1;o[0]===0;r-=R)o.shift();for(n=1,i=o[0];i>=10;i/=10)n++;n<R&&(r-=R-n)}return a.e=r,a.d=o,a}function _d(t){return I(t=new this(t),t.e+1,this.rounding)}function gd(t){return t=new this(t),t.d?t.d[0]?t.s:0*t.s:t.s||NaN}function bd(t){return new this(t).sin()}function wd(t){return new this(t).sinh()}function yd(t){return new this(t).sqrt()}function vd(t,e){return new this(t).sub(e)}function Ed(){var t=0,e=arguments,r=new this(e[t]);for(U=!1;r.s&&++t<e.length;)r=r.plus(e[t]);return U=!0,I(r,this.precision,this.rounding)}function kd(t){return new this(t).tan()}function Ad(t){return new this(t).tanh()}function Td(t){return I(t=new this(t),t.e+1,1)}v[Symbol.for("nodejs.util.inspect.custom")]=v.toString;v[Symbol.toStringTag]="Decimal";var an=v.constructor=nl(Ls);ii=new an(ii);si=new an(si);var il=an;var Dd=20,xd=1,Kt=1e6,sl=1e6,Sd=-7,Cd=21,Nd=!1,on="[big.js] ",Qt=on+"Invalid ",ci=Qt+"decimal places",Od=Qt+"rounding mode",al=on+"Division by zero",Q={},lt=void 0,Id=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function ol(){function t(e){var r=this;if(!(r instanceof t))return e===lt?ol():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(Qt+"value");e=e===0&&1/e<0?"-0":String(e)}Bd(r,e)}r.constructor=t}return t.prototype=Q,t.DP=Dd,t.RM=xd,t.NE=Sd,t.PE=Cd,t.strict=Nd,t.roundDown=0,t.roundHalfUp=1,t.roundHalfEven=2,t.roundUp=3,t}function Bd(t,e){var r,n,i;if(!Id.test(e))throw Error(Qt+"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),i=e.length,n=0;n<i&&e.charAt(n)=="0";)++n;if(n==i)t.c=[t.e=0];else{for(;i>0&&e.charAt(--i)=="0";);for(t.e=r-n-1,t.c=[],r=0;n<=i;)t.c[r++]=+e.charAt(n++)}return t}function er(t,e,r,n){var i=t.c;if(r===lt&&(r=t.constructor.RM),r!==0&&r!==1&&r!==2&&r!==3)throw Error(Od);if(e<1)n=r===3&&(n||!!i[0])||e===0&&(r===1&&i[0]>=5||r===2&&(i[0]>5||i[0]===5&&(n||i[1]!==lt))),i.length=1,n?(t.e=t.e-e+1,i[0]=1):i[0]=t.e=0;else if(e<i.length){if(n=r===1&&i[e]>=5||r===2&&(i[e]>5||i[e]===5&&(n||i[e+1]!==lt||i[e-1]&1))||r===3&&(n||!!i[0]),i.length=e,n){for(;++i[--e]>9;)if(i[e]=0,e===0){++t.e,i.unshift(1);break}}for(e=i.length;!i[--e];)i.pop()}return t}function tr(t,e,r){var n=t.e,i=t.c.join(""),s=i.length;if(e)i=i.charAt(0)+(s>1?"."+i.slice(1):"")+(n<0?"e":"e+")+n;else if(n<0){for(;++n;)i="0"+i;i="0."+i}else if(n>0)if(++n>s)for(n-=s;n--;)i+="0";else n<s&&(i=i.slice(0,n)+"."+i.slice(n));else s>1&&(i=i.charAt(0)+"."+i.slice(1));return t.s<0&&r?"-"+i:i}Q.abs=function(){var t=new this.constructor(this);return t.s=1,t};Q.cmp=function(t){var e,r=this,n=r.c,i=(t=new r.constructor(t)).c,s=r.s,a=t.s,o=r.e,l=t.e;if(!n[0]||!i[0])return n[0]?s:i[0]?-a:0;if(s!=a)return s;if(e=s<0,o!=l)return o>l^e?1:-1;for(a=(o=n.length)<(l=i.length)?o:l,s=-1;++s<a;)if(n[s]!=i[s])return n[s]>i[s]^e?1:-1;return o==l?0:o>l^e?1:-1};Q.div=function(t){var e=this,r=e.constructor,n=e.c,i=(t=new r(t)).c,s=e.s==t.s?1:-1,a=r.DP;if(a!==~~a||a<0||a>Kt)throw Error(ci);if(!i[0])throw Error(al);if(!n[0])return t.s=s,t.c=[t.e=0],t;var o,l,u,c,f,p=i.slice(),h=o=i.length,_=n.length,g=n.slice(0,o),b=g.length,k=t,T=k.c=[],A=0,S=a+(k.e=e.e-t.e)+1;for(k.s=s,s=S<0?0:S,p.unshift(0);b++<o;)g.push(0);do{for(u=0;u<10;u++){if(o!=(b=g.length))c=o>b?1:-1;else for(f=-1,c=0;++f<o;)if(i[f]!=g[f]){c=i[f]>g[f]?1:-1;break}if(c<0){for(l=b==o?i:p;b;){if(g[--b]<l[b]){for(f=b;f&&!g[--f];)g[f]=9;--g[f],g[b]+=10}g[b]-=l[b]}for(;!g[0];)g.shift()}else break}T[A++]=c?u:++u,g[0]&&c?g[b]=n[h]||0:g=[n[h]]}while((h++<_||g[0]!==lt)&&s--);return!T[0]&&A!=1&&(T.shift(),k.e--,S--),A>S&&er(k,S,r.RM,g[0]!==lt),k};Q.eq=function(t){return this.cmp(t)===0};Q.gt=function(t){return this.cmp(t)>0};Q.gte=function(t){return this.cmp(t)>-1};Q.lt=function(t){return this.cmp(t)<0};Q.lte=function(t){return this.cmp(t)<1};Q.minus=Q.sub=function(t){var e,r,n,i,s=this,a=s.constructor,o=s.s,l=(t=new a(t)).s;if(o!=l)return t.s=-l,s.plus(t);var u=s.c.slice(),c=s.e,f=t.c,p=t.e;if(!u[0]||!f[0])return f[0]?t.s=-l:u[0]?t=new a(s):t.s=1,t;if(o=c-p){for((i=o<0)?(o=-o,n=u):(p=c,n=f),n.reverse(),l=o;l--;)n.push(0);n.reverse()}else for(r=((i=u.length<f.length)?u:f).length,o=l=0;l<r;l++)if(u[l]!=f[l]){i=u[l]<f[l];break}if(i&&(n=u,u=f,f=n,t.s=-t.s),(l=(r=f.length)-(e=u.length))>0)for(;l--;)u[e++]=0;for(l=e;r>o;){if(u[--r]<f[r]){for(e=r;e&&!u[--e];)u[e]=9;--u[e],u[r]+=10}u[r]-=f[r]}for(;u[--l]===0;)u.pop();for(;u[0]===0;)u.shift(),--p;return u[0]||(t.s=1,u=[p=0]),t.c=u,t.e=p,t};Q.mod=function(t){var e,r=this,n=r.constructor,i=r.s,s=(t=new n(t)).s;if(!t.c[0])throw Error(al);return r.s=t.s=1,e=t.cmp(r)==1,r.s=i,t.s=s,e?new n(r):(i=n.DP,s=n.RM,n.DP=n.RM=0,r=r.div(t),n.DP=i,n.RM=s,this.minus(r.times(t)))};Q.neg=function(){var t=new this.constructor(this);return t.s=-t.s,t};Q.plus=Q.add=function(t){var e,r,n,i=this,s=i.constructor;if(t=new s(t),i.s!=t.s)return t.s=-t.s,i.minus(t);var a=i.e,o=i.c,l=t.e,u=t.c;if(!o[0]||!u[0])return u[0]||(o[0]?t=new s(i):t.s=i.s),t;if(o=o.slice(),e=a-l){for(e>0?(l=a,n=u):(e=-e,n=o),n.reverse();e--;)n.push(0);n.reverse()}for(o.length-u.length<0&&(n=u,u=o,o=n),e=u.length,r=0;e;o[e]%=10)r=(o[--e]=o[e]+u[e]+r)/10|0;for(r&&(o.unshift(r),++l),e=o.length;o[--e]===0;)o.pop();return t.c=o,t.e=l,t};Q.pow=function(t){var e=this,r=new e.constructor("1"),n=r,i=t<0;if(t!==~~t||t<-sl||t>sl)throw Error(Qt+"exponent");for(i&&(t=-t);t&1&&(n=n.times(e)),t>>=1,!!t;)e=e.times(e);return i?r.div(n):n};Q.prec=function(t,e){if(t!==~~t||t<1||t>Kt)throw Error(Qt+"precision");return er(new this.constructor(this),t,e)};Q.round=function(t,e){if(t===lt)t=0;else if(t!==~~t||t<-Kt||t>Kt)throw Error(ci);return er(new this.constructor(this),t+this.e+1,e)};Q.sqrt=function(){var t,e,r,n=this,i=n.constructor,s=n.s,a=n.e,o=new i("0.5");if(!n.c[0])return new i(n);if(s<0)throw Error(on+"No square root");s=Math.sqrt(+tr(n,!0,!0)),s===0||s===1/0?(e=n.c.join(""),e.length+a&1||(e+="0"),s=Math.sqrt(e),a=((a+1)/2|0)-(a<0||a&1),t=new i((s==1/0?"5e":(s=s.toExponential()).slice(0,s.indexOf("e")+1))+a)):t=new i(s+""),a=t.e+(i.DP+=4);do r=t,t=o.times(r.plus(n.div(r)));while(r.c.slice(0,a).join("")!==t.c.slice(0,a).join(""));return er(t,(i.DP-=4)+t.e+1,i.RM)};Q.times=Q.mul=function(t){var e,r=this,n=r.constructor,i=r.c,s=(t=new n(t)).c,a=i.length,o=s.length,l=r.e,u=t.e;if(t.s=r.s==t.s?1:-1,!i[0]||!s[0])return t.c=[t.e=0],t;for(t.e=l+u,a<o&&(e=i,i=s,s=e,u=a,a=o,o=u),e=new Array(u=a+o);u--;)e[u]=0;for(l=o;l--;){for(o=0,u=a+l;u>l;)o=e[u]+s[l]*i[u-l-1]+o,e[u--]=o%10,o=o/10|0;e[u]=o}for(o?++t.e:e.shift(),l=e.length;!e[--l];)e.pop();return t.c=e,t};Q.toExponential=function(t,e){var r=this,n=r.c[0];if(t!==lt){if(t!==~~t||t<0||t>Kt)throw Error(ci);for(r=er(new r.constructor(r),++t,e);r.c.length<t;)r.c.push(0)}return tr(r,!0,!!n)};Q.toFixed=function(t,e){var r=this,n=r.c[0];if(t!==lt){if(t!==~~t||t<0||t>Kt)throw Error(ci);for(r=er(new r.constructor(r),t+r.e+1,e),t=t+r.e+1;r.c.length<t;)r.c.push(0)}return tr(r,!1,!!n)};Q[Symbol.for("nodejs.util.inspect.custom")]=Q.toJSON=Q.toString=function(){var t=this,e=t.constructor;return tr(t,t.e<=e.NE||t.e>=e.PE,!!t.c[0])};Q.toNumber=function(){var t=+tr(this,!0,!0);if(this.constructor.strict===!0&&!this.eq(t.toString()))throw Error(on+"Imprecise conversion");return t};Q.toPrecision=function(t,e){var r=this,n=r.constructor,i=r.c[0];if(t!==lt){if(t!==~~t||t<1||t>Kt)throw Error(Qt+"precision");for(r=er(new n(r),t,e);r.c.length<t;)r.c.push(0)}return tr(r,t<=r.e||r.e<=n.NE||r.e>=n.PE,!!i)};Q.valueOf=function(){var t=this,e=t.constructor;if(e.strict===!0)throw Error(on+"valueOf disallowed");return tr(t,t.e<=e.NE||t.e>=e.PE,!0)};var Rd=ol(),ll=Rd;var Zs={};go(Zs,{DecodeError:()=>Ie,Decoder:()=>et,EXT_TIMESTAMP:()=>qs,Encoder:()=>Tr,ExtData:()=>Qe,ExtensionCodec:()=>Ut,decode:()=>gl,decodeArrayStream:()=>yl,decodeAsync:()=>wl,decodeMulti:()=>bl,decodeMultiStream:()=>vl,decodeTimestampExtension:()=>Ws,decodeTimestampToTimeSpec:()=>Hs,encode:()=>pi,encodeDateToTimeSpec:()=>zs,encodeTimeSpecToTimestamp:()=>js,encodeTimestampExtension:()=>Vs});function ul(t){let e=t.length,r=0,n=0;for(;n<e;){let i=t.charCodeAt(n++);if((i&4294967168)===0){r++;continue}else if((i&4294965248)===0)r+=2;else{if(i>=55296&&i<=56319&&n<e){let s=t.charCodeAt(n);(s&64512)===56320&&(++n,i=((i&1023)<<10)+(s&1023)+65536)}(i&4294901760)===0?r+=3:r+=4}}return r}function Md(t,e,r){let n=t.length,i=r,s=0;for(;s<n;){let a=t.charCodeAt(s++);if((a&4294967168)===0){e[i++]=a;continue}else if((a&4294965248)===0)e[i++]=a>>6&31|192;else{if(a>=55296&&a<=56319&&s<n){let o=t.charCodeAt(s);(o&64512)===56320&&(++s,a=((a&1023)<<10)+(o&1023)+65536)}(a&4294901760)===0?(e[i++]=a>>12&15|224,e[i++]=a>>6&63|128):(e[i++]=a>>18&7|240,e[i++]=a>>12&63|128,e[i++]=a>>6&63|128)}e[i++]=a&63|128}}var Ld=new TextEncoder,Pd=50;function Ud(t,e,r){Ld.encodeInto(t,e.subarray(r))}function cl(t,e,r){t.length>Pd?Ud(t,e,r):Md(t,e,r)}var Fd=4096;function $s(t,e,r){let n=e,i=n+r,s=[],a="";for(;n<i;){let o=t[n++];if((o&128)===0)s.push(o);else if((o&224)===192){let l=t[n++]&63;s.push((o&31)<<6|l)}else if((o&240)===224){let l=t[n++]&63,u=t[n++]&63;s.push((o&31)<<12|l<<6|u)}else if((o&248)===240){let l=t[n++]&63,u=t[n++]&63,c=t[n++]&63,f=(o&7)<<18|l<<12|u<<6|c;f>65535&&(f-=65536,s.push(f>>>10&1023|55296),f=56320|f&1023),s.push(f)}else s.push(o);s.length>=Fd&&(a+=String.fromCharCode(...s),s.length=0)}return s.length>0&&(a+=String.fromCharCode(...s)),a}var $d=new TextDecoder,qd=200;function jd(t,e,r){let n=t.subarray(e,e+r);return $d.decode(n)}function fl(t,e,r){return r>qd?jd(t,e,r):$s(t,e,r)}var Qe=class{type;data;constructor(e,r){this.type=e,this.data=r}};var Ie=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 dl(t,e,r){let n=r/4294967296,i=r;t.setUint32(e,n),t.setUint32(e+4,i)}function fi(t,e,r){let n=Math.floor(r/4294967296),i=r;t.setUint32(e,n),t.setUint32(e+4,i)}function di(t,e){let r=t.getInt32(e),n=t.getUint32(e+4);return r*4294967296+n}function pl(t,e){let r=t.getUint32(e),n=t.getUint32(e+4);return r*4294967296+n}var qs=-1,zd=4294967296-1,Vd=17179869184-1;function js({sec:t,nsec:e}){if(t>=0&&e>=0&&t<=Vd)if(e===0&&t<=zd){let r=new Uint8Array(4);return new DataView(r.buffer).setUint32(0,t),r}else{let r=t/4294967296,n=t&4294967295,i=new Uint8Array(8),s=new DataView(i.buffer);return s.setUint32(0,e<<2|r&3),s.setUint32(4,n),i}else{let r=new Uint8Array(12),n=new DataView(r.buffer);return n.setUint32(0,e),fi(n,4,t),r}}function zs(t){let e=t.getTime(),r=Math.floor(e/1e3),n=(e-r*1e3)*1e6,i=Math.floor(n/1e9);return{sec:r+i,nsec:n-i*1e9}}function Vs(t){if(t instanceof Date){let e=zs(t);return js(e)}else return null}function Hs(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),i=(r&3)*4294967296+n,s=r>>>2;return{sec:i,nsec:s}}case 12:{let r=di(e,4),n=e.getUint32(0);return{sec:r,nsec:n}}default:throw new Ie(`Unrecognized data size for timestamp (expected 4, 8, or 12): ${t.length}`)}}function Ws(t){let e=Hs(t);return new Date(e.sec*1e3+e.nsec/1e6)}var ml={type:qs,encode:Vs,decode:Ws};var Ut=class t{static defaultCodec=new t;__brand;builtInEncoders=[];builtInDecoders=[];encoders=[];decoders=[];constructor(){this.register(ml)}register({type:e,encode:r,decode:n}){if(e>=0)this.encoders[e]=r,this.decoders[e]=n;else{let i=-1-e;this.builtInEncoders[i]=r,this.builtInDecoders[i]=n}}tryToEncode(e,r){for(let n=0;n<this.builtInEncoders.length;n++){let i=this.builtInEncoders[n];if(i!=null){let s=i(e,r);if(s!=null){let a=-1-n;return new Qe(a,s)}}}for(let n=0;n<this.encoders.length;n++){let i=this.encoders[n];if(i!=null){let s=i(e,r);if(s!=null){let a=n;return new Qe(a,s)}}}return e instanceof Qe?e:null}decode(e,r,n){let i=r<0?this.builtInDecoders[-1-r]:this.decoders[r];return i?i(e,r,n):new Qe(r,e)}};function Hd(t){return t instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer}function ln(t){return t instanceof Uint8Array?t:ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Hd(t)?new Uint8Array(t):Uint8Array.from(t)}var Wd=100,Gd=2048,Tr=class t{extensionCodec;context;useBigInt64;maxDepth;initialBufferSize;sortKeys;forceFloat32;ignoreUndefined;forceIntegerToFloat;pos;view;bytes;entered=!1;constructor(e){this.extensionCodec=e?.extensionCodec??Ut.defaultCodec,this.context=e?.context,this.useBigInt64=e?.useBigInt64??!1,this.maxDepth=e?.maxDepth??Wd,this.initialBufferSize=e?.initialBufferSize??Gd,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),i=new DataView(r);n.set(this.bytes),this.view=i,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=ul(e);this.ensureBufferSizeToWrite(5+n),this.writeStringHeader(n),cl(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=ln(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 i of e)this.doEncode(i,r+1)}countWithoutUndefined(e,r){let n=0;for(let i of r)e[i]!==void 0&&n++;return n}encodeMap(e,r){let n=Object.keys(e);this.sortKeys&&n.sort();let i=this.ignoreUndefined?this.countWithoutUndefined(e,n):n.length;if(i<16)this.writeU8(128+i);else if(i<65536)this.writeU8(222),this.writeU16(i);else if(i<4294967296)this.writeU8(223),this.writeU32(i);else throw new Error(`Too large map object: ${i}`);for(let s of n){let a=e[s];this.ignoreUndefined&&a===void 0||(this.encodeString(s),this.doEncode(a,r+1))}}encodeExtension(e){if(typeof e.data=="function"){let n=e.data(this.pos+6),i=n.length;if(i>=4294967296)throw new Error(`Too large extension object: ${i}`);this.writeU8(201),this.writeU32(i),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),dl(this.view,this.pos,e),this.pos+=8}writeI64(e){this.ensureBufferSizeToWrite(8),fi(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 pi(t,e){return new Tr(e).encodeSharedRef(t)}function mi(t){return`${t<0?"-":""}0x${Math.abs(t).toString(16).padStart(2,"0")}`}var Xd=16,Yd=16,hi=class{hit=0;miss=0;caches;maxKeyLength;maxLengthPerKey;constructor(e=Xd,r=Yd){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 i=this.caches[n-1];e:for(let s of i){let a=s.bytes;for(let o=0;o<n;o++)if(a[o]!==e[r+o])continue e;return s.str}return null}store(e,r){let n=this.caches[e.length-1],i={bytes:e,str:r};n.length>=this.maxLengthPerKey?n[Math.random()*n.length|0]=i:n.push(i)}decode(e,r,n){let i=this.find(e,r,n);if(i!=null)return this.hit++,i;this.miss++;let s=$s(e,r,n),a=Uint8Array.prototype.slice.call(e,r,r+n);return this.store(a,s),s}};var Gs="array",fn="map_key",_l="map_value",Zd=t=>{if(typeof t=="string"||typeof t=="number")return t;throw new Ie("The type of key must be string or number but "+typeof t)},Xs=class{stack=[];stackHeadPosition=-1;get length(){return this.stackHeadPosition+1}top(){return this.stack[this.stackHeadPosition]}pushArrayState(e){let r=this.getUninitializedStateFromPool();r.type=Gs,r.position=0,r.size=e,r.array=new Array(e)}pushMapState(e){let r=this.getUninitializedStateFromPool();r.type=fn,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===Gs){let n=e;n.size=0,n.array=void 0,n.position=0,n.type=void 0}if(e.type===fn||e.type===_l){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}},cn=-1,Ys=new DataView(new ArrayBuffer(0)),Jd=new Uint8Array(Ys.buffer);try{Ys.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 hl=new RangeError("Insufficient data"),Kd=new hi,et=class t{extensionCodec;context;useBigInt64;rawStrings;maxStrLength;maxBinLength;maxArrayLength;maxMapLength;maxExtLength;keyDecoder;mapKeyConverter;totalPos=0;pos=0;view=Ys;bytes=Jd;headByte=cn;stack=new Xs;entered=!1;constructor(e){this.extensionCodec=e?.extensionCodec??Ut.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:Kd,this.mapKeyConverter=e?.mapKeyConverter??Zd}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=cn,this.stack.reset()}setBuffer(e){let r=ln(e);this.bytes=r,this.view=new DataView(r.buffer,r.byteOffset,r.byteLength),this.pos=0}appendBuffer(e){if(this.headByte===cn&&!this.hasRemaining(1))this.setBuffer(e);else{let r=this.bytes.subarray(this.pos),n=ln(e),i=new Uint8Array(r.length+n.length);i.set(r),i.set(n,r.length),this.setBuffer(i)}}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(l){if(!(l instanceof RangeError))throw l}this.totalPos+=this.pos}if(r){if(this.hasRemaining(1))throw this.createExtraByteError(this.totalPos);return n}let{headByte:i,pos:s,totalPos:a}=this;throw new RangeError(`Insufficient data in parsing ${mi(i)} at ${a} (${s} 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,i=-1;for await(let s of e){if(r&&i===0)throw this.createExtraByteError(this.totalPos);this.appendBuffer(s),n&&(i=this.readArraySize(),n=!1,this.complete());try{for(;yield this.doDecodeSync(),--i!==0;);}catch(a){if(!(a instanceof RangeError))throw a}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 i=e-128;if(i!==0){this.pushMapState(i),this.complete();continue e}else r={}}else if(e<160){let i=e-144;if(i!==0){this.pushArrayState(i),this.complete();continue e}else r=[]}else{let i=e-160;r=this.decodeString(i,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 i=this.lookU8();r=this.decodeString(i,1)}else if(e===218){let i=this.lookU16();r=this.decodeString(i,2)}else if(e===219){let i=this.lookU32();r=this.decodeString(i,4)}else if(e===220){let i=this.readU16();if(i!==0){this.pushArrayState(i),this.complete();continue e}else r=[]}else if(e===221){let i=this.readU32();if(i!==0){this.pushArrayState(i),this.complete();continue e}else r=[]}else if(e===222){let i=this.readU16();if(i!==0){this.pushMapState(i),this.complete();continue e}else r={}}else if(e===223){let i=this.readU32();if(i!==0){this.pushMapState(i),this.complete();continue e}else r={}}else if(e===196){let i=this.lookU8();r=this.decodeBinary(i,1)}else if(e===197){let i=this.lookU16();r=this.decodeBinary(i,2)}else if(e===198){let i=this.lookU32();r=this.decodeBinary(i,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 i=this.lookU8();r=this.decodeExtension(i,1)}else if(e===200){let i=this.lookU16();r=this.decodeExtension(i,2)}else if(e===201){let i=this.lookU32();r=this.decodeExtension(i,4)}else throw new Ie(`Unrecognized type byte: ${mi(e)}`);this.complete();let n=this.stack;for(;n.length>0;){let i=n.top();if(i.type===Gs)if(i.array[i.position]=r,i.position++,i.position===i.size)r=i.array,n.release(i);else continue e;else if(i.type===fn){if(r==="__proto__")throw new Ie("The key __proto__ is not allowed");i.key=this.mapKeyConverter(r),i.type=_l;continue e}else if(i.map[i.key]=r,i.readCount++,i.readCount===i.size)r=i.map,n.release(i);else{i.key=null,i.type=fn;continue e}}return r}}readHeadByte(){return this.headByte===cn&&(this.headByte=this.readU8()),this.headByte}complete(){this.headByte=cn}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 Ie(`Unrecognized array type byte: ${mi(e)}`)}}}pushMapState(e){if(e>this.maxMapLength)throw new Ie(`Max length exceeded: map length (${e}) > maxMapLengthLength (${this.maxMapLength})`);this.stack.pushMapState(e)}pushArrayState(e){if(e>this.maxArrayLength)throw new Ie(`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 Ie(`Max length exceeded: UTF-8 byte length (${e}) > maxStrLength (${this.maxStrLength})`);if(this.bytes.byteLength<this.pos+r+e)throw hl;let n=this.pos+r,i;return this.stateIsMapKey()&&this.keyDecoder?.canBeCached(e)?i=this.keyDecoder.decode(this.bytes,n,e):i=fl(this.bytes,n,e),this.pos+=r+e,i}stateIsMapKey(){return this.stack.length>0?this.stack.top().type===fn:!1}decodeBinary(e,r){if(e>this.maxBinLength)throw new Ie(`Max length exceeded: bin length (${e}) > maxBinLength (${this.maxBinLength})`);if(!this.hasRemaining(e+r))throw hl;let n=this.pos+r,i=this.bytes.subarray(n,n+e);return this.pos+=r+e,i}decodeExtension(e,r){if(e>this.maxExtLength)throw new Ie(`Max length exceeded: ext length (${e}) > maxExtLength (${this.maxExtLength})`);let n=this.view.getInt8(this.pos+r),i=this.decodeBinary(e,r+1);return this.extensionCodec.decode(i,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=pl(this.view,this.pos);return this.pos+=8,e}readI64(){let e=di(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 gl(t,e){return new et(e).decode(t)}function bl(t,e){return new et(e).decodeMulti(t)}function Qd(t){return t[Symbol.asyncIterator]!=null}async function*ep(t){let e=t.getReader();try{for(;;){let{done:r,value:n}=await e.read();if(r)return;yield n}}finally{e.releaseLock()}}function _i(t){return Qd(t)?t:ep(t)}async function wl(t,e){let r=_i(t);return new et(e).decodeAsync(r)}function yl(t,e){let r=_i(t);return new et(e).decodeArrayStream(r)}function vl(t,e){let r=_i(t);return new et(e).decodeStream(r)}var Mi=bo(ba(),1),wa=il,ya=ll,dt=Zs,Du=Mi.DOMParser,xu=Mi.XMLSerializer;var Su=dt!==null;function Cu(){if(!Su)throw new Error("@msgpack/msgpack is required for MessagePack support. Install with: npm install @msgpack/msgpack")}var Nu=Qm();function Qm(){if(!Su)return null;let t=new TextEncoder,e=new TextDecoder,r=new dt.ExtensionCodec;return r.register({type:-1,encode:n=>{if(n instanceof Date){let i=ar(n);if(i==="D"||i==="H")return null}return dt.encodeTimestampExtension(n)},decode:n=>dt.decodeTimestampExtension(n)}),r.register({type:1,encode:n=>Ze(n)?t.encode(n.toString()):null,decode:n=>Li(e.decode(n))}),r.register({type:2,encode:n=>{if(n instanceof Date&&ar(n)==="D"){let i=n.getUTCFullYear(),s=String(n.getUTCMonth()+1).padStart(2,"0"),a=String(n.getUTCDate()).padStart(2,"0");return t.encode(`${i}-${s}-${a}`)}return null},decode:n=>new Date(e.decode(n)+"T00:00:00.000Z")}),r.register({type:3,encode:n=>{if(n instanceof Date&&ar(n)==="H"){let i=String(n.getUTCHours()).padStart(2,"0"),s=String(n.getUTCMinutes()).padStart(2,"0"),a=String(n.getUTCSeconds()).padStart(2,"0"),o=String(n.getUTCMilliseconds()).padStart(3,"0");return t.encode(`${i}:${s}:${a}.${o}`)}return null},decode:n=>{let i=e.decode(n),s=i.indexOf("."),a=s>=0?i.substring(0,s):i,o=s>=0?i.substring(s+1):"0",[l,u,c]=a.split(":"),f=Math.round(+o.substring(0,3));return new Date(Date.UTC(1970,0,1,+l,+u,+c,f))}}),r.register({type:4,encode:n=>{let i=va(n);if(i!==null){let[s,a]=i;return t.encode(`${s}:${a(n)}`)}return null},decode:n=>{let i=e.decode(n),s=i.indexOf(":"),a=i.slice(0,s),o=i.slice(s+1),l=Ht[a];if(l!==void 0){let[,u]=l;return u(o)}return`${o}::${a}`}}),r}function Ou(t){return Cu(),dt.encode(t,{extensionCodec:Nu})}function Iu(t){return Cu(),dt.decode(t,{extensionCodec:Nu})}function Ui(t,e=!1){let r=Fi(t);if(r===null)return[!1,String(t)];let[n,i,s]=r;return s&&!e?[!1,String(t)]:[!0,`${i(t)}::${n}`]}function Ea(t){if(!t.includes("::"))return[!1,t];let e=t.lastIndexOf("::"),r=t.slice(0,e),n=t.slice(e+2),i=Ht[n];if(i===void 0)return[!1,t];let[,s]=i;return[!0,s(r)]}function Pi(t,e,r){if(t!==null&&typeof t=="object"&&!Array.isArray(t)){let n={};for(let[i,s]of Object.entries(t))n[i]=Pi(s,e,r);return n}return Array.isArray(t)?t.map(n=>Pi(n,e,r)):r(t)?e(t):t}function ka(t){let e=Fi(t);if(e!==null){let[r,n,i]=e;return i?[t,!1]:[`${n(t)}::${r}`,!0]}if(Array.isArray(t)){let r=!1;return[t.map(i=>{let[s,a]=ka(i);return a&&(r=!0),s}),r]}if(t!==null&&typeof t=="object"){let r=!1,n={};for(let[i,s]of Object.entries(t)){let[a,o]=ka(s);o&&(r=!0),n[i]=a}return[n,r]}return[t,!1]}function eh(t,e=!1){let[r,n]=Ui(t,e);if(r)return n;let[i,s]=ka(t),a=JSON.stringify(i);return s?`${a}::JS`:a}function th(t){return JSON.stringify(t)}function rh(t){if(!dt)throw new Error("@msgpack/msgpack is required for MessagePack support");return dt.encode(t)}function We(t,e=null,{raw:r=!1,qs:n=!1,_forceSuffix:i=!1}={}){if(n)return`${Ru(t)}::QS`;if(r){if(e===null||e==="json")return th(t);if(e==="msgpack")return rh(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 s=eh(t,i);return e==="json"?`"${s}"`:s}else{if(e==="xml")return`<?xml version="1.0" ?><tytx_root>${Bu(t)}</tytx_root>`;if(e==="msgpack")return Ou(t);throw new Error(`Unknown transport: ${e}`)}}var Vr,Aa;typeof window<"u"&&window.DOMParser?(Vr=window.DOMParser,Aa=window.XMLSerializer):(Vr=Du,Aa=xu);function Mu(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 Lu(t,e,r){let n=t.createElement(e),i=r.attrs||{},s=r.value;for(let[a,o]of Object.entries(i))n.setAttribute(a,We(o,null,{_forceSuffix:!0}));if(Array.isArray(s))for(let a of s)if(Mu(a)){let[o]=Object.keys(a),l=a[o],u=Lu(t,o,l);n.appendChild(u)}else{n.textContent=We(s);break}else n.textContent=We(s);return n}function Bu(t){if(!Vr)throw new Error("XML support requires @xmldom/xmldom package in Node.js");if(Mu(t)){let[e]=Object.keys(t),r=t[e],n=new Vr().parseFromString("<root/>","text/xml"),i=Lu(n,e,r);return new Aa().serializeToString(i)}else return We(t)}function Ta(t){let e={};for(let n=0;n<t.attributes.length;n++){let i=t.attributes[n];e[i.name]=we(i.value)}let r=[];for(let n=0;n<t.childNodes.length;n++){let i=t.childNodes[n];i.nodeType===1&&r.push(i)}if(r.length>0)if(r.length===1){let n=r[0],i=Ta(n);return{attrs:e,value:{[n.tagName]:i}}}else{let n=[];for(let i of r){let s=Ta(i);n.push({[i.tagName]:s})}return{attrs:e,value:n}}return{attrs:e,value:we(t.textContent)}}function Pu(t){if(!Vr)throw new Error("XML support requires @xmldom/xmldom package in Node.js");let n=new Vr().parseFromString(t,"text/xml").documentElement;if(n.tagName==="tytx_root"){let s=null;for(let a=0;a<n.childNodes.length;a++)if(n.childNodes[a].nodeType===1){s=n.childNodes[a];break}if(!s)return we(n.textContent);n=s}let i=Ta(n);return{[n.tagName]:i}}function nh(t){return typeof t=="string"}function ih(t){let[e,r]=Ea(t);if(e)return r;let n=t;n.endsWith("::JS")&&(n=n.slice(0,-4));let i;try{i=JSON.parse(n)}catch{return t}return Pi(i,sh,nh)}function sh(t){return t.includes("::")?Ea(t)[1]:t}function ah(t){let e=Pu(t);return typeof e=="string"?we(e):e}function oh(t){return Iu(t)}function we(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)),ih(r)}else{if(e==="xml")return ah(t);if(e==="msgpack")return oh(t);throw new Error(`Unknown transport: ${e}`)}}function Ru(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[i,s]=Ui(n,!0);i?e.push(`${r}=${s}`):e.push(`${r}=${n}`)}return e.join("&")}throw new TypeError(`toQs expects object or array, got ${typeof t}`)}function Uu(t){if(!t)return[];let e=t.split("&"),r=e.map(a=>a.includes("=")),n=r.every(Boolean),i=!r.some(Boolean);if(!n&&!i)throw new Error("QS format error: mixed items with and without '='");if(i)return e.map(a=>we(a));let s={};for(let a of e){let o=a.indexOf("="),l=a.slice(0,o),u=a.slice(o+1);s[l]=we(u)}return s}var $u=wa||ya||Number,lh=wa?"decimal.js":ya?"big.js":"number";function Li(t){return new $u(t)}function Ze(t){return lh==="number"?!1:t instanceof $u}function ar(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 uh(t){return t.toString()}function ch(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 fh(t){return t.toISOString()}function dh(t){let e=String(t.getUTCHours()).padStart(2,"0"),r=String(t.getUTCMinutes()).padStart(2,"0"),n=String(t.getUTCSeconds()).padStart(2,"0"),i=String(t.getUTCMilliseconds()).padStart(3,"0");return`${e}:${r}:${n}.${i}`}function ph(t){return t?"true":"false"}function mh(t){return t.toString()}function hh(t){return t.toString()}function _h(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 $i=[],Da=new Map;function va(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,i,s]of $i)if(r.prototype===e)return[n,i,s];return null}function Fi(t){if(t===null)return["NN",()=>"",!0];if(Ze(t))return["N",uh,!1];if(t instanceof Uint8Array)return["RAW",_h,!1];if(t instanceof Date){let e=ar(t);return e==="D"?["D",ch,!1]:e==="H"?["H",dh,!1]:["DHZ",fh,!1]}return typeof t=="boolean"?["B",ph,!0]:typeof t=="number"?Number.isInteger(t)?["L",mh,!0]:["R",hh,!0]:va(t)}function gh(t){return Li(t)}function bh(t){let[e,r,n]=t.split("-").map(Number);return new Date(Date.UTC(e,r-1,n,0,0,0,0))}function Fu(t){return new Date(t)}function wh(t){let[e,r,n]=t.split(":"),[i,s]=n.split(".");return new Date(Date.UTC(1970,0,1,Number(e),Number(r),Number(i),Number(s||0)))}function yh(t){return t.toLowerCase()==="true"}function vh(t){return parseInt(t,10)}function Eh(t){return parseFloat(t)}function kh(t){return t}function Ah(t){return null}var Th=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/;function Dh(t){if(!Th.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 xh(t){return Uu(t)}var Sh=/^[A-Z]+$/,Ht={N:[Object,gh],D:[Date,bh],DH:[Date,Fu],DHZ:[Date,Fu],H:[Date,wh],L:[Number,vh],R:[Number,Eh],T:[String,kh],B:[Boolean,yh],QS:[Object,xh],NN:[null,Ah],RAW:[Uint8Array,Dh]};function On(t){return Object.hasOwn(Ht,t)?Ht[t][0]:null}function xa(t,e,r,n,i=!1){if(typeof e!="string"||!Sh.test(e))throw new Error(`TYTX suffix '${e}' is invalid: expected uppercase ASCII letters only`);let s=Ht[e];if(s!==void 0&&s[0]!==t){let a=s[0]===null?"null":s[0].name;throw new Error(`TYTX suffix '${e}' is already registered for ${a}`)}$i=$i.filter(([a])=>a!==t),$i.push([t,e,r,i]),Ht[e]=[t,n]}function In(t,e){Da.set(t,e)}function kt(t){return Da.has(t)?Da.get(t):{}}var qu={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 Nh(t){let e=t._retryPolicy;return e==null?null:typeof e=="string"?qu[e]||null:e}function Oh(t,e){return e.some(r=>r==="Error"?!0:t.name===r||t.constructor.name===r)}function Ih(t){return new Promise(e=>setTimeout(e,t))}async function Bh(t,e){if(!e)return t();let r=e.maxAttempts||3,n=e.delay||1,i=e.backoff||2,s=e.jitter!==!1,a=e.on||["Error"],o=null,l=n*1e3;for(let u=0;u<r;u++)try{let c=t();return c instanceof Promise?await c:c}catch(c){if(o=c,u<r-1&&Oh(c,a)){let f=l;s&&(f*=1+Math.random()*.1),await Ih(f),l*=i}else throw c}throw o}var ye=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 s of["interval","reactive"])if(Object.hasOwn(n,s))throw new TypeError(`Removed resolver option: ${s}. 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 i=this.constructor.internalParams;for(let[s,a]of Object.entries(n))i.has(s)||(this._kw[s]=a);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 i={...this._kw};if(this._node&&this._node.attr){let u=this.constructor.internalParams;for(let[c,f]of Object.entries(this._node.attr))u.has(c)||(i[c]=f)}Object.assign(i,n);let s=this._computeEffectiveFingerprint(i);if(s===this._lastEffectiveFingerprint&&!this.expired)return this.cachedValue;this._lastEffectiveFingerprint=s;let a=Nh(this),o=()=>this.load(i);if(a)return Bh(o,a).then(u=>this._finalize(u));let l=o();return l&&typeof l.then=="function"?l.then(u=>this._finalize(u)):this._finalize(l)}_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}};ye._BagClass=null;var Bn=class extends ye{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 At=class t{constructor(e,r,n=null,i=null,s=null,a=null,o=null,l=!0){this.label=r,this._value=null,this._attr={},this._parentBag=null,this._resolver=null,this._nodeSubscribers={},this._onChangedValue=null,this.nodeTag=a,this.xmlTag=o,this._compiled=null,this.parentBag=e,i&&this.setAttr(i,!1,!0,l),n!==null&&this.setValue(n,!1),s&&(this.resolver=s)}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 i=we(`${r}::QS`);if(Array.isArray(i)){let s=i.length?i:Object.keys(this._attr),a=s.map(l=>{let u=this.getAttr(l);return!e&&u instanceof ye?u.resolve():u}),o=l=>i.length===0?Object.fromEntries(s.map((u,c)=>[u,l[c]])):l.length===1?l[0]:l;return a.some(l=>l&&typeof l.then=="function")?Promise.all(a).then(o):o(a)}else{if(!this._resolver)throw new Error("Cannot use kwargs syntax without resolver");n={...n,...i}}}return this._resolver!==null?this._resolver.resolve({static:e,...n}):this._value}setValue(e,r=!0,n=null,i=null,s=!0,a=null,o=!1){e instanceof ye?(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 l=this._value;l!==e&&l?.parentNode===this&&l.setBackref(),this._value=e;let u=l!==this._value,c=r??!0,f=null;if(n!==null){let h={...this._attr};this.setAttr(n,!1,i,s);let _=this._buildAttrDiff(h,this._attr);f=Object.keys(_).length>0?_:null}r=c&&(u||f!==null);let p=f?u?"upd_value_attr":"upd_attrs":"upd_value";if(this._onChangedValue&&this._onChangedValue(this,e,l,c),r){let h=f!==null?{oldvalue:l,attrs_diff:f}:{oldvalue:l};for(let _ of Object.values(this._nodeSubscribers))_({node:this,info:h,evt:p})}this._parentBag!==null&&this._parentBag.backref&&(e&&typeof e._htraverse=="function"&&e.setBackref(this,this._parentBag),r&&this._parentBag._onNodeChanged(this,[this.label],p,l,f,a,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 i=this._value,s={...this._attr},a=this.resolver;a&&a._node===this&&(a._node=null),this.resolver=n,this.setValue(r,!1,{...e.attr},!1,!1,null);let o=this._buildAttrDiff(s,this._attr),l=Object.keys(o).length?o:null,u=i!==r||a!==n;if(u||l){let c=l?u?"upd_value_attr":"upd_attrs":"upd_value",f=l?{oldvalue:i,attrs_diff:l}:{oldvalue:i};for(let p of Object.values(this._nodeSubscribers))p({node:this,info:f,evt:c});this._parentBag!==null&&this._parentBag.backref&&this._parentBag._onNodeChanged(this,[this.label],c,i,l)}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={},i=new Set([...Object.keys(e),...Object.keys(r)]);for(let s of i){let a=s in e?e[s]:null,o=s in r?r[s]:null;a!==o&&(n[s]={old:a,new:o})}return n}setAttr(e=null,r=!0,n=!0,i=!0){let s=e||{},a=Object.keys(this._nodeSubscribers).length>0,l=r&&(a||this._parentBag!==null&&this._parentBag.backref)?{...this._attr}:null;if(n?Object.assign(this._attr,s):this._attr={...s},i)for(let u of Object.keys(this._attr))this._attr[u]===null&&delete this._attr[u];if(r&&l!==null){let u=this._buildAttrDiff(l,this._attr);if(Object.keys(u).length>0&&a)for(let c of Object.values(this._nodeSubscribers))c({node:this,info:{attrs_diff:u},evt:"upd_attrs"});if(Object.keys(u).length>0&&this._parentBag!==null&&this._parentBag.backref){let c=r===!0?"true":String(r);this._parentBag._onNodeChanged(this,[this.label],"upd_attrs",null,u,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 i of r)if(this._attr[i]!==e._attr[i])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(i=>this._attr[i]!==e._attr[i])?`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 Rn=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,i]=r,s=i.includes("::")?we(i):i;return n?this._list.findIndex(a=>a.getAttr(n)===s):this._list.findIndex(a=>a._value===s)}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 s=this._parseSharpIndex(n.slice(1),e);return Math.min(s,r)}let i=this.index(n);if(i<0)throw new Error(`Invalid node_position '${e}': label '${n}' not found`);return i}if(e.startsWith(">")){let n=e.slice(1);if(n.startsWith("#")){let s=this._parseSharpIndex(n.slice(1),e);return Math.min(s+1,r)}let i=this.index(n);if(i<0)throw new Error(`Invalid node_position '${e}': label '${n}' not found`);return i+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=">",i=null,s=null,a=null,o=!1,l=!0,u=null,c=!0,f=!1,p=null){let h=null;if(e.includes("?")&&([e,h]=e.split("?",2)),e==null||e.startsWith("#"))throw new Error("Cannot create new node with #n syntax");if(h){let g=h.split("&");if(g.length===1)i={[g[0]]:r};else{if(!Array.isArray(r)||r.length!==g.length)throw new Error("Wrong attributes assignment");i={};for(let b=0;b<g.length;b++)i[g[b]]=r[b]}r=null}let _=this._dict[e];if(_)p&&(_.nodeTag=p),a!==null&&(a===!1?_.resolver=null:_.resolver=a),h?_.setAttr(i,c,!0,l):_.setValue(r,c,i,o,l,u,f);else{let g=s&&s.nodeClass?s.nodeClass:At;_=new g(s,e,h?null:r,i,a,p,null,l);let b=this._parsePosition(n);this._dict[e]=_,this._list.splice(b,0,_),c&&s&&s.backref&&s._onNodeInserted(_,b,null,u,f)}return f&&_.setValue(null,!1),_}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 i=Array.isArray(e)?e:[e];if(i.length===0||r>=this._list.length)return;let s=this._list[r].label;if(i.length>1){let a=[...i].sort((c,f)=>c-f),o=a[0]<r?1:0,l=[];for(let c=a.length-1;c>=0;c--){let f=a[c];if(f>=0&&f<this._list.length){let p=this._list[f];this._list.splice(f,1),l.push(p),n&&this._parentBag&&this._parentBag.backref&&this._parentBag._onNodeDeleted(p,f)}}let u=this.index(s);u<0&&(u=this._list.length),u+=o;for(let c of l)this._list.splice(u,0,c),n&&this._parentBag&&this._parentBag.backref&&this._parentBag._onNodeInserted(c,u)}else{let a=i[0];if(a===r||a<0||a>=this._list.length)return;let o=this._list[a];this._list.splice(a,1),n&&this._parentBag&&this._parentBag.backref&&this._parentBag._onNodeDeleted(o,a),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],i=e._list[r];if(!n.isEqual(i))return!1}return!0}};var Hu=bo(ba(),1);var Sa="::RSLV:",Rh=new Map,Mh=new Map,qi=new WeakMap,pe=class extends Error{constructor(e){super(e),this.name="BagSerializationError"}},Mn=class extends ye{constructor(e){super({asBag:!1}),qi.set(this,e)}get payload(){return qi.get(this)}load(){throw new pe("This resolver is opaque; local execution is unavailable")}};function ju(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 pe("Invalid resolver description")}function zu(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 pe("Resolver parameters must be JSON data; callbacks cannot travel");e.add(t);for(let r of Object.values(t))zu(r,e);e.delete(t)}}function Ln(t){if(qi.has(t))return qi.get(t);let e=Mh.get(t.constructor);if(!e)throw new pe(`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 ju(n),zu(n),Sa+JSON.stringify(n)}function ji(t){if(typeof t!="string"||!t.startsWith(Sa))return null;let e=t.slice(Sa.length);if(/^[A-Za-z0-9_-]+\.[A-Za-z0-9_-]*\.[A-Za-z0-9_-]+$/.test(e))return new Mn(t);let r;try{r=JSON.parse(e)}catch{throw new pe("Invalid resolver JSON or signed token")}ju(r);let n=Rh.get(JSON.stringify([r.resolver_module,r.resolver_class]));if(!n)return new Mn(t);let i=n.decode({args:r.args??[],kwargs:r.kwargs});if(!(i instanceof n.cls))throw new pe("Resolver decoder returned an incompatible instance");return i}function zi(t){return Object.fromEntries(Object.entries(t||{}).map(([e,r])=>[e,r instanceof ye?Ln(r):r]))}function Ca(t){return Object.fromEntries(Object.entries(t||{}).map(([e,r])=>[e,ji(r)??r]))}var tt="__cls";function Hr(t,e){return t!==null&&t.tytxSuffix===e?t:On(e)}function Lh(t){let e=t.tytxSuffix,r=Object.entries(kt(e)).filter(([,n])=>n===t).map(([n])=>n);if(r.length===0)throw new pe(`${t.name} is not in the TYTX subtype dictionary of '${e}'`);if(r.length>1)throw new pe(`${t.name} is in the TYTX subtype dictionary of '${e}' under several names: ${r.sort().join(", ")}`);return r[0]}function Na(t,e){let r=kt(t);if(!Object.hasOwn(r,e))throw new pe(`Unknown Bag class '${e}' for TYTX type '${t}'`);return r[e]}function Oa(t,e){return t===e?null:Lh(t)}function*Wu(t,e=[]){for(let r of t){let n=[...e,r.label];yield[n,r];let i=r.getValue(!0);!r.resolver&&i instanceof Ee&&(yield*Wu(i,n))}}function Ph(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 i=e.replace(/\.000Z$/,"Z");return r&&!n?i.slice(i.indexOf("T")+1):i}function Wr(t){if(t===null||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null}function Wt(t){return typeof t=="string"?t.includes("::")?`${t}::T`:t:Array.isArray(t)?t.map(Wt):Wr(t)?Object.fromEntries(Object.entries(t).map(([e,r])=>[e,Wt(r)])):t}function Ia(t){if(!Wr(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 Vu=!1,Ee=class t{static tytxSuffix="X";constructor(e=null,r={}){this._nodes=new Rn,this._backref=!1,this._parent=null,this._parentNode=null,this._rootAttributes=null,this._updSubscribers={},this._insSubscribers={},this._delSubscribers={},Ia(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 At}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(i=>i)):n=[...e];n.length&&n[0]==="#parent"&&r!==null;)n.shift(),r=r.parent;return[r,n]}_htraverse(e,r=!1,n=!0){let[i,s]=this._htraverseBefore(e);if(i===null)return[null,null];if(s.length===0)return[i,""];for(;s.length>1&&i instanceof t;){let a=s[0];if(a==="#parent"){if(i.parent===null||i.parent===void 0)break;s.shift(),i=i.parent;continue}let o=i._nodes.get(a);if(!o)break;let l=o.getValue(n);if(l instanceof t)s.shift(),i=l;else if(r){let u=i.createChildBag();o.setValue(u,!0,null,!0,!0,"autocreate"),s.shift(),i=u}else break}if(!r)return s.length>1?[null,null]:[i,s[0]];for(;s.length>1;){let a=s.shift();if(a.startsWith("#"))throw new Pn("Not existing index in #n syntax");let o=i.createChildBag();i._nodes.set(a,o,">",null,i,null,!1,!0,"autocreate"),i=o}return[i,s[0]]}get(e,r=null,n=!0,i={}){if(!e)return this;if(e==="#parent")return this.parent;let s=null;e.includes("?")&&([e,s]=e.split("?",2));let a=this._nodes.get(e);return a?a.getValue(n,s,i):r}getItem(e,r=null,n=!1,i={}){if(!e)return this;let[s,a]=this._htraverse(e,!1,n);return s instanceof t?s.get(a,r,n,i):r}setItem(e,r,n=null,i=">",s=!1,a=!0,o=null,l=!1,u=!0,c=null,f=null){if(e==="")throw new RangeError("setItem requires a non-empty path");let[p,h]=this._htraverse(e,!0);return p._nodes.set(h,r,i,n,p,c,s,a,o,u,l,f)}_pop(e,r=null){let n=this._nodes.index(e);if(n>=0){let i=this._nodes.pop(n);return this.backref&&this._onNodeDeleted(i,n,null,r),i}return null}pop(e,r=null,n=null){let i=this.popNode(e,n);return i?i.value:r}delItem(e,r=null,n=null){return this.pop(e,r,n)}popNode(e,r=null){let[n,i]=this._htraverse(e,!1,!0);if(!n||!i)return null;let s=n._nodes.get(i);if(!s)return null;try{return n._pop(i,r)}finally{s.parentBag===n&&n._nodes._dict[s.label]!==s&&(s.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,i=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[s,a]=this._htraverse(e,n,r);if(s instanceof t&&a){let o=s._nodes.get(a);if(o)return o;if(n)return s._nodes.set(a,i,">",null,s,null,!1,!0,"autocreate"),s._nodes.get(a)}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 i of this)i.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,i=null,s=null,a=null,o=!1){for(let l of Object.values(this._updSubscribers))l({node:e,pathlist:r,oldvalue:i,attrs_diff:s,evt:n,reason:a,fired:o});this._parent&&this._parentNode&&this._parent._onNodeChanged(e,[this._parentNode.label,...r],n,i,s,a,o)}_onNodeInserted(e,r,n=null,i=null,s=!1){let a=e.parentBag,o=e.getValue(!0);a!==null&&a.backref&&o instanceof t&&o.setBackref(e,a),n===null&&(n=[]);for(let l of Object.values(this._insSubscribers))l({node:e,pathlist:n,ind:r,evt:"ins",reason:i,fired:s});this._parent&&this._parentNode&&this._parent._onNodeInserted(e,r,[this._parentNode.label,...n],i,s)}_onNodeDeleted(e,r,n=null,i=null){for(let s of Object.values(this._delSubscribers))s({node:e,pathlist:n,ind:r,evt:"del",reason:i});this._parent&&this._parentNode&&(n===null&&(n=[]),this._parent._onNodeDeleted(e,r,[this._parentNode.label,...n],i))}_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:i=null,delete:s=null,any:a=null}=r;this.backref||this.setBackref(),this._subscribe(e,this._updSubscribers,n||a),this._subscribe(e,this._insSubscribers,i||a),this._subscribe(e,this._delSubscribers,s||a)}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:i=!1,delete:s=!1,any:a=!1}=r;(n||a)&&delete this._updSubscribers[e],(i||a)&&delete this._insSubscribers[e],(s||a)&&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 i=t.prototype.getNode.call(this,e,!0,!0);i&&i.setAttr(r,!0,!0,n)}getAttr(e=null,r=null,n=null){let i=this.getNode(e);return i?i.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 i=n.value;if(i instanceof t){if(i.getItem(e)===r)return n}else if(i&&i.get&&i.get(e)===r)return n}return null}getNodeByAttr(e,r,n=!1,i=!1){let s=r===void 0,a=n&&typeof r=="string"?r.toLowerCase():r,o=l=>{let u=[];for(let c of l._nodes){if(e in c.attr){let f=n&&typeof c.attr[e]=="string"?c.attr[e].toLowerCase():c.attr[e];if(s||f==a)return c}if(c._value instanceof t)if(i){let f=o(c._value);if(f)return f}else u.push(c._value)}for(let c of u){let f=o(c);if(f)return f}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 i=n.getValue(!0);if(i!=null&&!(e&&i===0)&&!(r&&i===""))return!1}return!0}query(e=null,r=null,n=!1,i=!1,s=!0,a=!0,o=null,l=!0){e||(e="#k,#v,#a");let u=this,c;if(typeof e=="string"){if(e.includes(":")){let[h,_]=e.split(":");u=this.getItem(h),e=_}c=e.split(",").map(h=>h.trim())}else c=e;let f=(h,_,g,b,k)=>{if(_==="#k")return h.label;if(_==="#p")return g;if(_==="#n")return h;if(typeof _=="function")return _(h);if(_==="#v"){let T=k();return b&&T instanceof t?null:T}else if(_.startsWith("#v.")){let T=_.split(".").slice(1).join("."),A=k();return A&&A.getItem?A.getItem(T):null}else{if(_==="#__v")return h.getValue(!0);if(_.startsWith("#a")){let T=_.includes(".")?_.split(".").slice(1).join("."):null;return h.getAttr(T)}else{let T=k();return T&&T.getItem?T.getItem(_):null}}};function*p(){let h=0;function*_(g,b){for(let k of g._nodes){let T=b?`${b}.${k.label}`:k.label,A=!1,S,B=()=>(A||(S=k.getValue(l),A=!0),S);if((s&&a||(B()instanceof t?a:s))&&(r===null||r(k))&&(yield c.length===1?f(k,c[0],T,i,B):c.map(j=>f(k,j,T,i,B)),h++,o!==null&&h>=o))return;if(i){let j=B();if(j instanceof t&&(yield*_(j,T),o!==null&&h>=o))return}}}yield*_(u,"")}return n?p():[...p()]}getLeaves(){let e=[],r=(n,i)=>{for(let s of n._nodes){let a=i?`${i}.${s.label}`:s.label,o=s.getValue(!1);o instanceof t?r(o,a):e.push([a,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 i=this.query(e,r,!1,!1,!0,!0,null,!1);if(n){if(!i||i.length===0)return(typeof e=="string"?e:"#k,#v,#a").split(",").map(l=>l.trim()).map(()=>[]);let s=[...i];if(s.length&&Array.isArray(s[0])){let a=s[0].length,o=[];for(let l=0;l<a;l++)o.push(s.map(u=>u[l]));return o}return[s]}return[...i]}columns(e,r=!1){typeof e=="string"&&(e=e.split(","));let n=r?"#a.":"",i=e.map(s=>`${n}${s}`).join(",");return this.digest(i,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 i=s=>{let a=0,o=!1;for(let l of this.query(s,n)){if(l==null||l===""){o=!0;continue}if(typeof l!="number"&&typeof l!="boolean"){if(r)throw new TypeError(`sum encountered non-numeric value: ${typeof l}`);continue}a+=l}return r&&o?null:a};return e.includes(",")?e.split(",").map(s=>i(s.trim())):i(e)}sort(e="#k:a"){let r=(i,s)=>i==null?[-1,""]:s&&typeof i=="string"?[0,i.toLowerCase()]:[0,i],n=(i,s)=>i[0]!==s[0]?i[0]-s[0]:i[1]<s[1]?-1:i[1]>s[1]?1:0;if(typeof e=="function")this._nodes._list.sort((i,s)=>{let a=e(i),o=e(s);return a<o?-1:a>o?1:0});else{let i=e.split(",");i.reverse();for(let s of i){let a,o;s.includes(":")?[a,o]=s.split(":",2):(a=s,o="a"),a=a.trim(),o=o.trim();let l=o==="d"||o==="D",u=o==="a"||o==="d",c;if(a.toLowerCase()==="#k")c=f=>r(f.label,u);else if(a.toLowerCase()==="#v")c=f=>r(f.value,u);else if(a.toLowerCase().startsWith("#a.")){let f=a.slice(3);c=p=>r(p.getAttr(f),u)}else c=f=>{let p=f.value,h=p instanceof t?p.getItem(a):p?p[a]:null;return r(h,u)};this._nodes._list.sort((f,p)=>{let h=n(c(f),c(p));return l?-h:h})}}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(i=>i 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 i=new Bn({callback:r,...n});this.setResolver(e,i)}move(e,r,n=!0){this._nodes.move(e,r,n)}asDict(e=!1,r=!1,n=!1,i=!1){let s={};for(let a of this._nodes){let o=a.value;if(i&&o==null)continue;let l=a.label;e&&(l=String(l)),r&&(l=l.toLowerCase()),n&&o instanceof t&&(o=t.prototype.asDict.call(o,e,r,n,i)),Object.defineProperty(s,l,{value:o,enumerable:!0,writable:!0,configurable:!0})}return s}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 i=n.getValue(!e);i instanceof t&&(i=i.deepcopy(e));let s=new r.nodeClass(r,n.label,i);s.setAttr({...n.attr},!1,!1,!1),s.nodeTag=n.nodeTag,s.xmlTag=n.xmlTag,r._nodes._list.push(s),r._nodes._dict[s.label]=s}return r}update(e,r=null,n=null,i=!1){if(!(e instanceof t)){for(let s in e){let a=e[s];(!i||a!==null||!this._nodes.has(s))&&this.setItem(s,a,null,">",!1,!1,n,!1,n!==!1)}return}for(let s of[...e]){let a=s.label,o=r==="static"?s.resolver:null,l=o?null:s.getValue(),u=s.attr.__replace;delete s.attr.__replace;let c=this._nodes.get(a);if(c)if(c.setAttr(s.attr,n===null?!0:n,!0,!1),s.nodeTag!=null&&(c.nodeTag=s.nodeTag),s.xmlTag!=null&&(c.xmlTag=s.xmlTag),o)c.resolver=o,c.setValue(null,n===null?!0:n,null,null,!1,n);else{s.resolver&&(c.resolver=null);let f=c.getValue();l instanceof t&&f instanceof t&&!u?f.update(l,r,n,i):(!i||l!==null)&&c.setValue(l,n===null?!0:n,null,null,!1,n)}else{let f=this.setItem(a,o||l,s.attr,">",!1,!1,n,!1,n!==!1);f.nodeTag=s.nodeTag,f.xmlTag=s.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,i=null,s=null){if(typeof e!="string")throw new TypeError("Bag labels must be strings");let a=new this.nodeClass(this,e,null,n,i,s,null,!1);return r instanceof ye?a.resolver=r:a._value=r,this._nodes._dict[e]=a,this._nodes._list.push(a),a}fillFrom(e=null,r={}){let n=Ia(r);if(e!=null&&!Wr(e)&&!Array.isArray(e))throw new TypeError("Bag source must be a dictionary, array or null");let i=this.createChildBag(),s=new Set,a=(o,l,u)=>{if(s.has(l))throw new TypeError(`Cyclic Bag source at ${u}`);s.add(l);try{let c=Array.isArray(l)?String(l.length).length+1:0,f=Array.isArray(l)?Array.from(l,(p,h)=>[`r_${String(h).padStart(c,"0")}`,p]):Object.entries(l);if(!Array.isArray(l)&&Object.getOwnPropertySymbols(l).some(p=>Object.prototype.propertyIsEnumerable.call(l,p)))throw new TypeError(`Bag labels must be strings at ${u}`);for(let[p,h]of f){let _=h;n&&(Wr(_)||Array.isArray(_))&&(_=this.createChildBag(),a(_,h,`${u}[${JSON.stringify(p)}]`)),o._appendLiteral(p,_)}}finally{s.delete(l)}};return e!=null&&a(i,e,"$"),this._replacePrepared(i)}_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 i=n.getValue(!0);i instanceof t&&i.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:i={}}={}){if(typeof e!="function")throw new TypeError("forEach requires a callback");let s=(a,o)=>{for(let l=0;l<a._nodes.length;l++){let u=a._nodes._list[l],c={...o};"_pathlist"in o&&(c._pathlist=[...o._pathlist,u.label]),"_indexlist"in o&&(c._indexlist=[...o._indexlist,l]);let f=e(u,c,l);if(f)return f;if(f==null&&n){let p=u.getValue(r);if(p instanceof t){let h=s(p,c);if(h)return h}}}return null};return s(this,i)}*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 i=r?`${r}.${n.label}`:n.label;yield[i,n];let s=n.getValue(e);s instanceof t&&(yield*s._iterNodesWithPaths(e,i))}}*_nodeFlattener(e=null){let r=e!==null,n=r?Object.create(null):null,i=0,s=new Map([["[]",this.constructor]]);for(let[a,o]of Wu(this)){let l=a.slice(0,-1),u=JSON.stringify(a),c=JSON.stringify(l),f=o.getValue(!0),p,h=null;if(o.resolver)p=Ln(o.resolver);else if(f instanceof t){let b=f.constructor,k=b.tytxSuffix;s.set(u,b),h=Oa(b,Hr(s.get(c),k)),p=`::${k}`}else f===null?p="::NN":p=Wt(f);if(o.attr&&Object.hasOwn(o.attr,tt))throw new pe(`node '${a}': the attribute '${tt}' is reserved for the Bag class name`);let _=zi(Wt(o.attr));h!==null&&(_[tt]=h);let g=o.nodeTag;r?(yield[l.length?n[c]:null,o.label,g,p,_],f instanceof t&&(n[u]=i,e[i]=a,i++)):yield[l,o.label,g,p,_]}}toTytx(e="json",r=!1){let n=this._toTytxPayload(r),i=this.constructor.tytxSuffix;if(e==="json")return`${n}::${i}`;if(e==="msgpack")return pi(new Qe(4,new TextEncoder().encode(`${i}:${n}`)));throw new TypeError(`Unsupported transport: ${e}`)}_toTytxPayload(e=!1){let r;if(e){let s={};r={rows:[...this._nodeFlattener(s)],paths:s}}else r={rows:[...this._nodeFlattener(null)]};let n=this.constructor,i=Oa(n,Hr(null,n.tytxSuffix));return i!==null&&(r[tt]=i),r.rows=r.rows.map(([s,a,o,l,u])=>[Wt(s),Wt(a),Wt(o),l,u]),r.paths&&(r.paths=Wt(r.paths)),We(r)}static fromTytx(e,r="json",n={}){if(Wr(r)&&(n=r,r="json"),Ia(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 i=we(e,r==="json"?null:r);if(i instanceof t)return i;if(!Wr(i)&&!Array.isArray(i))throw new TypeError("fromTytx requires a dictionary, array or typed Bag root");return new this(i,n)}static _fromTytxPayload(e){let r=this.tytxSuffix;if(e==="")return new(Hr(null,r));let n=we(e);if(!n||!Array.isArray(n.rows))throw new pe("Invalid TYTX Bag: expected rows");let i=n.paths,s=i!=null,a=Object.hasOwn(n,tt)?Na(r,n[tt]):Hr(null,r),o=new a,l=new Map([["[]",o]]);for(let u of n.rows){if(!Array.isArray(u)||u.length!==5)throw new pe("Invalid TYTX Bag row");let[c,f,p,h,_]=u,g=c??"";if(s){if(c!==null&&!Object.hasOwn(i,c))throw new pe(`Unknown TYTX parent reference: ${c}`);g=c===null?"":i[c]}if(typeof g=="string"&&(g=g?g.split("."):[]),!Array.isArray(g))throw new pe("Invalid TYTX parent path");let b=JSON.stringify(g);if(!l.has(b))throw new pe(`Missing or undecodable TYTX parent branch: ${g}`);let k=l.get(b),T=JSON.stringify([...g,f]),A=h,S=ji(A),B=Ca(_),F=Object.hasOwn(B,tt)?B[tt]:null;if(delete B[tt],A instanceof t){let Y=A.constructor.tytxSuffix,re=F!==null?Na(Y,F):Hr(k.constructor,Y);A=new re,l.set(T,A)}else if(F!==null)throw new pe(`node '${T}': the attribute '${tt}' is reserved for the Bag class name of a branch`);let j=k._appendLiteral(f,S?null:A,B,S);j.nodeTag=p??null}return o}toXml(e={}){let{pretty:r=!1,encoding:n="UTF-8",docHeader:i=null,selfClosedTags:s=null}=e,a=this._bagToXml(s,r);return i===!0?a=`<?xml version='1.0' encoding='${n}'?>
18
- ${a}`:typeof i=="string"&&(a=`${i}
19
- ${a}`),a}_bagToXml(e=null,r=!1,n=0){let i=[];for(let s of this._nodes)i.push((r?" ".repeat(n):"")+this._nodeToXml(s,e,r,n));return i.join(r?`
20
- `:"")}_nodeToXml(e,r=null,n=!1,i=0){let s=e.xmlTag||e.nodeTag||e.label,a=this._sanitizeTag(s),o=[];if(a!==s&&o.push(`_tag="${this._escapeAttr(s)}"`),e.resolver&&o.push(`_resolver="${this._escapeAttr(Ln(e.resolver))}"`),e.attr)for(let[p,h]of Object.entries(zi(e.attr)))h!==null&&h!==!1&&h!==void 0&&o.push(`${p}="${this._escapeAttr(String(h))}"`);let l=o.length?" "+o.join(" "):"",u=e.resolver?null:e.getValue(!0);if(u&&typeof u._bagToXml=="function"){n=n&&e.attr?.["xml:space"]!=="preserve";let p=u._bagToXml(r,n,i+1);return p?n?`<${a}${l}>
21
- ${p}
22
- ${" ".repeat(i)}</${a}>`:`<${a}${l}>${p}</${a}>`:r===null||r.includes(a)?`<${a}${l}/>`:`<${a}${l}></${a}>`}if(u==null||u==="")return r===null||r.includes(a)?`<${a}${l}/>`:`<${a}${l}></${a}>`;let c=u instanceof Date&&!Number.isNaN(u.getTime())?Ph(u):String(u),f=this._escapeXml(c);return`<${a}${l}>${f}</${a}>`}_sanitizeTag(e){return e?e.replace(/[^a-zA-Z0-9_\-.:]/g,"_"):"_none_"}_escapeXml(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}_escapeAttr(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}static fromXml(e,r={}){let{tagAttribute:n=null}=r,i;if(typeof DOMParser<"u"){i=new DOMParser().parseFromString(e,"application/xml");let a=i.querySelector("parsererror");if(a)throw new Error(`XML parse error: ${a.textContent}`)}else i=new Hu.DOMParser().parseFromString(e,"application/xml");return this._xmlElementToBag(i.documentElement,n)}static _xmlElementToBag(e,r=null){let n=new this,i=Array.from(e.childNodes).filter(s=>s.nodeType===1);for(let s of i){let a=s.tagName,o={};for(let g=0;g<s.attributes.length;g++){let b=s.attributes[g];o[b.name]=b.value}let l=ji(o._resolver);l&&delete o._resolver;let u=String(o._T||"").toUpperCase()==="BAG";Object.assign(o,Ca(o));let c=a;"_tag"in o&&(c=o._tag,delete o._tag),r&&r in o&&(c=o[r],delete o[r]);let f=c,p=1;for(;n.getNode(c);)c=`${f}_${p++}`;let h=Array.from(s.childNodes).filter(g=>g.nodeType===1),_;if(h.length>0||u){let g=this._xmlElementToBag(s,r);_=n.setItem(c,g,Object.keys(o).length>0?o:null)}else{let g=s.textContent||"";_=n.setItem(c,g,Object.keys(o).length>0?o:null)}l&&(_.resolver=l),_.xmlTag=a}return n}static async fromUrl(e,r={}){let{timeout:n=30}=r,i={};n&&(i.signal=AbortSignal.timeout(n*1e3));let s=await fetch(e,i),a=s.headers.get("content-type")||"",o=await s.text();if(a.includes("json"))return t.fromTytx(o);if(a.includes("xml"))return t.fromXml(o);let l=o.trim();if(l.startsWith("<"))return t.fromXml(o);if(l.startsWith("{")||l.startsWith("["))return t.fromTytx(o);throw new Pn(`Unsupported content-type: ${a}`)}toJson(e=!0){let r=[];for(let n of this._nodes)r.push(this._nodeToJsonDict(n,e));return e?We(r):JSON.stringify(r)}_nodeToJsonDict(e,r){let n=e.resolver?null:e.getValue(!0);if(n&&typeof n._nodeToJsonDict=="function"){let s=[];for(let a of n._nodes)s.push(n._nodeToJsonDict(a,r));n=s}let i={label:e.label,value:n,attr:zi(e.attr)};return e.nodeTag!==null&&(i.tag=e.nodeTag),e.resolver&&(i.resolver=Ln(e.resolver)),i}static fromJson(e,r={}){return Vu||(console.warn("Bag.fromJson is deprecated; use Bag.fromTytx"),Vu=!0),this.fromTytx(e,"json",r)}toStringTree(e=!0,r=null,n="",i=!0){r===null&&(r=new Map);let s=[],a=[...this._nodes];for(let o=0;o<a.length;o++){let l=a[o],u=o===a.length-1,c=l.getValue(e),f=l.getAttr(),p="",h=Object.keys(f);h.length>0&&(p=" ["+h.map(k=>`${k}=${JSON.stringify(f[k])}`).join(", ")+"]");let _=u?"\u2514\u2500\u2500 ":"\u251C\u2500\u2500 ",g=n+(u?" ":"\u2502 ");if(c instanceof t){let b=l,k=c.backref?"(*)":"";if(r.has(b))s.push(`${n}${_}${l.label}${k}${p} \u2192 (circular ref)`);else{r.set(b,l.label),s.push(`${n}${_}${l.label}${k}${p}`);let T=c.toStringTree(e,r,g,u);T&&s.push(T)}}else{let b;if(c===null)b="null";else if(c===void 0)b="undefined";else if(c instanceof ArrayBuffer||c instanceof Uint8Array){let k=new TextDecoder("utf-8",{fatal:!1}),T=c instanceof ArrayBuffer?new Uint8Array(c):c;b=k.decode(T)}else typeof c=="string"?c.length>50?b=JSON.stringify(c.slice(0,47)+"..."):b=JSON.stringify(c):b=String(c);s.push(`${n}${_}${l.label}: ${b}${p}`)}}return s.join(`
23
- `)}toString(e=!0,r=null,n=""){r||(r=new Set);let i=[],s=[...this._nodes];for(let a=0;a<s.length;a++){let o=s[a],l=a===s.length-1,u=o.getValue(e),c="",f=o.attr;f&&Object.keys(f).length>0&&(c=` [${Object.entries(f).map(([g,b])=>`${g}=${JSON.stringify(b)}`).join(", ")}]`);let p=l?"\u2514\u2500\u2500 ":"\u251C\u2500\u2500 ",h=n+(l?" ":"\u2502 ");if(u&&typeof u._htraverse=="function"){let _=o;if(r.has(_))i.push(`${n}${p}${o.label}${c} \u2192 (circular ref)`);else{r.add(_),i.push(`${n}${p}${o.label}${c}`);let g=u.toString(e,r,h);g&&i.push(g)}}else{let _;u==null?_="null":typeof u=="string"&&u.length>50?_=JSON.stringify(u.slice(0,47)+"..."):typeof u=="string"?_=JSON.stringify(u):_=String(u),i.push(`${n}${p}${o.label}: ${_}${c}`)}}return i.join(`
24
- `)}},Pn=class extends Error{constructor(e){super(e),this.name="BagException"}};ye.registerBagClass(Ee);xa(Ee,"X",t=>t._toTytxPayload(),t=>Ee._fromTytxPayload(t));In(Ee.tytxSuffix,{...kt(Ee.tytxSuffix),Bag:Ee});var Gu=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 Xu(t){return t.endsWith("_")&&Gu.has(t.slice(0,-1))?t.slice(0,-1):t}function Yu(t){let e=Xu(t);return e!==t?e:t.startsWith("_")&&Gu.has(t.slice(1))?t.slice(1):t}function Ba(t,{renderTag:e=null,ns:r=null,dialectName:n=null}={}){let i=e||t;if(!i)return i;if(i=Xu(i),r&&!e){let s=`${n}_`;i.startsWith(s)&&(i=i.slice(s.length)),i=`${r}:${i}`}return i}var Xr=Symbol("value"),Ju=new Set(["_meta","datapath","nodeId","ns","form","formId","_anchor","updateOn"]);function Ra(t){return Object.entries(t||{}).filter(([e])=>!Ju.has(e)).map(([e,r])=>[Yu(e),r])}var Gr=class extends At{constructor(e,r,n=null,i=null,s=null,a=null,o=null){super(e,r,n,i,s,a,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(i=>i.trim());return n.length===1?r[n[0]]!==void 0?r[n[0]]:null:n.map(i=>r[i]!==void 0?r[i]: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 Ra(this.getAttr())}runtimeToEvaluate(){let e=new Map(this.fixedAttrItems());return e.set(Xr,this.value),e}absDatapath(e){let r=e;this.pointerType(e)&&(e=(Bt(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 i=n.getAttr("datapath");i!=null&&(e=e==="."?i:i+e),n=n.parentNode}if(e.startsWith("."))throw new Error(`unresolved relative datapath: ${r}`);return e}_collapseParentDatapath(e,r){let n=[];for(let i of e.split("."))if(i==="#parent"){if(n.length===0)throw new Error(`#parent has no segment to cancel: ${r}`);n.pop()}else n.push(i);return n.join(".")}_resolveSymbolicDatapath(e,r){let n=e.slice(1),i=n.indexOf("."),s=i===-1?n:n.slice(0,i),a=i===-1?"":n.slice(i+1),o;if(s==="FORM")o=this._findMarkedDatapathAncestor(!0,!1,r);else if(s==="ANCHOR")o=this._findMarkedDatapathAncestor(!1,!0,r);else{let l=this.rootBuilder;if(!l)throw new Error(`#<id>: cannot resolve ${r} on a node without builder`);if(o=l.source.getNodeByAttr("nodeId",s),o==null)throw new Error(`#<id>: cannot resolve ${r}`)}return o.absDatapath(a?`.${a}`:".")}_findMarkedDatapathAncestor(e,r,n){let i=this;for(;i!=null;){let a=i.getAttr()||{};if(e&&(a.formId!=null||a.form===!0)||r&&"_anchor"in a)return i;i=i.parentNode}let s=e?"FORM":"ANCHOR";throw new Error(`#${s}: no marked ancestor found for ${n}`)}getRelativeData(e,r=null,{autocreate:n=!1}={}){let i=this.data,s=this.absDatapath(e);return n&&i.getItem(s)==null&&i.setItem(s,r),i.getItem(s,r)}setRelativeData(e,r,{attributes:n=null,fired:i=!1,reason:s=null}={}){let a=this.data,o=this.absDatapath(e);a.setItem(o,r,n,">",!1,!0,s===null?!0:s,i)}fireEvent(e,r=!0,{attributes:n=null,reason:i=null}={}){this.setRelativeData(e,r,{attributes:n,fired:!0,reason:i})}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})}},fe=class t extends Ee{constructor(e=null,r=null){super(e),this._builder=r,this._insertingBuilder=null}get nodeClass(){return Gr}_setBuilderItem(e,r,n,...i){let s=r?.map(([o])=>[o,o._builder])||null;if(r)for(let[o,l]of r)o._builder=l;let a=this._insertingBuilder;this._insertingBuilder=e;try{return this.setItem(n,...i)}catch(o){if(this.node(n)==null&&s)for(let[l,u]of s)l._builder=u;throw o}finally{this._insertingBuilder=a}}bindBuilder(e){if(!e)throw new Error("SourceBag.bindBuilder requires a builder");let r=this._builderBindingPlan(e);for(let[n,i]of r)n._builder=i;return this.setBackref(),this}_builderBindingPlan(e){let r=[],n=new WeakSet,i=(s,a)=>{if(n.has(s))throw new Error("source contains a cyclic or shared SourceBag branch");n.add(s),r.push([s,a]);for(let o of s.getNodes()){let l=a,u=o._getMeta("subbuilder");u!=null&&(l=a._resolveSubbuilderReference(u,o.getAttr()||{},o.nodeTag)),r.push([o,l]);let c=o.getValue(!0);c instanceof t&&i(c,l)}};return i(this,e),r}};if((kt(fe.tytxSuffix).SourceBag??fe)!==fe)throw new Error("TYTX subtype name 'SourceBag' is already registered for another class");In(fe.tytxSuffix,{...kt(fe.tytxSuffix),SourceBag:fe});function qh(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 jh=new Set(["then","toJSON"]),Ku=new WeakMap;function Un(t){return Ku.get(t)||t}function Ma(t){if(t==null)return t;t=Un(t);let e=t._builder||t.parentBag&&t.parentBag._builder;return e?e.wrapSource(t):t}function Qu(t,e){let r=e instanceof Ee,n=new Proxy(e,{get(i,s){if(typeof s=="symbol"||s.startsWith("_")||jh.has(s))return Reflect.get(i,s,i);let a=t.schemaTag(s);if(r&&a)return Zu(t,i,a,r);if(s in i){let l=Reflect.get(i,s,i);return typeof l=="function"?l.bind(i):l}if(a)return Zu(t,i,a,r);let o=t.containerMethod(s);if(o)return(...l)=>t[o](t.wrapSource(i),...l)}});return Ku.set(n,e),n}function Zu(t,e,r,n){return(...i)=>{let{value:s,attrs:a}=qh(i),o=n?t.bagCall(e,r,s,a):t.commandOnNode(e,r,s,a);return o.builder.wrapSource(o)}}var tc=/^[A-Za-z_][A-Za-z0-9_]*$/,zh=new Set(["positional_only","positional_or_keyword","keyword_only","var_positional","var_keyword"]),Vh=new Set(["framework","value","attribute"]),Hh=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 lr(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function C(t,e){throw new TypeError(`${t}: ${e}`)}function pt(t,e,r,n){lr(t)||C(n,"must be an object");for(let i of Object.keys(t))e.includes(i)||C(n,`unknown field '${i}'`);for(let i of r)Object.hasOwn(t,i)||C(n,`missing field '${i}'`)}function ur(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)=>ur(r,`${e}[${n}]`));if(lr(t))return Object.entries(t).forEach(([r,n])=>ur(n,`${e}.${r}`));C(e,"must be lossless JSON data")}}function Wh(t,e){let r="",n=!1;for(let i=0;i<t.length;i++){let s=t[i];if(s==="\\"){r+=s+(t[++i]??"");continue}s==="["&&(n=!0),!n&&s==="."&&!(e&16)?r+="[^\\n]":!n&&s==="^"&&e&8?r+="(?:^|(?<=\\n))":!n&&s==="$"?r+=e&8?"(?=\\n|(?![\\s\\S]))":"(?=\\n?(?![\\s\\S]))":r+=s,s==="]"&&(n=!1)}return r}function or(t,e,r=!1,n=null){if(t===null)return null;switch(pt(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 pt(t,["kind","name"],["kind","name"],e),n||C(e,"custom references require a catalog; nested catalog references are unsupported"),n.resolve(t.name,e);case"dtype":{pt(t,["kind","dtype"],["kind","dtype"],e);let i=t.dtype;typeof i!="string"&&C(e,"dtype must be a string");let s=On(i);return!s&&i!=="NN"&&C(e,`unknown dtype '${i}'`),{...t,test:o=>i==="NN"?o===null:i==="N"?Ze(o)&&!["NaN","Infinity","-Infinity"].includes(o.toString()):s===Number?typeof o=="number"&&Number.isFinite(o)&&(i!=="L"||Number.isInteger(o)):s===String?typeof o=="string":s===Boolean?typeof o=="boolean":s===Date?o instanceof Date&&Number.isFinite(o.getTime()):s===Object?lr(o)&&[Object.prototype,null].includes(Object.getPrototypeOf(o)):o instanceof s}}case"any":return{...t,test:i=>!0};case"type":{(typeof t.module!="string"||typeof t.name!="string")&&C(e,"type requires string module/name");let i=`${t.module}.${t.name}`;if(i==="collections.abc.Callable")return{...t,test:a=>typeof a=="function",portable:!1};let s=Hh.get(i);return s||C(e,`unsupported type '${i}'`),{...t,test:s}}case"union":{(!Array.isArray(t.items)||!t.items.length)&&C(e,"union items must be non-empty");let i=t.items.map((s,a)=>or(s,`${e}.items[${a}]`,!0,n));return{...t,items:i,inputConstraint:i.some(s=>s.inputConstraint),test:s=>i.some(a=>a.test&&a.test(s))}}case"literal":return Array.isArray(t.values)||C(e,"literal values must be an array"),t.values.forEach((i,s)=>ur(i,`${e}.values[${s}]`)),{...t,test:i=>t.values.some(s=>Object.is(s,i))};case"annotated":{Array.isArray(t.metadata)||C(e,"annotated metadata must be an array"),t.metadata.some(a=>!["regex","range","value"].includes(a?.kind))&&C(e,"unsupported annotation metadata kind");let i=or(t.base,`${e}.base`,!0,n),s=t.metadata.map((a,o)=>or(a,`${e}.metadata[${o}]`,!0,n));return{...t,base:i,metadata:s,inputConstraint:i.inputConstraint,test:a=>i.test(a)&&s.every(o=>!o.test||o.test(a))}}case"range":{for(let i of["ge","le","gt","lt"])Object.hasOwn(t,i)||C(e,`range missing '${i}'`);for(let i of["ge","le","gt","lt"])t[i]!==null&&(typeof t[i]!="number"||!Number.isFinite(t[i]))&&C(e,`${i} must be finite number or null`);return{...t,test:i=>typeof i=="number"&&(t.ge===null||i>=t.ge)&&(t.le===null||i<=t.le)&&(t.gt===null||i>t.gt)&&(t.lt===null||i<t.lt)}}case"regex":{(typeof t.pattern!="string"||!Number.isInteger(t.flags)||t.flags<0)&&C(e,"regex requires pattern and non-negative integer flags");let i=t.flags&-59;i&&C(e,`unsupported Python regex flags ${i}`),t.flags&2&&C(e,"IGNORECASE is not portable across Python and JavaScript Unicode rules"),/\\[AZzUwWdDsSabBN0-9]|\(\?P[<=!]|\(\?\(|\(\?>|\(\?#|\(\?[aiLmsux-]|[+*?}]\+|\{,/.test(t.pattern.replaceAll(String.raw`[\s\S]`,"."))&&C(e,"regex uses a non-portable construct or character class");let s="uy";t.flags&16&&(s+="s");let a;try{a=new RegExp(`(?:${Wh(t.pattern,t.flags)})(?![\\s\\S])`,s)}catch(o){C(e,`invalid portable regex: ${o.message}`)}return{...t,test:o=>typeof o!="string"?!1:(a.lastIndex=0,a.test(o))}}case"value":return ur(t.value,`${e}.value`),{...t};case"generic":{let i=or(t.origin,`${e}.origin`,!0,n);(t.origin?.kind!=="type"||t.origin.module!=="builtins"||!["list","dict","tuple","set"].includes(t.origin.name))&&C(e,"only list, dict, tuple and set generic origins are supported"),Array.isArray(t.arguments)||C(e,"generic arguments must be an array");let s=t.arguments.map((a,o)=>or(a,`${e}.arguments[${o}]`,!0,n));return{...t,origin:i,arguments:s,inputConstraint:s.some(a=>a.inputConstraint),test:a=>i.test(a)&&Gh(t.origin,s,a)}}case"arguments":C(e,"Callable argument-list descriptors are not supported by Python validation");case"ellipsis":return r||C(e,"ellipsis is only valid as a nested descriptor"),{...t};default:C(e,`unknown annotation kind '${t.kind}'`)}}function Gh(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((i,s)=>e[s].test(i)):n==="builtins.list"||n==="builtins.set"||n==="builtins.tuple"?[...r].every(i=>!e[0]?.test||e[0].test(i)):n==="builtins.dict"?Object.entries(r).every(([i,s])=>(!e[0]?.test||e[0].test(i))&&(!e[1]?.test||e[1].test(s))):!1}function rc(t,e){if(t===null)return null;if(typeof t!="string"&&C(e,"must be string or null"),t==="")return new Map;let r=new Map;for(let n of t.split(",")){let i=n.trim();/^[A-Za-z_][A-Za-z0-9_]*\[\]$/.test(i)&&C(e,`invalid cardinality item '${n}'`);let s=i.match(/^([A-Za-z_][A-Za-z0-9_]*|\*)(?:\[(?:(\d+)|(?:(\d*):(\d*)))\])?$/);s||C(e,`invalid cardinality item '${n}'`);let[,a,o,l,u]=s;r.has(a)&&C(e,`duplicate tag '${a}'`);let c=0,f=1/0;i.includes("[")&&(i.includes(":")?(c=l?Number(l):0,f=u?Number(u):1/0):c=f=Number(o)),f<c&&C(e,`maximum ${f} is below minimum ${c}`),r.set(a,{min:c,max:f})}return r.has("*")&&r.size>1&&C(e,"wildcard '*' cannot be combined with named tags"),r}function nc(t,e){if(t===null)return null;typeof t!="string"&&C(e,"must be string or null");let r=new Set;for(let n of t.split(",")){let i=n.trim();i&&((!tc.test(i)||r.has(i))&&C(e,`invalid or duplicate parent '${n}'`),r.add(i))}return r}function Xh(t,e,r){if(t===null)return null;pt(t,["parameters","accepts_var_keyword","accepts_var_positional"],[],e);let n=t.parameters??[];Array.isArray(n)||C(e,"parameters must be an array"),t={parameters:n,accepts_var_keyword:n.some(l=>l.kind==="var_keyword"),accepts_var_positional:n.some(l=>l.kind==="var_positional"),...t},(!Array.isArray(t.parameters)||typeof t.accepts_var_keyword!="boolean"||typeof t.accepts_var_positional!="boolean")&&C(e,"invalid signature descriptor");let i=new Set,s=!1,a=!1,o=t.parameters.map((l,u)=>{let c=`${e}.parameters[${u}]`;return pt(l,["name","kind","role","annotation","has_default","default"],["name","kind","role","annotation","has_default"],c),(typeof l.name!="string"||!tc.test(l.name)||i.has(l.name))&&C(c,"invalid or duplicate parameter name"),i.add(l.name),(!zh.has(l.kind)||!Vh.has(l.role)||typeof l.has_default!="boolean")&&C(c,"invalid kind, role, or has_default"),l.has_default!==Object.hasOwn(l,"default")&&C(c,"default presence must equal has_default"),l.has_default&&ur(l.default,`${c}.default`),s||=l.kind==="var_keyword",a||=l.kind==="var_positional",{...l,annotation:or(l.annotation,`${c}.annotation`,!1,r)}});return(s!==t.accepts_var_keyword||a!==t.accepts_var_positional)&&C(e,"variadic summary flags do not match parameters"),{...t,parameters:o}}function ec(t,e,r,n){let i=["doc","sub_tags","parent_tags","inherits_from","ns","attributes",...r?["node_label","collection_key"]:[],"_meta"];pt(t,i,[],e),t={...Object.fromEntries(i.map(s=>[s,null])),...t};for(let s of["doc","inherits_from","ns",...r?["node_label","collection_key"]:[]])t[s]!==null&&typeof t[s]!="string"&&C(e,`${s} must be string or null`);return t._meta!==null&&(lr(t._meta)||C(e,"_meta must be object or null"),ur(t._meta,`${e}._meta`)),rc(t.sub_tags,`${e}.sub_tags`),nc(t.parent_tags,`${e}.parent_tags`),{...t,attributes:Xh(t.attributes,`${e}.attributes`,n)}}function ic(t){return t?t.split(",").map(e=>e.trim()).filter(Boolean):[]}function sc(t,e){let r={...e};for(let[n,i]of Object.entries(t))n==="inherits_from"||n.startsWith("_")||r[n]||(r[n]=i);return r._meta={...t._meta||{},...e._meta||{}},r}function ac(t){let e={...t};return e._subSpec=Object.hasOwn(e,"sub_tags")?rc(e.sub_tags,"resolved.sub_tags"):null,e._parentSpec=Object.hasOwn(e,"parent_tags")?nc(e.parent_tags,"resolved.parent_tags"):null,e}function oc(t,e,r,n){if(r.get(t)===1&&C(n,`inheritance cycle at '${t}'`),r.get(t)===2)return e[t];let i=e[t];i||C(n,`unknown abstract '${t}'`),r.set(t,1);let s={...i};for(let a of ic(i.inherits_from))s=sc(oc(a,e,r,n),s);return s=ac(s),r.set(t,2),e[t]=s,s}function La({abstracts:t={},elements:e={}}){let r={...t},n=new Map;for(let s of Object.keys(r))oc(s,r,n,`abstracts.${s}.inherits_from`);let i={};for(let[s,a]of Object.entries(e)){let o={...a};for(let l of ic(a.inherits_from)){let u=r[l];u||C(`elements.${s}.inherits_from`,`unknown abstract '${l}'`),o=sc(u,o)}i[s]=ac(o)}return{abstracts:r,elements:i}}function Pa(t){pt(t,["document_format","grammar","abstracts","elements","custom_types"],["document_format","grammar","abstracts","elements"],"grammar document"),pt(t.document_format,["name","version"],["name","version"],"document_format"),(t.document_format.name!=="builder_grammar"||!["1.1","1.2"].includes(t.document_format.version))&&C("document_format","expected builder_grammar version 1.1 or 1.2"),pt(t.grammar,["name","version","title","description"],["name","version","title","description"],"grammar"),(typeof t.grammar.name!="string"||!t.grammar.name)&&C("grammar.name","must be non-empty string");for(let i of["version","title","description"])t.grammar[i]!==null&&typeof t.grammar[i]!="string"&&C(`grammar.${i}`,"must be string or null");(!lr(t.abstracts)||!lr(t.elements))&&C("grammar document","abstracts/elements must be objects"),Object.hasOwn(t,"custom_types")&&t.document_format.version!=="1.2"&&C("custom_types","requires version 1.2");let e=Vi.fromJSON(t.custom_types??{}),r={};for(let[i,s]of Object.entries(t.abstracts))(!i||i.startsWith("_"))&&C("abstracts",`invalid public name '${i}'`),r[i]=ec(s,`abstracts.${i}`,!1,e);let n={};for(let[i,s]of Object.entries(t.elements))(!i||i.startsWith("_"))&&C("elements",`invalid public name '${i}'`),n[i]=ec(s,`elements.${i}`,!0,e);return{grammar:structuredClone(t.grammar),abstracts:r,elements:n}}function lc(t,e,r,n){let i=e.attributes;if(!i)return;let s={...n};r!=null&&(s.node_value=r);let a=new Set(i.parameters.filter(u=>u.role==="attribute").map(u=>u.name)),o=new Set(["node_label","node_position","nodeId","target_id","datapath","iterate","store","_tag","_meta","ns"]);if(!i.accepts_var_keyword)for(let u of Object.keys(n))!a.has(u)&&!o.has(u)&&C(t,`unknown attribute '${u}'`);let l=e._meta?.component?i.parameters.find(u=>u.role!=="framework"&&["positional_only","positional_or_keyword"].includes(u.kind))?.name:null;for(let u of i.parameters){if(u.name===l||u.role==="framework"||u.kind.startsWith("var_"))continue;let c=Object.hasOwn(s,u.name);!c&&!u.has_default&&C(t,`missing required ${u.role} '${u.name}'`),c&&u.annotation!==null&&(!u.annotation.test||!u.annotation.test(s[u.name]))&&C(t,`invalid value for ${u.role} '${u.name}'`)}}var Vi=class t{#e=new Map;#o=new Map;register(e,r,n){let i=new Map([[String,"str"],[Number,"float"],["string","str"],["integer","int"],["number","float"]]),s=i.has(r)?{kind:"type",module:"builtins",name:i.get(r)}:r;return this.#l(e,{kind:"annotated",base:s,metadata:[n]})}#l(e,r){(typeof e!="string"||!/^[A-Za-z][A-Za-z0-9_]*$/.test(e)||e in this||["to_dict","from_dict"].includes(e)||Yh.has(e))&&C("custom_types",`invalid, reserved or duplicate name '${e}'`),pt(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))&&C(`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))&&C(`custom_types.${e}`,"portable Regex requires str; portable Range requires int or float"),ur(r,`custom_types.${e}`);let i=structuredClone(r),s=or(i,`custom_types.${e}`),a=Object.freeze({kind:"custom",name:e});return Object.defineProperty(this,e,{value:a,enumerable:!0}),this.#e.set(e,i),this.#o.set(e,{...a,inputConstraint:!0,test:s.test}),a}resolve(e,r="custom_types"){return this.#o.has(e)||C(r,`unknown custom type '${e}'`),{...this.#o.get(e)}}validate(e,r){return this.resolve(e).test(r)||C(`custom_types.${e}`,"invalid input value"),!0}toJSON(){return structuredClone(Object.fromEntries(this.#e))}static fromJSON(e){lr(e)||C("custom_types","must be an object");let r=new t;for(let[n,i]of Object.entries(e))r.#l(n,i);return r}},Yh=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 uc(t,e,r,n){let i=e?.attributes;if(i)for(let s of i.parameters){if(!s.annotation?.inputConstraint||s.role==="framework"||["var_keyword","var_positional"].includes(s.kind))continue;let a=s.role==="value"?r:n[s.name];a!==void 0&&(s.annotation.test(a)||C(t,`invalid input for '${s.name}' (custom type)`))}}function cc(t,e,r=[]){if(e===null)return structuredClone(t);if(r.length===2&&r[0]==="custom_types"&&t!==void 0){if(!Ua(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(Tt(t)&&Tt(e)){let n=structuredClone(t);for(let[i,s]of Object.entries(e))s!==null&&Object.defineProperty(n,i,{value:cc(n[i],s,[...r,i]),enumerable:!0,writable:!0,configurable:!0});return n}return structuredClone(e)}function Ua(t,e){return Object.is(t,e)?!0:Array.isArray(t)&&Array.isArray(e)?t.length===e.length&&t.every((r,n)=>Ua(r,e[n])):Tt(t)&&Tt(e)?Object.keys(t).length===Object.keys(e).length&&Object.keys(t).every(r=>Object.hasOwn(e,r)&&Ua(t[r],e[r])):!1}function Tt(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&Object.getPrototypeOf(t)===Object.prototype}function Fa(t){if(!(t===null||typeof t=="string"||typeof t=="boolean")&&!(typeof t=="number"&&Number.isFinite(t))){if(Array.isArray(t)){t.forEach(Fa);return}if(Tt(t)){Object.values(t).forEach(Fa);return}throw new TypeError("collection must contain only finite JSON values")}}var Dt=class t{#e;constructor(e){Fa(e);let r=["document_format","grammar","abstracts","elements"];if(!Tt(e)||Object.keys(e).some(i=>![...r,"custom_types"].includes(i))||r.some(i=>!Object.hasOwn(e,i)))throw new TypeError("collection requires document_format, grammar, abstracts and elements");let n=e.document_format;if(!Tt(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 i of["grammar","abstracts","elements"])if(!Tt(e[i]))throw new TypeError(`${i} must be an object`);if(Object.hasOwn(e,"custom_types")&&(n.version!=="1.2"||!Tt(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=cc(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 cr=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,[i,s]=n.runtimeValues(e);if(e._getMeta("data_element"))return null;if(e._getMeta("component"))return this._renderComponent(e,s,r);let a=this.getRender(n),o;return[o,s]=a._handleMeta(e,s),e._getMeta("subbuilder")||(s=a.adaptAttrs(s)),e.value instanceof fe&&(i=this.renderChildren(e.value,r)),a.renderedItem(e,i,s,{tag:o,...r})}renderChildren(e,r={}){let n=[];for(let i of e.getNodes()){let s=this.render(i,r);s!==null&&(Array.isArray(s)?n.push(...s):n.push(s))}return n}_renderComponent(e,r,n){let[i,s,a,o]=this._expansionInputs(e,r);if(!Object.hasOwn(e.getAttr(),"iterate"))return this._expandBlock(e,i,a,o,n);if(s==null)return[];if(!(s instanceof Ee))throw new TypeError(`component '${e.nodeTag}': iterate must resolve to a Bag, got ${s?.constructor?.name||typeof s}`);return s.getNodes().map(l=>this._expandBlock(e,i,a,{node_label:l.label},n))}_expansionInputs(e,r){let n=e.builder,i=n.componentMethod(e.nodeTag),s=i&&n[i];if(typeof s!="function")throw new Error(`component '${e.nodeTag}' has no implementation`);let a=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 l of Object.keys(r)){let u=e.getAttr(l);e.pointerType(u)==="^"&&(r[l]=`^${e.absDatapath(u)}`)}return[s,a,o,r]}_expandBlock(e,r,n,i,s){let a=e.builder._expansionRoot(n);r.call(e.builder,Ma(a),i);let o=a.getNodes();if(o.length!==1)throw new Error(`component '${e.nodeTag}' must build a tree, not a forest: ${o.length} root nodes`);let l={...s,depthOffset:this._nodeDepth(e,s.depthOffset||0)};return this.render(o[0],l)}preprocess(e){return e}renderedItem(e,r,n,i){throw new Error(`${this.constructor.name} does not implement renderedItem`)}_handleMeta(e,r){let[n,i]=e._getMeta("render_tag,render_attributes"),s=Ba(e.nodeTag,{renderTag:n,ns:e.getAttr("ns"),dialectName:e.builder?.constructor._name});if(!s)throw new Error(`node ${e.label} has no tag to render (no render_tag, no node_tag)`);return i&&(r={...r,...i}),[s,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 i=this._composeStringFragments(e);if(r==null)return i;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(i),null;if(typeof r.write=="function")return r.write(i),null;if(typeof r=="function")return r(i),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("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;")}_escapeAttr(e){return this._escapeText(e).replaceAll('"',"&quot;")}_nodeDepth(e,r=0){let i=((e.fullpath||"").match(/\./g)||[]).length;return Math.max(i-1,0)+r}};var fr=class extends cr{static mode="xml";renderedItem(e,r,n,{tag:i,pretty:s=!1,depthOffset:a=0}={}){let o=this._formatAttrs(n),l=s?" ".repeat(this._nodeDepth(e,a)):"",u=s?`
25
- `:"";if(Array.isArray(r)){let c=this._composeStringFragments(r);return`${l}<${i}${o}>${u}${c}${l}</${i}>${u}`}return r==null?`${l}<${i}${o}></${i}>${u}`:`${l}<${i}${o}>${this._escapeText(r)}</${i}>${u}`}finalize(e,r=null,{docHeader:n=null}={}){let i=this._composeStringFragments(e);return n===!0?i=`<?xml version='1.0' encoding='UTF-8'?>${i}`:typeof n=="string"&&(i=n+i),super.finalize(i,r)}_formatAttrs(e){return Object.entries(e||{}).map(([r,n])=>` ${r.startsWith("xmlns_")?`xmlns:${r.slice(6)}`:r}="${this._escapeAttr(n)}"`).join("")}};var fc={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 dc(t){let e=[];for(;t&&t!==Function.prototype;)e.push(t),t=Object.getPrototypeOf(t);return e.reverse()}function Jh(t){let e=Object.create(null),r=(n,i)=>{let s=n.toLowerCase(),a=e[s];if(a!==void 0&&a!==i)throw new Error(`container '${n}' is already tied to implementation method '${a}' (cannot rebind to '${i}')`);e[s]=i};for(let n of dc(t))if(Object.hasOwn(n,"containers"))for(let i of n.containers||[])r(i,i);return e}function Fn(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 $n="_root_",$a="_root_",pc=new Set(["destination","func","value","_on_start"]),mt=class t{static _sourceClass=fe;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 Ee,this._dataroot.setBackref(),this._dataroot.setItem($a,new Ee),this.data=this._dataroot.getItem($a),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($n,new r(null,this)),this.source=this._sourceroot.getItem($n)}wrapSource(e){if(e=Un(e),!(e instanceof fe)&&!(e instanceof Gr))throw new TypeError("wrapSource requires a SourceBag or SourceBagNode");let r=this._sourceHandles.get(e);return r||(r=Qu(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 Dt(r.toDocument()).update(e):new Dt(e),i=Pa(n.toDocument()),s=La(i),a=Fn(s.elements);this._classCollection=n,this._classSchema=s.elements,this._abstracts=s.abstracts,this._tagNames=a}static{this.defineGrammar(fc)}get _containers(){return Jh(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??=Fn(this.schema):this.constructor._tagNames??=Fn(this.schema)}schemaTag(e){let r=e.toLowerCase(),n=this.schemaTagNames[r];if(n)return n;let i=`${this.constructor._name}_`;return r.startsWith(i)&&this.schemaTagNames[r.slice(i.length)]||null}loadGrammar(e,{replace:r=!1}={}){let n=this._collection||this.constructor._classCollection,i=r?new Dt(e):new Dt(n.toDocument()).update(e),s=Pa(i.toDocument()),a=La(s),o=Fn(a.elements);return this._collection=i,this._schemaOverride=a.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;uc(e.nodeTag,n.schema[e.nodeTag],e.value,e.getAttr()||{})}validateNodeValues(e,r,n={}){let i=this.schemaTag(e);if(!i)throw new Error(`unknown element '${e}'`);return lc(i,this.schema[i],r,n),!0}validateNode(e,{value:r,attrs:n,childTags:i}={}){if(!e||typeof e.nodeTag!="string")throw new TypeError("validateNode requires a source node");let s=r!==void 0?r:e.value instanceof fe?null:e.value;this.validateNodeValues(e.nodeTag,s,n||e.getAttr?.()||{});let a=this.schema[this.schemaTag(e.nodeTag)],o=i||(e.value instanceof fe?e.value.getNodes().map(l=>l.nodeTag):null);return o&&this._validateChildren(e.nodeTag,a,o,!1),!0}validateChildren(e,r,{includeMinimum:n=!1}={}){let i=this.schemaTag(e);if(!i)throw new Error(`unknown element '${e}'`);if(!Array.isArray(r)||r.some(s=>typeof s!="string"))throw new TypeError("childTags must be an array of strings");return this._validateChildren(i,this.schema[i],r,n)}validateParent(e,r=null){let n=this.schemaTag(e);if(!n)throw new Error(`unknown element '${e}'`);let i=this.schema[n];if(!this._countsForGrammar(i))return!0;let s=i._parentSpec;if(s==null||s.has("*"))return!0;if(r===null)throw new Error(`'${n}' requires a declared parent`);let a=this.schemaTag(r);if(!a)throw new Error(`unknown parent element '${r}'`);return this._validateParent(n,i,a),!0}bagCall(e,r,n,i){return this.setChild(e,r,n,i)}commandOnNode(e,r,n,i){if(e=Un(e),e.value instanceof fe)return this.setChild(e.value,r,n,i);let s=e.value,a=new e.parentBag.constructor(null,e.builder||this),o=this.setChild(a,r,n,i,e);return this.promoteNodeValue(e,s,a),o}promoteNodeValue(e,r,n){e.setValue(n)}setChild(e,r,n,i,s=null){let a={...i},o=this.schema[r];if(!o)throw new Error(`unknown element '${r}'`);this.validateNodeValues(r,n,a);let l=o._meta?.subbuilder,c=(l==null?null:this._resolveSubbuilderReference(l,a,r))||this,f=n instanceof fe?n._builderBindingPlan(c):null,p=s?.rootBuilder||e.root._builder||this;if(a.nodeId!=null&&p.source.getNodeByAttr("nodeId",a.nodeId))throw new Error(`Duplicate nodeId '${a.nodeId}'`);n instanceof fe&&this._validateChildren(r,o,n.getNodes().map(A=>A.nodeTag),!1);let h=s||e.parentNode,_=h?.nodeTag?this.schema[h.nodeTag]:null;if(_&&!h._getMeta("subbuilder")&&this._countsForGrammar(o))this._validateParent(r,o,h.nodeTag),this._validateChildren(h.nodeTag,_,[...e.getNodes().map(A=>A.nodeTag),r],!1);else if(!_&&!h?._getMeta("subbuilder")&&o._parentSpec!=null&&this._countsForGrammar(o))throw new Error(`'${r}' requires a declared parent`);o._meta&&!("_meta"in a)&&(a._meta=o._meta),o.ns&&!("ns"in a)&&(a.ns=o.ns);let g=a.node_position;delete a.node_position;let b=a.node_label;delete a.node_label;let k;if(_?.collection_key){if(b!=null)throw new Error(`'${r}': node_label is not allowed in a collection`);k=this._collectionLabel(_.collection_key,r,a)}else{let A=_?._subSpec?.get(r);if(A&&A.max===1){if(b!=null)throw new Error(`'${r}': node_label is not allowed on a singleton`);k=r}else k=b||o.node_label||this._autoLabel(e,r)}if(e.node(k)!=null)throw new Error(`duplicate node label '${k}'`);return e._setBuilderItem(c,f,k,n,a,g||">",!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 i=r._parentSpec;if(!(i==null||i.has("*")||!this._countsForGrammar(r))&&!i.has(n))throw new Error(`'${e}' not allowed as child of '${n}'`)}_validateChildren(e,r,n,i){let s=r._subSpec;if(s==null||s.has("*")||r._meta?.subbuilder)return[];let a=new Map;for(let o of n){let l=this.schema[o];if(l&&!this._countsForGrammar(l))continue;let u=s.get(o);if(!u)throw new Error(`'${o}' not allowed as child of '${e}'`);let c=(a.get(o)||0)+1;if(a.set(o,c),c>u.max)throw new Error(`too many '${o}' in '${e}'`)}return i?[...s].filter(([o,l])=>(a.get(o)||0)<l.min).map(([o])=>o):[]}_collectionLabel(e,r,n){let i=s=>{if(n[s]===null||n[s]===void 0)throw new Error(`'${r}': collection key needs attribute '${s}'`);return String(n[s])};return e.includes("${")?e.replace(/\$\{([^}]+)\}/g,(s,a)=>i(a)):i(e)}validateSource(){let e=[],r=(n,i="")=>{for(let s of n.getNodes()){let a=i?`${i}.${s.label}`:s.label,o=s.builder;o.validateCustomTypes(s);let l=o.schema[s.nodeTag];if(l&&!s._getMeta("data_element,subbuilder,component").some(Boolean)){let u=s.value instanceof fe?s.value.getNodes().map(f=>f.nodeTag):[],c=o._validateChildren(s.nodeTag,l,u,!0);c.length&&e.push([a,c])}s.value instanceof fe&&r(s.value,a)}};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={},i=e.runtimeToEvaluate(),s=new Set(i.keys()),a=new Map([...Object.entries(e.getAttr()),...e.fixedAttrItems()]);for(let[c,f]of[...i])if(!(typeof c!="string"||!Bt(f)))for(let p of Rs(e,f))i.has(p)||i.set(p,a.get(p));let o=e._getMeta("data_element");for(let[c,f]of i){if(f instanceof ye){r.set(c,f.resolve());continue}let p=typeof c=="string"?Bt(f)?.pointer??f:f;if(!e.pointerType(p)){r.set(c,typeof c=="string"&&typeof f=="string"&&f.startsWith("==")?null:f);continue}let h=e.absDatapath(p);if(r.set(c,this.data.getItem(h)),!o&&!h.includes("?")&&c===Xr){let _=this.data.getNode(h);_&&Object.assign(n,_.getAttr("_wdg"))}}let l=zo(i,r,(c,f,p,h)=>this.evaluatePointerExpression(e,c,f,p,h)),u=l.get(Xr);l.delete(Xr);for(let c of l.keys())s.has(c)||l.delete(c);return[u,{...Object.fromEntries(l),...n}]}evaluatePointerExpression(e,r,n,i,s){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 i=(typeof r=="function"?r:r.constructor)[e];if(typeof i=="function")return i}throw new Error(`data-element func '${e}' not found on any data_logic source`)}_bindings(e){let[,r]=this.runtimeValues(e),n={};for(let[i,s]of Object.entries(r))pc.has(i)||(n[i]=s);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[i,s]of Object.entries(r))i!=="destination"&&i!=="value"&&!i.startsWith("_")&&(n[i]=s);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 i of n.getNodes())i._getMeta("data_element")&&e.push(i),i.value instanceof fe&&r(i.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 dc(this.constructor))if(Object.hasOwn(o,"components"))for(let l of o.components||[])e[l]=l;if(!Object.keys(e).length)return;let r={...this.schema},n={};for(let[o,l]of Object.entries(e))r[o]={sub_tags:"",_meta:{component:!0}},n[o.toLowerCase()]=l;let i=Fn(r),s=this._collection||this.constructor._classCollection,a=s.toDocument();a.abstracts={},a.elements=Object.fromEntries(Object.keys(e).map(o=>[o,r[o]])),this._collection=new Dt(s.toDocument()).update(a),this._schemaOverride=r,this._componentMap=n,this._tagNamesOverride=i}_expansionRoot(e=null){let r=this.constructor._sourceClass,n=new r(null,this);return n.setBackref(),n.setItem($n,new r(null,this),e?{datapath:e}:null),n.getItem($n)}create(){this.setup(this.data),this._resolveComponents(),this.main(this.root),this.computeLogic(this._dataElementNodes())}get renderer_xml(){return new fr(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),i=n.renderChildren(n.preprocess(this.source),r);return this.materialized[e]=i,i}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 i=this.getRenderer(e);if(r===!1&&i.renderType!=="string")throw new TypeError("target=false is not valid for an object renderer");let s=r===!1?null:r||this._defaultTargets.get(i.mode)||null,a={...s?.renderOpts,...n};return i.finalize(this.materialize(e,a),s,a)}};mt._registry=new Map;var Kh=new Set(["short","medium","long","full"]),Qh=/('(?:[^']|'')*'|[a-zA-Z]+|[^a-zA-Z']+)/g;function e_(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||We(t).split("::").at(-1);if(!["D","H","DH","DHZ"].includes(r))throw new RangeError(`Unsupported temporal dtype: ${r}`);return r}function t_(t,e,r,n){let i=e.match(Qh)||[];if(i.join("")!==e)throw new RangeError("Unclosed format literal");let s=(c,f=2)=>String(c).padStart(f,"0"),a=c=>new Intl.DateTimeFormat(r,{timeZone:"UTC",...c}).format(t),u={...n==="H"?{}:{y:()=>String(t.getUTCFullYear()),yy:()=>s(t.getUTCFullYear()%100),yyyy:()=>s(t.getUTCFullYear(),4),M:()=>String(t.getUTCMonth()+1),MM:()=>s(t.getUTCMonth()+1),MMM:()=>a({month:"short"}),MMMM:()=>a({month:"long"}),d:()=>String(t.getUTCDate()),dd:()=>s(t.getUTCDate()),EEE:()=>a({weekday:"short"}),EEEE:()=>a({weekday:"long"})},...n==="D"?{}:{H:()=>String(t.getUTCHours()),HH:()=>s(t.getUTCHours()),h:()=>String(t.getUTCHours()%12||12),hh:()=>s(t.getUTCHours()%12||12),m:()=>String(t.getUTCMinutes()),mm:()=>s(t.getUTCMinutes()),s:()=>String(t.getUTCSeconds()),ss:()=>s(t.getUTCSeconds()),a:()=>new Intl.DateTimeFormat(r,{hour:"numeric",hour12:!0,timeZone:"UTC"}).formatToParts(t).find(c=>c.type==="dayPeriod").value}};return i.map(c=>{if(c.startsWith("'"))return c==="''"?"'":c.slice(1,-1).replaceAll("''","'");if(!/^[a-zA-Z]/.test(c))return c;if(!u[c])throw new RangeError(`Unsupported date format token: ${c}`);return u[c]()}).join("")}function mc(t,{format:e,mask:r,locale:n,dtype:i,places:s}={}){let a=t==null?"":String(t);if(t!=null&&t!==""&&(e!=null&&e!==""||s!=null))if(typeof t=="number"||Ze(t))a=n_(t,{format:e,locale:n,places:s});else{let o=e_(t,i);if(Kh.has(e)){let l={timeZone:"UTC"};o!=="H"&&(l.dateStyle=e),o!=="D"&&(l.timeStyle=e),a=new Intl.DateTimeFormat(n||void 0,l).format(t)}else a=t_(t,String(e),n||void 0,o)}return r==null?a:String(r).replaceAll("%s",()=>a)}function r_({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 n_(t,e={}){if(typeof t!="number"&&!Ze(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,r_(e));if(Ze(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(Ze(t)?t.toString():t)}var i_=new Set(["style","script"]),s_=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"]),hc=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"]),qn=new Set(["rounded","gradient","shadow","transform","transition","zoom","filter"]),_c=t=>t===!0?"true":t===!1?"false":String(t),Hi=t=>typeof t=="number"&&Number.isFinite(t)?`${t}px`:String(t);function a_(t){if(hc.has(t))return!0;for(let e of hc)if(t.startsWith(`${e}_`))return!0;return!1}function o_(t){let e=new Map;if(!t)return e;let r=[],n=0,i=null,s=!1,a=!1,o=0,l=String(t);for(let u=0;u<l.length;u+=1){let c=l[u],f=l[u+1];if(a){c==="*"&&f==="/"&&(a=!1,u+=1);continue}if(s){s=!1;continue}if(c==="\\"){s=!0;continue}if(i){c===i&&(i=null);continue}c==='"'||c==="'"?i=c:c==="/"&&f==="*"?(a=!0,u+=1):"([{".includes(c)?o+=1:")]}".includes(c)&&o>0?o-=1:c===";"&&o===0&&(r.push(l.slice(n,u)),n=u+1)}r.push(l.slice(n));for(let u of r){let c=u.trim();if(!c)continue;let f=c.indexOf(":");if(f<0)throw new TypeError(`malformed style declaration '${c}'`);e.set(c.slice(0,f).trim(),c.slice(f+1).trim())}return e}var jn=class extends cr{static mode="html";renderedItem(e,r,n,{tag:i,xml:s=!0,pretty:a=!1,depthOffset:o=0,includeDatapath:l=!1}={}){e.parentNode?._getMeta("subbuilder")==="html"&&(n={xmlns:"http://www.w3.org/1999/xhtml",...n});let{format:c,mask:f,locale:p,places:h,dtype:_,...g}=n;!Array.isArray(r)&&(c!=null||f!=null||h!=null)&&(r=mc(r,{format:c,mask:f,places:h,dtype:_,locale:this._displayLocale(e,p)}));let b=this._formatAttrs(g);if(l){if(!Object.hasOwn(n,"id")){let S=this.builder.targetId(e);S!==null&&(b+=` id="${this._htmlAttrValue(S)}"`)}for(let[S,B]of Object.entries(e.getAttr()))e.pointerType(B)&&(b+=` data-${this.adapt(S)}-pointer="${this._htmlAttrValue(e.absDatapath(B))}"`)}let k=a?" ".repeat(this._nodeDepth(e,o)):"",T=a?`
26
- `:"";if(e._getMeta("void"))return`${k}<${i}${b}${s?"/":""}>${T}`;if(Array.isArray(r)){let S=this._composeStringFragments(r);return`${k}<${i}${b}>${T}${S}${k}</${i}>${T}`}if(r==null)return`${k}<${i}${b}></${i}>${T}`;let A=typeof r=="string"&&r.endsWith("::HTML")?r.slice(0,-6):i_.has(i)?String(r):this._escapeText(r);return`${k}<${i}${b}>${A}</${i}>${T}`}_displayLocale(e,r){if(r)return r;for(let n=e.parentNode;n;n=n.parentNode){let i=n.getAttr("locale");if(i==null)continue;let s=n.pointerType(i)?n.data.getItem(n.absDatapath(i)):i;if(s)return s}}adaptAttrs(e){let r={},n={};for(let[s,a]of Object.entries(e||{}))if(s.startsWith(`${this.builder.constructor._name}_`))r[this.adapt(s)]=a;else if(s==="dtype")r.dtype=a;else{if(this.builder.constructor.retainedAttrPrefixes.some(o=>s.startsWith(o)))continue;this._isStyleContribution(s)?n[s]=a:r[s]=a}let i=this._adaptStyle(n);return i&&(r.style=i),r}_isStyleContribution(e){if(e==="style"||e.startsWith("style_")||qn.has(e))return!0;let r=e.includes("_")?e.slice(0,e.indexOf("_")):null;return r!==null&&qn.has(r)||a_(e)}_adaptStyle(e){let r=o_(e.style),n=new Map,i=new Map;for(let[s,a]of Object.entries(e))if(s!=="style")if(s.startsWith("style_"))r.set(s.slice(6).replaceAll("_","-"),_c(a));else if(qn.has(s))n.set(s,a);else{let o=s.indexOf("_"),l=o<0?s:s.slice(0,o);o>=0&&qn.has(l)?(i.has(l)||i.set(l,{}),i.get(l)[s.slice(o+1)]=a):r.set(s.replaceAll("_","-"),_c(a))}for(let s of qn)(n.has(s)||i.has(s))&&this[`_macro_${s}`](n.get(s),i.get(s)||{},r);return[...r].map(([s,a])=>`${s}: ${a}`).join("; ")}_formatAttrs(e){let r=[];for(let[n,i]of Object.entries(e||{}))s_.has(n)?i&&r.push(` ${n}`):r.push(` ${n}="${this._htmlAttrValue(i)}"`);return r.join("")}_htmlAttrValue(e){return(e===!0?"true":e===!1?"false":String(e)).replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;")}_macro_rounded(e,r,n){let i=e===void 0?{}:{top_left:e,top_right:e,bottom_left:e,bottom_right:e};for(let[s,a]of Object.entries(r))if(s==="top"||s==="bottom")i[`${s}_left`]=a,i[`${s}_right`]=a;else if(s==="left"||s==="right")i[`top_${s}`]=a,i[`bottom_${s}`]=a;else if(["top_left","top_right","bottom_left","bottom_right"].includes(s))i[s]=a;else throw new TypeError(`rounded: unknown sub-kwarg '${s}'`);for(let[s,a]of Object.entries(i))n.set(`border-${s.replaceAll("_","-")}-radius`,Hi(a))}_macro_transform(e,r,n){let i=e===void 0?[]:[String(e)];for(let[s,a]of Object.entries(r))s==="rotate"?i.push(`rotate(${a}deg)`):s==="scale"||s==="translate"?i.push(`${s}(${a})`):s==="translate_x"?i.push(`translateX(${Hi(a)})`):s==="translate_y"?i.push(`translateY(${Hi(a)})`):s==="skew_x"?i.push(`skewX(${a}deg)`):s==="skew_y"?i.push(`skewY(${a}deg)`):i.push(`${s.replaceAll("_","-")}(${a})`);i.length&&n.set("transform",i.join(" "))}_macro_filter(e,r,n){let i=e===void 0?[]:[String(e)];for(let[s,a]of Object.entries(r))s==="rotate"?i.push(`hue-rotate(${a}deg)`):s==="blur"?i.push(`blur(${Hi(a)})`):s==="drop_shadow"?i.push(`drop-shadow(${a})`):i.push(`${s.replaceAll("_","-")}(${a})`);i.length&&n.set("filter",i.join(" "))}_macro_transition(e,r,n){e!==void 0&&n.set("transition",String(e));for(let[i,s]of Object.entries(r))n.set(`transition-${i.replaceAll("_","-")}`,String(s))}_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[i,s]of Object.entries(r))n.set(`box-shadow-${i.replaceAll("_","-")}`,String(s))}_macro_gradient(e,r,n){e!==void 0&&n.set("background-image",String(e))}};var l_=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 gc(t){return Object.fromEntries(Object.entries(t||{}).map(([e,r])=>[l_.has(e)?e.replaceAll("_","-"):e,r]))}var zn=class extends fr{static mode="svg";adaptAttrs(e){return gc(e)}};var bc={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 Wi=class extends mt{static _name="html";static _defaultRenderMode="html";static retainedAttrPrefixes=["validate_","dtype"];static{this.defineGrammar(bc)}get renderer_html(){return new jn(this)}};mt.registerBuilder(Wi);var wc={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 Gi=class extends mt{static _name="svg";static _defaultRenderMode="svg";static{this.defineGrammar(wc)}get renderer_svg(){return new zn(this)}};mt.registerBuilder(Gi);var Yr="http://www.w3.org/2000/svg";var f_=(0,It.defineComponent)({name:"tree",tag:"gramlot-tree",base:Os,sourceContext:!0,bagStore:!0,dragSource:!0,parameters:{storepath:{dtype:"T"},draggable:{dtype:"B",default:!1,binding:"read"},labelAttribute:{dtype:"T",nullable:!0,default:null,binding:"read"},hideValues:{dtype:"B",default:!1,binding:"read"},labelCb:{dtype:"T",nullable:!0,default:null},getLabel:{dtype:"T",nullable:!0,default:null},getLabelClass:{dtype:"T",nullable:!0,default:null},getIconClass:{dtype:"T",nullable:!0,default:null},selectedLabelClass:{dtype:"T",default:"",binding:"read"},searchText:{dtype:"T",default:"",binding:"read"},autoCollapse:{dtype:"B",default:!1,binding:"read"},selectedPath:{dtype:"T",nullable:!0,default:null,binding:"twoWay"}},implementation:t=>class extends t{#e;#o;#l;#n=new Set;#i=new Map;#E=new WeakMap;#k=new Map;#A;#p=null;#T=!1;#u=new Set;#r=new Map;#m="";#t="";#c=null;#D=0;#s=new Set;#h=new WeakSet;#_=new WeakSet;#f=!1;#g=new Map;constructor(){super(),this.#o=$o(this.ownerDocument.defaultView),this.control.replaceChildren(),this.control.setAttribute("role","tree"),this.control.setAttribute("aria-label","Tree"),this.control.classList.add("tree"),this.control.setAttribute("part","tree");let e=this.ownerDocument.createElement("style");e.textContent=`
15
+ */var Bt=9e15,it=1e9,Gn="0123456789abcdef",Zr="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Jr="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Yn={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-Bt,maxE:Bt,crypto:!1},da,Xe,I=!0,Qr="[DecimalError] ",at=Qr+"Invalid argument: ",fa=Qr+"Precision limit exceeded",pa=Qr+"crypto unavailable",ha="[object Decimal]",me=Math.floor,ie=Math.pow,Ho=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,Wo=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Xo=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,ma=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Oe=1e7,S=7,Go=9007199254740991,Yo=Zr.length-1,Zn=Jr.length-1,_={toStringTag:ha};_.absoluteValue=_.abs=function(){var t=new this.constructor(this);return t.s<0&&(t.s=1),T(t)};_.ceil=function(){return T(new this.constructor(this),this.e+1,2)};_.clampedTo=_.clamp=function(t,e){var r,n=this,s=n.constructor;if(t=new s(t),e=new s(e),!t.s||!e.s)return new s(NaN);if(t.gt(e))throw Error(at+e);return r=n.cmp(t),r<0?t:n.cmp(e)>0?e:new s(n)};_.comparedTo=_.cmp=function(t){var e,r,n,s,a=this,i=a.d,o=(t=new a.constructor(t)).d,l=a.s,u=t.s;if(!i||!o)return!l||!u?NaN:l!==u?l:i===o?0:!i^l<0?1:-1;if(!i[0]||!o[0])return i[0]?l:o[0]?-u:0;if(l!==u)return l;if(a.e!==t.e)return a.e>t.e^l<0?1:-1;for(n=i.length,s=o.length,e=0,r=n<s?n:s;e<r;++e)if(i[e]!==o[e])return i[e]>o[e]^l<0?1:-1;return n===s?0:n>s^l<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())+S,n.rounding=1,r=Zo(n,ya(n,r)),n.precision=t,n.rounding=e,T(Xe==2||Xe==3?r.neg():r,t,e,!0)):new n(1):new n(NaN)};_.cubeRoot=_.cbrt=function(){var t,e,r,n,s,a,i,o,l,u,c=this,d=c.constructor;if(!c.isFinite()||c.isZero())return new d(c);for(I=!1,a=c.s*ie(c.s*c,1/3),!a||Math.abs(a)==1/0?(r=fe(c.d),t=c.e,(a=(t-r.length+1)%3)&&(r+=a==1||a==-2?"0":"00"),a=ie(r,1/3),t=me((t+1)/3)-(t%3==(t<0?-1:2)),a==1/0?r="5e"+t:(r=a.toExponential(),r=r.slice(0,r.indexOf("e")+1)+t),n=new d(r),n.s=c.s):n=new d(a.toString()),i=(t=d.precision)+3;;)if(o=n,l=o.times(o).times(o),u=l.plus(c),n=G(u.plus(c).times(o),u.plus(l),i+2,1),fe(o.d).slice(0,i)===(r=fe(n.d)).slice(0,i))if(r=r.slice(i-3,i+1),r=="9999"||!s&&r=="4999"){if(!s&&(T(o,t+1,0),o.times(o).times(o).eq(c))){n=o;break}i+=4,s=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(T(n,t+1,1),e=!n.times(n).times(n).eq(c));break}return I=!0,T(n,t,d.rounding,e)};_.decimalPlaces=_.dp=function(){var t,e=this.d,r=NaN;if(e){if(t=e.length-1,r=(t-me(this.e/S))*S,t=e[t],t)for(;t%10==0;t/=10)r--;r<0&&(r=0)}return r};_.dividedBy=_.div=function(t){return G(this,new this.constructor(t))};_.dividedToIntegerBy=_.divToInt=function(t){var e=this,r=e.constructor;return T(G(e,new r(t),0,1,1),r.precision,r.rounding)};_.equals=_.eq=function(t){return this.cmp(t)===0};_.floor=function(){return T(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,s,a=this,i=a.constructor,o=new i(1);if(!a.isFinite())return new i(a.s?1/0:NaN);if(a.isZero())return o;r=i.precision,n=i.rounding,i.precision=r+Math.max(a.e,a.sd())+4,i.rounding=1,s=a.d.length,s<32?(t=Math.ceil(s/3),e=(1/tn(4,t)).toString()):(t=16,e="2.3283064365386962890625e-10"),a=It(i,1,a.times(e),new i(1),!0);for(var l,u=t,c=new i(8);u--;)l=a.times(a),a=o.minus(l.times(c.minus(l.times(c))));return T(a,i.precision=r,i.rounding=n,!0)};_.hyperbolicSine=_.sinh=function(){var t,e,r,n,s=this,a=s.constructor;if(!s.isFinite()||s.isZero())return new a(s);if(e=a.precision,r=a.rounding,a.precision=e+Math.max(s.e,s.sd())+4,a.rounding=1,n=s.d.length,n<3)s=It(a,2,s,s,!0);else{t=1.4*Math.sqrt(n),t=t>16?16:t|0,s=s.times(1/tn(5,t)),s=It(a,2,s,s,!0);for(var i,o=new a(5),l=new a(16),u=new a(20);t--;)i=s.times(s),s=s.times(o.plus(i.times(l.times(i).plus(u))))}return a.precision=e,a.rounding=r,T(s,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,G(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,s=e.rounding;return r!==-1?r===0?t.isNeg()?$e(e,n,s):new e(0):new e(NaN):t.isZero()?$e(e,n+4,s).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=s,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,I=!1,r=r.times(r).minus(1).sqrt().plus(r),I=!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,I=!1,r=r.times(r).plus(1).sqrt().plus(r),I=!0,n.precision=t,n.rounding=e,r.ln())};_.inverseHyperbolicTangent=_.atanh=function(){var t,e,r,n,s=this,a=s.constructor;return s.isFinite()?s.e>=0?new a(s.abs().eq(1)?s.s/0:s.isZero()?s:NaN):(t=a.precision,e=a.rounding,n=s.sd(),Math.max(n,t)<2*-s.e-1?T(new a(s),t,e,!0):(a.precision=r=n-s.e,s=G(s.plus(1),new a(1).minus(s),r+t,1),a.precision=t+4,a.rounding=1,s=s.ln(),a.precision=t,a.rounding=e,s.times(.5))):new a(NaN)};_.inverseSine=_.asin=function(){var t,e,r,n,s=this,a=s.constructor;return s.isZero()?new a(s):(e=s.abs().cmp(1),r=a.precision,n=a.rounding,e!==-1?e===0?(t=$e(a,r+4,n).times(.5),t.s=s.s,t):new a(NaN):(a.precision=r+6,a.rounding=1,s=s.div(new a(1).minus(s.times(s)).sqrt().plus(1)).atan(),a.precision=r,a.rounding=n,s.times(2)))};_.inverseTangent=_.atan=function(){var t,e,r,n,s,a,i,o,l,u=this,c=u.constructor,d=c.precision,f=c.rounding;if(u.isFinite()){if(u.isZero())return new c(u);if(u.abs().eq(1)&&d+4<=Zn)return i=$e(c,d+4,f).times(.25),i.s=u.s,i}else{if(!u.s)return new c(NaN);if(d+4<=Zn)return i=$e(c,d+4,f).times(.5),i.s=u.s,i}for(c.precision=o=d+10,c.rounding=1,r=Math.min(28,o/S+2|0),t=r;t;--t)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(I=!1,e=Math.ceil(o/S),n=1,l=u.times(u),i=new c(u),s=u;t!==-1;)if(s=s.times(l),a=i.minus(s.div(n+=2)),s=s.times(l),i=a.plus(s.div(n+=2)),i.d[e]!==void 0)for(t=e;i.d[t]===a.d[t]&&t--;);return r&&(i=i.times(2<<r-1)),I=!0,T(i,c.precision=d,c.rounding=f,!0)};_.isFinite=function(){return!!this.d};_.isInteger=_.isInt=function(){return!!this.d&&me(this.e/S)>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,s,a,i,o,l,u=this,c=u.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=u.d,u.s<0||!r||!r[0]||u.eq(1))return new c(r&&!r[0]?-1/0:u.s!=1?NaN:r?0:1/0);if(e)if(r.length>1)a=!0;else{for(s=r[0];s%10===0;)s/=10;a=s!==1}if(I=!1,o=d+p,i=st(u,o),n=e?Kr(c,o+10):st(t,o),l=G(i,n,o,1),ir(l.d,s=d,f))do if(o+=10,i=st(u,o),n=e?Kr(c,o+10):st(t,o),l=G(i,n,o,1),!a){+fe(l.d).slice(s+1,s+15)+1==1e14&&(l=T(l,d+1,0));break}while(ir(l.d,s+=10,f));return I=!0,T(l,d,f)};_.minus=_.sub=function(t){var e,r,n,s,a,i,o,l,u,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(u=p.d,f=t.d,o=h.precision,l=h.rounding,!u[0]||!f[0]){if(f[0])t.s=-t.s;else if(u[0])t=new h(p);else return new h(l===3?-0:0);return I?T(t,o,l):t}if(r=me(t.e/S),c=me(p.e/S),u=u.slice(),a=c-r,a){for(d=a<0,d?(e=u,a=-a,i=f.length):(e=f,r=c,i=u.length),n=Math.max(Math.ceil(o/S),i)+2,a>n&&(a=n,e.length=1),e.reverse(),n=a;n--;)e.push(0);e.reverse()}else{for(n=u.length,i=f.length,d=n<i,d&&(i=n),n=0;n<i;n++)if(u[n]!=f[n]){d=u[n]<f[n];break}a=0}for(d&&(e=u,u=f,f=e,t.s=-t.s),i=u.length,n=f.length-i;n>0;--n)u[i++]=0;for(n=f.length;n>a;){if(u[--n]<f[n]){for(s=n;s&&u[--s]===0;)u[s]=Oe-1;--u[s],u[n]+=Oe}u[n]-=f[n]}for(;u[--i]===0;)u.pop();for(;u[0]===0;u.shift())--r;return u[0]?(t.d=u,t.e=en(u,r),I?T(t,o,l):t):new h(l===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]?T(new n(r),n.precision,n.rounding):(I=!1,n.modulo==9?(e=G(r,t.abs(),0,3,1),e.s*=t.s):e=G(r,t,0,n.modulo,1),e=e.times(t),I=!0,r.minus(e))};_.naturalExponential=_.exp=function(){return Jn(this)};_.naturalLogarithm=_.ln=function(){return st(this)};_.negated=_.neg=function(){var t=new this.constructor(this);return t.s=-t.s,T(t)};_.plus=_.add=function(t){var e,r,n,s,a,i,o,l,u,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(u=d.d,c=t.d,o=f.precision,l=f.rounding,!u[0]||!c[0])return c[0]||(t=new f(d)),I?T(t,o,l):t;if(a=me(d.e/S),n=me(t.e/S),u=u.slice(),s=a-n,s){for(s<0?(r=u,s=-s,i=c.length):(r=c,n=a,i=u.length),a=Math.ceil(o/S),i=a>i?a+1:i+1,s>i&&(s=i,r.length=1),r.reverse();s--;)r.push(0);r.reverse()}for(i=u.length,s=c.length,i-s<0&&(s=i,r=c,c=u,u=r),e=0;s;)e=(u[--s]=u[s]+c[s]+e)/Oe|0,u[s]%=Oe;for(e&&(u.unshift(e),++n),i=u.length;u[--i]==0;)u.pop();return t.d=u,t.e=en(u,n),I?T(t,o,l):t};_.precision=_.sd=function(t){var e,r=this;if(t!==void 0&&t!==!!t&&t!==1&&t!==0)throw Error(at+t);return r.d?(e=_a(r.d),t&&r.e+1>e&&(e=r.e+1)):e=NaN,e};_.round=function(){var t=this,e=t.constructor;return T(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())+S,n.rounding=1,r=Ko(n,ya(n,r)),n.precision=t,n.rounding=e,T(Xe>2?r.neg():r,t,e,!0)):new n(NaN)};_.squareRoot=_.sqrt=function(){var t,e,r,n,s,a,i=this,o=i.d,l=i.e,u=i.s,c=i.constructor;if(u!==1||!o||!o[0])return new c(!u||u<0&&(!o||o[0])?NaN:o?i:1/0);for(I=!1,u=Math.sqrt(+i),u==0||u==1/0?(e=fe(o),(e.length+l)%2==0&&(e+="0"),u=Math.sqrt(e),l=me((l+1)/2)-(l<0||l%2),u==1/0?e="5e"+l:(e=u.toExponential(),e=e.slice(0,e.indexOf("e")+1)+l),n=new c(e)):n=new c(u.toString()),r=(l=c.precision)+3;;)if(a=n,n=a.plus(G(i,a,r+2,1)).times(.5),fe(a.d).slice(0,r)===(e=fe(n.d)).slice(0,r))if(e=e.slice(r-3,r+1),e=="9999"||!s&&e=="4999"){if(!s&&(T(a,l+1,0),a.times(a).eq(i))){n=a;break}r+=4,s=1}else{(!+e||!+e.slice(1)&&e.charAt(0)=="5")&&(T(n,l+1,1),t=!n.times(n).eq(i));break}return I=!0,T(n,l,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=G(r,new n(1).minus(r.times(r)).sqrt(),t+10,0),n.precision=t,n.rounding=e,T(Xe==2||Xe==4?r.neg():r,t,e,!0)):new n(NaN)};_.times=_.mul=function(t){var e,r,n,s,a,i,o,l,u,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=me(c.e/S)+me(t.e/S),l=f.length,u=p.length,l<u&&(a=f,f=p,p=a,i=l,l=u,u=i),a=[],i=l+u,n=i;n--;)a.push(0);for(n=u;--n>=0;){for(e=0,s=l+n;s>n;)o=a[s]+p[n]*f[s-n-1]+e,a[s--]=o%Oe|0,e=o/Oe|0;a[s]=(a[s]+e)%Oe|0}for(;!a[--i];)a.pop();return e?++r:a.shift(),t.d=a,t.e=en(a,r),I?T(t,d.precision,d.rounding):t};_.toBinary=function(t,e){return Kn(this,2,t,e)};_.toDecimalPlaces=_.toDP=function(t,e){var r=this,n=r.constructor;return r=new n(r),t===void 0?r:(ve(t,0,it),e===void 0?e=n.rounding:ve(e,0,8),T(r,t+r.e+1,e))};_.toExponential=function(t,e){var r,n=this,s=n.constructor;return t===void 0?r=Fe(n,!0):(ve(t,0,it),e===void 0?e=s.rounding:ve(e,0,8),n=T(new s(n),t+1,e),r=Fe(n,!0,t+1)),n.isNeg()&&!n.isZero()?"-"+r:r};_.toFixed=function(t,e){var r,n,s=this,a=s.constructor;return t===void 0?r=Fe(s):(ve(t,0,it),e===void 0?e=a.rounding:ve(e,0,8),n=T(new a(s),t+s.e+1,e),r=Fe(n,!1,t+n.e+1)),s.isNeg()&&!s.isZero()?"-"+r:r};_.toFraction=function(t){var e,r,n,s,a,i,o,l,u,c,d,f,p=this,h=p.d,m=p.constructor;if(!h)return new m(p);if(u=r=new m(1),n=l=new m(0),e=new m(n),a=e.e=_a(h)-p.e-1,i=a%S,e.d[0]=ie(10,i<0?S+i:i),t==null)t=a>0?e:u;else{if(o=new m(t),!o.isInt()||o.lt(u))throw Error(at+o);t=o.gt(e)?a>0?e:u:o}for(I=!1,o=new m(fe(h)),c=m.precision,m.precision=a=h.length*S*2;d=G(o,e,0,1,1),s=r.plus(d.times(n)),s.cmp(t)!=1;)r=n,n=s,s=u,u=l.plus(d.times(s)),l=s,s=e,e=o.minus(d.times(s)),o=s;return s=G(t.minus(r),n,0,1,1),l=l.plus(s.times(u)),r=r.plus(s.times(n)),l.s=u.s=p.s,f=G(u,n,a,1).minus(p).abs().cmp(G(l,r,a,1).minus(p).abs())<1?[u,n]:[l,r],m.precision=c,I=!0,f};_.toHexadecimal=_.toHex=function(t,e){return Kn(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:ve(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]?(I=!1,r=G(r,t,0,e,1).times(t),I=!0,T(r)):(t.s=r.s,r=t),r};_.toNumber=function(){return+this};_.toOctal=function(t,e){return Kn(this,8,t,e)};_.toPower=_.pow=function(t){var e,r,n,s,a,i,o=this,l=o.constructor,u=+(t=new l(t));if(!o.d||!t.d||!o.d[0]||!t.d[0])return new l(ie(+o,u));if(o=new l(o),o.eq(1))return o;if(n=l.precision,a=l.rounding,t.eq(1))return T(o,n,a);if(e=me(t.e/S),e>=t.d.length-1&&(r=u<0?-u:u)<=Go)return s=ga(l,o,r,n),t.s<0?new l(1).div(s):T(s,n,a);if(i=o.s,i<0){if(e<t.d.length-1)return new l(NaN);if((t.d[e]&1)==0&&(i=1),o.e==0&&o.d[0]==1&&o.d.length==1)return o.s=i,o}return r=ie(+o,u),e=r==0||!isFinite(r)?me(u*(Math.log("0."+fe(o.d))/Math.LN10+o.e+1)):new l(r+"").e,e>l.maxE+1||e<l.minE-1?new l(e>0?i/0:0):(I=!1,l.rounding=o.s=1,r=Math.min(12,(e+"").length),s=Jn(t.times(st(o,n+r)),n),s.d&&(s=T(s,n+5,1),ir(s.d,n,a)&&(e=n+10,s=T(Jn(t.times(st(o,e+r)),e),e+5,1),+fe(s.d).slice(n+1,n+15)+1==1e14&&(s=T(s,n+1,0)))),s.s=i,I=!0,l.rounding=a,T(s,n,a))};_.toPrecision=function(t,e){var r,n=this,s=n.constructor;return t===void 0?r=Fe(n,n.e<=s.toExpNeg||n.e>=s.toExpPos):(ve(t,1,it),e===void 0?e=s.rounding:ve(e,0,8),n=T(new s(n),t,e),r=Fe(n,t<=n.e||n.e<=s.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):(ve(t,1,it),e===void 0?e=n.rounding:ve(e,0,8)),T(new n(r),t,e)};_.toString=function(){var t=this,e=t.constructor,r=Fe(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()&&!t.isZero()?"-"+r:r};_.truncated=_.trunc=function(){return T(new this.constructor(this),this.e+1,1)};_.valueOf=_.toJSON=function(){var t=this,e=t.constructor,r=Fe(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()?"-"+r:r};function fe(t){var e,r,n,s=t.length-1,a="",i=t[0];if(s>0){for(a+=i,e=1;e<s;e++)n=t[e]+"",r=S-n.length,r&&(a+=nt(r)),a+=n;i=t[e],n=i+"",r=S-n.length,r&&(a+=nt(r))}else if(i===0)return"0";for(;i%10===0;)i/=10;return a+i}function ve(t,e,r){if(t!==~~t||t<e||t>r)throw Error(at+t)}function ir(t,e,r,n){var s,a,i,o;for(a=t[0];a>=10;a/=10)--e;return--e<0?(e+=S,s=0):(s=Math.ceil((e+1)/S),e%=S),a=ie(10,S-e),o=t[s]%a|0,n==null?e<3?(e==0?o=o/100|0:e==1&&(o=o/10|0),i=r<4&&o==99999||r>3&&o==49999||o==5e4||o==0):i=(r<4&&o+1==a||r>3&&o+1==a/2)&&(t[s+1]/a/100|0)==ie(10,e-2)-1||(o==a/2||o==0)&&(t[s+1]/a/100|0)==0:e<4?(e==0?o=o/1e3|0:e==1?o=o/100|0:e==2&&(o=o/10|0),i=(n||r<4)&&o==9999||!n&&r>3&&o==4999):i=((n||r<4)&&o+1==a||!n&&r>3&&o+1==a/2)&&(t[s+1]/a/1e3|0)==ie(10,e-3)-1,i}function Gr(t,e,r){for(var n,s=[0],a,i=0,o=t.length;i<o;){for(a=s.length;a--;)s[a]*=e;for(s[0]+=Gn.indexOf(t.charAt(i++)),n=0;n<s.length;n++)s[n]>r-1&&(s[n+1]===void 0&&(s[n+1]=0),s[n+1]+=s[n]/r|0,s[n]%=r)}return s.reverse()}function Zo(t,e){var r,n,s;if(e.isZero())return e;n=e.d.length,n<32?(r=Math.ceil(n/3),s=(1/tn(4,r)).toString()):(r=16,s="2.3283064365386962890625e-10"),t.precision+=r,e=It(t,1,e.times(s),new t(1));for(var a=r;a--;){var i=e.times(e);e=i.times(i).minus(i).times(8).plus(1)}return t.precision-=r,e}var G=(function(){function t(n,s,a){var i,o=0,l=n.length;for(n=n.slice();l--;)i=n[l]*s+o,n[l]=i%a|0,o=i/a|0;return o&&n.unshift(o),n}function e(n,s,a,i){var o,l;if(a!=i)l=a>i?1:-1;else for(o=l=0;o<a;o++)if(n[o]!=s[o]){l=n[o]>s[o]?1:-1;break}return l}function r(n,s,a,i){for(var o=0;a--;)n[a]-=o,o=n[a]<s[a]?1:0,n[a]=o*i+n[a]-s[a];for(;!n[0]&&n.length>1;)n.shift()}return function(n,s,a,i,o,l){var u,c,d,f,p,h,m,g,w,b,v,k,D,y,C,V,Y,U,B,X,J=n.constructor,$=n.s==s.s?1:-1,W=n.d,N=s.d;if(!W||!W[0]||!N||!N[0])return new J(!n.s||!s.s||(W?N&&W[0]==N[0]:!N)?NaN:W&&W[0]==0||!N?$*0:$/0);for(l?(p=1,c=n.e-s.e):(l=Oe,p=S,c=me(n.e/p)-me(s.e/p)),B=N.length,Y=W.length,w=new J($),b=w.d=[],d=0;N[d]==(W[d]||0);d++);if(N[d]>(W[d]||0)&&c--,a==null?(y=a=J.precision,i=J.rounding):o?y=a+(n.e-s.e)+1:y=a,y<0)b.push(1),h=!0;else{if(y=y/p+2|0,d=0,B==1){for(f=0,N=N[0],y++;(d<Y||f)&&y--;d++)C=f*l+(W[d]||0),b[d]=C/N|0,f=C%N|0;h=f||d<Y}else{for(f=l/(N[0]+1)|0,f>1&&(N=t(N,f,l),W=t(W,f,l),B=N.length,Y=W.length),V=B,v=W.slice(0,B),k=v.length;k<B;)v[k++]=0;X=N.slice(),X.unshift(0),U=N[0],N[1]>=l/2&&++U;do f=0,u=e(N,v,B,k),u<0?(D=v[0],B!=k&&(D=D*l+(v[1]||0)),f=D/U|0,f>1?(f>=l&&(f=l-1),m=t(N,f,l),g=m.length,k=v.length,u=e(m,v,g,k),u==1&&(f--,r(m,B<g?X:N,g,l))):(f==0&&(u=f=1),m=N.slice()),g=m.length,g<k&&m.unshift(0),r(v,m,k,l),u==-1&&(k=v.length,u=e(N,v,B,k),u<1&&(f++,r(v,B<k?X:N,k,l))),k=v.length):u===0&&(f++,v=[0]),b[d++]=f,u&&v[0]?v[k++]=W[V]||0:(v=[W[V]],k=1);while((V++<Y||v[0]!==void 0)&&y--);h=v[0]!==void 0}b[0]||b.shift()}if(p==1)w.e=c,da=h;else{for(d=1,f=b[0];f>=10;f/=10)d++;w.e=d+c*p-1,T(w,o?a+w.e+1:a,i,h)}return w}})();function T(t,e,r,n){var s,a,i,o,l,u,c,d,f,p=t.constructor;e:if(e!=null){if(d=t.d,!d)return t;for(s=1,o=d[0];o>=10;o/=10)s++;if(a=e-s,a<0)a+=S,i=e,c=d[f=0],l=c/ie(10,s-i-1)%10|0;else if(f=Math.ceil((a+1)/S),o=d.length,f>=o)if(n){for(;o++<=f;)d.push(0);c=l=0,s=1,a%=S,i=a-S+1}else break e;else{for(c=o=d[f],s=1;o>=10;o/=10)s++;a%=S,i=a-S+s,l=i<0?0:c/ie(10,s-i-1)%10|0}if(n=n||e<0||d[f+1]!==void 0||(i<0?c:c%ie(10,s-i-1)),u=r<4?(l||n)&&(r==0||r==(t.s<0?3:2)):l>5||l==5&&(r==4||n||r==6&&(a>0?i>0?c/ie(10,s-i):0:d[f-1])%10&1||r==(t.s<0?8:7)),e<1||!d[0])return d.length=0,u?(e-=t.e+1,d[0]=ie(10,(S-e%S)%S),t.e=-e||0):d[0]=t.e=0,t;if(a==0?(d.length=f,o=1,f--):(d.length=f+1,o=ie(10,S-a),d[f]=i>0?(c/ie(10,s-i)%ie(10,i)|0)*o:0),u)for(;;)if(f==0){for(a=1,i=d[0];i>=10;i/=10)a++;for(i=d[0]+=o,o=1;i>=10;i/=10)o++;a!=o&&(t.e++,d[0]==Oe&&(d[0]=1));break}else{if(d[f]+=o,d[f]!=Oe)break;d[f--]=0,o=1}for(a=d.length;d[--a]===0;)d.pop()}return I&&(t.e>p.maxE?(t.d=null,t.e=NaN):t.e<p.minE&&(t.e=0,t.d=[0])),t}function Fe(t,e,r){if(!t.isFinite())return wa(t);var n,s=t.e,a=fe(t.d),i=a.length;return e?(r&&(n=r-i)>0?a=a.charAt(0)+"."+a.slice(1)+nt(n):i>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(t.e<0?"e":"e+")+t.e):s<0?(a="0."+nt(-s-1)+a,r&&(n=r-i)>0&&(a+=nt(n))):s>=i?(a+=nt(s+1-i),r&&(n=r-s-1)>0&&(a=a+"."+nt(n))):((n=s+1)<i&&(a=a.slice(0,n)+"."+a.slice(n)),r&&(n=r-i)>0&&(s+1===i&&(a+="."),a+=nt(n))),a}function en(t,e){var r=t[0];for(e*=S;r>=10;r/=10)e++;return e}function Kr(t,e,r){if(e>Yo)throw I=!0,r&&(t.precision=r),Error(fa);return T(new t(Zr),e,1,!0)}function $e(t,e,r){if(e>Zn)throw Error(fa);return T(new t(Jr),e,r,!0)}function _a(t){var e=t.length-1,r=e*S+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 nt(t){for(var e="";t--;)e+="0";return e}function ga(t,e,r,n){var s,a=new t(1),i=Math.ceil(n/S+4);for(I=!1;;){if(r%2&&(a=a.times(e),ua(a.d,i)&&(s=!0)),r=me(r/2),r===0){r=a.d.length-1,s&&a.d[r]===0&&++a.d[r];break}e=e.times(e),ua(e.d,i)}return I=!0,a}function la(t){return t.d[t.d.length-1]&1}function ba(t,e,r){for(var n,s,a=new t(e[0]),i=0;++i<e.length;){if(s=new t(e[i]),!s.s){a=s;break}n=a.cmp(s),(n===r||n===0&&a.s===r)&&(a=s)}return a}function Jn(t,e){var r,n,s,a,i,o,l,u=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?(I=!1,l=h):l=e,o=new f(.03125);t.e>-2;)t=t.times(o),d+=5;for(n=Math.log(ie(2,d))/Math.LN10*2+5|0,l+=n,r=a=i=new f(1),f.precision=l;;){if(a=T(a.times(t),l,1),r=r.times(++c),o=i.plus(G(a,r,l,1)),fe(o.d).slice(0,l)===fe(i.d).slice(0,l)){for(s=d;s--;)i=T(i.times(i),l,1);if(e==null)if(u<3&&ir(i.d,l-n,p,u))f.precision=l+=10,r=a=o=new f(1),c=0,u++;else return T(i,f.precision=h,p,I=!0);else return f.precision=h,i}i=o}}function st(t,e){var r,n,s,a,i,o,l,u,c,d,f,p=1,h=10,m=t,g=m.d,w=m.constructor,b=w.rounding,v=w.precision;if(m.s<0||!g||!g[0]||!m.e&&g[0]==1&&g.length==1)return new w(g&&!g[0]?-1/0:m.s!=1?NaN:g?0:m);if(e==null?(I=!1,c=v):c=e,w.precision=c+=h,r=fe(g),n=r.charAt(0),Math.abs(a=m.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)m=m.times(t),r=fe(m.d),n=r.charAt(0),p++;a=m.e,n>1?(m=new w("0."+r),a++):m=new w(n+"."+r.slice(1))}else return u=Kr(w,c+2,v).times(a+""),m=st(new w(n+"."+r.slice(1)),c-h).plus(u),w.precision=v,e==null?T(m,v,b,I=!0):m;for(d=m,l=i=m=G(m.minus(1),m.plus(1),c,1),f=T(m.times(m),c,1),s=3;;){if(i=T(i.times(f),c,1),u=l.plus(G(i,new w(s),c,1)),fe(u.d).slice(0,c)===fe(l.d).slice(0,c))if(l=l.times(2),a!==0&&(l=l.plus(Kr(w,c+2,v).times(a+""))),l=G(l,new w(p),c,1),e==null)if(ir(l.d,c-h,b,o))w.precision=c+=h,u=i=m=G(d.minus(1),d.plus(1),c,1),f=T(m.times(m),c,1),s=o=1;else return T(l,w.precision=v,b,I=!0);else return w.precision=v,l;l=u,s+=2}}function wa(t){return String(t.s*t.s/0)}function Yr(t,e){var r,n,s;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(s=e.length;e.charCodeAt(s-1)===48;--s);if(e=e.slice(n,s),e){if(s-=n,t.e=r=r-n-1,t.d=[],n=(r+1)%S,r<0&&(n+=S),n<s){for(n&&t.d.push(+e.slice(0,n)),s-=S;n<s;)t.d.push(+e.slice(n,n+=S));e=e.slice(n),n=S-e.length}else n-=s;for(;n--;)e+="0";t.d.push(+e),I&&(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 Jo(t,e){var r,n,s,a,i,o,l,u,c;if(e.indexOf("_")>-1){if(e=e.replace(/(\d)_(?=\d)/g,"$1"),ma.test(e))return Yr(t,e)}else if(e==="Infinity"||e==="NaN")return+e||(t.s=NaN),t.e=NaN,t.d=null,t;if(Wo.test(e))r=16,e=e.toLowerCase();else if(Ho.test(e))r=2;else if(Xo.test(e))r=8;else throw Error(at+e);for(a=e.search(/p/i),a>0?(l=+e.slice(a+1),e=e.substring(2,a)):e=e.slice(2),a=e.indexOf("."),i=a>=0,n=t.constructor,i&&(e=e.replace(".",""),o=e.length,a=o-a,s=ga(n,new n(r),a,a*2)),u=Gr(e,r,Oe),c=u.length-1,a=c;u[a]===0;--a)u.pop();return a<0?new n(t.s*0):(t.e=en(u,c),t.d=u,I=!1,i&&(t=G(t,s,o*4)),l&&(t=t.times(Math.abs(l)<54?ie(2,l):or.pow(2,l))),I=!0,t)}function Ko(t,e){var r,n=e.d.length;if(n<3)return e.isZero()?e:It(t,2,e,e);r=1.4*Math.sqrt(n),r=r>16?16:r|0,e=e.times(1/tn(5,r)),e=It(t,2,e,e);for(var s,a=new t(5),i=new t(16),o=new t(20);r--;)s=e.times(e),e=e.times(a.plus(s.times(i.times(s).minus(o))));return e}function It(t,e,r,n,s){var a,i,o,l,u=1,c=t.precision,d=Math.ceil(c/S);for(I=!1,l=r.times(r),o=new t(n);;){if(i=G(o.times(l),new t(e++*e++),c,1),o=s?n.plus(i):n.minus(i),n=G(i.times(l),new t(e++*e++),c,1),i=o.plus(n),i.d[d]!==void 0){for(a=d;i.d[a]===o.d[a]&&a--;);if(a==-1)break}a=o,o=n,n=i,i=a,u++}return I=!0,i.d.length=d+1,i}function tn(t,e){for(var r=t;--e;)r*=t;return r}function ya(t,e){var r,n=e.s<0,s=$e(t,t.precision,1),a=s.times(.5);if(e=e.abs(),e.lte(a))return Xe=n?4:1,e;if(r=e.divToInt(s),r.isZero())Xe=n?3:2;else{if(e=e.minus(r.times(s)),e.lte(a))return Xe=la(r)?n?2:3:n?4:1,e;Xe=la(r)?n?1:4:n?3:2}return e.minus(s).abs()}function Kn(t,e,r,n){var s,a,i,o,l,u,c,d,f,p=t.constructor,h=r!==void 0;if(h?(ve(r,1,it),n===void 0?n=p.rounding:ve(n,0,8)):(r=p.precision,n=p.rounding),!t.isFinite())c=wa(t);else{for(c=Fe(t),i=c.indexOf("."),h?(s=2,e==16?r=r*4-3:e==8&&(r=r*3-2)):s=e,i>=0&&(c=c.replace(".",""),f=new p(1),f.e=c.length-i,f.d=Gr(Fe(f),10,s),f.e=f.d.length),d=Gr(c,10,s),a=l=d.length;d[--l]==0;)d.pop();if(!d[0])c=h?"0p+0":"0";else{if(i<0?a--:(t=new p(t),t.d=d,t.e=a,t=G(t,f,r,n,0,s),d=t.d,a=t.e,u=da),i=d[r],o=s/2,u=u||d[r+1]!==void 0,u=n<4?(i!==void 0||u)&&(n===0||n===(t.s<0?3:2)):i>o||i===o&&(n===4||u||n===6&&d[r-1]&1||n===(t.s<0?8:7)),d.length=r,u)for(;++d[--r]>s-1;)d[r]=0,r||(++a,d.unshift(1));for(l=d.length;!d[l-1];--l);for(i=0,c="";i<l;i++)c+=Gn.charAt(d[i]);if(h){if(l>1)if(e==16||e==8){for(i=e==16?4:3,--l;l%i;l++)c+="0";for(d=Gr(c,s,e),l=d.length;!d[l-1];--l);for(i=1,c="1.";i<l;i++)c+=Gn.charAt(d[i])}else c=c.charAt(0)+"."+c.slice(1);c=c+(a<0?"p":"p+")+a}else if(a<0){for(;++a;)c="0"+c;c="0."+c}else if(++a>l)for(a-=l;a--;)c+="0";else a<l&&(c=c.slice(0,a)+"."+c.slice(a))}c=(e==16?"0x":e==2?"0b":e==8?"0o":"")+c}return t.s<0?"-"+c:c}function ua(t,e){if(t.length>e)return t.length=e,!0}function Qo(t){return new this(t).abs()}function el(t){return new this(t).acos()}function tl(t){return new this(t).acosh()}function rl(t,e){return new this(t).plus(e)}function nl(t){return new this(t).asin()}function sl(t){return new this(t).asinh()}function al(t){return new this(t).atan()}function il(t){return new this(t).atanh()}function ol(t,e){t=new this(t),e=new this(e);var r,n=this.precision,s=this.rounding,a=n+4;return!t.s||!e.s?r=new this(NaN):!t.d&&!e.d?(r=$e(this,a,1).times(e.s>0?.25:.75),r.s=t.s):!e.d||t.isZero()?(r=e.s<0?$e(this,n,s):new this(0),r.s=t.s):!t.d||e.isZero()?(r=$e(this,a,1).times(.5),r.s=t.s):e.s<0?(this.precision=a,this.rounding=1,r=this.atan(G(t,e,a,1)),e=$e(this,a,1),this.precision=n,this.rounding=s,r=t.s<0?r.minus(e):r.plus(e)):r=this.atan(G(t,e,a,1)),r}function ll(t){return new this(t).cbrt()}function ul(t){return T(t=new this(t),t.e+1,2)}function cl(t,e,r){return new this(t).clamp(e,r)}function dl(t){if(!t||typeof t!="object")throw Error(Qr+"Object expected");var e,r,n,s=t.defaults===!0,a=["precision",1,it,"rounding",0,8,"toExpNeg",-Bt,0,"toExpPos",0,Bt,"maxE",0,Bt,"minE",-Bt,0,"modulo",0,9];for(e=0;e<a.length;e+=3)if(r=a[e],s&&(this[r]=Yn[r]),(n=t[r])!==void 0)if(me(n)===n&&n>=a[e+1]&&n<=a[e+2])this[r]=n;else throw Error(at+r+": "+n);if(r="crypto",s&&(this[r]=Yn[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(pa);else this[r]=!1;else throw Error(at+r+": "+n);return this}function fl(t){return new this(t).cos()}function pl(t){return new this(t).cosh()}function va(t){var e,r,n;function s(a){var i,o,l,u=this;if(!(u instanceof s))return new s(a);if(u.constructor=s,ca(a)){u.s=a.s,I?!a.d||a.e>s.maxE?(u.e=NaN,u.d=null):a.e<s.minE?(u.e=0,u.d=[0]):(u.e=a.e,u.d=a.d.slice()):(u.e=a.e,u.d=a.d?a.d.slice():a.d);return}if(l=typeof a,l==="number"){if(a===0){u.s=1/a<0?-1:1,u.e=0,u.d=[0];return}if(a<0?(a=-a,u.s=-1):u.s=1,a===~~a&&a<1e7){for(i=0,o=a;o>=10;o/=10)i++;I?i>s.maxE?(u.e=NaN,u.d=null):i<s.minE?(u.e=0,u.d=[0]):(u.e=i,u.d=[a]):(u.e=i,u.d=[a]);return}if(a*0!==0){a||(u.s=NaN),u.e=NaN,u.d=null;return}return Yr(u,a.toString())}if(l==="string")return(o=a.charCodeAt(0))===45?(a=a.slice(1),u.s=-1):(o===43&&(a=a.slice(1)),u.s=1),ma.test(a)?Yr(u,a):Jo(u,a);if(l==="bigint")return a<0?(a=-a,u.s=-1):u.s=1,Yr(u,a.toString());throw Error(at+a)}if(s.prototype=_,s.ROUND_UP=0,s.ROUND_DOWN=1,s.ROUND_CEIL=2,s.ROUND_FLOOR=3,s.ROUND_HALF_UP=4,s.ROUND_HALF_DOWN=5,s.ROUND_HALF_EVEN=6,s.ROUND_HALF_CEIL=7,s.ROUND_HALF_FLOOR=8,s.EUCLID=9,s.config=s.set=dl,s.clone=va,s.isDecimal=ca,s.abs=Qo,s.acos=el,s.acosh=tl,s.add=rl,s.asin=nl,s.asinh=sl,s.atan=al,s.atanh=il,s.atan2=ol,s.cbrt=ll,s.ceil=ul,s.clamp=cl,s.cos=fl,s.cosh=pl,s.div=hl,s.exp=ml,s.floor=_l,s.hypot=gl,s.ln=bl,s.log=wl,s.log10=vl,s.log2=yl,s.max=kl,s.min=El,s.mod=Dl,s.mul=Al,s.pow=xl,s.random=Tl,s.round=Cl,s.sign=Nl,s.sin=Sl,s.sinh=Ol,s.sqrt=Bl,s.sub=Il,s.sum=Ml,s.tan=Rl,s.tanh=Ll,s.trunc=$l,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 s.config(t),s}function hl(t,e){return new this(t).div(e)}function ml(t){return new this(t).exp()}function _l(t){return T(t=new this(t),t.e+1,3)}function gl(){var t,e,r=new this(0);for(I=!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 I=!0,new this(1/0);r=e}return I=!0,r.sqrt()}function ca(t){return t instanceof or||t&&t.toStringTag===ha||!1}function bl(t){return new this(t).ln()}function wl(t,e){return new this(t).log(e)}function yl(t){return new this(t).log(2)}function vl(t){return new this(t).log(10)}function kl(){return ba(this,arguments,-1)}function El(){return ba(this,arguments,1)}function Dl(t,e){return new this(t).mod(e)}function Al(t,e){return new this(t).mul(e)}function xl(t,e){return new this(t).pow(e)}function Tl(t){var e,r,n,s,a=0,i=new this(1),o=[];if(t===void 0?t=this.precision:ve(t,1,it),n=Math.ceil(t/S),this.crypto)if(crypto.getRandomValues)for(e=crypto.getRandomValues(new Uint32Array(n));a<n;)s=e[a],s>=429e7?e[a]=crypto.getRandomValues(new Uint32Array(1))[0]:o[a++]=s%1e7;else if(crypto.randomBytes){for(e=crypto.randomBytes(n*=4);a<n;)s=e[a]+(e[a+1]<<8)+(e[a+2]<<16)+((e[a+3]&127)<<24),s>=214e7?crypto.randomBytes(4).copy(e,a):(o.push(s%1e7),a+=4);a=n/4}else throw Error(pa);else for(;a<n;)o[a++]=Math.random()*1e7|0;for(n=o[--a],t%=S,n&&t&&(s=ie(10,S-t),o[a]=(n/s|0)*s);o[a]===0;a--)o.pop();if(a<0)r=0,o=[0];else{for(r=-1;o[0]===0;r-=S)o.shift();for(n=1,s=o[0];s>=10;s/=10)n++;n<S&&(r-=S-n)}return i.e=r,i.d=o,i}function Cl(t){return T(t=new this(t),t.e+1,this.rounding)}function Nl(t){return t=new this(t),t.d?t.d[0]?t.s:0*t.s:t.s||NaN}function Sl(t){return new this(t).sin()}function Ol(t){return new this(t).sinh()}function Bl(t){return new this(t).sqrt()}function Il(t,e){return new this(t).sub(e)}function Ml(){var t=0,e=arguments,r=new this(e[t]);for(I=!1;r.s&&++t<e.length;)r=r.plus(e[t]);return I=!0,T(r,this.precision,this.rounding)}function Rl(t){return new this(t).tan()}function Ll(t){return new this(t).tanh()}function $l(t){return T(t=new this(t),t.e+1,1)}_[Symbol.for("nodejs.util.inspect.custom")]=_.toString;_[Symbol.toStringTag]="Decimal";var or=_.constructor=va(Yn);Zr=new or(Zr);Jr=new or(Jr);var ka=or;var Fl=20,Ul=1,gt=1e6,Ea=1e6,Pl=-7,ql=21,jl=!1,lr="[big.js] ",bt=lr+"Invalid ",rn=bt+"decimal places",Vl=bt+"rounding mode",Da=lr+"Division by zero",z={},Ue=void 0,zl=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function Aa(){function t(e){var r=this;if(!(r instanceof t))return e===Ue?Aa():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(bt+"value");e=e===0&&1/e<0?"-0":String(e)}Hl(r,e)}r.constructor=t}return t.prototype=z,t.DP=Fl,t.RM=Ul,t.NE=Pl,t.PE=ql,t.strict=jl,t.roundDown=0,t.roundHalfUp=1,t.roundHalfEven=2,t.roundUp=3,t}function Hl(t,e){var r,n,s;if(!zl.test(e))throw Error(bt+"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),s=e.length,n=0;n<s&&e.charAt(n)=="0";)++n;if(n==s)t.c=[t.e=0];else{for(;s>0&&e.charAt(--s)=="0";);for(t.e=r-n-1,t.c=[],r=0;n<=s;)t.c[r++]=+e.charAt(n++)}return t}function wt(t,e,r,n){var s=t.c;if(r===Ue&&(r=t.constructor.RM),r!==0&&r!==1&&r!==2&&r!==3)throw Error(Vl);if(e<1)n=r===3&&(n||!!s[0])||e===0&&(r===1&&s[0]>=5||r===2&&(s[0]>5||s[0]===5&&(n||s[1]!==Ue))),s.length=1,n?(t.e=t.e-e+1,s[0]=1):s[0]=t.e=0;else if(e<s.length){if(n=r===1&&s[e]>=5||r===2&&(s[e]>5||s[e]===5&&(n||s[e+1]!==Ue||s[e-1]&1))||r===3&&(n||!!s[0]),s.length=e,n){for(;++s[--e]>9;)if(s[e]=0,e===0){++t.e,s.unshift(1);break}}for(e=s.length;!s[--e];)s.pop()}return t}function yt(t,e,r){var n=t.e,s=t.c.join(""),a=s.length;if(e)s=s.charAt(0)+(a>1?"."+s.slice(1):"")+(n<0?"e":"e+")+n;else if(n<0){for(;++n;)s="0"+s;s="0."+s}else if(n>0)if(++n>a)for(n-=a;n--;)s+="0";else n<a&&(s=s.slice(0,n)+"."+s.slice(n));else a>1&&(s=s.charAt(0)+"."+s.slice(1));return t.s<0&&r?"-"+s:s}z.abs=function(){var t=new this.constructor(this);return t.s=1,t};z.cmp=function(t){var e,r=this,n=r.c,s=(t=new r.constructor(t)).c,a=r.s,i=t.s,o=r.e,l=t.e;if(!n[0]||!s[0])return n[0]?a:s[0]?-i:0;if(a!=i)return a;if(e=a<0,o!=l)return o>l^e?1:-1;for(i=(o=n.length)<(l=s.length)?o:l,a=-1;++a<i;)if(n[a]!=s[a])return n[a]>s[a]^e?1:-1;return o==l?0:o>l^e?1:-1};z.div=function(t){var e=this,r=e.constructor,n=e.c,s=(t=new r(t)).c,a=e.s==t.s?1:-1,i=r.DP;if(i!==~~i||i<0||i>gt)throw Error(rn);if(!s[0])throw Error(Da);if(!n[0])return t.s=a,t.c=[t.e=0],t;var o,l,u,c,d,f=s.slice(),p=o=s.length,h=n.length,m=n.slice(0,o),g=m.length,w=t,b=w.c=[],v=0,k=i+(w.e=e.e-t.e)+1;for(w.s=a,a=k<0?0:k,f.unshift(0);g++<o;)m.push(0);do{for(u=0;u<10;u++){if(o!=(g=m.length))c=o>g?1:-1;else for(d=-1,c=0;++d<o;)if(s[d]!=m[d]){c=s[d]>m[d]?1:-1;break}if(c<0){for(l=g==o?s:f;g;){if(m[--g]<l[g]){for(d=g;d&&!m[--d];)m[d]=9;--m[d],m[g]+=10}m[g]-=l[g]}for(;!m[0];)m.shift()}else break}b[v++]=c?u:++u,m[0]&&c?m[g]=n[p]||0:m=[n[p]]}while((p++<h||m[0]!==Ue)&&a--);return!b[0]&&v!=1&&(b.shift(),w.e--,k--),v>k&&wt(w,k,r.RM,m[0]!==Ue),w};z.eq=function(t){return this.cmp(t)===0};z.gt=function(t){return this.cmp(t)>0};z.gte=function(t){return this.cmp(t)>-1};z.lt=function(t){return this.cmp(t)<0};z.lte=function(t){return this.cmp(t)<1};z.minus=z.sub=function(t){var e,r,n,s,a=this,i=a.constructor,o=a.s,l=(t=new i(t)).s;if(o!=l)return t.s=-l,a.plus(t);var u=a.c.slice(),c=a.e,d=t.c,f=t.e;if(!u[0]||!d[0])return d[0]?t.s=-l:u[0]?t=new i(a):t.s=1,t;if(o=c-f){for((s=o<0)?(o=-o,n=u):(f=c,n=d),n.reverse(),l=o;l--;)n.push(0);n.reverse()}else for(r=((s=u.length<d.length)?u:d).length,o=l=0;l<r;l++)if(u[l]!=d[l]){s=u[l]<d[l];break}if(s&&(n=u,u=d,d=n,t.s=-t.s),(l=(r=d.length)-(e=u.length))>0)for(;l--;)u[e++]=0;for(l=e;r>o;){if(u[--r]<d[r]){for(e=r;e&&!u[--e];)u[e]=9;--u[e],u[r]+=10}u[r]-=d[r]}for(;u[--l]===0;)u.pop();for(;u[0]===0;)u.shift(),--f;return u[0]||(t.s=1,u=[f=0]),t.c=u,t.e=f,t};z.mod=function(t){var e,r=this,n=r.constructor,s=r.s,a=(t=new n(t)).s;if(!t.c[0])throw Error(Da);return r.s=t.s=1,e=t.cmp(r)==1,r.s=s,t.s=a,e?new n(r):(s=n.DP,a=n.RM,n.DP=n.RM=0,r=r.div(t),n.DP=s,n.RM=a,this.minus(r.times(t)))};z.neg=function(){var t=new this.constructor(this);return t.s=-t.s,t};z.plus=z.add=function(t){var e,r,n,s=this,a=s.constructor;if(t=new a(t),s.s!=t.s)return t.s=-t.s,s.minus(t);var i=s.e,o=s.c,l=t.e,u=t.c;if(!o[0]||!u[0])return u[0]||(o[0]?t=new a(s):t.s=s.s),t;if(o=o.slice(),e=i-l){for(e>0?(l=i,n=u):(e=-e,n=o),n.reverse();e--;)n.push(0);n.reverse()}for(o.length-u.length<0&&(n=u,u=o,o=n),e=u.length,r=0;e;o[e]%=10)r=(o[--e]=o[e]+u[e]+r)/10|0;for(r&&(o.unshift(r),++l),e=o.length;o[--e]===0;)o.pop();return t.c=o,t.e=l,t};z.pow=function(t){var e=this,r=new e.constructor("1"),n=r,s=t<0;if(t!==~~t||t<-Ea||t>Ea)throw Error(bt+"exponent");for(s&&(t=-t);t&1&&(n=n.times(e)),t>>=1,!!t;)e=e.times(e);return s?r.div(n):n};z.prec=function(t,e){if(t!==~~t||t<1||t>gt)throw Error(bt+"precision");return wt(new this.constructor(this),t,e)};z.round=function(t,e){if(t===Ue)t=0;else if(t!==~~t||t<-gt||t>gt)throw Error(rn);return wt(new this.constructor(this),t+this.e+1,e)};z.sqrt=function(){var t,e,r,n=this,s=n.constructor,a=n.s,i=n.e,o=new s("0.5");if(!n.c[0])return new s(n);if(a<0)throw Error(lr+"No square root");a=Math.sqrt(+yt(n,!0,!0)),a===0||a===1/0?(e=n.c.join(""),e.length+i&1||(e+="0"),a=Math.sqrt(e),i=((i+1)/2|0)-(i<0||i&1),t=new s((a==1/0?"5e":(a=a.toExponential()).slice(0,a.indexOf("e")+1))+i)):t=new s(a+""),i=t.e+(s.DP+=4);do r=t,t=o.times(r.plus(n.div(r)));while(r.c.slice(0,i).join("")!==t.c.slice(0,i).join(""));return wt(t,(s.DP-=4)+t.e+1,s.RM)};z.times=z.mul=function(t){var e,r=this,n=r.constructor,s=r.c,a=(t=new n(t)).c,i=s.length,o=a.length,l=r.e,u=t.e;if(t.s=r.s==t.s?1:-1,!s[0]||!a[0])return t.c=[t.e=0],t;for(t.e=l+u,i<o&&(e=s,s=a,a=e,u=i,i=o,o=u),e=new Array(u=i+o);u--;)e[u]=0;for(l=o;l--;){for(o=0,u=i+l;u>l;)o=e[u]+a[l]*s[u-l-1]+o,e[u--]=o%10,o=o/10|0;e[u]=o}for(o?++t.e:e.shift(),l=e.length;!e[--l];)e.pop();return t.c=e,t};z.toExponential=function(t,e){var r=this,n=r.c[0];if(t!==Ue){if(t!==~~t||t<0||t>gt)throw Error(rn);for(r=wt(new r.constructor(r),++t,e);r.c.length<t;)r.c.push(0)}return yt(r,!0,!!n)};z.toFixed=function(t,e){var r=this,n=r.c[0];if(t!==Ue){if(t!==~~t||t<0||t>gt)throw Error(rn);for(r=wt(new r.constructor(r),t+r.e+1,e),t=t+r.e+1;r.c.length<t;)r.c.push(0)}return yt(r,!1,!!n)};z[Symbol.for("nodejs.util.inspect.custom")]=z.toJSON=z.toString=function(){var t=this,e=t.constructor;return yt(t,t.e<=e.NE||t.e>=e.PE,!!t.c[0])};z.toNumber=function(){var t=+yt(this,!0,!0);if(this.constructor.strict===!0&&!this.eq(t.toString()))throw Error(lr+"Imprecise conversion");return t};z.toPrecision=function(t,e){var r=this,n=r.constructor,s=r.c[0];if(t!==Ue){if(t!==~~t||t<1||t>gt)throw Error(bt+"precision");for(r=wt(new n(r),t,e);r.c.length<t;)r.c.push(0)}return yt(r,t<=r.e||r.e<=n.NE||r.e>=n.PE,!!s)};z.valueOf=function(){var t=this,e=t.constructor;if(e.strict===!0)throw Error(lr+"valueOf disallowed");return yt(t,t.e<=e.NE||t.e>=e.PE,!0)};var Wl=Aa(),xa=Wl;var us={};na(us,{DecodeError:()=>_e,Decoder:()=>Ie,EXT_TIMESTAMP:()=>es,Encoder:()=>Mt,ExtData:()=>Be,ExtensionCodec:()=>ot,decode:()=>Ra,decodeArrayStream:()=>Fa,decodeAsync:()=>$a,decodeMulti:()=>La,decodeMultiStream:()=>Ua,decodeTimestampExtension:()=>as,decodeTimestampToTimeSpec:()=>ss,encode:()=>an,encodeDateToTimeSpec:()=>rs,encodeTimeSpecToTimestamp:()=>ts,encodeTimestampExtension:()=>ns});function Ta(t){let e=t.length,r=0,n=0;for(;n<e;){let s=t.charCodeAt(n++);if((s&4294967168)===0){r++;continue}else if((s&4294965248)===0)r+=2;else{if(s>=55296&&s<=56319&&n<e){let a=t.charCodeAt(n);(a&64512)===56320&&(++n,s=((s&1023)<<10)+(a&1023)+65536)}(s&4294901760)===0?r+=3:r+=4}}return r}function Xl(t,e,r){let n=t.length,s=r,a=0;for(;a<n;){let i=t.charCodeAt(a++);if((i&4294967168)===0){e[s++]=i;continue}else if((i&4294965248)===0)e[s++]=i>>6&31|192;else{if(i>=55296&&i<=56319&&a<n){let o=t.charCodeAt(a);(o&64512)===56320&&(++a,i=((i&1023)<<10)+(o&1023)+65536)}(i&4294901760)===0?(e[s++]=i>>12&15|224,e[s++]=i>>6&63|128):(e[s++]=i>>18&7|240,e[s++]=i>>12&63|128,e[s++]=i>>6&63|128)}e[s++]=i&63|128}}var Gl=new TextEncoder,Yl=50;function Zl(t,e,r){Gl.encodeInto(t,e.subarray(r))}function Ca(t,e,r){t.length>Yl?Zl(t,e,r):Xl(t,e,r)}var Jl=4096;function Qn(t,e,r){let n=e,s=n+r,a=[],i="";for(;n<s;){let o=t[n++];if((o&128)===0)a.push(o);else if((o&224)===192){let l=t[n++]&63;a.push((o&31)<<6|l)}else if((o&240)===224){let l=t[n++]&63,u=t[n++]&63;a.push((o&31)<<12|l<<6|u)}else if((o&248)===240){let l=t[n++]&63,u=t[n++]&63,c=t[n++]&63,d=(o&7)<<18|l<<12|u<<6|c;d>65535&&(d-=65536,a.push(d>>>10&1023|55296),d=56320|d&1023),a.push(d)}else a.push(o);a.length>=Jl&&(i+=String.fromCharCode(...a),a.length=0)}return a.length>0&&(i+=String.fromCharCode(...a)),i}var Kl=new TextDecoder,Ql=200;function eu(t,e,r){let n=t.subarray(e,e+r);return Kl.decode(n)}function Na(t,e,r){return r>Ql?eu(t,e,r):Qn(t,e,r)}var Be=class{type;data;constructor(e,r){this.type=e,this.data=r}};var _e=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 Sa(t,e,r){let n=r/4294967296,s=r;t.setUint32(e,n),t.setUint32(e+4,s)}function nn(t,e,r){let n=Math.floor(r/4294967296),s=r;t.setUint32(e,n),t.setUint32(e+4,s)}function sn(t,e){let r=t.getInt32(e),n=t.getUint32(e+4);return r*4294967296+n}function Oa(t,e){let r=t.getUint32(e),n=t.getUint32(e+4);return r*4294967296+n}var es=-1,tu=4294967296-1,ru=17179869184-1;function ts({sec:t,nsec:e}){if(t>=0&&e>=0&&t<=ru)if(e===0&&t<=tu){let r=new Uint8Array(4);return new DataView(r.buffer).setUint32(0,t),r}else{let r=t/4294967296,n=t&4294967295,s=new Uint8Array(8),a=new DataView(s.buffer);return a.setUint32(0,e<<2|r&3),a.setUint32(4,n),s}else{let r=new Uint8Array(12),n=new DataView(r.buffer);return n.setUint32(0,e),nn(n,4,t),r}}function rs(t){let e=t.getTime(),r=Math.floor(e/1e3),n=(e-r*1e3)*1e6,s=Math.floor(n/1e9);return{sec:r+s,nsec:n-s*1e9}}function ns(t){if(t instanceof Date){let e=rs(t);return ts(e)}else return null}function ss(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),s=(r&3)*4294967296+n,a=r>>>2;return{sec:s,nsec:a}}case 12:{let r=sn(e,4),n=e.getUint32(0);return{sec:r,nsec:n}}default:throw new _e(`Unrecognized data size for timestamp (expected 4, 8, or 12): ${t.length}`)}}function as(t){let e=ss(t);return new Date(e.sec*1e3+e.nsec/1e6)}var Ba={type:es,encode:ns,decode:as};var ot=class t{static defaultCodec=new t;__brand;builtInEncoders=[];builtInDecoders=[];encoders=[];decoders=[];constructor(){this.register(Ba)}register({type:e,encode:r,decode:n}){if(e>=0)this.encoders[e]=r,this.decoders[e]=n;else{let s=-1-e;this.builtInEncoders[s]=r,this.builtInDecoders[s]=n}}tryToEncode(e,r){for(let n=0;n<this.builtInEncoders.length;n++){let s=this.builtInEncoders[n];if(s!=null){let a=s(e,r);if(a!=null){let i=-1-n;return new Be(i,a)}}}for(let n=0;n<this.encoders.length;n++){let s=this.encoders[n];if(s!=null){let a=s(e,r);if(a!=null){let i=n;return new Be(i,a)}}}return e instanceof Be?e:null}decode(e,r,n){let s=r<0?this.builtInDecoders[-1-r]:this.decoders[r];return s?s(e,r,n):new Be(r,e)}};function nu(t){return t instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer}function ur(t){return t instanceof Uint8Array?t:ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):nu(t)?new Uint8Array(t):Uint8Array.from(t)}var su=100,au=2048,Mt=class t{extensionCodec;context;useBigInt64;maxDepth;initialBufferSize;sortKeys;forceFloat32;ignoreUndefined;forceIntegerToFloat;pos;view;bytes;entered=!1;constructor(e){this.extensionCodec=e?.extensionCodec??ot.defaultCodec,this.context=e?.context,this.useBigInt64=e?.useBigInt64??!1,this.maxDepth=e?.maxDepth??su,this.initialBufferSize=e?.initialBufferSize??au,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),s=new DataView(r);n.set(this.bytes),this.view=s,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=Ta(e);this.ensureBufferSizeToWrite(5+n),this.writeStringHeader(n),Ca(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=ur(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 s of e)this.doEncode(s,r+1)}countWithoutUndefined(e,r){let n=0;for(let s of r)e[s]!==void 0&&n++;return n}encodeMap(e,r){let n=Object.keys(e);this.sortKeys&&n.sort();let s=this.ignoreUndefined?this.countWithoutUndefined(e,n):n.length;if(s<16)this.writeU8(128+s);else if(s<65536)this.writeU8(222),this.writeU16(s);else if(s<4294967296)this.writeU8(223),this.writeU32(s);else throw new Error(`Too large map object: ${s}`);for(let a of n){let i=e[a];this.ignoreUndefined&&i===void 0||(this.encodeString(a),this.doEncode(i,r+1))}}encodeExtension(e){if(typeof e.data=="function"){let n=e.data(this.pos+6),s=n.length;if(s>=4294967296)throw new Error(`Too large extension object: ${s}`);this.writeU8(201),this.writeU32(s),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),Sa(this.view,this.pos,e),this.pos+=8}writeI64(e){this.ensureBufferSizeToWrite(8),nn(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 an(t,e){return new Mt(e).encodeSharedRef(t)}function on(t){return`${t<0?"-":""}0x${Math.abs(t).toString(16).padStart(2,"0")}`}var iu=16,ou=16,ln=class{hit=0;miss=0;caches;maxKeyLength;maxLengthPerKey;constructor(e=iu,r=ou){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 s=this.caches[n-1];e:for(let a of s){let i=a.bytes;for(let o=0;o<n;o++)if(i[o]!==e[r+o])continue e;return a.str}return null}store(e,r){let n=this.caches[e.length-1],s={bytes:e,str:r};n.length>=this.maxLengthPerKey?n[Math.random()*n.length|0]=s:n.push(s)}decode(e,r,n){let s=this.find(e,r,n);if(s!=null)return this.hit++,s;this.miss++;let a=Qn(e,r,n),i=Uint8Array.prototype.slice.call(e,r,r+n);return this.store(i,a),a}};var is="array",fr="map_key",Ma="map_value",lu=t=>{if(typeof t=="string"||typeof t=="number")return t;throw new _e("The type of key must be string or number but "+typeof t)},os=class{stack=[];stackHeadPosition=-1;get length(){return this.stackHeadPosition+1}top(){return this.stack[this.stackHeadPosition]}pushArrayState(e){let r=this.getUninitializedStateFromPool();r.type=is,r.position=0,r.size=e,r.array=new Array(e)}pushMapState(e){let r=this.getUninitializedStateFromPool();r.type=fr,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===is){let n=e;n.size=0,n.array=void 0,n.position=0,n.type=void 0}if(e.type===fr||e.type===Ma){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}},dr=-1,ls=new DataView(new ArrayBuffer(0)),uu=new Uint8Array(ls.buffer);try{ls.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 Ia=new RangeError("Insufficient data"),cu=new ln,Ie=class t{extensionCodec;context;useBigInt64;rawStrings;maxStrLength;maxBinLength;maxArrayLength;maxMapLength;maxExtLength;keyDecoder;mapKeyConverter;totalPos=0;pos=0;view=ls;bytes=uu;headByte=dr;stack=new os;entered=!1;constructor(e){this.extensionCodec=e?.extensionCodec??ot.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:cu,this.mapKeyConverter=e?.mapKeyConverter??lu}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=dr,this.stack.reset()}setBuffer(e){let r=ur(e);this.bytes=r,this.view=new DataView(r.buffer,r.byteOffset,r.byteLength),this.pos=0}appendBuffer(e){if(this.headByte===dr&&!this.hasRemaining(1))this.setBuffer(e);else{let r=this.bytes.subarray(this.pos),n=ur(e),s=new Uint8Array(r.length+n.length);s.set(r),s.set(n,r.length),this.setBuffer(s)}}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(l){if(!(l instanceof RangeError))throw l}this.totalPos+=this.pos}if(r){if(this.hasRemaining(1))throw this.createExtraByteError(this.totalPos);return n}let{headByte:s,pos:a,totalPos:i}=this;throw new RangeError(`Insufficient data in parsing ${on(s)} at ${i} (${a} 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,s=-1;for await(let a of e){if(r&&s===0)throw this.createExtraByteError(this.totalPos);this.appendBuffer(a),n&&(s=this.readArraySize(),n=!1,this.complete());try{for(;yield this.doDecodeSync(),--s!==0;);}catch(i){if(!(i instanceof RangeError))throw i}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 s=e-128;if(s!==0){this.pushMapState(s),this.complete();continue e}else r={}}else if(e<160){let s=e-144;if(s!==0){this.pushArrayState(s),this.complete();continue e}else r=[]}else{let s=e-160;r=this.decodeString(s,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 s=this.lookU8();r=this.decodeString(s,1)}else if(e===218){let s=this.lookU16();r=this.decodeString(s,2)}else if(e===219){let s=this.lookU32();r=this.decodeString(s,4)}else if(e===220){let s=this.readU16();if(s!==0){this.pushArrayState(s),this.complete();continue e}else r=[]}else if(e===221){let s=this.readU32();if(s!==0){this.pushArrayState(s),this.complete();continue e}else r=[]}else if(e===222){let s=this.readU16();if(s!==0){this.pushMapState(s),this.complete();continue e}else r={}}else if(e===223){let s=this.readU32();if(s!==0){this.pushMapState(s),this.complete();continue e}else r={}}else if(e===196){let s=this.lookU8();r=this.decodeBinary(s,1)}else if(e===197){let s=this.lookU16();r=this.decodeBinary(s,2)}else if(e===198){let s=this.lookU32();r=this.decodeBinary(s,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 s=this.lookU8();r=this.decodeExtension(s,1)}else if(e===200){let s=this.lookU16();r=this.decodeExtension(s,2)}else if(e===201){let s=this.lookU32();r=this.decodeExtension(s,4)}else throw new _e(`Unrecognized type byte: ${on(e)}`);this.complete();let n=this.stack;for(;n.length>0;){let s=n.top();if(s.type===is)if(s.array[s.position]=r,s.position++,s.position===s.size)r=s.array,n.release(s);else continue e;else if(s.type===fr){if(r==="__proto__")throw new _e("The key __proto__ is not allowed");s.key=this.mapKeyConverter(r),s.type=Ma;continue e}else if(s.map[s.key]=r,s.readCount++,s.readCount===s.size)r=s.map,n.release(s);else{s.key=null,s.type=fr;continue e}}return r}}readHeadByte(){return this.headByte===dr&&(this.headByte=this.readU8()),this.headByte}complete(){this.headByte=dr}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 _e(`Unrecognized array type byte: ${on(e)}`)}}}pushMapState(e){if(e>this.maxMapLength)throw new _e(`Max length exceeded: map length (${e}) > maxMapLengthLength (${this.maxMapLength})`);this.stack.pushMapState(e)}pushArrayState(e){if(e>this.maxArrayLength)throw new _e(`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 _e(`Max length exceeded: UTF-8 byte length (${e}) > maxStrLength (${this.maxStrLength})`);if(this.bytes.byteLength<this.pos+r+e)throw Ia;let n=this.pos+r,s;return this.stateIsMapKey()&&this.keyDecoder?.canBeCached(e)?s=this.keyDecoder.decode(this.bytes,n,e):s=Na(this.bytes,n,e),this.pos+=r+e,s}stateIsMapKey(){return this.stack.length>0?this.stack.top().type===fr:!1}decodeBinary(e,r){if(e>this.maxBinLength)throw new _e(`Max length exceeded: bin length (${e}) > maxBinLength (${this.maxBinLength})`);if(!this.hasRemaining(e+r))throw Ia;let n=this.pos+r,s=this.bytes.subarray(n,n+e);return this.pos+=r+e,s}decodeExtension(e,r){if(e>this.maxExtLength)throw new _e(`Max length exceeded: ext length (${e}) > maxExtLength (${this.maxExtLength})`);let n=this.view.getInt8(this.pos+r),s=this.decodeBinary(e,r+1);return this.extensionCodec.decode(s,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=Oa(this.view,this.pos);return this.pos+=8,e}readI64(){let e=sn(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 Ra(t,e){return new Ie(e).decode(t)}function La(t,e){return new Ie(e).decodeMulti(t)}function du(t){return t[Symbol.asyncIterator]!=null}async function*fu(t){let e=t.getReader();try{for(;;){let{done:r,value:n}=await e.read();if(r)return;yield n}}finally{e.releaseLock()}}function un(t){return du(t)?t:fu(t)}async function $a(t,e){let r=un(t);return new Ie(e).decodeAsync(r)}function Fa(t,e){let r=un(t);return new Ie(e).decodeArrayStream(r)}function Ua(t,e){let r=un(t);return new Ie(e).decodeStream(r)}var Cn=sa(Os(),1),Bs=ka,Is=xa,Ve=us,zi=Cn.DOMParser,Hi=Cn.XMLSerializer;var Wi=Ve!==null;function Xi(){if(!Wi)throw new Error("@msgpack/msgpack is required for MessagePack support. Install with: npm install @msgpack/msgpack")}var Gi=dd();function dd(){if(!Wi)return null;let t=new TextEncoder,e=new TextDecoder,r=new Ve.ExtensionCodec;return r.register({type:-1,encode:n=>{if(n instanceof Date){let s=At(n);if(s==="D"||s==="H")return null}return Ve.encodeTimestampExtension(n)},decode:n=>Ve.decodeTimestampExtension(n)}),r.register({type:1,encode:n=>Ne(n)?t.encode(n.toString()):null,decode:n=>Nn(e.decode(n))}),r.register({type:2,encode:n=>{if(n instanceof Date&&At(n)==="D"){let s=n.getUTCFullYear(),a=String(n.getUTCMonth()+1).padStart(2,"0"),i=String(n.getUTCDate()).padStart(2,"0");return t.encode(`${s}-${a}-${i}`)}return null},decode:n=>new Date(e.decode(n)+"T00:00:00.000Z")}),r.register({type:3,encode:n=>{if(n instanceof Date&&At(n)==="H"){let s=String(n.getUTCHours()).padStart(2,"0"),a=String(n.getUTCMinutes()).padStart(2,"0"),i=String(n.getUTCSeconds()).padStart(2,"0"),o=String(n.getUTCMilliseconds()).padStart(3,"0");return t.encode(`${s}:${a}:${i}.${o}`)}return null},decode:n=>{let s=e.decode(n),a=s.indexOf("."),i=a>=0?s.substring(0,a):s,o=a>=0?s.substring(a+1):"0",[l,u,c]=i.split(":"),d=Math.round(+o.substring(0,3));return new Date(Date.UTC(1970,0,1,+l,+u,+c,d))}}),r.register({type:4,encode:n=>{let s=Ms(n);if(s!==null){let[a,i]=s;return t.encode(`${a}:${i(n)}`)}return null},decode:n=>{let s=e.decode(n),a=s.indexOf(":"),i=s.slice(0,a),o=s.slice(a+1),l=ht[i];if(l!==void 0){let[,u]=l;return u(o)}return`${o}::${i}`}}),r}function Yi(t){return Xi(),Ve.encode(t,{extensionCodec:Gi})}function Zi(t){return Xi(),Ve.decode(t,{extensionCodec:Gi})}function On(t,e=!1){let r=Bn(t);if(r===null)return[!1,String(t)];let[n,s,a]=r;return a&&!e?[!1,String(t)]:[!0,`${s(t)}::${n}`]}function Rs(t){if(!t.includes("::"))return[!1,t];let e=t.lastIndexOf("::"),r=t.slice(0,e),n=t.slice(e+2),s=ht[n];if(s===void 0)return[!1,t];let[,a]=s;return[!0,a(r)]}function Sn(t,e,r){if(t!==null&&typeof t=="object"&&!Array.isArray(t)){let n={};for(let[s,a]of Object.entries(t))n[s]=Sn(a,e,r);return n}return Array.isArray(t)?t.map(n=>Sn(n,e,r)):r(t)?e(t):t}function Ls(t){let e=Bn(t);if(e!==null){let[r,n,s]=e;return s?[t,!1]:[`${n(t)}::${r}`,!0]}if(Array.isArray(t)){let r=!1;return[t.map(s=>{let[a,i]=Ls(s);return i&&(r=!0),a}),r]}if(t!==null&&typeof t=="object"){let r=!1,n={};for(let[s,a]of Object.entries(t)){let[i,o]=Ls(a);o&&(r=!0),n[s]=i}return[n,r]}return[t,!1]}function fd(t,e=!1){let[r,n]=On(t,e);if(r)return n;let[s,a]=Ls(t),i=JSON.stringify(s);return a?`${i}::JS`:i}function pd(t){return JSON.stringify(t)}function hd(t){if(!Ve)throw new Error("@msgpack/msgpack is required for MessagePack support");return Ve.encode(t)}function xe(t,e=null,{raw:r=!1,qs:n=!1,_forceSuffix:s=!1}={}){if(n)return`${Ki(t)}::QS`;if(r){if(e===null||e==="json")return pd(t);if(e==="msgpack")return hd(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 a=fd(t,s);return e==="json"?`"${a}"`:a}else{if(e==="xml")return`<?xml version="1.0" ?><tytx_root>${Ji(t)}</tytx_root>`;if(e==="msgpack")return Yi(t);throw new Error(`Unknown transport: ${e}`)}}var Qt,$s;typeof window<"u"&&window.DOMParser?(Qt=window.DOMParser,$s=window.XMLSerializer):(Qt=zi,$s=Hi);function Qi(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 eo(t,e,r){let n=t.createElement(e),s=r.attrs||{},a=r.value;for(let[i,o]of Object.entries(s))n.setAttribute(i,xe(o,null,{_forceSuffix:!0}));if(Array.isArray(a))for(let i of a)if(Qi(i)){let[o]=Object.keys(i),l=i[o],u=eo(t,o,l);n.appendChild(u)}else{n.textContent=xe(a);break}else n.textContent=xe(a);return n}function Ji(t){if(!Qt)throw new Error("XML support requires @xmldom/xmldom package in Node.js");if(Qi(t)){let[e]=Object.keys(t),r=t[e],n=new Qt().parseFromString("<root/>","text/xml"),s=eo(n,e,r);return new $s().serializeToString(s)}else return xe(t)}function Fs(t){let e={};for(let n=0;n<t.attributes.length;n++){let s=t.attributes[n];e[s.name]=ue(s.value)}let r=[];for(let n=0;n<t.childNodes.length;n++){let s=t.childNodes[n];s.nodeType===1&&r.push(s)}if(r.length>0)if(r.length===1){let n=r[0],s=Fs(n);return{attrs:e,value:{[n.tagName]:s}}}else{let n=[];for(let s of r){let a=Fs(s);n.push({[s.tagName]:a})}return{attrs:e,value:n}}return{attrs:e,value:ue(t.textContent)}}function to(t){if(!Qt)throw new Error("XML support requires @xmldom/xmldom package in Node.js");let n=new Qt().parseFromString(t,"text/xml").documentElement;if(n.tagName==="tytx_root"){let a=null;for(let i=0;i<n.childNodes.length;i++)if(n.childNodes[i].nodeType===1){a=n.childNodes[i];break}if(!a)return ue(n.textContent);n=a}let s=Fs(n);return{[n.tagName]:s}}function md(t){return typeof t=="string"}function _d(t){let[e,r]=Rs(t);if(e)return r;let n=t;n.endsWith("::JS")&&(n=n.slice(0,-4));let s;try{s=JSON.parse(n)}catch{return t}return Sn(s,gd,md)}function gd(t){return t.includes("::")?Rs(t)[1]:t}function bd(t){let e=to(t);return typeof e=="string"?ue(e):e}function wd(t){return Zi(t)}function ue(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)),_d(r)}else{if(e==="xml")return bd(t);if(e==="msgpack")return wd(t);throw new Error(`Unknown transport: ${e}`)}}function Ki(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[s,a]=On(n,!0);s?e.push(`${r}=${a}`):e.push(`${r}=${n}`)}return e.join("&")}throw new TypeError(`toQs expects object or array, got ${typeof t}`)}function ro(t){if(!t)return[];let e=t.split("&"),r=e.map(i=>i.includes("=")),n=r.every(Boolean),s=!r.some(Boolean);if(!n&&!s)throw new Error("QS format error: mixed items with and without '='");if(s)return e.map(i=>ue(i));let a={};for(let i of e){let o=i.indexOf("="),l=i.slice(0,o),u=i.slice(o+1);a[l]=ue(u)}return a}var so=Bs||Is||Number,yd=Bs?"decimal.js":Is?"big.js":"number";function Nn(t){return new so(t)}function Ne(t){return yd==="number"?!1:t instanceof so}function At(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 vd(t){return t.toString()}function kd(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 Ed(t){return t.toISOString()}function Dd(t){let e=String(t.getUTCHours()).padStart(2,"0"),r=String(t.getUTCMinutes()).padStart(2,"0"),n=String(t.getUTCSeconds()).padStart(2,"0"),s=String(t.getUTCMilliseconds()).padStart(3,"0");return`${e}:${r}:${n}.${s}`}function Ad(t){return t?"true":"false"}function xd(t){return t.toString()}function Td(t){return t.toString()}function Cd(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 In=[],Us=new Map;function Ms(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,s,a]of In)if(r.prototype===e)return[n,s,a];return null}function Bn(t){if(t===null)return["NN",()=>"",!0];if(Ne(t))return["N",vd,!1];if(t instanceof Uint8Array)return["RAW",Cd,!1];if(t instanceof Date){let e=At(t);return e==="D"?["D",kd,!1]:e==="H"?["H",Dd,!1]:["DHZ",Ed,!1]}return typeof t=="boolean"?["B",Ad,!0]:typeof t=="number"?Number.isInteger(t)?["L",xd,!0]:["R",Td,!0]:Ms(t)}function Nd(t){return Nn(t)}function Sd(t){let[e,r,n]=t.split("-").map(Number);return new Date(Date.UTC(e,r-1,n,0,0,0,0))}function no(t){return new Date(t)}function Od(t){let[e,r,n]=t.split(":"),[s,a]=n.split(".");return new Date(Date.UTC(1970,0,1,Number(e),Number(r),Number(s),Number(a||0)))}function Bd(t){return t.toLowerCase()==="true"}function Id(t){return parseInt(t,10)}function Md(t){return parseFloat(t)}function Rd(t){return t}function Ld(t){return null}var $d=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/;function Fd(t){if(!$d.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 Ud(t){return ro(t)}var Pd=/^[A-Z]+$/,ht={N:[Object,Nd],D:[Date,Sd],DH:[Date,no],DHZ:[Date,no],H:[Date,Od],L:[Number,Id],R:[Number,Md],T:[String,Rd],B:[Boolean,Bd],QS:[Object,Ud],NN:[null,Ld],RAW:[Uint8Array,Fd]};function Br(t){return Object.hasOwn(ht,t)?ht[t][0]:null}function Ps(t,e,r,n,s=!1){if(typeof e!="string"||!Pd.test(e))throw new Error(`TYTX suffix '${e}' is invalid: expected uppercase ASCII letters only`);let a=ht[e];if(a!==void 0&&a[0]!==t){let i=a[0]===null?"null":a[0].name;throw new Error(`TYTX suffix '${e}' is already registered for ${i}`)}In=In.filter(([i])=>i!==t),In.push([t,e,r,s]),ht[e]=[t,n]}function Ir(t,e){Us.set(t,e)}function Je(t){return Us.has(t)?Us.get(t):{}}var ao={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 jd(t){let e=t._retryPolicy;return e==null?null:typeof e=="string"?ao[e]||null:e}function Vd(t,e){return e.some(r=>r==="Error"?!0:t.name===r||t.constructor.name===r)}function zd(t){return new Promise(e=>setTimeout(e,t))}async function Hd(t,e){if(!e)return t();let r=e.maxAttempts||3,n=e.delay||1,s=e.backoff||2,a=e.jitter!==!1,i=e.on||["Error"],o=null,l=n*1e3;for(let u=0;u<r;u++)try{let c=t();return c instanceof Promise?await c:c}catch(c){if(o=c,u<r-1&&Vd(c,i)){let d=l;a&&(d*=1+Math.random()*.1),await zd(d),l*=s}else throw c}throw o}var ce=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 a of["interval","reactive"])if(Object.hasOwn(n,a))throw new TypeError(`Removed resolver option: ${a}. 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 s=this.constructor.internalParams;for(let[a,i]of Object.entries(n))s.has(a)||(this._kw[a]=i);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 s=this._buildEffectiveKw();if(Object.keys(n).length>0)return this._load({...s,...n},i=>this._prepareValue(i));let a=this._computeEffectiveFingerprint(s);return a===this._lastEffectiveFingerprint&&!this.expired?this.cachedValue:(this._lastEffectiveFingerprint=a,this._load(s,i=>this._finalize(i)))}_load(e,r){let n=jd(this),s=()=>this.load(e);if(n)return Hd(s,n).then(r);let a=s();return a&&typeof a.then=="function"?a.then(r):r(a)}_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}};ce._BagClass=null;var Mr=class extends ce{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 Ke=class t{constructor(e,r,n=null,s=null,a=null,i=null,o=null,l=!0){this.label=r,this._value=null,this._attr={},this._parentBag=null,this._resolver=null,this._nodeSubscribers={},this._onChangedValue=null,this.nodeTag=i,this.xmlTag=o,this._compiled=null,this.parentBag=e,s&&this.setAttr(s,!1,!0,l),n!==null&&this.setValue(n,!1),a&&(this.resolver=a)}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 s=ue(`${r}::QS`);if(Array.isArray(s)){let a=s.length?s:Object.keys(this._attr),i=a.map(l=>{let u=this.getAttr(l);return!e&&u instanceof ce?u.resolve():u}),o=l=>s.length===0?Object.fromEntries(a.map((u,c)=>[u,l[c]])):l.length===1?l[0]:l;return i.some(l=>l&&typeof l.then=="function")?Promise.all(i).then(o):o(i)}else{if(!this._resolver)throw new Error("Cannot use kwargs syntax without resolver");n={...n,...s}}}return this._resolver!==null?this._resolver.resolve({static:e,...n}):this._value}setValue(e,r=!0,n=null,s=null,a=!0,i=null,o=!1){e instanceof ce?(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 l=this._value;l!==e&&l?.parentNode===this&&l.setBackref(),this._value=e;let u=l!==this._value,c=r??!0,d=null;if(n!==null){let p={...this._attr};this.setAttr(n,!1,s,a);let h=this._buildAttrDiff(p,this._attr);d=Object.keys(h).length>0?h:null}r=c&&(u||d!==null);let f=d?u?"upd_value_attr":"upd_attrs":"upd_value";if(this._onChangedValue&&this._onChangedValue(this,e,l,c),r){let p=d!==null?{oldvalue:l,attrs_diff:d}:{oldvalue:l};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,l,d,i,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 s=this._value,a={...this._attr},i=this.resolver;i&&i._node===this&&(i._node=null),this.resolver=n,this.setValue(r,!1,{...e.attr},!1,!1,null);let o=this._buildAttrDiff(a,this._attr),l=Object.keys(o).length?o:null,u=s!==r||i!==n;if(u||l){let c=l?u?"upd_value_attr":"upd_attrs":"upd_value",d=l?{oldvalue:s,attrs_diff:l}:{oldvalue:s};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,s,l)}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={},s=new Set([...Object.keys(e),...Object.keys(r)]);for(let a of s){let i=a in e?e[a]:null,o=a in r?r[a]:null;i!==o&&(n[a]={old:i,new:o})}return n}setAttr(e=null,r=!0,n=!0,s=!0){let a=e||{},i=Object.keys(this._nodeSubscribers).length>0,l=r&&(i||this._parentBag!==null&&this._parentBag.backref)?{...this._attr}:null;if(n?Object.assign(this._attr,a):this._attr={...a},s)for(let u of Object.keys(this._attr))this._attr[u]===null&&delete this._attr[u];if(r&&l!==null){let u=this._buildAttrDiff(l,this._attr);if(Object.keys(u).length>0&&i)for(let c of Object.values(this._nodeSubscribers))c({node:this,info:{attrs_diff:u},evt:"upd_attrs"});if(Object.keys(u).length>0&&this._parentBag!==null&&this._parentBag.backref){let c=r===!0?"true":String(r);this._parentBag._onNodeChanged(this,[this.label],"upd_attrs",null,u,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 s of r)if(this._attr[s]!==e._attr[s])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(s=>this._attr[s]!==e._attr[s])?`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 Rr=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,s]=r,a=s.includes("::")?ue(s):s;return n?this._list.findIndex(i=>i.getAttr(n)===a):this._list.findIndex(i=>i._value===a)}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 a=this._parseSharpIndex(n.slice(1),e);return Math.min(a,r)}let s=this.index(n);if(s<0)throw new Error(`Invalid node_position '${e}': label '${n}' not found`);return s}if(e.startsWith(">")){let n=e.slice(1);if(n.startsWith("#")){let a=this._parseSharpIndex(n.slice(1),e);return Math.min(a+1,r)}let s=this.index(n);if(s<0)throw new Error(`Invalid node_position '${e}': label '${n}' not found`);return s+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=">",s=null,a=null,i=null,o=!1,l=!0,u=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)s={[m[0]]:r};else{if(!Array.isArray(r)||r.length!==m.length)throw new Error("Wrong attributes assignment");s={};for(let g=0;g<m.length;g++)s[m[g]]=r[g]}r=null}let h=this._dict[e];if(h)f&&(h.nodeTag=f),i!==null&&(i===!1?h.resolver=null:h.resolver=i),p?h.setAttr(s,c,!0,l):h.setValue(r,c,s,o,l,u,d);else{let m=a&&a.nodeClass?a.nodeClass:Ke;h=new m(a,e,p?null:r,s,i,f,null,l);let g=this._parsePosition(n);this._dict[e]=h,this._list.splice(g,0,h),c&&a&&a.backref&&a._onNodeInserted(h,g,null,u,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 s=Array.isArray(e)?e:[e];if(s.length===0||r>=this._list.length)return;let a=this._list[r].label;if(s.length>1){let i=[...s].sort((c,d)=>c-d),o=i[0]<r?1:0,l=[];for(let c=i.length-1;c>=0;c--){let d=i[c];if(d>=0&&d<this._list.length){let f=this._list[d];this._list.splice(d,1),l.push(f),n&&this._parentBag&&this._parentBag.backref&&this._parentBag._onNodeDeleted(f,d)}}let u=this.index(a);u<0&&(u=this._list.length),u+=o;for(let c of l)this._list.splice(u,0,c),n&&this._parentBag&&this._parentBag.backref&&this._parentBag._onNodeInserted(c,u)}else{let i=s[0];if(i===r||i<0||i>=this._list.length)return;let o=this._list[i];this._list.splice(i,1),n&&this._parentBag&&this._parentBag.backref&&this._parentBag._onNodeDeleted(o,i),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],s=e._list[r];if(!n.isEqual(s))return!1}return!0}};var uo=sa(Os(),1);var qs="::RSLV:",Wd=new Map,Xd=new Map,Mn=new WeakMap,re=class extends Error{constructor(e){super(e),this.name="BagSerializationError"}},Lr=class extends ce{constructor(e){super({asBag:!1}),Mn.set(this,e)}get payload(){return Mn.get(this)}load(){throw new re("This resolver is opaque; local execution is unavailable")}};function io(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 re("Invalid resolver description")}function oo(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 re("Resolver parameters must be JSON data; callbacks cannot travel");e.add(t);for(let r of Object.values(t))oo(r,e);e.delete(t)}}function $r(t){if(Mn.has(t))return Mn.get(t);let e=Xd.get(t.constructor);if(!e)throw new re(`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 io(n),oo(n),qs+JSON.stringify(n)}function Rn(t){if(typeof t!="string"||!t.startsWith(qs))return null;let e=t.slice(qs.length);if(/^[A-Za-z0-9_-]+\.[A-Za-z0-9_-]*\.[A-Za-z0-9_-]+$/.test(e))return new Lr(t);let r;try{r=JSON.parse(e)}catch{throw new re("Invalid resolver JSON or signed token")}io(r);let n=Wd.get(JSON.stringify([r.resolver_module,r.resolver_class]));if(!n)return new Lr(t);let s=n.decode({args:r.args??[],kwargs:r.kwargs});if(!(s instanceof n.cls))throw new re("Resolver decoder returned an incompatible instance");return s}function Ln(t){return Object.fromEntries(Object.entries(t||{}).map(([e,r])=>[e,r instanceof ce?$r(r):r]))}function js(t){return Object.fromEntries(Object.entries(t||{}).map(([e,r])=>[e,Rn(r)??r]))}var Me="__cls";function er(t,e){return t!==null&&t.tytxSuffix===e?t:Br(e)}function Gd(t){let e=t.tytxSuffix,r=Object.entries(Je(e)).filter(([,n])=>n===t).map(([n])=>n);if(r.length===0)throw new re(`${t.name} is not in the TYTX subtype dictionary of '${e}'`);if(r.length>1)throw new re(`${t.name} is in the TYTX subtype dictionary of '${e}' under several names: ${r.sort().join(", ")}`);return r[0]}function Vs(t,e){let r=Je(t);if(!Object.hasOwn(r,e))throw new re(`Unknown Bag class '${e}' for TYTX type '${t}'`);return r[e]}function zs(t,e){return t===e?null:Gd(t)}function*co(t,e=[]){for(let r of t){let n=[...e,r.label];yield[n,r];let s=r.getValue(!0);!r.resolver&&s instanceof de&&(yield*co(s,n))}}function Yd(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 s=e.replace(/\.000Z$/,"Z");return r&&!n?s.slice(s.indexOf("T")+1):s}function tr(t){if(t===null||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null}function mt(t){return typeof t=="string"?t.includes("::")?`${t}::T`:t:Array.isArray(t)?t.map(mt):tr(t)?Object.fromEntries(Object.entries(t).map(([e,r])=>[e,mt(r)])):t}function Hs(t){if(!tr(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 lo=!1,de=class t{static tytxSuffix="X";constructor(e=null,r={}){this._nodes=new Rr,this._backref=!1,this._parent=null,this._parentNode=null,this._rootAttributes=null,this._updSubscribers={},this._insSubscribers={},this._delSubscribers={},Hs(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 Ke}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(s=>s)):n=[...e];n.length&&n[0]==="#parent"&&r!==null;)n.shift(),r=r.parent;return[r,n]}_htraverse(e,r=!1,n=!0){let[s,a]=this._htraverseBefore(e);if(s===null)return[null,null];if(a.length===0)return[s,""];for(;a.length>1&&s instanceof t;){let i=a[0];if(i==="#parent"){if(s.parent===null||s.parent===void 0)break;a.shift(),s=s.parent;continue}let o=s._nodes.get(i);if(!o)break;let l=o.getValue(n);if(l instanceof t)a.shift(),s=l;else if(r){let u=s.createChildBag();o.setValue(u,!0,null,!0,!0,"autocreate"),a.shift(),s=u}else break}if(!r)return a.length>1?[null,null]:[s,a[0]];for(;a.length>1;){let i=a.shift();if(i.startsWith("#"))throw new Fr("Not existing index in #n syntax");let o=s.createChildBag();s._nodes.set(i,o,">",null,s,null,!1,!0,"autocreate"),s=o}return[s,a[0]]}get(e,r=null,n=!0,s={}){if(!e)return this;if(e==="#parent")return this.parent;let a=null;e.includes("?")&&([e,a]=e.split("?",2));let i=this._nodes.get(e);return i?i.getValue(n,a,s):r}getItem(e,r=null,n=!1,s={}){if(!e)return this;let[a,i]=this._htraverse(e,!1,n);return a instanceof t?a.get(i,r,n,s):r}setItem(e,r,n=null,s=">",a=!1,i=!0,o=null,l=!1,u=!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,s,n,f,c,a,i,o,u,l,d)}_pop(e,r=null){let n=this._nodes.index(e);if(n>=0){let s=this._nodes.pop(n);return this.backref&&this._onNodeDeleted(s,n,null,r),s}return null}pop(e,r=null,n=null){let s=this.popNode(e,n);return s?s.value:r}delItem(e,r=null,n=null){return this.pop(e,r,n)}popNode(e,r=null){let[n,s]=this._htraverse(e,!1,!0);if(!n||!s)return null;let a=n._nodes.get(s);if(!a)return null;try{return n._pop(s,r)}finally{a.parentBag===n&&n._nodes._dict[a.label]!==a&&(a.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,s=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[a,i]=this._htraverse(e,n,r);if(a instanceof t&&i){let o=a._nodes.get(i);if(o)return o;if(n)return a._nodes.set(i,s,">",null,a,null,!1,!0,"autocreate"),a._nodes.get(i)}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 s of this)s.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,s=null,a=null,i=null,o=!1){for(let l of Object.values(this._updSubscribers))l({node:e,pathlist:r,oldvalue:s,attrs_diff:a,evt:n,reason:i,fired:o});this._parent&&this._parentNode&&this._parent._onNodeChanged(e,[this._parentNode.label,...r],n,s,a,i,o)}_onNodeInserted(e,r,n=null,s=null,a=!1){let i=e.parentBag,o=e.getValue(!0);i!==null&&i.backref&&o instanceof t&&o.setBackref(e,i),n===null&&(n=[]);for(let l of Object.values(this._insSubscribers))l({node:e,pathlist:n,ind:r,evt:"ins",reason:s,fired:a});this._parent&&this._parentNode&&this._parent._onNodeInserted(e,r,[this._parentNode.label,...n],s,a)}_onNodeDeleted(e,r,n=null,s=null){for(let a of Object.values(this._delSubscribers))a({node:e,pathlist:n,ind:r,evt:"del",reason:s});this._parent&&this._parentNode&&(n===null&&(n=[]),this._parent._onNodeDeleted(e,r,[this._parentNode.label,...n],s))}_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:s=null,delete:a=null,any:i=null}=r;this.backref||this.setBackref(),this._subscribe(e,this._updSubscribers,n||i),this._subscribe(e,this._insSubscribers,s||i),this._subscribe(e,this._delSubscribers,a||i)}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:s=!1,delete:a=!1,any:i=!1}=r;(n||i)&&delete this._updSubscribers[e],(s||i)&&delete this._insSubscribers[e],(a||i)&&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 s=t.prototype.getNode.call(this,e,!0,!0);s&&s.setAttr(r,!0,!0,n)}getAttr(e=null,r=null,n=null){let s=this.getNode(e);return s?s.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 s=n.value;if(s instanceof t){if(s.getItem(e)===r)return n}else if(s&&s.get&&s.get(e)===r)return n}return null}getNodeByAttr(e,r,n=!1,s=!1){let a=r===void 0,i=n&&typeof r=="string"?r.toLowerCase():r,o=l=>{let u=[];for(let c of l._nodes){if(e in c.attr){let d=n&&typeof c.attr[e]=="string"?c.attr[e].toLowerCase():c.attr[e];if(a||d==i)return c}if(c._value instanceof t)if(s){let d=o(c._value);if(d)return d}else u.push(c._value)}for(let c of u){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 s=n.getValue(!0);if(s!=null&&!(e&&s===0)&&!(r&&s===""))return!1}return!0}query(e=null,r=null,n=!1,s=!1,a=!0,i=!0,o=null,l=!0){e||(e="#k,#v,#a");let u=this,c;if(typeof e=="string"){if(e.includes(":")){let[p,h]=e.split(":");u=this.getItem(p),e=h}c=e.split(",").map(p=>p.trim())}else c=e;let d=(p,h,m,g,w)=>{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 b=w();return g&&b instanceof t?null:b}else if(h.startsWith("#v.")){let b=h.split(".").slice(1).join("."),v=w();return v&&v.getItem?v.getItem(b):null}else{if(h==="#__v")return p.getValue(!0);if(h.startsWith("#a")){let b=h.includes(".")?h.split(".").slice(1).join("."):null;return p.getAttr(b)}else{let b=w();return b&&b.getItem?b.getItem(h):null}}};function*f(){let p=0;function*h(m,g){for(let w of m._nodes){let b=g?`${g}.${w.label}`:w.label,v=!1,k,D=()=>(v||(k=w.getValue(l),v=!0),k);if((a&&i||(D()instanceof t?i:a))&&(r===null||r(w))&&(yield c.length===1?d(w,c[0],b,s,D):c.map(C=>d(w,C,b,s,D)),p++,o!==null&&p>=o))return;if(s){let C=D();if(C instanceof t&&(yield*h(C,b),o!==null&&p>=o))return}}}yield*h(u,"")}return n?f():[...f()]}getLeaves(){let e=[],r=(n,s)=>{for(let a of n._nodes){let i=s?`${s}.${a.label}`:a.label,o=a.getValue(!1);o instanceof t?r(o,i):e.push([i,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 s=this.query(e,r,!1,!1,!0,!0,null,!1);if(n){if(!s||s.length===0)return(typeof e=="string"?e:"#k,#v,#a").split(",").map(l=>l.trim()).map(()=>[]);let a=[...s];if(a.length&&Array.isArray(a[0])){let i=a[0].length,o=[];for(let l=0;l<i;l++)o.push(a.map(u=>u[l]));return o}return[a]}return[...s]}columns(e,r=!1){typeof e=="string"&&(e=e.split(","));let n=r?"#a.":"",s=e.map(a=>`${n}${a}`).join(",");return this.digest(s,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 s=a=>{let i=0,o=!1;for(let l of this.query(a,n)){if(l==null||l===""){o=!0;continue}if(typeof l!="number"&&typeof l!="boolean"){if(r)throw new TypeError(`sum encountered non-numeric value: ${typeof l}`);continue}i+=l}return r&&o?null:i};return e.includes(",")?e.split(",").map(a=>s(a.trim())):s(e)}sort(e="#k:a"){let r=(s,a)=>s==null?[-1,""]:a&&typeof s=="string"?[0,s.toLowerCase()]:[0,s],n=(s,a)=>s[0]!==a[0]?s[0]-a[0]:s[1]<a[1]?-1:s[1]>a[1]?1:0;if(typeof e=="function")this._nodes._list.sort((s,a)=>{let i=e(s),o=e(a);return i<o?-1:i>o?1:0});else{let s=e.split(",");s.reverse();for(let a of s){let i,o;a.includes(":")?[i,o]=a.split(":",2):(i=a,o="a"),i=i.trim(),o=o.trim();let l=o==="d"||o==="D",u=o==="a"||o==="d",c;if(i.toLowerCase()==="#k")c=d=>r(d.label,u);else if(i.toLowerCase()==="#v")c=d=>r(d.value,u);else if(i.toLowerCase().startsWith("#a.")){let d=i.slice(3);c=f=>r(f.getAttr(d),u)}else c=d=>{let f=d.value,p=f instanceof t?f.getItem(i):f?f[i]:null;return r(p,u)};this._nodes._list.sort((d,f)=>{let p=n(c(d),c(f));return l?-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(s=>s 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 s=new Mr({callback:r,...n});this.setResolver(e,s)}move(e,r,n=!0){this._nodes.move(e,r,n)}asDict(e=!1,r=!1,n=!1,s=!1){let a={};for(let i of this._nodes){let o=i.value;if(s&&o==null)continue;let l=i.label;e&&(l=String(l)),r&&(l=l.toLowerCase()),n&&o instanceof t&&(o=t.prototype.asDict.call(o,e,r,n,s)),Object.defineProperty(a,l,{value:o,enumerable:!0,writable:!0,configurable:!0})}return a}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 s=n.getValue(!e);s instanceof t&&(s=s.deepcopy(e));let a=new r.nodeClass(r,n.label,s);a.setAttr({...n.attr},!1,!1,!1),a.nodeTag=n.nodeTag,a.xmlTag=n.xmlTag,r._nodes._list.push(a),r._nodes._dict[a.label]=a}return r}update(e,r=null,n=null,s=!1){if(!(e instanceof t)){for(let a in e){let i=e[a];(!s||i!==null||!this._nodes.has(a))&&this.setItem(a,i,null,">",!1,!1,n,!1,n!==!1)}return}for(let a of[...e]){let i=a.label,o=r==="static"?a.resolver:null,l=o?null:a.getValue(),u=a.attr.__replace;delete a.attr.__replace;let c=this._nodes.get(i);if(c)if(c.setAttr(a.attr,n===null?!0:n,!0,!1),a.nodeTag!=null&&(c.nodeTag=a.nodeTag),a.xmlTag!=null&&(c.xmlTag=a.xmlTag),o)c.resolver=o,c.setValue(null,n===null?!0:n,null,null,!1,n);else{a.resolver&&(c.resolver=null);let d=c.getValue();l instanceof t&&d instanceof t&&!u?d.update(l,r,n,s):(!s||l!==null)&&c.setValue(l,n===null?!0:n,null,null,!1,n)}else{let d=this.setItem(i,o||l,a.attr,">",!1,!1,n,!1,n!==!1);d.nodeTag=a.nodeTag,d.xmlTag=a.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,s=null,a=null){if(typeof e!="string")throw new TypeError("Bag labels must be strings");let i=new this.nodeClass(this,e,null,n,s,a,null,!1);return r instanceof ce?i.resolver=r:i._value=r,this._nodes._dict[e]=i,this._nodes._list.push(i),i}fillFrom(e=null,r={}){let n=Hs(r);if(e!=null&&!tr(e)&&!Array.isArray(e))throw new TypeError("Bag source must be a dictionary, array or null");let s=this.createChildBag(),a=new Set,i=(o,l,u)=>{if(a.has(l))throw new TypeError(`Cyclic Bag source at ${u}`);a.add(l);try{let c=Array.isArray(l)?String(l.length).length+1:0,d=Array.isArray(l)?Array.from(l,(f,p)=>[`r_${String(p).padStart(c,"0")}`,f]):Object.entries(l);if(!Array.isArray(l)&&Object.getOwnPropertySymbols(l).some(f=>Object.prototype.propertyIsEnumerable.call(l,f)))throw new TypeError(`Bag labels must be strings at ${u}`);for(let[f,p]of d){let h=p;n&&(tr(h)||Array.isArray(h))&&(h=this.createChildBag(),i(h,p,`${u}[${JSON.stringify(f)}]`)),o._appendLiteral(f,h)}}finally{a.delete(l)}};return e!=null&&i(s,e,"$"),this._replacePrepared(s)}_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 s=n.getValue(!0);s instanceof t&&s.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:s={}}={}){if(typeof e!="function")throw new TypeError("forEach requires a callback");let a=(i,o)=>{for(let l=0;l<i._nodes.length;l++){let u=i._nodes._list[l],c={...o};"_pathlist"in o&&(c._pathlist=[...o._pathlist,u.label]),"_indexlist"in o&&(c._indexlist=[...o._indexlist,l]);let d=e(u,c,l);if(d)return d;if(d==null&&n){let f=u.getValue(r);if(f instanceof t){let p=a(f,c);if(p)return p}}}return null};return a(this,s)}*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 s=r?`${r}.${n.label}`:n.label;yield[s,n];let a=n.getValue(e);a instanceof t&&(yield*a._iterNodesWithPaths(e,s))}}*_nodeFlattener(e=null){let r=e!==null,n=r?Object.create(null):null,s=0,a=new Map([["[]",this.constructor]]);for(let[i,o]of co(this)){let l=i.slice(0,-1),u=JSON.stringify(i),c=JSON.stringify(l),d=o.getValue(!0),f,p=null;if(o.resolver)f=$r(o.resolver);else if(d instanceof t){let g=d.constructor,w=g.tytxSuffix;a.set(u,g),p=zs(g,er(a.get(c),w)),f=`::${w}`}else d===null?f="::NN":f=mt(d);if(o.attr&&Object.hasOwn(o.attr,Me))throw new re(`node '${i}': the attribute '${Me}' is reserved for the Bag class name`);let h=Ln(mt(o.attr));p!==null&&(h[Me]=p);let m=o.nodeTag;r?(yield[l.length?n[c]:null,o.label,m,f,h],d instanceof t&&(n[u]=s,e[s]=i,s++)):yield[l,o.label,m,f,h]}}toTytx(e="json",r=!1){let n=this._toTytxPayload(r),s=this.constructor.tytxSuffix;if(e==="json")return`${n}::${s}`;if(e==="msgpack")return an(new Be(4,new TextEncoder().encode(`${s}:${n}`)));throw new TypeError(`Unsupported transport: ${e}`)}_toTytxPayload(e=!1){let r;if(e){let a={};r={rows:[...this._nodeFlattener(a)],paths:a}}else r={rows:[...this._nodeFlattener(null)]};let n=this.constructor,s=zs(n,er(null,n.tytxSuffix));return s!==null&&(r[Me]=s),r.rows=r.rows.map(([a,i,o,l,u])=>[mt(a),mt(i),mt(o),l,u]),r.paths&&(r.paths=mt(r.paths)),xe(r)}static fromTytx(e,r="json",n={}){if(tr(r)&&(n=r,r="json"),Hs(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 s=ue(e,r==="json"?null:r);if(s instanceof t)return s;if(!tr(s)&&!Array.isArray(s))throw new TypeError("fromTytx requires a dictionary, array or typed Bag root");return new this(s,n)}static _fromTytxPayload(e){let r=this.tytxSuffix;if(e==="")return new(er(null,r));let n=ue(e);if(!n||!Array.isArray(n.rows))throw new re("Invalid TYTX Bag: expected rows");let s=n.paths,a=s!=null,i=Object.hasOwn(n,Me)?Vs(r,n[Me]):er(null,r),o=new i,l=new Map([["[]",o]]);for(let u of n.rows){if(!Array.isArray(u)||u.length!==5)throw new re("Invalid TYTX Bag row");let[c,d,f,p,h]=u,m=c??"";if(a){if(c!==null&&!Object.hasOwn(s,c))throw new re(`Unknown TYTX parent reference: ${c}`);m=c===null?"":s[c]}if(typeof m=="string"&&(m=m?m.split("."):[]),!Array.isArray(m))throw new re("Invalid TYTX parent path");let g=JSON.stringify(m);if(!l.has(g))throw new re(`Missing or undecodable TYTX parent branch: ${m}`);let w=l.get(g),b=JSON.stringify([...m,d]),v=p,k=Rn(v),D=js(h),y=Object.hasOwn(D,Me)?D[Me]:null;if(delete D[Me],v instanceof t){let V=v.constructor.tytxSuffix,Y=y!==null?Vs(V,y):er(w.constructor,V);v=new Y,l.set(b,v)}else if(y!==null)throw new re(`node '${b}': the attribute '${Me}' is reserved for the Bag class name of a branch`);let C=w._appendLiteral(d,k?null:v,D,k);C.nodeTag=f??null}return o}toXml(e={}){let{pretty:r=!1,encoding:n="UTF-8",docHeader:s=null,selfClosedTags:a=null}=e,i=this._bagToXml(a,r);return s===!0?i=`<?xml version='1.0' encoding='${n}'?>
16
+ ${i}`:typeof s=="string"&&(i=`${s}
17
+ ${i}`),i}_bagToXml(e=null,r=!1,n=0){let s=[];for(let a of this._nodes)s.push((r?" ".repeat(n):"")+this._nodeToXml(a,e,r,n));return s.join(r?`
18
+ `:"")}_nodeToXml(e,r=null,n=!1,s=0){let a=e.xmlTag||e.nodeTag||e.label,i=this._sanitizeTag(a),o=[];if(i!==a&&o.push(`_tag="${this._escapeAttr(a)}"`),e.resolver&&o.push(`_resolver="${this._escapeAttr($r(e.resolver))}"`),e.attr)for(let[f,p]of Object.entries(Ln(e.attr)))p!==null&&p!==!1&&p!==void 0&&o.push(`${f}="${this._escapeAttr(String(p))}"`);let l=o.length?" "+o.join(" "):"",u=e.resolver?null:e.getValue(!0);if(u&&typeof u._bagToXml=="function"){n=n&&e.attr?.["xml:space"]!=="preserve";let f=u._bagToXml(r,n,s+1);return f?n?`<${i}${l}>
19
+ ${f}
20
+ ${" ".repeat(s)}</${i}>`:`<${i}${l}>${f}</${i}>`:r===null||r.includes(i)?`<${i}${l}/>`:`<${i}${l}></${i}>`}if(u==null||u==="")return r===null||r.includes(i)?`<${i}${l}/>`:`<${i}${l}></${i}>`;let c=u instanceof Date&&!Number.isNaN(u.getTime())?Yd(u):String(u),d=this._escapeXml(c);return`<${i}${l}>${d}</${i}>`}_sanitizeTag(e){return e?e.replace(/[^a-zA-Z0-9_\-.:]/g,"_"):"_none_"}_escapeXml(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}_escapeAttr(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}static fromXml(e,r={}){let{tagAttribute:n=null}=r,s;if(typeof DOMParser<"u"){s=new DOMParser().parseFromString(e,"application/xml");let i=s.querySelector("parsererror");if(i)throw new Error(`XML parse error: ${i.textContent}`)}else s=new uo.DOMParser().parseFromString(e,"application/xml");return this._xmlElementToBag(s.documentElement,n)}static _xmlElementToBag(e,r=null){let n=new this,s=Array.from(e.childNodes).filter(a=>a.nodeType===1);for(let a of s){let i=a.tagName,o={};for(let m=0;m<a.attributes.length;m++){let g=a.attributes[m];o[g.name]=g.value}let l=Rn(o._resolver);l&&delete o._resolver;let u=String(o._T||"").toUpperCase()==="BAG";Object.assign(o,js(o));let c=i;"_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(a.childNodes).filter(m=>m.nodeType===1),h;if(p.length>0||u){let m=this._xmlElementToBag(a,r);h=n.setItem(c,m,Object.keys(o).length>0?o:null)}else{let m=a.textContent||"";h=n.setItem(c,m,Object.keys(o).length>0?o:null)}l&&(h.resolver=l),h.xmlTag=i}return n}static async fromUrl(e,r={}){let{timeout:n=30}=r,s={};n&&(s.signal=AbortSignal.timeout(n*1e3));let a=await fetch(e,s),i=a.headers.get("content-type")||"",o=await a.text();if(i.includes("json"))return t.fromTytx(o);if(i.includes("xml"))return t.fromXml(o);let l=o.trim();if(l.startsWith("<"))return t.fromXml(o);if(l.startsWith("{")||l.startsWith("["))return t.fromTytx(o);throw new Fr(`Unsupported content-type: ${i}`)}toJson(e=!0){let r=[];for(let n of this._nodes)r.push(this._nodeToJsonDict(n,e));return e?xe(r):JSON.stringify(r)}_nodeToJsonDict(e,r){let n=e.resolver?null:e.getValue(!0);if(n&&typeof n._nodeToJsonDict=="function"){let a=[];for(let i of n._nodes)a.push(n._nodeToJsonDict(i,r));n=a}let s={label:e.label,value:n,attr:Ln(e.attr)};return e.nodeTag!==null&&(s.tag=e.nodeTag),e.resolver&&(s.resolver=$r(e.resolver)),s}static fromJson(e,r={}){return lo||(console.warn("Bag.fromJson is deprecated; use Bag.fromTytx"),lo=!0),this.fromTytx(e,"json",r)}toStringTree(e=!0,r=null,n="",s=!0){r===null&&(r=new Map);let a=[],i=[...this._nodes];for(let o=0;o<i.length;o++){let l=i[o],u=o===i.length-1,c=l.getValue(e),d=l.getAttr(),f="",p=Object.keys(d);p.length>0&&(f=" ["+p.map(w=>`${w}=${JSON.stringify(d[w])}`).join(", ")+"]");let h=u?"\u2514\u2500\u2500 ":"\u251C\u2500\u2500 ",m=n+(u?" ":"\u2502 ");if(c instanceof t){let g=l,w=c.backref?"(*)":"";if(r.has(g))a.push(`${n}${h}${l.label}${w}${f} \u2192 (circular ref)`);else{r.set(g,l.label),a.push(`${n}${h}${l.label}${w}${f}`);let b=c.toStringTree(e,r,m,u);b&&a.push(b)}}else{let g;if(c===null)g="null";else if(c===void 0)g="undefined";else if(c instanceof ArrayBuffer||c instanceof Uint8Array){let w=new TextDecoder("utf-8",{fatal:!1}),b=c instanceof ArrayBuffer?new Uint8Array(c):c;g=w.decode(b)}else typeof c=="string"?c.length>50?g=JSON.stringify(c.slice(0,47)+"..."):g=JSON.stringify(c):g=String(c);a.push(`${n}${h}${l.label}: ${g}${f}`)}}return a.join(`
21
+ `)}toString(e=!0,r=null,n=""){r||(r=new Set);let s=[],a=[...this._nodes];for(let i=0;i<a.length;i++){let o=a[i],l=i===a.length-1,u=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=l?"\u2514\u2500\u2500 ":"\u251C\u2500\u2500 ",p=n+(l?" ":"\u2502 ");if(u&&typeof u._htraverse=="function"){let h=o;if(r.has(h))s.push(`${n}${f}${o.label}${c} \u2192 (circular ref)`);else{r.add(h),s.push(`${n}${f}${o.label}${c}`);let m=u.toString(e,r,p);m&&s.push(m)}}else{let h;u==null?h="null":typeof u=="string"&&u.length>50?h=JSON.stringify(u.slice(0,47)+"..."):typeof u=="string"?h=JSON.stringify(u):h=String(u),s.push(`${n}${f}${o.label}: ${h}${c}`)}}return s.join(`
22
+ `)}},Fr=class extends Error{constructor(e){super(e),this.name="BagException"}};ce.registerBagClass(de);Ps(de,"X",t=>t._toTytxPayload(),t=>de._fromTytxPayload(t));Ir(de.tytxSuffix,{...Je(de.tytxSuffix),Bag:de});var fo=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 po(t){return t.endsWith("_")&&fo.has(t.slice(0,-1))?t.slice(0,-1):t}function ho(t){let e=po(t);return e!==t?e:t.startsWith("_")&&fo.has(t.slice(1))?t.slice(1):t}function Ws(t,{renderTag:e=null,ns:r=null,dialectName:n=null}={}){let s=e||t;if(!s)return s;if(s=po(s),r&&!e){let a=`${n}_`;s.startsWith(a)&&(s=s.slice(a.length)),s=`${r}:${s}`}return s}var nr=Symbol("value"),_o=new Set(["_meta","datapath","nodeId","ns","form","formId","_anchor","updateOn"]);function Xs(t){return Object.entries(t||{}).filter(([e])=>!_o.has(e)).map(([e,r])=>[ho(e),r])}var rr=class extends Ke{constructor(e,r,n=null,s=null,a=null,i=null,o=null){super(e,r,n,s,a,i,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(s=>s.trim());return n.length===1?r[n[0]]!==void 0?r[n[0]]:null:n.map(s=>r[s]!==void 0?r[s]: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 Xs(this.getAttr())}runtimeToEvaluate(){let e=new Map(this.fixedAttrItems());return e.set(nr,this.value),e}absDatapath(e){let r=e;this.pointerType(e)&&(e=(rt(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 s=n.getAttr("datapath");s!=null&&(e=e==="."?s:s+e),n=n.parentNode}if(e.startsWith("."))throw new Error(`unresolved relative datapath: ${r}`);return e}_collapseParentDatapath(e,r){let n=[];for(let s of e.split("."))if(s==="#parent"){if(n.length===0)throw new Error(`#parent has no segment to cancel: ${r}`);n.pop()}else n.push(s);return n.join(".")}_resolveSymbolicDatapath(e,r){let n=e.slice(1),s=n.indexOf("."),a=s===-1?n:n.slice(0,s),i=s===-1?"":n.slice(s+1),o;if(a==="FORM")o=this._findMarkedDatapathAncestor(!0,!1,r);else if(a==="ANCHOR")o=this._findMarkedDatapathAncestor(!1,!0,r);else{let l=this.rootBuilder;if(!l)throw new Error(`#<id>: cannot resolve ${r} on a node without builder`);if(o=l.source.getNodeByAttr("nodeId",a),o==null)throw new Error(`#<id>: cannot resolve ${r}`)}return o.absDatapath(i?`.${i}`:".")}_findMarkedDatapathAncestor(e,r,n){let s=this;for(;s!=null;){let i=s.getAttr()||{};if(e&&(i.formId!=null||i.form===!0)||r&&"_anchor"in i)return s;s=s.parentNode}let a=e?"FORM":"ANCHOR";throw new Error(`#${a}: no marked ancestor found for ${n}`)}getRelativeData(e,r=null,{autocreate:n=!1}={}){let s=this.data,a=this.absDatapath(e);return n&&s.getItem(a)==null&&s.setItem(a,r),s.getItem(a,r)}setRelativeData(e,r,{attributes:n=null,fired:s=!1,reason:a=null}={}){let i=this.data,o=this.absDatapath(e);i.setItem(o,r,n,">",!1,!0,a===null?!0:a,s)}fireEvent(e,r=!0,{attributes:n=null,reason:s=null}={}){this.setRelativeData(e,r,{attributes:n,fired:!0,reason:s})}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})}},te=class t extends de{constructor(e=null,r=null){super(e),this._builder=r,this._insertingBuilder=null}get nodeClass(){return rr}_setBuilderItem(e,r,n,...s){let a=r?.map(([o])=>[o,o._builder])||null;if(r)for(let[o,l]of r)o._builder=l;let i=this._insertingBuilder;this._insertingBuilder=e;try{return this.setItem(n,...s)}catch(o){if(this.node(n)==null&&a)for(let[l,u]of a)l._builder=u;throw o}finally{this._insertingBuilder=i}}bindBuilder(e){if(!e)throw new Error("SourceBag.bindBuilder requires a builder");let r=this._builderBindingPlan(e);for(let[n,s]of r)n._builder=s;return this.setBackref(),this}_builderBindingPlan(e){let r=[],n=new WeakSet,s=(a,i)=>{if(n.has(a))throw new Error("source contains a cyclic or shared SourceBag branch");n.add(a),r.push([a,i]);for(let o of a.getNodes()){let l=i,u=o._getMeta("subbuilder");u!=null&&(l=i._resolveSubbuilderReference(u,o.getAttr()||{},o.nodeTag)),r.push([o,l]);let c=o.getValue(!0);c instanceof t&&s(c,l)}};return s(this,e),r}};if((Je(te.tytxSuffix).SourceBag??te)!==te)throw new Error("TYTX subtype name 'SourceBag' is already registered for another class");Ir(te.tytxSuffix,{...Je(te.tytxSuffix),SourceBag:te});function Qd(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 ef=new Set(["then","toJSON"]),go=new WeakMap;function Ur(t){return go.get(t)||t}function Gs(t){if(t==null)return t;t=Ur(t);let e=t._builder||t.parentBag&&t.parentBag._builder;return e?e.wrapSource(t):t}function bo(t,e){let r=e instanceof de,n=new Proxy(e,{get(s,a){if(typeof a=="symbol"||a.startsWith("_")||ef.has(a))return Reflect.get(s,a,s);let i=t.schemaTag(a);if(r&&i)return mo(t,s,i,r);if(a in s){let l=Reflect.get(s,a,s);return typeof l=="function"?l.bind(s):l}if(i)return mo(t,s,i,r);let o=t.containerMethod(a);if(o)return(...l)=>t[o](t.wrapSource(s),...l)}});return go.set(n,e),n}function mo(t,e,r,n){return(...s)=>{let{value:a,attrs:i}=Qd(s),o=n?t.bagCall(e,r,a,i):t.commandOnNode(e,r,a,i);return o.builder.wrapSource(o)}}var yo=/^[A-Za-z_][A-Za-z0-9_]*$/,tf=new Set(["positional_only","positional_or_keyword","keyword_only","var_positional","var_keyword"]),rf=new Set(["framework","value","attribute"]),nf=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 Tt(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function x(t,e){throw new TypeError(`${t}: ${e}`)}function ze(t,e,r,n){Tt(t)||x(n,"must be an object");for(let s of Object.keys(t))e.includes(s)||x(n,`unknown field '${s}'`);for(let s of r)Object.hasOwn(t,s)||x(n,`missing field '${s}'`)}function Ct(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)=>Ct(r,`${e}[${n}]`));if(Tt(t))return Object.entries(t).forEach(([r,n])=>Ct(n,`${e}.${r}`));x(e,"must be lossless JSON data")}}function sf(t,e){let r="",n=!1;for(let s=0;s<t.length;s++){let a=t[s];if(a==="\\"){r+=a+(t[++s]??"");continue}a==="["&&(n=!0),!n&&a==="."&&!(e&16)?r+="[^\\n]":!n&&a==="^"&&e&8?r+="(?:^|(?<=\\n))":!n&&a==="$"?r+=e&8?"(?=\\n|(?![\\s\\S]))":"(?=\\n?(?![\\s\\S]))":r+=a,a==="]"&&(n=!1)}return r}function xt(t,e,r=!1,n=null){if(t===null)return null;switch(ze(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 ze(t,["kind","name"],["kind","name"],e),n||x(e,"custom references require a catalog; nested catalog references are unsupported"),n.resolve(t.name,e);case"dtype":{ze(t,["kind","dtype"],["kind","dtype"],e);let s=t.dtype;typeof s!="string"&&x(e,"dtype must be a string");let a=Br(s);return!a&&s!=="NN"&&x(e,`unknown dtype '${s}'`),{...t,test:o=>s==="NN"?o===null:s==="N"?Ne(o)&&!["NaN","Infinity","-Infinity"].includes(o.toString()):a===Number?typeof o=="number"&&Number.isFinite(o)&&(s!=="L"||Number.isInteger(o)):a===String?typeof o=="string":a===Boolean?typeof o=="boolean":a===Date?o instanceof Date&&Number.isFinite(o.getTime()):a===Object?Tt(o)&&[Object.prototype,null].includes(Object.getPrototypeOf(o)):o instanceof a}}case"any":return{...t,test:s=>!0};case"type":{(typeof t.module!="string"||typeof t.name!="string")&&x(e,"type requires string module/name");let s=`${t.module}.${t.name}`;if(s==="collections.abc.Callable")return{...t,test:i=>typeof i=="function",portable:!1};let a=nf.get(s);return a||x(e,`unsupported type '${s}'`),{...t,test:a}}case"union":{(!Array.isArray(t.items)||!t.items.length)&&x(e,"union items must be non-empty");let s=t.items.map((a,i)=>xt(a,`${e}.items[${i}]`,!0,n));return{...t,items:s,inputConstraint:s.some(a=>a.inputConstraint),test:a=>s.some(i=>i.test&&i.test(a))}}case"literal":return Array.isArray(t.values)||x(e,"literal values must be an array"),t.values.forEach((s,a)=>Ct(s,`${e}.values[${a}]`)),{...t,test:s=>t.values.some(a=>Object.is(a,s))};case"annotated":{Array.isArray(t.metadata)||x(e,"annotated metadata must be an array"),t.metadata.some(i=>!["regex","range","value"].includes(i?.kind))&&x(e,"unsupported annotation metadata kind");let s=xt(t.base,`${e}.base`,!0,n),a=t.metadata.map((i,o)=>xt(i,`${e}.metadata[${o}]`,!0,n));return{...t,base:s,metadata:a,inputConstraint:s.inputConstraint,test:i=>s.test(i)&&a.every(o=>!o.test||o.test(i))}}case"range":{for(let s of["ge","le","gt","lt"])Object.hasOwn(t,s)||x(e,`range missing '${s}'`);for(let s of["ge","le","gt","lt"])t[s]!==null&&(typeof t[s]!="number"||!Number.isFinite(t[s]))&&x(e,`${s} must be finite number or null`);return{...t,test:s=>typeof s=="number"&&(t.ge===null||s>=t.ge)&&(t.le===null||s<=t.le)&&(t.gt===null||s>t.gt)&&(t.lt===null||s<t.lt)}}case"regex":{(typeof t.pattern!="string"||!Number.isInteger(t.flags)||t.flags<0)&&x(e,"regex requires pattern and non-negative integer flags");let s=t.flags&-59;s&&x(e,`unsupported Python regex flags ${s}`),t.flags&2&&x(e,"IGNORECASE is not portable across Python and JavaScript Unicode rules"),/\\[AZzUwWdDsSabBN0-9]|\(\?P[<=!]|\(\?\(|\(\?>|\(\?#|\(\?[aiLmsux-]|[+*?}]\+|\{,/.test(t.pattern.replaceAll(String.raw`[\s\S]`,"."))&&x(e,"regex uses a non-portable construct or character class");let a="uy";t.flags&16&&(a+="s");let i;try{i=new RegExp(`(?:${sf(t.pattern,t.flags)})(?![\\s\\S])`,a)}catch(o){x(e,`invalid portable regex: ${o.message}`)}return{...t,test:o=>typeof o!="string"?!1:(i.lastIndex=0,i.test(o))}}case"value":return Ct(t.value,`${e}.value`),{...t};case"generic":{let s=xt(t.origin,`${e}.origin`,!0,n);(t.origin?.kind!=="type"||t.origin.module!=="builtins"||!["list","dict","tuple","set"].includes(t.origin.name))&&x(e,"only list, dict, tuple and set generic origins are supported"),Array.isArray(t.arguments)||x(e,"generic arguments must be an array");let a=t.arguments.map((i,o)=>xt(i,`${e}.arguments[${o}]`,!0,n));return{...t,origin:s,arguments:a,inputConstraint:a.some(i=>i.inputConstraint),test:i=>s.test(i)&&af(t.origin,a,i)}}case"arguments":x(e,"Callable argument-list descriptors are not supported by Python validation");case"ellipsis":return r||x(e,"ellipsis is only valid as a nested descriptor"),{...t};default:x(e,`unknown annotation kind '${t.kind}'`)}}function af(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((s,a)=>e[a].test(s)):n==="builtins.list"||n==="builtins.set"||n==="builtins.tuple"?[...r].every(s=>!e[0]?.test||e[0].test(s)):n==="builtins.dict"?Object.entries(r).every(([s,a])=>(!e[0]?.test||e[0].test(s))&&(!e[1]?.test||e[1].test(a))):!1}function vo(t,e){if(t===null)return null;if(typeof t!="string"&&x(e,"must be string or null"),t==="")return new Map;let r=new Map;for(let n of t.split(",")){let s=n.trim();/^[A-Za-z_][A-Za-z0-9_]*\[\]$/.test(s)&&x(e,`invalid cardinality item '${n}'`);let a=s.match(/^([A-Za-z_][A-Za-z0-9_]*|\*)(?:\[(?:(\d+)|(?:(\d*):(\d*)))\])?$/);a||x(e,`invalid cardinality item '${n}'`);let[,i,o,l,u]=a;r.has(i)&&x(e,`duplicate tag '${i}'`);let c=0,d=1/0;s.includes("[")&&(s.includes(":")?(c=l?Number(l):0,d=u?Number(u):1/0):c=d=Number(o)),d<c&&x(e,`maximum ${d} is below minimum ${c}`),r.set(i,{min:c,max:d})}return r.has("*")&&r.size>1&&x(e,"wildcard '*' cannot be combined with named tags"),r}function ko(t,e){if(t===null)return null;typeof t!="string"&&x(e,"must be string or null");let r=new Set;for(let n of t.split(",")){let s=n.trim();s&&((!yo.test(s)||r.has(s))&&x(e,`invalid or duplicate parent '${n}'`),r.add(s))}return r}function of(t,e,r){if(t===null)return null;ze(t,["parameters","accepts_var_keyword","accepts_var_positional"],[],e);let n=t.parameters??[];Array.isArray(n)||x(e,"parameters must be an array"),t={parameters:n,accepts_var_keyword:n.some(l=>l.kind==="var_keyword"),accepts_var_positional:n.some(l=>l.kind==="var_positional"),...t},(!Array.isArray(t.parameters)||typeof t.accepts_var_keyword!="boolean"||typeof t.accepts_var_positional!="boolean")&&x(e,"invalid signature descriptor");let s=new Set,a=!1,i=!1,o=t.parameters.map((l,u)=>{let c=`${e}.parameters[${u}]`;return ze(l,["name","kind","role","annotation","has_default","default"],["name","kind","role","annotation","has_default"],c),(typeof l.name!="string"||!yo.test(l.name)||s.has(l.name))&&x(c,"invalid or duplicate parameter name"),s.add(l.name),(!tf.has(l.kind)||!rf.has(l.role)||typeof l.has_default!="boolean")&&x(c,"invalid kind, role, or has_default"),l.has_default!==Object.hasOwn(l,"default")&&x(c,"default presence must equal has_default"),l.has_default&&Ct(l.default,`${c}.default`),a||=l.kind==="var_keyword",i||=l.kind==="var_positional",{...l,annotation:xt(l.annotation,`${c}.annotation`,!1,r)}});return(a!==t.accepts_var_keyword||i!==t.accepts_var_positional)&&x(e,"variadic summary flags do not match parameters"),{...t,parameters:o}}function wo(t,e,r,n){let s=["doc","sub_tags","parent_tags","inherits_from","ns","attributes",...r?["node_label","collection_key"]:[],"_meta"];ze(t,s,[],e),t={...Object.fromEntries(s.map(a=>[a,null])),...t};for(let a of["doc","inherits_from","ns",...r?["node_label","collection_key"]:[]])t[a]!==null&&typeof t[a]!="string"&&x(e,`${a} must be string or null`);return t._meta!==null&&(Tt(t._meta)||x(e,"_meta must be object or null"),Ct(t._meta,`${e}._meta`)),vo(t.sub_tags,`${e}.sub_tags`),ko(t.parent_tags,`${e}.parent_tags`),{...t,attributes:of(t.attributes,`${e}.attributes`,n)}}function Eo(t){return t?t.split(",").map(e=>e.trim()).filter(Boolean):[]}function Do(t,e){let r={...e};for(let[n,s]of Object.entries(t))n==="inherits_from"||n.startsWith("_")||r[n]||(r[n]=s);return r._meta={...t._meta||{},...e._meta||{}},r}function Ao(t){let e={...t};return e._subSpec=Object.hasOwn(e,"sub_tags")?vo(e.sub_tags,"resolved.sub_tags"):null,e._parentSpec=Object.hasOwn(e,"parent_tags")?ko(e.parent_tags,"resolved.parent_tags"):null,e}function xo(t,e,r,n){if(r.get(t)===1&&x(n,`inheritance cycle at '${t}'`),r.get(t)===2)return e[t];let s=e[t];s||x(n,`unknown abstract '${t}'`),r.set(t,1);let a={...s};for(let i of Eo(s.inherits_from))a=Do(xo(i,e,r,n),a);return a=Ao(a),r.set(t,2),e[t]=a,a}function Ys({abstracts:t={},elements:e={}}){let r={...t},n=new Map;for(let a of Object.keys(r))xo(a,r,n,`abstracts.${a}.inherits_from`);let s={};for(let[a,i]of Object.entries(e)){let o={...i};for(let l of Eo(i.inherits_from)){let u=r[l];u||x(`elements.${a}.inherits_from`,`unknown abstract '${l}'`),o=Do(u,o)}s[a]=Ao(o)}return{abstracts:r,elements:s}}function Zs(t){ze(t,["document_format","grammar","abstracts","elements","custom_types"],["document_format","grammar","abstracts","elements"],"grammar document"),ze(t.document_format,["name","version"],["name","version"],"document_format"),(t.document_format.name!=="builder_grammar"||!["1.1","1.2"].includes(t.document_format.version))&&x("document_format","expected builder_grammar version 1.1 or 1.2"),ze(t.grammar,["name","version","title","description"],["name","version","title","description"],"grammar"),(typeof t.grammar.name!="string"||!t.grammar.name)&&x("grammar.name","must be non-empty string");for(let s of["version","title","description"])t.grammar[s]!==null&&typeof t.grammar[s]!="string"&&x(`grammar.${s}`,"must be string or null");(!Tt(t.abstracts)||!Tt(t.elements))&&x("grammar document","abstracts/elements must be objects"),Object.hasOwn(t,"custom_types")&&t.document_format.version!=="1.2"&&x("custom_types","requires version 1.2");let e=$n.fromJSON(t.custom_types??{}),r={};for(let[s,a]of Object.entries(t.abstracts))(!s||s.startsWith("_"))&&x("abstracts",`invalid public name '${s}'`),r[s]=wo(a,`abstracts.${s}`,!1,e);let n={};for(let[s,a]of Object.entries(t.elements))(!s||s.startsWith("_"))&&x("elements",`invalid public name '${s}'`),n[s]=wo(a,`elements.${s}`,!0,e);return{grammar:structuredClone(t.grammar),abstracts:r,elements:n}}function To(t,e,r,n){let s=e.attributes;if(!s)return;let a={...n};r!=null&&(a.node_value=r);let i=new Set(s.parameters.filter(u=>u.role==="attribute").map(u=>u.name)),o=new Set(["node_label","node_position","nodeId","target_id","datapath","iterate","store","_tag","_meta","ns"]);if(!s.accepts_var_keyword)for(let u of Object.keys(n))!i.has(u)&&!o.has(u)&&x(t,`unknown attribute '${u}'`);let l=e._meta?.component?s.parameters.find(u=>u.role!=="framework"&&["positional_only","positional_or_keyword"].includes(u.kind))?.name:null;for(let u of s.parameters){if(u.name===l||u.role==="framework"||u.kind.startsWith("var_"))continue;let c=Object.hasOwn(a,u.name);!c&&!u.has_default&&x(t,`missing required ${u.role} '${u.name}'`),c&&u.annotation!==null&&(!u.annotation.test||!u.annotation.test(a[u.name]))&&x(t,`invalid value for ${u.role} '${u.name}'`)}}var $n=class t{#e=new Map;#i=new Map;register(e,r,n){let s=new Map([[String,"str"],[Number,"float"],["string","str"],["integer","int"],["number","float"]]),a=s.has(r)?{kind:"type",module:"builtins",name:s.get(r)}:r;return this.#s(e,{kind:"annotated",base:a,metadata:[n]})}#s(e,r){(typeof e!="string"||!/^[A-Za-z][A-Za-z0-9_]*$/.test(e)||e in this||["to_dict","from_dict"].includes(e)||lf.has(e))&&x("custom_types",`invalid, reserved or duplicate name '${e}'`),ze(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))&&x(`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))&&x(`custom_types.${e}`,"portable Regex requires str; portable Range requires int or float"),Ct(r,`custom_types.${e}`);let s=structuredClone(r),a=xt(s,`custom_types.${e}`),i=Object.freeze({kind:"custom",name:e});return Object.defineProperty(this,e,{value:i,enumerable:!0}),this.#e.set(e,s),this.#i.set(e,{...i,inputConstraint:!0,test:a.test}),i}resolve(e,r="custom_types"){return this.#i.has(e)||x(r,`unknown custom type '${e}'`),{...this.#i.get(e)}}validate(e,r){return this.resolve(e).test(r)||x(`custom_types.${e}`,"invalid input value"),!0}toJSON(){return structuredClone(Object.fromEntries(this.#e))}static fromJSON(e){Tt(e)||x("custom_types","must be an object");let r=new t;for(let[n,s]of Object.entries(e))r.#s(n,s);return r}},lf=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 Co(t,e,r,n){let s=e?.attributes;if(s)for(let a of s.parameters){if(!a.annotation?.inputConstraint||a.role==="framework"||["var_keyword","var_positional"].includes(a.kind))continue;let i=a.role==="value"?r:n[a.name];i!==void 0&&(a.annotation.test(i)||x(t,`invalid input for '${a.name}' (custom type)`))}}function No(t,e,r=[]){if(e===null)return structuredClone(t);if(r.length===2&&r[0]==="custom_types"&&t!==void 0){if(!Js(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(Qe(t)&&Qe(e)){let n=structuredClone(t);for(let[s,a]of Object.entries(e))a!==null&&Object.defineProperty(n,s,{value:No(n[s],a,[...r,s]),enumerable:!0,writable:!0,configurable:!0});return n}return structuredClone(e)}function Js(t,e){return Object.is(t,e)?!0:Array.isArray(t)&&Array.isArray(e)?t.length===e.length&&t.every((r,n)=>Js(r,e[n])):Qe(t)&&Qe(e)?Object.keys(t).length===Object.keys(e).length&&Object.keys(t).every(r=>Object.hasOwn(e,r)&&Js(t[r],e[r])):!1}function Qe(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&Object.getPrototypeOf(t)===Object.prototype}function Ks(t){if(!(t===null||typeof t=="string"||typeof t=="boolean")&&!(typeof t=="number"&&Number.isFinite(t))){if(Array.isArray(t)){t.forEach(Ks);return}if(Qe(t)){Object.values(t).forEach(Ks);return}throw new TypeError("collection must contain only finite JSON values")}}var et=class t{#e;constructor(e){Ks(e);let r=["document_format","grammar","abstracts","elements"];if(!Qe(e)||Object.keys(e).some(s=>![...r,"custom_types"].includes(s))||r.some(s=>!Object.hasOwn(e,s)))throw new TypeError("collection requires document_format, grammar, abstracts and elements");let n=e.document_format;if(!Qe(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 s of["grammar","abstracts","elements"])if(!Qe(e[s]))throw new TypeError(`${s} must be an object`);if(Object.hasOwn(e,"custom_types")&&(n.version!=="1.2"||!Qe(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=No(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 Nt=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,[s,a]=n.runtimeValues(e);if(e._getMeta("data_element"))return null;if(e._getMeta("component"))return this._renderComponent(e,a,r);let i=this.getRender(n),o;return[o,a]=i._handleMeta(e,a),e._getMeta("subbuilder")||(a=i.adaptAttrs(a)),e.value instanceof te&&(s=this.renderChildren(e.value,r)),i.renderedItem(e,s,a,{tag:o,...r})}renderChildren(e,r={}){let n=[];for(let s of e.getNodes()){let a=this.render(s,r);a!==null&&(Array.isArray(a)?n.push(...a):n.push(a))}return n}_renderComponent(e,r,n){let[s,a,i,o]=this._expansionInputs(e,r);if(!Object.hasOwn(e.getAttr(),"iterate"))return this._expandBlock(e,s,i,o,n);if(a==null)return[];if(!(a instanceof de))throw new TypeError(`component '${e.nodeTag}': iterate must resolve to a Bag, got ${a?.constructor?.name||typeof a}`);return a.getNodes().map(l=>this._expandBlock(e,s,i,{node_label:l.label},n))}_expansionInputs(e,r){let n=e.builder,s=n.componentMethod(e.nodeTag),a=s&&n[s];if(typeof a!="function")throw new Error(`component '${e.nodeTag}' has no implementation`);let i=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 l of Object.keys(r)){let u=e.getAttr(l);e.pointerType(u)==="^"&&(r[l]=`^${e.absDatapath(u)}`)}return[a,i,o,r]}_expandBlock(e,r,n,s,a){let i=e.builder._expansionRoot(n);r.call(e.builder,Gs(i),s);let o=i.getNodes();if(o.length!==1)throw new Error(`component '${e.nodeTag}' must build a tree, not a forest: ${o.length} root nodes`);let l={...a,depthOffset:this._nodeDepth(e,a.depthOffset||0)};return this.render(o[0],l)}preprocess(e){return e}renderedItem(e,r,n,s){throw new Error(`${this.constructor.name} does not implement renderedItem`)}_handleMeta(e,r){let[n,s]=e._getMeta("render_tag,render_attributes"),a=Ws(e.nodeTag,{renderTag:n,ns:e.getAttr("ns"),dialectName:e.builder?.constructor._name});if(!a)throw new Error(`node ${e.label} has no tag to render (no render_tag, no node_tag)`);return s&&(r={...r,...s}),[a,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 s=this._composeStringFragments(e);if(r==null)return s;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(s),null;if(typeof r.write=="function")return r.write(s),null;if(typeof r=="function")return r(s),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("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;")}_escapeAttr(e){return this._escapeText(e).replaceAll('"',"&quot;")}_nodeDepth(e,r=0){let s=((e.fullpath||"").match(/\./g)||[]).length;return Math.max(s-1,0)+r}};var St=class extends Nt{static mode="xml";renderedItem(e,r,n,{tag:s,pretty:a=!1,depthOffset:i=0}={}){let o=this._formatAttrs(n),l=a?" ".repeat(this._nodeDepth(e,i)):"",u=a?`
23
+ `:"";if(Array.isArray(r)){let c=this._composeStringFragments(r);return`${l}<${s}${o}>${u}${c}${l}</${s}>${u}`}return r==null?`${l}<${s}${o}></${s}>${u}`:`${l}<${s}${o}>${this._escapeText(r)}</${s}>${u}`}finalize(e,r=null,{docHeader:n=null}={}){let s=this._composeStringFragments(e);return n===!0?s=`<?xml version='1.0' encoding='UTF-8'?>${s}`:typeof n=="string"&&(s=n+s),super.finalize(s,r)}_formatAttrs(e){return Object.entries(e||{}).map(([r,n])=>` ${r.startsWith("xmlns_")?`xmlns:${r.slice(6)}`:r}="${this._escapeAttr(n)}"`).join("")}};var So={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 Oo(t){let e=[];for(;t&&t!==Function.prototype;)e.push(t),t=Object.getPrototypeOf(t);return e.reverse()}function cf(t){let e=Object.create(null),r=(n,s)=>{let a=n.toLowerCase(),i=e[a];if(i!==void 0&&i!==s)throw new Error(`container '${n}' is already tied to implementation method '${i}' (cannot rebind to '${s}')`);e[a]=s};for(let n of Oo(t))if(Object.hasOwn(n,"containers"))for(let s of n.containers||[])r(s,s);return e}function Pr(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 qr="_root_",Qs="_root_",Bo=new Set(["destination","func","value","_on_start"]),He=class t{static _sourceClass=te;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 de,this._dataroot.setBackref(),this._dataroot.setItem(Qs,new de),this.data=this._dataroot.getItem(Qs),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(qr,new r(null,this)),this.source=this._sourceroot.getItem(qr)}wrapSource(e){if(e=Ur(e),!(e instanceof te)&&!(e instanceof rr))throw new TypeError("wrapSource requires a SourceBag or SourceBagNode");let r=this._sourceHandles.get(e);return r||(r=bo(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 et(r.toDocument()).update(e):new et(e),s=Zs(n.toDocument()),a=Ys(s),i=Pr(a.elements);this._classCollection=n,this._classSchema=a.elements,this._abstracts=a.abstracts,this._tagNames=i}static{this.defineGrammar(So)}get _containers(){return cf(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??=Pr(this.schema):this.constructor._tagNames??=Pr(this.schema)}schemaTag(e){let r=e.toLowerCase(),n=this.schemaTagNames[r];if(n)return n;let s=`${this.constructor._name}_`;return r.startsWith(s)&&this.schemaTagNames[r.slice(s.length)]||null}loadGrammar(e,{replace:r=!1}={}){let n=this._collection||this.constructor._classCollection,s=r?new et(e):new et(n.toDocument()).update(e),a=Zs(s.toDocument()),i=Ys(a),o=Pr(i.elements);return this._collection=s,this._schemaOverride=i.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;Co(e.nodeTag,n.schema[e.nodeTag],e.value,e.getAttr()||{})}validateNodeValues(e,r,n={}){let s=this.schemaTag(e);if(!s)throw new Error(`unknown element '${e}'`);return To(s,this.schema[s],r,n),!0}validateNode(e,{value:r,attrs:n,childTags:s}={}){if(!e||typeof e.nodeTag!="string")throw new TypeError("validateNode requires a source node");let a=r!==void 0?r:e.value instanceof te?null:e.value;this.validateNodeValues(e.nodeTag,a,n||e.getAttr?.()||{});let i=this.schema[this.schemaTag(e.nodeTag)],o=s||(e.value instanceof te?e.value.getNodes().map(l=>l.nodeTag):null);return o&&this._validateChildren(e.nodeTag,i,o,!1),!0}validateChildren(e,r,{includeMinimum:n=!1}={}){let s=this.schemaTag(e);if(!s)throw new Error(`unknown element '${e}'`);if(!Array.isArray(r)||r.some(a=>typeof a!="string"))throw new TypeError("childTags must be an array of strings");return this._validateChildren(s,this.schema[s],r,n)}validateParent(e,r=null){let n=this.schemaTag(e);if(!n)throw new Error(`unknown element '${e}'`);let s=this.schema[n];if(!this._countsForGrammar(s))return!0;let a=s._parentSpec;if(a==null||a.has("*"))return!0;if(r===null)throw new Error(`'${n}' requires a declared parent`);let i=this.schemaTag(r);if(!i)throw new Error(`unknown parent element '${r}'`);return this._validateParent(n,s,i),!0}bagCall(e,r,n,s){return this.setChild(e,r,n,s)}commandOnNode(e,r,n,s){if(e=Ur(e),e.value instanceof te)return this.setChild(e.value,r,n,s);let a=e.value,i=new e.parentBag.constructor(null,e.builder||this),o=this.setChild(i,r,n,s,e);return this.promoteNodeValue(e,a,i),o}promoteNodeValue(e,r,n){e.setValue(n)}setChild(e,r,n,s,a=null){let i={...s},o=this.schema[r];if(!o)throw new Error(`unknown element '${r}'`);this.validateNodeValues(r,n,i);let l=o._meta?.subbuilder,c=(l==null?null:this._resolveSubbuilderReference(l,i,r))||this,d=n instanceof te?n._builderBindingPlan(c):null,f=a?.rootBuilder||e.root._builder||this;if(i.nodeId!=null&&f.source.getNodeByAttr("nodeId",i.nodeId))throw new Error(`Duplicate nodeId '${i.nodeId}'`);n instanceof te&&this._validateChildren(r,o,n.getNodes().map(v=>v.nodeTag),!1);let p=a||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(v=>v.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 i)&&(i._meta=o._meta),o.ns&&!("ns"in i)&&(i.ns=o.ns);let m=i.node_position;delete i.node_position;let g=i.node_label;delete i.node_label;let w;if(h?.collection_key){if(g!=null)throw new Error(`'${r}': node_label is not allowed in a collection`);w=this._collectionLabel(h.collection_key,r,i)}else{let v=h?._subSpec?.get(r);if(v&&v.max===1){if(g!=null)throw new Error(`'${r}': node_label is not allowed on a singleton`);w=r}else w=g||o.node_label||this._autoLabel(e,r)}if(e.node(w)!=null)throw new Error(`duplicate node label '${w}'`);return e._setBuilderItem(c,d,w,n,i,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 s=r._parentSpec;if(!(s==null||s.has("*")||!this._countsForGrammar(r))&&!s.has(n))throw new Error(`'${e}' not allowed as child of '${n}'`)}_validateChildren(e,r,n,s){let a=r._subSpec;if(a==null||a.has("*")||r._meta?.subbuilder)return[];let i=new Map;for(let o of n){let l=this.schema[o];if(l&&!this._countsForGrammar(l))continue;let u=a.get(o);if(!u)throw new Error(`'${o}' not allowed as child of '${e}'`);let c=(i.get(o)||0)+1;if(i.set(o,c),c>u.max)throw new Error(`too many '${o}' in '${e}'`)}return s?[...a].filter(([o,l])=>(i.get(o)||0)<l.min).map(([o])=>o):[]}_collectionLabel(e,r,n){let s=a=>{if(n[a]===null||n[a]===void 0)throw new Error(`'${r}': collection key needs attribute '${a}'`);return String(n[a])};return e.includes("${")?e.replace(/\$\{([^}]+)\}/g,(a,i)=>s(i)):s(e)}validateSource(){let e=[],r=(n,s="")=>{for(let a of n.getNodes()){let i=s?`${s}.${a.label}`:a.label,o=a.builder;o.validateCustomTypes(a);let l=o.schema[a.nodeTag];if(l&&!a._getMeta("data_element,subbuilder,component").some(Boolean)){let u=a.value instanceof te?a.value.getNodes().map(d=>d.nodeTag):[],c=o._validateChildren(a.nodeTag,l,u,!0);c.length&&e.push([i,c])}a.value instanceof te&&r(a.value,i)}};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={},s=e.runtimeToEvaluate(),a=new Set(s.keys()),i=new Map([...Object.entries(e.getAttr()),...e.fixedAttrItems()]);for(let[c,d]of[...s])if(!(typeof c!="string"||!rt(d)))for(let f of Xn(e,d))s.has(f)||s.set(f,i.get(f));let o=e._getMeta("data_element");for(let[c,d]of s){if(d instanceof ce){r.set(c,d.resolve());continue}let f=typeof c=="string"?rt(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===nr){let h=this.data.getNode(p);h&&Object.assign(n,h.getAttr("_wdg"))}}let l=oa(s,r,(c,d,f,p)=>this.evaluatePointerExpression(e,c,d,f,p)),u=l.get(nr);l.delete(nr);for(let c of l.keys())a.has(c)||l.delete(c);return[u,{...Object.fromEntries(l),...n}]}evaluatePointerExpression(e,r,n,s,a){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 s=(typeof r=="function"?r:r.constructor)[e];if(typeof s=="function")return s}throw new Error(`data-element func '${e}' not found on any data_logic source`)}_bindings(e){let[,r]=this.runtimeValues(e),n={};for(let[s,a]of Object.entries(r))Bo.has(s)||(n[s]=a);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[s,a]of Object.entries(r))s!=="destination"&&s!=="value"&&!s.startsWith("_")&&(n[s]=a);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 s of n.getNodes())s._getMeta("data_element")&&e.push(s),s.value instanceof te&&r(s.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 Oo(this.constructor))if(Object.hasOwn(o,"components"))for(let l of o.components||[])e[l]=l;if(!Object.keys(e).length)return;let r={...this.schema},n={};for(let[o,l]of Object.entries(e))r[o]={sub_tags:"",_meta:{component:!0}},n[o.toLowerCase()]=l;let s=Pr(r),a=this._collection||this.constructor._classCollection,i=a.toDocument();i.abstracts={},i.elements=Object.fromEntries(Object.keys(e).map(o=>[o,r[o]])),this._collection=new et(a.toDocument()).update(i),this._schemaOverride=r,this._componentMap=n,this._tagNamesOverride=s}_expansionRoot(e=null){let r=this.constructor._sourceClass,n=new r(null,this);return n.setBackref(),n.setItem(qr,new r(null,this),e?{datapath:e}:null),n.getItem(qr)}create(){this.setup(this.data),this._resolveComponents(),this.main(this.root),this.computeLogic(this._dataElementNodes())}get renderer_xml(){return new St(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),s=n.renderChildren(n.preprocess(this.source),r);return this.materialized[e]=s,s}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 s=this.getRenderer(e);if(r===!1&&s.renderType!=="string")throw new TypeError("target=false is not valid for an object renderer");let a=r===!1?null:r||this._defaultTargets.get(s.mode)||null,i={...a?.renderOpts,...n};return s.finalize(this.materialize(e,i),a,i)}};He._registry=new Map;var df=new Set(["short","medium","long","full"]),ff=/('(?:[^']|'')*'|[a-zA-Z]+|[^a-zA-Z']+)/g;function pf(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||xe(t).split("::").at(-1);if(!["D","H","DH","DHZ"].includes(r))throw new RangeError(`Unsupported temporal dtype: ${r}`);return r}function hf(t,e,r,n){let s=e.match(ff)||[];if(s.join("")!==e)throw new RangeError("Unclosed format literal");let a=(c,d=2)=>String(c).padStart(d,"0"),i=c=>new Intl.DateTimeFormat(r,{timeZone:"UTC",...c}).format(t),u={...n==="H"?{}:{y:()=>String(t.getUTCFullYear()),yy:()=>a(t.getUTCFullYear()%100),yyyy:()=>a(t.getUTCFullYear(),4),M:()=>String(t.getUTCMonth()+1),MM:()=>a(t.getUTCMonth()+1),MMM:()=>i({month:"short"}),MMMM:()=>i({month:"long"}),d:()=>String(t.getUTCDate()),dd:()=>a(t.getUTCDate()),EEE:()=>i({weekday:"short"}),EEEE:()=>i({weekday:"long"})},...n==="D"?{}:{H:()=>String(t.getUTCHours()),HH:()=>a(t.getUTCHours()),h:()=>String(t.getUTCHours()%12||12),hh:()=>a(t.getUTCHours()%12||12),m:()=>String(t.getUTCMinutes()),mm:()=>a(t.getUTCMinutes()),s:()=>String(t.getUTCSeconds()),ss:()=>a(t.getUTCSeconds()),a:()=>new Intl.DateTimeFormat(r,{hour:"numeric",hour12:!0,timeZone:"UTC"}).formatToParts(t).find(c=>c.type==="dayPeriod").value}};return s.map(c=>{if(c.startsWith("'"))return c==="''"?"'":c.slice(1,-1).replaceAll("''","'");if(!/^[a-zA-Z]/.test(c))return c;if(!u[c])throw new RangeError(`Unsupported date format token: ${c}`);return u[c]()}).join("")}function Io(t,{format:e,mask:r,locale:n,dtype:s,places:a}={}){let i=t==null?"":String(t);if(t!=null&&t!==""&&(e!=null&&e!==""||a!=null))if(typeof t=="number"||Ne(t))i=_f(t,{format:e,locale:n,places:a});else{let o=pf(t,s);if(df.has(e)){let l={timeZone:"UTC"};o!=="H"&&(l.dateStyle=e),o!=="D"&&(l.timeStyle=e),i=new Intl.DateTimeFormat(n||void 0,l).format(t)}else i=hf(t,String(e),n||void 0,o)}return r==null?i:String(r).replaceAll("%s",()=>i)}function mf({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 _f(t,e={}){if(typeof t!="number"&&!Ne(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,mf(e));if(Ne(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(Ne(t)?t.toString():t)}var gf=new Set(["style","script"]),bf=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"]),Mo=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"]),jr=new Set(["rounded","gradient","shadow","transform","transition","zoom","filter"]),Ro=t=>t===!0?"true":t===!1?"false":String(t),Fn=t=>typeof t=="number"&&Number.isFinite(t)?`${t}px`:String(t);function wf(t){if(Mo.has(t))return!0;for(let e of Mo)if(t.startsWith(`${e}_`))return!0;return!1}function yf(t){let e=new Map;if(!t)return e;let r=[],n=0,s=null,a=!1,i=!1,o=0,l=String(t);for(let u=0;u<l.length;u+=1){let c=l[u],d=l[u+1];if(i){c==="*"&&d==="/"&&(i=!1,u+=1);continue}if(a){a=!1;continue}if(c==="\\"){a=!0;continue}if(s){c===s&&(s=null);continue}c==='"'||c==="'"?s=c:c==="/"&&d==="*"?(i=!0,u+=1):"([{".includes(c)?o+=1:")]}".includes(c)&&o>0?o-=1:c===";"&&o===0&&(r.push(l.slice(n,u)),n=u+1)}r.push(l.slice(n));for(let u of r){let c=u.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 Vr=class extends Nt{static mode="html";renderedItem(e,r,n,{tag:s,xml:a=!0,pretty:i=!1,depthOffset:o=0,includeDatapath:l=!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=Io(r,{format:c,mask:d,places:p,dtype:h,locale:this._displayLocale(e,f)}));let g=this._formatAttrs(m);if(l){if(!Object.hasOwn(n,"id")){let k=this.builder.targetId(e);k!==null&&(g+=` id="${this._htmlAttrValue(k)}"`)}for(let[k,D]of Object.entries(e.getAttr()))e.pointerType(D)&&(g+=` data-${this.adapt(k)}-pointer="${this._htmlAttrValue(e.absDatapath(D))}"`)}let w=i?" ".repeat(this._nodeDepth(e,o)):"",b=i?`
24
+ `:"";if(e._getMeta("void"))return`${w}<${s}${g}${a?"/":""}>${b}`;if(Array.isArray(r)){let k=this._composeStringFragments(r);return`${w}<${s}${g}>${b}${k}${w}</${s}>${b}`}if(r==null)return`${w}<${s}${g}></${s}>${b}`;let v=typeof r=="string"&&r.endsWith("::HTML")?r.slice(0,-6):gf.has(s)?String(r):this._escapeText(r);return`${w}<${s}${g}>${v}</${s}>${b}`}_displayLocale(e,r){if(r)return r;for(let n=e.parentNode;n;n=n.parentNode){let s=n.getAttr("locale");if(s==null)continue;let a=n.pointerType(s)?n.data.getItem(n.absDatapath(s)):s;if(a)return a}}adaptAttrs(e){let r={},n={};for(let[a,i]of Object.entries(e||{}))if(a.startsWith(`${this.builder.constructor._name}_`))r[this.adapt(a)]=i;else if(a==="dtype")r.dtype=i;else{if(this.builder.constructor.retainedAttrPrefixes.some(o=>a.startsWith(o)))continue;this._isStyleContribution(a)?n[a]=i:r[a]=i}let s=this._adaptStyle(n);return s&&(r.style=s),r}_isStyleContribution(e){if(e==="style"||e.startsWith("style_")||jr.has(e))return!0;let r=e.includes("_")?e.slice(0,e.indexOf("_")):null;return r!==null&&jr.has(r)||wf(e)}_adaptStyle(e){let r=yf(e.style),n=new Map,s=new Map;for(let[a,i]of Object.entries(e))if(a!=="style")if(a.startsWith("style_"))r.set(a.slice(6).replaceAll("_","-"),Ro(i));else if(jr.has(a))n.set(a,i);else{let o=a.indexOf("_"),l=o<0?a:a.slice(0,o);o>=0&&jr.has(l)?(s.has(l)||s.set(l,{}),s.get(l)[a.slice(o+1)]=i):r.set(a.replaceAll("_","-"),Ro(i))}for(let a of jr)(n.has(a)||s.has(a))&&this[`_macro_${a}`](n.get(a),s.get(a)||{},r);return[...r].map(([a,i])=>`${a}: ${i}`).join("; ")}_formatAttrs(e){let r=[];for(let[n,s]of Object.entries(e||{}))bf.has(n)?s&&r.push(` ${n}`):r.push(` ${n}="${this._htmlAttrValue(s)}"`);return r.join("")}_htmlAttrValue(e){return(e===!0?"true":e===!1?"false":String(e)).replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;")}_macro_rounded(e,r,n){let s=e===void 0?{}:{top_left:e,top_right:e,bottom_left:e,bottom_right:e};for(let[a,i]of Object.entries(r))if(a==="top"||a==="bottom")s[`${a}_left`]=i,s[`${a}_right`]=i;else if(a==="left"||a==="right")s[`top_${a}`]=i,s[`bottom_${a}`]=i;else if(["top_left","top_right","bottom_left","bottom_right"].includes(a))s[a]=i;else throw new TypeError(`rounded: unknown sub-kwarg '${a}'`);for(let[a,i]of Object.entries(s))n.set(`border-${a.replaceAll("_","-")}-radius`,Fn(i))}_macro_transform(e,r,n){let s=e===void 0?[]:[String(e)];for(let[a,i]of Object.entries(r))a==="rotate"?s.push(`rotate(${i}deg)`):a==="scale"||a==="translate"?s.push(`${a}(${i})`):a==="translate_x"?s.push(`translateX(${Fn(i)})`):a==="translate_y"?s.push(`translateY(${Fn(i)})`):a==="skew_x"?s.push(`skewX(${i}deg)`):a==="skew_y"?s.push(`skewY(${i}deg)`):s.push(`${a.replaceAll("_","-")}(${i})`);s.length&&n.set("transform",s.join(" "))}_macro_filter(e,r,n){let s=e===void 0?[]:[String(e)];for(let[a,i]of Object.entries(r))a==="rotate"?s.push(`hue-rotate(${i}deg)`):a==="blur"?s.push(`blur(${Fn(i)})`):a==="drop_shadow"?s.push(`drop-shadow(${i})`):s.push(`${a.replaceAll("_","-")}(${i})`);s.length&&n.set("filter",s.join(" "))}_macro_transition(e,r,n){e!==void 0&&n.set("transition",String(e));for(let[s,a]of Object.entries(r))n.set(`transition-${s.replaceAll("_","-")}`,String(a))}_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[s,a]of Object.entries(r))n.set(`box-shadow-${s.replaceAll("_","-")}`,String(a))}_macro_gradient(e,r,n){e!==void 0&&n.set("background-image",String(e))}};var vf=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 Lo(t){return Object.fromEntries(Object.entries(t||{}).map(([e,r])=>[vf.has(e)?e.replaceAll("_","-"):e,r]))}var zr=class extends St{static mode="svg";adaptAttrs(e){return Lo(e)}};var $o={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 Un=class extends He{static _name="html";static _defaultRenderMode="html";static retainedAttrPrefixes=["validate_","dtype"];static{this.defineGrammar($o)}get renderer_html(){return new Vr(this)}};He.registerBuilder(Un);var Fo={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 Pn=class extends He{static _name="svg";static _defaultRenderMode="svg";static{this.defineGrammar(Fo)}get renderer_svg(){return new zr(this)}};He.registerBuilder(Pn);var sr="http://www.w3.org/2000/svg";var Af=(0,We.defineComponent)({name:"rowActions",tag:"gramlot-row-actions",base:Xr,subTags:"button,dropDownButton",sourceContext:!0,parameters:{position:{dtype:"T",default:"end"},actionState:{dtype:"T",nullable:!0,default:null},state:{dtype:"X",nullable:!0,default:null,binding:"read"}},implementation:t=>class extends t{#e=null;#i;connectedCallback(){this.slot="row-actions",this.hidden=!0}setSourceContext(e){this.#i=e}setRowContext(e,r){this.#e={item:e,path:r},this.#s()}getRowContext(){return this.#e}clearRowContext(){this.#e=null,this.hidden=!0}projectAttributes(e,r){let n=super.projectAttributes(e,r);if(!["start","end"].includes(this.parameters.position))throw new TypeError("rowActions position must be start or end");return this.#s(),n}#s(){if(!(!this.#e||!this.parameters.actionState))for(let e of this.children){let r=e.getAttribute("rowAction");if(r===null)continue;let n=this.#i.callLogic(this.parameters.actionState,{...this.#e,action:r,state:this.parameters.state});if(!n||typeof n.hidden!="boolean"||typeof n.icon!="string"||typeof n.title!="string")throw new TypeError("rowActions actionState must return hidden, icon and title");e.setActionPresentation(n)}}}}),xf=(0,We.defineComponent)({name:"tree",tag:"gramlot-tree",base:Xr,subTags:"rowActions[:1]",sourceContext:!0,bagStore:!0,dragSource:!0,parameters:{storepath:{dtype:"T"},draggable:{dtype:"B",default:!1,binding:"read"},labelAttribute:{dtype:"T",nullable:!0,default:null,binding:"read"},internalNames:{dtype:"B",default:!1,binding:"read"},hideValues:{dtype:"B",default:!1,binding:"read"},excludeRoot:{dtype:"T",nullable:!0,default:null,binding:"read"},labelCb:{dtype:"T",nullable:!0,default:null},getLabel:{dtype:"T",nullable:!0,default:null},getLabelClass:{dtype:"T",nullable:!0,default:null},getIconClass:{dtype:"T",nullable:!0,default:null},selectedLabelClass:{dtype:"T",default:"",binding:"read"},searchText:{dtype:"T",default:"",binding:"read"},favorites:{dtype:"X",nullable:!0,default:null,binding:"read"},favoritesLabel:{dtype:"T",default:"Favorites",binding:"read"},autoCollapse:{dtype:"B",default:!1,binding:"read"},selectedPath:{dtype:"T",nullable:!0,default:null,binding:"twoWay"},onChecked:{dtype:["B","T"],nullable:!0,default:null},checkedPaths:{dtype:"T",nullable:!0,default:null,binding:"twoWay"},checkedPaths_joiner:{dtype:"T",default:","},checkChildren:{dtype:"B",default:!0,binding:"read"}},implementation:t=>class extends t{#e;#i;#s;#a=new Set;#c=new Map;#R=new Map;#u=!1;#k=new WeakMap;#L=new Map;#E;#$=0;#_=null;#F=!1;#o;#U=!1;#f=!1;#g=new WeakMap;#b=new WeakSet;#p=new Set;#r=new Map;#w="";#H=null;#t="";#h=null;#P=0;#d=new Set;#D=new WeakSet;#A=new WeakSet;#m=!1;#l=new Map;constructor(){super(),this.#i=Df(this.ownerDocument.defaultView),this.control.replaceChildren(),this.control.setAttribute("role","tree"),this.control.setAttribute("aria-label","Tree"),this.control.classList.add("tree"),this.control.setAttribute("part","tree");let e=this.ownerDocument.createElement("style");e.textContent=`
25
+ :host{position:relative}
27
26
  .control-box{overflow:auto;padding:4px;min-height:32px}
28
27
  ul{list-style:none;margin:0;padding:0} ul ul{padding-inline-start:20px}
29
28
  .row{display:flex;align-items:center;min-height:var(--gramlot-tree-row-height,28px);gap:2px;border-radius:3px;cursor:default}
@@ -39,11 +38,15 @@ ${" ".repeat(i)}</${a}>`:`<${a}${l}>${p}</${a}>`:r===null||r.includes(a)?`<${a}
39
38
  .expander svg{display:block;width:14px;height:14px;pointer-events:none}
40
39
  [aria-expanded=true]>.row>.expander svg{transform:rotate(90deg)}
41
40
  .spacer{width:max(20px,var(--gramlot-touch-target,0px));flex:none}.caption{min-width:0;overflow-wrap:anywhere}
41
+ .badge{display:inline-flex;align-items:center;justify-content:center;flex:none;min-width:18px;
42
+ height:16px;padding:0 3px;border-radius:3px;font-size:10px;line-height:1;
43
+ background:var(--gramlot-tree-badge-background,#e7eaf0);color:var(--gramlot-tree-badge-color,#394452)}
44
+ .badge[data-colored]{color:var(--gramlot-tree-colored-badge-color,white)}
42
45
  .icon{width:16px;height:16px;flex:none;background:currentColor;opacity:.7;mask:center/contain no-repeat;
43
- mask-image:url("data:image/svg+xml,%3Csvg xmlns='${Yr}' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='1.7' d='M5 3h9l5 5v13H5zM14 3v6h5M8 13h8M8 17h8'/%3E%3C/svg%3E")}
44
- .branch-icon{mask-image:url("data:image/svg+xml,%3Csvg xmlns='${Yr}' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='1.7' d='M3 7V4h7l3 3h8v13H3z'/%3E%3C/svg%3E")}
45
- .opened-icon{mask-image:url("data:image/svg+xml,%3Csvg xmlns='${Yr}' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='1.7' d='M3 19V4h7l3 3h8v3M3 20l3-9h16l-3 9z'/%3E%3C/svg%3E")}
46
+ mask-image:url("data:image/svg+xml,%3Csvg xmlns='${sr}' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='1.7' d='M5 3h9l5 5v13H5zM14 3v6h5M8 13h8M8 17h8'/%3E%3C/svg%3E")}
47
+ .branch-icon{mask-image:url("data:image/svg+xml,%3Csvg xmlns='${sr}' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='1.7' d='M3 7V4h7l3 3h8v13H3z'/%3E%3C/svg%3E")}
48
+ .opened-icon{mask-image:url("data:image/svg+xml,%3Csvg xmlns='${sr}' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='1.7' d='M3 19V4h7l3 3h8v3M3 20l3-9h16l-3 9z'/%3E%3C/svg%3E")}
46
49
  .loading>.row{opacity:.65}.error>.row .caption{text-decoration:underline dotted}
47
50
  mark{background:#ffe493;color:#302300;font-weight:600;border-radius:2px;padding:0 1px}
48
51
  .search-status{padding:4px;color:var(--gramlot-text-secondary,#555);font-size:.9em}
49
- [hidden]{display:none}`,this.shadowRoot.append(e)}setSourceContext(e){this.#l=e}getDragContext(e){for(let r of e.composedPath()){let n=this.#E.get(r);if(!n)continue;let{item:i,path:s,caption:a}=n;return{element:r,item:i,path:s,dragValues:{"text/plain":a.textContent,nodeattr:{...i.getAttr()},treenode:{fullpath:i.fullpath,relpath:s}}}}return null}setStoreBag(e){if(!(e instanceof Xi))throw new TypeError("tree storepath must resolve to a Bag");e!==this.#e&&(this.#e=e,this.#x(),this.#t=this.#m.toLowerCase(),this.#n.clear(),this.#r.clear(),this.#A=void 0),this.#a()}projectAttributes(e,r){let n=super.projectAttributes(e,r),i=this.parameters.searchText.trim();return i!==this.#m&&(this.#x(),this.#m=i,i?this.#c=setTimeout(()=>{this.#c=null,this.#t=i.toLowerCase(),this.#a()},200):this.#t=""),this.#a(),n}connectedCallback(){this.#c===null&&(this.#t=this.#m.toLowerCase()),this.#a()}disconnectedCallback(){this.#x()}#x(){clearTimeout(this.#c),this.#c=null,this.#D++,this.#f=!1,this.#_=new WeakSet,this.#s.clear(),this.#h=new WeakSet}#b(e){return this.#t?this.#s.has(e):this.#n.has(e)}async#O(){let e=this.#D,r=this.#e,n=()=>this.isConnected&&e===this.#D&&r===this.#e;this.#f=!0;let i=async(s,a=new Set)=>{if(!n())return;if(a.has(s))throw new TypeError("tree requires an acyclic Bag store");let o=new Set(a).add(s);for(let l of s.getNodes()){if(!n()||(l.resolver!==null&&l.resolver.expired&&!this.#_.has(l)&&(this.#_.add(l),await this.#N(l,!0)),!n()))return;l.staticValue instanceof Xi&&await i(l.staticValue,o)}};try{await i(r)}finally{n()&&(this.#f=!1,this.#a())}}#I(e){let r=this.ownerDocument.createTreeWalker(e,4),n=[];for(;r.nextNode();)n.push(r.currentNode);for(let i of n){let s=i.textContent,a=s.toLowerCase(),o=this.ownerDocument.createDocumentFragment(),l=0,u=a.indexOf(this.#t);if(!(u<0)){for(;u>=0;){o.append(s.slice(l,u));let c=this.ownerDocument.createElement("mark");c.textContent=s.slice(u,u+this.#t.length),o.append(c),l=u+this.#t.length,u=a.indexOf(this.#t,l)}o.append(s.slice(l)),i.replaceWith(o)}}}#a(){this.#T||(this.#T=!0,queueMicrotask(()=>{this.#T=!1,this.isConnected&&this.#e&&this.#B()}))}#B(){let e=this.shadowRoot.activeElement?.closest("[role=treeitem]")?.dataset.path,r=new Map,n=new Set,i=(c,f,p)=>{if(n.has(c))throw new TypeError("tree requires an acyclic Bag store");n.add(c);for(let h of c.getNodes()){let _=f?`${f}.${h.label}`:h.label,g=h.staticValue;r.set(_,{node:h,ancestors:p,children:g instanceof Xi?g:null}),g instanceof Xi&&i(g,_,[...p,h])}n.delete(c)};i(this.#e,"",[]),this.#t&&this.#c===null&&!this.#f&&[...r.values()].some(({node:c})=>c.resolver!==null&&c.resolver.expired&&!this.#_.has(c))&&this.#O();let s=new Set([...r.values()].map(c=>c.node));for(let c of this.#n)s.has(c)||this.#n.delete(c);for(let c of this.#r.keys())s.has(c)||this.#r.delete(c);let a=this.parameters.selectedPath;if(a!==this.#A){this.#A=a,this.#p=a;for(let c of r.get(a)?.ancestors??[])this.#C(c)}let o=this.#p;this.#i.clear(),this.#E=new WeakMap,this.#k.clear();let l=new Map,u=(c,f,p)=>{let h=this.ownerDocument.createElement("ul");h.className="group",h.setAttribute("part","group"),h.setAttribute("role","group");for(let _ of c.getNodes()){let g=f?`${f}.${_.label}`:_.label,{children:b}=r.get(g),k=b===null&&!this.parameters.hideValues&&(_.resolver===null||!_.resolver.expired),T=b!==null?b.length>0:k||_.resolver!==null&&_.attr.child_count!==0,A=this.ownerDocument.createElement("li");A.className=`node ${T?"branch":"leaf"}`,A.setAttribute("part",`node ${T?"branch":"leaf"}`),A.classList.toggle("loading",this.#u.has(_)),A.classList.toggle("error",this.#r.has(_)),A.setAttribute("aria-busy",String(this.#u.has(_))),A.setAttribute("role","treeitem"),A.setAttribute("aria-selected",String(o===g)),A.classList.toggle("selected",o===g),A.dataset.path=g,A.tabIndex=-1;let S=this.ownerDocument.createElement("div");S.className="row",S.draggable=this.parameters.draggable,S.setAttribute("part",`row ${T?"branch-row":"leaf-row"}${o===g?" selected-row":""}`),this.#r.has(_)&&(S.title=String(this.#r.get(_)));let B=this.ownerDocument.createElement(T?"button":"span");if(B.setAttribute("part",T?"expander":"spacer"),T){B.className="expander",B.type="button",B.tabIndex=-1;let D=this.ownerDocument.createElementNS(Yr,"svg");D.setAttribute("viewBox","0 0 24 24"),D.setAttribute("aria-hidden","true"),D.setAttribute("focusable","false");let V=this.ownerDocument.createElementNS(Yr,"path");V.setAttribute("d","m9 5 7 7-7 7"),V.setAttribute("fill","none"),V.setAttribute("stroke","currentColor"),V.setAttribute("stroke-width","1.8"),V.setAttribute("stroke-linecap","round"),V.setAttribute("stroke-linejoin","round"),D.append(V),B.append(D),B.addEventListener("click",z=>{z.stopPropagation(),G(),A.focus()})}else B.className="spacer";let F=this.ownerDocument.createElement("span");F.className="caption",this.#E.set(S,{item:_,path:g,caption:F}),F.setAttribute("part","caption");let j=this.ownerDocument.createElement("span");j.className=`icon ${T?"branch-icon":"leaf-icon"}`,j.setAttribute("aria-hidden","true"),j.setAttribute("part",`icon ${T?"branch-icon":"leaf-icon"}`),S.append(B,j,F),A.append(S);let Y=T?b?u(b,g,A):this.ownerDocument.createElement("ul"):null;if(Y&&(Y.className="group",Y.setAttribute("role","group"),Y.setAttribute("part","group")),Y&&A.append(Y),k){let D=this.ownerDocument.createElement("li");D.className="value-node",D.setAttribute("part","value-node"),D.setAttribute("role","treeitem"),D.setAttribute("aria-selected","false"),D.tabIndex=-1,D.dataset.path=g,D.dataset.valueRow="true";let V=this.ownerDocument.createElement("div");V.className="row value-row",V.setAttribute("part","row value-row");let z=this.ownerDocument.createElement("span");z.className="spacer";let P=this.ownerDocument.createElement("span");P.className="value",P.setAttribute("part","value"),P.textContent=String(_.staticValue),V.append(z,P),D.append(V),Y.append(D),V.addEventListener("click",()=>this.#v(g)),D.addEventListener("keydown",N=>{let ke=this.#S(),ht=ke.indexOf(D),Ae;if(N.key==="ArrowUp")Ae=ke[ht-1];else if(N.key==="ArrowDown")Ae=ke[ht+1];else if(N.key==="Home")Ae=ke[0];else if(N.key==="End")Ae=ke.at(-1);else if(N.key==="ArrowLeft")Ae=A;else if(N.key==="Enter"||N.key===" ")this.#v(g);else return;N.preventDefault(),N.stopPropagation(),Ae&&(this.#d(Ae),Ae.focus())})}let re=()=>{let D=this.#b(_),V=this.#p===g,z={item:_,path:g,opened:D,selected:V},P=this.parameters.labelAttribute,N=this.parameters.getLabel!==null?this.#y("getLabel",z):P!==null?Object.hasOwn(_.attr,P)?_.attr[P]:_.label:this.parameters.labelCb!==null?this.#y("labelCb",z):_.label;this.#R(F,N,this.parameters.getLabel!==null||P===null&&this.parameters.labelCb!==null),this.#t&&this.#I(F);let ke=this.parameters.getLabelClass!==null?this.#y("getLabelClass",z):_.attr[D?"labelClassOpened":"labelClassClosed"]||_.attr.labelClass||"",ht=[...this.#w(ke),...V?this.#w(this.parameters.selectedLabelClass):[]];F.className=["caption",...ht].join(" "),F.setAttribute("part",["caption",...ht].join(" "));let Ae=this.#w(_.attr.node_class??"");A.className=["node",T?"branch":"leaf",...Ae,...V?["selected"]:[],...T?[D?"opened":"closed"]:[],...this.#u.has(_)?["loading"]:[],...this.#r.has(_)?["error"]:[]].join(" "),A.setAttribute("part",["node",T?"branch":"leaf",...Ae].join(" "));let rt=this.parameters.getIconClass!==null,W=rt?this.#w(this.#y("getIconClass",z)):[T?"branch-icon":"leaf-icon",...T?[D?"opened-icon":"closed-icon"]:[]];j.className=["icon",...W].join(" "),j.setAttribute("part",["icon",...W].join(" ")),j.hidden=rt&&W.length===0,T&&B.setAttribute("aria-label",`${D?"Collapse":"Expand"} ${F.textContent}`)};this.#k.set(g,re);let Ne=()=>{let D=this.#b(_);A.setAttribute("aria-expanded",String(D)),A.classList.toggle("opened",D),A.classList.toggle("closed",!D),j.classList.toggle("opened-icon",D),j.setAttribute("part",`icon branch-icon ${D?"opened-icon":"closed-icon"}`),Y.hidden=!D,re()},G=()=>{let D=this.#t?this.#s:this.#n;D.has(_)?(D.delete(_),this.#t&&this.#h.add(_)):(this.#t?(this.#h.delete(_),this.#s.add(_)):this.#C(_),_.resolver!==null&&this.#N(_));for(let V of l.values())V();this.#d(g)};T?(l.set(_,Ne),Ne()):re(),S.addEventListener("click",()=>this.#v(g)),A.addEventListener("keydown",D=>{if(D.target!==A)return;let V=this.#S(),z=V.indexOf(A),P;if(D.key==="ArrowDown")P=V[z+1];else if(D.key==="ArrowUp")P=V[z-1];else if(D.key==="Home")P=V[0];else if(D.key==="End")P=V.at(-1);else if(D.key==="ArrowRight"&&T)this.#b(_)?P=Y.firstElementChild:G();else if(D.key==="ArrowLeft")T&&this.#b(_)?G():P=p;else if(D.key==="Enter"||D.key===" ")this.#v(g);else return;D.preventDefault(),D.stopPropagation(),P&&(this.#d(P),P.focus())}),this.#i.set(g,A),h.append(A)}return h};if(this.control.replaceChildren(u(this.#e,"",null)),this.control.setAttribute("aria-busy",String(this.#f)),this.#t){let c=new Set,f=[];this.#s.clear();for(let[h,_]of this.#i){let g=_.firstElementChild.querySelector(".caption"),b=r.get(h),k=g.textContent.toLowerCase().includes(this.#t);if(k&&f.push(g),k||this.#r.has(b.node)||this.#u.has(b.node)){c.add(b.node);for(let T of b.ancestors)c.add(T),this.#h.has(T)||this.#s.add(T)}}for(let[h,_]of this.#i)_.hidden=!c.has(r.get(h).node);for(let h of l.values())h();let p=this.ownerDocument.createElement("div");p.className="search-status",p.setAttribute("role","status"),p.textContent=this.#f?"Searching\u2026":this.#r.size?"Some branches could not be searched. Expand them to retry.":f.length?"":"No matches",this.control.append(p)}this.#d(e??o),e&&this.#i.get(e)?.focus()}#w(e){if(typeof e!="string")throw new TypeError("Tree classes must be a string");return e.split(/\s+/).filter(Boolean)}#y(e,r){let n=this.#l.callLogic(this.parameters[e],r);if(e==="labelCb"||e==="getLabel"){if(!n||typeof n!="object"||Object.keys(n).length!==1||!(Object.hasOwn(n,"text")&&typeof n.text=="string"||Object.hasOwn(n,"html")&&typeof n.html=="string"))throw new TypeError(`tree ${e} must return {text: string} or {html: string} synchronously`)}else if(typeof n!="string")throw new TypeError(`tree ${e} must return a string synchronously`);return n}#R(e,r,n){n&&Object.hasOwn(r,"html")?e.replaceChildren(this.#o.sanitize(r.html,{USE_PROFILES:{html:!0},FORBID_TAGS:["style","form","input","button","select","textarea"],RETURN_DOM_FRAGMENT:!0})):e.textContent=n?r.text:r}#S(){return[...this.control.querySelectorAll("[role=treeitem]")].filter(e=>!e.closest("[hidden]"))}#C(e){if(this.#t){this.#s.add(e);return}if(this.parameters.autoCollapse)for(let r of e.parentBag.getNodes())r!==e&&this.#n.delete(r);this.#n.add(e)}#N(e,r=!1){if(this.#g.has(e))return this.#g.get(e);this.#u.add(e),this.#r.delete(e),this.#a();let n=(async()=>{try{await Promise.resolve().then(()=>e.getValue())}catch(i){this.#r.set(e,i),r||this.#n.delete(e)}finally{this.#u.delete(e),this.#g.delete(e),this.#a()}})();return this.#g.set(e,n),n}#d(e){let r=this.#S(),n=typeof e=="string"||e==null?r.find(i=>i.dataset.path===e)??r[0]:e;for(let i of this.control.querySelectorAll("[role=treeitem]"))i.tabIndex=i===n?0:-1}#v(e){this.#p=e;for(let[r,n]of this.#i)n.setAttribute("aria-selected",String(r===e)),n.classList.toggle("selected",r===e),this.#k.get(r)(),n.firstElementChild.setAttribute("part",`row ${n.classList.contains("branch")?"branch-row":"leaf-row"}${r===e?" selected-row":""}`);this.#d(e),this.#i.get(e).focus(),this.#l.writeParameter("selectedPath",e)}}}),p2=Ns({name:"tree",components:[f_]});export{f_ as Tree,p2 as default};
52
+ [hidden]{display:none}`,this.shadowRoot.append(e);let r=this.ownerDocument.createElement("slot");r.name="row-actions",this.shadowRoot.append(r),this.addEventListener("pointerleave",()=>{let n=this.#O();n&&!n.contains(this.ownerDocument.activeElement)&&n.clearRowContext()})}setSourceContext(e){this.#s=e}getDragContext(e){for(let r of e.composedPath()){let n=this.#k.get(r);if(!n)continue;let{item:s,path:a,caption:i}=n;return{element:r,item:s,path:a,dragValues:{"text/plain":i.textContent,nodeattr:{...s.getAttr()},treenode:{fullpath:s.fullpath,relpath:a}}}}return null}setStoreBag(e){if(!(e instanceof be))throw new TypeError("tree storepath must resolve to a Bag");e!==this.#e&&(this.#e=e,this.#x(),this.#t=this.#w.toLowerCase(),this.#a.clear(),this.#r.clear(),this.#E=void 0,this.#$++,this.#o=void 0,this.#g=new WeakMap,this.#b=new WeakSet),this.#n()}projectAttributes(e,r){this.#f=Object.hasOwn(e,"checkedPaths"),this.#U=this.#f||!!e.onChecked;let n=super.projectAttributes(e,r);this.#H!==this.parameters.excludeRoot&&(this.#H=this.parameters.excludeRoot,this.#x(),this.#t=this.#w.toLowerCase());let s=this.parameters.searchText.trim();return s!==this.#w&&(this.#x(),this.#w=s,s?this.#h=setTimeout(()=>{this.#h=null,this.#t=s.toLowerCase(),this.#n()},200):this.#t=""),this.#n(),n}connectedCallback(){this.#h===null&&(this.#t=this.#w.toLowerCase()),this.#n()}disconnectedCallback(){this.#x()}#x(){clearTimeout(this.#h),this.#h=null,this.#P++,this.#m=!1,this.#A=new WeakSet,this.#d.clear(),this.#D=new WeakSet}#T(e){return this.#t?this.#d.has(e):this.#a.has(e)}async#G(){let e=this.#P,r=this.#e,n=()=>this.isConnected&&e===this.#P&&r===this.#e;this.#m=!0;let s=async(a,i=new Set)=>{if(!n())return;if(i.has(a))throw new TypeError("tree requires an acyclic Bag store");let o=new Set(i).add(a);for(let l of a.getNodes())if(!(a===this.#e&&l.label===this.parameters.excludeRoot)){if(!n())return;if(l.attr.loop!==!0){if(l.resolver!==null&&l.resolver.expired&&!this.#A.has(l)&&(this.#A.add(l),await this.#z(l,!0)),!n())return;l.staticValue instanceof be&&await s(l.staticValue,o)}}};try{await s(r)}finally{n()&&(this.#m=!1,this.#n())}}#Y(e){let r=this.ownerDocument.createTreeWalker(e,4),n=[];for(;r.nextNode();)n.push(r.currentNode);for(let s of n){let a=s.textContent,i=a.toLowerCase(),o=this.ownerDocument.createDocumentFragment(),l=0,u=i.indexOf(this.#t);if(!(u<0)){for(;u>=0;){o.append(a.slice(l,u));let c=this.ownerDocument.createElement("mark");c.textContent=a.slice(u,u+this.#t.length),o.append(c),l=u+this.#t.length,u=i.indexOf(this.#t,l)}o.append(a.slice(l)),s.replaceWith(o)}}}retrySelection(){this.#E=void 0,this.#n()}#n(){this.#F||(this.#F=!0,queueMicrotask(()=>{this.#F=!1,this.isConnected&&this.#e&&this.#Z()}))}#Z(){let e=this.shadowRoot.activeElement?.closest("[role=treeitem]")?.dataset.path,r=this.shadowRoot.activeElement?.dataset.favoritePath,n=this.shadowRoot.activeElement?.dataset.favoritesGroup==="true",s=[],a=!1;this.#U&&this.parameters.checkChildren&&!(this.#f&&this.parameters.checkedPaths!==this.#o)&&(a=this.#X(this.#e,new Set,s));let i=new Map,o=new Set,l=(b,v,k)=>{if(o.has(b))throw new TypeError("tree requires an acyclic Bag store");o.add(b);for(let D of b.getNodes()){if(b===this.#e&&D.label===this.parameters.excludeRoot)continue;let y=v?`${v}.${D.label}`:D.label,C=D.staticValue;i.set(y,{node:D,ancestors:k,children:C instanceof be?C:null}),C instanceof be&&l(C,y,[...k,D])}o.delete(b)};l(this.#e,"",[]),this.#t&&this.#h===null&&!this.#m&&[...i.values()].some(({node:b})=>b.attr.loop!==!0&&b.resolver!==null&&b.resolver.expired&&!this.#A.has(b))&&this.#G();let u=this.#O(),c=u?u.getRowContext():null;if(c&&((c.item.getAttr("favoriteEntry")===!0?this.parameters.favorites instanceof be&&this.parameters.favorites.getNodes().includes(c.item):i.get(c.path)?.node===c.item)||u.clearRowContext()),this.#f&&this.parameters.checkedPaths!==this.#o){let b=this.#o===void 0;this.#o=this.parameters.checkedPaths;for(let{node:v}of i.values())(!b||this.#o!==null)&&v.setAttr({checked:!1});for(let v of(this.#o||"").split(this.parameters.checkedPaths_joiner).filter(Boolean)){let k=i.get(v);k&&this.#q(k.node,!0,!1)}}else if(this.#f&&s.length){let b=(this.parameters.checkedPaths||"").split(this.parameters.checkedPaths_joiner).filter(Boolean);for(let v of b){let k=i.get(v);if(!k||k.node.attr.checked===!0||k.node.attr.checked==="disabled:on"||k.node.attr.checked==="disabled:off")continue;let D=k.node.parentBag;for(;D&&!s.includes(D);)D=D.parentNode?.parentBag;D&&this.#q(k.node,!0,!1)}(a||b.length)&&this.#j(!0)}else a&&this.#j(!0);let d=new Set([...i.values()].map(b=>b.node));for(let b of this.#a)d.has(b)||this.#a.delete(b);for(let b of this.#r.keys())d.has(b)||this.#r.delete(b);let f=this.parameters.selectedPath,p=null;if(f!==this.#E){this.#E=f,this.#_=f;let b=++this.#$,v=i.get(f)?.ancestors??[];f&&!i.has(f)&&(p={requested:f,version:b,store:this.#e});for(let k=0;k<v.length;k++){let D=v[k];this.#a.has(D)||this.#V(D)}}let h=this.#_;this.#c.clear(),this.#R.clear(),this.#k=new WeakMap,this.#L.clear();let m=new Map,g=(b,v,k)=>{let D=this.ownerDocument.createElement("ul");D.className="group",D.setAttribute("part","group"),D.setAttribute("role","group");for(let y of b.getNodes()){if(b===this.#e&&y.label===this.parameters.excludeRoot)continue;let C=v?`${v}.${y.label}`:y.label,{children:V}=i.get(C),Y=V===null&&!this.parameters.hideValues&&(y.resolver===null||!y.resolver.expired),U=V!==null?V.length>0:Y||y.resolver!==null&&y.attr.child_count!==0,B=this.ownerDocument.createElement("li");B.className=`node ${U?"branch":"leaf"}`,B.setAttribute("part",`node ${U?"branch":"leaf"}`),B.classList.toggle("loading",this.#p.has(y)),B.classList.toggle("error",this.#r.has(y)),B.setAttribute("aria-busy",String(this.#p.has(y))),B.setAttribute("role","treeitem"),B.setAttribute("aria-selected",String(h===C)),B.classList.toggle("selected",h===C),B.dataset.path=C,B.tabIndex=-1;let X=this.ownerDocument.createElement("div");X.className="row",X.addEventListener("pointerenter",()=>this.#B(X,y,C)),B.addEventListener("focus",()=>this.#B(X,y,C)),X.draggable=this.parameters.draggable,X.setAttribute("part",`row ${U?"branch-row":"leaf-row"}${h===C?" selected-row":""}`),this.#r.has(y)&&(X.title=String(this.#r.get(y)));let J=this.ownerDocument.createElement(U?"button":"span");if(J.setAttribute("part",U?"expander":"spacer"),U){J.className="expander",J.type="button",J.tabIndex=-1;let A=this.ownerDocument.createElementNS(sr,"svg");A.setAttribute("viewBox","0 0 24 24"),A.setAttribute("aria-hidden","true"),A.setAttribute("focusable","false");let j=this.ownerDocument.createElementNS(sr,"path");j.setAttribute("d","m9 5 7 7-7 7"),j.setAttribute("fill","none"),j.setAttribute("stroke","currentColor"),j.setAttribute("stroke-width","1.8"),j.setAttribute("stroke-linecap","round"),j.setAttribute("stroke-linejoin","round"),A.append(j),J.append(A),J.addEventListener("click",se=>{se.stopPropagation(),B.focus(),F()})}else J.className="spacer";let $=this.ownerDocument.createElement("span");$.className="caption";let W=this.ownerDocument.createElement("span");W.className="badge",W.setAttribute("part","badge"),this.#k.set(X,{item:y,path:C,caption:$}),$.setAttribute("part","caption");let N=this.ownerDocument.createElement("span");N.className=`icon ${U?"branch-icon":"leaf-icon"}`,N.setAttribute("aria-hidden","true"),N.setAttribute("part",`icon ${U?"branch-icon":"leaf-icon"}`);let ne;this.#U&&(ne=this.ownerDocument.createElement("input"),ne.type="checkbox",ne.className="checkbox",ne.setAttribute("part","checkbox"),ne.tabIndex=-1,ne.addEventListener("click",A=>{if(A.stopPropagation(),typeof this.parameters.onChecked=="string"){let j=this.#s.callLogic(this.parameters.onChecked,{item:y,path:C});if(j instanceof Promise)throw new TypeError("tree onChecked must be synchronous");if(j===!1){this.#n();return}}this.#q(y,ne.checked,!0)})),X.append(J,ne||N,W,$),B.append(X);let Se=U?V?g(V,C,B):this.ownerDocument.createElement("ul"):null;if(Se&&(Se.className="group",Se.setAttribute("role","group"),Se.setAttribute("part","group")),Se&&B.append(Se),Y){let A=this.ownerDocument.createElement("li");A.className="value-node",A.setAttribute("part","value-node"),A.setAttribute("role","treeitem"),A.setAttribute("aria-selected","false"),A.tabIndex=-1,A.dataset.path=C,A.dataset.valueRow="true";let j=this.ownerDocument.createElement("div");j.className="row value-row",j.setAttribute("part","row value-row");let se=this.ownerDocument.createElement("span");se.className="spacer";let ae=this.ownerDocument.createElement("span");ae.className="value",ae.setAttribute("part","value"),ae.textContent=String(y.staticValue),j.append(se,ae),A.append(j),Se.append(A),j.addEventListener("click",()=>this.#M(C)),A.addEventListener("keydown",ye=>{let Re=this.#y(),Hr=Re.indexOf(A),Le;if(ye.key==="ArrowUp")Le=Re[Hr-1];else if(ye.key==="ArrowDown")Le=Re[Hr+1];else if(ye.key==="Home")Le=Re[0];else if(ye.key==="End")Le=Re.at(-1);else if(ye.key==="ArrowLeft")Le=B;else if(ye.key==="Enter"||ye.key===" ")this.#M(C);else return;ye.preventDefault(),ye.stopPropagation(),Le&&(this.#v(Le),Le.focus())})}let _t=()=>{let A=this.#T(y),j=this.#_===C,se=y.attr.badge;if(se!=null&&typeof se!="string"&&typeof se!="number")throw new TypeError("tree badge must be text or a number");let ae=y.attr.badge_color;if(ae!=null&&typeof ae!="string")throw new TypeError("tree badge_color must be text");W.textContent=se==null?"":String(se),W.hidden=se==null||se==="",W.style.backgroundColor=ae??"",W.toggleAttribute("data-colored",ae!=null&&ae!=="");let ye={item:y,path:C,opened:A,selected:j},Re=this.parameters.labelAttribute,Hr=this.parameters.internalNames&&y.getAttr("fieldpath")?y.label:this.parameters.getLabel!==null?this.#I("getLabel",ye):Re!==null?Object.hasOwn(y.attr,Re)?y.attr[Re]:y.label:this.parameters.labelCb!==null?this.#I("labelCb",ye):y.label;this.#ee($,Hr,!(this.parameters.internalNames&&y.getAttr("fieldpath"))&&(this.parameters.getLabel!==null||Re===null&&this.parameters.labelCb!==null)),this.#t&&this.#Y($);let Le=this.parameters.getLabelClass!==null?this.#I("getLabelClass",ye):y.attr[A?"labelClassOpened":"labelClassClosed"]||y.attr.labelClass||"",ea=[...this.#S(Le),...j?this.#S(this.parameters.selectedLabelClass):[]];$.className=["caption",...ea].join(" "),$.setAttribute("part",["caption",...ea].join(" "));let ta=this.#S(y.attr.node_class??"");B.className=["node",U?"branch":"leaf",...ta,...j?["selected"]:[],...U?[A?"opened":"closed"]:[],...this.#p.has(y)?["loading"]:[],...this.#r.has(y)?["error"]:[]].join(" "),B.setAttribute("part",["node",U?"branch":"leaf",...ta].join(" "));let ra=!ne&&this.parameters.getIconClass!==null,qn=ra?this.#S(this.#I("getIconClass",ye)):[U?"branch-icon":"leaf-icon",...U?[A?"opened-icon":"closed-icon"]:[]];if(N.className=["icon",...qn].join(" "),N.setAttribute("part",["icon",...qn].join(" ")),N.hidden=ra&&qn.length===0,ne){let Ot=y.attr.checked;ne.checked=Ot===!0||Ot==="disabled:on",ne.indeterminate=Ot===-1,B.setAttribute("aria-checked",Ot===-1?"mixed":String(ne.checked)),ne.disabled=Ot==="disabled:on"||Ot==="disabled:off",ne.setAttribute("aria-label",$.textContent)}U&&J.setAttribute("aria-label",`${A?"Collapse":"Expand"} ${$.textContent}`)};this.#L.set(C,_t);let ar=()=>{let A=this.#T(y);B.setAttribute("aria-expanded",String(A)),B.classList.toggle("opened",A),B.classList.toggle("closed",!A),N.classList.toggle("opened-icon",A),N.setAttribute("part",`icon branch-icon ${A?"opened-icon":"closed-icon"}`),Se.hidden=!A,_t()},F=()=>{let A=this.#t?this.#d:this.#a;A.has(y)?(A.delete(y),this.#t&&this.#D.add(y)):(this.#t?(this.#D.delete(y),this.#d.add(y)):this.#V(y),y.resolver!==null&&this.#z(y));for(let j of m.values())j();this.#v(C)};U?(m.set(y,ar),ar()):_t(),X.addEventListener("click",()=>this.#M(C)),B.addEventListener("keydown",A=>{if(A.target!==B)return;let j=this.#y(),se=j.indexOf(B),ae;if(A.key==="ArrowDown")ae=j[se+1];else if(A.key==="ArrowUp")ae=j[se-1];else if(A.key==="Home")ae=j[0];else if(A.key==="End")ae=j.at(-1);else if(A.key==="ArrowRight"&&U)this.#T(y)?ae=Se.firstElementChild:F();else if(A.key==="ArrowLeft")U&&this.#T(y)?F():ae=k;else if(A.key===" "&&ne)ne.click();else if(A.key==="Enter"||A.key===" ")this.#M(C);else return;A.preventDefault(),A.stopPropagation(),ae&&(this.#v(ae),ae.focus())}),this.#c.set(C,B),D.append(B)}return D},w=g(this.#e,"",null);if(this.parameters.favorites!==null){if(!(this.parameters.favorites instanceof be))throw new TypeError("tree favorites must be a Bag");this.parameters.favorites.length&&w.prepend(this.#J(this.parameters.favorites,h))}if(this.control.replaceChildren(w),this.control.setAttribute("aria-busy",String(this.#m)),this.#t){let b=new Set,v=[];this.#d.clear();for(let[D,y]of this.#c){let C=y.firstElementChild.querySelector(".caption"),V=i.get(D);if(V.ancestors.some(U=>U.attr.loop===!0))continue;let Y=C.textContent.toLowerCase().includes(this.#t);if(Y&&v.push(C),Y||this.#r.has(V.node)||this.#p.has(V.node)){b.add(V.node);for(let U of V.ancestors)b.add(U),this.#D.has(U)||this.#d.add(U)}}for(let[D,y]of this.#c)y.hidden=!b.has(i.get(D).node);for(let D of m.values())D();let k=this.ownerDocument.createElement("div");k.className="search-status",k.setAttribute("role","status"),k.textContent=this.#m?"Searching\u2026":this.#r.size?"Some branches could not be searched. Expand them to retry.":v.length?"":"No matches",this.control.append(k)}this.#v(e??h),r?this.#R.get(r)?.focus():n?w.querySelector("[data-favorites-group]")?.focus():e&&this.#c.get(e)?.focus(),p&&queueMicrotask(()=>this.#K(p))}#J(e,r){let n=this.ownerDocument,s=n.createElement("li");s.className="node branch",s.setAttribute("role","treeitem"),s.dataset.favoritesGroup="true",s.tabIndex=-1;let a=n.createElement("div");a.className="row";let i=n.createElement("button");i.type="button",i.className="expander",i.tabIndex=-1;let o=n.createElement("span");o.textContent="\u2661",o.setAttribute("aria-hidden","true");let l=n.createElement("span");l.className="caption",l.textContent=this.parameters.favoritesLabel;let u=n.createElement("ul");u.className="group",u.setAttribute("role","group");let c=()=>{s.setAttribute("aria-expanded",String(this.#u)),i.textContent=this.#u?"\u25BE":"\u25B8",i.setAttribute("aria-label",`${this.#u?"Collapse":"Expand"} ${this.parameters.favoritesLabel}`),u.hidden=!this.#u},d=()=>{this.#u=!this.#u,c()};i.addEventListener("click",f=>{f.stopPropagation(),d(),s.focus()}),a.addEventListener("click",d),s.addEventListener("focus",()=>this.#O()?.clearRowContext()),s.addEventListener("keydown",f=>{if(f.target===s){if(f.key==="ArrowRight")this.#u?u.firstElementChild?.focus():d();else if(f.key==="ArrowLeft")this.#u&&d();else if(f.key==="Enter"||f.key===" ")d();else if(f.key==="ArrowDown"||f.key==="ArrowUp"){let p=this.#y(),h=p.indexOf(s);p[h+(f.key==="ArrowDown"?1:-1)]?.focus()}else return;f.preventDefault(),f.stopPropagation()}}),a.append(i,o,l),s.append(a,u);for(let f of e.getNodes()){let p=f.getAttr("originalPath"),h=n.createElement("li");h.className="node leaf",h.setAttribute("role","treeitem"),h.dataset.favoritePath=p,h.tabIndex=-1,h.setAttribute("aria-selected",String(r===p));let m=n.createElement("div");m.className="row";let g=n.createElement("span");g.className="spacer";let w=n.createElement("span");w.className="icon",w.setAttribute("aria-hidden","true");let b=n.createElement("span");b.className="badge",b.setAttribute("part","badge");let v=f.getAttr("badge");b.textContent=v==null?"":String(v),b.hidden=v==null||v==="";let k=f.getAttr("badge_color");k&&(b.style.backgroundColor=k,b.setAttribute("data-colored",""));let D=n.createElement("span");D.className="caption",D.textContent=f.getAttr(this.parameters.internalNames?"fieldpath":"fullcaption"),m.title=f.getAttr("fieldpath"),m.draggable=this.parameters.draggable,this.#k.set(m,{item:f,path:p,caption:D}),m.addEventListener("pointerenter",()=>this.#B(m,f,p)),h.addEventListener("focus",()=>this.#B(m,f,p)),m.addEventListener("click",()=>this.#W(p)),h.addEventListener("keydown",y=>{if(y.target===h){if(y.key==="Enter"||y.key===" ")this.#W(p);else if(y.key==="ArrowLeft")s.focus();else if(y.key==="ArrowDown"||y.key==="ArrowUp"){let C=this.#y(),V=C.indexOf(h);C[V+(y.key==="ArrowDown"?1:-1)]?.focus()}else return;y.preventDefault(),y.stopPropagation()}}),m.append(g,w,b,D),h.append(m),u.append(h),this.#R.set(p,h)}return c(),s}#W(e){this.parameters.selectedPath===e?this.retrySelection():this.#s.writeParameter("selectedPath",e)}async#K({requested:e,version:r,store:n}){let s=()=>this.isConnected&&this.#$===r&&this.#e===n&&this.parameters.selectedPath===e&&this.#_===e,a=e.split("."),i=n;for(let o of a.slice(0,-1)){if(!s())return;let l=i.getNode(o);if(!l||l.resolver===null&&!(l.staticValue instanceof be)||!s()||i.getNode(o)!==l||(this.#V(l),this.#n(),l.resolver!==null&&!(l.staticValue instanceof be)&&await this.#z(l),!s()||i.getNode(o)!==l||!(l.staticValue instanceof be)))return;i=l.staticValue}s()&&i.getNode(a.at(-1))&&this.#n()}#q(e,r,n){if(e.attr.checked==="disabled:on"||e.attr.checked==="disabled:off")return;let s=this.#l.get(e)??e.getValue();if(s instanceof Promise&&!this.#l.has(e)){this.#r.delete(e);let a=s.catch(i=>{this.#r.set(e,i),this.#a.delete(e)}).finally(()=>{this.#l.get(e)===a&&this.#l.delete(e),this.#n()});this.#l.set(e,a)}if(this.parameters.checkChildren&&s instanceof be&&(e.resolver!==null&&this.#g.set(e,s),this.#C(s,r)),e.setAttr({checked:this.parameters.checkChildren&&s instanceof be&&s.length?this.#N(s):r}),this.parameters.checkChildren)for(let a=e.parentBag.parentNode;a&&a!==this.#e.parentNode;a=a.parentBag.parentNode)a.setAttr({checked:this.#N(a.staticValue)});n&&this.#j()}#C(e,r,n=!1){for(let s of e.getNodes()){if(n&&this.#b.has(s)||(this.#b.add(s),s.attr.checked==="disabled:on"||s.attr.checked==="disabled:off"))continue;let a=s.staticValue;a instanceof be&&a.length?(s.resolver!==null&&this.#g.set(s,a),this.#C(a,r),s.setAttr({checked:this.#N(a)})):s.setAttr({checked:r})}}#X(e,r=new Set,n=[]){if(r.has(e))throw new TypeError("tree requires an acyclic Bag store");r.add(e);let s=!1;for(let a of e.getNodes()){this.#b.add(a);let i=a.staticValue;if(!(i instanceof be))continue;let o=!1;a.resolver!==null&&this.#g.get(a)!==i?(this.#g.set(a,i),n.push(i),typeof a.attr.checked=="boolean"&&(this.#C(i,a.attr.checked),o=!0)):typeof a.attr.checked=="boolean"&&i.getNodes().some(l=>!this.#b.has(l))&&(this.#C(i,a.attr.checked,!0),n.push(i),o=!0),o=this.#X(i,r,n)||o,o&&i.length&&a.attr.checked!=="disabled:on"&&a.attr.checked!=="disabled:off"&&a.setAttr({checked:this.#N(i)}),s||=o}return r.delete(e),s}#j(e=!1){let r=[],n=(s,a)=>{for(let i of s.getNodes()){let o=a?`${a}.${i.label}`:i.label,l=i.staticValue;l instanceof be&&l.length?(!this.parameters.checkChildren&&i.attr.checked===!0&&r.push(o),n(l,o)):i.attr.checked===!0&&r.push(o)}};if(n(this.#e,""),e&&this.#f)for(let s of(this.parameters.checkedPaths||"").split(this.parameters.checkedPaths_joiner).filter(Boolean))!r.includes(s)&&this.#Q(s)&&r.push(s);this.#o=r.join(this.parameters.checkedPaths_joiner),this.#s.writeParameter("checkedPaths",this.#o),this.#n()}#Q(e){let r=e.split("."),n=this.#e;for(let s=0;s<r.length;s++){let a=n.getNode(r[s]);if(!a||s===r.length-1)return!1;if(a.resolver!==null&&!(a.staticValue instanceof be))return!0;if(!(a.staticValue instanceof be))return!1;n=a.staticValue}return!1}#N(e){let r=e.getNodes().map(n=>n.attr.checked==="disabled:on"?!0:n.attr.checked==="disabled:off"||n.attr.checked==null?!1:n.attr.checked);return r.every(n=>n===!0)?!0:r.every(n=>n===!1)?!1:-1}#S(e){if(typeof e!="string")throw new TypeError("Tree classes must be a string");return e.split(/\s+/).filter(Boolean)}#O(){let e=this.querySelectorAll(":scope > gramlot-row-actions");if(e.length>1)throw new Error("tree accepts one rowActions bar");return e[0]??null}#B(e,r,n){let s=this.#O();if(!s||s.contains(this.ownerDocument.activeElement))return;let a=this.getBoundingClientRect(),i=e.getBoundingClientRect();s.setRowContext(r,n),s.style.position="absolute",s.style.top=`${i.top-a.top}px`,s.style.left=s.parameters.position==="start"?`${i.left-a.left}px`:"auto",s.style.right=s.parameters.position==="end"?`${a.right-i.right}px`:"auto",s.style.zIndex="1",s.hidden=!1}#I(e,r){let n=this.#s.callLogic(this.parameters[e],r);if(e==="labelCb"||e==="getLabel"){if(!n||typeof n!="object"||Object.keys(n).length!==1||!(Object.hasOwn(n,"text")&&typeof n.text=="string"||Object.hasOwn(n,"html")&&typeof n.html=="string"))throw new TypeError(`tree ${e} must return {text: string} or {html: string} synchronously`)}else if(typeof n!="string")throw new TypeError(`tree ${e} must return a string synchronously`);return n}#ee(e,r,n){n&&Object.hasOwn(r,"html")?e.replaceChildren(this.#i.sanitize(r.html,{USE_PROFILES:{html:!0},FORBID_TAGS:["style","form","input","button","select","textarea"],RETURN_DOM_FRAGMENT:!0})):e.textContent=n?r.text:r}#y(){return[...this.control.querySelectorAll("[role=treeitem]")].filter(e=>!e.closest("[hidden]"))}#V(e){if(this.#t){this.#d.add(e);return}if(this.parameters.autoCollapse)for(let r of e.parentBag.getNodes())r!==e&&this.#a.delete(r);this.#a.add(e)}#z(e,r=!1){if(this.#l.has(e))return this.#l.get(e);this.#p.add(e),this.#r.delete(e),this.#n();let n=(async()=>{try{await Promise.resolve().then(()=>e.getValue())}catch(s){this.#r.set(e,s),r||this.#a.delete(e)}finally{this.#p.delete(e),this.#l.delete(e),this.#n()}})();return this.#l.set(e,n),n}#v(e){let r=this.#y(),n=typeof e=="string"||e==null?r.find(s=>s.dataset.path===e)??r[0]:e;for(let s of this.control.querySelectorAll("[role=treeitem]"))s.tabIndex=s===n?0:-1}#M(e){this.#_=e;for(let[r,n]of this.#c)n.setAttribute("aria-selected",String(r===e)),n.classList.toggle("selected",r===e),this.#L.get(r)(),n.firstElementChild.setAttribute("part",`row ${n.classList.contains("branch")?"branch-row":"leaf-row"}${r===e?" selected-row":""}`);this.#v(e),this.#c.get(e).focus(),this.#s.writeParameter("selectedPath",e)}}}),x_=zn({name:"tree",components:[xf,Af]});export{Af as RowActions,xf as Tree,x_ as default};