wrec 0.19.0 → 0.19.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/wrec.umd.js CHANGED
@@ -1,5 +1,5 @@
1
- (function(F,Y){typeof exports=="object"&&typeof module<"u"?Y(exports):typeof define=="function"&&define.amd?define(["exports"],Y):(F=typeof globalThis<"u"?globalThis:F||self,Y(F.wrec={}))})(this,(function(F){"use strict";const{entries:Y,setPrototypeOf:ne,isFrozen:je,getPrototypeOf:Ye,getOwnPropertyDescriptor:Ve}=Object;let{freeze:C,seal:I,create:Rt}=Object,{apply:Ct,construct:Nt}=typeof Reflect<"u"&&Reflect;C||(C=function(t){return t}),I||(I=function(t){return t}),Ct||(Ct=function(t,e){for(var o=arguments.length,i=new Array(o>2?o-2:0),r=2;r<o;r++)i[r-2]=arguments[r];return t.apply(e,i)}),Nt||(Nt=function(t){for(var e=arguments.length,o=new Array(e>1?e-1:0),i=1;i<e;i++)o[i-1]=arguments[i];return new t(...o)});const ut=O(Array.prototype.forEach),Xe=O(Array.prototype.lastIndexOf),oe=O(Array.prototype.pop),tt=O(Array.prototype.push),qe=O(Array.prototype.splice),pt=O(String.prototype.toLowerCase),Ot=O(String.prototype.toString),Lt=O(String.prototype.match),et=O(String.prototype.replace),Ke=O(String.prototype.indexOf),Ze=O(String.prototype.trim),P=O(Object.prototype.hasOwnProperty),N=O(RegExp.prototype.test),nt=Je(TypeError);function O(s){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var e=arguments.length,o=new Array(e>1?e-1:0),i=1;i<e;i++)o[i-1]=arguments[i];return Ct(s,t,o)}}function Je(s){return function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return Nt(s,e)}}function m(s,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:pt;ne&&ne(s,null);let o=t.length;for(;o--;){let i=t[o];if(typeof i=="string"){const r=e(i);r!==i&&(je(t)||(t[o]=r),i=r)}s[i]=!0}return s}function Qe(s){for(let t=0;t<s.length;t++)P(s,t)||(s[t]=null);return s}function v(s){const t=Rt(null);for(const[e,o]of Y(s))P(s,e)&&(Array.isArray(o)?t[e]=Qe(o):o&&typeof o=="object"&&o.constructor===Object?t[e]=v(o):t[e]=o);return t}function ot(s,t){for(;s!==null;){const o=Ve(s,t);if(o){if(o.get)return O(o.get);if(typeof o.value=="function")return O(o.value)}s=Ye(s)}function e(){return null}return e}const ie=C(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Mt=C(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),wt=C(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),tn=C(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Dt=C(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),en=C(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),se=C(["#text"]),re=C(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),It=C(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),ae=C(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),mt=C(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),nn=I(/\{\{[\w\W]*|[\w\W]*\}\}/gm),on=I(/<%[\w\W]*|[\w\W]*%>/gm),sn=I(/\$\{[\w\W]*/gm),rn=I(/^data-[\-\w.\u00B7-\uFFFF]+$/),an=I(/^aria-[\-\w]+$/),ce=I(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),cn=I(/^(?:\w+script|data):/i),ln=I(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),le=I(/^html$/i),fn=I(/^[a-z][.\w]*(-[.\w]+)+$/i);var fe=Object.freeze({__proto__:null,ARIA_ATTR:an,ATTR_WHITESPACE:ln,CUSTOM_ELEMENT:fn,DATA_ATTR:rn,DOCTYPE_NAME:le,ERB_EXPR:on,IS_ALLOWED_URI:ce,IS_SCRIPT_OR_DATA:cn,MUSTACHE_EXPR:nn,TMPLIT_EXPR:sn});const it={element:1,text:3,progressingInstruction:7,comment:8,document:9},un=function(){return typeof window>"u"?null:window},pn=function(t,e){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let o=null;const i="data-tt-policy-suffix";e&&e.hasAttribute(i)&&(o=e.getAttribute(i));const r="dompurify"+(o?"#"+o:"");try{return t.createPolicy(r,{createHTML(c){return c},createScriptURL(c){return c}})}catch{return console.warn("TrustedTypes policy "+r+" could not be created."),null}},ue=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function pe(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:un();const t=f=>pe(f);if(t.version="3.3.1",t.removed=[],!s||!s.document||s.document.nodeType!==it.document||!s.Element)return t.isSupported=!1,t;let{document:e}=s;const o=e,i=o.currentScript,{DocumentFragment:r,HTMLTemplateElement:c,Node:h,Element:u,NodeFilter:p,NamedNodeMap:d=s.NamedNodeMap||s.MozNamedAttrMap,HTMLFormElement:b,DOMParser:$,trustedTypes:U}=s,B=u.prototype,On=ot(B,"cloneNode"),Ln=ot(B,"remove"),Mn=ot(B,"nextSibling"),wn=ot(B,"childNodes"),Tt=ot(B,"parentNode");if(typeof c=="function"){const f=e.createElement("template");f.content&&f.content.ownerDocument&&(e=f.content.ownerDocument)}let M,at="";const{implementation:zt,createNodeIterator:Dn,createDocumentFragment:In,getElementsByTagName:Pn}=e,{importNode:vn}=o;let w=ue();t.isSupported=typeof Y=="function"&&typeof Tt=="function"&&zt&&zt.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:Gt,ERB_EXPR:$t,TMPLIT_EXPR:Bt,DATA_ATTR:xn,ARIA_ATTR:kn,IS_SCRIPT_OR_DATA:Fn,ATTR_WHITESPACE:be,CUSTOM_ELEMENT:Un}=fe;let{IS_ALLOWED_URI:Se}=fe,_=null;const ye=m({},[...ie,...Mt,...wt,...Dt,...se]);let S=null;const Re=m({},[...re,...It,...ae,...mt]);let E=Object.seal(Rt(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ct=null,Wt=null;const V=Object.seal(Rt(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ce=!0,jt=!0,Ne=!1,Oe=!0,X=!1,Et=!0,W=!1,Yt=!1,Vt=!1,q=!1,gt=!1,At=!1,Le=!0,Me=!1;const Hn="user-content-";let Xt=!0,lt=!1,K={},x=null;const qt=m({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let we=null;const De=m({},["audio","video","img","source","image","track"]);let Kt=null;const Ie=m({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),_t="http://www.w3.org/1998/Math/MathML",bt="http://www.w3.org/2000/svg",H="http://www.w3.org/1999/xhtml";let Z=H,Zt=!1,Jt=null;const zn=m({},[_t,bt,H],Ot);let St=m({},["mi","mo","mn","ms","mtext"]),yt=m({},["annotation-xml"]);const Gn=m({},["title","style","font","a","script"]);let ft=null;const $n=["application/xhtml+xml","text/html"],Bn="text/html";let A=null,J=null;const Wn=e.createElement("form"),Pe=function(n){return n instanceof RegExp||n instanceof Function},Qt=function(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(J&&J===n)){if((!n||typeof n!="object")&&(n={}),n=v(n),ft=$n.indexOf(n.PARSER_MEDIA_TYPE)===-1?Bn:n.PARSER_MEDIA_TYPE,A=ft==="application/xhtml+xml"?Ot:pt,_=P(n,"ALLOWED_TAGS")?m({},n.ALLOWED_TAGS,A):ye,S=P(n,"ALLOWED_ATTR")?m({},n.ALLOWED_ATTR,A):Re,Jt=P(n,"ALLOWED_NAMESPACES")?m({},n.ALLOWED_NAMESPACES,Ot):zn,Kt=P(n,"ADD_URI_SAFE_ATTR")?m(v(Ie),n.ADD_URI_SAFE_ATTR,A):Ie,we=P(n,"ADD_DATA_URI_TAGS")?m(v(De),n.ADD_DATA_URI_TAGS,A):De,x=P(n,"FORBID_CONTENTS")?m({},n.FORBID_CONTENTS,A):qt,ct=P(n,"FORBID_TAGS")?m({},n.FORBID_TAGS,A):v({}),Wt=P(n,"FORBID_ATTR")?m({},n.FORBID_ATTR,A):v({}),K=P(n,"USE_PROFILES")?n.USE_PROFILES:!1,Ce=n.ALLOW_ARIA_ATTR!==!1,jt=n.ALLOW_DATA_ATTR!==!1,Ne=n.ALLOW_UNKNOWN_PROTOCOLS||!1,Oe=n.ALLOW_SELF_CLOSE_IN_ATTR!==!1,X=n.SAFE_FOR_TEMPLATES||!1,Et=n.SAFE_FOR_XML!==!1,W=n.WHOLE_DOCUMENT||!1,q=n.RETURN_DOM||!1,gt=n.RETURN_DOM_FRAGMENT||!1,At=n.RETURN_TRUSTED_TYPE||!1,Vt=n.FORCE_BODY||!1,Le=n.SANITIZE_DOM!==!1,Me=n.SANITIZE_NAMED_PROPS||!1,Xt=n.KEEP_CONTENT!==!1,lt=n.IN_PLACE||!1,Se=n.ALLOWED_URI_REGEXP||ce,Z=n.NAMESPACE||H,St=n.MATHML_TEXT_INTEGRATION_POINTS||St,yt=n.HTML_INTEGRATION_POINTS||yt,E=n.CUSTOM_ELEMENT_HANDLING||{},n.CUSTOM_ELEMENT_HANDLING&&Pe(n.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(E.tagNameCheck=n.CUSTOM_ELEMENT_HANDLING.tagNameCheck),n.CUSTOM_ELEMENT_HANDLING&&Pe(n.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(E.attributeNameCheck=n.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),n.CUSTOM_ELEMENT_HANDLING&&typeof n.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(E.allowCustomizedBuiltInElements=n.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),X&&(jt=!1),gt&&(q=!0),K&&(_=m({},se),S=[],K.html===!0&&(m(_,ie),m(S,re)),K.svg===!0&&(m(_,Mt),m(S,It),m(S,mt)),K.svgFilters===!0&&(m(_,wt),m(S,It),m(S,mt)),K.mathMl===!0&&(m(_,Dt),m(S,ae),m(S,mt))),n.ADD_TAGS&&(typeof n.ADD_TAGS=="function"?V.tagCheck=n.ADD_TAGS:(_===ye&&(_=v(_)),m(_,n.ADD_TAGS,A))),n.ADD_ATTR&&(typeof n.ADD_ATTR=="function"?V.attributeCheck=n.ADD_ATTR:(S===Re&&(S=v(S)),m(S,n.ADD_ATTR,A))),n.ADD_URI_SAFE_ATTR&&m(Kt,n.ADD_URI_SAFE_ATTR,A),n.FORBID_CONTENTS&&(x===qt&&(x=v(x)),m(x,n.FORBID_CONTENTS,A)),n.ADD_FORBID_CONTENTS&&(x===qt&&(x=v(x)),m(x,n.ADD_FORBID_CONTENTS,A)),Xt&&(_["#text"]=!0),W&&m(_,["html","head","body"]),_.table&&(m(_,["tbody"]),delete ct.tbody),n.TRUSTED_TYPES_POLICY){if(typeof n.TRUSTED_TYPES_POLICY.createHTML!="function")throw nt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof n.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw nt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');M=n.TRUSTED_TYPES_POLICY,at=M.createHTML("")}else M===void 0&&(M=pn(U,i)),M!==null&&typeof at=="string"&&(at=M.createHTML(""));C&&C(n),J=n}},ve=m({},[...Mt,...wt,...tn]),xe=m({},[...Dt,...en]),jn=function(n){let a=Tt(n);(!a||!a.tagName)&&(a={namespaceURI:Z,tagName:"template"});const l=pt(n.tagName),T=pt(a.tagName);return Jt[n.namespaceURI]?n.namespaceURI===bt?a.namespaceURI===H?l==="svg":a.namespaceURI===_t?l==="svg"&&(T==="annotation-xml"||St[T]):!!ve[l]:n.namespaceURI===_t?a.namespaceURI===H?l==="math":a.namespaceURI===bt?l==="math"&&yt[T]:!!xe[l]:n.namespaceURI===H?a.namespaceURI===bt&&!yt[T]||a.namespaceURI===_t&&!St[T]?!1:!xe[l]&&(Gn[l]||!ve[l]):!!(ft==="application/xhtml+xml"&&Jt[n.namespaceURI]):!1},k=function(n){tt(t.removed,{element:n});try{Tt(n).removeChild(n)}catch{Ln(n)}},j=function(n,a){try{tt(t.removed,{attribute:a.getAttributeNode(n),from:a})}catch{tt(t.removed,{attribute:null,from:a})}if(a.removeAttribute(n),n==="is")if(q||gt)try{k(a)}catch{}else try{a.setAttribute(n,"")}catch{}},ke=function(n){let a=null,l=null;if(Vt)n="<remove></remove>"+n;else{const g=Lt(n,/^[\r\n\t ]+/);l=g&&g[0]}ft==="application/xhtml+xml"&&Z===H&&(n='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+n+"</body></html>");const T=M?M.createHTML(n):n;if(Z===H)try{a=new $().parseFromString(T,ft)}catch{}if(!a||!a.documentElement){a=zt.createDocument(Z,"template",null);try{a.documentElement.innerHTML=Zt?at:T}catch{}}const R=a.body||a.documentElement;return n&&l&&R.insertBefore(e.createTextNode(l),R.childNodes[0]||null),Z===H?Pn.call(a,W?"html":"body")[0]:W?a.documentElement:R},Fe=function(n){return Dn.call(n.ownerDocument||n,n,p.SHOW_ELEMENT|p.SHOW_COMMENT|p.SHOW_TEXT|p.SHOW_PROCESSING_INSTRUCTION|p.SHOW_CDATA_SECTION,null)},te=function(n){return n instanceof b&&(typeof n.nodeName!="string"||typeof n.textContent!="string"||typeof n.removeChild!="function"||!(n.attributes instanceof d)||typeof n.removeAttribute!="function"||typeof n.setAttribute!="function"||typeof n.namespaceURI!="string"||typeof n.insertBefore!="function"||typeof n.hasChildNodes!="function")},Ue=function(n){return typeof h=="function"&&n instanceof h};function z(f,n,a){ut(f,l=>{l.call(t,n,a,J)})}const He=function(n){let a=null;if(z(w.beforeSanitizeElements,n,null),te(n))return k(n),!0;const l=A(n.nodeName);if(z(w.uponSanitizeElement,n,{tagName:l,allowedTags:_}),Et&&n.hasChildNodes()&&!Ue(n.firstElementChild)&&N(/<[/\w!]/g,n.innerHTML)&&N(/<[/\w!]/g,n.textContent)||n.nodeType===it.progressingInstruction||Et&&n.nodeType===it.comment&&N(/<[/\w]/g,n.data))return k(n),!0;if(!(V.tagCheck instanceof Function&&V.tagCheck(l))&&(!_[l]||ct[l])){if(!ct[l]&&Ge(l)&&(E.tagNameCheck instanceof RegExp&&N(E.tagNameCheck,l)||E.tagNameCheck instanceof Function&&E.tagNameCheck(l)))return!1;if(Xt&&!x[l]){const T=Tt(n)||n.parentNode,R=wn(n)||n.childNodes;if(R&&T){const g=R.length;for(let D=g-1;D>=0;--D){const G=On(R[D],!0);G.__removalCount=(n.__removalCount||0)+1,T.insertBefore(G,Mn(n))}}}return k(n),!0}return n instanceof u&&!jn(n)||(l==="noscript"||l==="noembed"||l==="noframes")&&N(/<\/no(script|embed|frames)/i,n.innerHTML)?(k(n),!0):(X&&n.nodeType===it.text&&(a=n.textContent,ut([Gt,$t,Bt],T=>{a=et(a,T," ")}),n.textContent!==a&&(tt(t.removed,{element:n.cloneNode()}),n.textContent=a)),z(w.afterSanitizeElements,n,null),!1)},ze=function(n,a,l){if(Le&&(a==="id"||a==="name")&&(l in e||l in Wn))return!1;if(!(jt&&!Wt[a]&&N(xn,a))){if(!(Ce&&N(kn,a))){if(!(V.attributeCheck instanceof Function&&V.attributeCheck(a,n))){if(!S[a]||Wt[a]){if(!(Ge(n)&&(E.tagNameCheck instanceof RegExp&&N(E.tagNameCheck,n)||E.tagNameCheck instanceof Function&&E.tagNameCheck(n))&&(E.attributeNameCheck instanceof RegExp&&N(E.attributeNameCheck,a)||E.attributeNameCheck instanceof Function&&E.attributeNameCheck(a,n))||a==="is"&&E.allowCustomizedBuiltInElements&&(E.tagNameCheck instanceof RegExp&&N(E.tagNameCheck,l)||E.tagNameCheck instanceof Function&&E.tagNameCheck(l))))return!1}else if(!Kt[a]){if(!N(Se,et(l,be,""))){if(!((a==="src"||a==="xlink:href"||a==="href")&&n!=="script"&&Ke(l,"data:")===0&&we[n])){if(!(Ne&&!N(Fn,et(l,be,"")))){if(l)return!1}}}}}}}return!0},Ge=function(n){return n!=="annotation-xml"&&Lt(n,Un)},$e=function(n){z(w.beforeSanitizeAttributes,n,null);const{attributes:a}=n;if(!a||te(n))return;const l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:S,forceKeepAttr:void 0};let T=a.length;for(;T--;){const R=a[T],{name:g,namespaceURI:D,value:G}=R,Q=A(g),ee=G;let y=g==="value"?ee:Ze(ee);if(l.attrName=Q,l.attrValue=y,l.keepAttr=!0,l.forceKeepAttr=void 0,z(w.uponSanitizeAttribute,n,l),y=l.attrValue,Me&&(Q==="id"||Q==="name")&&(j(g,n),y=Hn+y),Et&&N(/((--!?|])>)|<\/(style|title|textarea)/i,y)){j(g,n);continue}if(Q==="attributename"&&Lt(y,"href")){j(g,n);continue}if(l.forceKeepAttr)continue;if(!l.keepAttr){j(g,n);continue}if(!Oe&&N(/\/>/i,y)){j(g,n);continue}X&&ut([Gt,$t,Bt],We=>{y=et(y,We," ")});const Be=A(n.nodeName);if(!ze(Be,Q,y)){j(g,n);continue}if(M&&typeof U=="object"&&typeof U.getAttributeType=="function"&&!D)switch(U.getAttributeType(Be,Q)){case"TrustedHTML":{y=M.createHTML(y);break}case"TrustedScriptURL":{y=M.createScriptURL(y);break}}if(y!==ee)try{D?n.setAttributeNS(D,g,y):n.setAttribute(g,y),te(n)?k(n):oe(t.removed)}catch{j(g,n)}}z(w.afterSanitizeAttributes,n,null)},Yn=function f(n){let a=null;const l=Fe(n);for(z(w.beforeSanitizeShadowDOM,n,null);a=l.nextNode();)z(w.uponSanitizeShadowNode,a,null),He(a),$e(a),a.content instanceof r&&f(a.content);z(w.afterSanitizeShadowDOM,n,null)};return t.sanitize=function(f){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=null,l=null,T=null,R=null;if(Zt=!f,Zt&&(f="<!-->"),typeof f!="string"&&!Ue(f))if(typeof f.toString=="function"){if(f=f.toString(),typeof f!="string")throw nt("dirty is not a string, aborting")}else throw nt("toString is not a function");if(!t.isSupported)return f;if(Yt||Qt(n),t.removed=[],typeof f=="string"&&(lt=!1),lt){if(f.nodeName){const G=A(f.nodeName);if(!_[G]||ct[G])throw nt("root node is forbidden and cannot be sanitized in-place")}}else if(f instanceof h)a=ke("<!---->"),l=a.ownerDocument.importNode(f,!0),l.nodeType===it.element&&l.nodeName==="BODY"||l.nodeName==="HTML"?a=l:a.appendChild(l);else{if(!q&&!X&&!W&&f.indexOf("<")===-1)return M&&At?M.createHTML(f):f;if(a=ke(f),!a)return q?null:At?at:""}a&&Vt&&k(a.firstChild);const g=Fe(lt?f:a);for(;T=g.nextNode();)He(T),$e(T),T.content instanceof r&&Yn(T.content);if(lt)return f;if(q){if(gt)for(R=In.call(a.ownerDocument);a.firstChild;)R.appendChild(a.firstChild);else R=a;return(S.shadowroot||S.shadowrootmode)&&(R=vn.call(o,R,!0)),R}let D=W?a.outerHTML:a.innerHTML;return W&&_["!doctype"]&&a.ownerDocument&&a.ownerDocument.doctype&&a.ownerDocument.doctype.name&&N(le,a.ownerDocument.doctype.name)&&(D="<!DOCTYPE "+a.ownerDocument.doctype.name+`>
2
- `+D),X&&ut([Gt,$t,Bt],G=>{D=et(D,G," ")}),M&&At?M.createHTML(D):D},t.setConfig=function(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Qt(f),Yt=!0},t.clearConfig=function(){J=null,Yt=!1},t.isValidAttribute=function(f,n,a){J||Qt({});const l=A(f),T=A(n);return ze(l,T,a)},t.addHook=function(f,n){typeof n=="function"&&tt(w[f],n)},t.removeHook=function(f,n){if(n!==void 0){const a=Xe(w[f],n);return a===-1?void 0:qe(w[f],a,1)[0]}return oe(w[f])},t.removeHooks=function(f){w[f]=[]},t.removeAllHooks=function(){w=ue()},t}var me=pe();function he(s,t){let e=s;for(const o of t.split("."))e=e[o];return e}function mn(s,t,e){const o=t.split("."),i=o.length-1;let r=s;o.forEach((c,h)=>{h===i?r[c]=e:r=r[c]})}const hn=new Set(["onblur","onchange","onclick","onfocus","oninput","onkeydown","onreset","onsubmit"]);me.addHook("uponSanitizeAttribute",(s,t)=>{const{attrName:e}=t,o=e.toLowerCase();hn.has(o)&&(t.forceKeepAttr=!0)});class ht extends Error{}const dn=/([a-zA-Z-]+)\s*:\s*([^;}]+)/g,de="a-zA-Z_$",Tn=de+"0-9",st=`[${de}][${Tn}]*`,En=/<!--\s*(.*?)\s*-->/,gn=/<(\w+)(?:\s[^>]*)?>((?:[^<]|<(?!\w))*?)<\/\1>/g,Pt=new RegExp(`^this\\.${st}$`),vt=new RegExp(`this\\.${st}(\\.${st})*`,"g"),Te=new RegExp(`this\\.${st}(\\.${st})*`),An=new Set(["class","style"]),Ee=5;function _n(s){return s instanceof HTMLButtonElement||s instanceof HTMLFieldSetElement||s instanceof HTMLInputElement||s instanceof HTMLSelectElement||s instanceof HTMLTextAreaElement||s instanceof L}function bn(s,t,e){const o=document.createElement(s);if(t)for(const[i,r]of Object.entries(t))o.setAttribute(i,r);return e&&(o.innerHTML=e),o}const Sn=s=>s===String?"":s===Number?0:s===Boolean?!1:s===Array?[]:s===Object?{}:void 0;function xt(s){const t=[];let e=s.firstElementChild;for(;e;)t.push(e),e.shadowRoot&&t.push(...xt(e.shadowRoot)),e.firstElementChild&&t.push(...xt(e)),e=e.nextElementSibling;return t}const dt=s=>s.substring(Ee).split(".")[0];function ge(s,t){let e=s[0];return t.forEach((o,i)=>{e+=o+s[i+1]}),e}function kt(s){const t=typeof s;return t==="string"||t==="number"||t==="boolean"}function rt(s){return s.localName==="textarea"}function Ft(s){const{localName:t}=s;return t==="input"||t==="select"}const yn=s=>s.replace(/<!--[\s\S]*?-->/g,"");function Ae(s,t,e,o){return s.slice(0,t)+o+s.slice(t+e)}function Rn(s){let t=s.trim(),e=null;/^\s*<tr[\s>]/i.test(t)?(t=`<table><tbody>${t}</tbody></table>`,e="tbody"):/^\s*<(td|th)[\s>]/i.test(t)?(t=`<table><tbody><tr>${t}</tr></tbody></table>`,e="tr"):/^\s*<option[\s>]/i.test(t)?(t=`<select>${t}</select>`,e="select"):/^\s*<col[\s>]/i.test(t)&&(t=`<table><colgroup>${t}</colgroup></table>`,e="colgroup");const o=me.sanitize(t,{ADD_TAGS:["#comment"],ALLOW_UNKNOWN_PROTOCOLS:!0,RETURN_DOM_FRAGMENT:!0});if(e){const i=o.querySelector(e);if(i)return i.childNodes}return o.childNodes}function Ut(s){const t=Number(s);if(isNaN(t))throw new ht(`can't convert "${s}" to a number`);return t}function _e(s,t,e){const[o,i]=t.split(":");if(kt(e))if(typeof e=="boolean"){e?s.setAttribute(o,o):s.removeAttribute(o);const r=L.getPropName(o);s[r]=e}else{const r=s.getAttribute(t),c=String(e);r!==c&&(s.setAttribute(o,c),o==="value"&&Ft(s)&&(s.value=c))}else{const r=L.getPropName(t);s[r]=e}}function Ht(s,t,e){const[o,i]=t.split(":");s instanceof CSSStyleRule?s.style.setProperty(o,e):(_e(s,o,e),o==="value"&&Ft(s)&&(s.value=e))}class L extends HTMLElement{static#m=new Map;static#h=new Map;static css="";static formAssociated=!1;static html="";static properties;static propToComputedMap;static propToExprsMap;static template=null;#t=this.constructor;#n=new Map;#c={};#i;#l={};#f=null;#u=new Map;constructor(){super(),this.attachShadow({mode:"open"});const t=this.#t;t.properties||(t.properties={}),t.propToComputedMap||(t.propToComputedMap=new Map),t.propToExprsMap||(t.propToExprsMap=new Map)}attributeChangedCallback(t,e,o){t==="disabled"&&this.#d();const i=L.getPropName(t);if(this.#s(i)){const r=this.#b(i,String(o));this[i]=r;const c=this.#c[i];c&&this.setFormValue(c,String(r)),this.propertyChangedCallback(i,e,o)}}#R(){if(!this.shadowRoot)return;const t=this.#t;let{template:e}=t;if(!e){e=t.template=document.createElement("template");let o=`<style>
3
- :host([hidden]) { display: none; }`;t.css&&(o+=t.css),o+=`</style>
4
- `;let i=t.html.trim();i.startsWith("<")||(i=`<span><!--${i}--></span>`),e.innerHTML=o+i}this.shadowRoot.replaceChildren(e.content.cloneNode(!0))}changed(t,e,o){this[e]=o}connectedCallback(){this.#x(),this.#N(),this.#R(),this.hasAttribute("disabled")&&this.#d(),requestAnimationFrame(()=>{this.shadowRoot&&(this.#y(this.shadowRoot),this.#T(this.shadowRoot)),this.#C()})}#C(){const t=this.#t,{properties:e}=t;for(const[o,{computed:i}]of Object.entries(e))i&&(this[o]=this.#o(i))}#N(){const t=this.#t,{observedAttributes:e,properties:o}=t;for(const[i,r]of Object.entries(o))this.#O(i,r,e)}#O(t,e,o){const i=L.getAttrName(t),r=this.hasAttribute(i);e.required&&!r&&this.#e(this,t,"is a required attribute");let c=e.value;this.hasOwnProperty(t)&&(c=this[t],delete this[t]);const{type:h}=e,u=h===Boolean?c||r:o.includes(i)&&r?this.#_(t,i):c||Sn(h),p="#"+t;this[p]=u,e.computed&&this.#D(t,e),Object.defineProperty(this,t,{enumerable:!0,get(){return this[p]},set(d){h===Number&&typeof d=="string"&&(d=Ut(d));const b=this[p];if(d===b)return;this.#F(t,h,d),this[p]=d;const{state:$,stateProp:U}=this.#t.properties[t];U&&mn($,U,d),this.#P(t),this.#I(t,h,d,i),this.#A(t),this.#v(t,d);const B=this.#c[t];B&&this.setFormValue(B,String(d)),this.propertyChangedCallback(t,b,d),e.dispatch&&this.dispatch("change",{element:this.localName,property:t,oldValue:b,value:d})}})}#d(){const t=this.hasAttribute("disabled"),e=xt(this.shadowRoot);for(const o of e)_n(o)&&(o.disabled=t)}disconnectedCallback(){this.#n.clear(),this.#l.clear(),this.#u.clear()}dispatch(t,e){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:e}))}displayIfSet(t,e="block"){return`display: ${t?e:"none"}`}static elementName(){return this.name.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}#L(t){const e=t instanceof L;for(const o of t.getAttributeNames()){const i=t.getAttribute(o),r=this.#g(t,i);if(r){const c=this[r];c===void 0&&this.#a(t,o,r),t[r]=c;let[h,u]=o.split(":");h==="value"&&(u?(t["on"+u]===void 0&&this.#e(t,o,"refers to an unsupported event name"),t.setAttribute(h,this[r])):u="change"),e&&t.#u.set(L.getPropName(h),r)}this.#r(i,t,o)}}#o(t){const e=new Function("return "+t).call(this);return Array.isArray(e)?e.join(""):e}#M(t){const{localName:e}=t;if(e==="style"){const{sheet:o}=t,i=o?.cssRules??[],r=Array.from(i);for(const c of r)if(c.constructor===CSSStyleRule){const h=Array.from(c.style);for(const u of h)if(u.startsWith("--")){const p=c.style.getPropertyValue(u);this.#r(p,c,u)}}}else{let o="";if(rt(t)){this.#r(t.textContent,t);const i=t.textContent?.match(En);i&&(o=i[1])}else{const i=Array.from(t.childNodes).find(r=>r.nodeType===Node.COMMENT_NODE);i&&(o=i.textContent?.trim()??"")}if(o){const i=this.#g(t,o);i&&rt(t)?t.textContent=this[i]:this.#r(o,t)}}}formAssociatedCallback(){let t=this.getAttribute("form-assoc");if(!t){const c=this.getAttribute("name");if(c)if(this.#s("value"))t=`value:${c}`;else return;else return}const e={},o=t.split(",");for(const c of o){const[h,u]=c.split(":");e[h.trim()]=u.trim()}this.#c=e,this.#i=new FormData,this.#f=this.attachInternals(),this.#f.setFormValue(this.#i);const i=Object.keys(this.#t.properties),r=this.#l;for(const c of i)r[c]=this[c]}formResetCallback(){const t=this.#l;for(const e of Object.keys(t)){let o=t[e];Pt.test(o)&&(o=this.#o(o)),this[e]=o}}static getAttrName(t){let e=L.#h.get(t);return e||(e=t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),L.#h.set(t,e)),e}static getPropName(t){let e=L.#m.get(t);return e||(e=t.replace(/-([a-z])/g,(o,i)=>i.toUpperCase()),L.#m.set(t,e)),e}#w(t,e,o){if(o.length!==1)return;const[i]=o;if(!Pt.test(i))return;const r=Ft(t)||rt(t);let[c,h]=(e??"").split(":");if(!(r&&c==="value"||rt(t)))return;h?t["on"+h]===void 0&&this.#e(t,e,"refers to an unsupported event name"):h="change";const p=dt(i);t.addEventListener(h,d=>{const{target:b}=d;if(!b)return;const $=b.value,{type:U}=this.#t.properties[p];this[p]=U===Number?Ut($):$,this.#A(p)})}#s(t){return!!this.#t.properties[t]}#T(t){const e=Array.from(t.querySelectorAll("*"));for(const o of e)this.#L(o),o.firstElementChild||this.#M(o)}#E(){if(this.#t.formAssociated||this.closest("form")===null)return;const t=this.#t.name;throw new ht(`inside form, class ${t} requires "static formAssociated = true;"`)}static get observedAttributes(){const t=Object.keys(this.properties||{}).map(L.getAttrName);return t.includes("disabled")||t.push("disabled"),t}propertyChangedCallback(t,e,o){}#g(t,e){if(!e||!Pt.test(e))return;const o=dt(e);return this[o]===void 0&&this.#a(t,"",o),o}#A(t){const i=this.#t.propToExprsMap.get(t)||[];for(const r of i){let c=this.#o(r);const h=this.#n.get(r)??[];for(const u of h)if(u instanceof HTMLElement)this.#S(u,c);else if(!(u instanceof CSSStyleRule)){const{element:p,attrName:d}=u;p instanceof CSSStyleRule?p.style.setProperty(d,c):Ht(p,d,c)}}}static register(){const t=this.elementName();customElements.get(t)||customElements.define(t,this)}#D(t,e){const{computed:o,uses:i}=e,r=this.#t.propToComputedMap;function c(u,p){let d=r.get(u);d||(d=[],r.set(u,d)),d.push([t,p])}const h=o.match(vt)||[];for(const u of h){const p=u.substring(Ee);this[p]===void 0&&this.#a(null,t,p),typeof this[p]!="function"&&c(p,o)}if(i)for(const u of i.split(","))c(u,o)}#r(t,e,o=void 0){if(!t)return;const i=this.#p(e,o,t);if(!i){const u=t.replaceAll("this..","this.");o?Ht(e,o,u):"textContent"in e&&(e.textContent=u);return}const r=this.#t;i.forEach(u=>{const p=dt(u);if(typeof this[p]=="function")return;const d=r.propToExprsMap;let b=d.get(p);b||(b=[],d.set(p,b)),b.includes(t)||b.push(t)});for(const[u,p]of this.#n.entries())for(const d of p){const b=d instanceof HTMLElement||d instanceof CSSStyleRule?d:d.element;b instanceof CSSStyleRule||b.isConnected||this.#n.set(u,p.filter($=>$!==d))}let c=this.#n.get(t);c||(c=[],this.#n.set(t,c)),c.push(o?{element:e,attrName:o}:e),e instanceof HTMLElement&&this.#w(e,o,i);const h=this.#o(t);o?Ht(e,o,h):this.#S(e,h)}setAttributeSafe(t,e){this.hasAttribute(t)||this.setAttribute(t,e)}setFormValue(t,e){!this.#i||!kt(e)||(this.#i.set(t,e),this.#f?.setFormValue(this.#i))}#e(t,e,o){const i=this.#t,r=t instanceof HTMLElement?t.localName:"CSS rule";throw new ht(`component ${i.elementName()}`+(t?`, element "${r}"`:"")+(e?`, attribute "${e}"`:"")+` ${o}`)}#a(t,e,o){this.#e(t,e,`refers to missing property "${o}"`)}#_(t,e){return this.#b(t,this.getAttribute(e))}#b(t,e){if(e?.match(vt))return e;const o=this.#t,{type:i}=o.properties[t];if(i||this.#e(null,t,"does not specify its type"),i===String)return e;if(i===Number)return Ut(e);if(i===Boolean)return e==="true"?!0:e==="false"||e==="null"?!1:(e&&e!==t&&this.#e(null,t,"is a Boolean attribute, so its value must match attribute name or be missing"),e===t)}#I(t,e,o,i){if(kt(o)&&this.hasAttribute(i)){const r=e===Boolean?this.hasAttribute(i):this.#_(t,i);o!==r&&_e(this,t,o)}}#P(t){const o=this.#t.propToComputedMap.get(t)||[];for(const[i,r]of o)this[i]=this.#o(r)}#S(t,e){if(e===void 0)return;const o=t instanceof HTMLElement,i=typeof e;if(i!=="string"&&i!=="number"&&this.#e(t,void 0," computed content is not a string or number"),t instanceof HTMLElement&&rt(t))t.value=e;else if(o&&i==="string"&&e.trim().startsWith("<")){const r=Rn(e);t.replaceChildren(...r),this.#y(t),this.#T(t)}else o&&(t.textContent=e)}#v(t,e){const o=this.#u.get(t);if(!o)return;const i=this.getRootNode();if(!(i instanceof ShadowRoot))return;const{host:r}=i;if(!r)return;const c=r;c[o]=e}useState(t,e){if(!e){e={};for(const o of Object.keys(t))e[o]=o}this.#k(t,e);for(const[o,i]of Object.entries(e))if(this.#s(i)){const r=he(t,o);r!==void 0&&(this[i]=r);const c=this.#t.properties[i];c.state=t,c.stateProp=o}t.addListener(this,e)}#x(){const t=this.#t,e=new Set(Object.keys(t.properties));for(const o of e)An.has(o)&&this.#e(null,"",`property "${o}" is not allowed because it is a reserved attribute`);for(const o of this.getAttributeNames())if(o!=="class"&&o!=="id"&&o!=="disabled"&&!o.startsWith("on")){if(o==="form-assoc"){this.#E();continue}if(!e.has(L.getPropName(o))){if(o==="name"){this.#E();continue}this.#e(null,o,"is not a supported attribute")}}}#p(t,e,o){const i=o.match(vt);if(i)return i.forEach(r=>{const c=dt(r);this[c]===void 0&&this.#a(t,e,c)}),i}#k(t,e){for(const[o,i]of Object.entries(e)){let r=he(t,o);if(r===void 0)throw new ht(`invalid state path "${o}"`);r=this[i],this.#s(i)||this.#e(null,i,"refers to missing property in useState map")}}#F(t,e,o){if(o instanceof e)return;let i=typeof o;if(i==="object"){const{constructor:r}=o;i=r.name,r!==e&&this.#e(null,t,`was set to a ${i}, but must be a ${e.name}`)}i!==e.name.toLowerCase()&&this.#e(null,t,`was set to a ${i}, but must be a ${e.name}`)}#y(t){const e=Array.from(t.querySelectorAll("*"));for(const o of e){const i=[];for(const r of Array.from(o.attributes)){const c=r.name;if(c.startsWith("on")){let h=c.slice(2);h=h[0].toLowerCase()+h.slice(1).toLowerCase();const u=r.value;this.#p(o,c,u);let p;typeof this[u]=="function"?p=d=>this[u](d):(this.#p(o,c,u),p=()=>this.#o(u)),o.addEventListener(h,p),i.push(c)}}for(const r of i)o.removeAttribute(r)}}}function Cn(s,...t){let e=ge(s,t);for(;;){const o=dn.exec(e);if(!o)break;const i=o[2];if(Te.test(i)){const r=o[1];if(!r.startsWith("--")){const c=`--${r}: ${i};
5
- ${r}: var(--${r})`;e=Ae(e,o.index,o[0].length,c)}}}return e}function Nn(s,...t){let e=ge(s,t);for(;;){const o=gn.exec(e);if(!o||o[1]==="style")break;const i=yn(o[2]);if(Te.test(i)){const r=`<!-- ${i.trim()} -->`,c=o.index+o[0].indexOf(">")+1;e=Ae(e,c,i.length,r)}}return e}F.Wrec=L,F.createElement=bn,F.css=Cn,F.html=Nn,Object.defineProperty(F,Symbol.toStringTag,{value:"Module"})}));
1
+ (function(T,E){typeof exports=="object"&&typeof module<"u"?E(exports):typeof define=="function"&&define.amd?define(["exports"],E):(T=typeof globalThis<"u"?globalThis:T||self,E(T.wrec={}))})(this,(function(T){"use strict";var fn=T=>{throw TypeError(T)};var ge=(T,E,N)=>E.has(T)||fn("Cannot "+N);var w=(T,E,N)=>(ge(T,E,"read from private field"),N?N.call(T):E.get(T)),q=(T,E,N)=>E.has(T)?fn("Cannot add the same private member more than once"):E instanceof WeakSet?E.add(T):E.set(T,N),at=(T,E,N,bt)=>(ge(T,E,"write to private field"),bt?bt.call(T,N):E.set(T,N),N),un=(T,E,N)=>(ge(T,E,"access private method"),N);var K,Mt,H,dt,Tt,Y,Dt,pn;const{entries:E,setPrototypeOf:N,isFrozen:bt,getPrototypeOf:mn,getOwnPropertyDescriptor:hn}=Object;let{freeze:L,seal:k,create:zt}=Object,{apply:$t,construct:Wt}=typeof Reflect<"u"&&Reflect;L||(L=function(t){return t}),k||(k=function(t){return t}),$t||($t=function(t,e){for(var n=arguments.length,s=new Array(n>2?n-2:0),i=2;i<n;i++)s[i-2]=arguments[i];return t.apply(e,s)}),Wt||(Wt=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),s=1;s<e;s++)n[s-1]=arguments[s];return new t(...n)});const St=D(Array.prototype.forEach),dn=D(Array.prototype.lastIndexOf),Ee=D(Array.prototype.pop),ct=D(Array.prototype.push),Tn=D(Array.prototype.splice),yt=D(String.prototype.toLowerCase),Gt=D(String.prototype.toString),Bt=D(String.prototype.match),lt=D(String.prototype.replace),gn=D(String.prototype.indexOf),En=D(String.prototype.trim),F=D(Object.prototype.hasOwnProperty),M=D(RegExp.prototype.test),ft=An(TypeError);function D(r){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var e=arguments.length,n=new Array(e>1?e-1:0),s=1;s<e;s++)n[s-1]=arguments[s];return $t(r,t,n)}}function An(r){return function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return Wt(r,e)}}function d(r,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:yt;N&&N(r,null);let n=t.length;for(;n--;){let s=t[n];if(typeof s=="string"){const i=e(s);i!==s&&(bt(t)||(t[n]=i),s=i)}r[s]=!0}return r}function _n(r){for(let t=0;t<r.length;t++)F(r,t)||(r[t]=null);return r}function U(r){const t=zt(null);for(const[e,n]of E(r))F(r,e)&&(Array.isArray(n)?t[e]=_n(n):n&&typeof n=="object"&&n.constructor===Object?t[e]=U(n):t[e]=n);return t}function ut(r,t){for(;r!==null;){const n=hn(r,t);if(n){if(n.get)return D(n.get);if(typeof n.value=="function")return D(n.value)}r=mn(r)}function e(){return null}return e}const Ae=L(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),jt=L(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Yt=L(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),bn=L(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Vt=L(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Sn=L(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),_e=L(["#text"]),be=L(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Xt=L(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Se=L(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Rt=L(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),yn=k(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Rn=k(/<%[\w\W]*|[\w\W]*%>/gm),On=k(/\$\{[\w\W]*/gm),wn=k(/^data-[\-\w.\u00B7-\uFFFF]+$/),Cn=k(/^aria-[\-\w]+$/),ye=k(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Nn=k(/^(?:\w+script|data):/i),Ln=k(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Re=k(/^html$/i),Mn=k(/^[a-z][.\w]*(-[.\w]+)+$/i);var Oe=Object.freeze({__proto__:null,ARIA_ATTR:Cn,ATTR_WHITESPACE:Ln,CUSTOM_ELEMENT:Mn,DATA_ATTR:wn,DOCTYPE_NAME:Re,ERB_EXPR:Rn,IS_ALLOWED_URI:ye,IS_SCRIPT_OR_DATA:Nn,MUSTACHE_EXPR:yn,TMPLIT_EXPR:On});const pt={element:1,text:3,progressingInstruction:7,comment:8,document:9},Dn=function(){return typeof window>"u"?null:window},In=function(t,e){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null;const s="data-tt-policy-suffix";e&&e.hasAttribute(s)&&(n=e.getAttribute(s));const i="dompurify"+(n?"#"+n:"");try{return t.createPolicy(i,{createHTML(c){return c},createScriptURL(c){return c}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}},we=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Ce(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Dn();const t=f=>Ce(f);if(t.version="3.3.1",t.removed=[],!r||!r.document||r.document.nodeType!==pt.document||!r.Element)return t.isSupported=!1,t;let{document:e}=r;const n=e,s=n.currentScript,{DocumentFragment:i,HTMLTemplateElement:c,Node:u,Element:p,NodeFilter:m,NamedNodeMap:h=r.NamedNodeMap||r.MozNamedAttrMap,HTMLFormElement:y,DOMParser:V,trustedTypes:W}=r,X=p.prototype,Xn=ut(X,"cloneNode"),qn=ut(X,"remove"),Kn=ut(X,"nextSibling"),Zn=ut(X,"childNodes"),It=ut(X,"parentNode");if(typeof c=="function"){const f=e.createElement("template");f.content&&f.content.ownerDocument&&(e=f.content.ownerDocument)}let v,gt="";const{implementation:ee,createNodeIterator:Jn,createDocumentFragment:Qn,getElementsByTagName:to}=e,{importNode:eo}=n;let P=we();t.isSupported=typeof E=="function"&&typeof It=="function"&&ee&&ee.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:ne,ERB_EXPR:oe,TMPLIT_EXPR:se,DATA_ATTR:no,ARIA_ATTR:oo,IS_SCRIPT_OR_DATA:so,ATTR_WHITESPACE:He,CUSTOM_ELEMENT:io}=Oe;let{IS_ALLOWED_URI:ze}=Oe,S=null;const $e=d({},[...Ae,...jt,...Yt,...Vt,..._e]);let R=null;const We=d({},[...be,...Xt,...Se,...Rt]);let A=Object.seal(zt(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Et=null,ie=null;const tt=Object.seal(zt(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ge=!0,re=!0,Be=!1,je=!0,et=!1,vt=!0,Z=!1,ae=!1,ce=!1,nt=!1,Pt=!1,xt=!1,Ye=!0,Ve=!1;const ro="user-content-";let le=!0,At=!1,ot={},z=null;const fe=d({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Xe=null;const qe=d({},["audio","video","img","source","image","track"]);let ue=null;const Ke=d({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),kt="http://www.w3.org/1998/Math/MathML",Ft="http://www.w3.org/2000/svg",G="http://www.w3.org/1999/xhtml";let st=G,pe=!1,me=null;const ao=d({},[kt,Ft,G],Gt);let Ut=d({},["mi","mo","mn","ms","mtext"]),Ht=d({},["annotation-xml"]);const co=d({},["title","style","font","a","script"]);let _t=null;const lo=["application/xhtml+xml","text/html"],fo="text/html";let b=null,it=null;const uo=e.createElement("form"),Ze=function(o){return o instanceof RegExp||o instanceof Function},he=function(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(it&&it===o)){if((!o||typeof o!="object")&&(o={}),o=U(o),_t=lo.indexOf(o.PARSER_MEDIA_TYPE)===-1?fo:o.PARSER_MEDIA_TYPE,b=_t==="application/xhtml+xml"?Gt:yt,S=F(o,"ALLOWED_TAGS")?d({},o.ALLOWED_TAGS,b):$e,R=F(o,"ALLOWED_ATTR")?d({},o.ALLOWED_ATTR,b):We,me=F(o,"ALLOWED_NAMESPACES")?d({},o.ALLOWED_NAMESPACES,Gt):ao,ue=F(o,"ADD_URI_SAFE_ATTR")?d(U(Ke),o.ADD_URI_SAFE_ATTR,b):Ke,Xe=F(o,"ADD_DATA_URI_TAGS")?d(U(qe),o.ADD_DATA_URI_TAGS,b):qe,z=F(o,"FORBID_CONTENTS")?d({},o.FORBID_CONTENTS,b):fe,Et=F(o,"FORBID_TAGS")?d({},o.FORBID_TAGS,b):U({}),ie=F(o,"FORBID_ATTR")?d({},o.FORBID_ATTR,b):U({}),ot=F(o,"USE_PROFILES")?o.USE_PROFILES:!1,Ge=o.ALLOW_ARIA_ATTR!==!1,re=o.ALLOW_DATA_ATTR!==!1,Be=o.ALLOW_UNKNOWN_PROTOCOLS||!1,je=o.ALLOW_SELF_CLOSE_IN_ATTR!==!1,et=o.SAFE_FOR_TEMPLATES||!1,vt=o.SAFE_FOR_XML!==!1,Z=o.WHOLE_DOCUMENT||!1,nt=o.RETURN_DOM||!1,Pt=o.RETURN_DOM_FRAGMENT||!1,xt=o.RETURN_TRUSTED_TYPE||!1,ce=o.FORCE_BODY||!1,Ye=o.SANITIZE_DOM!==!1,Ve=o.SANITIZE_NAMED_PROPS||!1,le=o.KEEP_CONTENT!==!1,At=o.IN_PLACE||!1,ze=o.ALLOWED_URI_REGEXP||ye,st=o.NAMESPACE||G,Ut=o.MATHML_TEXT_INTEGRATION_POINTS||Ut,Ht=o.HTML_INTEGRATION_POINTS||Ht,A=o.CUSTOM_ELEMENT_HANDLING||{},o.CUSTOM_ELEMENT_HANDLING&&Ze(o.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(A.tagNameCheck=o.CUSTOM_ELEMENT_HANDLING.tagNameCheck),o.CUSTOM_ELEMENT_HANDLING&&Ze(o.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(A.attributeNameCheck=o.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),o.CUSTOM_ELEMENT_HANDLING&&typeof o.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(A.allowCustomizedBuiltInElements=o.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),et&&(re=!1),Pt&&(nt=!0),ot&&(S=d({},_e),R=[],ot.html===!0&&(d(S,Ae),d(R,be)),ot.svg===!0&&(d(S,jt),d(R,Xt),d(R,Rt)),ot.svgFilters===!0&&(d(S,Yt),d(R,Xt),d(R,Rt)),ot.mathMl===!0&&(d(S,Vt),d(R,Se),d(R,Rt))),o.ADD_TAGS&&(typeof o.ADD_TAGS=="function"?tt.tagCheck=o.ADD_TAGS:(S===$e&&(S=U(S)),d(S,o.ADD_TAGS,b))),o.ADD_ATTR&&(typeof o.ADD_ATTR=="function"?tt.attributeCheck=o.ADD_ATTR:(R===We&&(R=U(R)),d(R,o.ADD_ATTR,b))),o.ADD_URI_SAFE_ATTR&&d(ue,o.ADD_URI_SAFE_ATTR,b),o.FORBID_CONTENTS&&(z===fe&&(z=U(z)),d(z,o.FORBID_CONTENTS,b)),o.ADD_FORBID_CONTENTS&&(z===fe&&(z=U(z)),d(z,o.ADD_FORBID_CONTENTS,b)),le&&(S["#text"]=!0),Z&&d(S,["html","head","body"]),S.table&&(d(S,["tbody"]),delete Et.tbody),o.TRUSTED_TYPES_POLICY){if(typeof o.TRUSTED_TYPES_POLICY.createHTML!="function")throw ft('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof o.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ft('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');v=o.TRUSTED_TYPES_POLICY,gt=v.createHTML("")}else v===void 0&&(v=In(W,s)),v!==null&&typeof gt=="string"&&(gt=v.createHTML(""));L&&L(o),it=o}},Je=d({},[...jt,...Yt,...bn]),Qe=d({},[...Vt,...Sn]),po=function(o){let a=It(o);(!a||!a.tagName)&&(a={namespaceURI:st,tagName:"template"});const l=yt(o.tagName),g=yt(a.tagName);return me[o.namespaceURI]?o.namespaceURI===Ft?a.namespaceURI===G?l==="svg":a.namespaceURI===kt?l==="svg"&&(g==="annotation-xml"||Ut[g]):!!Je[l]:o.namespaceURI===kt?a.namespaceURI===G?l==="math":a.namespaceURI===Ft?l==="math"&&Ht[g]:!!Qe[l]:o.namespaceURI===G?a.namespaceURI===Ft&&!Ht[g]||a.namespaceURI===kt&&!Ut[g]?!1:!Qe[l]&&(co[l]||!Je[l]):!!(_t==="application/xhtml+xml"&&me[o.namespaceURI]):!1},$=function(o){ct(t.removed,{element:o});try{It(o).removeChild(o)}catch{qn(o)}},J=function(o,a){try{ct(t.removed,{attribute:a.getAttributeNode(o),from:a})}catch{ct(t.removed,{attribute:null,from:a})}if(a.removeAttribute(o),o==="is")if(nt||Pt)try{$(a)}catch{}else try{a.setAttribute(o,"")}catch{}},tn=function(o){let a=null,l=null;if(ce)o="<remove></remove>"+o;else{const _=Bt(o,/^[\r\n\t ]+/);l=_&&_[0]}_t==="application/xhtml+xml"&&st===G&&(o='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+o+"</body></html>");const g=v?v.createHTML(o):o;if(st===G)try{a=new V().parseFromString(g,_t)}catch{}if(!a||!a.documentElement){a=ee.createDocument(st,"template",null);try{a.documentElement.innerHTML=pe?gt:g}catch{}}const C=a.body||a.documentElement;return o&&l&&C.insertBefore(e.createTextNode(l),C.childNodes[0]||null),st===G?to.call(a,Z?"html":"body")[0]:Z?a.documentElement:C},en=function(o){return Jn.call(o.ownerDocument||o,o,m.SHOW_ELEMENT|m.SHOW_COMMENT|m.SHOW_TEXT|m.SHOW_PROCESSING_INSTRUCTION|m.SHOW_CDATA_SECTION,null)},de=function(o){return o instanceof y&&(typeof o.nodeName!="string"||typeof o.textContent!="string"||typeof o.removeChild!="function"||!(o.attributes instanceof h)||typeof o.removeAttribute!="function"||typeof o.setAttribute!="function"||typeof o.namespaceURI!="string"||typeof o.insertBefore!="function"||typeof o.hasChildNodes!="function")},nn=function(o){return typeof u=="function"&&o instanceof u};function B(f,o,a){St(f,l=>{l.call(t,o,a,it)})}const on=function(o){let a=null;if(B(P.beforeSanitizeElements,o,null),de(o))return $(o),!0;const l=b(o.nodeName);if(B(P.uponSanitizeElement,o,{tagName:l,allowedTags:S}),vt&&o.hasChildNodes()&&!nn(o.firstElementChild)&&M(/<[/\w!]/g,o.innerHTML)&&M(/<[/\w!]/g,o.textContent)||o.nodeType===pt.progressingInstruction||vt&&o.nodeType===pt.comment&&M(/<[/\w]/g,o.data))return $(o),!0;if(!(tt.tagCheck instanceof Function&&tt.tagCheck(l))&&(!S[l]||Et[l])){if(!Et[l]&&rn(l)&&(A.tagNameCheck instanceof RegExp&&M(A.tagNameCheck,l)||A.tagNameCheck instanceof Function&&A.tagNameCheck(l)))return!1;if(le&&!z[l]){const g=It(o)||o.parentNode,C=Zn(o)||o.childNodes;if(C&&g){const _=C.length;for(let x=_-1;x>=0;--x){const j=Xn(C[x],!0);j.__removalCount=(o.__removalCount||0)+1,g.insertBefore(j,Kn(o))}}}return $(o),!0}return o instanceof p&&!po(o)||(l==="noscript"||l==="noembed"||l==="noframes")&&M(/<\/no(script|embed|frames)/i,o.innerHTML)?($(o),!0):(et&&o.nodeType===pt.text&&(a=o.textContent,St([ne,oe,se],g=>{a=lt(a,g," ")}),o.textContent!==a&&(ct(t.removed,{element:o.cloneNode()}),o.textContent=a)),B(P.afterSanitizeElements,o,null),!1)},sn=function(o,a,l){if(Ye&&(a==="id"||a==="name")&&(l in e||l in uo))return!1;if(!(re&&!ie[a]&&M(no,a))){if(!(Ge&&M(oo,a))){if(!(tt.attributeCheck instanceof Function&&tt.attributeCheck(a,o))){if(!R[a]||ie[a]){if(!(rn(o)&&(A.tagNameCheck instanceof RegExp&&M(A.tagNameCheck,o)||A.tagNameCheck instanceof Function&&A.tagNameCheck(o))&&(A.attributeNameCheck instanceof RegExp&&M(A.attributeNameCheck,a)||A.attributeNameCheck instanceof Function&&A.attributeNameCheck(a,o))||a==="is"&&A.allowCustomizedBuiltInElements&&(A.tagNameCheck instanceof RegExp&&M(A.tagNameCheck,l)||A.tagNameCheck instanceof Function&&A.tagNameCheck(l))))return!1}else if(!ue[a]){if(!M(ze,lt(l,He,""))){if(!((a==="src"||a==="xlink:href"||a==="href")&&o!=="script"&&gn(l,"data:")===0&&Xe[o])){if(!(Be&&!M(so,lt(l,He,"")))){if(l)return!1}}}}}}}return!0},rn=function(o){return o!=="annotation-xml"&&Bt(o,io)},an=function(o){B(P.beforeSanitizeAttributes,o,null);const{attributes:a}=o;if(!a||de(o))return;const l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:R,forceKeepAttr:void 0};let g=a.length;for(;g--;){const C=a[g],{name:_,namespaceURI:x,value:j}=C,rt=b(_),Te=j;let O=_==="value"?Te:En(Te);if(l.attrName=rt,l.attrValue=O,l.keepAttr=!0,l.forceKeepAttr=void 0,B(P.uponSanitizeAttribute,o,l),O=l.attrValue,Ve&&(rt==="id"||rt==="name")&&(J(_,o),O=ro+O),vt&&M(/((--!?|])>)|<\/(style|title|textarea)/i,O)){J(_,o);continue}if(rt==="attributename"&&Bt(O,"href")){J(_,o);continue}if(l.forceKeepAttr)continue;if(!l.keepAttr){J(_,o);continue}if(!je&&M(/\/>/i,O)){J(_,o);continue}et&&St([ne,oe,se],ln=>{O=lt(O,ln," ")});const cn=b(o.nodeName);if(!sn(cn,rt,O)){J(_,o);continue}if(v&&typeof W=="object"&&typeof W.getAttributeType=="function"&&!x)switch(W.getAttributeType(cn,rt)){case"TrustedHTML":{O=v.createHTML(O);break}case"TrustedScriptURL":{O=v.createScriptURL(O);break}}if(O!==Te)try{x?o.setAttributeNS(x,_,O):o.setAttribute(_,O),de(o)?$(o):Ee(t.removed)}catch{J(_,o)}}B(P.afterSanitizeAttributes,o,null)},mo=function f(o){let a=null;const l=en(o);for(B(P.beforeSanitizeShadowDOM,o,null);a=l.nextNode();)B(P.uponSanitizeShadowNode,a,null),on(a),an(a),a.content instanceof i&&f(a.content);B(P.afterSanitizeShadowDOM,o,null)};return t.sanitize=function(f){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=null,l=null,g=null,C=null;if(pe=!f,pe&&(f="<!-->"),typeof f!="string"&&!nn(f))if(typeof f.toString=="function"){if(f=f.toString(),typeof f!="string")throw ft("dirty is not a string, aborting")}else throw ft("toString is not a function");if(!t.isSupported)return f;if(ae||he(o),t.removed=[],typeof f=="string"&&(At=!1),At){if(f.nodeName){const j=b(f.nodeName);if(!S[j]||Et[j])throw ft("root node is forbidden and cannot be sanitized in-place")}}else if(f instanceof u)a=tn("<!---->"),l=a.ownerDocument.importNode(f,!0),l.nodeType===pt.element&&l.nodeName==="BODY"||l.nodeName==="HTML"?a=l:a.appendChild(l);else{if(!nt&&!et&&!Z&&f.indexOf("<")===-1)return v&&xt?v.createHTML(f):f;if(a=tn(f),!a)return nt?null:xt?gt:""}a&&ce&&$(a.firstChild);const _=en(At?f:a);for(;g=_.nextNode();)on(g),an(g),g.content instanceof i&&mo(g.content);if(At)return f;if(nt){if(Pt)for(C=Qn.call(a.ownerDocument);a.firstChild;)C.appendChild(a.firstChild);else C=a;return(R.shadowroot||R.shadowrootmode)&&(C=eo.call(n,C,!0)),C}let x=Z?a.outerHTML:a.innerHTML;return Z&&S["!doctype"]&&a.ownerDocument&&a.ownerDocument.doctype&&a.ownerDocument.doctype.name&&M(Re,a.ownerDocument.doctype.name)&&(x="<!DOCTYPE "+a.ownerDocument.doctype.name+`>
2
+ `+x),et&&St([ne,oe,se],j=>{x=lt(x,j," ")}),v&&xt?v.createHTML(x):x},t.setConfig=function(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};he(f),ae=!0},t.clearConfig=function(){it=null,ae=!1},t.isValidAttribute=function(f,o,a){it||he({});const l=b(f),g=b(o);return sn(l,g,a)},t.addHook=function(f,o){typeof o=="function"&&ct(P[f],o)},t.removeHook=function(f,o){if(o!==void 0){const a=dn(P[f],o);return a===-1?void 0:Tn(P[f],a,1)[0]}return Ee(P[f])},t.removeHooks=function(f){P[f]=[]},t.removeAllHooks=function(){P=we()},t}var Ne=Ce();function Le(r,t){let e=r;for(const n of t.split("."))e=e[n];return e}function vn(r,t,e){const n=t.split("."),s=n.length-1;let i=r;n.forEach((c,u)=>{u===s?i[c]=e:i=i[c]})}function Me(r,t,e=""){const n=new WeakMap,s={get(i,c){const u=Reflect.get(i,c);if(u===null||typeof u!="object")return u;const p=n.get(u);if(p)return p;const m=e?`${e}.${c}`:c,h=Me(u,t,m);return n.set(u,h),h},set(i,c,u){const p=Reflect.get(i,c);if(p!==u){Reflect.set(i,c,u);const m=e?`${e}.${c}`:c;t(m,p,u)}return!0}};return new Proxy(r,s)}function De(r){const t={};for(const[e,n]of Object.entries(r)){const s=typeof n=="object"&&n!==null;t[e]=s?De(n):n}return t}const Ot=typeof window<"u"&&typeof window.document<"u";let Ie=class extends Error{};const Q=class Q{constructor(t,e,n){q(this,Dt);q(this,Mt,Symbol("objectId"));q(this,H,[]);q(this,dt);q(this,Tt);q(this,Y);if(!t)throw new Ie("name cannot be empty");if(w(Q,K).has(t))throw new Ie(`WrecState with name "${t}" already exists`);if(at(this,dt,t),at(this,Tt,e),at(this,Y,Me({},un(this,Dt,pn).bind(this))),e&&Ot){const s=sessionStorage.getItem("wrec-state-"+t),i=s?JSON.parse(s):void 0;i&&(n=i)}if(n)for(const[s,i]of Object.entries(n))this.addProperty(s,i);w(Q,K).set(t,this)}static get(t){return w(this,K).get(t)}addListener(t,e={}){const n=w(this,H).find(s=>s.listenerRef.deref()===t);if(n){const{propertyMap:s}=n;for(const[i,c]of Object.entries(e))s[i]=c}else w(this,H).push({listenerRef:new WeakRef(t),propertyMap:e})}addProperty(t,e){Object.defineProperty(this,t,{enumerable:!0,get(){return w(this,Y)[t]},set(n){w(this,Y)[t]=n}}),w(this,Y)[t]=e}get id(){return w(this,Mt)}log(){console.log("WrecState:",w(this,dt));for(const[t,e]of Object.entries(w(this,Y)))console.log(` ${t} = ${JSON.stringify(e)}`)}removeListener(t){at(this,H,w(this,H).filter(e=>e.listenerRef.deref()!==t))}};K=new WeakMap,Mt=new WeakMap,H=new WeakMap,dt=new WeakMap,Tt=new WeakMap,Y=new WeakMap,Dt=new WeakSet,pn=function(t,e,n){const s=new Set;for(const i of w(this,H)){const c=i.listenerRef.deref();if(!c)s.add(i);else if(Ot&&c instanceof HTMLElement&&!c.isConnected)s.add(i);else{const{propertyMap:u}=i,p=Object.keys(u);(p.length===0||p.includes(t))&&c.changed(t,u[t],n,e,this)}}at(this,H,w(this,H).filter(i=>!s.has(i)))},q(Q,K,new Map),Ot&&window.addEventListener("beforeunload",()=>{for(const[t,e]of w(Q,K).entries())if(w(e,Tt)){const n=De(e);sessionStorage.setItem("wrec-state-"+t,JSON.stringify(n))}});let wt=Q;Ot&&process.env.NODE_ENV==="development"&&(window.WrecState=wt);const Pn=new Set(["onblur","onchange","onclick","onfocus","oninput","onkeydown","onreset","onsubmit"]);Ne.addHook("uponSanitizeAttribute",(r,t)=>{const{attrName:e}=t,n=e.toLowerCase();Pn.has(n)&&(t.forceKeepAttr=!0)});class Ct extends Error{}const xn=/([a-zA-Z-]+)\s*:\s*([^;}]+)/g,ve="a-zA-Z_$",kn=ve+"0-9",mt=`[${ve}][${kn}]*`,Fn=/<!--\s*(.*?)\s*-->/,Un=/<(\w+)(?:\s[^>]*)?>((?:[^<]|<(?!\w))*?)<\/\1>/g,qt=new RegExp(`^this\\.${mt}$`),Kt=new RegExp(`this\\.${mt}(\\.${mt})*`,"g"),Pe=new RegExp(`this\\.${mt}(\\.${mt})*`),Hn=new Set(["class","style"]),xe=5;function zn(r){return r instanceof HTMLButtonElement||r instanceof HTMLFieldSetElement||r instanceof HTMLInputElement||r instanceof HTMLSelectElement||r instanceof HTMLTextAreaElement||r instanceof I}function $n(r,t,e){const n=document.createElement(r);if(t)for(const[s,i]of Object.entries(t))n.setAttribute(s,i);return e&&(n.innerHTML=e),n}const Wn=r=>r===String?"":r===Number?0:r===Boolean?!1:r===Array?[]:r===Object?{}:void 0;function Nt(r){const t=[];let e=r.firstElementChild;for(;e;)t.push(e),e.shadowRoot&&t.push(...Nt(e.shadowRoot)),e.firstElementChild&&t.push(...Nt(e)),e=e.nextElementSibling;return t}const Lt=r=>r.substring(xe).split(".")[0];function ke(r,t){let e=r[0];return t.forEach((n,s)=>{e+=n+r[s+1]}),e}function Zt(r){const t=typeof r;return t==="string"||t==="number"||t==="boolean"}function ht(r){return r.localName==="textarea"}function Jt(r){const{localName:t}=r;return t==="input"||t==="select"}const Gn=r=>r.replace(/<!--[\s\S]*?-->/g,"");function Fe(r,t,e,n){return r.slice(0,t)+n+r.slice(t+e)}function Bn(r){let t=r.trim(),e=null;/^\s*<tr[\s>]/i.test(t)?(t=`<table><tbody>${t}</tbody></table>`,e="tbody"):/^\s*<(td|th)[\s>]/i.test(t)?(t=`<table><tbody><tr>${t}</tr></tbody></table>`,e="tr"):/^\s*<option[\s>]/i.test(t)?(t=`<select>${t}</select>`,e="select"):/^\s*<col[\s>]/i.test(t)&&(t=`<table><colgroup>${t}</colgroup></table>`,e="colgroup");const n=Ne.sanitize(t,{ADD_TAGS:["#comment"],ALLOW_UNKNOWN_PROTOCOLS:!0,RETURN_DOM_FRAGMENT:!0});if(e){const s=n.querySelector(e);if(s)return s.childNodes}return n.childNodes}function Qt(r){const t=Number(r);if(isNaN(t))throw new Ct(`can't convert "${r}" to a number`);return t}function Ue(r,t,e){const[n,s]=t.split(":");if(Zt(e))if(typeof e=="boolean"){e?r.setAttribute(n,n):r.removeAttribute(n);const i=I.getPropName(n);r[i]=e}else{const i=r.getAttribute(t),c=String(e);i!==c&&(r.setAttribute(n,c),n==="value"&&Jt(r)&&(r.value=c))}else{const i=I.getPropName(t);r[i]=e}}function te(r,t,e){const[n,s]=t.split(":");r instanceof CSSStyleRule?r.style.setProperty(n,e):(Ue(r,n,e),n==="value"&&Jt(r)&&(r.value=e))}function jn(r){const t=new Set;for(const n of Nt(r)){const{localName:s}=n;s.includes("-")&&t.add(s)}const e=[...t].map(n=>customElements.whenDefined(n));return Promise.all(e)}class I extends HTMLElement{static#m=new Map;static#h=new Map;static css="";static formAssociated=!1;static html="";static properties;static propToComputedMap;static propToExprsMap;static template=null;#t=this.constructor;#n=new Map;#c={};#s;#l={};#f=null;#u=new Map;constructor(){super(),this.attachShadow({mode:"open"});const t=this.#t;t.properties||(t.properties={}),t.propToComputedMap||(t.propToComputedMap=new Map),t.propToExprsMap||(t.propToExprsMap=new Map)}attributeChangedCallback(t,e,n){t==="disabled"&&this.#d();const s=I.getPropName(t);if(this.#i(s)){const i=this.#b(s,String(n));this[s]=i;const c=this.#c[s];c&&this.setFormValue(c,String(i)),this.propertyChangedCallback(s,e,n)}}async#R(){const t=this.#t;let{template:e}=t;if(!e){e=t.template=document.createElement("template");let n=`<style>
3
+ :host([hidden]) { display: none; }`;t.css&&(n+=t.css),n+=`</style>
4
+ `;let s=t.html.trim();s.startsWith("<")||(s=`<span><!--${s}--></span>`),e.innerHTML=n+s}await jn(e),this.shadowRoot.replaceChildren(e.content.cloneNode(!0))}changed(t,e,n){this[e]=n}connectedCallback(){this.#x(),this.#w(),this.#R().then(()=>{this.hasAttribute("disabled")&&this.#d(),requestAnimationFrame(()=>{this.#y(this.shadowRoot),this.#T(this.shadowRoot),this.#O()})})}#O(){const t=this.#t,{properties:e}=t;for(const[n,{computed:s}]of Object.entries(e))s&&(this[n]=this.#o(s))}#w(){const t=this.#t,{observedAttributes:e,properties:n}=t;for(const[s,i]of Object.entries(n))this.#C(s,i,e)}#C(t,e,n){const s=I.getAttrName(t),i=this.hasAttribute(s);e.required&&!i&&this.#e(this,t,"is a required attribute");let c=e.value;this.hasOwnProperty(t)&&(c=this[t],delete this[t]);const{type:u}=e,p=u===Boolean?c||i:n.includes(s)&&i?this.#_(t,s):c||Wn(u),m="#"+t;this[m]=p,e.computed&&this.#D(t,e),Object.defineProperty(this,t,{enumerable:!0,get(){return this[m]},set(h){u===Number&&typeof h=="string"&&(h=Qt(h));const y=this[m];if(h===y)return;this.#F(t,u,h),this[m]=h;const{state:V,stateProp:W}=this.#t.properties[t];W&&vn(V,W,h),this.#v(t),this.#I(t,u,h,s),this.#A(t),this.#P(t,h);const X=this.#c[t];X&&this.setFormValue(X,String(h)),this.propertyChangedCallback(t,y,h),e.dispatch&&this.dispatch("change",{tagName:this.localName,property:t,oldValue:y,value:h})}})}#d(){const t=this.hasAttribute("disabled"),e=Nt(this.shadowRoot);for(const n of e)zn(n)&&(n.disabled=t)}disconnectedCallback(){this.#n.clear(),this.#l.clear(),this.#u.clear()}dispatch(t,e){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:e}))}displayIfSet(t,e="block"){return`display: ${t?e:"none"}`}static elementName(){return this.name.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}#N(t){const e=t instanceof I;for(const n of t.getAttributeNames()){const s=t.getAttribute(n),i=this.#E(t,s);if(i){const c=this[i];c===void 0&&this.#a(t,n,i),t[i]=c;let[u,p]=n.split(":");u==="value"&&(p?(t["on"+p]===void 0&&this.#e(t,n,"refers to an unsupported event name"),t.setAttribute(u,this[i])):p="change"),e&&t.#u.set(I.getPropName(u),i)}this.#r(s,t,n)}}#o(t){const e=new Function("return "+t).call(this);return Array.isArray(e)?e.join(""):e}#L(t){const{localName:e}=t;if(e==="style"){const{sheet:n}=t,s=n?.cssRules??[],i=Array.from(s);for(const c of i)if(c.constructor===CSSStyleRule){const u=Array.from(c.style);for(const p of u)if(p.startsWith("--")){const m=c.style.getPropertyValue(p);this.#r(m,c,p)}}}else{let n="";if(ht(t)){this.#r(t.textContent,t);const s=t.textContent?.match(Fn);s&&(n=s[1])}else{const s=Array.from(t.childNodes).find(i=>i.nodeType===Node.COMMENT_NODE);s&&(n=s.textContent?.trim()??"")}if(n){const s=this.#E(t,n);s&&ht(t)?t.textContent=this[s]:this.#r(n,t)}}}formAssociatedCallback(){let t=this.getAttribute("form-assoc");if(!t){const c=this.getAttribute("name");if(c)if(this.#i("value"))t=`value:${c}`;else return;else return}const e={},n=t.split(",");for(const c of n){const[u,p]=c.split(":");e[u.trim()]=p.trim()}this.#c=e,this.#s=new FormData,this.#f=this.attachInternals(),this.#f.setFormValue(this.#s);const s=Object.keys(this.#t.properties),i=this.#l;for(const c of s)i[c]=this[c]}formResetCallback(){const t=this.#l;for(const e of Object.keys(t)){let n=t[e];qt.test(n)&&(n=this.#o(n)),this[e]=n}}static getAttrName(t){let e=I.#h.get(t);return e||(e=t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),I.#h.set(t,e)),e}static getPropName(t){let e=I.#m.get(t);return e||(e=t.replace(/-([a-z])/g,(n,s)=>s.toUpperCase()),I.#m.set(t,e)),e}#M(t,e,n){if(n.length!==1)return;const[s]=n;if(!qt.test(s))return;const i=Jt(t)||ht(t);let[c,u]=(e??"").split(":");if(!(i&&c==="value"||ht(t)))return;u?t["on"+u]===void 0&&this.#e(t,e,"refers to an unsupported event name"):u="change";const m=Lt(s);t.addEventListener(u,h=>{const{target:y}=h;if(!y)return;const V=y.value,{type:W}=this.#t.properties[m];this[m]=W===Number?Qt(V):V,this.#A(m)})}#i(t){return!!this.#t.properties[t]}#T(t){const e=Array.from(t.querySelectorAll("*"));for(const n of e)this.#N(n),n.firstElementChild||this.#L(n)}#g(){if(this.#t.formAssociated||this.closest("form")===null)return;const t=this.#t.name;throw new Ct(`inside form, class ${t} requires "static formAssociated = true;"`)}static get observedAttributes(){const t=Object.keys(this.properties||{}).map(I.getAttrName);return t.includes("disabled")||t.push("disabled"),t}propertyChangedCallback(t,e,n){}#E(t,e){if(!e||!qt.test(e))return;const n=Lt(e);return this[n]===void 0&&this.#a(t,"",n),n}#A(t){const s=this.#t.propToExprsMap.get(t)||[];for(const i of s){let c=this.#o(i);const u=this.#n.get(i)??[];for(const p of u)if(p instanceof HTMLElement)this.#S(p,c);else if(!(p instanceof CSSStyleRule)){const{element:m,attrName:h}=p;m instanceof CSSStyleRule?m.style.setProperty(h,c):te(m,h,c)}}}static register(){const t=this.elementName();customElements.get(t)||customElements.define(t,this)}#D(t,e){const{computed:n,uses:s}=e,i=this.#t.propToComputedMap;function c(p,m){let h=i.get(p);h||(h=[],i.set(p,h)),h.push([t,m])}const u=n.match(Kt)||[];for(const p of u){const m=p.substring(xe);this[m]===void 0&&this.#a(null,t,m),typeof this[m]!="function"&&c(m,n)}if(s)for(const p of s.split(","))c(p,n)}#r(t,e,n=void 0){if(!t)return;const s=this.#p(e,n,t);if(!s){const p=t.replaceAll("this..","this.");n?te(e,n,p):"textContent"in e&&(e.textContent=p);return}const i=this.#t;s.forEach(p=>{const m=Lt(p);if(typeof this[m]=="function")return;const h=i.propToExprsMap;let y=h.get(m);y||(y=[],h.set(m,y)),y.includes(t)||y.push(t)});for(const[p,m]of this.#n.entries())for(const h of m){const y=h instanceof HTMLElement||h instanceof CSSStyleRule?h:h.element;y instanceof CSSStyleRule||y.isConnected||this.#n.set(p,m.filter(V=>V!==h))}let c=this.#n.get(t);c||(c=[],this.#n.set(t,c)),c.push(n?{element:e,attrName:n}:e),e instanceof HTMLElement&&this.#M(e,n,s);const u=this.#o(t);n?te(e,n,u):this.#S(e,u)}setAttributeSafe(t,e){this.hasAttribute(t)||this.setAttribute(t,e)}setFormValue(t,e){!this.#s||!Zt(e)||(this.#s.set(t,e),this.#f?.setFormValue(this.#s))}#e(t,e,n){const s=this.#t,i=t instanceof HTMLElement?t.localName:"CSS rule";throw new Ct(`component ${s.elementName()}`+(t?`, element "${i}"`:"")+(e?`, attribute "${e}"`:"")+` ${n}`)}#a(t,e,n){this.#e(t,e,`refers to missing property "${n}"`)}#_(t,e){return this.#b(t,this.getAttribute(e))}#b(t,e){if(e?.match(Kt))return e;const n=this.#t,{type:s}=n.properties[t];if(s||this.#e(null,t,"does not specify its type"),s===String)return e;if(s===Number)return Qt(e);if(s===Boolean)return e==="true"?!0:e==="false"||e==="null"?!1:(e&&e!==t&&this.#e(null,t,"is a Boolean attribute, so its value must match attribute name or be missing"),e===t)}#I(t,e,n,s){if(Zt(n)&&this.hasAttribute(s)){const i=e===Boolean?this.hasAttribute(s):this.#_(t,s);n!==i&&Ue(this,t,n)}}#v(t){const n=this.#t.propToComputedMap.get(t)||[];for(const[s,i]of n)this[s]=this.#o(i)}#S(t,e){if(e===void 0)return;const n=t instanceof HTMLElement,s=typeof e;if(s!=="string"&&s!=="number"&&this.#e(t,void 0," computed content is not a string or number"),t instanceof HTMLElement&&ht(t))t.value=e;else if(n&&s==="string"&&e.trim().startsWith("<")){const i=Bn(e);t.replaceChildren(...i),this.#y(t),this.#T(t)}else n&&(t.textContent=e)}#P(t,e){const n=this.#u.get(t);if(!n)return;const s=this.getRootNode();if(!(s instanceof ShadowRoot))return;const{host:i}=s;if(!i)return;const c=i;c[n]=e}useState(t,e){if(!e){e={};for(const n of Object.keys(t))e[n]=n}this.#k(t,e);for(const[n,s]of Object.entries(e))if(this.#i(s)){const i=Le(t,n);i!==void 0&&(this[s]=i);const c=this.#t.properties[s];c.state=t,c.stateProp=n}t.addListener(this,e)}#x(){const t=this.#t,e=new Set(Object.keys(t.properties));for(const n of e)Hn.has(n)&&this.#e(null,"",`property "${n}" is not allowed because it is a reserved attribute`);for(const n of this.getAttributeNames())if(n!=="class"&&n!=="id"&&n!=="disabled"&&!n.startsWith("on")){if(n==="form-assoc"){this.#g();continue}if(!e.has(I.getPropName(n))){if(n==="name"){this.#g();continue}this.#e(null,n,"is not a supported attribute")}}}#p(t,e,n){const s=n.match(Kt);if(s)return s.forEach(i=>{const c=Lt(i);this[c]===void 0&&this.#a(t,e,c)}),s}#k(t,e){for(const[n,s]of Object.entries(e)){let i=Le(t,n);if(i===void 0)throw new Ct(`invalid state path "${n}"`);i=this[s],this.#i(s)||this.#e(null,s,"refers to missing property in useState map")}}#F(t,e,n){if(n instanceof e)return;let s=typeof n;if(s==="object"){const{constructor:i}=n;s=i.name,i!==e&&this.#e(null,t,`was set to a ${s}, but must be a ${e.name}`)}s!==e.name.toLowerCase()&&this.#e(null,t,`was set to a ${s}, but must be a ${e.name}`)}#y(t){const e=Array.from(t.querySelectorAll("*"));for(const n of e){const s=[];for(const i of Array.from(n.attributes)){const c=i.name;if(c.startsWith("on")){let u=c.slice(2);u=u[0].toLowerCase()+u.slice(1).toLowerCase();const p=i.value;this.#p(n,c,p);let m;typeof this[p]=="function"?m=h=>this[p](h):(this.#p(n,c,p),m=()=>this.#o(p)),n.addEventListener(u,m),s.push(c)}}for(const i of s)n.removeAttribute(i)}}}function Yn(r,...t){let e=ke(r,t);for(;;){const n=xn.exec(e);if(!n)break;const s=n[2];if(Pe.test(s)){const i=n[1];if(!i.startsWith("--")){const c=`--${i}: ${s};
5
+ ${i}: var(--${i})`;e=Fe(e,n.index,n[0].length,c)}}}return e}function Vn(r,...t){let e=ke(r,t);for(;;){const n=Un.exec(e);if(!n||n[1]==="style")break;const s=Gn(n[2]);if(Pe.test(s)){const i=`<!-- ${s.trim()} -->`,c=n.index+n[0].indexOf(">")+1;e=Fe(e,c,s.length,i)}}return e}T.Wrec=I,T.WrecState=wt,T.createElement=$n,T.css=Yn,T.html=Vn,Object.defineProperty(T,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "wrec",
3
3
  "description": "a small library that greatly simplifies building web components",
4
4
  "author": "R. Mark Volkmann",
5
- "version": "0.19.0",
5
+ "version": "0.19.2",
6
6
  "license": "MIT",
7
7
  "repository": {
8
8
  "type": "git",