import{R as v}from"./vendor-react-DSIERL8z.js";var fn=Object.defineProperty,Ye=Object.getOwnPropertySymbols,Gt=Object.prototype.hasOwnProperty,Wt=Object.prototype.propertyIsEnumerable,Pt=(u,i,r)=>i in u?fn(u,i,{enumerable:!0,configurable:!0,writable:!0,value:r}):u[i]=r,ct=(u,i)=>{for(var r in i||(i={}))Gt.call(i,r)&&Pt(u,r,i[r]);if(Ye)for(var r of Ye(i))Wt.call(i,r)&&Pt(u,r,i[r]);return u},ut=(u,i)=>{var r={};for(var l in u)Gt.call(u,l)&&i.indexOf(l)<0&&(r[l]=u[l]);if(u!=null&&Ye)for(var l of Ye(u))i.indexOf(l)<0&&Wt.call(u,l)&&(r[l]=u[l]);return r};var le;(u=>{const i=class R{constructor(t,o,n,a){if(this.version=t,this.errorCorrectionLevel=o,this.modules=[],this.isFunction=[],tR.MAX_VERSION)throw new RangeError("Version value out of range");if(a<-1||a>7)throw new RangeError("Mask value out of range");this.size=t*4+17;let c=[];for(let f=0;f7)throw new RangeError("Invalid value");let f,T;for(f=n;;f++){const A=R.getNumDataCodewords(f,o)*8,C=w.getTotalBits(t,f);if(C<=A){T=C;break}if(f>=a)throw new RangeError("Data too long")}for(const A of[R.Ecc.MEDIUM,R.Ecc.QUARTILE,R.Ecc.HIGH])p&&T<=R.getNumDataCodewords(f,A)*8&&(o=A);let g=[];for(const A of t){r(A.mode.modeBits,4,g),r(A.numChars,A.mode.numCharCountBits(f),g);for(const C of A.getData())g.push(C)}h(g.length==T);const B=R.getNumDataCodewords(f,o)*8;h(g.length<=B),r(0,Math.min(4,B-g.length),g),r(0,(8-g.length%8)%8,g),h(g.length%8==0);for(let A=236;g.lengthI[C>>>3]|=A<<7-(C&7)),new R(f,o,I,c)}getModule(t,o){return 0<=t&&t>>9)*1335;const a=(o<<10|n)^21522;h(a>>>15==0);for(let c=0;c<=5;c++)this.setFunctionModule(8,c,l(a,c));this.setFunctionModule(8,7,l(a,6)),this.setFunctionModule(8,8,l(a,7)),this.setFunctionModule(7,8,l(a,8));for(let c=9;c<15;c++)this.setFunctionModule(14-c,8,l(a,c));for(let c=0;c<8;c++)this.setFunctionModule(this.size-1-c,8,l(a,c));for(let c=8;c<15;c++)this.setFunctionModule(8,this.size-15+c,l(a,c));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let t=this.version;for(let n=0;n<12;n++)t=t<<1^(t>>>11)*7973;const o=this.version<<12|t;h(o>>>18==0);for(let n=0;n<18;n++){const a=l(o,n),c=this.size-11+n%3,p=Math.floor(n/3);this.setFunctionModule(c,p,a),this.setFunctionModule(p,c,a)}}drawFinderPattern(t,o){for(let n=-4;n<=4;n++)for(let a=-4;a<=4;a++){const c=Math.max(Math.abs(a),Math.abs(n)),p=t+a,f=o+n;0<=p&&p{(A!=T-c||x>=f)&&I.push(C[A])});return h(I.length==p),I}drawCodewords(t){if(t.length!=Math.floor(R.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let o=0;for(let n=this.size-1;n>=1;n-=2){n==6&&(n=5);for(let a=0;a>>3],7-(o&7)),o++)}}h(o==t.length*8)}applyMask(t){if(t<0||t>7)throw new RangeError("Mask value out of range");for(let o=0;o5&&t++):(this.finderPenaltyAddHistory(f,T),p||(t+=this.finderPenaltyCountPatterns(T)*R.PENALTY_N3),p=this.modules[c][g],f=1);t+=this.finderPenaltyTerminateAndCount(p,f,T)*R.PENALTY_N3}for(let c=0;c5&&t++):(this.finderPenaltyAddHistory(f,T),p||(t+=this.finderPenaltyCountPatterns(T)*R.PENALTY_N3),p=this.modules[g][c],f=1);t+=this.finderPenaltyTerminateAndCount(p,f,T)*R.PENALTY_N3}for(let c=0;cp+(f?1:0),o);const n=this.size*this.size,a=Math.ceil(Math.abs(o*20-n*10)/n)-1;return h(0<=a&&a<=9),t+=a*R.PENALTY_N4,h(0<=t&&t<=2568888),t}getAlignmentPatternPositions(){if(this.version==1)return[];{const t=Math.floor(this.version/7)+2,o=this.version==32?26:Math.ceil((this.version*4+4)/(t*2-2))*2;let n=[6];for(let a=this.size-7;n.lengthR.MAX_VERSION)throw new RangeError("Version number out of range");let o=(16*t+128)*t+64;if(t>=2){const n=Math.floor(t/7)+2;o-=(25*n-10)*n-55,t>=7&&(o-=36)}return h(208<=o&&o<=29648),o}static getNumDataCodewords(t,o){return Math.floor(R.getNumRawDataModules(t)/8)-R.ECC_CODEWORDS_PER_BLOCK[o.ordinal][t]*R.NUM_ERROR_CORRECTION_BLOCKS[o.ordinal][t]}static reedSolomonComputeDivisor(t){if(t<1||t>255)throw new RangeError("Degree out of range");let o=[];for(let a=0;a0);for(const a of t){const c=a^n.shift();n.push(0),o.forEach((p,f)=>n[f]^=R.reedSolomonMultiply(p,c))}return n}static reedSolomonMultiply(t,o){if(t>>>8||o>>>8)throw new RangeError("Byte out of range");let n=0;for(let a=7;a>=0;a--)n=n<<1^(n>>>7)*285,n^=(o>>>a&1)*t;return h(n>>>8==0),n}finderPenaltyCountPatterns(t){const o=t[1];h(o<=this.size*3);const n=o>0&&t[2]==o&&t[3]==o*3&&t[4]==o&&t[5]==o;return(n&&t[0]>=o*4&&t[6]>=o?1:0)+(n&&t[6]>=o*4&&t[0]>=o?1:0)}finderPenaltyTerminateAndCount(t,o,n){return t&&(this.finderPenaltyAddHistory(o,n),o=0),o+=this.size,this.finderPenaltyAddHistory(o,n),this.finderPenaltyCountPatterns(n)}finderPenaltyAddHistory(t,o){o[0]==0&&(t+=this.size),o.pop(),o.unshift(t)}};i.MIN_VERSION=1,i.MAX_VERSION=40,i.PENALTY_N1=3,i.PENALTY_N2=3,i.PENALTY_N3=40,i.PENALTY_N4=10,i.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],i.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],u.QrCode=i;function r(S,t,o){if(t<0||t>31||S>>>t)throw new RangeError("Value out of range");for(let n=t-1;n>=0;n--)o.push(S>>>n&1)}function l(S,t){return(S>>>t&1)!=0}function h(S){if(!S)throw new Error("Assertion error")}const d=class N{constructor(t,o,n){if(this.mode=t,this.numChars=o,this.bitData=n,o<0)throw new RangeError("Invalid argument");this.bitData=n.slice()}static makeBytes(t){let o=[];for(const n of t)r(n,8,o);return new N(N.Mode.BYTE,t.length,o)}static makeNumeric(t){if(!N.isNumeric(t))throw new RangeError("String contains non-numeric characters");let o=[];for(let n=0;n=1<{(i=>{const r=class{constructor(h,d){this.ordinal=h,this.formatBits=d}};r.LOW=new r(0,1),r.MEDIUM=new r(1,0),r.QUARTILE=new r(2,3),r.HIGH=new r(3,2),i.Ecc=r})(u.QrCode||(u.QrCode={}))})(le||(le={}));(u=>{(i=>{const r=class{constructor(h,d){this.modeBits=h,this.numBitsCharCount=d}numCharCountBits(h){return this.numBitsCharCount[Math.floor((h+7)/17)]}};r.NUMERIC=new r(1,[10,12,14]),r.ALPHANUMERIC=new r(2,[9,11,13]),r.BYTE=new r(4,[8,16,16]),r.KANJI=new r(8,[8,10,12]),r.ECI=new r(7,[0,0,0]),i.Mode=r})(u.QrSegment||(u.QrSegment={}))})(le||(le={}));var pe=le;var mn={L:pe.QrCode.Ecc.LOW,M:pe.QrCode.Ecc.MEDIUM,Q:pe.QrCode.Ecc.QUARTILE,H:pe.QrCode.Ecc.HIGH},Yt=128,Qt="L",Xt="#FFFFFF",$t="#000000",Vt=!1,jt=1,hn=4,dn=0,pn=.1;function Kt(u,i=0){const r=[];return u.forEach(function(l,h){let d=null;l.forEach(function(w,S){if(!w&&d!==null){r.push(`M${d+i} ${h+i}h${S-d}v1H${d+i}z`),d=null;return}if(S===l.length-1){if(!w)return;d===null?r.push(`M${S+i},${h+i} h1v1H${S+i}z`):r.push(`M${d+i},${h+i} h${S+1-d}v1H${d+i}z`);return}w&&d===null&&(d=S)})}),r.join("")}function Zt(u,i){return u.slice().map((r,l)=>l=i.y+i.h?r:r.map((h,d)=>d=i.x+i.w?h:!1))}function En(u,i,r,l){if(l==null)return null;const h=u.length+r*2,d=Math.floor(i*pn),w=h/i,S=(l.width||d)*w,t=(l.height||d)*w,o=l.x==null?u.length/2-S/2:l.x*w,n=l.y==null?u.length/2-t/2:l.y*w,a=l.opacity==null?1:l.opacity;let c=null;if(l.excavate){let f=Math.floor(o),T=Math.floor(n),g=Math.ceil(S+o-f),B=Math.ceil(t+n-T);c={x:f,y:T,w:g,h:B}}const p=l.crossOrigin;return{x:o,y:n,h:t,w:S,excavation:c,opacity:a,crossOrigin:p}}function gn(u,i){return i!=null?Math.max(Math.floor(i),0):u?hn:dn}function qt({value:u,level:i,minVersion:r,includeMargin:l,marginSize:h,imageSettings:d,size:w,boostLevel:S}){let t=v.useMemo(()=>{const f=(Array.isArray(u)?u:[u]).reduce((T,g)=>(T.push(...pe.QrSegment.makeSegments(g)),T),[]);return pe.QrCode.encodeSegments(f,mn[i],r,void 0,void 0,S)},[u,i,r,S]);const{cells:o,margin:n,numCells:a,calculatedImageSettings:c}=v.useMemo(()=>{let p=t.getModules();const f=gn(l,h),T=p.length+f*2,g=En(p,w,f,d);return{cells:p,margin:f,numCells:T,calculatedImageSettings:g}},[t,w,d,l,h]);return{qrcode:t,margin:n,cells:o,numCells:a,calculatedImageSettings:c}}var An=(function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0})(),Tn=v.forwardRef(function(i,r){const l=i,{value:h,size:d=Yt,level:w=Qt,bgColor:S=Xt,fgColor:t=$t,includeMargin:o=Vt,minVersion:n=jt,boostLevel:a,marginSize:c,imageSettings:p}=l,T=ut(l,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:g}=T,B=ut(T,["style"]),I=p?.src,A=v.useRef(null),C=v.useRef(null),x=v.useCallback(Y=>{A.current=Y,typeof r=="function"?r(Y):r&&(r.current=Y)},[r]),[J,Le]=v.useState(!1),{margin:ne,cells:Ee,numCells:ge,calculatedImageSettings:M}=qt({value:h,level:w,minVersion:n,boostLevel:a,includeMargin:o,marginSize:c,imageSettings:p,size:d});v.useEffect(()=>{if(A.current!=null){const Y=A.current,X=Y.getContext("2d");if(!X)return;let be=Ee;const ie=C.current,Ae=M!=null&&ie!==null&&ie.complete&&ie.naturalHeight!==0&&ie.naturalWidth!==0;Ae&&M.excavation!=null&&(be=Zt(Ee,M.excavation));const De=window.devicePixelRatio||1;Y.height=Y.width=d*De;const Te=d/ge*De;X.scale(Te,Te),X.fillStyle=S,X.fillRect(0,0,ge,ge),X.fillStyle=t,An?X.fill(new Path2D(Kt(be,ne))):Ee.forEach(function(L,Pe){L.forEach(function(D,ve){D&&X.fillRect(ve+ne,Pe+ne,1,1)})}),M&&(X.globalAlpha=M.opacity),Ae&&X.drawImage(ie,M.x+ne,M.y+ne,M.w,M.h)}}),v.useEffect(()=>{Le(!1)},[I]);const ce=ct({height:d,width:d},g);let oe=null;return I!=null&&(oe=v.createElement("img",{src:I,key:I,style:{display:"none"},onLoad:()=>{Le(!0)},ref:C,crossOrigin:M?.crossOrigin})),v.createElement(v.Fragment,null,v.createElement("canvas",ct({style:ce,height:d,width:d,ref:x,role:"img"},B)),oe)});Tn.displayName="QRCodeCanvas";var _n=v.forwardRef(function(i,r){const l=i,{value:h,size:d=Yt,level:w=Qt,bgColor:S=Xt,fgColor:t=$t,includeMargin:o=Vt,minVersion:n=jt,boostLevel:a,title:c,marginSize:p,imageSettings:f}=l,T=ut(l,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","title","marginSize","imageSettings"]),{margin:g,cells:B,numCells:I,calculatedImageSettings:A}=qt({value:h,level:w,minVersion:n,boostLevel:a,includeMargin:o,marginSize:p,imageSettings:f,size:d});let C=B,x=null;f!=null&&A!=null&&(A.excavation!=null&&(C=Zt(B,A.excavation)),x=v.createElement("image",{href:f.src,height:A.h,width:A.w,x:A.x+g,y:A.y+g,preserveAspectRatio:"none",opacity:A.opacity,crossOrigin:A.crossOrigin}));const J=Kt(C,g);return v.createElement("svg",ct({height:d,width:d,viewBox:`0 0 ${I} ${I}`,ref:r,role:"img"},T),!!c&&v.createElement("title",null,c),v.createElement("path",{fill:S,d:`M0,0 h${I}v${I}H0z`,shapeRendering:"crispEdges"}),v.createElement("path",{fill:t,d:J,shapeRendering:"crispEdges"}),x)});_n.displayName="QRCodeSVG";const{entries:Jt,setPrototypeOf:vt,isFrozen:Rn,getPrototypeOf:Cn,getOwnPropertyDescriptor:Sn}=Object;let{freeze:z,seal:Q,create:Ie}=Object,{apply:ft,construct:mt}=typeof Reflect<"u"&&Reflect;z||(z=function(i){return i});Q||(Q=function(i){return i});ft||(ft=function(i,r){for(var l=arguments.length,h=new Array(l>2?l-2:0),d=2;d1?r-1:0),h=1;h1?r-1:0),h=1;h2&&arguments[2]!==void 0?arguments[2]:We;vt&&vt(u,null);let l=i.length;for(;l--;){let h=i[l];if(typeof h=="string"){const d=r(h);d!==h&&(Rn(i)||(i[l]=d),h=d)}u[h]=!0}return u}function In(u){for(let i=0;i/gm),vn=Q(/\$\{[\w\W]*/gm),xn=Q(/^data-[\-\w.\u00B7-\uFFFF]+$/),Fn=Q(/^aria-[\-\w]+$/),en=Q(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Un=Q(/^(?:\w+script|data):/i),kn=Q(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),tn=Q(/^html$/i),zn=Q(/^[a-z][.\w]*(-[.\w]+)+$/i);var Ht=Object.freeze({__proto__:null,ARIA_ATTR:Fn,ATTR_WHITESPACE:kn,CUSTOM_ELEMENT:zn,DATA_ATTR:xn,DOCTYPE_NAME:tn,ERB_EXPR:Pn,IS_ALLOWED_URI:en,IS_SCRIPT_OR_DATA:Un,MUSTACHE_EXPR:Dn,TMPLIT_EXPR:vn});const Oe={element:1,text:3,progressingInstruction:7,comment:8,document:9},Hn=function(){return typeof window>"u"?null:window},Bn=function(i,r){if(typeof i!="object"||typeof i.createPolicy!="function")return null;let l=null;const h="data-tt-policy-suffix";r&&r.hasAttribute(h)&&(l=r.getAttribute(h));const d="dompurify"+(l?"#"+l:"");try{return i.createPolicy(d,{createHTML(w){return w},createScriptURL(w){return w}})}catch{return console.warn("TrustedTypes policy "+d+" could not be created."),null}},Bt=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function nn(){let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Hn();const i=E=>nn(E);if(i.version="3.4.0",i.removed=[],!u||!u.document||u.document.nodeType!==Oe.document||!u.Element)return i.isSupported=!1,i;let{document:r}=u;const l=r,h=l.currentScript,{DocumentFragment:d,HTMLTemplateElement:w,Node:S,Element:t,NodeFilter:o,NamedNodeMap:n=u.NamedNodeMap||u.MozNamedAttrMap,HTMLFormElement:a,DOMParser:c,trustedTypes:p}=u,f=t.prototype,T=Ne(f,"cloneNode"),g=Ne(f,"remove"),B=Ne(f,"nextSibling"),I=Ne(f,"childNodes"),A=Ne(f,"parentNode");if(typeof w=="function"){const E=r.createElement("template");E.content&&E.content.ownerDocument&&(r=E.content.ownerDocument)}let C,x="";const{implementation:J,createNodeIterator:Le,createDocumentFragment:ne,getElementsByTagName:Ee}=r,{importNode:ge}=l;let M=Bt();i.isSupported=typeof Jt=="function"&&typeof A=="function"&&J&&J.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:ce,ERB_EXPR:oe,TMPLIT_EXPR:Y,DATA_ATTR:X,ARIA_ATTR:be,IS_SCRIPT_OR_DATA:ie,ATTR_WHITESPACE:Ae,CUSTOM_ELEMENT:De}=Ht;let{IS_ALLOWED_URI:Te}=Ht,L=null;const Pe=_({},[...Ft,...rt,...at,...st,...Ut]);let D=null;const ve=_({},[...kt,...lt,...zt,...Ge]);let O=Object.seal(Ie(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}})),_e=null,xe=null;const ee=Object.seal(Ie(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ht=!0,Qe=!0,dt=!1,pt=!0,re=!1,Re=!0,ae=!1,Xe=!1,$e=!1,ue=!1,Fe=!1,Ue=!1,Et=!0,gt=!1;const on="user-content-";let Ve=!0,Ce=!1,fe={},j=null;const je=_({},["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 At=null;const Tt=_({},["audio","video","img","source","image","track"]);let Ke=null;const _t=_({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ke="http://www.w3.org/1998/Math/MathML",ze="http://www.w3.org/2000/svg",K="http://www.w3.org/1999/xhtml";let me=K,Ze=!1,qe=null;const rn=_({},[ke,ze,K],ot);let He=_({},["mi","mo","mn","ms","mtext"]),Be=_({},["annotation-xml"]);const an=_({},["title","style","font","a","script"]);let Se=null;const sn=["application/xhtml+xml","text/html"],ln="text/html";let P=null,he=null;const cn=r.createElement("form"),Rt=function(e){return e instanceof RegExp||e instanceof Function},Je=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(he&&he===e)){if((!e||typeof e!="object")&&(e={}),e=Z(e),Se=sn.indexOf(e.PARSER_MEDIA_TYPE)===-1?ln:e.PARSER_MEDIA_TYPE,P=Se==="application/xhtml+xml"?ot:We,L=V(e,"ALLOWED_TAGS")?_({},e.ALLOWED_TAGS,P):Pe,D=V(e,"ALLOWED_ATTR")?_({},e.ALLOWED_ATTR,P):ve,qe=V(e,"ALLOWED_NAMESPACES")?_({},e.ALLOWED_NAMESPACES,ot):rn,Ke=V(e,"ADD_URI_SAFE_ATTR")?_(Z(_t),e.ADD_URI_SAFE_ATTR,P):_t,At=V(e,"ADD_DATA_URI_TAGS")?_(Z(Tt),e.ADD_DATA_URI_TAGS,P):Tt,j=V(e,"FORBID_CONTENTS")?_({},e.FORBID_CONTENTS,P):je,_e=V(e,"FORBID_TAGS")?_({},e.FORBID_TAGS,P):Z({}),xe=V(e,"FORBID_ATTR")?_({},e.FORBID_ATTR,P):Z({}),fe=V(e,"USE_PROFILES")?e.USE_PROFILES:!1,ht=e.ALLOW_ARIA_ATTR!==!1,Qe=e.ALLOW_DATA_ATTR!==!1,dt=e.ALLOW_UNKNOWN_PROTOCOLS||!1,pt=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,re=e.SAFE_FOR_TEMPLATES||!1,Re=e.SAFE_FOR_XML!==!1,ae=e.WHOLE_DOCUMENT||!1,ue=e.RETURN_DOM||!1,Fe=e.RETURN_DOM_FRAGMENT||!1,Ue=e.RETURN_TRUSTED_TYPE||!1,$e=e.FORCE_BODY||!1,Et=e.SANITIZE_DOM!==!1,gt=e.SANITIZE_NAMED_PROPS||!1,Ve=e.KEEP_CONTENT!==!1,Ce=e.IN_PLACE||!1,Te=e.ALLOWED_URI_REGEXP||en,me=e.NAMESPACE||K,He=e.MATHML_TEXT_INTEGRATION_POINTS||He,Be=e.HTML_INTEGRATION_POINTS||Be,O=e.CUSTOM_ELEMENT_HANDLING||Ie(null),e.CUSTOM_ELEMENT_HANDLING&&Rt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(O.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Rt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(O.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(O.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),re&&(Qe=!1),Fe&&(ue=!0),fe&&(L=_({},Ut),D=Ie(null),fe.html===!0&&(_(L,Ft),_(D,kt)),fe.svg===!0&&(_(L,rt),_(D,lt),_(D,Ge)),fe.svgFilters===!0&&(_(L,at),_(D,lt),_(D,Ge)),fe.mathMl===!0&&(_(L,st),_(D,zt),_(D,Ge))),ee.tagCheck=null,ee.attributeCheck=null,e.ADD_TAGS&&(typeof e.ADD_TAGS=="function"?ee.tagCheck=e.ADD_TAGS:(L===Pe&&(L=Z(L)),_(L,e.ADD_TAGS,P))),e.ADD_ATTR&&(typeof e.ADD_ATTR=="function"?ee.attributeCheck=e.ADD_ATTR:(D===ve&&(D=Z(D)),_(D,e.ADD_ATTR,P))),e.ADD_URI_SAFE_ATTR&&_(Ke,e.ADD_URI_SAFE_ATTR,P),e.FORBID_CONTENTS&&(j===je&&(j=Z(j)),_(j,e.FORBID_CONTENTS,P)),e.ADD_FORBID_CONTENTS&&(j===je&&(j=Z(j)),_(j,e.ADD_FORBID_CONTENTS,P)),Ve&&(L["#text"]=!0),ae&&_(L,["html","head","body"]),L.table&&(_(L,["tbody"]),delete _e.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!="function")throw ye('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ye('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');C=e.TRUSTED_TYPES_POLICY,x=C.createHTML("")}else C===void 0&&(C=Bn(p,h)),C!==null&&typeof x=="string"&&(x=C.createHTML(""));z&&z(e),he=e}},Ct=_({},[...rt,...at,...Ln]),St=_({},[...st,...bn]),un=function(e){let s=A(e);(!s||!s.tagName)&&(s={namespaceURI:me,tagName:"template"});const m=We(e.tagName),y=We(s.tagName);return qe[e.namespaceURI]?e.namespaceURI===ze?s.namespaceURI===K?m==="svg":s.namespaceURI===ke?m==="svg"&&(y==="annotation-xml"||He[y]):!!Ct[m]:e.namespaceURI===ke?s.namespaceURI===K?m==="math":s.namespaceURI===ze?m==="math"&&Be[y]:!!St[m]:e.namespaceURI===K?s.namespaceURI===ze&&!Be[y]||s.namespaceURI===ke&&!He[y]?!1:!St[m]&&(an[m]||!Ct[m]):!!(Se==="application/xhtml+xml"&&qe[e.namespaceURI]):!1},$=function(e){we(i.removed,{element:e});try{A(e).removeChild(e)}catch{g(e)}},se=function(e,s){try{we(i.removed,{attribute:s.getAttributeNode(e),from:s})}catch{we(i.removed,{attribute:null,from:s})}if(s.removeAttribute(e),e==="is")if(ue||Fe)try{$(s)}catch{}else try{s.setAttribute(e,"")}catch{}},Mt=function(e){let s=null,m=null;if($e)e=""+e;else{const b=it(e,/^[\r\n\t ]+/);m=b&&b[0]}Se==="application/xhtml+xml"&&me===K&&(e=' BlockSight.Live — Real-Time Bitcoin Blockchain Explorer '+e+"");const y=C?C.createHTML(e):e;if(me===K)try{s=new c().parseFromString(y,Se)}catch{}if(!s||!s.documentElement){s=J.createDocument(me,"template",null);try{s.documentElement.innerHTML=Ze?x:y}catch{}}const U=s.body||s.documentElement;return e&&m&&U.insertBefore(r.createTextNode(m),U.childNodes[0]||null),me===K?Ee.call(s,ae?"html":"body")[0]:ae?s.documentElement:U},wt=function(e){return Le.call(e.ownerDocument||e,e,o.SHOW_ELEMENT|o.SHOW_COMMENT|o.SHOW_TEXT|o.SHOW_PROCESSING_INSTRUCTION|o.SHOW_CDATA_SECTION,null)},et=function(e){return e instanceof a&&(typeof e.nodeName!="string"||typeof e.textContent!="string"||typeof e.removeChild!="function"||!(e.attributes instanceof n)||typeof e.removeAttribute!="function"||typeof e.setAttribute!="function"||typeof e.namespaceURI!="string"||typeof e.insertBefore!="function"||typeof e.hasChildNodes!="function")},tt=function(e){return typeof S=="function"&&e instanceof S};function q(E,e,s){Me(E,m=>{m.call(i,e,s,he)})}const yt=function(e){let s=null;if(q(M.beforeSanitizeElements,e,null),et(e))return $(e),!0;const m=P(e.nodeName);if(q(M.uponSanitizeElement,e,{tagName:m,allowedTags:L}),Re&&e.hasChildNodes()&&!tt(e.firstElementChild)&&k(/<[/\w!]/g,e.innerHTML)&&k(/<[/\w!]/g,e.textContent)||Re&&e.namespaceURI===K&&m==="style"&&tt(e.firstElementChild)||e.nodeType===Oe.progressingInstruction||Re&&e.nodeType===Oe.comment&&k(/<[/\w]/g,e.data))return $(e),!0;if(_e[m]||!(ee.tagCheck instanceof Function&&ee.tagCheck(m))&&!L[m]){if(!_e[m]&&Ot(m)&&(O.tagNameCheck instanceof RegExp&&k(O.tagNameCheck,m)||O.tagNameCheck instanceof Function&&O.tagNameCheck(m)))return!1;if(Ve&&!j[m]){const y=A(e)||e.parentNode,U=I(e)||e.childNodes;if(U&&y){const b=U.length;for(let G=b-1;G>=0;--G){const W=T(U[G],!0);W.__removalCount=(e.__removalCount||0)+1,y.insertBefore(W,B(e))}}}return $(e),!0}return e instanceof t&&!un(e)||(m==="noscript"||m==="noembed"||m==="noframes")&&k(/<\/no(script|embed|frames)/i,e.innerHTML)?($(e),!0):(re&&e.nodeType===Oe.text&&(s=e.textContent,Me([ce,oe,Y],y=>{s=de(s,y," ")}),e.textContent!==s&&(we(i.removed,{element:e.cloneNode()}),e.textContent=s)),q(M.afterSanitizeElements,e,null),!1)},Nt=function(e,s,m){if(xe[s]||Et&&(s==="id"||s==="name")&&(m in r||m in cn))return!1;if(!(Qe&&!xe[s]&&k(X,s))){if(!(ht&&k(be,s))){if(!(ee.attributeCheck instanceof Function&&ee.attributeCheck(s,e))){if(!D[s]||xe[s]){if(!(Ot(e)&&(O.tagNameCheck instanceof RegExp&&k(O.tagNameCheck,e)||O.tagNameCheck instanceof Function&&O.tagNameCheck(e))&&(O.attributeNameCheck instanceof RegExp&&k(O.attributeNameCheck,s)||O.attributeNameCheck instanceof Function&&O.attributeNameCheck(s,e))||s==="is"&&O.allowCustomizedBuiltInElements&&(O.tagNameCheck instanceof RegExp&&k(O.tagNameCheck,m)||O.tagNameCheck instanceof Function&&O.tagNameCheck(m))))return!1}else if(!Ke[s]){if(!k(Te,de(m,Ae,""))){if(!((s==="src"||s==="xlink:href"||s==="href")&&e!=="script"&&yn(m,"data:")===0&&At[e])){if(!(dt&&!k(ie,de(m,Ae,"")))){if(m)return!1}}}}}}}return!0},Ot=function(e){return e!=="annotation-xml"&&it(e,De)},It=function(e){q(M.beforeSanitizeAttributes,e,null);const{attributes:s}=e;if(!s||et(e))return;const m={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:D,forceKeepAttr:void 0};let y=s.length;for(;y--;){const U=s[y],{name:b,namespaceURI:G,value:W}=U,te=P(b),nt=W;let F=b==="value"?nt:Nn(nt);if(m.attrName=te,m.attrValue=F,m.keepAttr=!0,m.forceKeepAttr=void 0,q(M.uponSanitizeAttribute,e,m),F=m.attrValue,gt&&(te==="id"||te==="name")&&(se(b,e),F=on+F),Re&&k(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,F)){se(b,e);continue}if(te==="attributename"&&it(F,"href")){se(b,e);continue}if(m.forceKeepAttr)continue;if(!m.keepAttr){se(b,e);continue}if(!pt&&k(/\/>/i,F)){se(b,e);continue}re&&Me([ce,oe,Y],Dt=>{F=de(F,Dt," ")});const bt=P(e.nodeName);if(!Nt(bt,te,F)){se(b,e);continue}if(C&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!G)switch(p.getAttributeType(bt,te)){case"TrustedHTML":{F=C.createHTML(F);break}case"TrustedScriptURL":{F=C.createScriptURL(F);break}}if(F!==nt)try{G?e.setAttributeNS(G,b,F):e.setAttribute(b,F),et(e)?$(e):xt(i.removed)}catch{se(b,e)}}q(M.afterSanitizeAttributes,e,null)},Lt=function(e){let s=null;const m=wt(e);for(q(M.beforeSanitizeShadowDOM,e,null);s=m.nextNode();)q(M.uponSanitizeShadowNode,s,null),yt(s),It(s),s.content instanceof d&&Lt(s.content);q(M.afterSanitizeShadowDOM,e,null)};return i.sanitize=function(E){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=null,m=null,y=null,U=null;if(Ze=!E,Ze&&(E=""),typeof E!="string"&&!tt(E))if(typeof E.toString=="function"){if(E=E.toString(),typeof E!="string")throw ye("dirty is not a string, aborting")}else throw ye("toString is not a function");if(!i.isSupported)return E;if(Xe||Je(e),i.removed=[],typeof E=="string"&&(Ce=!1),Ce){if(E.nodeName){const W=P(E.nodeName);if(!L[W]||_e[W])throw ye("root node is forbidden and cannot be sanitized in-place")}}else if(E instanceof S)s=Mt(""),m=s.ownerDocument.importNode(E,!0),m.nodeType===Oe.element&&m.nodeName==="BODY"||m.nodeName==="HTML"?s=m:s.appendChild(m);else{if(!ue&&!re&&!ae&&E.indexOf("<")===-1)return C&&Ue?C.createHTML(E):E;if(s=Mt(E),!s)return ue?null:Ue?x:""}s&&$e&&$(s.firstChild);const b=wt(Ce?E:s);for(;y=b.nextNode();)yt(y),It(y),y.content instanceof d&&Lt(y.content);if(Ce)return E;if(ue){if(re){s.normalize();let W=s.innerHTML;Me([ce,oe,Y],te=>{W=de(W,te," ")}),s.innerHTML=W}if(Fe)for(U=ne.call(s.ownerDocument);s.firstChild;)U.appendChild(s.firstChild);else U=s;return(D.shadowroot||D.shadowrootmode)&&(U=ge.call(l,U,!0)),U}let G=ae?s.outerHTML:s.innerHTML;return ae&&L["!doctype"]&&s.ownerDocument&&s.ownerDocument.doctype&&s.ownerDocument.doctype.name&&k(tn,s.ownerDocument.doctype.name)&&(G=" `+G),re&&Me([ce,oe,Y],W=>{G=de(G,W," ")}),C&&Ue?C.createHTML(G):G},i.setConfig=function(){let E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Je(E),Xe=!0},i.clearConfig=function(){he=null,Xe=!1},i.isValidAttribute=function(E,e,s){he||Je({});const m=P(E),y=P(e);return Nt(m,y,s)},i.addHook=function(E,e){typeof e=="function"&&we(M[E],e)},i.removeHook=function(E,e){if(e!==void 0){const s=Mn(M[E],e);return s===-1?void 0:wn(M[E],s,1)[0]}return xt(M[E])},i.removeHooks=function(E){M[E]=[]},i.removeAllHooks=function(){M=Bt()},i}var Qn=nn();export{_n as Q,Qn as p}; //# sourceMappingURL=vendor-utils-KRDf5bqx.js.map