n8n-nodes-adeu 1.7.4 → 1.7.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,19 +1,19 @@
1
- 'use strict';var n8nWorkflow=require('n8n-workflow'),module$1=require('module');var Bs=Object.create;var Ln=Object.defineProperty;var Fs=Object.getOwnPropertyDescriptor;var Ls=Object.getOwnPropertyNames;var $s=Object.getPrototypeOf,Us=Object.prototype.hasOwnProperty;var h=(e,t)=>Ln(e,"name",{value:t,configurable:true});var Me=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var qs=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Ls(t))!Us.call(e,s)&&s!==n&&Ln(e,s,{get:()=>t[s],enumerable:!(r=Fs(t,s))||r.enumerable});return e};var xr=(e,t,n)=>(n=e!=null?Bs($s(e)):{},qs(Ln(n,"default",{value:e,enumerable:true}),e));var et=Me(le=>{function ho(e,t,n){if(n===void 0&&(n=Array.prototype),e&&typeof n.find=="function")return n.find.call(e,t);for(var r=0;r<e.length;r++)if(Ke(e,r)){var s=e[r];if(t.call(void 0,s,r,e))return s}}h(ho,"find");function ct(e,t){return t===void 0&&(t=Object),t&&typeof t.getOwnPropertyDescriptors=="function"&&(e=t.create(null,t.getOwnPropertyDescriptors(e))),t&&typeof t.freeze=="function"?t.freeze(e):e}h(ct,"freeze");function Ke(e,t){return Object.prototype.hasOwnProperty.call(e,t)}h(Ke,"hasOwn");function po(e,t){if(e===null||typeof e!="object")throw new TypeError("target is not an object");for(var n in t)Ke(t,n)&&(e[n]=t[n]);return e}h(po,"assign");var jr=ct({allowfullscreen:true,async:true,autofocus:true,autoplay:true,checked:true,controls:true,default:true,defer:true,disabled:true,formnovalidate:true,hidden:true,ismap:true,itemscope:true,loop:true,multiple:true,muted:true,nomodule:true,novalidate:true,open:true,playsinline:true,readonly:true,required:true,reversed:true,selected:true});function mo(e){return Ke(jr,e.toLowerCase())}h(mo,"isHTMLBooleanAttribute");var Wr=ct({area:true,base:true,br:true,col:true,embed:true,hr:true,img:true,input:true,link:true,meta:true,param:true,source:true,track:true,wbr:true});function go(e){return Ke(Wr,e.toLowerCase())}h(go,"isHTMLVoidElement");var Bt=ct({script:false,style:false,textarea:true,title:true});function _o(e){var t=e.toLowerCase();return Ke(Bt,t)&&!Bt[t]}h(_o,"isHTMLRawTextElement");function vo(e){var t=e.toLowerCase();return Ke(Bt,t)&&Bt[t]}h(vo,"isHTMLEscapableRawTextElement");function Hr(e){return e===Ft.HTML}h(Hr,"isHTMLMimeType");function wo(e){return Hr(e)||e===Ft.XML_XHTML_APPLICATION}h(wo,"hasDefaultHTMLNamespace");var Ft=ct({HTML:"text/html",XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),Eo=Object.keys(Ft).map(function(e){return Ft[e]});function Do(e){return Eo.indexOf(e)>-1}h(Do,"isValidMimeType");var Ao=ct({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/"});le.assign=po;le.find=ho;le.freeze=ct;le.HTML_BOOLEAN_ATTRIBUTES=jr;le.HTML_RAW_TEXT_ELEMENTS=Bt;le.HTML_VOID_ELEMENTS=Wr;le.hasDefaultHTMLNamespace=wo;le.hasOwn=Ke;le.isHTMLBooleanAttribute=mo;le.isHTMLRawTextElement=_o;le.isHTMLEscapableRawTextElement=vo;le.isHTMLMimeType=Hr;le.isHTMLVoidElement=go;le.isValidMimeType=Do;le.MIME_TYPE=Ft;le.NAMESPACE=Ao;});var zt=Me(qt=>{var yo=et();function Gr(e,t){e.prototype=Object.create(Error.prototype,{constructor:{value:e},name:{value:e.name,enumerable:true,writable:t}});}h(Gr,"extendError");var $t=yo.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"}),Xr=Object.keys($t);function Yr(e){return typeof e=="number"&&e>=1&&e<=25}h(Yr,"isValidDomExceptionCode");function bo(e){return typeof e=="string"&&e.substring(e.length-$t.Error.length)===$t.Error}h(bo,"endsWithError");function Ut(e,t){Yr(e)?(this.name=Xr[e],this.message=t||""):(this.message=e,this.name=bo(t)?t:$t.Error),Error.captureStackTrace&&Error.captureStackTrace(this,Ut);}h(Ut,"DOMException");Gr(Ut,true);Object.defineProperties(Ut.prototype,{code:{enumerable:true,get:h(function(){var e=Xr.indexOf(this.name);return Yr(e)?e:0},"get")}});var Qr={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},Zn=Object.entries(Qr);for(Lt=0;Lt<Zn.length;Lt++)Vr=Zn[Lt][0],Ut[Vr]=Zn[Lt][1];var Vr,Lt;function Jn(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,Jn);}h(Jn,"ParseError");Gr(Jn);qt.DOMException=Ut;qt.DOMExceptionName=$t;qt.ExceptionCode=Qr;qt.ParseError=Jn;});var sr=Me(B=>{function ri(e){try{typeof e!="function"&&(e=RegExp);var t=new e("\u{1D306}","u").exec("\u{1D306}");return !!t&&t[0].length===2}catch{}return false}h(ri,"detectUnicodeSupport");var pt=ri();function je(e){if(e.source[0]!=="[")throw new Error(e+" can not be used with chars");return e.source.slice(1,e.source.lastIndexOf("]"))}h(je,"chars");function ft(e,t){if(e.source[0]!=="[")throw new Error("/"+e.source+"/ can not be used with chars_without");if(!t||typeof t!="string")throw new Error(JSON.stringify(t)+" is not a valid search");if(e.source.indexOf(t)===-1)throw new Error('"'+t+'" is not is /'+e.source+"/");if(t==="-"&&e.source.indexOf(t)!==1)throw new Error('"'+t+'" is not at the first postion of /'+e.source+"/");return new RegExp(e.source.replace(t,""),pt?"u":"")}h(ft,"chars_without");function q(e){var t=this;return new RegExp(Array.prototype.slice.call(arguments).map(function(n){var r=typeof n=="string";if(r&&t===void 0&&n==="|")throw new Error("use regg instead of reg to wrap expressions with `|`!");return r?n:n.source}).join(""),pt?"mu":"m")}h(q,"reg");function M(e){if(arguments.length===0)throw new Error("no parameters provided");return q.apply(M,["(?:"].concat(Array.prototype.slice.call(arguments),[")"]))}h(M,"regg");var No="\uFFFD",We=/[-\x09\x0A\x0D\x20-\x2C\x2E-\uD7FF\uE000-\uFFFD]/;pt&&(We=q("[",je(We),"\\u{10000}-\\u{10FFFF}","]"));var Co=new RegExp("[^"+je(We)+"]",pt?"u":""),er=/[\x20\x09\x0D\x0A]/,To=je(er),X=q(er,"+"),K=q(er,"*"),jt=/[:_a-zA-Z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;pt&&(jt=q("[",je(jt),"\\u{10000}-\\u{10FFFF}","]"));var xo=je(jt),tr=q("[",xo,je(/[-.0-9\xB7]/),je(/[\u0300-\u036F\u203F-\u2040]/),"]"),Ae=q(jt,tr,"*"),Zr=q(tr,"+"),Io=q("&",Ae,";"),So=M(/&#[0-9]+;|&#x[0-9a-fA-F]+;/),Wt=M(Io,"|",So),Ht=q("%",Ae,";"),nr=M(q('"',M(/[^%&"]/,"|",Ht,"|",Wt),"*",'"'),"|",q("'",M(/[^%&']/,"|",Ht,"|",Wt),"*","'")),Oo=M('"',M(/[^<&"]/,"|",Wt),"*",'"',"|","'",M(/[^<&']/,"|",Wt),"*","'"),Po=ft(jt,":"),ko=ft(tr,":"),Jr=q(Po,ko,"*"),Vt=q(Jr,M(":",Jr),"?"),Mo=q("^",Vt,"$"),Ro=q("(",Vt,")"),ht=M(/"[^"]*"|'[^']*'/),Bo=q(/^<\?/,"(",Ae,")",M(X,"(",We,"*?)"),"?",/\?>/),Kr=/[\x20\x0D\x0Aa-zA-Z0-9-'()+,./:=?;!*#@$_%]/,Gt=M('"',Kr,'*"',"|","'",ft(Kr,"'"),"*'"),ii="<!--",si="-->",Fo=q(ii,M(ft(We,"-"),"|",q("-",ft(We,"-"))),"*",si),ei="#PCDATA",Lo=M(q(/\(/,K,ei,M(K,/\|/,K,Vt),"*",K,/\)\*/),"|",q(/\(/,K,ei,K,/\)/)),$o=/[?*+]?/,Uo=q(/\([^>]+\)/,$o),qo=M("EMPTY","|","ANY","|",Lo,"|",Uo),zo="<!ELEMENT",jo=q(zo,X,M(Vt,"|",Ht),X,M(qo,"|",Ht),K,">"),Wo=q("NOTATION",X,/\(/,K,Ae,M(K,/\|/,K,Ae),"*",K,/\)/),Ho=q(/\(/,K,Zr,M(K,/\|/,K,Zr),"*",K,/\)/),Vo=M(Wo,"|",Ho),Go=M(/CDATA|ID|IDREF|IDREFS|ENTITY|ENTITIES|NMTOKEN|NMTOKENS/,"|",Vo),Xo=M(/#REQUIRED|#IMPLIED/,"|",M(M("#FIXED",X),"?",Oo)),Yo=M(X,Ae,X,Go,X,Xo),Qo="<!ATTLIST",Zo=q(Qo,X,Ae,Yo,"*",K,">"),Kn="about:legacy-compat",Jo=M('"'+Kn+'"',"|","'"+Kn+"'"),rr="SYSTEM",cn="PUBLIC",fn=M(M(rr,X,ht),"|",M(cn,X,Gt,X,ht)),Ko=q("^",M(M(rr,X,"(?<SystemLiteralOnly>",ht,")"),"|",M(cn,X,"(?<PubidLiteral>",Gt,")",X,"(?<SystemLiteral>",ht,")"))),ea=q("^",Gt,"$"),ta=q("^",ht,"$"),na=M(X,"NDATA",X,Ae),ra=M(nr,"|",M(fn,na,"?")),oi="<!ENTITY",ia=q(oi,X,Ae,X,ra,K,">"),sa=M(nr,"|",fn),oa=q(oi,X,"%",X,Ae,X,sa,K,">"),aa=M(ia,"|",oa),ua=q(cn,X,Gt),la=q("<!NOTATION",X,Ae,X,M(fn,"|",ua),K,">"),ir=q(K,"=",K),ti=/1[.]\d+/,ca=q(X,"version",ir,M("'",ti,"'","|",'"',ti,'"')),ni=/[A-Za-z][-A-Za-z0-9._]*/,fa=M(X,"encoding",ir,M('"',ni,'"',"|","'",ni,"'")),ha=M(X,"standalone",ir,M("'",M("yes","|","no"),"'","|",'"',M("yes","|","no"),'"')),pa=q(/^<\?xml/,ca,fa,"?",ha,"?",K,/\?>/),da="<!DOCTYPE",ma="<![CDATA[",ga="]]>",_a=/<!\[CDATA\[/,va=/\]\]>/,wa=q(We,"*?",va),Ea=q(_a,wa);B.chars=je;B.chars_without=ft;B.detectUnicodeSupport=ri;B.reg=q;B.regg=M;B.ABOUT_LEGACY_COMPAT=Kn;B.ABOUT_LEGACY_COMPAT_SystemLiteral=Jo;B.AttlistDecl=Zo;B.CDATA_START=ma;B.CDATA_END=ga;B.CDSect=Ea;B.Char=We;B.Comment=Fo;B.COMMENT_START=ii;B.COMMENT_END=si;B.DOCTYPE_DECL_START=da;B.elementdecl=jo;B.EntityDecl=aa;B.EntityValue=nr;B.ExternalID=fn;B.ExternalID_match=Ko;B.Name=Ae;B.NotationDecl=la;B.Reference=Wt;B.PEReference=Ht;B.PI=Bo;B.PUBLIC=cn;B.PubidLiteral=Gt;B.PubidLiteral_match=ea;B.QName=Vt;B.QName_exact=Mo;B.QName_group=Ro;B.S=X;B.SChar_s=To;B.S_OPT=K;B.SYSTEM=rr;B.SystemLiteral=ht;B.SystemLiteral_match=ta;B.InvalidChar=Co;B.UNICODE_REPLACEMENT_CHARACTER=No;B.UNICODE_SUPPORT=pt;B.XMLDecl=pa;});var pr=Me(re=>{var Ne=et(),Pe=Ne.find,Da=Ne.hasDefaultHTMLNamespace,mt=Ne.hasOwn,Aa=Ne.isHTMLMimeType,ya=Ne.isHTMLRawTextElement,ba=Ne.isHTMLVoidElement,Xt=Ne.MIME_TYPE,ke=Ne.NAMESPACE,pe=Symbol(),pi=zt(),I=pi.DOMException,ye=pi.DOMExceptionName,ce=sr();function de(e){if(e!==pe)throw new TypeError("Illegal constructor")}h(de,"checkSymbol");function Na(e){return e!==""}h(Na,"notEmptyString");function Ca(e){return e?e.split(/[\t\n\f\r ]+/).filter(Na):[]}h(Ca,"splitOnASCIIWhitespace");function Ta(e,t){return mt(e,t)||(e[t]=true),e}h(Ta,"orderedSetReducer");function ai(e){if(!e)return [];var t=Ca(e);return Object.keys(t.reduce(Ta,{}))}h(ai,"toOrderedSet");function xa(e){return function(t){return e&&e.indexOf(t)!==-1}}h(xa,"arrayIncludes");function di(e){if(!ce.QName_exact.test(e))throw new I(I.INVALID_CHARACTER_ERR,'invalid character in qualified name "'+e+'"')}h(di,"validateQualifiedName");function ar(e,t){di(t),e=e||null;var n=null,r=t;if(t.indexOf(":")>=0){var s=t.split(":");n=s[0],r=s[1];}if(n!==null&&e===null)throw new I(I.NAMESPACE_ERR,"prefix is non-null and namespace is null");if(n==="xml"&&e!==Ne.NAMESPACE.XML)throw new I(I.NAMESPACE_ERR,'prefix is "xml" and namespace is not the XML namespace');if((n==="xmlns"||t==="xmlns")&&e!==Ne.NAMESPACE.XMLNS)throw new I(I.NAMESPACE_ERR,'either qualifiedName or prefix is "xmlns" and namespace is not the XMLNS namespace');if(e===Ne.NAMESPACE.XMLNS&&n!=="xmlns"&&t!=="xmlns")throw new I(I.NAMESPACE_ERR,'namespace is the XMLNS namespace and neither qualifiedName nor prefix is "xmlns"');return [e,n,r]}h(ar,"validateAndExtract");function vt(e,t){for(var n in e)mt(e,n)&&(t[n]=e[n]);}h(vt,"copy");function me(e,t){var n=e.prototype;if(!(n instanceof t)){let r=function(){};h(r,"t"),r.prototype=t.prototype,r=new r,vt(n,r),e.prototype=n=r;}n.constructor!=e&&(n.constructor=e);}h(me,"_extends");var ge={},be=ge.ELEMENT_NODE=1,gt=ge.ATTRIBUTE_NODE=2,dn=ge.TEXT_NODE=3,mi=ge.CDATA_SECTION_NODE=4,gi=ge.ENTITY_REFERENCE_NODE=5,Ia=ge.ENTITY_NODE=6,ur=ge.PROCESSING_INSTRUCTION_NODE=7,lr=ge.COMMENT_NODE=8,dt=ge.DOCUMENT_NODE=9,_i=ge.DOCUMENT_TYPE_NODE=10,He=ge.DOCUMENT_FRAGMENT_NODE=11,Sa=ge.NOTATION_NODE=12,ne=Ne.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 vi(e,t){if(t.length<e.length)return vi(t,e);var n=null;for(var r in e){if(e[r]!==t[r])return n;n=e[r];}return n}h(vi,"commonAncestor");function ui(e){return e.guid||(e.guid=Math.random()),e.guid}h(ui,"docGUID");function oe(){}h(oe,"NodeList");oe.prototype={length:0,item:h(function(e){return e>=0&&e<this.length?this[e]:null},"item"),toString:h(function(e){var t;typeof e=="function"?t={requireWellFormed:false,splitCDATASections:true,nodeFilter:e}:e?t={requireWellFormed:!!e.requireWellFormed,splitCDATASections:e.splitCDATASections!==false,nodeFilter:e.nodeFilter||null}:t={requireWellFormed:false,splitCDATASections:true,nodeFilter:null};for(var n=[],r=0;r<this.length;r++)hr(this[r],n,null,t);return n.join("")},"toString"),filter:h(function(e){return Array.prototype.filter.call(this,e)},"filter"),indexOf:h(function(e){return Array.prototype.indexOf.call(this,e)},"indexOf")};oe.prototype[Symbol.iterator]=function(){var e=this,t=0;return {next:h(function(){return t<e.length?{value:e[t++],done:false}:{done:true}},"next"),return:h(function(){return {done:true}},"return")}};function Oe(e,t){this._node=e,this._refresh=t,gn(this);}h(Oe,"LiveNodeList");function gn(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!==t){var n=e._refresh(e._node);if(Si(e,"length",n.length),!e.$$length||n.length<e.$$length)for(var r=n.length;r in e;r++)mt(e,r)&&delete e[r];vt(n,e),e._inc=t;}}h(gn,"_updateLiveList");Oe.prototype.item=function(e){return gn(this),this[e]||null};me(Oe,oe);function _t(){}h(_t,"NamedNodeMap");function wi(e,t){for(var n=0;n<e.length;){if(e[n]===t)return n;n++;}}h(wi,"_findNodeIndex");function Oa(e,t,n,r){if(r?t[wi(t,r)]=n:(t[t.length]=n,t.length++),e){n.ownerElement=e;var s=e.ownerDocument;s&&(r&&Ai(s,e,r),Pa(s,e,n));}}h(Oa,"_addNamedNode");function li(e,t,n){var r=wi(t,n);if(r>=0){for(var s=t.length-1;r<=s;)t[r]=t[++r];if(t.length=s,e){var i=e.ownerDocument;i&&Ai(i,e,n),n.ownerElement=null;}}}h(li,"_removeNamedNode");_t.prototype={length:0,item:oe.prototype.item,getNamedItem:h(function(e){this._ownerElement&&this._ownerElement._isInHTMLDocumentAndNamespace()&&(e=e.toLowerCase());for(var t=0;t<this.length;){var n=this[t];if(n.nodeName===e)return n;t++;}return null},"getNamedItem"),setNamedItem:h(function(e){var t=e.ownerElement;if(t&&t!==this._ownerElement)throw new I(I.INUSE_ATTRIBUTE_ERR);var n=this.getNamedItemNS(e.namespaceURI,e.localName);return n===e?e:(Oa(this._ownerElement,this,e,n),n)},"setNamedItem"),setNamedItemNS:h(function(e){return this.setNamedItem(e)},"setNamedItemNS"),removeNamedItem:h(function(e){var t=this.getNamedItem(e);if(!t)throw new I(I.NOT_FOUND_ERR,e);return li(this._ownerElement,this,t),t},"removeNamedItem"),removeNamedItemNS:h(function(e,t){var n=this.getNamedItemNS(e,t);if(!n)throw new I(I.NOT_FOUND_ERR,e?e+" : "+t:t);return li(this._ownerElement,this,n),n},"removeNamedItemNS"),getNamedItemNS:h(function(e,t){e||(e=null);for(var n=0;n<this.length;){var r=this[n];if(r.localName===t&&r.namespaceURI===e)return r;n++;}return null},"getNamedItemNS")};_t.prototype[Symbol.iterator]=function(){var e=this,t=0;return {next:h(function(){return t<e.length?{value:e[t++],done:false}:{done:true}},"next"),return:h(function(){return {done:true}},"return")}};function Ei(){}h(Ei,"DOMImplementation");Ei.prototype={hasFeature:h(function(e,t){return true},"hasFeature"),createDocument:h(function(e,t,n){var r=Xt.XML_APPLICATION;e===ke.HTML?r=Xt.XML_XHTML_APPLICATION:e===ke.SVG&&(r=Xt.XML_SVG_IMAGE);var s=new Le(pe,{contentType:r});if(s.implementation=this,s.childNodes=new oe,s.doctype=n||null,n&&s.appendChild(n),t){var i=s.createElementNS(e,t);s.appendChild(i);}return s},"createDocument"),createDocumentType:h(function(e,t,n,r){di(e);var s=new wn(pe);return s.name=e,s.nodeName=e,s.publicId=t||"",s.systemId=n||"",s.internalSubset=r||"",s.childNodes=new oe,s},"createDocumentType"),createHTMLDocument:h(function(e){var t=new Le(pe,{contentType:Xt.HTML});if(t.implementation=this,t.childNodes=new oe,e!==false){t.doctype=this.createDocumentType("html"),t.doctype.ownerDocument=t,t.appendChild(t.doctype);var n=t.createElement("html");t.appendChild(n);var r=t.createElement("head");if(n.appendChild(r),typeof e=="string"){var s=t.createElement("title");s.appendChild(t.createTextNode(e)),r.appendChild(s);}n.appendChild(t.createElement("body"));}return t},"createHTMLDocument")};function W(e){de(e);}h(W,"Node");W.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 e=this.getRootNode();return e&&e.nodeType===e.DOCUMENT_NODE},contains:h(function(e){if(!e)return false;var t=e;do{if(this===t)return true;t=t.parentNode;}while(t);return false},"contains"),getRootNode:h(function(e){var t=this;do{if(!t.parentNode)return t;t=t.parentNode;}while(t)},"getRootNode"),isEqualNode:h(function(e){if(!e)return false;for(var t=[{node:this,other:e}];t.length>0;){var n=t.pop(),r=n.node,s=n.other;if(r.nodeType!==s.nodeType)return false;switch(r.nodeType){case r.DOCUMENT_TYPE_NODE:if(r.name!==s.name||r.publicId!==s.publicId||r.systemId!==s.systemId)return false;break;case r.ELEMENT_NODE:if(r.namespaceURI!==s.namespaceURI||r.prefix!==s.prefix||r.localName!==s.localName||r.attributes.length!==s.attributes.length)return false;for(var i=0;i<r.attributes.length;i++){var o=r.attributes.item(i),u=s.getAttributeNodeNS(o.namespaceURI,o.localName);if(!u)return false;t.push({node:o,other:u});}break;case r.ATTRIBUTE_NODE:if(r.namespaceURI!==s.namespaceURI||r.localName!==s.localName||r.value!==s.value)return false;break;case r.PROCESSING_INSTRUCTION_NODE:if(r.target!==s.target||r.data!==s.data)return false;break;case r.TEXT_NODE:case r.CDATA_SECTION_NODE:case r.COMMENT_NODE:if(r.data!==s.data)return false;break}if(r.childNodes.length!==s.childNodes.length)return false;for(var i=r.childNodes.length-1;i>=0;i--)t.push({node:r.childNodes[i],other:s.childNodes[i]});}return true},"isEqualNode"),isSameNode:h(function(e){return this===e},"isSameNode"),insertBefore:h(function(e,t){return mn(this,e,t)},"insertBefore"),replaceChild:h(function(e,t){mn(this,e,t,Ci),t&&this.removeChild(t);},"replaceChild"),removeChild:h(function(e){return bi(this,e)},"removeChild"),appendChild:h(function(e){return this.insertBefore(e,null)},"appendChild"),hasChildNodes:h(function(){return this.firstChild!=null},"hasChildNodes"),cloneNode:h(function(e){return Ii(this.ownerDocument||this,this,e)},"cloneNode"),normalize:h(function(){fe(this,null,{enter:h(function(e){for(var t=e.firstChild;t;){var n=t.nextSibling;n!==null&&n.nodeType===dn&&t.nodeType===dn?(e.removeChild(n),t.appendData(n.data)):t=n;}return true},"enter")});},"normalize"),isSupported:h(function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},"isSupported"),lookupPrefix:h(function(e){for(var t=this;t;){var n=t._nsMap;if(n){for(var r in n)if(mt(n,r)&&n[r]===e)return r}t=t.nodeType==gt?t.ownerDocument:t.parentNode;}return null},"lookupPrefix"),lookupNamespaceURI:h(function(e){for(var t=this;t;){var n=t._nsMap;if(n&&mt(n,e))return n[e];t=t.nodeType==gt?t.ownerDocument:t.parentNode;}return null},"lookupNamespaceURI"),isDefaultNamespace:h(function(e){var t=this.lookupPrefix(e);return t==null},"isDefaultNamespace"),compareDocumentPosition:h(function(e){if(this===e)return 0;var t=e,n=this,r=null,s=null;if(t instanceof tt&&(r=t,t=r.ownerElement),n instanceof tt&&(s=n,n=s.ownerElement,r&&t&&n===t))for(var i=0,o;o=n.attributes[i];i++){if(o===r)return ne.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+ne.DOCUMENT_POSITION_PRECEDING;if(o===s)return ne.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+ne.DOCUMENT_POSITION_FOLLOWING}if(!t||!n||n.ownerDocument!==t.ownerDocument)return ne.DOCUMENT_POSITION_DISCONNECTED+ne.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+(ui(n.ownerDocument)>ui(t.ownerDocument)?ne.DOCUMENT_POSITION_FOLLOWING:ne.DOCUMENT_POSITION_PRECEDING);if(s&&t===n)return ne.DOCUMENT_POSITION_CONTAINS+ne.DOCUMENT_POSITION_PRECEDING;if(r&&t===n)return ne.DOCUMENT_POSITION_CONTAINED_BY+ne.DOCUMENT_POSITION_FOLLOWING;for(var u=[],l=t.parentNode;l;){if(!s&&l===n)return ne.DOCUMENT_POSITION_CONTAINED_BY+ne.DOCUMENT_POSITION_FOLLOWING;u.push(l),l=l.parentNode;}u.reverse();for(var a=[],c=n.parentNode;c;){if(!r&&c===t)return ne.DOCUMENT_POSITION_CONTAINS+ne.DOCUMENT_POSITION_PRECEDING;a.push(c),c=c.parentNode;}a.reverse();var f=vi(u,a);for(var p in f.childNodes){var d=f.childNodes[p];if(d===n)return ne.DOCUMENT_POSITION_FOLLOWING;if(d===t)return ne.DOCUMENT_POSITION_PRECEDING;if(a.indexOf(d)>=0)return ne.DOCUMENT_POSITION_FOLLOWING;if(u.indexOf(d)>=0)return ne.DOCUMENT_POSITION_PRECEDING}return 0},"compareDocumentPosition")};function Di(e){return e=="<"&&"&lt;"||e==">"&&"&gt;"||e=="&"&&"&amp;"||e=='"'&&"&quot;"||"&#"+e.charCodeAt()+";"}h(Di,"_xmlEncoder");vt(ge,W);vt(ge,W.prototype);vt(ne,W);vt(ne,W.prototype);function pn(e,t){fe(e,null,{enter:h(function(n){return t(n)?fe.STOP:true},"enter")});}h(pn,"_visitNode");function fe(e,t,n){for(var r=[{node:e,context:t,phase:fe.ENTER}];r.length>0;){var s=r.pop();if(s.phase===fe.ENTER){var i=n.enter(s.node,s.context);if(i===fe.STOP)return fe.STOP;if(r.push({node:s.node,context:i,phase:fe.EXIT}),i==null)continue;for(var o=s.node.lastChild;o;)r.push({node:o,context:i,phase:fe.ENTER}),o=o.previousSibling;}else n.exit&&n.exit(s.node,s.context);}}h(fe,"walkDOM");fe.STOP=Symbol("walkDOM.STOP");fe.ENTER=0;fe.EXIT=1;function Le(e,t){de(e);var n=t||{};this.ownerDocument=this,this.contentType=n.contentType||Xt.XML_APPLICATION,this.type=Aa(this.contentType)?"html":"xml";}h(Le,"Document");function Pa(e,t,n){e&&e._inc++;var r=n.namespaceURI;r===ke.XMLNS&&(t._nsMap[n.prefix?n.localName:""]=n.value);}h(Pa,"_onAddAttribute");function Ai(e,t,n,r){e&&e._inc++;var s=n.namespaceURI;s===ke.XMLNS&&delete t._nsMap[n.prefix?n.localName:""];}h(Ai,"_onRemoveAttribute");function yi(e,t,n){if(e&&e._inc){e._inc++;var r=t.childNodes;if(n&&!n.nextSibling)r[r.length++]=n;else {for(var s=t.firstChild,i=0;s;)r[i++]=s,s=s.nextSibling;r.length=i,delete r[r.length];}}}h(yi,"_onUpdateChild");function bi(e,t){if(e!==t.parentNode)throw new I(I.NOT_FOUND_ERR,"child's parent is not parent");var n=t.previousSibling,r=t.nextSibling;return n?n.nextSibling=r:e.firstChild=r,r?r.previousSibling=n:e.lastChild=n,yi(e.ownerDocument,e),t.parentNode=null,t.previousSibling=null,t.nextSibling=null,t}h(bi,"_removeChild");function ka(e){return e&&(e.nodeType===W.DOCUMENT_NODE||e.nodeType===W.DOCUMENT_FRAGMENT_NODE||e.nodeType===W.ELEMENT_NODE)}h(ka,"hasValidParentNodeType");function Ma(e){return e&&(e.nodeType===W.CDATA_SECTION_NODE||e.nodeType===W.COMMENT_NODE||e.nodeType===W.DOCUMENT_FRAGMENT_NODE||e.nodeType===W.DOCUMENT_TYPE_NODE||e.nodeType===W.ELEMENT_NODE||e.nodeType===W.PROCESSING_INSTRUCTION_NODE||e.nodeType===W.TEXT_NODE)}h(Ma,"hasInsertableNodeType");function Ve(e){return e&&e.nodeType===W.DOCUMENT_TYPE_NODE}h(Ve,"isDocTypeNode");function Fe(e){return e&&e.nodeType===W.ELEMENT_NODE}h(Fe,"isElementNode");function Ni(e){return e&&e.nodeType===W.TEXT_NODE}h(Ni,"isTextNode");function ci(e,t){var n=e.childNodes||[];if(Pe(n,Fe)||Ve(t))return false;var r=Pe(n,Ve);return !(t&&r&&n.indexOf(r)>n.indexOf(t))}h(ci,"isElementInsertionPossible");function fi(e,t){var n=e.childNodes||[];function r(i){return Fe(i)&&i!==t}if(h(r,"hasElementChildThatIsNotChild"),Pe(n,r))return false;var s=Pe(n,Ve);return !(t&&s&&n.indexOf(s)>n.indexOf(t))}h(fi,"isElementReplacementPossible");function Ra(e,t,n){if(!ka(e))throw new I(I.HIERARCHY_REQUEST_ERR,"Unexpected parent node type "+e.nodeType);if(n&&n.parentNode!==e)throw new I(I.NOT_FOUND_ERR,"child not in parent");if(!Ma(t)||Ve(t)&&e.nodeType!==W.DOCUMENT_NODE)throw new I(I.HIERARCHY_REQUEST_ERR,"Unexpected node type "+t.nodeType+" for parent node type "+e.nodeType)}h(Ra,"assertPreInsertionValidity1to5");function Ba(e,t,n){var r=e.childNodes||[],s=t.childNodes||[];if(t.nodeType===W.DOCUMENT_FRAGMENT_NODE){var i=s.filter(Fe);if(i.length>1||Pe(s,Ni))throw new I(I.HIERARCHY_REQUEST_ERR,"More than one element or text in fragment");if(i.length===1&&!ci(e,n))throw new I(I.HIERARCHY_REQUEST_ERR,"Element in fragment can not be inserted before doctype")}if(Fe(t)&&!ci(e,n))throw new I(I.HIERARCHY_REQUEST_ERR,"Only one element can be added and only after doctype");if(Ve(t)){if(Pe(r,Ve))throw new I(I.HIERARCHY_REQUEST_ERR,"Only one doctype is allowed");var o=Pe(r,Fe);if(n&&r.indexOf(o)<r.indexOf(n))throw new I(I.HIERARCHY_REQUEST_ERR,"Doctype can only be inserted before an element");if(!n&&o)throw new I(I.HIERARCHY_REQUEST_ERR,"Doctype can not be appended since element is present")}}h(Ba,"assertPreInsertionValidityInDocument");function Ci(e,t,n){var r=e.childNodes||[],s=t.childNodes||[];if(t.nodeType===W.DOCUMENT_FRAGMENT_NODE){var i=s.filter(Fe);if(i.length>1||Pe(s,Ni))throw new I(I.HIERARCHY_REQUEST_ERR,"More than one element or text in fragment");if(i.length===1&&!fi(e,n))throw new I(I.HIERARCHY_REQUEST_ERR,"Element in fragment can not be inserted before doctype")}if(Fe(t)&&!fi(e,n))throw new I(I.HIERARCHY_REQUEST_ERR,"Only one element can be added and only after doctype");if(Ve(t)){let u=function(l){return Ve(l)&&l!==n};if(h(u,"hasDoctypeChildThatIsNotChild"),Pe(r,u))throw new I(I.HIERARCHY_REQUEST_ERR,"Only one doctype is allowed");var o=Pe(r,Fe);if(n&&r.indexOf(o)<r.indexOf(n))throw new I(I.HIERARCHY_REQUEST_ERR,"Doctype can only be inserted before an element")}}h(Ci,"assertPreReplacementValidityInDocument");function mn(e,t,n,r){Ra(e,t,n),e.nodeType===W.DOCUMENT_NODE&&(r||Ba)(e,t,n);var s=t.parentNode;if(s&&s.removeChild(t),t.nodeType===He){var i=t.firstChild;if(i==null)return t;var o=t.lastChild;}else i=o=t;var u=n?n.previousSibling:e.lastChild;i.previousSibling=u,o.nextSibling=n,u?u.nextSibling=i:e.firstChild=i,n==null?e.lastChild=o:n.previousSibling=o;do i.parentNode=e;while(i!==o&&(i=i.nextSibling));return yi(e.ownerDocument||e,e,t),t.nodeType==He&&(t.firstChild=t.lastChild=null),t}h(mn,"_insertBefore");Le.prototype={implementation:null,nodeName:"#document",nodeType:dt,doctype:null,documentElement:null,_inc:1,insertBefore:h(function(e,t){if(e.nodeType===He){for(var n=e.firstChild;n;){var r=n.nextSibling;this.insertBefore(n,t),n=r;}return e}return mn(this,e,t),e.ownerDocument=this,this.documentElement===null&&e.nodeType===be&&(this.documentElement=e),e},"insertBefore"),removeChild:h(function(e){var t=bi(this,e);return t===this.documentElement&&(this.documentElement=null),t},"removeChild"),replaceChild:h(function(e,t){mn(this,e,t,Ci),e.ownerDocument=this,t&&this.removeChild(t),Fe(e)&&(this.documentElement=e);},"replaceChild"),importNode:h(function(e,t){return Fa(this,e,t)},"importNode"),getElementById:h(function(e){var t=null;return pn(this.documentElement,function(n){if(n.nodeType==be&&n.getAttribute("id")==e)return t=n,true}),t},"getElementById"),createElement:h(function(e){var t=new $e(pe);t.ownerDocument=this,this.type==="html"&&(e=e.toLowerCase()),Da(this.contentType)&&(t.namespaceURI=ke.HTML),t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new oe;var n=t.attributes=new _t;return n._ownerElement=t,t},"createElement"),createDocumentFragment:h(function(){var e=new Et(pe);return e.ownerDocument=this,e.childNodes=new oe,e},"createDocumentFragment"),createTextNode:h(function(e){var t=new Yt(pe);return t.ownerDocument=this,t.childNodes=new oe,t.appendData(e),t},"createTextNode"),createComment:h(function(e){var t=new _n(pe);return t.ownerDocument=this,t.childNodes=new oe,t.appendData(e),t},"createComment"),createCDATASection:h(function(e){if(e.indexOf("]]>")!==-1)throw new I(I.INVALID_CHARACTER_ERR,'data contains "]]>"');var t=new vn(pe);return t.ownerDocument=this,t.childNodes=new oe,t.appendData(e),t},"createCDATASection"),createProcessingInstruction:h(function(e,t){var n=new Dn(pe);return n.ownerDocument=this,n.childNodes=new oe,n.nodeName=n.target=e,n.nodeValue=n.data=t,n},"createProcessingInstruction"),createAttribute:h(function(e){if(!ce.QName_exact.test(e))throw new I(I.INVALID_CHARACTER_ERR,'invalid character in name "'+e+'"');return this.type==="html"&&(e=e.toLowerCase()),this._createAttribute(e)},"createAttribute"),_createAttribute:h(function(e){var t=new tt(pe);return t.ownerDocument=this,t.childNodes=new oe,t.name=e,t.nodeName=e,t.localName=e,t.specified=true,t},"_createAttribute"),createEntityReference:h(function(e){if(!ce.Name.test(e))throw new I(I.INVALID_CHARACTER_ERR,'not a valid xml name "'+e+'"');if(this.type==="html")throw new I("document is an html document",ye.NotSupportedError);var t=new En(pe);return t.ownerDocument=this,t.childNodes=new oe,t.nodeName=e,t},"createEntityReference"),createElementNS:h(function(e,t){var n=ar(e,t),r=new $e(pe),s=r.attributes=new _t;return r.childNodes=new oe,r.ownerDocument=this,r.nodeName=t,r.tagName=t,r.namespaceURI=n[0],r.prefix=n[1],r.localName=n[2],s._ownerElement=r,r},"createElementNS"),createAttributeNS:h(function(e,t){var n=ar(e,t),r=new tt(pe);return r.ownerDocument=this,r.childNodes=new oe,r.nodeName=t,r.name=t,r.specified=true,r.namespaceURI=n[0],r.prefix=n[1],r.localName=n[2],r},"createAttributeNS")};me(Le,W);function $e(e){de(e),this._nsMap=Object.create(null);}h($e,"Element");$e.prototype={nodeType:be,attributes:null,getQualifiedName:h(function(){return this.prefix?this.prefix+":"+this.localName:this.localName},"getQualifiedName"),_isInHTMLDocumentAndNamespace:h(function(){return this.ownerDocument.type==="html"&&this.namespaceURI===ke.HTML},"_isInHTMLDocumentAndNamespace"),hasAttributes:h(function(){return !!(this.attributes&&this.attributes.length)},"hasAttributes"),hasAttribute:h(function(e){return !!this.getAttributeNode(e)},"hasAttribute"),getAttribute:h(function(e){var t=this.getAttributeNode(e);return t?t.value:null},"getAttribute"),getAttributeNode:h(function(e){return this._isInHTMLDocumentAndNamespace()&&(e=e.toLowerCase()),this.attributes.getNamedItem(e)},"getAttributeNode"),setAttribute:h(function(e,t){this._isInHTMLDocumentAndNamespace()&&(e=e.toLowerCase());var n=this.getAttributeNode(e);n?n.value=n.nodeValue=""+t:(n=this.ownerDocument._createAttribute(e),n.value=n.nodeValue=""+t,this.setAttributeNode(n));},"setAttribute"),removeAttribute:h(function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t);},"removeAttribute"),setAttributeNode:h(function(e){return this.attributes.setNamedItem(e)},"setAttributeNode"),setAttributeNodeNS:h(function(e){return this.attributes.setNamedItemNS(e)},"setAttributeNodeNS"),removeAttributeNode:h(function(e){return this.attributes.removeNamedItem(e.nodeName)},"removeAttributeNode"),removeAttributeNS:h(function(e,t){var n=this.getAttributeNodeNS(e,t);n&&this.removeAttributeNode(n);},"removeAttributeNS"),hasAttributeNS:h(function(e,t){return this.getAttributeNodeNS(e,t)!=null},"hasAttributeNS"),getAttributeNS:h(function(e,t){var n=this.getAttributeNodeNS(e,t);return n?n.value:null},"getAttributeNS"),setAttributeNS:h(function(e,t,n){var r=ar(e,t),s=r[2],i=this.getAttributeNodeNS(e,s);i?i.value=i.nodeValue=""+n:(i=this.ownerDocument.createAttributeNS(e,t),i.value=i.nodeValue=""+n,this.setAttributeNode(i));},"setAttributeNS"),getAttributeNodeNS:h(function(e,t){return this.attributes.getNamedItemNS(e,t)},"getAttributeNodeNS"),getElementsByClassName:h(function(e){var t=ai(e);return new Oe(this,function(n){var r=[];return t.length>0&&pn(n,function(s){if(s!==n&&s.nodeType===be){var i=s.getAttribute("class");if(i){var o=e===i;if(!o){var u=ai(i);o=t.every(xa(u));}o&&r.push(s);}}}),r})},"getElementsByClassName"),getElementsByTagName:h(function(e){var t=(this.nodeType===dt?this:this.ownerDocument).type==="html",n=e.toLowerCase();return new Oe(this,function(r){var s=[];return pn(r,function(i){if(!(i===r||i.nodeType!==be))if(e==="*")s.push(i);else {var o=i.getQualifiedName(),u=t&&i.namespaceURI===ke.HTML?n:e;o===u&&s.push(i);}}),s})},"getElementsByTagName"),getElementsByTagNameNS:h(function(e,t){return new Oe(this,function(n){var r=[];return pn(n,function(s){s!==n&&s.nodeType===be&&(e==="*"||s.namespaceURI===e)&&(t==="*"||s.localName==t)&&r.push(s);}),r})},"getElementsByTagNameNS")};Le.prototype.getElementsByClassName=$e.prototype.getElementsByClassName;Le.prototype.getElementsByTagName=$e.prototype.getElementsByTagName;Le.prototype.getElementsByTagNameNS=$e.prototype.getElementsByTagNameNS;me($e,W);function tt(e){de(e),this.namespaceURI=null,this.prefix=null,this.ownerElement=null;}h(tt,"Attr");tt.prototype.nodeType=gt;me(tt,W);function wt(e){de(e);}h(wt,"CharacterData");wt.prototype={data:"",substringData:h(function(e,t){return this.data.substring(e,e+t)},"substringData"),appendData:h(function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length;},"appendData"),insertData:h(function(e,t){this.replaceData(e,0,t);},"insertData"),deleteData:h(function(e,t){this.replaceData(e,t,"");},"deleteData"),replaceData:h(function(e,t,n){var r=this.data.substring(0,e),s=this.data.substring(e+t);n=r+n+s,this.nodeValue=this.data=n,this.length=n.length;},"replaceData")};me(wt,W);function Yt(e){de(e);}h(Yt,"Text");Yt.prototype={nodeName:"#text",nodeType:dn,splitText:h(function(e){var t=this.data,n=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var r=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r},"splitText")};me(Yt,wt);function _n(e){de(e);}h(_n,"Comment");_n.prototype={nodeName:"#comment",nodeType:lr};me(_n,wt);function vn(e){de(e);}h(vn,"CDATASection");vn.prototype={nodeName:"#cdata-section",nodeType:mi};me(vn,Yt);function wn(e){de(e);}h(wn,"DocumentType");wn.prototype.nodeType=_i;me(wn,W);function cr(e){de(e);}h(cr,"Notation");cr.prototype.nodeType=Sa;me(cr,W);function fr(e){de(e);}h(fr,"Entity");fr.prototype.nodeType=Ia;me(fr,W);function En(e){de(e);}h(En,"EntityReference");En.prototype.nodeType=gi;me(En,W);function Et(e){de(e);}h(Et,"DocumentFragment");Et.prototype.nodeName="#document-fragment";Et.prototype.nodeType=He;me(Et,W);function Dn(e){de(e);}h(Dn,"ProcessingInstruction");Dn.prototype.nodeType=ur;me(Dn,wt);function Ti(){}h(Ti,"XMLSerializer");Ti.prototype.serializeToString=function(e,t){return xi.call(e,t)};W.prototype.toString=xi;function xi(e){var t;typeof e=="function"?t={requireWellFormed:false,splitCDATASections:true,nodeFilter:e}:e!=null?t={requireWellFormed:!!e.requireWellFormed,splitCDATASections:e.splitCDATASections!==false,nodeFilter:e.nodeFilter||null}:t={requireWellFormed:false,splitCDATASections:true,nodeFilter:null};var n=[],r=this.nodeType===dt&&this.documentElement||this,s=r.prefix,i=r.namespaceURI;if(i&&s==null){var s=r.lookupPrefix(i);if(s==null)var o=[{namespace:i,prefix:null}];}return hr(this,n,o,t),n.join("")}h(xi,"nodeSerializeToString");function hi(e,t,n){var r=e.prefix||"",s=e.namespaceURI;if(!s||r==="xml"&&s===ke.XML||s===ke.XMLNS)return false;for(var i=n.length;i--;){var o=n[i];if(o.prefix===r)return o.namespace!==s}return true}h(hi,"needNamespaceDefine");function hn(e,t,n){e.push(" ",t,'="',n.replace(/[<>&"\t\n\r]/g,Di),'"');}h(hn,"addSerializedAttribute");function hr(e,t,n,r){n||(n=[]);var s=r.nodeFilter,i=r.requireWellFormed,o=r.splitCDATASections,u=e.nodeType===dt?e:e.ownerDocument,l=u.type==="html";fe(e,{ns:n},{enter:h(function(a,c){var f=c.ns;if(s)if(a=s(a),a){if(typeof a=="string")return t.push(a),null}else return null;switch(a.nodeType){case be:var p=a.attributes,d=p.length,g=a.tagName,m=g;if(!l&&!a.prefix&&a.namespaceURI){for(var b,D=0;D<p.length;D++)if(p.item(D).name==="xmlns"){b=p.item(D).value;break}if(!b)for(var w=f.length-1;w>=0;w--){var v=f[w];if(v.prefix===""&&v.namespace===a.namespaceURI){b=v.namespace;break}}if(b!==a.namespaceURI)for(var w=f.length-1;w>=0;w--){var v=f[w];if(v.namespace===a.namespaceURI){v.prefix&&(m=v.prefix+":"+g);break}}}t.push("<",m);for(var _=f.slice(),A=0;A<d;A++){var E=p.item(A);E.prefix=="xmlns"?_.push({prefix:E.localName,namespace:E.value}):E.nodeName=="xmlns"&&_.push({prefix:"",namespace:E.value});}for(var A=0;A<d;A++){var E=p.item(A);if(hi(E,l,_)){var y=E.prefix||"",N=E.namespaceURI;hn(t,y?"xmlns:"+y:"xmlns",N),_.push({prefix:y,namespace:N});}var C=s?s(E):E;C&&(typeof C=="string"?t.push(C):hn(t,C.name,C.value));}if(g===m&&hi(a,l,_)){var F=a.prefix||"",N=a.namespaceURI;hn(t,F?"xmlns:"+F:"xmlns",N),_.push({prefix:F,namespace:N});}var P=!a.firstChild;if(P&&(l||a.namespaceURI===ke.HTML)&&(P=ba(g)),P)return t.push("/>"),null;if(t.push(">"),l&&ya(g)){for(var R=a.firstChild;R;)R.data?t.push(R.data):hr(R,t,_.slice(),r),R=R.nextSibling;return t.push("</",m,">"),null}return {ns:_,tag:m};case dt:case He:if(i&&a.nodeType===dt&&a.documentElement==null)throw new I("The Document has no documentElement",ye.InvalidStateError);return {ns:f};case gt:return hn(t,a.name,a.value),null;case dn:if(i&&ce.InvalidChar.test(a.data))throw new I("The Text node data contains characters outside the XML Char production",ye.InvalidStateError);return t.push(a.data.replace(/[<&>]/g,Di)),null;case mi:if(i&&a.data.indexOf("]]>")!==-1)throw new I('The CDATASection data contains "]]>"',ye.InvalidStateError);return o?t.push(ce.CDATA_START,a.data.replace(/]]>/g,"]]]]><![CDATA[>"),ce.CDATA_END):t.push(ce.CDATA_START,a.data,ce.CDATA_END),null;case lr:if(i){if(ce.InvalidChar.test(a.data))throw new I("The comment node data contains characters outside the XML Char production",ye.InvalidStateError);if(a.data.indexOf("--")!==-1||a.data[a.data.length-1]==="-")throw new I('The comment node data contains "--" or ends with "-"',ye.InvalidStateError)}return t.push(ce.COMMENT_START,a.data,ce.COMMENT_END),null;case _i:var j=a.publicId,O=a.systemId;if(i){if(j&&!ce.PubidLiteral_match.test(j))throw new I("DocumentType publicId is not a valid PubidLiteral",ye.InvalidStateError);if(O&&O!=="."&&!ce.SystemLiteral_match.test(O))throw new I("DocumentType systemId is not a valid SystemLiteral",ye.InvalidStateError);if(a.internalSubset&&a.internalSubset.indexOf("]>")!==-1)throw new I('DocumentType internalSubset contains "]>"',ye.InvalidStateError)}return t.push(ce.DOCTYPE_DECL_START," ",a.name),j?(t.push(" ",ce.PUBLIC," ",j),O&&O!=="."&&t.push(" ",O)):O&&O!=="."&&t.push(" ",ce.SYSTEM," ",O),a.internalSubset&&t.push(" [",a.internalSubset,"]"),t.push(">"),null;case ur:if(i){if(a.target.indexOf(":")!==-1||a.target.toLowerCase()==="xml")throw new I("The ProcessingInstruction target is not well-formed",ye.InvalidStateError);if(ce.InvalidChar.test(a.data))throw new I("The ProcessingInstruction data contains characters outside the XML Char production",ye.InvalidStateError);if(a.data.indexOf("?>")!==-1)throw new I('The ProcessingInstruction data contains "?>"',ye.InvalidStateError)}return t.push("<?",a.target," ",a.data,"?>"),null;case gi:return t.push("&",a.nodeName,";"),null;default:return t.push("??",a.nodeName),null}},"enter"),exit:h(function(a,c){c&&c.tag&&t.push("</",c.tag,">");},"exit")});}h(hr,"serializeToString");function Fa(e,t,n){var r;return fe(t,null,{enter:h(function(s,i){var o=s.cloneNode(false);o.ownerDocument=e,o.parentNode=null,i===null?r=o:i.appendChild(o);var u=s.nodeType===gt||n;return u?o:null},"enter")}),r}h(Fa,"importNode");function Ii(e,t,n){var r;return fe(t,null,{enter:h(function(s,i){var o=new s.constructor(pe);for(var u in s)if(mt(s,u)){var l=s[u];typeof l!="object"&&l!=o[u]&&(o[u]=l);}s.childNodes&&(o.childNodes=new oe),o.ownerDocument=e;var a=n;switch(o.nodeType){case be:var c=s.attributes,f=o.attributes=new _t,p=c.length;f._ownerElement=o;for(var d=0;d<p;d++)o.setAttributeNode(Ii(e,c.item(d),true));break;case gt:a=true;}return i!==null?i.appendChild(o):r=o,a?o:null},"enter")}),r}h(Ii,"cloneNode");function Si(e,t,n){e[t]=n;}h(Si,"__set__");function or(e){for(var t=[],n=e.firstChild;n;)n.nodeType===be&&t.push(n),n=n.nextSibling;return t}h(or,"childrenRefresh");try{Object.defineProperty&&(Object.defineProperty(Oe.prototype,"length",{get:h(function(){return gn(this),this.$$length},"get")}),Object.defineProperty(W.prototype,"textContent",{get:h(function(){if(this.nodeType===be||this.nodeType===He){var e=[];return fe(this,null,{enter:h(function(t){if(t.nodeType===be||t.nodeType===He)return !0;if(t.nodeType===ur||t.nodeType===lr)return null;e.push(t.nodeValue);},"enter")}),e.join("")}return this.nodeValue},"get"),set:h(function(e){switch(this.nodeType){case be:case He:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e;}},"set")}),Object.defineProperty($e.prototype,"children",{get:h(function(){return new Oe(this,or)},"get")}),Object.defineProperty(Le.prototype,"children",{get:h(function(){return new Oe(this,or)},"get")}),Object.defineProperty(Et.prototype,"children",{get:h(function(){return new Oe(this,or)},"get")}),Si=h(function(e,t,n){e["$$"+t]=n;},"__set__"));}catch{}re._updateLiveList=gn;re.Attr=tt;re.CDATASection=vn;re.CharacterData=wt;re.Comment=_n;re.Document=Le;re.DocumentFragment=Et;re.DocumentType=wn;re.DOMImplementation=Ei;re.Element=$e;re.Entity=fr;re.EntityReference=En;re.LiveNodeList=Oe;re.NamedNodeMap=_t;re.Node=W;re.NodeList=oe;re.Notation=cr;re.Text=Yt;re.ProcessingInstruction=Dn;re.walkDOM=fe;re.XMLSerializer=Ti;});var Pi=Me(Qt=>{var Oi=et().freeze;Qt.XML_ENTITIES=Oi({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'});Qt.HTML_ENTITIES=Oi({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"});Qt.entityMap=Qt.HTML_ENTITIES;});var ji=Me(yn=>{var bt=et(),$=sr(),Fi=zt(),La=bt.isHTMLEscapableRawTextElement,$a=bt.isHTMLMimeType,Ua=bt.isHTMLRawTextElement,en=bt.hasOwn,ki=bt.NAMESPACE,Mi=Fi.ParseError,qa=Fi.DOMException,Zt=0,Ge=1,Dt=2,Jt=3,At=4,yt=5,Kt=6,An=7;function Li(){}h(Li,"XMLReader");Li.prototype={parse:h(function(e,t,n){var r=this.domBuilder;r.startDocument(),$i(t,t=Object.create(null)),za(e,t,n,r,this.errorHandler),r.endDocument();},"parse")};var dr=/&#?\w+;?/g;function za(e,t,n,r,s){var i=$a(r.mimeType);e.indexOf($.UNICODE_REPLACEMENT_CHARACTER)>=0&&s.warning("Unicode replacement character detected, source encoding issues?");function o(S){if(S>65535){S-=65536;var J=55296+(S>>10),ie=56320+(S&1023);return String.fromCharCode(J,ie)}else return String.fromCharCode(S)}h(o,"fixedFromCharCode");function u(S){var J=S[S.length-1]===";"?S:S+";";if(!i&&J!==S)return s.error("EntityRef: expecting ;"),S;var ie=$.Reference.exec(J);if(!ie||ie[0].length!==J.length)return s.error("entity not matching Reference production: "+S),S;var se=J.slice(1,-1);return en(n,se)?n[se]:se.charAt(0)==="#"?o(parseInt(se.substring(1).replace("x","0x"))):(s.error("entity not found:"+S),S)}h(u,"entityReplacer");function l(S){if(S>b){var J=e.substring(b,S).replace(dr,u);p&&d(b),r.characters(J,0,S-b),b=S;}}h(l,"appendText");var a=0,c=0,f=/\r\n?|\n|$/g,p=r.locator;function d(S,J){for(;S>=c&&(J=f.exec(e));)a=c,c=J.index+J[0].length,p.lineNumber++;p.columnNumber=S-a+1;}h(d,"position");for(var g=[{currentNSMap:t}],m=[],b=0;;){try{var D=e.indexOf("<",b);if(D<0){if(!i&&m.length>0)return s.fatalError("unclosed xml tag(s): "+m.join(", "));if(!e.substring(b).match(/^\s*$/)){var w=r.doc,v=w.createTextNode(e.substring(b));if(w.documentElement)return s.error("Extra content at the end of the document");w.appendChild(v),r.currentElement=v;}return}if(D>b){var _=e.substring(b,D);!i&&m.length===0&&(_=_.replace(new RegExp($.S_OPT.source,"g"),""),_&&s.error("Unexpected content outside root element: '"+_+"'")),l(D);}switch(e.charAt(D+1)){case "/":var O=e.indexOf(">",D+2),A=e.substring(D+2,O>0?O:void 0);if(!A)return s.fatalError("end tag name missing");var E=O>0&&$.reg("^",$.QName_group,$.S_OPT,"$").exec(A);if(!E)return s.fatalError('end tag name contains invalid characters: "'+A+'"');if(!r.currentElement&&!r.doc.documentElement)return;var y=m[m.length-1]||r.currentElement.tagName||r.doc.documentElement.tagName||"";if(y!==E[1]){var N=E[1].toLowerCase();if(!i||y.toLowerCase()!==N)return s.fatalError('Opening and ending tag mismatch: "'+y+'" != "'+A+'"')}var C=g.pop();m.pop();var F=C.localNSMap;if(r.endElement(C.uri,C.localName,y),F)for(var P in F)en(F,P)&&r.endPrefixMapping(P);O++;break;case "?":p&&d(D),O=Va(e,D,r,s);break;case "!":p&&d(D),O=qi(e,D,r,s,i);break;default:p&&d(D);var R=new zi,j=g[g.length-1].currentNSMap,O=ja(e,D,R,j,u,s,i),G=R.length;if(R.closed||(i&&bt.isHTMLVoidElement(R.tagName)?R.closed=!0:m.push(R.tagName)),p&&G){for(var z=Ri(p,{}),L=0;L<G;L++){var Y=R[L];d(Y.offset),Y.locator=Ri(p,{});}r.locator=z,Bi(R,r,j)&&g.push(R),r.locator=p;}else Bi(R,r,j)&&g.push(R);i&&!R.closed?O=Wa(e,O,R.tagName,u,r):O++;}}catch(S){if(S instanceof Mi)throw S;if(S instanceof qa)throw new Mi(S.name+": "+S.message,r.locator,S);s.error("element parse error: "+S),O=-1;}O>b?b=O:l(Math.max(D,b)+1);}}h(za,"parse");function Ri(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}h(Ri,"copyLocator");function ja(e,t,n,r,s,i,o){function u(d,g,m){if(en(n.attributeNames,d))return i.fatalError("Attribute "+d+" redefined");if(!o&&g.indexOf("<")>=0)return i.fatalError("Unescaped '<' not allowed in attributes values");n.addValue(d,g.replace(/[\t\n\r]/g," ").replace(dr,s),m);}h(u,"addAttribute");for(var l,a,c=++t,f=Zt;;){var p=e.charAt(c);switch(p){case "=":if(f===Ge)l=e.slice(t,c),f=Jt;else if(f===Dt)f=Jt;else throw new Error("attribute equal must after attrName");break;case "'":case '"':if(f===Jt||f===Ge)if(f===Ge&&(i.warning('attribute value must after "="'),l=e.slice(t,c)),t=c+1,c=e.indexOf(p,t),c>0)a=e.slice(t,c),u(l,a,t-1),f=yt;else throw new Error("attribute value no end '"+p+"' match");else if(f==At)a=e.slice(t,c),u(l,a,t),i.warning('attribute "'+l+'" missed start quot('+p+")!!"),t=c+1,f=yt;else throw new Error('attribute value must after "="');break;case "/":switch(f){case Zt:n.setTagName(e.slice(t,c));case yt:case Kt:case An:f=An,n.closed=true;case At:case Ge:break;case Dt:n.closed=true;break;default:throw new Error("attribute invalid close char('/')")}break;case "":return i.error("unexpected end of input"),f==Zt&&n.setTagName(e.slice(t,c)),c;case ">":switch(f){case Zt:n.setTagName(e.slice(t,c));case yt:case Kt:case An:break;case At:case Ge:a=e.slice(t,c),a.slice(-1)==="/"&&(n.closed=true,a=a.slice(0,-1));case Dt:f===Dt&&(a=l),f==At?(i.warning('attribute "'+a+'" missed quot(")!'),u(l,a,t)):(o||i.warning('attribute "'+a+'" missed value!! "'+a+'" instead!!'),u(a,a,t));break;case Jt:if(!o)return i.fatalError(`AttValue: ' or " expected`)}return c;case "\x80":p=" ";default:if(p<=" ")switch(f){case Zt:n.setTagName(e.slice(t,c)),f=Kt;break;case Ge:l=e.slice(t,c),f=Dt;break;case At:var a=e.slice(t,c);i.warning('attribute "'+a+'" missed quot(")!!'),u(l,a,t);case yt:f=Kt;break}else switch(f){case Dt:o||i.warning('attribute "'+l+'" missed value!! "'+l+'" instead2!!'),u(l,l,t),t=c,f=Ge;break;case yt:i.warning('attribute space is required"'+l+'"!!');case Kt:f=Ge,t=c;break;case Jt:f=At,t=c;break;case An:throw new Error("elements closed character '/' and '>' must be connected to")}}c++;}}h(ja,"parseElementStartPart");function Bi(e,t,n){for(var r=e.tagName,s=null,f=e.length;f--;){var i=e[f],o=i.qName,u=i.value,p=o.indexOf(":");if(p>0)var l=i.prefix=o.slice(0,p),a=o.slice(p+1),c=l==="xmlns"&&a;else a=o,l=null,c=o==="xmlns"&&"";i.localName=a,c!==false&&(s==null&&(s=Object.create(null),$i(n,n=Object.create(null))),n[c]=s[c]=u,i.uri=ki.XMLNS,t.startPrefixMapping(c,u));}for(var f=e.length;f--;)i=e[f],i.prefix&&(i.prefix==="xml"&&(i.uri=ki.XML),i.prefix!=="xmlns"&&(i.uri=n[i.prefix]));var p=r.indexOf(":");p>0?(l=e.prefix=r.slice(0,p),a=e.localName=r.slice(p+1)):(l=null,a=e.localName=r);var d=e.uri=n[l||""];if(t.startElement(d,a,r,e),e.closed){if(t.endElement(d,a,r),s)for(l in s)en(s,l)&&t.endPrefixMapping(l);}else return e.currentNSMap=n,e.localNSMap=s,true}h(Bi,"appendElement");function Wa(e,t,n,r,s){var i=La(n);if(i||Ua(n)){var o=e.indexOf("</"+n+">",t),u=e.substring(t+1,o);return i&&(u=u.replace(dr,r)),s.characters(u,0,u.length),o}return t+1}h(Wa,"parseHtmlSpecialContent");function $i(e,t){for(var n in e)en(e,n)&&(t[n]=e[n]);}h($i,"_copy");function Ui(e,t){var n=t;function r(c){return c=c||0,e.charAt(n+c)}h(r,"char");function s(c){c=c||1,n+=c;}h(s,"skip");function i(){for(var c=0;n<e.length;){var f=r();if(f!==" "&&f!==`
3
- `&&f!==" "&&f!=="\r")return c;c++,s();}return -1}h(i,"skipBlanks");function o(){return e.substring(n)}h(o,"substringFromIndex");function u(c){return e.substring(n,n+c.length)===c}h(u,"substringStartsWith");function l(c){return e.substring(n,n+c.length).toUpperCase()===c.toUpperCase()}h(l,"substringStartsWithCaseInsensitive");function a(c){var f=$.reg("^",c),p=f.exec(o());return p?(s(p[0].length),p[0]):null}return h(a,"getMatch"),{char:r,getIndex:h(function(){return n},"getIndex"),getMatch:a,getSource:h(function(){return e},"getSource"),skip:s,skipBlanks:i,substringFromIndex:o,substringStartsWith:u,substringStartsWithCaseInsensitive:l}}h(Ui,"parseUtils");function Ha(e,t){function n(u,l){var a=$.PI.exec(u.substringFromIndex());return a?a[1].toLowerCase()==="xml"?l.fatalError("xml declaration is only allowed at the start of the document, but found at position "+u.getIndex()):(u.skip(a[0].length),a[0]):l.fatalError("processing instruction is not well-formed at position "+u.getIndex())}h(n,"parsePI");var r=e.getSource();if(e.char()==="["){e.skip(1);for(var s=e.getIndex();e.getIndex()<r.length;){if(e.skipBlanks(),e.char()==="]"){var i=r.substring(s,e.getIndex());return e.skip(1),i}var o=null;if(e.char()==="<"&&e.char(1)==="!")switch(e.char(2)){case "E":e.char(3)==="L"?o=e.getMatch($.elementdecl):e.char(3)==="N"&&(o=e.getMatch($.EntityDecl));break;case "A":o=e.getMatch($.AttlistDecl);break;case "N":o=e.getMatch($.NotationDecl);break;case "-":o=e.getMatch($.Comment);break}else if(e.char()==="<"&&e.char(1)==="?")o=n(e,t);else if(e.char()==="%")o=e.getMatch($.PEReference);else return t.fatalError("Error detected in Markup declaration");if(!o)return t.fatalError("Error in internal subset at position "+e.getIndex())}return t.fatalError("doctype internal subset is not well-formed, missing ]")}}h(Ha,"parseDoctypeInternalSubset");function qi(e,t,n,r,s){var i=Ui(e,t);switch(s?i.char(2).toUpperCase():i.char(2)){case "-":var o=i.getMatch($.Comment);return o?(n.comment(o,$.COMMENT_START.length,o.length-$.COMMENT_START.length-$.COMMENT_END.length),i.getIndex()):r.fatalError("comment is not well-formed at position "+i.getIndex());case "[":var u=i.getMatch($.CDSect);return u?!s&&!n.currentElement?r.fatalError("CDATA outside of element"):(n.startCDATA(),n.characters(u,$.CDATA_START.length,u.length-$.CDATA_START.length-$.CDATA_END.length),n.endCDATA(),i.getIndex()):r.fatalError("Invalid CDATA starting at position "+t);case "D":{if(n.doc&&n.doc.documentElement)return r.fatalError("Doctype not allowed inside or after documentElement at position "+i.getIndex());if(s?!i.substringStartsWithCaseInsensitive($.DOCTYPE_DECL_START):!i.substringStartsWith($.DOCTYPE_DECL_START))return r.fatalError("Expected "+$.DOCTYPE_DECL_START+" at position "+i.getIndex());if(i.skip($.DOCTYPE_DECL_START.length),i.skipBlanks()<1)return r.fatalError("Expected whitespace after "+$.DOCTYPE_DECL_START+" at position "+i.getIndex());var l={name:void 0,publicId:void 0,systemId:void 0,internalSubset:void 0};if(l.name=i.getMatch($.Name),!l.name)return r.fatalError("doctype name missing or contains unexpected characters at position "+i.getIndex());if(s&&l.name.toLowerCase()!=="html"&&r.warning("Unexpected DOCTYPE in HTML document at position "+i.getIndex()),i.skipBlanks(),i.substringStartsWith($.PUBLIC)||i.substringStartsWith($.SYSTEM)){var a=$.ExternalID_match.exec(i.substringFromIndex());if(!a)return r.fatalError("doctype external id is not well-formed at position "+i.getIndex());a.groups.SystemLiteralOnly!==void 0?l.systemId=a.groups.SystemLiteralOnly:(l.systemId=a.groups.SystemLiteral,l.publicId=a.groups.PubidLiteral),i.skip(a[0].length);}else if(s&&i.substringStartsWithCaseInsensitive($.SYSTEM)){if(i.skip($.SYSTEM.length),i.skipBlanks()<1)return r.fatalError("Expected whitespace after "+$.SYSTEM+" at position "+i.getIndex());if(l.systemId=i.getMatch($.ABOUT_LEGACY_COMPAT_SystemLiteral),!l.systemId)return r.fatalError("Expected "+$.ABOUT_LEGACY_COMPAT+" in single or double quotes after "+$.SYSTEM+" at position "+i.getIndex())}return s&&l.systemId&&!$.ABOUT_LEGACY_COMPAT_SystemLiteral.test(l.systemId)&&r.warning("Unexpected doctype.systemId in HTML document at position "+i.getIndex()),s||(i.skipBlanks(),l.internalSubset=Ha(i,r)),i.skipBlanks(),i.char()!==">"?r.fatalError("doctype not terminated with > at position "+i.getIndex()):(i.skip(1),n.startDTD(l.name,l.publicId,l.systemId,l.internalSubset),n.endDTD(),i.getIndex())}default:return r.fatalError('Not well-formed XML starting with "<!" at position '+t)}}h(qi,"parseDoctypeCommentOrCData");function Va(e,t,n,r){var s=e.substring(t).match($.PI);if(!s)return r.fatalError("Invalid processing instruction starting at position "+t);if(s[1].toLowerCase()==="xml"){if(t>0)return r.fatalError("processing instruction at position "+t+" is an xml declaration which is only at the start of the document");if(!$.XMLDecl.test(e.substring(t)))return r.fatalError("xml declaration is not well-formed")}return n.processingInstruction(s[1],s[2]),t+s[0].length}h(Va,"parseProcessingInstruction");function zi(){this.attributeNames=Object.create(null);}h(zi,"ElementAttributes");zi.prototype={setTagName:h(function(e){if(!$.QName_exact.test(e))throw new Error("invalid tagName:"+e);this.tagName=e;},"setTagName"),addValue:h(function(e,t,n){if(!$.QName_exact.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:n};},"addValue"),length:0,getLocalName:h(function(e){return this[e].localName},"getLocalName"),getLocator:h(function(e){return this[e].locator},"getLocator"),getQName:h(function(e){return this[e].qName},"getQName"),getURI:h(function(e){return this[e].uri},"getURI"),getValue:h(function(e){return this[e].value},"getValue")};yn.XMLReader=Li;yn.parseUtils=Ui;yn.parseDoctypeCommentOrCData=qi;});var Qi=Me(Ct=>{var nt=et(),Ga=pr(),Xa=zt(),Wi=Pi(),Ya=ji(),Qa=Ga.DOMImplementation,Za=nt.hasDefaultHTMLNamespace,Ja=nt.isHTMLMimeType,Ka=nt.isValidMimeType,Gi=nt.MIME_TYPE,mr=nt.NAMESPACE,Hi=Xa.ParseError,eu=Ya.XMLReader;function Xi(e){return e.replace(/\r[\n\u0085]/g,`
1
+ 'use strict';var n8nWorkflow=require('n8n-workflow');var $s=Object.create;var Ln=Object.defineProperty;var Us=Object.getOwnPropertyDescriptor;var qs=Object.getOwnPropertyNames;var zs=Object.getPrototypeOf,js=Object.prototype.hasOwnProperty;var h=(e,t)=>Ln(e,"name",{value:t,configurable:true});var Ie=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Ws=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of qs(t))!js.call(e,s)&&s!==n&&Ln(e,s,{get:()=>t[s],enumerable:!(r=Us(t,s))||r.enumerable});return e};var $n=(e,t,n)=>(n=e!=null?$s(zs(e)):{},Ws(Ln(n,"default",{value:e,enumerable:true}),e));var Sr=Ie((yl,Ir)=>{Ir.exports={createRequire:h(function(){return function(){return {}}},"createRequire")};});var et=Ie(le=>{function mo(e,t,n){if(n===void 0&&(n=Array.prototype),e&&typeof n.find=="function")return n.find.call(e,t);for(var r=0;r<e.length;r++)if(Ke(e,r)){var s=e[r];if(t.call(void 0,s,r,e))return s}}h(mo,"find");function ct(e,t){return t===void 0&&(t=Object),t&&typeof t.getOwnPropertyDescriptors=="function"&&(e=t.create(null,t.getOwnPropertyDescriptors(e))),t&&typeof t.freeze=="function"?t.freeze(e):e}h(ct,"freeze");function Ke(e,t){return Object.prototype.hasOwnProperty.call(e,t)}h(Ke,"hasOwn");function go(e,t){if(e===null||typeof e!="object")throw new TypeError("target is not an object");for(var n in t)Ke(t,n)&&(e[n]=t[n]);return e}h(go,"assign");var Vr=ct({allowfullscreen:true,async:true,autofocus:true,autoplay:true,checked:true,controls:true,default:true,defer:true,disabled:true,formnovalidate:true,hidden:true,ismap:true,itemscope:true,loop:true,multiple:true,muted:true,nomodule:true,novalidate:true,open:true,playsinline:true,readonly:true,required:true,reversed:true,selected:true});function _o(e){return Ke(Vr,e.toLowerCase())}h(_o,"isHTMLBooleanAttribute");var Gr=ct({area:true,base:true,br:true,col:true,embed:true,hr:true,img:true,input:true,link:true,meta:true,param:true,source:true,track:true,wbr:true});function vo(e){return Ke(Gr,e.toLowerCase())}h(vo,"isHTMLVoidElement");var Bt=ct({script:false,style:false,textarea:true,title:true});function wo(e){var t=e.toLowerCase();return Ke(Bt,t)&&!Bt[t]}h(wo,"isHTMLRawTextElement");function Eo(e){var t=e.toLowerCase();return Ke(Bt,t)&&Bt[t]}h(Eo,"isHTMLEscapableRawTextElement");function Xr(e){return e===Ft.HTML}h(Xr,"isHTMLMimeType");function Do(e){return Xr(e)||e===Ft.XML_XHTML_APPLICATION}h(Do,"hasDefaultHTMLNamespace");var Ft=ct({HTML:"text/html",XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),Ao=Object.keys(Ft).map(function(e){return Ft[e]});function yo(e){return Ao.indexOf(e)>-1}h(yo,"isValidMimeType");var bo=ct({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/"});le.assign=go;le.find=mo;le.freeze=ct;le.HTML_BOOLEAN_ATTRIBUTES=Vr;le.HTML_RAW_TEXT_ELEMENTS=Bt;le.HTML_VOID_ELEMENTS=Gr;le.hasDefaultHTMLNamespace=Do;le.hasOwn=Ke;le.isHTMLBooleanAttribute=_o;le.isHTMLRawTextElement=wo;le.isHTMLEscapableRawTextElement=Eo;le.isHTMLMimeType=Xr;le.isHTMLVoidElement=vo;le.isValidMimeType=yo;le.MIME_TYPE=Ft;le.NAMESPACE=bo;});var zt=Ie(qt=>{var No=et();function Qr(e,t){e.prototype=Object.create(Error.prototype,{constructor:{value:e},name:{value:e.name,enumerable:true,writable:t}});}h(Qr,"extendError");var $t=No.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"}),Zr=Object.keys($t);function Jr(e){return typeof e=="number"&&e>=1&&e<=25}h(Jr,"isValidDomExceptionCode");function Co(e){return typeof e=="string"&&e.substring(e.length-$t.Error.length)===$t.Error}h(Co,"endsWithError");function Ut(e,t){Jr(e)?(this.name=Zr[e],this.message=t||""):(this.message=e,this.name=Co(t)?t:$t.Error),Error.captureStackTrace&&Error.captureStackTrace(this,Ut);}h(Ut,"DOMException");Qr(Ut,true);Object.defineProperties(Ut.prototype,{code:{enumerable:true,get:h(function(){var e=Zr.indexOf(this.name);return Jr(e)?e:0},"get")}});var Kr={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},Jn=Object.entries(Kr);for(Lt=0;Lt<Jn.length;Lt++)Yr=Jn[Lt][0],Ut[Yr]=Jn[Lt][1];var Yr,Lt;function Kn(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,Kn);}h(Kn,"ParseError");Qr(Kn);qt.DOMException=Ut;qt.DOMExceptionName=$t;qt.ExceptionCode=Kr;qt.ParseError=Kn;});var or=Ie(B=>{function oi(e){try{typeof e!="function"&&(e=RegExp);var t=new e("\u{1D306}","u").exec("\u{1D306}");return !!t&&t[0].length===2}catch{}return false}h(oi,"detectUnicodeSupport");var pt=oi();function je(e){if(e.source[0]!=="[")throw new Error(e+" can not be used with chars");return e.source.slice(1,e.source.lastIndexOf("]"))}h(je,"chars");function ft(e,t){if(e.source[0]!=="[")throw new Error("/"+e.source+"/ can not be used with chars_without");if(!t||typeof t!="string")throw new Error(JSON.stringify(t)+" is not a valid search");if(e.source.indexOf(t)===-1)throw new Error('"'+t+'" is not is /'+e.source+"/");if(t==="-"&&e.source.indexOf(t)!==1)throw new Error('"'+t+'" is not at the first postion of /'+e.source+"/");return new RegExp(e.source.replace(t,""),pt?"u":"")}h(ft,"chars_without");function q(e){var t=this;return new RegExp(Array.prototype.slice.call(arguments).map(function(n){var r=typeof n=="string";if(r&&t===void 0&&n==="|")throw new Error("use regg instead of reg to wrap expressions with `|`!");return r?n:n.source}).join(""),pt?"mu":"m")}h(q,"reg");function M(e){if(arguments.length===0)throw new Error("no parameters provided");return q.apply(M,["(?:"].concat(Array.prototype.slice.call(arguments),[")"]))}h(M,"regg");var To="\uFFFD",We=/[-\x09\x0A\x0D\x20-\x2C\x2E-\uD7FF\uE000-\uFFFD]/;pt&&(We=q("[",je(We),"\\u{10000}-\\u{10FFFF}","]"));var xo=new RegExp("[^"+je(We)+"]",pt?"u":""),tr=/[\x20\x09\x0D\x0A]/,Io=je(tr),X=q(tr,"+"),K=q(tr,"*"),jt=/[:_a-zA-Z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;pt&&(jt=q("[",je(jt),"\\u{10000}-\\u{10FFFF}","]"));var So=je(jt),nr=q("[",So,je(/[-.0-9\xB7]/),je(/[\u0300-\u036F\u203F-\u2040]/),"]"),Ae=q(jt,nr,"*"),ei=q(nr,"+"),Oo=q("&",Ae,";"),Po=M(/&#[0-9]+;|&#x[0-9a-fA-F]+;/),Wt=M(Oo,"|",Po),Ht=q("%",Ae,";"),rr=M(q('"',M(/[^%&"]/,"|",Ht,"|",Wt),"*",'"'),"|",q("'",M(/[^%&']/,"|",Ht,"|",Wt),"*","'")),ko=M('"',M(/[^<&"]/,"|",Wt),"*",'"',"|","'",M(/[^<&']/,"|",Wt),"*","'"),Mo=ft(jt,":"),Ro=ft(nr,":"),ti=q(Mo,Ro,"*"),Vt=q(ti,M(":",ti),"?"),Bo=q("^",Vt,"$"),Fo=q("(",Vt,")"),ht=M(/"[^"]*"|'[^']*'/),Lo=q(/^<\?/,"(",Ae,")",M(X,"(",We,"*?)"),"?",/\?>/),ni=/[\x20\x0D\x0Aa-zA-Z0-9-'()+,./:=?;!*#@$_%]/,Gt=M('"',ni,'*"',"|","'",ft(ni,"'"),"*'"),ai="<!--",ui="-->",$o=q(ai,M(ft(We,"-"),"|",q("-",ft(We,"-"))),"*",ui),ri="#PCDATA",Uo=M(q(/\(/,K,ri,M(K,/\|/,K,Vt),"*",K,/\)\*/),"|",q(/\(/,K,ri,K,/\)/)),qo=/[?*+]?/,zo=q(/\([^>]+\)/,qo),jo=M("EMPTY","|","ANY","|",Uo,"|",zo),Wo="<!ELEMENT",Ho=q(Wo,X,M(Vt,"|",Ht),X,M(jo,"|",Ht),K,">"),Vo=q("NOTATION",X,/\(/,K,Ae,M(K,/\|/,K,Ae),"*",K,/\)/),Go=q(/\(/,K,ei,M(K,/\|/,K,ei),"*",K,/\)/),Xo=M(Vo,"|",Go),Yo=M(/CDATA|ID|IDREF|IDREFS|ENTITY|ENTITIES|NMTOKEN|NMTOKENS/,"|",Xo),Qo=M(/#REQUIRED|#IMPLIED/,"|",M(M("#FIXED",X),"?",ko)),Zo=M(X,Ae,X,Yo,X,Qo),Jo="<!ATTLIST",Ko=q(Jo,X,Ae,Zo,"*",K,">"),er="about:legacy-compat",ea=M('"'+er+'"',"|","'"+er+"'"),ir="SYSTEM",cn="PUBLIC",fn=M(M(ir,X,ht),"|",M(cn,X,Gt,X,ht)),ta=q("^",M(M(ir,X,"(?<SystemLiteralOnly>",ht,")"),"|",M(cn,X,"(?<PubidLiteral>",Gt,")",X,"(?<SystemLiteral>",ht,")"))),na=q("^",Gt,"$"),ra=q("^",ht,"$"),ia=M(X,"NDATA",X,Ae),sa=M(rr,"|",M(fn,ia,"?")),li="<!ENTITY",oa=q(li,X,Ae,X,sa,K,">"),aa=M(rr,"|",fn),ua=q(li,X,"%",X,Ae,X,aa,K,">"),la=M(oa,"|",ua),ca=q(cn,X,Gt),fa=q("<!NOTATION",X,Ae,X,M(fn,"|",ca),K,">"),sr=q(K,"=",K),ii=/1[.]\d+/,ha=q(X,"version",sr,M("'",ii,"'","|",'"',ii,'"')),si=/[A-Za-z][-A-Za-z0-9._]*/,pa=M(X,"encoding",sr,M('"',si,'"',"|","'",si,"'")),da=M(X,"standalone",sr,M("'",M("yes","|","no"),"'","|",'"',M("yes","|","no"),'"')),ma=q(/^<\?xml/,ha,pa,"?",da,"?",K,/\?>/),ga="<!DOCTYPE",_a="<![CDATA[",va="]]>",wa=/<!\[CDATA\[/,Ea=/\]\]>/,Da=q(We,"*?",Ea),Aa=q(wa,Da);B.chars=je;B.chars_without=ft;B.detectUnicodeSupport=oi;B.reg=q;B.regg=M;B.ABOUT_LEGACY_COMPAT=er;B.ABOUT_LEGACY_COMPAT_SystemLiteral=ea;B.AttlistDecl=Ko;B.CDATA_START=_a;B.CDATA_END=va;B.CDSect=Aa;B.Char=We;B.Comment=$o;B.COMMENT_START=ai;B.COMMENT_END=ui;B.DOCTYPE_DECL_START=ga;B.elementdecl=Ho;B.EntityDecl=la;B.EntityValue=rr;B.ExternalID=fn;B.ExternalID_match=ta;B.Name=Ae;B.NotationDecl=fa;B.Reference=Wt;B.PEReference=Ht;B.PI=Lo;B.PUBLIC=cn;B.PubidLiteral=Gt;B.PubidLiteral_match=na;B.QName=Vt;B.QName_exact=Bo;B.QName_group=Fo;B.S=X;B.SChar_s=Io;B.S_OPT=K;B.SYSTEM=ir;B.SystemLiteral=ht;B.SystemLiteral_match=ra;B.InvalidChar=xo;B.UNICODE_REPLACEMENT_CHARACTER=To;B.UNICODE_SUPPORT=pt;B.XMLDecl=ma;});var dr=Ie(re=>{var Ne=et(),ke=Ne.find,ya=Ne.hasDefaultHTMLNamespace,mt=Ne.hasOwn,ba=Ne.isHTMLMimeType,Na=Ne.isHTMLRawTextElement,Ca=Ne.isHTMLVoidElement,Xt=Ne.MIME_TYPE,Me=Ne.NAMESPACE,pe=Symbol(),gi=zt(),I=gi.DOMException,ye=gi.DOMExceptionName,ce=or();function de(e){if(e!==pe)throw new TypeError("Illegal constructor")}h(de,"checkSymbol");function Ta(e){return e!==""}h(Ta,"notEmptyString");function xa(e){return e?e.split(/[\t\n\f\r ]+/).filter(Ta):[]}h(xa,"splitOnASCIIWhitespace");function Ia(e,t){return mt(e,t)||(e[t]=true),e}h(Ia,"orderedSetReducer");function ci(e){if(!e)return [];var t=xa(e);return Object.keys(t.reduce(Ia,{}))}h(ci,"toOrderedSet");function Sa(e){return function(t){return e&&e.indexOf(t)!==-1}}h(Sa,"arrayIncludes");function _i(e){if(!ce.QName_exact.test(e))throw new I(I.INVALID_CHARACTER_ERR,'invalid character in qualified name "'+e+'"')}h(_i,"validateQualifiedName");function ur(e,t){_i(t),e=e||null;var n=null,r=t;if(t.indexOf(":")>=0){var s=t.split(":");n=s[0],r=s[1];}if(n!==null&&e===null)throw new I(I.NAMESPACE_ERR,"prefix is non-null and namespace is null");if(n==="xml"&&e!==Ne.NAMESPACE.XML)throw new I(I.NAMESPACE_ERR,'prefix is "xml" and namespace is not the XML namespace');if((n==="xmlns"||t==="xmlns")&&e!==Ne.NAMESPACE.XMLNS)throw new I(I.NAMESPACE_ERR,'either qualifiedName or prefix is "xmlns" and namespace is not the XMLNS namespace');if(e===Ne.NAMESPACE.XMLNS&&n!=="xmlns"&&t!=="xmlns")throw new I(I.NAMESPACE_ERR,'namespace is the XMLNS namespace and neither qualifiedName nor prefix is "xmlns"');return [e,n,r]}h(ur,"validateAndExtract");function vt(e,t){for(var n in e)mt(e,n)&&(t[n]=e[n]);}h(vt,"copy");function me(e,t){var n=e.prototype;if(!(n instanceof t)){let r=function(){};h(r,"t"),r.prototype=t.prototype,r=new r,vt(n,r),e.prototype=n=r;}n.constructor!=e&&(n.constructor=e);}h(me,"_extends");var ge={},be=ge.ELEMENT_NODE=1,gt=ge.ATTRIBUTE_NODE=2,dn=ge.TEXT_NODE=3,vi=ge.CDATA_SECTION_NODE=4,wi=ge.ENTITY_REFERENCE_NODE=5,Oa=ge.ENTITY_NODE=6,lr=ge.PROCESSING_INSTRUCTION_NODE=7,cr=ge.COMMENT_NODE=8,dt=ge.DOCUMENT_NODE=9,Ei=ge.DOCUMENT_TYPE_NODE=10,He=ge.DOCUMENT_FRAGMENT_NODE=11,Pa=ge.NOTATION_NODE=12,ne=Ne.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 Di(e,t){if(t.length<e.length)return Di(t,e);var n=null;for(var r in e){if(e[r]!==t[r])return n;n=e[r];}return n}h(Di,"commonAncestor");function fi(e){return e.guid||(e.guid=Math.random()),e.guid}h(fi,"docGUID");function oe(){}h(oe,"NodeList");oe.prototype={length:0,item:h(function(e){return e>=0&&e<this.length?this[e]:null},"item"),toString:h(function(e){var t;typeof e=="function"?t={requireWellFormed:false,splitCDATASections:true,nodeFilter:e}:e?t={requireWellFormed:!!e.requireWellFormed,splitCDATASections:e.splitCDATASections!==false,nodeFilter:e.nodeFilter||null}:t={requireWellFormed:false,splitCDATASections:true,nodeFilter:null};for(var n=[],r=0;r<this.length;r++)pr(this[r],n,null,t);return n.join("")},"toString"),filter:h(function(e){return Array.prototype.filter.call(this,e)},"filter"),indexOf:h(function(e){return Array.prototype.indexOf.call(this,e)},"indexOf")};oe.prototype[Symbol.iterator]=function(){var e=this,t=0;return {next:h(function(){return t<e.length?{value:e[t++],done:false}:{done:true}},"next"),return:h(function(){return {done:true}},"return")}};function Pe(e,t){this._node=e,this._refresh=t,gn(this);}h(Pe,"LiveNodeList");function gn(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!==t){var n=e._refresh(e._node);if(ki(e,"length",n.length),!e.$$length||n.length<e.$$length)for(var r=n.length;r in e;r++)mt(e,r)&&delete e[r];vt(n,e),e._inc=t;}}h(gn,"_updateLiveList");Pe.prototype.item=function(e){return gn(this),this[e]||null};me(Pe,oe);function _t(){}h(_t,"NamedNodeMap");function Ai(e,t){for(var n=0;n<e.length;){if(e[n]===t)return n;n++;}}h(Ai,"_findNodeIndex");function ka(e,t,n,r){if(r?t[Ai(t,r)]=n:(t[t.length]=n,t.length++),e){n.ownerElement=e;var s=e.ownerDocument;s&&(r&&Ni(s,e,r),Ma(s,e,n));}}h(ka,"_addNamedNode");function hi(e,t,n){var r=Ai(t,n);if(r>=0){for(var s=t.length-1;r<=s;)t[r]=t[++r];if(t.length=s,e){var i=e.ownerDocument;i&&Ni(i,e,n),n.ownerElement=null;}}}h(hi,"_removeNamedNode");_t.prototype={length:0,item:oe.prototype.item,getNamedItem:h(function(e){this._ownerElement&&this._ownerElement._isInHTMLDocumentAndNamespace()&&(e=e.toLowerCase());for(var t=0;t<this.length;){var n=this[t];if(n.nodeName===e)return n;t++;}return null},"getNamedItem"),setNamedItem:h(function(e){var t=e.ownerElement;if(t&&t!==this._ownerElement)throw new I(I.INUSE_ATTRIBUTE_ERR);var n=this.getNamedItemNS(e.namespaceURI,e.localName);return n===e?e:(ka(this._ownerElement,this,e,n),n)},"setNamedItem"),setNamedItemNS:h(function(e){return this.setNamedItem(e)},"setNamedItemNS"),removeNamedItem:h(function(e){var t=this.getNamedItem(e);if(!t)throw new I(I.NOT_FOUND_ERR,e);return hi(this._ownerElement,this,t),t},"removeNamedItem"),removeNamedItemNS:h(function(e,t){var n=this.getNamedItemNS(e,t);if(!n)throw new I(I.NOT_FOUND_ERR,e?e+" : "+t:t);return hi(this._ownerElement,this,n),n},"removeNamedItemNS"),getNamedItemNS:h(function(e,t){e||(e=null);for(var n=0;n<this.length;){var r=this[n];if(r.localName===t&&r.namespaceURI===e)return r;n++;}return null},"getNamedItemNS")};_t.prototype[Symbol.iterator]=function(){var e=this,t=0;return {next:h(function(){return t<e.length?{value:e[t++],done:false}:{done:true}},"next"),return:h(function(){return {done:true}},"return")}};function yi(){}h(yi,"DOMImplementation");yi.prototype={hasFeature:h(function(e,t){return true},"hasFeature"),createDocument:h(function(e,t,n){var r=Xt.XML_APPLICATION;e===Me.HTML?r=Xt.XML_XHTML_APPLICATION:e===Me.SVG&&(r=Xt.XML_SVG_IMAGE);var s=new Le(pe,{contentType:r});if(s.implementation=this,s.childNodes=new oe,s.doctype=n||null,n&&s.appendChild(n),t){var i=s.createElementNS(e,t);s.appendChild(i);}return s},"createDocument"),createDocumentType:h(function(e,t,n,r){_i(e);var s=new wn(pe);return s.name=e,s.nodeName=e,s.publicId=t||"",s.systemId=n||"",s.internalSubset=r||"",s.childNodes=new oe,s},"createDocumentType"),createHTMLDocument:h(function(e){var t=new Le(pe,{contentType:Xt.HTML});if(t.implementation=this,t.childNodes=new oe,e!==false){t.doctype=this.createDocumentType("html"),t.doctype.ownerDocument=t,t.appendChild(t.doctype);var n=t.createElement("html");t.appendChild(n);var r=t.createElement("head");if(n.appendChild(r),typeof e=="string"){var s=t.createElement("title");s.appendChild(t.createTextNode(e)),r.appendChild(s);}n.appendChild(t.createElement("body"));}return t},"createHTMLDocument")};function W(e){de(e);}h(W,"Node");W.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 e=this.getRootNode();return e&&e.nodeType===e.DOCUMENT_NODE},contains:h(function(e){if(!e)return false;var t=e;do{if(this===t)return true;t=t.parentNode;}while(t);return false},"contains"),getRootNode:h(function(e){var t=this;do{if(!t.parentNode)return t;t=t.parentNode;}while(t)},"getRootNode"),isEqualNode:h(function(e){if(!e)return false;for(var t=[{node:this,other:e}];t.length>0;){var n=t.pop(),r=n.node,s=n.other;if(r.nodeType!==s.nodeType)return false;switch(r.nodeType){case r.DOCUMENT_TYPE_NODE:if(r.name!==s.name||r.publicId!==s.publicId||r.systemId!==s.systemId)return false;break;case r.ELEMENT_NODE:if(r.namespaceURI!==s.namespaceURI||r.prefix!==s.prefix||r.localName!==s.localName||r.attributes.length!==s.attributes.length)return false;for(var i=0;i<r.attributes.length;i++){var o=r.attributes.item(i),u=s.getAttributeNodeNS(o.namespaceURI,o.localName);if(!u)return false;t.push({node:o,other:u});}break;case r.ATTRIBUTE_NODE:if(r.namespaceURI!==s.namespaceURI||r.localName!==s.localName||r.value!==s.value)return false;break;case r.PROCESSING_INSTRUCTION_NODE:if(r.target!==s.target||r.data!==s.data)return false;break;case r.TEXT_NODE:case r.CDATA_SECTION_NODE:case r.COMMENT_NODE:if(r.data!==s.data)return false;break}if(r.childNodes.length!==s.childNodes.length)return false;for(var i=r.childNodes.length-1;i>=0;i--)t.push({node:r.childNodes[i],other:s.childNodes[i]});}return true},"isEqualNode"),isSameNode:h(function(e){return this===e},"isSameNode"),insertBefore:h(function(e,t){return mn(this,e,t)},"insertBefore"),replaceChild:h(function(e,t){mn(this,e,t,Ii),t&&this.removeChild(t);},"replaceChild"),removeChild:h(function(e){return Ti(this,e)},"removeChild"),appendChild:h(function(e){return this.insertBefore(e,null)},"appendChild"),hasChildNodes:h(function(){return this.firstChild!=null},"hasChildNodes"),cloneNode:h(function(e){return Pi(this.ownerDocument||this,this,e)},"cloneNode"),normalize:h(function(){fe(this,null,{enter:h(function(e){for(var t=e.firstChild;t;){var n=t.nextSibling;n!==null&&n.nodeType===dn&&t.nodeType===dn?(e.removeChild(n),t.appendData(n.data)):t=n;}return true},"enter")});},"normalize"),isSupported:h(function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},"isSupported"),lookupPrefix:h(function(e){for(var t=this;t;){var n=t._nsMap;if(n){for(var r in n)if(mt(n,r)&&n[r]===e)return r}t=t.nodeType==gt?t.ownerDocument:t.parentNode;}return null},"lookupPrefix"),lookupNamespaceURI:h(function(e){for(var t=this;t;){var n=t._nsMap;if(n&&mt(n,e))return n[e];t=t.nodeType==gt?t.ownerDocument:t.parentNode;}return null},"lookupNamespaceURI"),isDefaultNamespace:h(function(e){var t=this.lookupPrefix(e);return t==null},"isDefaultNamespace"),compareDocumentPosition:h(function(e){if(this===e)return 0;var t=e,n=this,r=null,s=null;if(t instanceof tt&&(r=t,t=r.ownerElement),n instanceof tt&&(s=n,n=s.ownerElement,r&&t&&n===t))for(var i=0,o;o=n.attributes[i];i++){if(o===r)return ne.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+ne.DOCUMENT_POSITION_PRECEDING;if(o===s)return ne.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+ne.DOCUMENT_POSITION_FOLLOWING}if(!t||!n||n.ownerDocument!==t.ownerDocument)return ne.DOCUMENT_POSITION_DISCONNECTED+ne.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+(fi(n.ownerDocument)>fi(t.ownerDocument)?ne.DOCUMENT_POSITION_FOLLOWING:ne.DOCUMENT_POSITION_PRECEDING);if(s&&t===n)return ne.DOCUMENT_POSITION_CONTAINS+ne.DOCUMENT_POSITION_PRECEDING;if(r&&t===n)return ne.DOCUMENT_POSITION_CONTAINED_BY+ne.DOCUMENT_POSITION_FOLLOWING;for(var u=[],l=t.parentNode;l;){if(!s&&l===n)return ne.DOCUMENT_POSITION_CONTAINED_BY+ne.DOCUMENT_POSITION_FOLLOWING;u.push(l),l=l.parentNode;}u.reverse();for(var a=[],c=n.parentNode;c;){if(!r&&c===t)return ne.DOCUMENT_POSITION_CONTAINS+ne.DOCUMENT_POSITION_PRECEDING;a.push(c),c=c.parentNode;}a.reverse();var f=Di(u,a);for(var p in f.childNodes){var d=f.childNodes[p];if(d===n)return ne.DOCUMENT_POSITION_FOLLOWING;if(d===t)return ne.DOCUMENT_POSITION_PRECEDING;if(a.indexOf(d)>=0)return ne.DOCUMENT_POSITION_FOLLOWING;if(u.indexOf(d)>=0)return ne.DOCUMENT_POSITION_PRECEDING}return 0},"compareDocumentPosition")};function bi(e){return e=="<"&&"&lt;"||e==">"&&"&gt;"||e=="&"&&"&amp;"||e=='"'&&"&quot;"||"&#"+e.charCodeAt()+";"}h(bi,"_xmlEncoder");vt(ge,W);vt(ge,W.prototype);vt(ne,W);vt(ne,W.prototype);function pn(e,t){fe(e,null,{enter:h(function(n){return t(n)?fe.STOP:true},"enter")});}h(pn,"_visitNode");function fe(e,t,n){for(var r=[{node:e,context:t,phase:fe.ENTER}];r.length>0;){var s=r.pop();if(s.phase===fe.ENTER){var i=n.enter(s.node,s.context);if(i===fe.STOP)return fe.STOP;if(r.push({node:s.node,context:i,phase:fe.EXIT}),i==null)continue;for(var o=s.node.lastChild;o;)r.push({node:o,context:i,phase:fe.ENTER}),o=o.previousSibling;}else n.exit&&n.exit(s.node,s.context);}}h(fe,"walkDOM");fe.STOP=Symbol("walkDOM.STOP");fe.ENTER=0;fe.EXIT=1;function Le(e,t){de(e);var n=t||{};this.ownerDocument=this,this.contentType=n.contentType||Xt.XML_APPLICATION,this.type=ba(this.contentType)?"html":"xml";}h(Le,"Document");function Ma(e,t,n){e&&e._inc++;var r=n.namespaceURI;r===Me.XMLNS&&(t._nsMap[n.prefix?n.localName:""]=n.value);}h(Ma,"_onAddAttribute");function Ni(e,t,n,r){e&&e._inc++;var s=n.namespaceURI;s===Me.XMLNS&&delete t._nsMap[n.prefix?n.localName:""];}h(Ni,"_onRemoveAttribute");function Ci(e,t,n){if(e&&e._inc){e._inc++;var r=t.childNodes;if(n&&!n.nextSibling)r[r.length++]=n;else {for(var s=t.firstChild,i=0;s;)r[i++]=s,s=s.nextSibling;r.length=i,delete r[r.length];}}}h(Ci,"_onUpdateChild");function Ti(e,t){if(e!==t.parentNode)throw new I(I.NOT_FOUND_ERR,"child's parent is not parent");var n=t.previousSibling,r=t.nextSibling;return n?n.nextSibling=r:e.firstChild=r,r?r.previousSibling=n:e.lastChild=n,Ci(e.ownerDocument,e),t.parentNode=null,t.previousSibling=null,t.nextSibling=null,t}h(Ti,"_removeChild");function Ra(e){return e&&(e.nodeType===W.DOCUMENT_NODE||e.nodeType===W.DOCUMENT_FRAGMENT_NODE||e.nodeType===W.ELEMENT_NODE)}h(Ra,"hasValidParentNodeType");function Ba(e){return e&&(e.nodeType===W.CDATA_SECTION_NODE||e.nodeType===W.COMMENT_NODE||e.nodeType===W.DOCUMENT_FRAGMENT_NODE||e.nodeType===W.DOCUMENT_TYPE_NODE||e.nodeType===W.ELEMENT_NODE||e.nodeType===W.PROCESSING_INSTRUCTION_NODE||e.nodeType===W.TEXT_NODE)}h(Ba,"hasInsertableNodeType");function Ve(e){return e&&e.nodeType===W.DOCUMENT_TYPE_NODE}h(Ve,"isDocTypeNode");function Fe(e){return e&&e.nodeType===W.ELEMENT_NODE}h(Fe,"isElementNode");function xi(e){return e&&e.nodeType===W.TEXT_NODE}h(xi,"isTextNode");function pi(e,t){var n=e.childNodes||[];if(ke(n,Fe)||Ve(t))return false;var r=ke(n,Ve);return !(t&&r&&n.indexOf(r)>n.indexOf(t))}h(pi,"isElementInsertionPossible");function di(e,t){var n=e.childNodes||[];function r(i){return Fe(i)&&i!==t}if(h(r,"hasElementChildThatIsNotChild"),ke(n,r))return false;var s=ke(n,Ve);return !(t&&s&&n.indexOf(s)>n.indexOf(t))}h(di,"isElementReplacementPossible");function Fa(e,t,n){if(!Ra(e))throw new I(I.HIERARCHY_REQUEST_ERR,"Unexpected parent node type "+e.nodeType);if(n&&n.parentNode!==e)throw new I(I.NOT_FOUND_ERR,"child not in parent");if(!Ba(t)||Ve(t)&&e.nodeType!==W.DOCUMENT_NODE)throw new I(I.HIERARCHY_REQUEST_ERR,"Unexpected node type "+t.nodeType+" for parent node type "+e.nodeType)}h(Fa,"assertPreInsertionValidity1to5");function La(e,t,n){var r=e.childNodes||[],s=t.childNodes||[];if(t.nodeType===W.DOCUMENT_FRAGMENT_NODE){var i=s.filter(Fe);if(i.length>1||ke(s,xi))throw new I(I.HIERARCHY_REQUEST_ERR,"More than one element or text in fragment");if(i.length===1&&!pi(e,n))throw new I(I.HIERARCHY_REQUEST_ERR,"Element in fragment can not be inserted before doctype")}if(Fe(t)&&!pi(e,n))throw new I(I.HIERARCHY_REQUEST_ERR,"Only one element can be added and only after doctype");if(Ve(t)){if(ke(r,Ve))throw new I(I.HIERARCHY_REQUEST_ERR,"Only one doctype is allowed");var o=ke(r,Fe);if(n&&r.indexOf(o)<r.indexOf(n))throw new I(I.HIERARCHY_REQUEST_ERR,"Doctype can only be inserted before an element");if(!n&&o)throw new I(I.HIERARCHY_REQUEST_ERR,"Doctype can not be appended since element is present")}}h(La,"assertPreInsertionValidityInDocument");function Ii(e,t,n){var r=e.childNodes||[],s=t.childNodes||[];if(t.nodeType===W.DOCUMENT_FRAGMENT_NODE){var i=s.filter(Fe);if(i.length>1||ke(s,xi))throw new I(I.HIERARCHY_REQUEST_ERR,"More than one element or text in fragment");if(i.length===1&&!di(e,n))throw new I(I.HIERARCHY_REQUEST_ERR,"Element in fragment can not be inserted before doctype")}if(Fe(t)&&!di(e,n))throw new I(I.HIERARCHY_REQUEST_ERR,"Only one element can be added and only after doctype");if(Ve(t)){let u=function(l){return Ve(l)&&l!==n};if(h(u,"hasDoctypeChildThatIsNotChild"),ke(r,u))throw new I(I.HIERARCHY_REQUEST_ERR,"Only one doctype is allowed");var o=ke(r,Fe);if(n&&r.indexOf(o)<r.indexOf(n))throw new I(I.HIERARCHY_REQUEST_ERR,"Doctype can only be inserted before an element")}}h(Ii,"assertPreReplacementValidityInDocument");function mn(e,t,n,r){Fa(e,t,n),e.nodeType===W.DOCUMENT_NODE&&(r||La)(e,t,n);var s=t.parentNode;if(s&&s.removeChild(t),t.nodeType===He){var i=t.firstChild;if(i==null)return t;var o=t.lastChild;}else i=o=t;var u=n?n.previousSibling:e.lastChild;i.previousSibling=u,o.nextSibling=n,u?u.nextSibling=i:e.firstChild=i,n==null?e.lastChild=o:n.previousSibling=o;do i.parentNode=e;while(i!==o&&(i=i.nextSibling));return Ci(e.ownerDocument||e,e,t),t.nodeType==He&&(t.firstChild=t.lastChild=null),t}h(mn,"_insertBefore");Le.prototype={implementation:null,nodeName:"#document",nodeType:dt,doctype:null,documentElement:null,_inc:1,insertBefore:h(function(e,t){if(e.nodeType===He){for(var n=e.firstChild;n;){var r=n.nextSibling;this.insertBefore(n,t),n=r;}return e}return mn(this,e,t),e.ownerDocument=this,this.documentElement===null&&e.nodeType===be&&(this.documentElement=e),e},"insertBefore"),removeChild:h(function(e){var t=Ti(this,e);return t===this.documentElement&&(this.documentElement=null),t},"removeChild"),replaceChild:h(function(e,t){mn(this,e,t,Ii),e.ownerDocument=this,t&&this.removeChild(t),Fe(e)&&(this.documentElement=e);},"replaceChild"),importNode:h(function(e,t){return $a(this,e,t)},"importNode"),getElementById:h(function(e){var t=null;return pn(this.documentElement,function(n){if(n.nodeType==be&&n.getAttribute("id")==e)return t=n,true}),t},"getElementById"),createElement:h(function(e){var t=new $e(pe);t.ownerDocument=this,this.type==="html"&&(e=e.toLowerCase()),ya(this.contentType)&&(t.namespaceURI=Me.HTML),t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new oe;var n=t.attributes=new _t;return n._ownerElement=t,t},"createElement"),createDocumentFragment:h(function(){var e=new Et(pe);return e.ownerDocument=this,e.childNodes=new oe,e},"createDocumentFragment"),createTextNode:h(function(e){var t=new Yt(pe);return t.ownerDocument=this,t.childNodes=new oe,t.appendData(e),t},"createTextNode"),createComment:h(function(e){var t=new _n(pe);return t.ownerDocument=this,t.childNodes=new oe,t.appendData(e),t},"createComment"),createCDATASection:h(function(e){if(e.indexOf("]]>")!==-1)throw new I(I.INVALID_CHARACTER_ERR,'data contains "]]>"');var t=new vn(pe);return t.ownerDocument=this,t.childNodes=new oe,t.appendData(e),t},"createCDATASection"),createProcessingInstruction:h(function(e,t){var n=new Dn(pe);return n.ownerDocument=this,n.childNodes=new oe,n.nodeName=n.target=e,n.nodeValue=n.data=t,n},"createProcessingInstruction"),createAttribute:h(function(e){if(!ce.QName_exact.test(e))throw new I(I.INVALID_CHARACTER_ERR,'invalid character in name "'+e+'"');return this.type==="html"&&(e=e.toLowerCase()),this._createAttribute(e)},"createAttribute"),_createAttribute:h(function(e){var t=new tt(pe);return t.ownerDocument=this,t.childNodes=new oe,t.name=e,t.nodeName=e,t.localName=e,t.specified=true,t},"_createAttribute"),createEntityReference:h(function(e){if(!ce.Name.test(e))throw new I(I.INVALID_CHARACTER_ERR,'not a valid xml name "'+e+'"');if(this.type==="html")throw new I("document is an html document",ye.NotSupportedError);var t=new En(pe);return t.ownerDocument=this,t.childNodes=new oe,t.nodeName=e,t},"createEntityReference"),createElementNS:h(function(e,t){var n=ur(e,t),r=new $e(pe),s=r.attributes=new _t;return r.childNodes=new oe,r.ownerDocument=this,r.nodeName=t,r.tagName=t,r.namespaceURI=n[0],r.prefix=n[1],r.localName=n[2],s._ownerElement=r,r},"createElementNS"),createAttributeNS:h(function(e,t){var n=ur(e,t),r=new tt(pe);return r.ownerDocument=this,r.childNodes=new oe,r.nodeName=t,r.name=t,r.specified=true,r.namespaceURI=n[0],r.prefix=n[1],r.localName=n[2],r},"createAttributeNS")};me(Le,W);function $e(e){de(e),this._nsMap=Object.create(null);}h($e,"Element");$e.prototype={nodeType:be,attributes:null,getQualifiedName:h(function(){return this.prefix?this.prefix+":"+this.localName:this.localName},"getQualifiedName"),_isInHTMLDocumentAndNamespace:h(function(){return this.ownerDocument.type==="html"&&this.namespaceURI===Me.HTML},"_isInHTMLDocumentAndNamespace"),hasAttributes:h(function(){return !!(this.attributes&&this.attributes.length)},"hasAttributes"),hasAttribute:h(function(e){return !!this.getAttributeNode(e)},"hasAttribute"),getAttribute:h(function(e){var t=this.getAttributeNode(e);return t?t.value:null},"getAttribute"),getAttributeNode:h(function(e){return this._isInHTMLDocumentAndNamespace()&&(e=e.toLowerCase()),this.attributes.getNamedItem(e)},"getAttributeNode"),setAttribute:h(function(e,t){this._isInHTMLDocumentAndNamespace()&&(e=e.toLowerCase());var n=this.getAttributeNode(e);n?n.value=n.nodeValue=""+t:(n=this.ownerDocument._createAttribute(e),n.value=n.nodeValue=""+t,this.setAttributeNode(n));},"setAttribute"),removeAttribute:h(function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t);},"removeAttribute"),setAttributeNode:h(function(e){return this.attributes.setNamedItem(e)},"setAttributeNode"),setAttributeNodeNS:h(function(e){return this.attributes.setNamedItemNS(e)},"setAttributeNodeNS"),removeAttributeNode:h(function(e){return this.attributes.removeNamedItem(e.nodeName)},"removeAttributeNode"),removeAttributeNS:h(function(e,t){var n=this.getAttributeNodeNS(e,t);n&&this.removeAttributeNode(n);},"removeAttributeNS"),hasAttributeNS:h(function(e,t){return this.getAttributeNodeNS(e,t)!=null},"hasAttributeNS"),getAttributeNS:h(function(e,t){var n=this.getAttributeNodeNS(e,t);return n?n.value:null},"getAttributeNS"),setAttributeNS:h(function(e,t,n){var r=ur(e,t),s=r[2],i=this.getAttributeNodeNS(e,s);i?i.value=i.nodeValue=""+n:(i=this.ownerDocument.createAttributeNS(e,t),i.value=i.nodeValue=""+n,this.setAttributeNode(i));},"setAttributeNS"),getAttributeNodeNS:h(function(e,t){return this.attributes.getNamedItemNS(e,t)},"getAttributeNodeNS"),getElementsByClassName:h(function(e){var t=ci(e);return new Pe(this,function(n){var r=[];return t.length>0&&pn(n,function(s){if(s!==n&&s.nodeType===be){var i=s.getAttribute("class");if(i){var o=e===i;if(!o){var u=ci(i);o=t.every(Sa(u));}o&&r.push(s);}}}),r})},"getElementsByClassName"),getElementsByTagName:h(function(e){var t=(this.nodeType===dt?this:this.ownerDocument).type==="html",n=e.toLowerCase();return new Pe(this,function(r){var s=[];return pn(r,function(i){if(!(i===r||i.nodeType!==be))if(e==="*")s.push(i);else {var o=i.getQualifiedName(),u=t&&i.namespaceURI===Me.HTML?n:e;o===u&&s.push(i);}}),s})},"getElementsByTagName"),getElementsByTagNameNS:h(function(e,t){return new Pe(this,function(n){var r=[];return pn(n,function(s){s!==n&&s.nodeType===be&&(e==="*"||s.namespaceURI===e)&&(t==="*"||s.localName==t)&&r.push(s);}),r})},"getElementsByTagNameNS")};Le.prototype.getElementsByClassName=$e.prototype.getElementsByClassName;Le.prototype.getElementsByTagName=$e.prototype.getElementsByTagName;Le.prototype.getElementsByTagNameNS=$e.prototype.getElementsByTagNameNS;me($e,W);function tt(e){de(e),this.namespaceURI=null,this.prefix=null,this.ownerElement=null;}h(tt,"Attr");tt.prototype.nodeType=gt;me(tt,W);function wt(e){de(e);}h(wt,"CharacterData");wt.prototype={data:"",substringData:h(function(e,t){return this.data.substring(e,e+t)},"substringData"),appendData:h(function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length;},"appendData"),insertData:h(function(e,t){this.replaceData(e,0,t);},"insertData"),deleteData:h(function(e,t){this.replaceData(e,t,"");},"deleteData"),replaceData:h(function(e,t,n){var r=this.data.substring(0,e),s=this.data.substring(e+t);n=r+n+s,this.nodeValue=this.data=n,this.length=n.length;},"replaceData")};me(wt,W);function Yt(e){de(e);}h(Yt,"Text");Yt.prototype={nodeName:"#text",nodeType:dn,splitText:h(function(e){var t=this.data,n=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var r=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r},"splitText")};me(Yt,wt);function _n(e){de(e);}h(_n,"Comment");_n.prototype={nodeName:"#comment",nodeType:cr};me(_n,wt);function vn(e){de(e);}h(vn,"CDATASection");vn.prototype={nodeName:"#cdata-section",nodeType:vi};me(vn,Yt);function wn(e){de(e);}h(wn,"DocumentType");wn.prototype.nodeType=Ei;me(wn,W);function fr(e){de(e);}h(fr,"Notation");fr.prototype.nodeType=Pa;me(fr,W);function hr(e){de(e);}h(hr,"Entity");hr.prototype.nodeType=Oa;me(hr,W);function En(e){de(e);}h(En,"EntityReference");En.prototype.nodeType=wi;me(En,W);function Et(e){de(e);}h(Et,"DocumentFragment");Et.prototype.nodeName="#document-fragment";Et.prototype.nodeType=He;me(Et,W);function Dn(e){de(e);}h(Dn,"ProcessingInstruction");Dn.prototype.nodeType=lr;me(Dn,wt);function Si(){}h(Si,"XMLSerializer");Si.prototype.serializeToString=function(e,t){return Oi.call(e,t)};W.prototype.toString=Oi;function Oi(e){var t;typeof e=="function"?t={requireWellFormed:false,splitCDATASections:true,nodeFilter:e}:e!=null?t={requireWellFormed:!!e.requireWellFormed,splitCDATASections:e.splitCDATASections!==false,nodeFilter:e.nodeFilter||null}:t={requireWellFormed:false,splitCDATASections:true,nodeFilter:null};var n=[],r=this.nodeType===dt&&this.documentElement||this,s=r.prefix,i=r.namespaceURI;if(i&&s==null){var s=r.lookupPrefix(i);if(s==null)var o=[{namespace:i,prefix:null}];}return pr(this,n,o,t),n.join("")}h(Oi,"nodeSerializeToString");function mi(e,t,n){var r=e.prefix||"",s=e.namespaceURI;if(!s||r==="xml"&&s===Me.XML||s===Me.XMLNS)return false;for(var i=n.length;i--;){var o=n[i];if(o.prefix===r)return o.namespace!==s}return true}h(mi,"needNamespaceDefine");function hn(e,t,n){e.push(" ",t,'="',n.replace(/[<>&"\t\n\r]/g,bi),'"');}h(hn,"addSerializedAttribute");function pr(e,t,n,r){n||(n=[]);var s=r.nodeFilter,i=r.requireWellFormed,o=r.splitCDATASections,u=e.nodeType===dt?e:e.ownerDocument,l=u.type==="html";fe(e,{ns:n},{enter:h(function(a,c){var f=c.ns;if(s)if(a=s(a),a){if(typeof a=="string")return t.push(a),null}else return null;switch(a.nodeType){case be:var p=a.attributes,d=p.length,g=a.tagName,m=g;if(!l&&!a.prefix&&a.namespaceURI){for(var b,D=0;D<p.length;D++)if(p.item(D).name==="xmlns"){b=p.item(D).value;break}if(!b)for(var w=f.length-1;w>=0;w--){var v=f[w];if(v.prefix===""&&v.namespace===a.namespaceURI){b=v.namespace;break}}if(b!==a.namespaceURI)for(var w=f.length-1;w>=0;w--){var v=f[w];if(v.namespace===a.namespaceURI){v.prefix&&(m=v.prefix+":"+g);break}}}t.push("<",m);for(var _=f.slice(),A=0;A<d;A++){var E=p.item(A);E.prefix=="xmlns"?_.push({prefix:E.localName,namespace:E.value}):E.nodeName=="xmlns"&&_.push({prefix:"",namespace:E.value});}for(var A=0;A<d;A++){var E=p.item(A);if(mi(E,l,_)){var y=E.prefix||"",N=E.namespaceURI;hn(t,y?"xmlns:"+y:"xmlns",N),_.push({prefix:y,namespace:N});}var C=s?s(E):E;C&&(typeof C=="string"?t.push(C):hn(t,C.name,C.value));}if(g===m&&mi(a,l,_)){var F=a.prefix||"",N=a.namespaceURI;hn(t,F?"xmlns:"+F:"xmlns",N),_.push({prefix:F,namespace:N});}var P=!a.firstChild;if(P&&(l||a.namespaceURI===Me.HTML)&&(P=Ca(g)),P)return t.push("/>"),null;if(t.push(">"),l&&Na(g)){for(var R=a.firstChild;R;)R.data?t.push(R.data):pr(R,t,_.slice(),r),R=R.nextSibling;return t.push("</",m,">"),null}return {ns:_,tag:m};case dt:case He:if(i&&a.nodeType===dt&&a.documentElement==null)throw new I("The Document has no documentElement",ye.InvalidStateError);return {ns:f};case gt:return hn(t,a.name,a.value),null;case dn:if(i&&ce.InvalidChar.test(a.data))throw new I("The Text node data contains characters outside the XML Char production",ye.InvalidStateError);return t.push(a.data.replace(/[<&>]/g,bi)),null;case vi:if(i&&a.data.indexOf("]]>")!==-1)throw new I('The CDATASection data contains "]]>"',ye.InvalidStateError);return o?t.push(ce.CDATA_START,a.data.replace(/]]>/g,"]]]]><![CDATA[>"),ce.CDATA_END):t.push(ce.CDATA_START,a.data,ce.CDATA_END),null;case cr:if(i){if(ce.InvalidChar.test(a.data))throw new I("The comment node data contains characters outside the XML Char production",ye.InvalidStateError);if(a.data.indexOf("--")!==-1||a.data[a.data.length-1]==="-")throw new I('The comment node data contains "--" or ends with "-"',ye.InvalidStateError)}return t.push(ce.COMMENT_START,a.data,ce.COMMENT_END),null;case Ei:var j=a.publicId,O=a.systemId;if(i){if(j&&!ce.PubidLiteral_match.test(j))throw new I("DocumentType publicId is not a valid PubidLiteral",ye.InvalidStateError);if(O&&O!=="."&&!ce.SystemLiteral_match.test(O))throw new I("DocumentType systemId is not a valid SystemLiteral",ye.InvalidStateError);if(a.internalSubset&&a.internalSubset.indexOf("]>")!==-1)throw new I('DocumentType internalSubset contains "]>"',ye.InvalidStateError)}return t.push(ce.DOCTYPE_DECL_START," ",a.name),j?(t.push(" ",ce.PUBLIC," ",j),O&&O!=="."&&t.push(" ",O)):O&&O!=="."&&t.push(" ",ce.SYSTEM," ",O),a.internalSubset&&t.push(" [",a.internalSubset,"]"),t.push(">"),null;case lr:if(i){if(a.target.indexOf(":")!==-1||a.target.toLowerCase()==="xml")throw new I("The ProcessingInstruction target is not well-formed",ye.InvalidStateError);if(ce.InvalidChar.test(a.data))throw new I("The ProcessingInstruction data contains characters outside the XML Char production",ye.InvalidStateError);if(a.data.indexOf("?>")!==-1)throw new I('The ProcessingInstruction data contains "?>"',ye.InvalidStateError)}return t.push("<?",a.target," ",a.data,"?>"),null;case wi:return t.push("&",a.nodeName,";"),null;default:return t.push("??",a.nodeName),null}},"enter"),exit:h(function(a,c){c&&c.tag&&t.push("</",c.tag,">");},"exit")});}h(pr,"serializeToString");function $a(e,t,n){var r;return fe(t,null,{enter:h(function(s,i){var o=s.cloneNode(false);o.ownerDocument=e,o.parentNode=null,i===null?r=o:i.appendChild(o);var u=s.nodeType===gt||n;return u?o:null},"enter")}),r}h($a,"importNode");function Pi(e,t,n){var r;return fe(t,null,{enter:h(function(s,i){var o=new s.constructor(pe);for(var u in s)if(mt(s,u)){var l=s[u];typeof l!="object"&&l!=o[u]&&(o[u]=l);}s.childNodes&&(o.childNodes=new oe),o.ownerDocument=e;var a=n;switch(o.nodeType){case be:var c=s.attributes,f=o.attributes=new _t,p=c.length;f._ownerElement=o;for(var d=0;d<p;d++)o.setAttributeNode(Pi(e,c.item(d),true));break;case gt:a=true;}return i!==null?i.appendChild(o):r=o,a?o:null},"enter")}),r}h(Pi,"cloneNode");function ki(e,t,n){e[t]=n;}h(ki,"__set__");function ar(e){for(var t=[],n=e.firstChild;n;)n.nodeType===be&&t.push(n),n=n.nextSibling;return t}h(ar,"childrenRefresh");try{Object.defineProperty&&(Object.defineProperty(Pe.prototype,"length",{get:h(function(){return gn(this),this.$$length},"get")}),Object.defineProperty(W.prototype,"textContent",{get:h(function(){if(this.nodeType===be||this.nodeType===He){var e=[];return fe(this,null,{enter:h(function(t){if(t.nodeType===be||t.nodeType===He)return !0;if(t.nodeType===lr||t.nodeType===cr)return null;e.push(t.nodeValue);},"enter")}),e.join("")}return this.nodeValue},"get"),set:h(function(e){switch(this.nodeType){case be:case He:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e;}},"set")}),Object.defineProperty($e.prototype,"children",{get:h(function(){return new Pe(this,ar)},"get")}),Object.defineProperty(Le.prototype,"children",{get:h(function(){return new Pe(this,ar)},"get")}),Object.defineProperty(Et.prototype,"children",{get:h(function(){return new Pe(this,ar)},"get")}),ki=h(function(e,t,n){e["$$"+t]=n;},"__set__"));}catch{}re._updateLiveList=gn;re.Attr=tt;re.CDATASection=vn;re.CharacterData=wt;re.Comment=_n;re.Document=Le;re.DocumentFragment=Et;re.DocumentType=wn;re.DOMImplementation=yi;re.Element=$e;re.Entity=hr;re.EntityReference=En;re.LiveNodeList=Pe;re.NamedNodeMap=_t;re.Node=W;re.NodeList=oe;re.Notation=fr;re.Text=Yt;re.ProcessingInstruction=Dn;re.walkDOM=fe;re.XMLSerializer=Si;});var Ri=Ie(Qt=>{var Mi=et().freeze;Qt.XML_ENTITIES=Mi({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'});Qt.HTML_ENTITIES=Mi({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"});Qt.entityMap=Qt.HTML_ENTITIES;});var Vi=Ie(yn=>{var bt=et(),$=or(),Ui=zt(),Ua=bt.isHTMLEscapableRawTextElement,qa=bt.isHTMLMimeType,za=bt.isHTMLRawTextElement,en=bt.hasOwn,Bi=bt.NAMESPACE,Fi=Ui.ParseError,ja=Ui.DOMException,Zt=0,Ge=1,Dt=2,Jt=3,At=4,yt=5,Kt=6,An=7;function qi(){}h(qi,"XMLReader");qi.prototype={parse:h(function(e,t,n){var r=this.domBuilder;r.startDocument(),zi(t,t=Object.create(null)),Wa(e,t,n,r,this.errorHandler),r.endDocument();},"parse")};var mr=/&#?\w+;?/g;function Wa(e,t,n,r,s){var i=qa(r.mimeType);e.indexOf($.UNICODE_REPLACEMENT_CHARACTER)>=0&&s.warning("Unicode replacement character detected, source encoding issues?");function o(S){if(S>65535){S-=65536;var J=55296+(S>>10),ie=56320+(S&1023);return String.fromCharCode(J,ie)}else return String.fromCharCode(S)}h(o,"fixedFromCharCode");function u(S){var J=S[S.length-1]===";"?S:S+";";if(!i&&J!==S)return s.error("EntityRef: expecting ;"),S;var ie=$.Reference.exec(J);if(!ie||ie[0].length!==J.length)return s.error("entity not matching Reference production: "+S),S;var se=J.slice(1,-1);return en(n,se)?n[se]:se.charAt(0)==="#"?o(parseInt(se.substring(1).replace("x","0x"))):(s.error("entity not found:"+S),S)}h(u,"entityReplacer");function l(S){if(S>b){var J=e.substring(b,S).replace(mr,u);p&&d(b),r.characters(J,0,S-b),b=S;}}h(l,"appendText");var a=0,c=0,f=/\r\n?|\n|$/g,p=r.locator;function d(S,J){for(;S>=c&&(J=f.exec(e));)a=c,c=J.index+J[0].length,p.lineNumber++;p.columnNumber=S-a+1;}h(d,"position");for(var g=[{currentNSMap:t}],m=[],b=0;;){try{var D=e.indexOf("<",b);if(D<0){if(!i&&m.length>0)return s.fatalError("unclosed xml tag(s): "+m.join(", "));if(!e.substring(b).match(/^\s*$/)){var w=r.doc,v=w.createTextNode(e.substring(b));if(w.documentElement)return s.error("Extra content at the end of the document");w.appendChild(v),r.currentElement=v;}return}if(D>b){var _=e.substring(b,D);!i&&m.length===0&&(_=_.replace(new RegExp($.S_OPT.source,"g"),""),_&&s.error("Unexpected content outside root element: '"+_+"'")),l(D);}switch(e.charAt(D+1)){case "/":var O=e.indexOf(">",D+2),A=e.substring(D+2,O>0?O:void 0);if(!A)return s.fatalError("end tag name missing");var E=O>0&&$.reg("^",$.QName_group,$.S_OPT,"$").exec(A);if(!E)return s.fatalError('end tag name contains invalid characters: "'+A+'"');if(!r.currentElement&&!r.doc.documentElement)return;var y=m[m.length-1]||r.currentElement.tagName||r.doc.documentElement.tagName||"";if(y!==E[1]){var N=E[1].toLowerCase();if(!i||y.toLowerCase()!==N)return s.fatalError('Opening and ending tag mismatch: "'+y+'" != "'+A+'"')}var C=g.pop();m.pop();var F=C.localNSMap;if(r.endElement(C.uri,C.localName,y),F)for(var P in F)en(F,P)&&r.endPrefixMapping(P);O++;break;case "?":p&&d(D),O=Xa(e,D,r,s);break;case "!":p&&d(D),O=Wi(e,D,r,s,i);break;default:p&&d(D);var R=new Hi,j=g[g.length-1].currentNSMap,O=Ha(e,D,R,j,u,s,i),G=R.length;if(R.closed||(i&&bt.isHTMLVoidElement(R.tagName)?R.closed=!0:m.push(R.tagName)),p&&G){for(var z=Li(p,{}),L=0;L<G;L++){var Y=R[L];d(Y.offset),Y.locator=Li(p,{});}r.locator=z,$i(R,r,j)&&g.push(R),r.locator=p;}else $i(R,r,j)&&g.push(R);i&&!R.closed?O=Va(e,O,R.tagName,u,r):O++;}}catch(S){if(S instanceof Fi)throw S;if(S instanceof ja)throw new Fi(S.name+": "+S.message,r.locator,S);s.error("element parse error: "+S),O=-1;}O>b?b=O:l(Math.max(D,b)+1);}}h(Wa,"parse");function Li(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}h(Li,"copyLocator");function Ha(e,t,n,r,s,i,o){function u(d,g,m){if(en(n.attributeNames,d))return i.fatalError("Attribute "+d+" redefined");if(!o&&g.indexOf("<")>=0)return i.fatalError("Unescaped '<' not allowed in attributes values");n.addValue(d,g.replace(/[\t\n\r]/g," ").replace(mr,s),m);}h(u,"addAttribute");for(var l,a,c=++t,f=Zt;;){var p=e.charAt(c);switch(p){case "=":if(f===Ge)l=e.slice(t,c),f=Jt;else if(f===Dt)f=Jt;else throw new Error("attribute equal must after attrName");break;case "'":case '"':if(f===Jt||f===Ge)if(f===Ge&&(i.warning('attribute value must after "="'),l=e.slice(t,c)),t=c+1,c=e.indexOf(p,t),c>0)a=e.slice(t,c),u(l,a,t-1),f=yt;else throw new Error("attribute value no end '"+p+"' match");else if(f==At)a=e.slice(t,c),u(l,a,t),i.warning('attribute "'+l+'" missed start quot('+p+")!!"),t=c+1,f=yt;else throw new Error('attribute value must after "="');break;case "/":switch(f){case Zt:n.setTagName(e.slice(t,c));case yt:case Kt:case An:f=An,n.closed=true;case At:case Ge:break;case Dt:n.closed=true;break;default:throw new Error("attribute invalid close char('/')")}break;case "":return i.error("unexpected end of input"),f==Zt&&n.setTagName(e.slice(t,c)),c;case ">":switch(f){case Zt:n.setTagName(e.slice(t,c));case yt:case Kt:case An:break;case At:case Ge:a=e.slice(t,c),a.slice(-1)==="/"&&(n.closed=true,a=a.slice(0,-1));case Dt:f===Dt&&(a=l),f==At?(i.warning('attribute "'+a+'" missed quot(")!'),u(l,a,t)):(o||i.warning('attribute "'+a+'" missed value!! "'+a+'" instead!!'),u(a,a,t));break;case Jt:if(!o)return i.fatalError(`AttValue: ' or " expected`)}return c;case "\x80":p=" ";default:if(p<=" ")switch(f){case Zt:n.setTagName(e.slice(t,c)),f=Kt;break;case Ge:l=e.slice(t,c),f=Dt;break;case At:var a=e.slice(t,c);i.warning('attribute "'+a+'" missed quot(")!!'),u(l,a,t);case yt:f=Kt;break}else switch(f){case Dt:o||i.warning('attribute "'+l+'" missed value!! "'+l+'" instead2!!'),u(l,l,t),t=c,f=Ge;break;case yt:i.warning('attribute space is required"'+l+'"!!');case Kt:f=Ge,t=c;break;case Jt:f=At,t=c;break;case An:throw new Error("elements closed character '/' and '>' must be connected to")}}c++;}}h(Ha,"parseElementStartPart");function $i(e,t,n){for(var r=e.tagName,s=null,f=e.length;f--;){var i=e[f],o=i.qName,u=i.value,p=o.indexOf(":");if(p>0)var l=i.prefix=o.slice(0,p),a=o.slice(p+1),c=l==="xmlns"&&a;else a=o,l=null,c=o==="xmlns"&&"";i.localName=a,c!==false&&(s==null&&(s=Object.create(null),zi(n,n=Object.create(null))),n[c]=s[c]=u,i.uri=Bi.XMLNS,t.startPrefixMapping(c,u));}for(var f=e.length;f--;)i=e[f],i.prefix&&(i.prefix==="xml"&&(i.uri=Bi.XML),i.prefix!=="xmlns"&&(i.uri=n[i.prefix]));var p=r.indexOf(":");p>0?(l=e.prefix=r.slice(0,p),a=e.localName=r.slice(p+1)):(l=null,a=e.localName=r);var d=e.uri=n[l||""];if(t.startElement(d,a,r,e),e.closed){if(t.endElement(d,a,r),s)for(l in s)en(s,l)&&t.endPrefixMapping(l);}else return e.currentNSMap=n,e.localNSMap=s,true}h($i,"appendElement");function Va(e,t,n,r,s){var i=Ua(n);if(i||za(n)){var o=e.indexOf("</"+n+">",t),u=e.substring(t+1,o);return i&&(u=u.replace(mr,r)),s.characters(u,0,u.length),o}return t+1}h(Va,"parseHtmlSpecialContent");function zi(e,t){for(var n in e)en(e,n)&&(t[n]=e[n]);}h(zi,"_copy");function ji(e,t){var n=t;function r(c){return c=c||0,e.charAt(n+c)}h(r,"char");function s(c){c=c||1,n+=c;}h(s,"skip");function i(){for(var c=0;n<e.length;){var f=r();if(f!==" "&&f!==`
3
+ `&&f!==" "&&f!=="\r")return c;c++,s();}return -1}h(i,"skipBlanks");function o(){return e.substring(n)}h(o,"substringFromIndex");function u(c){return e.substring(n,n+c.length)===c}h(u,"substringStartsWith");function l(c){return e.substring(n,n+c.length).toUpperCase()===c.toUpperCase()}h(l,"substringStartsWithCaseInsensitive");function a(c){var f=$.reg("^",c),p=f.exec(o());return p?(s(p[0].length),p[0]):null}return h(a,"getMatch"),{char:r,getIndex:h(function(){return n},"getIndex"),getMatch:a,getSource:h(function(){return e},"getSource"),skip:s,skipBlanks:i,substringFromIndex:o,substringStartsWith:u,substringStartsWithCaseInsensitive:l}}h(ji,"parseUtils");function Ga(e,t){function n(u,l){var a=$.PI.exec(u.substringFromIndex());return a?a[1].toLowerCase()==="xml"?l.fatalError("xml declaration is only allowed at the start of the document, but found at position "+u.getIndex()):(u.skip(a[0].length),a[0]):l.fatalError("processing instruction is not well-formed at position "+u.getIndex())}h(n,"parsePI");var r=e.getSource();if(e.char()==="["){e.skip(1);for(var s=e.getIndex();e.getIndex()<r.length;){if(e.skipBlanks(),e.char()==="]"){var i=r.substring(s,e.getIndex());return e.skip(1),i}var o=null;if(e.char()==="<"&&e.char(1)==="!")switch(e.char(2)){case "E":e.char(3)==="L"?o=e.getMatch($.elementdecl):e.char(3)==="N"&&(o=e.getMatch($.EntityDecl));break;case "A":o=e.getMatch($.AttlistDecl);break;case "N":o=e.getMatch($.NotationDecl);break;case "-":o=e.getMatch($.Comment);break}else if(e.char()==="<"&&e.char(1)==="?")o=n(e,t);else if(e.char()==="%")o=e.getMatch($.PEReference);else return t.fatalError("Error detected in Markup declaration");if(!o)return t.fatalError("Error in internal subset at position "+e.getIndex())}return t.fatalError("doctype internal subset is not well-formed, missing ]")}}h(Ga,"parseDoctypeInternalSubset");function Wi(e,t,n,r,s){var i=ji(e,t);switch(s?i.char(2).toUpperCase():i.char(2)){case "-":var o=i.getMatch($.Comment);return o?(n.comment(o,$.COMMENT_START.length,o.length-$.COMMENT_START.length-$.COMMENT_END.length),i.getIndex()):r.fatalError("comment is not well-formed at position "+i.getIndex());case "[":var u=i.getMatch($.CDSect);return u?!s&&!n.currentElement?r.fatalError("CDATA outside of element"):(n.startCDATA(),n.characters(u,$.CDATA_START.length,u.length-$.CDATA_START.length-$.CDATA_END.length),n.endCDATA(),i.getIndex()):r.fatalError("Invalid CDATA starting at position "+t);case "D":{if(n.doc&&n.doc.documentElement)return r.fatalError("Doctype not allowed inside or after documentElement at position "+i.getIndex());if(s?!i.substringStartsWithCaseInsensitive($.DOCTYPE_DECL_START):!i.substringStartsWith($.DOCTYPE_DECL_START))return r.fatalError("Expected "+$.DOCTYPE_DECL_START+" at position "+i.getIndex());if(i.skip($.DOCTYPE_DECL_START.length),i.skipBlanks()<1)return r.fatalError("Expected whitespace after "+$.DOCTYPE_DECL_START+" at position "+i.getIndex());var l={name:void 0,publicId:void 0,systemId:void 0,internalSubset:void 0};if(l.name=i.getMatch($.Name),!l.name)return r.fatalError("doctype name missing or contains unexpected characters at position "+i.getIndex());if(s&&l.name.toLowerCase()!=="html"&&r.warning("Unexpected DOCTYPE in HTML document at position "+i.getIndex()),i.skipBlanks(),i.substringStartsWith($.PUBLIC)||i.substringStartsWith($.SYSTEM)){var a=$.ExternalID_match.exec(i.substringFromIndex());if(!a)return r.fatalError("doctype external id is not well-formed at position "+i.getIndex());a.groups.SystemLiteralOnly!==void 0?l.systemId=a.groups.SystemLiteralOnly:(l.systemId=a.groups.SystemLiteral,l.publicId=a.groups.PubidLiteral),i.skip(a[0].length);}else if(s&&i.substringStartsWithCaseInsensitive($.SYSTEM)){if(i.skip($.SYSTEM.length),i.skipBlanks()<1)return r.fatalError("Expected whitespace after "+$.SYSTEM+" at position "+i.getIndex());if(l.systemId=i.getMatch($.ABOUT_LEGACY_COMPAT_SystemLiteral),!l.systemId)return r.fatalError("Expected "+$.ABOUT_LEGACY_COMPAT+" in single or double quotes after "+$.SYSTEM+" at position "+i.getIndex())}return s&&l.systemId&&!$.ABOUT_LEGACY_COMPAT_SystemLiteral.test(l.systemId)&&r.warning("Unexpected doctype.systemId in HTML document at position "+i.getIndex()),s||(i.skipBlanks(),l.internalSubset=Ga(i,r)),i.skipBlanks(),i.char()!==">"?r.fatalError("doctype not terminated with > at position "+i.getIndex()):(i.skip(1),n.startDTD(l.name,l.publicId,l.systemId,l.internalSubset),n.endDTD(),i.getIndex())}default:return r.fatalError('Not well-formed XML starting with "<!" at position '+t)}}h(Wi,"parseDoctypeCommentOrCData");function Xa(e,t,n,r){var s=e.substring(t).match($.PI);if(!s)return r.fatalError("Invalid processing instruction starting at position "+t);if(s[1].toLowerCase()==="xml"){if(t>0)return r.fatalError("processing instruction at position "+t+" is an xml declaration which is only at the start of the document");if(!$.XMLDecl.test(e.substring(t)))return r.fatalError("xml declaration is not well-formed")}return n.processingInstruction(s[1],s[2]),t+s[0].length}h(Xa,"parseProcessingInstruction");function Hi(){this.attributeNames=Object.create(null);}h(Hi,"ElementAttributes");Hi.prototype={setTagName:h(function(e){if(!$.QName_exact.test(e))throw new Error("invalid tagName:"+e);this.tagName=e;},"setTagName"),addValue:h(function(e,t,n){if(!$.QName_exact.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:n};},"addValue"),length:0,getLocalName:h(function(e){return this[e].localName},"getLocalName"),getLocator:h(function(e){return this[e].locator},"getLocator"),getQName:h(function(e){return this[e].qName},"getQName"),getURI:h(function(e){return this[e].uri},"getURI"),getValue:h(function(e){return this[e].value},"getValue")};yn.XMLReader=qi;yn.parseUtils=ji;yn.parseDoctypeCommentOrCData=Wi;});var Ki=Ie(Ct=>{var nt=et(),Ya=dr(),Qa=zt(),Gi=Ri(),Za=Vi(),Ja=Ya.DOMImplementation,Ka=nt.hasDefaultHTMLNamespace,eu=nt.isHTMLMimeType,tu=nt.isValidMimeType,Qi=nt.MIME_TYPE,gr=nt.NAMESPACE,Xi=Qa.ParseError,nu=Za.XMLReader;function Zi(e){return e.replace(/\r[\n\u0085]/g,`
4
4
  `).replace(/[\r\u0085\u2028\u2029]/g,`
5
- `)}h(Xi,"normalizeLineEndings");function Yi(e){if(e=e||{},e.locator===void 0&&(e.locator=true),this.assign=e.assign||nt.assign,this.domHandler=e.domHandler||Nn,this.onError=e.onError||e.errorHandler,e.errorHandler&&typeof e.errorHandler!="function")throw new TypeError("errorHandler object is no longer supported, switch to onError!");e.errorHandler&&e.errorHandler("warning","The `errorHandler` option has been deprecated, use `onError` instead!",this),this.normalizeLineEndings=e.normalizeLineEndings||Xi,this.locator=!!e.locator,this.xmlns=this.assign(Object.create(null),e.xmlns);}h(Yi,"DOMParser");Yi.prototype.parseFromString=function(e,t){if(!Ka(t))throw new TypeError('DOMParser.parseFromString: the provided mimeType "'+t+'" is not valid.');var n=this.assign(Object.create(null),this.xmlns),r=Wi.XML_ENTITIES,s=n[""]||null;Za(t)?(r=Wi.HTML_ENTITIES,s=mr.HTML):t===Gi.XML_SVG_IMAGE&&(s=mr.SVG),n[""]=s,n.xml=n.xml||mr.XML;var i=new this.domHandler({mimeType:t,defaultNamespace:s,onError:this.onError}),o=this.locator?{}:void 0;this.locator&&i.setDocumentLocator(o);var u=new eu;u.errorHandler=i,u.domBuilder=i;var l=!nt.isHTMLMimeType(t);return l&&typeof e!="string"&&u.errorHandler.fatalError("source is not a string"),u.parse(this.normalizeLineEndings(String(e)),n,r),i.doc.documentElement||u.errorHandler.fatalError("missing root element"),i.doc};function Nn(e){var t=e||{};this.mimeType=t.mimeType||Gi.XML_APPLICATION,this.defaultNamespace=t.defaultNamespace||null,this.cdata=false,this.currentElement=void 0,this.doc=void 0,this.locator=void 0,this.onError=t.onError;}h(Nn,"DOMHandler");function Nt(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber;}h(Nt,"position");Nn.prototype={startDocument:h(function(){var e=new Qa;this.doc=Ja(this.mimeType)?e.createHTMLDocument(false):e.createDocument(this.defaultNamespace,"");},"startDocument"),startElement:h(function(e,t,n,r){var s=this.doc,i=s.createElementNS(e,n||t),o=r.length;bn(this,i),this.currentElement=i,this.locator&&Nt(this.locator,i);for(var u=0;u<o;u++){var e=r.getURI(u),l=r.getValue(u),n=r.getQName(u),a=s.createAttributeNS(e,n);this.locator&&Nt(r.getLocator(u),a),a.value=a.nodeValue=l,i.setAttributeNode(a);}},"startElement"),endElement:h(function(e,t,n){this.currentElement=this.currentElement.parentNode;},"endElement"),startPrefixMapping:h(function(e,t){},"startPrefixMapping"),endPrefixMapping:h(function(e){},"endPrefixMapping"),processingInstruction:h(function(e,t){var n=this.doc.createProcessingInstruction(e,t);this.locator&&Nt(this.locator,n),bn(this,n);},"processingInstruction"),ignorableWhitespace:h(function(e,t,n){},"ignorableWhitespace"),characters:h(function(e,t,n){if(e=Vi.apply(this,arguments),e){if(this.cdata)var r=this.doc.createCDATASection(e);else var r=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(r):/^\s*$/.test(e)&&this.doc.appendChild(r),this.locator&&Nt(this.locator,r);}},"characters"),skippedEntity:h(function(e){},"skippedEntity"),endDocument:h(function(){this.doc.normalize();},"endDocument"),setDocumentLocator:h(function(e){e&&(e.lineNumber=0),this.locator=e;},"setDocumentLocator"),comment:h(function(e,t,n){e=Vi.apply(this,arguments);var r=this.doc.createComment(e);this.locator&&Nt(this.locator,r),bn(this,r);},"comment"),startCDATA:h(function(){this.cdata=true;},"startCDATA"),endCDATA:h(function(){this.cdata=false;},"endCDATA"),startDTD:h(function(e,t,n,r){var s=this.doc.implementation;if(s&&s.createDocumentType){var i=s.createDocumentType(e,t,n,r);this.locator&&Nt(this.locator,i),bn(this,i),this.doc.doctype=i;}},"startDTD"),reportError:h(function(e,t){if(typeof this.onError=="function")try{this.onError(e,t,this);}catch(n){throw new Hi("Reporting "+e+' "'+t+'" caused '+n,this.locator)}},"reportError"),warning:h(function(e){this.reportError("warning",e);},"warning"),error:h(function(e){this.reportError("error",e);},"error"),fatalError:h(function(e){throw this.reportError("fatalError",e),new Hi(e,this.locator)},"fatalError")};function Vi(e,t,n){return typeof e=="string"?e.substr(t,n):e.length>=t+n||t?new java.lang.String(e,t,n)+"":e}h(Vi,"_toString");"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(e){Nn.prototype[e]=function(){return null};});function bn(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t);}h(bn,"appendElement");function tu(e){if(e==="error")throw "onErrorStopParsing"}h(tu,"onErrorStopParsing");function nu(){throw "onWarningStopParsing"}h(nu,"onWarningStopParsing");Ct.__DOMHandler=Nn;Ct.DOMParser=Yi;Ct.normalizeLineEndings=Xi;Ct.onErrorStopParsing=tu;Ct.onWarningStopParsing=nu;});var Zi=Me(H=>{var Tt=et();H.assign=Tt.assign;H.hasDefaultHTMLNamespace=Tt.hasDefaultHTMLNamespace;H.isHTMLMimeType=Tt.isHTMLMimeType;H.isValidMimeType=Tt.isValidMimeType;H.MIME_TYPE=Tt.MIME_TYPE;H.NAMESPACE=Tt.NAMESPACE;var Cn=zt();H.DOMException=Cn.DOMException;H.DOMExceptionName=Cn.DOMExceptionName;H.ExceptionCode=Cn.ExceptionCode;H.ParseError=Cn.ParseError;var ae=pr();H.Attr=ae.Attr;H.CDATASection=ae.CDATASection;H.CharacterData=ae.CharacterData;H.Comment=ae.Comment;H.Document=ae.Document;H.DocumentFragment=ae.DocumentFragment;H.DocumentType=ae.DocumentType;H.DOMImplementation=ae.DOMImplementation;H.Element=ae.Element;H.Entity=ae.Entity;H.EntityReference=ae.EntityReference;H.LiveNodeList=ae.LiveNodeList;H.NamedNodeMap=ae.NamedNodeMap;H.Node=ae.Node;H.NodeList=ae.NodeList;H.Notation=ae.Notation;H.ProcessingInstruction=ae.ProcessingInstruction;H.Text=ae.Text;H.XMLSerializer=ae.XMLSerializer;var Tn=Qi();H.DOMParser=Tn.DOMParser;H.normalizeLineEndings=Tn.normalizeLineEndings;H.onErrorStopParsing=Tn.onErrorStopParsing;H.onWarningStopParsing=Tn.onWarningStopParsing;});var Ji=Me((Ll,xt)=>{var T=h(function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32;},"diff_match_patch"),Q=-1,Z=1,U=0;T.Diff=function(e,t){return [e,t]};T.prototype.diff_main=function(e,t,n,r){typeof r>"u"&&(this.Diff_Timeout<=0?r=Number.MAX_VALUE:r=new Date().getTime()+this.Diff_Timeout*1e3);var s=r;if(e==null||t==null)throw new Error("Null input. (diff_main)");if(e==t)return e?[new T.Diff(U,e)]:[];typeof n>"u"&&(n=true);var i=n,o=this.diff_commonPrefix(e,t),u=e.substring(0,o);e=e.substring(o),t=t.substring(o),o=this.diff_commonSuffix(e,t);var l=e.substring(e.length-o);e=e.substring(0,e.length-o),t=t.substring(0,t.length-o);var a=this.diff_compute_(e,t,i,s);return u&&a.unshift(new T.Diff(U,u)),l&&a.push(new T.Diff(U,l)),this.diff_cleanupMerge(a),a};T.prototype.diff_compute_=function(e,t,n,r){var s;if(!e)return [new T.Diff(Z,t)];if(!t)return [new T.Diff(Q,e)];var i=e.length>t.length?e:t,o=e.length>t.length?t:e,u=i.indexOf(o);if(u!=-1)return s=[new T.Diff(Z,i.substring(0,u)),new T.Diff(U,o),new T.Diff(Z,i.substring(u+o.length))],e.length>t.length&&(s[0][0]=s[2][0]=Q),s;if(o.length==1)return [new T.Diff(Q,e),new T.Diff(Z,t)];var l=this.diff_halfMatch_(e,t);if(l){var a=l[0],c=l[1],f=l[2],p=l[3],d=l[4],g=this.diff_main(a,f,n,r),m=this.diff_main(c,p,n,r);return g.concat([new T.Diff(U,d)],m)}return n&&e.length>100&&t.length>100?this.diff_lineMode_(e,t,r):this.diff_bisect_(e,t,r)};T.prototype.diff_lineMode_=function(e,t,n){var r=this.diff_linesToChars_(e,t);e=r.chars1,t=r.chars2;var s=r.lineArray,i=this.diff_main(e,t,false,n);this.diff_charsToLines_(i,s),this.diff_cleanupSemantic(i),i.push(new T.Diff(U,""));for(var o=0,u=0,l=0,a="",c="";o<i.length;){switch(i[o][0]){case Z:l++,c+=i[o][1];break;case Q:u++,a+=i[o][1];break;case U:if(u>=1&&l>=1){i.splice(o-u-l,u+l),o=o-u-l;for(var f=this.diff_main(a,c,false,n),p=f.length-1;p>=0;p--)i.splice(o,0,f[p]);o=o+f.length;}l=0,u=0,a="",c="";break}o++;}return i.pop(),i};T.prototype.diff_bisect_=function(e,t,n){for(var r=e.length,s=t.length,i=Math.ceil((r+s)/2),o=i,u=2*i,l=new Array(u),a=new Array(u),c=0;c<u;c++)l[c]=-1,a[c]=-1;l[o+1]=0,a[o+1]=0;for(var f=r-s,p=f%2!=0,d=0,g=0,m=0,b=0,D=0;D<i&&!(new Date().getTime()>n);D++){for(var w=-D+d;w<=D-g;w+=2){var v=o+w,_;w==-D||w!=D&&l[v-1]<l[v+1]?_=l[v+1]:_=l[v-1]+1;for(var A=_-w;_<r&&A<s&&e.charAt(_)==t.charAt(A);)_++,A++;if(l[v]=_,_>r)g+=2;else if(A>s)d+=2;else if(p){var E=o+f-w;if(E>=0&&E<u&&a[E]!=-1){var y=r-a[E];if(_>=y)return this.diff_bisectSplit_(e,t,_,A,n)}}}for(var N=-D+m;N<=D-b;N+=2){var E=o+N,y;N==-D||N!=D&&a[E-1]<a[E+1]?y=a[E+1]:y=a[E-1]+1;for(var C=y-N;y<r&&C<s&&e.charAt(r-y-1)==t.charAt(s-C-1);)y++,C++;if(a[E]=y,y>r)b+=2;else if(C>s)m+=2;else if(!p){var v=o+f-N;if(v>=0&&v<u&&l[v]!=-1){var _=l[v],A=o+_-v;if(y=r-y,_>=y)return this.diff_bisectSplit_(e,t,_,A,n)}}}}return [new T.Diff(Q,e),new T.Diff(Z,t)]};T.prototype.diff_bisectSplit_=function(e,t,n,r,s){var i=e.substring(0,n),o=t.substring(0,r),u=e.substring(n),l=t.substring(r),a=this.diff_main(i,o,false,s),c=this.diff_main(u,l,false,s);return a.concat(c)};T.prototype.diff_linesToChars_=function(e,t){var n=[],r={};n[0]="";function s(l){for(var a="",c=0,f=-1,p=n.length;f<l.length-1;){f=l.indexOf(`
5
+ `)}h(Zi,"normalizeLineEndings");function Ji(e){if(e=e||{},e.locator===void 0&&(e.locator=true),this.assign=e.assign||nt.assign,this.domHandler=e.domHandler||Nn,this.onError=e.onError||e.errorHandler,e.errorHandler&&typeof e.errorHandler!="function")throw new TypeError("errorHandler object is no longer supported, switch to onError!");e.errorHandler&&e.errorHandler("warning","The `errorHandler` option has been deprecated, use `onError` instead!",this),this.normalizeLineEndings=e.normalizeLineEndings||Zi,this.locator=!!e.locator,this.xmlns=this.assign(Object.create(null),e.xmlns);}h(Ji,"DOMParser");Ji.prototype.parseFromString=function(e,t){if(!tu(t))throw new TypeError('DOMParser.parseFromString: the provided mimeType "'+t+'" is not valid.');var n=this.assign(Object.create(null),this.xmlns),r=Gi.XML_ENTITIES,s=n[""]||null;Ka(t)?(r=Gi.HTML_ENTITIES,s=gr.HTML):t===Qi.XML_SVG_IMAGE&&(s=gr.SVG),n[""]=s,n.xml=n.xml||gr.XML;var i=new this.domHandler({mimeType:t,defaultNamespace:s,onError:this.onError}),o=this.locator?{}:void 0;this.locator&&i.setDocumentLocator(o);var u=new nu;u.errorHandler=i,u.domBuilder=i;var l=!nt.isHTMLMimeType(t);return l&&typeof e!="string"&&u.errorHandler.fatalError("source is not a string"),u.parse(this.normalizeLineEndings(String(e)),n,r),i.doc.documentElement||u.errorHandler.fatalError("missing root element"),i.doc};function Nn(e){var t=e||{};this.mimeType=t.mimeType||Qi.XML_APPLICATION,this.defaultNamespace=t.defaultNamespace||null,this.cdata=false,this.currentElement=void 0,this.doc=void 0,this.locator=void 0,this.onError=t.onError;}h(Nn,"DOMHandler");function Nt(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber;}h(Nt,"position");Nn.prototype={startDocument:h(function(){var e=new Ja;this.doc=eu(this.mimeType)?e.createHTMLDocument(false):e.createDocument(this.defaultNamespace,"");},"startDocument"),startElement:h(function(e,t,n,r){var s=this.doc,i=s.createElementNS(e,n||t),o=r.length;bn(this,i),this.currentElement=i,this.locator&&Nt(this.locator,i);for(var u=0;u<o;u++){var e=r.getURI(u),l=r.getValue(u),n=r.getQName(u),a=s.createAttributeNS(e,n);this.locator&&Nt(r.getLocator(u),a),a.value=a.nodeValue=l,i.setAttributeNode(a);}},"startElement"),endElement:h(function(e,t,n){this.currentElement=this.currentElement.parentNode;},"endElement"),startPrefixMapping:h(function(e,t){},"startPrefixMapping"),endPrefixMapping:h(function(e){},"endPrefixMapping"),processingInstruction:h(function(e,t){var n=this.doc.createProcessingInstruction(e,t);this.locator&&Nt(this.locator,n),bn(this,n);},"processingInstruction"),ignorableWhitespace:h(function(e,t,n){},"ignorableWhitespace"),characters:h(function(e,t,n){if(e=Yi.apply(this,arguments),e){if(this.cdata)var r=this.doc.createCDATASection(e);else var r=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(r):/^\s*$/.test(e)&&this.doc.appendChild(r),this.locator&&Nt(this.locator,r);}},"characters"),skippedEntity:h(function(e){},"skippedEntity"),endDocument:h(function(){this.doc.normalize();},"endDocument"),setDocumentLocator:h(function(e){e&&(e.lineNumber=0),this.locator=e;},"setDocumentLocator"),comment:h(function(e,t,n){e=Yi.apply(this,arguments);var r=this.doc.createComment(e);this.locator&&Nt(this.locator,r),bn(this,r);},"comment"),startCDATA:h(function(){this.cdata=true;},"startCDATA"),endCDATA:h(function(){this.cdata=false;},"endCDATA"),startDTD:h(function(e,t,n,r){var s=this.doc.implementation;if(s&&s.createDocumentType){var i=s.createDocumentType(e,t,n,r);this.locator&&Nt(this.locator,i),bn(this,i),this.doc.doctype=i;}},"startDTD"),reportError:h(function(e,t){if(typeof this.onError=="function")try{this.onError(e,t,this);}catch(n){throw new Xi("Reporting "+e+' "'+t+'" caused '+n,this.locator)}},"reportError"),warning:h(function(e){this.reportError("warning",e);},"warning"),error:h(function(e){this.reportError("error",e);},"error"),fatalError:h(function(e){throw this.reportError("fatalError",e),new Xi(e,this.locator)},"fatalError")};function Yi(e,t,n){return typeof e=="string"?e.substr(t,n):e.length>=t+n||t?new java.lang.String(e,t,n)+"":e}h(Yi,"_toString");"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(e){Nn.prototype[e]=function(){return null};});function bn(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t);}h(bn,"appendElement");function ru(e){if(e==="error")throw "onErrorStopParsing"}h(ru,"onErrorStopParsing");function iu(){throw "onWarningStopParsing"}h(iu,"onWarningStopParsing");Ct.__DOMHandler=Nn;Ct.DOMParser=Ji;Ct.normalizeLineEndings=Zi;Ct.onErrorStopParsing=ru;Ct.onWarningStopParsing=iu;});var es=Ie(H=>{var Tt=et();H.assign=Tt.assign;H.hasDefaultHTMLNamespace=Tt.hasDefaultHTMLNamespace;H.isHTMLMimeType=Tt.isHTMLMimeType;H.isValidMimeType=Tt.isValidMimeType;H.MIME_TYPE=Tt.MIME_TYPE;H.NAMESPACE=Tt.NAMESPACE;var Cn=zt();H.DOMException=Cn.DOMException;H.DOMExceptionName=Cn.DOMExceptionName;H.ExceptionCode=Cn.ExceptionCode;H.ParseError=Cn.ParseError;var ae=dr();H.Attr=ae.Attr;H.CDATASection=ae.CDATASection;H.CharacterData=ae.CharacterData;H.Comment=ae.Comment;H.Document=ae.Document;H.DocumentFragment=ae.DocumentFragment;H.DocumentType=ae.DocumentType;H.DOMImplementation=ae.DOMImplementation;H.Element=ae.Element;H.Entity=ae.Entity;H.EntityReference=ae.EntityReference;H.LiveNodeList=ae.LiveNodeList;H.NamedNodeMap=ae.NamedNodeMap;H.Node=ae.Node;H.NodeList=ae.NodeList;H.Notation=ae.Notation;H.ProcessingInstruction=ae.ProcessingInstruction;H.Text=ae.Text;H.XMLSerializer=ae.XMLSerializer;var Tn=Ki();H.DOMParser=Tn.DOMParser;H.normalizeLineEndings=Tn.normalizeLineEndings;H.onErrorStopParsing=Tn.onErrorStopParsing;H.onWarningStopParsing=Tn.onWarningStopParsing;});var ts=Ie((ql,xt)=>{var T=h(function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32;},"diff_match_patch"),Q=-1,Z=1,U=0;T.Diff=function(e,t){return [e,t]};T.prototype.diff_main=function(e,t,n,r){typeof r>"u"&&(this.Diff_Timeout<=0?r=Number.MAX_VALUE:r=new Date().getTime()+this.Diff_Timeout*1e3);var s=r;if(e==null||t==null)throw new Error("Null input. (diff_main)");if(e==t)return e?[new T.Diff(U,e)]:[];typeof n>"u"&&(n=true);var i=n,o=this.diff_commonPrefix(e,t),u=e.substring(0,o);e=e.substring(o),t=t.substring(o),o=this.diff_commonSuffix(e,t);var l=e.substring(e.length-o);e=e.substring(0,e.length-o),t=t.substring(0,t.length-o);var a=this.diff_compute_(e,t,i,s);return u&&a.unshift(new T.Diff(U,u)),l&&a.push(new T.Diff(U,l)),this.diff_cleanupMerge(a),a};T.prototype.diff_compute_=function(e,t,n,r){var s;if(!e)return [new T.Diff(Z,t)];if(!t)return [new T.Diff(Q,e)];var i=e.length>t.length?e:t,o=e.length>t.length?t:e,u=i.indexOf(o);if(u!=-1)return s=[new T.Diff(Z,i.substring(0,u)),new T.Diff(U,o),new T.Diff(Z,i.substring(u+o.length))],e.length>t.length&&(s[0][0]=s[2][0]=Q),s;if(o.length==1)return [new T.Diff(Q,e),new T.Diff(Z,t)];var l=this.diff_halfMatch_(e,t);if(l){var a=l[0],c=l[1],f=l[2],p=l[3],d=l[4],g=this.diff_main(a,f,n,r),m=this.diff_main(c,p,n,r);return g.concat([new T.Diff(U,d)],m)}return n&&e.length>100&&t.length>100?this.diff_lineMode_(e,t,r):this.diff_bisect_(e,t,r)};T.prototype.diff_lineMode_=function(e,t,n){var r=this.diff_linesToChars_(e,t);e=r.chars1,t=r.chars2;var s=r.lineArray,i=this.diff_main(e,t,false,n);this.diff_charsToLines_(i,s),this.diff_cleanupSemantic(i),i.push(new T.Diff(U,""));for(var o=0,u=0,l=0,a="",c="";o<i.length;){switch(i[o][0]){case Z:l++,c+=i[o][1];break;case Q:u++,a+=i[o][1];break;case U:if(u>=1&&l>=1){i.splice(o-u-l,u+l),o=o-u-l;for(var f=this.diff_main(a,c,false,n),p=f.length-1;p>=0;p--)i.splice(o,0,f[p]);o=o+f.length;}l=0,u=0,a="",c="";break}o++;}return i.pop(),i};T.prototype.diff_bisect_=function(e,t,n){for(var r=e.length,s=t.length,i=Math.ceil((r+s)/2),o=i,u=2*i,l=new Array(u),a=new Array(u),c=0;c<u;c++)l[c]=-1,a[c]=-1;l[o+1]=0,a[o+1]=0;for(var f=r-s,p=f%2!=0,d=0,g=0,m=0,b=0,D=0;D<i&&!(new Date().getTime()>n);D++){for(var w=-D+d;w<=D-g;w+=2){var v=o+w,_;w==-D||w!=D&&l[v-1]<l[v+1]?_=l[v+1]:_=l[v-1]+1;for(var A=_-w;_<r&&A<s&&e.charAt(_)==t.charAt(A);)_++,A++;if(l[v]=_,_>r)g+=2;else if(A>s)d+=2;else if(p){var E=o+f-w;if(E>=0&&E<u&&a[E]!=-1){var y=r-a[E];if(_>=y)return this.diff_bisectSplit_(e,t,_,A,n)}}}for(var N=-D+m;N<=D-b;N+=2){var E=o+N,y;N==-D||N!=D&&a[E-1]<a[E+1]?y=a[E+1]:y=a[E-1]+1;for(var C=y-N;y<r&&C<s&&e.charAt(r-y-1)==t.charAt(s-C-1);)y++,C++;if(a[E]=y,y>r)b+=2;else if(C>s)m+=2;else if(!p){var v=o+f-N;if(v>=0&&v<u&&l[v]!=-1){var _=l[v],A=o+_-v;if(y=r-y,_>=y)return this.diff_bisectSplit_(e,t,_,A,n)}}}}return [new T.Diff(Q,e),new T.Diff(Z,t)]};T.prototype.diff_bisectSplit_=function(e,t,n,r,s){var i=e.substring(0,n),o=t.substring(0,r),u=e.substring(n),l=t.substring(r),a=this.diff_main(i,o,false,s),c=this.diff_main(u,l,false,s);return a.concat(c)};T.prototype.diff_linesToChars_=function(e,t){var n=[],r={};n[0]="";function s(l){for(var a="",c=0,f=-1,p=n.length;f<l.length-1;){f=l.indexOf(`
6
6
  `,c),f==-1&&(f=l.length-1);var d=l.substring(c,f+1);(r.hasOwnProperty?r.hasOwnProperty(d):r[d]!==void 0)?a+=String.fromCharCode(r[d]):(p==i&&(d=l.substring(c),f=l.length),a+=String.fromCharCode(p),r[d]=p,n[p++]=d),c=f+1;}return a}h(s,"diff_linesToCharsMunge_");var i=4e4,o=s(e);i=65535;var u=s(t);return {chars1:o,chars2:u,lineArray:n}};T.prototype.diff_charsToLines_=function(e,t){for(var n=0;n<e.length;n++){for(var r=e[n][1],s=[],i=0;i<r.length;i++)s[i]=t[r.charCodeAt(i)];e[n][1]=s.join("");}};T.prototype.diff_commonPrefix=function(e,t){if(!e||!t||e.charAt(0)!=t.charAt(0))return 0;for(var n=0,r=Math.min(e.length,t.length),s=r,i=0;n<s;)e.substring(i,s)==t.substring(i,s)?(n=s,i=n):r=s,s=Math.floor((r-n)/2+n);return s};T.prototype.diff_commonSuffix=function(e,t){if(!e||!t||e.charAt(e.length-1)!=t.charAt(t.length-1))return 0;for(var n=0,r=Math.min(e.length,t.length),s=r,i=0;n<s;)e.substring(e.length-s,e.length-i)==t.substring(t.length-s,t.length-i)?(n=s,i=n):r=s,s=Math.floor((r-n)/2+n);return s};T.prototype.diff_commonOverlap_=function(e,t){var n=e.length,r=t.length;if(n==0||r==0)return 0;n>r?e=e.substring(n-r):n<r&&(t=t.substring(0,n));var s=Math.min(n,r);if(e==t)return s;for(var i=0,o=1;;){var u=e.substring(s-o),l=t.indexOf(u);if(l==-1)return i;o+=l,(l==0||e.substring(s-o)==t.substring(0,o))&&(i=o,o++);}};T.prototype.diff_halfMatch_=function(e,t){if(this.Diff_Timeout<=0)return null;var n=e.length>t.length?e:t,r=e.length>t.length?t:e;if(n.length<4||r.length*2<n.length)return null;var s=this;function i(g,m,b){for(var D=g.substring(b,b+Math.floor(g.length/4)),w=-1,v="",_,A,E,y;(w=m.indexOf(D,w+1))!=-1;){var N=s.diff_commonPrefix(g.substring(b),m.substring(w)),C=s.diff_commonSuffix(g.substring(0,b),m.substring(0,w));v.length<C+N&&(v=m.substring(w-C,w)+m.substring(w,w+N),_=g.substring(0,b-C),A=g.substring(b+N),E=m.substring(0,w-C),y=m.substring(w+N));}return v.length*2>=g.length?[_,A,E,y,v]:null}h(i,"diff_halfMatchI_");var o=i(n,r,Math.ceil(n.length/4)),u=i(n,r,Math.ceil(n.length/2)),l;if(!o&&!u)return null;u?o?l=o[4].length>u[4].length?o:u:l=u:l=o;var a,c,f,p;e.length>t.length?(a=l[0],c=l[1],f=l[2],p=l[3]):(f=l[0],p=l[1],a=l[2],c=l[3]);var d=l[4];return [a,c,f,p,d]};T.prototype.diff_cleanupSemantic=function(e){for(var t=false,n=[],r=0,s=null,i=0,o=0,u=0,l=0,a=0;i<e.length;)e[i][0]==U?(n[r++]=i,o=l,u=a,l=0,a=0,s=e[i][1]):(e[i][0]==Z?l+=e[i][1].length:a+=e[i][1].length,s&&s.length<=Math.max(o,u)&&s.length<=Math.max(l,a)&&(e.splice(n[r-1],0,new T.Diff(Q,s)),e[n[r-1]+1][0]=Z,r--,r--,i=r>0?n[r-1]:-1,o=0,u=0,l=0,a=0,s=null,t=true)),i++;for(t&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),i=1;i<e.length;){if(e[i-1][0]==Q&&e[i][0]==Z){var c=e[i-1][1],f=e[i][1],p=this.diff_commonOverlap_(c,f),d=this.diff_commonOverlap_(f,c);p>=d?(p>=c.length/2||p>=f.length/2)&&(e.splice(i,0,new T.Diff(U,f.substring(0,p))),e[i-1][1]=c.substring(0,c.length-p),e[i+1][1]=f.substring(p),i++):(d>=c.length/2||d>=f.length/2)&&(e.splice(i,0,new T.Diff(U,c.substring(0,d))),e[i-1][0]=Z,e[i-1][1]=f.substring(0,f.length-d),e[i+1][0]=Q,e[i+1][1]=c.substring(d),i++),i++;}i++;}};T.prototype.diff_cleanupSemanticLossless=function(e){function t(d,g){if(!d||!g)return 6;var m=d.charAt(d.length-1),b=g.charAt(0),D=m.match(T.nonAlphaNumericRegex_),w=b.match(T.nonAlphaNumericRegex_),v=D&&m.match(T.whitespaceRegex_),_=w&&b.match(T.whitespaceRegex_),A=v&&m.match(T.linebreakRegex_),E=_&&b.match(T.linebreakRegex_),y=A&&d.match(T.blanklineEndRegex_),N=E&&g.match(T.blanklineStartRegex_);return y||N?5:A||E?4:D&&!v&&_?3:v||_?2:D||w?1:0}h(t,"diff_cleanupSemanticScore_");for(var n=1;n<e.length-1;){if(e[n-1][0]==U&&e[n+1][0]==U){var r=e[n-1][1],s=e[n][1],i=e[n+1][1],o=this.diff_commonSuffix(r,s);if(o){var u=s.substring(s.length-o);r=r.substring(0,r.length-o),s=u+s.substring(0,s.length-o),i=u+i;}for(var l=r,a=s,c=i,f=t(r,s)+t(s,i);s.charAt(0)===i.charAt(0);){r+=s.charAt(0),s=s.substring(1)+i.charAt(0),i=i.substring(1);var p=t(r,s)+t(s,i);p>=f&&(f=p,l=r,a=s,c=i);}e[n-1][1]!=l&&(l?e[n-1][1]=l:(e.splice(n-1,1),n--),e[n][1]=a,c?e[n+1][1]=c:(e.splice(n+1,1),n--));}n++;}};T.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/;T.whitespaceRegex_=/\s/;T.linebreakRegex_=/[\r\n]/;T.blanklineEndRegex_=/\n\r?\n$/;T.blanklineStartRegex_=/^\r?\n\r?\n/;T.prototype.diff_cleanupEfficiency=function(e){for(var t=false,n=[],r=0,s=null,i=0,o=false,u=false,l=false,a=false;i<e.length;)e[i][0]==U?(e[i][1].length<this.Diff_EditCost&&(l||a)?(n[r++]=i,o=l,u=a,s=e[i][1]):(r=0,s=null),l=a=false):(e[i][0]==Q?a=true:l=true,s&&(o&&u&&l&&a||s.length<this.Diff_EditCost/2&&o+u+l+a==3)&&(e.splice(n[r-1],0,new T.Diff(Q,s)),e[n[r-1]+1][0]=Z,r--,s=null,o&&u?(l=a=true,r=0):(r--,i=r>0?n[r-1]:-1,l=a=false),t=true)),i++;t&&this.diff_cleanupMerge(e);};T.prototype.diff_cleanupMerge=function(e){e.push(new T.Diff(U,""));for(var t=0,n=0,r=0,s="",i="",o;t<e.length;)switch(e[t][0]){case Z:r++,i+=e[t][1],t++;break;case Q:n++,s+=e[t][1],t++;break;case U:n+r>1?(n!==0&&r!==0&&(o=this.diff_commonPrefix(i,s),o!==0&&(t-n-r>0&&e[t-n-r-1][0]==U?e[t-n-r-1][1]+=i.substring(0,o):(e.splice(0,0,new T.Diff(U,i.substring(0,o))),t++),i=i.substring(o),s=s.substring(o)),o=this.diff_commonSuffix(i,s),o!==0&&(e[t][1]=i.substring(i.length-o)+e[t][1],i=i.substring(0,i.length-o),s=s.substring(0,s.length-o))),t-=n+r,e.splice(t,n+r),s.length&&(e.splice(t,0,new T.Diff(Q,s)),t++),i.length&&(e.splice(t,0,new T.Diff(Z,i)),t++),t++):t!==0&&e[t-1][0]==U?(e[t-1][1]+=e[t][1],e.splice(t,1)):t++,r=0,n=0,s="",i="";break}e[e.length-1][1]===""&&e.pop();var u=false;for(t=1;t<e.length-1;)e[t-1][0]==U&&e[t+1][0]==U&&(e[t][1].substring(e[t][1].length-e[t-1][1].length)==e[t-1][1]?(e[t][1]=e[t-1][1]+e[t][1].substring(0,e[t][1].length-e[t-1][1].length),e[t+1][1]=e[t-1][1]+e[t+1][1],e.splice(t-1,1),u=true):e[t][1].substring(0,e[t+1][1].length)==e[t+1][1]&&(e[t-1][1]+=e[t+1][1],e[t][1]=e[t][1].substring(e[t+1][1].length)+e[t+1][1],e.splice(t+1,1),u=true)),t++;u&&this.diff_cleanupMerge(e);};T.prototype.diff_xIndex=function(e,t){var n=0,r=0,s=0,i=0,o;for(o=0;o<e.length&&(e[o][0]!==Z&&(n+=e[o][1].length),e[o][0]!==Q&&(r+=e[o][1].length),!(n>t));o++)s=n,i=r;return e.length!=o&&e[o][0]===Q?i:i+(t-s)};T.prototype.diff_prettyHtml=function(e){for(var t=[],n=/&/g,r=/</g,s=/>/g,i=/\n/g,o=0;o<e.length;o++){var u=e[o][0],l=e[o][1],a=l.replace(n,"&amp;").replace(r,"&lt;").replace(s,"&gt;").replace(i,"&para;<br>");switch(u){case Z:t[o]='<ins style="background:#e6ffe6;">'+a+"</ins>";break;case Q:t[o]='<del style="background:#ffe6e6;">'+a+"</del>";break;case U:t[o]="<span>"+a+"</span>";break}}return t.join("")};T.prototype.diff_text1=function(e){for(var t=[],n=0;n<e.length;n++)e[n][0]!==Z&&(t[n]=e[n][1]);return t.join("")};T.prototype.diff_text2=function(e){for(var t=[],n=0;n<e.length;n++)e[n][0]!==Q&&(t[n]=e[n][1]);return t.join("")};T.prototype.diff_levenshtein=function(e){for(var t=0,n=0,r=0,s=0;s<e.length;s++){var i=e[s][0],o=e[s][1];switch(i){case Z:n+=o.length;break;case Q:r+=o.length;break;case U:t+=Math.max(n,r),n=0,r=0;break}}return t+=Math.max(n,r),t};T.prototype.diff_toDelta=function(e){for(var t=[],n=0;n<e.length;n++)switch(e[n][0]){case Z:t[n]="+"+encodeURI(e[n][1]);break;case Q:t[n]="-"+e[n][1].length;break;case U:t[n]="="+e[n][1].length;break}return t.join(" ").replace(/%20/g," ")};T.prototype.diff_fromDelta=function(e,t){for(var n=[],r=0,s=0,i=t.split(/\t/g),o=0;o<i.length;o++){var u=i[o].substring(1);switch(i[o].charAt(0)){case "+":try{n[r++]=new T.Diff(Z,decodeURI(u));}catch{throw new Error("Illegal escape in diff_fromDelta: "+u)}break;case "-":case "=":var l=parseInt(u,10);if(isNaN(l)||l<0)throw new Error("Invalid number in diff_fromDelta: "+u);var a=e.substring(s,s+=l);i[o].charAt(0)=="="?n[r++]=new T.Diff(U,a):n[r++]=new T.Diff(Q,a);break;default:if(i[o])throw new Error("Invalid diff operation in diff_fromDelta: "+i[o])}}if(s!=e.length)throw new Error("Delta length ("+s+") does not equal source text length ("+e.length+").");return n};T.prototype.match_main=function(e,t,n){if(e==null||t==null||n==null)throw new Error("Null input. (match_main)");return n=Math.max(0,Math.min(n,e.length)),e==t?0:e.length?e.substring(n,n+t.length)==t?n:this.match_bitap_(e,t,n):-1};T.prototype.match_bitap_=function(e,t,n){if(t.length>this.Match_MaxBits)throw new Error("Pattern too long for this browser.");var r=this.match_alphabet_(t),s=this;function i(_,A){var E=_/t.length,y=Math.abs(n-A);return s.Match_Distance?E+y/s.Match_Distance:y?1:E}h(i,"match_bitapScore_");var o=this.Match_Threshold,u=e.indexOf(t,n);u!=-1&&(o=Math.min(i(0,u),o),u=e.lastIndexOf(t,n+t.length),u!=-1&&(o=Math.min(i(0,u),o)));var l=1<<t.length-1;u=-1;for(var a,c,f=t.length+e.length,p,d=0;d<t.length;d++){for(a=0,c=f;a<c;)i(d,n+c)<=o?a=c:f=c,c=Math.floor((f-a)/2+a);f=c;var g=Math.max(1,n-c+1),m=Math.min(n+c,e.length)+t.length,b=Array(m+2);b[m+1]=(1<<d)-1;for(var D=m;D>=g;D--){var w=r[e.charAt(D-1)];if(d===0?b[D]=(b[D+1]<<1|1)&w:b[D]=(b[D+1]<<1|1)&w|((p[D+1]|p[D])<<1|1)|p[D+1],b[D]&l){var v=i(d,D-1);if(v<=o)if(o=v,u=D-1,u>n)g=Math.max(1,2*n-u);else break}}if(i(d+1,n)>o)break;p=b;}return u};T.prototype.match_alphabet_=function(e){for(var t={},n=0;n<e.length;n++)t[e.charAt(n)]=0;for(var n=0;n<e.length;n++)t[e.charAt(n)]|=1<<e.length-n-1;return t};T.prototype.patch_addContext_=function(e,t){if(t.length!=0){if(e.start2===null)throw Error("patch not initialized");for(var n=t.substring(e.start2,e.start2+e.length1),r=0;t.indexOf(n)!=t.lastIndexOf(n)&&n.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)r+=this.Patch_Margin,n=t.substring(e.start2-r,e.start2+e.length1+r);r+=this.Patch_Margin;var s=t.substring(e.start2-r,e.start2);s&&e.diffs.unshift(new T.Diff(U,s));var i=t.substring(e.start2+e.length1,e.start2+e.length1+r);i&&e.diffs.push(new T.Diff(U,i)),e.start1-=s.length,e.start2-=s.length,e.length1+=s.length+i.length,e.length2+=s.length+i.length;}};T.prototype.patch_make=function(e,t,n){var r,s;if(typeof e=="string"&&typeof t=="string"&&typeof n>"u")r=e,s=this.diff_main(r,t,true),s.length>2&&(this.diff_cleanupSemantic(s),this.diff_cleanupEfficiency(s));else if(e&&typeof e=="object"&&typeof t>"u"&&typeof n>"u")s=e,r=this.diff_text1(s);else if(typeof e=="string"&&t&&typeof t=="object"&&typeof n>"u")r=e,s=t;else if(typeof e=="string"&&typeof t=="string"&&n&&typeof n=="object")r=e,s=n;else throw new Error("Unknown call format to patch_make.");if(s.length===0)return [];for(var i=[],o=new T.patch_obj,u=0,l=0,a=0,c=r,f=r,p=0;p<s.length;p++){var d=s[p][0],g=s[p][1];switch(!u&&d!==U&&(o.start1=l,o.start2=a),d){case Z:o.diffs[u++]=s[p],o.length2+=g.length,f=f.substring(0,a)+g+f.substring(a);break;case Q:o.length1+=g.length,o.diffs[u++]=s[p],f=f.substring(0,a)+f.substring(a+g.length);break;case U:g.length<=2*this.Patch_Margin&&u&&s.length!=p+1?(o.diffs[u++]=s[p],o.length1+=g.length,o.length2+=g.length):g.length>=2*this.Patch_Margin&&u&&(this.patch_addContext_(o,c),i.push(o),o=new T.patch_obj,u=0,c=f,l=a);break}d!==Z&&(l+=g.length),d!==Q&&(a+=g.length);}return u&&(this.patch_addContext_(o,c),i.push(o)),i};T.prototype.patch_deepCopy=function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n],s=new T.patch_obj;s.diffs=[];for(var i=0;i<r.diffs.length;i++)s.diffs[i]=new T.Diff(r.diffs[i][0],r.diffs[i][1]);s.start1=r.start1,s.start2=r.start2,s.length1=r.length1,s.length2=r.length2,t[n]=s;}return t};T.prototype.patch_apply=function(e,t){if(e.length==0)return [t,[]];e=this.patch_deepCopy(e);var n=this.patch_addPadding(e);t=n+t+n,this.patch_splitMax(e);for(var r=0,s=[],i=0;i<e.length;i++){var o=e[i].start2+r,u=this.diff_text1(e[i].diffs),l,a=-1;if(u.length>this.Match_MaxBits?(l=this.match_main(t,u.substring(0,this.Match_MaxBits),o),l!=-1&&(a=this.match_main(t,u.substring(u.length-this.Match_MaxBits),o+u.length-this.Match_MaxBits),(a==-1||l>=a)&&(l=-1))):l=this.match_main(t,u,o),l==-1)s[i]=false,r-=e[i].length2-e[i].length1;else {s[i]=true,r=l-o;var c;if(a==-1?c=t.substring(l,l+u.length):c=t.substring(l,a+this.Match_MaxBits),u==c)t=t.substring(0,l)+this.diff_text2(e[i].diffs)+t.substring(l+u.length);else {var f=this.diff_main(u,c,false);if(u.length>this.Match_MaxBits&&this.diff_levenshtein(f)/u.length>this.Patch_DeleteThreshold)s[i]=false;else {this.diff_cleanupSemanticLossless(f);for(var p=0,d,g=0;g<e[i].diffs.length;g++){var m=e[i].diffs[g];m[0]!==U&&(d=this.diff_xIndex(f,p)),m[0]===Z?t=t.substring(0,l+d)+m[1]+t.substring(l+d):m[0]===Q&&(t=t.substring(0,l+d)+t.substring(l+this.diff_xIndex(f,p+m[1].length))),m[0]!==Q&&(p+=m[1].length);}}}}}return t=t.substring(n.length,t.length-n.length),[t,s]};T.prototype.patch_addPadding=function(e){for(var t=this.Patch_Margin,n="",r=1;r<=t;r++)n+=String.fromCharCode(r);for(var r=0;r<e.length;r++)e[r].start1+=t,e[r].start2+=t;var s=e[0],i=s.diffs;if(i.length==0||i[0][0]!=U)i.unshift(new T.Diff(U,n)),s.start1-=t,s.start2-=t,s.length1+=t,s.length2+=t;else if(t>i[0][1].length){var o=t-i[0][1].length;i[0][1]=n.substring(i[0][1].length)+i[0][1],s.start1-=o,s.start2-=o,s.length1+=o,s.length2+=o;}if(s=e[e.length-1],i=s.diffs,i.length==0||i[i.length-1][0]!=U)i.push(new T.Diff(U,n)),s.length1+=t,s.length2+=t;else if(t>i[i.length-1][1].length){var o=t-i[i.length-1][1].length;i[i.length-1][1]+=n.substring(0,o),s.length1+=o,s.length2+=o;}return n};T.prototype.patch_splitMax=function(e){for(var t=this.Match_MaxBits,n=0;n<e.length;n++)if(!(e[n].length1<=t)){var r=e[n];e.splice(n--,1);for(var s=r.start1,i=r.start2,o="";r.diffs.length!==0;){var u=new T.patch_obj,l=true;for(u.start1=s-o.length,u.start2=i-o.length,o!==""&&(u.length1=u.length2=o.length,u.diffs.push(new T.Diff(U,o)));r.diffs.length!==0&&u.length1<t-this.Patch_Margin;){var a=r.diffs[0][0],c=r.diffs[0][1];a===Z?(u.length2+=c.length,i+=c.length,u.diffs.push(r.diffs.shift()),l=false):a===Q&&u.diffs.length==1&&u.diffs[0][0]==U&&c.length>2*t?(u.length1+=c.length,s+=c.length,l=false,u.diffs.push(new T.Diff(a,c)),r.diffs.shift()):(c=c.substring(0,t-u.length1-this.Patch_Margin),u.length1+=c.length,s+=c.length,a===U?(u.length2+=c.length,i+=c.length):l=false,u.diffs.push(new T.Diff(a,c)),c==r.diffs[0][1]?r.diffs.shift():r.diffs[0][1]=r.diffs[0][1].substring(c.length));}o=this.diff_text2(u.diffs),o=o.substring(o.length-this.Patch_Margin);var f=this.diff_text1(r.diffs).substring(0,this.Patch_Margin);f!==""&&(u.length1+=f.length,u.length2+=f.length,u.diffs.length!==0&&u.diffs[u.diffs.length-1][0]===U?u.diffs[u.diffs.length-1][1]+=f:u.diffs.push(new T.Diff(U,f))),l||e.splice(++n,0,u);}}};T.prototype.patch_toText=function(e){for(var t=[],n=0;n<e.length;n++)t[n]=e[n];return t.join("")};T.prototype.patch_fromText=function(e){var t=[];if(!e)return t;for(var n=e.split(`
7
7
  `),r=0,s=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;r<n.length;){var i=n[r].match(s);if(!i)throw new Error("Invalid patch string: "+n[r]);var o=new T.patch_obj;for(t.push(o),o.start1=parseInt(i[1],10),i[2]===""?(o.start1--,o.length1=1):i[2]=="0"?o.length1=0:(o.start1--,o.length1=parseInt(i[2],10)),o.start2=parseInt(i[3],10),i[4]===""?(o.start2--,o.length2=1):i[4]=="0"?o.length2=0:(o.start2--,o.length2=parseInt(i[4],10)),r++;r<n.length;){var u=n[r].charAt(0);try{var l=decodeURI(n[r].substring(1));}catch{throw new Error("Illegal escape in patch_fromText: "+l)}if(u=="-")o.diffs.push(new T.Diff(Q,l));else if(u=="+")o.diffs.push(new T.Diff(Z,l));else if(u==" ")o.diffs.push(new T.Diff(U,l));else {if(u=="@")break;if(u!=="")throw new Error('Invalid patch mode "'+u+'" in: '+l)}r++;}}return t};T.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0;};T.patch_obj.prototype.toString=function(){var e,t;this.length1===0?e=this.start1+",0":this.length1==1?e=this.start1+1:e=this.start1+1+","+this.length1,this.length2===0?t=this.start2+",0":this.length2==1?t=this.start2+1:t=this.start2+1+","+this.length2;for(var n=["@@ -"+e+" +"+t+` @@
8
8
  `],r,s=0;s<this.diffs.length;s++){switch(this.diffs[s][0]){case Z:r="+";break;case Q:r="-";break;case U:r=" ";break}n[s+1]=r+encodeURI(this.diffs[s][1])+`
9
- `;}return n.join("").replace(/%20/g," ")};xt.exports=T;xt.exports.diff_match_patch=T;xt.exports.DIFF_DELETE=Q;xt.exports.DIFF_INSERT=Z;xt.exports.DIFF_EQUAL=U;});var js=module$1.createRequire("/"),lt,Ws,Hs;try{lt=js("worker_threads"),Ws=lt.Worker,Hs=lt.isMarkedAsUntransferable;}catch{}var te=Uint8Array,we=Uint16Array,Yn=Int32Array,an=new te([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),un=new te([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),jn=new te([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Mr=h(function(e,t){for(var n=new we(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];for(var s=new Yn(n[30]),r=1;r<30;++r)for(var i=n[r];i<n[r+1];++i)s[i]=i-n[r]<<5|r;return {b:n,r:s}},"freb"),lt=Mr(an,2),Rr=lt.b,Wn=lt.r;Rr[28]=258,Wn[258]=28;var Br=Mr(un,0),Vs=Br.b,Ir=Br.r,Hn=new we(32768);for(V=0;V<32768;++V)Re=(V&43690)>>1|(V&21845)<<1,Re=(Re&52428)>>2|(Re&13107)<<2,Re=(Re&61680)>>4|(Re&3855)<<4,Hn[V]=((Re&65280)>>8|(Re&255)<<8)>>1;var Re,V,Se=h((function(e,t,n){for(var r=e.length,s=0,i=new we(t);s<r;++s)e[s]&&++i[e[s]-1];var o=new we(t);for(s=1;s<t;++s)o[s]=o[s-1]+i[s-1]<<1;var u;if(n){u=new we(1<<t);var l=15-t;for(s=0;s<r;++s)if(e[s])for(var a=s<<4|e[s],c=t-e[s],f=o[e[s]-1]++<<c,p=f|(1<<c)-1;f<=p;++f)u[Hn[f]>>l]=a;}else for(u=new we(r),s=0;s<r;++s)e[s]&&(u[s]=Hn[o[e[s]-1]++]>>15-e[s]);return u}),"hMap"),ze=new te(288);for(V=0;V<144;++V)ze[V]=8;var V;for(V=144;V<256;++V)ze[V]=9;var V;for(V=256;V<280;++V)ze[V]=7;var V;for(V=280;V<288;++V)ze[V]=8;var V,Mt=new te(32);for(V=0;V<32;++V)Mt[V]=5;var V,Gs=Se(ze,9,0),Xs=Se(ze,9,1),Ys=Se(Mt,5,0),Qs=Se(Mt,5,1),$n=h(function(e){for(var t=e[0],n=1;n<e.length;++n)e[n]>t&&(t=e[n]);return t},"max"),Te=h(function(e,t,n){var r=t/8|0;return (e[r]|e[r+1]<<8)>>(t&7)&n},"bits"),Un=h(function(e,t){var n=t/8|0;return (e[n]|e[n+1]<<8|e[n+2]<<16)>>(t&7)},"bits16"),Qn=h(function(e){return (e+7)/8|0},"shft"),Rt=h(function(e,t,n){return (t==null||t<0)&&(t=0),(n==null||n>e.length)&&(n=e.length),new te(e.subarray(t,n))},"slc");var Zs=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],he=h(function(e,t,n){var r=new Error(t||Zs[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,he),!n)throw r;return r},"err"),Js=h(function(e,t,n,r){var s=e.length,i=r?r.length:0;if(!s||t.f&&!t.l)return n||new te(0);var o=!n,u=o||t.i!=2,l=t.i;o&&(n=new te(s*3));var a=h(function(St){var Ot=n.length;if(St>Ot){var ut=new te(Math.max(Ot*2,St));ut.set(n),n=ut;}},"cbuf"),c=t.f||0,f=t.p||0,p=t.b||0,d=t.l,g=t.d,m=t.m,b=t.n,D=s*8;do{if(!d){c=Te(e,f,1);var w=Te(e,f+1,3);if(f+=3,w)if(w==1)d=Xs,g=Qs,m=9,b=5;else if(w==2){var E=Te(e,f,31)+257,y=Te(e,f+10,15)+4,N=E+Te(e,f+5,31)+1;f+=14;for(var C=new te(N),F=new te(19),P=0;P<y;++P)F[jn[P]]=Te(e,f+P*3,7);f+=y*3;for(var R=$n(F),j=(1<<R)-1,O=Se(F,R,1),P=0;P<N;){var G=O[Te(e,f,j)];f+=G&15;var v=G>>4;if(v<16)C[P++]=v;else {var z=0,L=0;for(v==16?(L=3+Te(e,f,3),f+=2,z=C[P-1]):v==17?(L=3+Te(e,f,7),f+=3):v==18&&(L=11+Te(e,f,127),f+=7);L--;)C[P++]=z;}}var Y=C.subarray(0,E),S=C.subarray(E);m=$n(Y),b=$n(S),d=Se(Y,m,1),g=Se(S,b,1);}else he(1);else {var v=Qn(f)+4,_=e[v-4]|e[v-3]<<8,A=v+_;if(A>s){l&&he(0);break}u&&a(p+_),n.set(e.subarray(v,A),p),t.b=p+=_,t.p=f=A*8,t.f=c;continue}if(f>D){l&&he(0);break}}u&&a(p+131072);for(var J=(1<<m)-1,ie=(1<<b)-1,se=f;;se=f){var z=d[Un(e,f)&J],_e=z>>4;if(f+=z&15,f>D){l&&he(0);break}if(z||he(2),_e<256)n[p++]=_e;else if(_e==256){se=f,d=null;break}else {var ve=_e-254;if(_e>264){var P=_e-257,ee=an[P];ve=Te(e,f,(1<<ee)-1)+Rr[P],f+=ee;}var xe=g[Un(e,f)&ie],ot=xe>>4;xe||he(3),f+=xe&15;var S=Vs[ot];if(ot>3){var ee=un[ot];S+=Un(e,f)&(1<<ee)-1,f+=ee;}if(f>D){l&&he(0);break}u&&a(p+131072);var at=p+ve;if(p<S){var rn=i-S,sn=Math.min(S,at);for(rn+p<0&&he(3);p<sn;++p)n[p]=r[rn+p];}for(;p<at;++p)n[p]=n[p-S];}}t.l=d,t.p=se,t.b=p,t.f=c,d&&(c=1,t.m=m,t.d=g,t.n=b);}while(!c);return p!=n.length&&o?Rt(n,0,p):n.subarray(0,p)},"inflt"),Be=h(function(e,t,n){n<<=t&7;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8;},"wbits"),Pt=h(function(e,t,n){n<<=t&7;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8,e[r+2]|=n>>16;},"wbits16"),qn=h(function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var s=n.length,i=n.slice();if(!s)return {t:Lr,l:0};if(s==1){var o=new te(n[0].s+1);return o[n[0].s]=1,{t:o,l:1}}n.sort(function(A,E){return A.f-E.f}),n.push({s:-1,f:25001});var u=n[0],l=n[1],a=0,c=1,f=2;for(n[0]={s:-1,f:u.f+l.f,l:u,r:l};c!=s-1;)u=n[n[a].f<n[f].f?a++:f++],l=n[a!=c&&n[a].f<n[f].f?a++:f++],n[c++]={s:-1,f:u.f+l.f,l:u,r:l};for(var p=i[0].s,r=1;r<s;++r)i[r].s>p&&(p=i[r].s);var d=new we(p+1),g=Vn(n[c-1],d,0);if(g>t){var r=0,m=0,b=g-t,D=1<<b;for(i.sort(function(E,y){return d[y.s]-d[E.s]||E.f-y.f});r<s;++r){var w=i[r].s;if(d[w]>t)m+=D-(1<<g-d[w]),d[w]=t;else break}for(m>>=b;m>0;){var v=i[r].s;d[v]<t?m-=1<<t-d[v]++-1:++r;}for(;r>=0&&m;--r){var _=i[r].s;d[_]==t&&(--d[_],++m);}g=t;}return {t:new te(d),l:g}},"hTree"),Vn=h(function(e,t,n){return e.s==-1?Math.max(Vn(e.l,t,n+1),Vn(e.r,t,n+1)):t[e.s]=n},"ln"),Sr=h(function(e){for(var t=e.length;t&&!e[--t];);for(var n=new we(++t),r=0,s=e[0],i=1,o=h(function(l){n[r++]=l;},"w"),u=1;u<=t;++u)if(e[u]==s&&u!=t)++i;else {if(!s&&i>2){for(;i>138;i-=138)o(32754);i>2&&(o(i>10?i-11<<5|28690:i-3<<5|12305),i=0);}else if(i>3){for(o(s),--i;i>6;i-=6)o(8304);i>2&&(o(i-3<<5|8208),i=0);}for(;i--;)o(s);i=1,s=e[u];}return {c:n.subarray(0,r),n:t}},"lc"),kt=h(function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},"clen"),Fr=h(function(e,t,n){var r=n.length,s=Qn(t+2);e[s]=r&255,e[s+1]=r>>8,e[s+2]=e[s]^255,e[s+3]=e[s+1]^255;for(var i=0;i<r;++i)e[s+i+4]=n[i];return (s+4+r)*8},"wfblk"),Or=h(function(e,t,n,r,s,i,o,u,l,a,c){Be(t,c++,n),++s[256];for(var f=qn(s,15),p=f.t,d=f.l,g=qn(i,15),m=g.t,b=g.l,D=Sr(p),w=D.c,v=D.n,_=Sr(m),A=_.c,E=_.n,y=new we(19),N=0;N<w.length;++N)++y[w[N]&31];for(var N=0;N<A.length;++N)++y[A[N]&31];for(var C=qn(y,7),F=C.t,P=C.l,R=19;R>4&&!F[jn[R-1]];--R);var j=a+5<<3,O=kt(s,ze)+kt(i,Mt)+o,G=kt(s,p)+kt(i,m)+o+14+3*R+kt(y,F)+2*y[16]+3*y[17]+7*y[18];if(l>=0&&j<=O&&j<=G)return Fr(t,c,e.subarray(l,l+a));var z,L,Y,S;if(Be(t,c,1+(G<O)),c+=2,G<O){z=Se(p,d,0),L=p,Y=Se(m,b,0),S=m;var J=Se(F,P,0);Be(t,c,v-257),Be(t,c+5,E-1),Be(t,c+10,R-4),c+=14;for(var N=0;N<R;++N)Be(t,c+3*N,F[jn[N]]);c+=3*R;for(var ie=[w,A],se=0;se<2;++se)for(var _e=ie[se],N=0;N<_e.length;++N){var ve=_e[N]&31;Be(t,c,J[ve]),c+=F[ve],ve>15&&(Be(t,c,_e[N]>>5&127),c+=_e[N]>>12);}}else z=Gs,L=ze,Y=Ys,S=Mt;for(var N=0;N<u;++N){var ee=r[N];if(ee>255){var ve=ee>>18&31;Pt(t,c,z[ve+257]),c+=L[ve+257],ve>7&&(Be(t,c,ee>>23&31),c+=an[ve]);var xe=ee&31;Pt(t,c,Y[xe]),c+=S[xe],xe>3&&(Pt(t,c,ee>>5&8191),c+=un[xe]);}else Pt(t,c,z[ee]),c+=L[ee];}return Pt(t,c,z[256]),c+L[256]},"wblk"),Ks=new Yn([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Lr=new te(0),eo=h(function(e,t,n,r,s,i){var o=i.z||e.length,u=new te(r+o+5*(1+Math.ceil(o/7e3))+s),l=u.subarray(r,u.length-s),a=i.l,c=(i.r||0)&7;if(t){c&&(l[0]=i.r>>3);for(var f=Ks[t-1],p=f>>13,d=f&8191,g=(1<<n)-1,m=i.p||new we(32768),b=i.h||new we(g+1),D=Math.ceil(n/3),w=2*D,v=h(function(Fn){return (e[Fn]^e[Fn+1]<<D^e[Fn+2]<<w)&g},"hsh"),_=new Yn(25e3),A=new we(288),E=new we(32),y=0,N=0,C=i.i||0,F=0,P=i.w||0,R=0;C+2<o;++C){var j=v(C),O=C&32767,G=b[j];if(m[O]=G,b[j]=O,P<=C){var z=o-C;if((y>7e3||F>24576)&&(z>423||!a)){c=Or(e,l,0,_,A,E,N,F,R,C-R,c),F=y=N=0,R=C;for(var L=0;L<286;++L)A[L]=0;for(var L=0;L<30;++L)E[L]=0;}var Y=2,S=0,J=d,ie=O-G&32767;if(z>2&&j==v(C-ie))for(var se=Math.min(p,z)-1,_e=Math.min(32767,C),ve=Math.min(258,z);ie<=_e&&--J&&O!=G;){if(e[C+Y]==e[C+Y-ie]){for(var ee=0;ee<ve&&e[C+ee]==e[C+ee-ie];++ee);if(ee>Y){if(Y=ee,S=ie,ee>se)break;for(var xe=Math.min(ie,ee-2),ot=0,L=0;L<xe;++L){var at=C-ie+L&32767,rn=m[at],sn=at-rn&32767;sn>ot&&(ot=sn,G=at);}}}O=G,G=m[O],ie+=O-G&32767;}if(S){_[F++]=268435456|Wn[Y]<<18|Ir[S];var St=Wn[Y]&31,Ot=Ir[S]&31;N+=an[St]+un[Ot],++A[257+St],++E[Ot],P=C+Y,++y;}else _[F++]=e[C],++A[e[C]];}}for(C=Math.max(C,P);C<o;++C)_[F++]=e[C],++A[e[C]];c=Or(e,l,a,_,A,E,N,F,R,C-R,c),a||(i.r=c&7|l[c/8|0]<<3,c-=7,i.h=b,i.p=m,i.i=C,i.w=P);}else {for(var C=i.w||0;C<o+a;C+=65535){var ut=C+65535;ut>=o&&(l[c/8|0]=a,ut=o),c=Fr(l,c+1,e.subarray(C,ut));}i.i=o;}return Rt(u,0,r+Qn(c)+s)},"dflt"),to=(function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var n=t,r=9;--r;)n=(n&1&&-306674912)^n>>>1;e[t]=n;}return e})(),no=h(function(){var e=-1;return {p:h(function(t){for(var n=e,r=0;r<t.length;++r)n=to[n&255^t[r]]^n>>>8;e=n;},"p"),d:h(function(){return ~e},"d")}},"crc");var ro=h(function(e,t,n,r,s){if(!s&&(s={l:1},t.dictionary)){var i=t.dictionary.subarray(-32768),o=new te(i.length+e.length);o.set(i),o.set(e,i.length),e=o,s.w=i.length;}return eo(e,t.level==null?6:t.level,t.mem==null?s.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,n,r,s)},"dopt"),$r=h(function(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n},"mrg");var Ie=h(function(e,t){return e[t]|e[t+1]<<8},"b2"),De=h(function(e,t){return (e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0},"b4"),zn=h(function(e,t){return De(e,t)+De(e,t+4)*4294967296},"b8"),ue=h(function(e,t,n){for(;n;++t)e[t]=n,n>>>=8;},"wbytes");function io(e,t){return ro(e,t||{},0,0)}h(io,"deflateSync");function so(e,t){return Js(e,{i:2},t&&t.out,t&&t.dictionary)}h(so,"inflateSync");var Ur=h(function(e,t,n,r){for(var s in e){var i=e[s],o=t+s,u=r;Array.isArray(i)&&(u=$r(r,i[1]),i=i[0]),ArrayBuffer.isView(i)?n[o]=[i,u]:(n[o+="/"]=[new te(0),u],Ur(i,o,n,r));}},"fltn"),Pr=typeof TextEncoder<"u"&&new TextEncoder,Gn=typeof TextDecoder<"u"&&new TextDecoder,oo=0;try{Gn.decode(Lr,{stream:!0}),oo=1;}catch{}var ao=h(function(e){for(var t="",n=0;;){var r=e[n++],s=(r>127)+(r>223)+(r>239);if(n+s>e.length)return {s:t,r:Rt(e,n-1)};s?s==3?(r=((r&15)<<18|(e[n++]&63)<<12|(e[n++]&63)<<6|e[n++]&63)-65536,t+=String.fromCharCode(55296|r>>10,56320|r&1023)):s&1?t+=String.fromCharCode((r&31)<<6|e[n++]&63):t+=String.fromCharCode((r&15)<<12|(e[n++]&63)<<6|e[n++]&63):t+=String.fromCharCode(r);}},"dutf8");function on(e,t){if(t){for(var n=new te(e.length),r=0;r<e.length;++r)n[r]=e.charCodeAt(r);return n}if(Pr)return Pr.encode(e);for(var s=e.length,i=new te(e.length+(e.length>>1)),o=0,u=h(function(c){i[o++]=c;},"w"),r=0;r<s;++r){if(o+5>i.length){var l=new te(o+8+(s-r<<1));l.set(i),i=l;}var a=e.charCodeAt(r);a<128||t?u(a):a<2048?(u(192|a>>6),u(128|a&63)):a>55295&&a<57344?(a=65536+(a&1047552)|e.charCodeAt(++r)&1023,u(240|a>>18),u(128|a>>12&63),u(128|a>>6&63),u(128|a&63)):(u(224|a>>12),u(128|a>>6&63),u(128|a&63));}return Rt(i,0,o)}h(on,"strToU8");function ln(e,t){if(t){for(var n="",r=0;r<e.length;r+=16384)n+=String.fromCharCode.apply(null,e.subarray(r,r+16384));return n}else {if(Gn)return Gn.decode(e);var s=ao(e),i=s.s,n=s.r;return n.length&&he(8),i}}h(ln,"strFromU8");var uo=h(function(e,t){return t+30+Ie(e,t+26)+Ie(e,t+28)},"slzh"),lo=h(function(e,t,n){var r=Ie(e,t+28),s=Ie(e,t+30),i=ln(e.subarray(t+46,t+46+r),!(Ie(e,t+8)&2048)),o=t+46+r,u=co(e,o,s,n,De(e,t+20),De(e,t+24),De(e,t+42)),l=u[0],a=u[1],c=u[2];return [Ie(e,t+10),l,a,i,o+s+Ie(e,t+32),c]},"zh"),co=h(function(e,t,n,r,s,i,o){var u=s==4294967295,l=i==4294967295,a=o==4294967295,c=t+n,f=u+l+a;if(r&&f){for(;t+4<c;t+=4+Ie(e,t+2))if(Ie(e,t)==1)return [u?zn(e,t+4+8*l):s,l?zn(e,t+4):i,a?zn(e,t+4+8*(l+u)):o,1];r<2&&he(13);}return [s,i,o,0]},"z64hs"),Xn=h(function(e){var t=0;if(e)for(var n in e){var r=e[n].length;r>65535&&he(9),t+=r+4;}return t},"exfl"),kr=h(function(e,t,n,r,s,i,o,u){var l=r.length,a=n.extra,c=u&&u.length,f=Xn(a);ue(e,t,o!=null?33639248:67324752),t+=4,o!=null&&(e[t++]=20,e[t++]=n.os),e[t]=20,t+=2,e[t++]=n.flag<<1|(i<0&&8),e[t++]=s&&8,e[t++]=n.compression&255,e[t++]=n.compression>>8;var p=new Date(n.mtime==null?Date.now():n.mtime),d=p.getFullYear()-1980;if((d<0||d>119)&&he(10),ue(e,t,d<<25|p.getMonth()+1<<21|p.getDate()<<16|p.getHours()<<11|p.getMinutes()<<5|p.getSeconds()>>1),t+=4,i!=-1&&(ue(e,t,n.crc),ue(e,t+4,i<0?-i-2:i),ue(e,t+8,n.size)),ue(e,t+12,l),ue(e,t+14,f),t+=16,o!=null&&(ue(e,t,c),ue(e,t+6,n.attrs),ue(e,t+10,o),t+=14),e.set(r,t),t+=l,f)for(var g in a){var m=a[g],b=m.length;ue(e,t,+g),ue(e,t+2,b),e.set(m,t+4),t+=4+b;}return c&&(e.set(u,t),t+=c),t},"wzh"),fo=h(function(e,t,n,r,s){ue(e,t,101010256),ue(e,t+8,n),ue(e,t+10,n),ue(e,t+12,r),ue(e,t+16,s);},"wzf");function qr(e,t){t||(t={});var n={},r=[];Ur(e,"",n,t);var s=0,i=0;for(var o in n){var u=n[o],l=u[0],a=u[1],c=a.level==0?0:8,f=on(o),p=f.length,d=a.comment,g=d&&on(d),m=g&&g.length,b=Xn(a.extra);p>65535&&he(11);var D=c?io(l,a):l,w=D.length,v=no();v.p(l),r.push($r(a,{size:l.length,crc:v.d(),c:D,f,m:g,u:p!=o.length||g&&d.length!=m,o:s,compression:c})),s+=30+p+b+w,i+=76+2*(p+b)+(m||0)+w;}for(var _=new te(i+22),A=s,E=i-s,y=0;y<r.length;++y){var f=r[y];kr(_,f.o,f,f.f,f.u,f.c.length);var N=30+f.f.length+Xn(f.extra);_.set(f.c,f.o+N),kr(_,s,f,f.f,f.u,f.c.length,f.o,f.m),s+=16+N+(f.m?f.m.length:0);}return fo(_,s,r.length,E,A),_}h(qr,"zipSync");function zr(e,t){for(var n={},r=e.length-22;De(e,r)!=101010256;--r)(!r||e.length-r>65558)&&he(13);var s=Ie(e,r+8);if(!s)return {};var i=De(e,r+16),o=De(e,r-20)==117853008;if(o){var u=De(e,r-12);o=De(e,u)==101075792,o&&(s=De(e,u+32),i=De(e,u+48));}for(var l=t&&t.filter,a=0;a<s;++a){var c=lo(e,i,o),f=c[0],p=c[1],d=c[2],g=c[3],m=c[4],b=c[5],D=uo(e,b);i=m,(!l||l({name:g,size:p,originalSize:d,compression:f}))&&(f?f==8?n[g]=so(e.subarray(D,D+p),{out:new te(d)}):he(14,"unknown compression type "+f):n[g]=Rt(e,D,D+p));}return n}h(zr,"unzipSync");var On=xr(Zi()),vs=xr(Ji());function k(e,t){for(let n=0;n<e.childNodes.length;n++){let r=e.childNodes[n];if(r.nodeType===1&&r.tagName===t)return r}return null}h(k,"findChild");function ru(e,t){let n=[];for(let r=0;r<e.childNodes.length;r++){let s=e.childNodes[r];s.nodeType===1&&s.tagName===t&&n.push(s);}return n}h(ru,"findChildren");function x(e,t){return Array.from(e.getElementsByTagName(t))}h(x,"findAllDescendants");function wr(e){return new On.DOMParser().parseFromString(e,"text/xml")}h(wr,"parseXml");function iu(e){let t=new On.XMLSerializer().serializeToString(e),r=/<([a-zA-Z0-9_:]+)(\s+[^>]+?)(>|\/>)/.exec(t);if(r&&!r[1].startsWith("?")){let s=r.index,i=t.substring(0,s);if(!i.includes("<")||i.trim().startsWith("<?xml")&&(i.match(/</g)||[]).length===1){let u=r[0],l=`<${r[1]}`,a=r[2],c=r[3],f=/([a-zA-Z0-9_:]+)\s*=\s*(["'])(.*?)\2/g,p=[],d;for(;(d=f.exec(a))!==null;)p.push(d[0].trim());p.sort((m,b)=>{let D=m.split("=")[0].trim(),w=b.split("=")[0].trim(),v=D.startsWith("xmlns"),_=w.startsWith("xmlns");return v&&!_?-1:!v&&_?1:D<w?-1:D>w?1:0});let g=p.length>0?`${l} ${p.join(" ")}${c}`:`${l}${c}`;t=t.substring(0,s)+g+t.substring(s+u.length);}}return t}h(iu,"serializeXml");var In=class{static{h(this,"Relationship");}constructor(e,t,n,r){this.id=e,this.type=t,this.target=n,this.isExternal=r;}id;type;target;isExternal},is=class{static{h(this,"Part");}constructor(e,t,n,r){this.partname=e,this.blob=t,this.contentType=r,this._element=n;}partname;blob;contentType;rels=new Map;_element;package;addRelationship(e,t,n,r=false){if(this.rels.set(e,new In(e,t,n,r)),this.partname.endsWith(".rels")){let s=this._element.ownerDocument;if(s){let i=s.createElementNS("http://schemas.openxmlformats.org/package/2006/relationships","Relationship");i.setAttribute("Id",e),i.setAttribute("Type",t),i.setAttribute("Target",n),r&&i.setAttribute("TargetMode","External"),this._element.appendChild(i);}}}},su=class{static{h(this,"DocxPackage");}constructor(e){this.unzipped=e;}unzipped;parts=[];mainDocumentPart;getPartByPath(e){let t=e.startsWith("/")?e.substring(1):e;return this.parts.find(n=>n.partname===t||n.partname==="/"+t)}nextPartname(e){let t=1;for(;;){let n=e.replace("%d",t===1?"":t.toString());if(!this.getPartByPath(n))return n;t++;}}addPart(e,t,n){let r=wr(n),s=new is(e,n,r.documentElement,t);s.package=this,this.parts.push(s);let i=this.getPartByPath("[Content_Types].xml");if(i){let o=i._element.ownerDocument;if(o){let u=o.createElement("Override");u.setAttribute("PartName",e),u.setAttribute("ContentType",t),i._element.appendChild(u);}}return s}getOrCreateRelsPart(e){let t=e.split("/"),n=t.pop(),r=t.join("/")+"/_rels/"+n+".rels",s=this.getPartByPath(r);return s||(s=this.addPart(r,"application/vnd.openxmlformats-package.relationships+xml",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
10
- <Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"></Relationships>`)),s}},tn=class ss{static{h(this,"_DocumentObject");}constructor(t,n){this.pkg=t,this.part=n;}pkg;part;settings={oddAndEvenPagesHeaderFooter:false};sections=[];get element(){return k(this.part._element,"w:body")||this.part._element}static async load(t){let n=t instanceof Uint8Array?t:new Uint8Array(t),r=zr(n),s=new su(r),i=r["[Content_Types].xml"],o={};if(i){let a=wr(ln(i)),c=x(a.documentElement,"Override");for(let f of c)o[f.getAttribute("PartName")||""]=f.getAttribute("ContentType")||"";}for(let[a,c]of Object.entries(r))if(a.endsWith(".xml")||a.endsWith(".rels")){let f=ln(c),p=wr(f),d=o["/"+a]||"application/xml",g=new is("/"+a,f,p.documentElement,d);g.package=s,s.parts.push(g);}let u=s.getPartByPath("word/document.xml");if(!u)throw new Error("Invalid DOCX: Missing word/document.xml");s.mainDocumentPart=u;let l=s.getPartByPath("word/_rels/document.xml.rels");if(l){let a=x(l._element,"Relationship");for(let c of a){let f=c.getAttribute("Id"),p=c.getAttribute("Target"),d=c.getAttribute("Type"),g=c.getAttribute("TargetMode");f&&p&&d&&u.rels.set(f,new In(f,d,p,g==="External"));}}return new ss(s,u)}relateTo(t,n){let r=1;for(;this.part.rels.has(`rId${r}`);)r++;let s=`rId${r}`,i=t.partname.split("/").pop();this.part.rels.set(s,new In(s,n,i,false)),this.pkg.getOrCreateRelsPart(this.part.partname).addRelationship(s,n,i,false);}relateToExternal(t,n){let r=1;for(;this.part.rels.has(`rId${r}`);)r++;let s=`rId${r}`;return this.part.rels.set(s,new In(s,n,t,true)),this.pkg.getOrCreateRelsPart(this.part.partname).addRelationship(s,n,t,true),s}async save(){for(let t of this.pkg.parts){let n=iu(t._element.ownerDocument||t._element);n.startsWith("<?xml")||(n=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
11
- `+n),this.pkg.unzipped[t.partname.substring(1)]=on(n);}return Buffer.from(qr(this.pkg.unzipped))}},Ze=class{static{h(this,"Paragraph");}constructor(e,t){this._element=e,this._parent=t;}_element;_parent;get text(){let e="",t=this._element.getElementsByTagName("w:t");for(let n=0;n<t.length;n++)e+=t[n].textContent||"";return e}},Je=class{static{h(this,"Run");}constructor(e,t){this._element=e,this._parent=t;}_element;_parent},ou=class{static{h(this,"Cell");}constructor(e,t){this._element=e,this._parent=t;}_element;_parent},au=class{static{h(this,"Row");}constructor(e,t){this._element=e,this._parent=t;let n=this._element.getElementsByTagName("w:tc");for(let r=0;r<n.length;r++)this.cells.push(new ou(n[r],this));}_element;_parent;cells=[]},Er=class{static{h(this,"Table");}constructor(e,t){this._element=e,this._parent=t;let n=this._element.getElementsByTagName("w:tr");for(let r=0;r<n.length;r++)this.rows.push(new au(n[r],this));}_element;_parent;rows=[]},Ki=class{static{h(this,"NotesPart");}constructor(e,t){this.part=e,this.note_type=t,this._element=e._element;}part;note_type;_element},uu=class{static{h(this,"FootnoteItem");}constructor(e,t,n){this._element=e,this._parent=t,this.note_type=n,this.id=e.getAttribute("w:id")||"",this.part=t.part;}_element;_parent;note_type;id;part},Ue={w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",w16cid:"http://schemas.microsoft.com/office/word/2016/wordml/cid",w16cex:"http://schemas.microsoft.com/office/word/2018/wordml/cex",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006"},Ee={COMMENTS:"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml",EXTENDED:"application/vnd.openxmlformats-officedocument.wordprocessingml.commentsExtended+xml",IDS:"application/vnd.openxmlformats-officedocument.wordprocessingml.commentsIds+xml",EXTENSIBLE:"application/vnd.openxmlformats-officedocument.wordprocessingml.commentsExtensible+xml"},Xe={COMMENTS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",EXTENDED:"http://schemas.microsoft.com/office/2011/relationships/commentsExtended",IDS:"http://schemas.microsoft.com/office/2016/09/relationships/commentsIds",EXTENSIBLE:"http://schemas.microsoft.com/office/2018/08/relationships/commentsExtensible"},Pn=class{static{h(this,"CommentsManager");}constructor(e){this.doc=e;}doc;_commentsPart=null;_extendedPart=null;_idsPart=null;_extensiblePart=null;_nextId=null;get commentsPart(){return this._commentsPart||(this._commentsPart=this._getOrCreateCommentsPart(),this._ensureNamespaces()),this._commentsPart}get extendedPart(){return this._extendedPart||(this._extendedPart=this._getOrCreateExtendedPart()),this._extendedPart}get idsPart(){return this._idsPart||(this._idsPart=this._getOrCreateIdsPart()),this._idsPart}get extensiblePart(){return this._extensiblePart||(this._extensiblePart=this._getOrCreateExtensiblePart()),this._extensiblePart}get nextId(){return this._nextId===null&&(this._nextId=this._getNextCommentId()),this._nextId}set nextId(e){this._nextId=e;}_getExistingPartByType(e){return this.doc.pkg.parts.find(t=>t.contentType===e)||null}_linkPart(e,t){for(let n of this.doc.part.rels.values())if(!n.isExternal&&n.target===e.partname.split("/").pop())return e;return this.doc.relateTo(e,t),e}_getOrCreateCommentsPart(){let e=this._getExistingPartByType(Ee.COMMENTS);if(e)return this._linkPart(e,Xe.COMMENTS);let t=this.doc.pkg.nextPartname("/word/comments%d.xml"),n=`<w:comments xmlns:w="${Ue.w}" xmlns:w14="${Ue.w14}" xmlns:w15="${Ue.w15}" xmlns:w16cid="${Ue.w16cid}" xmlns:w16cex="${Ue.w16cex}" xmlns:mc="${Ue.mc}" mc:Ignorable="w14 w15 w16cid w16cex"></w:comments>`;return e=this.doc.pkg.addPart(t,Ee.COMMENTS,n),this.doc.relateTo(e,Xe.COMMENTS),e}_getOrCreateExtendedPart(){let e=this._getExistingPartByType(Ee.EXTENDED);if(e)return this._linkPart(e,Xe.EXTENDED);let t=this.doc.pkg.nextPartname("/word/commentsExtended%d.xml"),n=`<w15:commentsEx xmlns:w15="${Ue.w15}"></w15:commentsEx>`;return e=this.doc.pkg.addPart(t,Ee.EXTENDED,n),this.doc.relateTo(e,Xe.EXTENDED),e}_getOrCreateIdsPart(){let e=this._getExistingPartByType(Ee.IDS);if(e)return this._linkPart(e,Xe.IDS);let t=this.doc.pkg.nextPartname("/word/commentsIds%d.xml"),n=`<w16cid:commentsIds xmlns:w16cid="${Ue.w16cid}"></w16cid:commentsIds>`;return e=this.doc.pkg.addPart(t,Ee.IDS,n),this.doc.relateTo(e,Xe.IDS),e}_getOrCreateExtensiblePart(){let e=this._getExistingPartByType(Ee.EXTENSIBLE);if(e)return this._linkPart(e,Xe.EXTENSIBLE);let t=this.doc.pkg.nextPartname("/word/commentsExtensible%d.xml"),n=`<w16cex:commentsExtensible xmlns:w16cex="${Ue.w16cex}"></w16cex:commentsExtensible>`;return e=this.doc.pkg.addPart(t,Ee.EXTENSIBLE,n),this.doc.relateTo(e,Xe.EXTENSIBLE),e}_ensureNamespaces(){}_getNextCommentId(){let e=[0],t=this._getExistingPartByType(Ee.COMMENTS);if(t){let n=x(t._element,"w:comment");for(let r of n){let s=r.getAttribute("w:id");s&&e.push(parseInt(s,10)||0);}}return Math.max(...e)+1}_generateHexId(){return Math.floor(Math.random()*4294967295).toString(16).toUpperCase().padStart(8,"0")}_getInitials(e){return e?e.split(" ").filter(Boolean).map(t=>t[0]).join("").toUpperCase():""}_findParaIdForComment(e){if(!this._commentsPart)return null;for(let t of x(this._commentsPart._element,"w:comment"))if(t.getAttribute("w:id")===e)for(let n of x(t,"w:p")){let r=n.getAttribute("w14:paraId");if(r)return r}return null}_findThreadRootParaId(e){let t=this._findParaIdForComment(e),n=this._getExistingPartByType(Ee.EXTENDED);if(!t||!n)return t;for(let r=0;r<n._element.childNodes.length;r++){let s=n._element.childNodes[r];if(s.nodeType===1&&s.getAttribute("w15:paraId")===t){let i=s.getAttribute("w15:paraIdParent");if(i)return i}}return t}addComment(e,t,n=null){let r=this.nextId.toString();this.nextId++;let s=new Date().toISOString().replace(/\.\d{3}Z$/,"Z"),i=this.commentsPart._element.ownerDocument,o=i.createElement("w:comment");o.setAttribute("w:id",r),o.setAttribute("w:author",e),o.setAttribute("w:date",s);let u=this._getInitials(e);u&&o.setAttribute("w:initials",u);let l=this._getExistingPartByType(Ee.EXTENDED);n&&!l&&o.setAttribute("w15:p",n);let a=this._generateHexId(),c=this._generateHexId(),f=i.createElement("w:p");f.setAttribute("w14:paraId",a),f.setAttribute("w14:textId","77777777"),f.setAttribute("w:rsidR",c),f.setAttribute("w:rsidRDefault",c),f.setAttribute("w:rsidP",c);let p=i.createElement("w:pPr"),d=i.createElement("w:pStyle");d.setAttribute("w:val","CommentText"),p.appendChild(d),f.appendChild(p);let g=i.createElement("w:r"),m=i.createElement("w:rPr"),b=i.createElement("w:rStyle");b.setAttribute("w:val","CommentReference"),m.appendChild(b),g.appendChild(m),g.appendChild(i.createElement("w:annotationRef")),f.appendChild(g);let D=i.createElement("w:r"),w=i.createElement("w:t");if(w.textContent=t,D.appendChild(w),f.appendChild(D),o.appendChild(f),this.commentsPart._element.appendChild(o),this.extendedPart){let v=n?this._findThreadRootParaId(n):null,A=this.extendedPart._element.ownerDocument.createElement("w15:commentEx");A.setAttribute("w15:paraId",a),v&&A.setAttribute("w15:paraIdParent",v),A.setAttribute("w15:done","0"),this.extendedPart._element.appendChild(A);}if(this.idsPart){let _=this.idsPart._element.ownerDocument.createElement("w16cid:commentId");_.setAttribute("w16cid:paraId",a),_.setAttribute("w16cid:durableId",this._generateHexId()),this.idsPart._element.appendChild(_);}if(this.extensiblePart){let v=null;for(let _=0;_<this.idsPart._element.childNodes.length;_++){let A=this.idsPart._element.childNodes[_];if(A.nodeType===1&&A.getAttribute("w16cid:paraId")===a){v=A.getAttribute("w16cid:durableId");break}}if(v){let A=this.extensiblePart._element.ownerDocument.createElement("w16cex:commentExtensible");A.setAttribute("w16cex:durableId",v),A.setAttribute("w16cex:dateUtc",s),this.extensiblePart._element.appendChild(A);}}return r}deleteComment(e){if(!this._commentsPart)return;let t=null;for(let r of x(this._commentsPart._element,"w:comment"))if(r.getAttribute("w:id")===e){t=r;break}if(!t)return;let n=null;for(let r of x(t,"w:p")){let s=r.getAttribute("w14:paraId");if(s){n=s;break}}if(n){let r=[];if(this.extendedPart)for(let i=0;i<this.extendedPart._element.childNodes.length;i++){let o=this.extendedPart._element.childNodes[i];if(o.nodeType===1&&o.getAttribute("w15:paraIdParent")===n){let u=o.getAttribute("w15:paraId");if(u){for(let l of x(this._commentsPart._element,"w:comment"))for(let a of x(l,"w:p"))if(a.getAttribute("w14:paraId")===u){let c=l.getAttribute("w:id");c&&r.push(c);break}}}}for(let i of r)this.deleteComment(i);let s=null;if(this.idsPart){let i=[];for(let o=0;o<this.idsPart._element.childNodes.length;o++){let u=this.idsPart._element.childNodes[o];u.nodeType===1&&u.getAttribute("w16cid:paraId")===n&&(s=u.getAttribute("w16cid:durableId"),i.push(u));}i.forEach(o=>this.idsPart._element.removeChild(o));}if(this.extendedPart){let i=[];for(let o=0;o<this.extendedPart._element.childNodes.length;o++){let u=this.extendedPart._element.childNodes[o];u.nodeType===1&&u.getAttribute("w15:paraId")===n&&i.push(u);}i.forEach(o=>this.extendedPart._element.removeChild(o));}if(s&&this.extensiblePart){let i=[];for(let o=0;o<this.extensiblePart._element.childNodes.length;o++){let u=this.extensiblePart._element.childNodes[o];u.nodeType===1&&u.getAttribute("w16cex:durableId")===s&&i.push(u);}i.forEach(o=>this.extensiblePart._element.removeChild(o));}}t.parentNode&&t.parentNode.removeChild(t);}};function kn(e){({part:e.mainDocumentPart,relateTo:h(()=>{},"relateTo")});let r={},s=e.parts.find(l=>l.contentType===Ee.COMMENTS);if(!s)return r;let i={},o=x(s._element,"w:comment");for(let l of o){let a=l.getAttribute("w:id");if(!a)continue;let c=l.getAttribute("w:author")||"Unknown",f=l.getAttribute("w:date")||"",p=false,d=l.getAttribute("w15:done");(d==="1"||d==="true"||d==="on")&&(p=true);let g=l.getAttribute("w15:p")||null,m=x(l,"w:p");for(let w of m){let v=w.getAttribute("w14:paraId");v&&(i[v]=a);}let b=[];for(let w of m){let v=x(w,"w:t");for(let _ of v)_.textContent&&b.push(_.textContent);b.push(`
12
- `);}let D=b.join("").trim();r[a]={author:c,text:D,date:f,resolved:p,parent_id:g};}let u=e.parts.find(l=>l.contentType===Ee.EXTENDED);if(u){let l=u._element.childNodes;for(let a=0;a<l.length;a++){let c=l[a];if(c.nodeType!==1)continue;let f=c.getAttribute("w15:paraId"),p=c.getAttribute("w15:paraIdParent"),d=c.getAttribute("w15:done");if(f){let g=i[f];if(g&&r[g]){if(p){let m=i[p];m&&(r[g].parent_id=m);}(d==="1"||d==="true"||d==="on")&&(r[g].resolved=true);}}}}return r}h(kn,"extract_comments_data");var lu="w:p",os="w:r",as="w:t",cu="w:delText",fu="w:tab",hu="w:br",pu="w:cr",Dr="w:rPr",du="w:rPrChange",mu="w:commentReference",gu="w:footnoteReference",_u="w:endnoteReference",vu="w:fldChar",wu="w:fldCharType",Eu="w:instrText",Du="w:ins",Au="w:del",Ye="w:id",gr="w:author",_r="w:date",yu="w:commentRangeStart",bu="w:commentRangeEnd",Nu="w:hyperlink",Cu="r:id",Tu="w:fldSimple",xu="w:instr",Iu="w:bookmarkStart",Su="w:name",Ou="w:sdt",Pu="w:smartTag",ku="w:sdtContent",us="w:b",Mu="w:i",Ce="w:val",ls="w:pPr",cs="w:pStyle",fs="w:outlineLvl",Ru="w:numPr",Bu="w:numId",Fu="w:ilvl",Lu=/Heading[ ]?([1-6])(?![0-9])/;function Mn(e){let t=e.package||e.pkg||(e.part?e.part.pkg:null);if(t&&t._adeu_style_cache)return t._adeu_style_cache;let n={},r=null,s={},i=t?.getPartByPath("word/styles.xml");if(!i){let a=[n,null];return t&&(t._adeu_style_cache=a),a}let o=x(i._element,"w:style");for(let a of o){let c=a.getAttribute("w:styleId");if(!c)continue;let f=a.getAttribute("w:type"),p=a.getAttribute("w:default")==="1"||a.getAttribute("w:default")==="true";f==="paragraph"&&p&&(r=c);let d=k(a,"w:name"),g=d?d.getAttribute("w:val"):c;g&&typeof g=="string"&&(g.toLowerCase().startsWith("heading")?g=g.replace(/^heading/i,"Heading"):g.toLowerCase()==="title"&&(g="Title"));let m=k(a,"w:basedOn"),b=m?m.getAttribute("w:val"):null,D=null,w=k(a,"w:pPr");if(w){let A=k(w,"w:outlineLvl");if(A){let E=A.getAttribute("w:val");E&&/^\d+$/.test(E)&&(D=parseInt(E,10));}}let v=null,_=k(a,"w:rPr");if(_){let A=k(_,"w:b");if(A){let E=A.getAttribute("w:val");v=E!=="0"&&E!=="false"&&E!=="off";}}s[c]={name:g,based_on:b,outline_level:D,bold:v};}let u=h((a,c)=>{if(n[a])return n[a];if(c.has(a)||!s[a])return {name:a,outline_level:null,bold:false};c.add(a);let f=s[a],p=f.based_on,d=f.outline_level,g=f.bold!==null?f.bold:false;if(p){let b=u(p,c);d===null&&(d=b.outline_level),f.bold===null&&(g=b.bold);}let m={name:f.name,outline_level:d,bold:g};return n[a]=m,m},"resolve_style");for(let a in s)u(a,new Set);let l=[n,r];return t&&(t._adeu_style_cache=l),l}h(Mn,"_get_style_cache");function hs(e){if(!e)return null;let t=e.match(Lu);return t?parseInt(t[1],10):null}h(hs,"_detect_heading_level_from_name");function Ar(e,t,n){t||([t,n]=Mn(e._parent.part||e._parent));let r=k(e._element,ls);if(r){let u=k(r,fs);if(u){let l=u.getAttribute(Ce);if(l&&/^\d+$/.test(l)){let a=parseInt(l,10);if(a>=0&&a<=8)return true}}}let s=n;if(r){let u=k(r,cs);u&&(s=u.getAttribute(Ce)||n);}let i=s&&t?t[s]:null;if(i&&i.outline_level!==null&&i.outline_level>=0&&i.outline_level<=8)return true;let o=i?i.name:s;return o&&typeof o=="string"&&o.toLowerCase().startsWith("heading")&&(o=o.replace(/^heading/i,"Heading")),!!(o?.startsWith("Heading")||o==="Title"||o&&o!=="Normal"&&hs(o)!==null)}h(Ar,"is_native_heading");function yr(e,t,n){t||([t,n]=Mn(e._parent.part||e._parent));let r=k(e._element,ls);if(r){let u=k(r,fs);if(u){let l=u.getAttribute(Ce);if(l&&/^\d+$/.test(l)){let a=parseInt(l,10);if(a>=0&&a<=8)return "#".repeat(a+1)+" "}}}let s=n;if(r){let u=k(r,cs);u&&(s=u.getAttribute(Ce)||n);}let i=s&&t?t[s]:null;if(i&&i.outline_level!==null&&i.outline_level>=0&&i.outline_level<=8)return "#".repeat(i.outline_level+1)+" ";let o=i?i.name:s;if(o&&typeof o=="string"&&o.toLowerCase().startsWith("heading")&&(o=o.replace(/^heading/i,"Heading")),o?.startsWith("Heading")){let u=o.replace("Heading","").trim();if(/^\d+$/.test(u))return "#".repeat(parseInt(u,10))+" "}if(o==="Title")return "# ";if(r){let u=k(r,Ru);if(u){let l=k(u,Bu);if(l&&l.getAttribute(Ce)!=="0"){let a=0,c=k(u,Fu);if(c){let f=c.getAttribute(Ce);f&&(a=parseInt(f,10)||0);}return " ".repeat(a)+"* "}}}if(o&&o!=="Normal"){let u=hs(o);if(u!==null)return "#".repeat(u)+" "}if(!o||o==="Normal"){let u=e.text.trim();if(u&&u.length<100&&u===u.toUpperCase()){let l=false;if(i?.bold)l=true;else {let a=x(e._element,os);for(let c of a)if(x(c,as).map(d=>d.textContent||"").join("").trim()){let d=k(c,Dr);if(d){let g=k(d,us);g&&g.getAttribute(Ce)!=="0"&&g.getAttribute(Ce)!=="false"&&(l=true);}break}}if(l)return "## "}}return ""}h(yr,"get_paragraph_prefix");function ps(e,t,n){let r=yr(e,t,n);if(!r)return false;let s=r.trimEnd();return s.length>0&&s==="#".repeat(s.length)}h(ps,"is_heading_paragraph");function ds(e,t=null){let n="",r="",s=k(e._element,Dr),i=false,o=false;if(s){let u=k(s,us);u&&u.getAttribute(Ce)!=="0"&&u.getAttribute(Ce)!=="false"&&(i=true);let l=k(s,Mu);l&&l.getAttribute(Ce)!=="0"&&l.getAttribute(Ce)!=="false"&&(o=true);}if(t===null){let u=e._parent;t=u instanceof Ze?Ar(u):false;}return i&&!t&&(n+="**",r="**"+r),o&&(n+="_",r="_"+r),[n,r]}h(ds,"get_run_style_markers");function $u(e,t,n){return !t&&!n?e:e?e.includes(`
9
+ `;}return n.join("").replace(/%20/g," ")};xt.exports=T;xt.exports.diff_match_patch=T;xt.exports.DIFF_DELETE=Q;xt.exports.DIFF_INSERT=Z;xt.exports.DIFF_EQUAL=U;});var Br=$n(Sr());var Hs=(0, Br.createRequire)("/"),lt,Vs,Gs;try{lt=Hs("worker_threads"),Vs=lt.Worker,Gs=lt.isMarkedAsUntransferable;}catch{}var te=Uint8Array,we=Uint16Array,Qn=Int32Array,an=new te([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),un=new te([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Wn=new te([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Fr=h(function(e,t){for(var n=new we(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];for(var s=new Qn(n[30]),r=1;r<30;++r)for(var i=n[r];i<n[r+1];++i)s[i]=i-n[r]<<5|r;return {b:n,r:s}},"freb"),lt=Fr(an,2),Lr=lt.b,Hn=lt.r;Lr[28]=258,Hn[258]=28;var $r=Fr(un,0),Xs=$r.b,Or=$r.r,Vn=new we(32768);for(V=0;V<32768;++V)Re=(V&43690)>>1|(V&21845)<<1,Re=(Re&52428)>>2|(Re&13107)<<2,Re=(Re&61680)>>4|(Re&3855)<<4,Vn[V]=((Re&65280)>>8|(Re&255)<<8)>>1;var Re,V,Oe=h((function(e,t,n){for(var r=e.length,s=0,i=new we(t);s<r;++s)e[s]&&++i[e[s]-1];var o=new we(t);for(s=1;s<t;++s)o[s]=o[s-1]+i[s-1]<<1;var u;if(n){u=new we(1<<t);var l=15-t;for(s=0;s<r;++s)if(e[s])for(var a=s<<4|e[s],c=t-e[s],f=o[e[s]-1]++<<c,p=f|(1<<c)-1;f<=p;++f)u[Vn[f]>>l]=a;}else for(u=new we(r),s=0;s<r;++s)e[s]&&(u[s]=Vn[o[e[s]-1]++]>>15-e[s]);return u}),"hMap"),ze=new te(288);for(V=0;V<144;++V)ze[V]=8;var V;for(V=144;V<256;++V)ze[V]=9;var V;for(V=256;V<280;++V)ze[V]=7;var V;for(V=280;V<288;++V)ze[V]=8;var V,Mt=new te(32);for(V=0;V<32;++V)Mt[V]=5;var V,Ys=Oe(ze,9,0),Qs=Oe(ze,9,1),Zs=Oe(Mt,5,0),Js=Oe(Mt,5,1),Un=h(function(e){for(var t=e[0],n=1;n<e.length;++n)e[n]>t&&(t=e[n]);return t},"max"),Te=h(function(e,t,n){var r=t/8|0;return (e[r]|e[r+1]<<8)>>(t&7)&n},"bits"),qn=h(function(e,t){var n=t/8|0;return (e[n]|e[n+1]<<8|e[n+2]<<16)>>(t&7)},"bits16"),Zn=h(function(e){return (e+7)/8|0},"shft"),Rt=h(function(e,t,n){return (t==null||t<0)&&(t=0),(n==null||n>e.length)&&(n=e.length),new te(e.subarray(t,n))},"slc");var Ks=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],he=h(function(e,t,n){var r=new Error(t||Ks[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,he),!n)throw r;return r},"err"),eo=h(function(e,t,n,r){var s=e.length,i=r?r.length:0;if(!s||t.f&&!t.l)return n||new te(0);var o=!n,u=o||t.i!=2,l=t.i;o&&(n=new te(s*3));var a=h(function(St){var Ot=n.length;if(St>Ot){var ut=new te(Math.max(Ot*2,St));ut.set(n),n=ut;}},"cbuf"),c=t.f||0,f=t.p||0,p=t.b||0,d=t.l,g=t.d,m=t.m,b=t.n,D=s*8;do{if(!d){c=Te(e,f,1);var w=Te(e,f+1,3);if(f+=3,w)if(w==1)d=Qs,g=Js,m=9,b=5;else if(w==2){var E=Te(e,f,31)+257,y=Te(e,f+10,15)+4,N=E+Te(e,f+5,31)+1;f+=14;for(var C=new te(N),F=new te(19),P=0;P<y;++P)F[Wn[P]]=Te(e,f+P*3,7);f+=y*3;for(var R=Un(F),j=(1<<R)-1,O=Oe(F,R,1),P=0;P<N;){var G=O[Te(e,f,j)];f+=G&15;var v=G>>4;if(v<16)C[P++]=v;else {var z=0,L=0;for(v==16?(L=3+Te(e,f,3),f+=2,z=C[P-1]):v==17?(L=3+Te(e,f,7),f+=3):v==18&&(L=11+Te(e,f,127),f+=7);L--;)C[P++]=z;}}var Y=C.subarray(0,E),S=C.subarray(E);m=Un(Y),b=Un(S),d=Oe(Y,m,1),g=Oe(S,b,1);}else he(1);else {var v=Zn(f)+4,_=e[v-4]|e[v-3]<<8,A=v+_;if(A>s){l&&he(0);break}u&&a(p+_),n.set(e.subarray(v,A),p),t.b=p+=_,t.p=f=A*8,t.f=c;continue}if(f>D){l&&he(0);break}}u&&a(p+131072);for(var J=(1<<m)-1,ie=(1<<b)-1,se=f;;se=f){var z=d[qn(e,f)&J],_e=z>>4;if(f+=z&15,f>D){l&&he(0);break}if(z||he(2),_e<256)n[p++]=_e;else if(_e==256){se=f,d=null;break}else {var ve=_e-254;if(_e>264){var P=_e-257,ee=an[P];ve=Te(e,f,(1<<ee)-1)+Lr[P],f+=ee;}var xe=g[qn(e,f)&ie],ot=xe>>4;xe||he(3),f+=xe&15;var S=Xs[ot];if(ot>3){var ee=un[ot];S+=qn(e,f)&(1<<ee)-1,f+=ee;}if(f>D){l&&he(0);break}u&&a(p+131072);var at=p+ve;if(p<S){var rn=i-S,sn=Math.min(S,at);for(rn+p<0&&he(3);p<sn;++p)n[p]=r[rn+p];}for(;p<at;++p)n[p]=n[p-S];}}t.l=d,t.p=se,t.b=p,t.f=c,d&&(c=1,t.m=m,t.d=g,t.n=b);}while(!c);return p!=n.length&&o?Rt(n,0,p):n.subarray(0,p)},"inflt"),Be=h(function(e,t,n){n<<=t&7;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8;},"wbits"),Pt=h(function(e,t,n){n<<=t&7;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8,e[r+2]|=n>>16;},"wbits16"),zn=h(function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var s=n.length,i=n.slice();if(!s)return {t:qr,l:0};if(s==1){var o=new te(n[0].s+1);return o[n[0].s]=1,{t:o,l:1}}n.sort(function(A,E){return A.f-E.f}),n.push({s:-1,f:25001});var u=n[0],l=n[1],a=0,c=1,f=2;for(n[0]={s:-1,f:u.f+l.f,l:u,r:l};c!=s-1;)u=n[n[a].f<n[f].f?a++:f++],l=n[a!=c&&n[a].f<n[f].f?a++:f++],n[c++]={s:-1,f:u.f+l.f,l:u,r:l};for(var p=i[0].s,r=1;r<s;++r)i[r].s>p&&(p=i[r].s);var d=new we(p+1),g=Gn(n[c-1],d,0);if(g>t){var r=0,m=0,b=g-t,D=1<<b;for(i.sort(function(E,y){return d[y.s]-d[E.s]||E.f-y.f});r<s;++r){var w=i[r].s;if(d[w]>t)m+=D-(1<<g-d[w]),d[w]=t;else break}for(m>>=b;m>0;){var v=i[r].s;d[v]<t?m-=1<<t-d[v]++-1:++r;}for(;r>=0&&m;--r){var _=i[r].s;d[_]==t&&(--d[_],++m);}g=t;}return {t:new te(d),l:g}},"hTree"),Gn=h(function(e,t,n){return e.s==-1?Math.max(Gn(e.l,t,n+1),Gn(e.r,t,n+1)):t[e.s]=n},"ln"),Pr=h(function(e){for(var t=e.length;t&&!e[--t];);for(var n=new we(++t),r=0,s=e[0],i=1,o=h(function(l){n[r++]=l;},"w"),u=1;u<=t;++u)if(e[u]==s&&u!=t)++i;else {if(!s&&i>2){for(;i>138;i-=138)o(32754);i>2&&(o(i>10?i-11<<5|28690:i-3<<5|12305),i=0);}else if(i>3){for(o(s),--i;i>6;i-=6)o(8304);i>2&&(o(i-3<<5|8208),i=0);}for(;i--;)o(s);i=1,s=e[u];}return {c:n.subarray(0,r),n:t}},"lc"),kt=h(function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},"clen"),Ur=h(function(e,t,n){var r=n.length,s=Zn(t+2);e[s]=r&255,e[s+1]=r>>8,e[s+2]=e[s]^255,e[s+3]=e[s+1]^255;for(var i=0;i<r;++i)e[s+i+4]=n[i];return (s+4+r)*8},"wfblk"),kr=h(function(e,t,n,r,s,i,o,u,l,a,c){Be(t,c++,n),++s[256];for(var f=zn(s,15),p=f.t,d=f.l,g=zn(i,15),m=g.t,b=g.l,D=Pr(p),w=D.c,v=D.n,_=Pr(m),A=_.c,E=_.n,y=new we(19),N=0;N<w.length;++N)++y[w[N]&31];for(var N=0;N<A.length;++N)++y[A[N]&31];for(var C=zn(y,7),F=C.t,P=C.l,R=19;R>4&&!F[Wn[R-1]];--R);var j=a+5<<3,O=kt(s,ze)+kt(i,Mt)+o,G=kt(s,p)+kt(i,m)+o+14+3*R+kt(y,F)+2*y[16]+3*y[17]+7*y[18];if(l>=0&&j<=O&&j<=G)return Ur(t,c,e.subarray(l,l+a));var z,L,Y,S;if(Be(t,c,1+(G<O)),c+=2,G<O){z=Oe(p,d,0),L=p,Y=Oe(m,b,0),S=m;var J=Oe(F,P,0);Be(t,c,v-257),Be(t,c+5,E-1),Be(t,c+10,R-4),c+=14;for(var N=0;N<R;++N)Be(t,c+3*N,F[Wn[N]]);c+=3*R;for(var ie=[w,A],se=0;se<2;++se)for(var _e=ie[se],N=0;N<_e.length;++N){var ve=_e[N]&31;Be(t,c,J[ve]),c+=F[ve],ve>15&&(Be(t,c,_e[N]>>5&127),c+=_e[N]>>12);}}else z=Ys,L=ze,Y=Zs,S=Mt;for(var N=0;N<u;++N){var ee=r[N];if(ee>255){var ve=ee>>18&31;Pt(t,c,z[ve+257]),c+=L[ve+257],ve>7&&(Be(t,c,ee>>23&31),c+=an[ve]);var xe=ee&31;Pt(t,c,Y[xe]),c+=S[xe],xe>3&&(Pt(t,c,ee>>5&8191),c+=un[xe]);}else Pt(t,c,z[ee]),c+=L[ee];}return Pt(t,c,z[256]),c+L[256]},"wblk"),to=new Qn([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),qr=new te(0),no=h(function(e,t,n,r,s,i){var o=i.z||e.length,u=new te(r+o+5*(1+Math.ceil(o/7e3))+s),l=u.subarray(r,u.length-s),a=i.l,c=(i.r||0)&7;if(t){c&&(l[0]=i.r>>3);for(var f=to[t-1],p=f>>13,d=f&8191,g=(1<<n)-1,m=i.p||new we(32768),b=i.h||new we(g+1),D=Math.ceil(n/3),w=2*D,v=h(function(Fn){return (e[Fn]^e[Fn+1]<<D^e[Fn+2]<<w)&g},"hsh"),_=new Qn(25e3),A=new we(288),E=new we(32),y=0,N=0,C=i.i||0,F=0,P=i.w||0,R=0;C+2<o;++C){var j=v(C),O=C&32767,G=b[j];if(m[O]=G,b[j]=O,P<=C){var z=o-C;if((y>7e3||F>24576)&&(z>423||!a)){c=kr(e,l,0,_,A,E,N,F,R,C-R,c),F=y=N=0,R=C;for(var L=0;L<286;++L)A[L]=0;for(var L=0;L<30;++L)E[L]=0;}var Y=2,S=0,J=d,ie=O-G&32767;if(z>2&&j==v(C-ie))for(var se=Math.min(p,z)-1,_e=Math.min(32767,C),ve=Math.min(258,z);ie<=_e&&--J&&O!=G;){if(e[C+Y]==e[C+Y-ie]){for(var ee=0;ee<ve&&e[C+ee]==e[C+ee-ie];++ee);if(ee>Y){if(Y=ee,S=ie,ee>se)break;for(var xe=Math.min(ie,ee-2),ot=0,L=0;L<xe;++L){var at=C-ie+L&32767,rn=m[at],sn=at-rn&32767;sn>ot&&(ot=sn,G=at);}}}O=G,G=m[O],ie+=O-G&32767;}if(S){_[F++]=268435456|Hn[Y]<<18|Or[S];var St=Hn[Y]&31,Ot=Or[S]&31;N+=an[St]+un[Ot],++A[257+St],++E[Ot],P=C+Y,++y;}else _[F++]=e[C],++A[e[C]];}}for(C=Math.max(C,P);C<o;++C)_[F++]=e[C],++A[e[C]];c=kr(e,l,a,_,A,E,N,F,R,C-R,c),a||(i.r=c&7|l[c/8|0]<<3,c-=7,i.h=b,i.p=m,i.i=C,i.w=P);}else {for(var C=i.w||0;C<o+a;C+=65535){var ut=C+65535;ut>=o&&(l[c/8|0]=a,ut=o),c=Ur(l,c+1,e.subarray(C,ut));}i.i=o;}return Rt(u,0,r+Zn(c)+s)},"dflt"),ro=(function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var n=t,r=9;--r;)n=(n&1&&-306674912)^n>>>1;e[t]=n;}return e})(),io=h(function(){var e=-1;return {p:h(function(t){for(var n=e,r=0;r<t.length;++r)n=ro[n&255^t[r]]^n>>>8;e=n;},"p"),d:h(function(){return ~e},"d")}},"crc");var so=h(function(e,t,n,r,s){if(!s&&(s={l:1},t.dictionary)){var i=t.dictionary.subarray(-32768),o=new te(i.length+e.length);o.set(i),o.set(e,i.length),e=o,s.w=i.length;}return no(e,t.level==null?6:t.level,t.mem==null?s.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,n,r,s)},"dopt"),zr=h(function(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n},"mrg");var Se=h(function(e,t){return e[t]|e[t+1]<<8},"b2"),De=h(function(e,t){return (e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0},"b4"),jn=h(function(e,t){return De(e,t)+De(e,t+4)*4294967296},"b8"),ue=h(function(e,t,n){for(;n;++t)e[t]=n,n>>>=8;},"wbytes");function oo(e,t){return so(e,t||{},0,0)}h(oo,"deflateSync");function ao(e,t){return eo(e,{i:2},t&&t.out,t&&t.dictionary)}h(ao,"inflateSync");var jr=h(function(e,t,n,r){for(var s in e){var i=e[s],o=t+s,u=r;Array.isArray(i)&&(u=zr(r,i[1]),i=i[0]),ArrayBuffer.isView(i)?n[o]=[i,u]:(n[o+="/"]=[new te(0),u],jr(i,o,n,r));}},"fltn"),Mr=typeof TextEncoder<"u"&&new TextEncoder,Xn=typeof TextDecoder<"u"&&new TextDecoder,uo=0;try{Xn.decode(qr,{stream:!0}),uo=1;}catch{}var lo=h(function(e){for(var t="",n=0;;){var r=e[n++],s=(r>127)+(r>223)+(r>239);if(n+s>e.length)return {s:t,r:Rt(e,n-1)};s?s==3?(r=((r&15)<<18|(e[n++]&63)<<12|(e[n++]&63)<<6|e[n++]&63)-65536,t+=String.fromCharCode(55296|r>>10,56320|r&1023)):s&1?t+=String.fromCharCode((r&31)<<6|e[n++]&63):t+=String.fromCharCode((r&15)<<12|(e[n++]&63)<<6|e[n++]&63):t+=String.fromCharCode(r);}},"dutf8");function on(e,t){if(t){for(var n=new te(e.length),r=0;r<e.length;++r)n[r]=e.charCodeAt(r);return n}if(Mr)return Mr.encode(e);for(var s=e.length,i=new te(e.length+(e.length>>1)),o=0,u=h(function(c){i[o++]=c;},"w"),r=0;r<s;++r){if(o+5>i.length){var l=new te(o+8+(s-r<<1));l.set(i),i=l;}var a=e.charCodeAt(r);a<128||t?u(a):a<2048?(u(192|a>>6),u(128|a&63)):a>55295&&a<57344?(a=65536+(a&1047552)|e.charCodeAt(++r)&1023,u(240|a>>18),u(128|a>>12&63),u(128|a>>6&63),u(128|a&63)):(u(224|a>>12),u(128|a>>6&63),u(128|a&63));}return Rt(i,0,o)}h(on,"strToU8");function ln(e,t){if(t){for(var n="",r=0;r<e.length;r+=16384)n+=String.fromCharCode.apply(null,e.subarray(r,r+16384));return n}else {if(Xn)return Xn.decode(e);var s=lo(e),i=s.s,n=s.r;return n.length&&he(8),i}}h(ln,"strFromU8");var co=h(function(e,t){return t+30+Se(e,t+26)+Se(e,t+28)},"slzh"),fo=h(function(e,t,n){var r=Se(e,t+28),s=Se(e,t+30),i=ln(e.subarray(t+46,t+46+r),!(Se(e,t+8)&2048)),o=t+46+r,u=ho(e,o,s,n,De(e,t+20),De(e,t+24),De(e,t+42)),l=u[0],a=u[1],c=u[2];return [Se(e,t+10),l,a,i,o+s+Se(e,t+32),c]},"zh"),ho=h(function(e,t,n,r,s,i,o){var u=s==4294967295,l=i==4294967295,a=o==4294967295,c=t+n,f=u+l+a;if(r&&f){for(;t+4<c;t+=4+Se(e,t+2))if(Se(e,t)==1)return [u?jn(e,t+4+8*l):s,l?jn(e,t+4):i,a?jn(e,t+4+8*(l+u)):o,1];r<2&&he(13);}return [s,i,o,0]},"z64hs"),Yn=h(function(e){var t=0;if(e)for(var n in e){var r=e[n].length;r>65535&&he(9),t+=r+4;}return t},"exfl"),Rr=h(function(e,t,n,r,s,i,o,u){var l=r.length,a=n.extra,c=u&&u.length,f=Yn(a);ue(e,t,o!=null?33639248:67324752),t+=4,o!=null&&(e[t++]=20,e[t++]=n.os),e[t]=20,t+=2,e[t++]=n.flag<<1|(i<0&&8),e[t++]=s&&8,e[t++]=n.compression&255,e[t++]=n.compression>>8;var p=new Date(n.mtime==null?Date.now():n.mtime),d=p.getFullYear()-1980;if((d<0||d>119)&&he(10),ue(e,t,d<<25|p.getMonth()+1<<21|p.getDate()<<16|p.getHours()<<11|p.getMinutes()<<5|p.getSeconds()>>1),t+=4,i!=-1&&(ue(e,t,n.crc),ue(e,t+4,i<0?-i-2:i),ue(e,t+8,n.size)),ue(e,t+12,l),ue(e,t+14,f),t+=16,o!=null&&(ue(e,t,c),ue(e,t+6,n.attrs),ue(e,t+10,o),t+=14),e.set(r,t),t+=l,f)for(var g in a){var m=a[g],b=m.length;ue(e,t,+g),ue(e,t+2,b),e.set(m,t+4),t+=4+b;}return c&&(e.set(u,t),t+=c),t},"wzh"),po=h(function(e,t,n,r,s){ue(e,t,101010256),ue(e,t+8,n),ue(e,t+10,n),ue(e,t+12,r),ue(e,t+16,s);},"wzf");function Wr(e,t){t||(t={});var n={},r=[];jr(e,"",n,t);var s=0,i=0;for(var o in n){var u=n[o],l=u[0],a=u[1],c=a.level==0?0:8,f=on(o),p=f.length,d=a.comment,g=d&&on(d),m=g&&g.length,b=Yn(a.extra);p>65535&&he(11);var D=c?oo(l,a):l,w=D.length,v=io();v.p(l),r.push(zr(a,{size:l.length,crc:v.d(),c:D,f,m:g,u:p!=o.length||g&&d.length!=m,o:s,compression:c})),s+=30+p+b+w,i+=76+2*(p+b)+(m||0)+w;}for(var _=new te(i+22),A=s,E=i-s,y=0;y<r.length;++y){var f=r[y];Rr(_,f.o,f,f.f,f.u,f.c.length);var N=30+f.f.length+Yn(f.extra);_.set(f.c,f.o+N),Rr(_,s,f,f.f,f.u,f.c.length,f.o,f.m),s+=16+N+(f.m?f.m.length:0);}return po(_,s,r.length,E,A),_}h(Wr,"zipSync");function Hr(e,t){for(var n={},r=e.length-22;De(e,r)!=101010256;--r)(!r||e.length-r>65558)&&he(13);var s=Se(e,r+8);if(!s)return {};var i=De(e,r+16),o=De(e,r-20)==117853008;if(o){var u=De(e,r-12);o=De(e,u)==101075792,o&&(s=De(e,u+32),i=De(e,u+48));}for(var l=t&&t.filter,a=0;a<s;++a){var c=fo(e,i,o),f=c[0],p=c[1],d=c[2],g=c[3],m=c[4],b=c[5],D=co(e,b);i=m,(!l||l({name:g,size:p,originalSize:d,compression:f}))&&(f?f==8?n[g]=ao(e.subarray(D,D+p),{out:new te(d)}):he(14,"unknown compression type "+f):n[g]=Rt(e,D,D+p));}return n}h(Hr,"unzipSync");var On=$n(es()),Ds=$n(ts());function k(e,t){for(let n=0;n<e.childNodes.length;n++){let r=e.childNodes[n];if(r.nodeType===1&&r.tagName===t)return r}return null}h(k,"findChild");function su(e,t){let n=[];for(let r=0;r<e.childNodes.length;r++){let s=e.childNodes[r];s.nodeType===1&&s.tagName===t&&n.push(s);}return n}h(su,"findChildren");function x(e,t){return Array.from(e.getElementsByTagName(t))}h(x,"findAllDescendants");function Er(e){return new On.DOMParser().parseFromString(e,"text/xml")}h(Er,"parseXml");function ou(e){let t=new On.XMLSerializer().serializeToString(e),r=/<([a-zA-Z0-9_:]+)(\s+[^>]+?)(>|\/>)/.exec(t);if(r&&!r[1].startsWith("?")){let s=r.index,i=t.substring(0,s);if(!i.includes("<")||i.trim().startsWith("<?xml")&&(i.match(/</g)||[]).length===1){let u=r[0],l=`<${r[1]}`,a=r[2],c=r[3],f=/([a-zA-Z0-9_:]+)\s*=\s*(["'])(.*?)\2/g,p=[],d;for(;(d=f.exec(a))!==null;)p.push(d[0].trim());p.sort((m,b)=>{let D=m.split("=")[0].trim(),w=b.split("=")[0].trim(),v=D.startsWith("xmlns"),_=w.startsWith("xmlns");return v&&!_?-1:!v&&_?1:D<w?-1:D>w?1:0});let g=p.length>0?`${l} ${p.join(" ")}${c}`:`${l}${c}`;t=t.substring(0,s)+g+t.substring(s+u.length);}}return t}h(ou,"serializeXml");var In=class{static{h(this,"Relationship");}constructor(e,t,n,r){this.id=e,this.type=t,this.target=n,this.isExternal=r;}id;type;target;isExternal},as=class{static{h(this,"Part");}constructor(e,t,n,r){this.partname=e,this.blob=t,this.contentType=r,this._element=n;}partname;blob;contentType;rels=new Map;_element;package;addRelationship(e,t,n,r=false){if(this.rels.set(e,new In(e,t,n,r)),this.partname.endsWith(".rels")){let s=this._element.ownerDocument;if(s){let i=s.createElementNS("http://schemas.openxmlformats.org/package/2006/relationships","Relationship");i.setAttribute("Id",e),i.setAttribute("Type",t),i.setAttribute("Target",n),r&&i.setAttribute("TargetMode","External"),this._element.appendChild(i);}}}},au=class{static{h(this,"DocxPackage");}constructor(e){this.unzipped=e;}unzipped;parts=[];mainDocumentPart;getPartByPath(e){let t=e.startsWith("/")?e.substring(1):e;return this.parts.find(n=>n.partname===t||n.partname==="/"+t)}nextPartname(e){let t=1;for(;;){let n=e.replace("%d",t===1?"":t.toString());if(!this.getPartByPath(n))return n;t++;}}addPart(e,t,n){let r=Er(n),s=new as(e,n,r.documentElement,t);s.package=this,this.parts.push(s);let i=this.getPartByPath("[Content_Types].xml");if(i){let o=i._element.ownerDocument;if(o){let u=o.createElement("Override");u.setAttribute("PartName",e),u.setAttribute("ContentType",t),i._element.appendChild(u);}}return s}getOrCreateRelsPart(e){let t=e.split("/"),n=t.pop(),r=t.join("/")+"/_rels/"+n+".rels",s=this.getPartByPath(r);return s||(s=this.addPart(r,"application/vnd.openxmlformats-package.relationships+xml",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
10
+ <Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"></Relationships>`)),s}},tn=class us{static{h(this,"_DocumentObject");}constructor(t,n){this.pkg=t,this.part=n;}pkg;part;settings={oddAndEvenPagesHeaderFooter:false};sections=[];get element(){return k(this.part._element,"w:body")||this.part._element}static async load(t){let n=t instanceof Uint8Array?t:new Uint8Array(t),r=Hr(n),s=new au(r),i=r["[Content_Types].xml"],o={};if(i){let a=Er(ln(i)),c=x(a.documentElement,"Override");for(let f of c)o[f.getAttribute("PartName")||""]=f.getAttribute("ContentType")||"";}for(let[a,c]of Object.entries(r))if(a.endsWith(".xml")||a.endsWith(".rels")){let f=ln(c),p=Er(f),d=o["/"+a]||"application/xml",g=new as("/"+a,f,p.documentElement,d);g.package=s,s.parts.push(g);}let u=s.getPartByPath("word/document.xml");if(!u)throw new Error("Invalid DOCX: Missing word/document.xml");s.mainDocumentPart=u;let l=s.getPartByPath("word/_rels/document.xml.rels");if(l){let a=x(l._element,"Relationship");for(let c of a){let f=c.getAttribute("Id"),p=c.getAttribute("Target"),d=c.getAttribute("Type"),g=c.getAttribute("TargetMode");f&&p&&d&&u.rels.set(f,new In(f,d,p,g==="External"));}}return new us(s,u)}relateTo(t,n){let r=1;for(;this.part.rels.has(`rId${r}`);)r++;let s=`rId${r}`,i=t.partname.split("/").pop();this.part.rels.set(s,new In(s,n,i,false)),this.pkg.getOrCreateRelsPart(this.part.partname).addRelationship(s,n,i,false);}relateToExternal(t,n){let r=1;for(;this.part.rels.has(`rId${r}`);)r++;let s=`rId${r}`;return this.part.rels.set(s,new In(s,n,t,true)),this.pkg.getOrCreateRelsPart(this.part.partname).addRelationship(s,n,t,true),s}async save(){for(let t of this.pkg.parts){let n=ou(t._element.ownerDocument||t._element);n.startsWith("<?xml")||(n=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
11
+ `+n),this.pkg.unzipped[t.partname.substring(1)]=on(n);}return Buffer.from(Wr(this.pkg.unzipped))}},Ze=class{static{h(this,"Paragraph");}constructor(e,t){this._element=e,this._parent=t;}_element;_parent;get text(){let e="",t=this._element.getElementsByTagName("w:t");for(let n=0;n<t.length;n++)e+=t[n].textContent||"";return e}},Je=class{static{h(this,"Run");}constructor(e,t){this._element=e,this._parent=t;}_element;_parent},uu=class{static{h(this,"Cell");}constructor(e,t){this._element=e,this._parent=t;}_element;_parent},lu=class{static{h(this,"Row");}constructor(e,t){this._element=e,this._parent=t;let n=this._element.getElementsByTagName("w:tc");for(let r=0;r<n.length;r++)this.cells.push(new uu(n[r],this));}_element;_parent;cells=[]},Dr=class{static{h(this,"Table");}constructor(e,t){this._element=e,this._parent=t;let n=this._element.getElementsByTagName("w:tr");for(let r=0;r<n.length;r++)this.rows.push(new lu(n[r],this));}_element;_parent;rows=[]},ns=class{static{h(this,"NotesPart");}constructor(e,t){this.part=e,this.note_type=t,this._element=e._element;}part;note_type;_element},cu=class{static{h(this,"FootnoteItem");}constructor(e,t,n){this._element=e,this._parent=t,this.note_type=n,this.id=e.getAttribute("w:id")||"",this.part=t.part;}_element;_parent;note_type;id;part},Ue={w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",w16cid:"http://schemas.microsoft.com/office/word/2016/wordml/cid",w16cex:"http://schemas.microsoft.com/office/word/2018/wordml/cex",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006"},Ee={COMMENTS:"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml",EXTENDED:"application/vnd.openxmlformats-officedocument.wordprocessingml.commentsExtended+xml",IDS:"application/vnd.openxmlformats-officedocument.wordprocessingml.commentsIds+xml",EXTENSIBLE:"application/vnd.openxmlformats-officedocument.wordprocessingml.commentsExtensible+xml"},Xe={COMMENTS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",EXTENDED:"http://schemas.microsoft.com/office/2011/relationships/commentsExtended",IDS:"http://schemas.microsoft.com/office/2016/09/relationships/commentsIds",EXTENSIBLE:"http://schemas.microsoft.com/office/2018/08/relationships/commentsExtensible"},Pn=class{static{h(this,"CommentsManager");}constructor(e){this.doc=e;}doc;_commentsPart=null;_extendedPart=null;_idsPart=null;_extensiblePart=null;_nextId=null;get commentsPart(){return this._commentsPart||(this._commentsPart=this._getOrCreateCommentsPart(),this._ensureNamespaces()),this._commentsPart}get extendedPart(){return this._extendedPart||(this._extendedPart=this._getOrCreateExtendedPart()),this._extendedPart}get idsPart(){return this._idsPart||(this._idsPart=this._getOrCreateIdsPart()),this._idsPart}get extensiblePart(){return this._extensiblePart||(this._extensiblePart=this._getOrCreateExtensiblePart()),this._extensiblePart}get nextId(){return this._nextId===null&&(this._nextId=this._getNextCommentId()),this._nextId}set nextId(e){this._nextId=e;}_getExistingPartByType(e){return this.doc.pkg.parts.find(t=>t.contentType===e)||null}_linkPart(e,t){for(let n of this.doc.part.rels.values())if(!n.isExternal&&n.target===e.partname.split("/").pop())return e;return this.doc.relateTo(e,t),e}_getOrCreateCommentsPart(){let e=this._getExistingPartByType(Ee.COMMENTS);if(e)return this._linkPart(e,Xe.COMMENTS);let t=this.doc.pkg.nextPartname("/word/comments%d.xml"),n=`<w:comments xmlns:w="${Ue.w}" xmlns:w14="${Ue.w14}" xmlns:w15="${Ue.w15}" xmlns:w16cid="${Ue.w16cid}" xmlns:w16cex="${Ue.w16cex}" xmlns:mc="${Ue.mc}" mc:Ignorable="w14 w15 w16cid w16cex"></w:comments>`;return e=this.doc.pkg.addPart(t,Ee.COMMENTS,n),this.doc.relateTo(e,Xe.COMMENTS),e}_getOrCreateExtendedPart(){let e=this._getExistingPartByType(Ee.EXTENDED);if(e)return this._linkPart(e,Xe.EXTENDED);let t=this.doc.pkg.nextPartname("/word/commentsExtended%d.xml"),n=`<w15:commentsEx xmlns:w15="${Ue.w15}"></w15:commentsEx>`;return e=this.doc.pkg.addPart(t,Ee.EXTENDED,n),this.doc.relateTo(e,Xe.EXTENDED),e}_getOrCreateIdsPart(){let e=this._getExistingPartByType(Ee.IDS);if(e)return this._linkPart(e,Xe.IDS);let t=this.doc.pkg.nextPartname("/word/commentsIds%d.xml"),n=`<w16cid:commentsIds xmlns:w16cid="${Ue.w16cid}"></w16cid:commentsIds>`;return e=this.doc.pkg.addPart(t,Ee.IDS,n),this.doc.relateTo(e,Xe.IDS),e}_getOrCreateExtensiblePart(){let e=this._getExistingPartByType(Ee.EXTENSIBLE);if(e)return this._linkPart(e,Xe.EXTENSIBLE);let t=this.doc.pkg.nextPartname("/word/commentsExtensible%d.xml"),n=`<w16cex:commentsExtensible xmlns:w16cex="${Ue.w16cex}"></w16cex:commentsExtensible>`;return e=this.doc.pkg.addPart(t,Ee.EXTENSIBLE,n),this.doc.relateTo(e,Xe.EXTENSIBLE),e}_ensureNamespaces(){}_getNextCommentId(){let e=[0],t=this._getExistingPartByType(Ee.COMMENTS);if(t){let n=x(t._element,"w:comment");for(let r of n){let s=r.getAttribute("w:id");s&&e.push(parseInt(s,10)||0);}}return Math.max(...e)+1}_generateHexId(){return Math.floor(Math.random()*4294967295).toString(16).toUpperCase().padStart(8,"0")}_getInitials(e){return e?e.split(" ").filter(Boolean).map(t=>t[0]).join("").toUpperCase():""}_findParaIdForComment(e){if(!this._commentsPart)return null;for(let t of x(this._commentsPart._element,"w:comment"))if(t.getAttribute("w:id")===e)for(let n of x(t,"w:p")){let r=n.getAttribute("w14:paraId");if(r)return r}return null}_findThreadRootParaId(e){let t=this._findParaIdForComment(e),n=this._getExistingPartByType(Ee.EXTENDED);if(!t||!n)return t;for(let r=0;r<n._element.childNodes.length;r++){let s=n._element.childNodes[r];if(s.nodeType===1&&s.getAttribute("w15:paraId")===t){let i=s.getAttribute("w15:paraIdParent");if(i)return i}}return t}addComment(e,t,n=null){let r=this.nextId.toString();this.nextId++;let s=new Date().toISOString().replace(/\.\d{3}Z$/,"Z"),i=this.commentsPart._element.ownerDocument,o=i.createElement("w:comment");o.setAttribute("w:id",r),o.setAttribute("w:author",e),o.setAttribute("w:date",s);let u=this._getInitials(e);u&&o.setAttribute("w:initials",u);let l=this._getExistingPartByType(Ee.EXTENDED);n&&!l&&o.setAttribute("w15:p",n);let a=this._generateHexId(),c=this._generateHexId(),f=i.createElement("w:p");f.setAttribute("w14:paraId",a),f.setAttribute("w14:textId","77777777"),f.setAttribute("w:rsidR",c),f.setAttribute("w:rsidRDefault",c),f.setAttribute("w:rsidP",c);let p=i.createElement("w:pPr"),d=i.createElement("w:pStyle");d.setAttribute("w:val","CommentText"),p.appendChild(d),f.appendChild(p);let g=i.createElement("w:r"),m=i.createElement("w:rPr"),b=i.createElement("w:rStyle");b.setAttribute("w:val","CommentReference"),m.appendChild(b),g.appendChild(m),g.appendChild(i.createElement("w:annotationRef")),f.appendChild(g);let D=i.createElement("w:r"),w=i.createElement("w:t");if(w.textContent=t,D.appendChild(w),f.appendChild(D),o.appendChild(f),this.commentsPart._element.appendChild(o),this.extendedPart){let v=n?this._findThreadRootParaId(n):null,A=this.extendedPart._element.ownerDocument.createElement("w15:commentEx");A.setAttribute("w15:paraId",a),v&&A.setAttribute("w15:paraIdParent",v),A.setAttribute("w15:done","0"),this.extendedPart._element.appendChild(A);}if(this.idsPart){let _=this.idsPart._element.ownerDocument.createElement("w16cid:commentId");_.setAttribute("w16cid:paraId",a),_.setAttribute("w16cid:durableId",this._generateHexId()),this.idsPart._element.appendChild(_);}if(this.extensiblePart){let v=null;for(let _=0;_<this.idsPart._element.childNodes.length;_++){let A=this.idsPart._element.childNodes[_];if(A.nodeType===1&&A.getAttribute("w16cid:paraId")===a){v=A.getAttribute("w16cid:durableId");break}}if(v){let A=this.extensiblePart._element.ownerDocument.createElement("w16cex:commentExtensible");A.setAttribute("w16cex:durableId",v),A.setAttribute("w16cex:dateUtc",s),this.extensiblePart._element.appendChild(A);}}return r}deleteComment(e){if(!this._commentsPart)return;let t=null;for(let r of x(this._commentsPart._element,"w:comment"))if(r.getAttribute("w:id")===e){t=r;break}if(!t)return;let n=null;for(let r of x(t,"w:p")){let s=r.getAttribute("w14:paraId");if(s){n=s;break}}if(n){let r=[];if(this.extendedPart)for(let i=0;i<this.extendedPart._element.childNodes.length;i++){let o=this.extendedPart._element.childNodes[i];if(o.nodeType===1&&o.getAttribute("w15:paraIdParent")===n){let u=o.getAttribute("w15:paraId");if(u){for(let l of x(this._commentsPart._element,"w:comment"))for(let a of x(l,"w:p"))if(a.getAttribute("w14:paraId")===u){let c=l.getAttribute("w:id");c&&r.push(c);break}}}}for(let i of r)this.deleteComment(i);let s=null;if(this.idsPart){let i=[];for(let o=0;o<this.idsPart._element.childNodes.length;o++){let u=this.idsPart._element.childNodes[o];u.nodeType===1&&u.getAttribute("w16cid:paraId")===n&&(s=u.getAttribute("w16cid:durableId"),i.push(u));}i.forEach(o=>this.idsPart._element.removeChild(o));}if(this.extendedPart){let i=[];for(let o=0;o<this.extendedPart._element.childNodes.length;o++){let u=this.extendedPart._element.childNodes[o];u.nodeType===1&&u.getAttribute("w15:paraId")===n&&i.push(u);}i.forEach(o=>this.extendedPart._element.removeChild(o));}if(s&&this.extensiblePart){let i=[];for(let o=0;o<this.extensiblePart._element.childNodes.length;o++){let u=this.extensiblePart._element.childNodes[o];u.nodeType===1&&u.getAttribute("w16cex:durableId")===s&&i.push(u);}i.forEach(o=>this.extensiblePart._element.removeChild(o));}}t.parentNode&&t.parentNode.removeChild(t);}};function kn(e){({part:e.mainDocumentPart,relateTo:h(()=>{},"relateTo")});let r={},s=e.parts.find(l=>l.contentType===Ee.COMMENTS);if(!s)return r;let i={},o=x(s._element,"w:comment");for(let l of o){let a=l.getAttribute("w:id");if(!a)continue;let c=l.getAttribute("w:author")||"Unknown",f=l.getAttribute("w:date")||"",p=false,d=l.getAttribute("w15:done");(d==="1"||d==="true"||d==="on")&&(p=true);let g=l.getAttribute("w15:p")||null,m=x(l,"w:p");for(let w of m){let v=w.getAttribute("w14:paraId");v&&(i[v]=a);}let b=[];for(let w of m){let v=x(w,"w:t");for(let _ of v)_.textContent&&b.push(_.textContent);b.push(`
12
+ `);}let D=b.join("").trim();r[a]={author:c,text:D,date:f,resolved:p,parent_id:g};}let u=e.parts.find(l=>l.contentType===Ee.EXTENDED);if(u){let l=u._element.childNodes;for(let a=0;a<l.length;a++){let c=l[a];if(c.nodeType!==1)continue;let f=c.getAttribute("w15:paraId"),p=c.getAttribute("w15:paraIdParent"),d=c.getAttribute("w15:done");if(f){let g=i[f];if(g&&r[g]){if(p){let m=i[p];m&&(r[g].parent_id=m);}(d==="1"||d==="true"||d==="on")&&(r[g].resolved=true);}}}}return r}h(kn,"extract_comments_data");var fu="w:p",ls="w:r",cs="w:t",hu="w:delText",pu="w:tab",du="w:br",mu="w:cr",Ar="w:rPr",gu="w:rPrChange",_u="w:commentReference",vu="w:footnoteReference",wu="w:endnoteReference",Eu="w:fldChar",Du="w:fldCharType",Au="w:instrText",yu="w:ins",bu="w:del",Ye="w:id",_r="w:author",vr="w:date",Nu="w:commentRangeStart",Cu="w:commentRangeEnd",Tu="w:hyperlink",xu="r:id",Iu="w:fldSimple",Su="w:instr",Ou="w:bookmarkStart",Pu="w:name",ku="w:sdt",Mu="w:smartTag",Ru="w:sdtContent",fs="w:b",Bu="w:i",Ce="w:val",hs="w:pPr",ps="w:pStyle",ds="w:outlineLvl",Fu="w:numPr",Lu="w:numId",$u="w:ilvl",Uu=/Heading[ ]?([1-6])(?![0-9])/;function Mn(e){let t=e.package||e.pkg||(e.part?e.part.pkg:null);if(t&&t._adeu_style_cache)return t._adeu_style_cache;let n={},r=null,s={},i=t?.getPartByPath("word/styles.xml");if(!i){let a=[n,null];return t&&(t._adeu_style_cache=a),a}let o=x(i._element,"w:style");for(let a of o){let c=a.getAttribute("w:styleId");if(!c)continue;let f=a.getAttribute("w:type"),p=a.getAttribute("w:default")==="1"||a.getAttribute("w:default")==="true";f==="paragraph"&&p&&(r=c);let d=k(a,"w:name"),g=d?d.getAttribute("w:val"):c;g&&typeof g=="string"&&(g.toLowerCase().startsWith("heading")?g=g.replace(/^heading/i,"Heading"):g.toLowerCase()==="title"&&(g="Title"));let m=k(a,"w:basedOn"),b=m?m.getAttribute("w:val"):null,D=null,w=k(a,"w:pPr");if(w){let A=k(w,"w:outlineLvl");if(A){let E=A.getAttribute("w:val");E&&/^\d+$/.test(E)&&(D=parseInt(E,10));}}let v=null,_=k(a,"w:rPr");if(_){let A=k(_,"w:b");if(A){let E=A.getAttribute("w:val");v=E!=="0"&&E!=="false"&&E!=="off";}}s[c]={name:g,based_on:b,outline_level:D,bold:v};}let u=h((a,c)=>{if(n[a])return n[a];if(c.has(a)||!s[a])return {name:a,outline_level:null,bold:false};c.add(a);let f=s[a],p=f.based_on,d=f.outline_level,g=f.bold!==null?f.bold:false;if(p){let b=u(p,c);d===null&&(d=b.outline_level),f.bold===null&&(g=b.bold);}let m={name:f.name,outline_level:d,bold:g};return n[a]=m,m},"resolve_style");for(let a in s)u(a,new Set);let l=[n,r];return t&&(t._adeu_style_cache=l),l}h(Mn,"_get_style_cache");function ms(e){if(!e)return null;let t=e.match(Uu);return t?parseInt(t[1],10):null}h(ms,"_detect_heading_level_from_name");function yr(e,t,n){t||([t,n]=Mn(e._parent.part||e._parent));let r=k(e._element,hs);if(r){let u=k(r,ds);if(u){let l=u.getAttribute(Ce);if(l&&/^\d+$/.test(l)){let a=parseInt(l,10);if(a>=0&&a<=8)return true}}}let s=n;if(r){let u=k(r,ps);u&&(s=u.getAttribute(Ce)||n);}let i=s&&t?t[s]:null;if(i&&i.outline_level!==null&&i.outline_level>=0&&i.outline_level<=8)return true;let o=i?i.name:s;return o&&typeof o=="string"&&o.toLowerCase().startsWith("heading")&&(o=o.replace(/^heading/i,"Heading")),!!(o?.startsWith("Heading")||o==="Title"||o&&o!=="Normal"&&ms(o)!==null)}h(yr,"is_native_heading");function br(e,t,n){t||([t,n]=Mn(e._parent.part||e._parent));let r=k(e._element,hs);if(r){let u=k(r,ds);if(u){let l=u.getAttribute(Ce);if(l&&/^\d+$/.test(l)){let a=parseInt(l,10);if(a>=0&&a<=8)return "#".repeat(a+1)+" "}}}let s=n;if(r){let u=k(r,ps);u&&(s=u.getAttribute(Ce)||n);}let i=s&&t?t[s]:null;if(i&&i.outline_level!==null&&i.outline_level>=0&&i.outline_level<=8)return "#".repeat(i.outline_level+1)+" ";let o=i?i.name:s;if(o&&typeof o=="string"&&o.toLowerCase().startsWith("heading")&&(o=o.replace(/^heading/i,"Heading")),o?.startsWith("Heading")){let u=o.replace("Heading","").trim();if(/^\d+$/.test(u))return "#".repeat(parseInt(u,10))+" "}if(o==="Title")return "# ";if(r){let u=k(r,Fu);if(u){let l=k(u,Lu);if(l&&l.getAttribute(Ce)!=="0"){let a=0,c=k(u,$u);if(c){let f=c.getAttribute(Ce);f&&(a=parseInt(f,10)||0);}return " ".repeat(a)+"* "}}}if(o&&o!=="Normal"){let u=ms(o);if(u!==null)return "#".repeat(u)+" "}if(!o||o==="Normal"){let u=e.text.trim();if(u&&u.length<100&&u===u.toUpperCase()){let l=false;if(i?.bold)l=true;else {let a=x(e._element,ls);for(let c of a)if(x(c,cs).map(d=>d.textContent||"").join("").trim()){let d=k(c,Ar);if(d){let g=k(d,fs);g&&g.getAttribute(Ce)!=="0"&&g.getAttribute(Ce)!=="false"&&(l=true);}break}}if(l)return "## "}}return ""}h(br,"get_paragraph_prefix");function gs(e,t,n){let r=br(e,t,n);if(!r)return false;let s=r.trimEnd();return s.length>0&&s==="#".repeat(s.length)}h(gs,"is_heading_paragraph");function _s(e,t=null){let n="",r="",s=k(e._element,Ar),i=false,o=false;if(s){let u=k(s,fs);u&&u.getAttribute(Ce)!=="0"&&u.getAttribute(Ce)!=="false"&&(i=true);let l=k(s,Bu);l&&l.getAttribute(Ce)!=="0"&&l.getAttribute(Ce)!=="false"&&(o=true);}if(t===null){let u=e._parent;t=u instanceof Ze?yr(u):false;}return i&&!t&&(n+="**",r="**"+r),o&&(n+="_",r="_"+r),[n,r]}h(_s,"get_run_style_markers");function qu(e,t,n){return !t&&!n?e:e?e.includes(`
13
13
  `)?e.split(`
14
14
  `).map(s=>s?`${t}${s}${n}`:"").join(`
15
- `):`${t}${e}${n}`:""}h($u,"apply_formatting_to_segments");function it(e){let t="";for(let n=0;n<e._element.childNodes.length;n++){let r=e._element.childNodes[n];if(r.nodeType===1)if(r.tagName===as||r.tagName===cu){let s=r.textContent||"";t+=s.replace(/\t/g," ");}else r.tagName===fu?t+=" ":(r.tagName===hu||r.tagName===pu)&&(t+=`
16
- `);}return t}h(it,"get_run_text");function*br(e){let t=e._element||e.element||e;if(e.constructor.name==="NotesPart"){let n=e.note_type==="fn"?"w:footnote":"w:endnote",r=x(t,n);for(let s of r)s.getAttribute("w:type")==="separator"||s.getAttribute("w:type")==="continuationSeparator"||(yield new uu(s,e,e.note_type));return}for(let n=0;n<t.childNodes.length;n++){let r=t.childNodes[n];r.nodeType===1&&(r.tagName===lu?yield new Ze(r,e):r.tagName==="w:tbl"&&(yield new Er(r,e)));}}h(br,"iter_block_items");function*ms(e){let t=e.pkg.parts.filter(i=>i.contentType==="application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml");for(let i of t)yield i;yield e;let n=e.pkg.parts.filter(i=>i.contentType==="application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml");for(let i of n)yield i;let r=e.pkg.getPartByPath("word/footnotes.xml"),s=e.pkg.getPartByPath("word/endnotes.xml");r&&(yield new Ki(r,"fn")),s&&(yield new Ki(s,"en"));}h(ms,"iter_document_parts");function Uu(e){if(!e)return false;let t=e.toUpperCase().trim().split(/\s+/);return t.length>0&&(t[0]==="PAGE"||t[0]==="NUMPAGES")}h(Uu,"_is_page_instr");function gs(e){return e?e.part?e.part:e.pkg&&e.pkg.mainDocumentPart?e.pkg.mainDocumentPart:e._parent?gs(e._parent):null:null}h(gs,"_get_part");function*_s(e){let t=false,n="",r=false;function*s(o){let u=null,l=k(o,Dr);if(l){let a=k(l,du);a&&(u=a.getAttribute(Ye),yield {type:"fmt_start",id:u,author:a.getAttribute(gr)||void 0,date:a.getAttribute(_r)||void 0});}for(let a=0;a<o.childNodes.length;a++){let c=o.childNodes[a];if(c.nodeType!==1)continue;let f=c.tagName;if(f===mu){let p=c.getAttribute(Ye);p&&(yield {type:"ref",id:p});}else if(f===gu){let p=c.getAttribute(Ye);p&&(yield {type:"footnote",id:p});}else if(f===_u){let p=c.getAttribute(Ye);p&&(yield {type:"endnote",id:p});}else if(f===vu){let p=c.getAttribute(wu);if(p==="begin")t=true,n="";else if(p==="separate")if(Uu(n))r=true;else {let d=n.trim().split(/\s+/);d.length>1&&d[0]==="REF"&&(yield {type:"xref_start",id:d[1]});}else if(p==="end"){if(!r){let d=n.trim().split(/\s+/);d.length>1&&d[0]==="REF"&&(yield {type:"xref_end",id:d[1]});}t=false,n="",r=false;}}else f===Eu&&t&&!r&&(n+=c.textContent||"");}r||(yield new Je(o,e)),u!==null&&(yield {type:"fmt_end",id:u});}h(s,"process_run_element");function*i(o){for(let u=0;u<o.childNodes.length;u++){let l=o.childNodes[u];if(l.nodeType!==1)continue;let a=l.tagName;if(a===os)yield*s(l);else if(a===Du){let c=l.getAttribute(Ye);yield {type:"ins_start",id:c,author:l.getAttribute(gr)||void 0,date:l.getAttribute(_r)||void 0},yield*i(l),yield {type:"ins_end",id:c};}else if(a===Au){let c=l.getAttribute(Ye);yield {type:"del_start",id:c,author:l.getAttribute(gr)||void 0,date:l.getAttribute(_r)||void 0},yield*i(l),yield {type:"del_end",id:c};}else if(a===yu)yield {type:"start",id:l.getAttribute(Ye)};else if(a===bu)yield {type:"end",id:l.getAttribute(Ye)};else if(a===Nu){let c=l.getAttribute(Cu)||l.getAttribute("id"),f="",p=gs(e._parent);if(c&&p){let d=p.rels.get(c);d&&d.isExternal&&(f=d.target);}f&&(yield {type:"hyperlink_start",id:c,date:f}),yield*i(l),f&&(yield {type:"hyperlink_end",id:c,date:f});}else if(a===Tu){let f=(l.getAttribute(xu)||"").trim().split(/\s+/),p=f.length>1&&f[0]==="REF"?f[1]:"";p&&(yield {type:"xref_start",id:p}),yield*i(l),p&&(yield {type:"xref_end",id:p});}else if(a===Iu){let c=l.getAttribute(Su);c&&(!c.startsWith("_")||c.startsWith("_Ref"))&&(yield {type:"bookmark",id:c});}else (a===Ou||a===Pu||a===ku)&&(yield*i(l));}}h(i,"traverse_node"),yield*i(e._element);}h(_s,"iter_paragraph_content");var vr=class{static{h(this,"DocumentMapper");}doc;clean_view;comments_map;full_text="";spans=[];appendix_start_index=-1;_text_chunks=[];constructor(e,t=false){this.doc=e,this.clean_view=t,this.comments_map=kn(e.pkg),this._build_map();}_build_map(){let e=0;this.spans=[],this._text_chunks=[],this.full_text="";for(let t of ms(this.doc))e=this._map_blocks(t,e),this.spans.length>0&&this.spans[this.spans.length-1].text!==`
15
+ `):`${t}${e}${n}`:""}h(qu,"apply_formatting_to_segments");function it(e){let t="";for(let n=0;n<e._element.childNodes.length;n++){let r=e._element.childNodes[n];if(r.nodeType===1)if(r.tagName===cs||r.tagName===hu){let s=r.textContent||"";t+=s.replace(/\t/g," ");}else r.tagName===pu?t+=" ":(r.tagName===du||r.tagName===mu)&&(t+=`
16
+ `);}return t}h(it,"get_run_text");function*Nr(e){let t=e._element||e.element||e;if(e.constructor.name==="NotesPart"){let n=e.note_type==="fn"?"w:footnote":"w:endnote",r=x(t,n);for(let s of r)s.getAttribute("w:type")==="separator"||s.getAttribute("w:type")==="continuationSeparator"||(yield new cu(s,e,e.note_type));return}for(let n=0;n<t.childNodes.length;n++){let r=t.childNodes[n];r.nodeType===1&&(r.tagName===fu?yield new Ze(r,e):r.tagName==="w:tbl"&&(yield new Dr(r,e)));}}h(Nr,"iter_block_items");function*vs(e){let t=e.pkg.parts.filter(i=>i.contentType==="application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml");for(let i of t)yield i;yield e;let n=e.pkg.parts.filter(i=>i.contentType==="application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml");for(let i of n)yield i;let r=e.pkg.getPartByPath("word/footnotes.xml"),s=e.pkg.getPartByPath("word/endnotes.xml");r&&(yield new ns(r,"fn")),s&&(yield new ns(s,"en"));}h(vs,"iter_document_parts");function zu(e){if(!e)return false;let t=e.toUpperCase().trim().split(/\s+/);return t.length>0&&(t[0]==="PAGE"||t[0]==="NUMPAGES")}h(zu,"_is_page_instr");function ws(e){return e?e.part?e.part:e.pkg&&e.pkg.mainDocumentPart?e.pkg.mainDocumentPart:e._parent?ws(e._parent):null:null}h(ws,"_get_part");function*Es(e){let t=false,n="",r=false;function*s(o){let u=null,l=k(o,Ar);if(l){let a=k(l,gu);a&&(u=a.getAttribute(Ye),yield {type:"fmt_start",id:u,author:a.getAttribute(_r)||void 0,date:a.getAttribute(vr)||void 0});}for(let a=0;a<o.childNodes.length;a++){let c=o.childNodes[a];if(c.nodeType!==1)continue;let f=c.tagName;if(f===_u){let p=c.getAttribute(Ye);p&&(yield {type:"ref",id:p});}else if(f===vu){let p=c.getAttribute(Ye);p&&(yield {type:"footnote",id:p});}else if(f===wu){let p=c.getAttribute(Ye);p&&(yield {type:"endnote",id:p});}else if(f===Eu){let p=c.getAttribute(Du);if(p==="begin")t=true,n="";else if(p==="separate")if(zu(n))r=true;else {let d=n.trim().split(/\s+/);d.length>1&&d[0]==="REF"&&(yield {type:"xref_start",id:d[1]});}else if(p==="end"){if(!r){let d=n.trim().split(/\s+/);d.length>1&&d[0]==="REF"&&(yield {type:"xref_end",id:d[1]});}t=false,n="",r=false;}}else f===Au&&t&&!r&&(n+=c.textContent||"");}r||(yield new Je(o,e)),u!==null&&(yield {type:"fmt_end",id:u});}h(s,"process_run_element");function*i(o){for(let u=0;u<o.childNodes.length;u++){let l=o.childNodes[u];if(l.nodeType!==1)continue;let a=l.tagName;if(a===ls)yield*s(l);else if(a===yu){let c=l.getAttribute(Ye);yield {type:"ins_start",id:c,author:l.getAttribute(_r)||void 0,date:l.getAttribute(vr)||void 0},yield*i(l),yield {type:"ins_end",id:c};}else if(a===bu){let c=l.getAttribute(Ye);yield {type:"del_start",id:c,author:l.getAttribute(_r)||void 0,date:l.getAttribute(vr)||void 0},yield*i(l),yield {type:"del_end",id:c};}else if(a===Nu)yield {type:"start",id:l.getAttribute(Ye)};else if(a===Cu)yield {type:"end",id:l.getAttribute(Ye)};else if(a===Tu){let c=l.getAttribute(xu)||l.getAttribute("id"),f="",p=ws(e._parent);if(c&&p){let d=p.rels.get(c);d&&d.isExternal&&(f=d.target);}f&&(yield {type:"hyperlink_start",id:c,date:f}),yield*i(l),f&&(yield {type:"hyperlink_end",id:c,date:f});}else if(a===Iu){let f=(l.getAttribute(Su)||"").trim().split(/\s+/),p=f.length>1&&f[0]==="REF"?f[1]:"";p&&(yield {type:"xref_start",id:p}),yield*i(l),p&&(yield {type:"xref_end",id:p});}else if(a===Ou){let c=l.getAttribute(Pu);c&&(!c.startsWith("_")||c.startsWith("_Ref"))&&(yield {type:"bookmark",id:c});}else (a===ku||a===Mu||a===Ru)&&(yield*i(l));}}h(i,"traverse_node"),yield*i(e._element);}h(Es,"iter_paragraph_content");var wr=class{static{h(this,"DocumentMapper");}doc;clean_view;comments_map;full_text="";spans=[];appendix_start_index=-1;_text_chunks=[];constructor(e,t=false){this.doc=e,this.clean_view=t,this.comments_map=kn(e.pkg),this._build_map();}_build_map(){let e=0;this.spans=[],this._text_chunks=[],this.full_text="";for(let t of vs(this.doc))e=this._map_blocks(t,e),this.spans.length>0&&this.spans[this.spans.length-1].text!==`
17
17
 
18
18
  `&&(this._add_virtual_text(`
19
19
 
@@ -22,45 +22,45 @@
22
22
  `;)this.spans.pop(),this._text_chunks.pop();this.full_text=this._text_chunks.join(""),this.appendix_start_index=-1;}_map_blocks(e,t){let n=t,r=e.constructor.name,s=e.part||e,[i,o]=Mn(s);if(r==="NotesPart"){let c=`---
23
23
  ${e.note_type==="fn"?"## Footnotes":"## Endnotes"}`;this._add_virtual_text(c,n,null),n+=c.length,this._add_virtual_text(`
24
24
 
25
- `,n,null),n+=2;}let u=true,l=null;for(let a of br(e))if(a.constructor.name==="FootnoteItem")n=this._map_blocks(a,n);else if(a instanceof Ze){if(!u){let p=l instanceof Ze?l:null;this._add_virtual_text(`
25
+ `,n,null),n+=2;}let u=true,l=null;for(let a of Nr(e))if(a.constructor.name==="FootnoteItem")n=this._map_blocks(a,n);else if(a instanceof Ze){if(!u){let p=l instanceof Ze?l:null;this._add_virtual_text(`
26
26
 
27
- `,n,p),n+=2;}let f=yr(a,i,o);u&&r==="FootnoteItem"&&(f=`[^${e.note_type}-${e.id}]: `+f),f&&(this._add_virtual_text(f,n,a),n+=f.length),n=this._map_paragraph_content(a,n,i,o),u=false,l=a;}else if(a instanceof Er){if(!u){let f=l instanceof Ze?l:null;this._add_virtual_text(`
27
+ `,n,p),n+=2;}let f=br(a,i,o);u&&r==="FootnoteItem"&&(f=`[^${e.note_type}-${e.id}]: `+f),f&&(this._add_virtual_text(f,n,a),n+=f.length),n=this._map_paragraph_content(a,n,i,o),u=false,l=a;}else if(a instanceof Dr){if(!u){let f=l instanceof Ze?l:null;this._add_virtual_text(`
28
28
 
29
29
  `,n,f),n+=2;}n=this._map_table(a,n),u=false,l=a;}return n}_map_table(e,t){let n=t,r=0;for(let s of e.rows){let i=s._element,o=k(i,"w:trPr"),u=o?k(o,"w:ins"):null,l=o?k(o,"w:del"):null;if(this.clean_view&&l)continue;r>0&&(this._add_virtual_text(`
30
- `,n,null),n+=1),u&&!this.clean_view?(this._add_virtual_text("{++ ",n,null),n+=4):l&&!this.clean_view&&(this._add_virtual_text("{-- ",n,null),n+=4);let a=new Set,c=0;for(let f of s.cells)a.has(f)||(a.add(f),c>0&&(this._add_virtual_text(" | ",n,null),n+=3),n=this._map_blocks(f,n),c+=1);if(u&&!this.clean_view){let f=` |Chg:${u.getAttribute("w:id")}++}`;this._add_virtual_text(f,n,null),n+=f.length;}else if(l&&!this.clean_view){let f=` |Chg:${l.getAttribute("w:id")}--}`;this._add_virtual_text(f,n,null),n+=f.length;}r+=1;}return n}_strip_markdown_formatting(e){let t=e;return t=t.replace(/^#+\s*/gm,""),t=t.replace(/\*\*(\w[\w\s]*\w|\w{2,})\*\*/g,"$1"),t=t.replace(/__(\w[\w\s]*\w|\w{2,})__/g,"$1"),t=t.replace(/(?<!\w)_(\w[\w\s]*\w|\w{2,})_(?!\w)/g,"$1"),t=t.replace(/(?<!\w)\*(\w[\w\s]*\w|\w{2,})\*(?!\w)/g,"$1"),t}_map_paragraph_content(e,t,n,r){let s=t,i={start:s,end:s,text:"",run:null,paragraph:e};this.spans.push(i);let o=new Set,u={},l={},a={},c=[],f=["",""],p=["",""],d=null,g=[],m=h(()=>{if(g.length===0)return;let[_,A]=f;_&&(this._add_virtual_text(_,s,e),s+=_.length);for(let[E,y,N,C,F]of g){if(E==="virtual")this._add_virtual_text(y,s,e,d);else {let P={start:s,end:s+y.length,text:y,run:N,paragraph:e,ins_id:C||void 0,del_id:F||void 0,hyperlink_id:d||void 0};this.spans.push(P),this._text_chunks.push(y);}s+=y.length;}A&&(this._add_virtual_text(A,s,e),s+=A.length),g=[];},"flush_pending_runs"),b=Array.from(_s(e)),D=ps(e,n,r),w=Ar(e,n,r),v=D;for(let _=0;_<b.length;_++){let A=b[_];if(A instanceof Je){let[E,y]=ds(A,w),N=[],C=it(A);if(v){if(C===""||/^\s*$/.test(C))continue;v=false;}if(C.includes(`
30
+ `,n,null),n+=1),u&&!this.clean_view?(this._add_virtual_text("{++ ",n,null),n+=4):l&&!this.clean_view&&(this._add_virtual_text("{-- ",n,null),n+=4);let a=new Set,c=0;for(let f of s.cells)a.has(f)||(a.add(f),c>0&&(this._add_virtual_text(" | ",n,null),n+=3),n=this._map_blocks(f,n),c+=1);if(u&&!this.clean_view){let f=` |Chg:${u.getAttribute("w:id")}++}`;this._add_virtual_text(f,n,null),n+=f.length;}else if(l&&!this.clean_view){let f=` |Chg:${l.getAttribute("w:id")}--}`;this._add_virtual_text(f,n,null),n+=f.length;}r+=1;}return n}_strip_markdown_formatting(e){let t=e;return t=t.replace(/^#+\s*/gm,""),t=t.replace(/\*\*(\w[\w\s]*\w|\w{2,})\*\*/g,"$1"),t=t.replace(/__(\w[\w\s]*\w|\w{2,})__/g,"$1"),t=t.replace(/(?<!\w)_(\w[\w\s]*\w|\w{2,})_(?!\w)/g,"$1"),t=t.replace(/(?<!\w)\*(\w[\w\s]*\w|\w{2,})\*(?!\w)/g,"$1"),t}_map_paragraph_content(e,t,n,r){let s=t,i={start:s,end:s,text:"",run:null,paragraph:e};this.spans.push(i);let o=new Set,u={},l={},a={},c=[],f=["",""],p=["",""],d=null,g=[],m=h(()=>{if(g.length===0)return;let[_,A]=f;_&&(this._add_virtual_text(_,s,e),s+=_.length);for(let[E,y,N,C,F]of g){if(E==="virtual")this._add_virtual_text(y,s,e,d);else {let P={start:s,end:s+y.length,text:y,run:N,paragraph:e,ins_id:C||void 0,del_id:F||void 0,hyperlink_id:d||void 0};this.spans.push(P),this._text_chunks.push(y);}s+=y.length;}A&&(this._add_virtual_text(A,s,e),s+=A.length),g=[];},"flush_pending_runs"),b=Array.from(Es(e)),D=gs(e,n,r),w=yr(e,n,r),v=D;for(let _=0;_<b.length;_++){let A=b[_];if(A instanceof Je){let[E,y]=_s(A,w),N=[],C=it(A);if(v){if(C===""||/^\s*$/.test(C))continue;v=false;}if(C.includes(`
31
31
  `)&&(E||y)){let j=C.split(`
32
32
  `);for(let O=0;O<j.length;O++)O>0&&N.push(["real",`
33
33
  `,A]),j[O]&&(E&&N.push(["virtual",E,null]),N.push(["real",j[O],A]),y&&N.push(["virtual",y,null]));}else E&&N.push(["virtual",E,null]),C&&N.push(["real",C,A]),y&&N.push(["virtual",y,null]);this.clean_view&&Object.keys(l).length>0;let F=N.map(j=>j[1]).join(""),P=Object.keys(u).pop()||null,R=Object.keys(l).pop()||null;if(F&&!(this.clean_view&&R)){let j=this.clean_view?["",""]:this._get_wrappers(P,R,o,a),O=[E,y];if(g.length>0&&j[0]===f[0]&&j[1]===f[1]){let G=false;O[0]===p[0]&&O[1]===p[1]&&p[0]!==""&&g[g.length-1][0]==="virtual"&&g[g.length-1][1]===p[1]&&(g.pop(),G=true);for(let[z,L,Y]of N){if(G&&z==="virtual"&&L===O[0]){G=false;continue}g.push([z,L,Y,P,R]);}p=O;}else {m(),f=j,p=O;for(let[G,z,L]of N)g.push([G,z,L,P,R]);}}if(!this.clean_view){(Object.keys(u).length>0||Object.keys(l).length>0||o.size>0||Object.keys(a).length>0)&&c.push([{...u},{...l},new Set(o),{...a}]);let O=false;if(P!==null||R!==null||Object.keys(a).length>0){let z=_+1,L=false,Y=Object.keys(u).length,S=Object.keys(l).length,J=Object.keys(a).length;for(;z<b.length;){let ie=b[z];if(ie instanceof Je){if(!it(ie)){z++;continue}(Y>0||S>0||J>0)&&(L=true);break}else {let se=ie;se.type==="ins_start"?Y++:se.type==="ins_end"?Y=Math.max(0,Y-1):se.type==="del_start"?S++:se.type==="del_end"?S=Math.max(0,S-1):se.type==="fmt_start"?J++:se.type==="fmt_end"&&(J=Math.max(0,J-1));}z++;}L&&(O=true);}if(!O&&c.length>0){let z=this._build_merged_meta_block(c);if(z){m(),f=["",""],p=["",""];let L=`{>>${z}<<}`;this._add_virtual_text(L,s,e),s+=L.length;}c=[];}}}else {let E=A;if(v=false,m(),f=["",""],p=["",""],E.type==="start")o.add(E.id);else if(E.type==="end")o.delete(E.id);else if(E.type==="ins_start")u[E.id]=E;else if(E.type==="ins_end")delete u[E.id];else if(E.type==="del_start")l[E.id]=E;else if(E.type==="del_end")delete l[E.id];else if(E.type==="fmt_start")a[E.id]=E;else if(E.type==="fmt_end")delete a[E.id];else if(E.type==="footnote"||E.type==="endnote"){m(),f=["",""],p=["",""];let N=`[^${E.type==="footnote"?"fn":"en"}-${E.id}]`;this._add_virtual_text(N,s,e),s+=N.length;}else if(E.type==="hyperlink_start")m(),f=["",""],p=["",""],this._add_virtual_text("[",s,e,E.id),s+=1,d=E.id;else if(E.type==="hyperlink_end"){m(),f=["",""],p=["",""];let y=`](${E.date})`;this._add_virtual_text(y,s,e,E.id),s+=y.length,d=null;}else if(E.type==="xref_start")m(),f=["",""],p=["",""],this._add_virtual_text("[~",s,e),s+=2;else if(E.type==="xref_end"){m(),f=["",""],p=["",""];let y=`~](#${E.id})`;this._add_virtual_text(y,s,e),s+=y.length;}else if(E.type==="bookmark"){m(),f=["",""],p=["",""];let y=`{#${E.id}}`;this._add_virtual_text(y,s,e),s+=y.length;}}}if(m(),c.length>0){let _=this._build_merged_meta_block(c);if(_){let A=`{>>${_}<<}`;this._add_virtual_text(A,s,e),s+=A.length;}}return s}_get_wrappers(e,t,n,r){return t?["{--","--}"]:e?["{++","++}"]:n.size>0||Object.keys(r).length>0?["{==","==}"]:["",""]}_build_merged_meta_block(e){let t=[],n=[],r=new Set;for(let[s,i,o,u]of e){for(let[a,c]of Object.entries(s)){let f=`Chg:${a}`;if(!r.has(f)){let p=c.author||"Unknown";t.push(`[${f} insert] ${p}`),r.add(f);}}for(let[a,c]of Object.entries(i)){let f=`Chg:${a}`;if(!r.has(f)){let p=c.author||"Unknown";t.push(`[${f} delete] ${p}`),r.add(f);}}for(let[a,c]of Object.entries(u)){let f=`Chg:${a}`;if(!r.has(f)){let p=c.author||"Unknown";t.push(`[${f} format] ${p}`),r.add(f);}}let l=Array.from(o).sort();for(let a of l){if(!this.comments_map[a])continue;let c=`Com:${a}`;if(!r.has(c)){let f=this.comments_map[a],p=`[${c}] ${f.author}`;f.date&&(p+=` @ ${f.date}`),f.resolved&&(p+="(RESOLVED)"),n.push(`${p}: ${f.text}`),r.add(c);}}}return [...t,...n].join(`
34
34
  `)}_add_virtual_text(e,t,n,r=null){let s={start:t,end:t+e.length,text:e,run:null,paragraph:n,hyperlink_id:r||void 0};this.spans.push(s),this._text_chunks.push(e);}_replace_smart_quotes(e){return e.replace(/“/g,'"').replace(/”/g,'"').replace(/‘/g,"'").replace(/’/g,"'")}_make_fuzzy_regex(e){e=this._strip_markdown_formatting(e),e=this._replace_smart_quotes(e);let t=[],n=/(\[_+\])|(\s+)|(['"])|([.,;:\/])/g,r=0,s,i=h(u=>u.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"escapeRegExp");for(;(s=n.exec(e))!==null;){let u=e.substring(r,s.index);u&&t.push(i(u));let l=s[1],a=s[2],c=s[3],f=s[4];l?t.push("\\[_+\\]"):a?(t.push("(?:\\*\\*|__|\\*|_)?"),t.push("\\s+"),t.push("(?:\\*\\*|__|\\*|_)?")):c?c==="'"?t.push("[\u2018\u2019']"):t.push('["\u201C\u201D]'):f&&(t.push("(?:\\*\\*|__|\\*|_)?"),t.push(i(f)),t.push("(?:\\*\\*|__|\\*|_)?")),r=n.lastIndex;}let o=e.substring(r);return o&&t.push(i(o)),t.join("")}find_match_index(e){let t=this.full_text.indexOf(e);if(t!==-1)return [t,e.length];let n=this._replace_smart_quotes(this.full_text),r=this._replace_smart_quotes(e);if(t=n.indexOf(r),t!==-1)return [t,e.length];let s=this._strip_markdown_formatting(e);if(this.full_text.includes(s))return t=this.full_text.indexOf(s),[t,s.length];try{let o=new RegExp(this._make_fuzzy_regex(e)).exec(this.full_text);if(o)return [o.index,o[0].length]}catch{}return [-1,0]}find_all_match_indices(e){if(!e)return [];let t=h(o=>o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"escapeRegExp"),n=[...this.full_text.matchAll(new RegExp(t(e),"g"))];if(n.length>0)return n.map(o=>[o.index,o[0].length]);let r=this._replace_smart_quotes(this.full_text),s=this._replace_smart_quotes(e);if(n=[...r.matchAll(new RegExp(t(s),"g"))],n.length>0)return n.map(o=>[o.index,o[0].length]);let i=this._strip_markdown_formatting(e);if(n=[...this.full_text.matchAll(new RegExp(t(i),"g"))],n.length>0)return n.map(o=>[o.index,o[0].length]);try{let o=new RegExp(this._make_fuzzy_regex(e),"g");if(n=[...this.full_text.matchAll(o)],n.length>0)return n.map(u=>[u.index,u[0].length])}catch{}return []}find_target_runs(e){let[t,n]=this.find_match_index(e);return t===-1?[]:this._resolve_runs_at_range(t,t+n)}find_target_runs_by_index(e,t,n=true){return this._resolve_runs_at_range(e,e+t,n)}get_virtual_spans_in_range(e,t){let n=e+t;return this.spans.filter(r=>r.run===null&&r.text===`
35
35
 
36
- `&&r.start>=e&&r.end<=n)}_resolve_runs_at_range(e,t,n=true){let r=this.spans.filter(a=>a.end>e&&a.start<t);if(r.length===0)return [];let s=r.filter(a=>a.run!==null).map(a=>a.run);if(s.length===0)return [];let i=false,o=r.find(a=>a.run!==null),u=0;if(o){let a=e-o.start;if(a>0){let[,f]=this._split_run_at_index(s[0],a);s[0]=f,i=true,u=a;}}let l=[...r].reverse().find(a=>a.run!==null);if(l){let a=o===l,c=s[s.length-1],p=Math.min(l.end,t)-l.start;a&&u>0&&(p-=u);let d=it(c);if(p>0&&p<d.length){let[g]=this._split_run_at_index(c,p);s[s.length-1]=g,i=true;}}return i&&n&&this._build_map(),s}get_insertion_anchor(e,t=true){let n=this.spans.filter(i=>i.end===e);if(n.length>0){for(let i=n.length-1;i>=0;i--)if(n[i].run)return [n[i].run,n[i].paragraph];for(let i=n.length-1;i>=0;i--)if(n[i].paragraph)return [null,n[i].paragraph]}let r=this.spans.filter(i=>i.start<e&&e<i.end);if(r.length>0){let i=r[0];if(i.run===null)return i.paragraph===null?this.get_insertion_anchor(i.end,t):[null,i.paragraph];{let o=e-i.start,[u]=this._split_run_at_index(i.run,o);return t&&this._build_map(),[u,i.paragraph]}}if(e===0&&this.spans.length>0){for(let i of this.spans)if(i.run)return [i.run,i.paragraph];for(let i of this.spans)if(i.paragraph)return [null,i.paragraph];return [null,null]}let s=this.spans.filter(i=>i.end<e);if(s.length>0){for(let i=s.length-1;i>=0;i--)if(s[i].run)return [s[i].run,s[i].paragraph];for(let i=s.length-1;i>=0;i--)if(s[i].paragraph)return [null,s[i].paragraph]}return [null,null]}_split_run_at_index(e,t){let n=it(e),r=n.substring(0,t),s=n.substring(t);this._set_run_text_elements(e._element,r);let i=e._element.cloneNode(true);this._set_run_text_elements(i,s),e._element.parentNode&&e._element.parentNode.insertBefore(i,e._element.nextSibling);let o=new Je(i,e._parent);return [e,o]}_set_run_text_elements(e,t){let n=[];for(let s=0;s<e.childNodes.length;s++){let i=e.childNodes[s];i.nodeType===1&&["w:t","w:delText","w:br","w:cr","w:tab"].includes(i.tagName)&&n.push(i);}for(let s of n)e.removeChild(s);let r=e.ownerDocument;if(r){let s=r.createElement("w:t");s.textContent=t,t.trim()!==t&&s.setAttribute("xml:space","preserve"),e.appendChild(s);}}get_context_at_range(e,t){let n=this.spans.filter(r=>r.run&&r.end>e&&r.start<t);return n.length>0?n[0]:null}};function ws(e,t){if(!e||!t)return [0,0];let n=h(a=>/\s/.test(a),"isSpace"),r=0,s=Math.min(e.length,t.length);for(;r<s&&e[r]===t[r];)r++;if(r<e.length&&r<t.length)for(;r>0;){let a=!n(e[r-1])&&!n(e[r]),c=!n(t[r-1])&&!n(t[r]);if(a||c)r--;else break}for(;r>0;){if(r<e.length){let m=e.substring(r-1,r+1);if(m==="**"||m==="__"){r--;continue}}let a=e.substring(0,r),c=(a.match(/\*\*/g)||[]).length,f=(a.match(/__/g)||[]).length,p=(a.replace(/__/g,"").match(/_/g)||[]).length;if(c%2!==0){r=a.lastIndexOf("**");continue}if(f%2!==0){r=a.lastIndexOf("__");continue}if(p%2!==0){let m=a.length-1;for(;m>=0;){if(a[m]==="_"&&(m===0||a[m-1]!=="_")&&(m===a.length-1||a[m+1]!=="_")){r=m;break}m--;}continue}let d=r,g=false;for(;d>0;){let m=e[d-1];if(m==="#"){for(r=d-1;r>0&&e[r-1]!==`
36
+ `&&r.start>=e&&r.end<=n)}_resolve_runs_at_range(e,t,n=true){let r=this.spans.filter(a=>a.end>e&&a.start<t);if(r.length===0)return [];let s=r.filter(a=>a.run!==null).map(a=>a.run);if(s.length===0)return [];let i=false,o=r.find(a=>a.run!==null),u=0;if(o){let a=e-o.start;if(a>0){let[,f]=this._split_run_at_index(s[0],a);s[0]=f,i=true,u=a;}}let l=[...r].reverse().find(a=>a.run!==null);if(l){let a=o===l,c=s[s.length-1],p=Math.min(l.end,t)-l.start;a&&u>0&&(p-=u);let d=it(c);if(p>0&&p<d.length){let[g]=this._split_run_at_index(c,p);s[s.length-1]=g,i=true;}}return i&&n&&this._build_map(),s}get_insertion_anchor(e,t=true){let n=this.spans.filter(i=>i.end===e);if(n.length>0){for(let i=n.length-1;i>=0;i--)if(n[i].run)return [n[i].run,n[i].paragraph];for(let i=n.length-1;i>=0;i--)if(n[i].paragraph)return [null,n[i].paragraph]}let r=this.spans.filter(i=>i.start<e&&e<i.end);if(r.length>0){let i=r[0];if(i.run===null)return i.paragraph===null?this.get_insertion_anchor(i.end,t):[null,i.paragraph];{let o=e-i.start,[u]=this._split_run_at_index(i.run,o);return t&&this._build_map(),[u,i.paragraph]}}if(e===0&&this.spans.length>0){for(let i of this.spans)if(i.run)return [i.run,i.paragraph];for(let i of this.spans)if(i.paragraph)return [null,i.paragraph];return [null,null]}let s=this.spans.filter(i=>i.end<e);if(s.length>0){for(let i=s.length-1;i>=0;i--)if(s[i].run)return [s[i].run,s[i].paragraph];for(let i=s.length-1;i>=0;i--)if(s[i].paragraph)return [null,s[i].paragraph]}return [null,null]}_split_run_at_index(e,t){let n=it(e),r=n.substring(0,t),s=n.substring(t);this._set_run_text_elements(e._element,r);let i=e._element.cloneNode(true);this._set_run_text_elements(i,s),e._element.parentNode&&e._element.parentNode.insertBefore(i,e._element.nextSibling);let o=new Je(i,e._parent);return [e,o]}_set_run_text_elements(e,t){let n=[];for(let s=0;s<e.childNodes.length;s++){let i=e.childNodes[s];i.nodeType===1&&["w:t","w:delText","w:br","w:cr","w:tab"].includes(i.tagName)&&n.push(i);}for(let s of n)e.removeChild(s);let r=e.ownerDocument;if(r){let s=r.createElement("w:t");s.textContent=t,t.trim()!==t&&s.setAttribute("xml:space","preserve"),e.appendChild(s);}}get_context_at_range(e,t){let n=this.spans.filter(r=>r.run&&r.end>e&&r.start<t);return n.length>0?n[0]:null}};function As(e,t){if(!e||!t)return [0,0];let n=h(a=>/\s/.test(a),"isSpace"),r=0,s=Math.min(e.length,t.length);for(;r<s&&e[r]===t[r];)r++;if(r<e.length&&r<t.length)for(;r>0;){let a=!n(e[r-1])&&!n(e[r]),c=!n(t[r-1])&&!n(t[r]);if(a||c)r--;else break}for(;r>0;){if(r<e.length){let m=e.substring(r-1,r+1);if(m==="**"||m==="__"){r--;continue}}let a=e.substring(0,r),c=(a.match(/\*\*/g)||[]).length,f=(a.match(/__/g)||[]).length,p=(a.replace(/__/g,"").match(/_/g)||[]).length;if(c%2!==0){r=a.lastIndexOf("**");continue}if(f%2!==0){r=a.lastIndexOf("__");continue}if(p%2!==0){let m=a.length-1;for(;m>=0;){if(a[m]==="_"&&(m===0||a[m-1]!=="_")&&(m===a.length-1||a[m+1]!=="_")){r=m;break}m--;}continue}let d=r,g=false;for(;d>0;){let m=e[d-1];if(m==="#"){for(r=d-1;r>0&&e[r-1]!==`
37
37
  `;)r--;g=true;break}if(m===`
38
- `)break;d--;}if(!g)break}let i=0,o=e.length-r,u=t.length-r,l=Math.min(o,u);for(;i<l&&e[e.length-1-i]===t[t.length-1-i];)i++;if(i>0)for(;i>0;){let a=false;i<e.length&&(a=!n(e[e.length-1-i])&&!n(e[e.length-i]));let c=false;if(i<t.length&&(c=!n(t[t.length-1-i])&&!n(t[t.length-i])),a||c)i--;else break}for(;i>0;){let a=e.length-i;if(a>0){let g=e.substring(a-1,a+1);if(g==="**"||g==="__"){i--;continue}}let c=e.substring(e.length-i),f=(c.match(/\*\*/g)||[]).length,p=(c.match(/__/g)||[]).length,d=(c.replace(/__/g,"").match(/_/g)||[]).length;if(f%2!==0){i-=c.indexOf("**")+2;continue}if(p%2!==0){i-=c.indexOf("__")+2;continue}if(d%2!==0){let g=0;for(;g<c.length;){if(c[g]==="_"&&(g===0||c[g-1]!=="_")&&(g===c.length-1||c[g+1]!=="_")){i-=g+1;break}g++;}continue}break}i>0&&/^\s+$/.test(e.substring(e.length-i))&&(i=0);for(let a of ["**","__","_"]){let c=a.length,f=e.substring(r,e.length-i),p=t.substring(r,t.length-i);f.startsWith(a)&&p.startsWith(a)&&f.endsWith(a)&&p.endsWith(a)&&f.length>=2*c&&p.length>=2*c&&(r+=c,i+=c);}return [r,i]}h(ws,"trim_common_context");function qu(e,t){let n=[],r={},s=/(\s+|[\p{L}\p{N}_]+|[^\p{L}\p{N}_\s])/gu,i=h(o=>{let u=o.split(s).filter(Boolean),l="";for(let a of u)if(a in r)l+=String.fromCharCode(r[a]);else {let c=n.length;r[a]=c,n.push(a),l+=String.fromCharCode(c);}return l},"encode_text");return [i(e),i(t),n]}h(qu,"_words_to_chars");function zu(e,t){let n=new vs.default.diff_match_patch;n.Diff_Timeout=2;let[r,s,i]=qu(e,t),o=n.diff_main(r,s,false);n.diff_cleanupSemantic(o);for(let c=0;c<o.length;c++){let f=o[c][1],p="";for(let d=0;d<f.length;d++)p+=i[f.charCodeAt(d)];o[c][1]=p;}let u=[],l=0,a=null;for(let[c,f]of o)if(c===0){if(a){let[p,d]=a;u.push({type:"modify",target_text:d,new_text:"",comment:"Diff: Text deleted",_match_start_index:p}),a=null;}l+=f.length;}else if(c===-1)a=[l,f],l+=f.length;else if(c===1)if(a){let[p,d]=a;u.push({type:"modify",target_text:d,new_text:f,comment:"Diff: Replacement",_match_start_index:p}),a=null;}else u.push({type:"modify",target_text:"",new_text:f,comment:"Diff: Text inserted",_match_start_index:l});if(a){let[c,f]=a;u.push({type:"modify",target_text:f,new_text:"",comment:"Diff: Text deleted",_match_start_index:c});}return u}h(zu,"generate_edits_from_text");function Es(e,t,n="Original",r="Modified"){let s=zu(e,t),i=[`--- ${n}`,`+++ ${r}`,""],o=40;for(let u of s){let l=u._match_start_index||0,a=u.target_text||"",c=u.new_text||"",[f,p]=ws(a,c),d=a.length-p,g=c.length-p,m=a.substring(f,d),b=c.substring(f,g),D=l+f,w=D+m.length,v=Math.max(0,D-o),_=e.substring(v,D);v>0&&(_="..."+_);let A=Math.min(e.length,w+o),E=e.substring(w,A);A<e.length&&(E=E+"..."),_=_.replace(/\n/g," ").replace(/\r/g,""),E=E.replace(/\n/g," ").replace(/\r/g,""),i.push("@@ Word Patch @@"),i.push(` ${_}`),m&&i.push(`- ${m}`),b&&i.push(`+ ${b}`),i.push(` ${E}`),i.push("");}return i.join(`
39
- `)}h(Es,"create_word_patch_diff");var ju=5,es=50;function Wu(e,t,n,r){let s=r.length;if(s<2)throw new Error(`format_ambiguity_error requires at least 2 matches, got ${s}`);let i=r.slice(0,ju),o=s-i.length,u=[`- Edit ${e} Failed: Ambiguous match. Target text appears ${s} times. First ${i.length} occurrences:`];for(let l=0;l<i.length;l++){let[a,c]=i[l],f=Math.max(0,a-es),p=Math.min(n.length,c+es),d=n.substring(f,a).replace(/\n/g," "),g=n.substring(c,p).replace(/\n/g," "),m=n.substring(a,c).replace(/\n/g," ");m.length>50&&(m=m.substring(0,25)+"..."+m.substring(m.length-20));let b=f>0?"...":"",D=p<n.length?"...":"";u.push(` ${l+1}. "${b}${d}[${m}]${g}${D}"`);}return o>0&&u.push(` ... and ${o} more occurrence(s) not shown.`),u.push(" Please provide more surrounding context in your target_text to uniquely identify the location."),u.join(`
40
- `)}h(Wu,"format_ambiguity_error");function rt(e){let t=e.nextSibling;for(;t;){if(t.nodeType===1)return t;t=t.nextSibling;}return null}h(rt,"getNextElement");function xn(e){let t=e.previousSibling;for(;t;){if(t.nodeType===1)return t;t=t.previousSibling;}return null}h(xn,"getPreviousElement");function It(e,t){t.parentNode&&t.parentNode.insertBefore(e,t.nextSibling);}h(It,"insertAfter");var Hu=class extends Error{static{h(this,"BatchValidationError");}errors;constructor(e){super(`Batch validation failed:
38
+ `)break;d--;}if(!g)break}let i=0,o=e.length-r,u=t.length-r,l=Math.min(o,u);for(;i<l&&e[e.length-1-i]===t[t.length-1-i];)i++;if(i>0)for(;i>0;){let a=false;i<e.length&&(a=!n(e[e.length-1-i])&&!n(e[e.length-i]));let c=false;if(i<t.length&&(c=!n(t[t.length-1-i])&&!n(t[t.length-i])),a||c)i--;else break}for(;i>0;){let a=e.length-i;if(a>0){let g=e.substring(a-1,a+1);if(g==="**"||g==="__"){i--;continue}}let c=e.substring(e.length-i),f=(c.match(/\*\*/g)||[]).length,p=(c.match(/__/g)||[]).length,d=(c.replace(/__/g,"").match(/_/g)||[]).length;if(f%2!==0){i-=c.indexOf("**")+2;continue}if(p%2!==0){i-=c.indexOf("__")+2;continue}if(d%2!==0){let g=0;for(;g<c.length;){if(c[g]==="_"&&(g===0||c[g-1]!=="_")&&(g===c.length-1||c[g+1]!=="_")){i-=g+1;break}g++;}continue}break}i>0&&/^\s+$/.test(e.substring(e.length-i))&&(i=0);for(let a of ["**","__","_"]){let c=a.length,f=e.substring(r,e.length-i),p=t.substring(r,t.length-i);f.startsWith(a)&&p.startsWith(a)&&f.endsWith(a)&&p.endsWith(a)&&f.length>=2*c&&p.length>=2*c&&(r+=c,i+=c);}return [r,i]}h(As,"trim_common_context");function ju(e,t){let n=[],r={},s=/(\s+|[\p{L}\p{N}_]+|[^\p{L}\p{N}_\s])/gu,i=h(o=>{let u=o.split(s).filter(Boolean),l="";for(let a of u)if(a in r)l+=String.fromCharCode(r[a]);else {let c=n.length;r[a]=c,n.push(a),l+=String.fromCharCode(c);}return l},"encode_text");return [i(e),i(t),n]}h(ju,"_words_to_chars");function Wu(e,t){let n=new Ds.default.diff_match_patch;n.Diff_Timeout=2;let[r,s,i]=ju(e,t),o=n.diff_main(r,s,false);n.diff_cleanupSemantic(o);for(let c=0;c<o.length;c++){let f=o[c][1],p="";for(let d=0;d<f.length;d++)p+=i[f.charCodeAt(d)];o[c][1]=p;}let u=[],l=0,a=null;for(let[c,f]of o)if(c===0){if(a){let[p,d]=a;u.push({type:"modify",target_text:d,new_text:"",comment:"Diff: Text deleted",_match_start_index:p}),a=null;}l+=f.length;}else if(c===-1)a=[l,f],l+=f.length;else if(c===1)if(a){let[p,d]=a;u.push({type:"modify",target_text:d,new_text:f,comment:"Diff: Replacement",_match_start_index:p}),a=null;}else u.push({type:"modify",target_text:"",new_text:f,comment:"Diff: Text inserted",_match_start_index:l});if(a){let[c,f]=a;u.push({type:"modify",target_text:f,new_text:"",comment:"Diff: Text deleted",_match_start_index:c});}return u}h(Wu,"generate_edits_from_text");function ys(e,t,n="Original",r="Modified"){let s=Wu(e,t),i=[`--- ${n}`,`+++ ${r}`,""],o=40;for(let u of s){let l=u._match_start_index||0,a=u.target_text||"",c=u.new_text||"",[f,p]=As(a,c),d=a.length-p,g=c.length-p,m=a.substring(f,d),b=c.substring(f,g),D=l+f,w=D+m.length,v=Math.max(0,D-o),_=e.substring(v,D);v>0&&(_="..."+_);let A=Math.min(e.length,w+o),E=e.substring(w,A);A<e.length&&(E=E+"..."),_=_.replace(/\n/g," ").replace(/\r/g,""),E=E.replace(/\n/g," ").replace(/\r/g,""),i.push("@@ Word Patch @@"),i.push(` ${_}`),m&&i.push(`- ${m}`),b&&i.push(`+ ${b}`),i.push(` ${E}`),i.push("");}return i.join(`
39
+ `)}h(ys,"create_word_patch_diff");var Hu=5,rs=50;function Vu(e,t,n,r){let s=r.length;if(s<2)throw new Error(`format_ambiguity_error requires at least 2 matches, got ${s}`);let i=r.slice(0,Hu),o=s-i.length,u=[`- Edit ${e} Failed: Ambiguous match. Target text appears ${s} times. First ${i.length} occurrences:`];for(let l=0;l<i.length;l++){let[a,c]=i[l],f=Math.max(0,a-rs),p=Math.min(n.length,c+rs),d=n.substring(f,a).replace(/\n/g," "),g=n.substring(c,p).replace(/\n/g," "),m=n.substring(a,c).replace(/\n/g," ");m.length>50&&(m=m.substring(0,25)+"..."+m.substring(m.length-20));let b=f>0?"...":"",D=p<n.length?"...":"";u.push(` ${l+1}. "${b}${d}[${m}]${g}${D}"`);}return o>0&&u.push(` ... and ${o} more occurrence(s) not shown.`),u.push(" Please provide more surrounding context in your target_text to uniquely identify the location."),u.join(`
40
+ `)}h(Vu,"format_ambiguity_error");function rt(e){let t=e.nextSibling;for(;t;){if(t.nodeType===1)return t;t=t.nextSibling;}return null}h(rt,"getNextElement");function xn(e){let t=e.previousSibling;for(;t;){if(t.nodeType===1)return t;t=t.previousSibling;}return null}h(xn,"getPreviousElement");function It(e,t){t.parentNode&&t.parentNode.insertBefore(e,t.nextSibling);}h(It,"insertAfter");var Gu=class extends Error{static{h(this,"BatchValidationError");}errors;constructor(e){super(`Batch validation failed:
41
41
  `+e.join(`
42
- `)),this.name="BatchValidationError",this.errors=e;}};function Vu(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n],s=r.target_text||"",i=r.new_text||"";if((i.includes("{++")||i.includes("{--")||i.includes("{>>")||i.includes("{=="))&&t.push(`- Edit ${n+1} Failed: Do not manually write CriticMarkup tags ({++, {--, {>>, {==) in \`new_text\`. The engine handles redlining automatically. To add a comment, use the \`comment\` parameter.`),s.includes("[^")||i.includes("[^")){let o=(s.match(/\[\^(?:fn|en)-[^\]]+\]/g)||[]).sort(),u=(i.match(/\[\^(?:fn|en)-[^\]]+\]/g)||[]).sort();JSON.stringify(o)!==JSON.stringify(u)&&(u.length>o.length||u.some(l=>u.filter(a=>a===l).length>o.filter(a=>a===l).length)?t.push(`- Edit ${n+1} Failed: Cannot insert footnote/endnote markers via text replace. Markers like \`[^fn-N]\` are read-only projections. Use Word's References menu.`):t.push(`- Edit ${n+1} Failed: Cannot delete footnote/endnote references via text replace. The marker corresponds to a structural XML element.`));}if(s.includes("](")||i.includes("](")){let o=(s.match(/\[(?!~)[^\]]+\]\([^)]+\)/g)||[]).sort(),u=(i.match(/\[(?!~)[^\]]+\]\([^)]+\)/g)||[]).sort();o.length!==u.length?u.length>o.length?t.push(`- Edit ${n+1} Failed: Cannot insert hyperlinks via text replace. Use a dedicated structural operation.`):t.push(`- Edit ${n+1} Failed: Cannot delete hyperlinks via text replace. The marker corresponds to a structural XML element.`):o.length>1&&JSON.stringify(o)!==JSON.stringify(u)&&t.push(`- Edit ${n+1} Failed: Can only edit or retarget one hyperlink per text replacement. Please split into multiple edits.`);}if(s.includes("[~")||i.includes("[~")){let o=s.match(/\[~[^~]+~\]\(#[^\)]+\)/g)||[],u=i.match(/\[~[^~]+~\]\(#[^\)]+\)/g)||[];o.length!==u.length?u.length>o.length?t.push(`- Edit ${n+1} Failed: Cannot insert cross-references via text replace. Markers are read-only projections.`):t.push(`- Edit ${n+1} Failed: Cannot delete cross-references via text replace. The marker corresponds to a structural XML element.`):JSON.stringify(o)!==JSON.stringify(u)&&t.push(`- Edit ${n+1} Failed: Modifying or retargeting cross-reference markers is disallowed to prevent dependency corruption.`);}if(s.includes("{#")||i.includes("{#")){let o=s.match(/\{#[^\}]+\}/g)||[],u=i.match(/\{#[^\}]+\}/g)||[];for(let l of u)if(u.filter(a=>a===l).length>o.filter(a=>a===l).length){t.push(`- Edit ${n+1} Failed: Cannot modify or insert internal anchor markers (\`{#...}\`). These represent structural XML bookmarks.`);break}}if(r.type==="modify"&&i){let o=i.split(/[\r\n]+/);for(let u of o){let l=u.trimStart();if(l.startsWith("#######")){let a=l.length-l.replace(/^#+/,"").length;if(l.substring(a).startsWith(" ")||l.substring(a)===""){t.push(`- Edit ${n+1} Failed: Heading level ${a} is not supported (maximum is 6).`);break}}}}(s.includes("READONLY_BOUNDARY_START")||i.includes("READONLY_BOUNDARY_START")||s.includes("# Document Structure (Read-Only)")||i.includes("# Document Structure (Read-Only)"))&&t.push(`- Edit ${n+1} Failed: Modification targets the read-only boundary (Structural Appendix). This section cannot be edited.`);}return t}h(Vu,"validate_edit_strings");var Nr=class{static{h(this,"RedlineEngine");}doc;author;timestamp;current_id;mapper;comments_manager;clean_mapper=null;skipped_details=[];constructor(e,t="Adeu AI (TS)"){this.doc=e,this.author=t,this.timestamp=new Date().toISOString().replace(/\.\d{3}Z$/,"Z");let n="http://schemas.microsoft.com/office/word/2023/wordml/word16du";for(let r of this.doc.pkg.parts)(r===this.doc.part||r.contentType.includes("wordprocessingml")&&r.contentType.endsWith("+xml"))&&(r._element.hasAttribute("xmlns:w16du")||r._element.setAttribute("xmlns:w16du",n));this.current_id=this._scan_existing_ids(),this.mapper=new vr(this.doc),this.comments_manager=new Pn(this.doc);}_scan_existing_ids(){let e=0;for(let t of ["w:ins","w:del"]){let n=x(this.doc.element,t);for(let r of n){let s=parseInt(r.getAttribute("w:id")||"0",10);!isNaN(s)&&s>e&&(e=s);}}return e}accept_all_revisions(){let e=[this.doc.element];for(let r of this.doc.pkg.parts)r!==this.doc.part&&r.contentType.includes("wordprocessingml")&&r.contentType.endsWith("+xml")&&e.push(r._element);for(let r of e){let s=x(r,"w:ins");for(let u of s){this._clean_wrapping_comments(u);let l=u.parentNode;if(l){if(l.tagName==="w:trPr"){l.removeChild(u);continue}for(;u.firstChild;)l.insertBefore(u.firstChild,u);l.removeChild(u);}}let i=x(r,"w:p");for(let u of i){let l=k(u,"w:pPr");if(l){let a=k(l,"w:rPr"),c=a?k(a,"w:del"):null;if(a&&c){let f=false;for(let p of ["w:t","w:tab","w:br"]){for(let d of x(u,p)){if(p==="w:t"&&!d.textContent)continue;let g=false,m=d.parentNode;for(;m&&m!==u;){if(m.tagName==="w:del"){g=true;break}m=m.parentNode;}if(!g){f=true;break}}if(f)break}f?a.removeChild(c):(this._clean_wrapping_comments(u),this._delete_comments_in_element(u),u.parentNode&&u.parentNode.removeChild(u));}}}let o=x(r,"w:del");for(let u of o){this._clean_wrapping_comments(u),this._delete_comments_in_element(u);let l=u.parentNode;if(l)if(l.tagName==="w:trPr"){let a=l.parentNode;a&&a.parentNode&&a.parentNode.removeChild(a);}else l.removeChild(u);}}let t=new Set;for(let r of ["w:commentRangeStart","w:commentRangeEnd","w:commentReference"])for(let s of x(this.doc.element,r)){let i=s.getAttribute("w:id");i&&t.add(i);}let n=this.doc.pkg.parts.find(r=>r.contentType==="application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml");if(n)for(let r of x(n._element,"w:comment")){let s=r.getAttribute("w:id");s&&t.add(s);}for(let r of t)this.comments_manager.deleteComment(r);}_getNextId(){return this.current_id++,this.current_id.toString()}_create_track_change_tag(e,t="",n=null){let s=this.doc.part._element.ownerDocument.createElement(e),i=n!==null?n:this._getNextId();return s.setAttribute("w:id",i),s.setAttribute("w:author",t||this.author),s.setAttribute("w:date",this.timestamp),s.setAttribute("w16du:dateUtc",this.timestamp),s}_set_text_content(e,t){e.textContent=t,t.trim()!==t&&e.setAttribute("xml:space","preserve");}_attach_comment(e,t,n,r){if(!r)return;let s=this.comments_manager.addComment(this.author,r),i=e.ownerDocument,o=i.createElement("w:commentRangeStart");o.setAttribute("w:id",s);let u=i.createElement("w:commentRangeEnd");u.setAttribute("w:id",s);let l=i.createElement("w:r"),a=i.createElement("w:rPr"),c=i.createElement("w:rStyle");c.setAttribute("w:val","CommentReference"),a.appendChild(c),l.appendChild(a);let f=i.createElement("w:commentReference");f.setAttribute("w:id",s),l.appendChild(f),e.insertBefore(o,t);let p=n.nextSibling;p?(e.insertBefore(u,p),e.insertBefore(l,u.nextSibling)):(e.appendChild(u),e.appendChild(l));}_attach_comment_spanning(e,t,n,r,s){if(!s)return;let i=this.comments_manager.addComment(this.author,s),o=e.ownerDocument,u=n.ownerDocument,l=o.createElement("w:commentRangeStart");l.setAttribute("w:id",i);let a=u.createElement("w:commentRangeEnd");a.setAttribute("w:id",i);let c=u.createElement("w:r"),f=u.createElement("w:rPr"),p=u.createElement("w:rStyle");p.setAttribute("w:val","CommentReference"),f.appendChild(p),c.appendChild(f);let d=u.createElement("w:commentReference");d.setAttribute("w:id",i),c.appendChild(d),e.insertBefore(l,t);let g=r.nextSibling;g?(n.insertBefore(a,g),n.insertBefore(c,a.nextSibling)):(n.appendChild(a),n.appendChild(c));}_track_insert_multiline(e,t,n,r){if(!e)return {first_node:null,last_p:null,last_ins:null,used_block_mode:false};let s=this.doc.part._element.ownerDocument,i=e.split(/[\r\n]+/),o=null;if(n!==null)o=n._element;else if(t!==null){let v=t._element;for(;v&&v.tagName!=="w:p";)v=v.parentNode;o=v;}for(;i.length>1&&i[i.length-1]==="";)i.pop();if(i.length===0)return {first_node:null,last_p:null,last_ins:null,used_block_mode:false};let[u,l]=this._parse_markdown_style(i[0]),c=l!==null&&o!==null,f=null,p=null;c||(p=this._build_tracked_ins_for_line((u===i[0],i[0]),t,r,s),f=p);let d=c?i:i.slice(1);if(d.length===0)return {first_node:f,last_p:null,last_ins:p,used_block_mode:false};if(!o)return {first_node:f,last_p:null,last_ins:p,used_block_mode:false};let g=o.parentNode;if(!g)return {first_node:f,last_p:null,last_ins:p,used_block_mode:false};let m=h((v,_)=>{g.insertBefore(v,_.nextSibling);},"insertAfterEl"),b=null,D=null,w=o;for(let v=0;v<d.length;v++){let _=d[v],[A,E]=this._parse_markdown_style(_),y=s.createElement("w:p");if(E)this._set_paragraph_style(y,E);else {let R=k(o,"w:pPr");R&&y.appendChild(R.cloneNode(true));}let N=k(y,"w:pPr");N||(N=s.createElement("w:pPr"),y.insertBefore(N,y.firstChild));let C=k(N,"w:rPr");C||(C=s.createElement("w:rPr"),N.appendChild(C));let F=this._create_track_change_tag("w:ins","",r);C.appendChild(F);let P=this._build_tracked_ins_for_line(A,t,r,s);P&&y.appendChild(P),m(y,w),w=y,b=y,D=P,f||(f=y);}return {first_node:f,last_p:b,last_ins:D,used_block_mode:c}}_build_tracked_ins_for_line(e,t,n,r){if(!e&&e!=="")return null;let s=this._create_track_change_tag("w:ins","",n),i=this._parse_inline_markdown(e);if(i.length===0)return null;for(let[o,u]of i){let l=r.createElement("w:r");if(t&&t._element){let c=k(t._element,"w:rPr");if(c){let f=c.cloneNode(true);for(let p of ["w:vanish","w:strike","w:dstrike"]){let d=k(f,p);d&&f.removeChild(d);}l.appendChild(f);}}this._apply_run_props(l,u,false);let a=r.createElement("w:t");this._set_text_content(a,o),l.appendChild(a),s.appendChild(l);}return s}_parse_markdown_style(e){let t=e.trimStart();if(t.startsWith("#")){let r=0,s=t;for(;s.startsWith("#");)r++,s=s.substring(1);if(s.startsWith(" "))return [s.trim(),`Heading ${r}`]}if(t.startsWith("* ")||t.startsWith("- "))return [t.substring(2).trim(),"List Paragraph"];let n=t.match(/^\d+\.\s+/);return n?[t.substring(n[0].length).trim(),"List Number"]:[e,null]}_parse_inline_markdown(e,t={}){if(!e)return [];let n=/(\*\*.*?\*\*)|(_.*?_)/,r=e.match(n);if(!r)return [[e,t]];let s=r.index,i=r[0],o=s+i.length,u=i.startsWith("**"),l=u?i.substring(2,i.length-2):i.substring(1,i.length-1),a=e.substring(0,s),c=e.substring(o),f=[];a&&f.push([a,t]);let p={...t};return u?p.bold=true:p.italic=true,f.push(...this._parse_inline_markdown(l,p)),f.push(...this._parse_inline_markdown(c,t)),f}_apply_run_props(e,t,n=false){if(!t){if(!n)return;t={};}let r=k(e,"w:rPr");if(!r&&(t.bold||t.italic||n)&&(r=e.ownerDocument.createElement("w:rPr"),e.appendChild(r)),r){let s=e.ownerDocument;if(t.bold){let i=k(r,"w:b");i||(i=s.createElement("w:b"),r.appendChild(i)),i.setAttribute("w:val","1");}else if(n){let i=k(r,"w:b");i&&r.removeChild(i);}if(t.italic){let i=k(r,"w:i");i||(i=s.createElement("w:i"),r.appendChild(i)),i.setAttribute("w:val","1");}else if(n){let i=k(r,"w:i");i&&r.removeChild(i);}}}_set_paragraph_style(e,t){let n=e.ownerDocument,r=k(e,"w:pPr");r&&e.removeChild(r);let s=n.createElement("w:pPr"),i=n.createElement("w:pStyle"),o=t.replace(/\s+/g,"");i.setAttribute("w:val",o),s.appendChild(i),e.insertBefore(s,e.firstChild);}_anchor_reply_comment(e,t){let n=this.doc.part._element.ownerDocument,r=x(this.doc.element,"w:commentRangeStart").filter(m=>m.getAttribute("w:id")===e);if(r.length===0)return;let s=r[0],i=n.createElement("w:commentRangeStart");i.setAttribute("w:id",t),It(i,s);let o=x(this.doc.element,"w:commentRangeEnd").filter(m=>m.getAttribute("w:id")===e);if(o.length===0)return;let u=o[0],l=x(this.doc.element,"w:commentReference").filter(m=>m.getAttribute("w:id")===e),a=u;if(l.length>0){let m=l[0];m.parentNode&&m.parentNode.tagName==="w:r"&&(a=m.parentNode);}let c=n.createElement("w:commentRangeEnd");c.setAttribute("w:id",t),It(c,a);let f=n.createElement("w:r"),p=n.createElement("w:rPr"),d=n.createElement("w:rStyle");d.setAttribute("w:val","CommentReference"),p.appendChild(d),f.appendChild(p);let g=n.createElement("w:commentReference");g.setAttribute("w:id",t),f.appendChild(g),It(f,c);}_clean_wrapping_comments(e){let t=e;for(;;){let l=xn(t);if(l&&(l.tagName==="w:ins"||l.tagName==="w:del"))t=l;else break}let n=e;for(;;){let l=rt(n);if(l&&(l.tagName==="w:ins"||l.tagName==="w:del"))n=l;else break}let r=[],s=xn(t);for(;s;)if(s.tagName==="w:commentRangeStart")r.push(s),s=xn(s);else if(s.tagName==="w:rPr"||s.tagName==="w:pPr")s=xn(s);else break;let i=[],o=rt(n);for(;o;)if(o.tagName==="w:commentRangeEnd")i.push(o),o=rt(o);else if(o.tagName==="w:r"&&x(o,"w:commentReference").length>0)i.push(o),o=rt(o);else if(o.tagName==="w:commentReference")i.push(o),o=rt(o);else break;let u=new Set;for(let l of i)if(l.tagName==="w:commentRangeEnd"){let a=l.getAttribute("w:id");a&&u.add(a);}else {let a=x(l,"w:commentReference")[0];if(!a&&l.tagName==="w:commentReference"&&(a=l),a){let c=a.getAttribute("w:id");c&&u.add(c);}}for(let l of r){let a=l.getAttribute("w:id");if(a&&u.has(a)){this.comments_manager.deleteComment(a),l.parentNode&&l.parentNode.removeChild(l);for(let c of i){let f=null;if(c.tagName==="w:commentRangeEnd")f=c.getAttribute("w:id");else {let p=x(c,"w:commentReference")[0];!p&&c.tagName==="w:commentReference"&&(p=c),p&&(f=p.getAttribute("w:id"));}f===a&&c.parentNode&&c.parentNode.removeChild(c);}}}}_delete_comments_in_element(e){let t=x(e,"w:commentReference");for(let n of t){let r=n.getAttribute("w:id");if(r){this.comments_manager.deleteComment(r);for(let s of ["w:commentRangeStart","w:commentRangeEnd"]){let i=x(this.doc.element,s);for(let o of i)o.getAttribute("w:id")===r&&o.parentNode&&o.parentNode.removeChild(o);}}}}validate_edits(e){let t=[];this.mapper.full_text||this.mapper._build_map(),t.push(...Vu(e));for(let n=0;n<e.length;n++){let r=e[n];if(!r.target_text)continue;let s=this.mapper.find_all_match_indices(r.target_text),i=this.mapper.full_text;if(s.length===0&&(this.clean_mapper||(this.clean_mapper=new vr(this.doc,true)),s=this.clean_mapper.find_all_match_indices(r.target_text),s.length>0&&(i=this.clean_mapper.full_text)),s.length===0)t.push(`- Edit ${n+1} Failed: Target text not found in document:
43
- "${r.target_text}"`);else if(s.length>1){let o=s.map(([u,l])=>[u,u+l]);t.push(Wu(n+1,r.target_text,i,o));}for(let[o,u]of s){let l=this.mapper.spans.filter(c=>c.end>o&&c.start<o+u),a=new Set;for(let c of l)if(c.ins_id){let f=x(this.doc.element,"w:ins").filter(p=>p.getAttribute("w:id")===c.ins_id);if(f.length>0){let p=f[0].getAttribute("w:author");p&&p!==this.author&&a.add(p);}}a.size>0&&t.push(`- Edit ${n+1} Failed: Modification targets an active insertion from another author (${Array.from(a).join(", ")}). Accept that change first or scope your edit outside of it.`);}}return t}validate_review_actions(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n],s=r.type;if(s==="reply"){let i=r.target_id.replace("Com:",""),o=false,u=this.doc.pkg.parts.find(l=>l.contentType==="application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml");u&&(o=x(u._element,"w:comment").some(a=>a.getAttribute("w:id")===i)),o||t.push(`- Action ${n+1} Failed: Target comment ID ${r.target_id} not found.`);}else if(s==="accept"||s==="reject"){let i=r.target_id.replace("Chg:",""),o=x(this.doc.element,"w:ins").filter(l=>l.getAttribute("w:id")===i),u=x(this.doc.element,"w:del").filter(l=>l.getAttribute("w:id")===i);o.length===0&&u.length===0&&t.push(`- Action ${n+1} Failed: Target ID ${r.target_id} not found.`);}}return t}process_batch(e){this.skipped_details=[];let t=e.filter(l=>["accept","reject","reply"].includes(l.type)),n=e.filter(l=>!["accept","reject","reply"].includes(l.type)),r=[];if(t.length>0&&r.push(...this.validate_review_actions(t)),n.length>0&&r.push(...this.validate_edits(n)),r.length>0)throw new Hu(r);let s=0,i=0;if(t.length>0){let l=this.apply_review_actions(t);s=l[0],i=l[1],s>0&&(this.mapper._build_map(),this.clean_mapper&&this.clean_mapper._build_map());}let o=0,u=0;if(n.length>0){let l=this.apply_edits(n);o=l[0],u=l[1];}return {actions_applied:s,actions_skipped:i,edits_applied:o,edits_skipped:u,skipped_details:this.skipped_details}}apply_edits(e){let t=0,n=0,r=[];for(let i of e)if(i._match_start_index!==void 0&&i._match_start_index!==null)r.push([i,i.new_text||null]);else if(i.type==="insert_row"||i.type==="delete_row"){let[o]=this.mapper.find_match_index(i.target_text);o!==-1?(i._match_start_index=o,r.push([i,null])):(n++,this.skipped_details.push(`- Failed to locate row target: '${(i.target_text||"").substring(0,40)}...'`));}else {let o=this._pre_resolve_heuristic_edit(i);if(o)if(Array.isArray(o))for(let u of o)r.push([u,u.new_text]);else r.push([o,o.new_text]);else n++,this.skipped_details.push(`- Failed to apply edit targeting: '${(i.target_text||"insertion").substring(0,40)}...'`);}r.sort((i,o)=>(o[0]._match_start_index||0)-(i[0]._match_start_index||0));let s=[];for(let[i,o]of r){let u=i._match_start_index||0,l=u+(i.target_text?i.target_text.length:0);if(s.some(([f,p])=>u<p&&l>f)){n++,this.skipped_details.push(`- Skipped overlapping edit targeting: '${(i.target_text||"insertion").substring(0,40)}...'`);continue}let c=false;i.type==="modify"?c=this._apply_single_edit_indexed(i,o,false):(i.type==="insert_row"||i.type==="delete_row")&&(c=this._apply_table_edit(i,false)),c?(t++,s.push([u,l])):(n++,this.skipped_details.push(`- Failed to apply edit targeting: '${(i.target_text||"insertion").substring(0,40)}...'`));}return [t,n]}apply_review_actions(e){let t=0,n=0;for(let r of e){let s=r.type;if(s==="reply"){let a=r.target_id.replace("Com:",""),c=this.comments_manager.addComment(this.author,r.text,a);this._anchor_reply_comment(a,c),t++;continue}let i=r.target_id.replace("Chg:",""),o=x(this.doc.element,"w:ins").filter(a=>a.getAttribute("w:id")===i),u=x(this.doc.element,"w:del").filter(a=>a.getAttribute("w:id")===i),l=[...o,...u];if(l.length===0){n++,this.skipped_details.push(`- Failed to apply action: Target ID ${r.target_id} not found.`);continue}for(let a of l){let c=a.tagName==="w:ins",p=(a.parentNode?a.parentNode.tagName:"")==="w:trPr";if(s==="accept")if(c)if(this._clean_wrapping_comments(a),p)a.parentNode?.removeChild(a);else {for(;a.firstChild;)a.parentNode?.insertBefore(a.firstChild,a);a.parentNode?.removeChild(a);}else if(this._clean_wrapping_comments(a),this._delete_comments_in_element(a),p){let d=a.parentNode?.parentNode;d?.parentNode?.removeChild(d);}else a.parentNode?.removeChild(a);else if(s==="reject")if(c)if(this._clean_wrapping_comments(a),this._delete_comments_in_element(a),p){let d=a.parentNode?.parentNode;d?.parentNode?.removeChild(d);}else a.parentNode?.removeChild(a);else if(this._clean_wrapping_comments(a),p)a.parentNode?.removeChild(a);else {let d=Array.from(a.getElementsByTagName("w:delText"));for(let g of d){let m=g.ownerDocument.createElement("w:t");m.textContent=g.textContent,g.hasAttribute("xml:space")&&m.setAttribute("xml:space","preserve"),g.parentNode?.replaceChild(m,g);}for(;a.firstChild;)a.parentNode?.insertBefore(a.firstChild,a);a.parentNode?.removeChild(a);}}t++;}return [t,n]}_apply_table_edit(e,t){let n=e._match_start_index||0,[r,s]=this.mapper.get_insertion_anchor(n,t),i=null;if(r?i=r._element:s&&(i=s._element),!i)return false;let o=i;for(;o&&o.tagName!=="w:tr";)o=o.parentNode;if(!o)return false;if(e.type==="delete_row"){let u=k(o,"w:trPr");return u||(u=o.ownerDocument.createElement("w:trPr"),o.insertBefore(u,o.firstChild)),u.appendChild(this._create_track_change_tag("w:del")),true}else if(e.type==="insert_row"){let u=o.ownerDocument.createElement("w:tr"),l=o.ownerDocument.createElement("w:trPr");u.appendChild(l),l.appendChild(this._create_track_change_tag("w:ins"));for(let a of e.cells){let c=o.ownerDocument.createElement("w:tc"),f=o.ownerDocument.createElement("w:p"),p=o.ownerDocument.createElement("w:r"),d=o.ownerDocument.createElement("w:t");d.textContent=a,a.trim()!==a&&d.setAttribute("xml:space","preserve"),p.appendChild(d),f.appendChild(p),c.appendChild(f),u.appendChild(c);}return e.position==="above"?o.parentNode?.insertBefore(u,o):It(u,o),true}return false}_pre_resolve_heuristic_edit(e){if(!e.target_text)return null;let[t,n]=this.mapper.find_match_index(e.target_text),r=false;if(t===-1)if(this.clean_mapper||(this.clean_mapper=new vr(this.doc,true)),[t,n]=this.clean_mapper.find_match_index(e.target_text),t!==-1)r=true;else return null;let s=r?this.clean_mapper:this.mapper,i=e.new_text||"",o=this.mapper.full_text.substring(t,t+n);if(o===i||e.target_text===i)return {type:"modify",target_text:o,new_text:o,comment:e.comment,_match_start_index:t,_internal_op:"COMMENT_ONLY",_active_mapper_ref:s};let u="",l="",a="",c=t;if(i.startsWith(o))u="INSERTION",a=i.substring(o.length),c=t+n;else {let[f,p]=ws(o,i),d=o.length-p,g=i.length-p;l=o.substring(f,d),a=i.substring(f,g),c=t+f,!l&&a?u="INSERTION":l&&!a?u="DELETION":l&&a?u="MODIFICATION":u="COMMENT_ONLY";}return {type:"modify",target_text:l,new_text:a,comment:e.comment,_match_start_index:c,_internal_op:u,_active_mapper_ref:s}}_apply_single_edit_indexed(e,t,n){let r=e._internal_op,s=e._active_mapper_ref||this.mapper,i=e._match_start_index||0,o=e.target_text?e.target_text.length:0,u=["DELETION","MODIFICATION"].includes(r)?this._getNextId():null,l=["INSERTION","MODIFICATION"].includes(r)?this._getNextId():null;if(r==="COMMENT_ONLY"){let D=s.find_target_runs_by_index(i,o,n);if(D.length===0)return false;if(!e.comment)return true;let w=D[0]._element,v=D[D.length-1]._element,_=w;for(;_&&_.tagName!=="w:p";)_=_.parentNode;let A=v;for(;A&&A.tagName!=="w:p";)A=A.parentNode;if(!_||!A)return false;let E=h((C,F)=>{let P=C;for(;P.parentNode&&P.parentNode!==F;)P=P.parentNode;return P},"ascend_to_paragraph_child"),y=E(w,_),N=E(v,A);return _===A?this._attach_comment(_,y,N,e.comment):this._attach_comment_spanning(_,y,A,N,e.comment),true}if(r==="INSERTION"){let[D,w]=s.get_insertion_anchor(i,n);if(!D&&!w)return false;let v=this._track_insert_multiline(e.new_text||"",D,w,l);if(!v.first_node)return false;if(v.first_node.tagName==="w:ins"&&(D?It(v.first_node,D._element):w&&w._element.appendChild(v.first_node)),e.comment){let A=h((E,y)=>{let N=E;for(;N.parentNode&&N.parentNode!==y;)N=N.parentNode;return N},"ascend_to_paragraph_child");if(v.last_p&&v.last_ins){let E=v.first_node;for(;E&&E.tagName!=="w:p";)E=E.parentNode;if(E){let y=v.first_node;v.first_node.tagName==="w:p"&&(y=x(v.first_node,"w:ins")[0]||v.first_node);let N=A(y,E),C=A(v.last_ins,v.last_p);this._attach_comment_spanning(E,N,v.last_p,C,e.comment);}}else {let E=v.first_node;for(;E&&E.tagName!=="w:p";)E=E.parentNode;if(E){let y=v.first_node;v.first_node.tagName==="w:p"&&(y=x(v.first_node,"w:ins")[0]||v.first_node);let N=A(y,E);this._attach_comment(E,N,N,e.comment);}}}return true}let a=s.find_target_runs_by_index(i,o,n),c=s.get_virtual_spans_in_range(i,o);if(a.length===0&&c.length===0)return false;let f=new Set;for(let D of a){let w=D._element.parentNode;for(;w&&w.tagName!=="w:p";)w=w.parentNode;w&&f.add(w);}let p=null,d=null;for(let D of a){let w=this._create_track_change_tag("w:del","",u),v=D._element.cloneNode(true);Array.from(v.getElementsByTagName("w:t")).forEach(A=>{let E=v.ownerDocument.createElement("w:delText");E.textContent=A.textContent,A.hasAttribute("xml:space")&&E.setAttribute("xml:space","preserve"),v.replaceChild(E,A);}),w.appendChild(v),D._element.parentNode?.replaceChild(w,D._element),p===null&&(p=w),d=w;}let g=null,m=null,b=null;if(r==="MODIFICATION"&&e.new_text&&d){let D=d;for(;D&&D.tagName!=="w:p";)D=D.parentNode;let w=D?new Ze(D,null):null,v=a.length>0?a[a.length-1]:null,_=this._track_insert_multiline(e.new_text,v,w,l);_.first_node&&(_.first_node.tagName==="w:ins"?(It(_.first_node,d),g=_.first_node):g=_.last_ins,m=_.last_p,b=_.last_ins);}if(r==="DELETION"||r==="MODIFICATION"){if(r==="MODIFICATION"&&a.length===0&&c.length>0&&e.new_text){let D=c[0];if(D.paragraph){let w=D.paragraph._element,v=x(w,"w:r"),_=v.length>0?new Je(v[v.length-1],D.paragraph):null,A=this._track_insert_multiline(e.new_text,_,D.paragraph,l);A.first_node&&w.appendChild(A.first_node);}}for(let D of [...c].reverse())if(D.paragraph){let w=D.paragraph._element,v=rt(w);for(;v&&v.tagName!=="w:p";)v=rt(v);if(v&&v.tagName==="w:p"){let _=k(w,"w:pPr");_||(_=w.ownerDocument.createElement("w:pPr"),w.insertBefore(_,w.firstChild));let A=k(_,"w:rPr");A||(A=w.ownerDocument.createElement("w:rPr"),_.appendChild(A));let E=this._create_track_change_tag("w:del");A.appendChild(E);let y=Array.from(v.childNodes);for(let N of y)N.nodeType===1&&N.tagName==="w:pPr"||w.appendChild(N);v.parentNode&&v.parentNode.removeChild(v);}}}if(e.comment&&p!==null){let D,w;if(m&&b)D=b,w=m;else {let y=g!==null?g:d;for(D=y,w=y;w&&w.tagName!=="w:p";)w=w.parentNode;}let v=p;for(;v&&v.tagName!=="w:p";)v=v.parentNode;if(!v||!w)return true;let _=h((y,N)=>{let C=y;for(;C.parentNode&&C.parentNode!==N;)C=C.parentNode;return C},"ascend_to_paragraph_child"),A=_(p,v),E=_(D,w);v===w?this._attach_comment(v,A,E,e.comment):this._attach_comment_spanning(v,A,w,E,e.comment);}for(let D of f){let w=false;for(let v of ["w:t","w:tab","w:br"]){let _=x(D,v);for(let A of _){let E=false,y=A.parentNode;for(;y&&y!==D.parentNode;){if(y.tagName==="w:del"){E=true;break}y=y.parentNode;}if(!E){if(v==="w:t"&&!A.textContent)continue;w=true;break}}if(w)break}if(!w){let v=k(D,"w:pPr");v||(v=D.ownerDocument.createElement("w:pPr"),D.insertBefore(v,D.firstChild));let _=k(v,"w:rPr");if(_||(_=D.ownerDocument.createElement("w:rPr"),v.appendChild(_)),!k(_,"w:del")){let A=this._create_track_change_tag("w:del");_.appendChild(A);}}}return true}};function Gu(e,t,n=2){if(e===t)return 0;if(Math.abs(e.length-t.length)>n)return n+1;if(e.length===0)return t.length<=n?t.length:n+1;if(t.length===0)return e.length<=n?e.length:n+1;if(e.length>t.length){let s=e;e=t,t=s;}let r=Array.from({length:e.length+1},(s,i)=>i);for(let s=1;s<=t.length;s++){let i=[s],o=s;for(let u=1;u<=e.length;u++){let l=e[u-1]===t[s-1]?0:1,a=Math.min(r[u]+1,i[u-1]+1,r[u-1]+l);i.push(a),a<o&&(o=a);}if(o>n)return n+1;r=i;}return r[e.length]<=n?r[e.length]:n+1}h(Gu,"boundedLevenshtein");function Xu(e){let t="",n=x(e._element,"w:r");for(let r of n)t+=it(new Je(r,e));return t}h(Xu,"_get_paragraph_text");function Yu(e,t){let n={},r=new Set,s={},i=[],o=/^(?:[\d.\-()a-zA-Z]+\s*)?["“]([A-Z][A-Za-z0-9\s\-&'’]{1,60})["”]/,u=/\([^)]*?["“]([A-Z][A-Za-z0-9\s\-&'’]{1,60})["”][^)]*?\)/g;for(let D of br(e)){if(!(D instanceof Ze))continue;let w=Xu(D).trim();if(!w)continue;let v=[],_=w.match(o);_&&v.push(_[1].trim());let A=w.matchAll(u);for(let N of A)v.push(N[1].trim());for(let N of v)n[N]?r.add(N):n[N]={count:0};let E=w.length>60?w.substring(0,60)+"...":w,y=x(D._element,"*");for(let N of y){if(N.tagName==="w:bookmarkStart"){let F=N.getAttribute("w:name");F&&(!F.startsWith("_")||F.startsWith("_Ref"))&&(s[F]||(s[F]={anchored_to:E,referenced_from:[]}));}let C=null;if(N.tagName==="w:fldSimple"){let P=(N.getAttribute("w:instr")||"").trim().split(/\s+/);P.length>1&&P[0]==="REF"&&(C=P[1]);}else if(N.tagName==="w:instrText"){let P=(N.textContent||"").trim().split(/\s+/);P.length>1&&P[0]==="REF"&&(C=P[1]);}C&&i.push([C,E]);}}for(let[D,w]of i)s[D]&&s[D].referenced_from.push(w);let l=[],a=Object.keys(n);if(a.length>0){let D=a.sort((A,E)=>E.length-A.length),w=h(A=>A.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"escapeRegExp"),v=D.map(w).join("|"),_=new RegExp(`(?<!["\u201C])\\b(${v})\\b(?![\u201D"])`,"g");for(let A of t.matchAll(_)){let E=A[1];n[E]&&n[E].count++;}for(let A of a)n[A].count===0&&(delete n[A],r.delete(A));}for(let D of r)l.push(`[Error] Duplicate Definition: '${D}' is defined multiple times.`);let c=new Set(["The","This","That","Such","A","An","Any","All","Some","No","Every","Each","As","In","Of","For","To","On","By","With"]),f=/\b[A-Z][a-zA-Z]*(?:\s+[A-Z][a-zA-Z]*)*\b/g,p=new Set(t.match(f)||[]),d=new Set(Object.keys(n)),g={};for(let D of d){let w=D[0].toLowerCase();g[w]||(g[w]=[]),g[w].push(D);}let m={};for(let D of p){let w=D.trim(),v=w.split(/\s+/);for(;v.length>0;){let E=v[0],y=E.charAt(0).toUpperCase()+E.slice(1).toLowerCase();if(c.has(y))v.shift();else break}if(w=v.join(" "),w.length<4||d.has(w))continue;let _=w[0].toLowerCase(),A=g[_]||[];if(w.length>5)for(let[E,y]of Object.entries(g))E!==_&&(A=A.concat(y));for(let E of A){if(Math.abs(w.length-E.length)>2||w===E+"s"||w===E+"es"||E===w+"s"||E===w+"es")continue;let y=Gu(w,E,2);y===0||y>2||E.length<=5&&(y>1||w[0].toLowerCase()!==E[0].toLowerCase())||(m[E]||(m[E]=[]),m[E].includes(w)||m[E].push(w));}}for(let[D,w]of Object.entries(m)){w.sort();let v=w.map(_=>`'${_}'`).join(", ");l.push(`[Info] Possible Typos for '${D}': Found ${v}`);}function b(D){return D.startsWith("[Error]")?0:D.startsWith("[Warning]")?1:2}return h(b,"diag_sort_key"),l.sort((D,w)=>{let v=b(D),_=b(w);return v!==_?v-_:D.localeCompare(w)}),[n,l,s]}h(Yu,"extract_all_domain_metadata");function Qu(e,t){let[n,r,s]=Yu(e,t),i=[`
42
+ `)),this.name="BatchValidationError",this.errors=e;}};function Xu(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n],s=r.target_text||"",i=r.new_text||"";if((i.includes("{++")||i.includes("{--")||i.includes("{>>")||i.includes("{=="))&&t.push(`- Edit ${n+1} Failed: Do not manually write CriticMarkup tags ({++, {--, {>>, {==) in \`new_text\`. The engine handles redlining automatically. To add a comment, use the \`comment\` parameter.`),s.includes("[^")||i.includes("[^")){let o=(s.match(/\[\^(?:fn|en)-[^\]]+\]/g)||[]).sort(),u=(i.match(/\[\^(?:fn|en)-[^\]]+\]/g)||[]).sort();JSON.stringify(o)!==JSON.stringify(u)&&(u.length>o.length||u.some(l=>u.filter(a=>a===l).length>o.filter(a=>a===l).length)?t.push(`- Edit ${n+1} Failed: Cannot insert footnote/endnote markers via text replace. Markers like \`[^fn-N]\` are read-only projections. Use Word's References menu.`):t.push(`- Edit ${n+1} Failed: Cannot delete footnote/endnote references via text replace. The marker corresponds to a structural XML element.`));}if(s.includes("](")||i.includes("](")){let o=(s.match(/\[(?!~)[^\]]+\]\([^)]+\)/g)||[]).sort(),u=(i.match(/\[(?!~)[^\]]+\]\([^)]+\)/g)||[]).sort();o.length!==u.length?u.length>o.length?t.push(`- Edit ${n+1} Failed: Cannot insert hyperlinks via text replace. Use a dedicated structural operation.`):t.push(`- Edit ${n+1} Failed: Cannot delete hyperlinks via text replace. The marker corresponds to a structural XML element.`):o.length>1&&JSON.stringify(o)!==JSON.stringify(u)&&t.push(`- Edit ${n+1} Failed: Can only edit or retarget one hyperlink per text replacement. Please split into multiple edits.`);}if(s.includes("[~")||i.includes("[~")){let o=s.match(/\[~[^~]+~\]\(#[^\)]+\)/g)||[],u=i.match(/\[~[^~]+~\]\(#[^\)]+\)/g)||[];o.length!==u.length?u.length>o.length?t.push(`- Edit ${n+1} Failed: Cannot insert cross-references via text replace. Markers are read-only projections.`):t.push(`- Edit ${n+1} Failed: Cannot delete cross-references via text replace. The marker corresponds to a structural XML element.`):JSON.stringify(o)!==JSON.stringify(u)&&t.push(`- Edit ${n+1} Failed: Modifying or retargeting cross-reference markers is disallowed to prevent dependency corruption.`);}if(s.includes("{#")||i.includes("{#")){let o=s.match(/\{#[^\}]+\}/g)||[],u=i.match(/\{#[^\}]+\}/g)||[];for(let l of u)if(u.filter(a=>a===l).length>o.filter(a=>a===l).length){t.push(`- Edit ${n+1} Failed: Cannot modify or insert internal anchor markers (\`{#...}\`). These represent structural XML bookmarks.`);break}}if(r.type==="modify"&&i){let o=i.split(/[\r\n]+/);for(let u of o){let l=u.trimStart();if(l.startsWith("#######")){let a=l.length-l.replace(/^#+/,"").length;if(l.substring(a).startsWith(" ")||l.substring(a)===""){t.push(`- Edit ${n+1} Failed: Heading level ${a} is not supported (maximum is 6).`);break}}}}(s.includes("READONLY_BOUNDARY_START")||i.includes("READONLY_BOUNDARY_START")||s.includes("# Document Structure (Read-Only)")||i.includes("# Document Structure (Read-Only)"))&&t.push(`- Edit ${n+1} Failed: Modification targets the read-only boundary (Structural Appendix). This section cannot be edited.`);}return t}h(Xu,"validate_edit_strings");var Cr=class{static{h(this,"RedlineEngine");}doc;author;timestamp;current_id;mapper;comments_manager;clean_mapper=null;skipped_details=[];constructor(e,t="Adeu AI (TS)"){this.doc=e,this.author=t,this.timestamp=new Date().toISOString().replace(/\.\d{3}Z$/,"Z");let n="http://schemas.microsoft.com/office/word/2023/wordml/word16du";for(let r of this.doc.pkg.parts)(r===this.doc.part||r.contentType.includes("wordprocessingml")&&r.contentType.endsWith("+xml"))&&(r._element.hasAttribute("xmlns:w16du")||r._element.setAttribute("xmlns:w16du",n));this.current_id=this._scan_existing_ids(),this.mapper=new wr(this.doc),this.comments_manager=new Pn(this.doc);}_scan_existing_ids(){let e=0;for(let t of ["w:ins","w:del"]){let n=x(this.doc.element,t);for(let r of n){let s=parseInt(r.getAttribute("w:id")||"0",10);!isNaN(s)&&s>e&&(e=s);}}return e}accept_all_revisions(){let e=[this.doc.element];for(let r of this.doc.pkg.parts)r!==this.doc.part&&r.contentType.includes("wordprocessingml")&&r.contentType.endsWith("+xml")&&e.push(r._element);for(let r of e){let s=x(r,"w:ins");for(let u of s){this._clean_wrapping_comments(u);let l=u.parentNode;if(l){if(l.tagName==="w:trPr"){l.removeChild(u);continue}for(;u.firstChild;)l.insertBefore(u.firstChild,u);l.removeChild(u);}}let i=x(r,"w:p");for(let u of i){let l=k(u,"w:pPr");if(l){let a=k(l,"w:rPr"),c=a?k(a,"w:del"):null;if(a&&c){let f=false;for(let p of ["w:t","w:tab","w:br"]){for(let d of x(u,p)){if(p==="w:t"&&!d.textContent)continue;let g=false,m=d.parentNode;for(;m&&m!==u;){if(m.tagName==="w:del"){g=true;break}m=m.parentNode;}if(!g){f=true;break}}if(f)break}f?a.removeChild(c):(this._clean_wrapping_comments(u),this._delete_comments_in_element(u),u.parentNode&&u.parentNode.removeChild(u));}}}let o=x(r,"w:del");for(let u of o){this._clean_wrapping_comments(u),this._delete_comments_in_element(u);let l=u.parentNode;if(l)if(l.tagName==="w:trPr"){let a=l.parentNode;a&&a.parentNode&&a.parentNode.removeChild(a);}else l.removeChild(u);}}let t=new Set;for(let r of ["w:commentRangeStart","w:commentRangeEnd","w:commentReference"])for(let s of x(this.doc.element,r)){let i=s.getAttribute("w:id");i&&t.add(i);}let n=this.doc.pkg.parts.find(r=>r.contentType==="application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml");if(n)for(let r of x(n._element,"w:comment")){let s=r.getAttribute("w:id");s&&t.add(s);}for(let r of t)this.comments_manager.deleteComment(r);}_getNextId(){return this.current_id++,this.current_id.toString()}_create_track_change_tag(e,t="",n=null){let s=this.doc.part._element.ownerDocument.createElement(e),i=n!==null?n:this._getNextId();return s.setAttribute("w:id",i),s.setAttribute("w:author",t||this.author),s.setAttribute("w:date",this.timestamp),s.setAttribute("w16du:dateUtc",this.timestamp),s}_set_text_content(e,t){e.textContent=t,t.trim()!==t&&e.setAttribute("xml:space","preserve");}_attach_comment(e,t,n,r){if(!r)return;let s=this.comments_manager.addComment(this.author,r),i=e.ownerDocument,o=i.createElement("w:commentRangeStart");o.setAttribute("w:id",s);let u=i.createElement("w:commentRangeEnd");u.setAttribute("w:id",s);let l=i.createElement("w:r"),a=i.createElement("w:rPr"),c=i.createElement("w:rStyle");c.setAttribute("w:val","CommentReference"),a.appendChild(c),l.appendChild(a);let f=i.createElement("w:commentReference");f.setAttribute("w:id",s),l.appendChild(f),e.insertBefore(o,t);let p=n.nextSibling;p?(e.insertBefore(u,p),e.insertBefore(l,u.nextSibling)):(e.appendChild(u),e.appendChild(l));}_attach_comment_spanning(e,t,n,r,s){if(!s)return;let i=this.comments_manager.addComment(this.author,s),o=e.ownerDocument,u=n.ownerDocument,l=o.createElement("w:commentRangeStart");l.setAttribute("w:id",i);let a=u.createElement("w:commentRangeEnd");a.setAttribute("w:id",i);let c=u.createElement("w:r"),f=u.createElement("w:rPr"),p=u.createElement("w:rStyle");p.setAttribute("w:val","CommentReference"),f.appendChild(p),c.appendChild(f);let d=u.createElement("w:commentReference");d.setAttribute("w:id",i),c.appendChild(d),e.insertBefore(l,t);let g=r.nextSibling;g?(n.insertBefore(a,g),n.insertBefore(c,a.nextSibling)):(n.appendChild(a),n.appendChild(c));}_track_insert_multiline(e,t,n,r){if(!e)return {first_node:null,last_p:null,last_ins:null,used_block_mode:false};let s=this.doc.part._element.ownerDocument,i=e.split(/[\r\n]+/),o=null;if(n!==null)o=n._element;else if(t!==null){let v=t._element;for(;v&&v.tagName!=="w:p";)v=v.parentNode;o=v;}for(;i.length>1&&i[i.length-1]==="";)i.pop();if(i.length===0)return {first_node:null,last_p:null,last_ins:null,used_block_mode:false};let[u,l]=this._parse_markdown_style(i[0]),c=l!==null&&o!==null,f=null,p=null;c||(p=this._build_tracked_ins_for_line((u===i[0],i[0]),t,r,s),f=p);let d=c?i:i.slice(1);if(d.length===0)return {first_node:f,last_p:null,last_ins:p,used_block_mode:false};if(!o)return {first_node:f,last_p:null,last_ins:p,used_block_mode:false};let g=o.parentNode;if(!g)return {first_node:f,last_p:null,last_ins:p,used_block_mode:false};let m=h((v,_)=>{g.insertBefore(v,_.nextSibling);},"insertAfterEl"),b=null,D=null,w=o;for(let v=0;v<d.length;v++){let _=d[v],[A,E]=this._parse_markdown_style(_),y=s.createElement("w:p");if(E)this._set_paragraph_style(y,E);else {let R=k(o,"w:pPr");R&&y.appendChild(R.cloneNode(true));}let N=k(y,"w:pPr");N||(N=s.createElement("w:pPr"),y.insertBefore(N,y.firstChild));let C=k(N,"w:rPr");C||(C=s.createElement("w:rPr"),N.appendChild(C));let F=this._create_track_change_tag("w:ins","",r);C.appendChild(F);let P=this._build_tracked_ins_for_line(A,t,r,s);P&&y.appendChild(P),m(y,w),w=y,b=y,D=P,f||(f=y);}return {first_node:f,last_p:b,last_ins:D,used_block_mode:c}}_build_tracked_ins_for_line(e,t,n,r){if(!e&&e!=="")return null;let s=this._create_track_change_tag("w:ins","",n),i=this._parse_inline_markdown(e);if(i.length===0)return null;for(let[o,u]of i){let l=r.createElement("w:r");if(t&&t._element){let c=k(t._element,"w:rPr");if(c){let f=c.cloneNode(true);for(let p of ["w:vanish","w:strike","w:dstrike"]){let d=k(f,p);d&&f.removeChild(d);}l.appendChild(f);}}this._apply_run_props(l,u,false);let a=r.createElement("w:t");this._set_text_content(a,o),l.appendChild(a),s.appendChild(l);}return s}_parse_markdown_style(e){let t=e.trimStart();if(t.startsWith("#")){let r=0,s=t;for(;s.startsWith("#");)r++,s=s.substring(1);if(s.startsWith(" "))return [s.trim(),`Heading ${r}`]}if(t.startsWith("* ")||t.startsWith("- "))return [t.substring(2).trim(),"List Paragraph"];let n=t.match(/^\d+\.\s+/);return n?[t.substring(n[0].length).trim(),"List Number"]:[e,null]}_parse_inline_markdown(e,t={}){if(!e)return [];let n=/(\*\*.*?\*\*)|(_.*?_)/,r=e.match(n);if(!r)return [[e,t]];let s=r.index,i=r[0],o=s+i.length,u=i.startsWith("**"),l=u?i.substring(2,i.length-2):i.substring(1,i.length-1),a=e.substring(0,s),c=e.substring(o),f=[];a&&f.push([a,t]);let p={...t};return u?p.bold=true:p.italic=true,f.push(...this._parse_inline_markdown(l,p)),f.push(...this._parse_inline_markdown(c,t)),f}_apply_run_props(e,t,n=false){if(!t){if(!n)return;t={};}let r=k(e,"w:rPr");if(!r&&(t.bold||t.italic||n)&&(r=e.ownerDocument.createElement("w:rPr"),e.appendChild(r)),r){let s=e.ownerDocument;if(t.bold){let i=k(r,"w:b");i||(i=s.createElement("w:b"),r.appendChild(i)),i.setAttribute("w:val","1");}else if(n){let i=k(r,"w:b");i&&r.removeChild(i);}if(t.italic){let i=k(r,"w:i");i||(i=s.createElement("w:i"),r.appendChild(i)),i.setAttribute("w:val","1");}else if(n){let i=k(r,"w:i");i&&r.removeChild(i);}}}_set_paragraph_style(e,t){let n=e.ownerDocument,r=k(e,"w:pPr");r&&e.removeChild(r);let s=n.createElement("w:pPr"),i=n.createElement("w:pStyle"),o=t.replace(/\s+/g,"");i.setAttribute("w:val",o),s.appendChild(i),e.insertBefore(s,e.firstChild);}_anchor_reply_comment(e,t){let n=this.doc.part._element.ownerDocument,r=x(this.doc.element,"w:commentRangeStart").filter(m=>m.getAttribute("w:id")===e);if(r.length===0)return;let s=r[0],i=n.createElement("w:commentRangeStart");i.setAttribute("w:id",t),It(i,s);let o=x(this.doc.element,"w:commentRangeEnd").filter(m=>m.getAttribute("w:id")===e);if(o.length===0)return;let u=o[0],l=x(this.doc.element,"w:commentReference").filter(m=>m.getAttribute("w:id")===e),a=u;if(l.length>0){let m=l[0];m.parentNode&&m.parentNode.tagName==="w:r"&&(a=m.parentNode);}let c=n.createElement("w:commentRangeEnd");c.setAttribute("w:id",t),It(c,a);let f=n.createElement("w:r"),p=n.createElement("w:rPr"),d=n.createElement("w:rStyle");d.setAttribute("w:val","CommentReference"),p.appendChild(d),f.appendChild(p);let g=n.createElement("w:commentReference");g.setAttribute("w:id",t),f.appendChild(g),It(f,c);}_clean_wrapping_comments(e){let t=e;for(;;){let l=xn(t);if(l&&(l.tagName==="w:ins"||l.tagName==="w:del"))t=l;else break}let n=e;for(;;){let l=rt(n);if(l&&(l.tagName==="w:ins"||l.tagName==="w:del"))n=l;else break}let r=[],s=xn(t);for(;s;)if(s.tagName==="w:commentRangeStart")r.push(s),s=xn(s);else if(s.tagName==="w:rPr"||s.tagName==="w:pPr")s=xn(s);else break;let i=[],o=rt(n);for(;o;)if(o.tagName==="w:commentRangeEnd")i.push(o),o=rt(o);else if(o.tagName==="w:r"&&x(o,"w:commentReference").length>0)i.push(o),o=rt(o);else if(o.tagName==="w:commentReference")i.push(o),o=rt(o);else break;let u=new Set;for(let l of i)if(l.tagName==="w:commentRangeEnd"){let a=l.getAttribute("w:id");a&&u.add(a);}else {let a=x(l,"w:commentReference")[0];if(!a&&l.tagName==="w:commentReference"&&(a=l),a){let c=a.getAttribute("w:id");c&&u.add(c);}}for(let l of r){let a=l.getAttribute("w:id");if(a&&u.has(a)){this.comments_manager.deleteComment(a),l.parentNode&&l.parentNode.removeChild(l);for(let c of i){let f=null;if(c.tagName==="w:commentRangeEnd")f=c.getAttribute("w:id");else {let p=x(c,"w:commentReference")[0];!p&&c.tagName==="w:commentReference"&&(p=c),p&&(f=p.getAttribute("w:id"));}f===a&&c.parentNode&&c.parentNode.removeChild(c);}}}}_delete_comments_in_element(e){let t=x(e,"w:commentReference");for(let n of t){let r=n.getAttribute("w:id");if(r){this.comments_manager.deleteComment(r);for(let s of ["w:commentRangeStart","w:commentRangeEnd"]){let i=x(this.doc.element,s);for(let o of i)o.getAttribute("w:id")===r&&o.parentNode&&o.parentNode.removeChild(o);}}}}validate_edits(e){let t=[];this.mapper.full_text||this.mapper._build_map(),t.push(...Xu(e));for(let n=0;n<e.length;n++){let r=e[n];if(!r.target_text)continue;let s=this.mapper.find_all_match_indices(r.target_text),i=this.mapper.full_text;if(s.length===0&&(this.clean_mapper||(this.clean_mapper=new wr(this.doc,true)),s=this.clean_mapper.find_all_match_indices(r.target_text),s.length>0&&(i=this.clean_mapper.full_text)),s.length===0)t.push(`- Edit ${n+1} Failed: Target text not found in document:
43
+ "${r.target_text}"`);else if(s.length>1){let o=s.map(([u,l])=>[u,u+l]);t.push(Vu(n+1,r.target_text,i,o));}for(let[o,u]of s){let l=this.mapper.spans.filter(c=>c.end>o&&c.start<o+u),a=new Set;for(let c of l)if(c.ins_id){let f=x(this.doc.element,"w:ins").filter(p=>p.getAttribute("w:id")===c.ins_id);if(f.length>0){let p=f[0].getAttribute("w:author");p&&p!==this.author&&a.add(p);}}a.size>0&&t.push(`- Edit ${n+1} Failed: Modification targets an active insertion from another author (${Array.from(a).join(", ")}). Accept that change first or scope your edit outside of it.`);}}return t}validate_review_actions(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n],s=r.type;if(s==="reply"){let i=r.target_id.replace("Com:",""),o=false,u=this.doc.pkg.parts.find(l=>l.contentType==="application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml");u&&(o=x(u._element,"w:comment").some(a=>a.getAttribute("w:id")===i)),o||t.push(`- Action ${n+1} Failed: Target comment ID ${r.target_id} not found.`);}else if(s==="accept"||s==="reject"){let i=r.target_id.replace("Chg:",""),o=x(this.doc.element,"w:ins").filter(l=>l.getAttribute("w:id")===i),u=x(this.doc.element,"w:del").filter(l=>l.getAttribute("w:id")===i);o.length===0&&u.length===0&&t.push(`- Action ${n+1} Failed: Target ID ${r.target_id} not found.`);}}return t}process_batch(e){this.skipped_details=[];let t=e.filter(l=>["accept","reject","reply"].includes(l.type)),n=e.filter(l=>!["accept","reject","reply"].includes(l.type)),r=[];if(t.length>0&&r.push(...this.validate_review_actions(t)),n.length>0&&r.push(...this.validate_edits(n)),r.length>0)throw new Gu(r);let s=0,i=0;if(t.length>0){let l=this.apply_review_actions(t);s=l[0],i=l[1],s>0&&(this.mapper._build_map(),this.clean_mapper&&this.clean_mapper._build_map());}let o=0,u=0;if(n.length>0){let l=this.apply_edits(n);o=l[0],u=l[1];}return {actions_applied:s,actions_skipped:i,edits_applied:o,edits_skipped:u,skipped_details:this.skipped_details}}apply_edits(e){let t=0,n=0,r=[];for(let i of e)if(i._match_start_index!==void 0&&i._match_start_index!==null)r.push([i,i.new_text||null]);else if(i.type==="insert_row"||i.type==="delete_row"){let[o]=this.mapper.find_match_index(i.target_text);o!==-1?(i._match_start_index=o,r.push([i,null])):(n++,this.skipped_details.push(`- Failed to locate row target: '${(i.target_text||"").substring(0,40)}...'`));}else {let o=this._pre_resolve_heuristic_edit(i);if(o)if(Array.isArray(o))for(let u of o)r.push([u,u.new_text]);else r.push([o,o.new_text]);else n++,this.skipped_details.push(`- Failed to apply edit targeting: '${(i.target_text||"insertion").substring(0,40)}...'`);}r.sort((i,o)=>(o[0]._match_start_index||0)-(i[0]._match_start_index||0));let s=[];for(let[i,o]of r){let u=i._match_start_index||0,l=u+(i.target_text?i.target_text.length:0);if(s.some(([f,p])=>u<p&&l>f)){n++,this.skipped_details.push(`- Skipped overlapping edit targeting: '${(i.target_text||"insertion").substring(0,40)}...'`);continue}let c=false;i.type==="modify"?c=this._apply_single_edit_indexed(i,o,false):(i.type==="insert_row"||i.type==="delete_row")&&(c=this._apply_table_edit(i,false)),c?(t++,s.push([u,l])):(n++,this.skipped_details.push(`- Failed to apply edit targeting: '${(i.target_text||"insertion").substring(0,40)}...'`));}return [t,n]}apply_review_actions(e){let t=0,n=0;for(let r of e){let s=r.type;if(s==="reply"){let a=r.target_id.replace("Com:",""),c=this.comments_manager.addComment(this.author,r.text,a);this._anchor_reply_comment(a,c),t++;continue}let i=r.target_id.replace("Chg:",""),o=x(this.doc.element,"w:ins").filter(a=>a.getAttribute("w:id")===i),u=x(this.doc.element,"w:del").filter(a=>a.getAttribute("w:id")===i),l=[...o,...u];if(l.length===0){n++,this.skipped_details.push(`- Failed to apply action: Target ID ${r.target_id} not found.`);continue}for(let a of l){let c=a.tagName==="w:ins",p=(a.parentNode?a.parentNode.tagName:"")==="w:trPr";if(s==="accept")if(c)if(this._clean_wrapping_comments(a),p)a.parentNode?.removeChild(a);else {for(;a.firstChild;)a.parentNode?.insertBefore(a.firstChild,a);a.parentNode?.removeChild(a);}else if(this._clean_wrapping_comments(a),this._delete_comments_in_element(a),p){let d=a.parentNode?.parentNode;d?.parentNode?.removeChild(d);}else a.parentNode?.removeChild(a);else if(s==="reject")if(c)if(this._clean_wrapping_comments(a),this._delete_comments_in_element(a),p){let d=a.parentNode?.parentNode;d?.parentNode?.removeChild(d);}else a.parentNode?.removeChild(a);else if(this._clean_wrapping_comments(a),p)a.parentNode?.removeChild(a);else {let d=Array.from(a.getElementsByTagName("w:delText"));for(let g of d){let m=g.ownerDocument.createElement("w:t");m.textContent=g.textContent,g.hasAttribute("xml:space")&&m.setAttribute("xml:space","preserve"),g.parentNode?.replaceChild(m,g);}for(;a.firstChild;)a.parentNode?.insertBefore(a.firstChild,a);a.parentNode?.removeChild(a);}}t++;}return [t,n]}_apply_table_edit(e,t){let n=e._match_start_index||0,[r,s]=this.mapper.get_insertion_anchor(n,t),i=null;if(r?i=r._element:s&&(i=s._element),!i)return false;let o=i;for(;o&&o.tagName!=="w:tr";)o=o.parentNode;if(!o)return false;if(e.type==="delete_row"){let u=k(o,"w:trPr");return u||(u=o.ownerDocument.createElement("w:trPr"),o.insertBefore(u,o.firstChild)),u.appendChild(this._create_track_change_tag("w:del")),true}else if(e.type==="insert_row"){let u=o.ownerDocument.createElement("w:tr"),l=o.ownerDocument.createElement("w:trPr");u.appendChild(l),l.appendChild(this._create_track_change_tag("w:ins"));for(let a of e.cells){let c=o.ownerDocument.createElement("w:tc"),f=o.ownerDocument.createElement("w:p"),p=o.ownerDocument.createElement("w:r"),d=o.ownerDocument.createElement("w:t");d.textContent=a,a.trim()!==a&&d.setAttribute("xml:space","preserve"),p.appendChild(d),f.appendChild(p),c.appendChild(f),u.appendChild(c);}return e.position==="above"?o.parentNode?.insertBefore(u,o):It(u,o),true}return false}_pre_resolve_heuristic_edit(e){if(!e.target_text)return null;let[t,n]=this.mapper.find_match_index(e.target_text),r=false;if(t===-1)if(this.clean_mapper||(this.clean_mapper=new wr(this.doc,true)),[t,n]=this.clean_mapper.find_match_index(e.target_text),t!==-1)r=true;else return null;let s=r?this.clean_mapper:this.mapper,i=e.new_text||"",o=this.mapper.full_text.substring(t,t+n);if(o===i||e.target_text===i)return {type:"modify",target_text:o,new_text:o,comment:e.comment,_match_start_index:t,_internal_op:"COMMENT_ONLY",_active_mapper_ref:s};let u="",l="",a="",c=t;if(i.startsWith(o))u="INSERTION",a=i.substring(o.length),c=t+n;else {let[f,p]=As(o,i),d=o.length-p,g=i.length-p;l=o.substring(f,d),a=i.substring(f,g),c=t+f,!l&&a?u="INSERTION":l&&!a?u="DELETION":l&&a?u="MODIFICATION":u="COMMENT_ONLY";}return {type:"modify",target_text:l,new_text:a,comment:e.comment,_match_start_index:c,_internal_op:u,_active_mapper_ref:s}}_apply_single_edit_indexed(e,t,n){let r=e._internal_op,s=e._active_mapper_ref||this.mapper,i=e._match_start_index||0,o=e.target_text?e.target_text.length:0,u=["DELETION","MODIFICATION"].includes(r)?this._getNextId():null,l=["INSERTION","MODIFICATION"].includes(r)?this._getNextId():null;if(r==="COMMENT_ONLY"){let D=s.find_target_runs_by_index(i,o,n);if(D.length===0)return false;if(!e.comment)return true;let w=D[0]._element,v=D[D.length-1]._element,_=w;for(;_&&_.tagName!=="w:p";)_=_.parentNode;let A=v;for(;A&&A.tagName!=="w:p";)A=A.parentNode;if(!_||!A)return false;let E=h((C,F)=>{let P=C;for(;P.parentNode&&P.parentNode!==F;)P=P.parentNode;return P},"ascend_to_paragraph_child"),y=E(w,_),N=E(v,A);return _===A?this._attach_comment(_,y,N,e.comment):this._attach_comment_spanning(_,y,A,N,e.comment),true}if(r==="INSERTION"){let[D,w]=s.get_insertion_anchor(i,n);if(!D&&!w)return false;let v=this._track_insert_multiline(e.new_text||"",D,w,l);if(!v.first_node)return false;if(v.first_node.tagName==="w:ins"&&(D?It(v.first_node,D._element):w&&w._element.appendChild(v.first_node)),e.comment){let A=h((E,y)=>{let N=E;for(;N.parentNode&&N.parentNode!==y;)N=N.parentNode;return N},"ascend_to_paragraph_child");if(v.last_p&&v.last_ins){let E=v.first_node;for(;E&&E.tagName!=="w:p";)E=E.parentNode;if(E){let y=v.first_node;v.first_node.tagName==="w:p"&&(y=x(v.first_node,"w:ins")[0]||v.first_node);let N=A(y,E),C=A(v.last_ins,v.last_p);this._attach_comment_spanning(E,N,v.last_p,C,e.comment);}}else {let E=v.first_node;for(;E&&E.tagName!=="w:p";)E=E.parentNode;if(E){let y=v.first_node;v.first_node.tagName==="w:p"&&(y=x(v.first_node,"w:ins")[0]||v.first_node);let N=A(y,E);this._attach_comment(E,N,N,e.comment);}}}return true}let a=s.find_target_runs_by_index(i,o,n),c=s.get_virtual_spans_in_range(i,o);if(a.length===0&&c.length===0)return false;let f=new Set;for(let D of a){let w=D._element.parentNode;for(;w&&w.tagName!=="w:p";)w=w.parentNode;w&&f.add(w);}let p=null,d=null;for(let D of a){let w=this._create_track_change_tag("w:del","",u),v=D._element.cloneNode(true);Array.from(v.getElementsByTagName("w:t")).forEach(A=>{let E=v.ownerDocument.createElement("w:delText");E.textContent=A.textContent,A.hasAttribute("xml:space")&&E.setAttribute("xml:space","preserve"),v.replaceChild(E,A);}),w.appendChild(v),D._element.parentNode?.replaceChild(w,D._element),p===null&&(p=w),d=w;}let g=null,m=null,b=null;if(r==="MODIFICATION"&&e.new_text&&d){let D=d;for(;D&&D.tagName!=="w:p";)D=D.parentNode;let w=D?new Ze(D,null):null,v=a.length>0?a[a.length-1]:null,_=this._track_insert_multiline(e.new_text,v,w,l);_.first_node&&(_.first_node.tagName==="w:ins"?(It(_.first_node,d),g=_.first_node):g=_.last_ins,m=_.last_p,b=_.last_ins);}if(r==="DELETION"||r==="MODIFICATION"){if(r==="MODIFICATION"&&a.length===0&&c.length>0&&e.new_text){let D=c[0];if(D.paragraph){let w=D.paragraph._element,v=x(w,"w:r"),_=v.length>0?new Je(v[v.length-1],D.paragraph):null,A=this._track_insert_multiline(e.new_text,_,D.paragraph,l);A.first_node&&w.appendChild(A.first_node);}}for(let D of [...c].reverse())if(D.paragraph){let w=D.paragraph._element,v=rt(w);for(;v&&v.tagName!=="w:p";)v=rt(v);if(v&&v.tagName==="w:p"){let _=k(w,"w:pPr");_||(_=w.ownerDocument.createElement("w:pPr"),w.insertBefore(_,w.firstChild));let A=k(_,"w:rPr");A||(A=w.ownerDocument.createElement("w:rPr"),_.appendChild(A));let E=this._create_track_change_tag("w:del");A.appendChild(E);let y=Array.from(v.childNodes);for(let N of y)N.nodeType===1&&N.tagName==="w:pPr"||w.appendChild(N);v.parentNode&&v.parentNode.removeChild(v);}}}if(e.comment&&p!==null){let D,w;if(m&&b)D=b,w=m;else {let y=g!==null?g:d;for(D=y,w=y;w&&w.tagName!=="w:p";)w=w.parentNode;}let v=p;for(;v&&v.tagName!=="w:p";)v=v.parentNode;if(!v||!w)return true;let _=h((y,N)=>{let C=y;for(;C.parentNode&&C.parentNode!==N;)C=C.parentNode;return C},"ascend_to_paragraph_child"),A=_(p,v),E=_(D,w);v===w?this._attach_comment(v,A,E,e.comment):this._attach_comment_spanning(v,A,w,E,e.comment);}for(let D of f){let w=false;for(let v of ["w:t","w:tab","w:br"]){let _=x(D,v);for(let A of _){let E=false,y=A.parentNode;for(;y&&y!==D.parentNode;){if(y.tagName==="w:del"){E=true;break}y=y.parentNode;}if(!E){if(v==="w:t"&&!A.textContent)continue;w=true;break}}if(w)break}if(!w){let v=k(D,"w:pPr");v||(v=D.ownerDocument.createElement("w:pPr"),D.insertBefore(v,D.firstChild));let _=k(v,"w:rPr");if(_||(_=D.ownerDocument.createElement("w:rPr"),v.appendChild(_)),!k(_,"w:del")){let A=this._create_track_change_tag("w:del");_.appendChild(A);}}}return true}};function Yu(e,t,n=2){if(e===t)return 0;if(Math.abs(e.length-t.length)>n)return n+1;if(e.length===0)return t.length<=n?t.length:n+1;if(t.length===0)return e.length<=n?e.length:n+1;if(e.length>t.length){let s=e;e=t,t=s;}let r=Array.from({length:e.length+1},(s,i)=>i);for(let s=1;s<=t.length;s++){let i=[s],o=s;for(let u=1;u<=e.length;u++){let l=e[u-1]===t[s-1]?0:1,a=Math.min(r[u]+1,i[u-1]+1,r[u-1]+l);i.push(a),a<o&&(o=a);}if(o>n)return n+1;r=i;}return r[e.length]<=n?r[e.length]:n+1}h(Yu,"boundedLevenshtein");function Qu(e){let t="",n=x(e._element,"w:r");for(let r of n)t+=it(new Je(r,e));return t}h(Qu,"_get_paragraph_text");function Zu(e,t){let n={},r=new Set,s={},i=[],o=/^(?:[\d.\-()a-zA-Z]+\s*)?["“]([A-Z][A-Za-z0-9\s\-&'’]{1,60})["”]/,u=/\([^)]*?["“]([A-Z][A-Za-z0-9\s\-&'’]{1,60})["”][^)]*?\)/g;for(let D of Nr(e)){if(!(D instanceof Ze))continue;let w=Qu(D).trim();if(!w)continue;let v=[],_=w.match(o);_&&v.push(_[1].trim());let A=w.matchAll(u);for(let N of A)v.push(N[1].trim());for(let N of v)n[N]?r.add(N):n[N]={count:0};let E=w.length>60?w.substring(0,60)+"...":w,y=x(D._element,"*");for(let N of y){if(N.tagName==="w:bookmarkStart"){let F=N.getAttribute("w:name");F&&(!F.startsWith("_")||F.startsWith("_Ref"))&&(s[F]||(s[F]={anchored_to:E,referenced_from:[]}));}let C=null;if(N.tagName==="w:fldSimple"){let P=(N.getAttribute("w:instr")||"").trim().split(/\s+/);P.length>1&&P[0]==="REF"&&(C=P[1]);}else if(N.tagName==="w:instrText"){let P=(N.textContent||"").trim().split(/\s+/);P.length>1&&P[0]==="REF"&&(C=P[1]);}C&&i.push([C,E]);}}for(let[D,w]of i)s[D]&&s[D].referenced_from.push(w);let l=[],a=Object.keys(n);if(a.length>0){let D=a.sort((A,E)=>E.length-A.length),w=h(A=>A.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"escapeRegExp"),v=D.map(w).join("|"),_=new RegExp(`(?<!["\u201C])\\b(${v})\\b(?![\u201D"])`,"g");for(let A of t.matchAll(_)){let E=A[1];n[E]&&n[E].count++;}for(let A of a)n[A].count===0&&(delete n[A],r.delete(A));}for(let D of r)l.push(`[Error] Duplicate Definition: '${D}' is defined multiple times.`);let c=new Set(["The","This","That","Such","A","An","Any","All","Some","No","Every","Each","As","In","Of","For","To","On","By","With"]),f=/\b[A-Z][a-zA-Z]*(?:\s+[A-Z][a-zA-Z]*)*\b/g,p=new Set(t.match(f)||[]),d=new Set(Object.keys(n)),g={};for(let D of d){let w=D[0].toLowerCase();g[w]||(g[w]=[]),g[w].push(D);}let m={};for(let D of p){let w=D.trim(),v=w.split(/\s+/);for(;v.length>0;){let E=v[0],y=E.charAt(0).toUpperCase()+E.slice(1).toLowerCase();if(c.has(y))v.shift();else break}if(w=v.join(" "),w.length<4||d.has(w))continue;let _=w[0].toLowerCase(),A=g[_]||[];if(w.length>5)for(let[E,y]of Object.entries(g))E!==_&&(A=A.concat(y));for(let E of A){if(Math.abs(w.length-E.length)>2||w===E+"s"||w===E+"es"||E===w+"s"||E===w+"es")continue;let y=Yu(w,E,2);y===0||y>2||E.length<=5&&(y>1||w[0].toLowerCase()!==E[0].toLowerCase())||(m[E]||(m[E]=[]),m[E].includes(w)||m[E].push(w));}}for(let[D,w]of Object.entries(m)){w.sort();let v=w.map(_=>`'${_}'`).join(", ");l.push(`[Info] Possible Typos for '${D}': Found ${v}`);}function b(D){return D.startsWith("[Error]")?0:D.startsWith("[Warning]")?1:2}return h(b,"diag_sort_key"),l.sort((D,w)=>{let v=b(D),_=b(w);return v!==_?v-_:D.localeCompare(w)}),[n,l,s]}h(Zu,"extract_all_domain_metadata");function Ju(e,t){let[n,r,s]=Zu(e,t),i=[`
44
44
 
45
45
  ---`,"","<!-- READONLY_BOUNDARY_START -->","# Document Structure (Read-Only)","The content below is metadata describing the document's reference structure. Do not include this section in any tracked changes or edits \u2014 it is for your context only and will be discarded on write."],o=false;if(Object.keys(n).length>0){o=true,i.push(`
46
46
  ## Defined Terms`);for(let[u,l]of Object.entries(n))i.push(`- "${u}" \u2014 used ${l.count} times.`);}if(r.length>0){o=true,i.push(`
47
47
  ## Semantic Diagnostics`);for(let u of r)i.push(`- ${u}`);}if(Object.keys(s).length>0){o=true,i.push(`
48
48
  ## Named Anchors`);for(let[u,l]of Object.entries(s)){i.push(`- ${u} \u2192 Anchored to: "${l.anchored_to}"`);for(let a of l.referenced_from)i.push(` - Referenced from: "${a}"`);}}return o?i.join(`
49
- `):""}h(Qu,"build_structural_appendix");async function nn(e,t=false){let n=await tn.load(e);return Zu(n,t)}h(nn,"extractTextFromBuffer");function Zu(e,t=false,n=true){let r=kn(e.pkg),s=[],i=0;for(let u of ms(e)){let l=s.length>0?i+2:i,a=Cr(u,r,t,l);a&&(s.length>0&&(i+=2),s.push(a),i+=a.length);}let o=s.join(`
49
+ `):""}h(Ju,"build_structural_appendix");async function nn(e,t=false){let n=await tn.load(e);return Ku(n,t)}h(nn,"extractTextFromBuffer");function Ku(e,t=false,n=true){let r=kn(e.pkg),s=[],i=0;for(let u of vs(e)){let l=s.length>0?i+2:i,a=Tr(u,r,t,l);a&&(s.length>0&&(i+=2),s.push(a),i+=a.length);}let o=s.join(`
50
50
 
51
- `);if(n){let u=Qu(e,o);u&&(o+=u);}return o}h(Zu,"_extractTextFromDoc");function Cr(e,t,n,r){let s=e.part||e,[i,o]=Mn(s),u=[],l=r,a=true,c=true;if(e.constructor&&e.constructor.name==="NotesPart"){let p=`---
52
- ${e.note_type==="fn"?"## Footnotes":"## Endnotes"}`;u.push(p),l+=p.length,a=false;}for(let f of br(e)){a||(l+=2);let p=l;if(f.constructor.name==="FootnoteItem"){let d=Cr(f,t,n,p);d?(u.push(d),l=p+d.length,a=false):a||(l-=2);}else if(f instanceof Ze){let d=yr(f,i,o);c&&e.constructor.name==="FootnoteItem"&&(d=`[^${e.note_type}-${e.id}]: `+d);let g=Ku(f,t,n,i,o),m=d+g;u.push(m),l=p+m.length,c=false,a=false;}else if(f instanceof Er){let d=Ju(f,t,n,p);d?(u.push(d),l=p+d.length,a=false):a||(l-=2),c=false;}}return u.join(`
51
+ `);if(n){let u=Ju(e,o);u&&(o+=u);}return o}h(Ku,"_extractTextFromDoc");function Tr(e,t,n,r){let s=e.part||e,[i,o]=Mn(s),u=[],l=r,a=true,c=true;if(e.constructor&&e.constructor.name==="NotesPart"){let p=`---
52
+ ${e.note_type==="fn"?"## Footnotes":"## Endnotes"}`;u.push(p),l+=p.length,a=false;}for(let f of Nr(e)){a||(l+=2);let p=l;if(f.constructor.name==="FootnoteItem"){let d=Tr(f,t,n,p);d?(u.push(d),l=p+d.length,a=false):a||(l-=2);}else if(f instanceof Ze){let d=br(f,i,o);c&&e.constructor.name==="FootnoteItem"&&(d=`[^${e.note_type}-${e.id}]: `+d);let g=tl(f,t,n,i,o),m=d+g;u.push(m),l=p+m.length,c=false,a=false;}else if(f instanceof Dr){let d=el(f,t,n,p);d?(u.push(d),l=p+d.length,a=false):a||(l-=2),c=false;}}return u.join(`
53
53
 
54
- `)}h(Cr,"_extract_blocks");function Ju(e,t,n,r){let s=[],i=0,o=r;for(let u of e.rows){let l=[],a=new Set,c=k(u._element,"w:trPr"),f=c?k(c,"w:ins"):null,p=c?k(c,"w:del"):null;if(n&&p)continue;let d=o+(i>0?1:0),m=d+(!n&&f||!n&&p?4:0),b=true;for(let w of u.cells){if(a.has(w))continue;a.add(w),b||(m+=3);let v=Cr(w,t,n,m);l.push(v),m+=v.length,b=false;}let D=l.join(" | ");n||(f?D=`{++ ${D} |Chg:${f.getAttribute("w:id")}++}`:p&&(D=`{-- ${D} |Chg:${p.getAttribute("w:id")}--}`)),s.push(D),o=d+D.length,i++;}return s.join(`
55
- `)}h(Ju,"extract_table");function Ku(e,t,n,r,s){let i=[],o={},u={},l=new Set,a={},c=[],f="",p=["",""],d=["",""],g=Array.from(_s(e)),m=ps(e,r,s),b=Ar(e,r,s),D=m;for(let w=0;w<g.length;w++){let v=g[w];if(v instanceof Je){let[_,A]=ds(v,b),E=it(v);if(n&&Object.keys(u).length>0)continue;if(D){if(!E||!E.trim())continue;D=false;}let y=$u(E,_,A);if(y){let N=n?["",""]:el(o,u,l,a),C=[_,A];if(f&&N[0]===p[0]&&N[1]===p[1]?(C[0]===d[0]&&C[1]===d[1]&&d[0]!==""&&f.endsWith(d[1])&&y.startsWith(C[0])?f=f.slice(0,-d[1].length)+y.slice(C[0].length):f+=y,d=C):(f&&i.push(`${p[0]}${f}${p[1]}`),f=y,p=N,d=C),!n){(Object.keys(o).length>0||Object.keys(u).length>0||l.size>0||Object.keys(a).length>0)&&c.push([{...o},{...u},new Set(l),{...a}]);let P=false;if(Object.keys(o).length>0||Object.keys(u).length>0||Object.keys(a).length>0){let j=w+1,O=false,G=Object.keys(o).length,z=Object.keys(u).length,L=Object.keys(a).length;for(;j<g.length;){let Y=g[j];if(Y instanceof Je){if(!it(Y)){j++;continue}(G>0||z>0||L>0)&&(O=true);break}else {let S=Y;S.type==="ins_start"?G++:S.type==="ins_end"?G=Math.max(0,G-1):S.type==="del_start"?z++:S.type==="del_end"?z=Math.max(0,z-1):S.type==="fmt_start"?L++:S.type==="fmt_end"&&(L=Math.max(0,L-1));}j++;}O&&(P=true);}if(!P&&c.length>0){let j=ts(c,t);j&&(f&&(i.push(`${p[0]}${f}${p[1]}`),f="",p=["",""],d=["",""]),i.push(`{>>${j}<<}`)),c.length=0;}}}}else {let _=v;D=false,["ins_start","ins_end","del_start","del_end","fmt_start","fmt_end"].includes(_.type)||f&&(i.push(`${p[0]}${f}${p[1]}`),f="",p=["",""],d=["",""]),_.type==="start"?l.add(_.id):_.type==="end"?l.delete(_.id):_.type==="ins_start"?o[_.id]=_:_.type==="ins_end"?delete o[_.id]:_.type==="del_start"?u[_.id]=_:_.type==="del_end"?delete u[_.id]:_.type==="fmt_start"?a[_.id]=_:_.type==="fmt_end"?delete a[_.id]:_.type==="footnote"||_.type==="endnote"?(f&&(i.push(`${p[0]}${f}${p[1]}`),f="",p=["",""],d=["",""]),i.push(`[^${_.type==="footnote"?"fn":"en"}-${_.id}]`)):_.type==="hyperlink_start"?(f&&(i.push(`${p[0]}${f}${p[1]}`),f="",p=["",""],d=["",""]),i.push("[")):_.type==="hyperlink_end"?(f&&(i.push(`${p[0]}${f}${p[1]}`),f="",p=["",""],d=["",""]),i.push(`](${_.date})`)):_.type==="xref_start"?(f&&(i.push(`${p[0]}${f}${p[1]}`),f="",p=["",""],d=["",""]),i.push("[~")):_.type==="xref_end"?(f&&(i.push(`${p[0]}${f}${p[1]}`),f="",p=["",""],d=["",""]),i.push(`~](#${_.id})`)):_.type==="bookmark"&&(f&&(i.push(`${p[0]}${f}${p[1]}`),f="",p=["",""],d=["",""]),i.push(`{#${_.id}}`));}}if(f&&i.push(`${p[0]}${f}${p[1]}`),c.length>0){let w=ts(c,t);w&&i.push(`{>>${w}<<}`);}return i.join("")}h(Ku,"build_paragraph_text");function el(e,t,n,r){return Object.keys(t).length>0?["{--","--}"]:Object.keys(e).length>0?["{++","++}"]:n.size>0||Object.keys(r).length>0?["{==","==}"]:["",""]}h(el,"_get_wrappers");function ts(e,t){let n=[],r=[],s=new Set;for(let[o,u,l,a]of e){let c=h(function(d){if(!t[d])return;let g=`Com:${d}`;if(s.has(g))return;let m=t[d],b=`[${g}] ${m.author}`;if(m.date&&(b+=` @ ${m.date}`),m.resolved&&(b+="(RESOLVED)"),r.push(`${b}: ${m.text}`),s.add(g),f[d]){let D=f[d].sort((w,v)=>(t[w]?.date||"").localeCompare(t[v]?.date||""));for(let w of D)c(w);}},"render_comment2");for(let[d,g]of Object.entries(o)){let m=`Chg:${d}`;s.has(m)||(n.push(`[${m} insert] ${g.author||"Unknown"}`),s.add(m));}for(let[d,g]of Object.entries(u)){let m=`Chg:${d}`;s.has(m)||(n.push(`[${m} delete] ${g.author||"Unknown"}`),s.add(m));}for(let[d,g]of Object.entries(a)){let m=`Chg:${d}`;s.has(m)||(n.push(`[${m} format] ${g.author||"Unknown"}`),s.add(m));}let f={};for(let[d,g]of Object.entries(t)){let m=g.parent_id;m&&(f[m]||(f[m]=[]),f[m].push(d));}let p=Array.from(l).sort();for(let d of p)c(d);}return [...n,...r].join(`
56
- `)}h(ts,"_build_merged_meta_block");var tl=class{static{h(this,"SanitizeReport");}filename;mode;author;tracked_changes_found=0;tracked_changes_accepted=0;tracked_changes_kept=0;change_lines=[];comments_removed=0;comments_kept=0;removed_comment_lines=[];kept_comment_lines=[];metadata_lines=[];structural_lines=[];warnings=[];status="clean";blocked_reason=null;constructor(e,t="full",n=null){this.filename=e,this.mode=t,this.author=n;}add_transform_lines(e){for(let t of e){let n=t.toLowerCase();n.includes("tracked change")||n.includes("insertion")||n.includes("deletion")||n.includes("accepted")?this.change_lines.push(t):n.includes("comment")||n.includes("[open]")||n.includes("[resolved]")?n.includes("kept")||n.includes("visible")?this.kept_comment_lines.push(t):this.removed_comment_lines.push(t):n.includes("author")||n.includes("template")||n.includes("company")||n.includes("manager")||n.includes("metadata")||n.includes("timestamp")||n.includes("custom xml")||n.includes("last modified by")||n.includes("revision count")||n.includes("last printed")?this.metadata_lines.push(t):n.includes("hyperlink")||n.includes("warning")?this.warnings.push(t):this.structural_lines.push(t);}}render(){let e="\u2550".repeat(50),t=[e,`Finalization Report: ${this.filename}`],n=[];if(this.mode==="keep-markup"&&n.push("--keep-markup"),this.author&&n.push(`--author "${this.author}"`),this.tracked_changes_accepted>0&&n.push("--accept-all"),n.length>0&&t.push(n.join(" ")),t.push(e),this.status==="blocked")return t.push(""),t.push(`BLOCKED: ${this.blocked_reason}`),t.push(e),t.join(`
54
+ `)}h(Tr,"_extract_blocks");function el(e,t,n,r){let s=[],i=0,o=r;for(let u of e.rows){let l=[],a=new Set,c=k(u._element,"w:trPr"),f=c?k(c,"w:ins"):null,p=c?k(c,"w:del"):null;if(n&&p)continue;let d=o+(i>0?1:0),m=d+(!n&&f||!n&&p?4:0),b=true;for(let w of u.cells){if(a.has(w))continue;a.add(w),b||(m+=3);let v=Tr(w,t,n,m);l.push(v),m+=v.length,b=false;}let D=l.join(" | ");n||(f?D=`{++ ${D} |Chg:${f.getAttribute("w:id")}++}`:p&&(D=`{-- ${D} |Chg:${p.getAttribute("w:id")}--}`)),s.push(D),o=d+D.length,i++;}return s.join(`
55
+ `)}h(el,"extract_table");function tl(e,t,n,r,s){let i=[],o={},u={},l=new Set,a={},c=[],f="",p=["",""],d=["",""],g=Array.from(Es(e)),m=gs(e,r,s),b=yr(e,r,s),D=m;for(let w=0;w<g.length;w++){let v=g[w];if(v instanceof Je){let[_,A]=_s(v,b),E=it(v);if(n&&Object.keys(u).length>0)continue;if(D){if(!E||!E.trim())continue;D=false;}let y=qu(E,_,A);if(y){let N=n?["",""]:nl(o,u,l,a),C=[_,A];if(f&&N[0]===p[0]&&N[1]===p[1]?(C[0]===d[0]&&C[1]===d[1]&&d[0]!==""&&f.endsWith(d[1])&&y.startsWith(C[0])?f=f.slice(0,-d[1].length)+y.slice(C[0].length):f+=y,d=C):(f&&i.push(`${p[0]}${f}${p[1]}`),f=y,p=N,d=C),!n){(Object.keys(o).length>0||Object.keys(u).length>0||l.size>0||Object.keys(a).length>0)&&c.push([{...o},{...u},new Set(l),{...a}]);let P=false;if(Object.keys(o).length>0||Object.keys(u).length>0||Object.keys(a).length>0){let j=w+1,O=false,G=Object.keys(o).length,z=Object.keys(u).length,L=Object.keys(a).length;for(;j<g.length;){let Y=g[j];if(Y instanceof Je){if(!it(Y)){j++;continue}(G>0||z>0||L>0)&&(O=true);break}else {let S=Y;S.type==="ins_start"?G++:S.type==="ins_end"?G=Math.max(0,G-1):S.type==="del_start"?z++:S.type==="del_end"?z=Math.max(0,z-1):S.type==="fmt_start"?L++:S.type==="fmt_end"&&(L=Math.max(0,L-1));}j++;}O&&(P=true);}if(!P&&c.length>0){let j=is(c,t);j&&(f&&(i.push(`${p[0]}${f}${p[1]}`),f="",p=["",""],d=["",""]),i.push(`{>>${j}<<}`)),c.length=0;}}}}else {let _=v;D=false,["ins_start","ins_end","del_start","del_end","fmt_start","fmt_end"].includes(_.type)||f&&(i.push(`${p[0]}${f}${p[1]}`),f="",p=["",""],d=["",""]),_.type==="start"?l.add(_.id):_.type==="end"?l.delete(_.id):_.type==="ins_start"?o[_.id]=_:_.type==="ins_end"?delete o[_.id]:_.type==="del_start"?u[_.id]=_:_.type==="del_end"?delete u[_.id]:_.type==="fmt_start"?a[_.id]=_:_.type==="fmt_end"?delete a[_.id]:_.type==="footnote"||_.type==="endnote"?(f&&(i.push(`${p[0]}${f}${p[1]}`),f="",p=["",""],d=["",""]),i.push(`[^${_.type==="footnote"?"fn":"en"}-${_.id}]`)):_.type==="hyperlink_start"?(f&&(i.push(`${p[0]}${f}${p[1]}`),f="",p=["",""],d=["",""]),i.push("[")):_.type==="hyperlink_end"?(f&&(i.push(`${p[0]}${f}${p[1]}`),f="",p=["",""],d=["",""]),i.push(`](${_.date})`)):_.type==="xref_start"?(f&&(i.push(`${p[0]}${f}${p[1]}`),f="",p=["",""],d=["",""]),i.push("[~")):_.type==="xref_end"?(f&&(i.push(`${p[0]}${f}${p[1]}`),f="",p=["",""],d=["",""]),i.push(`~](#${_.id})`)):_.type==="bookmark"&&(f&&(i.push(`${p[0]}${f}${p[1]}`),f="",p=["",""],d=["",""]),i.push(`{#${_.id}}`));}}if(f&&i.push(`${p[0]}${f}${p[1]}`),c.length>0){let w=is(c,t);w&&i.push(`{>>${w}<<}`);}return i.join("")}h(tl,"build_paragraph_text");function nl(e,t,n,r){return Object.keys(t).length>0?["{--","--}"]:Object.keys(e).length>0?["{++","++}"]:n.size>0||Object.keys(r).length>0?["{==","==}"]:["",""]}h(nl,"_get_wrappers");function is(e,t){let n=[],r=[],s=new Set;for(let[o,u,l,a]of e){let c=h(function(d){if(!t[d])return;let g=`Com:${d}`;if(s.has(g))return;let m=t[d],b=`[${g}] ${m.author}`;if(m.date&&(b+=` @ ${m.date}`),m.resolved&&(b+="(RESOLVED)"),r.push(`${b}: ${m.text}`),s.add(g),f[d]){let D=f[d].sort((w,v)=>(t[w]?.date||"").localeCompare(t[v]?.date||""));for(let w of D)c(w);}},"render_comment2");for(let[d,g]of Object.entries(o)){let m=`Chg:${d}`;s.has(m)||(n.push(`[${m} insert] ${g.author||"Unknown"}`),s.add(m));}for(let[d,g]of Object.entries(u)){let m=`Chg:${d}`;s.has(m)||(n.push(`[${m} delete] ${g.author||"Unknown"}`),s.add(m));}for(let[d,g]of Object.entries(a)){let m=`Chg:${d}`;s.has(m)||(n.push(`[${m} format] ${g.author||"Unknown"}`),s.add(m));}let f={};for(let[d,g]of Object.entries(t)){let m=g.parent_id;m&&(f[m]||(f[m]=[]),f[m].push(d));}let p=Array.from(l).sort();for(let d of p)c(d);}return [...n,...r].join(`
56
+ `)}h(is,"_build_merged_meta_block");var rl=class{static{h(this,"SanitizeReport");}filename;mode;author;tracked_changes_found=0;tracked_changes_accepted=0;tracked_changes_kept=0;change_lines=[];comments_removed=0;comments_kept=0;removed_comment_lines=[];kept_comment_lines=[];metadata_lines=[];structural_lines=[];warnings=[];status="clean";blocked_reason=null;constructor(e,t="full",n=null){this.filename=e,this.mode=t,this.author=n;}add_transform_lines(e){for(let t of e){let n=t.toLowerCase();n.includes("tracked change")||n.includes("insertion")||n.includes("deletion")||n.includes("accepted")?this.change_lines.push(t):n.includes("comment")||n.includes("[open]")||n.includes("[resolved]")?n.includes("kept")||n.includes("visible")?this.kept_comment_lines.push(t):this.removed_comment_lines.push(t):n.includes("author")||n.includes("template")||n.includes("company")||n.includes("manager")||n.includes("metadata")||n.includes("timestamp")||n.includes("custom xml")||n.includes("last modified by")||n.includes("revision count")||n.includes("last printed")?this.metadata_lines.push(t):n.includes("hyperlink")||n.includes("warning")?this.warnings.push(t):this.structural_lines.push(t);}}render(){let e="\u2550".repeat(50),t=[e,`Finalization Report: ${this.filename}`],n=[];if(this.mode==="keep-markup"&&n.push("--keep-markup"),this.author&&n.push(`--author "${this.author}"`),this.tracked_changes_accepted>0&&n.push("--accept-all"),n.length>0&&t.push(n.join(" ")),t.push(e),this.status==="blocked")return t.push(""),t.push(`BLOCKED: ${this.blocked_reason}`),t.push(e),t.join(`
57
57
  `);if(this.mode==="keep-markup"&&(this.tracked_changes_kept>0||this.comments_kept>0)){if(t.push(""),t.push("VISIBLE TO COUNTERPARTY"),this.tracked_changes_kept>0&&t.push(` Tracked changes: ${this.tracked_changes_kept}`),this.comments_kept>0){t.push(` Open comments: ${this.comments_kept}`);for(let r of this.kept_comment_lines)t.push(` ${r}`);}this.author&&t.push(` Author on all markup: "${this.author}"`);}if(this.change_lines.length>0){t.push(""),t.push("TRACKED CHANGES");for(let r of this.change_lines)t.push(` ${r}`);}if(this.removed_comment_lines.length>0){t.push(""),t.push("COMMENTS (stripped)");for(let r of this.removed_comment_lines)t.push(` ${r}`);}if(this.metadata_lines.length>0){t.push(""),t.push("METADATA");for(let r of this.metadata_lines)t.push(` ${r}`);}if(this.structural_lines.length>0){t.push(""),t.push("STRUCTURAL & PROTECTION");for(let r of this.structural_lines)t.push(` ${r}`);}if(this.warnings.length>0){t.push(""),t.push("WARNINGS");for(let r of this.warnings)t.push(` \u26A0 ${r}`);}return t.push(""),t.push(e),this.warnings.length>0?t.push(`Result: CLEAN WITH WARNINGS (${this.warnings.length} warning${this.warnings.length>1?"s":""})`):t.push(`Result: CLEAN (${this.tracked_changes_found} changes resolved, ${this.comments_removed} comments removed)`),t.push(e),t.join(`
58
- `)}};function Qe(e,t){let n=[],r=e.getElementsByTagName("*");for(let s=0;s<r.length;s++){let i=r[s].tagName;(i===t||i.endsWith(":"+t))&&n.push(r[s]);}return n}h(Qe,"findDescendantsByLocalName");function nl(e){let t=0;function n(o,u){let l=o?o.toString():"",a=u?u.toString():"";return l===a}h(n,"areRunsIdentical");function r(o){let u=["w:t","w:tab","w:br","w:cr","w:delText","w:rPr"];for(let l=0;l<o.childNodes.length;l++){let a=o.childNodes[l];if(a.nodeType===1){let c=a.tagName;if(!u.includes(c))return true}}return false}h(r,"hasSpecialContent");function s(o){let u=Array.from(o.childNodes).filter(a=>a.nodeType===1),l=0;for(;l<u.length-1;){let a=u[l],c=u[l+1];if(a.tagName==="w:r"&&c.tagName==="w:r"&&!r(a)&&!r(c)){let f=k(a,"w:rPr"),p=k(c,"w:rPr");if(n(f,p)){let d=null;for(let m=0;m<a.childNodes.length;m++){let b=a.childNodes[m];b.nodeType===1&&(b.tagName==="w:t"||b.tagName==="w:delText")&&(d=b);}let g=Array.from(c.childNodes).filter(m=>m.nodeType===1);for(let m of g)if(m.tagName!=="w:rPr")if((m.tagName==="w:t"||m.tagName==="w:delText")&&d&&d.tagName===m.tagName){let b=d.textContent||"",D=m.textContent||"",w=b+D;d.textContent=w,w.trim()!==w&&d.setAttribute("xml:space","preserve");}else a.appendChild(m),(m.tagName==="w:t"||m.tagName==="w:delText")&&(d=m);o.removeChild(c),u.splice(l+1,1),t++;continue}}["w:ins","w:del","w:hyperlink","w:sdt","w:smartTag","w:fldSimple","w:sdtContent"].includes(a.tagName)&&s(a),l++;}if(u.length>0){let a=u[u.length-1];["w:ins","w:del","w:hyperlink","w:sdt","w:smartTag","w:fldSimple","w:sdtContent"].includes(a.tagName)&&s(a);}}h(s,"coalesceContainer");let i=x(e.element,"w:p");for(let o of i)s(o);return t?[`Adjacent identical runs coalesced: ${t}`]:[]}h(nl,"coalesce_runs");function rl(e){let t=0,n=["w:rsidR","w:rsidRPr","w:rsidRDefault","w:rsidP","w:rsidDel","w:rsidSect","w:rsidTr"],r=e.element.getElementsByTagName("*");for(let i=0;i<r.length;i++)for(let o of n)r[i].hasAttribute(o)&&(r[i].removeAttribute(o),t++);let s=x(e.element,"w:rsids");for(let i of s)i.parentNode&&(i.parentNode.removeChild(i),t++);return t?[`rsid attributes: ${t} removed`]:[]}h(rl,"strip_rsid");function il(e){let t=0,n=["w14:paraId","w14:textId"],r=e.element.getElementsByTagName("*");for(let s=0;s<r.length;s++)for(let i of n)r[s].hasAttribute(i)&&(r[s].removeAttribute(i),t++);return t?[`Paragraph/text IDs: ${t} removed`]:[]}h(il,"strip_para_ids");function sl(e){let t=x(e.element,"w:proofErr");return t.forEach(n=>n.parentNode?.removeChild(n)),t.length?[`Spell check markers: ${t.length} removed`]:[]}h(sl,"strip_proof_errors");function ol(e){let t=0;for(let n of ["w:rPr","w:pPr"]){let r=x(e.element,n);for(let s of r)(s.childNodes.length===0||s.childNodes.length===1&&s.childNodes[0].nodeType===3&&!s.childNodes[0].textContent?.trim())&&(s.parentNode?.removeChild(s),t++);}return t?[`Empty property elements: ${t} removed`]:[]}h(ol,"strip_empty_properties");function al(e){let t=0,n=x(e.element,"w:rPr");for(let r of n)if(k(r,"w:vanish")||k(r,"w:webHidden")){let s=r.parentNode;s&&s.tagName==="w:r"&&s.parentNode&&(s.parentNode.removeChild(s),t++);}return t?[`Hidden text runs: ${t} removed`]:[]}h(al,"strip_hidden_text");function ns(e){let t=x(e.element,"w:ins").length,n=x(e.element,"w:del").length,r=x(e.element,"w:rPrChange").length+x(e.element,"w:pPrChange").length+x(e.element,"w:sectPrChange").length;return [t,n,r]}h(ns,"count_tracked_changes");function ul(e){let t=new Set;for(let n of ["w:ins","w:del","w:rPrChange","w:pPrChange","w:sectPrChange"])for(let r of x(e.element,n)){let s=r.getAttribute("w:author");s&&t.add(s);}return t}h(ul,"get_track_change_authors");function rs(e){let t=[],n=x(e,"w:t");for(let s of n)s.textContent&&t.push(s.textContent);let r=x(e,"w:delText");for(let s of r)s.textContent&&t.push(s.textContent);return t.join("")}h(rs,"_getElementText");function Sn(e,t=60){let n=e.replace(/\n/g," ").trim();return n.length<=t?n:n.substring(0,t-3)+"..."}h(Sn,"_truncate");function ll(e){let t=[],n=x(e.element,"w:ins"),r=x(e.element,"w:del");for(let o of n){let u=rs(o).trim();u&&t.push(` Accepted insertion: "${Sn(u,60)}"`);}for(let o of r){let u=rs(o).trim();u&&t.push(` Accepted deletion of: "${Sn(u,60)}"`);}new Nr(e).accept_all_revisions();for(let o of ["w:rPrChange","w:pPrChange","w:sectPrChange"])for(let u of x(e.element,o))u.parentNode?.removeChild(u);let i=n.length+r.length;return i?[`Tracked changes auto-accepted: ${i}`].concat(t):[]}h(ll,"accept_all_tracked_changes");function cl(e){let t=kn(e.pkg),n=[],r=0,s=0;for(let[i,o]of Object.entries(t))o.resolved?s++:r++,n.push({id:i,...o});return {total:n.length,open:r,resolved:s,comments:n}}h(cl,"get_comments_summary");function fl(e){let t=kn(e.pkg),n=Object.keys(t);if(n.length===0)return [];let r=[],s=new Pn(e);for(let[u,l]of Object.entries(t)){let a=l.resolved?"[Resolved]":"[Open]";r.push(` ${a} "${Sn(l.text||"",60)}" (${l.author||"Unknown"})`),s.deleteComment(u);}for(let u of ["w:commentRangeStart","w:commentRangeEnd","w:commentReference"])for(let l of x(e.element,u))l.parentNode?.removeChild(l);let i=Object.values(t).filter(u=>u.resolved).length,o=Object.values(t).filter(u=>!u.resolved).length;return [`Comments removed: ${n.length} (${i} resolved, ${o} open)`].concat(r)}h(fl,"remove_all_comments");function hl(e,t){let n=new Pn(e);if(!n.commentsPart)return [];let r=new Set,s=x(n.commentsPart._element,"w:comment");for(let i of s){let o=i.getAttribute("w:author");if(o&&(r.add(o),i.setAttribute("w:author",t)),i.hasAttribute("w:initials")){let u=t.split(" ").filter(Boolean).map(l=>l[0]).join("").toUpperCase();i.setAttribute("w:initials",u);}}return r.size?[`Comment authors replaced: ${Array.from(r).sort().join(", ")} \u2192 "${t}"`]:[]}h(hl,"replace_comment_authors");function pl(e,t){let n=new Set;for(let r of ["w:ins","w:del","w:rPrChange","w:pPrChange"])for(let s of x(e.element,r)){let i=s.getAttribute("w:author");i&&(n.add(i),s.setAttribute("w:author",t));}return n.size?[`Track change authors replaced: ${Array.from(n).sort().join(", ")} \u2192 "${t}"`]:[]}h(pl,"replace_change_authors");function dl(e){let t=0,n="2025-01-01T00:00:00Z";for(let r of ["w:ins","w:del","w:rPrChange","w:pPrChange"])for(let s of x(e.element,r))s.hasAttribute("w:date")&&(s.setAttribute("w:date",n),t++);return t?[`Track change timestamps: ${t} normalized`]:[]}h(dl,"normalize_change_dates");function ml(e){let t=[],n=e.pkg.getPartByPath("docProps/core.xml");n&&(Qe(n._element,"creator").forEach(u=>{u.textContent&&(t.push(`Author: ${u.textContent}`),u.textContent="");}),Qe(n._element,"lastModifiedBy").forEach(u=>{u.textContent&&(t.push(`Last modified by: ${u.textContent}`),u.textContent="");}),Qe(n._element,"revision").forEach(u=>{u.textContent&&parseInt(u.textContent)>1&&(t.push(`Revision count: ${u.textContent} \u2192 1`),u.textContent="1");}));let r=e.pkg.getPartByPath("docProps/app.xml");if(r){let s=r._element,i=["TotalTime","Words","Characters","Paragraphs","Lines","CharactersWithSpaces"];for(let u of i)Qe(s,u).forEach(l=>{l.textContent&&l.textContent!=="0"&&(u==="TotalTime"&&t.push(`Total editing time: ${l.textContent} minutes`),l.textContent="0");});let o=["Template","Manager","Company"];for(let u of o)Qe(s,u).forEach(l=>{l.textContent&&(t.push(`${u}: ${l.textContent}`),l.textContent="");});}return t.length?["Metadata scrubbed:",...t.map(s=>` ${s}`)]:[]}h(ml,"scrub_doc_properties");function gl(e){let t=false,n="1970-01-01T00:00:00Z",r=e.pkg.getPartByPath("docProps/core.xml");if(r)for(let s of ["created","modified","lastPrinted"])Qe(r._element,s).forEach(i=>{i.textContent&&i.textContent!==n&&(i.textContent=n,t=true);});return t?["Timestamps normalized to epoch"]:[]}h(gl,"scrub_timestamps");function _l(e){let t=e.pkg.parts.filter(o=>o.partname.includes("/customXml"));if(t.length===0)return [];let n=new Set(t.map(o=>o.partname));e.pkg.parts=e.pkg.parts.filter(o=>!n.has(o.partname));let r=h(o=>{let u=[];for(let l of x(o._element,"Relationship")){let a=l.getAttribute("Target");a&&a.includes("customXml")&&u.push(l);}u.forEach(l=>l.parentNode?.removeChild(l));},"removeRelationsTo"),s=e.pkg.getPartByPath("_rels/.rels");s&&r(s);let i=e.pkg.getOrCreateRelsPart(e.part.partname);i&&r(i);for(let o of x(e.element,"w:sdtPr"))ru(o,"w:dataBinding").forEach(u=>o.removeChild(u));return [`Custom XML parts: ${t.length} removed`]}h(_l,"strip_custom_xml");function vl(e){let t=0;for(let n of Qe(e.element,"docPr")){let r=n.getAttribute("descr");if(r){let s=r.length<10,i=r.includes(".")&&r.length<60;(s||i)&&(n.removeAttribute("descr"),t++);}}return t?[`Image alt text: ${t} auto-generated descriptions removed`]:[]}h(vl,"strip_image_alt_text");function wl(e){let t=["sharepoint.com","onedrive.com",".internal","intranet","localhost","10.","192.168.","172.16."],n=[],r=e.pkg.getOrCreateRelsPart(e.part.partname);for(let s of x(r._element,"Relationship"))if(s.getAttribute("TargetMode")==="External"){let i=s.getAttribute("Target")||"";for(let o of t)if(i.toLowerCase().includes(o.toLowerCase())){n.push(`Hyperlink targets internal URL: ${Sn(i,80)}`);break}}return n}h(wl,"audit_hyperlinks");async function Ds(e,t){let n=new tl(t.filename,t.sanitize_mode||"full",t.author||null);if(t.sanitize_mode==="full"){let i=ns(e),o=i[0]+i[1]+i[2];if(n.tracked_changes_found=o,o>0&&!t.accept_all)return n.status="blocked",n.blocked_reason=`Document contains ${o} unresolved tracked changes (${i[0]} insertions, ${i[1]} deletions, ${i[2]} formatting). Review in Word first, or set accept_all=true.`,{reportText:n.render()};if(o>0){let l=ul(e);l.size>1&&n.warnings.push(`Multiple authors detected in tracked changes: ${Array.from(l).sort().join(", ")}. Review per-change list before sending.`),n.add_transform_lines(ll(e)),n.tracked_changes_accepted=o;}let u=cl(e);n.comments_removed=u.total,n.add_transform_lines(fl(e));}else if(t.sanitize_mode==="keep-markup"){let i=ns(e);n.tracked_changes_found=i[0]+i[1]+i[2],n.tracked_changes_kept=n.tracked_changes_found,t.author&&(n.add_transform_lines(hl(e,t.author)),n.add_transform_lines(pl(e,t.author)));}n.add_transform_lines(rl(e)),n.add_transform_lines(il(e)),n.add_transform_lines(sl(e)),n.add_transform_lines(ol(e)),n.add_transform_lines(al(e)),n.add_transform_lines(nl(e)),n.add_transform_lines(ml(e)),n.add_transform_lines(gl(e)),n.add_transform_lines(_l(e)),n.add_transform_lines(vl(e));let r=wl(e);for(let i of r)n.warnings.push(i);if(n.add_transform_lines(dl(e)),t.protection_mode==="read_only"||t.protection_mode==="encrypt"){t.protection_mode==="encrypt"&&n.warnings.push("Encryption mode (AES compound wrappers) is strictly unsupported in the zero-dependency Node engine. Falling back to native Word Read-Only lock.");let i=e.pkg.getPartByPath("word/settings.xml");if(i){let o=i._element.ownerDocument,u=Qe(i._element,"documentProtection")[0];u||(u=o.createElement("w:documentProtection"),i._element.appendChild(u)),u.setAttribute("w:edit","readOnly"),u.setAttribute("w:enforcement","1"),n.structural_lines.push("Document locked (Read-Only enforcement injected into settings.xml)");}}t.export_pdf&&n.warnings.push("PDF export requires the Python/Word COM environment and is skipped in this zero-dependency Node agent.");for(let i of e.pkg.parts)if((i===e.part||i.contentType.includes("wordprocessingml")&&i.contentType.endsWith("+xml"))&&i._element.hasAttribute("xmlns:w16du")){let o=false;if(Array.from(i._element.attributes||[]).some(u=>u.name.startsWith("w16du:")&&u.name!=="xmlns:w16du")&&(o=true),!o){let u=x(i._element,"*");for(let l of u)if(l.tagName.startsWith("w16du:")||Array.from(l.attributes||[]).some(a=>a.name.startsWith("w16du:"))){o=true;break}}o||i._element.removeAttribute("xmlns:w16du");}n.warnings.length>0&&(n.status="clean_with_warnings");let s=await e.save();return {reportText:n.render(),outBuffer:s}}h(Ds,"finalize_document");var Rn="application/vnd.openxmlformats-officedocument.wordprocessingml.document";function As(e,t){return t.split(".").reduce((n,r)=>{if(n&&typeof n=="object")return n[r]},e)}h(As,"getNestedProperty");async function qe(e,t){let n=this.getInputData()[e];if(!n.binary||!n.binary[t])throw new n8nWorkflow.NodeOperationError(this.getNode(),`No binary data found on property "${t}"`,{description:"Verify that the upstream node produced binary data and that the property name matches.",itemIndex:e});let r=n.binary[t],s=await this.helpers.getBinaryDataBuffer(e,t),i=r.fileName??"document.docx";return {buffer:s,fileName:i}}h(qe,"getDocxBuffer");function Bn(e,t){let n=e.lastIndexOf(".");return `${n===-1?e:e.substring(0,n)}_${t}.docx`}h(Bn,"buildOutputFileName");function ys(e,t,n){if(e==null||e==="")throw new n8nWorkflow.NodeOperationError(this.getNode(),`Parameter "${n}" is empty`,{description:`Provide a JSON value for "${n}".`,itemIndex:t});if(typeof e=="object")return e;try{return JSON.parse(e)}catch(r){throw new n8nWorkflow.NodeOperationError(this.getNode(),`Parameter "${n}" is not valid JSON`,{description:r.message,itemIndex:t})}}h(ys,"parseJsonParameter");function bs(e){let t=e.message??"Unknown error",n=e.name??"",r=e.errors,s=Array.isArray(r)?r.join(`
59
- `):t,i=s.toLowerCase();return n==="BatchValidationError"?i.includes("target text not found")?new n8nWorkflow.NodeApiError(this.getNode(),{message:s},{message:"An edit could not be applied: target text not found.",description:"Verify the exact `target_text` string \u2014 including punctuation and whitespace \u2014 against the document. Use the Extract Markdown operation to inspect what the engine sees."}):i.includes("ambiguous match")?new n8nWorkflow.NodeApiError(this.getNode(),{message:s},{message:"An edit matched multiple locations in the document.",description:"Provide more surrounding context in `target_text` to uniquely identify the location."}):i.includes("read-only")||i.includes("readonly")?new n8nWorkflow.NodeApiError(this.getNode(),{message:s},{message:"An edit targeted a read-only structural element.",description:"Cross-references, internal anchors, hyperlinks, and the Structural Appendix cannot be modified via text replacement. Restrict edits to the document body."}):i.includes("another author")||i.includes("nested")?new n8nWorkflow.NodeApiError(this.getNode(),{message:s},{message:"An edit overlaps with a pending tracked change by another author.",description:"Accept or reject the conflicting change first, or scope your edit outside of it."}):new n8nWorkflow.NodeApiError(this.getNode(),{message:s},{message:"Batch validation failed.",description:s}):i.includes("invalid docx")||i.includes("missing word/document.xml")?new n8nWorkflow.NodeApiError(this.getNode(),{message:t},{message:"The document could not be opened.",description:"Verify the input binary is a valid .docx file (not .doc, .pdf, or another format)."}):new n8nWorkflow.NodeApiError(this.getNode(),{message:t},{message:"Adeu engine error.",description:t})}h(bs,"mapAdeuErrorToNodeApiError");var Ns=[{displayName:"Input Binary Property",name:"binaryPropertyName",type:"string",default:"data",required:true,placeholder:"e.g. data",description:"Name of the binary property on the incoming item that holds the .docx file",displayOptions:{show:{resource:["document"],operation:["extractMarkdown"]}}},{displayName:"Clean View",name:"cleanView",type:"boolean",default:false,description:'Whether to project the document as if all tracked changes were accepted (simulates the "Accept All" state)',displayOptions:{show:{resource:["document"],operation:["extractMarkdown"]}}}];async function Cs(e){let t=this.getNodeParameter("binaryPropertyName",e),n=this.getNodeParameter("cleanView",e),{buffer:r,fileName:s}=await qe.call(this,e,t),i=await nn(r,n);return [{json:{fileName:s,cleanView:n,markdown:i},pairedItem:{item:e}}]}h(Cs,"executeExtractMarkdown");var Ts=[{displayName:"Input Binary Property",name:"binaryPropertyName",type:"string",default:"data",required:true,placeholder:"e.g. data",description:"Name of the binary property on the incoming item that holds the .docx file",displayOptions:{show:{resource:["document"],operation:["applyEdits"]}}},{displayName:"Output Binary Property",name:"outputBinaryPropertyName",type:"string",default:"data",required:true,placeholder:"e.g. data",description:"Name of the binary property on the outgoing item that will hold the redlined .docx file",displayOptions:{show:{resource:["document"],operation:["applyEdits"]}}},{displayName:"Author",name:"author",type:"string",default:"Adeu AI",placeholder:"e.g. AI Reviewer",description:"Author name attached to all tracked changes and comments produced by this operation",displayOptions:{show:{resource:["document"],operation:["applyEdits"]}}},{displayName:"Edits Source",name:"editsSource",type:"options",noDataExpression:true,default:"fromInputJson",description:"Where to read the list of changes from",options:[{name:"From Input JSON",value:"fromInputJson",description:"Read the changes array from the incoming item JSON"},{name:"Define Below",value:"defineBelow",description:"Provide a JSON literal directly in this node"}],displayOptions:{show:{resource:["document"],operation:["applyEdits"]}}},{displayName:"JSON Path on Input Item",name:"editsJsonPath",type:"string",default:"changes",required:true,placeholder:"e.g. data.changes",description:"Property path (dot-notation supported) on the input item JSON whose value is the array of DocumentChange objects",displayOptions:{show:{resource:["document"],operation:["applyEdits"],editsSource:["fromInputJson"]}}},{displayName:"Changes (JSON)",name:"editsJson",type:"json",default:`[
58
+ `)}};function Qe(e,t){let n=[],r=e.getElementsByTagName("*");for(let s=0;s<r.length;s++){let i=r[s].tagName;(i===t||i.endsWith(":"+t))&&n.push(r[s]);}return n}h(Qe,"findDescendantsByLocalName");function il(e){let t=0;function n(o,u){let l=o?o.toString():"",a=u?u.toString():"";return l===a}h(n,"areRunsIdentical");function r(o){let u=["w:t","w:tab","w:br","w:cr","w:delText","w:rPr"];for(let l=0;l<o.childNodes.length;l++){let a=o.childNodes[l];if(a.nodeType===1){let c=a.tagName;if(!u.includes(c))return true}}return false}h(r,"hasSpecialContent");function s(o){let u=Array.from(o.childNodes).filter(a=>a.nodeType===1),l=0;for(;l<u.length-1;){let a=u[l],c=u[l+1];if(a.tagName==="w:r"&&c.tagName==="w:r"&&!r(a)&&!r(c)){let f=k(a,"w:rPr"),p=k(c,"w:rPr");if(n(f,p)){let d=null;for(let m=0;m<a.childNodes.length;m++){let b=a.childNodes[m];b.nodeType===1&&(b.tagName==="w:t"||b.tagName==="w:delText")&&(d=b);}let g=Array.from(c.childNodes).filter(m=>m.nodeType===1);for(let m of g)if(m.tagName!=="w:rPr")if((m.tagName==="w:t"||m.tagName==="w:delText")&&d&&d.tagName===m.tagName){let b=d.textContent||"",D=m.textContent||"",w=b+D;d.textContent=w,w.trim()!==w&&d.setAttribute("xml:space","preserve");}else a.appendChild(m),(m.tagName==="w:t"||m.tagName==="w:delText")&&(d=m);o.removeChild(c),u.splice(l+1,1),t++;continue}}["w:ins","w:del","w:hyperlink","w:sdt","w:smartTag","w:fldSimple","w:sdtContent"].includes(a.tagName)&&s(a),l++;}if(u.length>0){let a=u[u.length-1];["w:ins","w:del","w:hyperlink","w:sdt","w:smartTag","w:fldSimple","w:sdtContent"].includes(a.tagName)&&s(a);}}h(s,"coalesceContainer");let i=x(e.element,"w:p");for(let o of i)s(o);return t?[`Adjacent identical runs coalesced: ${t}`]:[]}h(il,"coalesce_runs");function sl(e){let t=0,n=["w:rsidR","w:rsidRPr","w:rsidRDefault","w:rsidP","w:rsidDel","w:rsidSect","w:rsidTr"],r=e.element.getElementsByTagName("*");for(let i=0;i<r.length;i++)for(let o of n)r[i].hasAttribute(o)&&(r[i].removeAttribute(o),t++);let s=x(e.element,"w:rsids");for(let i of s)i.parentNode&&(i.parentNode.removeChild(i),t++);return t?[`rsid attributes: ${t} removed`]:[]}h(sl,"strip_rsid");function ol(e){let t=0,n=["w14:paraId","w14:textId"],r=e.element.getElementsByTagName("*");for(let s=0;s<r.length;s++)for(let i of n)r[s].hasAttribute(i)&&(r[s].removeAttribute(i),t++);return t?[`Paragraph/text IDs: ${t} removed`]:[]}h(ol,"strip_para_ids");function al(e){let t=x(e.element,"w:proofErr");return t.forEach(n=>n.parentNode?.removeChild(n)),t.length?[`Spell check markers: ${t.length} removed`]:[]}h(al,"strip_proof_errors");function ul(e){let t=0;for(let n of ["w:rPr","w:pPr"]){let r=x(e.element,n);for(let s of r)(s.childNodes.length===0||s.childNodes.length===1&&s.childNodes[0].nodeType===3&&!s.childNodes[0].textContent?.trim())&&(s.parentNode?.removeChild(s),t++);}return t?[`Empty property elements: ${t} removed`]:[]}h(ul,"strip_empty_properties");function ll(e){let t=0,n=x(e.element,"w:rPr");for(let r of n)if(k(r,"w:vanish")||k(r,"w:webHidden")){let s=r.parentNode;s&&s.tagName==="w:r"&&s.parentNode&&(s.parentNode.removeChild(s),t++);}return t?[`Hidden text runs: ${t} removed`]:[]}h(ll,"strip_hidden_text");function ss(e){let t=x(e.element,"w:ins").length,n=x(e.element,"w:del").length,r=x(e.element,"w:rPrChange").length+x(e.element,"w:pPrChange").length+x(e.element,"w:sectPrChange").length;return [t,n,r]}h(ss,"count_tracked_changes");function cl(e){let t=new Set;for(let n of ["w:ins","w:del","w:rPrChange","w:pPrChange","w:sectPrChange"])for(let r of x(e.element,n)){let s=r.getAttribute("w:author");s&&t.add(s);}return t}h(cl,"get_track_change_authors");function os(e){let t=[],n=x(e,"w:t");for(let s of n)s.textContent&&t.push(s.textContent);let r=x(e,"w:delText");for(let s of r)s.textContent&&t.push(s.textContent);return t.join("")}h(os,"_getElementText");function Sn(e,t=60){let n=e.replace(/\n/g," ").trim();return n.length<=t?n:n.substring(0,t-3)+"..."}h(Sn,"_truncate");function fl(e){let t=[],n=x(e.element,"w:ins"),r=x(e.element,"w:del");for(let o of n){let u=os(o).trim();u&&t.push(` Accepted insertion: "${Sn(u,60)}"`);}for(let o of r){let u=os(o).trim();u&&t.push(` Accepted deletion of: "${Sn(u,60)}"`);}new Cr(e).accept_all_revisions();for(let o of ["w:rPrChange","w:pPrChange","w:sectPrChange"])for(let u of x(e.element,o))u.parentNode?.removeChild(u);let i=n.length+r.length;return i?[`Tracked changes auto-accepted: ${i}`].concat(t):[]}h(fl,"accept_all_tracked_changes");function hl(e){let t=kn(e.pkg),n=[],r=0,s=0;for(let[i,o]of Object.entries(t))o.resolved?s++:r++,n.push({id:i,...o});return {total:n.length,open:r,resolved:s,comments:n}}h(hl,"get_comments_summary");function pl(e){let t=kn(e.pkg),n=Object.keys(t);if(n.length===0)return [];let r=[],s=new Pn(e);for(let[u,l]of Object.entries(t)){let a=l.resolved?"[Resolved]":"[Open]";r.push(` ${a} "${Sn(l.text||"",60)}" (${l.author||"Unknown"})`),s.deleteComment(u);}for(let u of ["w:commentRangeStart","w:commentRangeEnd","w:commentReference"])for(let l of x(e.element,u))l.parentNode?.removeChild(l);let i=Object.values(t).filter(u=>u.resolved).length,o=Object.values(t).filter(u=>!u.resolved).length;return [`Comments removed: ${n.length} (${i} resolved, ${o} open)`].concat(r)}h(pl,"remove_all_comments");function dl(e,t){let n=new Pn(e);if(!n.commentsPart)return [];let r=new Set,s=x(n.commentsPart._element,"w:comment");for(let i of s){let o=i.getAttribute("w:author");if(o&&(r.add(o),i.setAttribute("w:author",t)),i.hasAttribute("w:initials")){let u=t.split(" ").filter(Boolean).map(l=>l[0]).join("").toUpperCase();i.setAttribute("w:initials",u);}}return r.size?[`Comment authors replaced: ${Array.from(r).sort().join(", ")} \u2192 "${t}"`]:[]}h(dl,"replace_comment_authors");function ml(e,t){let n=new Set;for(let r of ["w:ins","w:del","w:rPrChange","w:pPrChange"])for(let s of x(e.element,r)){let i=s.getAttribute("w:author");i&&(n.add(i),s.setAttribute("w:author",t));}return n.size?[`Track change authors replaced: ${Array.from(n).sort().join(", ")} \u2192 "${t}"`]:[]}h(ml,"replace_change_authors");function gl(e){let t=0,n="2025-01-01T00:00:00Z";for(let r of ["w:ins","w:del","w:rPrChange","w:pPrChange"])for(let s of x(e.element,r))s.hasAttribute("w:date")&&(s.setAttribute("w:date",n),t++);return t?[`Track change timestamps: ${t} normalized`]:[]}h(gl,"normalize_change_dates");function _l(e){let t=[],n=e.pkg.getPartByPath("docProps/core.xml");n&&(Qe(n._element,"creator").forEach(u=>{u.textContent&&(t.push(`Author: ${u.textContent}`),u.textContent="");}),Qe(n._element,"lastModifiedBy").forEach(u=>{u.textContent&&(t.push(`Last modified by: ${u.textContent}`),u.textContent="");}),Qe(n._element,"revision").forEach(u=>{u.textContent&&parseInt(u.textContent)>1&&(t.push(`Revision count: ${u.textContent} \u2192 1`),u.textContent="1");}));let r=e.pkg.getPartByPath("docProps/app.xml");if(r){let s=r._element,i=["TotalTime","Words","Characters","Paragraphs","Lines","CharactersWithSpaces"];for(let u of i)Qe(s,u).forEach(l=>{l.textContent&&l.textContent!=="0"&&(u==="TotalTime"&&t.push(`Total editing time: ${l.textContent} minutes`),l.textContent="0");});let o=["Template","Manager","Company"];for(let u of o)Qe(s,u).forEach(l=>{l.textContent&&(t.push(`${u}: ${l.textContent}`),l.textContent="");});}return t.length?["Metadata scrubbed:",...t.map(s=>` ${s}`)]:[]}h(_l,"scrub_doc_properties");function vl(e){let t=false,n="1970-01-01T00:00:00Z",r=e.pkg.getPartByPath("docProps/core.xml");if(r)for(let s of ["created","modified","lastPrinted"])Qe(r._element,s).forEach(i=>{i.textContent&&i.textContent!==n&&(i.textContent=n,t=true);});return t?["Timestamps normalized to epoch"]:[]}h(vl,"scrub_timestamps");function wl(e){let t=e.pkg.parts.filter(o=>o.partname.includes("/customXml"));if(t.length===0)return [];let n=new Set(t.map(o=>o.partname));e.pkg.parts=e.pkg.parts.filter(o=>!n.has(o.partname));let r=h(o=>{let u=[];for(let l of x(o._element,"Relationship")){let a=l.getAttribute("Target");a&&a.includes("customXml")&&u.push(l);}u.forEach(l=>l.parentNode?.removeChild(l));},"removeRelationsTo"),s=e.pkg.getPartByPath("_rels/.rels");s&&r(s);let i=e.pkg.getOrCreateRelsPart(e.part.partname);i&&r(i);for(let o of x(e.element,"w:sdtPr"))su(o,"w:dataBinding").forEach(u=>o.removeChild(u));return [`Custom XML parts: ${t.length} removed`]}h(wl,"strip_custom_xml");function El(e){let t=0;for(let n of Qe(e.element,"docPr")){let r=n.getAttribute("descr");if(r){let s=r.length<10,i=r.includes(".")&&r.length<60;(s||i)&&(n.removeAttribute("descr"),t++);}}return t?[`Image alt text: ${t} auto-generated descriptions removed`]:[]}h(El,"strip_image_alt_text");function Dl(e){let t=["sharepoint.com","onedrive.com",".internal","intranet","localhost","10.","192.168.","172.16."],n=[],r=e.pkg.getOrCreateRelsPart(e.part.partname);for(let s of x(r._element,"Relationship"))if(s.getAttribute("TargetMode")==="External"){let i=s.getAttribute("Target")||"";for(let o of t)if(i.toLowerCase().includes(o.toLowerCase())){n.push(`Hyperlink targets internal URL: ${Sn(i,80)}`);break}}return n}h(Dl,"audit_hyperlinks");async function bs(e,t){let n=new rl(t.filename,t.sanitize_mode||"full",t.author||null);if(t.sanitize_mode==="full"){let i=ss(e),o=i[0]+i[1]+i[2];if(n.tracked_changes_found=o,o>0&&!t.accept_all)return n.status="blocked",n.blocked_reason=`Document contains ${o} unresolved tracked changes (${i[0]} insertions, ${i[1]} deletions, ${i[2]} formatting). Review in Word first, or set accept_all=true.`,{reportText:n.render()};if(o>0){let l=cl(e);l.size>1&&n.warnings.push(`Multiple authors detected in tracked changes: ${Array.from(l).sort().join(", ")}. Review per-change list before sending.`),n.add_transform_lines(fl(e)),n.tracked_changes_accepted=o;}let u=hl(e);n.comments_removed=u.total,n.add_transform_lines(pl(e));}else if(t.sanitize_mode==="keep-markup"){let i=ss(e);n.tracked_changes_found=i[0]+i[1]+i[2],n.tracked_changes_kept=n.tracked_changes_found,t.author&&(n.add_transform_lines(dl(e,t.author)),n.add_transform_lines(ml(e,t.author)));}n.add_transform_lines(sl(e)),n.add_transform_lines(ol(e)),n.add_transform_lines(al(e)),n.add_transform_lines(ul(e)),n.add_transform_lines(ll(e)),n.add_transform_lines(il(e)),n.add_transform_lines(_l(e)),n.add_transform_lines(vl(e)),n.add_transform_lines(wl(e)),n.add_transform_lines(El(e));let r=Dl(e);for(let i of r)n.warnings.push(i);if(n.add_transform_lines(gl(e)),t.protection_mode==="read_only"||t.protection_mode==="encrypt"){t.protection_mode==="encrypt"&&n.warnings.push("Encryption mode (AES compound wrappers) is strictly unsupported in the zero-dependency Node engine. Falling back to native Word Read-Only lock.");let i=e.pkg.getPartByPath("word/settings.xml");if(i){let o=i._element.ownerDocument,u=Qe(i._element,"documentProtection")[0];u||(u=o.createElement("w:documentProtection"),i._element.appendChild(u)),u.setAttribute("w:edit","readOnly"),u.setAttribute("w:enforcement","1"),n.structural_lines.push("Document locked (Read-Only enforcement injected into settings.xml)");}}t.export_pdf&&n.warnings.push("PDF export requires the Python/Word COM environment and is skipped in this zero-dependency Node agent.");for(let i of e.pkg.parts)if((i===e.part||i.contentType.includes("wordprocessingml")&&i.contentType.endsWith("+xml"))&&i._element.hasAttribute("xmlns:w16du")){let o=false;if(Array.from(i._element.attributes||[]).some(u=>u.name.startsWith("w16du:")&&u.name!=="xmlns:w16du")&&(o=true),!o){let u=x(i._element,"*");for(let l of u)if(l.tagName.startsWith("w16du:")||Array.from(l.attributes||[]).some(a=>a.name.startsWith("w16du:"))){o=true;break}}o||i._element.removeAttribute("xmlns:w16du");}n.warnings.length>0&&(n.status="clean_with_warnings");let s=await e.save();return {reportText:n.render(),outBuffer:s}}h(bs,"finalize_document");var Rn="application/vnd.openxmlformats-officedocument.wordprocessingml.document";function Ns(e,t){return t.split(".").reduce((n,r)=>{if(n&&typeof n=="object")return n[r]},e)}h(Ns,"getNestedProperty");async function qe(e,t){let n=this.getInputData()[e];if(!n.binary||!n.binary[t])throw new n8nWorkflow.NodeOperationError(this.getNode(),`No binary data found on property "${t}"`,{description:"Verify that the upstream node produced binary data and that the property name matches.",itemIndex:e});let r=n.binary[t],s=await this.helpers.getBinaryDataBuffer(e,t),i=r.fileName??"document.docx";return {buffer:s,fileName:i}}h(qe,"getDocxBuffer");function Bn(e,t){let n=e.lastIndexOf(".");return `${n===-1?e:e.substring(0,n)}_${t}.docx`}h(Bn,"buildOutputFileName");function Cs(e,t,n){if(e==null||e==="")throw new n8nWorkflow.NodeOperationError(this.getNode(),`Parameter "${n}" is empty`,{description:`Provide a JSON value for "${n}".`,itemIndex:t});if(typeof e=="object")return e;try{return JSON.parse(e)}catch(r){throw new n8nWorkflow.NodeOperationError(this.getNode(),`Parameter "${n}" is not valid JSON`,{description:r.message,itemIndex:t})}}h(Cs,"parseJsonParameter");function Ts(e){let t=e.message??"Unknown error",n=e.name??"",r=e.errors,s=Array.isArray(r)?r.join(`
59
+ `):t,i=s.toLowerCase();return n==="BatchValidationError"?i.includes("target text not found")?new n8nWorkflow.NodeApiError(this.getNode(),{message:s},{message:"An edit could not be applied: target text not found.",description:"Verify the exact `target_text` string \u2014 including punctuation and whitespace \u2014 against the document. Use the Extract Markdown operation to inspect what the engine sees."}):i.includes("ambiguous match")?new n8nWorkflow.NodeApiError(this.getNode(),{message:s},{message:"An edit matched multiple locations in the document.",description:"Provide more surrounding context in `target_text` to uniquely identify the location."}):i.includes("read-only")||i.includes("readonly")?new n8nWorkflow.NodeApiError(this.getNode(),{message:s},{message:"An edit targeted a read-only structural element.",description:"Cross-references, internal anchors, hyperlinks, and the Structural Appendix cannot be modified via text replacement. Restrict edits to the document body."}):i.includes("another author")||i.includes("nested")?new n8nWorkflow.NodeApiError(this.getNode(),{message:s},{message:"An edit overlaps with a pending tracked change by another author.",description:"Accept or reject the conflicting change first, or scope your edit outside of it."}):new n8nWorkflow.NodeApiError(this.getNode(),{message:s},{message:"Batch validation failed.",description:s}):i.includes("invalid docx")||i.includes("missing word/document.xml")?new n8nWorkflow.NodeApiError(this.getNode(),{message:t},{message:"The document could not be opened.",description:"Verify the input binary is a valid .docx file (not .doc, .pdf, or another format)."}):new n8nWorkflow.NodeApiError(this.getNode(),{message:t},{message:"Adeu engine error.",description:t})}h(Ts,"mapAdeuErrorToNodeApiError");var xs=[{displayName:"Input Binary Property",name:"binaryPropertyName",type:"string",default:"data",required:true,placeholder:"e.g. data",description:"Name of the binary property on the incoming item that holds the .docx file",displayOptions:{show:{resource:["document"],operation:["extractMarkdown"]}}},{displayName:"Clean View",name:"cleanView",type:"boolean",default:false,description:'Whether to project the document as if all tracked changes were accepted (simulates the "Accept All" state)',displayOptions:{show:{resource:["document"],operation:["extractMarkdown"]}}}];async function Is(e){let t=this.getNodeParameter("binaryPropertyName",e),n=this.getNodeParameter("cleanView",e),{buffer:r,fileName:s}=await qe.call(this,e,t),i=await nn(r,n);return [{json:{fileName:s,cleanView:n,markdown:i},pairedItem:{item:e}}]}h(Is,"executeExtractMarkdown");var Ss=[{displayName:"Input Binary Property",name:"binaryPropertyName",type:"string",default:"data",required:true,placeholder:"e.g. data",description:"Name of the binary property on the incoming item that holds the .docx file",displayOptions:{show:{resource:["document"],operation:["applyEdits"]}}},{displayName:"Output Binary Property",name:"outputBinaryPropertyName",type:"string",default:"data",required:true,placeholder:"e.g. data",description:"Name of the binary property on the outgoing item that will hold the redlined .docx file",displayOptions:{show:{resource:["document"],operation:["applyEdits"]}}},{displayName:"Author",name:"author",type:"string",default:"Adeu AI",placeholder:"e.g. AI Reviewer",description:"Author name attached to all tracked changes and comments produced by this operation",displayOptions:{show:{resource:["document"],operation:["applyEdits"]}}},{displayName:"Edits Source",name:"editsSource",type:"options",noDataExpression:true,default:"fromInputJson",description:"Where to read the list of changes from",options:[{name:"From Input JSON",value:"fromInputJson",description:"Read the changes array from the incoming item JSON"},{name:"Define Below",value:"defineBelow",description:"Provide a JSON literal directly in this node"}],displayOptions:{show:{resource:["document"],operation:["applyEdits"]}}},{displayName:"JSON Path on Input Item",name:"editsJsonPath",type:"string",default:"changes",required:true,placeholder:"e.g. data.changes",description:"Property path (dot-notation supported) on the input item JSON whose value is the array of DocumentChange objects",displayOptions:{show:{resource:["document"],operation:["applyEdits"],editsSource:["fromInputJson"]}}},{displayName:"Changes (JSON)",name:"editsJson",type:"json",default:`[
60
60
  {
61
61
  "type": "modify",
62
62
  "target_text": "State of New York",
63
63
  "new_text": "State of Delaware",
64
64
  "comment": "Standardizing governing law."
65
65
  }
66
- ]`,required:true,description:"Array of DocumentChange objects. Supported types: modify, accept, reject, reply, insert_row, delete_row.",typeOptions:{rows:10},displayOptions:{show:{resource:["document"],operation:["applyEdits"],editsSource:["defineBelow"]}}}];async function xs(e){let t=this.getNodeParameter("binaryPropertyName",e),n=this.getNodeParameter("outputBinaryPropertyName",e),r=this.getNodeParameter("author",e),s=this.getNodeParameter("editsSource",e),i;if(s==="fromInputJson"){let m=this.getNodeParameter("editsJsonPath",e),b=this.getInputData()[e].json;if(i=As(b,m),i===void 0)throw new Error(`No property "${m}" found on the input item JSON. Verify the upstream node produced it, or switch "Edits Source" to "Define Below".`)}else {let m=this.getNodeParameter("editsJson",e);i=ys.call(this,m,e,"Changes (JSON)");}if(!Array.isArray(i))throw new Error("Changes must be an array of DocumentChange objects.");let{buffer:o,fileName:u}=await qe.call(this,e,t),l=await tn.load(o),c=new Nr(l,r).process_batch(i),f=await l.save(),p=Bn(u,"redlined"),d=await this.helpers.prepareBinaryData(f,p,Rn),g=this.getInputData()[e].binary??{};return [{json:{fileName:p,author:r,stats:c},binary:{...g,[n]:d},pairedItem:{item:e}}]}h(xs,"executeApplyEdits");var Is=[{displayName:"Original Binary Property",name:"originalBinaryPropertyName",type:"string",default:"data",required:true,placeholder:"e.g. data",description:"Name of the binary property on the incoming item that holds the original .docx file",displayOptions:{show:{resource:["document"],operation:["generateDiff"]}}},{displayName:"Modified Binary Property",name:"modifiedBinaryPropertyName",type:"string",default:"data2",required:true,placeholder:"e.g. data2",description:"Name of the binary property on the incoming item that holds the modified .docx file",displayOptions:{show:{resource:["document"],operation:["generateDiff"]}}},{displayName:"Clean View",name:"cleanView",type:"boolean",default:true,description:'Whether to compare the "Accept All" clean view of both documents (recommended). Disable to diff raw CriticMarkup-projected text.',displayOptions:{show:{resource:["document"],operation:["generateDiff"]}}}];async function Ss(e){let t=this.getNodeParameter("originalBinaryPropertyName",e),n=this.getNodeParameter("modifiedBinaryPropertyName",e),r=this.getNodeParameter("cleanView",e),{buffer:s,fileName:i}=await qe.call(this,e,t),{buffer:o,fileName:u}=await qe.call(this,e,n),l=await nn(s,r),a=await nn(o,r),c=Es(l,a,i,u);return [{json:{originalFileName:i,modifiedFileName:u,cleanView:r,diff:c},pairedItem:{item:e}}]}h(Ss,"executeGenerateDiff");var Os=[{displayName:"Input Binary Property",name:"binaryPropertyName",type:"string",default:"data",required:true,placeholder:"e.g. data",description:"Name of the binary property on the incoming item that holds the .docx file",displayOptions:{show:{resource:["document"],operation:["finalizeDocument"]}}},{displayName:"Output Binary Property",name:"outputBinaryPropertyName",type:"string",default:"data",required:true,placeholder:"e.g. data",description:"Name of the binary property on the outgoing item that will hold the finalized .docx file",displayOptions:{show:{resource:["document"],operation:["finalizeDocument"]}}},{displayName:"Sanitize Mode",name:"sanitizeMode",type:"options",default:"full",options:[{name:"Full",value:"full",description:"Strip metadata and require all tracked changes/comments to be resolved or auto-accepted"},{name:"Keep Markup",value:"keep-markup",description:"Strip metadata but preserve visible tracked changes and comments"},{name:"Baseline",value:"baseline",description:"Minimal sanitization (strip rsid, paraIds, proof errors only)"}],displayOptions:{show:{resource:["document"],operation:["finalizeDocument"]}}},{displayName:"Accept All Tracked Changes",name:"acceptAll",type:"boolean",default:false,description:"Whether to auto-accept all pending tracked changes during Full sanitization. If false and tracked changes exist, the operation is blocked.",displayOptions:{show:{resource:["document"],operation:["finalizeDocument"],sanitizeMode:["full"]}}},{displayName:"Author Override",name:"authorOverride",type:"string",default:"",placeholder:"e.g. My Firm",description:"When using Keep Markup, replace all visible authors on tracked changes and comments with this name. Leave empty to keep original authors.",displayOptions:{show:{resource:["document"],operation:["finalizeDocument"],sanitizeMode:["keep-markup"]}}},{displayName:"Protection Mode",name:"protectionMode",type:"options",default:"none",description:"Optionally lock the finalized document. Encryption (AES) is not supported in this engine \u2014 falls back to read-only.",options:[{name:"None",value:"none"},{name:"Read Only",value:"read_only"}],displayOptions:{show:{resource:["document"],operation:["finalizeDocument"]}}}];async function Ps(e){let t=this.getNodeParameter("binaryPropertyName",e),n=this.getNodeParameter("outputBinaryPropertyName",e),r=this.getNodeParameter("sanitizeMode",e),s=false;r==="full"&&(s=this.getNodeParameter("acceptAll",e));let i=null;if(r==="keep-markup"){let b=this.getNodeParameter("authorOverride",e);i=b.trim()===""?null:b;}let u=this.getNodeParameter("protectionMode",e)==="read_only"?"read_only":null,{buffer:l,fileName:a}=await qe.call(this,e,t),c=await tn.load(l),{reportText:f,outBuffer:p}=await Ds(c,{filename:a,sanitize_mode:r,accept_all:s,protection_mode:u,author:i});if(!p)throw new Error(f);let d=Bn(a,"finalized"),g=await this.helpers.prepareBinaryData(p,d,Rn),m=this.getInputData()[e].binary??{};return [{json:{fileName:d,sanitizeMode:r,report:f},binary:{...m,[n]:g},pairedItem:{item:e}}]}h(Ps,"executeFinalizeDocument");var ks=[{displayName:"Operation",name:"operation",type:"options",noDataExpression:true,displayOptions:{show:{resource:["document"]}},options:[{name:"Extract Markdown",value:"extractMarkdown",action:"Extract a Markdown representation of the document",description:"Project the .docx into LLM-friendly CriticMarkup with a Semantic Appendix"},{name:"Apply Edits",value:"applyEdits",action:"Apply a batch of tracked changes to the document",description:"Apply ModifyText, AcceptChange, RejectChange, ReplyComment, InsertTableRow, and DeleteTableRow operations"},{name:"Generate Diff",value:"generateDiff",action:"Generate a Word Patch diff between two documents",description:"Produce a sub-word level @@ Word Patch @@ diff between two .docx documents"},{name:"Finalize Document",value:"finalizeDocument",action:"Sanitize metadata and lock the document for distribution",description:"Strip author names, internal IDs, and pending markup, then optionally lock the document read-only"}],default:"extractMarkdown"},...Ns,...Ts,...Is,...Os];var Rs=class{static{h(this,"Adeu");}description={displayName:"Adeu",name:"adeu",icon:"file:adeu.svg",group:["transform"],version:1,subtitle:'={{$parameter["operation"]}}',description:"Apply AI-driven tracked changes, extract Markdown, generate diffs, and sanitize Microsoft Word (.docx) documents.",defaults:{name:"Adeu"},usableAsTool:true,inputs:[n8nWorkflow.NodeConnectionTypes.Main],outputs:[n8nWorkflow.NodeConnectionTypes.Main],credentials:[],properties:[{displayName:"Resource",name:"resource",type:"options",noDataExpression:true,options:[{name:"Document",value:"document"}],default:"document"},...ks]};async execute(){let t=this.getInputData(),n=[],r=this.getNodeParameter("resource",0),s=this.getNodeParameter("operation",0);for(let i=0;i<t.length;i++)try{let o;if(r==="document")switch(s){case "extractMarkdown":o=await Cs.call(this,i);break;case "applyEdits":o=await xs.call(this,i);break;case "generateDiff":o=await Ss.call(this,i);break;case "finalizeDocument":o=await Ps.call(this,i);break;default:throw new Error(`Unsupported operation: ${s}`)}else throw new Error(`Unsupported resource: ${r}`);n.push(...o);}catch(o){if(this.continueOnFail()){n.push({json:{error:o.message},pairedItem:{item:i}});continue}let u=o;throw u.name==="NodeOperationError"||u.name==="NodeApiError"?u:bs.call(this,u)}return [n]}};exports.Adeu=Rs;
66
+ ]`,required:true,description:"Array of DocumentChange objects. Supported types: modify, accept, reject, reply, insert_row, delete_row.",typeOptions:{rows:10},displayOptions:{show:{resource:["document"],operation:["applyEdits"],editsSource:["defineBelow"]}}}];async function Os(e){let t=this.getNodeParameter("binaryPropertyName",e),n=this.getNodeParameter("outputBinaryPropertyName",e),r=this.getNodeParameter("author",e),s=this.getNodeParameter("editsSource",e),i;if(s==="fromInputJson"){let m=this.getNodeParameter("editsJsonPath",e),b=this.getInputData()[e].json;if(i=Ns(b,m),i===void 0)throw new Error(`No property "${m}" found on the input item JSON. Verify the upstream node produced it, or switch "Edits Source" to "Define Below".`)}else {let m=this.getNodeParameter("editsJson",e);i=Cs.call(this,m,e,"Changes (JSON)");}if(!Array.isArray(i))throw new Error("Changes must be an array of DocumentChange objects.");let{buffer:o,fileName:u}=await qe.call(this,e,t),l=await tn.load(o),c=new Cr(l,r).process_batch(i),f=await l.save(),p=Bn(u,"redlined"),d=await this.helpers.prepareBinaryData(f,p,Rn),g=this.getInputData()[e].binary??{};return [{json:{fileName:p,author:r,stats:c},binary:{...g,[n]:d},pairedItem:{item:e}}]}h(Os,"executeApplyEdits");var Ps=[{displayName:"Original Binary Property",name:"originalBinaryPropertyName",type:"string",default:"data",required:true,placeholder:"e.g. data",description:"Name of the binary property on the incoming item that holds the original .docx file",displayOptions:{show:{resource:["document"],operation:["generateDiff"]}}},{displayName:"Modified Binary Property",name:"modifiedBinaryPropertyName",type:"string",default:"data2",required:true,placeholder:"e.g. data2",description:"Name of the binary property on the incoming item that holds the modified .docx file",displayOptions:{show:{resource:["document"],operation:["generateDiff"]}}},{displayName:"Clean View",name:"cleanView",type:"boolean",default:true,description:'Whether to compare the "Accept All" clean view of both documents (recommended). Disable to diff raw CriticMarkup-projected text.',displayOptions:{show:{resource:["document"],operation:["generateDiff"]}}}];async function ks(e){let t=this.getNodeParameter("originalBinaryPropertyName",e),n=this.getNodeParameter("modifiedBinaryPropertyName",e),r=this.getNodeParameter("cleanView",e),{buffer:s,fileName:i}=await qe.call(this,e,t),{buffer:o,fileName:u}=await qe.call(this,e,n),l=await nn(s,r),a=await nn(o,r),c=ys(l,a,i,u);return [{json:{originalFileName:i,modifiedFileName:u,cleanView:r,diff:c},pairedItem:{item:e}}]}h(ks,"executeGenerateDiff");var Ms=[{displayName:"Input Binary Property",name:"binaryPropertyName",type:"string",default:"data",required:true,placeholder:"e.g. data",description:"Name of the binary property on the incoming item that holds the .docx file",displayOptions:{show:{resource:["document"],operation:["finalizeDocument"]}}},{displayName:"Output Binary Property",name:"outputBinaryPropertyName",type:"string",default:"data",required:true,placeholder:"e.g. data",description:"Name of the binary property on the outgoing item that will hold the finalized .docx file",displayOptions:{show:{resource:["document"],operation:["finalizeDocument"]}}},{displayName:"Sanitize Mode",name:"sanitizeMode",type:"options",default:"full",options:[{name:"Full",value:"full",description:"Strip metadata and require all tracked changes/comments to be resolved or auto-accepted"},{name:"Keep Markup",value:"keep-markup",description:"Strip metadata but preserve visible tracked changes and comments"},{name:"Baseline",value:"baseline",description:"Minimal sanitization (strip rsid, paraIds, proof errors only)"}],displayOptions:{show:{resource:["document"],operation:["finalizeDocument"]}}},{displayName:"Accept All Tracked Changes",name:"acceptAll",type:"boolean",default:false,description:"Whether to auto-accept all pending tracked changes during Full sanitization. If false and tracked changes exist, the operation is blocked.",displayOptions:{show:{resource:["document"],operation:["finalizeDocument"],sanitizeMode:["full"]}}},{displayName:"Author Override",name:"authorOverride",type:"string",default:"",placeholder:"e.g. My Firm",description:"When using Keep Markup, replace all visible authors on tracked changes and comments with this name. Leave empty to keep original authors.",displayOptions:{show:{resource:["document"],operation:["finalizeDocument"],sanitizeMode:["keep-markup"]}}},{displayName:"Protection Mode",name:"protectionMode",type:"options",default:"none",description:"Optionally lock the finalized document. Encryption (AES) is not supported in this engine \u2014 falls back to read-only.",options:[{name:"None",value:"none"},{name:"Read Only",value:"read_only"}],displayOptions:{show:{resource:["document"],operation:["finalizeDocument"]}}}];async function Rs(e){let t=this.getNodeParameter("binaryPropertyName",e),n=this.getNodeParameter("outputBinaryPropertyName",e),r=this.getNodeParameter("sanitizeMode",e),s=false;r==="full"&&(s=this.getNodeParameter("acceptAll",e));let i=null;if(r==="keep-markup"){let b=this.getNodeParameter("authorOverride",e);i=b.trim()===""?null:b;}let u=this.getNodeParameter("protectionMode",e)==="read_only"?"read_only":null,{buffer:l,fileName:a}=await qe.call(this,e,t),c=await tn.load(l),{reportText:f,outBuffer:p}=await bs(c,{filename:a,sanitize_mode:r,accept_all:s,protection_mode:u,author:i});if(!p)throw new Error(f);let d=Bn(a,"finalized"),g=await this.helpers.prepareBinaryData(p,d,Rn),m=this.getInputData()[e].binary??{};return [{json:{fileName:d,sanitizeMode:r,report:f},binary:{...m,[n]:g},pairedItem:{item:e}}]}h(Rs,"executeFinalizeDocument");var Bs=[{displayName:"Operation",name:"operation",type:"options",noDataExpression:true,displayOptions:{show:{resource:["document"]}},options:[{name:"Extract Markdown",value:"extractMarkdown",action:"Extract a Markdown representation of the document",description:"Project the .docx into LLM-friendly CriticMarkup with a Semantic Appendix"},{name:"Apply Edits",value:"applyEdits",action:"Apply a batch of tracked changes to the document",description:"Apply ModifyText, AcceptChange, RejectChange, ReplyComment, InsertTableRow, and DeleteTableRow operations"},{name:"Generate Diff",value:"generateDiff",action:"Generate a Word Patch diff between two documents",description:"Produce a sub-word level @@ Word Patch @@ diff between two .docx documents"},{name:"Finalize Document",value:"finalizeDocument",action:"Sanitize metadata and lock the document for distribution",description:"Strip author names, internal IDs, and pending markup, then optionally lock the document read-only"}],default:"extractMarkdown"},...xs,...Ss,...Ps,...Ms];var Ls=class{static{h(this,"Adeu");}description={displayName:"Adeu",name:"adeu",icon:"file:adeu.svg",group:["transform"],version:1,subtitle:'={{$parameter["operation"]}}',description:"Apply AI-driven tracked changes, extract Markdown, generate diffs, and sanitize Microsoft Word (.docx) documents.",defaults:{name:"Adeu"},usableAsTool:true,inputs:[n8nWorkflow.NodeConnectionTypes.Main],outputs:[n8nWorkflow.NodeConnectionTypes.Main],credentials:[],properties:[{displayName:"Resource",name:"resource",type:"options",noDataExpression:true,options:[{name:"Document",value:"document"}],default:"document"},...Bs]};async execute(){let t=this.getInputData(),n=[],r=this.getNodeParameter("resource",0),s=this.getNodeParameter("operation",0);for(let i=0;i<t.length;i++)try{let o;if(r==="document")switch(s){case "extractMarkdown":o=await Is.call(this,i);break;case "applyEdits":o=await Os.call(this,i);break;case "generateDiff":o=await ks.call(this,i);break;case "finalizeDocument":o=await Rs.call(this,i);break;default:throw new Error(`Unsupported operation: ${s}`)}else throw new Error(`Unsupported resource: ${r}`);n.push(...o);}catch(o){if(this.continueOnFail()){n.push({json:{error:o.message},pairedItem:{item:i}});continue}let u=o;throw u.name==="NodeOperationError"||u.name==="NodeApiError"?u:Ts.call(this,u)}return [n]}};exports.Adeu=Ls;