@mindstudio-ai/browser-agent 0.1.79 → 0.1.80
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/index.js +28 -188
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
"use strict";var __MindStudioBrowserAgent=(()=>{var Gn=Object.defineProperty;var tl=Object.getOwnPropertyDescriptor;var nl=Object.getOwnPropertyNames;var rl=Object.prototype.hasOwnProperty;var zn=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var ol=(e,t)=>{for(var n in t)Gn(e,n,{get:t[n],enumerable:!0})},il=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of nl(t))!rl.call(e,o)&&o!==n&&Gn(e,o,{get:()=>t[o],enumerable:!(r=tl(t,o))||r.enumerable});return e};var al=e=>il(Gn({},"__esModule",{value:!0}),e);var Gm={};ol(Gm,{executeSteps:()=>At,getRefMap:()=>He,resolveElement:()=>xe,takeSnapshot:()=>Ue,takeSnapshotSync:()=>Ht});var qn="__ms";function sl(){return{ws:{ws:null,clientId:null,reconnectDelay:1e3,closing:!1,busy:!1},cursor:{el:null,rippleEl:null,x:-100,y:-100,hasPosition:!1,hideTimer:null,executing:!1,targetElement:null,trackingFrame:null,settledResolve:null,visibilityState:"hidden",preSnapshotState:null},snapshot:{refCounter:0,refMap:new Map},networkIdle:{activeRequests:0},transport:{buffer:[],flushTimer:null,capturing:!1,captured:[],wsGetter:null},noteLayer:{host:null,overlay:null,cursorEl:null,notes:[],currentNote:null,pointerDown:!1,startX:0,startY:0,didDrag:!1,consumedByDeactivation:!1,dragPreview:null,movingNote:null,moveOffsetX:0,moveOffsetY:0},noteElement:{counter:0},notesMode:{active:!1,wasTouchActive:!1},messages:{handler:null},nav:{lastUrl:null},screenshot:{cameraEl:null,flashEl:null,capturing:!1},fonts:{initialized:!1,observer:null},zoom:{pipMode:!1,mobilePreview:!1},touch:{circleEl:null,active:!1,pressed:!1,dragging:!1,startX:0,startY:0,lastX:0,lastY:0,onMouseMove:null,onMouseDown:null,onMouseUp:null,onMouseLeave:null,onDragStart:null,momentumFrame:null,overscrollY:0,bouncing:!1,bounceTimer:null,scrollContainer:null,velocityX:0,velocityY:0,lastMoveTime:0},mirror:{recording:!1,stopFn:null},sessionRecording:{active:!1,runId:null,stopFn:null,buffer:[]},authCredsWidget:{initialized:!1,host:null,observer:null,debounceTimer:null,awaitingCode:!1,awaitingCodeTimer:null,codePollTimer:null,codeAttempts:0,codeSubmitted:!1,codeSeenCount:0,blankPolls:0}}}function x(){let e=window;return e[qn]||(e[qn]=sl()),e[qn]}var bo="/__mindstudio_dev__/logs",ll=2e3;function wo(e){x().transport.wsGetter=e}function vo(){let e=x().transport;if(e.buffer.length===0)return;let t=e.buffer;e.buffer=[];let n=e.wsGetter?.();if(n&&n.readyState===WebSocket.OPEN)try{n.send(JSON.stringify({type:"log",entries:t}));return}catch{}try{let r=new XMLHttpRequest;r.open("POST",bo,!0),r.setRequestHeader("Content-Type","application/json"),r.send(JSON.stringify(t))}catch{}}function cl(){let e=x().transport;e.flushTimer||(e.flushTimer=setTimeout(()=>{e.flushTimer=null,vo()},ll))}function ul(){let e=x().transport;e.flushTimer&&(clearTimeout(e.flushTimer),e.flushTimer=null),vo()}function pe(e){let t=x().transport;t.buffer.push(e),t.capturing&&t.captured.push(e),cl()}function Yn(e){let t=x().transport;t.buffer.push(e),t.capturing&&t.captured.push(e),ul()}function jn(){let e=x().transport;e.capturing=!0,e.captured=[]}function Zn(){let e=x().transport;e.capturing=!1;let t=e.captured;return e.captured=[],t}function Co(){window.addEventListener("beforeunload",()=>{let e=x().transport;e.buffer.length>0&&navigator.sendBeacon&&navigator.sendBeacon(bo,JSON.stringify(e.buffer))})}var dl={a:"link",button:"button",input:"textbox",textarea:"textbox",select:"combobox",option:"option",h1:"heading",h2:"heading",h3:"heading",h4:"heading",h5:"heading",h6:"heading",nav:"navigation",main:"main",header:"banner",footer:"contentinfo",aside:"complementary",dialog:"dialog",details:"group",summary:"button",img:"img",ul:"list",ol:"list",li:"listitem",table:"table",tr:"row",th:"columnheader",td:"cell",form:"form",article:"article",section:"region",label:"label",fieldset:"group",legend:"legend",p:"paragraph",blockquote:"blockquote",pre:"code",code:"code",hr:"separator",progress:"progressbar"};function ye(e){let t=e.getAttribute("role");if(t)return t==="presentation"||t==="none"?null:t;let n=e.tagName.toLowerCase();if(n==="a")return e.hasAttribute("href")?"link":null;if(n==="section")return e.hasAttribute("aria-label")||e.hasAttribute("aria-labelledby")?"region":null;if(n==="form")return e.hasAttribute("aria-label")||e.hasAttribute("aria-labelledby")?"form":null;if(n==="img")return e.alt===""?null:"img";if(n==="input")switch(e.type){case"checkbox":return"checkbox";case"radio":return"radio";case"range":return"slider";case"submit":case"button":case"reset":return"button";case"hidden":return null;default:return"textbox"}return dl[n]??null}function So(e){if(e.hasAttribute("onclick")||e.hasAttribute("tabindex")&&e.getAttribute("tabindex")!=="-1")return!0;try{if(getComputedStyle(e).cursor==="pointer")return!0}catch{}return!1}function Se(e){let t=e.getAttribute("aria-label");if(t)return t.trim();let n=e.getAttribute("aria-labelledby");if(n){let a=n.split(/\s+/).map(s=>{let c=document.getElementById(s);return c?Be(c):""}).filter(Boolean).join(" ");if(a)return a}let r=e.tagName.toLowerCase();if(r==="input"||r==="textarea"||r==="select"){let a=fl(e);if(a)return a}if(r==="img"){let a=e.alt;if(a)return a.trim()}if(r==="fieldset"){let a=e.querySelector("legend");if(a)return Be(a)}let o=Be(e);if(o)return o;let i=e.getAttribute("title");return i?i.trim():""}function Be(e){if(!e.children.length)return(e.textContent||"").trim();let t=[];for(let n of Array.from(e.childNodes))if(n.nodeType===Node.TEXT_NODE){let r=(n.textContent||"").trim();r&&t.push(r)}else if(n.nodeType===Node.ELEMENT_NODE){let r=n;if(pl(r))continue;let o=ml(r),i=Be(r);i&&(o&&t.length>0&&t.push(" "),t.push(i),o&&t.push(" "))}return t.join("").replace(/\s+/g," ").trim()}function fl(e){if(e.id){let n=document.querySelector(`label[for="${CSS.escape(e.id)}"]`);if(n)return Be(n)}let t=e.closest("label");if(t){let n=t.cloneNode(!0),r=n.querySelector("input, textarea, select");r&&r.remove();let o=n.textContent?.trim();if(o)return o}return null}function ml(e){try{return!getComputedStyle(e).display.includes("inline")}catch{let t=e.tagName.toLowerCase();return["div","p","h1","h2","h3","h4","h5","h6","li","section","article","header","footer","nav","main","aside","blockquote","pre","form","fieldset","table","tr","br"].includes(t)}}function pl(e){let t=e.tagName.toLowerCase();if(t==="script"||t==="style"||t==="noscript"||t==="template"||e.getAttribute("aria-hidden")==="true")return!0;try{let n=getComputedStyle(e);if(n.display==="none"||n.visibility==="hidden")return!0}catch{}return!1}function Xn(e,t){try{let n=getComputedStyle(e,t).content;if(!n||n==="none"||n==="normal")return"";let r=n.match(/^["'](.*)["']$/);return r?r[1]:""}catch{return""}}function Bt(){x().networkIdle.activeRequests++}function et(){let e=x().networkIdle;e.activeRequests=Math.max(0,e.activeRequests-1)}var hl=2;function xo(e=5e3,t=200){let n=()=>x().networkIdle.activeRequests<=hl;return new Promise(r=>{let o=Date.now()+e,i=null;function a(){if(Date.now()>o){i&&clearTimeout(i),r();return}n()?i||(i=setTimeout(()=>{n()?r():(i=null,a())},t)):(i&&(clearTimeout(i),i=null),setTimeout(a,50))}a()})}function He(){return x().snapshot.refMap}async function Ue(){return await xo(),Ht()}function Ht(){let e=x().snapshot;e.refCounter=0,e.refMap=new Map;let t=document.body;if(!t)return"(empty page)";let n=Io(t);return Kn(n,0).trimEnd()}function he(e){let t=ye(e),n=Se(e),r=n.length>60?n.slice(0,57)+"...":n;if(t&&r)return`${t} "${r}"`;if(t)return t;if(r)return`"${r}"`;let o=e.tagName.toLowerCase();return e.id?`${o}#${e.id}`:o}function Io(e){if(yl(e))return[];let t=ye(e),n=!t&&So(e),r=t||(n?"clickable":null),o="";if(r){o=Se(e);let u=Xn(e,"::before"),d=Xn(e,"::after");(u||d)&&(o=[u,o,d].filter(Boolean).join(" ")),o.length>80&&(o=o.slice(0,77)+"...")}let i=bl(e),a=t==="button"||t==="link"||t==="textbox"||t==="combobox"||t==="checkbox"||t==="radio"||t==="slider"||t==="tab"||t==="menuitem"||n,s=r&&o&&!a,c=null;if(a||s){let u=x().snapshot;u.refCounter++,c=`e${u.refCounter}`,u.refMap.set(c,e)}let l=gl(e);if(r){let u=l.length===0?"":Kn(l,0).trim();return[{tag:r,name:o,attrs:i,ref:c,children:u&&u===o?[]:l,element:e}]}if(l.length===0){let u=Be(e);if(u)return[{tag:null,name:u.length>80?u.slice(0,77)+"...":u,attrs:[],ref:null,children:[],element:e}]}return l}function gl(e){let t=[];for(let n of Array.from(e.childNodes))n.nodeType===Node.ELEMENT_NODE&&t.push(...Io(n));return t}function yl(e){let t=e.tagName.toLowerCase();if(t==="script"||t==="style"||t==="noscript"||t==="template"||t==="head"||e.getAttribute("aria-hidden")==="true"||e.id==="__mindstudio-browser-agent"||e.id==="__mindstudio-cursor"||e.id==="__mindstudio-cursor-ripple"||e.id==="__mindstudio-notes-host")return!0;try{let n=getComputedStyle(e);if(n.display==="none"||n.visibility==="hidden"&&n.position!=="static")return!0}catch{}return!1}function bl(e){let t=[],n=e.tagName.toLowerCase();if((n==="dialog"&&e.open||n==="details"&&e.open)&&t.push("open"),e.disabled&&t.push("disabled"),n==="input"){let i=e;(i.type==="checkbox"||i.type==="radio")&&i.checked&&t.push("checked")}if(n==="input"){let i=e;i.type!=="checkbox"&&i.type!=="radio"&&i.type!=="hidden"&&i.type!=="submit"&&i.type!=="button"&&i.type!=="reset"&&(t.push(`value="${i.value}"`),i.placeholder&&t.push(`placeholder="${i.placeholder}"`))}if(n==="textarea"){let i=e;t.push(`value="${i.value}"`),i.placeholder&&t.push(`placeholder="${i.placeholder}"`)}if(n==="select"){let i=e,a=i.options[i.selectedIndex];a&&t.push(`value="${a.text}"`)}let r=n.match(/^h([1-6])$/);r&&t.push(`level=${r[1]}`);let o=e.getAttribute("aria-expanded");return o==="true"&&t.push("expanded"),o==="false"&&t.push("collapsed"),e.getAttribute("aria-selected")==="true"&&t.push("selected"),e.getAttribute("aria-pressed")==="true"&&t.push("pressed"),t}function Kn(e,t){let n="";for(let r of e)n+=wl(r,t);return n}function wl(e,t){let n=" ".repeat(t),r=[];e.tag&&r.push(e.tag),e.name&&r.push(`"${e.name}"`);for(let a of e.attrs)r.push(`[${a}]`);e.ref&&r.push(`[ref=${e.ref}]`);let o="";r.length>0&&(o+=`${n}${r.join(" ")}
|
|
2
|
-
`);let i=r.length>0?t+1:t;return o+=Kn(e.children,i),o}function Eo(e){if(e===null)return"null";if(e===void 0)return"undefined";if(e instanceof Error)return e.stack||e.message||String(e);if(typeof e=="object")try{return JSON.stringify(e)}catch{return String(e)}return String(e)}function le(e){return new Promise(t=>setTimeout(t,e))}function tt(){let e=null,t=0;for(let n of document.querySelectorAll("*")){let r=n,o=getComputedStyle(r).overflowY;if(o!=="auto"&&o!=="scroll")continue;let i=r.scrollHeight-r.clientHeight;i<=20||i>t&&(t=i,e=r)}return e??document.documentElement}var vl=["log","info","warn","error","debug"];function Ao(){if(!console.__ms_patched){console.__ms_patched=!0;for(let e of vl){let t=console[e];console[e]=(...n)=>{t&&t.apply(console,n),pe({type:"console",level:e,args:n.map(Eo),url:location.href})}}}}function ko(){window.__ms_error_patched||(window.__ms_error_patched=!0,window.addEventListener("error",e=>{Yn({type:"error",message:e.message,stack:e.error&&e.error.stack||"",source:e.filename,line:e.lineno,column:e.colno,url:location.href})}),window.addEventListener("unhandledrejection",e=>{let t=e.reason||{};Yn({type:"error",message:t.message||String(t),stack:t.stack||"",url:location.href})}))}function Mo(){if(!window.fetch||window.fetch.__ms_patched)return;let e=window.fetch;window.fetch=function(t,n){let r=(n?.method||"GET").toUpperCase(),o=typeof t=="string"?t:t instanceof URL?t.href:t.url||String(t);if(o.includes("/__mindstudio_dev__/"))return e.apply(this,[t,n]);let i=Date.now();Bt();let a;try{a=e.apply(this,[t,n])}catch(s){throw et(),s}return a.then(s=>{et();let c={type:"network",method:r,url:o,status:s.status,statusText:s.statusText,duration:Date.now()-i,ok:s.ok};if(s.ok)pe(c);else try{s.clone().text().then(l=>{c.body=l.slice(0,1e3),pe(c)}).catch(()=>pe(c))}catch{pe(c)}return s},s=>{throw et(),pe({type:"network",method:r,url:o,error:s.message||String(s),duration:Date.now()-i,ok:!1}),s})},window.fetch.__ms_patched=!0}function To(){document.__ms_click_patched||(document.__ms_click_patched=!0,document.addEventListener("click",e=>{let t=e.target;if(!t)return;let n=(t.textContent||"").trim().slice(0,100);pe({type:"interaction",event:"click",target:he(t),text:n,url:location.href})},!0))}function Lo(){if(XMLHttpRequest.prototype.open.__ms_patched)return;let e=window.XMLHttpRequest,t=e.prototype.open,n=e.prototype.send;e.prototype.open=function(r,o,...i){return this.__ms_method=r.toUpperCase(),this.__ms_url=String(o),t.apply(this,[r,o,...i])},e.prototype.send=function(r){let o=this.__ms_method||"GET",i=this.__ms_url||"";if(i.includes("/__mindstudio_dev__/"))return n.apply(this,[r]);let a=Date.now();return Bt(),this.addEventListener("loadend",function(){et(),pe({type:"network",method:o,url:i,status:this.status,statusText:this.statusText,duration:Date.now()-a,ok:this.status>=200&&this.status<300,...this.status>=400?{body:(this.responseText||"").slice(0,1e3)}:{},via:"xhr"})},{once:!0}),n.apply(this,[r])},XMLHttpRequest.prototype.open.__ms_patched=!0}function xe(e){let t=null;if(e.ref){let n=He(),r=n.get(e.ref);if(r&&r.isConnected)if(Le(r))t={element:r,matched:`${he(r)} [ref=${e.ref}]`};else throw new Error(`Element [ref=${e.ref}] exists but is hidden (${Jn(r)}). It may be inside a closed dialog or collapsed section.`);else{let o=[...n.entries()].filter(([,i])=>i.isConnected&&Le(i)).slice(0,10).map(([i,a])=>`${he(a)} [ref=${i}]`).join(", ");throw new Error(`Element [ref=${e.ref}] not found. `+(o?`Available refs: ${o}`:"No refs available \u2014 take a snapshot first."))}}if(!t&&(e.text||e.role&&e.text)){let n=e.text,r=e.role,o=No(n,r);if(o.length===0){let i=No(n,r,!0);if(i.length>0)throw new Error(`Found ${r?r+" ":""}"${n}" but it is hidden (${Jn(i[0])}). Wait for it to become visible or check if a dialog/modal needs to be opened first.`);let a=r?`${r} "${n}"`:`"${n}"`,s=Ro(r);throw new Error(`No element found matching ${a}. `+(s?`Visible ${r||"element"}s: ${s}`:"The page may still be loading \u2014 try a wait command first."))}if(o.length>1){let i=o.filter(_o),a=i.length===1?i[0]:o[0];t={element:a,matched:he(a)}}else t={element:o[0],matched:he(o[0])}}if(!t&&e.role&&!e.text){let n=e.role,r=Cl(n);if(r.length===0){let o=Ro(n);throw new Error(`No visible element with role "${n}" found. `+(o?`Visible ${n}s: ${o}`:"The page may still be loading \u2014 try a wait command first."))}t={element:r[0],matched:he(r[0])}}if(!t&&e.label){let n=e.label,r=Sl(n);if(!r){let o=[...document.querySelectorAll("label")].filter(Le).map(i=>`"${(i.textContent||"").trim().slice(0,40)}"`).slice(0,8).join(", ");throw new Error(`No input found with label "${n}". `+(o?`Visible labels: ${o}`:"No labels found on the page."))}t={element:r,matched:`${he(r)} via label "${n}"`}}if(!t&&e.selector){let n=e.selector,r=document.querySelector(n);if(!r)throw new Error(`No element found for selector "${n}".`);if(!Le(r))throw new Error(`Found element for selector "${n}" but it is hidden (${Jn(r)}).`);t={element:r,matched:`${he(r)} via selector "${n}"`}}if(!t)throw new Error("No targeting field provided (need ref, text, role, label, or selector)");return t}function No(e,t,n=!1){let r=[],o=e.toLowerCase();for(let i of document.querySelectorAll("*")){if(!n&&!Le(i)||n&&!i.isConnected||t&&ye(i)!==t)continue;if(Se(i).toLowerCase().includes(o)){r.push(i);continue}i.children.length||(i.textContent||"").trim().toLowerCase().includes(o)&&r.push(i)}return r}function Cl(e){let t=[];for(let n of document.querySelectorAll("*"))Le(n)&&ye(n)===e&&t.push(n);return t}function Sl(e){let t=e.toLowerCase();for(let n of document.querySelectorAll("label")){if(!(n.textContent||"").trim().toLowerCase().includes(t))continue;let o=n.getAttribute("for");if(o){let a=document.getElementById(o);if(a&&Le(a))return a}let i=n.querySelector("input, textarea, select");if(i&&Le(i))return i}return null}function Le(e){if(!e.isConnected)return!1;try{let t=getComputedStyle(e);if(t.display==="none"||t.visibility==="hidden")return!1}catch{return!1}return!0}function _o(e){if(e.matches('a, button, input, textarea, select, [role="button"], [role="link"], [tabindex]'))return!0;try{return getComputedStyle(e).cursor==="pointer"}catch{return!1}}function Jn(e){try{let t=getComputedStyle(e);if(t.display==="none")return"display: none";if(t.visibility==="hidden")return"visibility: hidden"}catch{}return e.getAttribute("aria-hidden")==="true"?'aria-hidden="true"':"hidden"}function Ro(e){let t=[];for(let n of document.querySelectorAll("*"))if(Le(n)&&(e?ye(n)===e&&t.push(n):_o(n)&&t.push(n),t.length>=10))break;return t.length===0?"":t.map(n=>`"${Se(n).slice(0,40)||he(n)}"`).join(", ")}function er(e){let t=e.getBoundingClientRect(),n=t.left+t.width/2,r=t.top+t.height/2,o={bubbles:!0,cancelable:!0,clientX:n,clientY:r,button:0};e.dispatchEvent(new PointerEvent("pointerdown",{...o,pointerId:1})),e.dispatchEvent(new MouseEvent("mousedown",o)),e instanceof HTMLElement&&e.focus(),e.dispatchEvent(new PointerEvent("pointerup",{...o,pointerId:1})),e.dispatchEvent(new MouseEvent("mouseup",o)),e.dispatchEvent(new MouseEvent("click",o))}var xl=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value")?.set,Il=Object.getOwnPropertyDescriptor(HTMLTextAreaElement.prototype,"value")?.set;async function Do(e,t,n={}){if(!(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement))throw new Error("type command requires an input or textarea element");e.focus(),er(e),n.clear&&(Fo(e,""),e.dispatchEvent(new Event("input",{bubbles:!0})));for(let r=0;r<t.length;r++){let o=t[r];e.dispatchEvent(new KeyboardEvent("keydown",{key:o,code:`Key${o.toUpperCase()}`,bubbles:!0})),e.dispatchEvent(new KeyboardEvent("keypress",{key:o,code:`Key${o.toUpperCase()}`,bubbles:!0})),Fo(e,e.value+o),e.dispatchEvent(new Event("input",{bubbles:!0})),e.dispatchEvent(new KeyboardEvent("keyup",{key:o,code:`Key${o.toUpperCase()}`,bubbles:!0})),await le(El(o,t.length))}e.dispatchEvent(new Event("change",{bubbles:!0}))}function El(e,t){let n=Math.random()*50-25,r;if(e===" "?r=120+n:/[.,!?;:\-]/.test(e)?r=140+n:/[A-Z]/.test(e)?r=115+n:r=85+n,t<=20)return r;let o=Math.max(.1,20/t);return r*o}function Fo(e,t){let n=e instanceof HTMLTextAreaElement?Il:xl;n?n.call(e,t):e.value=t}async function Po(e){let t=e.timeout||5e3,n=Date.now(),r=n+t;for(;Date.now()<r;)try{return{...xe(e),elapsed:Date.now()-n}}catch{await le(100)}let o=e.text?`"${e.text}"`:e.role?`role "${e.role}"`:e.selector?`selector "${e.selector}"`:"element";throw new Error(`Timed out waiting for ${o} after ${t}ms`)}var Oo=Object.getOwnPropertyDescriptor(HTMLSelectElement.prototype,"value")?.set;function Wo(e,t){if(!(e instanceof HTMLSelectElement))throw new Error("select command requires a <select> element");let n=t.toLowerCase(),r=null;for(let o of e.options)if(o.text.toLowerCase().includes(n)||o.value.toLowerCase()===n||o.label.toLowerCase().includes(n)){r=o;break}if(!r){let o=[...e.options].map(i=>`"${i.text}"`).join(", ");throw new Error(`No option matching "${t}" in select. Available options: ${o}`)}return Oo?Oo.call(e,r.value):e.value=r.value,e.dispatchEvent(new Event("change",{bubbles:!0})),e.dispatchEvent(new Event("input",{bubbles:!0})),r.text}async function Bo(e){try{let t=e.trim(),r=/\breturn\b/.test(t)||/[;{]/.test(t)?e:`return (${e})`,o=(async()=>{}).constructor,i=new o(r);return bt(await i())}catch(t){throw new Error(`evaluate failed: ${t instanceof Error?t.message:String(t)}`)}}var Al=10,Ut=500,Vt=500,Qn=2e4,$o=1e3;function bt(e,t=0,n=new WeakSet){if(e===null)return null;let r=typeof e;if(r==="string"){let i=e;return i.length>Qn?`${i.slice(0,Qn)}\u2026(+${i.length-Qn} chars)`:i}if(r==="number"||r==="boolean")return e;if(r==="undefined")return"[undefined]";if(r==="bigint")return`${e.toString()}n`;if(r==="symbol")return e.toString();if(r==="function"){let i=e.name;return i?`[Function: ${i}]`:"[Function]"}let o=e;if(typeof Element<"u"&&o instanceof Element){let i=o.outerHTML??"";return{__type:"Element",tag:o.tagName.toLowerCase(),id:o.id||void 0,class:o.getAttribute("class")||void 0,text:(o.textContent||"").trim().slice(0,200)||void 0,html:i.length>$o?`${i.slice(0,$o)}\u2026`:i}}if(typeof Node<"u"&&o instanceof Node)return{__type:"Node",nodeName:o.nodeName,text:(o.textContent||"").trim().slice(0,200)||void 0};if(o instanceof Error)return{__type:"Error",name:o.name,message:o.message,stack:o.stack};if(o instanceof Date)return o.toISOString();if(o instanceof RegExp)return o.toString();if(n.has(o))return"[Circular]";if(t>=Al)return"[Max depth]";n.add(o);try{if(Array.isArray(o)){let c=o.slice(0,Ut).map(l=>bt(l,t+1,n));return o.length>Ut&&c.push(`\u2026(+${o.length-Ut} more)`),c}if(o instanceof Map){let c={__type:"Map"},l=0;for(let[u,d]of o){if(l++>=Vt){c["\u2026"]=`(+${o.size-Vt} more)`;break}c[String(u)]=bt(d,t+1,n)}return c}if(o instanceof Set)return{__type:"Set",values:[...o].slice(0,Ut).map(c=>bt(c,t+1,n))};let i=Object.keys(o),a={},s=0;for(let c of i){if(s++>=Vt){a["\u2026"]=`(+${i.length-Vt} more)`;break}a[c]=bt(o[c],t+1,n)}return a}catch{return`[Unserializable: ${Object.prototype.toString.call(o)}]`}finally{n.delete(o)}}var Ho="__mindstudio-touch-circle",tr="__mindstudio-touch-style",Uo=44,Vo=5,Go=.95,Gt=.5,nr=.45,zo=600;function Ml(){document.getElementById(Ho)?.remove();let e=document.createElement("div");return e.id=Ho,e.style.cssText=["position: fixed","z-index: 2147483647","pointer-events: none",`width: ${Uo}px`,`height: ${Uo}px`,"border-radius: 50%","background: rgba(255, 255, 255, 0.08)","border: 2px solid rgba(255, 255, 255, 0.85)","box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35), inset 0 0 0 0.5px rgba(0, 0, 0, 0.1)","backdrop-filter: blur(1px)","-webkit-backdrop-filter: blur(1.5px)","transform: translate(-50%, -50%) scale(1)","transition: transform 100ms ease, opacity 100ms ease, background 100ms ease","opacity: 0","will-change: left, top, transform, opacity"].join("; "),document.documentElement.appendChild(e),e}function Tl(e){e.style.transform="translate(-50%, -50%) scale(0.88)",e.style.background="rgba(255, 255, 255, 0.18)"}function qo(e){e.style.transform="translate(-50%, -50%) scale(1)",e.style.background="rgba(255, 255, 255, 0.08)"}function Yo(){window.parent!==window&&x().zoom.mobilePreview&&wt()}function wt(){let e=x().touch;if(e.active)return;e.active=!0,e.scrollContainer=tt(),_l();let t=Ml();e.circleEl=t,e.onMouseMove=n=>{let r=x();if(r.cursor.executing||r.screenshot.capturing){t.style.opacity="0";return}if(t.style.left=`${n.clientX}px`,t.style.top=`${n.clientY}px`,t.style.opacity="1",e.pressed){let o=Math.abs(n.clientX-e.startX),i=Math.abs(n.clientY-e.startY);if(!e.dragging&&(o>Vo||i>Vo)&&(e.dragging=!0),e.dragging){let a=e.scrollContainer||document.documentElement,s=performance.now(),c=s-e.lastMoveTime||16,l=e.lastX-n.clientX,u=e.lastY-n.clientY;e.bouncing&&Rl();let d=a.scrollTop;a.scrollTop+=u,a.scrollLeft+=l;let m=a.scrollTop-d,p=u-m;if(Math.abs(p)>.5){let g=nr/(1+Math.abs(e.overscrollY)/200);e.overscrollY+=p*g,rr()}else if(e.overscrollY!==0){let g=nr/(1+Math.abs(e.overscrollY)/200);e.overscrollY+=p*g,(e.overscrollY>0&&u<0||e.overscrollY<0&&u>0)&&(e.overscrollY*=.7),rr()}e.velocityX=.8*(l/c)+.2*e.velocityX,e.velocityY=.8*(u/c)+.2*e.velocityY,e.lastMoveTime=s,n.preventDefault()}e.lastX=n.clientX,e.lastY=n.clientY}},e.onMouseDown=n=>{x().cursor.executing||(zt(),e.pressed=!0,e.dragging=!1,e.startX=n.clientX,e.startY=n.clientY,e.lastX=n.clientX,e.lastY=n.clientY,e.velocityX=0,e.velocityY=0,e.lastMoveTime=performance.now(),Tl(t))},e.onMouseUp=()=>{let n=e.dragging;n&&document.addEventListener("click",Ll,{capture:!0,once:!0}),e.pressed=!1,e.dragging=!1,qo(t),n&&(e.overscrollY!==0&&Xo(),(Math.abs(e.velocityX)>Gt/16||Math.abs(e.velocityY)>Gt/16)&&Nl())},e.onMouseLeave=()=>{e.pressed=!1,e.dragging=!1,zt(),t.style.opacity="0",qo(t)},e.onDragStart=n=>n.preventDefault(),document.addEventListener("mousemove",e.onMouseMove),document.addEventListener("mousedown",e.onMouseDown),document.addEventListener("mouseup",e.onMouseUp),document.addEventListener("mouseleave",e.onMouseLeave),document.addEventListener("dragstart",e.onDragStart)}function qt(){let e=x().touch;e.active&&(e.active=!1,e.pressed=!1,e.dragging=!1,zt(),e.overscrollY!==0&&(e.overscrollY=0,document.body.style.transition="",document.body.style.transform=""),Fl(),e.circleEl&&(e.circleEl.remove(),e.circleEl=null),e.onMouseMove&&document.removeEventListener("mousemove",e.onMouseMove),e.onMouseDown&&document.removeEventListener("mousedown",e.onMouseDown),e.onMouseUp&&document.removeEventListener("mouseup",e.onMouseUp),e.onMouseLeave&&document.removeEventListener("mouseleave",e.onMouseLeave),e.onDragStart&&document.removeEventListener("dragstart",e.onDragStart),e.onMouseMove=null,e.onMouseDown=null,e.onMouseUp=null,e.onMouseLeave=null,e.onDragStart=null)}function jo(){let{circleEl:e}=x().touch;e&&(e.style.opacity="0")}function Zo(){let e=x().touch;e.active&&e.circleEl&&(e.circleEl.style.opacity="1")}function Ll(e){e.preventDefault(),e.stopPropagation()}function Nl(){zt();let e=x().touch,t=e.scrollContainer||document.documentElement,n=e.velocityX*16,r=e.velocityY*16;function o(){let i=x().touch;if(n*=Go,r*=Go,Math.abs(n)<Gt&&Math.abs(r)<Gt){i.momentumFrame=null,i.overscrollY!==0&&Xo();return}let a=t.scrollTop;t.scrollTop+=r,t.scrollLeft+=n;let s=t.scrollTop-a,c=r-s;if(Math.abs(c)>.5){let l=nr*.5/(1+Math.abs(i.overscrollY)/200);i.overscrollY+=c*l,rr(),r*=.7}i.momentumFrame=requestAnimationFrame(o)}e.momentumFrame=requestAnimationFrame(o)}function zt(){let e=x().touch;e.momentumFrame!==null&&(cancelAnimationFrame(e.momentumFrame),e.momentumFrame=null)}function rr(){let e=x().touch;document.body.style.transition="none",document.body.style.transform=`translateY(${-e.overscrollY}px)`}function Xo(){let e=x().touch;e.bouncing=!0,e.overscrollY=0,document.body.style.transition=`transform ${zo}ms cubic-bezier(0.2, 0.9, 0.3, 1)`,document.body.style.transform="",e.bounceTimer&&clearTimeout(e.bounceTimer),e.bounceTimer=setTimeout(()=>{let t=x().touch;t.bouncing=!1,t.bounceTimer=null,document.body.style.transition="",document.body.style.transform=""},zo)}function Rl(){let e=x().touch;e.bouncing&&(e.bouncing=!1,e.bounceTimer&&(clearTimeout(e.bounceTimer),e.bounceTimer=null),document.body.style.transition="")}function _l(){document.getElementById(tr)?.remove();let e=document.createElement("style");e.id=tr,e.textContent=`
|
|
1
|
+
"use strict";var __MindStudioBrowserAgent=(()=>{var er=Object.defineProperty;var Ul=Object.getOwnPropertyDescriptor;var Vl=Object.getOwnPropertyNames;var zl=Object.prototype.hasOwnProperty;var tr=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Gl=(e,t)=>{for(var n in t)er(e,n,{get:t[n],enumerable:!0})},ql=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Vl(t))!zl.call(e,o)&&o!==n&&er(e,o,{get:()=>t[o],enumerable:!(r=Ul(t,o))||r.enumerable});return e};var jl=e=>ql(er({},"__esModule",{value:!0}),e);var yh={};Gl(yh,{executeSteps:()=>At,getRefMap:()=>qe,resolveElement:()=>Re,takeSnapshot:()=>je,takeSnapshotSync:()=>Ut});var nr="__ms";function Yl(){return{ws:{ws:null,clientId:null,reconnectDelay:1e3,closing:!1,busy:!1},cursor:{el:null,rippleEl:null,x:-100,y:-100,hasPosition:!1,hideTimer:null,executing:!1,targetElement:null,trackingFrame:null,settledResolve:null,visibilityState:"hidden",preSnapshotState:null},snapshot:{refCounter:0,refMap:new Map},networkIdle:{activeRequests:0},transport:{buffer:[],flushTimer:null,capturing:!1,captured:[],wsGetter:null},messages:{handler:null},nav:{lastUrl:null},screenshot:{capturing:!1},fonts:{initialized:!1,observer:null},zoom:{pipMode:!1,mobilePreview:!1},touch:{circleEl:null,active:!1,pressed:!1,dragging:!1,startX:0,startY:0,lastX:0,lastY:0,onMouseMove:null,onMouseDown:null,onMouseUp:null,onMouseLeave:null,onDragStart:null,momentumFrame:null,overscrollY:0,bouncing:!1,bounceTimer:null,scrollContainer:null,velocityX:0,velocityY:0,lastMoveTime:0},mirror:{recording:!1,stopFn:null},sessionRecording:{active:!1,runId:null,stopFn:null,buffer:[]},authCredsWidget:{initialized:!1,host:null,observer:null,debounceTimer:null,awaitingCode:!1,awaitingCodeTimer:null,codePollTimer:null,codeAttempts:0,codeSubmitted:!1,codeSeenCount:0,blankPolls:0}}}function M(){let e=window;return e[nr]||(e[nr]=Yl()),e[nr]}var jo="/__mindstudio_dev__/logs",Zl=2e3;function Yo(e){M().transport.wsGetter=e}function Zo(){let e=M().transport;if(e.buffer.length===0)return;let t=e.buffer;e.buffer=[];let n=e.wsGetter?.();if(n&&n.readyState===WebSocket.OPEN)try{n.send(JSON.stringify({type:"log",entries:t}));return}catch{}try{let r=new XMLHttpRequest;r.open("POST",jo,!0),r.setRequestHeader("Content-Type","application/json"),r.send(JSON.stringify(t))}catch{}}function Kl(){let e=M().transport;e.flushTimer||(e.flushTimer=setTimeout(()=>{e.flushTimer=null,Zo()},Zl))}function Xl(){let e=M().transport;e.flushTimer&&(clearTimeout(e.flushTimer),e.flushTimer=null),Zo()}function we(e){let t=M().transport;t.buffer.push(e),t.capturing&&t.captured.push(e),Kl()}function rr(e){let t=M().transport;t.buffer.push(e),t.capturing&&t.captured.push(e),Xl()}function or(){let e=M().transport;e.capturing=!0,e.captured=[]}function ir(){let e=M().transport;e.capturing=!1;let t=e.captured;return e.captured=[],t}function Ko(){window.addEventListener("beforeunload",()=>{let e=M().transport;e.buffer.length>0&&navigator.sendBeacon&&navigator.sendBeacon(jo,JSON.stringify(e.buffer))})}var Jl={a:"link",button:"button",input:"textbox",textarea:"textbox",select:"combobox",option:"option",h1:"heading",h2:"heading",h3:"heading",h4:"heading",h5:"heading",h6:"heading",nav:"navigation",main:"main",header:"banner",footer:"contentinfo",aside:"complementary",dialog:"dialog",details:"group",summary:"button",img:"img",ul:"list",ol:"list",li:"listitem",table:"table",tr:"row",th:"columnheader",td:"cell",form:"form",article:"article",section:"region",label:"label",fieldset:"group",legend:"legend",p:"paragraph",blockquote:"blockquote",pre:"code",code:"code",hr:"separator",progress:"progressbar"};function Ie(e){let t=e.getAttribute("role");if(t)return t==="presentation"||t==="none"?null:t;let n=e.tagName.toLowerCase();if(n==="a")return e.hasAttribute("href")?"link":null;if(n==="section")return e.hasAttribute("aria-label")||e.hasAttribute("aria-labelledby")?"region":null;if(n==="form")return e.hasAttribute("aria-label")||e.hasAttribute("aria-labelledby")?"form":null;if(n==="img")return e.alt===""?null:"img";if(n==="input")switch(e.type){case"checkbox":return"checkbox";case"radio":return"radio";case"range":return"slider";case"submit":case"button":case"reset":return"button";case"hidden":return null;default:return"textbox"}return Jl[n]??null}function Xo(e){if(e.hasAttribute("onclick")||e.hasAttribute("tabindex")&&e.getAttribute("tabindex")!=="-1")return!0;try{if(getComputedStyle(e).cursor==="pointer")return!0}catch{}return!1}function Te(e){let t=e.getAttribute("aria-label");if(t)return t.trim();let n=e.getAttribute("aria-labelledby");if(n){let a=n.split(/\s+/).map(s=>{let l=document.getElementById(s);return l?Ge(l):""}).filter(Boolean).join(" ");if(a)return a}let r=e.tagName.toLowerCase();if(r==="input"||r==="textarea"||r==="select"){let a=Ql(e);if(a)return a}if(r==="img"){let a=e.alt;if(a)return a.trim()}if(r==="fieldset"){let a=e.querySelector("legend");if(a)return Ge(a)}let o=Ge(e);if(o)return o;let i=e.getAttribute("title");return i?i.trim():""}function Ge(e){if(!e.children.length)return(e.textContent||"").trim();let t=[];for(let n of Array.from(e.childNodes))if(n.nodeType===Node.TEXT_NODE){let r=(n.textContent||"").trim();r&&t.push(r)}else if(n.nodeType===Node.ELEMENT_NODE){let r=n;if(tc(r))continue;let o=ec(r),i=Ge(r);i&&(o&&t.length>0&&t.push(" "),t.push(i),o&&t.push(" "))}return t.join("").replace(/\s+/g," ").trim()}function Ql(e){if(e.id){let n=document.querySelector(`label[for="${CSS.escape(e.id)}"]`);if(n)return Ge(n)}let t=e.closest("label");if(t){let n=t.cloneNode(!0),r=n.querySelector("input, textarea, select");r&&r.remove();let o=n.textContent?.trim();if(o)return o}return null}function ec(e){try{return!getComputedStyle(e).display.includes("inline")}catch{let t=e.tagName.toLowerCase();return["div","p","h1","h2","h3","h4","h5","h6","li","section","article","header","footer","nav","main","aside","blockquote","pre","form","fieldset","table","tr","br"].includes(t)}}function tc(e){let t=e.tagName.toLowerCase();if(t==="script"||t==="style"||t==="noscript"||t==="template"||e.getAttribute("aria-hidden")==="true")return!0;try{let n=getComputedStyle(e);if(n.display==="none"||n.visibility==="hidden")return!0}catch{}return!1}function ar(e,t){try{let n=getComputedStyle(e,t).content;if(!n||n==="none"||n==="normal")return"";let r=n.match(/^["'](.*)["']$/);return r?r[1]:""}catch{return""}}function Ht(){M().networkIdle.activeRequests++}function st(){let e=M().networkIdle;e.activeRequests=Math.max(0,e.activeRequests-1)}var nc=2;function Jo(e=5e3,t=200){let n=()=>M().networkIdle.activeRequests<=nc;return new Promise(r=>{let o=Date.now()+e,i=null;function a(){if(Date.now()>o){i&&clearTimeout(i),r();return}n()?i||(i=setTimeout(()=>{n()?r():(i=null,a())},t)):(i&&(clearTimeout(i),i=null),setTimeout(a,50))}a()})}function qe(){return M().snapshot.refMap}async function je(){return await Jo(),Ut()}function Ut(){let e=M().snapshot;e.refCounter=0,e.refMap=new Map;let t=document.body;if(!t)return"(empty page)";let n=Qo(t);return sr(n,0).trimEnd()}function ve(e){let t=Ie(e),n=Te(e),r=n.length>60?n.slice(0,57)+"...":n;if(t&&r)return`${t} "${r}"`;if(t)return t;if(r)return`"${r}"`;let o=e.tagName.toLowerCase();return e.id?`${o}#${e.id}`:o}function Qo(e){if(oc(e))return[];let t=Ie(e),n=!t&&Xo(e),r=t||(n?"clickable":null),o="";if(r){o=Te(e);let u=ar(e,"::before"),d=ar(e,"::after");(u||d)&&(o=[u,o,d].filter(Boolean).join(" ")),o.length>80&&(o=o.slice(0,77)+"...")}let i=ic(e),a=t==="button"||t==="link"||t==="textbox"||t==="combobox"||t==="checkbox"||t==="radio"||t==="slider"||t==="tab"||t==="menuitem"||n,s=r&&o&&!a,l=null;if(a||s){let u=M().snapshot;u.refCounter++,l=`e${u.refCounter}`,u.refMap.set(l,e)}let c=rc(e);if(r){let u=c.length===0?"":sr(c,0).trim();return[{tag:r,name:o,attrs:i,ref:l,children:u&&u===o?[]:c,element:e}]}if(c.length===0){let u=Ge(e);if(u)return[{tag:null,name:u.length>80?u.slice(0,77)+"...":u,attrs:[],ref:null,children:[],element:e}]}return c}function rc(e){let t=[];for(let n of Array.from(e.childNodes))n.nodeType===Node.ELEMENT_NODE&&t.push(...Qo(n));return t}function oc(e){let t=e.tagName.toLowerCase();if(t==="script"||t==="style"||t==="noscript"||t==="template"||t==="head"||e.getAttribute("aria-hidden")==="true"||e.id==="__mindstudio-browser-agent"||e.id==="__mindstudio-cursor"||e.id==="__mindstudio-cursor-ripple"||e.id==="__mindstudio-notes-host")return!0;try{let n=getComputedStyle(e);if(n.display==="none"||n.visibility==="hidden"&&n.position!=="static")return!0}catch{}return!1}function ic(e){let t=[],n=e.tagName.toLowerCase();if((n==="dialog"&&e.open||n==="details"&&e.open)&&t.push("open"),e.disabled&&t.push("disabled"),n==="input"){let i=e;(i.type==="checkbox"||i.type==="radio")&&i.checked&&t.push("checked")}if(n==="input"){let i=e;i.type!=="checkbox"&&i.type!=="radio"&&i.type!=="hidden"&&i.type!=="submit"&&i.type!=="button"&&i.type!=="reset"&&(t.push(`value="${i.value}"`),i.placeholder&&t.push(`placeholder="${i.placeholder}"`))}if(n==="textarea"){let i=e;t.push(`value="${i.value}"`),i.placeholder&&t.push(`placeholder="${i.placeholder}"`)}if(n==="select"){let i=e,a=i.options[i.selectedIndex];a&&t.push(`value="${a.text}"`)}let r=n.match(/^h([1-6])$/);r&&t.push(`level=${r[1]}`);let o=e.getAttribute("aria-expanded");return o==="true"&&t.push("expanded"),o==="false"&&t.push("collapsed"),e.getAttribute("aria-selected")==="true"&&t.push("selected"),e.getAttribute("aria-pressed")==="true"&&t.push("pressed"),t}function sr(e,t){let n="";for(let r of e)n+=ac(r,t);return n}function ac(e,t){let n=" ".repeat(t),r=[];e.tag&&r.push(e.tag),e.name&&r.push(`"${e.name}"`);for(let a of e.attrs)r.push(`[${a}]`);e.ref&&r.push(`[ref=${e.ref}]`);let o="";r.length>0&&(o+=`${n}${r.join(" ")}
|
|
2
|
+
`);let i=r.length>0?t+1:t;return o+=sr(e.children,i),o}function ei(e){if(e===null)return"null";if(e===void 0)return"undefined";if(e instanceof Error)return e.stack||e.message||String(e);if(typeof e=="object")try{return JSON.stringify(e)}catch{return String(e)}return String(e)}function Se(e){return new Promise(t=>setTimeout(t,e))}function Vt(){let e=null,t=0;for(let n of document.querySelectorAll("*")){let r=n,o=getComputedStyle(r).overflowY;if(o!=="auto"&&o!=="scroll")continue;let i=r.scrollHeight-r.clientHeight;i<=20||i>t&&(t=i,e=r)}return e??document.documentElement}var sc=["log","info","warn","error","debug"];function ti(){if(!console.__ms_patched){console.__ms_patched=!0;for(let e of sc){let t=console[e];console[e]=(...n)=>{t&&t.apply(console,n),we({type:"console",level:e,args:n.map(ei),url:location.href})}}}}function ni(){window.__ms_error_patched||(window.__ms_error_patched=!0,window.addEventListener("error",e=>{rr({type:"error",message:e.message,stack:e.error&&e.error.stack||"",source:e.filename,line:e.lineno,column:e.colno,url:location.href})}),window.addEventListener("unhandledrejection",e=>{let t=e.reason||{};rr({type:"error",message:t.message||String(t),stack:t.stack||"",url:location.href})}))}function ri(){if(!window.fetch||window.fetch.__ms_patched)return;let e=window.fetch;window.fetch=function(t,n){let r=(n?.method||"GET").toUpperCase(),o=typeof t=="string"?t:t instanceof URL?t.href:t.url||String(t);if(o.includes("/__mindstudio_dev__/"))return e.apply(this,[t,n]);let i=Date.now();Ht();let a;try{a=e.apply(this,[t,n])}catch(s){throw st(),s}return a.then(s=>{st();let l={type:"network",method:r,url:o,status:s.status,statusText:s.statusText,duration:Date.now()-i,ok:s.ok};if(s.ok)we(l);else try{s.clone().text().then(c=>{l.body=c.slice(0,1e3),we(l)}).catch(()=>we(l))}catch{we(l)}return s},s=>{throw st(),we({type:"network",method:r,url:o,error:s.message||String(s),duration:Date.now()-i,ok:!1}),s})},window.fetch.__ms_patched=!0}function oi(){document.__ms_click_patched||(document.__ms_click_patched=!0,document.addEventListener("click",e=>{let t=e.target;if(!t)return;let n=(t.textContent||"").trim().slice(0,100);we({type:"interaction",event:"click",target:ve(t),text:n,url:location.href})},!0))}function ii(){if(XMLHttpRequest.prototype.open.__ms_patched)return;let e=window.XMLHttpRequest,t=e.prototype.open,n=e.prototype.send;e.prototype.open=function(r,o,...i){return this.__ms_method=r.toUpperCase(),this.__ms_url=String(o),t.apply(this,[r,o,...i])},e.prototype.send=function(r){let o=this.__ms_method||"GET",i=this.__ms_url||"";if(i.includes("/__mindstudio_dev__/"))return n.apply(this,[r]);let a=Date.now();return Ht(),this.addEventListener("loadend",function(){st(),we({type:"network",method:o,url:i,status:this.status,statusText:this.statusText,duration:Date.now()-a,ok:this.status>=200&&this.status<300,...this.status>=400?{body:(this.responseText||"").slice(0,1e3)}:{},via:"xhr"})},{once:!0}),n.apply(this,[r])},XMLHttpRequest.prototype.open.__ms_patched=!0}function Re(e){let t=null;if(e.ref){let n=qe(),r=n.get(e.ref);if(r&&r.isConnected)if(Fe(r))t={element:r,matched:`${ve(r)} [ref=${e.ref}]`};else throw new Error(`Element [ref=${e.ref}] exists but is hidden (${lr(r)}). It may be inside a closed dialog or collapsed section.`);else{let o=[...n.entries()].filter(([,i])=>i.isConnected&&Fe(i)).slice(0,10).map(([i,a])=>`${ve(a)} [ref=${i}]`).join(", ");throw new Error(`Element [ref=${e.ref}] not found. `+(o?`Available refs: ${o}`:"No refs available \u2014 take a snapshot first."))}}if(!t&&(e.text||e.role&&e.text)){let n=e.text,r=e.role,o=ai(n,r);if(o.length===0){let i=ai(n,r,!0);if(i.length>0)throw new Error(`Found ${r?r+" ":""}"${n}" but it is hidden (${lr(i[0])}). Wait for it to become visible or check if a dialog/modal needs to be opened first.`);let a=r?`${r} "${n}"`:`"${n}"`,s=si(r);throw new Error(`No element found matching ${a}. `+(s?`Visible ${r||"element"}s: ${s}`:"The page may still be loading \u2014 try a wait command first."))}if(o.length>1){let i=o.filter(li),a=i.length===1?i[0]:o[0];t={element:a,matched:ve(a)}}else t={element:o[0],matched:ve(o[0])}}if(!t&&e.role&&!e.text){let n=e.role,r=lc(n);if(r.length===0){let o=si(n);throw new Error(`No visible element with role "${n}" found. `+(o?`Visible ${n}s: ${o}`:"The page may still be loading \u2014 try a wait command first."))}t={element:r[0],matched:ve(r[0])}}if(!t&&e.label){let n=e.label,r=cc(n);if(!r){let o=[...document.querySelectorAll("label")].filter(Fe).map(i=>`"${(i.textContent||"").trim().slice(0,40)}"`).slice(0,8).join(", ");throw new Error(`No input found with label "${n}". `+(o?`Visible labels: ${o}`:"No labels found on the page."))}t={element:r,matched:`${ve(r)} via label "${n}"`}}if(!t&&e.selector){let n=e.selector,r=document.querySelector(n);if(!r)throw new Error(`No element found for selector "${n}".`);if(!Fe(r))throw new Error(`Found element for selector "${n}" but it is hidden (${lr(r)}).`);t={element:r,matched:`${ve(r)} via selector "${n}"`}}if(!t)throw new Error("No targeting field provided (need ref, text, role, label, or selector)");return t}function ai(e,t,n=!1){let r=[],o=e.toLowerCase();for(let i of document.querySelectorAll("*")){if(!n&&!Fe(i)||n&&!i.isConnected||t&&Ie(i)!==t)continue;if(Te(i).toLowerCase().includes(o)){r.push(i);continue}i.children.length||(i.textContent||"").trim().toLowerCase().includes(o)&&r.push(i)}return r}function lc(e){let t=[];for(let n of document.querySelectorAll("*"))Fe(n)&&Ie(n)===e&&t.push(n);return t}function cc(e){let t=e.toLowerCase();for(let n of document.querySelectorAll("label")){if(!(n.textContent||"").trim().toLowerCase().includes(t))continue;let o=n.getAttribute("for");if(o){let a=document.getElementById(o);if(a&&Fe(a))return a}let i=n.querySelector("input, textarea, select");if(i&&Fe(i))return i}return null}function Fe(e){if(!e.isConnected)return!1;try{let t=getComputedStyle(e);if(t.display==="none"||t.visibility==="hidden")return!1}catch{return!1}return!0}function li(e){if(e.matches('a, button, input, textarea, select, [role="button"], [role="link"], [tabindex]'))return!0;try{return getComputedStyle(e).cursor==="pointer"}catch{return!1}}function lr(e){try{let t=getComputedStyle(e);if(t.display==="none")return"display: none";if(t.visibility==="hidden")return"visibility: hidden"}catch{}return e.getAttribute("aria-hidden")==="true"?'aria-hidden="true"':"hidden"}function si(e){let t=[];for(let n of document.querySelectorAll("*"))if(Fe(n)&&(e?Ie(n)===e&&t.push(n):li(n)&&t.push(n),t.length>=10))break;return t.length===0?"":t.map(n=>`"${Te(n).slice(0,40)||ve(n)}"`).join(", ")}function ur(e){let t=e.getBoundingClientRect(),n=t.left+t.width/2,r=t.top+t.height/2,o={bubbles:!0,cancelable:!0,clientX:n,clientY:r,button:0};e.dispatchEvent(new PointerEvent("pointerdown",{...o,pointerId:1})),e.dispatchEvent(new MouseEvent("mousedown",o)),e instanceof HTMLElement&&e.focus(),e.dispatchEvent(new PointerEvent("pointerup",{...o,pointerId:1})),e.dispatchEvent(new MouseEvent("mouseup",o)),e.dispatchEvent(new MouseEvent("click",o))}var uc=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value")?.set,dc=Object.getOwnPropertyDescriptor(HTMLTextAreaElement.prototype,"value")?.set;async function fi(e,t,n={}){if(!(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement))throw new Error("type command requires an input or textarea element");e.focus(),ur(e),n.clear&&(ci(e,""),e.dispatchEvent(new Event("input",{bubbles:!0})));for(let r=0;r<t.length;r++){let o=t[r];e.dispatchEvent(new KeyboardEvent("keydown",{key:o,code:`Key${o.toUpperCase()}`,bubbles:!0})),e.dispatchEvent(new KeyboardEvent("keypress",{key:o,code:`Key${o.toUpperCase()}`,bubbles:!0})),ci(e,e.value+o),e.dispatchEvent(new Event("input",{bubbles:!0})),e.dispatchEvent(new KeyboardEvent("keyup",{key:o,code:`Key${o.toUpperCase()}`,bubbles:!0})),await Se(fc(o,t.length))}e.dispatchEvent(new Event("change",{bubbles:!0}))}function fc(e,t){let n=Math.random()*50-25,r;if(e===" "?r=120+n:/[.,!?;:\-]/.test(e)?r=140+n:/[A-Z]/.test(e)?r=115+n:r=85+n,t<=20)return r;let o=Math.max(.1,20/t);return r*o}function ci(e,t){let n=e instanceof HTMLTextAreaElement?dc:uc;n?n.call(e,t):e.value=t}async function pi(e){let t=e.timeout||5e3,n=Date.now(),r=n+t;for(;Date.now()<r;)try{return{...Re(e),elapsed:Date.now()-n}}catch{await Se(100)}let o=e.text?`"${e.text}"`:e.role?`role "${e.role}"`:e.selector?`selector "${e.selector}"`:"element";throw new Error(`Timed out waiting for ${o} after ${t}ms`)}var ui=Object.getOwnPropertyDescriptor(HTMLSelectElement.prototype,"value")?.set;function mi(e,t){if(!(e instanceof HTMLSelectElement))throw new Error("select command requires a <select> element");let n=t.toLowerCase(),r=null;for(let o of e.options)if(o.text.toLowerCase().includes(n)||o.value.toLowerCase()===n||o.label.toLowerCase().includes(n)){r=o;break}if(!r){let o=[...e.options].map(i=>`"${i.text}"`).join(", ");throw new Error(`No option matching "${t}" in select. Available options: ${o}`)}return ui?ui.call(e,r.value):e.value=r.value,e.dispatchEvent(new Event("change",{bubbles:!0})),e.dispatchEvent(new Event("input",{bubbles:!0})),r.text}async function hi(e){try{let t=e.trim(),r=/\breturn\b/.test(t)||/[;{]/.test(t)?e:`return (${e})`,o=(async()=>{}).constructor,i=new o(r);return bt(await i())}catch(t){throw new Error(`evaluate failed: ${t instanceof Error?t.message:String(t)}`)}}var pc=10,zt=500,Gt=500,cr=2e4,di=1e3;function bt(e,t=0,n=new WeakSet){if(e===null)return null;let r=typeof e;if(r==="string"){let i=e;return i.length>cr?`${i.slice(0,cr)}\u2026(+${i.length-cr} chars)`:i}if(r==="number"||r==="boolean")return e;if(r==="undefined")return"[undefined]";if(r==="bigint")return`${e.toString()}n`;if(r==="symbol")return e.toString();if(r==="function"){let i=e.name;return i?`[Function: ${i}]`:"[Function]"}let o=e;if(typeof Element<"u"&&o instanceof Element){let i=o.outerHTML??"";return{__type:"Element",tag:o.tagName.toLowerCase(),id:o.id||void 0,class:o.getAttribute("class")||void 0,text:(o.textContent||"").trim().slice(0,200)||void 0,html:i.length>di?`${i.slice(0,di)}\u2026`:i}}if(typeof Node<"u"&&o instanceof Node)return{__type:"Node",nodeName:o.nodeName,text:(o.textContent||"").trim().slice(0,200)||void 0};if(o instanceof Error)return{__type:"Error",name:o.name,message:o.message,stack:o.stack};if(o instanceof Date)return o.toISOString();if(o instanceof RegExp)return o.toString();if(n.has(o))return"[Circular]";if(t>=pc)return"[Max depth]";n.add(o);try{if(Array.isArray(o)){let l=o.slice(0,zt).map(c=>bt(c,t+1,n));return o.length>zt&&l.push(`\u2026(+${o.length-zt} more)`),l}if(o instanceof Map){let l={__type:"Map"},c=0;for(let[u,d]of o){if(c++>=Gt){l["\u2026"]=`(+${o.size-Gt} more)`;break}l[String(u)]=bt(d,t+1,n)}return l}if(o instanceof Set)return{__type:"Set",values:[...o].slice(0,zt).map(l=>bt(l,t+1,n))};let i=Object.keys(o),a={},s=0;for(let l of i){if(s++>=Gt){a["\u2026"]=`(+${i.length-Gt} more)`;break}a[l]=bt(o[l],t+1,n)}return a}catch{return`[Unserializable: ${Object.prototype.toString.call(o)}]`}finally{n.delete(o)}}var gi="__mindstudio-touch-circle",dr="__mindstudio-touch-style",yi=44,bi=5,wi=.95,qt=.5,fr=.45,vi=600;function hc(){document.getElementById(gi)?.remove();let e=document.createElement("div");return e.id=gi,e.style.cssText=["position: fixed","z-index: 2147483647","pointer-events: none",`width: ${yi}px`,`height: ${yi}px`,"border-radius: 50%","background: rgba(255, 255, 255, 0.08)","border: 2px solid rgba(255, 255, 255, 0.85)","box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35), inset 0 0 0 0.5px rgba(0, 0, 0, 0.1)","backdrop-filter: blur(1px)","-webkit-backdrop-filter: blur(1.5px)","transform: translate(-50%, -50%) scale(1)","transition: transform 100ms ease, opacity 100ms ease, background 100ms ease","opacity: 0","will-change: left, top, transform, opacity"].join("; "),document.documentElement.appendChild(e),e}function gc(e){e.style.transform="translate(-50%, -50%) scale(0.88)",e.style.background="rgba(255, 255, 255, 0.18)"}function Si(e){e.style.transform="translate(-50%, -50%) scale(1)",e.style.background="rgba(255, 255, 255, 0.08)"}function Ci(){window.parent!==window&&M().zoom.mobilePreview&&mr()}function mr(){let e=M().touch;if(e.active)return;e.active=!0,e.scrollContainer=Vt(),vc();let t=hc();e.circleEl=t,e.onMouseMove=n=>{let r=M();if(r.cursor.executing||r.screenshot.capturing){t.style.opacity="0";return}if(t.style.left=`${n.clientX}px`,t.style.top=`${n.clientY}px`,t.style.opacity="1",e.pressed){let o=Math.abs(n.clientX-e.startX),i=Math.abs(n.clientY-e.startY);if(!e.dragging&&(o>bi||i>bi)&&(e.dragging=!0),e.dragging){let a=e.scrollContainer||document.documentElement,s=performance.now(),l=s-e.lastMoveTime||16,c=e.lastX-n.clientX,u=e.lastY-n.clientY;e.bouncing&&wc();let d=a.scrollTop;a.scrollTop+=u,a.scrollLeft+=c;let m=a.scrollTop-d,p=u-m;if(Math.abs(p)>.5){let h=fr/(1+Math.abs(e.overscrollY)/200);e.overscrollY+=p*h,pr()}else if(e.overscrollY!==0){let h=fr/(1+Math.abs(e.overscrollY)/200);e.overscrollY+=p*h,(e.overscrollY>0&&u<0||e.overscrollY<0&&u>0)&&(e.overscrollY*=.7),pr()}e.velocityX=.8*(c/l)+.2*e.velocityX,e.velocityY=.8*(u/l)+.2*e.velocityY,e.lastMoveTime=s,n.preventDefault()}e.lastX=n.clientX,e.lastY=n.clientY}},e.onMouseDown=n=>{M().cursor.executing||(jt(),e.pressed=!0,e.dragging=!1,e.startX=n.clientX,e.startY=n.clientY,e.lastX=n.clientX,e.lastY=n.clientY,e.velocityX=0,e.velocityY=0,e.lastMoveTime=performance.now(),gc(t))},e.onMouseUp=()=>{let n=e.dragging;n&&document.addEventListener("click",yc,{capture:!0,once:!0}),e.pressed=!1,e.dragging=!1,Si(t),n&&(e.overscrollY!==0&&Mi(),(Math.abs(e.velocityX)>qt/16||Math.abs(e.velocityY)>qt/16)&&bc())},e.onMouseLeave=()=>{e.pressed=!1,e.dragging=!1,jt(),t.style.opacity="0",Si(t)},e.onDragStart=n=>n.preventDefault(),document.addEventListener("mousemove",e.onMouseMove),document.addEventListener("mousedown",e.onMouseDown),document.addEventListener("mouseup",e.onMouseUp),document.addEventListener("mouseleave",e.onMouseLeave),document.addEventListener("dragstart",e.onDragStart)}function xi(){let e=M().touch;e.active&&(e.active=!1,e.pressed=!1,e.dragging=!1,jt(),e.overscrollY!==0&&(e.overscrollY=0,document.body.style.transition="",document.body.style.transform=""),Sc(),e.circleEl&&(e.circleEl.remove(),e.circleEl=null),e.onMouseMove&&document.removeEventListener("mousemove",e.onMouseMove),e.onMouseDown&&document.removeEventListener("mousedown",e.onMouseDown),e.onMouseUp&&document.removeEventListener("mouseup",e.onMouseUp),e.onMouseLeave&&document.removeEventListener("mouseleave",e.onMouseLeave),e.onDragStart&&document.removeEventListener("dragstart",e.onDragStart),e.onMouseMove=null,e.onMouseDown=null,e.onMouseUp=null,e.onMouseLeave=null,e.onDragStart=null)}function Ii(){let{circleEl:e}=M().touch;e&&(e.style.opacity="0")}function Ai(){let e=M().touch;e.active&&e.circleEl&&(e.circleEl.style.opacity="1")}function yc(e){e.preventDefault(),e.stopPropagation()}function bc(){jt();let e=M().touch,t=e.scrollContainer||document.documentElement,n=e.velocityX*16,r=e.velocityY*16;function o(){let i=M().touch;if(n*=wi,r*=wi,Math.abs(n)<qt&&Math.abs(r)<qt){i.momentumFrame=null,i.overscrollY!==0&&Mi();return}let a=t.scrollTop;t.scrollTop+=r,t.scrollLeft+=n;let s=t.scrollTop-a,l=r-s;if(Math.abs(l)>.5){let c=fr*.5/(1+Math.abs(i.overscrollY)/200);i.overscrollY+=l*c,pr(),r*=.7}i.momentumFrame=requestAnimationFrame(o)}e.momentumFrame=requestAnimationFrame(o)}function jt(){let e=M().touch;e.momentumFrame!==null&&(cancelAnimationFrame(e.momentumFrame),e.momentumFrame=null)}function pr(){let e=M().touch;document.body.style.transition="none",document.body.style.transform=`translateY(${-e.overscrollY}px)`}function Mi(){let e=M().touch;e.bouncing=!0,e.overscrollY=0,document.body.style.transition=`transform ${vi}ms cubic-bezier(0.2, 0.9, 0.3, 1)`,document.body.style.transform="",e.bounceTimer&&clearTimeout(e.bounceTimer),e.bounceTimer=setTimeout(()=>{let t=M().touch;t.bouncing=!1,t.bounceTimer=null,document.body.style.transition="",document.body.style.transform=""},vi)}function wc(){let e=M().touch;e.bouncing&&(e.bouncing=!1,e.bounceTimer&&(clearTimeout(e.bounceTimer),e.bounceTimer=null),document.body.style.transition="")}function vc(){document.getElementById(dr)?.remove();let e=document.createElement("style");e.id=dr,e.textContent=`
|
|
3
3
|
*, *::before, *::after {
|
|
4
4
|
cursor: none !important;
|
|
5
5
|
user-select: none !important;
|
|
6
6
|
-webkit-user-select: none !important;
|
|
7
7
|
-webkit-user-drag: none !important;
|
|
8
8
|
}
|
|
9
|
-
`,document.head.appendChild(e)}function
|
|
9
|
+
`,document.head.appendChild(e)}function Sc(){document.getElementById(dr)?.remove()}var Ei="__mindstudio-cursor",ki="__mindstudio-cursor-ripple",Cc=450,xc=250,gr=300,Ic=2e3,Yt=10,Ti="Remy",lt="#DD2590",hr=44,Ac=`<svg width="40" height="41" viewBox="0 0 31 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
10
10
|
<g filter="url(#filter0_d_4_78)">
|
|
11
|
-
<path d="M12.5448 26L6.72762 5.59339L26 14.8132L17.1816 17.9377L12.5448 26Z" fill="${
|
|
12
|
-
<path d="M6.9457 5.14539L26.2178 14.3651L27.2985 14.8826L26.1697 15.2813L17.5259 18.3444L12.9812 26.2464L12.3881 27.2792L12.0614 26.1349L6.24434 5.72851L5.94119 4.66488L6.9457 5.14539Z" stroke="${
|
|
11
|
+
<path d="M12.5448 26L6.72762 5.59339L26 14.8132L17.1816 17.9377L12.5448 26Z" fill="${lt}"/>
|
|
12
|
+
<path d="M6.9457 5.14539L26.2178 14.3651L27.2985 14.8826L26.1697 15.2813L17.5259 18.3444L12.9812 26.2464L12.3881 27.2792L12.0614 26.1349L6.24434 5.72851L5.94119 4.66488L6.9457 5.14539Z" stroke="${lt}"/>
|
|
13
13
|
</g>
|
|
14
14
|
<defs>
|
|
15
15
|
<filter id="filter0_d_4_78" x="3.15491" y="2.73625" width="27.442" height="28.8217" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
@@ -23,13 +23,13 @@
|
|
|
23
23
|
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_4_78" result="shape"/>
|
|
24
24
|
</filter>
|
|
25
25
|
</defs>
|
|
26
|
-
</svg>`,
|
|
27
|
-
${
|
|
26
|
+
</svg>`,Ri=`
|
|
27
|
+
${Ac}
|
|
28
28
|
<div style="
|
|
29
29
|
position: absolute;
|
|
30
30
|
left: 33px;
|
|
31
31
|
top: 23px;
|
|
32
|
-
background: ${
|
|
32
|
+
background: ${lt};
|
|
33
33
|
color: white;
|
|
34
34
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
35
35
|
font-size: 12px;
|
|
@@ -40,13 +40,13 @@
|
|
|
40
40
|
white-space: nowrap;
|
|
41
41
|
letter-spacing: 0.3px;
|
|
42
42
|
box-shadow: 0 1px 3px rgba(0,0,0,0.2);
|
|
43
|
-
">${
|
|
44
|
-
`,
|
|
43
|
+
">${Ti}</div>
|
|
44
|
+
`,Ni=`
|
|
45
45
|
<div style="
|
|
46
|
-
width: ${
|
|
47
|
-
height: ${
|
|
46
|
+
width: ${hr}px;
|
|
47
|
+
height: ${hr}px;
|
|
48
48
|
border-radius: 50%;
|
|
49
|
-
border: 2px solid ${
|
|
49
|
+
border: 2px solid ${lt};
|
|
50
50
|
background: rgba(221, 37, 144, 0.08);
|
|
51
51
|
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
|
|
52
52
|
transform: translate(-50%, -50%);
|
|
@@ -54,9 +54,9 @@
|
|
|
54
54
|
<div style="
|
|
55
55
|
position: absolute;
|
|
56
56
|
left: 50%;
|
|
57
|
-
top: ${
|
|
57
|
+
top: ${hr/2+6}px;
|
|
58
58
|
transform: translateX(-50%);
|
|
59
|
-
background: ${
|
|
59
|
+
background: ${lt};
|
|
60
60
|
color: white;
|
|
61
61
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
62
62
|
font-size: 11px;
|
|
@@ -66,179 +66,19 @@
|
|
|
66
66
|
border-radius: 4px;
|
|
67
67
|
white-space: nowrap;
|
|
68
68
|
box-shadow: 0 1px 3px rgba(0,0,0,0.2);
|
|
69
|
-
">${
|
|
70
|
-
`;function ni(){window.parent!==window&&sr()}function sr(){let e=x().cursor,t=document.getElementById(Ko);if(t){e.el=t,e.rippleEl=document.getElementById(Jo);return}let n=x().zoom.mobilePreview,r=document.createElement("div");r.id=Ko,r.innerHTML=n?ti:ei,r.style.cssText=["position: fixed","top: -100px","left: -100px","z-index: 2147483647","pointer-events: none","will-change: left, top, transform, opacity","opacity: 0"].join("; ");let o=document.createElement("div");o.id=Jo,o.style.cssText=["position: fixed","z-index: 2147483646","pointer-events: none","width: 0","height: 0","border-radius: 50%",`background: ${nt}`,"opacity: 0","transform: translate(-50%, -50%)","transition: width 400ms ease-out, height 400ms ease-out, opacity 400ms ease-out"].join("; "),document.documentElement.appendChild(o),document.documentElement.appendChild(r),e.el=r,e.rippleEl=o}function jt(){let e=x().cursor;e.trackingFrame!==null&&(cancelAnimationFrame(e.trackingFrame),e.trackingFrame=null),e.targetElement=null}function ri(e){let t=e.getBoundingClientRect();return{x:Math.max(Yt,Math.min(t.left+t.width/2,window.innerWidth-Yt)),y:Math.max(Yt,Math.min(t.top+t.height/2,window.innerHeight-Yt))}}function oi(){let e=x().cursor;e.el&&(e.el.style.transition="none",e.el.style.left=`${e.x}px`,e.el.style.top=`${e.y}px`)}function ar(){let e=x().cursor;if(e.settledResolve){let t=e.settledResolve;e.settledResolve=null,t()}}function Wl(e){let t=x().cursor,n={x:t.x,y:t.y},r=performance.now(),o=i=>{if(!t.el||!e.isConnected){t.trackingFrame=null,ar();return}let a=ri(e),s=Math.min((i-r)/Ol,1),c=1-Math.pow(1-s,3);if(t.x=n.x+(a.x-n.x)*c,t.y=n.y+(a.y-n.y)*c,oi(),s<1){t.trackingFrame=requestAnimationFrame(o);return}t.trackingFrame=null,ar(),Bl(e)};t.trackingFrame=requestAnimationFrame(o)}function Bl(e){let t=x().cursor,n=()=>{if(!t.el||t.targetElement!==e||!e.isConnected){t.trackingFrame=null;return}let r=ri(e);t.x=r.x,t.y=r.y,oi(),t.trackingFrame=requestAnimationFrame(n)};t.trackingFrame=requestAnimationFrame(n)}async function Zt(e){let t=x().cursor;if((!t.el||!t.el.isConnected)&&(t.el=null,t.rippleEl=null,t.hasPosition=!1,sr()),!!t.el){if(Ge(),jt(),ar(),t.targetElement=e,!t.hasPosition){let n=e.getBoundingClientRect(),r=n.left+n.width/2,o=n.top+n.height/2,i=Math.max(window.innerWidth,100),a=Math.max(window.innerHeight,100);Math.random()<.5?(t.x=i+20,t.y=o+(Math.random()-.5)*100):(t.x=r+(Math.random()-.5)*100,t.y=a+20),t.el.style.transition="none",t.el.style.left=`${t.x}px`,t.el.style.top=`${t.y}px`,t.el.style.opacity="0",t.el.offsetWidth,t.hasPosition=!0}return t.el.style.opacity="1",t.visibilityState="visible",new Promise(n=>{t.settledResolve=n,Wl(e)})}}async function ii(){let e=x().cursor;e.el&&(e.el.style.transform="scale(0.85) translateY(1px)",e.rippleEl&&(e.rippleEl.style.transition="none",e.rippleEl.style.left=`${e.x}px`,e.rippleEl.style.top=`${e.y}px`,e.rippleEl.style.width="0",e.rippleEl.style.height="0",e.rippleEl.style.opacity="0.35",e.rippleEl.offsetWidth,e.rippleEl.style.transition="width 400ms ease-out, height 400ms ease-out, opacity 400ms ease-out",e.rippleEl.style.width="40px",e.rippleEl.style.height="40px",e.rippleEl.style.opacity="0"),await le($l),e.el&&(e.el.style.transform="scale(1) translateY(0)"),await le(100))}function Hl(e){return e==="visible"||e==="fading-in"||e==="fading-out"||e==="force-visible"}function Ve(e){let t=x().cursor;if(t.visibilityState=e,!(!t.el||!t.el.isConnected))switch(e){case"hidden":case"force-hidden":case"snapshot-hidden":t.el.style.transition="none",t.el.style.opacity="0",t.rippleEl&&(t.rippleEl.style.opacity="0");break;case"fading-in":t.el.style.transition=`opacity ${ir}ms ease`,t.el.offsetWidth,t.el.style.opacity="1";break;case"visible":case"force-visible":t.el.style.opacity="1";break;case"fading-out":t.el.style.transition=`opacity ${ir}ms ease`,t.el.style.opacity="0";break}}function Ge(){let e=x().cursor;e.hideTimer&&(clearTimeout(e.hideTimer),e.hideTimer=null)}function vt(e){x().cursor.executing=e,e?jo():Zo()}function lr(){Ge()}function Xt(){let e=x().cursor;e.el&&e.visibilityState!=="force-visible"&&(e.targetElement=null,Ge(),e.hideTimer=setTimeout(()=>{e.visibilityState!=="force-visible"&&(Ve("fading-out"),e.hideTimer=setTimeout(()=>{e.visibilityState==="fading-out"&&(Ve("hidden"),jt()),e.hideTimer=null},ir))},Dl))}function cr(){let e=x().cursor;e.el&&(Ge(),jt(),e.visibilityState!=="force-hidden"&&e.visibilityState!=="snapshot-hidden"&&(e.el.isConnected&&(e.el.style.transition="none"),Ve("visible")))}function ai(){let e=x().cursor;e.visibilityState!=="snapshot-hidden"&&(Ge(),e.preSnapshotState=e.visibilityState,Ve("snapshot-hidden"))}function si(){let e=x().cursor,t=e.preSnapshotState;e.preSnapshotState=null,!(!e.el||!t||!Hl(t))&&Ve(t==="fading-in"?"fading-in":"visible")}function ur(e){let t=x().cursor;t.el&&(t.el.innerHTML=e?ti:ei)}function Kt(e){let t=x().cursor;t.executing||(e==="visible"&&!t.el&&sr(),t.el&&(e==="visible"?(Ge(),t.hasPosition?Ve("force-visible"):t.visibilityState="force-visible"):e==="hidden"?(Ge(),Ve("force-hidden"),jt()):Xt()))}var ae;(function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"})(ae||(ae={}));function Ul(e){return e.nodeType===e.ELEMENT_NODE}function je(e){var t=e?.host;return t?.shadowRoot===e}function qe(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function Vl(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),e}function dr(e){try{var t=e.rules||e.cssRules;return t?Vl(Array.from(t).map(fr).join("")):null}catch{return null}}function fr(e){var t=e.cssText;if(Gl(e))try{t=dr(e.styleSheet)||t}catch{}return t}function Gl(e){return"styleSheet"in e}var di=(function(){function e(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return e.prototype.getId=function(t){var n;if(!t)return-1;var r=(n=this.getMeta(t))===null||n===void 0?void 0:n.id;return r??-1},e.prototype.getNode=function(t){return this.idNodeMap.get(t)||null},e.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},e.prototype.getMeta=function(t){return this.nodeMetaMap.get(t)||null},e.prototype.removeNodeFromMap=function(t){var n=this,r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(function(o){return n.removeNodeFromMap(o)})},e.prototype.has=function(t){return this.idNodeMap.has(t)},e.prototype.hasNode=function(t){return this.nodeMetaMap.has(t)},e.prototype.add=function(t,n){var r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)},e.prototype.replace=function(t,n){var r=this.getNode(t);if(r){var o=this.nodeMetaMap.get(r);o&&this.nodeMetaMap.set(n,o)}this.idNodeMap.set(t,n)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e})();function fi(){return new di}function St(e){var t=e.maskInputOptions,n=e.tagName,r=e.type,o=e.value,i=e.maskInputFn,a=o||"";return(t[n.toLowerCase()]||t[r])&&(i?a=i(a):a="*".repeat(a.length)),a}var ci="__rrweb_original__";function zl(e){var t=e.getContext("2d");if(!t)return!0;for(var n=50,r=0;r<e.width;r+=n)for(var o=0;o<e.height;o+=n){var i=t.getImageData,a=ci in i?i[ci]:i,s=new Uint32Array(a.call(t,r,o,Math.min(n,e.width-r),Math.min(n,e.height-o)).data.buffer);if(s.some(function(c){return c!==0}))return!1}return!0}var ql=1,Yl=new RegExp("[^a-z0-9-_:]"),Ye=-2;function mr(){return ql++}function jl(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return Yl.test(t)?"div":t}function Zl(e){return e.cssRules?Array.from(e.cssRules).map(function(t){return t.cssText||""}).join(""):""}function Xl(e){var t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var rt,ui,Kl=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Jl=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,Ql=/^(data:)([^,]*),(.*)/i;function Jt(e,t){return(e||"").replace(Kl,function(n,r,o,i,a,s){var c=o||a||s,l=r||i||"";if(!c)return n;if(!Jl.test(c)||Ql.test(c))return"url(".concat(l).concat(c).concat(l,")");if(c[0]==="/")return"url(".concat(l).concat(Xl(t)+c).concat(l,")");var u=t.split("/"),d=c.split("/");u.pop();for(var f=0,m=d;f<m.length;f++){var p=m[f];p!=="."&&(p===".."?u.pop():u.push(p))}return"url(".concat(l).concat(u.join("/")).concat(l,")")})}var ec=/^[^ \t\n\r\u000c]+/,tc=/^[, \t\n\r\u000c]+/;function nc(e,t){if(t.trim()==="")return t;var n=0;function r(l){var u,d=l.exec(t.substring(n));return d?(u=d[0],n+=u.length,u):""}for(var o=[];r(tc),!(n>=t.length);){var i=r(ec);if(i.slice(-1)===",")i=ot(e,i.substring(0,i.length-1)),o.push(i);else{var a="";i=ot(e,i);for(var s=!1;;){var c=t.charAt(n);if(c===""){o.push((i+a).trim());break}else if(s)c===")"&&(s=!1);else if(c===","){n+=1,o.push((i+a).trim());break}else c==="("&&(s=!0);a+=c,n+=1}}}return o.join(", ")}function ot(e,t){if(!t||t.trim()==="")return t;var n=e.createElement("a");return n.href=t,n.href}function rc(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function pr(){var e=document.createElement("a");return e.href="",e.href}function hr(e,t,n,r){return n==="src"||n==="href"&&r&&!(t==="use"&&r[0]==="#")||n==="xlink:href"&&r&&r[0]!=="#"||n==="background"&&r&&(t==="table"||t==="td"||t==="th")?ot(e,r):n==="srcset"&&r?nc(e,r):n==="style"&&r?Jt(r,pr()):t==="object"&&n==="data"&&r?ot(e,r):r}function oc(e,t,n){if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(var r=e.classList.length;r--;){var o=e.classList[r];if(t.test(o))return!0}return n?e.matches(n):!1}function Ct(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return n?Ct(e.parentNode,t,n):!1;for(var r=e.classList.length;r--;){var o=e.classList[r];if(t.test(o))return!0}return n?Ct(e.parentNode,t,n):!1}function gr(e,t,n){var r=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(r===null)return!1;if(typeof t=="string"){if(r.classList.contains(t)||r.closest(".".concat(t)))return!0}else if(Ct(r,t,!0))return!0;return!!(n&&(r.matches(n)||r.closest(n)))}function ic(e,t,n){var r=e.contentWindow;if(r){var o=!1,i;try{i=r.document.readyState}catch{return}if(i!=="complete"){var a=setTimeout(function(){o||(t(),o=!0)},n);e.addEventListener("load",function(){clearTimeout(a),o=!0,t()});return}var s="about:blank";if(r.location.href!==s||e.src===s||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}}function ac(e,t,n){var r=!1,o;try{o=e.sheet}catch{return}if(!o){var i=setTimeout(function(){r||(t(),r=!0)},n);e.addEventListener("load",function(){clearTimeout(i),r=!0,t()})}}function sc(e,t){var n=t.doc,r=t.mirror,o=t.blockClass,i=t.blockSelector,a=t.maskTextClass,s=t.maskTextSelector,c=t.inlineStylesheet,l=t.maskInputOptions,u=l===void 0?{}:l,d=t.maskTextFn,f=t.maskInputFn,m=t.dataURLOptions,p=m===void 0?{}:m,g=t.inlineImages,h=t.recordCanvas,y=t.keepIframeSrcFn,v=t.newlyAddedElement,b=v===void 0?!1:v,w=lc(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:ae.Document,childNodes:[],compatMode:e.compatMode}:{type:ae.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:ae.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:w};case e.ELEMENT_NODE:return uc(e,{doc:n,blockClass:o,blockSelector:i,inlineStylesheet:c,maskInputOptions:u,maskInputFn:f,dataURLOptions:p,inlineImages:g,recordCanvas:h,keepIframeSrcFn:y,newlyAddedElement:b,rootId:w});case e.TEXT_NODE:return cc(e,{maskTextClass:a,maskTextSelector:s,maskTextFn:d,rootId:w});case e.CDATA_SECTION_NODE:return{type:ae.CDATA,textContent:"",rootId:w};case e.COMMENT_NODE:return{type:ae.Comment,textContent:e.textContent||"",rootId:w};default:return!1}}function lc(e,t){if(t.hasNode(e)){var n=t.getId(e);return n===1?void 0:n}}function cc(e,t){var n,r=t.maskTextClass,o=t.maskTextSelector,i=t.maskTextFn,a=t.rootId,s=e.parentNode&&e.parentNode.tagName,c=e.textContent,l=s==="STYLE"?!0:void 0,u=s==="SCRIPT"?!0:void 0;if(l&&c){try{e.nextSibling||e.previousSibling||!((n=e.parentNode.sheet)===null||n===void 0)&&n.cssRules&&(c=Zl(e.parentNode.sheet))}catch(d){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(d),e)}c=Jt(c,pr())}return u&&(c="SCRIPT_PLACEHOLDER"),!l&&!u&&c&&gr(e,r,o)&&(c=i?i(c):c.replace(/[\S]/g,"*")),{type:ae.Text,textContent:c||"",isStyle:l,rootId:a}}function uc(e,t){for(var n=t.doc,r=t.blockClass,o=t.blockSelector,i=t.inlineStylesheet,a=t.maskInputOptions,s=a===void 0?{}:a,c=t.maskInputFn,l=t.dataURLOptions,u=l===void 0?{}:l,d=t.inlineImages,f=t.recordCanvas,m=t.keepIframeSrcFn,p=t.newlyAddedElement,g=p===void 0?!1:p,h=t.rootId,y=oc(e,r,o),v=jl(e),b={},w=e.attributes.length,S=0;S<w;S++){var I=e.attributes[S];b[I.name]=hr(n,v,I.name,I.value)}if(v==="link"&&i){var C=Array.from(n.styleSheets).find(function(F){return F.href===e.href}),E=null;C&&(E=dr(C)),E&&(delete b.rel,delete b.href,b._cssText=Jt(E,C.href))}if(v==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){var E=dr(e.sheet);E&&(b._cssText=Jt(E,pr()))}if(v==="input"||v==="textarea"||v==="select"){var M=e.value,O=e.checked;b.type!=="radio"&&b.type!=="checkbox"&&b.type!=="submit"&&b.type!=="button"&&M?b.value=St({type:b.type,tagName:v,value:M,maskInputOptions:s,maskInputFn:c}):O&&(b.checked=O)}if(v==="option"&&(e.selected&&!s.select?b.selected=!0:delete b.selected),v==="canvas"&&f){if(e.__context==="2d")zl(e)||(b.rr_dataURL=e.toDataURL(u.type,u.quality));else if(!("__context"in e)){var D=e.toDataURL(u.type,u.quality),T=document.createElement("canvas");T.width=e.width,T.height=e.height;var k=T.toDataURL(u.type,u.quality);D!==k&&(b.rr_dataURL=D)}}if(v==="img"&&d){rt||(rt=n.createElement("canvas"),ui=rt.getContext("2d"));var W=e,G=W.crossOrigin;W.crossOrigin="anonymous";var re=function(){try{rt.width=W.naturalWidth,rt.height=W.naturalHeight,ui.drawImage(W,0,0),b.rr_dataURL=rt.toDataURL(u.type,u.quality)}catch(F){console.warn("Cannot inline img src=".concat(W.currentSrc,"! Error: ").concat(F))}G?b.crossOrigin=G:W.removeAttribute("crossorigin")};W.complete&&W.naturalWidth!==0?re():W.onload=re}if((v==="audio"||v==="video")&&(b.rr_mediaState=e.paused?"paused":"played",b.rr_mediaCurrentTime=e.currentTime),g||(e.scrollLeft&&(b.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(b.rr_scrollTop=e.scrollTop)),y){var L=e.getBoundingClientRect(),$=L.width,_=L.height;b={class:b.class,rr_width:"".concat($,"px"),rr_height:"".concat(_,"px")}}return v==="iframe"&&!m(b.src)&&(e.contentDocument||(b.rr_src=b.src),delete b.src),{type:ae.Element,tagName:v,attributes:b,childNodes:[],isSVG:rc(e)||void 0,needBlock:y,rootId:h}}function X(e){return e===void 0?"":e.toLowerCase()}function dc(e,t){if(t.comment&&e.type===ae.Comment)return!0;if(e.type===ae.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&e.attributes.rel==="preload"&&e.attributes.as==="script"||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&e.attributes.href.endsWith(".js")))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(X(e.attributes.name).match(/^msapplication-tile(image|color)$/)||X(e.attributes.name)==="application-name"||X(e.attributes.rel)==="icon"||X(e.attributes.rel)==="apple-touch-icon"||X(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&X(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(X(e.attributes.property).match(/^(og|twitter|fb):/)||X(e.attributes.name).match(/^(og|twitter):/)||X(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(X(e.attributes.name)==="robots"||X(e.attributes.name)==="googlebot"||X(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(X(e.attributes.name)==="author"||X(e.attributes.name)==="generator"||X(e.attributes.name)==="framework"||X(e.attributes.name)==="publisher"||X(e.attributes.name)==="progid"||X(e.attributes.property).match(/^article:/)||X(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(X(e.attributes.name)==="google-site-verification"||X(e.attributes.name)==="yandex-verification"||X(e.attributes.name)==="csrf-token"||X(e.attributes.name)==="p:domain_verify"||X(e.attributes.name)==="verify-v1"||X(e.attributes.name)==="verification"||X(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function ze(e,t){var n=t.doc,r=t.mirror,o=t.blockClass,i=t.blockSelector,a=t.maskTextClass,s=t.maskTextSelector,c=t.skipChild,l=c===void 0?!1:c,u=t.inlineStylesheet,d=u===void 0?!0:u,f=t.maskInputOptions,m=f===void 0?{}:f,p=t.maskTextFn,g=t.maskInputFn,h=t.slimDOMOptions,y=t.dataURLOptions,v=y===void 0?{}:y,b=t.inlineImages,w=b===void 0?!1:b,S=t.recordCanvas,I=S===void 0?!1:S,C=t.onSerialize,E=t.onIframeLoad,M=t.iframeLoadTimeout,O=M===void 0?5e3:M,D=t.onStylesheetLoad,T=t.stylesheetLoadTimeout,k=T===void 0?5e3:T,W=t.keepIframeSrcFn,G=W===void 0?function(){return!1}:W,re=t.newlyAddedElement,L=re===void 0?!1:re,$=t.preserveWhiteSpace,_=$===void 0?!0:$,F=sc(e,{doc:n,mirror:r,blockClass:o,blockSelector:i,maskTextClass:a,maskTextSelector:s,inlineStylesheet:d,maskInputOptions:m,maskTextFn:p,maskInputFn:g,dataURLOptions:v,inlineImages:w,recordCanvas:I,keepIframeSrcFn:G,newlyAddedElement:L});if(!F)return console.warn(e,"not serialized"),null;var z;r.hasNode(e)?z=r.getId(e):dc(F,h)||!_&&F.type===ae.Text&&!F.isStyle&&!F.textContent.replace(/^\s+|\s+$/gm,"").length?z=Ye:z=mr();var B=Object.assign(F,{id:z});if(r.add(e,B),z===Ye)return null;C&&C(e);var Y=!l;if(B.type===ae.Element){Y=Y&&!B.needBlock,delete B.needBlock;var j=e.shadowRoot;j&&qe(j)&&(B.isShadowHost=!0)}if((B.type===ae.Document||B.type===ae.Element)&&Y){h.headWhitespace&&B.type===ae.Element&&B.tagName==="head"&&(_=!1);for(var ee={doc:n,mirror:r,blockClass:o,blockSelector:i,maskTextClass:a,maskTextSelector:s,skipChild:l,inlineStylesheet:d,maskInputOptions:m,maskTextFn:p,maskInputFn:g,slimDOMOptions:h,dataURLOptions:v,inlineImages:w,recordCanvas:I,preserveWhiteSpace:_,onSerialize:C,onIframeLoad:E,iframeLoadTimeout:O,onStylesheetLoad:D,stylesheetLoadTimeout:k,keepIframeSrcFn:G},N=0,J=Array.from(e.childNodes);N<J.length;N++){var Z=J[N],U=ze(Z,ee);U&&B.childNodes.push(U)}if(Ul(e)&&e.shadowRoot)for(var ie=0,V=Array.from(e.shadowRoot.childNodes);ie<V.length;ie++){var Z=V[ie],U=ze(Z,ee);U&&(qe(e.shadowRoot)&&(U.isShadow=!0),B.childNodes.push(U))}}return e.parentNode&&je(e.parentNode)&&qe(e.parentNode)&&(B.isShadow=!0),B.type===ae.Element&&B.tagName==="iframe"&&ic(e,function(){var se=e.contentDocument;if(se&&E){var We=ze(se,{doc:se,mirror:r,blockClass:o,blockSelector:i,maskTextClass:a,maskTextSelector:s,skipChild:!1,inlineStylesheet:d,maskInputOptions:m,maskTextFn:p,maskInputFn:g,slimDOMOptions:h,dataURLOptions:v,inlineImages:w,recordCanvas:I,preserveWhiteSpace:_,onSerialize:C,onIframeLoad:E,iframeLoadTimeout:O,onStylesheetLoad:D,stylesheetLoadTimeout:k,keepIframeSrcFn:G});We&&E(e,We)}},O),B.type===ae.Element&&B.tagName==="link"&&B.attributes.rel==="stylesheet"&&ac(e,function(){if(D){var se=ze(e,{doc:n,mirror:r,blockClass:o,blockSelector:i,maskTextClass:a,maskTextSelector:s,skipChild:!1,inlineStylesheet:d,maskInputOptions:m,maskTextFn:p,maskInputFn:g,slimDOMOptions:h,dataURLOptions:v,inlineImages:w,recordCanvas:I,preserveWhiteSpace:_,onSerialize:C,onIframeLoad:E,iframeLoadTimeout:O,onStylesheetLoad:D,stylesheetLoadTimeout:k,keepIframeSrcFn:G});se&&D(e,se)}},k),B}function mi(e,t){var n=t||{},r=n.mirror,o=r===void 0?new di:r,i=n.blockClass,a=i===void 0?"rr-block":i,s=n.blockSelector,c=s===void 0?null:s,l=n.maskTextClass,u=l===void 0?"rr-mask":l,d=n.maskTextSelector,f=d===void 0?null:d,m=n.inlineStylesheet,p=m===void 0?!0:m,g=n.inlineImages,h=g===void 0?!1:g,y=n.recordCanvas,v=y===void 0?!1:y,b=n.maskAllInputs,w=b===void 0?!1:b,S=n.maskTextFn,I=n.maskInputFn,C=n.slimDOM,E=C===void 0?!1:C,M=n.dataURLOptions,O=n.preserveWhiteSpace,D=n.onSerialize,T=n.onIframeLoad,k=n.iframeLoadTimeout,W=n.onStylesheetLoad,G=n.stylesheetLoadTimeout,re=n.keepIframeSrcFn,L=re===void 0?function(){return!1}:re,$=w===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:w===!1?{password:!0}:w,_=E===!0||E==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:E==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:E===!1?{}:E;return ze(e,{doc:e,mirror:o,blockClass:a,blockSelector:c,maskTextClass:u,maskTextSelector:f,skipChild:!1,inlineStylesheet:p,maskInputOptions:$,maskTextFn:S,maskInputFn:I,slimDOMOptions:_,dataURLOptions:M,inlineImages:h,recordCanvas:v,preserveWhiteSpace:O,onSerialize:D,onIframeLoad:T,iframeLoadTimeout:k,onStylesheetLoad:W,stylesheetLoadTimeout:G,keepIframeSrcFn:L,newlyAddedElement:!1})}var fc=/([^\\]):hover/,Rp=new RegExp(fc.source,"g");function ce(e,t,n=document){let r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}var it=`Please stop import mirror directly. Instead of that,\r
|
|
69
|
+
">${Ti}</div>
|
|
70
|
+
`;function Li(){window.parent!==window&&br()}function br(){let e=M().cursor,t=document.getElementById(Ei);if(t){e.el=t,e.rippleEl=document.getElementById(ki);return}let n=M().zoom.mobilePreview,r=document.createElement("div");r.id=Ei,r.innerHTML=n?Ni:Ri,r.style.cssText=["position: fixed","top: -100px","left: -100px","z-index: 2147483647","pointer-events: none","will-change: left, top, transform, opacity","opacity: 0"].join("; ");let o=document.createElement("div");o.id=ki,o.style.cssText=["position: fixed","z-index: 2147483646","pointer-events: none","width: 0","height: 0","border-radius: 50%",`background: ${lt}`,"opacity: 0","transform: translate(-50%, -50%)","transition: width 400ms ease-out, height 400ms ease-out, opacity 400ms ease-out"].join("; "),document.documentElement.appendChild(o),document.documentElement.appendChild(r),e.el=r,e.rippleEl=o}function Zt(){let e=M().cursor;e.trackingFrame!==null&&(cancelAnimationFrame(e.trackingFrame),e.trackingFrame=null),e.targetElement=null}function Fi(e){let t=e.getBoundingClientRect();return{x:Math.max(Yt,Math.min(t.left+t.width/2,window.innerWidth-Yt)),y:Math.max(Yt,Math.min(t.top+t.height/2,window.innerHeight-Yt))}}function $i(){let e=M().cursor;e.el&&(e.el.style.transition="none",e.el.style.left=`${e.x}px`,e.el.style.top=`${e.y}px`)}function yr(){let e=M().cursor;if(e.settledResolve){let t=e.settledResolve;e.settledResolve=null,t()}}function Mc(e){let t=M().cursor,n={x:t.x,y:t.y},r=performance.now(),o=i=>{if(!t.el||!e.isConnected){t.trackingFrame=null,yr();return}let a=Fi(e),s=Math.min((i-r)/Cc,1),l=1-Math.pow(1-s,3);if(t.x=n.x+(a.x-n.x)*l,t.y=n.y+(a.y-n.y)*l,$i(),s<1){t.trackingFrame=requestAnimationFrame(o);return}t.trackingFrame=null,yr(),Ec(e)};t.trackingFrame=requestAnimationFrame(o)}function Ec(e){let t=M().cursor,n=()=>{if(!t.el||t.targetElement!==e||!e.isConnected){t.trackingFrame=null;return}let r=Fi(e);t.x=r.x,t.y=r.y,$i(),t.trackingFrame=requestAnimationFrame(n)};t.trackingFrame=requestAnimationFrame(n)}async function Kt(e){let t=M().cursor;if((!t.el||!t.el.isConnected)&&(t.el=null,t.rippleEl=null,t.hasPosition=!1,br()),!!t.el){if(Ze(),Zt(),yr(),t.targetElement=e,!t.hasPosition){let n=e.getBoundingClientRect(),r=n.left+n.width/2,o=n.top+n.height/2,i=Math.max(window.innerWidth,100),a=Math.max(window.innerHeight,100);Math.random()<.5?(t.x=i+20,t.y=o+(Math.random()-.5)*100):(t.x=r+(Math.random()-.5)*100,t.y=a+20),t.el.style.transition="none",t.el.style.left=`${t.x}px`,t.el.style.top=`${t.y}px`,t.el.style.opacity="0",t.el.offsetWidth,t.hasPosition=!0}return t.el.style.opacity="1",t.visibilityState="visible",new Promise(n=>{t.settledResolve=n,Mc(e)})}}async function _i(){let e=M().cursor;e.el&&(e.el.style.transform="scale(0.85) translateY(1px)",e.rippleEl&&(e.rippleEl.style.transition="none",e.rippleEl.style.left=`${e.x}px`,e.rippleEl.style.top=`${e.y}px`,e.rippleEl.style.width="0",e.rippleEl.style.height="0",e.rippleEl.style.opacity="0.35",e.rippleEl.offsetWidth,e.rippleEl.style.transition="width 400ms ease-out, height 400ms ease-out, opacity 400ms ease-out",e.rippleEl.style.width="40px",e.rippleEl.style.height="40px",e.rippleEl.style.opacity="0"),await Se(xc),e.el&&(e.el.style.transform="scale(1) translateY(0)"),await Se(100))}function kc(e){return e==="visible"||e==="fading-in"||e==="fading-out"||e==="force-visible"}function Ye(e){let t=M().cursor;if(t.visibilityState=e,!(!t.el||!t.el.isConnected))switch(e){case"hidden":case"force-hidden":case"snapshot-hidden":t.el.style.transition="none",t.el.style.opacity="0",t.rippleEl&&(t.rippleEl.style.opacity="0");break;case"fading-in":t.el.style.transition=`opacity ${gr}ms ease`,t.el.offsetWidth,t.el.style.opacity="1";break;case"visible":case"force-visible":t.el.style.opacity="1";break;case"fading-out":t.el.style.transition=`opacity ${gr}ms ease`,t.el.style.opacity="0";break}}function Ze(){let e=M().cursor;e.hideTimer&&(clearTimeout(e.hideTimer),e.hideTimer=null)}function wt(e){M().cursor.executing=e,e?Ii():Ai()}function wr(){Ze()}function Xt(){let e=M().cursor;e.el&&e.visibilityState!=="force-visible"&&(e.targetElement=null,Ze(),e.hideTimer=setTimeout(()=>{e.visibilityState!=="force-visible"&&(Ye("fading-out"),e.hideTimer=setTimeout(()=>{e.visibilityState==="fading-out"&&(Ye("hidden"),Zt()),e.hideTimer=null},gr))},Ic))}function vr(){let e=M().cursor;e.el&&(Ze(),Zt(),e.visibilityState!=="force-hidden"&&e.visibilityState!=="snapshot-hidden"&&(e.el.isConnected&&(e.el.style.transition="none"),Ye("visible")))}function Oi(){let e=M().cursor;e.visibilityState!=="snapshot-hidden"&&(Ze(),e.preSnapshotState=e.visibilityState,Ye("snapshot-hidden"))}function Pi(){let e=M().cursor,t=e.preSnapshotState;e.preSnapshotState=null,!(!e.el||!t||!kc(t))&&Ye(t==="fading-in"?"fading-in":"visible")}function Sr(e){let t=M().cursor;t.el&&(t.el.innerHTML=e?Ni:Ri)}function Jt(e){let t=M().cursor;t.executing||(e==="visible"&&!t.el&&br(),t.el&&(e==="visible"?(Ze(),t.hasPosition?Ye("force-visible"):t.visibilityState="force-visible"):e==="hidden"?(Ze(),Ye("force-hidden"),Zt()):Xt()))}var fe;(function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"})(fe||(fe={}));function Tc(e){return e.nodeType===e.ELEMENT_NODE}function Qe(e){var t=e?.host;return t?.shadowRoot===e}function Xe(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function Rc(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),e}function Cr(e){try{var t=e.rules||e.cssRules;return t?Rc(Array.from(t).map(xr).join("")):null}catch{return null}}function xr(e){var t=e.cssText;if(Nc(e))try{t=Cr(e.styleSheet)||t}catch{}return t}function Nc(e){return"styleSheet"in e}var Hi=(function(){function e(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return e.prototype.getId=function(t){var n;if(!t)return-1;var r=(n=this.getMeta(t))===null||n===void 0?void 0:n.id;return r??-1},e.prototype.getNode=function(t){return this.idNodeMap.get(t)||null},e.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},e.prototype.getMeta=function(t){return this.nodeMetaMap.get(t)||null},e.prototype.removeNodeFromMap=function(t){var n=this,r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(function(o){return n.removeNodeFromMap(o)})},e.prototype.has=function(t){return this.idNodeMap.has(t)},e.prototype.hasNode=function(t){return this.nodeMetaMap.has(t)},e.prototype.add=function(t,n){var r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)},e.prototype.replace=function(t,n){var r=this.getNode(t);if(r){var o=this.nodeMetaMap.get(r);o&&this.nodeMetaMap.set(n,o)}this.idNodeMap.set(t,n)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e})();function Ui(){return new Hi}function St(e){var t=e.maskInputOptions,n=e.tagName,r=e.type,o=e.value,i=e.maskInputFn,a=o||"";return(t[n.toLowerCase()]||t[r])&&(i?a=i(a):a="*".repeat(a.length)),a}var Wi="__rrweb_original__";function Lc(e){var t=e.getContext("2d");if(!t)return!0;for(var n=50,r=0;r<e.width;r+=n)for(var o=0;o<e.height;o+=n){var i=t.getImageData,a=Wi in i?i[Wi]:i,s=new Uint32Array(a.call(t,r,o,Math.min(n,e.width-r),Math.min(n,e.height-o)).data.buffer);if(s.some(function(l){return l!==0}))return!1}return!0}var Fc=1,$c=new RegExp("[^a-z0-9-_:]"),Je=-2;function Ir(){return Fc++}function _c(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return $c.test(t)?"div":t}function Oc(e){return e.cssRules?Array.from(e.cssRules).map(function(t){return t.cssText||""}).join(""):""}function Pc(e){var t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var ct,Bi,Dc=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Wc=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,Bc=/^(data:)([^,]*),(.*)/i;function Qt(e,t){return(e||"").replace(Dc,function(n,r,o,i,a,s){var l=o||a||s,c=r||i||"";if(!l)return n;if(!Wc.test(l)||Bc.test(l))return"url(".concat(c).concat(l).concat(c,")");if(l[0]==="/")return"url(".concat(c).concat(Pc(t)+l).concat(c,")");var u=t.split("/"),d=l.split("/");u.pop();for(var f=0,m=d;f<m.length;f++){var p=m[f];p!=="."&&(p===".."?u.pop():u.push(p))}return"url(".concat(c).concat(u.join("/")).concat(c,")")})}var Hc=/^[^ \t\n\r\u000c]+/,Uc=/^[, \t\n\r\u000c]+/;function Vc(e,t){if(t.trim()==="")return t;var n=0;function r(c){var u,d=c.exec(t.substring(n));return d?(u=d[0],n+=u.length,u):""}for(var o=[];r(Uc),!(n>=t.length);){var i=r(Hc);if(i.slice(-1)===",")i=ut(e,i.substring(0,i.length-1)),o.push(i);else{var a="";i=ut(e,i);for(var s=!1;;){var l=t.charAt(n);if(l===""){o.push((i+a).trim());break}else if(s)l===")"&&(s=!1);else if(l===","){n+=1,o.push((i+a).trim());break}else l==="("&&(s=!0);a+=l,n+=1}}}return o.join(", ")}function ut(e,t){if(!t||t.trim()==="")return t;var n=e.createElement("a");return n.href=t,n.href}function zc(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function Ar(){var e=document.createElement("a");return e.href="",e.href}function Mr(e,t,n,r){return n==="src"||n==="href"&&r&&!(t==="use"&&r[0]==="#")||n==="xlink:href"&&r&&r[0]!=="#"||n==="background"&&r&&(t==="table"||t==="td"||t==="th")?ut(e,r):n==="srcset"&&r?Vc(e,r):n==="style"&&r?Qt(r,Ar()):t==="object"&&n==="data"&&r?ut(e,r):r}function Gc(e,t,n){if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(var r=e.classList.length;r--;){var o=e.classList[r];if(t.test(o))return!0}return n?e.matches(n):!1}function vt(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return n?vt(e.parentNode,t,n):!1;for(var r=e.classList.length;r--;){var o=e.classList[r];if(t.test(o))return!0}return n?vt(e.parentNode,t,n):!1}function Er(e,t,n){var r=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(r===null)return!1;if(typeof t=="string"){if(r.classList.contains(t)||r.closest(".".concat(t)))return!0}else if(vt(r,t,!0))return!0;return!!(n&&(r.matches(n)||r.closest(n)))}function qc(e,t,n){var r=e.contentWindow;if(r){var o=!1,i;try{i=r.document.readyState}catch{return}if(i!=="complete"){var a=setTimeout(function(){o||(t(),o=!0)},n);e.addEventListener("load",function(){clearTimeout(a),o=!0,t()});return}var s="about:blank";if(r.location.href!==s||e.src===s||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}}function jc(e,t,n){var r=!1,o;try{o=e.sheet}catch{return}if(!o){var i=setTimeout(function(){r||(t(),r=!0)},n);e.addEventListener("load",function(){clearTimeout(i),r=!0,t()})}}function Yc(e,t){var n=t.doc,r=t.mirror,o=t.blockClass,i=t.blockSelector,a=t.maskTextClass,s=t.maskTextSelector,l=t.inlineStylesheet,c=t.maskInputOptions,u=c===void 0?{}:c,d=t.maskTextFn,f=t.maskInputFn,m=t.dataURLOptions,p=m===void 0?{}:m,h=t.inlineImages,y=t.recordCanvas,g=t.keepIframeSrcFn,w=t.newlyAddedElement,v=w===void 0?!1:w,b=Zc(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:fe.Document,childNodes:[],compatMode:e.compatMode}:{type:fe.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:fe.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:b};case e.ELEMENT_NODE:return Xc(e,{doc:n,blockClass:o,blockSelector:i,inlineStylesheet:l,maskInputOptions:u,maskInputFn:f,dataURLOptions:p,inlineImages:h,recordCanvas:y,keepIframeSrcFn:g,newlyAddedElement:v,rootId:b});case e.TEXT_NODE:return Kc(e,{maskTextClass:a,maskTextSelector:s,maskTextFn:d,rootId:b});case e.CDATA_SECTION_NODE:return{type:fe.CDATA,textContent:"",rootId:b};case e.COMMENT_NODE:return{type:fe.Comment,textContent:e.textContent||"",rootId:b};default:return!1}}function Zc(e,t){if(t.hasNode(e)){var n=t.getId(e);return n===1?void 0:n}}function Kc(e,t){var n,r=t.maskTextClass,o=t.maskTextSelector,i=t.maskTextFn,a=t.rootId,s=e.parentNode&&e.parentNode.tagName,l=e.textContent,c=s==="STYLE"?!0:void 0,u=s==="SCRIPT"?!0:void 0;if(c&&l){try{e.nextSibling||e.previousSibling||!((n=e.parentNode.sheet)===null||n===void 0)&&n.cssRules&&(l=Oc(e.parentNode.sheet))}catch(d){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(d),e)}l=Qt(l,Ar())}return u&&(l="SCRIPT_PLACEHOLDER"),!c&&!u&&l&&Er(e,r,o)&&(l=i?i(l):l.replace(/[\S]/g,"*")),{type:fe.Text,textContent:l||"",isStyle:c,rootId:a}}function Xc(e,t){for(var n=t.doc,r=t.blockClass,o=t.blockSelector,i=t.inlineStylesheet,a=t.maskInputOptions,s=a===void 0?{}:a,l=t.maskInputFn,c=t.dataURLOptions,u=c===void 0?{}:c,d=t.inlineImages,f=t.recordCanvas,m=t.keepIframeSrcFn,p=t.newlyAddedElement,h=p===void 0?!1:p,y=t.rootId,g=Gc(e,r,o),w=_c(e),v={},b=e.attributes.length,S=0;S<b;S++){var x=e.attributes[S];v[x.name]=Mr(n,w,x.name,x.value)}if(w==="link"&&i){var I=Array.from(n.styleSheets).find(function(G){return G.href===e.href}),C=null;I&&(C=Cr(I)),C&&(delete v.rel,delete v.href,v._cssText=Qt(C,I.href))}if(w==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){var C=Cr(e.sheet);C&&(v._cssText=Qt(C,Ar()))}if(w==="input"||w==="textarea"||w==="select"){var E=e.value,k=e.checked;v.type!=="radio"&&v.type!=="checkbox"&&v.type!=="submit"&&v.type!=="button"&&E?v.value=St({type:v.type,tagName:w,value:E,maskInputOptions:s,maskInputFn:l}):k&&(v.checked=k)}if(w==="option"&&(e.selected&&!s.select?v.selected=!0:delete v.selected),w==="canvas"&&f){if(e.__context==="2d")Lc(e)||(v.rr_dataURL=e.toDataURL(u.type,u.quality));else if(!("__context"in e)){var T=e.toDataURL(u.type,u.quality),F=document.createElement("canvas");F.width=e.width,F.height=e.height;var D=F.toDataURL(u.type,u.quality);T!==D&&(v.rr_dataURL=T)}}if(w==="img"&&d){ct||(ct=n.createElement("canvas"),Bi=ct.getContext("2d"));var R=e,_=R.crossOrigin;R.crossOrigin="anonymous";var N=function(){try{ct.width=R.naturalWidth,ct.height=R.naturalHeight,Bi.drawImage(R,0,0),v.rr_dataURL=ct.toDataURL(u.type,u.quality)}catch(G){console.warn("Cannot inline img src=".concat(R.currentSrc,"! Error: ").concat(G))}_?v.crossOrigin=_:R.removeAttribute("crossorigin")};R.complete&&R.naturalWidth!==0?N():R.onload=N}if((w==="audio"||w==="video")&&(v.rr_mediaState=e.paused?"paused":"played",v.rr_mediaCurrentTime=e.currentTime),h||(e.scrollLeft&&(v.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(v.rr_scrollTop=e.scrollTop)),g){var P=e.getBoundingClientRect(),X=P.width,U=P.height;v={class:v.class,rr_width:"".concat(X,"px"),rr_height:"".concat(U,"px")}}return w==="iframe"&&!m(v.src)&&(e.contentDocument||(v.rr_src=v.src),delete v.src),{type:fe.Element,tagName:w,attributes:v,childNodes:[],isSVG:zc(e)||void 0,needBlock:g,rootId:y}}function ee(e){return e===void 0?"":e.toLowerCase()}function Jc(e,t){if(t.comment&&e.type===fe.Comment)return!0;if(e.type===fe.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&e.attributes.rel==="preload"&&e.attributes.as==="script"||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&e.attributes.href.endsWith(".js")))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(ee(e.attributes.name).match(/^msapplication-tile(image|color)$/)||ee(e.attributes.name)==="application-name"||ee(e.attributes.rel)==="icon"||ee(e.attributes.rel)==="apple-touch-icon"||ee(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&ee(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(ee(e.attributes.property).match(/^(og|twitter|fb):/)||ee(e.attributes.name).match(/^(og|twitter):/)||ee(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(ee(e.attributes.name)==="robots"||ee(e.attributes.name)==="googlebot"||ee(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(ee(e.attributes.name)==="author"||ee(e.attributes.name)==="generator"||ee(e.attributes.name)==="framework"||ee(e.attributes.name)==="publisher"||ee(e.attributes.name)==="progid"||ee(e.attributes.property).match(/^article:/)||ee(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(ee(e.attributes.name)==="google-site-verification"||ee(e.attributes.name)==="yandex-verification"||ee(e.attributes.name)==="csrf-token"||ee(e.attributes.name)==="p:domain_verify"||ee(e.attributes.name)==="verify-v1"||ee(e.attributes.name)==="verification"||ee(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Ke(e,t){var n=t.doc,r=t.mirror,o=t.blockClass,i=t.blockSelector,a=t.maskTextClass,s=t.maskTextSelector,l=t.skipChild,c=l===void 0?!1:l,u=t.inlineStylesheet,d=u===void 0?!0:u,f=t.maskInputOptions,m=f===void 0?{}:f,p=t.maskTextFn,h=t.maskInputFn,y=t.slimDOMOptions,g=t.dataURLOptions,w=g===void 0?{}:g,v=t.inlineImages,b=v===void 0?!1:v,S=t.recordCanvas,x=S===void 0?!1:S,I=t.onSerialize,C=t.onIframeLoad,E=t.iframeLoadTimeout,k=E===void 0?5e3:E,T=t.onStylesheetLoad,F=t.stylesheetLoadTimeout,D=F===void 0?5e3:F,R=t.keepIframeSrcFn,_=R===void 0?function(){return!1}:R,N=t.newlyAddedElement,P=N===void 0?!1:N,X=t.preserveWhiteSpace,U=X===void 0?!0:X,G=Yc(e,{doc:n,mirror:r,blockClass:o,blockSelector:i,maskTextClass:a,maskTextSelector:s,inlineStylesheet:d,maskInputOptions:m,maskTextFn:p,maskInputFn:h,dataURLOptions:w,inlineImages:b,recordCanvas:x,keepIframeSrcFn:_,newlyAddedElement:P});if(!G)return console.warn(e,"not serialized"),null;var ne;r.hasNode(e)?ne=r.getId(e):Jc(G,y)||!U&&G.type===fe.Text&&!G.isStyle&&!G.textContent.replace(/^\s+|\s+$/gm,"").length?ne=Je:ne=Ir();var L=Object.assign(G,{id:ne});if(r.add(e,L),ne===Je)return null;I&&I(e);var W=!c;if(L.type===fe.Element){W=W&&!L.needBlock,delete L.needBlock;var B=e.shadowRoot;B&&Xe(B)&&(L.isShadowHost=!0)}if((L.type===fe.Document||L.type===fe.Element)&&W){y.headWhitespace&&L.type===fe.Element&&L.tagName==="head"&&(U=!1);for(var Y={doc:n,mirror:r,blockClass:o,blockSelector:i,maskTextClass:a,maskTextSelector:s,skipChild:c,inlineStylesheet:d,maskInputOptions:m,maskTextFn:p,maskInputFn:h,slimDOMOptions:y,dataURLOptions:w,inlineImages:b,recordCanvas:x,preserveWhiteSpace:U,onSerialize:I,onIframeLoad:C,iframeLoadTimeout:k,onStylesheetLoad:T,stylesheetLoadTimeout:D,keepIframeSrcFn:_},O=0,j=Array.from(e.childNodes);O<j.length;O++){var K=j[O],z=Ke(K,Y);z&&L.childNodes.push(z)}if(Tc(e)&&e.shadowRoot)for(var Z=0,H=Array.from(e.shadowRoot.childNodes);Z<H.length;Z++){var K=H[Z],z=Ke(K,Y);z&&(Xe(e.shadowRoot)&&(z.isShadow=!0),L.childNodes.push(z))}}return e.parentNode&&Qe(e.parentNode)&&Xe(e.parentNode)&&(L.isShadow=!0),L.type===fe.Element&&L.tagName==="iframe"&&qc(e,function(){var re=e.contentDocument;if(re&&C){var oe=Ke(re,{doc:re,mirror:r,blockClass:o,blockSelector:i,maskTextClass:a,maskTextSelector:s,skipChild:!1,inlineStylesheet:d,maskInputOptions:m,maskTextFn:p,maskInputFn:h,slimDOMOptions:y,dataURLOptions:w,inlineImages:b,recordCanvas:x,preserveWhiteSpace:U,onSerialize:I,onIframeLoad:C,iframeLoadTimeout:k,onStylesheetLoad:T,stylesheetLoadTimeout:D,keepIframeSrcFn:_});oe&&C(e,oe)}},k),L.type===fe.Element&&L.tagName==="link"&&L.attributes.rel==="stylesheet"&&jc(e,function(){if(T){var re=Ke(e,{doc:n,mirror:r,blockClass:o,blockSelector:i,maskTextClass:a,maskTextSelector:s,skipChild:!1,inlineStylesheet:d,maskInputOptions:m,maskTextFn:p,maskInputFn:h,slimDOMOptions:y,dataURLOptions:w,inlineImages:b,recordCanvas:x,preserveWhiteSpace:U,onSerialize:I,onIframeLoad:C,iframeLoadTimeout:k,onStylesheetLoad:T,stylesheetLoadTimeout:D,keepIframeSrcFn:_});re&&T(e,re)}},D),L}function Vi(e,t){var n=t||{},r=n.mirror,o=r===void 0?new Hi:r,i=n.blockClass,a=i===void 0?"rr-block":i,s=n.blockSelector,l=s===void 0?null:s,c=n.maskTextClass,u=c===void 0?"rr-mask":c,d=n.maskTextSelector,f=d===void 0?null:d,m=n.inlineStylesheet,p=m===void 0?!0:m,h=n.inlineImages,y=h===void 0?!1:h,g=n.recordCanvas,w=g===void 0?!1:g,v=n.maskAllInputs,b=v===void 0?!1:v,S=n.maskTextFn,x=n.maskInputFn,I=n.slimDOM,C=I===void 0?!1:I,E=n.dataURLOptions,k=n.preserveWhiteSpace,T=n.onSerialize,F=n.onIframeLoad,D=n.iframeLoadTimeout,R=n.onStylesheetLoad,_=n.stylesheetLoadTimeout,N=n.keepIframeSrcFn,P=N===void 0?function(){return!1}:N,X=b===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:b===!1?{password:!0}:b,U=C===!0||C==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:C==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:C===!1?{}:C;return Ke(e,{doc:e,mirror:o,blockClass:a,blockSelector:l,maskTextClass:u,maskTextSelector:f,skipChild:!1,inlineStylesheet:p,maskInputOptions:X,maskTextFn:S,maskInputFn:x,slimDOMOptions:U,dataURLOptions:E,inlineImages:y,recordCanvas:w,preserveWhiteSpace:k,onSerialize:T,onIframeLoad:F,iframeLoadTimeout:D,onStylesheetLoad:R,stylesheetLoadTimeout:_,keepIframeSrcFn:P,newlyAddedElement:!1})}var Qc=/([^\\]):hover/,ig=new RegExp(Qc.source,"g");function pe(e,t,n=document){let r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}var dt=`Please stop import mirror directly. Instead of that,\r
|
|
71
71
|
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
72
|
-
or you can use record.mirror to access the mirror instance during recording.`,pi={map:{},getId(){return console.error(it),-1},getNode(){return console.error(it),null},removeNodeFromMap(){console.error(it)},has(){return console.error(it),!1},reset(){console.error(it)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(pi=new Proxy(pi,{get(e,t,n){return t==="map"&&console.error(it),Reflect.get(e,t,n)}}));function at(e,t,n={}){let r=null,o=0;return function(...i){let a=Date.now();!o&&n.leading===!1&&(o=a);let s=t-(a-o),c=this;s<=0||s>t?(r&&(clearTimeout(r),r=null),o=a,e.apply(c,i)):!r&&n.trailing!==!1&&(r=setTimeout(()=>{o=n.leading===!1?0:Date.now(),r=null,e.apply(c,i)},s))}}function Ze(e,t,n,r,o=window){let i=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(a){setTimeout(()=>{n.set.call(this,a)},0),i&&i.set&&i.set.call(this,a)}}),()=>Ze(e,t,i||{},!0)}function be(e,t,n){try{if(!(t in e))return()=>{};let r=e[t],o=n(r);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}function en(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function tn(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function te(e,t,n,r){if(!e)return!1;let o=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(!o)return!1;if(typeof t=="string"){if(o.classList.contains(t)||r&&o.closest("."+t)!==null)return!0}else if(Ct(o,t,r))return!0;return!!(n&&(e.matches(n)||r&&o.closest(n)!==null))}function hi(e,t){return t.getId(e)!==-1}function nn(e,t){return t.getId(e)===Ye}function yr(e,t){if(je(e))return!1;let n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?yr(e.parentNode,t):!0:!0}function br(e){return!!e.changedTouches}function gi(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let n=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}function rn(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function on(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function an(e){return!!e?.shadowRoot}var Qt=class{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){var n;return(n=this.styleIDMap.get(t))!==null&&n!==void 0?n:-1}has(t){return this.styleIDMap.has(t)}add(t,n){if(this.has(t))return this.getId(t);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};var H=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(H||{}),P=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e))(P||{}),sn=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(sn||{}),Ne=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Ne||{});function yi(e){return"__ln"in e}var wr=class{constructor(){this.length=0,this.head=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<t;r++)n=n?.next||null;return n}addNode(t){let n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&yi(t.previousSibling)){let r=t.previousSibling.__ln.next;n.next=r,n.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(t.nextSibling&&yi(t.nextSibling)&&t.nextSibling.__ln.previous){let r=t.nextSibling.__ln.previous;n.previous=r,n.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;this.length++}removeNode(t){let n=t.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next&&(n.next.previous=n.previous)):(this.head=n.next,this.head&&(this.head.previous=null)),t.__ln&&delete t.__ln,this.length--)}},bi=(e,t)=>`${e}@${t}`,ln=class{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;let t=[],n=new wr,r=s=>{let c=s,l=Ye;for(;l===Ye;)c=c&&c.nextSibling,l=c&&this.mirror.getId(c);return l},o=s=>{var c,l,u,d;let f=null;((l=(c=s.getRootNode)===null||c===void 0?void 0:c.call(s))===null||l===void 0?void 0:l.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&s.getRootNode().host&&(f=s.getRootNode().host);let m=f;for(;((d=(u=m?.getRootNode)===null||u===void 0?void 0:u.call(m))===null||d===void 0?void 0:d.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&m.getRootNode().host;)m=m.getRootNode().host;let p=!this.doc.contains(s)&&(!m||!this.doc.contains(m));if(!s.parentNode||p)return;let g=je(s.parentNode)?this.mirror.getId(f):this.mirror.getId(s.parentNode),h=r(s);if(g===-1||h===-1)return n.addNode(s);let y=ze(s,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:v=>{rn(v,this.mirror)&&this.iframeManager.addIframe(v),on(v,this.mirror)&&this.stylesheetManager.trackLinkElement(v),an(s)&&this.shadowDomManager.addShadowRoot(s.shadowRoot,this.doc)},onIframeLoad:(v,b)=>{this.iframeManager.attachIframe(v,b),this.shadowDomManager.observeAttachShadow(v)},onStylesheetLoad:(v,b)=>{this.stylesheetManager.attachLinkElement(v,b)}});y&&t.push({parentId:g,nextId:h,node:y})};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let s of Array.from(this.movedSet.values()))wi(this.removes,s,this.mirror)&&!this.movedSet.has(s.parentNode)||o(s);for(let s of Array.from(this.addedSet.values()))!vi(this.droppedSet,s)&&!wi(this.removes,s,this.mirror)||vi(this.movedSet,s)?o(s):this.droppedSet.add(s);let i=null;for(;n.length;){let s=null;if(i){let c=this.mirror.getId(i.value.parentNode),l=r(i.value);c!==-1&&l!==-1&&(s=i)}if(!s)for(let c=n.length-1;c>=0;c--){let l=n.get(c);if(l){let u=this.mirror.getId(l.value.parentNode);if(r(l.value)===-1)continue;if(u!==-1){s=l;break}else{let f=l.value;if(f.parentNode&&f.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let m=f.parentNode.host;if(this.mirror.getId(m)!==-1){s=l;break}}}}}if(!s){for(;n.head;)n.removeNode(n.head.value);break}i=s.previous,n.removeNode(s.value),o(s.value)}let a={texts:this.texts.map(s=>({id:this.mirror.getId(s.node),value:s.value})).filter(s=>this.mirror.has(s.id)),attributes:this.attributes.map(s=>({id:this.mirror.getId(s.node),attributes:s.attributes})).filter(s=>this.mirror.has(s.id)),removes:this.removes,adds:t};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.adds.length||(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(a))},this.processMutation=t=>{if(!nn(t.target,this.mirror))switch(t.type){case"characterData":{let n=t.target.textContent;!te(t.target,this.blockClass,this.blockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:gr(t.target,this.maskTextClass,this.maskTextSelector)&&n?this.maskTextFn?this.maskTextFn(n):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{let n=t.target,r=t.target.getAttribute(t.attributeName);if(t.attributeName==="value"&&(r=St({maskInputOptions:this.maskInputOptions,tagName:t.target.tagName,type:t.target.getAttribute("type"),value:r,maskInputFn:this.maskInputFn})),te(t.target,this.blockClass,this.blockSelector,!1)||r===t.oldValue)return;let o=this.attributes.find(i=>i.node===t.target);if(n.tagName==="IFRAME"&&t.attributeName==="src"&&!this.keepIframeSrcFn(r))if(!n.contentDocument)t.attributeName="rr_src";else return;if(o||(o={node:t.target,attributes:{}},this.attributes.push(o)),t.attributeName==="style"){let i=this.doc.createElement("span");t.oldValue&&i.setAttribute("style",t.oldValue),(o.attributes.style===void 0||o.attributes.style===null)&&(o.attributes.style={});let a=o.attributes.style;for(let s of Array.from(n.style)){let c=n.style.getPropertyValue(s),l=n.style.getPropertyPriority(s);(c!==i.style.getPropertyValue(s)||l!==i.style.getPropertyPriority(s))&&(l===""?a[s]=c:a[s]=[c,l])}for(let s of Array.from(i.style))n.style.getPropertyValue(s)===""&&(a[s]=!1)}else o.attributes[t.attributeName]=hr(this.doc,n.tagName,t.attributeName,r);break}case"childList":{if(te(t.target,this.blockClass,this.blockSelector,!0))return;t.addedNodes.forEach(n=>this.genAdds(n,t.target)),t.removedNodes.forEach(n=>{let r=this.mirror.getId(n),o=je(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);te(t.target,this.blockClass,this.blockSelector,!1)||nn(n,this.mirror)||!hi(n,this.mirror)||(this.addedSet.has(n)?(vr(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||yr(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[bi(r,o)]?vr(this.movedSet,n):this.removes.push({parentId:o,id:r,isShadow:je(t.target)&&qe(t.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(t,n)=>{if(this.mirror.hasNode(t)){if(nn(t,this.mirror))return;this.movedSet.add(t);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[bi(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);te(t,this.blockClass,this.blockSelector,!1)||t.childNodes.forEach(r=>this.genAdds(r))}}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager"].forEach(n=>{this[n]=t[n]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}};function vr(e,t){e.delete(t),t.childNodes.forEach(n=>vr(e,n))}function wi(e,t,n){return e.length===0?!1:Ci(e,t,n)}function Ci(e,t,n){let{parentNode:r}=t;if(!r)return!1;let o=n.getId(r);return e.some(i=>i.id===o)?!0:Ci(e,r,n)}function vi(e,t){return e.size===0?!1:Si(e,t)}function Si(e,t){let{parentNode:n}=t;return n?e.has(n)?!0:Si(e,n):!1}var De=[],Ei=typeof CSSGroupingRule<"u",Ai=typeof CSSMediaRule<"u",ki=typeof CSSSupportsRule<"u",Mi=typeof CSSConditionRule<"u";function xt(e){try{if("composedPath"in e){let t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0];return e.target}catch{return e.target}}function Cr(e,t){var n,r;let o=new ln;De.push(o),o.init(e);let i=window.MutationObserver||window.__rrMutationObserver,a=(r=(n=window?.Zone)===null||n===void 0?void 0:n.__symbol__)===null||r===void 0?void 0:r.call(n,"MutationObserver");a&&window[a]&&(i=window[a]);let s=new i(o.processMutations.bind(o));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function mc({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};let o=typeof t.mousemove=="number"?t.mousemove:50,i=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500,a=[],s,c=at(d=>{let f=Date.now()-s;e(a.map(m=>(m.timeOffset-=f,m)),d),a=[],s=null},i),l=at(d=>{let f=xt(d),{clientX:m,clientY:p}=br(d)?d.changedTouches[0]:d;s||(s=Date.now()),a.push({x:m,y:p,id:r.getId(f),timeOffset:Date.now()-s}),c(typeof DragEvent<"u"&&d instanceof DragEvent?P.Drag:d instanceof MouseEvent?P.MouseMove:P.TouchMove)},o,{trailing:!1}),u=[ce("mousemove",l,n),ce("touchmove",l,n),ce("drag",l,n)];return()=>{u.forEach(d=>d())}}function pc({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,sampling:i}){if(i.mouseInteraction===!1)return()=>{};let a=i.mouseInteraction===!0||i.mouseInteraction===void 0?{}:i.mouseInteraction,s=[],c=l=>u=>{let d=xt(u);if(te(d,r,o,!0))return;let f=br(u)?u.changedTouches[0]:u;if(!f)return;let m=n.getId(d),{clientX:p,clientY:g}=f;e({type:sn[l],id:m,x:p,y:g})};return Object.keys(sn).filter(l=>Number.isNaN(Number(l))&&!l.endsWith("_Departed")&&a[l]!==!1).forEach(l=>{let u=l.toLowerCase(),d=c(l);s.push(ce(u,d,t))}),()=>{s.forEach(l=>l())}}function Sr({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,sampling:i}){let a=at(s=>{let c=xt(s);if(!c||te(c,r,o,!0))return;let l=n.getId(c);if(c===t){let u=t.scrollingElement||t.documentElement;e({id:l,x:u.scrollLeft,y:u.scrollTop})}else e({id:l,x:c.scrollLeft,y:c.scrollTop})},i.scroll||100);return ce("scroll",a,t)}function hc({viewportResizeCb:e}){let t=-1,n=-1,r=at(()=>{let o=en(),i=tn();(t!==o||n!==i)&&(e({width:Number(i),height:Number(o)}),t=o,n=i)},200);return ce("resize",r,window)}function xi(e,t){let n=Object.assign({},e);return t||delete n.userTriggered,n}var gc=["INPUT","TEXTAREA","SELECT"],Ii=new WeakMap;function yc({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,ignoreClass:i,maskInputOptions:a,maskInputFn:s,sampling:c,userTriggeredOnInput:l}){function u(y){let v=xt(y),b=y.isTrusted;if(v&&v.tagName==="OPTION"&&(v=v.parentElement),!v||!v.tagName||gc.indexOf(v.tagName)<0||te(v,r,o,!0))return;let w=v.type;if(v.classList.contains(i))return;let S=v.value,I=!1;w==="radio"||w==="checkbox"?I=v.checked:(a[v.tagName.toLowerCase()]||a[w])&&(S=St({maskInputOptions:a,tagName:v.tagName,type:w,value:S,maskInputFn:s})),d(v,xi({text:S,isChecked:I,userTriggered:b},l));let C=v.name;w==="radio"&&C&&I&&t.querySelectorAll(`input[type="radio"][name="${C}"]`).forEach(E=>{E!==v&&d(E,xi({text:E.value,isChecked:!I,userTriggered:!1},l))})}function d(y,v){let b=Ii.get(y);if(!b||b.text!==v.text||b.isChecked!==v.isChecked){Ii.set(y,v);let w=n.getId(y);e(Object.assign(Object.assign({},v),{id:w}))}}let m=(c.input==="last"?["change"]:["input","change"]).map(y=>ce(y,u,t)),p=t.defaultView;if(!p)return()=>{m.forEach(y=>y())};let g=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value"),h=[[p.HTMLInputElement.prototype,"value"],[p.HTMLInputElement.prototype,"checked"],[p.HTMLSelectElement.prototype,"value"],[p.HTMLTextAreaElement.prototype,"value"],[p.HTMLSelectElement.prototype,"selectedIndex"],[p.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&m.push(...h.map(y=>Ze(y[0],y[1],{set(){u({target:this})}},!1,p))),()=>{m.forEach(y=>y())}}function cn(e){let t=[];function n(r,o){if(Ei&&r.parentRule instanceof CSSGroupingRule||Ai&&r.parentRule instanceof CSSMediaRule||ki&&r.parentRule instanceof CSSSupportsRule||Mi&&r.parentRule instanceof CSSConditionRule){let a=Array.from(r.parentRule.cssRules).indexOf(r);o.unshift(a)}else if(r.parentStyleSheet){let a=Array.from(r.parentStyleSheet.cssRules).indexOf(r);o.unshift(a)}return o}return n(e,t)}function $e(e,t,n){let r,o;return e?(e.ownerNode?r=t.getId(e.ownerNode):o=n.getId(e),{styleId:o,id:r}):{}}function bc({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){let o=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=function(u,d){let{id:f,styleId:m}=$e(this,t,n.styleMirror);return(f&&f!==-1||m&&m!==-1)&&e({id:f,styleId:m,adds:[{rule:u,index:d}]}),o.apply(this,[u,d])};let i=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=function(u){let{id:d,styleId:f}=$e(this,t,n.styleMirror);return(d&&d!==-1||f&&f!==-1)&&e({id:d,styleId:f,removes:[{index:u}]}),i.apply(this,[u])};let a;r.CSSStyleSheet.prototype.replace&&(a=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=function(u){let{id:d,styleId:f}=$e(this,t,n.styleMirror);return(d&&d!==-1||f&&f!==-1)&&e({id:d,styleId:f,replace:u}),a.apply(this,[u])});let s;r.CSSStyleSheet.prototype.replaceSync&&(s=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=function(u){let{id:d,styleId:f}=$e(this,t,n.styleMirror);return(d&&d!==-1||f&&f!==-1)&&e({id:d,styleId:f,replaceSync:u}),s.apply(this,[u])});let c={};Ei?c.CSSGroupingRule=r.CSSGroupingRule:(Ai&&(c.CSSMediaRule=r.CSSMediaRule),Mi&&(c.CSSConditionRule=r.CSSConditionRule),ki&&(c.CSSSupportsRule=r.CSSSupportsRule));let l={};return Object.entries(c).forEach(([u,d])=>{l[u]={insertRule:d.prototype.insertRule,deleteRule:d.prototype.deleteRule},d.prototype.insertRule=function(f,m){let{id:p,styleId:g}=$e(this.parentStyleSheet,t,n.styleMirror);return(p&&p!==-1||g&&g!==-1)&&e({id:p,styleId:g,adds:[{rule:f,index:[...cn(this),m||0]}]}),l[u].insertRule.apply(this,[f,m])},d.prototype.deleteRule=function(f){let{id:m,styleId:p}=$e(this.parentStyleSheet,t,n.styleMirror);return(m&&m!==-1||p&&p!==-1)&&e({id:m,styleId:p,removes:[{index:[...cn(this),f]}]}),l[u].deleteRule.apply(this,[f])}}),()=>{r.CSSStyleSheet.prototype.insertRule=o,r.CSSStyleSheet.prototype.deleteRule=i,a&&(r.CSSStyleSheet.prototype.replace=a),s&&(r.CSSStyleSheet.prototype.replaceSync=s),Object.entries(c).forEach(([u,d])=>{d.prototype.insertRule=l[u].insertRule,d.prototype.deleteRule=l[u].deleteRule})}}function xr({mirror:e,stylesheetManager:t},n){var r,o,i;let a=null;n.nodeName==="#document"?a=e.getId(n):a=e.getId(n.host);let s=n.nodeName==="#document"?(r=n.defaultView)===null||r===void 0?void 0:r.Document:(i=(o=n.ownerDocument)===null||o===void 0?void 0:o.defaultView)===null||i===void 0?void 0:i.ShadowRoot,c=Object.getOwnPropertyDescriptor(s?.prototype,"adoptedStyleSheets");return a===null||a===-1||!s||!c?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get(){var l;return(l=c.get)===null||l===void 0?void 0:l.call(this)},set(l){var u;let d=(u=c.set)===null||u===void 0?void 0:u.call(this,l);if(a!==null&&a!==-1)try{t.adoptStyleSheets(l,a)}catch{}return d}}),()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})})}function wc({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:o}){let i=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=function(s,c,l){var u;if(n.has(s))return i.apply(this,[s,c,l]);let{id:d,styleId:f}=$e((u=this.parentRule)===null||u===void 0?void 0:u.parentStyleSheet,t,r.styleMirror);return(d&&d!==-1||f&&f!==-1)&&e({id:d,styleId:f,set:{property:s,value:c,priority:l},index:cn(this.parentRule)}),i.apply(this,[s,c,l])};let a=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=function(s){var c;if(n.has(s))return a.apply(this,[s]);let{id:l,styleId:u}=$e((c=this.parentRule)===null||c===void 0?void 0:c.parentStyleSheet,t,r.styleMirror);return(l&&l!==-1||u&&u!==-1)&&e({id:l,styleId:u,remove:{property:s},index:cn(this.parentRule)}),a.apply(this,[s])},()=>{o.CSSStyleDeclaration.prototype.setProperty=i,o.CSSStyleDeclaration.prototype.removeProperty=a}}function vc({mediaInteractionCb:e,blockClass:t,blockSelector:n,mirror:r,sampling:o}){let i=s=>at(c=>{let l=xt(c);if(!l||te(l,t,n,!0))return;let{currentTime:u,volume:d,muted:f,playbackRate:m}=l;e({type:s,id:r.getId(l),currentTime:u,volume:d,muted:f,playbackRate:m})},o.media||500),a=[ce("play",i(0)),ce("pause",i(1)),ce("seeked",i(2)),ce("volumechange",i(3)),ce("ratechange",i(4))];return()=>{a.forEach(s=>s())}}function Cc({fontCb:e,doc:t}){let n=t.defaultView;if(!n)return()=>{};let r=[],o=new WeakMap,i=n.FontFace;n.FontFace=function(c,l,u){let d=new i(c,l,u);return o.set(d,{family:c,buffer:typeof l!="string",descriptors:u,fontSource:typeof l=="string"?l:JSON.stringify(Array.from(new Uint8Array(l)))}),d};let a=be(t.fonts,"add",function(s){return function(c){return setTimeout(()=>{let l=o.get(c);l&&(e(l),o.delete(c))},0),s.apply(this,[c])}});return r.push(()=>{n.FontFace=i}),r.push(a),()=>{r.forEach(s=>s())}}function Sc(e){let{doc:t,mirror:n,blockClass:r,blockSelector:o,selectionCb:i}=e,a=!0,s=()=>{let c=t.getSelection();if(!c||a&&c?.isCollapsed)return;a=c.isCollapsed||!1;let l=[],u=c.rangeCount||0;for(let d=0;d<u;d++){let f=c.getRangeAt(d),{startContainer:m,startOffset:p,endContainer:g,endOffset:h}=f;te(m,r,o,!0)||te(g,r,o,!0)||l.push({start:n.getId(m),startOffset:p,end:n.getId(g),endOffset:h})}i({ranges:l})};return s(),ce("selectionchange",s)}function xc(e,t){let{mutationCb:n,mousemoveCb:r,mouseInteractionCb:o,scrollCb:i,viewportResizeCb:a,inputCb:s,mediaInteractionCb:c,styleSheetRuleCb:l,styleDeclarationCb:u,canvasMutationCb:d,fontCb:f,selectionCb:m}=e;e.mutationCb=(...p)=>{t.mutation&&t.mutation(...p),n(...p)},e.mousemoveCb=(...p)=>{t.mousemove&&t.mousemove(...p),r(...p)},e.mouseInteractionCb=(...p)=>{t.mouseInteraction&&t.mouseInteraction(...p),o(...p)},e.scrollCb=(...p)=>{t.scroll&&t.scroll(...p),i(...p)},e.viewportResizeCb=(...p)=>{t.viewportResize&&t.viewportResize(...p),a(...p)},e.inputCb=(...p)=>{t.input&&t.input(...p),s(...p)},e.mediaInteractionCb=(...p)=>{t.mediaInteaction&&t.mediaInteaction(...p),c(...p)},e.styleSheetRuleCb=(...p)=>{t.styleSheetRule&&t.styleSheetRule(...p),l(...p)},e.styleDeclarationCb=(...p)=>{t.styleDeclaration&&t.styleDeclaration(...p),u(...p)},e.canvasMutationCb=(...p)=>{t.canvasMutation&&t.canvasMutation(...p),d(...p)},e.fontCb=(...p)=>{t.font&&t.font(...p),f(...p)},e.selectionCb=(...p)=>{t.selection&&t.selection(...p),m(...p)}}function Ti(e,t={}){let n=e.doc.defaultView;if(!n)return()=>{};xc(e,t);let r=Cr(e,e.doc),o=mc(e),i=pc(e),a=Sr(e),s=hc(e),c=yc(e),l=vc(e),u=bc(e,{win:n}),d=xr(e,e.doc),f=wc(e,{win:n}),m=e.collectFonts?Cc(e):()=>{},p=Sc(e),g=[];for(let h of e.plugins)g.push(h.observer(h.callback,n,h.options));return()=>{De.forEach(h=>h.reset()),r.disconnect(),o(),i(),a(),s(),c(),l(),u(),d(),f(),m(),p(),g.forEach(h=>h())}}var It=class{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,n,r,o){let i=r||this.getIdToRemoteIdMap(t),a=o||this.getRemoteIdToIdMap(t),s=i.get(n);return s||(s=this.generateIdFn(),i.set(n,s),a.set(s,n)),s}getIds(t,n){let r=this.getIdToRemoteIdMap(t),o=this.getRemoteIdToIdMap(t);return n.map(i=>this.getId(t,i,r,o))}getRemoteId(t,n,r){let o=r||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;let i=o.get(n);return i||-1}getRemoteIds(t,n){let r=this.getRemoteIdToIdMap(t);return n.map(o=>this.getRemoteId(t,o,r))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let n=this.iframeIdToRemoteIdMap.get(t);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(t,n)),n}getRemoteIdToIdMap(t){let n=this.iframeRemoteIdToIdMap.get(t);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(t,n)),n}};var un=class{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new It(mr),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new It(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,n){var r;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),(r=this.loadListener)===null||r===void 0||r.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){if(t.data.type==="rrweb"){if(!t.source)return;let r=this.crossOriginIframeMap.get(t.source);if(!r)return;let o=this.transformCrossOriginEvent(r,t.data.event);o&&this.wrappedEmit(o,t.data.isCheckout)}}transformCrossOriginEvent(t,n){var r;switch(n.type){case H.FullSnapshot:return this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t),{timestamp:n.timestamp,type:H.IncrementalSnapshot,data:{source:P.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case H.Meta:case H.Load:case H.DomContentLoaded:return!1;case H.Plugin:return n;case H.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case H.IncrementalSnapshot:switch(n.data.source){case P.Mutation:return n.data.adds.forEach(o=>{this.replaceIds(o,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(o.node,t)}),n.data.removes.forEach(o=>{this.replaceIds(o,t,["parentId","id"])}),n.data.attributes.forEach(o=>{this.replaceIds(o,t,["id"])}),n.data.texts.forEach(o=>{this.replaceIds(o,t,["id"])}),n;case P.Drag:case P.TouchMove:case P.MouseMove:return n.data.positions.forEach(o=>{this.replaceIds(o,t,["id"])}),n;case P.ViewportResize:return!1;case P.MediaInteraction:case P.MouseInteraction:case P.Scroll:case P.CanvasMutation:case P.Input:return this.replaceIds(n.data,t,["id"]),n;case P.StyleSheetRule:case P.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case P.Font:return n;case P.Selection:return n.data.ranges.forEach(o=>{this.replaceIds(o,t,["start","end"])}),n;case P.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),(r=n.data.styles)===null||r===void 0||r.forEach(o=>{this.replaceStyleIds(o,t,["styleId"])}),n}}}replace(t,n,r,o){for(let i of o)!Array.isArray(n[i])&&typeof n[i]!="number"||(Array.isArray(n[i])?n[i]=t.getIds(r,n[i]):n[i]=t.getId(r,n[i]));return n}replaceIds(t,n,r){return this.replace(this.crossOriginIframeMirror,t,n,r)}replaceStyleIds(t,n,r){return this.replace(this.crossOriginIframeStyleMirror,t,n,r)}replaceIdOnNode(t,n){this.replaceIds(t,n,["id"]),"childNodes"in t&&t.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}};var dn=class{constructor(t){this.shadowDoms=new WeakSet,this.restorePatches=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror;let n=this;this.restorePatches.push(be(Element.prototype,"attachShadow",function(r){return function(o){let i=r.call(this,o);return this.shadowRoot&&n.addShadowRoot(this.shadowRoot,this.ownerDocument),i}}))}addShadowRoot(t,n){qe(t)&&(this.shadowDoms.has(t)||(this.shadowDoms.add(t),Cr(Object.assign(Object.assign({},this.bypassOptions),{doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t),Sr(Object.assign(Object.assign({},this.bypassOptions),{scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),setTimeout(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),xr({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t)},0)))}observeAttachShadow(t){if(t.contentWindow){let n=this;this.restorePatches.push(be(t.contentWindow.HTMLElement.prototype,"attachShadow",function(r){return function(o){let i=r.call(this,o);return this.shadowRoot&&n.addShadowRoot(this.shadowRoot,t.contentDocument),i}}))}}reset(){this.restorePatches.forEach(t=>t()),this.shadowDoms=new WeakSet}};function Li(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Ni(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(u){try{l(r.next(u))}catch(d){a(d)}}function c(u){try{l(r.throw(u))}catch(d){a(d)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((r=r.apply(e,t||[])).next())})}var st="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ic=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(Et=0;Et<st.length;Et++)Ic[st.charCodeAt(Et)]=Et;var Et,Ri=function(e){var t=new Uint8Array(e),n,r=t.length,o="";for(n=0;n<r;n+=3)o+=st[t[n]>>2],o+=st[(t[n]&3)<<4|t[n+1]>>4],o+=st[(t[n+1]&15)<<2|t[n+2]>>6],o+=st[t[n+2]&63];return r%3===2?o=o.substring(0,o.length-1)+"=":r%3===1&&(o=o.substring(0,o.length-2)+"=="),o};var _i=new Map;function Ec(e,t){let n=_i.get(e);return n||(n=new Map,_i.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}var Ir=(e,t,n)=>{if(!e||!(Fi(e,t)||typeof e=="object"))return;let r=e.constructor.name,o=Ec(n,r),i=o.indexOf(e);return i===-1&&(i=o.length,o.push(e)),i};function fn(e,t,n){if(e instanceof Array)return e.map(r=>fn(r,t,n));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){let r=e.constructor.name,o=Ri(e);return{rr_type:r,base64:o}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[fn(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){let r=e.constructor.name,{src:o}=e;return{rr_type:r,src:o}}else if(e instanceof HTMLCanvasElement){let r="HTMLImageElement",o=e.toDataURL();return{rr_type:r,src:o}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[fn(e.data,t,n),e.width,e.height]};if(Fi(e,t)||typeof e=="object"){let r=e.constructor.name,o=Ir(e,t,n);return{rr_type:r,index:o}}}}return e}var mn=(e,t,n)=>[...e].map(r=>fn(r,t,n)),Fi=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(o=>typeof t[o]=="function").find(o=>e instanceof t[o]);function Oi(e,t,n,r){let o=[],i=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(let a of i)try{if(typeof t.CanvasRenderingContext2D.prototype[a]!="function")continue;let s=be(t.CanvasRenderingContext2D.prototype,a,function(c){return function(...l){return te(this.canvas,n,r,!0)||setTimeout(()=>{let u=mn([...l],t,this);e(this.canvas,{type:Ne["2D"],property:a,args:u})},0),c.apply(this,l)}});o.push(s)}catch{let c=Ze(t.CanvasRenderingContext2D.prototype,a,{set(l){e(this.canvas,{type:Ne["2D"],property:a,args:[l],setter:!0})}});o.push(c)}return()=>{o.forEach(a=>a())}}function Er(e,t,n){let r=[];try{let o=be(e.HTMLCanvasElement.prototype,"getContext",function(i){return function(a,...s){return te(this,t,n,!0)||"__context"in this||(this.__context=a),i.apply(this,[a,...s])}});r.push(o)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{r.forEach(o=>o())}}function $i(e,t,n,r,o,i,a){let s=[],c=Object.getOwnPropertyNames(e);for(let l of c)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if(typeof e[l]!="function")continue;let u=be(e,l,function(d){return function(...f){let m=d.apply(this,f);if(Ir(m,a,this),!te(this.canvas,r,o,!0)){let p=mn([...f],a,this),g={type:t,property:l,args:p};n(this.canvas,g)}return m}});s.push(u)}catch{let d=Ze(e,l,{set(f){n(this.canvas,{type:t,property:l,args:[f],setter:!0})}});s.push(d)}return s}function Di(e,t,n,r,o){let i=[];return i.push(...$i(t.WebGLRenderingContext.prototype,Ne.WebGL,e,n,r,o,t)),typeof t.WebGL2RenderingContext<"u"&&i.push(...$i(t.WebGL2RenderingContext.prototype,Ne.WebGL2,e,n,r,o,t)),()=>{i.forEach(a=>a())}}var Ar=null;try{Pi=typeof module<"u"&&typeof module.require=="function"&&module.require("worker_threads")||typeof __non_webpack_require__=="function"&&__non_webpack_require__("worker_threads")||typeof zn=="function"&&zn("worker_threads"),Ar=Pi.Worker}catch{}var Pi;function Ac(e,t){return Buffer.from(e,"base64").toString(t?"utf16":"utf8")}function Wi(e,t,n){var r=t===void 0?null:t,o=n===void 0?!1:n,i=Ac(e,o),a=i.indexOf(`
|
|
73
|
-
`,10)+1,s=i.substring(a)+(r?"//# sourceMappingURL="+r:"");return function(
|
|
74
|
-
`,10)+1,s=i.substring(a)+(r?"//# sourceMappingURL="+r:""),c=new Blob([s],{type:"application/javascript"});return URL.createObjectURL(c)}function Bi(e,t,n){var r;return function(i){return r=r||Mc(e,t,n),new Worker(r,i)}}var Tc=Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]";function Hi(){return Tc}function Ui(e,t,n){return Hi()?Wi(e,t,n):Bi(e,t,n)}var Vi=Ui("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24gKCkgewogICAgJ3VzZSBzdHJpY3QnOwoKICAgIC8qISAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KICAgIENvcHlyaWdodCAoYykgTWljcm9zb2Z0IENvcnBvcmF0aW9uLg0KDQogICAgUGVybWlzc2lvbiB0byB1c2UsIGNvcHksIG1vZGlmeSwgYW5kL29yIGRpc3RyaWJ1dGUgdGhpcyBzb2Z0d2FyZSBmb3IgYW55DQogICAgcHVycG9zZSB3aXRoIG9yIHdpdGhvdXQgZmVlIGlzIGhlcmVieSBncmFudGVkLg0KDQogICAgVEhFIFNPRlRXQVJFIElTIFBST1ZJREVEICJBUyBJUyIgQU5EIFRIRSBBVVRIT1IgRElTQ0xBSU1TIEFMTCBXQVJSQU5USUVTIFdJVEgNCiAgICBSRUdBUkQgVE8gVEhJUyBTT0ZUV0FSRSBJTkNMVURJTkcgQUxMIElNUExJRUQgV0FSUkFOVElFUyBPRiBNRVJDSEFOVEFCSUxJVFkNCiAgICBBTkQgRklUTkVTUy4gSU4gTk8gRVZFTlQgU0hBTEwgVEhFIEFVVEhPUiBCRSBMSUFCTEUgRk9SIEFOWSBTUEVDSUFMLCBESVJFQ1QsDQogICAgSU5ESVJFQ1QsIE9SIENPTlNFUVVFTlRJQUwgREFNQUdFUyBPUiBBTlkgREFNQUdFUyBXSEFUU09FVkVSIFJFU1VMVElORyBGUk9NDQogICAgTE9TUyBPRiBVU0UsIERBVEEgT1IgUFJPRklUUywgV0hFVEhFUiBJTiBBTiBBQ1RJT04gT0YgQ09OVFJBQ1QsIE5FR0xJR0VOQ0UgT1INCiAgICBPVEhFUiBUT1JUSU9VUyBBQ1RJT04sIEFSSVNJTkcgT1VUIE9GIE9SIElOIENPTk5FQ1RJT04gV0lUSCBUSEUgVVNFIE9SDQogICAgUEVSRk9STUFOQ0UgT0YgVEhJUyBTT0ZUV0FSRS4NCiAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLw0KDQogICAgZnVuY3Rpb24gX19hd2FpdGVyKHRoaXNBcmcsIF9hcmd1bWVudHMsIFAsIGdlbmVyYXRvcikgew0KICAgICAgICBmdW5jdGlvbiBhZG9wdCh2YWx1ZSkgeyByZXR1cm4gdmFsdWUgaW5zdGFuY2VvZiBQID8gdmFsdWUgOiBuZXcgUChmdW5jdGlvbiAocmVzb2x2ZSkgeyByZXNvbHZlKHZhbHVlKTsgfSk7IH0NCiAgICAgICAgcmV0dXJuIG5ldyAoUCB8fCAoUCA9IFByb21pc2UpKShmdW5jdGlvbiAocmVzb2x2ZSwgcmVqZWN0KSB7DQogICAgICAgICAgICBmdW5jdGlvbiBmdWxmaWxsZWQodmFsdWUpIHsgdHJ5IHsgc3RlcChnZW5lcmF0b3IubmV4dCh2YWx1ZSkpOyB9IGNhdGNoIChlKSB7IHJlamVjdChlKTsgfSB9DQogICAgICAgICAgICBmdW5jdGlvbiByZWplY3RlZCh2YWx1ZSkgeyB0cnkgeyBzdGVwKGdlbmVyYXRvclsidGhyb3ciXSh2YWx1ZSkpOyB9IGNhdGNoIChlKSB7IHJlamVjdChlKTsgfSB9DQogICAgICAgICAgICBmdW5jdGlvbiBzdGVwKHJlc3VsdCkgeyByZXN1bHQuZG9uZSA/IHJlc29sdmUocmVzdWx0LnZhbHVlKSA6IGFkb3B0KHJlc3VsdC52YWx1ZSkudGhlbihmdWxmaWxsZWQsIHJlamVjdGVkKTsgfQ0KICAgICAgICAgICAgc3RlcCgoZ2VuZXJhdG9yID0gZ2VuZXJhdG9yLmFwcGx5KHRoaXNBcmcsIF9hcmd1bWVudHMgfHwgW10pKS5uZXh0KCkpOw0KICAgICAgICB9KTsNCiAgICB9CgogICAgLyoKICAgICAqIGJhc2U2NC1hcnJheWJ1ZmZlciAxLjAuMSA8aHR0cHM6Ly9naXRodWIuY29tL25pa2xhc3ZoL2Jhc2U2NC1hcnJheWJ1ZmZlcj4KICAgICAqIENvcHlyaWdodCAoYykgMjAyMSBOaWtsYXMgdm9uIEhlcnR6ZW4gPGh0dHBzOi8vaGVydHplbi5jb20+CiAgICAgKiBSZWxlYXNlZCB1bmRlciBNSVQgTGljZW5zZQogICAgICovCiAgICB2YXIgY2hhcnMgPSAnQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyc7CiAgICAvLyBVc2UgYSBsb29rdXAgdGFibGUgdG8gZmluZCB0aGUgaW5kZXguCiAgICB2YXIgbG9va3VwID0gdHlwZW9mIFVpbnQ4QXJyYXkgPT09ICd1bmRlZmluZWQnID8gW10gOiBuZXcgVWludDhBcnJheSgyNTYpOwogICAgZm9yICh2YXIgaSA9IDA7IGkgPCBjaGFycy5sZW5ndGg7IGkrKykgewogICAgICAgIGxvb2t1cFtjaGFycy5jaGFyQ29kZUF0KGkpXSA9IGk7CiAgICB9CiAgICB2YXIgZW5jb2RlID0gZnVuY3Rpb24gKGFycmF5YnVmZmVyKSB7CiAgICAgICAgdmFyIGJ5dGVzID0gbmV3IFVpbnQ4QXJyYXkoYXJyYXlidWZmZXIpLCBpLCBsZW4gPSBieXRlcy5sZW5ndGgsIGJhc2U2NCA9ICcnOwogICAgICAgIGZvciAoaSA9IDA7IGkgPCBsZW47IGkgKz0gMykgewogICAgICAgICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaV0gPj4gMl07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1soKGJ5dGVzW2ldICYgMykgPDwgNCkgfCAoYnl0ZXNbaSArIDFdID4+IDQpXTsKICAgICAgICAgICAgYmFzZTY0ICs9IGNoYXJzWygoYnl0ZXNbaSArIDFdICYgMTUpIDw8IDIpIHwgKGJ5dGVzW2kgKyAyXSA+PiA2KV07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1tieXRlc1tpICsgMl0gJiA2M107CiAgICAgICAgfQogICAgICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgICAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgJz0nOwogICAgICAgIH0KICAgICAgICBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgICAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgJz09JzsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIGJhc2U2NDsKICAgIH07CgogICAgY29uc3QgbGFzdEJsb2JNYXAgPSBuZXcgTWFwKCk7DQogICAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gbmV3IE1hcCgpOw0KICAgIGZ1bmN0aW9uIGdldFRyYW5zcGFyZW50QmxvYkZvcih3aWR0aCwgaGVpZ2h0LCBkYXRhVVJMT3B0aW9ucykgew0KICAgICAgICByZXR1cm4gX19hd2FpdGVyKHRoaXMsIHZvaWQgMCwgdm9pZCAwLCBmdW5jdGlvbiogKCkgew0KICAgICAgICAgICAgY29uc3QgaWQgPSBgJHt3aWR0aH0tJHtoZWlnaHR9YDsNCiAgICAgICAgICAgIGlmICgnT2Zmc2NyZWVuQ2FudmFzJyBpbiBnbG9iYWxUaGlzKSB7DQogICAgICAgICAgICAgICAgaWYgKHRyYW5zcGFyZW50QmxvYk1hcC5oYXMoaWQpKQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJhbnNwYXJlbnRCbG9iTWFwLmdldChpZCk7DQogICAgICAgICAgICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsNCiAgICAgICAgICAgICAgICBvZmZzY3JlZW4uZ2V0Q29udGV4dCgnMmQnKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0geWllbGQgYmxvYi5hcnJheUJ1ZmZlcigpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7DQogICAgICAgICAgICAgICAgdHJhbnNwYXJlbnRCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICByZXR1cm4gYmFzZTY0Ow0KICAgICAgICAgICAgfQ0KICAgICAgICAgICAgZWxzZSB7DQogICAgICAgICAgICAgICAgcmV0dXJuICcnOw0KICAgICAgICAgICAgfQ0KICAgICAgICB9KTsNCiAgICB9DQogICAgY29uc3Qgd29ya2VyID0gc2VsZjsNCiAgICB3b3JrZXIub25tZXNzYWdlID0gZnVuY3Rpb24gKGUpIHsNCiAgICAgICAgcmV0dXJuIF9fYXdhaXRlcih0aGlzLCB2b2lkIDAsIHZvaWQgMCwgZnVuY3Rpb24qICgpIHsNCiAgICAgICAgICAgIGlmICgnT2Zmc2NyZWVuQ2FudmFzJyBpbiBnbG9iYWxUaGlzKSB7DQogICAgICAgICAgICAgICAgY29uc3QgeyBpZCwgYml0bWFwLCB3aWR0aCwgaGVpZ2h0LCBkYXRhVVJMT3B0aW9ucyB9ID0gZS5kYXRhOw0KICAgICAgICAgICAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zKTsNCiAgICAgICAgICAgICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGN0eCA9IG9mZnNjcmVlbi5nZXRDb250ZXh0KCcyZCcpOw0KICAgICAgICAgICAgICAgIGN0eC5kcmF3SW1hZ2UoYml0bWFwLCAwLCAwKTsNCiAgICAgICAgICAgICAgICBiaXRtYXAuY2xvc2UoKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IHR5cGUgPSBibG9iLnR5cGU7DQogICAgICAgICAgICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSB5aWVsZCBibG9iLmFycmF5QnVmZmVyKCk7DQogICAgICAgICAgICAgICAgY29uc3QgYmFzZTY0ID0gZW5jb2RlKGFycmF5QnVmZmVyKTsNCiAgICAgICAgICAgICAgICBpZiAoIWxhc3RCbG9iTWFwLmhhcyhpZCkgJiYgKHlpZWxkIHRyYW5zcGFyZW50QmFzZTY0KSA9PT0gYmFzZTY0KSB7DQogICAgICAgICAgICAgICAgICAgIGxhc3RCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHdvcmtlci5wb3N0TWVzc2FnZSh7IGlkIH0pOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7DQogICAgICAgICAgICAgICAgd29ya2VyLnBvc3RNZXNzYWdlKHsNCiAgICAgICAgICAgICAgICAgICAgaWQsDQogICAgICAgICAgICAgICAgICAgIHR5cGUsDQogICAgICAgICAgICAgICAgICAgIGJhc2U2NCwNCiAgICAgICAgICAgICAgICAgICAgd2lkdGgsDQogICAgICAgICAgICAgICAgICAgIGhlaWdodCwNCiAgICAgICAgICAgICAgICB9KTsNCiAgICAgICAgICAgICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7DQogICAgICAgICAgICB9DQogICAgICAgICAgICBlbHNlIHsNCiAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsNCiAgICAgICAgICAgIH0NCiAgICAgICAgfSk7DQogICAgfTsKCn0pKCk7Cgo=",null,!1);var pn=class{constructor(t){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=(c,l)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(c)||this.pendingCanvasMutations.set(c,[]),this.pendingCanvasMutations.get(c).push(l)};let{sampling:n="all",win:r,blockClass:o,blockSelector:i,recordCanvas:a,dataURLOptions:s}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,a&&n==="all"&&this.initCanvasMutationObserver(r,o,i),a&&typeof n=="number"&&this.initCanvasFPSObserver(n,r,o,i,{dataURLOptions:s})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(t,n,r,o,i){let a=Er(n,r,o),s=new Map,c=new Vi;c.onmessage=p=>{let{id:g}=p.data;if(s.set(g,!1),!("base64"in p.data))return;let{base64:h,type:y,width:v,height:b}=p.data;this.mutationCb({id:g,type:Ne["2D"],commands:[{property:"clearRect",args:[0,0,v,b]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:h}],type:y}]},0,0]}]})};let l=1e3/t,u=0,d,f=()=>{let p=[];return n.document.querySelectorAll("canvas").forEach(g=>{te(g,r,o,!0)||p.push(g)}),p},m=p=>{if(u&&p-u<l){d=requestAnimationFrame(m);return}u=p,f().forEach(g=>Ni(this,void 0,void 0,function*(){var h;let y=this.mirror.getId(g);if(s.get(y))return;if(s.set(y,!0),["webgl","webgl2"].includes(g.__context)){let b=g.getContext(g.__context);((h=b?.getContextAttributes())===null||h===void 0?void 0:h.preserveDrawingBuffer)===!1&&b?.clear(b.COLOR_BUFFER_BIT)}let v=yield createImageBitmap(g);c.postMessage({id:y,bitmap:v,width:g.width,height:g.height,dataURLOptions:i.dataURLOptions},[v])})),d=requestAnimationFrame(m)};d=requestAnimationFrame(m),this.resetObservers=()=>{a(),cancelAnimationFrame(d)}}initCanvasMutationObserver(t,n,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let o=Er(t,n,r),i=Oi(this.processMutation.bind(this),t,n,r),a=Di(this.processMutation.bind(this),t,n,r,this.mirror);this.resetObservers=()=>{o(),i(),a()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let t=n=>{this.rafStamps.latestId=n,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,n)=>{let r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,n){if(this.frozen||this.locked)return;let r=this.pendingCanvasMutations.get(t);if(!r||n===-1)return;let o=r.map(a=>Li(a,["type"])),{type:i}=r[0];this.mutationCb({id:n,type:i,commands:o}),this.pendingCanvasMutations.delete(t)}};var hn=class{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new Qt,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,n){if(t.length===0)return;let r={id:n,styleIds:[]},o=[];for(let i of t){let a;if(this.styleMirror.has(i))a=this.styleMirror.getId(i);else{a=this.styleMirror.add(i);let s=Array.from(i.rules||CSSRule);o.push({styleId:a,rules:s.map((c,l)=>({rule:fr(c),index:l}))})}r.styleIds.push(a)}o.length>0&&(r.styles=o),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}};function oe(e){return Object.assign(Object.assign({},e),{timestamp:Date.now()})}var ne,gn,kr,yn=!1,we=fi();function Re(e={}){let{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="rr-block",blockSelector:i=null,ignoreClass:a="rr-ignore",maskTextClass:s="rr-mask",maskTextSelector:c=null,inlineStylesheet:l=!0,maskAllInputs:u,maskInputOptions:d,slimDOMOptions:f,maskInputFn:m,maskTextFn:p,hooks:g,packFn:h,sampling:y={},dataURLOptions:v={},mousemoveWait:b,recordCanvas:w=!1,recordCrossOriginIframes:S=!1,userTriggeredOnInput:I=!1,collectFonts:C=!1,inlineImages:E=!1,plugins:M,keepIframeSrcFn:O=()=>!1,ignoreCSSAttributes:D=new Set([])}=e,T=S?window.parent===window:!0,k=!1;if(!T)try{window.parent.document,k=!1}catch{k=!0}if(T&&!t)throw new Error("emit function is required");b!==void 0&&y.mousemove===void 0&&(y.mousemove=b),we.reset();let W=u===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:d!==void 0?d:{password:!0},G=f===!0||f==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:f==="all",headMetaDescKeywords:f==="all"}:f||{};gi();let re,L=0,$=N=>{for(let J of M||[])J.eventProcessor&&(N=J.eventProcessor(N));return h&&(N=h(N)),N};ne=(N,J)=>{var Z;if(!((Z=De[0])===null||Z===void 0)&&Z.isFrozen()&&N.type!==H.FullSnapshot&&!(N.type===H.IncrementalSnapshot&&N.data.source===P.Mutation)&&De.forEach(U=>U.unfreeze()),T)t?.($(N),J);else if(k){let U={type:"rrweb",event:$(N),isCheckout:J};window.parent.postMessage(U,"*")}if(N.type===H.FullSnapshot)re=N,L=0;else if(N.type===H.IncrementalSnapshot){if(N.data.source===P.Mutation&&N.data.isAttachIframe)return;L++;let U=r&&L>=r,ie=n&&N.timestamp-re.timestamp>n;(U||ie)&&gn(!0)}};let _=N=>{ne(oe({type:H.IncrementalSnapshot,data:Object.assign({source:P.Mutation},N)}))},F=N=>ne(oe({type:H.IncrementalSnapshot,data:Object.assign({source:P.Scroll},N)})),z=N=>ne(oe({type:H.IncrementalSnapshot,data:Object.assign({source:P.CanvasMutation},N)})),B=N=>ne(oe({type:H.IncrementalSnapshot,data:Object.assign({source:P.AdoptedStyleSheet},N)})),Y=new hn({mutationCb:_,adoptedStyleSheetCb:B}),j=new un({mirror:we,mutationCb:_,stylesheetManager:Y,recordCrossOriginIframes:S,wrappedEmit:ne});for(let N of M||[])N.getMirror&&N.getMirror({nodeMirror:we,crossOriginIframeMirror:j.crossOriginIframeMirror,crossOriginIframeStyleMirror:j.crossOriginIframeStyleMirror});kr=new pn({recordCanvas:w,mutationCb:z,win:window,blockClass:o,blockSelector:i,mirror:we,sampling:y.canvas,dataURLOptions:v});let ee=new dn({mutationCb:_,scrollCb:F,bypassOptions:{blockClass:o,blockSelector:i,maskTextClass:s,maskTextSelector:c,inlineStylesheet:l,maskInputOptions:W,dataURLOptions:v,maskTextFn:p,maskInputFn:m,recordCanvas:w,inlineImages:E,sampling:y,slimDOMOptions:G,iframeManager:j,stylesheetManager:Y,canvasManager:kr,keepIframeSrcFn:O},mirror:we});gn=(N=!1)=>{var J,Z,U,ie,V,se;ne(oe({type:H.Meta,data:{href:window.location.href,width:tn(),height:en()}}),N),Y.reset(),De.forEach(Q=>Q.lock());let We=mi(document,{mirror:we,blockClass:o,blockSelector:i,maskTextClass:s,maskTextSelector:c,inlineStylesheet:l,maskAllInputs:W,maskTextFn:p,slimDOM:G,dataURLOptions:v,recordCanvas:w,inlineImages:E,onSerialize:Q=>{rn(Q,we)&&j.addIframe(Q),on(Q,we)&&Y.trackLinkElement(Q),an(Q)&&ee.addShadowRoot(Q.shadowRoot,document)},onIframeLoad:(Q,me)=>{j.attachIframe(Q,me),ee.observeAttachShadow(Q)},onStylesheetLoad:(Q,me)=>{Y.attachLinkElement(Q,me)},keepIframeSrcFn:O});if(!We)return console.warn("Failed to snapshot the document");ne(oe({type:H.FullSnapshot,data:{node:We,initialOffset:{left:window.pageXOffset!==void 0?window.pageXOffset:document?.documentElement.scrollLeft||((Z=(J=document?.body)===null||J===void 0?void 0:J.parentElement)===null||Z===void 0?void 0:Z.scrollLeft)||((U=document?.body)===null||U===void 0?void 0:U.scrollLeft)||0,top:window.pageYOffset!==void 0?window.pageYOffset:document?.documentElement.scrollTop||((V=(ie=document?.body)===null||ie===void 0?void 0:ie.parentElement)===null||V===void 0?void 0:V.scrollTop)||((se=document?.body)===null||se===void 0?void 0:se.scrollTop)||0}}})),De.forEach(Q=>Q.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Y.adoptStyleSheets(document.adoptedStyleSheets,we.getId(document))};try{let N=[];N.push(ce("DOMContentLoaded",()=>{ne(oe({type:H.DomContentLoaded,data:{}}))}));let J=U=>{var ie;return Ti({mutationCb:_,mousemoveCb:(V,se)=>ne(oe({type:H.IncrementalSnapshot,data:{source:se,positions:V}})),mouseInteractionCb:V=>ne(oe({type:H.IncrementalSnapshot,data:Object.assign({source:P.MouseInteraction},V)})),scrollCb:F,viewportResizeCb:V=>ne(oe({type:H.IncrementalSnapshot,data:Object.assign({source:P.ViewportResize},V)})),inputCb:V=>ne(oe({type:H.IncrementalSnapshot,data:Object.assign({source:P.Input},V)})),mediaInteractionCb:V=>ne(oe({type:H.IncrementalSnapshot,data:Object.assign({source:P.MediaInteraction},V)})),styleSheetRuleCb:V=>ne(oe({type:H.IncrementalSnapshot,data:Object.assign({source:P.StyleSheetRule},V)})),styleDeclarationCb:V=>ne(oe({type:H.IncrementalSnapshot,data:Object.assign({source:P.StyleDeclaration},V)})),canvasMutationCb:z,fontCb:V=>ne(oe({type:H.IncrementalSnapshot,data:Object.assign({source:P.Font},V)})),selectionCb:V=>{ne(oe({type:H.IncrementalSnapshot,data:Object.assign({source:P.Selection},V)}))},blockClass:o,ignoreClass:a,maskTextClass:s,maskTextSelector:c,maskInputOptions:W,inlineStylesheet:l,sampling:y,recordCanvas:w,inlineImages:E,userTriggeredOnInput:I,collectFonts:C,doc:U,maskInputFn:m,maskTextFn:p,keepIframeSrcFn:O,blockSelector:i,slimDOMOptions:G,dataURLOptions:v,mirror:we,iframeManager:j,stylesheetManager:Y,shadowDomManager:ee,canvasManager:kr,ignoreCSSAttributes:D,plugins:((ie=M?.filter(V=>V.observer))===null||ie===void 0?void 0:ie.map(V=>({observer:V.observer,options:V.options,callback:se=>ne(oe({type:H.Plugin,data:{plugin:V.name,payload:se}}))})))||[]},g)};j.addLoadListener(U=>{N.push(J(U.contentDocument))});let Z=()=>{gn(),N.push(J(document)),yn=!0};return document.readyState==="interactive"||document.readyState==="complete"?Z():N.push(ce("load",()=>{ne(oe({type:H.Load,data:{}})),Z()},window)),()=>{N.forEach(U=>U()),yn=!1}}catch(N){console.warn(N)}}Re.addCustomEvent=(e,t)=>{if(!yn)throw new Error("please add custom event after start recording");ne(oe({type:H.Custom,data:{tag:e,payload:t}}))};Re.freezePage=()=>{De.forEach(e=>e.freeze())};Re.takeFullSnapshot=e=>{if(!yn)throw new Error("please take full snapshot after start recording");gn(e)};Re.mirror=we;function Lc(){try{if(typeof crypto<"u"&&typeof crypto.randomUUID=="function")return crypto.randomUUID()}catch{}return`run-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`}function Mr(){let e=x().sessionRecording;if(!e.active)try{let t=Re({emit:n=>e.buffer.push(n),collectFonts:!0,sampling:{mousemove:!1,mouseInteraction:!1}});t&&(e.active=!0,e.runId=Lc(),e.stopFn=t)}catch{}}function Tr(){let e=x().sessionRecording;return!e.active||!e.runId||e.buffer.length===0?null:{events:e.buffer.splice(0),runId:e.runId}}function Lr(){return x().sessionRecording.active}var Nc=["backgroundColor","color","fontFamily","fontSize","fontWeight","fontStyle","lineHeight","letterSpacing","textAlign","textDecoration","textTransform","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","margin","marginTop","marginRight","marginBottom","marginLeft","borderRadius","borderColor","borderWidth","borderStyle","boxShadow","opacity","width","height","display","flexDirection","justifyContent","alignItems","gap"];function Rc(e,t){let n=t??Nc;if(e.ref||e.text||e.role||e.label||e.selector){let{element:i,matched:a}=xe(e);return{...Gi(i,e.ref,n),matched:a}}let r=He(),o=[];for(let[i,a]of r)a.isConnected&&o.push(Gi(a,i,n));return o}function Gi(e,t,n){let r=window.getComputedStyle(e),o={};t&&(o.ref=t),o.tag=e.tagName.toLowerCase();let i=e.textContent?.trim();i&&(o.text=i.length>60?i.slice(0,60)+"\u2026":i);for(let a of n){let s=r.getPropertyValue(a.replace(/([A-Z])/g,"-$1").toLowerCase());s&&(o[a]=s)}return o}var zi=25,bn=25,lt="__mindstudio_pending_nav",qi=300,_r=1e4;function _c(e){try{let t=new URL(e,window.location.origin);return t.origin!==window.location.origin?!1:t.pathname===window.location.pathname&&t.search===window.location.search&&t.hash===window.location.hash}catch{return!1}}function Yi(e){try{let t=new URL(e,window.location.origin);return t.origin!==window.location.origin?!1:(_c(e)||(window.history.pushState(null,"",t.pathname+t.search+t.hash),window.dispatchEvent(new PopStateEvent("popstate"))),!0)}catch{return!1}}async function Nr(e=300,t=2e3){return new Promise(n=>{let r=Date.now()+t,o=Date.now(),i=tt(),a=window.scrollY,s=window.scrollX,c=document.body.scrollTop,l=document.documentElement.scrollTop,u=document.body.scrollHeight,d=document.body.scrollWidth,f=i.scrollTop,m=i.scrollLeft;function p(){if(Date.now()>r){n();return}let g=window.scrollY,h=window.scrollX,y=document.body.scrollTop,v=document.documentElement.scrollTop,b=document.body.scrollHeight,w=document.body.scrollWidth,S=i.scrollTop,I=i.scrollLeft;(g!==a||h!==s||y!==c||v!==l||b!==u||w!==d||S!==f||I!==m)&&(a=g,s=h,c=y,l=v,u=b,d=w,f=S,m=I,o=Date.now()),Date.now()-o>=e?n():requestAnimationFrame(p)}requestAnimationFrame(p)})}var Fc=150;async function Rr(e){let t=Oc(e),n=t.map(a=>({el:a,top:a.scrollTop,left:a.scrollLeft})),r=document.documentElement.style.scrollBehavior;document.documentElement.style.scrollBehavior="auto",e.scrollIntoView({block:"center",inline:"nearest",behavior:"instant"}),document.documentElement.style.scrollBehavior=r;let o=t.map(a=>({top:a.scrollTop,left:a.scrollLeft})),i=[];for(let a=0;a<t.length;a++)(n[a].top!==o[a].top||n[a].left!==o[a].left)&&i.push({el:t[a],fromTop:n[a].top,fromLeft:n[a].left,toTop:o[a].top,toLeft:o[a].left});if(i.length===0){await new Promise(a=>requestAnimationFrame(()=>a()));return}for(let a of i)a.el.scrollTop=a.fromTop,a.el.scrollLeft=a.fromLeft;await new Promise(a=>{let s=performance.now();function c(l){let u=l-s,d=Math.min(u/Fc,1),f=1-Math.pow(1-d,3);for(let m of i)m.el.scrollTop=m.fromTop+(m.toTop-m.fromTop)*f,m.el.scrollLeft=m.fromLeft+(m.toLeft-m.fromLeft)*f;d<1?requestAnimationFrame(c):a()}requestAnimationFrame(c)})}function Oc(e){let t=[],n=e.parentElement;for(;n;){let r=getComputedStyle(n),o=r.overflowY,i=r.overflowX;(o==="auto"||o==="scroll"||i==="auto"||i==="scroll")&&t.push(n),n=n.parentElement}return t.push(document.scrollingElement||document.documentElement),t}var $c=new Set(["click","type","select"]);function Dc(e){return e.some(t=>$c.has(t.command))}async function At(e,t){let n=Date.now(),r=[],o=[],i="",a=!1,s=new Set(["click","type","select"]),c=t.some(u=>s.has(u.command));c&&(vt(!0),lr()),jn(),Dc(t)&&Mr();try{for(let u=0;u<t.length;u++){let d=t[u],f=d.command;try{if(u>0&&await le(zi+Math.random()*bn-bn/2),f==="navigate"){let p=d.url;if(!p)throw new Error('navigate command requires a "url" field');if(Yi(p)){r.push({index:u,command:f,result:"ok"}),await le(qi);continue}let g=t.slice(u+1);if(g.length>0)try{sessionStorage.setItem(lt,JSON.stringify({id:e,startTime:n,completedSteps:r,remainingSteps:g,stepOffset:u+1}))}catch{}r.push({index:u,command:f,result:"ok"}),a=!0,window.location.href=p,await new Promise((h,y)=>{setTimeout(()=>y(new Error("Navigation did not complete within timeout")),_r)})}if(f==="reload"){let p=t.slice(u+1);if(p.length>0)try{sessionStorage.setItem(lt,JSON.stringify({id:e,startTime:n,completedSteps:r,remainingSteps:p,stepOffset:u+1}))}catch{}r.push({index:u,command:f,result:"ok"}),a=!0,window.location.reload(),await new Promise((g,h)=>{setTimeout(()=>h(new Error("Reload did not complete within timeout")),_r)})}let m=await Xi(d);r.push({index:u,command:f,...m})}catch(m){r.push({index:u,command:f,error:m instanceof Error?m.message:String(m)});break}}try{i=await Ue()}catch{}}finally{o=Zn(),c&&(vt(!1),Lr()?cr():Xt())}let l=Tr();return{id:e,steps:r,snapshot:i,logs:o,duration:Date.now()-n,...l?{events:l.events,runId:l.runId}:{}}}function ji(){try{let e=sessionStorage.getItem(lt);if(!e)return null;let t=JSON.parse(e);return typeof t?.id=="string"?t.id:null}catch{return null}}async function Zi(){let e=null;try{let a=sessionStorage.getItem(lt);if(!a)return null;sessionStorage.removeItem(lt),e=JSON.parse(a)}catch{return null}if(!e)return null;let t=[...e.completedSteps],n=[],r="",o=e.remainingSteps.some(a=>a.command==="click"||a.command==="type"||a.command==="select");o&&(vt(!0),lr(),Mr()),jn();try{for(let a=0;a<e.remainingSteps.length;a++){let s=e.remainingSteps[a],c=s.command,l=e.stepOffset+a;try{if(a>0&&await le(zi+Math.random()*bn-bn/2),c==="navigate"){let d=s.url;if(!d)throw new Error('navigate command requires a "url" field');if(Yi(d)){t.push({index:l,command:c,result:"ok"}),await le(qi);continue}let f=e.remainingSteps.slice(a+1);if(f.length>0)try{sessionStorage.setItem(lt,JSON.stringify({id:e.id,startTime:e.startTime,completedSteps:t,remainingSteps:f,stepOffset:l+1}))}catch{}t.push({index:l,command:c,result:"ok"}),window.location.href=d,await new Promise((m,p)=>{setTimeout(()=>p(new Error("Navigation did not complete within timeout")),_r)})}let u=await Xi(s);t.push({index:l,command:c,...u})}catch(u){t.push({index:l,command:c,error:u instanceof Error?u.message:String(u)});break}}try{r=await Ue()}catch{}}finally{n=Zn(),o&&(vt(!1),Lr()?cr():Xt())}let i=Tr();return{id:e.id,steps:t,snapshot:r,logs:n,duration:Date.now()-e.startTime,...i?{events:i.events,runId:i.runId}:{}}}async function Xi(e){switch(e.command){case"snapshot":return{result:await Ue()};case"click":{let{element:t,matched:n}=xe(e);return await Rr(t),await Zt(t),await ii(),er(t),await Nr(),await le(250),{result:"ok",matched:n}}case"type":{let{element:t,matched:n}=xe(e),r=e.text;if(!r&&r!=="")throw new Error('type command requires a "text" field');return await Rr(t),await Zt(t),await Do(t,r,{clear:!!e.clear}),await Nr(),{result:"ok",matched:n}}case"select":{let{element:t,matched:n}=xe(e),r=e.option;if(!r)throw new Error('select command requires an "option" field');await Rr(t),await Zt(t);let o=Wo(t,r);return await Nr(),{result:`selected "${o}"`,matched:n}}case"wait":{let{matched:t,elapsed:n}=await Po(e);return{result:"ok",matched:t,elapsed:n}}case"styles":{let t=e.properties;return{result:Rc(e,t)}}case"evaluate":{let t=e.script;if(!t)throw new Error('evaluate command requires a "script" field');return{result:await Bo(t)}}default:throw new Error(`Unknown command: ${e.command}`)}}var Pc="/__mindstudio_dev__/ws",Wc=1e3,Bc=1e4;function Ji(){let e=x().ws;e.ws||(wo(vn),window.addEventListener("beforeunload",()=>{e.closing=!0,e.ws&&e.ws.close()}),Qi())}function vn(){let{ws:e}=x().ws;return e&&e.readyState===WebSocket.OPEN?e:null}function Hc(){return`${location.protocol==="https:"?"wss:":"ws:"}//${location.host}${Pc}`}function Or(){return window.parent!==window?"iframe":"standalone"}function $r(){try{return location.search.includes("ms_sandbox=1")?(sessionStorage.setItem("__ms_sandbox","1"),!0):sessionStorage.getItem("__ms_sandbox")==="1"}catch{return location.search.includes("ms_sandbox=1")}}function Qi(){let e=x().ws;if(!e.closing){try{e.ws=new WebSocket(Hc())}catch{Ki();return}e.ws.onopen=()=>{try{let t=(()=>{try{return sessionStorage.getItem("__ms_mirror")==="1"}catch{return!1}})();e.ws.send(JSON.stringify({type:"hello",mode:Or(),url:location.href,viewport:{w:window.innerWidth,h:window.innerHeight},mirror:t,sandbox:$r(),resumingCommandId:ji()}))}catch{e.ws?.close()}},e.ws.onmessage=t=>{let n;try{n=JSON.parse(t.data)}catch{return}switch(n.type){case"ack":e.clientId=n.clientId,e.reconnectDelay=Wc,Vc();break;case"command":Uc(n.id,n.steps);break;case"broadcast":Gc(n.action,n.payload);break}},e.ws.onclose=()=>{e.ws=null,e.clientId=null,e.closing||Ki()},e.ws.onerror=()=>{}}}function Ki(){let e=x().ws;e.closing||(setTimeout(()=>Qi(),e.reconnectDelay),e.reconnectDelay=Math.min(e.reconnectDelay*2,Bc))}async function Uc(e,t){let n=x().ws;if(n.busy){wn({id:e,steps:[],snapshot:"",logs:[],duration:0,error:"Browser agent is busy"});return}n.busy=!0,Fr("command-started",{id:e,steps:t.map(r=>r.command)});try{let r=await At(e,t);wn(r),Fr("command-completed",{id:e,success:!0})}catch{wn({id:e,steps:[],snapshot:"",logs:[],duration:0}),Fr("command-completed",{id:e,success:!1})}finally{x().ws.busy=!1}}function wn(e){try{let t=vn();t&&t.send(JSON.stringify({type:"result",...e}))}catch{}}async function Vc(){let e=await Zi();e&&wn(e)}function Fr(e,t){window.parent!==window&&window.parent.postMessage({channel:"mindstudio-browser-agent",command:e,...t},"*")}function Gc(e,t){e==="reload"&&(document.cookie="__ms_auth=; Max-Age=0; Path=/; Secure; SameSite=None",location.href="/")}var ct="#DD2590",ea="-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",zc=200,ta=`
|
|
75
|
-
display: block;
|
|
76
|
-
box-sizing: border-box;
|
|
77
|
-
width: ${zc}px;
|
|
78
|
-
background-color: ${ct};
|
|
79
|
-
border-radius: 19px 120px 120px;
|
|
80
|
-
font-weight: bold;
|
|
81
|
-
padding: 8px 18px 10px 18px;
|
|
82
|
-
font-family: ${ea};
|
|
83
|
-
font-size: 14px;
|
|
84
|
-
line-height: 1.4;
|
|
85
|
-
color: white;
|
|
86
|
-
outline: none;
|
|
87
|
-
overflow-wrap: break-word;
|
|
88
|
-
white-space: pre-wrap;
|
|
89
|
-
transition: box-shadow 0.15s;
|
|
90
|
-
-webkit-text-fill-color: white;
|
|
91
|
-
`.trim(),kt={inactive:"0 2px 6px rgba(0, 0, 0, 0.15)",selected:"rgba(221, 37, 144, 0.45) 0px 2px 12px, white 0px 0px 0px 3px",editing:"rgba(221, 37, 144, 0.45) 0px 2px 12px, white 0px 0px 0px 3px"},qc=`
|
|
92
|
-
position: absolute;
|
|
93
|
-
top: -8px;
|
|
94
|
-
right: -4px;
|
|
95
|
-
width: 22px;
|
|
96
|
-
height: 22px;
|
|
97
|
-
background-color: white;
|
|
98
|
-
color: ${ct};
|
|
99
|
-
-webkit-text-fill-color: ${ct};
|
|
100
|
-
border: 2px solid ${ct};
|
|
101
|
-
border-radius: 50%;
|
|
102
|
-
font-size: 12px;
|
|
103
|
-
line-height: 16px;
|
|
104
|
-
text-align: center;
|
|
105
|
-
cursor: pointer;
|
|
106
|
-
pointer-events: auto;
|
|
107
|
-
display: none;
|
|
108
|
-
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
|
|
109
|
-
font-family: ${ea};
|
|
110
|
-
font-weight: bold;
|
|
111
|
-
`.trim();function na(){let e=document.createElement("div");return e.dataset.deleteBtn="true",e.innerHTML="\xD7",e.style.cssText=qc,e}function ra(e,t){let n=`note-${++x().noteElement.counter}`,r=document.createElement("div");r.id=n,r.dataset.noteId=n,r.style.cssText=`
|
|
112
|
-
position: absolute;
|
|
113
|
-
left: ${e}px;
|
|
114
|
-
top: ${t}px;
|
|
115
|
-
pointer-events: auto;
|
|
116
|
-
z-index: 1;
|
|
117
|
-
`;let o=document.createElement("div");o.style.cssText=`
|
|
118
|
-
width: 14px;
|
|
119
|
-
height: 14px;
|
|
120
|
-
background-color: ${ct};
|
|
121
|
-
border: 2px solid white;
|
|
122
|
-
border-radius: 50%;
|
|
123
|
-
box-shadow: rgba(0, 0, 0, 0.3) 0px 1px 4px;
|
|
124
|
-
position: absolute;
|
|
125
|
-
left: -16px;
|
|
126
|
-
top: -14px;
|
|
127
|
-
pointer-events: none;
|
|
128
|
-
z-index: 2;
|
|
129
|
-
`;let i=document.createElement("div");i.style.cssText="position: relative;";let a=document.createElement("div");a.dataset.bubble="true",a.style.cssText=`
|
|
130
|
-
${ta}
|
|
131
|
-
box-shadow: ${kt.inactive};
|
|
132
|
-
cursor: grab;
|
|
133
|
-
`;let s=na();return i.appendChild(a),i.appendChild(s),r.appendChild(o),r.appendChild(i),{id:n,type:"pin",x:e,y:t,element:r,bubble:a,deleteBtn:s,state:"inactive"}}function oa(e,t,n,r){let o=`note-${++x().noteElement.counter}`,i=document.createElement("div");i.id=o,i.dataset.noteId=o,i.style.cssText=`
|
|
134
|
-
position: absolute;
|
|
135
|
-
left: ${e}px;
|
|
136
|
-
top: ${t}px;
|
|
137
|
-
pointer-events: auto;
|
|
138
|
-
z-index: 1;
|
|
139
|
-
`;let a=document.createElement("div");a.style.cssText=`
|
|
140
|
-
width: ${n}px;
|
|
141
|
-
height: ${r}px;
|
|
142
|
-
border: 4px dashed ${ct};
|
|
143
|
-
border-radius: 12px;
|
|
144
|
-
pointer-events: none;
|
|
145
|
-
`;let l=t+r+8+60>window.innerHeight,u=document.createElement("div");u.style.cssText=`
|
|
146
|
-
position: absolute;
|
|
147
|
-
left: 0;
|
|
148
|
-
${l?`bottom: ${r+8}px`:`top: ${r+8}px`};
|
|
149
|
-
`;let d=document.createElement("div");d.dataset.bubble="true",d.style.cssText=`
|
|
150
|
-
${ta}
|
|
151
|
-
box-shadow: ${kt.inactive};
|
|
152
|
-
cursor: grab;
|
|
153
|
-
`;let f=na();return u.appendChild(d),u.appendChild(f),i.appendChild(a),i.appendChild(u),{id:o,type:"area",x:e,y:t,width:n,height:r,element:i,bubble:d,deleteBtn:f,state:"inactive"}}function ia(e){e.state="selected",e.bubble.contentEditable="false",e.bubble.style.boxShadow=kt.selected,e.bubble.style.cursor="grab",e.deleteBtn.style.display="block"}function Cn(e){e.state="editing",e.bubble.contentEditable="true",e.bubble.style.boxShadow=kt.editing,e.bubble.style.cursor="text",e.deleteBtn.style.display="block",e.bubble.focus();let t=window.getSelection();t&&(t.selectAllChildren(e.bubble),t.collapseToEnd())}function ut(e){return e.bubble.textContent?.trim()||""?(e.state="inactive",e.bubble.contentEditable="false",e.bubble.style.boxShadow=kt.inactive,e.bubble.style.cursor="grab",e.deleteBtn.style.display="none",!0):!1}var Dr="#DD2590",Yc="__mindstudio-notes-host",jc=5,Zc=`<svg width="25" height="26" viewBox="0 0 31 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
154
|
-
<g filter="url(#filter0_d_notes)">
|
|
155
|
-
<path d="M12.5448 26L6.72762 5.59339L26 14.8132L17.1816 17.9377L12.5448 26Z" fill="${Dr}"/>
|
|
156
|
-
<path d="M6.9457 5.14539L26.2178 14.3651L27.2985 14.8826L26.1697 15.2813L17.5259 18.3444L12.9812 26.2464L12.3881 27.2792L12.0614 26.1349L6.24434 5.72851L5.94119 4.66488L6.9457 5.14539Z" stroke="${Dr}"/>
|
|
157
|
-
</g>
|
|
158
|
-
<defs>
|
|
159
|
-
<filter id="filter0_d_notes" x="3.15491" y="2.73625" width="27.442" height="28.8217" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
160
|
-
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
161
|
-
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
|
162
|
-
<feOffset dy="1"/>
|
|
163
|
-
<feGaussianBlur stdDeviation="1"/>
|
|
164
|
-
<feComposite in2="hardAlpha" operator="out"/>
|
|
165
|
-
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.08 0"/>
|
|
166
|
-
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow"/>
|
|
167
|
-
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow" result="shape"/>
|
|
168
|
-
</filter>
|
|
169
|
-
</defs>
|
|
170
|
-
</svg>`,Sn=null;function sa(){let e=x().noteLayer;if(e.overlay)return;Sn=document.documentElement.style.overflow,document.documentElement.style.overflow="hidden";let t=document.createElement("div");t.id=Yc,t.style.cssText="position: fixed; inset: 0; z-index: 2147483646; pointer-events: none;";let n=t.attachShadow({mode:"open"}),r=document.createElement("style");r.textContent=`
|
|
171
|
-
.overlay {
|
|
172
|
-
position: fixed;
|
|
173
|
-
inset: 0;
|
|
174
|
-
z-index: 0;
|
|
175
|
-
cursor: none;
|
|
176
|
-
touch-action: none;
|
|
177
|
-
pointer-events: auto;
|
|
178
|
-
}
|
|
179
|
-
.cursor {
|
|
180
|
-
position: fixed;
|
|
181
|
-
top: 0;
|
|
182
|
-
left: 0;
|
|
183
|
-
z-index: 1;
|
|
184
|
-
pointer-events: none;
|
|
185
|
-
will-change: left, top;
|
|
186
|
-
}
|
|
187
|
-
.drag-preview {
|
|
188
|
-
position: fixed;
|
|
189
|
-
border: 4px dashed ${Dr};
|
|
190
|
-
border-radius: 12px;
|
|
191
|
-
pointer-events: none;
|
|
192
|
-
z-index: 2;
|
|
193
|
-
}
|
|
194
|
-
`,n.appendChild(r);let o=document.createElement("div");o.className="overlay";let i=document.createElement("div");i.className="cursor",i.innerHTML=Zc,n.appendChild(o),n.appendChild(i),e.host=t,e.overlay=o,e.cursorEl=i,o.addEventListener("pointerdown",da),o.addEventListener("pointermove",ua),document.addEventListener("pointermove",fa,{capture:!0}),document.addEventListener("pointerup",ma,{capture:!0}),document.addEventListener("pointercancel",pa,{capture:!0}),document.addEventListener("keydown",Pr),document.addEventListener("keydown",dt,{capture:!0}),document.addEventListener("keypress",dt,{capture:!0}),document.addEventListener("keyup",dt,{capture:!0}),document.body.appendChild(t)}function la(){let e=x().noteLayer;document.removeEventListener("pointermove",fa,{capture:!0}),document.removeEventListener("pointerup",ma,{capture:!0}),document.removeEventListener("pointercancel",pa,{capture:!0}),document.removeEventListener("keydown",Pr),document.removeEventListener("keydown",dt,{capture:!0}),document.removeEventListener("keypress",dt,{capture:!0}),document.removeEventListener("keyup",dt,{capture:!0}),e.overlay&&(e.overlay.removeEventListener("pointerdown",da),e.overlay.removeEventListener("pointermove",ua),e.overlay=null),e.cursorEl&&(e.cursorEl=null),e.host&&(e.host.remove(),e.host=null),Sn!==null&&(document.documentElement.style.overflow=Sn,Sn=null),e.notes=[],e.currentNote=null,ft()}function ca(){let e=x().noteLayer;e.cursorEl&&(e.cursorEl.style.display="none"),e.movingNote=null,e.consumedByDeactivation=!1,ft()}function ua(e){let t=x().noteLayer;if(!t.cursorEl||!t.overlay)return;t.cursorEl.style.left=`${e.clientX}px`,t.cursorEl.style.top=`${e.clientY}px`,ha(e.target)?(t.cursorEl.style.display="none",t.overlay.style.cursor=""):(t.cursorEl.style.display="",t.overlay.style.cursor="none")}function da(e){let t=x().noteLayer;if(!t.overlay)return;let n=e.target;if(n.dataset?.deleteBtn==="true"||n.closest("[data-delete-btn]")){let o=n.closest("[data-note-id]");if(o){let i=t.notes.find(a=>a.id===o.id);if(i){Xe(i),e.preventDefault(),e.stopPropagation();return}}}t.overlay.setPointerCapture(e.pointerId);let r=ha(e.target);if(r){if(r.state==="editing")return;if(r.state==="selected"){let o=e.target;if(o.dataset?.bubble==="true"||o.closest("[data-bubble]")){Cn(r),t.currentNote=r,e.preventDefault();return}aa(r,e),e.preventDefault();return}t.currentNote&&t.currentNote!==r&&(ut(t.currentNote)||Xe(t.currentNote)),ia(r),t.currentNote=r,aa(r,e),e.preventDefault();return}if(t.currentNote&&(t.currentNote.state==="editing"||t.currentNote.state==="selected")){ut(t.currentNote)||Xe(t.currentNote),t.currentNote=null,t.consumedByDeactivation=!0,e.preventDefault();return}t.pointerDown=!0,t.startX=e.clientX,t.startY=e.clientY,t.didDrag=!1,t.consumedByDeactivation=!1,e.preventDefault()}function fa(e){let t=x().noteLayer;if(t.movingNote){let o=e.clientX-t.moveOffsetX,i=e.clientY-t.moveOffsetY;t.movingNote.x=o,t.movingNote.y=i,t.movingNote.element.style.left=`${o}px`,t.movingNote.element.style.top=`${i}px`;return}if(!t.pointerDown||!t.overlay)return;let n=e.clientX-t.startX,r=e.clientY-t.startY;Math.sqrt(n*n+r*r)>jc&&(t.didDrag=!0,t.dragPreview||(t.dragPreview=document.createElement("div"),t.dragPreview.className="drag-preview",t.overlay.appendChild(t.dragPreview)),t.dragPreview.style.left=`${Math.min(t.startX,e.clientX)}px`,t.dragPreview.style.top=`${Math.min(t.startY,e.clientY)}px`,t.dragPreview.style.width=`${Math.abs(n)}px`,t.dragPreview.style.height=`${Math.abs(r)}px`)}function ma(e){let t=x().noteLayer;if(t.overlay)try{t.overlay.releasePointerCapture(e.pointerId)}catch{}if(t.movingNote){t.movingNote=null;return}if(t.consumedByDeactivation){t.consumedByDeactivation=!1,ft();return}if(!t.pointerDown||!t.overlay){ft();return}if(t.didDrag){t.dragPreview&&(t.dragPreview.remove(),t.dragPreview=null);let n=Math.min(t.startX,e.clientX),r=Math.min(t.startY,e.clientY),o=Math.abs(e.clientX-t.startX),i=Math.abs(e.clientY-t.startY);if(o>10&&i>10){let a=oa(n,r,o,i);t.overlay.appendChild(a.element),t.notes.push(a),Cn(a),t.currentNote=a}}else{let n=ra(e.clientX,e.clientY);t.overlay.appendChild(n.element),t.notes.push(n),Cn(n),t.currentNote=n}ft()}function pa(){let e=x().noteLayer;e.dragPreview&&(e.dragPreview.remove(),e.dragPreview=null),e.movingNote=null,ft()}function Pr(e){let t=x().noteLayer;if(t.currentNote){if(e.key==="Enter"&&!e.shiftKey&&t.currentNote.state==="editing"){ut(t.currentNote)||Xe(t.currentNote),t.currentNote=null,e.preventDefault();return}if(e.key==="Escape"){t.currentNote.state==="editing"?(ut(t.currentNote)||Xe(t.currentNote),t.currentNote=null):t.currentNote.state==="selected"&&(ut(t.currentNote),t.currentNote=null),e.preventDefault();return}if(t.currentNote.state==="selected"&&(e.key==="Delete"||e.key==="Backspace")){Xe(t.currentNote),t.currentNote=null,e.preventDefault();return}t.currentNote.state==="editing"&&(e.key==="Backspace"||e.key==="Delete")&&t.currentNote.bubble.textContent?.trim()===""&&(Xe(t.currentNote),t.currentNote=null,e.preventDefault())}}function dt(e){!x().notesMode.active||!e.composedPath().some(n=>n instanceof HTMLElement&&n.dataset?.bubble==="true"&&n.isContentEditable)||(e.type==="keydown"&&Pr(e),e.stopImmediatePropagation())}function aa(e,t){let n=x().noteLayer;n.movingNote=e,n.moveOffsetX=t.clientX-e.x,n.moveOffsetY=t.clientY-e.y}function ha(e){let t=x().noteLayer;for(let n of t.notes)if(n.element.contains(e))return n;return null}function Xe(e){let t=x().noteLayer;e.element.remove(),t.notes=t.notes.filter(n=>n.id!==e.id),t.currentNote===e&&(t.currentNote=null)}function ft(){let e=x().noteLayer;e.pointerDown=!1,e.startX=0,e.startY=0,e.didDrag=!1,e.dragPreview&&(e.dragPreview.remove(),e.dragPreview=null)}var Xc=Object.defineProperty,fe=(e,t)=>()=>(e&&(t=e(e=0)),t),Ft=(e,t)=>{for(var n in t)Xc(e,n,{get:t[n],enumerable:!0})};function Kc(e){if(e===!0)return"soft";if(e===!1)return"disabled";if(typeof e=="string"){let t=e.toLowerCase().trim();if(t==="auto")return"auto";if(t==="full")return"full";if(t==="soft"||t==="disabled")return t}return"soft"}function Jc(e="soft"){switch(A.session.__counterEpoch=(A.session.__counterEpoch||0)+1,e){case"auto":{A.session.styleMap=new Map,A.session.nodeMap=new Map;return}case"soft":{A.session.styleMap=new Map,A.session.nodeMap=new Map,A.session.styleCache=new WeakMap;return}case"full":return;case"disabled":{A.session.styleMap=new Map,A.session.nodeMap=new Map,A.session.styleCache=new WeakMap,A.computedStyle=new WeakMap,A.baseStyle=new ge(50),A.defaultStyle=new ge(30),A.image=new ge(100),A.background=new ge(100),A.resource=new ge(150),A.font=new Set;return}default:{A.session.styleMap=new Map,A.session.nodeMap=new Map,A.session.styleCache=new WeakMap;return}}}var ge,A,Ce=fe(()=>{ge=class extends Map{constructor(e=100,...t){super(...t),this._maxSize=e}set(e,t){if(this.size>=this._maxSize&&!this.has(e)){let n=this.keys().next().value;n!==void 0&&this.delete(n)}return super.set(e,t)}},A={image:new ge(100),background:new ge(100),resource:new ge(150),defaultStyle:new ge(30),baseStyle:new ge(50),computedStyle:new WeakMap,measureHints:new WeakMap,font:new Set,session:{styleMap:new Map,styleCache:new WeakMap,nodeMap:new Map}}});function Qr(e){let t=e.match(/url\((['"]?)(.*?)(\1)\)/);if(!t)return null;let n=t[2].trim();return n.startsWith("#")?null:n}function Qc(e){if(!e||e==="none")return"";let t=e.replace(/translate[XY]?\([^)]*\)/g,"");return t=t.replace(/matrix\(([^)]+)\)/g,(n,r)=>{let o=r.split(",").map(i=>i.trim());return o.length!==6?`matrix(${r})`:(o[4]="0",o[5]="0",`matrix(${o.join(", ")})`)}),t=t.replace(/matrix3d\(([^)]+)\)/g,(n,r)=>{let o=r.split(",").map(i=>i.trim());return o.length!==16?`matrix3d(${r})`:(o[12]="0",o[13]="0",`matrix3d(${o.join(", ")})`)}),t.trim().replace(/\s{2,}/g," ")}function Ln(e){if(/%[0-9A-Fa-f]{2}/.test(e))return e;try{return encodeURI(e)}catch{return e}}function eu(e,t){if(!e||/^(data|blob|about|#)/i.test(e.trim()))return e;try{let n=t||typeof document<"u"&&(document.baseURI||document.location?.href)||"http://localhost/";return new URL(e,n).href}catch{return e}}var Rn=fe(()=>{});function tu(e="[snapDOM]",{ttlMs:t=5*6e4,maxEntries:n=12}={}){let r=new Map,o=0;function i(a,s,c){if(o>=n)return;let l=Date.now();(r.get(s)||0)>l||(r.set(s,l+t),o++,a==="warn"&&console&&console.warn?console.warn(`${e} ${c}`):console&&console.error&&console.error(`${e} ${c}`))}return{warnOnce(a,s){i("warn",a,s)},errorOnce(a,s){i("error",a,s)},reset(){r.clear(),o=0}}}function nu(e){return/^data:|^blob:|^about:blank$/i.test(e)}function ru(e,t){try{let n=typeof location<"u"&&location.href?location.href:"http://localhost/",r=t.includes("{url}")?t.split("{url}")[0]:t,o=new URL(r||".",n),i=new URL(e,n);if(i.origin===o.origin)return!0;let a=i.searchParams;if(a&&(a.has("url")||a.has("target")))return!0}catch{}return!1}function ou(e,t){if(!t||nu(e)||ru(e,t))return!1;try{let n=typeof location<"u"&&location.href?location.href:"http://localhost/",r=new URL(e,n);return typeof location<"u"?r.origin!==location.origin:!0}catch{return!!t}}function iu(e,t){if(!t)return e;if(t.includes("{url}"))return t.replace("{urlRaw}",Ln(e)).replace("{url}",encodeURIComponent(e));if(/[?&]url=?$/.test(t))return`${t}${encodeURIComponent(e)}`;if(t.endsWith("?"))return`${t}url=${encodeURIComponent(e)}`;if(t.endsWith("/"))return`${t}${Ln(e)}`;let n=t.includes("?")?"&":"?";return`${t}${n}url=${encodeURIComponent(e)}`}function ga(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>t(String(r.result||"")),r.onerror=()=>n(new Error("read_failed")),r.readAsDataURL(e)})}function au(e,t){return[t.as||"blob",t.timeout??3e3,t.useProxy||"",t.errorTTL??8e3,e].join("|")}async function ve(e,t={}){let n=t.as??"blob",r=t.timeout??3e3,o=t.useProxy||"",i=t.errorTTL??8e3,a=t.headers||{},s=!!t.silent;if(/^data:/i.test(e))try{if(n==="text")return{ok:!0,data:String(e),status:200,url:e,fromCache:!1};if(n==="dataURL")return{ok:!0,data:String(e),status:200,url:e,fromCache:!1,mime:String(e).slice(5).split(";")[0]||""};let[,h="",y=""]=String(e).match(/^data:([^,]*),(.*)$/)||[],v=/;base64/i.test(h)?atob(y):decodeURIComponent(y),b=new Uint8Array([...v].map(S=>S.charCodeAt(0))),w=new Blob([b],{type:(h||"").split(";")[0]||""});return{ok:!0,data:w,status:200,url:e,fromCache:!1,mime:w.type||""}}catch{return{ok:!1,data:null,status:0,url:e,fromCache:!1,reason:"special_url_error"}}if(/^blob:/i.test(e))try{let h=await fetch(e);if(!h.ok)return{ok:!1,data:null,status:h.status,url:e,fromCache:!1,reason:"http_error"};let y=await h.blob(),v=y.type||h.headers.get("content-type")||"";return n==="dataURL"?{ok:!0,data:await ga(y),status:h.status,url:e,fromCache:!1,mime:v}:n==="text"?{ok:!0,data:await y.text(),status:h.status,url:e,fromCache:!1,mime:v}:{ok:!0,data:y,status:h.status,url:e,fromCache:!1,mime:v}}catch{return{ok:!1,data:null,status:0,url:e,fromCache:!1,reason:"network"}}if(/^about:blank$/i.test(e))return n==="dataURL"?{ok:!0,data:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==",status:200,url:e,fromCache:!1,mime:"image/png"}:{ok:!0,data:n==="text"?"":new Blob([]),status:200,url:e,fromCache:!1};let c=au(e,{as:n,timeout:r,useProxy:o,errorTTL:i}),l=Tt.get(c);if(l&&l.until>Date.now())return{...l.result,fromCache:!0};l&&Tt.delete(c);let u=In.get(c);if(u)return u;let d=ou(e,o)?iu(e,o):e,f=t.credentials;if(!f)try{let h=typeof location<"u"&&location.href?location.href:"http://localhost/",y=new URL(e,h);f=typeof location<"u"&&y.origin===location.origin?"include":"omit"}catch{f="omit"}let m=new AbortController,p=setTimeout(()=>m.abort("timeout"),r),g=(async()=>{try{let h=await fetch(d,{signal:m.signal,credentials:f,headers:a});if(!h.ok){let b={ok:!1,data:null,status:h.status,url:d,fromCache:!1,reason:"http_error"};if(i>0&&Tt.set(c,{until:Date.now()+i,result:b}),!s){let w=`${h.status} ${h.statusText||""}`.trim();Hr.warnOnce(`http:${h.status}:${n}:${new URL(e,location?.href??"http://localhost/").origin}`,`HTTP error ${w} while fetching ${n} ${e}`)}return t.onError&&t.onError(b),b}if(n==="text")return{ok:!0,data:await h.text(),status:h.status,url:d,fromCache:!1};let y=await h.blob(),v=y.type||h.headers.get("content-type")||"";return n==="dataURL"?{ok:!0,data:await ga(y),status:h.status,url:d,fromCache:!1,mime:v}:{ok:!0,data:y,status:h.status,url:d,fromCache:!1,mime:v}}catch(h){let y=h&&typeof h=="object"&&"name"in h&&h.name==="AbortError"?String(h.message||"").includes("timeout")?"timeout":"abort":"network",v={ok:!1,data:null,status:0,url:d,fromCache:!1,reason:y};if(!/^blob:/i.test(e)&&i>0&&Tt.set(c,{until:Date.now()+i,result:v}),!s){let b=`${y}:${n}:${new URL(e,location?.href??"http://localhost/").origin}`,w=y==="timeout"?`Timeout after ${r}ms. Consider increasing timeout or using a proxy for ${e}`:y==="abort"?`Request aborted while fetching ${n} ${e}`:`Network/CORS issue while fetching ${n} ${e}. A proxy may be required`;Hr.errorOnce(b,w)}return t.onError&&t.onError(v),v}finally{clearTimeout(p),In.delete(c)}})();return In.set(c,g),g}var Hr,In,Tt,yt=fe(()=>{Rn(),Hr=tu("[snapDOM]",{ttlMs:3*6e4,maxEntries:10}),In=new Map,Tt=new Map});async function Ba(e,t={}){if(/^((repeating-)?(linear|radial|conic)-gradient)\(/i.test(e)||e.trim()==="none")return e;let n=Qr(e);if(!n)return e;let r=eu(n),o=Ln(r);if(A.background.has(o)){let i=A.background.get(o);return i?`url("${i}")`:"none"}try{let i=await ve(o,{as:"dataURL",useProxy:t.useProxy});return i.ok?(A.background.set(o,i.data),`url("${i.data}")`):(A.background.set(o,null),"none")}catch{return A.background.set(o,null),"none"}}var su=fe(()=>{Ce(),Rn(),yt()});function lu(e){if(e=String(e).toLowerCase(),to.has(e)){let i={};return A.defaultStyle.set(e,i),i}if(A.defaultStyle.has(e))return A.defaultStyle.get(e);let t=document.getElementById("snapdom-sandbox");t||(t=document.createElement("div"),t.id="snapdom-sandbox",t.setAttribute("data-snapdom-sandbox","true"),t.setAttribute("aria-hidden","true"),t.style.position="absolute",t.style.left="-9999px",t.style.top="-9999px",t.style.width="0px",t.style.height="0px",t.style.overflow="hidden",document.body.appendChild(t));let n=document.createElement(e);n.style.all="initial",t.appendChild(n);let r=getComputedStyle(n),o={};for(let i of r){if(eo(i))continue;let a=r.getPropertyValue(i);o[i]=a}return t.removeChild(n),A.defaultStyle.set(e,o),o}function eo(e){let t=String(e).toLowerCase();return!!(Ga.has(t)||Va.test(t)||Ua.test(t))}function Ur(e,t){if(t=String(t||"").toLowerCase(),to.has(t))return"";let n=[],r=lu(t),o=(e.display||"").toLowerCase()==="inline"||new Set(["span","small","em","strong","b","i","u","s","code","cite","mark","sub","sup"]).has(t);for(let[i,a]of Object.entries(e)){if(eo(i)||o&&(i==="width"||i==="min-width"||i==="max-width"))continue;let s=r[i];a&&a!==s&&n.push(`${i}:${a}`)}return n.sort(),n.join(";")}function cu(e){let t=new Set;return e.nodeType!==Node.ELEMENT_NODE&&e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?[]:(e.tagName&&t.add(e.tagName.toLowerCase()),typeof e.querySelectorAll=="function"&&e.querySelectorAll("*").forEach(n=>t.add(n.tagName.toLowerCase())),Array.from(t))}function uu(e){let t=new Map;for(let r of e){let o=A.defaultStyle.get(r);if(!o)continue;let i=Object.entries(o).map(([a,s])=>`${a}:${s};`).sort().join("");i&&(t.has(i)||t.set(i,[]),t.get(i).push(r))}let n="";for(let[r,o]of t.entries())n+=`${o.join(",")} { ${r} }
|
|
195
|
-
`;return n}function du(e){let t=Array.from(new Set(e.values())).filter(Boolean).sort(),n=new Map,r=1;for(let o of t)n.set(o,`c${r++}`);return n}function fu(e){try{let t=e?.ownerDocument;if(!t)return typeof window<"u"?window:null;let n=t.defaultView;if(n&&typeof n.getComputedStyle=="function")return n;if(typeof window<"u"&&window.frames)for(let r=0;r<window.frames.length;r++)try{if(window.frames[r]?.document===t)return window.frames[r]}catch{}}catch{}return typeof window<"u"?window:null}function Fe(e,t=null){let n=()=>{let i={length:0,getPropertyValue:()=>"",item:()=>""};return i[Symbol.iterator]=function*(){},i};if(!(e instanceof Element)){let i=typeof window<"u"?window:null;if(i&&typeof i.getComputedStyle=="function")try{return i.getComputedStyle(e,t)||n()}catch{return n()}return n()}let r=A.computedStyle.get(e);r||(r=new Map,A.computedStyle.set(e,r));let o=r.get(t);if(!o){let i=fu(e),a=null;try{a=i&&typeof i.getComputedStyle=="function"?i.getComputedStyle(e,t):null}catch{}if(!a&&typeof window<"u"&&typeof window.getComputedStyle=="function")try{e.ownerDocument===document&&(a=window.getComputedStyle(e,t))}catch{}o=a||n(),r.set(t,o)}return o}function ya(e){let t={};for(let n of e)t[n]=e.getPropertyValue(n);return t}function Vr(e){let t=[],n=0,r=0;for(let o=0;o<e.length;o++){let i=e[o];i==="("&&n++,i===")"&&n--,i===","&&n===0&&(t.push(e.slice(r,o).trim()),r=o+1)}return t.push(e.slice(r).trim()),t}var Ha,to,mu,Ua,Va,Ga,za=fe(()=>{Ce(),Ha=new Set(["meta","script","noscript","title","link","template"]),to=new Set(["meta","link","style","title","noscript","script","template","g","defs","use","marker","mask","clipPath","pattern","path","polygon","polyline","line","circle","ellipse","rect","filter","lineargradient","radialgradient","stop"]),mu=["div","span","p","a","img","ul","li","button","input","select","textarea","label","section","article","header","footer","nav","main","aside","h1","h2","h3","h4","h5","h6","table","thead","tbody","tr","td","th"],Ua=/(?:^|-)(animation|transition)(?:-|$)/i,Va=/^(--.+|view-timeline|scroll-timeline|animation-trigger|offset-|position-try|app-region|interactivity|overlay|view-transition|-webkit-locale|-webkit-user-(?:drag|modify)|-webkit-tap-highlight-color|-webkit-text-security)$/i,Ga=new Set(["cursor","pointer-events","touch-action","user-select","print-color-adjust","speak","reading-flow","reading-order","anchor-name","anchor-scope","container-name","container-type","timeline-scope","zoom"])});function ht(e,{fast:t=!1}={}){if(t)return e();"requestIdleCallback"in window?requestIdleCallback(e,{timeout:50}):setTimeout(e,1)}function pu(){if(typeof navigator>"u")return!1;if(navigator.userAgentData)return navigator.userAgentData.platform==="iOS";let e=navigator.userAgent||"",t=/iPhone|iPad|iPod/.test(e),n=navigator.maxTouchPoints>2&&/Macintosh/.test(e);return t||n}function Je(){if(typeof navigator>"u")return!1;let e=navigator.userAgent||"",t=e.toLowerCase(),n=t.includes("safari")&&!t.includes("chrome")&&!t.includes("crios")&&!t.includes("fxios")&&!t.includes("android"),r=/applewebkit/i.test(e),o=/mobile/i.test(e),i=!/safari/i.test(e),a=r&&o&&i,s=/(micromessenger|wxwork|wecom|windowswechat|macwechat)/i.test(e),c=/(baiduboxapp|baidubrowser|baidusearch|baiduboxlite)/i.test(t),l=/ipad|iphone|ipod/.test(t)&&r;return n||a||s||c||l}function hu(){if(typeof navigator>"u")return!1;let e=(navigator.userAgent||"").toLowerCase();return e.includes("firefox")||e.includes("fxios")}var Ot=fe(()=>{});function K(e,t,n){let r=e&&typeof e=="object"&&(e.options||e);r&&r.debug&&(n!==void 0?console.warn("[snapdom]",t,n):console.warn("[snapdom]",t))}var qa=fe(()=>{}),Ee=fe(()=>{su(),za(),Ot(),Rn(),qa()}),Ya={};Ft(Ya,{toCanvas:()=>_n});function gu(e){return typeof e=="string"&&/^data:image\/svg\+xml/i.test(e)}function yu(e){let t=e.indexOf(",");return t>=0?decodeURIComponent(e.slice(t+1)):""}function bu(e){return`data:image/svg+xml;charset=utf-8,${encodeURIComponent(e)}`}function wu(e){let t=[],n="",r=0;for(let o=0;o<e.length;o++){let i=e[o];i==="("&&r++,i===")"&&(r=Math.max(0,r-1)),i===";"&&r===0?(t.push(n),n=""):n+=i}return n.trim()&&t.push(n),t.map(o=>o.trim()).filter(Boolean)}function vu(e){let t=[],n="",r=0;for(let i=0;i<e.length;i++){let a=e[i];a==="("&&r++,a===")"&&(r=Math.max(0,r-1)),a===","&&r===0?(t.push(n.trim()),n=""):n+=a}n.trim()&&t.push(n.trim());let o=[];for(let i of t){if(/\binset\b/i.test(i))continue;let a=i.match(/-?\d+(?:\.\d+)?px/gi)||[],[s="0px",c="0px",l="0px"]=a,u=i.replace(/-?\d+(?:\.\d+)?px/gi,"").replace(/\binset\b/ig,"").trim().replace(/\s{2,}/g," "),d=!!u&&u!==",";o.push(`drop-shadow(${s} ${c} ${l}${d?` ${u}`:""})`)}return o.join(" ")}function ja(e){let t=wu(e),n=null,r=null,o=null,i=[];for(let s of t){let c=s.indexOf(":");if(c<0)continue;let l=s.slice(0,c).trim().toLowerCase(),u=s.slice(c+1).trim();l==="box-shadow"?o=u:l==="filter"?n=u:l==="-webkit-filter"?r=u:i.push([l,u])}if(o){let s=vu(o);s&&(n=n?`${n} ${s}`:s,r=r?`${r} ${s}`:s)}let a=[...i];return n&&a.push(["filter",n]),r&&a.push(["-webkit-filter",r]),a.map(([s,c])=>`${s}:${c}`).join(";")}function Cu(e){return e.replace(/([^{}]+)\{([^}]*)\}/g,(t,n,r)=>`${n}{${ja(r)}}`)}function Su(e){return e=e.replace(/<style[^>]*>([\s\S]*?)<\/style>/gi,(t,n)=>t.replace(n,Cu(n))),e=e.replace(/style=(['"])([\s\S]*?)\1/gi,(t,n,r)=>`style=${n}${ja(r)}${n}`),e}function xu(e){if(!Je()||!gu(e))return e;try{let t=yu(e),n=Su(t);return bu(n)}catch{return e}}async function _n(e,t){let{width:n,height:r,scale:o=1,dpr:i=1,meta:a={},backgroundColor:s}=t;e=xu(e);let c=new Image;c.loading="eager",c.decoding="sync",c.crossOrigin="anonymous",c.src=e,await c.decode();let l=c.naturalWidth,u=c.naturalHeight,d=Number.isFinite(a.w0)?a.w0:l,f=Number.isFinite(a.h0)?a.h0:u,m,p,g=Number.isFinite(n),h=Number.isFinite(r);if(g&&h)m=Math.max(1,n),p=Math.max(1,r);else if(g){let b=n/Math.max(1,d);m=n,p=f*b}else if(h){let b=r/Math.max(1,f);p=r,m=d*b}else m=l,p=u;m=m*o,p=p*o;let y=document.createElement("canvas");y.width=m*i,y.height=p*i,y.style.width=`${m}px`,y.style.height=`${p}px`;let v=y.getContext("2d");return i!==1&&v.scale(i,i),s&&(v.save(),v.fillStyle=s,v.fillRect(0,0,m,p),v.restore()),v.drawImage(c,0,0,m,p),y}var Fn=fe(()=>{Ot()}),En={};Ft(En,{rasterize:()=>Za});async function Za(e,t){let n=await _n(e,t),r=new Image;return r.src=n.toDataURL(`image/${t.format}`,t.quality),await r.decode(),r.style.width=`${n.width/t.dpr}px`,r.style.height=`${n.height/t.dpr}px`,r}var An=fe(()=>{Fn()}),Gr={};Ft(Gr,{toImg:()=>ba,toSvg:()=>ba});async function ba(e,t){let{scale:n=1,width:r,height:o,meta:i={}}=t,a=Number.isFinite(r),s=Number.isFinite(o),c=Number.isFinite(n)&&n!==1||a||s;if(Je()&&c)return await Za(e,{...t,format:"png",quality:1,meta:i});let l=new Image;if(l.decoding="sync",l.loading="eager",l.src=e,await l.decode(),a&&s)l.style.width=`${r}px`,l.style.height=`${o}px`;else if(a){let u=Number.isFinite(i.w0)?i.w0:l.naturalWidth,d=Number.isFinite(i.h0)?i.h0:l.naturalHeight,f=r/Math.max(1,u);l.style.width=`${r}px`,l.style.height=`${Math.round(d*f)}px`}else if(s){let u=Number.isFinite(i.w0)?i.w0:l.naturalWidth,d=Number.isFinite(i.h0)?i.h0:l.naturalHeight,f=o/Math.max(1,d);l.style.height=`${o}px`,l.style.width=`${Math.round(u*f)}px`}else{let u=Math.round(l.naturalWidth*n),d=Math.round(l.naturalHeight*n);if(l.style.width=`${u}px`,l.style.height=`${d}px`,typeof e=="string"&&e.startsWith("data:image/svg+xml"))try{let f=decodeURIComponent(e.split(",")[1]).replace(/width="[^"]*"/,`width="${u}"`).replace(/height="[^"]*"/,`height="${d}"`);e=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(f)}`,l.src=e}catch(f){K(t,"SVG width/height patch in toImg failed",f)}}return l}var wa=fe(()=>{Ee(),An()}),Xa={};Ft(Xa,{toBlob:()=>Ka});async function Ka(e,t){let n=t.type;if(n==="svg"){let o=decodeURIComponent(e.split(",")[1]);return new Blob([o],{type:"image/svg+xml"})}let r=await _n(e,t);return new Promise(o=>r.toBlob(i=>o(i),`image/${n}`,t.quality))}var Ja=fe(()=>{Fn()}),Qa={};Ft(Qa,{download:()=>Iu});async function va(e,t){let n=new File([e],t,{type:e.type});if(!navigator.canShare?.({files:[n]}))return!1;try{await navigator.share({files:[n],title:t})}catch(r){if(r.name!=="AbortError")return!1}return!0}async function Iu(e,t){let n=new Set(["png","jpeg","jpg","webp","svg"]),r=(t?.type||"").toLowerCase(),o=n.has(r)?r:"",i=(t?.format||o||"").toLowerCase(),a=i==="jpg"?"jpeg":i||"png",s=t?.filename||`snapdom.${a}`,c={...t||{},format:a,type:a};c.dpr=1;let l=pu();if(a==="svg"){let f=await Ka(e,{...c,type:"svg"});if(l&&await va(f,s))return;let m=URL.createObjectURL(f),p=document.createElement("a");p.href=m,p.download=s,document.body.appendChild(p),p.click(),URL.revokeObjectURL(m),p.remove();return}let u=await _n(e,c);if(l){let f=`image/${a}`,m=await new Promise(p=>u.toBlob(p,f,t?.quality));if(m&&await va(m,s))return}let d=document.createElement("a");d.href=u.toDataURL(`image/${a}`,t?.quality),d.download=s,document.body.appendChild(d),d.click(),d.remove()}var Eu=fe(()=>{Ja(),Fn(),Ot()});Ee();Ee();Ce();var Ca=new WeakMap,Rt=new Map,Au=2e3,zr=0;function Lt(){zr++,Rt.size>Au&&Rt.clear()}var Sa=!1;function ku(e=document.documentElement){if(!Sa){Sa=!0;try{new MutationObserver(()=>Lt()).observe(e,{subtree:!0,childList:!0,characterData:!0,attributes:!0})}catch{}try{new MutationObserver(()=>Lt()).observe(document.head,{subtree:!0,childList:!0,characterData:!0,attributes:!0})}catch{}try{let t=document.fonts;t&&(t.addEventListener?.("loadingdone",Lt),t.ready?.then(()=>Lt()).catch(()=>{}))}catch{}}}function Mu(e,t={}){let n={},r=e.getPropertyValue("visibility"),o=t.excludeStyleProps;for(let d=0;d<e.length;d++){let f=e[d];if(eo(f)||o&&(o instanceof RegExp&&o.test(f)||typeof o=="function"&&o(f)))continue;let m=e.getPropertyValue(f);(f==="background-image"||f==="content")&&m.includes("url(")&&!m.includes("data:")&&(m="none"),n[f]=m}let i=["text-decoration-line","text-decoration-color","text-decoration-style","text-decoration-thickness","text-underline-offset","text-decoration-skip-ink"];for(let d of i)if(!n[d])try{let f=e.getPropertyValue(d);f&&(n[d]=f)}catch{}let a=["-webkit-text-stroke","-webkit-text-stroke-width","-webkit-text-stroke-color","paint-order"];for(let d of a)if(!n[d])try{let f=e.getPropertyValue(d);f&&(n[d]=f)}catch{}if(t.embedFonts){let d=["font-feature-settings","font-variation-settings","font-kerning","font-variant","font-variant-ligatures","font-optical-sizing"];for(let f of d)if(!n[f])try{let m=e.getPropertyValue(f);m&&(n[f]=m)}catch{}}r==="hidden"&&(n.opacity="0");try{(n["content-visibility"]||e.getPropertyValue("content-visibility"))==="hidden"&&(n.visibility="hidden")}catch{}let s=parseFloat(e.getPropertyValue("border-top-width")||0)||0,c=parseFloat(e.getPropertyValue("border-right-width")||0)||0,l=parseFloat(e.getPropertyValue("border-bottom-width")||0)||0,u=parseFloat(e.getPropertyValue("border-left-width")||0)||0;if(s===0&&c===0&&l===0&&u===0){let d=(e.getPropertyValue("border-image-source")||"").trim(),f=d&&d!=="none",m=["border","border-top","border-right","border-bottom","border-left","border-width","border-style","border-color","border-top-width","border-top-style","border-top-color","border-right-width","border-right-style","border-right-color","border-bottom-width","border-bottom-style","border-bottom-color","border-left-width","border-left-style","border-left-color","border-block","border-block-width","border-block-style","border-block-color","border-inline","border-inline-width","border-inline-style","border-inline-color"];for(let p of m)delete n[p];f||(n.border="none")}return n}var xa=new WeakMap;function Tu(e){let t=xa.get(e);return t||(t=Object.entries(e).sort((n,r)=>n[0]<r[0]?-1:n[0]>r[0]?1:0).map(([n,r])=>`${n}:${r}`).join(";"),xa.set(e,t),t)}function Lu(e,t=null,n={}){let r=Ca.get(e);if(r&&r.epoch===zr)return r.snapshot;let o=t||getComputedStyle(e),i=Mu(o,n);return Du(e,o,i),Ca.set(e,{epoch:zr,snapshot:i}),i}function Nu(e,t){return e&&e.session&&e.persist?e:e&&(e.styleMap||e.styleCache||e.nodeMap)?{session:e,persist:{snapshotKeyCache:Rt,defaultStyle:A.defaultStyle,baseStyle:A.baseStyle,image:A.image,resource:A.resource,background:A.background,font:A.font},options:t||{}}:{session:A.session,persist:{snapshotKeyCache:Rt,defaultStyle:A.defaultStyle,baseStyle:A.baseStyle,image:A.image,resource:A.resource,background:A.background,font:A.font},options:e||t||{}}}function Ru(e,t,n){if(!(!e.style||e.style.length===0))for(let r=0;r<e.style.length;r++){let o=e.style[r],i=n.getPropertyValue(o);i&&t.style.setProperty(o,i)}}async function Ke(e,t,n,r){if(e.tagName==="STYLE")return;let o=Nu(n,r),i=o.options&&o.options.cache||"auto";i!=="disabled"&&ku(document.documentElement),i==="disabled"&&!o.session.__bumpedForDisabled&&(Lt(),Rt.clear(),o.session.__bumpedForDisabled=!0);let{session:a,persist:s}=o;if(!a.styleCache.has(e)){let f=null;try{f=getComputedStyle(e)}catch{}a.styleCache.set(e,f||getComputedStyle(document.documentElement))}let c=a.styleCache.get(e);e.getAttribute?.("style")&&Ru(e,t,c);let l=Lu(e,c,o.options),u=Tu(l),d=s.snapshotKeyCache.get(u);if(!d){let f=e.tagName?.toLowerCase()||"div";d=Ur(l,f),s.snapshotKeyCache.set(u,d)}a.styleMap.set(t,d)}function _u(e){return e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement||e instanceof HTMLIFrameElement||e instanceof SVGElement||e instanceof HTMLObjectElement||e instanceof HTMLEmbedElement}function Fu(e){return e.backgroundImage&&e.backgroundImage!=="none"||e.backgroundColor&&e.backgroundColor!=="rgba(0, 0, 0, 0)"&&e.backgroundColor!=="transparent"||(parseFloat(e.borderTopWidth)||0)>0||(parseFloat(e.borderBottomWidth)||0)>0||(parseFloat(e.paddingTop)||0)>0||(parseFloat(e.paddingBottom)||0)>0?!0:(e.overflowBlock||e.overflowY||"visible")!=="visible"}function Ou(e){let t=e.parentElement;if(!t)return!1;let n=getComputedStyle(t).display||"";return n.includes("flex")||n.includes("grid")}function $u(e,t){if(e.textContent&&/\S/.test(e.textContent))return!0;let n=e.firstElementChild,r=e.lastElementChild;if(n&&n.tagName==="BR"||r&&r.tagName==="BR")return!0;let o=e.scrollHeight;if(o===0)return!1;let i=parseFloat(t.paddingTop)||0,a=parseFloat(t.paddingBottom)||0;return o>i+a}function Du(e,t,n){if(e instanceof HTMLElement&&e.style&&e.style.height)return;let r=e.tagName&&e.tagName.toLowerCase();if(!r||!["div","section","article","main","aside","header","footer","nav"].includes(r))return;let o=parseFloat(t.height);if(Number.isFinite(o)&&e.scrollHeight>0&&Math.abs(o-e.scrollHeight)>2||t.aspectRatio&&t.aspectRatio!=="none"&&t.aspectRatio!=="auto")return;let i=t.display||"";if(i.includes("flex")||i.includes("grid")||_u(e))return;let a=t.position;if(a==="absolute"||a==="fixed"||a==="sticky"||t.transform!=="none"||Fu(t)||Ou(e))return;let s=t.overflowX||t.overflow||"visible",c=t.overflowY||t.overflow||"visible";if(s!=="visible"||c!=="visible")return;let l=t.clip;l&&l!=="auto"&&l!=="rect(auto, auto, auto, auto)"||t.visibility==="hidden"||t.opacity==="0"||$u(e,t)&&(delete n.height,delete n["block-size"])}za();var es=["fill","stroke","color","background-color","stop-color"],Ia=new Map;function Pu(e,t){let n=t+"::"+e.toLowerCase(),r=Ia.get(n);if(r)return r;let o=document,i=t==="http://www.w3.org/2000/svg"?o.createElementNS(t,e):o.createElement(e),a=o.createElement("div");a.style.cssText="position:absolute;left:-99999px;top:-99999px;contain:strict;display:block;",a.appendChild(i),o.documentElement.appendChild(a);let s=getComputedStyle(i),c={};for(let l of es)c[l]=s.getPropertyValue(l)||"";return a.remove(),Ia.set(n,c),c}function Wu(e,t){if(!(e instanceof Element)||!(t instanceof Element))return;let n=e.getAttribute?.("style"),r=!!(n&&n.includes("var("));if(!r&&e.attributes?.length){let i=e.attributes;for(let a=0;a<i.length;a++){let s=i[a];if(s&&typeof s.value=="string"&&s.value.includes("var(")){r=!0;break}}}let o=null;if(r)try{o=getComputedStyle(e)}catch{}if(r){let i=e.style;if(i&&i.length){let a=new Set;for(let s=0;s<i.length;s++){let c=i[s];if(a.has(c))continue;a.add(c);let l=i.getPropertyValue(c);if(!l||!l.includes("var("))continue;let u=o&&o.getPropertyValue(c);if(u)try{t.style.setProperty(c,u.trim(),i.getPropertyPriority(c))}catch{}}}}if(r&&e.attributes?.length){let i=e.attributes;for(let a=0;a<i.length;a++){let s=i[a];if(!s||typeof s.value!="string"||!s.value.includes("var("))continue;let c=s.name,l=o&&o.getPropertyValue(c);if(l)try{t.style.setProperty(c,l.trim())}catch{}}}if(!r){if(!o)try{o=getComputedStyle(e)}catch{o=null}if(!o)return;let i=e.namespaceURI||"html",a=Pu(e.tagName,i);for(let s of es){let c=o.getPropertyValue(s)||"",l=a[s]||"";if(c&&c!==l)try{t.style.setProperty(s,c.trim())}catch{}}}}Ee();Ee();Ce();yt();function Wr(e,t,n){return Promise.all(e.map(r=>new Promise(o=>{function i(){ht(a=>{!(a&&typeof a.timeRemaining=="function")||a.timeRemaining()>0?t(r,o):i()},{fast:n})}i()})))}function Bu(e){return e=e.trim(),!e||/:not\(\s*\[data-sd-slotted\]\s*\)\s*$/.test(e)?e:`${e}:not([data-sd-slotted])`}function Hu(e,t,n=!0){return e.split(",").map(r=>r.trim()).filter(Boolean).map(r=>{if(r.startsWith(":where(")||r.startsWith("@"))return r;let o=n?Bu(r):r;return`:where(${t} ${o})`}).join(", ")}function Uu(e,t){return e?(e=e.replace(/:host\(([^)]+)\)/g,(n,r)=>`:where(${t}:is(${r.trim()}))`),e=e.replace(/:host\b/g,`:where(${t})`),e=e.replace(/:host-context\(([^)]+)\)/g,(n,r)=>`:where(:where(${r.trim()}) ${t})`),e=e.replace(/::slotted\(([^)]+)\)/g,(n,r)=>`:where(${t} ${r.trim()})`),e=e.replace(/(^|})(\s*)([^@}{]+){/g,(n,r,o,i)=>{let a=Hu(i,t,!0);return`${r}${o}${a}{`}),e):""}function Vu(e){return e.shadowScopeSeq=(e.shadowScopeSeq||0)+1,`s${e.shadowScopeSeq}`}function Gu(e){let t="";try{e.querySelectorAll("style").forEach(r=>{t+=(r.textContent||"")+`
|
|
72
|
+
or you can use record.mirror to access the mirror instance during recording.`,zi={map:{},getId(){return console.error(dt),-1},getNode(){return console.error(dt),null},removeNodeFromMap(){console.error(dt)},has(){return console.error(dt),!1},reset(){console.error(dt)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(zi=new Proxy(zi,{get(e,t,n){return t==="map"&&console.error(dt),Reflect.get(e,t,n)}}));function ft(e,t,n={}){let r=null,o=0;return function(...i){let a=Date.now();!o&&n.leading===!1&&(o=a);let s=t-(a-o),l=this;s<=0||s>t?(r&&(clearTimeout(r),r=null),o=a,e.apply(l,i)):!r&&n.trailing!==!1&&(r=setTimeout(()=>{o=n.leading===!1?0:Date.now(),r=null,e.apply(l,i)},s))}}function et(e,t,n,r,o=window){let i=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(a){setTimeout(()=>{n.set.call(this,a)},0),i&&i.set&&i.set.call(this,a)}}),()=>et(e,t,i||{},!0)}function Ae(e,t,n){try{if(!(t in e))return()=>{};let r=e[t],o=n(r);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}function tn(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function nn(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function ae(e,t,n,r){if(!e)return!1;let o=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(!o)return!1;if(typeof t=="string"){if(o.classList.contains(t)||r&&o.closest("."+t)!==null)return!0}else if(vt(o,t,r))return!0;return!!(n&&(e.matches(n)||r&&o.closest(n)!==null))}function Gi(e,t){return t.getId(e)!==-1}function rn(e,t){return t.getId(e)===Je}function kr(e,t){if(Qe(e))return!1;let n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?kr(e.parentNode,t):!0:!0}function Tr(e){return!!e.changedTouches}function qi(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let n=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}function on(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function an(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function sn(e){return!!e?.shadowRoot}var en=class{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){var n;return(n=this.styleIDMap.get(t))!==null&&n!==void 0?n:-1}has(t){return this.styleIDMap.has(t)}add(t,n){if(this.has(t))return this.getId(t);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};var q=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(q||{}),V=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e))(V||{}),ln=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(ln||{}),$e=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))($e||{});function ji(e){return"__ln"in e}var Rr=class{constructor(){this.length=0,this.head=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<t;r++)n=n?.next||null;return n}addNode(t){let n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&ji(t.previousSibling)){let r=t.previousSibling.__ln.next;n.next=r,n.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(t.nextSibling&&ji(t.nextSibling)&&t.nextSibling.__ln.previous){let r=t.nextSibling.__ln.previous;n.previous=r,n.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;this.length++}removeNode(t){let n=t.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next&&(n.next.previous=n.previous)):(this.head=n.next,this.head&&(this.head.previous=null)),t.__ln&&delete t.__ln,this.length--)}},Yi=(e,t)=>`${e}@${t}`,cn=class{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;let t=[],n=new Rr,r=s=>{let l=s,c=Je;for(;c===Je;)l=l&&l.nextSibling,c=l&&this.mirror.getId(l);return c},o=s=>{var l,c,u,d;let f=null;((c=(l=s.getRootNode)===null||l===void 0?void 0:l.call(s))===null||c===void 0?void 0:c.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&s.getRootNode().host&&(f=s.getRootNode().host);let m=f;for(;((d=(u=m?.getRootNode)===null||u===void 0?void 0:u.call(m))===null||d===void 0?void 0:d.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&m.getRootNode().host;)m=m.getRootNode().host;let p=!this.doc.contains(s)&&(!m||!this.doc.contains(m));if(!s.parentNode||p)return;let h=Qe(s.parentNode)?this.mirror.getId(f):this.mirror.getId(s.parentNode),y=r(s);if(h===-1||y===-1)return n.addNode(s);let g=Ke(s,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:w=>{on(w,this.mirror)&&this.iframeManager.addIframe(w),an(w,this.mirror)&&this.stylesheetManager.trackLinkElement(w),sn(s)&&this.shadowDomManager.addShadowRoot(s.shadowRoot,this.doc)},onIframeLoad:(w,v)=>{this.iframeManager.attachIframe(w,v),this.shadowDomManager.observeAttachShadow(w)},onStylesheetLoad:(w,v)=>{this.stylesheetManager.attachLinkElement(w,v)}});g&&t.push({parentId:h,nextId:y,node:g})};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let s of Array.from(this.movedSet.values()))Zi(this.removes,s,this.mirror)&&!this.movedSet.has(s.parentNode)||o(s);for(let s of Array.from(this.addedSet.values()))!Ki(this.droppedSet,s)&&!Zi(this.removes,s,this.mirror)||Ki(this.movedSet,s)?o(s):this.droppedSet.add(s);let i=null;for(;n.length;){let s=null;if(i){let l=this.mirror.getId(i.value.parentNode),c=r(i.value);l!==-1&&c!==-1&&(s=i)}if(!s)for(let l=n.length-1;l>=0;l--){let c=n.get(l);if(c){let u=this.mirror.getId(c.value.parentNode);if(r(c.value)===-1)continue;if(u!==-1){s=c;break}else{let f=c.value;if(f.parentNode&&f.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let m=f.parentNode.host;if(this.mirror.getId(m)!==-1){s=c;break}}}}}if(!s){for(;n.head;)n.removeNode(n.head.value);break}i=s.previous,n.removeNode(s.value),o(s.value)}let a={texts:this.texts.map(s=>({id:this.mirror.getId(s.node),value:s.value})).filter(s=>this.mirror.has(s.id)),attributes:this.attributes.map(s=>({id:this.mirror.getId(s.node),attributes:s.attributes})).filter(s=>this.mirror.has(s.id)),removes:this.removes,adds:t};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.adds.length||(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(a))},this.processMutation=t=>{if(!rn(t.target,this.mirror))switch(t.type){case"characterData":{let n=t.target.textContent;!ae(t.target,this.blockClass,this.blockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:Er(t.target,this.maskTextClass,this.maskTextSelector)&&n?this.maskTextFn?this.maskTextFn(n):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{let n=t.target,r=t.target.getAttribute(t.attributeName);if(t.attributeName==="value"&&(r=St({maskInputOptions:this.maskInputOptions,tagName:t.target.tagName,type:t.target.getAttribute("type"),value:r,maskInputFn:this.maskInputFn})),ae(t.target,this.blockClass,this.blockSelector,!1)||r===t.oldValue)return;let o=this.attributes.find(i=>i.node===t.target);if(n.tagName==="IFRAME"&&t.attributeName==="src"&&!this.keepIframeSrcFn(r))if(!n.contentDocument)t.attributeName="rr_src";else return;if(o||(o={node:t.target,attributes:{}},this.attributes.push(o)),t.attributeName==="style"){let i=this.doc.createElement("span");t.oldValue&&i.setAttribute("style",t.oldValue),(o.attributes.style===void 0||o.attributes.style===null)&&(o.attributes.style={});let a=o.attributes.style;for(let s of Array.from(n.style)){let l=n.style.getPropertyValue(s),c=n.style.getPropertyPriority(s);(l!==i.style.getPropertyValue(s)||c!==i.style.getPropertyPriority(s))&&(c===""?a[s]=l:a[s]=[l,c])}for(let s of Array.from(i.style))n.style.getPropertyValue(s)===""&&(a[s]=!1)}else o.attributes[t.attributeName]=Mr(this.doc,n.tagName,t.attributeName,r);break}case"childList":{if(ae(t.target,this.blockClass,this.blockSelector,!0))return;t.addedNodes.forEach(n=>this.genAdds(n,t.target)),t.removedNodes.forEach(n=>{let r=this.mirror.getId(n),o=Qe(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);ae(t.target,this.blockClass,this.blockSelector,!1)||rn(n,this.mirror)||!Gi(n,this.mirror)||(this.addedSet.has(n)?(Nr(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||kr(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[Yi(r,o)]?Nr(this.movedSet,n):this.removes.push({parentId:o,id:r,isShadow:Qe(t.target)&&Xe(t.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(t,n)=>{if(this.mirror.hasNode(t)){if(rn(t,this.mirror))return;this.movedSet.add(t);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[Yi(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);ae(t,this.blockClass,this.blockSelector,!1)||t.childNodes.forEach(r=>this.genAdds(r))}}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager"].forEach(n=>{this[n]=t[n]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}};function Nr(e,t){e.delete(t),t.childNodes.forEach(n=>Nr(e,n))}function Zi(e,t,n){return e.length===0?!1:Xi(e,t,n)}function Xi(e,t,n){let{parentNode:r}=t;if(!r)return!1;let o=n.getId(r);return e.some(i=>i.id===o)?!0:Xi(e,r,n)}function Ki(e,t){return e.size===0?!1:Ji(e,t)}function Ji(e,t){let{parentNode:n}=t;return n?e.has(n)?!0:Ji(e,n):!1}var Ve=[],ta=typeof CSSGroupingRule<"u",na=typeof CSSMediaRule<"u",ra=typeof CSSSupportsRule<"u",oa=typeof CSSConditionRule<"u";function Ct(e){try{if("composedPath"in e){let t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0];return e.target}catch{return e.target}}function Lr(e,t){var n,r;let o=new cn;Ve.push(o),o.init(e);let i=window.MutationObserver||window.__rrMutationObserver,a=(r=(n=window?.Zone)===null||n===void 0?void 0:n.__symbol__)===null||r===void 0?void 0:r.call(n,"MutationObserver");a&&window[a]&&(i=window[a]);let s=new i(o.processMutations.bind(o));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function eu({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};let o=typeof t.mousemove=="number"?t.mousemove:50,i=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500,a=[],s,l=ft(d=>{let f=Date.now()-s;e(a.map(m=>(m.timeOffset-=f,m)),d),a=[],s=null},i),c=ft(d=>{let f=Ct(d),{clientX:m,clientY:p}=Tr(d)?d.changedTouches[0]:d;s||(s=Date.now()),a.push({x:m,y:p,id:r.getId(f),timeOffset:Date.now()-s}),l(typeof DragEvent<"u"&&d instanceof DragEvent?V.Drag:d instanceof MouseEvent?V.MouseMove:V.TouchMove)},o,{trailing:!1}),u=[pe("mousemove",c,n),pe("touchmove",c,n),pe("drag",c,n)];return()=>{u.forEach(d=>d())}}function tu({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,sampling:i}){if(i.mouseInteraction===!1)return()=>{};let a=i.mouseInteraction===!0||i.mouseInteraction===void 0?{}:i.mouseInteraction,s=[],l=c=>u=>{let d=Ct(u);if(ae(d,r,o,!0))return;let f=Tr(u)?u.changedTouches[0]:u;if(!f)return;let m=n.getId(d),{clientX:p,clientY:h}=f;e({type:ln[c],id:m,x:p,y:h})};return Object.keys(ln).filter(c=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&a[c]!==!1).forEach(c=>{let u=c.toLowerCase(),d=l(c);s.push(pe(u,d,t))}),()=>{s.forEach(c=>c())}}function Fr({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,sampling:i}){let a=ft(s=>{let l=Ct(s);if(!l||ae(l,r,o,!0))return;let c=n.getId(l);if(l===t){let u=t.scrollingElement||t.documentElement;e({id:c,x:u.scrollLeft,y:u.scrollTop})}else e({id:c,x:l.scrollLeft,y:l.scrollTop})},i.scroll||100);return pe("scroll",a,t)}function nu({viewportResizeCb:e}){let t=-1,n=-1,r=ft(()=>{let o=tn(),i=nn();(t!==o||n!==i)&&(e({width:Number(i),height:Number(o)}),t=o,n=i)},200);return pe("resize",r,window)}function Qi(e,t){let n=Object.assign({},e);return t||delete n.userTriggered,n}var ru=["INPUT","TEXTAREA","SELECT"],ea=new WeakMap;function ou({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,ignoreClass:i,maskInputOptions:a,maskInputFn:s,sampling:l,userTriggeredOnInput:c}){function u(g){let w=Ct(g),v=g.isTrusted;if(w&&w.tagName==="OPTION"&&(w=w.parentElement),!w||!w.tagName||ru.indexOf(w.tagName)<0||ae(w,r,o,!0))return;let b=w.type;if(w.classList.contains(i))return;let S=w.value,x=!1;b==="radio"||b==="checkbox"?x=w.checked:(a[w.tagName.toLowerCase()]||a[b])&&(S=St({maskInputOptions:a,tagName:w.tagName,type:b,value:S,maskInputFn:s})),d(w,Qi({text:S,isChecked:x,userTriggered:v},c));let I=w.name;b==="radio"&&I&&x&&t.querySelectorAll(`input[type="radio"][name="${I}"]`).forEach(C=>{C!==w&&d(C,Qi({text:C.value,isChecked:!x,userTriggered:!1},c))})}function d(g,w){let v=ea.get(g);if(!v||v.text!==w.text||v.isChecked!==w.isChecked){ea.set(g,w);let b=n.getId(g);e(Object.assign(Object.assign({},w),{id:b}))}}let m=(l.input==="last"?["change"]:["input","change"]).map(g=>pe(g,u,t)),p=t.defaultView;if(!p)return()=>{m.forEach(g=>g())};let h=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value"),y=[[p.HTMLInputElement.prototype,"value"],[p.HTMLInputElement.prototype,"checked"],[p.HTMLSelectElement.prototype,"value"],[p.HTMLTextAreaElement.prototype,"value"],[p.HTMLSelectElement.prototype,"selectedIndex"],[p.HTMLOptionElement.prototype,"selected"]];return h&&h.set&&m.push(...y.map(g=>et(g[0],g[1],{set(){u({target:this})}},!1,p))),()=>{m.forEach(g=>g())}}function un(e){let t=[];function n(r,o){if(ta&&r.parentRule instanceof CSSGroupingRule||na&&r.parentRule instanceof CSSMediaRule||ra&&r.parentRule instanceof CSSSupportsRule||oa&&r.parentRule instanceof CSSConditionRule){let a=Array.from(r.parentRule.cssRules).indexOf(r);o.unshift(a)}else if(r.parentStyleSheet){let a=Array.from(r.parentStyleSheet.cssRules).indexOf(r);o.unshift(a)}return o}return n(e,t)}function Ue(e,t,n){let r,o;return e?(e.ownerNode?r=t.getId(e.ownerNode):o=n.getId(e),{styleId:o,id:r}):{}}function iu({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){let o=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=function(u,d){let{id:f,styleId:m}=Ue(this,t,n.styleMirror);return(f&&f!==-1||m&&m!==-1)&&e({id:f,styleId:m,adds:[{rule:u,index:d}]}),o.apply(this,[u,d])};let i=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=function(u){let{id:d,styleId:f}=Ue(this,t,n.styleMirror);return(d&&d!==-1||f&&f!==-1)&&e({id:d,styleId:f,removes:[{index:u}]}),i.apply(this,[u])};let a;r.CSSStyleSheet.prototype.replace&&(a=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=function(u){let{id:d,styleId:f}=Ue(this,t,n.styleMirror);return(d&&d!==-1||f&&f!==-1)&&e({id:d,styleId:f,replace:u}),a.apply(this,[u])});let s;r.CSSStyleSheet.prototype.replaceSync&&(s=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=function(u){let{id:d,styleId:f}=Ue(this,t,n.styleMirror);return(d&&d!==-1||f&&f!==-1)&&e({id:d,styleId:f,replaceSync:u}),s.apply(this,[u])});let l={};ta?l.CSSGroupingRule=r.CSSGroupingRule:(na&&(l.CSSMediaRule=r.CSSMediaRule),oa&&(l.CSSConditionRule=r.CSSConditionRule),ra&&(l.CSSSupportsRule=r.CSSSupportsRule));let c={};return Object.entries(l).forEach(([u,d])=>{c[u]={insertRule:d.prototype.insertRule,deleteRule:d.prototype.deleteRule},d.prototype.insertRule=function(f,m){let{id:p,styleId:h}=Ue(this.parentStyleSheet,t,n.styleMirror);return(p&&p!==-1||h&&h!==-1)&&e({id:p,styleId:h,adds:[{rule:f,index:[...un(this),m||0]}]}),c[u].insertRule.apply(this,[f,m])},d.prototype.deleteRule=function(f){let{id:m,styleId:p}=Ue(this.parentStyleSheet,t,n.styleMirror);return(m&&m!==-1||p&&p!==-1)&&e({id:m,styleId:p,removes:[{index:[...un(this),f]}]}),c[u].deleteRule.apply(this,[f])}}),()=>{r.CSSStyleSheet.prototype.insertRule=o,r.CSSStyleSheet.prototype.deleteRule=i,a&&(r.CSSStyleSheet.prototype.replace=a),s&&(r.CSSStyleSheet.prototype.replaceSync=s),Object.entries(l).forEach(([u,d])=>{d.prototype.insertRule=c[u].insertRule,d.prototype.deleteRule=c[u].deleteRule})}}function $r({mirror:e,stylesheetManager:t},n){var r,o,i;let a=null;n.nodeName==="#document"?a=e.getId(n):a=e.getId(n.host);let s=n.nodeName==="#document"?(r=n.defaultView)===null||r===void 0?void 0:r.Document:(i=(o=n.ownerDocument)===null||o===void 0?void 0:o.defaultView)===null||i===void 0?void 0:i.ShadowRoot,l=Object.getOwnPropertyDescriptor(s?.prototype,"adoptedStyleSheets");return a===null||a===-1||!s||!l?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var c;return(c=l.get)===null||c===void 0?void 0:c.call(this)},set(c){var u;let d=(u=l.set)===null||u===void 0?void 0:u.call(this,c);if(a!==null&&a!==-1)try{t.adoptStyleSheets(c,a)}catch{}return d}}),()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})})}function au({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:o}){let i=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=function(s,l,c){var u;if(n.has(s))return i.apply(this,[s,l,c]);let{id:d,styleId:f}=Ue((u=this.parentRule)===null||u===void 0?void 0:u.parentStyleSheet,t,r.styleMirror);return(d&&d!==-1||f&&f!==-1)&&e({id:d,styleId:f,set:{property:s,value:l,priority:c},index:un(this.parentRule)}),i.apply(this,[s,l,c])};let a=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=function(s){var l;if(n.has(s))return a.apply(this,[s]);let{id:c,styleId:u}=Ue((l=this.parentRule)===null||l===void 0?void 0:l.parentStyleSheet,t,r.styleMirror);return(c&&c!==-1||u&&u!==-1)&&e({id:c,styleId:u,remove:{property:s},index:un(this.parentRule)}),a.apply(this,[s])},()=>{o.CSSStyleDeclaration.prototype.setProperty=i,o.CSSStyleDeclaration.prototype.removeProperty=a}}function su({mediaInteractionCb:e,blockClass:t,blockSelector:n,mirror:r,sampling:o}){let i=s=>ft(l=>{let c=Ct(l);if(!c||ae(c,t,n,!0))return;let{currentTime:u,volume:d,muted:f,playbackRate:m}=c;e({type:s,id:r.getId(c),currentTime:u,volume:d,muted:f,playbackRate:m})},o.media||500),a=[pe("play",i(0)),pe("pause",i(1)),pe("seeked",i(2)),pe("volumechange",i(3)),pe("ratechange",i(4))];return()=>{a.forEach(s=>s())}}function lu({fontCb:e,doc:t}){let n=t.defaultView;if(!n)return()=>{};let r=[],o=new WeakMap,i=n.FontFace;n.FontFace=function(l,c,u){let d=new i(l,c,u);return o.set(d,{family:l,buffer:typeof c!="string",descriptors:u,fontSource:typeof c=="string"?c:JSON.stringify(Array.from(new Uint8Array(c)))}),d};let a=Ae(t.fonts,"add",function(s){return function(l){return setTimeout(()=>{let c=o.get(l);c&&(e(c),o.delete(l))},0),s.apply(this,[l])}});return r.push(()=>{n.FontFace=i}),r.push(a),()=>{r.forEach(s=>s())}}function cu(e){let{doc:t,mirror:n,blockClass:r,blockSelector:o,selectionCb:i}=e,a=!0,s=()=>{let l=t.getSelection();if(!l||a&&l?.isCollapsed)return;a=l.isCollapsed||!1;let c=[],u=l.rangeCount||0;for(let d=0;d<u;d++){let f=l.getRangeAt(d),{startContainer:m,startOffset:p,endContainer:h,endOffset:y}=f;ae(m,r,o,!0)||ae(h,r,o,!0)||c.push({start:n.getId(m),startOffset:p,end:n.getId(h),endOffset:y})}i({ranges:c})};return s(),pe("selectionchange",s)}function uu(e,t){let{mutationCb:n,mousemoveCb:r,mouseInteractionCb:o,scrollCb:i,viewportResizeCb:a,inputCb:s,mediaInteractionCb:l,styleSheetRuleCb:c,styleDeclarationCb:u,canvasMutationCb:d,fontCb:f,selectionCb:m}=e;e.mutationCb=(...p)=>{t.mutation&&t.mutation(...p),n(...p)},e.mousemoveCb=(...p)=>{t.mousemove&&t.mousemove(...p),r(...p)},e.mouseInteractionCb=(...p)=>{t.mouseInteraction&&t.mouseInteraction(...p),o(...p)},e.scrollCb=(...p)=>{t.scroll&&t.scroll(...p),i(...p)},e.viewportResizeCb=(...p)=>{t.viewportResize&&t.viewportResize(...p),a(...p)},e.inputCb=(...p)=>{t.input&&t.input(...p),s(...p)},e.mediaInteractionCb=(...p)=>{t.mediaInteaction&&t.mediaInteaction(...p),l(...p)},e.styleSheetRuleCb=(...p)=>{t.styleSheetRule&&t.styleSheetRule(...p),c(...p)},e.styleDeclarationCb=(...p)=>{t.styleDeclaration&&t.styleDeclaration(...p),u(...p)},e.canvasMutationCb=(...p)=>{t.canvasMutation&&t.canvasMutation(...p),d(...p)},e.fontCb=(...p)=>{t.font&&t.font(...p),f(...p)},e.selectionCb=(...p)=>{t.selection&&t.selection(...p),m(...p)}}function ia(e,t={}){let n=e.doc.defaultView;if(!n)return()=>{};uu(e,t);let r=Lr(e,e.doc),o=eu(e),i=tu(e),a=Fr(e),s=nu(e),l=ou(e),c=su(e),u=iu(e,{win:n}),d=$r(e,e.doc),f=au(e,{win:n}),m=e.collectFonts?lu(e):()=>{},p=cu(e),h=[];for(let y of e.plugins)h.push(y.observer(y.callback,n,y.options));return()=>{Ve.forEach(y=>y.reset()),r.disconnect(),o(),i(),a(),s(),l(),c(),u(),d(),f(),m(),p(),h.forEach(y=>y())}}var xt=class{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,n,r,o){let i=r||this.getIdToRemoteIdMap(t),a=o||this.getRemoteIdToIdMap(t),s=i.get(n);return s||(s=this.generateIdFn(),i.set(n,s),a.set(s,n)),s}getIds(t,n){let r=this.getIdToRemoteIdMap(t),o=this.getRemoteIdToIdMap(t);return n.map(i=>this.getId(t,i,r,o))}getRemoteId(t,n,r){let o=r||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;let i=o.get(n);return i||-1}getRemoteIds(t,n){let r=this.getRemoteIdToIdMap(t);return n.map(o=>this.getRemoteId(t,o,r))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let n=this.iframeIdToRemoteIdMap.get(t);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(t,n)),n}getRemoteIdToIdMap(t){let n=this.iframeRemoteIdToIdMap.get(t);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(t,n)),n}};var dn=class{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new xt(Ir),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new xt(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,n){var r;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),(r=this.loadListener)===null||r===void 0||r.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){if(t.data.type==="rrweb"){if(!t.source)return;let r=this.crossOriginIframeMap.get(t.source);if(!r)return;let o=this.transformCrossOriginEvent(r,t.data.event);o&&this.wrappedEmit(o,t.data.isCheckout)}}transformCrossOriginEvent(t,n){var r;switch(n.type){case q.FullSnapshot:return this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t),{timestamp:n.timestamp,type:q.IncrementalSnapshot,data:{source:V.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case q.Meta:case q.Load:case q.DomContentLoaded:return!1;case q.Plugin:return n;case q.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case q.IncrementalSnapshot:switch(n.data.source){case V.Mutation:return n.data.adds.forEach(o=>{this.replaceIds(o,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(o.node,t)}),n.data.removes.forEach(o=>{this.replaceIds(o,t,["parentId","id"])}),n.data.attributes.forEach(o=>{this.replaceIds(o,t,["id"])}),n.data.texts.forEach(o=>{this.replaceIds(o,t,["id"])}),n;case V.Drag:case V.TouchMove:case V.MouseMove:return n.data.positions.forEach(o=>{this.replaceIds(o,t,["id"])}),n;case V.ViewportResize:return!1;case V.MediaInteraction:case V.MouseInteraction:case V.Scroll:case V.CanvasMutation:case V.Input:return this.replaceIds(n.data,t,["id"]),n;case V.StyleSheetRule:case V.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case V.Font:return n;case V.Selection:return n.data.ranges.forEach(o=>{this.replaceIds(o,t,["start","end"])}),n;case V.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),(r=n.data.styles)===null||r===void 0||r.forEach(o=>{this.replaceStyleIds(o,t,["styleId"])}),n}}}replace(t,n,r,o){for(let i of o)!Array.isArray(n[i])&&typeof n[i]!="number"||(Array.isArray(n[i])?n[i]=t.getIds(r,n[i]):n[i]=t.getId(r,n[i]));return n}replaceIds(t,n,r){return this.replace(this.crossOriginIframeMirror,t,n,r)}replaceStyleIds(t,n,r){return this.replace(this.crossOriginIframeStyleMirror,t,n,r)}replaceIdOnNode(t,n){this.replaceIds(t,n,["id"]),"childNodes"in t&&t.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}};var fn=class{constructor(t){this.shadowDoms=new WeakSet,this.restorePatches=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror;let n=this;this.restorePatches.push(Ae(Element.prototype,"attachShadow",function(r){return function(o){let i=r.call(this,o);return this.shadowRoot&&n.addShadowRoot(this.shadowRoot,this.ownerDocument),i}}))}addShadowRoot(t,n){Xe(t)&&(this.shadowDoms.has(t)||(this.shadowDoms.add(t),Lr(Object.assign(Object.assign({},this.bypassOptions),{doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t),Fr(Object.assign(Object.assign({},this.bypassOptions),{scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),setTimeout(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),$r({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t)},0)))}observeAttachShadow(t){if(t.contentWindow){let n=this;this.restorePatches.push(Ae(t.contentWindow.HTMLElement.prototype,"attachShadow",function(r){return function(o){let i=r.call(this,o);return this.shadowRoot&&n.addShadowRoot(this.shadowRoot,t.contentDocument),i}}))}}reset(){this.restorePatches.forEach(t=>t()),this.shadowDoms=new WeakSet}};function aa(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function sa(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(u){try{c(r.next(u))}catch(d){a(d)}}function l(u){try{c(r.throw(u))}catch(d){a(d)}}function c(u){u.done?i(u.value):o(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})}var pt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",du=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(It=0;It<pt.length;It++)du[pt.charCodeAt(It)]=It;var It,la=function(e){var t=new Uint8Array(e),n,r=t.length,o="";for(n=0;n<r;n+=3)o+=pt[t[n]>>2],o+=pt[(t[n]&3)<<4|t[n+1]>>4],o+=pt[(t[n+1]&15)<<2|t[n+2]>>6],o+=pt[t[n+2]&63];return r%3===2?o=o.substring(0,o.length-1)+"=":r%3===1&&(o=o.substring(0,o.length-2)+"=="),o};var ca=new Map;function fu(e,t){let n=ca.get(e);return n||(n=new Map,ca.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}var _r=(e,t,n)=>{if(!e||!(ua(e,t)||typeof e=="object"))return;let r=e.constructor.name,o=fu(n,r),i=o.indexOf(e);return i===-1&&(i=o.length,o.push(e)),i};function pn(e,t,n){if(e instanceof Array)return e.map(r=>pn(r,t,n));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){let r=e.constructor.name,o=la(e);return{rr_type:r,base64:o}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[pn(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){let r=e.constructor.name,{src:o}=e;return{rr_type:r,src:o}}else if(e instanceof HTMLCanvasElement){let r="HTMLImageElement",o=e.toDataURL();return{rr_type:r,src:o}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[pn(e.data,t,n),e.width,e.height]};if(ua(e,t)||typeof e=="object"){let r=e.constructor.name,o=_r(e,t,n);return{rr_type:r,index:o}}}}return e}var mn=(e,t,n)=>[...e].map(r=>pn(r,t,n)),ua=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(o=>typeof t[o]=="function").find(o=>e instanceof t[o]);function da(e,t,n,r){let o=[],i=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(let a of i)try{if(typeof t.CanvasRenderingContext2D.prototype[a]!="function")continue;let s=Ae(t.CanvasRenderingContext2D.prototype,a,function(l){return function(...c){return ae(this.canvas,n,r,!0)||setTimeout(()=>{let u=mn([...c],t,this);e(this.canvas,{type:$e["2D"],property:a,args:u})},0),l.apply(this,c)}});o.push(s)}catch{let l=et(t.CanvasRenderingContext2D.prototype,a,{set(c){e(this.canvas,{type:$e["2D"],property:a,args:[c],setter:!0})}});o.push(l)}return()=>{o.forEach(a=>a())}}function Or(e,t,n){let r=[];try{let o=Ae(e.HTMLCanvasElement.prototype,"getContext",function(i){return function(a,...s){return ae(this,t,n,!0)||"__context"in this||(this.__context=a),i.apply(this,[a,...s])}});r.push(o)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{r.forEach(o=>o())}}function fa(e,t,n,r,o,i,a){let s=[],l=Object.getOwnPropertyNames(e);for(let c of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(c))try{if(typeof e[c]!="function")continue;let u=Ae(e,c,function(d){return function(...f){let m=d.apply(this,f);if(_r(m,a,this),!ae(this.canvas,r,o,!0)){let p=mn([...f],a,this),h={type:t,property:c,args:p};n(this.canvas,h)}return m}});s.push(u)}catch{let d=et(e,c,{set(f){n(this.canvas,{type:t,property:c,args:[f],setter:!0})}});s.push(d)}return s}function pa(e,t,n,r,o){let i=[];return i.push(...fa(t.WebGLRenderingContext.prototype,$e.WebGL,e,n,r,o,t)),typeof t.WebGL2RenderingContext<"u"&&i.push(...fa(t.WebGL2RenderingContext.prototype,$e.WebGL2,e,n,r,o,t)),()=>{i.forEach(a=>a())}}var Pr=null;try{ma=typeof module<"u"&&typeof module.require=="function"&&module.require("worker_threads")||typeof __non_webpack_require__=="function"&&__non_webpack_require__("worker_threads")||typeof tr=="function"&&tr("worker_threads"),Pr=ma.Worker}catch{}var ma;function pu(e,t){return Buffer.from(e,"base64").toString(t?"utf16":"utf8")}function ha(e,t,n){var r=t===void 0?null:t,o=n===void 0?!1:n,i=pu(e,o),a=i.indexOf(`
|
|
73
|
+
`,10)+1,s=i.substring(a)+(r?"//# sourceMappingURL="+r:"");return function(c){return new Pr(s,Object.assign({},c,{eval:!0}))}}function mu(e,t){var n=atob(e);if(t){for(var r=new Uint8Array(n.length),o=0,i=n.length;o<i;++o)r[o]=n.charCodeAt(o);return String.fromCharCode.apply(null,new Uint16Array(r.buffer))}return n}function hu(e,t,n){var r=t===void 0?null:t,o=n===void 0?!1:n,i=mu(e,o),a=i.indexOf(`
|
|
74
|
+
`,10)+1,s=i.substring(a)+(r?"//# sourceMappingURL="+r:""),l=new Blob([s],{type:"application/javascript"});return URL.createObjectURL(l)}function ga(e,t,n){var r;return function(i){return r=r||hu(e,t,n),new Worker(r,i)}}var gu=Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]";function ya(){return gu}function ba(e,t,n){return ya()?ha(e,t,n):ga(e,t,n)}var wa=ba("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24gKCkgewogICAgJ3VzZSBzdHJpY3QnOwoKICAgIC8qISAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KICAgIENvcHlyaWdodCAoYykgTWljcm9zb2Z0IENvcnBvcmF0aW9uLg0KDQogICAgUGVybWlzc2lvbiB0byB1c2UsIGNvcHksIG1vZGlmeSwgYW5kL29yIGRpc3RyaWJ1dGUgdGhpcyBzb2Z0d2FyZSBmb3IgYW55DQogICAgcHVycG9zZSB3aXRoIG9yIHdpdGhvdXQgZmVlIGlzIGhlcmVieSBncmFudGVkLg0KDQogICAgVEhFIFNPRlRXQVJFIElTIFBST1ZJREVEICJBUyBJUyIgQU5EIFRIRSBBVVRIT1IgRElTQ0xBSU1TIEFMTCBXQVJSQU5USUVTIFdJVEgNCiAgICBSRUdBUkQgVE8gVEhJUyBTT0ZUV0FSRSBJTkNMVURJTkcgQUxMIElNUExJRUQgV0FSUkFOVElFUyBPRiBNRVJDSEFOVEFCSUxJVFkNCiAgICBBTkQgRklUTkVTUy4gSU4gTk8gRVZFTlQgU0hBTEwgVEhFIEFVVEhPUiBCRSBMSUFCTEUgRk9SIEFOWSBTUEVDSUFMLCBESVJFQ1QsDQogICAgSU5ESVJFQ1QsIE9SIENPTlNFUVVFTlRJQUwgREFNQUdFUyBPUiBBTlkgREFNQUdFUyBXSEFUU09FVkVSIFJFU1VMVElORyBGUk9NDQogICAgTE9TUyBPRiBVU0UsIERBVEEgT1IgUFJPRklUUywgV0hFVEhFUiBJTiBBTiBBQ1RJT04gT0YgQ09OVFJBQ1QsIE5FR0xJR0VOQ0UgT1INCiAgICBPVEhFUiBUT1JUSU9VUyBBQ1RJT04sIEFSSVNJTkcgT1VUIE9GIE9SIElOIENPTk5FQ1RJT04gV0lUSCBUSEUgVVNFIE9SDQogICAgUEVSRk9STUFOQ0UgT0YgVEhJUyBTT0ZUV0FSRS4NCiAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLw0KDQogICAgZnVuY3Rpb24gX19hd2FpdGVyKHRoaXNBcmcsIF9hcmd1bWVudHMsIFAsIGdlbmVyYXRvcikgew0KICAgICAgICBmdW5jdGlvbiBhZG9wdCh2YWx1ZSkgeyByZXR1cm4gdmFsdWUgaW5zdGFuY2VvZiBQID8gdmFsdWUgOiBuZXcgUChmdW5jdGlvbiAocmVzb2x2ZSkgeyByZXNvbHZlKHZhbHVlKTsgfSk7IH0NCiAgICAgICAgcmV0dXJuIG5ldyAoUCB8fCAoUCA9IFByb21pc2UpKShmdW5jdGlvbiAocmVzb2x2ZSwgcmVqZWN0KSB7DQogICAgICAgICAgICBmdW5jdGlvbiBmdWxmaWxsZWQodmFsdWUpIHsgdHJ5IHsgc3RlcChnZW5lcmF0b3IubmV4dCh2YWx1ZSkpOyB9IGNhdGNoIChlKSB7IHJlamVjdChlKTsgfSB9DQogICAgICAgICAgICBmdW5jdGlvbiByZWplY3RlZCh2YWx1ZSkgeyB0cnkgeyBzdGVwKGdlbmVyYXRvclsidGhyb3ciXSh2YWx1ZSkpOyB9IGNhdGNoIChlKSB7IHJlamVjdChlKTsgfSB9DQogICAgICAgICAgICBmdW5jdGlvbiBzdGVwKHJlc3VsdCkgeyByZXN1bHQuZG9uZSA/IHJlc29sdmUocmVzdWx0LnZhbHVlKSA6IGFkb3B0KHJlc3VsdC52YWx1ZSkudGhlbihmdWxmaWxsZWQsIHJlamVjdGVkKTsgfQ0KICAgICAgICAgICAgc3RlcCgoZ2VuZXJhdG9yID0gZ2VuZXJhdG9yLmFwcGx5KHRoaXNBcmcsIF9hcmd1bWVudHMgfHwgW10pKS5uZXh0KCkpOw0KICAgICAgICB9KTsNCiAgICB9CgogICAgLyoKICAgICAqIGJhc2U2NC1hcnJheWJ1ZmZlciAxLjAuMSA8aHR0cHM6Ly9naXRodWIuY29tL25pa2xhc3ZoL2Jhc2U2NC1hcnJheWJ1ZmZlcj4KICAgICAqIENvcHlyaWdodCAoYykgMjAyMSBOaWtsYXMgdm9uIEhlcnR6ZW4gPGh0dHBzOi8vaGVydHplbi5jb20+CiAgICAgKiBSZWxlYXNlZCB1bmRlciBNSVQgTGljZW5zZQogICAgICovCiAgICB2YXIgY2hhcnMgPSAnQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyc7CiAgICAvLyBVc2UgYSBsb29rdXAgdGFibGUgdG8gZmluZCB0aGUgaW5kZXguCiAgICB2YXIgbG9va3VwID0gdHlwZW9mIFVpbnQ4QXJyYXkgPT09ICd1bmRlZmluZWQnID8gW10gOiBuZXcgVWludDhBcnJheSgyNTYpOwogICAgZm9yICh2YXIgaSA9IDA7IGkgPCBjaGFycy5sZW5ndGg7IGkrKykgewogICAgICAgIGxvb2t1cFtjaGFycy5jaGFyQ29kZUF0KGkpXSA9IGk7CiAgICB9CiAgICB2YXIgZW5jb2RlID0gZnVuY3Rpb24gKGFycmF5YnVmZmVyKSB7CiAgICAgICAgdmFyIGJ5dGVzID0gbmV3IFVpbnQ4QXJyYXkoYXJyYXlidWZmZXIpLCBpLCBsZW4gPSBieXRlcy5sZW5ndGgsIGJhc2U2NCA9ICcnOwogICAgICAgIGZvciAoaSA9IDA7IGkgPCBsZW47IGkgKz0gMykgewogICAgICAgICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaV0gPj4gMl07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1soKGJ5dGVzW2ldICYgMykgPDwgNCkgfCAoYnl0ZXNbaSArIDFdID4+IDQpXTsKICAgICAgICAgICAgYmFzZTY0ICs9IGNoYXJzWygoYnl0ZXNbaSArIDFdICYgMTUpIDw8IDIpIHwgKGJ5dGVzW2kgKyAyXSA+PiA2KV07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1tieXRlc1tpICsgMl0gJiA2M107CiAgICAgICAgfQogICAgICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgICAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgJz0nOwogICAgICAgIH0KICAgICAgICBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgICAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgJz09JzsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIGJhc2U2NDsKICAgIH07CgogICAgY29uc3QgbGFzdEJsb2JNYXAgPSBuZXcgTWFwKCk7DQogICAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gbmV3IE1hcCgpOw0KICAgIGZ1bmN0aW9uIGdldFRyYW5zcGFyZW50QmxvYkZvcih3aWR0aCwgaGVpZ2h0LCBkYXRhVVJMT3B0aW9ucykgew0KICAgICAgICByZXR1cm4gX19hd2FpdGVyKHRoaXMsIHZvaWQgMCwgdm9pZCAwLCBmdW5jdGlvbiogKCkgew0KICAgICAgICAgICAgY29uc3QgaWQgPSBgJHt3aWR0aH0tJHtoZWlnaHR9YDsNCiAgICAgICAgICAgIGlmICgnT2Zmc2NyZWVuQ2FudmFzJyBpbiBnbG9iYWxUaGlzKSB7DQogICAgICAgICAgICAgICAgaWYgKHRyYW5zcGFyZW50QmxvYk1hcC5oYXMoaWQpKQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJhbnNwYXJlbnRCbG9iTWFwLmdldChpZCk7DQogICAgICAgICAgICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsNCiAgICAgICAgICAgICAgICBvZmZzY3JlZW4uZ2V0Q29udGV4dCgnMmQnKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0geWllbGQgYmxvYi5hcnJheUJ1ZmZlcigpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7DQogICAgICAgICAgICAgICAgdHJhbnNwYXJlbnRCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICByZXR1cm4gYmFzZTY0Ow0KICAgICAgICAgICAgfQ0KICAgICAgICAgICAgZWxzZSB7DQogICAgICAgICAgICAgICAgcmV0dXJuICcnOw0KICAgICAgICAgICAgfQ0KICAgICAgICB9KTsNCiAgICB9DQogICAgY29uc3Qgd29ya2VyID0gc2VsZjsNCiAgICB3b3JrZXIub25tZXNzYWdlID0gZnVuY3Rpb24gKGUpIHsNCiAgICAgICAgcmV0dXJuIF9fYXdhaXRlcih0aGlzLCB2b2lkIDAsIHZvaWQgMCwgZnVuY3Rpb24qICgpIHsNCiAgICAgICAgICAgIGlmICgnT2Zmc2NyZWVuQ2FudmFzJyBpbiBnbG9iYWxUaGlzKSB7DQogICAgICAgICAgICAgICAgY29uc3QgeyBpZCwgYml0bWFwLCB3aWR0aCwgaGVpZ2h0LCBkYXRhVVJMT3B0aW9ucyB9ID0gZS5kYXRhOw0KICAgICAgICAgICAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zKTsNCiAgICAgICAgICAgICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGN0eCA9IG9mZnNjcmVlbi5nZXRDb250ZXh0KCcyZCcpOw0KICAgICAgICAgICAgICAgIGN0eC5kcmF3SW1hZ2UoYml0bWFwLCAwLCAwKTsNCiAgICAgICAgICAgICAgICBiaXRtYXAuY2xvc2UoKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IHR5cGUgPSBibG9iLnR5cGU7DQogICAgICAgICAgICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSB5aWVsZCBibG9iLmFycmF5QnVmZmVyKCk7DQogICAgICAgICAgICAgICAgY29uc3QgYmFzZTY0ID0gZW5jb2RlKGFycmF5QnVmZmVyKTsNCiAgICAgICAgICAgICAgICBpZiAoIWxhc3RCbG9iTWFwLmhhcyhpZCkgJiYgKHlpZWxkIHRyYW5zcGFyZW50QmFzZTY0KSA9PT0gYmFzZTY0KSB7DQogICAgICAgICAgICAgICAgICAgIGxhc3RCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHdvcmtlci5wb3N0TWVzc2FnZSh7IGlkIH0pOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7DQogICAgICAgICAgICAgICAgd29ya2VyLnBvc3RNZXNzYWdlKHsNCiAgICAgICAgICAgICAgICAgICAgaWQsDQogICAgICAgICAgICAgICAgICAgIHR5cGUsDQogICAgICAgICAgICAgICAgICAgIGJhc2U2NCwNCiAgICAgICAgICAgICAgICAgICAgd2lkdGgsDQogICAgICAgICAgICAgICAgICAgIGhlaWdodCwNCiAgICAgICAgICAgICAgICB9KTsNCiAgICAgICAgICAgICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7DQogICAgICAgICAgICB9DQogICAgICAgICAgICBlbHNlIHsNCiAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsNCiAgICAgICAgICAgIH0NCiAgICAgICAgfSk7DQogICAgfTsKCn0pKCk7Cgo=",null,!1);var hn=class{constructor(t){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=(l,c)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(l)||this.pendingCanvasMutations.set(l,[]),this.pendingCanvasMutations.get(l).push(c)};let{sampling:n="all",win:r,blockClass:o,blockSelector:i,recordCanvas:a,dataURLOptions:s}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,a&&n==="all"&&this.initCanvasMutationObserver(r,o,i),a&&typeof n=="number"&&this.initCanvasFPSObserver(n,r,o,i,{dataURLOptions:s})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(t,n,r,o,i){let a=Or(n,r,o),s=new Map,l=new wa;l.onmessage=p=>{let{id:h}=p.data;if(s.set(h,!1),!("base64"in p.data))return;let{base64:y,type:g,width:w,height:v}=p.data;this.mutationCb({id:h,type:$e["2D"],commands:[{property:"clearRect",args:[0,0,w,v]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:y}],type:g}]},0,0]}]})};let c=1e3/t,u=0,d,f=()=>{let p=[];return n.document.querySelectorAll("canvas").forEach(h=>{ae(h,r,o,!0)||p.push(h)}),p},m=p=>{if(u&&p-u<c){d=requestAnimationFrame(m);return}u=p,f().forEach(h=>sa(this,void 0,void 0,function*(){var y;let g=this.mirror.getId(h);if(s.get(g))return;if(s.set(g,!0),["webgl","webgl2"].includes(h.__context)){let v=h.getContext(h.__context);((y=v?.getContextAttributes())===null||y===void 0?void 0:y.preserveDrawingBuffer)===!1&&v?.clear(v.COLOR_BUFFER_BIT)}let w=yield createImageBitmap(h);l.postMessage({id:g,bitmap:w,width:h.width,height:h.height,dataURLOptions:i.dataURLOptions},[w])})),d=requestAnimationFrame(m)};d=requestAnimationFrame(m),this.resetObservers=()=>{a(),cancelAnimationFrame(d)}}initCanvasMutationObserver(t,n,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let o=Or(t,n,r),i=da(this.processMutation.bind(this),t,n,r),a=pa(this.processMutation.bind(this),t,n,r,this.mirror);this.resetObservers=()=>{o(),i(),a()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let t=n=>{this.rafStamps.latestId=n,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,n)=>{let r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,n){if(this.frozen||this.locked)return;let r=this.pendingCanvasMutations.get(t);if(!r||n===-1)return;let o=r.map(a=>aa(a,["type"])),{type:i}=r[0];this.mutationCb({id:n,type:i,commands:o}),this.pendingCanvasMutations.delete(t)}};var gn=class{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new en,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,n){if(t.length===0)return;let r={id:n,styleIds:[]},o=[];for(let i of t){let a;if(this.styleMirror.has(i))a=this.styleMirror.getId(i);else{a=this.styleMirror.add(i);let s=Array.from(i.rules||CSSRule);o.push({styleId:a,rules:s.map((l,c)=>({rule:xr(l),index:c}))})}r.styleIds.push(a)}o.length>0&&(r.styles=o),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}};function ce(e){return Object.assign(Object.assign({},e),{timestamp:Date.now()})}var se,yn,Dr,bn=!1,Me=Ui();function _e(e={}){let{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="rr-block",blockSelector:i=null,ignoreClass:a="rr-ignore",maskTextClass:s="rr-mask",maskTextSelector:l=null,inlineStylesheet:c=!0,maskAllInputs:u,maskInputOptions:d,slimDOMOptions:f,maskInputFn:m,maskTextFn:p,hooks:h,packFn:y,sampling:g={},dataURLOptions:w={},mousemoveWait:v,recordCanvas:b=!1,recordCrossOriginIframes:S=!1,userTriggeredOnInput:x=!1,collectFonts:I=!1,inlineImages:C=!1,plugins:E,keepIframeSrcFn:k=()=>!1,ignoreCSSAttributes:T=new Set([])}=e,F=S?window.parent===window:!0,D=!1;if(!F)try{window.parent.document,D=!1}catch{D=!0}if(F&&!t)throw new Error("emit function is required");v!==void 0&&g.mousemove===void 0&&(g.mousemove=v),Me.reset();let R=u===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:d!==void 0?d:{password:!0},_=f===!0||f==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:f==="all",headMetaDescKeywords:f==="all"}:f||{};qi();let N,P=0,X=O=>{for(let j of E||[])j.eventProcessor&&(O=j.eventProcessor(O));return y&&(O=y(O)),O};se=(O,j)=>{var K;if(!((K=Ve[0])===null||K===void 0)&&K.isFrozen()&&O.type!==q.FullSnapshot&&!(O.type===q.IncrementalSnapshot&&O.data.source===V.Mutation)&&Ve.forEach(z=>z.unfreeze()),F)t?.(X(O),j);else if(D){let z={type:"rrweb",event:X(O),isCheckout:j};window.parent.postMessage(z,"*")}if(O.type===q.FullSnapshot)N=O,P=0;else if(O.type===q.IncrementalSnapshot){if(O.data.source===V.Mutation&&O.data.isAttachIframe)return;P++;let z=r&&P>=r,Z=n&&O.timestamp-N.timestamp>n;(z||Z)&&yn(!0)}};let U=O=>{se(ce({type:q.IncrementalSnapshot,data:Object.assign({source:V.Mutation},O)}))},G=O=>se(ce({type:q.IncrementalSnapshot,data:Object.assign({source:V.Scroll},O)})),ne=O=>se(ce({type:q.IncrementalSnapshot,data:Object.assign({source:V.CanvasMutation},O)})),L=O=>se(ce({type:q.IncrementalSnapshot,data:Object.assign({source:V.AdoptedStyleSheet},O)})),W=new gn({mutationCb:U,adoptedStyleSheetCb:L}),B=new dn({mirror:Me,mutationCb:U,stylesheetManager:W,recordCrossOriginIframes:S,wrappedEmit:se});for(let O of E||[])O.getMirror&&O.getMirror({nodeMirror:Me,crossOriginIframeMirror:B.crossOriginIframeMirror,crossOriginIframeStyleMirror:B.crossOriginIframeStyleMirror});Dr=new hn({recordCanvas:b,mutationCb:ne,win:window,blockClass:o,blockSelector:i,mirror:Me,sampling:g.canvas,dataURLOptions:w});let Y=new fn({mutationCb:U,scrollCb:G,bypassOptions:{blockClass:o,blockSelector:i,maskTextClass:s,maskTextSelector:l,inlineStylesheet:c,maskInputOptions:R,dataURLOptions:w,maskTextFn:p,maskInputFn:m,recordCanvas:b,inlineImages:C,sampling:g,slimDOMOptions:_,iframeManager:B,stylesheetManager:W,canvasManager:Dr,keepIframeSrcFn:k},mirror:Me});yn=(O=!1)=>{var j,K,z,Z,H,re;se(ce({type:q.Meta,data:{href:window.location.href,width:nn(),height:tn()}}),O),W.reset(),Ve.forEach(le=>le.lock());let oe=Vi(document,{mirror:Me,blockClass:o,blockSelector:i,maskTextClass:s,maskTextSelector:l,inlineStylesheet:c,maskAllInputs:R,maskTextFn:p,slimDOM:_,dataURLOptions:w,recordCanvas:b,inlineImages:C,onSerialize:le=>{on(le,Me)&&B.addIframe(le),an(le,Me)&&W.trackLinkElement(le),sn(le)&&Y.addShadowRoot(le.shadowRoot,document)},onIframeLoad:(le,We)=>{B.attachIframe(le,We),Y.observeAttachShadow(le)},onStylesheetLoad:(le,We)=>{W.attachLinkElement(le,We)},keepIframeSrcFn:k});if(!oe)return console.warn("Failed to snapshot the document");se(ce({type:q.FullSnapshot,data:{node:oe,initialOffset:{left:window.pageXOffset!==void 0?window.pageXOffset:document?.documentElement.scrollLeft||((K=(j=document?.body)===null||j===void 0?void 0:j.parentElement)===null||K===void 0?void 0:K.scrollLeft)||((z=document?.body)===null||z===void 0?void 0:z.scrollLeft)||0,top:window.pageYOffset!==void 0?window.pageYOffset:document?.documentElement.scrollTop||((H=(Z=document?.body)===null||Z===void 0?void 0:Z.parentElement)===null||H===void 0?void 0:H.scrollTop)||((re=document?.body)===null||re===void 0?void 0:re.scrollTop)||0}}})),Ve.forEach(le=>le.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&W.adoptStyleSheets(document.adoptedStyleSheets,Me.getId(document))};try{let O=[];O.push(pe("DOMContentLoaded",()=>{se(ce({type:q.DomContentLoaded,data:{}}))}));let j=z=>{var Z;return ia({mutationCb:U,mousemoveCb:(H,re)=>se(ce({type:q.IncrementalSnapshot,data:{source:re,positions:H}})),mouseInteractionCb:H=>se(ce({type:q.IncrementalSnapshot,data:Object.assign({source:V.MouseInteraction},H)})),scrollCb:G,viewportResizeCb:H=>se(ce({type:q.IncrementalSnapshot,data:Object.assign({source:V.ViewportResize},H)})),inputCb:H=>se(ce({type:q.IncrementalSnapshot,data:Object.assign({source:V.Input},H)})),mediaInteractionCb:H=>se(ce({type:q.IncrementalSnapshot,data:Object.assign({source:V.MediaInteraction},H)})),styleSheetRuleCb:H=>se(ce({type:q.IncrementalSnapshot,data:Object.assign({source:V.StyleSheetRule},H)})),styleDeclarationCb:H=>se(ce({type:q.IncrementalSnapshot,data:Object.assign({source:V.StyleDeclaration},H)})),canvasMutationCb:ne,fontCb:H=>se(ce({type:q.IncrementalSnapshot,data:Object.assign({source:V.Font},H)})),selectionCb:H=>{se(ce({type:q.IncrementalSnapshot,data:Object.assign({source:V.Selection},H)}))},blockClass:o,ignoreClass:a,maskTextClass:s,maskTextSelector:l,maskInputOptions:R,inlineStylesheet:c,sampling:g,recordCanvas:b,inlineImages:C,userTriggeredOnInput:x,collectFonts:I,doc:z,maskInputFn:m,maskTextFn:p,keepIframeSrcFn:k,blockSelector:i,slimDOMOptions:_,dataURLOptions:w,mirror:Me,iframeManager:B,stylesheetManager:W,shadowDomManager:Y,canvasManager:Dr,ignoreCSSAttributes:T,plugins:((Z=E?.filter(H=>H.observer))===null||Z===void 0?void 0:Z.map(H=>({observer:H.observer,options:H.options,callback:re=>se(ce({type:q.Plugin,data:{plugin:H.name,payload:re}}))})))||[]},h)};B.addLoadListener(z=>{O.push(j(z.contentDocument))});let K=()=>{yn(),O.push(j(document)),bn=!0};return document.readyState==="interactive"||document.readyState==="complete"?K():O.push(pe("load",()=>{se(ce({type:q.Load,data:{}})),K()},window)),()=>{O.forEach(z=>z()),bn=!1}}catch(O){console.warn(O)}}_e.addCustomEvent=(e,t)=>{if(!bn)throw new Error("please add custom event after start recording");se(ce({type:q.Custom,data:{tag:e,payload:t}}))};_e.freezePage=()=>{Ve.forEach(e=>e.freeze())};_e.takeFullSnapshot=e=>{if(!bn)throw new Error("please take full snapshot after start recording");yn(e)};_e.mirror=Me;function yu(){try{if(typeof crypto<"u"&&typeof crypto.randomUUID=="function")return crypto.randomUUID()}catch{}return`run-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`}function Wr(){let e=M().sessionRecording;if(!e.active)try{let t=_e({emit:n=>e.buffer.push(n),collectFonts:!0,sampling:{mousemove:!1,mouseInteraction:!1}});t&&(e.active=!0,e.runId=yu(),e.stopFn=t)}catch{}}function Br(){let e=M().sessionRecording;return!e.active||!e.runId||e.buffer.length===0?null:{events:e.buffer.splice(0),runId:e.runId}}function Hr(){return M().sessionRecording.active}var bu=["backgroundColor","color","fontFamily","fontSize","fontWeight","fontStyle","lineHeight","letterSpacing","textAlign","textDecoration","textTransform","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","margin","marginTop","marginRight","marginBottom","marginLeft","borderRadius","borderColor","borderWidth","borderStyle","boxShadow","opacity","width","height","display","flexDirection","justifyContent","alignItems","gap"];function wu(e,t){let n=t??bu;if(e.ref||e.text||e.role||e.label||e.selector){let{element:i,matched:a}=Re(e);return{...va(i,e.ref,n),matched:a}}let r=qe(),o=[];for(let[i,a]of r)a.isConnected&&o.push(va(a,i,n));return o}function va(e,t,n){let r=window.getComputedStyle(e),o={};t&&(o.ref=t),o.tag=e.tagName.toLowerCase();let i=e.textContent?.trim();i&&(o.text=i.length>60?i.slice(0,60)+"\u2026":i);for(let a of n){let s=r.getPropertyValue(a.replace(/([A-Z])/g,"-$1").toLowerCase());s&&(o[a]=s)}return o}var Sa=25,wn=25,mt="__mindstudio_pending_nav",Ca=300,zr=1e4;function vu(e){try{let t=new URL(e,window.location.origin);return t.origin!==window.location.origin?!1:t.pathname===window.location.pathname&&t.search===window.location.search&&t.hash===window.location.hash}catch{return!1}}function xa(e){try{let t=new URL(e,window.location.origin);return t.origin!==window.location.origin?!1:(vu(e)||(window.history.pushState(null,"",t.pathname+t.search+t.hash),window.dispatchEvent(new PopStateEvent("popstate"))),!0)}catch{return!1}}async function Ur(e=300,t=2e3){return new Promise(n=>{let r=Date.now()+t,o=Date.now(),i=Vt(),a=window.scrollY,s=window.scrollX,l=document.body.scrollTop,c=document.documentElement.scrollTop,u=document.body.scrollHeight,d=document.body.scrollWidth,f=i.scrollTop,m=i.scrollLeft;function p(){if(Date.now()>r){n();return}let h=window.scrollY,y=window.scrollX,g=document.body.scrollTop,w=document.documentElement.scrollTop,v=document.body.scrollHeight,b=document.body.scrollWidth,S=i.scrollTop,x=i.scrollLeft;(h!==a||y!==s||g!==l||w!==c||v!==u||b!==d||S!==f||x!==m)&&(a=h,s=y,l=g,c=w,u=v,d=b,f=S,m=x,o=Date.now()),Date.now()-o>=e?n():requestAnimationFrame(p)}requestAnimationFrame(p)})}var Su=150;async function Vr(e){let t=Cu(e),n=t.map(a=>({el:a,top:a.scrollTop,left:a.scrollLeft})),r=document.documentElement.style.scrollBehavior;document.documentElement.style.scrollBehavior="auto",e.scrollIntoView({block:"center",inline:"nearest",behavior:"instant"}),document.documentElement.style.scrollBehavior=r;let o=t.map(a=>({top:a.scrollTop,left:a.scrollLeft})),i=[];for(let a=0;a<t.length;a++)(n[a].top!==o[a].top||n[a].left!==o[a].left)&&i.push({el:t[a],fromTop:n[a].top,fromLeft:n[a].left,toTop:o[a].top,toLeft:o[a].left});if(i.length===0){await new Promise(a=>requestAnimationFrame(()=>a()));return}for(let a of i)a.el.scrollTop=a.fromTop,a.el.scrollLeft=a.fromLeft;await new Promise(a=>{let s=performance.now();function l(c){let u=c-s,d=Math.min(u/Su,1),f=1-Math.pow(1-d,3);for(let m of i)m.el.scrollTop=m.fromTop+(m.toTop-m.fromTop)*f,m.el.scrollLeft=m.fromLeft+(m.toLeft-m.fromLeft)*f;d<1?requestAnimationFrame(l):a()}requestAnimationFrame(l)})}function Cu(e){let t=[],n=e.parentElement;for(;n;){let r=getComputedStyle(n),o=r.overflowY,i=r.overflowX;(o==="auto"||o==="scroll"||i==="auto"||i==="scroll")&&t.push(n),n=n.parentElement}return t.push(document.scrollingElement||document.documentElement),t}var xu=new Set(["click","type","select"]);function Iu(e){return e.some(t=>xu.has(t.command))}async function At(e,t){let n=Date.now(),r=[],o=[],i="",a=!1,s=new Set(["click","type","select"]),l=t.some(u=>s.has(u.command));l&&(wt(!0),wr()),or(),Iu(t)&&Wr();try{for(let u=0;u<t.length;u++){let d=t[u],f=d.command;try{if(u>0&&await Se(Sa+Math.random()*wn-wn/2),f==="navigate"){let p=d.url;if(!p)throw new Error('navigate command requires a "url" field');if(xa(p)){r.push({index:u,command:f,result:"ok"}),await Se(Ca);continue}let h=t.slice(u+1);if(h.length>0)try{sessionStorage.setItem(mt,JSON.stringify({id:e,startTime:n,completedSteps:r,remainingSteps:h,stepOffset:u+1}))}catch{}r.push({index:u,command:f,result:"ok"}),a=!0,window.location.href=p,await new Promise((y,g)=>{setTimeout(()=>g(new Error("Navigation did not complete within timeout")),zr)})}if(f==="reload"){let p=t.slice(u+1);if(p.length>0)try{sessionStorage.setItem(mt,JSON.stringify({id:e,startTime:n,completedSteps:r,remainingSteps:p,stepOffset:u+1}))}catch{}r.push({index:u,command:f,result:"ok"}),a=!0,window.location.reload(),await new Promise((h,y)=>{setTimeout(()=>y(new Error("Reload did not complete within timeout")),zr)})}let m=await Ma(d);r.push({index:u,command:f,...m})}catch(m){r.push({index:u,command:f,error:m instanceof Error?m.message:String(m)});break}}try{i=await je()}catch{}}finally{o=ir(),l&&(wt(!1),Hr()?vr():Xt())}let c=Br();return{id:e,steps:r,snapshot:i,logs:o,duration:Date.now()-n,...c?{events:c.events,runId:c.runId}:{}}}function Ia(){try{let e=sessionStorage.getItem(mt);if(!e)return null;let t=JSON.parse(e);return typeof t?.id=="string"?t.id:null}catch{return null}}async function Aa(){let e=null;try{let a=sessionStorage.getItem(mt);if(!a)return null;sessionStorage.removeItem(mt),e=JSON.parse(a)}catch{return null}if(!e)return null;let t=[...e.completedSteps],n=[],r="",o=e.remainingSteps.some(a=>a.command==="click"||a.command==="type"||a.command==="select");o&&(wt(!0),wr(),Wr()),or();try{for(let a=0;a<e.remainingSteps.length;a++){let s=e.remainingSteps[a],l=s.command,c=e.stepOffset+a;try{if(a>0&&await Se(Sa+Math.random()*wn-wn/2),l==="navigate"){let d=s.url;if(!d)throw new Error('navigate command requires a "url" field');if(xa(d)){t.push({index:c,command:l,result:"ok"}),await Se(Ca);continue}let f=e.remainingSteps.slice(a+1);if(f.length>0)try{sessionStorage.setItem(mt,JSON.stringify({id:e.id,startTime:e.startTime,completedSteps:t,remainingSteps:f,stepOffset:c+1}))}catch{}t.push({index:c,command:l,result:"ok"}),window.location.href=d,await new Promise((m,p)=>{setTimeout(()=>p(new Error("Navigation did not complete within timeout")),zr)})}let u=await Ma(s);t.push({index:c,command:l,...u})}catch(u){t.push({index:c,command:l,error:u instanceof Error?u.message:String(u)});break}}try{r=await je()}catch{}}finally{n=ir(),o&&(wt(!1),Hr()?vr():Xt())}let i=Br();return{id:e.id,steps:t,snapshot:r,logs:n,duration:Date.now()-e.startTime,...i?{events:i.events,runId:i.runId}:{}}}async function Ma(e){switch(e.command){case"snapshot":return{result:await je()};case"click":{let{element:t,matched:n}=Re(e);return await Vr(t),await Kt(t),await _i(),ur(t),await Ur(),await Se(250),{result:"ok",matched:n}}case"type":{let{element:t,matched:n}=Re(e),r=e.text;if(!r&&r!=="")throw new Error('type command requires a "text" field');return await Vr(t),await Kt(t),await fi(t,r,{clear:!!e.clear}),await Ur(),{result:"ok",matched:n}}case"select":{let{element:t,matched:n}=Re(e),r=e.option;if(!r)throw new Error('select command requires an "option" field');await Vr(t),await Kt(t);let o=mi(t,r);return await Ur(),{result:`selected "${o}"`,matched:n}}case"wait":{let{matched:t,elapsed:n}=await pi(e);return{result:"ok",matched:t,elapsed:n}}case"styles":{let t=e.properties;return{result:wu(e,t)}}case"evaluate":{let t=e.script;if(!t)throw new Error('evaluate command requires a "script" field');return{result:await hi(t)}}default:throw new Error(`Unknown command: ${e.command}`)}}var Au="/__mindstudio_dev__/ws",Mu=1e3,Eu=1e4;function ka(){let e=M().ws;e.ws||(Yo(Sn),window.addEventListener("beforeunload",()=>{e.closing=!0,e.ws&&e.ws.close()}),Ta())}function Sn(){let{ws:e}=M().ws;return e&&e.readyState===WebSocket.OPEN?e:null}function ku(){return`${location.protocol==="https:"?"wss:":"ws:"}//${location.host}${Au}`}function qr(){return window.parent!==window?"iframe":"standalone"}function jr(){try{return location.search.includes("ms_sandbox=1")?(sessionStorage.setItem("__ms_sandbox","1"),!0):sessionStorage.getItem("__ms_sandbox")==="1"}catch{return location.search.includes("ms_sandbox=1")}}function Ta(){let e=M().ws;if(!e.closing){try{e.ws=new WebSocket(ku())}catch{Ea();return}e.ws.onopen=()=>{try{let t=(()=>{try{return sessionStorage.getItem("__ms_mirror")==="1"}catch{return!1}})();e.ws.send(JSON.stringify({type:"hello",mode:qr(),url:location.href,viewport:{w:window.innerWidth,h:window.innerHeight},mirror:t,sandbox:jr(),resumingCommandId:Ia()}))}catch{e.ws?.close()}},e.ws.onmessage=t=>{let n;try{n=JSON.parse(t.data)}catch{return}switch(n.type){case"ack":e.clientId=n.clientId,e.reconnectDelay=Mu,Ru();break;case"command":Tu(n.id,n.steps);break;case"broadcast":Nu(n.action,n.payload);break}},e.ws.onclose=()=>{e.ws=null,e.clientId=null,e.closing||Ea()},e.ws.onerror=()=>{}}}function Ea(){let e=M().ws;e.closing||(setTimeout(()=>Ta(),e.reconnectDelay),e.reconnectDelay=Math.min(e.reconnectDelay*2,Eu))}async function Tu(e,t){let n=M().ws;if(n.busy){vn({id:e,steps:[],snapshot:"",logs:[],duration:0,error:"Browser agent is busy"});return}n.busy=!0,Gr("command-started",{id:e,steps:t.map(r=>r.command)});try{let r=await At(e,t);vn(r),Gr("command-completed",{id:e,success:!0})}catch{vn({id:e,steps:[],snapshot:"",logs:[],duration:0}),Gr("command-completed",{id:e,success:!1})}finally{M().ws.busy=!1}}function vn(e){try{let t=Sn();t&&t.send(JSON.stringify({type:"result",...e}))}catch{}}async function Ru(){let e=await Aa();e&&vn(e)}function Gr(e,t){window.parent!==window&&window.parent.postMessage({channel:"mindstudio-browser-agent",command:e,...t},"*")}function Nu(e,t){e==="reload"&&(document.cookie="__ms_auth=; Max-Age=0; Path=/; Secure; SameSite=None",location.href="/")}var Lu=Object.defineProperty,be=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(r){throw n=[r],r}},Nt=(e,t)=>{for(var n in t)Lu(e,n,{get:t[n],enumerable:!0})};function Fu(e){if(e===!0)return"soft";if(e===!1)return"disabled";if(typeof e=="string"){let t=e.toLowerCase().trim();if(t==="auto")return"auto";if(t==="full")return"full";if(t==="soft"||t==="disabled")return t}return"soft"}function $u(e="soft"){switch(e){case"auto":{A.session.styleMap=new Map,A.session.nodeMap=new Map;return}case"soft":{A.session.styleMap=new Map,A.session.nodeMap=new Map,A.session.styleCache=new WeakMap;return}case"full":return;case"disabled":{A.session.styleMap=new Map,A.session.nodeMap=new Map,A.session.styleCache=new WeakMap,A.computedStyle=new WeakMap,A.measureHints=new WeakMap,A.baseStyle=new he(50),A.defaultStyle=new he(30),A.image=new he(100),A.background=new he(100),A.resource=new he(150),A.compress=new he(50),A.font=new Set;return}default:{A.session.styleMap=new Map,A.session.nodeMap=new Map,A.session.styleCache=new WeakMap;return}}}var he,A,ge=be(()=>{"use strict";he=class extends Map{constructor(e=100,...t){super(...t),this._maxSize=e}set(e,t){if(this.size>=this._maxSize&&!this.has(e)){let n=this.keys().next().value;n!==void 0&&this.delete(n)}return super.set(e,t)}},A={image:new he(100),background:new he(100),resource:new he(150),defaultStyle:new he(30),baseStyle:new he(50),compress:new he(50),computedStyle:new WeakMap,measureHints:new WeakMap,burstAdvice:new WeakMap,warnedReconcile:!1,font:new Set,session:{styleMap:new Map,styleCache:new WeakMap,nodeMap:new Map}}});function wo(e){let t=e.match(/url\((['"]?)(.*?)(\1)\)/);if(!t)return null;let n=t[2].trim();return n.startsWith("#")?null:n}function cs(e,t=1){let n=e.match(/^\s*-?(?:webkit-)?image-set\(([\s\S]*)\)\s*$/i);if(!n)return null;let r=[];for(let o of n[1].split(",")){let i=o.match(/url\((['"]?)(.*?)(\1)\)/);if(!i)continue;let a=o.match(/type\(\s*["']([^"']+)["']\s*\)/i);if(a&&!us.test(a[1].trim()))continue;let s=o.match(/(\d+(?:\.\d+)?)\s*(x|dpi|dppx)/i),l=1;if(s){let c=parseFloat(s[1]);l=/dpi/i.test(s[2])?c/96:c}r.push({url:i[2].trim(),dppx:l})}return r.length?(r.sort((o,i)=>o.dppx-i.dppx),(r.find(o=>o.dppx>=t)||r[r.length-1]).url):null}function _u(e){if(!e||e==="none")return"";let t=e.replace(/translate[XY]?\([^)]*\)/g,"");return t=t.replace(/matrix\(([^)]+)\)/g,(n,r)=>{let o=r.split(",").map(i=>i.trim());return o.length!==6?`matrix(${r})`:(o[4]="0",o[5]="0",`matrix(${o.join(", ")})`)}),t=t.replace(/matrix3d\(([^)]+)\)/g,(n,r)=>{let o=r.split(",").map(i=>i.trim());return o.length!==16?`matrix3d(${r})`:(o[12]="0",o[13]="0",`matrix3d(${o.join(", ")})`)}),t.trim().replace(/\s{2,}/g," ")}function Pn(e){if(/%[0-9A-Fa-f]{2}/.test(e))return e;try{return encodeURI(e)}catch{return e}}function Ou(e,t){if(!e||/^(data|blob|about|#)/i.test(e.trim()))return e;try{let n=t||typeof document<"u"&&(document.baseURI||document.location?.href)||"http://localhost/";return new URL(e,n).href}catch{return e}}var us,Vn=be(()=>{"use strict";us=/^image\/(jpeg|jpg|png|gif|webp|avif|apng|svg\+xml|bmp|x-icon|vnd\.microsoft\.icon)\s*(;|$)/i});function Pu(e="[snapDOM]",{ttlMs:t=5*6e4,maxEntries:n=12}={}){let r=new Map,o=0;function i(a,s,l){if(o>=n)return;let c=Date.now();(r.get(s)||0)>c||(r.set(s,c+t),o++,a==="warn"&&console&&console.warn?console.warn(`${e} ${l}`):console&&console.error&&console.error(`${e} ${l}`))}return{warnOnce(a,s){i("warn",a,s)},errorOnce(a,s){i("error",a,s)},reset(){r.clear(),o=0}}}function Du(e){return/^data:|^blob:|^about:blank$/i.test(e)}function Wu(e,t){try{let n=typeof location<"u"&&location.href?location.href:"http://localhost/",r=t.includes("{url}")?t.split("{url}")[0]:t,o=new URL(r||".",n),i=new URL(e,n);if(i.origin===o.origin)return!0;let a=i.searchParams;if(a&&(a.has("url")||a.has("target")))return!0}catch{}return!1}function Bu(e,t){if(!t||Du(e)||Wu(e,t))return!1;try{let n=typeof location<"u"&&location.href?location.href:"http://localhost/",r=new URL(e,n);return typeof location<"u"?r.origin!==location.origin:!0}catch{return!!t}}function Hu(e,t){if(!t)return e;if(t.includes("{url}"))return t.replace("{urlRaw}",Pn(e)).replace("{url}",encodeURIComponent(e));if(/[?&]url=?$/.test(t))return`${t}${encodeURIComponent(e)}`;if(t.endsWith("?"))return`${t}url=${encodeURIComponent(e)}`;if(t.endsWith("/"))return`${t}${Pn(e)}`;let n=t.includes("?")?"&":"?";return`${t}${n}url=${encodeURIComponent(e)}`}function Ra(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>t(String(r.result||"")),r.onerror=()=>n(new Error("read_failed")),r.readAsDataURL(e)})}function Uu(e,t){return[t.as||"blob",t.timeout??3e3,t.useProxy||"",t.errorTTL??8e3,e].join("|")}async function xe(e,t={}){let n=t.as??"blob",r=t.timeout??3e3,o=t.useProxy||"",i=t.errorTTL??8e3,a=t.headers||{},s=!!t.silent;if(/^data:/i.test(e))try{if(n==="text")return{ok:!0,data:String(e),status:200,url:e,fromCache:!1};if(n==="dataURL")return{ok:!0,data:String(e),status:200,url:e,fromCache:!1,mime:String(e).slice(5).split(";")[0]||""};let[,y="",g=""]=String(e).match(/^data:([^,]*),(.*)$/)||[],w=/;base64/i.test(y)?atob(g):decodeURIComponent(g),v=new Uint8Array([...w].map(S=>S.charCodeAt(0))),b=new Blob([v],{type:(y||"").split(";")[0]||""});return{ok:!0,data:b,status:200,url:e,fromCache:!1,mime:b.type||""}}catch{return{ok:!1,data:null,status:0,url:e,fromCache:!1,reason:"special_url_error"}}if(/^blob:/i.test(e))try{let y=await fetch(e);if(!y.ok)return{ok:!1,data:null,status:y.status,url:e,fromCache:!1,reason:"http_error"};let g=await y.blob(),w=g.type||y.headers.get("content-type")||"";return n==="dataURL"?{ok:!0,data:await Ra(g),status:y.status,url:e,fromCache:!1,mime:w}:n==="text"?{ok:!0,data:await g.text(),status:y.status,url:e,fromCache:!1,mime:w}:{ok:!0,data:g,status:y.status,url:e,fromCache:!1,mime:w}}catch{return{ok:!1,data:null,status:0,url:e,fromCache:!1,reason:"network"}}if(/^about:blank$/i.test(e))return n==="dataURL"?{ok:!0,data:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==",status:200,url:e,fromCache:!1,mime:"image/png"}:{ok:!0,data:n==="text"?"":new Blob([]),status:200,url:e,fromCache:!1};let l=Uu(e,{as:n,timeout:r,useProxy:o,errorTTL:i}),c=Et.get(l);if(c&&c.until>Date.now())return{...c.result,fromCache:!0};c&&Et.delete(l);let u=En.get(l);if(u)return u;let d=Bu(e,o)?Hu(e,o):e,f=t.credentials;if(!f)try{let y=typeof location<"u"&&location.href?location.href:"http://localhost/",g=new URL(e,y);f=typeof location<"u"&&g.origin===location.origin?"include":"omit"}catch{f="omit"}let m=new AbortController,p=setTimeout(()=>m.abort("timeout"),r),h=(async()=>{try{let y=await fetch(d,{signal:m.signal,credentials:f,headers:a});if(!y.ok){let v={ok:!1,data:null,status:y.status,url:d,fromCache:!1,reason:"http_error"};if(i>0&&Et.set(l,{until:Date.now()+i,result:v}),!s){let b=`${y.status} ${y.statusText||""}`.trim();Qr.warnOnce(`http:${y.status}:${n}:${new URL(e,location?.href??"http://localhost/").origin}`,`HTTP error ${b} while fetching ${n} ${e}`)}return t.onError&&t.onError(v),v}if(n==="text")return{ok:!0,data:await y.text(),status:y.status,url:d,fromCache:!1};let g=await y.blob(),w=g.type||y.headers.get("content-type")||"";return n==="dataURL"?{ok:!0,data:await Ra(g),status:y.status,url:d,fromCache:!1,mime:w}:{ok:!0,data:g,status:y.status,url:d,fromCache:!1,mime:w}}catch(y){let g=y&&typeof y=="object"&&"name"in y&&y.name==="AbortError"?String(y.message||"").includes("timeout")?"timeout":"abort":"network",w={ok:!1,data:null,status:0,url:d,fromCache:!1,reason:g};if(!/^blob:/i.test(e)&&i>0&&Et.set(l,{until:Date.now()+i,result:w}),!s){let v=`${g}:${n}:${new URL(e,location?.href??"http://localhost/").origin}`,b=g==="timeout"?`Timeout after ${r}ms. Consider increasing timeout or using a proxy for ${e}`:g==="abort"?`Request aborted while fetching ${n} ${e}`:`Network/CORS issue while fetching ${n} ${e}. A proxy may be required`;Qr.errorOnce(v,b)}return t.onError&&t.onError(w),w}finally{clearTimeout(p),En.delete(l)}})();return En.set(l,h),h}var Qr,En,Et,rt=be(()=>{"use strict";Vn(),Qr=Pu("[snapDOM]",{ttlMs:3*6e4,maxEntries:10}),En=new Map,Et=new Map});async function ds(e,t={}){if(/^((repeating-)?(linear|radial|conic)-gradient)\(/i.test(e)||e.trim()==="none")return e;let n=cs(e,typeof devicePixelRatio<"u"&&devicePixelRatio||1)??wo(e);if(!n)return e;let r=Ou(n),o=Pn(r),i=(t.useProxy||"")+"|"+o;if(A.background.has(i)){let a=A.background.get(i);return a?`url("${a}")`:"none"}try{let a=await xe(o,{as:"dataURL",useProxy:t.useProxy});return a.ok?(A.background.set(i,a.data),`url("${a.data}")`):(A.background.set(i,null),"none")}catch{return A.background.set(i,null),"none"}}var Vu=be(()=>{"use strict";ge(),Vn(),rt()});function fs(e){if(e=String(e).toLowerCase(),So.has(e)){let i={};return A.defaultStyle.set(e,i),i}if(A.defaultStyle.has(e))return A.defaultStyle.get(e);let t=document.getElementById("snapdom-sandbox");t||(t=document.createElement("div"),t.id="snapdom-sandbox",t.setAttribute("data-snapdom-sandbox","true"),t.setAttribute("aria-hidden","true"),t.style.position="absolute",t.style.left="-9999px",t.style.top="-9999px",t.style.width="0px",t.style.height="0px",t.style.overflow="hidden",document.body.appendChild(t));let n=document.createElement(e);n.style.all="initial",t.appendChild(n);let r=getComputedStyle(n),o={};for(let i of r){if(vo(i))continue;let a=r.getPropertyValue(i);o[i]=a}return t.removeChild(n),A.defaultStyle.set(e,o),o}function vo(e){let t=no.get(e);if(t===void 0){let n=String(e).toLowerCase();t=ys.has(n)||gs.test(n)||hs.test(n),no.set(e,t)}return t}function ps(e,t){return!ws.has(e)&&(t==="inline"||bs.has(e)||Co.has(e))}function zu(e,t,n){let r=(t.display||"").toLowerCase();if(r==="inline"||Co.has(e))return!1;if(n)return!0;if((t.float||"none").toLowerCase()!=="none")return!1;let o=(t.position||"static").toLowerCase();return o==="absolute"||o==="fixed"?!1:!Cs.has(r)}function eo(e,t,n=!0,r=!1){if(t=String(t||"").toLowerCase(),So.has(t))return"";let o=[],i=fs(t),a=(e.display||"").toLowerCase(),s=a==="inline",l=ps(t,a),c=e["text-wrap-mode"]||e["white-space"]||"",u=l&&n&&!s&&(c==="nowrap"||c==="pre"),d=l&&n&&!u,f=!1;for(let m in e){if(vo(m))continue;let p=e[m];if(d){if(vs.has(m))continue;if(Ss.has(m)){p&&p!==i[m]&&(o.push(`${m}:${p}`),p!=="auto"&&(f=!0));continue}}if(p&&p!==i[m]){if(!u&&(m==="width"||m==="inline-size")&&p.endsWith("px")&&p.includes(".")){let h=parseFloat(p);if(Number.isFinite(h)){o.push(`${m}:${Math.ceil(h*16)/16}px`);continue}}o.push(`${m}:${p}`)}}if(d&&!s&&!r&&!f){let m=e.width;m&&m!=="auto"&&m!==i.width&&o.push(`min-width:${m}`)}return o.sort(),o.join(";")}function Gu(e){let t=new Set;return e.nodeType!==Node.ELEMENT_NODE&&e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?[]:(e.tagName&&t.add(e.tagName.toLowerCase()),typeof e.querySelectorAll=="function"&&e.querySelectorAll("*").forEach(n=>t.add(n.tagName.toLowerCase())),Array.from(t))}function qu(e){let t=new Map;for(let r of e){let o=fs(r);if(!o)continue;let i=Object.entries(o).map(([a,s])=>`${a}:${s};`).sort().join("");i&&(t.has(i)||t.set(i,[]),t.get(i).push(r))}let n="";for(let[r,o]of t.entries())n+=`${o.join(",")} { ${r} }
|
|
75
|
+
`;return n}function ju(e){let t=Array.from(new Set(e.values())).filter(Boolean).sort(),n=new Map,r=1;for(let o of t)n.set(o,`c${r++}`);return n}function Yu(e){try{let t=e?.ownerDocument;if(!t)return typeof window<"u"?window:null;let n=t.defaultView;if(n&&typeof n.getComputedStyle=="function")return n;if(typeof window<"u"&&window.frames)for(let r=0;r<window.frames.length;r++)try{if(window.frames[r]?.document===t)return window.frames[r]}catch{}}catch{}return typeof window<"u"?window:null}function J(e,t=null){let n=()=>{let i={length:0,getPropertyValue:()=>"",item:()=>""};return i[Symbol.iterator]=function*(){},i};if(e?.nodeType!==1){let i=typeof window<"u"?window:null;if(i&&typeof i.getComputedStyle=="function")try{return i.getComputedStyle(e,t)||n()}catch{return n()}return n()}let r=A.computedStyle.get(e);r||(r=new Map,A.computedStyle.set(e,r));let o=r.get(t);if(!o){let i=Yu(e),a=null;try{a=i&&typeof i.getComputedStyle=="function"?i.getComputedStyle(e,t):null}catch{}if(!a&&typeof window<"u"&&typeof window.getComputedStyle=="function")try{e.ownerDocument===document&&(a=window.getComputedStyle(e,t))}catch{}o=a||n(),r.set(t,o)}return o}function Na(e){let t={};for(let n of e)t[n]=e.getPropertyValue(n);for(let n of xs){let r=t[`border-${n}-style`],o=t[`border-${n}-width`];(r==="none"||r==="hidden"||o==="0px")&&(delete t[`border-${n}-style`],delete t[`border-${n}-width`],delete t[`border-${n}-color`])}return t}function to(e){let t=[],n=0,r=0;for(let o=0;o<e.length;o++){let i=e[o];i==="("&&n++,i===")"&&n--,i===","&&n===0&&(t.push(e.slice(r,o).trim()),r=o+1)}return t.push(e.slice(r).trim()),t}var ms,So,Zu,hs,gs,ys,no,bs,Co,ws,vs,Ss,Cs,xs,zn=be(()=>{"use strict";ge(),ms=new Set(["meta","script","noscript","title","link","template"]),So=new Set(["meta","link","style","title","noscript","script","template","g","defs","use","marker","mask","clipPath","pattern","symbol","path","polygon","polyline","line","circle","ellipse","rect","filter","lineargradient","radialgradient","stop"]),Zu=["div","span","p","a","img","ul","li","button","input","select","textarea","label","section","article","header","footer","nav","main","aside","h1","h2","h3","h4","h5","h6","table","thead","tbody","tr","td","th"],hs=/(?:^|-)(animation|transition)(?:-|$)/i,gs=/^(--.+|view-timeline|scroll-timeline|animation-trigger|offset-|position-try|app-region|interactivity|overlay|view-transition|-webkit-locale|-webkit-user-(?:drag|modify)|-webkit-tap-highlight-color|-webkit-text-security)$/i,ys=new Set(["cursor","pointer-events","touch-action","user-select","print-color-adjust","speak","reading-flow","reading-order","anchor-name","anchor-scope","container-name","container-type","timeline-scope","zoom","stroke-color"]),no=new Map,bs=new Set(["span","small","em","strong","b","i","u","s","code","cite","mark","sub","sup"]),Co=new Set(["table","thead","tbody","tfoot","tr","td","th"]),ws=new Set(["img","video","canvas","svg","iframe","embed","object","input","textarea","select"]),vs=new Set(["width","max-width","inline-size","max-inline-size"]),Ss=new Set(["min-width","min-inline-size"]),Cs=new Set(["inline-block","inline-flex","inline-grid","inline-table","inline-flow-root","table"]),xs=["top","right","bottom","left"]});function kn(e,{fast:t=!1}={}){if(t)return e();"requestIdleCallback"in window?requestIdleCallback(e,{timeout:50}):setTimeout(e,1)}function tt(e=1e3){return typeof requestAnimationFrame!="function"||typeof document<"u"&&document.visibilityState==="hidden"?Promise.resolve():new Promise(t=>{let n=!1,r=()=>{n||(n=!0,t())};try{requestAnimationFrame(r)}catch{r();return}setTimeout(r,e)})}function Ku(){if(typeof navigator>"u")return!1;if(navigator.userAgentData)return navigator.userAgentData.platform==="iOS";let e=navigator.userAgent||"",t=/iPhone|iPad|iPod/.test(e),n=navigator.maxTouchPoints>2&&/Macintosh/.test(e);return t||n}function De(){if(typeof navigator>"u")return!1;let e=navigator.userAgent||"",t=e.toLowerCase(),n=t.includes("safari")&&!t.includes("chrome")&&!t.includes("crios")&&!t.includes("fxios")&&!t.includes("android"),r=/applewebkit/i.test(e),o=/mobile/i.test(e),i=!/safari/i.test(e),a=r&&o&&i,s=/(micromessenger|wxwork|wecom|windowswechat|macwechat)/i.test(e),l=/(baiduboxapp|baidubrowser|baidusearch|baiduboxlite)/i.test(t),c=/ipad|iphone|ipod/.test(t)&&r;return n||a||s||l||c}function Xu(){if(typeof navigator>"u")return!1;let e=(navigator.userAgent||"").toLowerCase();return e.includes("firefox")||e.includes("fxios")}var ot=be(()=>{"use strict"});function Q(e,t,n){let r=e&&typeof e=="object"&&(e.options||e);r&&r.debug&&(n!==void 0?console.warn("[snapdom]",t,n):console.warn("[snapdom]",t))}var Is=be(()=>{"use strict"}),Ee=be(()=>{"use strict";Vu(),zn(),ot(),Vn(),Is()}),As={};Nt(As,{decodeSvgFromDataURL:()=>xo,encodeSvgToDataURL:()=>Io,fixSafariShadows:()=>Ao,toCanvas:()=>Gn});function Ju(e){try{let t=e.match(/<svg\b[^>]*>/i);if(!t)return e;let n=t[0],r=parseFloat((n.match(/\bwidth="([\d.]+)/i)||[])[1]),o=parseFloat((n.match(/\bheight="([\d.]+)/i)||[])[1]);if(!Number.isFinite(r)||!Number.isFinite(o)||r<=0||o<=0)return e;let i=Math.min(1,Pe/r,Pe/o,Math.sqrt(Dn/(r*o)));if(i>=1)return e;let a=Math.max(1,Math.floor(r*i)),s=Math.max(1,Math.floor(o*i));return console.warn(`[snapDOM] Capture ${Math.round(r)}\xD7${Math.round(o)}px exceeds the browser image-decode limit (${Pe}px/side); downscaling to ${a}\xD7${s}px. Lower \`scale\` or set \`width\`/\`height\` to control output size.`),e.replace(n,n.replace(/(\bwidth=")[\d.]+/i,`$1${a}`).replace(/(\bheight=")[\d.]+/i,`$1${s}`))}catch{return e}}function Qu(e,t){let n=["x","y","width","height"].map(x=>Number(t?.[x]));if(!n.every(Number.isFinite)||n[2]<=0||n[3]<=0)throw new RangeError("[snapdom] canvas crop requires finite x/y and positive width/height");let r=e.match(/<svg\b[^>]*>/i);if(!r)throw new Error("[snapdom] cannot crop a non-SVG capture");let o=r[0],i=(o.match(/\bviewBox="([^"]+)"/i)||[])[1],a=String(i||"").trim().split(/[\s,]+/).map(Number);if(a.length!==4||!a.every(Number.isFinite)||a[2]<=0||a[3]<=0)throw new Error("[snapdom] cannot crop an SVG without a finite viewBox");let[s,l,c,u]=a,d=Math.max(s,n[0]),f=Math.max(l,n[1]),m=Math.min(s+c,n[0]+n[2]),p=Math.min(l+u,n[1]+n[3]);if(!(m>d)||!(p>f))throw new RangeError("[snapdom] canvas crop does not intersect the SVG viewBox");let h=parseFloat((o.match(/\bwidth="([\d.]+)/i)||[])[1]),y=parseFloat((o.match(/\bheight="([\d.]+)/i)||[])[1]),g=Number.isFinite(h)&&h>0?h/c:1,w=Number.isFinite(y)&&y>0?y/u:1,v=Math.max(1,(m-d)*g),b=Math.max(1,(p-f)*w),S=o.replace(/(\bwidth=")[^"]*/i,`$1${v}`).replace(/(\bheight=")[^"]*/i,`$1${b}`).replace(/(\bviewBox=")[^"]*/i,`$1${d} ${f} ${m-d} ${p-f}`);return e.replace(o,S)}function La(e){return typeof e=="string"&&/^data:image\/svg\+xml/i.test(e)}function xo(e){let t=e.indexOf(",");return t>=0?decodeURIComponent(e.slice(t+1)):""}function ed(e){let t=e.indexOf(",");if(t<0)return"";let n=e.slice(t+1,t+1201).replace(/%[0-9A-Fa-f]?$/,"");try{return decodeURIComponent(n)}catch{return""}}function Io(e){return`data:image/svg+xml;charset=utf-8,${encodeURIComponent(e)}`}function Ms(e){let t=[],n="",r=0;for(let o=0;o<e.length;o++){let i=e[o];i==="("&&r++,i===")"&&(r=Math.max(0,r-1)),i===";"&&r===0?(t.push(n),n=""):n+=i}return n.trim()&&t.push(n),t.map(o=>o.trim()).filter(Boolean)}function td(e){let t=[],n="",r=0;for(let i=0;i<e.length;i++){let a=e[i];a==="("&&r++,a===")"&&(r=Math.max(0,r-1)),a===","&&r===0?(t.push(n.trim()),n=""):n+=a}n.trim()&&t.push(n.trim());let o=[];for(let i of t){if(/\binset\b/i.test(i))continue;let a=i.match(/-?\d+(?:\.\d+)?px/gi)||[],[s="0px",l="0px",c="0px"]=a;c=`${parseFloat(c)/2}px`;let u=i.replace(/-?\d+(?:\.\d+)?px/gi,"").replace(/\binset\b/ig,"").trim().replace(/\s{2,}/g," "),d=!!u&&u!==",";o.push(`drop-shadow(${s} ${l} ${c}${d?` ${u}`:""})`)}return o.join(" ")}function Es(e){let t=Ms(e),n=null,r=null,o=null,i=[];for(let s of t){let l=s.indexOf(":");if(l<0)continue;let c=s.slice(0,l).trim().toLowerCase(),u=s.slice(l+1).trim();c==="box-shadow"?o=u:c==="filter"?n=u:c==="-webkit-filter"?r=u:i.push([c,u])}if(o){let s=td(o);s&&(n=n?`${n} ${s}`:s,r=r?`${r} ${s}`:s)}let a=[...i];return n&&a.push(["filter",n]),r&&a.push(["-webkit-filter",r]),a.map(([s,l])=>`${s}:${l}`).join(";")}function nd(e){return e.replace(/([^{}]+)\{([^}]*)\}/g,(t,n,r)=>`${n}{${Es(r)}}`)}function rd(e){return e=e.replace(/<style[^>]*>([\s\S]*?)<\/style>/gi,(t,n)=>t.replace(n,nd(n))),e=e.replace(/style=(['"])([\s\S]*?)\1/gi,(t,n,r)=>`style=${n}${Es(r)}${n}`),e}function od(){return Tn||(Tn=(async()=>{try{let e='<svg xmlns="http://www.w3.org/2000/svg" width="8" height="20"><foreignObject width="8" height="20"><div xmlns="http://www.w3.org/1999/xhtml" style="width:4px;height:4px;margin-top:8px;background:#000;box-shadow:0 8px 0 0 #000"></div></foreignObject></svg>',t=new Image;t.decoding="sync",t.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(e)}`,await t.decode();let n=document.createElement("canvas");n.width=8,n.height=20;let r=n.getContext("2d",{willReadFrequently:!0});r.drawImage(t,0,0);let o=r.getImageData(2,18,1,1).data[3]>128,i=r.getImageData(2,2,1,1).data[3]>128;return{native:o||i,flippedY:i&&!o}}catch{return{native:!1,flippedY:!1}}})(),Tn)}function id(e){let t=[],n=0,r=0;for(let o=0;o<e.length;o++){let i=e[o];i==="("?n++:i===")"?n=Math.max(0,n-1):i===","&&n===0&&(t.push(e.slice(r,o)),r=o+1)}return t.push(e.slice(r)),t.map(o=>{let i=0,a=0,s="",l=0;for(;l<o.length;){let c=o[l];if(c==="("?i++:c===")"&&(i=Math.max(0,i-1)),i===0&&(l===0||o[l-1]===" ")){let u=/^-?\d*\.?\d+px/.exec(o.slice(l));if(u){a++,s+=a===2?`${-parseFloat(u[0])}px`:u[0],l+=u[0].length;continue}}s+=c,l++}return s}).join(",")}function ad(e,t){let n=r=>Ms(r).map(o=>{let i=o.indexOf(":");if(i<0)return o;let a=o.slice(0,i).trim().toLowerCase();return a==="text-shadow"||t&&a==="box-shadow"?`${a}:${id(o.slice(i+1))}`:o}).join(";");return e=e.replace(/<style[^>]*>([\s\S]*?)<\/style>/gi,(r,o)=>r.replace(o,o.replace(/([^{}]+)\{([^}]*)\}/g,(i,a,s)=>`${a}{${n(s)}}`))),e=e.replace(/style=(['"])([\s\S]*?)\1/gi,(r,o,i)=>`style=${o}${n(i)}${o}`),e}async function Ao(e){if(!/(?:box-shadow|text-shadow)\s*:[^;"}]*px/i.test(e))return{svg:e,naturalOnly:!1};let{native:t,flippedY:n}=await od();try{let r=e;return t||(r=rd(r)),n&&(r=ad(r,t)),{svg:r,naturalOnly:!0}}catch{return{svg:e,naturalOnly:!0}}}async function sd(e,t){e.setAttribute("data-snapdom-internal",""),e.style.cssText="position:fixed;left:-99999px;top:-99999px;pointer-events:none",document.body.appendChild(e);try{let n=document.createElement("canvas");n.width=16,n.height=16;let r=()=>new Promise(a=>{requestAnimationFrame(a),setTimeout(a,50)}),o=n.getContext("2d",{willReadFrequently:!0});if(!o){await r(),await r();return}let i=performance.now()+(t?600:150);for(;;){o.clearRect(0,0,16,16);try{o.drawImage(e,0,0,16,16)}catch{return}let a=o.getImageData(0,0,16,16).data,s=!1;for(let l=3;l<a.length;l+=4)if(a[l]>0){s=!0;break}if(s||performance.now()>i)return;await r()}}finally{try{e.remove()}catch{}}}async function Gn(e,t){let{width:n,height:r,scale:o=1,dpr:i=1,meta:a={},backgroundColor:s,crop:l=null}=t,c=e,u=!1,d=!1;if(l&&!La(e))throw new RangeError("[snapdom] canvas crop requires an SVG capture payload");if(La(e)){let k=(ed(e).match(/<svg\b[^>]*>/i)||[])[0]||"",T=parseFloat((k.match(/\bwidth="([\d.]+)/i)||[])[1]),F=parseFloat((k.match(/\bheight="([\d.]+)/i)||[])[1]),D=Number.isFinite(T)&&Number.isFinite(F)&&T>0&&F>0&&Math.min(1,Pe/T,Pe/F,Math.sqrt(Dn/(T*F)))<1;if(l||D||De())try{let R=xo(e);if(l&&(R=Qu(R,l)),De()){let _=await Ao(R);R=_.svg,u=_.naturalOnly,d=/@font-face|data:image\//i.test(R)}(D||l)&&(R=Ju(R)),c=Io(R)}catch(R){if(l)throw R;c=e}}let f=new Image;f.loading="eager",f.decoding="sync",f.crossOrigin="anonymous",f.src=c,await f.decode(),De()&&await sd(f,d);let m=f.naturalWidth,p=f.naturalHeight,h=l?m:Number.isFinite(a.vbW)?a.vbW:Number.isFinite(a.w0)?a.w0:m,y=l?p:Number.isFinite(a.vbH)?a.vbH:Number.isFinite(a.h0)?a.h0:p,g,w,v=Number.isFinite(n),b=Number.isFinite(r);if(v&&b)g=Math.max(1,n),w=Math.max(1,r);else if(v){let k=n/Math.max(1,h);g=n,w=y*k}else if(b){let k=r/Math.max(1,y);w=r,g=h*k}else g=m,w=p;g=g*o,w=w*o;let S=g*i,x=w*i,I=Math.max(S/Pe,x/Pe,Math.sqrt(S*x/Dn));I>1&&(console.warn(`[snapDOM] Output ${Math.round(S)}\xD7${Math.round(x)}px exceeds the browser canvas limit (${Pe}px/side); downscaling. Lower \`scale\`/\`dpr\` or set \`width\`/\`height\`.`),g/=I,w/=I);let C=document.createElement("canvas");C.width=g*i,C.height=w*i,C.style.width=`${g}px`,C.style.height=`${w}px`;let E=C.getContext("2d");if(i!==1&&E.scale(i,i),s&&(E.save(),E.fillStyle=s,E.fillRect(0,0,g,w),E.restore()),u&&(Math.round(g*i)!==m||Math.round(w*i)!==p)){let k=document.createElement("canvas");k.width=m,k.height=p,k.getContext("2d").drawImage(f,0,0),E.drawImage(k,0,0,g,w)}else E.drawImage(f,0,0,g,w);return C}var Pe,Dn,Tn,Lt=be(()=>{"use strict";ot(),Pe=16384,Dn=16384*16384,Tn=null}),Rn={};Nt(Rn,{rasterize:()=>ks});async function ks(e,t){let n=await Gn(e,t),r=await new Promise(i=>{let a=()=>i(n.toDataURL(`image/${t.format}`,t.quality));try{n.toBlob(s=>{if(!s)return a();let l=new FileReader;l.onload=()=>i(String(l.result||"")),l.onerror=a,l.readAsDataURL(s)},`image/${t.format}`,t.quality)}catch{a()}}),o=new Image;return o.src=r,await o.decode(),o.style.width=`${n.width/t.dpr}px`,o.style.height=`${n.height/t.dpr}px`,o}var Nn=be(()=>{"use strict";Lt()}),ro={};Nt(ro,{toImg:()=>Fa,toSvg:()=>Fa});async function Fa(e,t){let{scale:n=1,width:r,height:o,meta:i={}}=t,a=Number.isFinite(r),s=Number.isFinite(o),l=Number.isFinite(n)&&n!==1||a||s;if(De()&&l)try{let{svg:u}=await Ao(xo(e)),d=(u.match(/<svg\b[^>]*>/i)||[])[0]||"",f=parseFloat((d.match(/\bwidth="([\d.]+)/i)||[])[1]),m=parseFloat((d.match(/\bheight="([\d.]+)/i)||[])[1]);if(!Number.isFinite(f)||!Number.isFinite(m))throw new Error("svg without dimensions");let p=Number.isFinite(i.vbW)?i.vbW:Number.isFinite(i.w0)?i.w0:f,h=Number.isFinite(i.vbH)?i.vbH:Number.isFinite(i.h0)?i.h0:m,y,g;a&&s?(y=r,g=o):a?(y=r,g=Math.round(h*(r/Math.max(1,p)))):s?(g=o,y=Math.round(p*(o/Math.max(1,h)))):(y=Math.round(f*n),g=Math.round(m*n));let w=u.replace(/width="[^"]*"/,`width="${y}"`).replace(/height="[^"]*"/,`height="${g}"`),v=new Image;return v.decoding="sync",v.loading="eager",v.src=Io(w),await v.decode(),v.style.width=`${y}px`,v.style.height=`${g}px`,v}catch(u){return Q(t,"safari vector toImg failed, falling back to PNG",u),ks(e,{...t,format:"png",quality:1,meta:i})}let c=new Image;if(c.decoding="sync",c.loading="eager",c.src=e,await c.decode(),a&&s)c.style.width=`${r}px`,c.style.height=`${o}px`;else if(a){let u=Number.isFinite(i.vbW)?i.vbW:Number.isFinite(i.w0)?i.w0:c.naturalWidth,d=Number.isFinite(i.vbH)?i.vbH:Number.isFinite(i.h0)?i.h0:c.naturalHeight,f=r/Math.max(1,u);c.style.width=`${r}px`,c.style.height=`${Math.round(d*f)}px`}else if(s){let u=Number.isFinite(i.vbW)?i.vbW:Number.isFinite(i.w0)?i.w0:c.naturalWidth,d=Number.isFinite(i.vbH)?i.vbH:Number.isFinite(i.h0)?i.h0:c.naturalHeight,f=o/Math.max(1,d);c.style.height=`${o}px`,c.style.width=`${Math.round(u*f)}px`}else{let u=Math.round(c.naturalWidth*n),d=Math.round(c.naturalHeight*n);if(c.style.width=`${u}px`,c.style.height=`${d}px`,typeof e=="string"&&e.startsWith("data:image/svg+xml"))try{let f=decodeURIComponent(e.split(",")[1]).replace(/width="[^"]*"/,`width="${u}"`).replace(/height="[^"]*"/,`height="${d}"`);e=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(f)}`,c.src=e}catch(f){Q(t,"SVG width/height patch in toImg failed",f)}}return c}var $a=be(()=>{"use strict";Ee(),Nn(),Lt()}),Ts={};Nt(Ts,{toBlob:()=>Rs});async function Rs(e,t){let n=t.type;if(n==="svg"){let o=decodeURIComponent(e.split(",")[1]);return new Blob([o],{type:"image/svg+xml"})}let r=await Gn(e,t);return new Promise(o=>r.toBlob(i=>o(i),`image/${n}`,t.quality))}var Ns=be(()=>{"use strict";Lt()}),Ls={};Nt(Ls,{download:()=>ld});async function _a(e,t){let n=new File([e],t,{type:e.type});if(!navigator.canShare?.({files:[n]}))return!1;try{await navigator.share({files:[n],title:t})}catch(r){if(r.name!=="AbortError")return!1}return!0}async function ld(e,t){let n=new Set(["png","jpeg","jpg","webp","svg"]),r=(t?.type||"").toLowerCase(),o=n.has(r)?r:"",i=(t?.format||o||"").toLowerCase(),a=i==="jpg"?"jpeg":i||"png",s=t?.filename||`snapdom.${a}`,l={...t||{},format:a,type:a};l.dpr=1;let c=Ku();if(a==="svg"){let f=await Rs(e,{...l,type:"svg"});if(c&&await _a(f,s))return;let m=URL.createObjectURL(f),p=document.createElement("a");p.href=m,p.download=s,document.body.appendChild(p),p.click(),URL.revokeObjectURL(m),p.remove();return}let u=await Gn(e,l);if(c){let f=`image/${a}`,m=await new Promise(p=>u.toBlob(p,f,t?.quality));if(m&&await _a(m,s))return}let d=document.createElement("a");d.href=u.toDataURL(`image/${a}`,t?.quality),d.download=s,document.body.appendChild(d),d.click(),d.remove()}var cd=be(()=>{"use strict";Ns(),Lt(),ot()});Ee();Ee();ge();var oo=new WeakMap,Tt=new Map,ud=2e3,Wn=0;function Ln(){Wn++,Tt.size>ud&&Tt.clear()}var dd="[data-snapdom-sandbox],[data-snapdom-internal],[data-snapdom]";function Yr(e){let t=e&&(e.nodeType===1?e:e.parentElement);return!!(t&&t.closest&&t.closest(dd))}function Fs(e){for(let t of e)if(!Yr(t.target)){if(t.type==="childList"){let n=!0;for(let r of t.addedNodes)if(!Yr(r)){n=!1;break}if(n){for(let r of t.removedNodes)if(!Yr(r)){n=!1;break}}if(n)continue}return!0}return!1}var Oa=!1;function fd(e=document.documentElement){if(Oa)return;Oa=!0;let t=n=>{Fs(n)&&Ln()};try{new MutationObserver(t).observe(e,{subtree:!0,childList:!0,characterData:!0,attributes:!0})}catch{}try{new MutationObserver(t).observe(document.head,{subtree:!0,childList:!0,characterData:!0,attributes:!0})}catch{}try{let n=document.fonts;n&&(n.addEventListener?.("loadingdone",Ln),n.ready?.then(()=>Ln()).catch(()=>{}))}catch{}}var pd=["mask","mask-image","-webkit-mask","-webkit-mask-image","mask-source","mask-box-image-source","mask-border-source","-webkit-mask-box-image-source","border-image","border-image-source"];function Pa(e){let t=oo.get(e);if(t&&t.epoch===Wn){let n=t.snapshot&&t.snapshot.__needsBgInline;if(n!==void 0)return n}return!0}function md(e,t={}){let n={},r=t.excludeStyleProps;for(let d=0;d<e.length;d++){let f=e[d];if(vo(f)||r&&(r instanceof RegExp&&r.test(f)||typeof r=="function"&&r(f)))continue;let m=e.getPropertyValue(f);(f==="background-image"||f==="content")&&m.includes("url(")&&!m.includes("data:")&&(m="none"),n[f]=m}let o=["text-decoration-line","text-decoration-color","text-decoration-style","text-decoration-thickness","text-underline-offset","text-decoration-skip-ink"];for(let d of o)if(!n[d])try{let f=e.getPropertyValue(d);f&&(n[d]=f)}catch{}let i=["-webkit-text-stroke","-webkit-text-stroke-width","-webkit-text-stroke-color","paint-order"];for(let d of i)if(!n[d])try{let f=e.getPropertyValue(d);f&&(n[d]=f)}catch{}if(t.embedFonts){let d=["font-feature-settings","font-variation-settings","font-kerning","font-variant","font-variant-ligatures","font-optical-sizing"];for(let f of d)if(!n[f])try{let m=e.getPropertyValue(f);m&&(n[f]=m)}catch{}}try{(n["content-visibility"]||e.getPropertyValue("content-visibility"))==="hidden"&&(n["content-visibility"]="hidden")}catch{}let a=!1;{let d=e.getPropertyValue("background-image");if(d&&d!=="none"&&(a=!0),!a){let f=e.getPropertyValue("background-color");f&&f!=="rgba(0, 0, 0, 0)"&&f!=="transparent"&&(a=!0)}if(!a)for(let f of pd){let m=e.getPropertyValue(f);if(m&&m!=="none"){a=!0;break}}if(!a){let f=e.getPropertyValue("background");f&&/url\s*\(/i.test(f)&&(a=!0)}}Object.defineProperty(n,"__needsBgInline",{value:a,enumerable:!1});let s=parseFloat(e.getPropertyValue("border-top-width")||0)||0,l=parseFloat(e.getPropertyValue("border-right-width")||0)||0,c=parseFloat(e.getPropertyValue("border-bottom-width")||0)||0,u=parseFloat(e.getPropertyValue("border-left-width")||0)||0;if(s===0&&l===0&&c===0&&u===0){let d=(e.getPropertyValue("border-image-source")||"").trim(),f=d&&d!=="none",m=["border","border-top","border-right","border-bottom","border-left","border-width","border-style","border-color","border-top-width","border-top-style","border-top-color","border-right-width","border-right-style","border-right-color","border-bottom-width","border-bottom-style","border-bottom-color","border-left-width","border-left-style","border-left-color","border-block","border-block-width","border-block-style","border-block-color","border-inline","border-inline-width","border-inline-style","border-inline-color"];for(let p of m)delete n[p];f||(n.border="none")}return n}function hd(e){for(let t=e.firstChild;t;t=t.nextSibling){if(t.nodeType===3&&/\S/.test(t.nodeValue||""))return!0;if(t.nodeType===1){let n=J(t).position;if(n!=="absolute"&&n!=="fixed")return!0}}return!1}function gd(e,t,n){try{if(typeof e.computedStyleMap=="function"){let o=e.computedStyleMap().get("width");if(o!=null)return!Da(String(o).trim().toLowerCase())}}catch{}let r=e.style&&(e.style.width||e.style.inlineSize);return r&&!Da(String(r).trim().toLowerCase())?!0:bd(e,t)?n||wd(e,t):!1}var yd=new Set(["auto","min-content","max-content","stretch","fill-available","-webkit-fill-available"]);function Da(e){return yd.has(e)||e.startsWith("fit-content")}function bd(e,t){let n=e.getBoundingClientRect().width-(parseFloat(t.paddingLeft)||0)-(parseFloat(t.paddingRight)||0)-(parseFloat(t.borderLeftWidth)||0)-(parseFloat(t.borderRightWidth)||0);if(!(n>0))return!1;let r=1/0,o=-1/0,i=null;for(let a=e.firstChild;a;a=a.nextSibling){let s;if(a.nodeType===3){if(!/\S/.test(a.nodeValue||"")||(i=i||document.createRange(),i.selectNode(a),s=i.getBoundingClientRect(),!s.width&&!s.height))continue}else if(a.nodeType===1){let l=J(a);if(l.display==="none"||l.position==="absolute"||l.position==="fixed")continue;s=a.getBoundingClientRect()}else continue;s.left<r&&(r=s.left),s.right>o&&(o=s.right)}return o===-1/0?!1:o-r<n-.5}function wd(e,t){let n=e.parentElement;if(!n)return!1;let r=J(n),o=n.getBoundingClientRect().width-(parseFloat(r.paddingLeft)||0)-(parseFloat(r.paddingRight)||0)-(parseFloat(r.borderLeftWidth)||0)-(parseFloat(r.borderRightWidth)||0)-(parseFloat(t.marginLeft)||0)-(parseFloat(t.marginRight)||0);return o>0?Math.abs(e.getBoundingClientRect().width-o)>.5:!1}var Wa=new WeakMap;function vd(e){let t=Wa.get(e);return t||(t=Object.entries(e).sort((n,r)=>n[0]<r[0]?-1:n[0]>r[0]?1:0).map(([n,r])=>`${n}:${r}`).join(";"),Wa.set(e,t),t)}function Sd(e,t=null,n={}){let r=oo.get(e),o=!!(n&&n.embedFonts),i=n&&n.excludeStyleProps||null;if(r&&r.epoch===Wn&&r.embedFonts===o&&r.excludeStyleProps===i)return r.snapshot;let a=t||getComputedStyle(e),s=md(a,n);return Ed(e,a,s),oo.set(e,{epoch:Wn,snapshot:s,embedFonts:o,excludeStyleProps:i}),s}function Cd(e,t){return e&&e.session&&e.persist?e:e&&(e.styleMap||e.styleCache||e.nodeMap)?{session:e,persist:{snapshotKeyCache:Tt,defaultStyle:A.defaultStyle,baseStyle:A.baseStyle,image:A.image,resource:A.resource,background:A.background,font:A.font},options:t||{}}:{session:A.session,persist:{snapshotKeyCache:Tt,defaultStyle:A.defaultStyle,baseStyle:A.baseStyle,image:A.image,resource:A.resource,background:A.background,font:A.font},options:e||t||{}}}function xd(e,t,n){if(!(!e.style||e.style.length===0))for(let r=0;r<e.style.length;r++){let o=e.style[r],i=n.getPropertyValue(o);i&&t.style.setProperty(o,i)}}async function Ne(e,t,n,r){if(e.tagName==="STYLE")return;let o=Cd(n,r),i=o.options&&o.options.cache||"auto";i!=="disabled"&&fd(document.documentElement),i==="disabled"&&!o.session.__bumpedForDisabled&&(Ln(),Tt.clear(),o.session.__bumpedForDisabled=!0);let{session:a,persist:s}=o;if(!a.styleCache.has(e)){let y=null;try{y=getComputedStyle(e)}catch{}a.styleCache.set(e,y||getComputedStyle(document.documentElement))}let l=a.styleCache.get(e);e.getAttribute?.("style")&&xd(e,t,l);let c=l.getPropertyValue("animation-name");t&&t.style&&c&&c!=="none"&&t.style.setProperty("animation","none","important");let u=Sd(e,l,o.options),d=$s(e);if(d){let y=l.getPropertyValue("min-width");(!y||y==="auto"||y==="0px")&&(u["min-width"]="0px")}let f=e.tagName?.toLowerCase()||"div",m=vd(u),p=!0;if(ps(f,(u.display||"").toLowerCase())){p=hd(e),p&&zu(f,u,d)&&gd(e,l,d)&&(p=!1),m=`${m}|${f}${p?"|c":""}${d?"|f":""}`;let y=u["text-wrap-mode"]||u["white-space"]||"";p&&y!=="nowrap"&&y!=="pre"&&(a.reconcileRisk=(a.reconcileRisk||0)+1)}let h=s.snapshotKeyCache.get(m);h===void 0&&(h=eo(u,f,p,d),s.snapshotKeyCache.set(m,h)),a.styleMap.set(t,h)}function Id(e){return e.backgroundImage&&e.backgroundImage!=="none"||e.backgroundColor&&e.backgroundColor!=="rgba(0, 0, 0, 0)"&&e.backgroundColor!=="transparent"||(parseFloat(e.borderTopWidth)||0)>0||(parseFloat(e.borderBottomWidth)||0)>0||(parseFloat(e.paddingTop)||0)>0||(parseFloat(e.paddingBottom)||0)>0?!0:(e.overflowBlock||e.overflowY||"visible")!=="visible"}function $s(e){let t=e.parentElement;if(!t)return!1;let n=J(t).display||"";return n.includes("flex")||n.includes("grid")}function Ad(e){for(let r=e.firstChild;r;r=r.nextSibling)if(r.nodeType===3&&/\S/.test(r.nodeValue))return!0;let t=e.firstElementChild,n=e.lastElementChild;if(t&&t.tagName==="BR"||n&&n.tagName==="BR")return!0;for(let r=e.firstElementChild;r;r=r.nextElementSibling){let o=J(r);if(o.display==="none")continue;let i=o.position;if(i!=="absolute"&&i!=="fixed")return!0}return!1}function Md(e){let t=e.getBoundingClientRect().top,n=-1/0,r=null;for(let o=e.firstChild;o;o=o.nextSibling){if(o.nodeType===3){if(!/\S/.test(o.nodeValue||""))continue;r=r||document.createRange(),r.selectNode(o);let s=r.getBoundingClientRect();(s.width||s.height)&&(n=Math.max(n,s.bottom));continue}if(o.nodeType!==1)continue;let i=J(o);if(i.display==="none")continue;let a=i.position;a==="absolute"||a==="fixed"||i.float&&i.float!=="none"||(n=Math.max(n,o.getBoundingClientRect().bottom))}return n===-1/0?NaN:n-t}function Ed(e,t,n){if(e instanceof HTMLElement&&e.style&&e.style.height)return;let r=e.tagName&&e.tagName.toLowerCase();if(!r||!["div","section","article","main","aside","header","footer","nav"].includes(r)||t.aspectRatio&&t.aspectRatio!=="none"&&t.aspectRatio!=="auto")return;let o=t.display||"";if(o.includes("flex")||o.includes("grid"))return;let i=t.position;if(i==="absolute"||i==="fixed"||i==="sticky"||t.transform!=="none"||Id(t)||$s(e))return;let a=t.overflowX||t.overflow||"visible",s=t.overflowY||t.overflow||"visible";if(a!=="visible"||s!=="visible")return;let l=t.clip;if(l&&l!=="auto"&&l!=="rect(auto, auto, auto, auto)"||t.visibility==="hidden"||t.opacity==="0"||!Ad(e))return;let c=parseFloat(t.height),u=Md(e);Number.isFinite(c)&&Number.isFinite(u)&&Math.abs(c-u)>2||(delete n.height,delete n["block-size"])}zn();var _s=["fill","stroke","color","background-color","stop-color"],kd=new Set(["symbol","defs","pattern","marker","linearGradient","radialGradient","filter"]);function io(e){let t=e;for(;t&&t.nodeType===1;){if(t.namespaceURI==="http://www.w3.org/2000/svg"){if(t.localName==="mask"||t.localName==="clipPath")return!1;if(kd.has(t.localName))return!0}t=t.parentNode}return!1}var Ba=new Map;function Td(e,t){let n=t+"::"+e.toLowerCase(),r=Ba.get(n);if(r)return r;let o=document,i=t==="http://www.w3.org/2000/svg"?o.createElementNS(t,e):o.createElement(e),a=o.createElement("div");a.setAttribute("data-snapdom-internal",""),a.style.cssText="position:absolute;left:-99999px;top:-99999px;contain:strict;display:block;",a.appendChild(i),o.documentElement.appendChild(a);let s=getComputedStyle(i),l={};for(let c of _s)l[c]=s.getPropertyValue(c)||"";return a.remove(),Ba.set(n,l),l}function Rd(e,t){if(e?.nodeType!==1||t?.nodeType!==1||io(e))return;let n=e.getAttribute?.("style"),r=!!(n&&n.includes("var("));if(!r&&e.attributes?.length){let i=e.attributes;for(let a=0;a<i.length;a++){let s=i[a];if(s&&typeof s.value=="string"&&s.value.includes("var(")){r=!0;break}}}let o=null;if(r)try{o=getComputedStyle(e)}catch{}if(r){let i=e.style;if(i&&i.length){let a=new Set;for(let s=0;s<i.length;s++){let l=i[s];if(a.has(l))continue;a.add(l);let c=i.getPropertyValue(l);if(!c||!c.includes("var("))continue;let u=o&&o.getPropertyValue(l);if(u)try{t.style.setProperty(l,u.trim(),i.getPropertyPriority(l))}catch{}}}}if(r&&e.attributes?.length){let i=e.attributes;for(let a=0;a<i.length;a++){let s=i[a];if(!s||typeof s.value!="string"||!s.value.includes("var("))continue;let l=s.name,c=o&&o.getPropertyValue(l);if(c)try{t.style.setProperty(l,c.trim())}catch{}}}if(!r){if(!o)try{o=getComputedStyle(e)}catch{o=null}if(!o)return;let i=e.namespaceURI||"html",a=Td(e.tagName,i);for(let s of _s){let l=o.getPropertyValue(s)||"",c=a[s]||"";if(l&&l!==c)try{t.style.setProperty(s,l.trim())}catch{}}}}Ee();Ee();ge();rt();rt();function nt(e){return!!(!e||e.startsWith("data:")||e.startsWith("blob:")||/^data:image\/(gif|png|svg)/.test(e)&&e.length<200)}var Ha="img[data-src], img[data-lazy-src], img[data-original], img[data-hi-res-src], img[data-srcset], img[data-lazy-srcset]";function Nd(e,t){return!e||e?.nodeType!==1?!1:e.matches?.("picture")||e.querySelector("picture")?!0:t?!!(e.matches?.(Ha)||e.querySelector(Ha)):!1}var Ld=/^image\/(jpeg|jpg|png|gif|webp|avif|apng|svg\+xml|bmp|x-icon|vnd\.microsoft\.icon)\s*(;|$)/i;function Bn(e,t){if(!e)return null;let n=0;try{n=t?t.getBoundingClientRect().width||t.width:0}catch{}n||(n=window.innerWidth||1e3);let r=[];for(let i of e.split(",")){let a=i.trim().split(/\s+/);if(!a[0])continue;let s=a[1]||"",l=1;/^\d*\.?\d+x$/i.test(s)?l=parseFloat(s):/^\d+w$/i.test(s)&&(l=parseInt(s,10)/n),r.push({url:a[0],d:l})}if(!r.length)return null;r.sort((i,a)=>i.d-a.d);let o=window.devicePixelRatio||1;return(r.find(i=>i.d>=o)||r[r.length-1]).url}function Os(e,t){let n=e.currentSrc||"";if(n&&!nt(n))return n;let r=t.querySelectorAll("source[srcset]"),o=null;for(let i of r){let a=i.getAttribute("srcset");if(!a||nt(a))continue;let s=i.getAttribute("type");if(s&&!Ld.test(s.trim()))continue;let l=i.getAttribute("media");if(l)try{if(window.matchMedia(l).matches)return Bn(a,e)}catch{}o||(o=Bn(a,e))}return o}function Fd(e){let t=[e.getAttribute("data-src"),e.getAttribute("data-lazy-src"),e.getAttribute("data-original"),e.getAttribute("data-hi-res-src")];for(let r of t)if(r&&!nt(r))return r;let n=e.getAttribute("data-srcset")||e.getAttribute("data-lazy-srcset");if(n){let r=n.split(",")[0].trim().split(/\s+/)[0];if(r&&!nt(r))return r}return null}function $d(e={}){let t=e.pictureResolver&&typeof e.pictureResolver=="object"?e.pictureResolver:{};return{timeout:t.timeout??5e3,concurrency:t.concurrency??4,resolveLazySrc:t.resolveLazySrc!==!1,silent:t.silent??!1,useProxy:typeof e.useProxy=="string"?e.useProxy:""}}async function _d(e,t={}){if(!e||e?.nodeType!==1||t.resolvePicturePlaceholders===!1)return null;let{timeout:n,concurrency:r,resolveLazySrc:o,silent:i,useProxy:a}=$d(t);if(!Nd(e,o))return null;let s=[],l=[];async function c(f){let m=await xe(f,{as:"dataURL",timeout:n,useProxy:a,silent:!0});return m.ok?m.data:null}async function u(f){for(let m=0;m<f.length;m+=r){let p=f.slice(m,m+r);await Promise.allSettled(p.map(h=>h()))}}let d=Array.from(e.querySelectorAll("picture"));e.matches?.("picture")&&d.unshift(e);for(let f of d){let m=f.querySelector("img");if(!m)continue;let p=m.getAttribute("src")||"";if(!nt(p))continue;let h=Os(m,f);h&&l.push(async()=>{let y=await c(h);if(!y){i||console.warn(`[snapdom:picture-resolver] Failed to fetch: ${h.slice(0,60)}`);return}let g=m.getAttribute("src"),w=m.getAttribute("srcset"),v=m.getAttribute("sizes"),b=[];m.src=y,m.setAttribute("src",y),m.removeAttribute("srcset"),m.removeAttribute("sizes");let S=f.querySelectorAll("source");for(let x of S)b.push({el:x,parent:x.parentElement,next:x.nextSibling}),x.remove();s.push(()=>{g!==null?m.setAttribute("src",g):m.removeAttribute("src"),w!==null&&m.setAttribute("srcset",w),v!==null&&m.setAttribute("sizes",v);for(let{el:x,parent:I,next:C}of b)I&&I.insertBefore(x,C)})})}if(o){let f=Array.from(e.querySelectorAll("img"));e.localName==="img"&&f.unshift(e);for(let m of f){if(m.closest("picture")&&nt(m.getAttribute("src")||""))continue;let p=m.getAttribute("src")||"",h=Fd(m);h&&nt(p)&&l.push(async()=>{let y=await c(h);if(!y)return;let g=m.getAttribute("src");m.src=y,m.setAttribute("src",y),m.removeAttribute("srcset"),m.removeAttribute("sizes"),s.push(()=>{g!==null?m.setAttribute("src",g):m.removeAttribute("src")})})}}return l.length===0?null:(await u(l),async function(){for(let f of s)try{f()}catch{}})}function Zr(e,t,n){return n?Promise.all(e.map(r=>new Promise(o=>t(r,o)))):Promise.all(e.map(r=>new Promise(o=>{function i(){kn(a=>{!(a&&typeof a.timeRemaining=="function")||a.timeRemaining()>0?t(r,o):i()},{fast:n})}i()})))}function Od(e,t){if(e=e.trim(),!e)return e;let n=t?`[data-sd-slotted~="${t}"]`:"[data-sd-slotted]";return e.endsWith(":not([data-sd-slotted])")||e.endsWith(`:not(${n})`)?e:`${e}:not(${n})`}function Pd(e,t,n=!0,r){return e.split(",").map(o=>o.trim()).filter(Boolean).map(o=>{if(o.startsWith(":where(")||o.startsWith("@"))return o;let i=n?Od(o,r):o;return`:where(${t} ${i})`}).join(", ")}function Dd(e,t,n){return e?(e=e.replace(/:host\(([^)]+)\)/g,(r,o)=>`:where(${t}:is(${o.trim()}))`),e=e.replace(/:host\b/g,`:where(${t})`),e=e.replace(/:host-context\(([^)]+)\)/g,(r,o)=>`:where(:where(${o.trim()}) ${t})`),e=e.replace(/::slotted\(([^)]+)\)/g,(r,o)=>`:where(${t} ${o.trim()})`),e=e.replace(/(^|})(\s*)([^@}{]+){/g,(r,o,i,a)=>{let s=Pd(a,t,!0,n);return`${o}${i}${s}{`}),e):""}function Wd(e){return e.shadowScopeSeq=(e.shadowScopeSeq||0)+1,`s${e.shadowScopeSeq}`}function Bd(e){let t="";try{e.querySelectorAll("style").forEach(r=>{t+=(r.textContent||"")+`
|
|
196
76
|
`});let n=e.adoptedStyleSheets||[];for(let r of n)try{if(r&&r.cssRules)for(let o of r.cssRules)t+=o.cssText+`
|
|
197
|
-
`}catch{}}catch{}return t}function
|
|
198
|
-
`:""}function Xu(e){e&&(e.nodeType===Node.ELEMENT_NODE&&e.setAttribute("data-sd-slotted",""),e.querySelectorAll&&e.querySelectorAll("*").forEach(t=>t.setAttribute("data-sd-slotted","")))}async function Ku(e,t=3){let n=()=>{try{return e.contentDocument||e.contentWindow?.document||null}catch{return null}},r=n(),o=0;for(;o<t&&(!r||!r.body&&!r.documentElement);)await new Promise(i=>setTimeout(i,0)),r=n(),o++;return r&&(r.body||r.documentElement)?r:null}function Ju(e){let t=e.getBoundingClientRect(),n=0,r=0,o=0,i=0;try{let c=getComputedStyle(e);n=parseFloat(c.borderLeftWidth)||0,r=parseFloat(c.borderRightWidth)||0,o=parseFloat(c.borderTopWidth)||0,i=parseFloat(c.borderBottomWidth)||0}catch{}let a=Math.max(0,Math.round(t.width-(n+r))),s=Math.max(0,Math.round(t.height-(o+i)));return{contentWidth:a,contentHeight:s,rect:t}}function Ie(e){let t=0,n=0;if(e.offsetWidth>0&&(t=e.offsetWidth),e.offsetHeight>0&&(n=e.offsetHeight),t===0||n===0)try{let r=getComputedStyle(e);if(t===0){let o=parseFloat(r.width);!isNaN(o)&&o>0&&(t=o)}if(n===0){let o=parseFloat(r.height);!isNaN(o)&&o>0&&(n=o)}}catch{}if(t===0||n===0)try{if(t===0){let r=parseFloat(e.getAttribute("width"));!isNaN(r)&&r>0&&(t=r)}if(n===0){let r=parseFloat(e.getAttribute("height"));!isNaN(r)&&r>0&&(n=r)}}catch{}if((t===0||n===0)&&(e.naturalWidth||e.naturalHeight))try{t===0&&e.naturalWidth>0&&(t=e.naturalWidth),n===0&&e.naturalHeight>0&&(n=e.naturalHeight)}catch{}return{width:t,height:n}}function Qu(e,t,n){let r=e.createElement("style");return r.setAttribute("data-sd-iframe-pin",""),r.textContent=`html, body {margin: 0 !important;padding: 0 !important;width: ${t}px !important;height: ${n}px !important;min-width: ${t}px !important;min-height: ${n}px !important;box-sizing: border-box !important;overflow: hidden !important;background-clip: border-box !important;}`,(e.head||e.documentElement).appendChild(r),()=>{try{r.remove()}catch{}}}async function ed(e,t,n){let r=await Ku(e,3);if(!r)throw new Error("iframe document not accessible/ready");let{contentWidth:o,contentHeight:i,rect:a}=Ju(e),s=n?.snap;if(!s&&typeof window<"u"&&window.snapdom&&(s=window.snapdom),!s||typeof s.toPng!="function")throw new Error("[snapdom] iframe capture requires snapdom.toPng. Use snapdom(el) or pass options.snap. With ESM, assign window.snapdom = snapdom after import if using iframes.");let c={...n,scale:1},l=Qu(r,o,i),u;try{u=await s.toPng(r.documentElement,c)}finally{l()}u.style.display="block",u.style.width=`${o}px`,u.style.height=`${i}px`;let d=document.createElement("div");return t.nodeMap.set(d,e),Ke(e,d,t,n),d.style.overflow="hidden",d.style.display="block",d.style.width||(d.style.width=`${Math.round(a.width)}px`),d.style.height||(d.style.height=`${Math.round(a.height)}px`),d.appendChild(u),d}function td(e){let{width:t,height:n}=Ie(e),r=e.getBoundingClientRect(),o;try{o=window.getComputedStyle(e)}catch{}let i=o?parseFloat(o.width):NaN,a=o?parseFloat(o.height):NaN,s=Math.round(t||r.width||0),c=Math.round(n||r.height||0),l=Number.isFinite(i)&&i>0?Math.round(i):Math.max(12,s||16),u=Number.isFinite(a)&&a>0?Math.round(a):Math.max(12,c||16),d=(e.type||"text").toLowerCase()==="checkbox",f=!!e.checked,m=!!e.indeterminate,p=Math.max(Math.min(l,u),12),g="middle";try{o&&o.verticalAlign&&(g=o.verticalAlign)}catch{}let h=document.createElement("div");h.setAttribute("data-snapdom-input-replacement",e.type||"checkbox"),h.style.cssText=`display:inline-block;width:${p}px;height:${p}px;vertical-align:${g};flex-shrink:0;line-height:0;`;let y=document.createElementNS("http://www.w3.org/2000/svg","svg");y.setAttribute("width",String(p)),y.setAttribute("height",String(p)),y.setAttribute("viewBox",`0 0 ${p} ${p}`),h.appendChild(y);function v(){let b="#0a6ed1";try{o&&(b=o.accentColor||o.color||b)}catch{}let w=2,S=w/2,I=p-w;if(y.innerHTML="",d){let C=document.createElementNS("http://www.w3.org/2000/svg","rect");if(C.setAttribute("x",String(S)),C.setAttribute("y",String(S)),C.setAttribute("width",String(I)),C.setAttribute("height",String(I)),C.setAttribute("rx","2"),C.setAttribute("ry","2"),C.setAttribute("fill",f?b:"none"),C.setAttribute("stroke",b),C.setAttribute("stroke-width",String(w)),y.appendChild(C),f){let E=document.createElementNS("http://www.w3.org/2000/svg","path");E.setAttribute("d",`M ${S+2} ${p/2} L ${p/2-1} ${p-S-2} L ${p-S-2} ${S+2}`),E.setAttribute("stroke","white"),E.setAttribute("stroke-width",String(Math.max(1.5,w))),E.setAttribute("fill","none"),E.setAttribute("stroke-linecap","round"),E.setAttribute("stroke-linejoin","round"),y.appendChild(E)}else if(m){let E=document.createElementNS("http://www.w3.org/2000/svg","rect"),M=Math.max(6,I-4);E.setAttribute("x",String((p-M)/2)),E.setAttribute("y",String((p-w)/2)),E.setAttribute("width",String(M)),E.setAttribute("height",String(w)),E.setAttribute("fill",b),E.setAttribute("rx","1"),y.appendChild(E)}}else{let C=document.createElementNS("http://www.w3.org/2000/svg","circle");if(C.setAttribute("cx",String(p/2)),C.setAttribute("cy",String(p/2)),C.setAttribute("r",String((p-w)/2)),C.setAttribute("fill",f?b:"none"),C.setAttribute("stroke",b),C.setAttribute("stroke-width",String(w)),y.appendChild(C),f){let E=document.createElementNS("http://www.w3.org/2000/svg","circle"),M=Math.max(2,(p-w*2)*.35);E.setAttribute("cx",String(p/2)),E.setAttribute("cy",String(p/2)),E.setAttribute("r",String(M)),E.setAttribute("fill","white"),y.appendChild(E)}}h.style.setProperty("width",`${p}px`,"important"),h.style.setProperty("height",`${p}px`,"important"),h.style.setProperty("min-width",`${p}px`,"important"),h.style.setProperty("min-height",`${p}px`,"important")}return v(),{el:h,applyVisual:v}}var Mt=new ge(80);async function Nt(e){if(A.resource?.has(e))return A.resource.get(e);if(Mt.has(e))return Mt.get(e);let t=(async()=>{let n=await ve(e,{as:"dataURL",silent:!0});if(!n.ok||typeof n.data!="string")throw new Error(`[snapDOM] Failed to read blob URL: ${e}`);return A.resource?.set(e,n.data),n.data})();Mt.set(e,t);try{let n=await t;return Mt.set(e,n),n}catch(n){throw Mt.delete(e),n}}var nd=/\bblob:[^)"'\s]+/g;async function Ea(e){if(!e||e.indexOf("blob:")===-1)return e;let t=Array.from(new Set(e.match(nd)||[]));if(t.length===0)return e;let n=e;for(let r of t)try{let o=await Nt(r);n=n.split(r).join(o)}catch{}return n}function xn(e){return typeof e=="string"&&e.startsWith("blob:")}function rd(e){return(e||"").split(",").map(t=>t.trim()).filter(Boolean).map(t=>{let n=t.match(/^(\S+)(\s+.+)?$/);return n?{url:n[1],desc:n[2]||""}:null}).filter(Boolean)}function od(e){return e.map(t=>t.desc?`${t.url} ${t.desc.trim()}`:t.url).join(", ")}async function id(e,t=null){if(!e)return;let n=t,r=e.querySelectorAll?e.querySelectorAll("img"):[];for(let c of r)try{let l=c.getAttribute("src")||c.currentSrc||"";if(xn(l)){let d=await Nt(l);c.setAttribute("src",d)}let u=c.getAttribute("srcset");if(u&&u.includes("blob:")){let d=rd(u),f=!1;for(let m of d)if(xn(m.url))try{m.url=await Nt(m.url),f=!0}catch(p){K(n,"blobUrlToDataUrl for srcset item failed",p)}f&&c.setAttribute("srcset",od(d))}}catch(l){K(n,"resolveBlobUrls for img failed",l)}let o=e.querySelectorAll?e.querySelectorAll("image"):[];for(let c of o)try{let l="http://www.w3.org/1999/xlink",u=c.getAttribute("href")||c.getAttributeNS?.(l,"href");if(xn(u)){let d=await Nt(u);c.setAttribute("href",d),c.removeAttributeNS?.(l,"href")}}catch(l){K(n,"resolveBlobUrls for SVG image href failed",l)}let i=e.querySelectorAll?e.querySelectorAll("[style*='blob:']"):[];for(let c of i)try{let l=c.getAttribute("style");if(l&&l.includes("blob:")){let u=await Ea(l);c.setAttribute("style",u)}}catch(l){K(n,"replaceBlobUrls in inline style failed",l)}let a=e.querySelectorAll?e.querySelectorAll("style"):[];for(let c of a)try{let l=c.textContent||"";l.includes("blob:")&&(c.textContent=await Ea(l))}catch(l){K(n,"replaceBlobUrls in style tag failed",l)}let s=["poster"];for(let c of s){let l=e.querySelectorAll?e.querySelectorAll(`[${c}^='blob:']`):[];for(let u of l)try{let d=u.getAttribute(c);xn(d)&&u.setAttribute(c,await Nt(d))}catch(d){K(n,`resolveBlobUrls for ${c} failed`,d)}}}Ot();async function kn(e,t,n){if(!e)throw new Error("Invalid node");let r=new Set,o=null,i=null;if(e.nodeType===Node.ELEMENT_NODE){let u=(e.localName||e.tagName||"").toLowerCase();if(e.id==="snapdom-sandbox"||e.hasAttribute("data-snapdom-sandbox")||Ha.has(u))return null;if(u==="foreignobject"&&e.parentElement?.closest?.("foreignObject"))return K(t,"Nested <foreignObject> skipped (SVG spec limitation \u2014 not rendered by browsers)"),null}if(e.nodeType===Node.TEXT_NODE||e.nodeType!==Node.ELEMENT_NODE)return e.cloneNode(!0);if(e.getAttribute("data-capture")==="exclude"){if(n.excludeMode==="hide"){let u=document.createElement("div"),{width:d,height:f}=Ie(e),m=d||e.getBoundingClientRect().width||0,p=f||e.getBoundingClientRect().height||0;return u.style.cssText=`display:inline-block;width:${m}px;height:${p}px;visibility:hidden;`,u}else if(n.excludeMode==="remove")return null}if(n.exclude&&Array.isArray(n.exclude))for(let u of n.exclude)try{if(e.matches?.(u)){if(n.excludeMode==="hide"){let d=document.createElement("div"),{width:f,height:m}=Ie(e),p=f||e.getBoundingClientRect().width||0,g=m||e.getBoundingClientRect().height||0;return d.style.cssText=`display:inline-block;width:${p}px;height:${g}px;visibility:hidden;`,d}else if(n.excludeMode==="remove")return null}}catch(d){console.warn(`Invalid selector in exclude option: ${u}`,d)}if(typeof n.filter=="function")try{if(!n.filter(e)){if(n.filterMode==="hide"){let u=document.createElement("div"),{width:d,height:f}=Ie(e),m=d||e.getBoundingClientRect().width||0,p=f||e.getBoundingClientRect().height||0;return u.style.cssText=`display:inline-block;width:${m}px;height:${p}px;visibility:hidden;`,u}else if(n.filterMode==="remove")return null}}catch(u){console.warn("Error in filter function:",u)}if(e.tagName==="IFRAME"){let u=!1;try{u=!!(e.contentDocument||e.contentWindow?.document)}catch(d){K(t,"iframe same-origin probe failed",d)}if(u)try{return await ed(e,t,n)}catch(d){console.warn("[SnapDOM] iframe rasterization failed, fallback:",d)}if(u||console.warn("[snapdom] cross-origin <iframe> skipped (cannot access content). Use options.placeholders to show a placeholder instead.",e),n.placeholders){let{width:d,height:f}=Ie(e),m=document.createElement("div");return m.style.cssText=`width:${d}px;height:${f}px;background-image:repeating-linear-gradient(45deg,#ddd,#ddd 5px,#f9f9f9 5px,#f9f9f9 10px);display:flex;align-items:center;justify-content:center;font-size:12px;color:#555;border:1px solid #aaa;`,Ke(e,m,t,n),m}else{let{width:d,height:f}=Ie(e),m=document.createElement("div");return m.style.cssText=`display:inline-block;width:${d}px;height:${f}px;visibility:hidden;`,Ke(e,m,t,n),m}}if(e.getAttribute("data-capture")==="placeholder"){let u=e.cloneNode(!1);t.nodeMap.set(u,e),Ke(e,u,t,n);let d=document.createElement("div");return d.textContent=e.getAttribute("data-placeholder-text")||"",d.style.cssText="color:#666;font-size:12px;text-align:center;line-height:1.4;padding:0.5em;box-sizing:border-box;",u.appendChild(d),u}if(e.tagName==="CANVAS"){let u="";try{let p=e.getContext("2d",{willReadFrequently:!0});try{p&&p.getImageData(0,0,1,1)}catch{}if(await new Promise(g=>requestAnimationFrame(g)),u=e.toDataURL("image/png"),!u||u==="data:,"){try{p&&p.getImageData(0,0,1,1)}catch{}if(await new Promise(g=>requestAnimationFrame(g)),u=e.toDataURL("image/png"),!u||u==="data:,"){let g=document.createElement("canvas");g.width=e.width,g.height=e.height;let h=g.getContext("2d");h&&(h.drawImage(e,0,0),u=g.toDataURL("image/png"))}}}catch(p){K(t,"Canvas toDataURL failed, using empty/fallback",p)}let d=document.createElement("img");try{d.decoding="sync",d.loading="eager"}catch(p){K(t,"img decoding/loading hints failed",p)}u&&(d.src=u),d.width=e.width,d.height=e.height;let{width:f,height:m}=Ie(e);return f>0&&(d.style.width=`${f}px`),m>0&&(d.style.height=`${m}px`),t.nodeMap.set(d,e),Ke(e,d,t,n),d}if(e.tagName==="VIDEO"){let u="";try{let p=document.createElement("canvas");p.width=e.videoWidth||e.offsetWidth||320,p.height=e.videoHeight||e.offsetHeight||240;let g=p.getContext("2d");g&&(g.drawImage(e,0,0,p.width,p.height),u=p.toDataURL("image/png"),(!u||u==="data:,")&&(u=""))}catch(p){K(t,"Video frame capture failed, using poster fallback",p)}let d=document.createElement("img");try{d.decoding="sync",d.loading="eager"}catch{}u?d.src=u:e.poster&&(d.src=e.poster),d.width=e.videoWidth||e.offsetWidth||0,d.height=e.videoHeight||e.offsetHeight||0;let{width:f,height:m}=Ie(e);return f>0&&(d.style.width=`${f}px`),m>0&&(d.style.height=`${m}px`),d.style.objectFit="contain",t.nodeMap.set(d,e),Ke(e,d,t,n),d}let a;try{if(a=e.cloneNode(!1),a.attributes?.length)try{for(let u of a.attributes)/[\x00-\x08\x0B\x0C\x0E-\x1F\uFFFE\uFFFF]/.test(u.value)&&a.setAttribute(u.name,u.value.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\uFFFE\uFFFF]/g,""))}catch{}if(Wu(e,a),t.nodeMap.set(a,e),e.tagName==="IMG"){qu(e,a);try{let{width:u,height:d}=Ie(e),f=Math.round(u||0),m=Math.round(d||0);f&&(a.dataset.snapdomWidth=String(f)),m&&(a.dataset.snapdomHeight=String(m))}catch(u){K(t,"getUnscaledDimensions for IMG failed",u)}try{let u=e.getAttribute("style")||"",d=window.getComputedStyle(e),f=b=>{let w=u.match(new RegExp(`${b}\\s*:\\s*([^;]+)`,"i")),S=w?w[1].trim():d.getPropertyValue(b);return/%|auto/i.test(String(S||""))},m=parseInt(a.dataset.snapdomWidth||"0",10),p=parseInt(a.dataset.snapdomHeight||"0",10),g=f("width")||!m,h=f("height")||!p;g&&m&&(a.style.width=`${m}px`),h&&p&&(a.style.height=`${p}px`);let y=d.getPropertyValue("object-fit"),v=d.getPropertyValue("object-position");y&&y!=="fill"?(a.style.objectFit=y,v&&(a.style.objectPosition=v)):(m&&(a.style.minWidth=`${m}px`),p&&(a.style.minHeight=`${p}px`))}catch(u){K(t,"IMG dimension freeze failed",u)}}}catch(u){throw console.error("[Snapdom] Failed to clone node:",e,u),u}let s=null;if(e instanceof HTMLTextAreaElement){let{width:u,height:d}=Ie(e),f=u||e.getBoundingClientRect().width||0,m=d||e.getBoundingClientRect().height||0;f&&(a.style.width=`${f}px`),m&&(a.style.height=`${m}px`)}if(e instanceof HTMLInputElement){let u=(e.type||"text").toLowerCase();if((u==="checkbox"||u==="radio")&&hu()){let{el:d,applyVisual:f}=td(e);t.nodeMap.set(d,e),s=f,a=d}else a.value=e.value,a.setAttribute("value",e.value),e.checked!==void 0&&(a.checked=e.checked,e.checked&&a.setAttribute("checked",""),e.indeterminate&&(a.indeterminate=e.indeterminate))}if((e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)&&!e.value&&e.placeholder)try{let u=window.getComputedStyle(e,"::placeholder"),d=u&&u.color;if(d&&d!=="rgba(0, 0, 0, 0)"){let f="snapdom-ph-"+(Math.random()*1e6|0);a.classList.add(f);let m=document.createElement("style");m.textContent=`.${f}::placeholder{color:${d}!important;opacity:${u.opacity||"1"}!important;}`,a.prepend(m)}}catch{}if(e instanceof HTMLSelectElement&&(o=e.value),e instanceof HTMLTextAreaElement&&(i=e.value),e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement){e.disabled&&a.setAttribute("disabled",""),e.required&&a.setAttribute("required",""),e.readOnly&&a.setAttribute("readonly","");let u=e;u.min!==void 0&&u.min!==""&&a.setAttribute("min",u.min),u.max!==void 0&&u.max!==""&&a.setAttribute("max",u.max),u.pattern!==void 0&&u.pattern!==""&&a.setAttribute("pattern",u.pattern);let d=e.getAttribute("aria-invalid");d!==null&&a.setAttribute("aria-invalid",d)}if(Ke(e,a,t,n),s&&s(),e instanceof SVGElement){let u=["fill","stroke","stroke-width","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","opacity","fill-opacity","stroke-opacity","fill-rule","clip-rule","marker","marker-start","marker-mid","marker-end","visibility","display"];try{let d=window.getComputedStyle(e);for(let f of u){let m=d.getPropertyValue(f);m&&a.style.setProperty(f,m)}}catch{}}if(e.shadowRoot){let u=function(b,w){if(b.nodeType===Node.ELEMENT_NODE&&b.tagName==="STYLE")return w(null);kn(b,t,n).then(S=>{w(S||null)}).catch(()=>{w(null)})};try{let b=e.shadowRoot.querySelectorAll("slot");for(let w of b){let S=[];try{S=w.assignedNodes?.({flatten:!0})||w.assignedNodes?.()||[]}catch{S=w.assignedNodes?.()||[]}for(let I of S)r.add(I)}}catch{}let d=Vu(t),f=`[data-sd="${d}"]`;try{a.setAttribute("data-sd",d)}catch{}let m=Gu(e.shadowRoot),p=Uu(m,f),g=Yu(m),h=Zu(e,g,f);zu(a,h+p,d);let y=document.createDocumentFragment(),v=await Wr(Array.from(e.shadowRoot.childNodes),u,n.fast);y.append(...v.filter(b=>!!b)),a.appendChild(y)}if(e.tagName==="SLOT"){let u=function(g,h){kn(g,t,n).then(y=>{y&&Xu(y),h(y||null)}).catch(()=>{h(null)})},d=e.assignedNodes?.({flatten:!0})||[],f=d.length>0?d:Array.from(e.childNodes),m=document.createDocumentFragment(),p=await Wr(Array.from(f),u,n.fast);return m.append(...p.filter(g=>!!g)),m}function c(u,d){if(r.has(u))return d(null);kn(u,t,n).then(f=>{d(f||null)}).catch(()=>{d(null)})}let l=await Wr(Array.from(e.childNodes),c,n.fast);if(a.append(...l.filter(u=>!!u)),o!==null&&a instanceof HTMLSelectElement){a.value=o;for(let u of a.options)u.value===o?u.setAttribute("selected",""):u.removeAttribute("selected")}return i!==null&&a instanceof HTMLTextAreaElement&&(a.textContent=i),a}Ee();Rn();Ce();var ad=[/font\s*awesome/i,/material\s*icons/i,/ionicons/i,/glyphicons/i,/feather/i,/bootstrap\s*icons/i,/remix\s*icons/i,/heroicons/i,/layui/i,/lucide/i],mt=Object.assign({materialIconsFilled:"https://fonts.gstatic.com/s/materialicons/v48/flUhRq6tzZclQEJ-Vdg-IuiaDsNcIhQ8tQ.woff2",materialIconsOutlined:"https://fonts.gstatic.com/s/materialiconsoutlined/v110/gok-H7zzDkdnRel8-DQ6KAXJ69wP1tGnf4ZGhUcel5euIg.woff2",materialIconsRound:"https://fonts.gstatic.com/s/materialiconsround/v109/LDItaoyNOAY6Uewc665JcIzCKsKc_M9flwmPq_HTTw.woff2",materialIconsSharp:"https://fonts.gstatic.com/s/materialiconssharp/v110/oPWQ_lt5nv4pWNJpghLP75WiFR4kLh3kvmvRImcycg.woff2"},typeof window<"u"&&window.__SNAPDOM_ICON_FONTS__||{}),qr=[];function sd(e){let t=Array.isArray(e)?e:[e];for(let n of t)n instanceof RegExp?qr.push(n):typeof n=="string"?qr.push(new RegExp(n,"i")):console.warn("[snapdom] Ignored invalid iconFont value:",n)}function _e(e){let t=typeof e=="string"?e:"",n=[...ad,...qr];for(let r of n)if(r instanceof RegExp&&r.test(t))return!0;return!!(/icon/i.test(t)||/glyph/i.test(t)||/symbols/i.test(t)||/feather/i.test(t)||/fontawesome/i.test(t))}function ld(e=""){let t=String(e).toLowerCase();return/\bmaterial\s*icons\b/.test(t)||/\bmaterial\s*symbols\b/.test(t)}var Aa=new Map;function cd(e=""){let t=Object.create(null),n=String(e||""),r=/['"]?\s*([A-Za-z]{3,4})\s*['"]?\s*([+-]?\d+(?:\.\d+)?)\s*/g,o;for(;o=r.exec(n);)t[o[1].toUpperCase()]=Number(o[2]);return t}async function ud(e,t,n){let r=String(e||""),o=r.toLowerCase(),i=String(t||"").toLowerCase();if(/\bmaterial\s*icons\b/.test(o)&&!/\bsymbols\b/.test(o))return{familyForMeasure:r,familyForCanvas:r};if(!/\bmaterial\s*symbols\b/.test(o))return{familyForMeasure:r,familyForCanvas:r};let a=n&&(n.FILL??n.fill),s="outlined";/\brounded\b/.test(i)||/\bround\b/.test(i)?s="rounded":/\bsharp\b/.test(i)?s="sharp":/\boutlined\b/.test(i)&&(s="outlined");let c=a===1,l=null;if(c&&(s==="outlined"&&mt.materialIconsFilled?l={url:mt.materialIconsFilled,alias:"snapdom-mi-filled"}:s==="rounded"&&mt.materialIconsRound?l={url:mt.materialIconsRound,alias:"snapdom-mi-round"}:s==="sharp"&&mt.materialIconsSharp&&(l={url:mt.materialIconsSharp,alias:"snapdom-mi-sharp"})),!l)return{familyForMeasure:r,familyForCanvas:r};if(!Aa.has(l.alias))try{let d=new FontFace(l.alias,`url(${l.url})`,{style:"normal",weight:"400"});document.fonts.add(d),await d.load(),Aa.set(l.alias,!0)}catch{return{familyForMeasure:r,familyForCanvas:r}}let u=`"${l.alias}"`;return{familyForMeasure:u,familyForCanvas:u}}async function dd(e="Material Icons",t=24){try{await Promise.all([document.fonts.load(`400 ${t}px "${String(e).replace(/["']/g,"")}"`),document.fonts.ready])}catch{}}function fd(e){let t=e.getPropertyValue("-webkit-text-fill-color")?.trim()||"",n=/^transparent$/i.test(t)||/rgba?\(\s*0\s*,\s*0\s*,\s*0\s*,\s*0\s*\)/i.test(t);if(t&&!n&&t.toLowerCase()!=="currentcolor")return t;let r=e.color?.trim();return r&&r!=="inherit"?r:"#000"}async function md(e,{family:t="Material Icons",weight:n="normal",fontSize:r=32,color:o="#000",variation:i="",className:a=""}={}){let s=String(t||"").replace(/^['"]+|['"]+$/g,""),c=window.devicePixelRatio||1,l=cd(i),{familyForMeasure:u,familyForCanvas:d}=await ud(s,a,l);await dd(d.replace(/^["']+|["']+$/g,""),r);let f=document.createElement("span");f.textContent=e,f.style.position="absolute",f.style.visibility="hidden",f.style.left="-99999px",f.style.whiteSpace="nowrap",f.style.fontFamily=u,f.style.fontWeight=String(n||"normal"),f.style.fontSize=`${r}px`,f.style.lineHeight="1",f.style.margin="0",f.style.padding="0",f.style.fontFeatureSettings="'liga' 1",f.style.fontVariantLigatures="normal",f.style.color=o,document.body.appendChild(f);let m=f.getBoundingClientRect(),p=Math.max(1,Math.ceil(m.width)),g=Math.max(1,Math.ceil(m.height));document.body.removeChild(f);let h=document.createElement("canvas");h.width=p*c,h.height=g*c;let y=h.getContext("2d");y.scale(c,c),y.font=`${n?`${n} `:""}${r}px ${d}`,y.textAlign="left",y.textBaseline="top",y.fillStyle=o;try{y.fontKerning="normal"}catch{}return y.fillText(e,0,0),{dataUrl:h.toDataURL(),width:p,height:g}}async function pd(e,t){if(!(e instanceof Element))return 0;let n='.material-icons, [class*="material-symbols"]',r=Array.from(e.querySelectorAll(n)).filter(a=>a&&a.textContent&&a.textContent.trim());if(r.length===0)return 0;let o=t instanceof Element?Array.from(t.querySelectorAll(n)).filter(a=>a&&a.textContent&&a.textContent.trim()):[],i=0;for(let a=0;a<r.length;a++){let s=r[a],c=o[a]||null;try{let l=getComputedStyle(c||s),u=l.fontFamily||"Material Icons";if(!ld(u))continue;let d=(c||s).textContent.trim();if(!d)continue;let f=parseInt(l.fontSize,10)||24,m=l.fontWeight&&l.fontWeight!=="normal"?l.fontWeight:"normal",p=fd(l),g=l.fontVariationSettings&&l.fontVariationSettings!=="normal"?l.fontVariationSettings:"",h=(c||s).className||"",{dataUrl:y,width:v,height:b}=await md(d,{family:u,weight:m,fontSize:f,color:p,variation:g,className:h});s.textContent="";let w=s.ownerDocument.createElement("img");w.src=y,w.alt=d,w.style.height=`${f}px`,w.style.width=`${Math.max(1,Math.round(v/b*f))}px`,w.style.objectFit="contain",w.style.verticalAlign=getComputedStyle(s).verticalAlign||"baseline",s.appendChild(w),i++}catch{}}return i}yt();async function hd(e,t,n,r=32,o="#000"){t=t.replace(/^['"]+|['"]+$/g,"");let i=window.devicePixelRatio||1;try{await document.fonts.ready}catch{}let a=document.createElement("span");a.textContent=e,a.style.position="absolute",a.style.visibility="hidden",a.style.fontFamily=`"${t}"`,a.style.fontWeight=n||"normal",a.style.fontSize=`${r}px`,a.style.lineHeight="1",a.style.whiteSpace="nowrap",a.style.padding="0",a.style.margin="0",document.body.appendChild(a);let s=a.getBoundingClientRect(),c=Math.ceil(s.width),l=Math.ceil(s.height);document.body.removeChild(a);let u=document.createElement("canvas");u.width=Math.max(1,c*i),u.height=Math.max(1,l*i);let d=u.getContext("2d");return d.scale(i,i),d.font=n?`${n} ${r}px "${t}"`:`${r}px "${t}"`,d.textAlign="left",d.textBaseline="top",d.fillStyle=o,d.fillText(e,0,0),{dataUrl:u.toDataURL(),width:c,height:l}}var ts=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","emoji","math","fangsong","ui-serif","ui-sans-serif","ui-monospace","ui-rounded"]),gd=["katex","mathjax","mathml"];function no(e){if(!e)return"";for(let t of e.split(",")){let n=t.trim().replace(/^['"]+|['"]+$/g,"");if(n&&!ts.has(n.toLowerCase()))return n}return""}function yd(e){if(!e)return[];let t=[];for(let n of e.split(",")){let r=n.trim().replace(/^['"]+|['"]+$/g,"");r&&(ts.has(r.toLowerCase())||t.push(r))}return t}function Mn(e){let t=String(e??"400").trim().toLowerCase();if(t==="normal")return 400;if(t==="bold")return 700;let n=parseInt(t,10);return Number.isFinite(n)?Math.min(900,Math.max(100,n)):400}function Tn(e){let t=String(e??"normal").trim().toLowerCase();return t.startsWith("italic")?"italic":t.startsWith("oblique")?"oblique":"normal"}function bd(e){let t=String(e??"100%").match(/(\d+(?:\.\d+)?)\s*%/);return t?Math.max(50,Math.min(200,parseFloat(t[1]))):100}function wd(e){let t=String(e||"400").trim(),n=t.match(/^(\d{2,3})\s+(\d{2,3})$/);if(n){let o=Mn(n[1]),i=Mn(n[2]);return{min:Math.min(o,i),max:Math.max(o,i)}}let r=Mn(t);return{min:r,max:r}}function vd(e){let t=String(e||"normal").trim().toLowerCase();return t==="italic"?{kind:"italic"}:t.startsWith("oblique")?{kind:"oblique"}:{kind:"normal"}}function Cd(e){let t=String(e||"100%").trim(),n=t.match(/(\d+(?:\.\d+)?)\s*%\s+(\d+(?:\.\d+)?)\s*%/);if(n){let i=parseFloat(n[1]),a=parseFloat(n[2]);return{min:Math.min(i,a),max:Math.max(i,a)}}let r=t.match(/(\d+(?:\.\d+)?)\s*%/),o=r?parseFloat(r[1]):100;return{min:o,max:o}}function Sd(e){return!e||typeof e!="string"?"":e.replace(/\s+(variable|vf|v[0-9]+)$/i,"").trim().toLowerCase().replace(/\s+/g,"-")}function xd(e,t,n=[]){if(!e)return!1;try{let r=new URL(e,location.href);if(r.origin===location.origin)return!0;let o=r.host.toLowerCase();if(["fonts.googleapis.com","fonts.gstatic.com","use.typekit.net","p.typekit.net","kit.fontawesome.com","use.fontawesome.com","cdn.jsdelivr.net","unpkg.com","cdnjs.cloudflare.com","esm.sh"].some(a=>o.endsWith(a))||n.some(a=>o===a.toLowerCase()||o.endsWith("."+a.toLowerCase())))return!0;let i=(r.pathname+r.search).toLowerCase();if(/\bfont(s)?\b/.test(i)||/\.woff2?(\b|$)/.test(i)||gd.some(a=>i.includes(a)))return!0;for(let a of t){let s=a.toLowerCase().replace(/\s+/g,"+"),c=a.toLowerCase().replace(/\s+/g,"-"),l=Sd(a);if(i.includes(s)||i.includes(c)||l&&i.includes(l))return!0}return!1}catch{return!1}}function Id(e){let t=new Set;for(let n of e||[]){let r=String(n).split("__")[0]?.trim();r&&t.add(r)}return t}function ka(e,t){return e&&e.replace(/url\(\s*(['"]?)([^)'"]+)\1\s*\)/g,(n,r,o)=>{let i=(o||"").trim();if(!i||/^data:|^blob:|^https?:|^file:|^about:/i.test(i))return n;let a=i;try{a=new URL(i,t||location.href).href}catch{}return`url("${a}")`})}var Yr=/@import\s+(?:url\(\s*(['"]?)([^)"']+)\1\s*\)|(['"])([^"']+)\3)([^;]*);/g,Nn=4;async function Ed(e,t,n){if(!e)return e;let r=new Set;function o(s,c){try{return new URL(s,c||location.href).href}catch{return s}}async function i(s,c,l=0){if(l>Nn)return console.warn(`[snapDOM] @import depth exceeded (${Nn}) at ${c}`),s;let u="",d=0,f;for(;f=Yr.exec(s);){u+=s.slice(d,f.index),d=Yr.lastIndex;let m=(f[2]||f[4]||"").trim(),p=o(m,c);if(r.has(p)){console.warn(`[snapDOM] Skipping circular @import: ${p}`);continue}r.add(p);let g="";try{let h=await ve(p,{as:"text",useProxy:n,silent:!0});h.ok&&typeof h.data=="string"&&(g=h.data)}catch{}g?(g=ka(g,p),g=await i(g,p,l+1),u+=`
|
|
77
|
+
`}catch{}}catch{}return t}function Hd(e,t,n){if(!t)return;let r=document.createElement("style");r.setAttribute("data-sd",n),r.textContent=t,e.insertBefore(r,e.firstChild||null)}function Ud(e,t){try{let n=null,r=J(e).content;if(r&&r.includes("url(")){let a=r.match(/url\(["']?([^"')]+)["']?\)/);a&&(n=a[1])}let o=e.closest?.("picture"),i=n||(o?Os(e,o):e.currentSrc)||e.src||Bn(e.getAttribute("srcset"),e)||"";if(!i)return;t.setAttribute("src",i),t.removeAttribute("srcset"),t.removeAttribute("sizes"),t.loading="eager",t.decoding="sync"}catch{}}function Vd(e){let t=new Set;if(!e)return t;let n=/var\(\s*(--[A-Za-z0-9_-]+)\b/g,r;for(;r=n.exec(e);)t.add(r[1]);return t}function zd(e,t){try{let n=getComputedStyle(e).getPropertyValue(t).trim();if(n)return n}catch{}try{let n=getComputedStyle(document.documentElement).getPropertyValue(t).trim();if(n)return n}catch{}return""}function Gd(e,t,n){let r=[];for(let o of t){let i=zd(e,o);i&&r.push(`${o}: ${i};`)}return r.length?`${n}{${r.join("")}}
|
|
78
|
+
`:""}function qd(e,t){if(!e)return;let n=r=>{let o=r.getAttribute("data-sd-slotted")||"";t?` ${o} `.includes(` ${t} `)||r.setAttribute("data-sd-slotted",o?`${o} ${t}`:t):r.setAttribute("data-sd-slotted",o)};e.nodeType===Node.ELEMENT_NODE&&n(e),e.querySelectorAll?.("*").forEach(n)}async function jd(e,t=3){let n=()=>{try{return e.contentDocument||e.contentWindow?.document||null}catch{return null}},r=n(),o=0;for(;o<t&&(!r||!r.body&&!r.documentElement);)await new Promise(i=>setTimeout(i,0)),r=n(),o++;return r&&(r.body||r.documentElement)?r:null}function Yd(e){let t=e.getBoundingClientRect(),n=0,r=0,o=0,i=0;try{let l=getComputedStyle(e);n=parseFloat(l.borderLeftWidth)||0,r=parseFloat(l.borderRightWidth)||0,o=parseFloat(l.borderTopWidth)||0,i=parseFloat(l.borderBottomWidth)||0}catch{}let a=Math.max(0,Math.round(t.width-(n+r))),s=Math.max(0,Math.round(t.height-(o+i)));return{contentWidth:a,contentHeight:s,rect:t}}function Le(e){let t=0,n=0;if(e.offsetWidth>0&&(t=e.offsetWidth),e.offsetHeight>0&&(n=e.offsetHeight),t===0||n===0)try{let r=getComputedStyle(e);if(t===0){let o=parseFloat(r.width);!isNaN(o)&&o>0&&(t=o)}if(n===0){let o=parseFloat(r.height);!isNaN(o)&&o>0&&(n=o)}}catch{}if(t===0||n===0)try{if(t===0){let r=parseFloat(e.getAttribute("width"));!isNaN(r)&&r>0&&(t=r)}if(n===0){let r=parseFloat(e.getAttribute("height"));!isNaN(r)&&r>0&&(n=r)}}catch{}if((t===0||n===0)&&(e.naturalWidth||e.naturalHeight))try{t===0&&e.naturalWidth>0&&(t=e.naturalWidth),n===0&&e.naturalHeight>0&&(n=e.naturalHeight)}catch{}return{width:t,height:n}}function Zd(e,t,n){let r=e.defaultView,o=r?r.scrollX:0,i=r?r.scrollY:0,a=e.body?e.body.scrollLeft:0,s=e.body?e.body.scrollTop:0,l=e.documentElement?e.documentElement.scrollLeft:0,c=e.documentElement?e.documentElement.scrollTop:0,u=0,d=0,f=0,m=0;try{let h=r&&e.body?r.getComputedStyle(e.body):null;h&&(u=(parseFloat(h.marginTop)||0)+(parseFloat(h.paddingTop)||0),d=(parseFloat(h.marginRight)||0)+(parseFloat(h.paddingRight)||0),f=(parseFloat(h.marginBottom)||0)+(parseFloat(h.paddingBottom)||0),m=(parseFloat(h.marginLeft)||0)+(parseFloat(h.paddingLeft)||0))}catch{}try{e.documentElement.setAttribute("data-sd-pinned","")}catch{}let p=e.createElement("style");return p.setAttribute("data-sd-iframe-pin",""),p.textContent=`html {margin: 0 !important;padding: 0 !important;width: ${t}px !important;height: ${n}px !important;min-width: ${t}px !important;min-height: ${n}px !important;box-sizing: border-box !important;overflow: hidden !important;background-clip: border-box !important;}body {margin: 0 !important;padding: ${u}px ${d}px ${f}px ${m}px !important;width: ${t}px !important;height: ${n}px !important;min-width: ${t}px !important;min-height: ${n}px !important;box-sizing: border-box !important;overflow: hidden !important;background-clip: border-box !important;}`,(e.head||e.documentElement).appendChild(p),()=>{try{p.remove()}catch{}try{e.documentElement.removeAttribute("data-sd-pinned")}catch{}try{r&&typeof r.scrollTo=="function"&&r.scrollTo(o,i),e.body&&(e.body.scrollLeft=a,e.body.scrollTop=s),e.documentElement&&(e.documentElement.scrollLeft=l,e.documentElement.scrollTop=c)}catch{}}}async function Kd(e,t,n){let r=await jd(e,3);if(!r)throw new Error("iframe document not accessible/ready");let{contentWidth:o,contentHeight:i,rect:a}=Yd(e),s=n?.snap;if(!s&&typeof window<"u"&&window.snapdom&&(s=window.snapdom),!s||typeof s.toPng!="function")throw new Error("[snapdom] iframe capture requires snapdom.toPng. Use snapdom(el) or pass options.snap. With ESM, assign window.snapdom = snapdom after import if using iframes.");let l={...n,scale:1,clip:null},c=Zd(r,o,i),u=A.session.nodeMap,d=A.session.styleMap,f=A.session.styleCache,m;try{m=await s.toPng(r.documentElement,l)}finally{c(),A.session.nodeMap=u,A.session.styleMap=d,A.session.styleCache=f}m.style.display="block",m.style.width=`${o}px`,m.style.height=`${i}px`;let p=document.createElement("div");return t.nodeMap.set(p,e),Ne(e,p,t,n),p.style.overflow="hidden",p.style.display="block",p.style.width||(p.style.width=`${Math.round(a.width)}px`),p.style.height||(p.style.height=`${Math.round(a.height)}px`),p.appendChild(m),p}function Xd(e){let{width:t,height:n}=Le(e),r=e.getBoundingClientRect(),o;try{o=window.getComputedStyle(e)}catch{}let i=o?parseFloat(o.width):NaN,a=o?parseFloat(o.height):NaN,s=Math.round(t||r.width||0),l=Math.round(n||r.height||0),c=Number.isFinite(i)&&i>0?Math.round(i):Math.max(12,s||16),u=Number.isFinite(a)&&a>0?Math.round(a):Math.max(12,l||16),d=(e.type||"text").toLowerCase()==="checkbox",f=!!e.checked,m=!!e.indeterminate,p=Math.max(Math.min(c,u),12),h="middle";try{o&&o.verticalAlign&&(h=o.verticalAlign)}catch{}let y=document.createElement("div");y.setAttribute("data-snapdom-input-replacement",e.type||"checkbox"),y.style.cssText=`display:inline-block;width:${p}px;height:${p}px;vertical-align:${h};flex-shrink:0;line-height:0;`;let g=document.createElementNS("http://www.w3.org/2000/svg","svg");g.setAttribute("width",String(p)),g.setAttribute("height",String(p)),g.setAttribute("viewBox",`0 0 ${p} ${p}`),y.appendChild(g);function w(){let v="#0a6ed1";try{o&&(v=o.accentColor||o.color||v)}catch{}let b=2,S=b/2,x=p-b;if(g.innerHTML="",d){let I=document.createElementNS("http://www.w3.org/2000/svg","rect");if(I.setAttribute("x",String(S)),I.setAttribute("y",String(S)),I.setAttribute("width",String(x)),I.setAttribute("height",String(x)),I.setAttribute("rx","2"),I.setAttribute("ry","2"),I.setAttribute("fill",f?v:"none"),I.setAttribute("stroke",v),I.setAttribute("stroke-width",String(b)),g.appendChild(I),f){let C=document.createElementNS("http://www.w3.org/2000/svg","path");C.setAttribute("d",`M ${S+2} ${p/2} L ${p/2-1} ${p-S-2} L ${p-S-2} ${S+2}`),C.setAttribute("stroke","white"),C.setAttribute("stroke-width",String(Math.max(1.5,b))),C.setAttribute("fill","none"),C.setAttribute("stroke-linecap","round"),C.setAttribute("stroke-linejoin","round"),g.appendChild(C)}else if(m){let C=document.createElementNS("http://www.w3.org/2000/svg","rect"),E=Math.max(6,x-4);C.setAttribute("x",String((p-E)/2)),C.setAttribute("y",String((p-b)/2)),C.setAttribute("width",String(E)),C.setAttribute("height",String(b)),C.setAttribute("fill",v),C.setAttribute("rx","1"),g.appendChild(C)}}else{let I=document.createElementNS("http://www.w3.org/2000/svg","circle");if(I.setAttribute("cx",String(p/2)),I.setAttribute("cy",String(p/2)),I.setAttribute("r",String((p-b)/2)),I.setAttribute("fill",f?v:"none"),I.setAttribute("stroke",v),I.setAttribute("stroke-width",String(b)),g.appendChild(I),f){let C=document.createElementNS("http://www.w3.org/2000/svg","circle"),E=Math.max(2,(p-b*2)*.35);C.setAttribute("cx",String(p/2)),C.setAttribute("cy",String(p/2)),C.setAttribute("r",String(E)),C.setAttribute("fill","white"),g.appendChild(C)}}y.style.setProperty("width",`${p}px`,"important"),y.style.setProperty("height",`${p}px`,"important"),y.style.setProperty("min-width",`${p}px`,"important"),y.style.setProperty("min-height",`${p}px`,"important")}return w(),{el:y,applyVisual:w}}var Mt=new he(80);async function kt(e){if(A.resource?.has(e))return A.resource.get(e);if(Mt.has(e))return Mt.get(e);let t=(async()=>{let n=await xe(e,{as:"dataURL",silent:!0});if(!n.ok||typeof n.data!="string")throw new Error(`[snapDOM] Failed to read blob URL: ${e}`);return A.resource?.set(e,n.data),n.data})();Mt.set(e,t);try{let n=await t;return Mt.set(e,n),n}catch(n){throw Mt.delete(e),n}}var Jd=/\bblob:[^)"'\s]+/g;async function Ua(e){if(!e||e.indexOf("blob:")===-1)return e;let t=Array.from(new Set(e.match(Jd)||[]));if(t.length===0)return e;let n=e;for(let r of t)try{let o=await kt(r);n=n.split(r).join(o)}catch{}return n}function Cn(e){return typeof e=="string"&&e.startsWith("blob:")}function Qd(e){return(e||"").split(",").map(t=>t.trim()).filter(Boolean).map(t=>{let n=t.match(/^(\S+)(\s+.+)?$/);return n?{url:n[1],desc:n[2]||""}:null}).filter(Boolean)}function ef(e){return e.map(t=>t.desc?`${t.url} ${t.desc.trim()}`:t.url).join(", ")}function xn(e,t){let n=e.querySelectorAll?Array.from(e.querySelectorAll(t)):[];return e.matches?.(t)&&n.unshift(e),n}async function tf(e,t=null){if(!e)return;let n=t,r=xn(e,"img");for(let l of r)try{let c=l.getAttribute("src")||l.currentSrc||"";if(Cn(c)){let d=await kt(c);l.setAttribute("src",d)}let u=l.getAttribute("srcset");if(u&&u.includes("blob:")){let d=Qd(u),f=!1;for(let m of d)if(Cn(m.url))try{m.url=await kt(m.url),f=!0}catch(p){Q(n,"blobUrlToDataUrl for srcset item failed",p)}f&&l.setAttribute("srcset",ef(d))}}catch(c){Q(n,"resolveBlobUrls for img failed",c)}let o=xn(e,"image");for(let l of o)try{let c="http://www.w3.org/1999/xlink",u=l.getAttribute("href")||l.getAttributeNS?.(c,"href");if(Cn(u)){let d=await kt(u);l.setAttribute("href",d),l.removeAttributeNS?.(c,"href")}}catch(c){Q(n,"resolveBlobUrls for SVG image href failed",c)}let i=xn(e,"[style*='blob:']");for(let l of i)try{let c=l.getAttribute("style");if(c&&c.includes("blob:")){let u=await Ua(c);l.setAttribute("style",u)}}catch(c){Q(n,"replaceBlobUrls in inline style failed",c)}let a=e.querySelectorAll?e.querySelectorAll("style"):[];for(let l of a)try{let c=l.textContent||"";c.includes("blob:")&&(l.textContent=await Ua(c))}catch(c){Q(n,"replaceBlobUrls in style tag failed",c)}let s=["poster"];for(let l of s){let c=xn(e,`[${l}^='blob:']`);for(let u of c)try{let d=u.getAttribute(l);Cn(d)&&u.setAttribute(l,await kt(d))}catch(d){Q(n,`resolveBlobUrls for ${l} failed`,d)}}}ot();var ao=new Map,Va=new Set(["IFRAME"]);function qn(e,t){ao.set(String(e).toUpperCase(),t)}function Kr(e){let{width:t,height:n}=Le(e),r=t,o=n;if(!r||!o){let a=e.getBoundingClientRect();r=r||a.width||0,o=o||a.height||0}let i=document.createElement("div");return i.style.cssText=`display:inline-block;width:${r}px;height:${o}px;visibility:hidden;`,i}var In=200,nf=new Set(["img","canvas","video","iframe","object","embed"]);function za(e,t){return e.right>=t.left-In&&e.left<=t.right+In&&e.bottom>=t.top-In&&e.top<=t.bottom+In}function rf(e,t){if(e===t.root)return!1;let n;try{n=e.getBoundingClientRect()}catch{return!1}if(n.width===0&&n.height===0)return!1;let r=J(e);if(r.display==="inline"&&!nf.has((e.localName||"").toLowerCase()))return!1;let o=t.rect,i=e.scrollWidth||0,a=e.scrollHeight||0,s={left:r.direction==="rtl"?Math.min(n.left,n.right-i):n.left,top:n.top,right:Math.max(n.right,n.left+i),bottom:Math.max(n.bottom,n.top+a)},l=r.writingMode||"";if((l.startsWith("vertical")||l.startsWith("sideways"))&&(s.top=Math.min(n.top,n.bottom-a),s.left=Math.min(s.left,n.right-i)),za(s,o))return!1;let c=(e.ownerDocument||document).createTreeWalker(e,NodeFilter.SHOW_ELEMENT);for(;c.nextNode();){let u=c.currentNode.getBoundingClientRect();if((u.width>0||u.height>0)&&za(u,o))return!1}return!0}function of(e,t,n){let r=e.cloneNode(!1);e.tagName==="IMG"&&(r.removeAttribute("src"),r.removeAttribute("srcset"),r.removeAttribute("sizes")),Ne(e,r,t,n);let{width:o,height:i}=Le(e);return o>0&&(r.style.width=`${o}px`,r.style.minWidth=`${o}px`,r.style.maxWidth=`${o}px`),i>0&&(r.style.height=`${i}px`,r.style.minHeight=`${i}px`,r.style.maxHeight=`${i}px`),r.style.visibility="hidden",r.style.overflow="hidden",r.style.boxSizing="border-box",r}async function Fn(e,t,n){if(!e)throw new Error("Invalid node");let r=new Set,o=null,i=null;if(e.nodeType===Node.ELEMENT_NODE){let u=(e.localName||e.tagName||"").toLowerCase();if(e.id==="snapdom-sandbox"||e.hasAttribute("data-snapdom-sandbox")||ms.has(u))return null;if(u==="foreignobject"&&e.parentElement?.closest?.("foreignObject"))return Q(t,"Nested <foreignObject> skipped (SVG spec limitation \u2014 not rendered by browsers)"),null;if(u==="source"&&e.parentElement?.localName==="picture")return null}if(e.nodeType===Node.TEXT_NODE||e.nodeType!==Node.ELEMENT_NODE)return e.cloneNode(!0);if(e.getAttribute("data-capture")==="exclude"){if(n.excludeMode==="hide")return Kr(e);if(n.excludeMode==="remove")return null}if(n.exclude&&Array.isArray(n.exclude))for(let u of n.exclude)try{if(e.matches?.(u)){if(n.excludeMode==="hide")return Kr(e);if(n.excludeMode==="remove")return null}}catch(d){console.warn(`Invalid selector in exclude option: ${u}`,d)}if(typeof n.filter=="function")try{if(!n.filter(e)){if(n.filterMode==="hide")return Kr(e);if(n.filterMode==="remove")return null}}catch(u){console.warn("Error in filter function:",u)}if(t.clip&&rf(e,t.clip))return of(e,t,n);if(n.__resolveNodeHooks)for(let u of n.__resolveNodeHooks){let d;try{d=await u(e,n)}catch(f){Q(t,"resolveNode plugin hook failed",f)}if(d===null)return null;if(d instanceof Node)return d.nodeType===Node.ELEMENT_NODE&&(t.nodeMap.set(d,e),Ne(e,d,t,n)),d}{let u=Va.has(e.tagName)&&ao.get(e.tagName);if(u){let d=await u(e,t,n);if(d!==void 0)return d}}if(e.getAttribute("data-capture")==="placeholder"){let u=e.cloneNode(!1);t.nodeMap.set(u,e),Ne(e,u,t,n);let d=document.createElement("div");return d.textContent=e.getAttribute("data-placeholder-text")||"",d.style.cssText="color:#666;font-size:12px;text-align:center;line-height:1.4;padding:0.5em;box-sizing:border-box;",u.appendChild(d),u}{let u=!Va.has(e.tagName)&&ao.get(e.tagName);if(u){let d=await u(e,t,n);if(d!==void 0)return d}}let a;try{if(a=e.cloneNode(!1),a.attributes?.length)try{for(let u of a.attributes)/[\x00-\x08\x0B\x0C\x0E-\x1F\uFFFE\uFFFF]/.test(u.value)&&a.setAttribute(u.name,u.value.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\uFFFE\uFFFF]/g,""))}catch{}if(Rd(e,a),t.nodeMap.set(a,e),e.tagName==="IMG"){Ud(e,a);try{let{width:u,height:d}=Le(e),f=Math.round(u||0),m=Math.round(d||0);f&&(a.dataset.snapdomWidth=String(f)),m&&(a.dataset.snapdomHeight=String(m))}catch(u){Q(t,"getUnscaledDimensions for IMG failed",u)}try{let u=e.getAttribute("style")||"",d=window.getComputedStyle(e),f=v=>{let b=u.match(new RegExp(`${v}\\s*:\\s*([^;]+)`,"i")),S=b?b[1].trim():d.getPropertyValue(v);return/%|auto/i.test(String(S||""))},m=parseInt(a.dataset.snapdomWidth||"0",10),p=parseInt(a.dataset.snapdomHeight||"0",10),h=f("width")||!m,y=f("height")||!p;h&&m&&(a.style.width=`${m}px`),y&&p&&(a.style.height=`${p}px`);let g=d.getPropertyValue("object-fit"),w=d.getPropertyValue("object-position");g&&g!=="fill"?(a.style.objectFit=g,w&&(a.style.objectPosition=w)):(m&&(a.style.minWidth=`${m}px`),p&&(a.style.minHeight=`${p}px`))}catch(u){Q(t,"IMG dimension freeze failed",u)}}}catch(u){throw console.error("[Snapdom] Failed to clone node:",e,u),u}let s=null;if(e instanceof HTMLTextAreaElement){let{width:u,height:d}=Le(e),f=u||e.getBoundingClientRect().width||0,m=d||e.getBoundingClientRect().height||0;f&&(a.style.width=`${f}px`),m&&(a.style.height=`${m}px`)}if(e instanceof HTMLInputElement){let u=(e.type||"text").toLowerCase();if((u==="checkbox"||u==="radio")&&Xu()){let{el:d,applyVisual:f}=Xd(e);t.nodeMap.set(d,e),s=f,a=d}else a.value=e.value,a.setAttribute("value",e.value),e.checked!==void 0&&(a.checked=e.checked,e.checked&&a.setAttribute("checked",""),e.indeterminate&&(a.indeterminate=e.indeterminate))}if((e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)&&!e.value&&e.placeholder)try{let u=window.getComputedStyle(e,"::placeholder"),d=u&&u.color;if(d&&d!=="rgba(0, 0, 0, 0)"){let f="snapdom-ph-"+(Math.random()*1e6|0);a.classList.add(f);let m=document.createElement("style");m.textContent=`.${f}::placeholder{color:${d}!important;opacity:${u.opacity||"1"}!important;-webkit-text-fill-color:${d}!important;}`,a.prepend(m)}}catch{}if(e instanceof HTMLSelectElement&&(o=e.value),e instanceof HTMLTextAreaElement&&(i=e.value),e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement){e.disabled&&a.setAttribute("disabled",""),e.required&&a.setAttribute("required",""),e.readOnly&&a.setAttribute("readonly","");let u=e;u.min!==void 0&&u.min!==""&&a.setAttribute("min",u.min),u.max!==void 0&&u.max!==""&&a.setAttribute("max",u.max),u.pattern!==void 0&&u.pattern!==""&&a.setAttribute("pattern",u.pattern);let d=e.getAttribute("aria-invalid");d!==null&&a.setAttribute("aria-invalid",d)}if(io(e)||Ne(e,a,t,n),s&&s(),e instanceof SVGElement&&!io(e)){let u=["fill","stroke","stroke-width","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","opacity","fill-opacity","stroke-opacity","fill-rule","clip-rule","marker","marker-start","marker-mid","marker-end","visibility","display"];try{let d=window.getComputedStyle(e);for(let f of u){let m=d.getPropertyValue(f);m&&a.style.setProperty(f,m)}}catch{}}if(e.shadowRoot){try{let v=e.shadowRoot.querySelectorAll("slot");for(let b of v){let S=b.assignedNodes?.()||[];for(let x of S)r.add(x)}}catch{}let u=Wd(t),d=`[data-sd="${u}"]`;t.shadowScopes||(t.shadowScopes=new WeakMap),t.shadowScopes.set(e.shadowRoot,u);try{a.setAttribute("data-sd",u)}catch{}let f=Bd(e.shadowRoot),m=Dd(f,d,u),p=Vd(f),h=Gd(e,p,d);Hd(a,h+m,u);let y=document.createDocumentFragment(),g=(v,b)=>{if(v.nodeType===Node.ELEMENT_NODE&&v.tagName==="STYLE")return b(null);Fn(v,t,n).then(S=>{b(S||null)}).catch(()=>{b(null)})},w=await Zr(Array.from(e.shadowRoot.childNodes),g,n.fast);y.append(...w.filter(v=>!!v)),a.appendChild(y)}if(e.tagName==="SLOT"){let u=t.shadowScopes?.get(e.getRootNode()),d=e.assignedNodes?.()||[],f=d.length?e.assignedNodes?.({flatten:!0})||d:[],m=f.length?f:Array.from(e.childNodes),p=document.createDocumentFragment(),h=(g,w)=>{Fn(g,t,n).then(v=>{v&&d.length&&qd(v,u),w(v||null)}).catch(()=>{w(null)})},y=await Zr(Array.from(m),h,n.fast);return p.append(...y.filter(g=>!!g)),p}function l(u,d){if(r.has(u))return d(null);Fn(u,t,n).then(f=>{d(f||null)}).catch(()=>{d(null)})}let c=await Zr(Array.from(e.childNodes),l,n.fast);if(a.append(...c.filter(u=>!!u)),o!==null&&a instanceof HTMLSelectElement){a.value=o;for(let u of a.options)u.value===o?u.setAttribute("selected",""):u.removeAttribute("selected")}return i!==null&&a instanceof HTMLTextAreaElement&&(a.textContent=i),a}async function af(e,t,n){let r=!1;try{r=!!(e.contentDocument||e.contentWindow?.document)}catch(o){Q(t,"iframe same-origin probe failed",o)}if(r)try{return await Kd(e,t,n)}catch(o){console.warn("[SnapDOM] iframe rasterization failed, fallback:",o)}if(r||console.warn("[snapdom] cross-origin <iframe> skipped (its document cannot be read). Captured as a placeholder that keeps the frame's box; pass { placeholders: false } for an invisible spacer.",e),n.placeholders){let{width:o,height:i}=Le(e),a=document.createElement("div");return a.style.cssText=`width:${o}px;height:${i}px;background-image:repeating-linear-gradient(45deg,#ddd,#ddd 5px,#f9f9f9 5px,#f9f9f9 10px);display:flex;align-items:center;justify-content:center;font-size:12px;color:#555;border:1px solid #aaa;`,Ne(e,a,t,n),a}else{let{width:o,height:i}=Le(e),a=document.createElement("div");return a.style.cssText=`display:inline-block;width:${o}px;height:${i}px;visibility:hidden;`,Ne(e,a,t,n),a}}function sf(e){try{let t=Math.max(1,Math.min(32,e.width)),n=Math.max(1,Math.min(32,e.height)),r=document.createElement("canvas");r.width=t,r.height=n;let o=r.getContext("2d",{willReadFrequently:!0});if(!o)return!1;o.drawImage(e,0,0,t,n);let i=o.getImageData(0,0,t,n).data;for(let a=3;a<i.length;a+=4)if(i[a]!==0)return!1;return!0}catch{return!1}}async function lf(e,t,n){let r="";try{let s=e.getContext("2d",{willReadFrequently:!0});try{s&&s.getImageData(0,0,1,1)}catch{}if((De()||!s)&&await tt(),r=e.toDataURL("image/png"),!r||r==="data:,"){try{s&&s.getImageData(0,0,1,1)}catch{}if(await tt(),r=e.toDataURL("image/png"),!r||r==="data:,"){let l=document.createElement("canvas");l.width=e.width,l.height=e.height;let c=l.getContext("2d");c&&(c.drawImage(e,0,0),r=l.toDataURL("image/png"))}}}catch(s){Q(t,"Canvas toDataURL failed, using empty/fallback",s)}n&&n.debug&&r&&sf(e)&&Q(t,"canvas is empty at capture time \u2014 capture it after its first frame is drawn",e);let o=document.createElement("img");try{o.decoding="sync",o.loading="eager"}catch(s){Q(t,"img decoding/loading hints failed",s)}r&&(o.src=r),o.width=e.width,o.height=e.height;let{width:i,height:a}=Le(e);return i>0&&(o.style.width=`${i}px`),a>0&&(o.style.height=`${a}px`),t.nodeMap.set(o,e),Ne(e,o,t,n),o}async function cf(e,t,n){let r="";try{let s=document.createElement("canvas");s.width=e.videoWidth||e.offsetWidth||320,s.height=e.videoHeight||e.offsetHeight||240;let l=s.getContext("2d");l&&(l.drawImage(e,0,0,s.width,s.height),r=s.toDataURL("image/png"),(!r||r==="data:,")&&(r=""))}catch(s){Q(t,"Video frame capture failed, using poster fallback",s)}let o=document.createElement("img");try{o.decoding="sync",o.loading="eager"}catch{}r?o.src=r:e.poster&&(o.src=e.poster),o.width=e.videoWidth||e.offsetWidth||0,o.height=e.videoHeight||e.offsetHeight||0;let{width:i,height:a}=Le(e);return i>0&&(o.style.width=`${i}px`),a>0&&(o.style.height=`${a}px`),o.style.objectFit="contain",t.nodeMap.set(o,e),Ne(e,o,t,n),o}async function uf(e,t,n){if(!e.controls)return;let{width:r,height:o}=Le(e),i=Math.round(r||e.offsetWidth||300),a=Math.round(o||e.offsetHeight||54),s=a/2,l=Math.max(4,a*.16),c=a*.34,u=i-a*.34,d=c+l+a*.55,f=Math.max(0,u-a*.7-d),m=Math.max(9,Math.round(a*.24)),p=`<svg xmlns="http://www.w3.org/2000/svg" width="${i}" height="${a}" viewBox="0 0 ${i} ${a}"><rect width="${i}" height="${a}" rx="${Math.min(a/2,10)}" fill="#f1f3f4"/><path d="M ${c} ${s-l} L ${c+l} ${s} L ${c} ${s+l} Z" fill="#5f6368"/><rect x="${d}" y="${s-1.5}" width="${f}" height="3" rx="1.5" fill="#bdc1c6"/><circle cx="${d}" cy="${s}" r="${Math.max(3,a*.09)}" fill="#5f6368"/><text x="${u}" y="${s}" fill="#5f6368" font-family="sans-serif" font-size="${m}" text-anchor="end" dominant-baseline="central">0:00</text></svg>`,h=document.createElement("img");try{h.decoding="sync",h.loading="eager"}catch{}return h.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(p)}`,h.width=i,h.height=a,h.style.width=`${i}px`,h.style.height=`${a}px`,t.nodeMap.set(h,e),Ne(e,h,t,n),h}qn("IFRAME",af);qn("CANVAS",lf);qn("VIDEO",cf);qn("AUDIO",uf);Ee();Vn();zn();ge();ge();var df=[/font\s*awesome/i,/material\s*icons/i,/ionicons/i,/glyphicons/i,/feather/i,/bootstrap\s*icons/i,/remix\s*icons/i,/heroicons/i,/layui/i,/lucide/i],ht=Object.assign({materialIconsFilled:"https://fonts.gstatic.com/s/materialicons/v48/flUhRq6tzZclQEJ-Vdg-IuiaDsNcIhQ8tQ.woff2",materialIconsOutlined:"https://fonts.gstatic.com/s/materialiconsoutlined/v110/gok-H7zzDkdnRel8-DQ6KAXJ69wP1tGnf4ZGhUcel5euIg.woff2",materialIconsRound:"https://fonts.gstatic.com/s/materialiconsround/v109/LDItaoyNOAY6Uewc665JcIzCKsKc_M9flwmPq_HTTw.woff2",materialIconsSharp:"https://fonts.gstatic.com/s/materialiconssharp/v110/oPWQ_lt5nv4pWNJpghLP75WiFR4kLh3kvmvRImcycg.woff2"},typeof window<"u"&&window.__SNAPDOM_ICON_FONTS__||{}),Ps=[],Ga=new Set;function ff(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function pf(e){let t=Array.isArray(e)?e:[e];for(let n of t){let r;if(n instanceof RegExp)r=n;else if(typeof n=="string")r=new RegExp(ff(n),"i");else{console.warn("[snapdom] Ignored invalid iconFont value:",n);continue}let o=`${r.source}/${r.flags}`;Ga.has(o)||(Ga.add(o),Ps.push(r))}}function Oe(e){let t=typeof e=="string"?e:"",n=[...df,...Ps];for(let r of n)if(r instanceof RegExp&&r.test(t))return!0;return!!(/icon/i.test(t)||/glyph/i.test(t)||/symbols/i.test(t)||/feather/i.test(t)||/fontawesome/i.test(t))}function mf(e=""){let t=String(e).toLowerCase();return/\bmaterial\s*icons\b/.test(t)||/\bmaterial\s*symbols\b/.test(t)}var qa=new Map;function hf(e=""){let t=Object.create(null),n=String(e||""),r=/['"]?\s*([A-Za-z]{3,4})\s*['"]?\s*([+-]?\d+(?:\.\d+)?)\s*/g,o;for(;o=r.exec(n);)t[o[1].toUpperCase()]=Number(o[2]);return t}async function gf(e,t,n){let r=String(e||""),o=r.toLowerCase(),i=String(t||"").toLowerCase();if(/\bmaterial\s*icons\b/.test(o)&&!/\bsymbols\b/.test(o))return{familyForMeasure:r,familyForCanvas:r};if(!/\bmaterial\s*symbols\b/.test(o))return{familyForMeasure:r,familyForCanvas:r};let a=n&&(n.FILL??n.fill),s="outlined";/\brounded\b/.test(i)||/\bround\b/.test(i)?s="rounded":/\bsharp\b/.test(i)?s="sharp":/\boutlined\b/.test(i)&&(s="outlined");let l=a===1,c=null;if(l&&(s==="outlined"&&ht.materialIconsFilled?c={url:ht.materialIconsFilled,alias:"snapdom-mi-filled"}:s==="rounded"&&ht.materialIconsRound?c={url:ht.materialIconsRound,alias:"snapdom-mi-round"}:s==="sharp"&&ht.materialIconsSharp&&(c={url:ht.materialIconsSharp,alias:"snapdom-mi-sharp"})),!c)return{familyForMeasure:r,familyForCanvas:r};if(!qa.has(c.alias))try{let d=new FontFace(c.alias,`url(${c.url})`,{style:"normal",weight:"400"});document.fonts.add(d),await d.load(),qa.set(c.alias,!0)}catch{return{familyForMeasure:r,familyForCanvas:r}}let u=`"${c.alias}"`;return{familyForMeasure:u,familyForCanvas:u}}async function yf(e="Material Icons",t=24){try{await Promise.all([document.fonts.load(`400 ${t}px "${String(e).replace(/["']/g,"")}"`),document.fonts.ready])}catch{}}function bf(e){let t=e.getPropertyValue("-webkit-text-fill-color")?.trim()||"",n=/^transparent$/i.test(t)||/rgba?\(\s*0\s*,\s*0\s*,\s*0\s*,\s*0\s*\)/i.test(t);if(t&&!n&&t.toLowerCase()!=="currentcolor")return t;let r=e.color?.trim();return r&&r!=="inherit"?r:"#000"}async function wf(e,{family:t="Material Icons",weight:n="normal",fontSize:r=32,color:o="#000",variation:i="",className:a=""}={}){let s=String(t||"").replace(/^['"]+|['"]+$/g,""),l=window.devicePixelRatio||1,c=hf(i),{familyForMeasure:u,familyForCanvas:d}=await gf(s,a,c);await yf(d.replace(/^["']+|["']+$/g,""),r);let f=document.createElement("span");f.setAttribute("data-snapdom-internal",""),f.textContent=e,f.style.position="absolute",f.style.visibility="hidden",f.style.left="-99999px",f.style.whiteSpace="nowrap",f.style.fontFamily=u,f.style.fontWeight=String(n||"normal"),f.style.fontSize=`${r}px`,f.style.lineHeight="1",f.style.margin="0",f.style.padding="0",f.style.fontFeatureSettings="'liga' 1",f.style.fontVariantLigatures="normal",f.style.color=o,document.body.appendChild(f);let m=f.getBoundingClientRect(),p=Math.max(1,Math.ceil(m.width)),h=Math.max(1,Math.ceil(m.height));document.body.removeChild(f);let y=document.createElement("canvas");y.width=p*l,y.height=h*l;let g=y.getContext("2d");g.scale(l,l),g.font=`${n?`${n} `:""}${r}px ${d}`,g.textAlign="left",g.textBaseline="top",g.fillStyle=o;try{g.fontKerning="normal"}catch{}return g.fillText(e,0,0),{dataUrl:y.toDataURL(),width:p,height:h}}async function vf(e,t,n=A.session.nodeMap){if(e?.nodeType!==1)return 0;let r='.material-icons, [class*="material-symbols"]',o=Array.from(e.querySelectorAll(r)).filter(s=>s&&s.textContent&&s.textContent.trim());if(e.matches?.(r)&&e.textContent&&e.textContent.trim()&&o.unshift(e),o.length===0)return 0;let i=t?.nodeType===1?Array.from(t.querySelectorAll(r)).filter(s=>s&&s.textContent&&s.textContent.trim()):[];t?.nodeType===1&&t.matches?.(r)&&t.textContent&&t.textContent.trim()&&i.unshift(t);let a=0;for(let s=0;s<o.length;s++){let l=o[s],c=n&&n.get(l)||i[s]||null;try{let u=getComputedStyle(c||l),d=u.fontFamily||"Material Icons";if(!mf(d))continue;let f=(c||l).textContent.trim();if(!f)continue;let m=parseInt(u.fontSize,10)||24,p=u.fontWeight&&u.fontWeight!=="normal"?u.fontWeight:"normal",h=bf(u),y=u.fontVariationSettings&&u.fontVariationSettings!=="normal"?u.fontVariationSettings:"",g=(c||l).className||"",{dataUrl:w,width:v,height:b}=await wf(f,{family:d,weight:p,fontSize:m,color:h,variation:y,className:g});l.textContent="";let S=l.ownerDocument.createElement("img");S.src=w,S.alt=f,S.style.height=`${m}px`,S.style.width=`${Math.max(1,Math.round(v/b*m))}px`,S.style.objectFit="contain",S.style.verticalAlign=getComputedStyle(l).verticalAlign||"baseline",l.appendChild(S),a++}catch{}}return a}rt();ot();async function Sf(e,t,n,r=32,o="#000"){t=t.replace(/^['"]+|['"]+$/g,"");let i=window.devicePixelRatio||1;try{await document.fonts.ready}catch{}let a=document.createElement("span");a.setAttribute("data-snapdom-internal",""),a.textContent=e,a.style.position="absolute",a.style.visibility="hidden",a.style.fontFamily=`"${t}"`,a.style.fontWeight=n||"normal",a.style.fontSize=`${r}px`,a.style.lineHeight="1",a.style.whiteSpace="nowrap",a.style.padding="0",a.style.margin="0",document.body.appendChild(a);let s=a.getBoundingClientRect(),l=Math.ceil(s.width),c=Math.ceil(s.height);document.body.removeChild(a);let u=document.createElement("canvas");u.width=Math.max(1,l*i),u.height=Math.max(1,c*i);let d=u.getContext("2d");return d.scale(i,i),d.font=n?`${n} ${r}px "${t}"`:`${r}px "${t}"`,d.textAlign="left",d.textBaseline="top",d.fillStyle=o,d.fillText(e,0,0),{dataUrl:u.toDataURL(),width:l,height:c}}var Ds=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","emoji","math","fangsong","ui-serif","ui-sans-serif","ui-monospace","ui-rounded"]),Cf=["katex","mathjax","mathml"];function Mo(e){if(!e)return"";for(let t of e.split(",")){let n=t.trim().replace(/^['"]+|['"]+$/g,"");if(n&&!Ds.has(n.toLowerCase()))return n}return""}function xf(e){if(!e)return[];let t=[];for(let n of e.split(",")){let r=n.trim().replace(/^['"]+|['"]+$/g,"");r&&(Ds.has(r.toLowerCase())||t.push(r))}return t}function $n(e){let t=String(e??"400").trim().toLowerCase();if(t==="normal")return 400;if(t==="bold")return 700;let n=parseInt(t,10);return Number.isFinite(n)?Math.min(900,Math.max(100,n)):400}function _n(e){let t=String(e??"normal").trim().toLowerCase();return t.startsWith("italic")?"italic":t.startsWith("oblique")?"oblique":"normal"}function If(e){let t=String(e??"100%").match(/(\d+(?:\.\d+)?)\s*%/);return t?Math.max(50,Math.min(200,parseFloat(t[1]))):100}function Af(e){let t=String(e||"400").trim(),n=t.match(/^(\d{2,3})\s+(\d{2,3})$/);if(n){let o=$n(n[1]),i=$n(n[2]);return{min:Math.min(o,i),max:Math.max(o,i)}}let r=$n(t);return{min:r,max:r}}function Mf(e){let t=String(e||"normal").trim().toLowerCase();return t==="italic"?{kind:"italic"}:t.startsWith("oblique")?{kind:"oblique"}:{kind:"normal"}}function Ef(e){let t=String(e||"100%").trim(),n=t.match(/(\d+(?:\.\d+)?)\s*%\s+(\d+(?:\.\d+)?)\s*%/);if(n){let i=parseFloat(n[1]),a=parseFloat(n[2]);return{min:Math.min(i,a),max:Math.max(i,a)}}let r=t.match(/(\d+(?:\.\d+)?)\s*%/),o=r?parseFloat(r[1]):100;return{min:o,max:o}}function kf(e){return!e||typeof e!="string"?"":e.replace(/\s+(variable|vf|v[0-9]+)$/i,"").trim().toLowerCase().replace(/\s+/g,"-")}function Tf(e,t,n=[]){if(!e)return!1;try{let r=new URL(e,location.href);if(r.origin===location.origin)return!0;let o=r.host.toLowerCase();if(["fonts.googleapis.com","fonts.gstatic.com","use.typekit.net","p.typekit.net","kit.fontawesome.com","use.fontawesome.com","cdn.jsdelivr.net","unpkg.com","cdnjs.cloudflare.com","esm.sh"].some(a=>o.endsWith(a))||n.some(a=>o===a.toLowerCase()||o.endsWith("."+a.toLowerCase())))return!0;let i=(r.pathname+r.search).toLowerCase();if(/\bfont(s)?\b/.test(i)||/\.woff2?(\b|$)/.test(i)||Cf.some(a=>i.includes(a)))return!0;for(let a of t){let s=a.toLowerCase().replace(/\s+/g,"+"),l=a.toLowerCase().replace(/\s+/g,"-"),c=kf(a);if(i.includes(s)||i.includes(l)||c&&i.includes(c))return!0}return!1}catch{return!1}}function Rf(e){let t=new Set;for(let n of e||[]){let r=String(n).split("__")[0]?.trim();r&&t.add(r)}return t}function ja(e,t){return e&&e.replace(/url\(\s*(['"]?)([^)'"]+)\1\s*\)/g,(n,r,o)=>{let i=(o||"").trim();if(!i||/^data:|^blob:|^https?:|^file:|^about:/i.test(i))return n;let a=i;try{a=new URL(i,t||location.href).href}catch{}return`url("${a}")`})}var so=/@import\s+(?:url\(\s*(['"]?)([^)"']+)\1\s*\)|(['"])([^"']+)\3)([^;]*);/g,Hn=4;async function Nf(e,t,n){if(!e)return e;let r=new Set;function o(s,l){try{return new URL(s,l||location.href).href}catch{return s}}async function i(s,l,c=0){if(c>Hn)return console.warn(`[snapDOM] @import depth exceeded (${Hn}) at ${l}`),s;let u="",d=0,f;for(;f=so.exec(s);){u+=s.slice(d,f.index),d=so.lastIndex;let m=(f[2]||f[4]||"").trim(),p=o(m,l);if(r.has(p)){console.warn(`[snapDOM] Skipping circular @import: ${p}`);continue}r.add(p);let h="";try{let y=await xe(p,{as:"text",useProxy:n,silent:!0});y.ok&&typeof y.data=="string"&&(h=y.data)}catch{}h?(h=ja(h,p),h=await i(h,p,c+1),u+=`
|
|
199
79
|
/* inlined: ${p} */
|
|
200
|
-
${
|
|
201
|
-
`):u+=f[0]}return u+=s.slice(d),u}let a=ka(e,t||location.href);return a=await i(a,t||location.href,0),a}var ns=/url\((["']?)([^"')]+)\1\)/g,Ad=/@font-face[^{}]*\{[^}]*\}/g;function rs(e){if(!e)return[];let t=[],n=e.split(",").map(r=>r.trim()).filter(Boolean);for(let r of n){let o=r.match(/^U\+([0-9A-Fa-f?]+)(?:-([0-9A-Fa-f?]+))?$/);if(!o)continue;let i=o[1],a=o[2],s=c=>{if(!c.includes("?"))return parseInt(c,16);let l=parseInt(c.replace(/\?/g,"0"),16),u=parseInt(c.replace(/\?/g,"F"),16);return[l,u]};if(a){let c=s(i),l=s(a),u=Array.isArray(c)?c[0]:c,d=Array.isArray(l)?l[1]:l;t.push([Math.min(u,d),Math.max(u,d)])}else{let c=s(i);Array.isArray(c)?t.push([c[0],c[1]]):t.push([c,c])}}return t}function os(e,t){if(!t.length||!e||e.size===0)return!0;for(let n of e)for(let[r,o]of t)if(n>=r&&n<=o)return!0;return!1}function ro(e,t){let n=[];if(!e)return n;for(let r of e.matchAll(ns)){let o=(r[2]||"").trim();if(!(!o||o.startsWith("data:"))){if(!/^https?:/i.test(o))try{o=new URL(o,t||location.href).href}catch{}n.push(o)}}return n}async function is(e,t,n=""){let r=e;for(let o of e.matchAll(ns)){let i=Qr(o[0]);if(!i)continue;let a=i;if(!a.startsWith("http")&&!a.startsWith("data:"))try{a=new URL(a,t||location.href).href}catch{}if(!_e(a)){if(A.resource?.has(a)){A.font?.add(a),r=r.replace(o[0],`url(${A.resource.get(a)})`);continue}if(!A.font?.has(a))try{let s=await ve(a,{as:"dataURL",useProxy:n,silent:!0});if(s.ok&&typeof s.data=="string"){let c=s.data;A.resource?.set(a,c),A.font?.add(a),r=r.replace(o[0],`url(${c})`)}}catch{console.warn("[snapDOM] Failed to fetch font resource:",a)}}}return r}function kd(e){if(!e.length)return null;let t=(a,s)=>e.some(([c,l])=>!(l<a||c>s)),n=t(0,255)||t(305,305),r=t(256,591)||t(7680,7935),o=t(880,1023),i=t(1024,1279);return t(7840,7929)||t(258,259)||t(416,417)||t(431,432)?"vietnamese":i?"cyrillic":o?"greek":r?"latin-ext":n?"latin":null}function Ma(e={}){let t=new Set((e.families||[]).map(o=>String(o).toLowerCase())),n=new Set((e.domains||[]).map(o=>String(o).toLowerCase())),r=new Set((e.subsets||[]).map(o=>String(o).toLowerCase()));return(o,i)=>{if(t.size&&t.has(o.family.toLowerCase()))return!0;if(n.size)for(let a of o.srcUrls)try{if(n.has(new URL(a).host.toLowerCase()))return!0}catch{}if(r.size){let a=kd(i);if(a&&r.has(a))return!0}return!1}}function Md(e){if(!e)return e;let t=/@font-face[^{}]*\{[^}]*\}/gi,n=new Set,r=[];for(let i of e.match(t)||[]){let a=i.match(/font-family:\s*([^;]+);/i)?.[1]||"",s=no(a),c=(i.match(/font-weight:\s*([^;]+);/i)?.[1]||"400").trim(),l=(i.match(/font-style:\s*([^;]+);/i)?.[1]||"normal").trim(),u=(i.match(/font-stretch:\s*([^;]+);/i)?.[1]||"100%").trim(),d=(i.match(/unicode-range:\s*([^;]+);/i)?.[1]||"").trim(),f=(i.match(/src\s*:\s*([^;}]+)[;}]/i)?.[1]||"").trim(),m=ro(f,location.href),p=m.length?m.map(h=>String(h).toLowerCase()).sort().join("|"):f.toLowerCase(),g=[String(s||"").toLowerCase(),c,l,u,d.toLowerCase(),p].join("|");n.has(g)||(n.add(g),r.push(i))}if(r.length===0)return e;let o=0;return e.replace(t,()=>r[o++]||"")}function Td(e,t,n,r,o){let i=Array.from(e||[]).sort().join("|"),a=t?JSON.stringify({families:(t.families||[]).map(u=>String(u).toLowerCase()).sort(),domains:(t.domains||[]).map(u=>String(u).toLowerCase()).sort(),subsets:(t.subsets||[]).map(u=>String(u).toLowerCase()).sort()}):"",s=(n||[]).map(u=>`${(u.family||"").toLowerCase()}::${u.weight||"normal"}::${u.style||"normal"}::${u.src||""}`).sort().join("|"),c=r||"",l=(o||[]).map(u=>String(u).toLowerCase()).sort().join("|");return`fonts-embed-css::req=${i}::ex=${a}::lf=${s}::px=${c}::fd=${l}`}async function as(e,t,n,r){let o;try{o=e.cssRules||[]}catch{return}let i=(a,s)=>{try{return new URL(a,s||location.href).href}catch{return a}};for(let a of o){if(a.type===CSSRule.IMPORT_RULE&&a.styleSheet){let s=a.href?i(a.href,t):t;if(r.depth>=Nn){console.warn(`[snapDOM] CSSOM import depth exceeded (${Nn}) at ${s}`);continue}if(s&&r.visitedSheets.has(s)){console.warn(`[snapDOM] Skipping circular CSSOM import: ${s}`);continue}s&&r.visitedSheets.add(s);let c={...r,depth:(r.depth||0)+1};await as(a.styleSheet,s,n,c);continue}if(a.type===CSSRule.FONT_FACE_RULE){let s=(a.style.getPropertyValue("font-family")||"").trim(),c=no(s);if(!c||_e(c))continue;let l=(a.style.getPropertyValue("font-weight")||"400").trim(),u=(a.style.getPropertyValue("font-style")||"normal").trim(),d=(a.style.getPropertyValue("font-stretch")||"100%").trim(),f=(a.style.getPropertyValue("src")||"").trim(),m=(a.style.getPropertyValue("unicode-range")||"").trim();if(!r.faceMatchesRequired(c,u,l,d))continue;let p=rs(m);if(!os(r.usedCodepoints,p))continue;let g={family:c,weightSpec:l,styleSpec:u,stretchSpec:d,unicodeRange:m,srcRaw:f,srcUrls:ro(f,t||location.href),href:t||location.href};if(r.simpleExcluder&&r.simpleExcluder(g,p))continue;if(/url\(/i.test(f)){let h=await is(f,t||location.href,r.useProxy);await n(`@font-face{font-family:${c};src:${h};font-style:${u};font-weight:${l};font-stretch:${d};${m?`unicode-range:${m};`:""}}`)}else await n(`@font-face{font-family:${c};src:${f};font-style:${u};font-weight:${l};font-stretch:${d};${m?`unicode-range:${m};`:""}}`)}}}async function Ld({required:e,usedCodepoints:t,exclude:n=void 0,localFonts:r=[],useProxy:o="",fontStylesheetDomains:i=[]}={}){e instanceof Set||(e=new Set),t instanceof Set||(t=new Set);let a=new Map;for(let h of e){let[y,v,b,w]=String(h).split("__");if(!y)continue;let S=a.get(y)||[];S.push({w:parseInt(v,10),s:b,st:parseInt(w,10)}),a.set(y,S)}function s(h,y,v,b){if(!a.has(h))return!1;let w=a.get(h),S=wd(v),I=vd(y),C=Cd(b),E=S.min!==S.max,M=S.min,O=T=>I.kind==="normal"&&T==="normal"||I.kind!=="normal"&&(T==="italic"||T==="oblique"),D=!1;for(let T of w){let k=E?T.w>=S.min&&T.w<=S.max:T.w===M,W=O(Tn(T.s)),G=T.st>=C.min&&T.st<=C.max;if(k&&W&&G){D=!0;break}}if(D)return!0;if(!E)for(let T of w){let k=O(Tn(T.s)),W=T.st>=C.min&&T.st<=C.max;if(Math.abs(M-T.w)<=300&&k&&W)return!0}if(!E&&I.kind==="normal"&&w.some(T=>Tn(T.s)!=="normal"))for(let T of w){let k=Math.abs(M-T.w)<=300,W=T.st>=C.min&&T.st<=C.max;if(k&&W)return!0}return!1}let c=Ma(n),l=Td(e,n,r,o,i);if(A.resource?.has(l))return A.resource.get(l);let u=Id(e),d=[],f=Yr;for(let h of document.querySelectorAll("style")){let y=h.textContent||"";for(let v of y.matchAll(f)){let b=(v[2]||v[4]||"").trim();!b||_e(b)||document.querySelector(`link[rel="stylesheet"][href="${b}"]`)||d.push(b)}}d.length&&await Promise.all(d.map(h=>new Promise(y=>{if(document.querySelector(`link[rel="stylesheet"][href="${h}"]`))return y(null);let v=document.createElement("link");v.rel="stylesheet",v.href=h,v.setAttribute("data-snapdom","injected-import"),v.onload=()=>y(v),v.onerror=()=>y(null),document.head.appendChild(v)})));let m="",p=Array.from(document.querySelectorAll('link[rel="stylesheet"]')).filter(h=>!!h.href);for(let h of p)try{if(_e(h.href))continue;let y="",v=!1;try{v=new URL(h.href,location.href).origin===location.origin}catch{}if(!v){let w=Array.isArray(i)?i:[];if(!xd(h.href,u,w))continue}if(v){let w=Array.from(document.styleSheets).find(S=>S.href===h.href);if(w)try{let S=w.cssRules||[];y=Array.from(S).map(I=>I.cssText).join("")}catch{}}if(!y){let w=await ve(h.href,{as:"text",useProxy:o});if(w?.ok&&typeof w.data=="string"&&(y=w.data),_e(h.href))continue}y=await Ed(y,h.href,o);let b="";for(let w of y.match(Ad)||[]){let S=(w.match(/font-family:\s*([^;]+);/i)?.[1]||"").trim(),I=no(S);if(!I||_e(I))continue;let C=(w.match(/font-weight:\s*([^;]+);/i)?.[1]||"400").trim(),E=(w.match(/font-style:\s*([^;]+);/i)?.[1]||"normal").trim(),M=(w.match(/font-stretch:\s*([^;]+);/i)?.[1]||"100%").trim(),O=(w.match(/unicode-range:\s*([^;]+);/i)?.[1]||"").trim(),D=(w.match(/src\s*:\s*([^;}]+)[;}]/i)?.[1]||"").trim(),T=ro(D,h.href);if(!s(I,E,C,M))continue;let k=rs(O);if(!os(t,k))continue;let W={family:I,weightSpec:C,styleSpec:E,stretchSpec:M,unicodeRange:O,srcRaw:D,srcUrls:T,href:h.href};if(n&&c(W,k))continue;let G=/url\(/i.test(D)?await is(w,h.href,o):w;b+=G}b.trim()&&(m+=b)}catch{console.warn("[snapDOM] Failed to process stylesheet:",h.href)}let g={requiredIndex:a,usedCodepoints:t,faceMatchesRequired:s,simpleExcluder:n?Ma(n):null,useProxy:o,visitedSheets:new Set,depth:0};for(let h of document.styleSheets)if(!(h.href&&p.some(y=>y.href===h.href)))try{let y=h.href||location.origin+"/";y&&g.visitedSheets.add(y),await as(h,y,async v=>{m+=v},g)}catch{}try{for(let h of document.fonts||[]){if(!h||!h.family||h.status!=="loaded"||!h._snapdomSrc)continue;let y=String(h.family).replace(/^['"]+|['"]+$/g,"");if(_e(y)||!a.has(y)||n?.families&&n.families.some(b=>String(b).toLowerCase()===y.toLowerCase()))continue;let v=h._snapdomSrc;if(!String(v).startsWith("data:")){if(A.resource?.has(h._snapdomSrc))v=A.resource.get(h._snapdomSrc),A.font?.add(h._snapdomSrc);else if(!A.font?.has(h._snapdomSrc))try{let b=await ve(h._snapdomSrc,{as:"dataURL",useProxy:o,silent:!0});if(b.ok&&typeof b.data=="string")v=b.data,A.resource?.set(h._snapdomSrc,v),A.font?.add(h._snapdomSrc);else continue}catch{console.warn("[snapDOM] Failed to fetch dynamic font src:",h._snapdomSrc);continue}}m+=`@font-face{font-family:'${y}';src:url(${v});font-style:${h.style||"normal"};font-weight:${h.weight||"normal"};}`}}catch{}for(let h of r){if(!h||typeof h!="object")continue;let y=String(h.family||"").replace(/^['"]+|['"]+$/g,"");if(!y||_e(y)||!a.has(y)||n?.families&&n.families.some(C=>String(C).toLowerCase()===y.toLowerCase()))continue;let v=h.weight!=null?String(h.weight):"normal",b=h.style!=null?String(h.style):"normal",w=h.stretchPct!=null?`${h.stretchPct}%`:"100%",S=String(h.src||""),I=S;if(!I.startsWith("data:")){if(A.resource?.has(S))I=A.resource.get(S),A.font?.add(S);else if(!A.font?.has(S))try{let C=await ve(S,{as:"dataURL",useProxy:o,silent:!0});if(C.ok&&typeof C.data=="string")I=C.data,A.resource?.set(S,I),A.font?.add(S);else continue}catch{console.warn("[snapDOM] Failed to fetch localFonts src:",S);continue}}m+=`@font-face{font-family:'${y}';src:url(${I});font-style:${b};font-weight:${v};font-stretch:${w};}`}return m&&(m=Md(m),A.resource?.set(l,m)),m}function ss(e){let t=new Set;if(!e)return t;let n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,null),r=a=>{let s=yd(a.fontFamily);if(s.length)for(let c of s){let l=(u,d,f)=>`${c}__${Mn(u)}__${Tn(d)}__${bd(f)}`;t.add(l(a.fontWeight,a.fontStyle,a.fontStretch))}};r(getComputedStyle(e));let o=getComputedStyle(e,"::before");o&&o.content&&o.content!=="none"&&r(o);let i=getComputedStyle(e,"::after");for(i&&i.content&&i.content!=="none"&&r(i);n.nextNode();){let a=n.currentNode,s=getComputedStyle(a);r(s);let c=getComputedStyle(a,"::before");c&&c.content&&c.content!=="none"&&r(c);let l=getComputedStyle(a,"::after");l&&l.content&&l.content!=="none"&&r(l)}return t}function Nd(e){let t=new Set,n=o=>{if(o)for(let i of o)t.add(i.codePointAt(0))},r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,null);for(;r.nextNode();){let o=r.currentNode;if(o.nodeType===Node.TEXT_NODE)n(o.nodeValue||"");else if(o.nodeType===Node.ELEMENT_NODE){let i=o;for(let a of["::before","::after"]){let s=getComputedStyle(i,a)?.getPropertyValue("content");if(!(!s||s==="none"))if(/^"/.test(s)||/^'/.test(s))n(s.slice(1,-1));else{let c=s.match(/\\[0-9A-Fa-f]{1,6}/g);if(c)for(let l of c)try{t.add(parseInt(l.slice(1),16))}catch{}}}}}return t}async function ls(e,t=2){try{await document.fonts.ready}catch{}let n=Array.from(e||[]).filter(Boolean);if(n.length===0)return;let r=()=>{let o=document.createElement("div");o.style.cssText="position:absolute!important;left:-9999px!important;top:0!important;opacity:0!important;pointer-events:none!important;contain:layout size style;";for(let i of n){let a=document.createElement("span");a.textContent="AaBbGg1234\xC1\xC9\xCD\xD3\xDA\xE7\xF1\u2014\u221E",a.style.fontFamily=`"${i}"`,a.style.fontWeight="700",a.style.fontStyle="italic",a.style.fontSize="32px",a.style.lineHeight="1",a.style.whiteSpace="nowrap",a.style.margin="0",a.style.padding="0",o.appendChild(a)}document.body.appendChild(o),o.offsetWidth,document.body.removeChild(o)};for(let o=0;o<Math.max(1,t);o++)r(),await new Promise(i=>requestAnimationFrame(()=>requestAnimationFrame(i)))}Ce();function Rd(e){return/\bcounter\s*\(|\bcounters\s*\(/.test(e||"")}function _d(e){return(e||"").replace(/"([^"]*)"/g,"$1")}function Ta(e,t=!1){let n="",r=Math.max(1,e);for(;r>0;)r--,n=String.fromCharCode(97+r%26)+n,r=Math.floor(r/26);return t?n.toUpperCase():n}function La(e,t=!0){let n=[[1e3,"M"],[900,"CM"],[500,"D"],[400,"CD"],[100,"C"],[90,"XC"],[50,"L"],[40,"XL"],[10,"X"],[9,"IX"],[5,"V"],[4,"IV"],[1,"I"]],r=Math.max(1,Math.min(3999,e)),o="";for(let[i,a]of n)for(;r>=i;)o+=a,r-=i;return t?o:o.toLowerCase()}function Na(e,t){switch((t||"decimal").toLowerCase()){case"decimal":return String(e);case"decimal-leading-zero":{let n=Math.abs(e);return(e<0?"-":"")+(n<10?"0":"")+String(n)}case"lower-alpha":return Ta(e,!1);case"upper-alpha":return Ta(e,!0);case"lower-roman":return La(e,!1);case"upper-roman":return La(e,!0);default:return String(e)}}function Fd(e){let t=()=>A?.session?.__counterEpoch??0,n=t(),r=new WeakMap,o=e instanceof Document?e.documentElement:e,i=f=>f&&f.tagName==="LI",a=f=>{let m=0,p=f?.parentElement;if(!p)return 0;for(let g of p.children){if(g===f)break;g.tagName==="LI"&&m++}return m},s=f=>{let m=new Map;for(let[p,g]of f)m.set(p,g.slice());return m},c=(f,m,p)=>{let g=s(f),h;try{h=p.style?.counterReset||getComputedStyle(p).counterReset}catch{}if(h&&h!=="none")for(let b of h.split(",")){let w=b.trim().split(/\s+/),S=w[0],I=Number.isFinite(Number(w[1]))?Number(w[1]):0;if(!S)continue;let C=m.get(S);if(C&&C.length){let E=C.slice();E.push(I),g.set(S,E)}else g.set(S,[I])}let y;try{y=p.style?.counterSet||getComputedStyle(p).counterSet}catch{}if(y&&y!=="none")for(let b of y.split(",")){let w=b.trim().split(/\s+/),S=w[0],I=Number.isFinite(Number(w[1]))?Number(w[1]):0;if(!S)continue;let C=g.get(S)||[];C.length===0&&C.push(0),C[C.length-1]=I,g.set(S,C)}let v;try{v=p.style?.counterIncrement||getComputedStyle(p).counterIncrement}catch{}if(v&&v!=="none")for(let b of v.split(",")){let w=b.trim().split(/\s+/),S=w[0],I=Number.isFinite(Number(w[1]))?Number(w[1]):1;if(!S)continue;let C=g.get(S)||[];C.length===0&&C.push(0),C[C.length-1]+=I,g.set(S,C)}try{if(getComputedStyle(p).display==="list-item"&&i(p)){let b=p.parentElement,w=1;if(b&&b.tagName==="OL"){let I=b.getAttribute("start"),C=Number.isFinite(Number(I))?Number(I):1,E=a(p),M=p.getAttribute("value");w=Number.isFinite(Number(M))?Number(M):C+E}else w=1+a(p);let S=g.get("list-item")||[];S.length===0&&S.push(0),S[S.length-1]=w,g.set("list-item",S)}}catch{}return g},l=(f,m,p)=>{let g=c(p,m,f);r.set(f,g);let h=g;for(let v of f.children)h=l(v,g,h);let y=new Map;for(let[v,b]of p){let w=b.length,S=h.get(v);y.set(v,S&&S.length?S.slice(0,w):b.slice())}for(let[v,b]of h)!y.has(v)&&b.length&&!m.has(v)&&y.set(v,b.slice(0,1));return y},u=new Map;l(o,u,u);function d(){let f=t();if(f!==n){n=f;let m=new Map;l(o,m,m)}}return{get(f,m){d();let p=r.get(f)?.get(m);return p&&p.length?p[p.length-1]:0},getStack(f,m){d();let p=r.get(f)?.get(m);return p?p.slice():[]}}}function Od(e,t,n){if(!e||e==="none")return e;try{let r=/\b(counter|counters)\s*\(([^)]+)\)/g,o=e.replace(r,(i,a,s)=>{let c=String(s).split(",").map(l=>l.trim());if(a==="counter"){let l=c[0]?.replace(/^["']|["']$/g,""),u=(c[1]||"decimal").toLowerCase(),d=n.get(t,l);return Na(d,u)}else{let l=c[0]?.replace(/^["']|["']$/g,""),u=c[1]?.replace(/^["']|["']$/g,"")??"",d=(c[2]||"decimal").toLowerCase(),f=n.getStack(t,l);return f.length?f.map(m=>Na(m,d)).join(u):""}});return _d(o)}catch{return"- "}}yt();Ce();var pt=new WeakMap,Ra=1e3;function $d(e,t){let n=cs(e);return t?(t.__pseudoPreflightFp!==n&&(t.__pseudoPreflight=Fa(e),t.__pseudoPreflightFp=n),!!t.__pseudoPreflight):Fa(e)}function jr(e){try{return e&&e.cssRules?e.cssRules:null}catch{return null}}function cs(e){let t=e.querySelectorAll('style,link[rel~="stylesheet"]'),n=`n:${t.length}|`,r=0;for(let i=0;i<t.length;i++){let a=t[i];if(a.tagName==="STYLE"){let s=a.textContent?a.textContent.length:0;n+=`S${s}|`;let c=a.sheet,l=c?jr(c):null;l&&(r+=l.length)}else{let s=a.getAttribute("href")||"",c=a.getAttribute("media")||"all";n+=`L${s}|m:${c}|`;let l=a.sheet,u=l?jr(l):null;u&&(r+=u.length)}}let o=e.adoptedStyleSheets;return n+=`ass:${Array.isArray(o)?o.length:0}|tr:${r}`,n}function _a(e,t,n){let r=jr(e);if(!r)return!1;for(let o=0;o<r.length;o++){if(n.budget<=0)return!1;let i=r[o],a=i&&i.cssText?i.cssText:"";n.budget--;for(let s of t)if(a.includes(s))return!0;if(i&&i.cssRules&&i.cssRules.length)for(let s=0;s<i.cssRules.length&&n.budget>0;s++){let c=i.cssRules[s],l=c&&c.cssText?c.cssText:"";n.budget--;for(let u of t)if(l.includes(u))return!0}if(n.budget<=0)return!1}return!1}function Fa(e=document){let t=cs(e),n=pt.get(e);if(n&&n.fingerprint===t)return n.result;let r=["::before","::after","::first-letter",":before",":after",":first-letter","counter(","counters(","counter-increment","counter-reset"],o=e.querySelectorAll("style");for(let a=0;a<o.length;a++){let s=o[a].textContent||"";for(let c of r)if(s.includes(c))return pt.set(e,{fingerprint:t,result:!0}),!0}let i=e.adoptedStyleSheets;if(Array.isArray(i)&&i.length){let a={budget:Ra};try{for(let s of i)if(_a(s,r,a))return pt.set(e,{fingerprint:t,result:!0}),!0}catch{}}{let a=e.querySelectorAll('style,link[rel~="stylesheet"]'),s={budget:Ra};for(let c=0;c<a.length&&s.budget>0;c++){let l=a[c],u=null;if(l.tagName,u=l.sheet||null,u&&_a(u,r,s))return pt.set(e,{fingerprint:t,result:!0}),!0}}return e.querySelector('[style*="counter("], [style*="counters("]')?(pt.set(e,{fingerprint:t,result:!0}),!0):(pt.set(e,{fingerprint:t,result:!1}),!1)}var gt=new WeakMap,Oa=-1;function Dd(e){return(e||"").replace(/"([^"]*)"/g,"$1")}function Pd(e){if(!e)return"";let t=[],n=/"([^"]*)"/g,r;for(;r=n.exec(e);)t.push(r[1]);return t.length?t.join(""):Dd(e)}function Zr(e,t){let n=e.parentElement,r=n?gt.get(n):null;return r?{get(o,i){let a=t.get(o,i),s=r.get(i);return typeof s=="number"?Math.max(a,s):a},getStack(o,i){let a=t.getStack(o,i);if(!a.length)return a;let s=r.get(i);if(typeof s=="number"){let c=a.slice();return c[c.length-1]=Math.max(c[c.length-1],s),c}return a}}:t}function Xr(e,t,n){let r=new Map;function o(c){let l=[];if(!c||c==="none")return l;for(let u of String(c).split(",")){let d=u.trim().split(/\s+/),f=d[0],m=Number.isFinite(Number(d[1]))?Number(d[1]):void 0;f&&l.push({name:f,num:m})}return l}let i=o(t?.counterReset),a=o(t?.counterIncrement);function s(c){if(r.has(c))return r.get(c).slice();let l=n.getStack(e,c);l=l.length?l.slice():[];let u=i.find(f=>f.name===c);if(u){let f=Number.isFinite(u.num)?u.num:0;l=l.length?[...l,f]:[f]}let d=a.find(f=>f.name===c);if(d){let f=Number.isFinite(d.num)?d.num:1;l.length===0&&(l=[0]),l[l.length-1]+=f}return r.set(c,l.slice()),l}return{get(c,l){let u=s(l);return u.length?u[u.length-1]:0},getStack(c,l){return s(l)},__incs:a}}function Wd(e,t,n){let r;try{r=Fe(e,t)}catch{}let o=r?.content;if(!o||o==="none"||o==="normal")return{text:"",incs:[]};let i=Zr(e,n),a=Xr(e,r,i),s=Rd(o)?Od(o,e,a):o;return{text:Pd(s),incs:a.__incs||[]}}async function Kr(e,t,n,r){if(!(e instanceof Element)||!(t instanceof Element))return;let o=e.ownerDocument||document;if(!$d(o,n))return;let i=A?.session?.__counterEpoch??0;if(Oa!==i&&(gt=new WeakMap,n&&(n.__counterCtx=null),Oa=i),!n.__counterCtx)try{n.__counterCtx=Fd(e.ownerDocument||document)}catch(c){K(n,"buildCounterContext failed",c)}let a=n.__counterCtx;for(let c of["::before","::after","::first-letter"])try{let l=Fe(e,c);if(!l||l.content==="none"&&l.backgroundImage==="none"&&l.backgroundColor==="transparent"&&(l.borderStyle==="none"||parseFloat(l.borderWidth)===0)&&(!l.transform||l.transform==="none")&&l.display==="inline")continue;if(c==="::first-letter"){let L=Fe(e);if(!(l.color!==L.color||l.fontSize!==L.fontSize||l.fontWeight!==L.fontWeight||l.fontFamily!==L.fontFamily||l.fontStyle!==L.fontStyle||l.textTransform!==L.textTransform||l.float!==L.float||l.paddingTop!==L.paddingTop||l.paddingRight!==L.paddingRight||l.paddingBottom!==L.paddingBottom||l.paddingLeft!==L.paddingLeft||l.marginTop!==L.marginTop||l.marginRight!==L.marginRight||l.marginBottom!==L.marginBottom||l.marginLeft!==L.marginLeft))continue;let $=Array.from(t.childNodes).find(N=>N.nodeType===Node.TEXT_NODE&&N.textContent?.trim().length>0);if(!$)continue;let _=$.textContent,F=_.match(/^([^\p{L}\p{N}\s]*[\p{L}\p{N}](?:['’])?)/u)?.[0],z=_.slice(F?.length||0);if(!F||/[\uD800-\uDFFF]/.test(F))continue;let B=document.createElement("span");B.textContent=F,B.dataset.snapdomPseudo="::first-letter";let Y=ya(l),j=Ur(Y,"span");n.styleMap.set(B,j);let ee=document.createTextNode(z);t.replaceChild(ee,$),t.insertBefore(B,ee);continue}let u=l.content??"",d=u===""||u==="none"||u==="normal",{text:f,incs:m}=Wd(e,c,a),p=l.backgroundImage,g=l.backgroundColor,h=l.fontFamily,y=parseInt(l.fontSize)||32,v=parseInt(l.fontWeight)||!1,b=l.color||"#000",w=l.borderStyle,S=parseFloat(l.borderWidth),I=l.transform,C=_e(h),E=!d&&f!=="",M=p&&p!=="none",O=g&&g!=="transparent"&&g!=="rgba(0, 0, 0, 0)",D=w&&w!=="none"&&S>0,T=I&&I!=="none";if(!(E||M||O||D||T)){if(m&&m.length&&e.parentElement){let L=gt.get(e.parentElement)||new Map;for(let{name:$}of m){if(!$)continue;let _=Zr(e,a),F=Xr(e,Fe(e,c),_).get(e,$);L.set($,F)}gt.set(e.parentElement,L)}continue}let k=document.createElement("span");k.dataset.snapdomPseudo=c,k.style.pointerEvents="none";let W=ya(l),G=Ur(W,"span");if(n.styleMap.set(k,G),C&&f&&f.length===1){let{dataUrl:L,width:$,height:_}=await hd(f,h,v,y,b),F=document.createElement("img");F.src=L,F.style=`height:${y}px;width:${$/_*y}px;object-fit:contain;`,k.appendChild(F),t.dataset.snapdomHasIcon="true"}else if(f&&f.startsWith("url(")){let L=Qr(f);if(L?.trim())try{let $=await ve(Ln(L),{as:"dataURL",useProxy:r.useProxy});if($?.ok&&typeof $.data=="string"){let _=document.createElement("img");_.src=$.data,_.style=`width:${y}px;height:auto;object-fit:contain;`,k.appendChild(_)}}catch($){console.error(`[snapdom] Error in pseudo ${c} for`,e,$)}}else!C&&E&&(k.textContent=f);k.style.backgroundImage="none","maskImage"in k.style&&(k.style.maskImage="none"),"webkitMaskImage"in k.style&&(k.style.webkitMaskImage="none");try{k.style.backgroundRepeat=l.backgroundRepeat,k.style.backgroundSize=l.backgroundSize,l.backgroundPositionX&&l.backgroundPositionY?(k.style.backgroundPositionX=l.backgroundPositionX,k.style.backgroundPositionY=l.backgroundPositionY):k.style.backgroundPosition=l.backgroundPosition,k.style.backgroundOrigin=l.backgroundOrigin,k.style.backgroundClip=l.backgroundClip,k.style.backgroundAttachment=l.backgroundAttachment,k.style.backgroundBlendMode=l.backgroundBlendMode}catch{}if(M)try{let L=Vr(p),$=await Promise.all(L.map(Ba));k.style.backgroundImage=$.join(", ")}catch(L){console.warn(`[snapdom] Failed to inline background-image for ${c}`,L)}O&&(k.style.backgroundColor=g);let re=k.childNodes.length>0||k.textContent?.trim()!==""||M||O||D||T;if(m&&m.length&&e.parentElement){let L=gt.get(e.parentElement)||new Map,$=Zr(e,a),_=Xr(e,Fe(e,c),$);for(let{name:F}of m){if(!F)continue;let z=_.get(e,F);L.set(F,z)}gt.set(e.parentElement,L)}if(!re)continue;c==="::before"?(t.dataset.snapdomHasBefore="1",t.insertBefore(k,t.firstChild)):(t.dataset.snapdomHasAfter="1",t.appendChild(k))}catch(l){console.warn(`[snapdom] Failed to capture ${c} for`,e,l)}let s=Array.from(t.children).filter(c=>!c.dataset.snapdomPseudo);if(n.nodeMap)for(let c of s){let l=n.nodeMap.get(c);l instanceof Element&&await Kr(l,c,n,r)}else{let c=Array.from(e.children);for(let l=0;l<Math.min(c.length,s.length);l++)await Kr(c[l],s[l],n,r)}}function Bd(e,t){if(!e||!(e instanceof Element))return;let n=e.ownerDocument||document,r=t||n,o=e instanceof SVGSVGElement?[e]:Array.from(e.querySelectorAll("svg"));if(o.length===0)return;let i=/url\(\s*#([^)]+)\)/g,a=["fill","stroke","filter","clip-path","mask","marker","marker-start","marker-mid","marker-end"],s=w=>window.CSS&&CSS.escape?CSS.escape(w):w.replace(/[^a-zA-Z0-9_-]/g,"\\$&"),c="http://www.w3.org/1999/xlink",l=w=>{if(!w||!w.getAttribute)return null;let S=w.getAttribute("href")||w.getAttribute("xlink:href")||(typeof w.getAttributeNS=="function"?w.getAttributeNS(c,"href"):null);if(S)return S;let I=w.attributes;if(!I)return null;for(let C=0;C<I.length;C++){let E=I[C];if(!E||!E.name)continue;if(E.name==="href")return E.value;let M=E.name.indexOf(":");if(M!==-1&&E.name.slice(M+1)==="href")return E.value}return null},u=new Set(Array.from(e.querySelectorAll("[id]")).map(w=>w.id)),d=new Set,f=!1,m=(w,S=null)=>{if(!w)return;i.lastIndex=0;let I;for(;I=i.exec(w);){f=!0;let C=(I[1]||"").trim();C&&(u.has(C)||(d.add(C),S&&!S.has(C)&&S.add(C)))}},p=w=>{let S=w.querySelectorAll("use");for(let C of S){let E=l(C);if(!E||!E.startsWith("#"))continue;f=!0;let M=E.slice(1).trim();M&&!u.has(M)&&d.add(M)}let I=w.querySelectorAll('*[style*="url("],*[fill^="url("], *[stroke^="url("],*[filter^="url("],*[clip-path^="url("],*[mask^="url("],*[marker^="url("],*[marker-start^="url("],*[marker-mid^="url("],*[marker-end^="url("]');for(let C of I){m(C.getAttribute("style")||"");for(let E of a)m(C.getAttribute(E))}};for(let w of o)p(w);if(!f)return;let g=e.querySelector("svg.inline-defs-container");g||(g=n.createElementNS("http://www.w3.org/2000/svg","svg"),g.classList.add("inline-defs-container"),g.setAttribute("aria-hidden","true"),g.setAttribute("style","position:absolute;width:0;height:0;overflow:hidden"),e.insertBefore(g,e.firstChild||null));let h=g.querySelector("defs")||null,y=w=>{if(!w||u.has(w))return null;let S=s(w),I=C=>{let E=r.querySelector(C);return E&&!e.contains(E)?E:null};return I(`svg defs > *#${S}`)||I(`svg > symbol#${S}`)||I(`*#${S}`)};if(!d.size)return;let v=new Set(d),b=new Set;for(;v.size;){let w=v.values().next().value;if(v.delete(w),!w||u.has(w)||b.has(w))continue;let S=y(w);if(!S){b.add(w);continue}h||(h=n.createElementNS("http://www.w3.org/2000/svg","defs"),g.appendChild(h));let I=S.cloneNode(!0);I.id||I.setAttribute("id",w),h.appendChild(I),b.add(w),u.add(w);let C=[I,...I.querySelectorAll("*")];for(let E of C){let M=l(E);if(M&&M.startsWith("#")){let D=M.slice(1).trim();D&&!u.has(D)&&!b.has(D)&&v.add(D)}let O=E.getAttribute?.("style")||"";O&&m(O,v);for(let D of a){let T=E.getAttribute?.(D);T&&m(T,v)}}}}Ce();function Hd(e,t){if(!e||!t)return;let n=e.scrollTop||0;if(!n)return;getComputedStyle(t).position==="static"&&(t.style.position="relative");let r=e.getBoundingClientRect(),o=e.clientHeight,i="data-snap-ph",a=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT);for(;a.nextNode();){let s=a.currentNode,c=getComputedStyle(s),l=c.position;if(l!=="sticky"&&l!=="-webkit-sticky")continue;let u=$a(c.top),d=$a(c.bottom);if(u==null&&d==null)continue;let f=Ud(s,e),m=Vd(t,f,i);if(!m)continue;let p=s.getBoundingClientRect(),g=p.width,h=p.height,y=p.left-r.left;if(!(g>0&&h>0)||!Number.isFinite(y))continue;let v=u!=null?u+n:n+(o-h-d);if(!Number.isFinite(v))continue;let b=Number.parseInt(c.zIndex,10),w=Number.isFinite(b),S=w?Math.max(b,1)+1:2,I=w?b-1:0,C=m.cloneNode(!1);C.setAttribute(i,"1"),C.style.position="sticky",C.style.left=`${y}px`,C.style.top=`${v}px`,C.style.width=`${g}px`,C.style.height=`${h}px`,C.style.visibility="hidden",C.style.zIndex=String(I),C.style.overflow="hidden",C.style.background="transparent",C.style.boxShadow="none",C.style.filter="none",m.parentElement?.insertBefore(C,m),m.style.position="absolute",m.style.left=`${y}px`,m.style.top=`${v}px`,m.style.bottom="auto",m.style.zIndex=String(S),m.style.pointerEvents="none"}}function $a(e){if(!e||e==="auto")return null;let t=Number.parseFloat(e);return Number.isFinite(t)?t:null}function Ud(e,t){let n=[];for(let r=e;r&&r!==t;){let o=r.parentElement;if(!o)break;n.push(Array.prototype.indexOf.call(o.children,r)),r=o}return n.reverse()}function Vd(e,t,n){let r=e;for(let o=0;o<t.length;o++)if(r=Gd(r,n)[t[o]],!r)return null;return r instanceof HTMLElement?r:null}function Gd(e,t){let n=[],r=e.children;for(let o=0;o<r.length;o++){let i=r[o];i.hasAttribute(t)||n.push(i)}return n}function zd(e){let t=getComputedStyle(e),n=t.outlineStyle,r=t.outlineWidth,o=t.borderStyle,i=t.borderWidth,a=n!=="none"&&parseFloat(r)>0,s=o==="none"||parseFloat(i)===0;a&&s&&(e.style.border=`${r} solid transparent`)}function qd(e){let t=[];try{let n=e.querySelectorAll("*");for(let r of n){if(!(r instanceof HTMLElement))continue;let o=r.style.contentVisibility||"",i=getComputedStyle(r),a=i.contentVisibility||i.getPropertyValue("content-visibility")||"";(a==="auto"||a==="hidden")&&(t.push({el:r,original:o}),r.style.contentVisibility="visible")}if(e instanceof HTMLElement){let r=getComputedStyle(e),o=r.contentVisibility||r.getPropertyValue("content-visibility")||"";(o==="auto"||o==="hidden")&&(t.push({el:e,original:e.style.contentVisibility||""}),e.style.contentVisibility="visible")}}catch{}return()=>{for(let{el:n,original:r}of t)try{n.style.contentVisibility=r}catch{}}}async function Yd(e,t={}){let n={styleMap:A.session.styleMap,styleCache:A.session.styleCache,nodeMap:A.session.nodeMap,options:t},r,o="",i="";zd(e);let a=qd(e);try{Bd(e)}catch(l){console.warn("inlineExternal defs or symbol failed:",l)}try{r=await kn(e,n,t)}catch(l){throw console.warn("deepClone failed:",l),l}finally{a()}try{await Kr(e,r,n,t)}catch(l){console.warn("inlinePseudoElements failed:",l)}await id(r,n);try{let l=r.querySelectorAll("style[data-sd]");for(let u of l)i+=u.textContent||"",u.remove()}catch(l){K(n,"Failed to extract shadow CSS from style[data-sd]",l)}let s=du(n.styleMap);o=Array.from(s.entries()).map(([l,u])=>`.${u}{${l}}`).join(""),o=i+"[data-snapdom-has-after]::after,[data-snapdom-has-before]::before{content:none!important;display:none!important}"+o;for(let[l,u]of n.styleMap.entries()){if(l.tagName==="STYLE")continue;if(l.getRootNode&&l.getRootNode()instanceof ShadowRoot){l.setAttribute("style",u.replace(/;/g,"; "));continue}let d=s.get(u);d&&l.classList.add(d);let f=l.style?.backgroundImage,m=l.dataset?.snapdomHasIcon;f&&f!=="none"&&(l.style.backgroundImage=f),m&&(l.style.verticalAlign="middle",l.style.display="inline")}for(let[l,u]of n.nodeMap.entries()){let d=u.scrollLeft,f=u.scrollTop;if((d||f)&&l instanceof HTMLElement){l.style.overflow="hidden",l.style.scrollbarWidth="none",l.style.msOverflowStyle="none";try{let p=l.querySelectorAll("*");for(let g of p){if(!(g instanceof HTMLElement))continue;let h=g.style.position;if(h==="fixed"||h==="absolute"){let y=parseFloat(g.style.top)||0,v=parseFloat(g.style.left)||0;g.style.top=`${y+f}px`,g.style.left=`${v+d}px`,h==="fixed"&&(g.style.position="absolute")}}}catch{}let m=document.createElement("div");for(m.style.transform=`translate(${-d}px, ${-f}px)`,m.style.willChange="transform",m.style.display="inline-block",m.style.width="100%";l.firstChild;)m.appendChild(l.firstChild);l.appendChild(m)}}let c=r instanceof HTMLElement&&r.firstElementChild instanceof HTMLElement?r.firstElementChild:r;if(Hd(e,c),e===n.nodeMap.get(r)){let l=n.styleCache.get(e)||Fe(e);n.styleCache.set(e,l);let u=Qc(l.transform);r.style.margin="0",r.style.top="auto",r.style.left="auto",r.style.right="auto",r.style.bottom="auto",r.style.animation="none",r.style.transition="none",r.style.willChange="auto",r.style.float="none",r.style.clear="none",r.style.transform=u||""}for(let[l,u]of n.nodeMap.entries())u.tagName==="PRE"&&(l.style.marginTop="0",l.style.marginBlockStart="0");return{clone:r,classCSS:o,styleCache:n.styleCache}}yt();var us="http://www.w3.org/1999/xlink";function jd(e){return e.getAttribute("href")||e.getAttribute("xlink:href")||(typeof e.getAttributeNS=="function"?e.getAttributeNS(us,"href"):null)}function Zd(e){let t=parseInt(e.dataset?.snapdomWidth||"",10)||0,n=parseInt(e.dataset?.snapdomHeight||"",10)||0,r=parseInt(e.getAttribute("width")||"",10)||0,o=parseInt(e.getAttribute("height")||"",10)||0,i=parseFloat(e.style?.width||"")||0,a=parseFloat(e.style?.height||"")||0,s=t||i||r||e.width||e.naturalWidth||100,c=n||a||o||e.height||e.naturalHeight||100;return{width:s,height:c}}async function Xd(e,t={}){let n=Array.from(e.querySelectorAll("img")),r=async a=>{if(!a.getAttribute("src")){let f=a.currentSrc||a.src||"";f&&a.setAttribute("src",f)}a.removeAttribute("srcset"),a.removeAttribute("sizes");let s=a.src||"";if(!s)return;let c=await ve(s,{as:"dataURL",useProxy:t.useProxy});if(c.ok&&typeof c.data=="string"&&c.data.startsWith("data:")){a.src=c.data,a.width||(a.width=a.naturalWidth||100),a.height||(a.height=a.naturalHeight||100);return}let{width:l,height:u}=Zd(a),{fallbackURL:d}=t||{};if(d)try{let f=typeof d=="function"?await d({width:l,height:u,src:s,element:a}):d;if(f){let m=await ve(f,{as:"dataURL",useProxy:t.useProxy});if(m?.ok&&typeof m.data=="string"){a.src=m.data,a.width||(a.width=l),a.height||(a.height=u);return}}}catch{}if(t.placeholders!==!1){let f=document.createElement("div");f.style.cssText=[`width:${l}px`,`height:${u}px`,"background:#ccc","display:inline-block","text-align:center",`line-height:${u}px`,"color:#666","font-size:12px","overflow:hidden"].join(";"),f.textContent="img",a.replaceWith(f)}else{let f=document.createElement("div");f.style.cssText=`display:inline-block;width:${l}px;height:${u}px;visibility:hidden;`,a.replaceWith(f)}};for(let a=0;a<n.length;a+=4){let s=n.slice(a,a+4).map(r);await Promise.allSettled(s)}let o=Array.from(e.querySelectorAll("image")),i=async a=>{let s=jd(a);if(!s||s.startsWith("data:")||s.startsWith("blob:"))return;let c=await ve(s,{as:"dataURL",useProxy:t.useProxy});c.ok&&typeof c.data=="string"&&c.data.startsWith("data:")&&(a.setAttribute("href",c.data),a.removeAttribute("xlink:href"),typeof a.removeAttributeNS=="function"&&a.removeAttributeNS(us,"href"))};for(let a=0;a<o.length;a+=4){let s=o.slice(a,a+4).map(i);await Promise.allSettled(s)}}Ee();async function Kd(e,t,n,r={}){let o=[[e,t]],i=["background-image","mask","mask-image","-webkit-mask","-webkit-mask-image","mask-source","mask-box-image-source","mask-border-source","-webkit-mask-box-image-source","border-image","border-image-source"],a=["mask-position","mask-size","mask-repeat","-webkit-mask-position","-webkit-mask-size","-webkit-mask-repeat","mask-origin","mask-clip","-webkit-mask-origin","-webkit-mask-clip","-webkit-mask-position-x","-webkit-mask-position-y"],s=["background-position","background-position-x","background-position-y","background-size","background-repeat","background-origin","background-clip","background-attachment","background-blend-mode"],c=["border-image-slice","border-image-width","border-image-outset","border-image-repeat"];for(;o.length;){let[l,u]=o.shift();if(!u)continue;let d=n.get(l)||Fe(l);n.has(l)||n.set(l,d);let f=(()=>{let g=d.getPropertyValue("border-image"),h=d.getPropertyValue("border-image-source");return g&&g!=="none"||h&&h!=="none"})();for(let g of s){let h=d.getPropertyValue(g);h&&u.style.setProperty(g,h)}for(let g of i){let h=d.getPropertyValue(g);if(g==="background-image"&&(!h||h==="none")){let b=d.getPropertyValue("background");b&&/url\s*\(/.test(b)&&(h=Vr(b).filter(w=>/url\s*\(/.test(w)).join(", ")||h)}if(!h||h==="none")continue;let y=Vr(h),v=await Promise.all(y.map(b=>Ba(b,r)));v.some(b=>b&&b!=="none"&&!/^url\(undefined/.test(b))&&u.style.setProperty(g,v.join(", "))}for(let g of a){let h=d.getPropertyValue(g);!h||h==="initial"||u.style.setProperty(g,h)}if(f)for(let g of c){let h=d.getPropertyValue(g);!h||h==="initial"||u.style.setProperty(g,h)}let m=l.shadowRoot?Array.from(l.shadowRoot.children).filter(g=>g.tagName!=="STYLE"):Array.from(l.children),p=Array.from(u.children).filter(g=>!(g.dataset?.snapdomPseudo||g.tagName==="STYLE"&&g.dataset?.sd));for(let g=0;g<Math.min(m.length,p.length);g++)o.push([m[g],p[g]])}}Ee();Ce();function Jd(e){if(!e)return()=>{};let t=[];function n(r){let o=Qd(r);o&&t.push(o);for(let i of r.children||[])n(i)}return n(e),()=>t.forEach(r=>r())}function Qd(e){if(!e)return()=>{};let t=ef(e);if(t<=0)return()=>{};if(!rf(e))return()=>{};let n=getComputedStyle(e),r=Math.round(tf(n)*t+nf(n)),o=e.textContent??"",i=o;if(e.scrollHeight<=r+.5)return()=>{};let a=0,s=o.length,c=-1;for(;a<=s;){let l=a+s>>1;e.textContent=o.slice(0,l)+"\u2026",e.scrollHeight<=r+.5?(c=l,a=l+1):s=l-1}return e.textContent=(c>=0?o.slice(0,c):"")+"\u2026",()=>{e.textContent=i}}function ef(e){let t=getComputedStyle(e),n=t.getPropertyValue("-webkit-line-clamp")||t.getPropertyValue("line-clamp");n=(n||"").trim();let r=parseInt(n,10);return Number.isFinite(r)&&r>0?r:0}function tf(e){let t=(e.lineHeight||"").trim(),n=parseFloat(e.fontSize)||16;return!t||t==="normal"?Math.round(n*1.2):t.endsWith("px")?parseFloat(t):/^\d+(\.\d+)?$/.test(t)?Math.round(parseFloat(t)*n):t.endsWith("%")?Math.round(parseFloat(t)/100*n):Math.round(n*1.2)}function nf(e){return(parseFloat(e.paddingTop)||0)+(parseFloat(e.paddingBottom)||0)}function rf(e){return e.childElementCount>0?!1:Array.from(e.childNodes).some(t=>t.nodeType===Node.TEXT_NODE)}var _t=[];function ds(e){if(!e)return null;if(Array.isArray(e)){let[t,n]=e;return typeof t=="function"?t(n):t}if(typeof e=="object"&&"plugin"in e){let{plugin:t,options:n}=e;return typeof t=="function"?t(n):t}return typeof e=="function"?e():e}function of(...e){let t=e.flat();for(let n of t){let r=ds(n);r&&(_t.some(o=>o&&o.name&&r.name&&o.name===r.name)||_t.push(r))}}function fs(e){return(e&&Array.isArray(e.plugins)?e.plugins:_t)||_t}async function Pe(e,t,n){let r=n,o=fs(t);for(let i of o){let a=i&&typeof i[e]=="function"?i[e]:null;if(!a)continue;let s=await a(t,r);typeof s<"u"&&(r=s)}return r}async function af(e,t,n){let r=[],o=fs(t);for(let i of o){let a=i&&typeof i[e]=="function"?i[e]:null;if(!a)continue;let s=await a(t,n);typeof s<"u"&&r.push(s)}return r}function sf(e){let t=[];if(Array.isArray(e))for(let n of e){let r=ds(n);if(!r||!r.name)continue;let o=t.findIndex(i=>i&&i.name===r.name);o>=0&&t.splice(o,1),t.push(r)}for(let n of _t)n&&n.name&&!t.some(r=>r.name===n.name)&&t.push(n);return Object.freeze(t)}function lf(e,t,n=!1){return!e||e.plugins&&!n||(e.plugins=sf(t)),e}Ee();function cf(e,t,n={}){if(!e||!t||!t.style)return;let r=getComputedStyle(e);try{t.style.boxShadow="none"}catch(i){K(n,"stripRootShadows boxShadow",i)}try{t.style.textShadow="none"}catch(i){K(n,"stripRootShadows textShadow",i)}try{t.style.outline="none"}catch(i){K(n,"stripRootShadows outline",i)}let o=(r.filter||"").replace(/\bblur\([^()]*\)\s*/gi,"").replace(/\bdrop-shadow\([^()]*\)\s*/gi,"").trim().replace(/\s+/g," ");try{t.style.filter=o.length?o:"none"}catch(i){K(n,"stripRootShadows filter",i)}}function uf(e){let t=document.createTreeWalker(e,NodeFilter.SHOW_COMMENT),n=[];for(;t.nextNode();)n.push(t.currentNode);for(let r of n)r.remove()}function df(e,t={}){let{stripFrameworkDirectives:n=!0}=t,r=new Set(["xml","xlink"]),o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT);for(;o.nextNode();){let i=o.currentNode;for(let a of Array.from(i.attributes)){let s=a.name;if(s.includes("@")){i.removeAttribute(s);continue}if(s.includes(":")){let c=s.split(":",1)[0];if(!r.has(c)){i.removeAttribute(s);continue}}if(n&&(s.startsWith("x-")||s.startsWith("v-")||s.startsWith(":")||s.startsWith("on:")||s.startsWith("bind:")||s.startsWith("let:")||s.startsWith("class:"))){i.removeAttribute(s);continue}}}}function ff(e,t={}){e&&(df(e,t),uf(e))}function mf(e){try{let t=e.getAttribute?.("style")||"";return/\b(height|width|block-size|inline-size)\s*:/.test(t)}catch{return!1}}function pf(e){return e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement||e instanceof HTMLIFrameElement||e instanceof SVGElement||e instanceof HTMLObjectElement||e instanceof HTMLEmbedElement}function hf(e,t){if(!(e instanceof Element)||mf(e)||pf(e))return!1;let n=t.position;if(n==="absolute"||n==="fixed"||n==="sticky")return!1;let r=t.display||"";return!(r.includes("flex")||r.includes("grid")||r.startsWith("table")||t.transform&&t.transform!=="none")}function gf(e,t,n=new Map){function r(o,i){if(!(o instanceof Element)||!(i instanceof Element))return;let a=o.childElementCount>i.childElementCount,s=n.get(o)||getComputedStyle(o);if(n.has(o)||n.set(o,s),a&&hf(o,s)){i.style.height||(i.style.height="auto"),i.style.width||(i.style.width="auto"),i.style.removeProperty("block-size"),i.style.removeProperty("inline-size"),i.style.minHeight||(i.style.minHeight="0"),i.style.minWidth||(i.style.minWidth="0"),i.style.maxHeight||(i.style.maxHeight="none"),i.style.maxWidth||(i.style.maxWidth="none");let u=s.overflowY||s.overflowBlock||"visible",d=s.overflowX||s.overflowInline||"visible";(u!=="visible"||d!=="visible")&&(i.style.overflow="visible")}let c=Array.from(o.children),l=Array.from(i.children);for(let u=0;u<Math.min(c.length,l.length);u++)r(c[u],l[u])}r(e,t)}function yf(e){let t=getComputedStyle(e);return!(t.display==="none"||t.position==="absolute"||t.position==="fixed")}function bf(e,t){if(!(e instanceof Element))return!1;if(e.getAttribute("data-capture")==="exclude"&&t?.excludeMode==="remove")return!0;if(Array.isArray(t?.exclude))for(let n of t.exclude)try{if(e.matches(n))return t.excludeMode==="remove"}catch(r){K(t,"exclude selector match failed",r)}return!1}function wf(e,t){let n=getComputedStyle(e),r=e.getBoundingClientRect(),o=1/0,i=-1/0,a=!1,s=Array.from(e.children);for(let m of s){if(bf(m,t)||!yf(m))continue;let p=m.getBoundingClientRect(),g=p.top-r.top,h=p.bottom-r.top;h<=g||(g<o&&(o=g),h>i&&(i=h),a=!0)}let c=a?Math.max(0,i-o):0,l=parseFloat(n.borderTopWidth)||0,u=parseFloat(n.borderBottomWidth)||0,d=parseFloat(n.paddingTop)||0,f=parseFloat(n.paddingBottom)||0;return l+u+d+f+c}var R=(e,t=3)=>Number.isFinite(e)?Math.round(e*10**t)/10**t:e,vf=/::-webkit-scrollbar(-[a-z]+)?\b/i;function Jr(e,t=new Set){let n="";if(!e)return n;for(let r=0;r<e.length;r++){let o=e[r];try{if(o.type===CSSRule.IMPORT_RULE&&o.styleSheet){n+=Jr(o.styleSheet.cssRules,t);continue}if(o.type===CSSRule.MEDIA_RULE&&o.cssRules){let i=Jr(o.cssRules,t);i&&(n+=`@media ${o.conditionText}{${i}}`);continue}if(o.type===CSSRule.STYLE_RULE){let i=o.selectorText||"";if(vf.test(i)){let a=o.cssText;a&&!t.has(a)&&(t.add(a),n+=a)}}}catch{}}return n}function Cf(e){if(!e||!e.styleSheets)return"";let t=new Set,n="";for(let r of Array.from(e.styleSheets))try{let o=r.cssRules;o&&(n+=Jr(o,t))}catch{}return n}function Sf(e){let t=e.boxShadow||"";if(!t||t==="none")return{top:0,right:0,bottom:0,left:0};let n=t.split(/\),(?=(?:[^()]*\([^()]*\))*[^()]*$)/).map(s=>s.trim()),r=0,o=0,i=0,a=0;for(let s of n){let c=s.match(/-?\d+(\.\d+)?px/g)?.map(g=>parseFloat(g))||[];if(c.length<2)continue;let[l,u,d=0,f=0]=c,m=Math.abs(l)+d+f,p=Math.abs(u)+d+f;o=Math.max(o,m+Math.max(l,0)),a=Math.max(a,m+Math.max(-l,0)),i=Math.max(i,p+Math.max(u,0)),r=Math.max(r,p+Math.max(-u,0))}return{top:Math.ceil(r),right:Math.ceil(o),bottom:Math.ceil(i),left:Math.ceil(a)}}function xf(e){let t=(e.filter||"").match(/blur\(\s*([0-9.]+)px\s*\)/),n=t?Math.ceil(parseFloat(t[1])||0):0;return{top:n,right:n,bottom:n,left:n}}function If(e){if((e.outlineStyle||"none")==="none")return{top:0,right:0,bottom:0,left:0};let t=Math.ceil(parseFloat(e.outlineWidth||"0")||0),n=parseFloat(e.outlineOffset||"0")||0,r=t+Math.max(0,Math.ceil(n));return{top:r,right:r,bottom:r,left:r}}function Ef(e){let t=`${e.filter||""} ${e.webkitFilter||""}`.trim();if(!t||t==="none")return{bleed:{top:0,right:0,bottom:0,left:0},has:!1};let n=t.match(/drop-shadow\((?:[^()]|\([^()]*\))*\)/gi)||[],r=0,o=0,i=0,a=0,s=!1;for(let c of n){s=!0;let l=c.match(/-?\d+(?:\.\d+)?px/gi)?.map(g=>parseFloat(g))||[],[u=0,d=0,f=0]=l,m=Math.abs(u)+f,p=Math.abs(d)+f;o=Math.max(o,m+Math.max(u,0)),a=Math.max(a,m+Math.max(-u,0)),i=Math.max(i,p+Math.max(d,0)),r=Math.max(r,p+Math.max(-d,0))}return{bleed:{top:R(r),right:R(o),bottom:R(i),left:R(a)},has:s}}function Af(e,t){if(!e||!t||!t.style)return null;let n=getComputedStyle(e);try{t.style.transformOrigin="0 0"}catch{}try{"translate"in t.style&&(t.style.translate="none"),"rotate"in t.style&&(t.style.rotate="none")}catch{}let r=n.transform||"none";if(!r||r==="none")try{let s=ms(e);if(s.a===1&&s.b===0&&s.c===0&&s.d===1)return t.style.transform="none",{a:1,b:0,c:0,d:1}}catch{}function o(s,c,l,u){let d=Math.sqrt(s*s+c*c)||0,f=0,m=0;if(d>0){let p=s/d,g=c/d;f=p*l+g*u;let h=l-p*f,y=u-g*f;m=Math.sqrt(h*h+y*y)||0,m>0?f=f/m:f=0}return{a:d,b:0,c:f*m,d:m}}let i=r.match(/^matrix\(\s*([^)]+)\)$/i);if(i){let s=i[1].split(",").map(c=>parseFloat(c.trim()));if(s.length===6&&s.every(Number.isFinite)){let[c,l,u,d]=s,f=o(c,l,u,d);try{t.style.transform=`matrix(${f.a}, ${f.b}, ${f.c}, ${f.d}, 0, 0)`}catch{}return f}}let a=r.match(/^matrix3d\(\s*([^)]+)\)$/i);if(a){let s=a[1].split(",").map(c=>parseFloat(c.trim()));if(s.length===16&&s.every(Number.isFinite)){let c=s[0],l=s[1],u=s[4],d=s[5],f=o(c,l,u,d);try{t.style.transform=`matrix(${f.a}, ${f.b}, ${f.c}, ${f.d}, 0, 0)`}catch{}return f}}try{let s=new DOMMatrix(r),c=o(s.a,s.b,s.c,s.d);try{t.style.transform=`matrix(${c.a}, ${c.b}, ${c.c}, ${c.d}, 0, 0)`}catch{}return c}catch{return null}}function Da(e,t,n,r,o){let i=n.a,a=n.b,s=n.c,c=n.d,l=n.e||0,u=n.f||0;function d(y,v){let b=y-r,w=v-o,S=i*b+s*w,I=a*b+c*w;return S+=r+l,I+=o+u,[S,I]}let f=[d(0,0),d(e,0),d(0,t),d(e,t)],m=1/0,p=1/0,g=-1/0,h=-1/0;for(let[y,v]of f)y<m&&(m=y),v<p&&(p=v),y>g&&(g=y),v>h&&(h=v);return{minX:m,minY:p,maxX:g,maxY:h,width:g-m,height:h-p}}function kf(e,t,n){let r=(e.transformOrigin||"0 0").trim().split(/\s+/),[o,i]=[r[0]||"0",r[1]||"0"],a=(s,c)=>{let l=s.toLowerCase();return l==="left"||l==="top"?0:l==="center"?c/2:l==="right"||l==="bottom"?c:l.endsWith("px")?parseFloat(l)||0:l.endsWith("%")?(parseFloat(l)||0)*c/100:/^-?\d+(\.\d+)?$/.test(l)&&parseFloat(l)||0};return{ox:a(o,t),oy:a(i,n)}}function Mf(e){let t={rotate:"0deg",scale:null,translate:null},n=typeof e.computedStyleMap=="function"?e.computedStyleMap():null;if(n){let o=c=>{try{return typeof n.has=="function"&&!n.has(c)||typeof n.get!="function"?null:n.get(c)}catch{return null}},i=o("rotate");if(i)if(i.angle){let c=i.angle;t.rotate=c.unit==="rad"?c.value*180/Math.PI+"deg":c.value+c.unit}else i.unit?t.rotate=i.unit==="rad"?i.value*180/Math.PI+"deg":i.value+i.unit:t.rotate=String(i);else{let c=getComputedStyle(e);t.rotate=c.rotate&&c.rotate!=="none"?c.rotate:"0deg"}let a=o("scale");if(a){let c="x"in a&&a.x?.value!=null?a.x.value:Array.isArray(a)?a[0]?.value:Number(a)||1,l="y"in a&&a.y?.value!=null?a.y.value:Array.isArray(a)?a[1]?.value:c;t.scale=`${c} ${l}`}else{let c=getComputedStyle(e);t.scale=c.scale&&c.scale!=="none"?c.scale:null}let s=o("translate");if(s){let c="x"in s&&"value"in s.x?s.x.value:Array.isArray(s)?s[0]?.value:0,l="y"in s&&"value"in s.y?s.y.value:Array.isArray(s)?s[1]?.value:0,u="x"in s&&s.x?.unit?s.x.unit:"px",d="y"in s&&s.y?.unit?s.y.unit:"px";t.translate=`${c}${u} ${l}${d}`}else{let c=getComputedStyle(e);t.translate=c.translate&&c.translate!=="none"?c.translate:null}return t}let r=getComputedStyle(e);return t.rotate=r.rotate&&r.rotate!=="none"?r.rotate:"0deg",t.scale=r.scale&&r.scale!=="none"?r.scale:null,t.translate=r.translate&&r.translate!=="none"?r.translate:null,t}var Br=null;function Tf(){if(Br)return Br;let e=document.createElement("div");return e.id="snapdom-measure-slot",e.setAttribute("aria-hidden","true"),Object.assign(e.style,{position:"absolute",left:"-99999px",top:"0px",width:"0px",height:"0px",overflow:"hidden",opacity:"0",pointerEvents:"none",contain:"size layout style"}),document.documentElement.appendChild(e),Br=e,e}function Lf(e){let t=Tf(),n=document.createElement("div");n.style.transformOrigin="0 0",e.baseTransform&&(n.style.transform=e.baseTransform),e.rotate&&(n.style.rotate=e.rotate),e.scale&&(n.style.scale=e.scale),e.translate&&(n.style.translate=e.translate),t.appendChild(n);let r=ms(n);return t.removeChild(n),r}function Nf(e){let t=getComputedStyle(e),n=t.transform||"none";if(n!=="none"&&!/^matrix\(\s*1\s*,\s*0\s*,\s*0\s*,\s*1\s*,\s*0\s*,\s*0\s*\)$/i.test(n))return!0;let r=t.rotate&&t.rotate!=="none"&&t.rotate!=="0deg",o=t.scale&&t.scale!=="none"&&t.scale!=="1",i=t.translate&&t.translate!=="none"&&t.translate!=="0px 0px";return!!(r||o||i)}function ms(e){let t=getComputedStyle(e).transform;if(!t||t==="none")return new DOMMatrix;try{return new DOMMatrix(t)}catch{return new WebKitCSSMatrix(t)}}async function ps(e,t){if(!e)throw new Error("Element cannot be null or undefined");Jc(t.cache);let n=t.fast,r=t.outerTransforms!==!1,o=!!t.outerShadows,i={element:e,options:t,plugins:t.plugins},a,s,c,l="",u="",d,f,m=null;await Pe("beforeSnap",i),await Pe("beforeClone",i);let p=Jd(i.element);try{({clone:a,classCSS:s,styleCache:c}=await Yd(i.element,i.options)),!r&&a&&(m=Af(i.element,a)),!o&&a&&cf(i.element,a,i.options)}finally{p()}if(i={clone:a,classCSS:s,styleCache:c,...i},await Pe("afterClone",i),ff(i.clone),i.options?.excludeMode==="remove")try{gf(i.element,i.clone,i.styleCache)}catch(b){console.warn("[snapdom] shrink pass failed:",b)}try{await pd(i.clone,i.element)}catch{}await new Promise(b=>{ht(async()=>{await Xd(i.clone,i.options),b()},{fast:n})}),await new Promise(b=>{ht(async()=>{await Kd(i.element,i.clone,i.styleCache,i.options),b()},{fast:n})}),t.embedFonts&&await new Promise(b=>{ht(async()=>{let w=ss(i.element),S=Nd(i.element);if(Je()){let I=new Set(Array.from(w).map(C=>String(C).split("__")[0]).filter(Boolean));await ls(I,1)}l=await Ld({required:w,usedCodepoints:S,preCached:!1,exclude:i.options.excludeFonts,useProxy:i.options.useProxy,fontStylesheetDomains:i.options.fontStylesheetDomains}),b()},{fast:n})});let g=cu(i.clone).sort(),h=g.join(",");A.baseStyle.has(h)?u=A.baseStyle.get(h):await new Promise(b=>{ht(()=>{u=uu(g),A.baseStyle.set(h,u),b()},{fast:n})});let y=Cf(i.element?.ownerDocument||document);i={fontsCSS:l,baseCSS:u,scrollbarCSS:y,...i},await Pe("beforeRender",i),await new Promise(b=>{ht(()=>{let w=Fe(i.element),S=i.element.getBoundingClientRect(),I=Math.max(1,R(i.element.offsetWidth||parseFloat(w.width)||S.width||1)),C=Math.max(1,R(i.element.offsetHeight||parseFloat(w.height)||S.height||1)),E=i.element.ownerDocument||document;if(i.element===E.body||i.element===E.documentElement){let ue=Math.max(i.element.scrollHeight||0,E.documentElement?.scrollHeight||0,E.body?.scrollHeight||0),de=Math.max(i.element.scrollWidth||0,E.documentElement?.scrollWidth||0,E.body?.scrollWidth||0);ue>0&&(C=Math.max(C,R(ue))),de>0&&(I=Math.max(I,R(de)));try{let ke=(i.scrollbarCSS||"").length+(i.baseCSS||"").length+(i.fontsCSS||"").length+(i.classCSS||"").length,Me=A.measureHints.get(i.element);if(Me&&Me.cssLen===ke&&Me.w0===I)Me.csh>0&&(C=Math.max(C,R(Me.csh))),Me.csw>0&&(I=Math.max(I,R(Me.csw)));else{let Te=E.createElement("div");Te.style.cssText="position:absolute!important;left:-9999px!important;top:0!important;width:"+I+"px!important;overflow:visible!important;visibility:hidden!important;";let Wt=E.createElement("style");Wt.textContent=(i.scrollbarCSS||"")+i.baseCSS+i.fontsCSS+"svg{overflow:visible;} foreignObject{overflow:visible;}"+i.classCSS,Te.appendChild(Wt),Te.appendChild(i.clone.cloneNode(!0)),E.body.appendChild(Te);let Oe=Te.scrollHeight,Vn=Te.scrollWidth;E.body.removeChild(Te),A.measureHints.set(i.element,{cssLen:ke,w0:I,csh:Oe,csw:Vn}),Oe>0&&(C=Math.max(C,R(Oe))),Vn>0&&(I=Math.max(I,R(Vn)))}}catch{}}if(i.options?.excludeMode==="remove"){let ue=wf(i.element,i.options);Number.isFinite(ue)&&ue>0&&(C=Math.max(1,Math.min(C,R(ue+1))))}let M=(ue,de=NaN)=>{let ke=typeof ue=="string"?parseFloat(ue):ue;return Number.isFinite(ke)?ke:de},O=M(i.options.width),D=M(i.options.height),T=I,k=C,W=Number.isFinite(O),G=Number.isFinite(D),re=C>0?I/C:1;W&&G?(T=Math.max(1,R(O)),k=Math.max(1,R(D))):W?(T=Math.max(1,R(O)),k=Math.max(1,R(T/(re||1)))):G?(k=Math.max(1,R(D)),T=Math.max(1,R(k*(re||1)))):(T=I,k=C);let L=0,$=0,_=I,F=C;if(!r&&m&&Number.isFinite(m.a)){let ue={a:m.a,b:m.b||0,c:m.c||0,d:m.d||1,e:0,f:0},de=Da(I,C,ue,0,0);L=R(de.minX),$=R(de.minY),_=R(de.maxX),F=R(de.maxY)}else if(r&&Pa(i.element)){let ue=w.transform&&w.transform!=="none"?w.transform:"",de=Mf(i.element),ke=Lf({baseTransform:ue,rotate:de.rotate||"0deg",scale:de.scale,translate:de.translate}),{ox:Me,oy:Te}=kf(w,I,C),Wt=ke.is2D?ke:new DOMMatrix(ke.toString()),Oe=Da(I,C,Wt,Me,Te);L=R(Oe.minX),$=R(Oe.minY),_=R(Oe.maxX),F=R(Oe.maxY)}let z=Sf(w),B=xf(w),Y=If(w),j=Ef(w),ee=o?{top:R(z.top+B.top+Y.top+j.bleed.top),right:R(z.right+B.right+Y.right+j.bleed.right),bottom:R(z.bottom+B.bottom+Y.bottom+j.bleed.bottom),left:R(z.left+B.left+Y.left+j.bleed.left)}:{top:0,right:0,bottom:0,left:0};L=R(L-ee.left),$=R($-ee.top),_=R(_+ee.right),F=R(F+ee.bottom);let N=Math.max(1,R(_-L)),J=Math.max(1,R(F-$)),Z=W||G?R(T/I):1,U=G||W?R(k/C):1,ie=Math.max(1,R(N*Z)),V=Math.max(1,R(J*U)),se="http://www.w3.org/2000/svg",We=Je()&&Pa(i.element)?1:0,Q=R(We+(r?0:1)),me=document.createElementNS(se,"foreignObject"),js=R(L),Zs=R($);me.setAttribute("x",String(R(-(js-Q)))),me.setAttribute("y",String(R(-(Zs-Q)))),me.setAttribute("width",String(R(I+Q*2))),me.setAttribute("height",String(R(C+Q*2))),me.style.overflow="visible";let go=document.createElement("style"),Xs='svg{overflow:visible;} foreignObject{overflow:visible;} foreignObject *{min-width:0;} foreignObject pre,foreignObject [style*="white-space"]{white-space:inherit;}';go.textContent=(i.scrollbarCSS||"")+i.baseCSS+i.fontsCSS+Xs+i.classCSS,me.appendChild(go);let Pt=document.createElement("div");Pt.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),Pt.style.cssText=`all:initial;box-sizing:border-box;display:block;overflow:visible;width:${R(I)}px;height:${R(C)}px`,Pt.appendChild(i.clone),me.appendChild(Pt);let Ks=new XMLSerializer().serializeToString(me),Hn=R(N+Q*2),Un=R(J+Q*2),yo=W||G;t.meta={w0:I,h0:C,vbW:Hn,vbH:Un,targetW:T,targetH:k};let Js=Je()&&yo?Hn:R(ie+Q*2),Qs=Je()&&yo?Un:R(V+Q*2),el=parseFloat(Fe(E.documentElement)?.fontSize)||16;f=`<svg xmlns="${se}" width="${Js}" height="${Qs}" viewBox="0 0 ${Hn} ${Un}" font-size="${el}px">`+Ks+"</svg>",d=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(f)}`,i={svgString:f,dataURL:d,...i},b()},{fast:n})}),await Pe("afterRender",i);let v=document.getElementById("snapdom-sandbox");return v&&v.style.position==="absolute"&&v.remove(),i.dataURL}function Pa(e){return Nf(e)}Ce();function Rf(e={}){let t=e.format??"png";t==="jpg"&&(t="jpeg");let n=Kc(e.cache);return{debug:e.debug??!1,fast:e.fast??!0,scale:e.scale??1,exclude:e.exclude??[],excludeMode:e.excludeMode??"hide",filter:e.filter??null,filterMode:e.filterMode??"hide",placeholders:e.placeholders!==!1,embedFonts:e.embedFonts??!1,iconFonts:Array.isArray(e.iconFonts)?e.iconFonts:e.iconFonts?[e.iconFonts]:[],localFonts:Array.isArray(e.localFonts)?e.localFonts:[],excludeFonts:e.excludeFonts??void 0,fontStylesheetDomains:Array.isArray(e.fontStylesheetDomains)?e.fontStylesheetDomains:[],fallbackURL:e.fallbackURL??void 0,cache:n,useProxy:typeof e.useProxy=="string"?e.useProxy:"",width:e.width??null,height:e.height??null,format:t,type:e.type??"svg",quality:e.quality??.92,dpr:e.dpr??(window.devicePixelRatio||1),backgroundColor:e.backgroundColor??(["jpeg","webp"].includes(t)?"#ffffff":null),filename:e.filename??"snapDOM",outerTransforms:e.outerTransforms??!0,outerShadows:e.outerShadows??!1,safariWarmupAttempts:Math.min(3,Math.max(1,(e.safariWarmupAttempts??3)|0)),excludeStyleProps:e.excludeStyleProps??null}}Ot();qa();Ee();yt();Ce();function _f(...e){return of(...e),q}var q=Object.assign(Of,{plugins:_f}),hs=Symbol("snapdom.internal"),Ff=Symbol("snapdom.internal.silent"),Wa=!1;async function Of(e,t){if(!e)throw new Error("Element cannot be null or undefined");let n=Rf(t);if(lf(n,t&&t.plugins),Je()&&(n.embedFonts===!0||Df(e))){if(n.embedFonts)try{let o=ss(e),i=new Set([...o].map(a=>String(a).split("__")[0]).filter(Boolean));await ls(i,1)}catch{}let r=n.safariWarmupAttempts??3;for(let o=0;o<r;o++)try{await $f(e,t)}catch{}}return n.iconFonts&&n.iconFonts.length>0&&sd(n.iconFonts),n.snap||(n.snap={toPng:(r,o)=>q.toPng(r,o),toSvg:(r,o)=>q.toSvg(r,o)}),q.capture(e,n,hs)}q.capture=async(e,t,n)=>{if(n!==hs)throw new Error("[snapdom.capture] is internal. Use snapdom(...) instead.");let r=await ps(e,t),o={img:async(g,h)=>{let{toImg:y}=await Promise.resolve().then(()=>(wa(),Gr));return y(r,{...g,...h||{}})},svg:async(g,h)=>{let{toSvg:y}=await Promise.resolve().then(()=>(wa(),Gr));return y(r,{...g,...h||{}})},canvas:async(g,h)=>{let{toCanvas:y}=await Promise.resolve().then(()=>(Fn(),Ya));return y(r,{...g,...h||{}})},blob:async(g,h)=>{let{toBlob:y}=await Promise.resolve().then(()=>(Ja(),Xa));return y(r,{...g,...h||{}})},png:async(g,h)=>{let{rasterize:y}=await Promise.resolve().then(()=>(An(),En));return y(r,{...g,...h||{},format:"png"})},jpeg:async(g,h)=>{let{rasterize:y}=await Promise.resolve().then(()=>(An(),En));return y(r,{...g,...h||{},format:"jpeg"})},webp:async(g,h)=>{let{rasterize:y}=await Promise.resolve().then(()=>(An(),En));return y(r,{...g,...h||{},format:"webp"})},download:async(g,h)=>{let{download:y}=await Promise.resolve().then(()=>(Eu(),Qa));return y(r,{...g,...h||{}})}},i={};for(let g of["img","svg","canvas","blob","png","jpeg","webp"])i[g]=async h=>o[g](t,{...h||{},[Ff]:!0});i.jpg=i.jpeg;let a={...t,export:{url:r},exports:i},s=await af("defineExports",a),c=Object.assign({},...s.filter(g=>g&&typeof g=="object")),l={...o,...c};l.jpeg&&!l.jpg&&(l.jpg=(g,h)=>l.jpeg(g,h));function u(g,h){let y={...t,...h||{}};return(g==="jpeg"||g==="jpg")&&(y.backgroundColor==null||y.backgroundColor==="transparent")&&(y.backgroundColor="#ffffff"),y}let d=!1,f=Promise.resolve();async function m(g,h){let y=async()=>{let v=l[g];if(!v)throw new Error(`[snapdom] Unknown export type: ${g}`);let b=u(g,h),w={...t,export:{type:g,options:b,url:r}};await Pe("beforeExport",w);let S=await v(w,b);return await Pe("afterExport",w,S),d||(d=!0,await Pe("afterSnap",t)),S};return f=f.then(y)}let p={url:r,toRaw:()=>r,to:(g,h)=>m(g,h),toImg:g=>m("img",g),toSvg:g=>m("svg",g),toCanvas:g=>m("canvas",g),toBlob:g=>m("blob",g),toPng:g=>m("png",g),toJpg:g=>m("jpg",g),toWebp:g=>m("webp",g),download:g=>m("download",g)};for(let g of Object.keys(l)){let h="to"+g.charAt(0).toUpperCase()+g.slice(1);p[h]||(p[h]=y=>m(g,y))}return p};q.toRaw=(e,t)=>q(e,t).then(n=>n.toRaw());q.toImg=(e,t)=>q(e,t).then(n=>n.toImg());q.toSvg=(e,t)=>q(e,t).then(n=>n.toSvg());q.toCanvas=(e,t)=>q(e,t).then(n=>n.toCanvas());q.toBlob=(e,t)=>q(e,t).then(n=>n.toBlob());q.toPng=(e,t)=>q(e,{...t,format:"png"}).then(n=>n.toPng());q.toJpg=(e,t)=>q(e,{...t,format:"jpeg"}).then(n=>n.toJpg());q.toWebp=(e,t)=>q(e,{...t,format:"webp"}).then(n=>n.toWebp());q.download=(e,t)=>q(e,t).then(n=>n.download());async function $f(e,t){if(Wa)return;let n={...t,fast:!0,embedFonts:!0,scale:.2},r;try{r=await ps(e,n)}catch(o){K(t,"safariWarmup pre-capture failed",o)}await new Promise(o=>requestAnimationFrame(()=>requestAnimationFrame(o))),r&&await new Promise(o=>{let i=new Image;try{i.decoding="sync",i.loading="eager"}catch(a){K(t,"safariWarmup img hints failed",a)}i.style.cssText="position:fixed;left:0px;top:0px;width:10px;height:10px;opacity:0.01;pointer-events:none;",i.src=r,document.body.appendChild(i),(async()=>{try{typeof i.decode=="function"&&await i.decode()}catch(s){K(t,"safariWarmup img.decode failed",s)}let a=performance.now();for(;!(i.complete&&i.naturalWidth>0)&&performance.now()-a<900;)await new Promise(s=>setTimeout(s,200));await new Promise(s=>requestAnimationFrame(s));try{let s=document.createElement("canvas");s.width=Math.max(1,i.naturalWidth||10),s.height=Math.max(1,i.naturalHeight||10);let c=s.getContext("2d");c&&c.drawImage(i,0,0)}catch{}await new Promise(s=>requestAnimationFrame(s));try{i.remove()}catch(s){K(t,"safariWarmup img.remove failed",s)}o()})()}),e.querySelectorAll("canvas").forEach(o=>{try{let i=o.getContext("2d",{willReadFrequently:!0});i&&i.getImageData(0,0,1,1)}catch(i){K(t,"safariWarmup canvas poke failed",i)}}),Wa=!0}function Df(e){let t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT);for(;t.nextNode();){let n=t.currentNode,r=getComputedStyle(n),o=r.backgroundImage&&r.backgroundImage!=="none",i=r.maskImage&&r.maskImage!=="none"||r.webkitMaskImage&&r.webkitMaskImage!=="none";if(o||i||n.tagName==="CANVAS")return!0}return!1}function gs(e){if(e.dataset.fontProxied||!e.rel||!e.rel.includes("stylesheet"))return!1;let t=e.href||"";try{return new URL(t).origin!==window.location.origin}catch{return!1}}function ys(e){let t=`/__mindstudio_dev__/font-proxy?url=${encodeURIComponent(e.href)}`,n=document.createElement("link");n.rel="stylesheet",n.href=t,n.dataset.fontProxied="true",e.media&&(n.media=e.media),n.onload=()=>{e.remove()},n.onerror=()=>{n.remove()},e.parentNode?.insertBefore(n,e.nextSibling)}function bs(){let e=document.querySelectorAll('link[rel~="stylesheet"]');for(let t of e)gs(t)&&ys(t)}function Pf(){let e=x().fonts;e.observer||(e.observer=new MutationObserver(t=>{for(let n of t)for(let r of n.addedNodes)r instanceof HTMLLinkElement&&gs(r)&&ys(r)}),e.observer.observe(document.documentElement,{childList:!0,subtree:!0}))}function Wf(e){try{let t=new URL(e,window.location.origin);return t.origin===window.location.origin?!1:!!(/\.(css|woff2?|ttf|otf|eot)(\?|$)/i.test(t.pathname)||t.pathname.includes("/css"))}catch{return!1}}function Bf(){if(window.fetch.__ms_font_proxied)return;let e=window.fetch;window.fetch=function(t,n){let r=typeof t=="string"?t:t instanceof URL?t.href:t.url||String(t);if(Wf(r)){let o=`/__mindstudio_dev__/font-proxy?url=${encodeURIComponent(r)}`;return e.apply(this,[o,n])}return e.apply(this,[t,n])},window.fetch.__ms_font_proxied=!0}function ws(){let e=x().fonts;e.initialized||(e.initialized=!0,Bf(),bs(),Pf())}async function vs(){bs();try{await document.fonts.ready}catch{}}var Hf=750,Uf=400,Ae=2,Ss={name:"text-fit",afterClone(e){if(!e.clone)return;let t=e.clone.ownerDocument;if(!t)return;let n=t.createElement("style");n.textContent="* { letter-spacing: -0.03px !important; }",e.clone.prepend(n)}},xs=["#__mindstudio-cursor","#__mindstudio-cursor-ripple","#__mindstudio-notes-host","#__mindstudio-camera","#__mindstudio-flash","#__mindstudio-touch-circle"],Vf="#DD2590",Gf=`<svg width="44" height="44" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
202
|
-
<g filter="url(#filter0_d_2_302)">
|
|
203
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.5 21C4.57 21 3 19.43 3 17.5V10.5C3 8.57 4.57 7 6.5 7H7.5C7.966 7 8.387 6.49 8.605 6.053C9.239 4.786 10.028 4 12 4H16C17.972 4 18.761 4.786 19.395 6.053C19.613 6.49 20.034 7 20.5 7H21.5C23.43 7 25 8.57 25 10.5V17.5C25 19.43 23.43 21 21.5 21H6.5Z" fill="white"/>
|
|
204
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M14 18C11.238 18 9 15.762 9 13C9 10.238 11.238 8 14 8C16.762 8 19 10.238 19 13C19 15.762 16.762 18 14 18ZM21.5 8H20.5C19.5 8 18.816 7.132 18.5 6.5C18 5.5 17.5 5 16 5H14H12C10.5 5 10 5.5 9.5 6.5C9.184 7.132 8.5 8 7.5 8H6.5C5.119 8 4 9.119 4 10.5V17.5C4 18.881 5.119 20 6.5 20H21.5C22.881 20 24 18.881 24 17.5V10.5C24 9.119 22.881 8 21.5 8Z" fill="black"/>
|
|
205
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M17 13C17 14.656 15.656 16 14 16C12.344 16 11 14.656 11 13C11 11.344 12.344 10 14 10C15.656 10 17 11.344 17 13Z" fill="black"/>
|
|
206
|
-
</g>
|
|
207
|
-
<defs>
|
|
208
|
-
<filter id="filter0_d_2_302" x="1" y="3" width="26" height="21" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
209
|
-
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
210
|
-
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
|
211
|
-
<feOffset dy="1"/>
|
|
212
|
-
<feGaussianBlur stdDeviation="1"/>
|
|
213
|
-
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.65 0"/>
|
|
214
|
-
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_2_302"/>
|
|
215
|
-
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_2_302" result="shape"/>
|
|
216
|
-
</filter>
|
|
217
|
-
</defs>
|
|
218
|
-
</svg>`,oo="__mindstudio-camera",io="__mindstudio-flash";function zf(){document.getElementById(oo)?.remove(),document.getElementById(io)?.remove();let e=x().screenshot,t=document.createElement("div");t.id=oo,t.innerHTML=`
|
|
219
|
-
${Gf}
|
|
220
|
-
<div style="
|
|
221
|
-
position: absolute;
|
|
222
|
-
left: 48px;
|
|
223
|
-
top: 12px;
|
|
224
|
-
background: ${Vf};
|
|
225
|
-
color: white;
|
|
226
|
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
227
|
-
font-size: 11px;
|
|
228
|
-
font-weight: 600;
|
|
229
|
-
line-height: 1;
|
|
230
|
-
padding: 4px 7px;
|
|
231
|
-
border-radius: 4px;
|
|
232
|
-
white-space: nowrap;
|
|
233
|
-
box-shadow: 0 1px 3px rgba(0,0,0,0.2);
|
|
234
|
-
">Remy</div>
|
|
235
|
-
`,t.style.cssText=["position: fixed","z-index: 2147483647","pointer-events: none","opacity: 0","transition: opacity 300ms ease, left 600ms cubic-bezier(0.4, 0, 0, 1), top 600ms cubic-bezier(0.4, 0, 0, 1)","will-change: left, top, opacity"].join("; ");let n=document.createElement("div");n.id=io,n.style.cssText=["position: fixed","top: 0","left: 0","width: 100vw","height: 100vh","background: white","opacity: 0","z-index: 2147483646","pointer-events: none","transition: opacity 600ms ease-out"].join("; "),document.documentElement.appendChild(n),document.documentElement.appendChild(t),e.cameraEl=t,e.flashEl=n}function qf(e,t){let{cameraEl:n}=x().screenshot;n&&(n.style.left=`${e}px`,n.style.top=`${t}px`,n.style.opacity="1")}function Cs(e,t){let{cameraEl:n}=x().screenshot;n&&(n.style.left=`${e}px`,n.style.top=`${t}px`)}async function Yf(){let{flashEl:e}=x().screenshot;e&&(e.style.transition="none",e.style.opacity="0.7",e.offsetWidth,e.style.transition="opacity 600ms ease-out",e.style.opacity="0",await le(600))}function jf(){let{cameraEl:e}=x().screenshot;e&&(e.style.opacity="0")}function Zf(){let e=x().screenshot;document.getElementById(oo)?.remove(),document.getElementById(io)?.remove(),e.cameraEl=null,e.flashEl=null}function Xf(e,t,n){return new Promise(r=>{let o=e.scrollTop,i=t-o;if(Math.abs(i)<1){r();return}let a=Math.abs(i),c=Math.max(n,a/2),l=performance.now();function u(d){let f=d-l,m=Math.min(f/c,1),p=m<.5?4*m*m*m:1-Math.pow(-2*m+2,3)/2;e.scrollTop=o+i*p,m<1?requestAnimationFrame(u):r()}requestAnimationFrame(u)})}async function Is(e){let t=x().screenshot;if(t.capturing)throw new Error("Screenshot already in progress");t.capturing=!0,ai();try{return await Kf(e)}finally{t.capturing=!1,si()}}async function Kf(e){await vs();let t=window.innerWidth,n=window.innerHeight;if(e?.viewportOnly)return await Jf(t,n);let r=document.getElementById("__mindstudio-notes-host");r&&r.remove();let o=tt(),i=o!==document.documentElement,a=o.scrollTop,s=o.style.scrollBehavior;o.style.scrollBehavior="auto",zf();try{let c=Math.random()<.5?t+30:-60,l=n*.3+Math.random()*n*.4;qf(c,l),await le(200);let u=t*.4+Math.random()*t*.15,d=n*.35+Math.random()*n*.15;Cs(u,d),await le(700);let f=[],m=0,p=i?o.clientHeight:n,g=()=>i?o.scrollHeight:Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),h=50,y=g();for(;m<y&&f.length<h;){let M=f.length,O=g();if(O<=0){console.warn("[screenshot] skipping chunk \u2014 page height is 0");break}if(O-m<p*.05&&f.length>0)break;let T=O-p,k=Math.min(m,T);Math.abs(k-o.scrollTop)>1&&(await Xf(o,k,Uf),Cs(u,d),await le(Hf)),Yf();let G=o.scrollTop,re=Math.min(p,O-G);if(re<=0){console.warn("[screenshot] skipping chunk \u2014 captureHeight is 0 (page may have shrunk)"),m+=p;continue}let L=i?o.getBoundingClientRect():null;try{let _=await(await q(document.body,{embedFonts:!0,exclude:xs,plugins:[Ss]})).toCanvas({width:t+1});if(_&&L){let F=_.width/t,z=_.width;if(M===0&&L.top>0){let J=Math.round(L.top*F),Z=document.createElement("canvas");Z.width=z,Z.height=J;let U=Z.getContext("2d");U&&(U.drawImage(_,0,0,z,J,0,0,z,J),f.push({y:0,canvas:Z}))}let B=Math.round(L.top*F),Y=Math.round(re*F),j=document.createElement("canvas");j.width=z,j.height=Y;let ee=j.getContext("2d");ee&&(ee.drawImage(_,0,B,z,Y,0,0,z,Y),f.push({y:L.top+G,canvas:j}));let N=L.bottom;if(m+p>=y&&N<n){let J=Math.round(N*F),Z=_.height-J;if(Z>0){let U=document.createElement("canvas");U.width=z,U.height=Z;let ie=U.getContext("2d");ie&&(ie.drawImage(_,0,J,z,Z,0,0,z,Z),f.push({y:L.top+O,canvas:U}))}}}else if(_){let F=_.width/t,z=Math.round(G*F),B=Math.min(G+re,O),Y=Math.round(B*F)-z,j=_.width,ee=document.createElement("canvas");ee.width=j,ee.height=Y;let N=ee.getContext("2d");N&&(N.drawImage(_,0,z,j,Y,0,0,j,Y),f.push({y:G,canvas:ee}))}}catch($){console.error("[screenshot] snapdom capture failed for chunk",M,$)}m+=p}if(m<y&&console.warn(`[screenshot] page truncated \u2014 captured ${f.length} chunks but page is ${y}px tall`),f.length===0)throw new Error("Screenshot capture produced no image data");let v=f[0].canvas.width,b=0;for(let M of f){if(M.canvas.width!==v){let O=v/M.canvas.width,D=Math.round(M.canvas.height*O),T=document.createElement("canvas");T.width=v,T.height=D;let k=T.getContext("2d");k&&(k.drawImage(M.canvas,0,0,v,D),M.canvas=T)}b+=M.canvas.height}let w=document.createElement("canvas");w.width=v,w.height=b;let S=w.getContext("2d");if(!S)throw new Error("Failed to create output canvas");let I=0;for(let M of f)S.drawImage(M.canvas,0,I),I+=M.canvas.height;let E=w.toDataURL("image/jpeg",1).replace(/^data:image\/jpeg;base64,/,"");if(!E)throw new Error("Canvas export produced no image data");return{image:E,width:w.width,height:w.height}}finally{jf(),Zf(),r&&document.body.appendChild(r),o.style.scrollBehavior="auto",o.scrollTop=a,o.style.scrollBehavior=s}}async function Jf(e,t){let n=document.getElementById("__mindstudio-notes-host");n&&n.remove();let o=await(await q(document.body,{embedFonts:!0,exclude:xs,plugins:[Ss]})).toCanvas({width:(e+1)*Ae});if(!o)throw new Error("SnapDOM viewport capture returned empty result");let i=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),a=document.createElement("canvas");a.width=e*Ae,a.height=t*Ae;let s=a.getContext("2d");if(!s)throw new Error("Failed to create canvas context");let c=window.scrollY/i*o.height,l=t/i*o.height;s.drawImage(o,0,c,o.width,l,0,0,e*Ae,t*Ae),n&&(document.body.appendChild(n),await Qf(n,s,e,t));let d=a.toDataURL("image/jpeg",1).replace(/^data:image\/jpeg;base64,/,"");if(!d)throw new Error("Canvas export produced no image data");return{image:d,width:(e+1)*Ae,height:t*Ae}}async function Qf(e,t,n,r){let o=e.shadowRoot?.querySelector(".overlay");if(!o)return;let i=e.shadowRoot?.querySelector(".cursor");i&&(i.style.display="none");let a=o.style.cssText;try{o.style.cssText=`
|
|
236
|
-
position: absolute;
|
|
237
|
-
inset: 0;
|
|
238
|
-
width: ${n}px;
|
|
239
|
-
height: ${r}px;
|
|
240
|
-
overflow: visible;
|
|
241
|
-
`,document.body.appendChild(o);let c=await(await q(o,{embedFonts:!0})).toCanvas({width:n*Ae});c&&t.drawImage(c,0,0,n*Ae,r*Ae)}finally{o.style.cssText=a,e.shadowRoot?.insertBefore(o,i),i&&(i.style.display="")}}function On(){let e=x().notesMode;e.active||(e.active=!0,x().touch.active&&(qt(),e.wasTouchActive=!0),sa())}function $t(){let e=x().notesMode;e.active&&(e.active=!1,la(),e.wasTouchActive&&(e.wasTouchActive=!1,wt()))}async function $n(){let{image:e}=await Is({viewportOnly:!0});return e}var Dt="mindstudio-browser-agent";function Es(){let e=x(),t=new URLSearchParams(window.location.search);e.zoom.pipMode=t.get("display-mode")==="pip",e.zoom.mobilePreview=t.get("preview")==="mobile"||window.innerWidth<768;try{let n=sessionStorage.getItem("__ms_pip");n==="1"?e.zoom.pipMode=!0:n==="0"&&(e.zoom.pipMode=!1);let r=sessionStorage.getItem("__ms_mobile");r==="1"?e.zoom.mobilePreview=!0:r==="0"&&(e.zoom.mobilePreview=!1)}catch{}e.messages.handler||(e.messages.handler=async n=>{if(n.source===window)return;let r=n.data;if(!(!r||typeof r.command!="string")&&r.channel===Dt)switch(r.command){case"notes-enter":On();break;case"notes-exit":$t();break;case"notes-cursor-hide":ca();break;case"notes-screenshot":{try{let o=await $n();$t(),window.parent.postMessage({channel:Dt,command:"screenshot-result",image:o},"*")}catch(o){window.parent.postMessage({channel:Dt,command:"screenshot-result",error:o instanceof Error?o.message:"Screenshot failed"},"*")}break}case"cursor-show":Kt("visible");break;case"cursor-hide":Kt("hidden");break;case"cursor-auto":Kt(null);break;case"navigate":typeof r.url=="string"&&(window.history.pushState(null,"",r.url),window.dispatchEvent(new PopStateEvent("popstate")));break;case"back":window.history.back();break;case"forward":window.history.forward();break;case"healthcheck":{let o=x().ws;window.parent.postMessage({channel:Dt,command:"healthcheck-reply",wsConnected:!!(o.ws&&o.ws.readyState===WebSocket.OPEN),url:location.href},"*");break}case"display-mode-pip":e.zoom.pipMode=!0;try{sessionStorage.setItem("__ms_pip","1")}catch{}break;case"display-mode-full":e.zoom.pipMode=!1;try{sessionStorage.setItem("__ms_pip","0")}catch{}break;case"preview-mode-mobile":e.zoom.mobilePreview=!0;try{sessionStorage.setItem("__ms_mobile","1")}catch{}wt(),ur(!0);break;case"preview-mode-desktop":e.zoom.mobilePreview=!1;try{sessionStorage.setItem("__ms_mobile","0")}catch{}qt(),ur(!1);break}},window.addEventListener("keyup",n=>{n.code==="Backquote"&&window.parent!==window&&window.parent.postMessage({channel:Dt,command:"ptt-keyup"},"*")}),window.addEventListener("message",e.messages.handler))}var em="mindstudio-browser-agent";function As(){if(window.__ms_nav_patched)return;window.__ms_nav_patched=!0;let e=()=>{let r=location.pathname+location.search+location.hash,o=x();if(r!==o.nav.lastUrl&&(o.nav.lastUrl=r,window.parent!==window)){let i=window.navigation;window.parent.postMessage({channel:em,command:"location",url:r,canGoBack:i?!!i.canGoBack:void 0,canGoForward:i?!!i.canGoForward:void 0},"*")}},t=history.pushState.bind(history);history.pushState=function(...r){t(...r),e()};let n=history.replaceState.bind(history);history.replaceState=function(...r){n(...r),e()},window.addEventListener("popstate",e),window.addEventListener("hashchange",e),e()}var ks=16,tm=3e4,Ms="__ms_mirror";function nm(){let e=new URLSearchParams(window.location.search);if(e.get("mirror")==="true"){e.delete("mirror");let t=e.toString(),n=window.location.pathname+(t?"?"+t:"")+window.location.hash;window.history.replaceState(null,"",n);try{sessionStorage.setItem(Ms,"1")}catch{}return!0}try{return sessionStorage.getItem(Ms)==="1"}catch{return!1}}async function Ts(){if(window.parent!==window||!nm())return;let e=x().mirror;if(e.recording)return;let t=[],n=null;function r(){if(n=null,t.length===0)return;let a=vn();if(!a){n=setTimeout(r,ks);return}let s=t;t=[],a.send(JSON.stringify({type:"mirror",events:s}))}function o(a){t.push(a),n||(n=setTimeout(r,ks))}document.readyState!=="complete"&&await new Promise(a=>window.addEventListener("load",()=>a(),{once:!0})),await new Promise(a=>setTimeout(a,500));let i=Re({emit:o,collectFonts:!0,checkoutEveryNms:tm});i&&(e.recording=!0,e.stopFn=()=>{i(),n&&(clearTimeout(n),n=null),r(),e.recording=!1,e.stopFn=null})}var rm='input[type="email"], input[autocomplete="email"]',om='input[type="tel"], input[autocomplete="tel"]',im='input[autocomplete="one-time-code"]',am=/e[-_ ]?mail/i,sm=/phone|mobile|\btel\b/i,lm=/\b(otp|code|verification|verify|2fa|one[-_ ]?time)\b/i;function Dn(e){let t=e.getBoundingClientRect();if(t.width===0||t.height===0)return!1;let n=getComputedStyle(e);return!(n.display==="none"||n.visibility==="hidden")}function ao(e){let t=document.querySelectorAll(e);for(let n of t)if(Dn(n))return n;return null}function cm(e){let t=e.getAttribute("aria-labelledby"),n=t?document.getElementById(t):null;return[e.name,e.id,e.placeholder,e.getAttribute("aria-label"),n?.textContent].filter(Boolean).join(" ")}function so(e,t){let n=document.querySelectorAll('input[type="text"], input:not([type])');for(let r of n)if(t(r)&&e.test(cm(r))&&Dn(r))return r;return null}function um(e){if(e.inputMode==="numeric"){let n=e.maxLength;if(n>=4&&n<=8)return!0}let t=e.getAttribute("pattern")??"";return!!(/0-9/.test(t)&&e.maxLength>=4&&e.maxLength<=8)}function dm(e){if(e.maxLength!==1)return!1;let t=(e.getAttribute("type")||"text").toLowerCase();return t==="text"||t==="tel"||t==="number"}function fm(){let e=Array.from(document.querySelectorAll("input")).filter(t=>dm(t)&&Dn(t));return e.length<4||e.length>8?null:(e.sort((t,n)=>{let r=t.getBoundingClientRect(),o=n.getBoundingClientRect();return Math.abs(r.top-o.top)>8?r.top-o.top:r.left-o.left}),e)}function mm(){let e=ao(im),t=e&&e.maxLength!==1?e:null;if(!t){let n=document.querySelectorAll('input[inputmode="numeric"], input[type="text"]');for(let r of n)if(um(r)&&Dn(r)){t=r;break}}return t||(t=so(lm,n=>n.maxLength<=8&&n.maxLength!==1)),t}function Ls(){let e=ao(rm),t=e?"email":null;e||(e=ao(om),t=e?"phone":null),e||(e=so(am,()=>!0),e&&(t="email")),e||(e=so(sm,()=>!0),e&&(t="phone"));let n=fm(),r=n?{cells:n,segmented:!0}:null;if(!r){let o=mm();o&&(r={cells:[o],segmented:!1})}return{identifier:e,identifierKind:t,code:r}}var Ns=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value")?.set;function Rs(e,t){Ns?Ns.call(e,t):e.value=t}function Pn(e,t,n){let r;try{r=new InputEvent(t,{bubbles:!0,cancelable:t==="beforeinput",inputType:"insertText",data:n})}catch{r=new Event(t,{bubbles:!0})}e.dispatchEvent(r)}function pm(e,t){let n={key:t,code:/^[0-9]$/.test(t)?`Digit${t}`:t,bubbles:!0,cancelable:!0};e.dispatchEvent(new KeyboardEvent("keydown",n)),e.dispatchEvent(new KeyboardEvent("keyup",n))}function _s(e,t){e.focus(),Rs(e,t),Pn(e,"beforeinput",t),Pn(e,"input",t),e.dispatchEvent(new Event("change",{bubbles:!0}))}function Fs(e){let t=e.closest("form");if(t&&typeof t.requestSubmit=="function")try{t.requestSubmit();return}catch{}let n={key:"Enter",code:"Enter",keyCode:13,which:13,bubbles:!0,cancelable:!0};e.dispatchEvent(new KeyboardEvent("keydown",n)),e.dispatchEvent(new KeyboardEvent("keypress",n)),e.dispatchEvent(new KeyboardEvent("keyup",n))}function Os(e,t){_s(e,t),Fs(e)}function Wn(e,t){return e.segmented?e.cells.forEach((n,r)=>{let o=t[r]??"";n.focus(),Rs(n,o),Pn(n,"beforeinput",o),Pn(n,"input",o),n.dispatchEvent(new Event("change",{bubbles:!0})),o&&pm(n,o)}):_s(e.cells[0],t),co(e),lo(e)}function lo(e){return e.cells.map(t=>t.value).join("")}function co(e){let t=e.cells[e.cells.length-1]??e.cells[0];t&&Fs(t)}var hm="__mindstudio-auth-creds-host",gm="remy@mindstudio.ai",ym="+15555555555",Qe="123456";function uo(e){x().authCredsWidget.host||bm(),wm(e)}function $s(){let e=x().authCredsWidget;e.host&&(e.host.remove(),e.host=null)}function bm(){let e=x().authCredsWidget,t=document.createElement("div");t.id=hm,t.style.cssText="position: fixed; right: 16px; bottom: 16px; z-index: 2147483640; pointer-events: none;";let n=t.attachShadow({mode:"open"}),r=document.createElement("style");r.textContent=`
|
|
80
|
+
${h}
|
|
81
|
+
`):u+=f[0]}return u+=s.slice(d),u}let a=ja(e,t||location.href);return a=await i(a,t||location.href,0),a}var Ws=/url\((["']?)([^"')]+)\1\)/g,Lf=/@font-face[^{}]*\{[^}]*\}/g;function Ce(e,t,n=""){return(e.match(new RegExp(`${t}\\s*:\\s*([^;}]+)[;}]`,"i"))?.[1]||n).trim()}function Bs(e){if(!e)return[];let t=[],n=e.split(",").map(r=>r.trim()).filter(Boolean);for(let r of n){let o=r.match(/^U\+([0-9A-Fa-f?]+)(?:-([0-9A-Fa-f?]+))?$/);if(!o)continue;let i=o[1],a=o[2],s=l=>{if(!l.includes("?"))return parseInt(l,16);let c=parseInt(l.replace(/\?/g,"0"),16),u=parseInt(l.replace(/\?/g,"F"),16);return[c,u]};if(a){let l=s(i),c=s(a),u=Array.isArray(l)?l[0]:l,d=Array.isArray(c)?c[1]:c;t.push([Math.min(u,d),Math.max(u,d)])}else{let l=s(i);Array.isArray(l)?t.push([l[0],l[1]]):t.push([l,l])}}return t}function Hs(e,t){if(!t.length||!e||e.size===0)return!0;for(let n of e)for(let[r,o]of t)if(n>=r&&n<=o)return!0;return!1}function Eo(e,t){let n=[];if(!e)return n;for(let r of e.matchAll(Ws)){let o=(r[2]||"").trim();if(!(!o||o.startsWith("data:"))){if(!/^https?:/i.test(o))try{o=new URL(o,t||location.href).href}catch{}n.push(o)}}return n}async function lo(e,t,n=""){let r=e;for(let o of e.matchAll(Ws)){let i=wo(o[0]);if(!i)continue;let a=i;if(!a.startsWith("http")&&!a.startsWith("data:"))try{a=new URL(a,t||location.href).href}catch{}if(!Oe(a)){if(A.resource?.has(a)){A.font?.add(a),r=r.replace(o[0],`url(${A.resource.get(a)})`);continue}try{let s=await xe(a,{as:"dataURL",useProxy:n,silent:!0});if(s.ok&&typeof s.data=="string"){let l=s.data;A.resource?.set(a,l),A.font?.add(a),r=r.replace(o[0],`url(${l})`)}}catch{console.warn("[snapDOM] Failed to fetch font resource:",a)}}}return r}function Ff(e){if(!e.length)return null;let t=(a,s)=>e.some(([l,c])=>!(c<a||l>s)),n=t(0,255)||t(305,305),r=t(256,591)||t(7680,7935),o=t(880,1023),i=t(1024,1279);return t(7840,7929)||t(258,259)||t(416,417)||t(431,432)?"vietnamese":i?"cyrillic":o?"greek":r?"latin-ext":n?"latin":null}function Ya(e={}){let t=new Set((e.families||[]).map(o=>String(o).toLowerCase())),n=new Set((e.domains||[]).map(o=>String(o).toLowerCase())),r=new Set((e.subsets||[]).map(o=>String(o).toLowerCase()));return(o,i)=>{if(t.size&&t.has(o.family.toLowerCase()))return!0;if(n.size)for(let a of o.srcUrls)try{if(n.has(new URL(a).host.toLowerCase()))return!0}catch{}if(r.size){let a=Ff(i);if(a&&r.has(a))return!0}return!1}}function $f(e){if(!e)return e;let t=/@font-face[^{}]*\{[^}]*\}/gi,n=new Set,r=[];for(let i of e.match(t)||[]){let a=Ce(i,"font-family"),s=Mo(a),l=Ce(i,"font-weight","400"),c=Ce(i,"font-style","normal"),u=Ce(i,"font-stretch","100%"),d=Ce(i,"unicode-range"),f=Ce(i,"src"),m=Eo(f,location.href),p=m.length?m.map(y=>String(y).toLowerCase()).sort().join("|"):f.toLowerCase(),h=[String(s||"").toLowerCase(),l,c,u,d.toLowerCase(),p].join("|");n.has(h)||(n.add(h),r.push(i))}if(r.length===0)return e;let o=0;return e.replace(t,()=>r[o++]||"")}var Za=new WeakMap,_f=0;function Of(e){let t=Za.get(e);return t===void 0&&(t=_f++,Za.set(e,t)),t}function Pf(e,t,n,r,o,i){let a=Array.from(e||[]).sort().join("|"),s=t?JSON.stringify({families:(t.families||[]).map(f=>String(f).toLowerCase()).sort(),domains:(t.domains||[]).map(f=>String(f).toLowerCase()).sort(),subsets:(t.subsets||[]).map(f=>String(f).toLowerCase()).sort()}):"",l=(n||[]).map(f=>`${(f.family||"").toLowerCase()}::${f.weight||"normal"}::${f.style||"normal"}::${f.src||""}`).sort().join("|"),c=r||"",u=(o||[]).map(f=>String(f).toLowerCase()).sort().join("|"),d=Of(i||document);return`fonts-embed-css::req=${a}::ex=${s}::lf=${l}::px=${c}::fd=${u}::doc=${d}`}async function Us(e,t,n,r){let o;try{o=e.cssRules||[]}catch{return}let i=(a,s)=>{try{return new URL(a,s||location.href).href}catch{return a}};for(let a of o){if(a.type===CSSRule.IMPORT_RULE&&a.styleSheet){let s=a.href?i(a.href,t):t;if(r.depth>=Hn){console.warn(`[snapDOM] CSSOM import depth exceeded (${Hn}) at ${s}`);continue}if(s&&r.visitedSheets.has(s)){console.warn(`[snapDOM] Skipping circular CSSOM import: ${s}`);continue}s&&r.visitedSheets.add(s);let l={...r,depth:(r.depth||0)+1};await Us(a.styleSheet,s,n,l);continue}if(a.type===CSSRule.FONT_FACE_RULE){let s=(a.style.getPropertyValue("font-family")||"").trim(),l=Mo(s);if(!l||Oe(l))continue;let c=(a.style.getPropertyValue("font-weight")||"").trim(),u=(a.style.getPropertyValue("font-style")||"").trim(),d=(a.style.getPropertyValue("font-stretch")||"").trim(),f=(a.style.getPropertyValue("font-variation-settings")||"").trim(),m=(a.style.getPropertyValue("src")||"").trim(),p=(a.style.getPropertyValue("unicode-range")||"").trim(),h=c||"400",y=u||"normal",g=d||"100%",w=(u?`font-style:${u};`:"")+(c?`font-weight:${c};`:"")+(d?`font-stretch:${d};`:"")+(f?`font-variation-settings:${f};`:"")+(p?`unicode-range:${p};`:""),v=r.faceMatchesRequired(l,y,h,g);if(!v&&!r.requiredIndex.has(l.toLowerCase()))continue;let b=Bs(p);if(!Hs(r.usedCodepoints,b))continue;let S={family:l,weightSpec:h,styleSpec:y,stretchSpec:g,unicodeRange:p,srcRaw:m,srcUrls:Eo(m,t||location.href),href:t||location.href};if(r.simpleExcluder&&r.simpleExcluder(S,b))continue;if(!v){r.provisionalFaces.push({family:l.toLowerCase(),block:`@font-face{font-family:${l};src:${m};${w}}`,srcRaw:m,baseHref:t||location.href});continue}if(r.coveredFamilies.add(l.toLowerCase()),/url\(/i.test(m)){let x=await lo(m,t||location.href,r.useProxy);await n(`@font-face{font-family:${l};src:${x};${w}}`)}else await n(`@font-face{font-family:${l};src:${m};${w}}`)}}}async function Df({required:e,usedCodepoints:t,exclude:n=void 0,localFonts:r=[],useProxy:o="",fontStylesheetDomains:i=[],doc:a=document}={}){e instanceof Set||(e=new Set),t instanceof Set||(t=new Set);let s=new Map;for(let b of e){let[S,x,I,C]=String(b).split("__");if(!S)continue;let E=S.toLowerCase(),k=s.get(E)||[];k.push({w:parseInt(x,10),s:I,st:parseInt(C,10)}),s.set(E,k)}function l(b,S,x,I){let C=String(b).toLowerCase();if(!s.has(C))return!1;let E=s.get(C),k=Af(x),T=Mf(S),F=Ef(I),D=k.min!==k.max,R=k.min,_=P=>T.kind==="normal"&&P==="normal"||T.kind!=="normal"&&(P==="italic"||P==="oblique"),N=!1;for(let P of E){let X=D?P.w>=k.min&&P.w<=k.max:P.w===R,U=_(_n(P.s)),G=P.st>=F.min&&P.st<=F.max;if(X&&U&&G){N=!0;break}}if(N)return!0;if(!D)for(let P of E){let X=_(_n(P.s)),U=P.st>=F.min&&P.st<=F.max;if(Math.abs(R-P.w)<=300&&X&&U)return!0}if(!D&&T.kind==="normal"&&E.some(P=>_n(P.s)!=="normal"))for(let P of E){let X=Math.abs(R-P.w)<=300,U=P.st>=F.min&&P.st<=F.max;if(X&&U)return!0}return!1}let c=Ya(n),u=Pf(e,n,r,o,i,a);if(A.resource?.has(u))return A.resource.get(u);let d=Rf(e),f=[],m=so;for(let b of a.querySelectorAll("style")){let S=b.textContent||"";for(let x of S.matchAll(m)){let I=(x[2]||x[4]||"").trim();!I||Oe(I)||a.querySelector(`link[rel="stylesheet"][href="${I}"]`)||f.push(I)}}let p=[];f.length&&await Promise.all(f.map(b=>new Promise(S=>{if(a.querySelector(`link[rel="stylesheet"][href="${b}"]`))return S(null);let x=a.createElement("link");x.rel="stylesheet",x.href=b,x.setAttribute("data-snapdom","injected-import"),x.onload=()=>S(x),x.onerror=()=>S(null),a.head.appendChild(x),p.push(x)})));let h="",y=new Set,g=[],w=Array.from(a.querySelectorAll('link[rel="stylesheet"]')).filter(b=>!!b.href);for(let b of p)try{b.remove()}catch{}for(let b of w)try{if(Oe(b.href))continue;let S="",x=!1;try{x=new URL(b.href,location.href).origin===location.origin}catch{}if(!x){let C=Array.isArray(i)?i:[];if(!Tf(b.href,d,C))continue}if(x){let C=Array.from(a.styleSheets).find(E=>E.href===b.href);if(C)try{let E=C.cssRules||[];S=Array.from(E).map(k=>k.cssText).join("")}catch{}}if(!S){let C=await xe(b.href,{as:"text",useProxy:o});if(C?.ok&&typeof C.data=="string"&&(S=C.data),Oe(b.href))continue}S=await Nf(S,b.href,o);let I="";for(let C of S.match(Lf)||[]){let E=Ce(C,"font-family"),k=Mo(E);if(!k||Oe(k))continue;let T=Ce(C,"font-weight","400"),F=Ce(C,"font-style","normal"),D=Ce(C,"font-stretch","100%"),R=Ce(C,"unicode-range"),_=Ce(C,"src"),N=Eo(_,b.href),P=l(k,F,T,D);if(!P&&!s.has(k.toLowerCase()))continue;let X=Bs(R);if(!Hs(t,X))continue;let U={family:k,weightSpec:T,styleSpec:F,stretchSpec:D,unicodeRange:R,srcRaw:_,srcUrls:N,href:b.href};if(n&&c(U,X))continue;if(!P){g.push({family:k.toLowerCase(),block:C,srcRaw:_,baseHref:b.href});continue}y.add(k.toLowerCase());let G=/url\(/i.test(_)?await lo(C,b.href,o):C;I+=G}I.trim()&&(h+=I)}catch{console.warn("[snapDOM] Failed to process stylesheet:",b.href)}let v={requiredIndex:s,usedCodepoints:t,faceMatchesRequired:l,coveredFamilies:y,provisionalFaces:g,simpleExcluder:n?Ya(n):null,useProxy:o,visitedSheets:new Set,depth:0};for(let b of a.styleSheets)if(!(b.href&&w.some(S=>S.href===b.href)))try{let S=b.href||location.origin+"/";S&&v.visitedSheets.add(S),await Us(b,S,async x=>{h+=x},v)}catch{}for(let b of g)y.has(b.family)||(h+=/url\(/i.test(b.srcRaw)?await lo(b.block,b.baseHref,o):b.block);try{for(let b of a.fonts||[]){if(!b||!b.family||b.status!=="loaded"||!b._snapdomSrc)continue;let S=String(b.family).replace(/^['"]+|['"]+$/g,"");if(Oe(S)||!s.has(S.toLowerCase())||n?.families&&n.families.some(I=>String(I).toLowerCase()===S.toLowerCase()))continue;let x=b._snapdomSrc;if(!String(x).startsWith("data:")){if(A.resource?.has(b._snapdomSrc))x=A.resource.get(b._snapdomSrc),A.font?.add(b._snapdomSrc);else if(!A.font?.has(b._snapdomSrc))try{let I=await xe(b._snapdomSrc,{as:"dataURL",useProxy:o,silent:!0});if(I.ok&&typeof I.data=="string")x=I.data,A.resource?.set(b._snapdomSrc,x),A.font?.add(b._snapdomSrc);else continue}catch{console.warn("[snapDOM] Failed to fetch dynamic font src:",b._snapdomSrc);continue}}h+=`@font-face{font-family:'${S}';src:url(${x});font-style:${b.style||"normal"};font-weight:${b.weight||"normal"};}`}}catch{}for(let b of r){if(!b||typeof b!="object")continue;let S=String(b.family||"").replace(/^['"]+|['"]+$/g,"");if(!S||Oe(S)||!s.has(S.toLowerCase())||n?.families&&n.families.some(T=>String(T).toLowerCase()===S.toLowerCase()))continue;let x=b.weight!=null?String(b.weight):"normal",I=b.style!=null?String(b.style):"normal",C=b.stretchPct!=null?`${b.stretchPct}%`:"100%",E=String(b.src||""),k=E;if(!k.startsWith("data:")){if(A.resource?.has(E))k=A.resource.get(E),A.font?.add(E);else if(!A.font?.has(E))try{let T=await xe(E,{as:"dataURL",useProxy:o,silent:!0});if(T.ok&&typeof T.data=="string")k=T.data,A.resource?.set(E,k),A.font?.add(E);else continue}catch{console.warn("[snapDOM] Failed to fetch localFonts src:",E);continue}}h+=`@font-face{font-family:'${S}';src:url(${k});font-style:${I};font-weight:${x};font-stretch:${C};}`}return h&&(h=$f(h),A.resource?.set(u,h)),h}function Vs(e,t){let n=new Set,r=new Set;if(!e)return{required:n,usedCodepoints:r};let o=l=>{if(l)for(let c of l)r.add(c.codePointAt(0))},i=l=>{let c=xf(l.fontFamily);if(c.length)for(let u of c)n.add(`${u}__${$n(l.fontWeight)}__${_n(l.fontStyle)}__${If(l.fontStretch)}`)},a=l=>{i(J(l));for(let c of["::before","::after"]){let u=J(l,c),d=u&&u.content;if(!(!d||d==="none"||d==="normal"))if(i(u),/^["']/.test(d))o(d.slice(1,-1));else{let f=d.match(/\\[0-9A-Fa-f]{1,6}/g);if(f)for(let m of f)try{r.add(parseInt(m.slice(1),16))}catch{}}}};a(e);let s=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,null);for(;s.nextNode();){let l=s.currentNode;if(l.nodeType===Node.TEXT_NODE){if(t&&l.parentElement&&!t(l.parentElement))continue;o(l.nodeValue||"")}else{if(t&&!t(l))continue;a(l)}}return{required:n,usedCodepoints:r}}function Wf(e,t){return Vs(e,t).required}async function zs(e,t=2,n=document){try{await n.fonts.ready}catch{}let r=Array.from(e||[]).filter(Boolean);if(r.length===0)return;let o=()=>{let i=n.createElement("div");i.setAttribute("data-snapdom-internal",""),i.style.cssText="position:absolute!important;left:-9999px!important;top:0!important;opacity:0!important;pointer-events:none!important;contain:layout size style;";for(let a of r){let s=n.createElement("span");s.textContent="AaBbGg1234\xC1\xC9\xCD\xD3\xDA\xE7\xF1\u2014\u221E",s.style.fontFamily=`"${a}"`,s.style.fontWeight="700",s.style.fontStyle="italic",s.style.fontSize="32px",s.style.lineHeight="1",s.style.whiteSpace="nowrap",s.style.margin="0",s.style.padding="0",i.appendChild(s)}n.body.appendChild(i),i.offsetWidth,n.body.removeChild(i)};for(let i=0;i<Math.max(1,t);i++)o(),await tt(),await tt()}function Bf(e){return/\bcounter\s*\(|\bcounters\s*\(/.test(e||"")}function Ka(e,t=!1){let n="",r=Math.max(1,e);for(;r>0;)r--,n=String.fromCharCode(97+r%26)+n,r=Math.floor(r/26);return t?n.toUpperCase():n}function Xa(e,t=!0){let n=[[1e3,"M"],[900,"CM"],[500,"D"],[400,"CD"],[100,"C"],[90,"XC"],[50,"L"],[40,"XL"],[10,"X"],[9,"IX"],[5,"V"],[4,"IV"],[1,"I"]],r=Math.max(1,Math.min(3999,e)),o="";for(let[i,a]of n)for(;r>=i;)o+=a,r-=i;return t?o:o.toLowerCase()}function Ja(e,t){switch((t||"decimal").toLowerCase()){case"decimal":return String(e);case"decimal-leading-zero":{let n=Math.abs(e);return(e<0?"-":"")+(n<10?"0":"")+String(n)}case"lower-alpha":return Ka(e,!1);case"upper-alpha":return Ka(e,!0);case"lower-roman":return Xa(e,!1);case"upper-roman":return Xa(e,!0);default:return String(e)}}function Hf(e){let t=new WeakMap,n=e instanceof Document?e.documentElement:e,r=c=>c&&c.tagName==="LI",o=c=>{let u=0,d=c?.parentElement;if(!d)return 0;for(let f of d.children){if(f===c)break;f.tagName==="LI"&&u++}return u},i=c=>{let u=new Map;for(let[d,f]of c)u.set(d,f.slice());return u},a=(c,u,d)=>{let f=i(c),m;try{m=d.style?.counterReset||getComputedStyle(d).counterReset}catch{}if(m&&m!=="none")for(let y of m.split(",")){let g=y.trim().split(/\s+/),w=g[0],v=Number.isFinite(Number(g[1]))?Number(g[1]):0;if(!w)continue;let b=u.get(w);if(b&&b.length){let S=b.slice();S.push(v),f.set(w,S)}else f.set(w,[v])}let p;try{p=d.style?.counterSet||getComputedStyle(d).counterSet}catch{}if(p&&p!=="none")for(let y of p.split(",")){let g=y.trim().split(/\s+/),w=g[0],v=Number.isFinite(Number(g[1]))?Number(g[1]):0;if(!w)continue;let b=f.get(w)||[];b.length===0&&b.push(0),b[b.length-1]=v,f.set(w,b)}let h;try{h=d.style?.counterIncrement||getComputedStyle(d).counterIncrement}catch{}if(h&&h!=="none")for(let y of h.split(",")){let g=y.trim().split(/\s+/),w=g[0],v=Number.isFinite(Number(g[1]))?Number(g[1]):1;if(!w)continue;let b=f.get(w)||[];b.length===0&&b.push(0),b[b.length-1]+=v,f.set(w,b)}try{if(getComputedStyle(d).display==="list-item"&&r(d)){let y=d.parentElement,g=1;if(y&&y.tagName==="OL"){let v=y.getAttribute("start"),b=Number.isFinite(Number(v))?Number(v):1,S=o(d),x=d.getAttribute("value");g=Number.isFinite(Number(x))?Number(x):b+S}else g=1+o(d);let w=f.get("list-item")||[];w.length===0&&w.push(0),w[w.length-1]=g,f.set("list-item",w)}}catch{}return f},s=(c,u,d)=>{let f=a(d,u,c);t.set(c,f);let m=f;for(let h of c.children)m=s(h,f,m);let p=new Map;for(let[h,y]of d){let g=y.length,w=m.get(h);p.set(h,w&&w.length?w.slice(0,g):y.slice())}for(let[h,y]of m)!p.has(h)&&y.length&&!u.has(h)&&p.set(h,y.slice(0,1));return p},l=new Map;return s(n,l,l),{get(c,u){let d=t.get(c)?.get(u);return d&&d.length?d[d.length-1]:0},getStack(c,u){let d=t.get(c)?.get(u);return d?d.slice():[]}}}function Uf(e,t,n){if(!e||e==="none")return e;try{let r=/\b(counter|counters)\s*\(([^)]+)\)/g;return e.replace(r,(o,i,a)=>{let s=String(a).split(",").map(l=>l.trim());if(i==="counter"){let l=s[0]?.replace(/^["']|["']$/g,""),c=(s[1]||"decimal").toLowerCase(),u=n.get(t,l);return Ja(u,c)}else{let l=s[0]?.replace(/^["']|["']$/g,""),c=s[1]?.replace(/^["']|["']$/g,"")??"",u=(s[2]||"decimal").toLowerCase(),d=n.getStack(t,l);return d.length?d.map(f=>Ja(f,u)).join(c):""}})}catch{return"- "}}rt();var gt=new WeakMap,Qa=1e3;function Vf(e,t){let n=Gs(e);return t?(t.__pseudoPreflightFp!==n&&(t.__pseudoPreflight=ts(e,n),t.__pseudoPreflightFp=n),!!t.__pseudoPreflight):ts(e,n)}function co(e){try{return e&&e.cssRules?e.cssRules:null}catch{return null}}function Gs(e){let t=e.querySelectorAll('style,link[rel~="stylesheet"]'),n=`n:${t.length}|`,r=0;for(let i=0;i<t.length;i++){let a=t[i];if(a.tagName==="STYLE"){let s=a.textContent?a.textContent.length:0;n+=`S${s}|`;let l=a.sheet,c=l?co(l):null;c&&(r+=c.length)}else{let s=a.getAttribute("href")||"",l=a.getAttribute("media")||"all";n+=`L${s}|m:${l}|`;let c=a.sheet,u=c?co(c):null;u&&(r+=u.length)}}let o=e.adoptedStyleSheets;return n+=`ass:${Array.isArray(o)?o.length:0}|tr:${r}`,n}function es(e,t,n){let r=co(e);if(!r)return!1;for(let o=0;o<r.length;o++){if(n.budget<=0)return!1;let i=r[o],a=i&&i.cssText?i.cssText:"";n.budget--;for(let s of t)if(a.includes(s))return!0;if(i&&i.cssRules&&i.cssRules.length)for(let s=0;s<i.cssRules.length&&n.budget>0;s++){let l=i.cssRules[s],c=l&&l.cssText?l.cssText:"";n.budget--;for(let u of t)if(c.includes(u))return!0}if(n.budget<=0)return!1}return!1}function ts(e=document,t=Gs(e)){let n=gt.get(e);if(n&&n.fingerprint===t)return n.result;let r=["::before","::after","::first-letter",":before",":after",":first-letter","counter(","counters(","counter-increment","counter-reset"],o=e.querySelectorAll("style");for(let a=0;a<o.length;a++){let s=o[a].textContent||"";for(let l of r)if(s.includes(l))return gt.set(e,{fingerprint:t,result:!0}),!0}let i=e.adoptedStyleSheets;if(Array.isArray(i)&&i.length){let a={budget:Qa};try{for(let s of i)if(es(s,r,a))return gt.set(e,{fingerprint:t,result:!0}),!0}catch{}}{let a=e.querySelectorAll('style,link[rel~="stylesheet"]'),s={budget:Qa};for(let l=0;l<a.length&&s.budget>0;l++){let c=a[l],u=null;if(c.tagName,u=c.sheet||null,u&&es(u,r,s))return gt.set(e,{fingerprint:t,result:!0}),!0}}return e.querySelector('[style*="counter("], [style*="counters("]')?(gt.set(e,{fingerprint:t,result:!0}),!0):(gt.set(e,{fingerprint:t,result:!1}),!1)}function ns(e){for(let t of["Top","Right","Bottom","Left"]){let n=parseFloat(e[`border${t}Width`])||0,r=e[`border${t}Style`];if(n>0&&r&&r!=="none"&&r!=="hidden")return!0}return!1}function zf(e,t){let n=null,r=()=>{if(!n)try{n=Hf(e)}catch(o){Q(t,"buildCounterContext failed",o),n={get:()=>0,getStack:()=>[]}}return n};return{get(o,i){return r().get(o,i)},getStack(o,i){return r().getStack(o,i)}}}function Gf(e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];if(r==='"')t=!t;else if(r==="/"&&!t)return e.slice(0,n).trim()}return e}function qf(e){if(!e)return"";let t=[],n=/"([^"]*)"/g,r=0,o;for(;o=n.exec(e);){let a=e.slice(r,o.index).trim();a&&t.push(a),t.push(o[1]),r=n.lastIndex}let i=e.slice(r).trim();return i&&t.push(i),t.join("")}function uo(e,t,n){let r=e.parentElement,o=r&&n?n.get(r):null;return o?{get(i,a){let s=t.get(i,a),l=o.get(a);return typeof l=="number"?Math.max(s,l):s},getStack(i,a){let s=t.getStack(i,a);if(!s.length)return s;let l=o.get(a);if(typeof l=="number"){let c=s.slice();return c[c.length-1]=Math.max(c[c.length-1],l),c}return s}}:t}function fo(e,t,n){let r=new Map;function o(c){let u=[];if(!c||c==="none")return u;for(let d of String(c).split(",")){let f=d.trim().split(/\s+/),m=f[0],p=Number.isFinite(Number(f[1]))?Number(f[1]):void 0;m&&u.push({name:m,num:p})}return u}let i=o(t?.counterReset),a=o(t?.counterSet),s=o(t?.counterIncrement);function l(c){if(r.has(c))return r.get(c).slice();let u=n.getStack(e,c);u=u.length?u.slice():[];let d=i.find(p=>p.name===c);if(d){let p=Number.isFinite(d.num)?d.num:0;u=u.length?[...u,p]:[p]}let f=a.find(p=>p.name===c);if(f){let p=Number.isFinite(f.num)?f.num:0;u.length===0&&(u=[0]),u[u.length-1]=p}let m=s.find(p=>p.name===c);if(m){let p=Number.isFinite(m.num)?m.num:1;u.length===0&&(u=[0]),u[u.length-1]+=p}return r.set(c,u.slice()),u}return{get(c,u){let d=l(u);return d.length?d[d.length-1]:0},getStack(c,u){return l(u)},__incs:s}}function jf(e,t,n,r){let o;try{o=J(e,t)}catch{}let i=o?.content;if(!i||i==="none"||i==="normal")return{text:"",incs:[]};i=Gf(i);let a=uo(e,n,r),s=fo(e,o,a),l=Bf(i)?Uf(i,e,s):i;return{text:qf(l),incs:s.__incs||[]}}async function po(e,t,n,r){if(e?.nodeType!==1||t?.nodeType!==1||e.tagName==="TEXTAREA")return;let o=e.ownerDocument||document;if(!Vf(o,n))return;n.__siblingCounters||(n.__siblingCounters=new WeakMap),n.__counterCtx||(n.__counterCtx=zf(e.ownerDocument||document,n));let i=n.__counterCtx;for(let s of["::before","::after","::first-letter"])try{let l=J(e,s);if(!l||l.content==="none"&&l.backgroundImage==="none"&&l.backgroundColor==="transparent"&&!ns(l)&&(!l.transform||l.transform==="none")&&l.display==="inline")continue;if(s==="::first-letter"){let L=J(e),W=(L?.display||"").toLowerCase();if(W.includes("flex")||W.includes("grid"))continue;let B=oe=>l[oe]!==L[oe]&&(parseFloat(l[oe])||0)!==0;if(!(l.color!==L.color||l.fontSize!==L.fontSize||l.fontWeight!==L.fontWeight||l.fontFamily!==L.fontFamily||l.fontStyle!==L.fontStyle||l.textTransform!==L.textTransform||l.float!==L.float&&l.float!=="none"||B("paddingTop")||B("paddingRight")||B("paddingBottom")||B("paddingLeft")||B("marginTop")||B("marginRight")||B("marginBottom")||B("marginLeft")))continue;let Y=Array.from(t.childNodes).find(oe=>oe.nodeType===Node.TEXT_NODE&&oe.textContent?.trim().length>0);if(!Y)continue;let O=Y.textContent,j=O.match(/^([^\p{L}\p{N}\s]*[\p{L}\p{N}](?:['’])?)/u)?.[0],K=O.slice(j?.length||0);if(!j||/[\uD800-\uDFFF]/.test(j))continue;let z=document.createElement("span");z.textContent=j,z.dataset.snapdomPseudo="::first-letter";let Z=Na(l),H=eo(Z,"span");n.styleMap.set(z,H);let re=document.createTextNode(K);t.replaceChild(re,Y),t.insertBefore(z,re);continue}let c=l.content??"",u=c===""||c==="none"||c==="normal",{text:d,incs:f}=jf(e,s,i,n.__siblingCounters),m=l.backgroundImage,p=l.backgroundColor,h=l.fontFamily,y=parseInt(l.fontSize)||32,g=parseInt(l.fontWeight)||!1,w=l.color||"#000",v=l.transform,b=Oe(h),S=!u&&d!=="",x=m&&m!=="none",I=p&&p!=="transparent"&&p!=="rgba(0, 0, 0, 0)",C=ns(l),E=v&&v!=="none",k=c!=="none"&&c!=="normal",T=k&&((parseFloat(l.width)||0)>0||(parseFloat(l.height)||0)>0),F=k&&l.boxShadow&&l.boxShadow!=="none",D=k&&l.outlineStyle&&l.outlineStyle!=="none"&&(parseFloat(l.outlineWidth)||0)>0;if(!(S||x||I||C||E||T||F||D)){if(f&&f.length&&e.parentElement){let L=n.__siblingCounters.get(e.parentElement)||new Map;for(let{name:W}of f){if(!W)continue;let B=uo(e,i,n.__siblingCounters),Y=fo(e,J(e,s),B).get(e,W);L.set(W,Y)}n.__siblingCounters.set(e.parentElement,L)}continue}let R=d.startsWith("url(")||/^-?(?:webkit-)?image-set\(/i.test(d),_=!1;if(S&&!b&&d.length>1&&!R){let L=J(e),W=parseFloat(L.fontSize)||16,B=parseFloat(L.lineHeight);Number.isFinite(B)||(B=W*1.5),e.getBoundingClientRect().height<B*1.6&&(t.style.whiteSpace="nowrap",_=!0)}let N=document.createElement("span");N.dataset.snapdomPseudo=s,N.style.pointerEvents="none",_&&(N.style.whiteSpace="nowrap");let P=Na(l),X=(J(e).display||"").toLowerCase(),U=X.includes("flex")||X.includes("grid");if(U){let L=P["min-width"];(!L||L==="auto"||L==="0px")&&(P["min-width"]="0px")}let G=eo(P,"span",S,U);if(n.styleMap.set(N,G),b&&d&&d.length===1){let{dataUrl:L,width:W,height:B}=await Sf(d,h,g,y,w),Y=document.createElement("img");Y.src=L,Y.style=`height:${y}px;width:${W/B*y}px;object-fit:contain;`,N.appendChild(Y),t.dataset.snapdomHasIcon="true"}else if(d&&R){let L=cs(d,typeof devicePixelRatio<"u"&&devicePixelRatio||1)??wo(d);if(L?.trim())try{let W=await xe(Pn(L),{as:"dataURL",useProxy:r.useProxy});if(W?.ok&&typeof W.data=="string"){let B=document.createElement("img");B.src=W.data,B.style=`width:${y}px;height:auto;object-fit:contain;`,N.appendChild(B)}}catch(W){console.error(`[snapdom] Error in pseudo ${s} for`,e,W)}}else!b&&S&&(N.textContent=d);N.style.backgroundImage="none","maskImage"in N.style&&(N.style.maskImage="none"),"webkitMaskImage"in N.style&&(N.style.webkitMaskImage="none");try{N.style.backgroundRepeat=l.backgroundRepeat,N.style.backgroundSize=l.backgroundSize,l.backgroundPositionX&&l.backgroundPositionY?(N.style.backgroundPositionX=l.backgroundPositionX,N.style.backgroundPositionY=l.backgroundPositionY):N.style.backgroundPosition=l.backgroundPosition,N.style.backgroundOrigin=l.backgroundOrigin,N.style.backgroundClip=l.backgroundClip,N.style.backgroundAttachment=l.backgroundAttachment,N.style.backgroundBlendMode=l.backgroundBlendMode}catch{}if(x)try{let L=to(m),W=await Promise.all(L.map(ds));N.style.backgroundImage=W.join(", ")}catch(L){console.warn(`[snapdom] Failed to inline background-image for ${s}`,L)}I&&(N.style.backgroundColor=p);let ne=N.childNodes.length>0||N.textContent?.trim()!==""||x||I||C||E||T||F||D;if(f&&f.length&&e.parentElement){let L=n.__siblingCounters.get(e.parentElement)||new Map,W=uo(e,i,n.__siblingCounters),B=fo(e,J(e,s),W);for(let{name:Y}of f){if(!Y)continue;let O=B.get(e,Y);L.set(Y,O)}n.__siblingCounters.set(e.parentElement,L)}if(!ne)continue;s==="::before"?(t.dataset.snapdomHasBefore="1",t.insertBefore(N,t.firstChild)):(t.dataset.snapdomHasAfter="1",t.appendChild(N))}catch(l){console.warn(`[snapdom] Failed to capture ${s} for`,e,l)}let a=Array.from(t.children).filter(s=>!s.dataset.snapdomPseudo);if(n.nodeMap)for(let s of a){let l=n.nodeMap.get(s);l?.nodeType===1&&await po(l,s,n,r)}else{let s=Array.from(e.children);for(let l=0;l<Math.min(s.length,a.length);l++)await po(s[l],a[l],n,r)}}function Yf(e,t){if(!e||e?.nodeType!==1)return;let n=e.ownerDocument||document,r=t||n,o=e instanceof SVGSVGElement?[e]:Array.from(e.querySelectorAll("svg"));if(o.length===0)return;let i=/url\(\s*#([^)]+)\)/g,a=["fill","stroke","filter","clip-path","mask","marker","marker-start","marker-mid","marker-end"],s=b=>window.CSS&&CSS.escape?CSS.escape(b):b.replace(/[^a-zA-Z0-9_-]/g,"\\$&"),l="http://www.w3.org/1999/xlink",c=b=>{if(!b||!b.getAttribute)return null;let S=b.getAttribute("href")||b.getAttribute("xlink:href")||(typeof b.getAttributeNS=="function"?b.getAttributeNS(l,"href"):null);if(S)return S;let x=b.attributes;if(!x)return null;for(let I=0;I<x.length;I++){let C=x[I];if(!C||!C.name)continue;if(C.name==="href")return C.value;let E=C.name.indexOf(":");if(E!==-1&&C.name.slice(E+1)==="href")return C.value}return null},u=new Set(Array.from(e.querySelectorAll("[id]")).map(b=>b.id)),d=new Set,f=!1,m=(b,S=null)=>{if(!b)return;i.lastIndex=0;let x;for(;x=i.exec(b);){f=!0;let I=(x[1]||"").trim();I&&(u.has(I)||(d.add(I),S&&!S.has(I)&&S.add(I)))}},p=b=>{let S=b.querySelectorAll("use");for(let C of S){let E=c(C);if(!E||!E.startsWith("#"))continue;f=!0;let k=E.slice(1).trim();k&&!u.has(k)&&d.add(k)}let x='*[style*="url("],*[fill^="url("], *[stroke^="url("],*[filter^="url("],*[clip-path^="url("],*[mask^="url("],*[marker^="url("],*[marker-start^="url("],*[marker-mid^="url("],*[marker-end^="url("]';m(b.getAttribute("style")||"");for(let C of a)m(b.getAttribute(C));let I=b.querySelectorAll(x);for(let C of I){m(C.getAttribute("style")||"");for(let E of a)m(C.getAttribute(E))}};for(let b of o)p(b);if(!f)return;let h=e.querySelector("svg.inline-defs-container");h||(h=n.createElementNS("http://www.w3.org/2000/svg","svg"),h.classList.add("inline-defs-container"),h.setAttribute("aria-hidden","true"),h.setAttribute("style","position:absolute;width:0;height:0;overflow:hidden"),e.insertBefore(h,e.firstChild||null));let y=h.querySelector("defs")||null,g=b=>{if(!b||u.has(b))return null;let S=s(b),x=I=>{let C=r.querySelector(I);return C&&!e.contains(C)?C:null};return x(`svg defs > *#${S}`)||x(`svg > symbol#${S}`)||x(`*#${S}`)};if(!d.size)return;let w=new Set(d),v=new Set;for(;w.size;){let b=w.values().next().value;if(w.delete(b),!b||u.has(b)||v.has(b))continue;let S=g(b);if(!S){v.add(b);continue}y||(y=n.createElementNS("http://www.w3.org/2000/svg","defs"),h.appendChild(y));let x=S.cloneNode(!0);x.id||x.setAttribute("id",b),y.appendChild(x),v.add(b),u.add(b);let I=[x,...x.querySelectorAll("*")];for(let C of I){let E=c(C);if(E&&E.startsWith("#")){let T=E.slice(1).trim();T&&!u.has(T)&&!v.has(T)&&w.add(T)}let k=C.getAttribute?.("style")||"";k&&m(k,w);for(let T of a){let F=C.getAttribute?.(T);F&&m(F,w)}}}}ge();function Zf(e){let t=getComputedStyle(e),n=t.outlineStyle,r=t.outlineWidth,o=t.borderStyle,i=t.borderWidth,a=n!=="none"&&parseFloat(r)>0,s=o==="none"||parseFloat(i)===0;if(a&&s){let l=e.style.border;return e.style.border=`${r} solid transparent`,()=>{e.style.border=l}}return()=>{}}function Kf(e){let t=[];try{let n=e.querySelectorAll("*");for(let r of n){if(!(r instanceof HTMLElement))continue;let o=r.style.contentVisibility||"",i=getComputedStyle(r);(i.contentVisibility||i.getPropertyValue("content-visibility")||"")==="auto"&&(t.push({el:r,original:o}),r.style.contentVisibility="visible")}if(e instanceof HTMLElement){let r=getComputedStyle(e);(r.contentVisibility||r.getPropertyValue("content-visibility")||"")==="auto"&&(t.push({el:e,original:e.style.contentVisibility||""}),e.style.contentVisibility="visible")}}catch{}return()=>{for(let{el:n,original:r}of t)try{n.style.contentVisibility=r}catch{}}}Ee();zn();function Xf(e){return qs(e.boxShadow)}function Jf(e){return qs(e.textShadow)}function qs(e){if(!e||e==="none")return{top:0,right:0,bottom:0,left:0};let t=[],n="",r=0;for(let l=0;l<e.length;l++){let c=e[l];c==="("?r++:c===")"&&(r=Math.max(0,r-1)),c===","&&r===0?(t.push(n),n=""):n+=c}n.trim()&&t.push(n);let o=0,i=0,a=0,s=0;for(let l of t){if(/\binset\b/i.test(l))continue;let c=l.match(/-?\d+(\.\d+)?px/g)?.map(y=>parseFloat(y))||[];if(c.length<2)continue;let[u,d,f=0,m=0]=c,p=Math.abs(u)+f+m,h=Math.abs(d)+f+m;i=Math.max(i,p+Math.max(u,0)),s=Math.max(s,p+Math.max(-u,0)),a=Math.max(a,h+Math.max(d,0)),o=Math.max(o,h+Math.max(-d,0))}return{top:Math.ceil(o),right:Math.ceil(i),bottom:Math.ceil(a),left:Math.ceil(s)}}function Qf(e){let t=e.filter&&e.filter!=="none"?e.filter:e.webkitFilter||"",n=/blur\(\s*([0-9.]+)px\s*\)/gi,r=0,o;for(;o=n.exec(t);)r+=parseFloat(o[1])||0;let i=Math.ceil(r);return{top:i,right:i,bottom:i,left:i}}function ep(e){if((e.outlineStyle||"none")==="none")return{top:0,right:0,bottom:0,left:0};let t=Math.ceil(parseFloat(e.outlineWidth||"0")||0),n=parseFloat(e.outlineOffset||"0")||0,r=t+Math.max(0,Math.ceil(n));return{top:r,right:r,bottom:r,left:r}}function tp(e){let t=`${e.filter||""} ${e.webkitFilter||""}`.trim();if(!t||t==="none")return{bleed:{top:0,right:0,bottom:0,left:0},has:!1};let n=t.match(/drop-shadow\((?:[^()]|\([^()]*\))*\)/gi)||[],r=0,o=0,i=0,a=0,s=!1;for(let l of n){s=!0;let c=l.match(/-?\d+(?:\.\d+)?px/gi)?.map(h=>parseFloat(h))||[],[u=0,d=0,f=0]=c,m=Math.abs(u)+f,p=Math.abs(d)+f;o=Math.max(o,m+Math.max(u,0)),a=Math.max(a,m+Math.max(-u,0)),i=Math.max(i,p+Math.max(d,0)),r=Math.max(r,p+Math.max(-d,0))}return{bleed:{top:$(r),right:$(o),bottom:$(i),left:$(a)},has:s}}function np(e,t){if(!e||!t||!t.style)return null;let n=getComputedStyle(e);try{t.style.transformOrigin="0 0"}catch{}try{"translate"in t.style&&(t.style.translate="none"),"rotate"in t.style&&(t.style.rotate="none")}catch{}let r=n.transform||"none";if(!r||r==="none"){let s=null;try{s=Un(e).scale}catch{}try{t.style.transform="none"}catch{}if(!s)return{a:1,b:0,c:0,d:1};let l=s.trim().split(/\s+/).map(parseFloat),c=Number.isFinite(l[0])?l[0]:1,u=Number.isFinite(l[1])?l[1]:c;return{a:c,b:0,c:0,d:u}}function o(s,l,c,u){let d=Math.sqrt(s*s+l*l)||0,f=0,m=0;if(d>0){let p=s/d,h=l/d;f=p*c+h*u;let y=c-p*f,g=u-h*f;m=Math.sqrt(y*y+g*g)||0,m>0?f=f/m:f=0}return{a:d,b:0,c:f*m,d:m}}let i=r.match(/^matrix\(\s*([^)]+)\)$/i);if(i){let s=i[1].split(",").map(l=>parseFloat(l.trim()));if(s.length===6&&s.every(Number.isFinite)){let[l,c,u,d]=s,f=o(l,c,u,d);try{t.style.transform=`matrix(${f.a}, ${f.b}, ${f.c}, ${f.d}, 0, 0)`}catch{}return f}}let a=r.match(/^matrix3d\(\s*([^)]+)\)$/i);if(a){let s=a[1].split(",").map(l=>parseFloat(l.trim()));if(s.length===16&&s.every(Number.isFinite)){let l=s[0],c=s[1],u=s[4],d=s[5],f=o(l,c,u,d);try{t.style.transform=`matrix(${f.a}, ${f.b}, ${f.c}, ${f.d}, 0, 0)`}catch{}return f}}try{let s=new DOMMatrix(r),l=o(s.a,s.b,s.c,s.d);try{t.style.transform=`matrix(${l.a}, ${l.b}, ${l.c}, ${l.d}, 0, 0)`}catch{}return l}catch{return null}}function On(e,t,n,r,o){let i=n.a,a=n.b,s=n.c,l=n.d,c=n.e||0,u=n.f||0;function d(g,w){let v=g-r,b=w-o,S=i*v+s*b,x=a*v+l*b;return S+=r+c,x+=o+u,[S,x]}let f=[d(0,0),d(e,0),d(0,t),d(e,t)],m=1/0,p=1/0,h=-1/0,y=-1/0;for(let[g,w]of f)g<m&&(m=g),w<p&&(p=w),g>h&&(h=g),w>y&&(y=w);return{minX:m,minY:p,maxX:h,maxY:y,width:h-m,height:y-p}}function mo(e,t,n){let r=(e.transformOrigin||"0 0").trim().split(/\s+/),[o,i]=[r[0]||"0",r[1]||"0"],a=(s,l)=>{let c=s.toLowerCase();return c==="left"||c==="top"?0:c==="center"?l/2:c==="right"||c==="bottom"?l:c.endsWith("px")?parseFloat(c)||0:c.endsWith("%")?(parseFloat(c)||0)*l/100:/^-?\d+(\.\d+)?$/.test(c)&&parseFloat(c)||0};return{ox:a(o,t),oy:a(i,n)}}function Un(e){let t={rotate:"0deg",scale:null,translate:null},n=typeof e.computedStyleMap=="function"?e.computedStyleMap():null;if(n){let o=l=>{try{return typeof n.has=="function"&&!n.has(l)||typeof n.get!="function"?null:n.get(l)}catch{return null}},i=o("rotate");if(i)if(i.angle){let l=i.angle;t.rotate=l.unit==="rad"?l.value*180/Math.PI+"deg":l.value+l.unit}else i.unit?t.rotate=i.unit==="rad"?i.value*180/Math.PI+"deg":i.value+i.unit:t.rotate=String(i);else{let l=getComputedStyle(e);t.rotate=l.rotate&&l.rotate!=="none"?l.rotate:"0deg"}let a=o("scale");if(a){let l="x"in a&&a.x?.value!=null?a.x.value:Array.isArray(a)?a[0]?.value:Number(a)||1,c="y"in a&&a.y?.value!=null?a.y.value:Array.isArray(a)?a[1]?.value:l;t.scale=`${l} ${c}`}else{let l=getComputedStyle(e);t.scale=l.scale&&l.scale!=="none"?l.scale:null}let s=o("translate");if(s){let l="x"in s&&"value"in s.x?s.x.value:Array.isArray(s)?s[0]?.value:0,c="y"in s&&"value"in s.y?s.y.value:Array.isArray(s)?s[1]?.value:0,u="x"in s&&s.x?.unit?s.x.unit:"px",d="y"in s&&s.y?.unit?s.y.unit:"px";t.translate=`${l}${u} ${c}${d}`}else{let l=getComputedStyle(e);t.translate=l.translate&&l.translate!=="none"?l.translate:null}return t}let r=getComputedStyle(e);return t.rotate=r.rotate&&r.rotate!=="none"?r.rotate:"0deg",t.scale=r.scale&&r.scale!=="none"?r.scale:null,t.translate=r.translate&&r.translate!=="none"?r.translate:null,t}var Xr=null;function rp(){if(Xr)return Xr;let e=document.createElement("div");return e.id="snapdom-measure-slot",e.setAttribute("aria-hidden","true"),Object.assign(e.style,{position:"absolute",left:"-99999px",top:"0px",width:"0px",height:"0px",overflow:"hidden",opacity:"0",pointerEvents:"none",contain:"size layout style"}),document.documentElement.appendChild(e),Xr=e,e}function op(e){let t=rp(),n=document.createElement("div");n.style.transformOrigin="0 0",e.baseTransform&&(n.style.transform=e.baseTransform),e.rotate&&(n.style.rotate=e.rotate),e.scale&&(n.style.scale=e.scale),e.translate&&(n.style.translate=e.translate),t.appendChild(n);let r=ap(n);return t.removeChild(n),r}function ip(e){let t=J(e),n=t.transform||"none";if(n!=="none"&&!/^matrix\(\s*1\s*,\s*0\s*,\s*0\s*,\s*1\s*,\s*0\s*,\s*0\s*\)$/i.test(n))return!0;let r=t.rotate&&t.rotate!=="none"&&t.rotate!=="0deg",o=t.scale&&t.scale!=="none"&&t.scale!=="1",i=t.translate&&t.translate!=="none"&&t.translate!=="0px 0px";return!!(r||o||i)}function ap(e){let t=getComputedStyle(e).transform;if(!t||t==="none")return new DOMMatrix;try{return new DOMMatrix(t)}catch{return new WebKitCSSMatrix(t)}}var ho="http://www.w3.org/1999/xhtml",js=new WeakSet;function Ys(e,t){if(!t)return null;let n=e.ownerDocument||document,r=n.defaultView||window,o,i,a,s;if(t==="viewport")o=0,i=0,a=n.documentElement?.clientWidth||r.innerWidth,s=n.documentElement?.clientHeight||r.innerHeight;else if(typeof t=="object")o=(Number(t.x)||0)-(r.scrollX||0),i=(Number(t.y)||0)-(r.scrollY||0),a=Number(t.width),s=Number(t.height);else return null;return a>0&&s>0?{left:o,top:i,width:a,height:s,right:o+a,bottom:i+s}:null}function go(e){if(e.parentElement)return e.parentElement;let t=e.getRootNode&&e.getRootNode();return t instanceof ShadowRoot?t.host:null}function sp(e,t){for(let n=t;n;n=go(n))if(n===e)return!0;return!1}function lp(e,t){for(let n=go(e);n&&n!==t&&n?.nodeType===1;n=go(n)){let r=J(n);if(r.position!=="static"||r.transform&&r.transform!=="none"||r.filter&&r.filter!=="none"||r.backdropFilter&&r.backdropFilter!=="none"||r.perspective&&r.perspective!=="none"||/transform|perspective|filter/.test(r.willChange||"")||/layout|paint|strict|content/.test(r.contain||""))return n}return null}function Zs(e,t){try{let n=new DOMMatrix;if(t&&t.rotate&&t.rotate!=="0deg"&&(n=n.multiply(new DOMMatrix(`rotate(${t.rotate})`))),t&&t.scale){let r=String(t.scale).trim().split(/\s+/).filter(Boolean);r.length&&r.every(o=>Number.isFinite(Number(o)))&&(n=n.multiply(new DOMMatrix(`scale(${r.join(",")})`)))}return e&&(n=n.multiply(new DOMMatrix(e))),n}catch{return null}}function cp(e,t,n,r,o){let i=e.getBoundingClientRect();t?.nodeType===1&&t.namespaceURI===ho&&J(e).position==="static"&&(t.style.position="relative");let a=[];for(let[s,l]of n){if(s?.nodeType!==1||s.namespaceURI!==ho||l?.nodeType!==1||l===e||!sp(e,l))continue;let c=r.get(l)||J(l),u=c.position;if(u!=="fixed"&&u!=="sticky"&&u!=="-webkit-sticky"||s.style.position==="absolute")continue;let d=l.getBoundingClientRect();if(!(d.width>0&&d.height>0))continue;js.add(s);let f=c.transform&&c.transform!=="none"?c.transform:"",m=Un(l),p=!!(f||m.rotate!=="0deg"||m.scale||m.translate),h=p?Zs(f,m):null,y=!h||!h.is2D||h.a===1&&h.b===0&&h.c===0&&h.d===1,g=d.width,w=d.height;y||(g=l.offsetWidth||d.width,w=l.offsetHeight||d.height);let v=l.getRootNode&&l.getRootNode()instanceof ShadowRoot,b=i,S=e.clientLeft||0,x=e.clientTop||0;if(v){let T=lp(l,e);T&&(b=T.getBoundingClientRect(),S=T.clientLeft||0,x=T.clientTop||0)}let I=d.left-b.left-S,C=d.top-b.top-x;if(p)if(s.style.translate="none",s.style.rotate="none",s.style.scale="none",y)s.style.transform="none";else{s.style.transform=`matrix(${h.a},${h.b},${h.c},${h.d},0,0)`;let{ox:T,oy:F}=mo(c,g,w),D=On(g,w,{a:h.a,b:h.b,c:h.c,d:h.d,e:0,f:0},T,F);I-=D.minX,C-=D.minY}if(u!=="fixed"){let T=s.cloneNode(!1);T.setAttribute("data-snap-ph","1"),T.style.position="static",T.style.visibility="hidden",T.style.width=`${g}px`,T.style.height=`${w}px`,T.style.boxSizing="border-box",s.parentElement?.insertBefore(T,s)}let E=g+2,k=w;o&&(Math.abs(C-o.y)<.5&&(C-=1,k+=1),Math.abs(I-o.x)<.5&&(I-=1,E+=1)),s.style.position="absolute",s.style.left=`${I}px`,s.style.top=`${C}px`,s.style.right="auto",s.style.bottom="auto",s.style.margin="0",s.style.width=`${E}px`,s.style.height=`${k}px`,s.style.boxSizing="border-box",v||a.push(s)}for(let s of a)t.appendChild(s)}function up(e,t,n={}){if(!e||!t||!t.style)return;let r=getComputedStyle(e);try{t.style.boxShadow="none"}catch(i){Q(n,"stripRootShadows boxShadow",i)}try{t.style.textShadow="none"}catch(i){Q(n,"stripRootShadows textShadow",i)}try{t.style.outline="none"}catch(i){Q(n,"stripRootShadows outline",i)}let o=(r.filter||"").replace(/\bdrop-shadow\((?:[^()]|\([^()]*\))*\)\s*/gi,"").trim().replace(/\s+/g," ");try{t.style.filter=o.length?o:"none"}catch(i){Q(n,"stripRootShadows filter",i)}}function dp(e,t){if(!e||!t||!t.style)return;let n=1;try{n=parseFloat(getComputedStyle(e).zoom)}catch{return}if(!(!t.style.getPropertyValue("zoom")&&(!Number.isFinite(n)||n===1)))try{t.style.setProperty("zoom","1","important")}catch{}}function rs(e){let t=e.display||"";if(t.includes("flex")||t.includes("grid")||t.startsWith("table")||t==="inline-block"||t==="flow-root"||e.position==="absolute"||e.position==="fixed"||e.float&&e.float!=="none")return!0;let n=e.overflowX||e.overflow||"visible",r=e.overflowY||e.overflow||"visible";return!!(n!=="visible"||r!=="visible"||e.contain&&/\b(layout|content|paint|strict)\b/.test(e.contain))}function fp(e,t){let n=Array.from(e.childNodes),r=t==="top"?n:n.reverse();for(let o of r){if(o.nodeType===Node.TEXT_NODE){if(/\S/.test(o.textContent||""))return null;continue}if(o.nodeType!==Node.ELEMENT_NODE)continue;let i=getComputedStyle(o),a=String(i.display||"");if(!(a==="none"||a==="contents")&&!(i.position==="absolute"||i.position==="fixed"))return i.float&&i.float!=="none"||a.startsWith("inline")?null:o}return null}function pp(e,t,n){if(!e||!t||!t.style)return;let r=getComputedStyle(e);if(!rs(r))for(let o of["top","bottom"]){let i=o==="top"?"Top":"Bottom";if((parseFloat(r[`border${i}Width`])||0)>0||(parseFloat(r[`padding${i}`])||0)>0)continue;let a=e,s=t;for(;a&&s;){let l=fp(a,o);if(!l)break;let c=n?Array.from(s.children).find(f=>n.get(f)===l)||null:s.children[Array.from(a.children).indexOf(l)]||null,u=getComputedStyle(l),d=parseFloat(u[`margin${i}`])||0;if(c&&c.style&&d>0&&(c.style[`margin${i}`]="0px"),rs(u)||(parseFloat(u[`border${i}Width`])||0)>0||(parseFloat(u[`padding${i}`])||0)>0)break;a=l,s=c}}}function mp(e){let t=document.createTreeWalker(e,NodeFilter.SHOW_COMMENT),n=[];for(;t.nextNode();)n.push(t.currentNode);for(let r of n)r.remove()}function hp(e,t={}){let{stripFrameworkDirectives:n=!0}=t,r=new Set(["xml","xlink"]),o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT);for(;o.nextNode();){let i=o.currentNode;for(let a of Array.from(i.attributes)){let s=a.name;if(s.startsWith("*")){i.removeAttribute(s);continue}if(s.includes("@")){i.removeAttribute(s);continue}if(s.includes(":")){let l=s.split(":",1)[0];if(!r.has(l)){i.removeAttribute(s);continue}}if(n&&(s.startsWith("x-")||s.startsWith("v-")||s.startsWith(":")||s.startsWith("on:")||s.startsWith("bind:")||s.startsWith("let:")||s.startsWith("class:"))){i.removeAttribute(s);continue}}}}var os=/[\x00-\x08\x0B\x0C\x0E-\x1F\uFFFE\uFFFF]/g;function gp(e){if(!e)return;let t=o=>{if(o.nodeType===Node.ELEMENT_NODE){if(o.attributes)for(let i of Array.from(o.attributes)){let a=i.value.replace(os,"");if(a!==i.value)try{o.setAttribute(i.name,a)}catch{}}}else if(o.nodeType===Node.TEXT_NODE||o.nodeType===Node.CDATA_SECTION_NODE){let i=o.data.replace(os,"");i!==o.data&&(o.data=i)}};t(e);let n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT),r;for(;r=n.nextNode();)t(r)}function yp(e,t={}){e&&(hp(e,t),mp(e),gp(e))}function bp(e){try{let t=e.getAttribute?.("style")||"";return/\b(height|width|block-size|inline-size)\s*:/.test(t)}catch{return!1}}function wp(e){return e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement||e instanceof HTMLIFrameElement||e instanceof SVGElement||e instanceof HTMLObjectElement||e instanceof HTMLEmbedElement}function vp(e,t){if(e?.nodeType!==1||bp(e)||wp(e))return!1;let n=t.position;if(n==="absolute"||n==="fixed"||n==="sticky")return!1;let r=t.display||"";return!(r.includes("flex")||r.includes("grid")||r.startsWith("table")||t.transform&&t.transform!=="none")}function Sp(e,t,n=new Map){function r(o,i){if(o?.nodeType!==1||i?.nodeType!==1)return;let a=o.childElementCount>i.childElementCount,s=n.get(o)||getComputedStyle(o);if(n.has(o)||n.set(o,s),a&&vp(o,s)){i.style.height||(i.style.height="auto"),i.style.width||(i.style.width="auto"),i.style.removeProperty("block-size"),i.style.removeProperty("inline-size"),i.style.minHeight||(i.style.minHeight="0"),i.style.minWidth||(i.style.minWidth="0"),i.style.maxHeight||(i.style.maxHeight="none"),i.style.maxWidth||(i.style.maxWidth="none");let u=s.overflowY||s.overflowBlock||"visible",d=s.overflowX||s.overflowInline||"visible";(u!=="visible"||d!=="visible")&&(i.style.overflow="visible")}let l=Array.from(o.children),c=Array.from(i.children);for(let u=0;u<Math.min(l.length,c.length);u++)r(l[u],c[u])}r(e,t)}function Cp(e){let t=getComputedStyle(e);return!(t.display==="none"||t.position==="absolute"||t.position==="fixed")}function xp(e,t){if(e?.nodeType!==1)return!1;if(e.getAttribute("data-capture")==="exclude"&&t?.excludeMode==="remove")return!0;if(Array.isArray(t?.exclude))for(let n of t.exclude)try{if(e.matches(n))return t.excludeMode==="remove"}catch(r){Q(t,"exclude selector match failed",r)}if(typeof t?.filter=="function"&&t.filterMode==="remove")try{if(!t.filter(e))return!0}catch(n){Q(t,"filter function failed",n)}return!1}function Ip(e,t){let n=getComputedStyle(e),r=e.getBoundingClientRect(),o=1/0,i=-1/0,a=!1,s=Array.from(e.children);for(let m of s){if(xp(m,t)||!Cp(m))continue;let p=m.getBoundingClientRect(),h=p.top-r.top,y=p.bottom-r.top;y<=h||(h<o&&(o=h),y>i&&(i=y),a=!0)}let l=a?Math.max(0,i-o):0,c=parseFloat(n.borderTopWidth)||0,u=parseFloat(n.borderBottomWidth)||0,d=parseFloat(n.paddingTop)||0,f=parseFloat(n.paddingBottom)||0;return c+u+d+f+l}var $=(e,t=3)=>Number.isFinite(e)?Math.round(e*10**t)/10**t:e,yt=.75;function Ap(e,t,n,r,o,i){let a=e.ownerDocument||document,s=e.getBoundingClientRect(),l=o>0&&s.width>0?s.width/o:1,c=i>0&&s.height>0?s.height/i:1;if(Math.abs(l-c)>.02)return 0;let u=a.createElement("div");u.setAttribute("data-snapdom-internal",""),u.style.cssText="position:absolute!important;left:-9999px!important;top:0!important;width:"+o+"px!important;overflow:visible!important;visibility:hidden!important;";let d=u.attachShadow({mode:"open"}),f=a.createElement("style");f.textContent=n,d.appendChild(f);let m=t.cloneNode(!0);d.appendChild(m),a.body.appendChild(u);let p=0,h=(y,g,w)=>{let v=J(y),b=v.boxSizing==="border-box",S=(x,I,...C)=>{let E=parseFloat(x);if(!Number.isFinite(E))return I;let k=E+(b?0:C.reduce((T,F)=>T+(parseFloat(F)||0),0));return Math.abs(k-I)<=.51?k:I};return{width:S(v.width,g,v.paddingLeft,v.paddingRight,v.borderLeftWidth,v.borderRightWidth),height:S(v.height,w,v.paddingTop,v.paddingBottom,v.borderTopWidth,v.borderBottomWidth)}};try{let y=m.getBoundingClientRect(),g=m.offsetWidth||o,w=m.offsetHeight||i,v=g>0&&y.width>0?y.width/g:1,b=w>0&&y.height>0?y.height/w:1,S=(x,I,C=!1)=>{let E=x.children,k=I.children,T=Math.min(E.length,k.length);for(let F=0;F<T;F++){let D=E[F],R=k[F],_=r.get(D),N=C||js.has(D);if(_?.nodeType===1&&D?.namespaceURI===ho&&D.style&&_.isConnected){let P=_.getBoundingClientRect();if(P.width>0&&P.height>0){let X=R.getBoundingClientRect(),U=P.width/l,G=P.height/c,ne=X.width,L=X.height,W=_.offsetWidth||U,B=_.offsetHeight||G,Y=R.offsetWidth||ne,O=R.offsetHeight||L,j=Math.abs(U-W)>yt||Math.abs(G-B)>yt||Math.abs(ne-Y)>yt||Math.abs(L-O)>yt;if(N){let Z=h(R,Y,O);U=ne>0?U*v*Z.width/ne:U,G=L>0?G*b*Z.height/L:G,ne=Z.width,L=Z.height}else if(j){let Z=h(_,W,B),H=h(R,Y,O);U=Z.width,G=Z.height,ne=H.width,L=H.height}let K=ne-U,z=L-G;(Math.abs(K)>yt||Math.abs(z)>yt)&&(D.style.boxSizing="border-box",D.style.width=`${$(U)}px`,D.style.height=`${$(G)}px`,p++)}}S(D,R,N)}};S(t,m)}finally{u.remove()}return p}var Mp=/::-webkit-scrollbar(-[a-z]+)?\b/i;function yo(e,t=new Set){let n="";if(!e)return n;for(let r=0;r<e.length;r++){let o=e[r];try{if(o.type===CSSRule.IMPORT_RULE&&o.styleSheet){n+=yo(o.styleSheet.cssRules,t);continue}if(o.type===CSSRule.MEDIA_RULE&&o.cssRules){let i=yo(o.cssRules,t);i&&(n+=`@media ${o.conditionText}{${i}}`);continue}if(o.type===CSSRule.STYLE_RULE){let i=o.selectorText||"";if(Mp.test(i)){let a=o.cssText;a&&!t.has(a)&&(t.add(a),n+=a)}}}catch{}}return n}var is=new WeakMap;function Ep(e){let t="";for(let n of e.styleSheets){let r=-1;try{r=n.cssRules?n.cssRules.length:-1}catch{}t+=(n.href||"inline")+":"+r+"|"}return t}function kp(e){if(!e||!e.styleSheets)return"";let t=Ep(e),n=is.get(e);if(n&&n.fp===t)return n.css;let r=new Set,o="";for(let i of Array.from(e.styleSheets))try{let a=i.cssRules;a&&(o+=yo(a,r))}catch{}return is.set(e,{fp:t,css:o}),o}ot();var An=new Set;async function Tp(e,t={}){let n=t.__session||A.session,r={styleMap:n.styleMap,styleCache:n.styleCache,nodeMap:n.nodeMap,options:t},o=null;if(t.clip){let d=Ys(e,t.clip);if(d){r.clip={rect:d,root:e};let f=e.getBoundingClientRect();o={x:d.left-f.left,y:d.top-f.top,width:d.width,height:d.height}}}let i,a="",s="";if(An.size){let d=(f,m)=>{for(let p=m;p;p=p.assignedSlot||p.parentElement||p.getRootNode()?.host)if(p===f)return!0;return!1};for(;;){let f=[...An].filter(({root:m})=>d(m,e)||d(e,m)).map(({promise:m})=>m.catch(()=>{}));if(!f.length)break;await Promise.all(f)}}if(!r.clip&&e.isConnected&&e.ownerDocument?.visibilityState!=="hidden")try{let d=e.getBoundingClientRect(),f=e.ownerDocument?.defaultView||window,m=d.right<=0||d.bottom<=0||d.left>=f.innerWidth||d.top>=f.innerHeight,p=[];if(m&&(()=>{let h=[];e.shadowRoot&&h.push(e.shadowRoot);for(let y of e.querySelectorAll("*"))y.shadowRoot&&h.push(y.shadowRoot);for(;h.length;){let y=h.pop(),g=y.host?.localName==="calcite-icon";for(let w of y.querySelectorAll("*")){if(w.shadowRoot&&h.push(w.shadowRoot),!g||w.localName!=="svg")continue;let v=w.querySelectorAll("path");if(!v.length||[...v].some(S=>S.getAttribute("d")?.trim()))continue;let b=w.getBoundingClientRect();b.width&&b.height&&p.push(w)}}})(),p.length){let h=(async()=>{let g=e.style,w=e.hasAttribute("style"),v=new Map,b=(S,x)=>{v.has(S)||v.set(S,{value:g.getPropertyValue(S),priority:g.getPropertyPriority(S)}),g.setProperty(S,x,"important");let I=v.get(S);I.forcedValue=g.getPropertyValue(S),I.forcedPriority=g.getPropertyPriority(S)};try{b("left","0"),b("top","0"),b("right","auto"),b("bottom","auto"),b("margin-top","0"),b("margin-right","0"),b("margin-bottom","0"),b("margin-left","0"),b("transform","none"),b("translate","none"),b("opacity","0"),b("pointer-events","none");let S=e.getBoundingClientRect();if(S.right<=0||S.bottom<=0||S.left>=f.innerWidth||S.top>=f.innerHeight){let C=e.parentElement?.getBoundingClientRect(),E=C&&C.right>0&&C.left<f.innerWidth?Math.max(0,C.left):0,k=C&&C.bottom>0&&C.top<f.innerHeight?Math.max(0,C.top):0;b("position","fixed"),b("left",`${E}px`),b("top",`${k}px`)}await tt(100);let x=Date.now()+1500,I=()=>p.some(C=>{if([...C.querySelectorAll("path")].some(k=>k.getAttribute("d")?.trim()))return!1;let E=C.getBoundingClientRect();return E.width&&E.height&&E.right>0&&E.bottom>0&&E.left<f.innerWidth&&E.top<f.innerHeight});for(;Date.now()<x&&I();)await new Promise(C=>setTimeout(C,25));await tt(100)}finally{for(let[S,x]of v)g.getPropertyValue(S)!==x.forcedValue||g.getPropertyPriority(S)!==x.forcedPriority||(x.value?g.setProperty(S,x.value,x.priority):g.removeProperty(S));!w&&!g.length&&e.removeAttribute("style"),await tt(100)}})(),y={root:e,promise:h};An.add(y);try{await h}finally{An.delete(y)}}}catch{}let l=Zf(e),c=r.clip?()=>{}:Kf(e);try{i=await Fn(e,r,t)}catch(d){throw console.warn("deepClone failed:",d),d}finally{c(),l()}try{Yf(i)}catch(d){console.warn("inlineExternal defs or symbol failed:",d)}try{await po(e,i,r,t)}catch(d){console.warn("inlinePseudoElements failed:",d)}await tf(i,r);try{let d=i.querySelectorAll("style[data-sd]");for(let f of d)s+=f.textContent||"",f.remove()}catch(d){Q(r,"Failed to extract shadow CSS from style[data-sd]",d)}let u=ju(r.styleMap);a=Array.from(u.entries()).map(([d,f])=>`.${f}{${d}}`).join(""),a=s+"[data-snapdom-has-after]::after,[data-snapdom-has-before]::before{content:none!important;display:none!important}"+a;for(let[d,f]of r.styleMap.entries()){if(d.tagName==="STYLE")continue;if(d.getRootNode&&d.getRootNode()instanceof ShadowRoot){d.setAttribute("style",f.replace(/;/g,"; "));continue}let m=u.get(f);m&&d.classList.add(m);let p=d.style?.backgroundImage,h=d.dataset?.snapdomHasIcon;p&&p!=="none"&&(d.style.backgroundImage=p),h&&(d.style.verticalAlign="middle",d.style.display="inline")}if((r.clip||e.scrollTop||e.scrollLeft)&&i?.nodeType===1)try{let d=r.clip&&o?{x:o.x,y:o.y}:{x:0,y:0};cp(e,i,r.nodeMap,r.styleCache,d)}catch(d){Q(r,"freezeViewportPositioned failed",d)}for(let[d,f]of r.nodeMap.entries()){if(r.clip&&f===e)continue;let m=f.scrollLeft,p=f.scrollTop;if((m||p)&&d?.nodeType===1&&d.namespaceURI==="http://www.w3.org/1999/xhtml"){d.style.overflow="hidden",d.style.scrollbarWidth="none",d.style.msOverflowStyle="none";try{let y=d.querySelectorAll("*");for(let g of y){if(g.nodeType!==1||g.namespaceURI!=="http://www.w3.org/1999/xhtml")continue;let w=g.style.position;if(w==="fixed"||w==="absolute"){let v=parseFloat(g.style.top)||0,b=parseFloat(g.style.left)||0;g.style.top=`${v+p}px`,g.style.left=`${b+m}px`,w==="fixed"&&(g.style.position="absolute")}}}catch{}let h=document.createElement("div");for(h.style.all="unset",h.style.transform=`translate(${-m}px, ${-p}px)`,h.style.willChange="transform",h.style.display="inline-block",h.style.width="100%";d.firstChild;)h.appendChild(d.firstChild);d.appendChild(h)}}if(e===r.nodeMap.get(i)){let d=r.styleCache.get(e)||J(e);r.styleCache.set(e,d);let f=_u(d.transform);i.style.margin="0",i.style.top="auto",i.style.left="auto",i.style.right="auto",i.style.bottom="auto",i.style.animation="none",i.style.transition="none",i.style.willChange="auto",i.style.float="none",i.style.clear="none",i.style.transform=f||""}for(let[d,f]of r.nodeMap.entries())f.tagName==="PRE"&&(d.style.marginTop="0",d.style.marginBlockStart="0");return{clone:i,classCSS:a,styleCache:r.styleCache,nodeMap:r.nodeMap,reconcileRisk:r.reconcileRisk||0,clipWindow:o}}rt();ge();var Ks="http://www.w3.org/1999/xlink";function Rp(e){return e.getAttribute("href")||e.getAttribute("xlink:href")||(typeof e.getAttributeNS=="function"?e.getAttributeNS(Ks,"href"):null)}function Np(e){let t=parseInt(e.dataset?.snapdomWidth||"",10)||0,n=parseInt(e.dataset?.snapdomHeight||"",10)||0,r=parseInt(e.getAttribute("width")||"",10)||0,o=parseInt(e.getAttribute("height")||"",10)||0,i=parseFloat(e.style?.width||"")||0,a=parseFloat(e.style?.height||"")||0,s=t||i||r||e.width||e.naturalWidth||100,l=n||a||o||e.height||e.naturalHeight||100;return{width:s,height:l}}async function Lp(e,t={}){let n=Array.from(e.querySelectorAll("img"));e.tagName==="IMG"&&n.unshift(e);let r=async s=>{if(!s.getAttribute("src")){let p=s.currentSrc||s.src||Bn(s.getAttribute("srcset"),s)||"";p&&s.setAttribute("src",p)}s.removeAttribute("srcset"),s.removeAttribute("sizes");let l=s.src||"";if(!l)return;let c=A.image?.get(l);if(c){s.src=c,s.width||(s.width=s.naturalWidth||100),s.height||(s.height=s.naturalHeight||100);return}let u=await xe(l,{as:"dataURL",useProxy:t.useProxy});if(u.ok&&typeof u.data=="string"&&u.data.startsWith("data:")){A.image?.set(l,u.data),s.src=u.data,s.width||(s.width=s.naturalWidth||100),s.height||(s.height=s.naturalHeight||100);return}let{width:d,height:f}=Np(s),{fallbackURL:m}=t||{};if(m)try{let p=typeof m=="function"?await m({width:d,height:f,src:l,element:s}):m;if(p){let h=await xe(p,{as:"dataURL",useProxy:t.useProxy});if(h?.ok&&typeof h.data=="string"){s.src=h.data,s.width||(s.width=d),s.height||(s.height=f);return}}}catch{}if(t.placeholders!==!1){let p=document.createElement("div");p.style.cssText=[`width:${d}px`,`height:${f}px`,"background:#ccc","display:inline-block","text-align:center",`line-height:${f}px`,"color:#666","font-size:12px","overflow:hidden"].join(";"),p.textContent="img",s.replaceWith(p)}else{let p=document.createElement("div");p.style.cssText=`display:inline-block;width:${d}px;height:${f}px;visibility:hidden;`,s.replaceWith(p)}},o=6;for(let s=0;s<n.length;s+=o){let l=n.slice(s,s+o).map(r);await Promise.allSettled(l)}let i=Array.from(e.querySelectorAll("image"));e.localName==="image"&&i.unshift(e);let a=async s=>{let l=Rp(s);if(!l||l.startsWith("data:")||l.startsWith("blob:"))return;let c=await xe(l,{as:"dataURL",useProxy:t.useProxy});c.ok&&typeof c.data=="string"&&c.data.startsWith("data:")&&(s.setAttribute("href",c.data),s.removeAttribute("xlink:href"),typeof s.removeAttributeNS=="function"&&s.removeAttributeNS(Ks,"href"))};for(let s=0;s<i.length;s+=o){let l=i.slice(s,s+o).map(a);await Promise.allSettled(l)}}Ee();ge();var Fp=["background-image","mask","mask-image","-webkit-mask","-webkit-mask-image","mask-source","mask-box-image-source","mask-border-source","-webkit-mask-box-image-source","border-image","border-image-source"],$p=["mask-position","mask-size","mask-repeat","mask-mode","mask-composite","-webkit-mask-position","-webkit-mask-size","-webkit-mask-repeat","-webkit-mask-composite","mask-origin","mask-clip","-webkit-mask-origin","-webkit-mask-clip","-webkit-mask-position-x","-webkit-mask-position-y"],_p=["background-position","background-position-x","background-position-y","background-size","background-repeat","background-origin","background-clip","background-attachment","background-blend-mode"],Op=["border-image-slice","border-image-width","border-image-outset","border-image-repeat"];async function Pp(e,t,n,r){let o=n.get(e)||J(e);n.has(e)||n.set(e,o);let i=o.getPropertyValue("border-image"),a=o.getPropertyValue("border-image-source"),s=i&&i!=="none"||a&&a!=="none",l=o.getPropertyValue("background-image"),c=o.getPropertyValue("background-color");if(l&&l!=="none"||c&&c!=="rgba(0, 0, 0, 0)"&&c!=="transparent"||/url\s*\(|gradient\s*\(/i.test(o.getPropertyValue("background")||""))for(let u of _p){let d=o.getPropertyValue(u);d&&t.style.setProperty(u,d)}for(let u of Fp){let d=o.getPropertyValue(u);if(u==="background-image"&&(!d||d==="none")){let p=o.getPropertyValue("background");p&&/url\s*\(/.test(p)&&(d=to(p).filter(h=>/url\s*\(/.test(h)).join(", ")||d)}if(!d||d==="none")continue;let f=to(d),m=await Promise.all(f.map(p=>ds(p,r)));m.some(p=>p&&p!=="none"&&!/^url\(undefined/.test(p))&&t.style.setProperty(u,m.join(", "))}for(let u of $p){let d=o.getPropertyValue(u);!d||d==="initial"||t.style.setProperty(u,d)}if(s)for(let u of Op){let d=o.getPropertyValue(u);!d||d==="initial"||t.style.setProperty(u,d)}}async function Dp(e,t,n,r={},o=A.session.nodeMap){if(!t)return;let i=[];e&&Pa(e)&&i.push([e,t]);let a=[t];for(;a.length;){let l=a.pop();if(l.children)for(let c of l.children){if(c.tagName==="STYLE")continue;let u=o.get(c);u&&Pa(u)&&i.push([u,c]),a.push(c)}}let s=6;for(let l=0;l<i.length;l+=s)await Promise.allSettled(i.slice(l,l+s).map(([c,u])=>Pp(c,u,n,r)))}ge();Ee();function Wp(e,t,n=A.session.nodeMap){let r=[],o=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT);for(let s=o.currentNode;s;s=o.nextNode()){let l=n.get(s);if(l?.nodeType!==1)continue;let c=J(l),u=c.getPropertyValue("backdrop-filter")||c.getPropertyValue("-webkit-backdrop-filter");u&&u!=="none"&&s!==t&&r.push({cloneEl:s,orig:l,bf:u,path:Up(t,s)})}if(!r.length)return;let i=e.getBoundingClientRect(),a=r.map((s,l)=>{let c=t.cloneNode(!0);Hp(c,t,s.orig.getBoundingClientRect(),n),Vp(as(c,s.path));for(let u=0;u<l;u++){let d=as(c,r[u].path);d&&(d.style.setProperty("backdrop-filter","none","important"),d.style.setProperty("-webkit-backdrop-filter","none","important"))}return{...s,copy:c}});for(let{cloneEl:s,orig:l,bf:c,copy:u}of a)Bp(s,l,c,u,i)}function Bp(e,t,n,r,o){let i=t.getBoundingClientRect();if(!i.width||!i.height)return;let a=J(t),s=t.offsetWidth?i.width/t.offsetWidth:1,l=Math.abs(s-1)>.001?1/s:1;r.style.position="absolute",r.style.left=`${(o.left-i.left)*l}px`,r.style.top=`${(o.top-i.top)*l}px`,r.style.width=`${o.width}px`,r.style.height=`${o.height}px`,r.style.margin="0",r.style.filter=n,l!==1&&(r.style.transform=`scale(${l})`,r.style.transformOrigin="top left");let c=document.createElement("div");c.style.cssText="position:absolute;inset:0;overflow:hidden;border-radius:inherit;z-index:-2",c.appendChild(r);let u=document.createElement("div");u.style.cssText="position:absolute;inset:0;border-radius:inherit;z-index:-1",u.style.backgroundColor=a.backgroundColor,u.style.backgroundImage=e.style.backgroundImage||a.backgroundImage;for(let d of["background-size","background-position","background-repeat","background-origin","background-clip"])u.style.setProperty(d,a.getPropertyValue(d));e.style.setProperty("background-color","transparent","important"),e.style.setProperty("background-image","none","important"),e.style.setProperty("backdrop-filter","none","important"),e.style.setProperty("-webkit-backdrop-filter","none","important"),a.position==="static"&&(e.style.position="relative"),e.style.isolation="isolate",e.prepend(u),e.prepend(c)}var Mn=128;function Hp(e,t,n,r){let o=[[e,t]];for(;o.length;){let[i,a]=o.pop(),s=r.get(a);if(s?.nodeType===1){let u=s.getBoundingClientRect();(u.left>n.right+Mn||u.right<n.left-Mn||u.top>n.bottom+Mn||u.bottom<n.top-Mn)&&(i.tagName==="IMG"&&i.setAttribute("src","data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="),i.style&&(i.style.backgroundImage="none"))}let l=i.children,c=a.children;for(let u=0;u<l.length;u++)o.push([l[u],c[u]])}}function Up(e,t){let n=[];for(let r=t;r!==e;r=r.parentElement){if(!r?.parentElement)return null;n.push([...r.parentElement.children].indexOf(r))}return n.reverse()}function as(e,t){if(!t)return null;let n=e;for(let r of t)if(n=n.children[r],!n)return null;return n}function Vp(e){if(e)for(let t=e;t&&t.parentNode;){let n=t.parentNode;for(;t.nextSibling;)t.nextSibling.remove();t===e&&t.remove(),t=n}}Ee();ge();function zp(e,t){if(!e)return()=>{};let n=[],r=200;function o(i){if(t){let c=i.getBoundingClientRect();if(c.width>0||c.height>0){let u=Math.max(c.right,c.left+(i.scrollWidth||0)),d=Math.max(c.bottom,c.top+(i.scrollHeight||0));if(u<t.left-r||c.left>t.right+r||d<t.top-r||c.top>t.bottom+r)return}}let a=getComputedStyle(i),s=Gp(i,a);s&&n.push(s);let l=qp(i,a);l&&n.push(l);for(let c of i.children||[])o(c)}return o(e),()=>n.forEach(i=>i())}function Gp(e,t){if(!e)return()=>{};t=t||getComputedStyle(e);let n=jp(t);if(n<=0)return()=>{};if(!Js(e))return()=>{};let r=Xs(e),o=r.text,i=Zp(t);r.write("X");let a=e.scrollHeight-i;r.restore();let s=a>0?a:Yp(t),l=Math.round(s*n+i);if(e.scrollHeight<=l+.5)return()=>{};let c=0,u=o.length,d=-1;for(;c<=u;){let f=c+u>>1;r.write(o.slice(0,f)+"\u2026"),e.scrollHeight<=l+.5?(d=f,c=f+1):u=f-1}return r.write((d>=0?o.slice(0,d):"")+"\u2026"),()=>{r.restore()}}function qp(e,t){if(!e)return()=>{};if(t=t||getComputedStyle(e),t.textOverflow!=="ellipsis")return()=>{};if(t.whiteSpace!=="nowrap"&&t.whiteSpace!=="pre")return()=>{};if(t.overflowX!=="hidden"&&t.overflowX!=="clip")return()=>{};if(!Js(e))return()=>{};if(e.scrollWidth<=e.clientWidth+.5)return()=>{};let n=Xs(e),r=n.text,o=0,i=r.length,a=-1;for(;o<=i;){let s=o+i>>1;n.write(r.slice(0,s)+"\u2026"),e.scrollWidth<=e.clientWidth+.5?(a=s,o=s+1):i=s-1}return n.write((a>=0?r.slice(0,a):"")+"\u2026"),()=>{n.restore()}}function Xs(e){let t=[];for(let r=e.firstChild;r;r=r.nextSibling)r.nodeType===Node.TEXT_NODE&&t.push(r);let n=t.map(r=>r.data);return{text:n.join(""),write(r){t[0].data=r;for(let o=1;o<t.length;o++)t[o].data=""},restore(){for(let r=0;r<t.length;r++)t[r].data=n[r]}}}function jp(e){let t=e.getPropertyValue("-webkit-line-clamp")||e.getPropertyValue("line-clamp");t=(t||"").trim();let n=parseInt(t,10);return Number.isFinite(n)&&n>0?n:0}function Yp(e){let t=(e.lineHeight||"").trim(),n=parseFloat(e.fontSize)||16;return!t||t==="normal"?Math.round(n*1.2):t.endsWith("px")?parseFloat(t):/^\d+(\.\d+)?$/.test(t)?Math.round(parseFloat(t)*n):t.endsWith("%")?Math.round(parseFloat(t)/100*n):Math.round(n*1.2)}function Zp(e){return(parseFloat(e.paddingTop)||0)+(parseFloat(e.paddingBottom)||0)}function Js(e){return e.childElementCount>0?!1:Array.from(e.childNodes).some(t=>t.nodeType===Node.TEXT_NODE)}var Rt=[];function jn(e){if(!e)return null;if(Array.isArray(e)){let[t,n]=e;return typeof t=="function"?t(n):t}if(typeof e=="object"&&"plugin"in e){let{plugin:t,options:n}=e;return typeof t=="function"?t(n):t}return typeof e=="function"?e():e}function Kp(...e){let t=e.flat();for(let n of t){let r=jn(n);r&&(Rt.some(o=>o&&o.name&&r.name&&o.name===r.name)||Rt.push(r))}}function Qs(e){return e&&Array.isArray(e.plugins)?e.plugins:Rt}async function ze(e,t,n){let r=n,o=Qs(t);for(let i of o){let a=i&&typeof i[e]=="function"?i[e]:null;if(!a)continue;let s=await a(t,r);typeof s<"u"&&(r=s)}return r}async function Xp(e,t,n){let r=[],o=Qs(t);for(let i of o){let a=i&&typeof i[e]=="function"?i[e]:null;if(!a)continue;let s=await a(t,n);typeof s<"u"&&r.push(s)}return r}function Jp(e){let t=[];if(Array.isArray(e))for(let n of e){let r=jn(n);if(!r||!r.name)continue;let o=t.findIndex(i=>i&&i.name===r.name);o>=0&&t.splice(o,1),t.push(r)}for(let n of Rt)n&&n.name&&!t.some(r=>r.name===n.name)&&t.push(n);return Object.freeze(t)}function Qp(e,t,n=!1){return!e||e.plugins&&!n||(e.plugins=Jp(t)),e}function el(){return Rt.slice()}ge();var em=.92,tm=.95;async function nm(e){let t=new Image;if(t.decoding="sync",t.src=e,typeof t.decode=="function")try{return await t.decode(),t}catch{}return await new Promise((n,r)=>{t.onload=()=>n(),t.onerror=r}),t}function rm(e){let t=/^data:([^;,]+)/.exec(e);return t?t[1]:""}async function ko(e,t,n){if(typeof e!="string"||!e.startsWith("data:image")||e.startsWith("data:image/svg"))return null;let r=e.length+":"+e.slice(0,64)+e.slice(-64)+":"+Math.round(t)+"x"+Math.round(n);if(A.compress.has(r))return A.compress.get(r);let o=await(async()=>{let i;try{i=await nm(e)}catch{return null}let a=i.naturalWidth||i.width,s=i.naturalHeight||i.height;if(!a||!s)return null;let l=Math.min(1,Math.max(t/a,n/s));if(!(l>0)||l>=.95)return null;let c=l*tm,u=Math.max(1,Math.round(a*c)),d=Math.max(1,Math.round(s*c)),f=document.createElement("canvas");f.width=u,f.height=d;let m=f.getContext("2d");if(!m)return null;m.imageSmoothingEnabled=!0,m.imageSmoothingQuality="high",m.drawImage(i,0,0,u,d);let p=rm(e),h=p==="image/jpeg"?"image/jpeg":p==="image/webp"?"image/webp":"image/png";try{let y=f.toDataURL(h,em);if(typeof y=="string"&&y.startsWith("data:image")&&y.length<e.length)return y}catch{}return null})();return A.compress.set(r,o),o}async function om(e,t){if(!t.compress)return{count:0,before:0,after:0};let n=(t.scale||1)*(t.dpr||1),r=Array.from(e.querySelectorAll("img"));e.tagName==="IMG"&&r.unshift(e);let o=0,i=0,a=0,s=async c=>{let u=c.getAttribute("src")||"";if(!u.startsWith("data:image")||u.startsWith("data:image/svg"))return;let d=parseFloat(c.dataset.snapdomWidth)||parseFloat(c.style.width)||c.width||0,f=parseFloat(c.dataset.snapdomHeight)||parseFloat(c.style.height)||c.height||0;if(!d||!f)return;let m=await ko(u,d*n,f*n);m&&(o++,i+=u.length,a+=m.length,c.setAttribute("src",m))},l=6;for(let c=0;c<r.length;c+=l)await Promise.allSettled(r.slice(c,c+l).map(s));return{count:o,before:i,after:a}}function im(e){let t=e.offsetWidth||e.getBoundingClientRect().width||0,n=e.offsetHeight||e.getBoundingClientRect().height||0;return{w:t,h:n}}async function am(e,t,n=A.session.nodeMap){if(!t.compress)return{count:0};let r=(t.scale||1)*(t.dpr||1),o=[],i=[e,...e.querySelectorAll("*")];for(let c of i){let u=c.style&&c.style.backgroundImage;u&&u.includes("data:image")&&o.push(c)}let a=0,s=async c=>{let u=n.get(c);if(!u||!u.isConnected)return;let d;try{d=getComputedStyle(u)}catch{return}if((d.backgroundRepeat||"repeat").toLowerCase().split(",").some(v=>v.trim()!=="no-repeat"))return;let{w:f,h:m}=im(u);if(!f||!m)return;let p=f*r,h=m*r,y=c.style.backgroundImage,g=[...y.matchAll(/url\((['"]?)(data:image\/[^)'"]+)\1\)/gi)],w=y;for(let v of g){let b=v[2];if(b.startsWith("data:image/svg"))continue;let S=await ko(b,p,h);S&&(w=w.split(b).join(S),a++)}w!==y&&(c.style.backgroundImage=w)},l=6;for(let c=0;c<o.length;c+=l)await Promise.allSettled(o.slice(c,c+l).map(s));return{count:a}}async function sm(e,t){if(!t.compress)return{count:0};let n=(t.scale||1)*(t.dpr||1),r=Array.from(e.querySelectorAll("image"));e.localName==="image"&&r.unshift(e);let o=0,i=async s=>{let l=s.getAttribute("href")||(typeof s.getAttributeNS=="function"?s.getAttributeNS("http://www.w3.org/1999/xlink","href"):null);if(!l||!l.startsWith("data:image")||l.startsWith("data:image/svg"))return;let c=parseFloat(s.getAttribute("width"))||0,u=parseFloat(s.getAttribute("height"))||0;if(!c||!u)return;let d=await ko(l,c*n,u*n);d&&(s.setAttribute("href",d),s.hasAttribute("xlink:href")&&s.setAttribute("xlink:href",d),o++)},a=6;for(let s=0;s<r.length;s+=a)await Promise.allSettled(r.slice(s,s+a).map(i));return{count:o}}async function lm(e,t,n){t.compress&&(await om(e,t),await am(e,t,n),await sm(e,t))}function cm(e){if(Array.isArray(e.plugins)){for(let t of e.plugins)if(jn(t)?.name==="picture-resolver")return!0}return el().some(t=>t?.name==="picture-resolver")}function um(e){let t=Array.isArray(e.plugins)?e.plugins:el(),n=[];for(let r of t){let o=jn(r);o&&typeof o.resolveNode=="function"&&n.push(o.resolveNode.bind(o))}return n.length?n:null}var dm=2e3,fm=3;function pm(e){let t=Date.now(),n=A.burstAdvice.get(e);if(!n||t-n.firstTs>dm){A.burstAdvice.set(e,{count:1,firstTs:t,warned:!1});return}n.count++,n.count>=fm&&!n.warned&&(n.warned=!0,console.warn("[snapdom] Captured this element multiple times. Pass { burst: true } to increase the speed."))}async function mm(e,t){if(!e)throw new Error("Element cannot be null or undefined");$u(t.cache),t.__session={styleMap:A.session.styleMap,styleCache:A.session.styleCache,nodeMap:A.session.nodeMap},t.burst||pm(e),t.__resolveNodeHooks=um(t);let n=t.fast,r=t.outerTransforms!==!1,o=!!t.outerShadows,i=t.clip?Ys(e,t.clip):null,a={element:e,options:t,plugins:t.plugins},s,l,c,u,d,f,m="",p="",h,y,g=null;await ze("beforeSnap",a);let w=null;t.resolvePicturePlaceholders!==!1&&!cm(t)&&(w=await _d(a.element,a.options)),await ze("beforeClone",a);let v=zp(a.element,i);try{({clone:s,classCSS:l,styleCache:c,nodeMap:u,reconcileRisk:d,clipWindow:f}=await Tp(a.element,a.options)),d>0&&!t.reconcile&&!A.warnedReconcile&&(A.warnedReconcile=!0,console.warn("[snapdom] Text in inline/table-cell elements kept its natural width and may re-wrap under font-fallback rasterization. Pass { reconcile: true } for pixel-exact layout (roughly doubles capture time).")),!r&&s&&(g=np(a.element,s)),!o&&s&&up(a.element,s,a.options),s&&(pp(a.element,s,u),dp(a.element,s))}finally{v()}if(a={clone:s,classCSS:l,styleCache:c,nodeMap:u,...a},await ze("afterClone",a),w&&await w(),yp(a.clone),a.options?.excludeMode==="remove"||a.options?.filterMode==="remove")try{Sp(a.element,a.clone,a.styleCache)}catch(T){console.warn("[snapdom] shrink pass failed:",T)}try{await vf(a.clone,a.element,a.nodeMap)}catch{}let b=T=>new Promise((F,D)=>{kn(()=>{Promise.resolve().then(T).then(F,D)},{fast:n})}),S=(async()=>{await Promise.all([b(()=>Lp(a.clone,a.options)),b(()=>Dp(a.element,a.clone,a.styleCache,a.options,a.nodeMap))]);try{Wp(a.element,a.clone,a.nodeMap)}catch(T){console.warn("[snapdom] backdrop-filter emulation failed:",T)}t.compress&&await b(()=>lm(a.clone,a.options,a.nodeMap))})(),x=Promise.resolve();t.embedFonts&&(x=b(async()=>{let T=a.element.ownerDocument||document,F=i?_=>{try{let N=_.getBoundingClientRect();return N.right>=i.left-200&&N.left<=i.right+200&&N.bottom>=i.top-200&&N.top<=i.bottom+200}catch{return!0}}:null,{required:D,usedCodepoints:R}=Vs(a.element,F);if(De()){let _=new Set(Array.from(D).map(N=>String(N).split("__")[0]).filter(Boolean));await zs(_,1,T)}m=await Df({required:D,usedCodepoints:R,preCached:!1,exclude:a.options.excludeFonts,localFonts:a.options.localFonts,useProxy:a.options.useProxy,fontStylesheetDomains:a.options.fontStylesheetDomains,doc:T})})),await Promise.all([S,x]);let I=Gu(a.clone).sort(),C=I.join(",");A.baseStyle.has(C)?p=A.baseStyle.get(C):await new Promise(T=>{kn(()=>{p=qu(I),A.baseStyle.set(C,p),T()},{fast:n})});let E=kp(a.element?.ownerDocument||document);a={fontsCSS:m,baseCSS:p,scrollbarCSS:E,...a},await ze("beforeRender",a),await new Promise(T=>{kn(()=>{let F=J(a.element),D=a.element.getBoundingClientRect(),R=Math.max(1,$(a.element.offsetWidth||parseFloat(F.width)||D.width||1)),_=Math.max(1,$(a.element.offsetHeight||parseFloat(F.height)||D.height||1)),N=a.element.ownerDocument||document;if(!f&&(a.element===N.body||a.element===N.documentElement)&&!N.documentElement.hasAttribute("data-sd-pinned")){let ie=Math.max(a.element.scrollHeight||0,N.documentElement?.scrollHeight||0,N.body?.scrollHeight||0),me=Math.max(a.element.scrollWidth||0,N.documentElement?.scrollWidth||0,N.body?.scrollWidth||0);ie>0&&(_=Math.max(_,$(ie))),me>0&&(R=Math.max(R,$(me)));try{let ue=(a.scrollbarCSS||"").length+(a.baseCSS||"").length+(a.fontsCSS||"").length+(a.classCSS||"").length,ye=A.measureHints.get(a.element);if(ye&&ye.cssLen===ue&&ye.w0===R)ye.csh>0&&(_=Math.max(_,$(ye.csh))),ye.csw>0&&(R=Math.max(R,$(ye.csw)));else{let de=N.createElement("div");de.setAttribute("data-snapdom-internal",""),de.style.cssText="position:absolute!important;left:-9999px!important;top:0!important;width:"+R+"px!important;overflow:visible!important;visibility:hidden!important;";let ke=de.attachShadow({mode:"open"}),Bt=N.createElement("style");Bt.textContent=(a.scrollbarCSS||"")+a.baseCSS+"svg{overflow:visible;} foreignObject{overflow:visible;}"+a.classCSS,ke.appendChild(Bt),ke.appendChild(a.clone.cloneNode(!0)),N.body.appendChild(de);let He=de.scrollHeight,Qn=de.scrollWidth;N.body.removeChild(de),A.measureHints.set(a.element,{cssLen:ue,w0:R,csh:He,csw:Qn}),He>0&&(_=Math.max(_,$(He))),Qn>0&&(R=Math.max(R,$(Qn)))}}catch{}}if(a.options?.excludeMode==="remove"||a.options?.filterMode==="remove"){let ie=Ip(a.element,a.options);Number.isFinite(ie)&&ie>0&&(_=Math.max(1,Math.min(_,$(ie+1))))}if(a.options?.reconcile)try{let ie=(a.scrollbarCSS||"")+a.baseCSS+"svg{overflow:visible;} foreignObject{overflow:visible;}"+a.classCSS;Ap(a.element,a.clone,ie,a.nodeMap,R,_)}catch(ie){console.warn("[snapdom] reconcile pass failed:",ie)}let P=(ie,me=NaN)=>{let ue=typeof ie=="string"?parseFloat(ie):ie;return Number.isFinite(ue)?ue:me},X=P(a.options.width),U=P(a.options.height),G=f?$(f.width):R,ne=f?$(f.height):_,L=G,W=ne,B=Number.isFinite(X),Y=Number.isFinite(U),O=ne>0?G/ne:1;B&&Y?(L=Math.max(1,$(X)),W=Math.max(1,$(U))):B?(L=Math.max(1,$(X)),W=Math.max(1,$(L/(O||1)))):Y&&(W=Math.max(1,$(U)),L=Math.max(1,$(W*(O||1))));let j=0,K=0,z=R,Z=_;if(f){let ie=0,me=0;if(Jr(a.element)){let ue=null;if(!r&&g&&Number.isFinite(g.a))ue={a:g.a,b:g.b||0,c:g.c||0,d:g.d||1,e:0,f:0};else{let ye=Un(a.element),de=Zs(F.transform&&F.transform!=="none"?F.transform:"",ye);de&&de.is2D&&(ue={a:de.a,b:de.b,c:de.c,d:de.d,e:0,f:0})}if(ue&&!(ue.a===1&&ue.b===0&&ue.c===0&&ue.d===1)){let{ox:ye,oy:de}=mo(F,R,_),ke=On(R,_,ue,ye,de);ie=ke.minX,me=ke.minY}}j=$(f.x+ie),K=$(f.y+me),z=$(j+f.width),Z=$(K+f.height)}else if(!r&&g&&Number.isFinite(g.a)){let ie={a:g.a,b:g.b||0,c:g.c||0,d:g.d||1,e:0,f:0},me=On(R,_,ie,0,0);j=$(me.minX),K=$(me.minY),z=$(me.maxX),Z=$(me.maxY)}else if(r&&Jr(a.element)){let ie=F.transform&&F.transform!=="none"?F.transform:"",me=Un(a.element),ue=op({baseTransform:ie,rotate:me.rotate||"0deg",scale:me.scale,translate:me.translate}),{ox:ye,oy:de}=mo(F,R,_),ke=ue.is2D?ue:new DOMMatrix(ue.toString()),Bt={a:ke.a,b:ke.b,c:ke.c,d:ke.d,e:0,f:0},He=On(R,_,Bt,ye,de);j=$(He.minX),K=$(He.minY),z=$(He.maxX),Z=$(He.maxY)}let H=Xf(F),re=Jf(F),oe=Qf(F),le=ep(F),We=tp(F),$t=f?{top:0,right:0,bottom:0,left:0}:o?{top:$(Math.max(H.top,re.top)+oe.top+le.top+We.bleed.top),right:$(Math.max(H.right,re.right)+oe.right+le.right+We.bleed.right),bottom:$(Math.max(H.bottom,re.bottom)+oe.bottom+le.bottom+We.bleed.bottom),left:$(Math.max(H.left,re.left)+oe.left+le.left+We.bleed.left)}:{top:oe.top,right:oe.right,bottom:oe.bottom,left:oe.left};j=$(j-$t.left),K=$(K-$t.top),z=$(z+$t.right),Z=$(Z+$t.bottom);let Do=Math.max(1,$(z-j)),Wo=Math.max(1,$(Z-K)),Nl=B||Y?$(L/G):1,Ll=Y||B?$(W/ne):1,Fl=Math.max(1,$(Do*Nl)),$l=Math.max(1,$(Wo*Ll)),Bo="http://www.w3.org/2000/svg",_l=Jr(a.element)?2:0,at=$(_l+(r?0:1)),_t=Math.ceil(Do+at*2),Ot=Math.ceil(Wo+at*2),Pt=$(-($(j)-at)),Dt=$(-($(K)-at)),Ho=Math.max(0,Pt),Uo=Math.max(0,Dt),Vo=$(_t-Math.min(0,Pt)),zo=$(Ot-Math.min(0,Dt)),Be=document.createElementNS(Bo,"foreignObject");Be.setAttribute("x",String(Math.min(0,Pt))),Be.setAttribute("y",String(Math.min(0,Dt))),Be.setAttribute("width",String(Vo)),Be.setAttribute("height",String(zo)),Be.style.overflow="visible";let Go=document.createElement("style"),Ol="svg{overflow:visible;} foreignObject{overflow:visible;} foreignObject>div{-webkit-text-size-adjust:100%!important;text-size-adjust:100%!important;}";Go.textContent=(a.scrollbarCSS||"")+a.baseCSS+a.fontsCSS+Ol+a.classCSS,Be.appendChild(Go);let Wt=document.createElement("div");Wt.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),Wt.style.cssText=`all:initial;box-sizing:border-box;display:block;overflow:visible;width:${Vo}px;height:${zo}px`+(Ho!==0||Uo!==0?`;padding:${Uo}px 0 0 ${Ho}px !important`:""),Wt.appendChild(a.clone),Be.appendChild(Wt);let Pl=new XMLSerializer().serializeToString(Be),qo=B||Y,Dl=Object.freeze({w0:G,h0:ne,vbW:_t,vbH:Ot,targetW:L,targetH:W,contentX:$(Pt+(f?j:0)),contentY:$(Dt+(f?K:0)),clip:f?Object.freeze({x:$(j),y:$(K),width:G,height:ne}):null});Object.defineProperty(t,"meta",{value:Dl,enumerable:!0,writable:!1,configurable:!0});let Wl=!qo||De()?_t:$(Fl+at*2),Bl=!qo||De()?Ot:$($l+at*2),Hl=parseFloat(J(N.documentElement)?.fontSize)||16;y=`<svg xmlns="${Bo}" width="${Wl}" height="${Bl}" viewBox="0 0 ${_t} ${Ot}" font-size="${Hl}px">`+Pl+"</svg>",h=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(y)}`,a={svgString:y,dataURL:h,...a},T()},{fast:n})}),await ze("afterRender",a);let k=document.getElementById("snapdom-sandbox");return k&&k.style.position==="absolute"&&k.remove(),a.dataURL}function Jr(e){return ip(e)}ge();function hm(e={}){let t=e.format??"png";t==="jpg"&&(t="jpeg");let n=Fu(e.cache);return{debug:e.debug??!1,fast:e.fast??!0,scale:e.scale??1,exclude:e.exclude??[],excludeMode:e.excludeMode??"hide",filter:e.filter??null,filterMode:e.filterMode??"hide",placeholders:e.placeholders!==!1,embedFonts:e.embedFonts??!1,iconFonts:Array.isArray(e.iconFonts)?e.iconFonts:e.iconFonts?[e.iconFonts]:[],localFonts:Array.isArray(e.localFonts)?e.localFonts:[],excludeFonts:e.excludeFonts??void 0,fontStylesheetDomains:Array.isArray(e.fontStylesheetDomains)?e.fontStylesheetDomains:[],fallbackURL:e.fallbackURL??void 0,cache:n,useProxy:typeof e.useProxy=="string"?e.useProxy:"",width:e.width??null,height:e.height??null,format:t,type:e.type??"svg",quality:e.quality??.92,dpr:e.dpr??(window.devicePixelRatio||1),backgroundColor:e.backgroundColor??(["jpeg","webp"].includes(t)?"#ffffff":null),filename:e.filename??"snapDOM",outerTransforms:e.outerTransforms??!0,outerShadows:e.outerShadows??!1,reconcile:e.reconcile??!1,burst:e.burst??!1,invalidate:e.invalidate??!1,clip:e.clip??null,compress:e.compress!==!1,excludeStyleProps:e.excludeStyleProps??null,resolvePicturePlaceholders:e.resolvePicturePlaceholders!==!1,pictureResolver:e.pictureResolver&&typeof e.pictureResolver=="object"?e.pictureResolver:{}}}ot();Is();var ss=new WeakMap;function tl(e,t,n){let r=new Set;if(e instanceof HTMLVideoElement&&r.add(e),e.querySelectorAll)for(let o of e.querySelectorAll("video"))r.add(o);for(let o of t.trackedVideos)r.has(o)||(o.removeEventListener("timeupdate",n),o.removeEventListener("seeked",n),t.trackedVideos.delete(o));for(let o of r)t.trackedVideos.has(o)||(o.addEventListener("timeupdate",n),o.addEventListener("seeked",n),t.trackedVideos.add(o))}function gm(e){let t={dirty:!0,capturing:!1,last:null,inflight:Promise.resolve(),observers:[],trackedVideos:new Set},n=i=>{t.capturing||Fs(i)&&(t.dirty=!0)},r=()=>{t.capturing||(t.dirty=!0)},o=e.ownerDocument||document;try{let i=new MutationObserver(n);i.observe(e,{subtree:!0,childList:!0,attributes:!0,characterData:!0}),t.observers.push(i)}catch{}try{if(o.head){let i=new MutationObserver(n);i.observe(o.head,{subtree:!0,childList:!0,characterData:!0,attributes:!0}),t.observers.push(i)}}catch{}return t.markDirty=n,t.onMediaDirty=r,tl(e,t,r),t}function ls(e){let{burst:t,invalidate:n,...r}=e||{};try{return JSON.stringify(r,Object.keys(r).sort())}catch{return null}}function ym(e,t,n,r){let o=ss.get(e);o||(o=gm(e),o.baselineSignature=ls(t),ss.set(e,o));let i=ls(t),a=i===null||i!==o.baselineSignature,s=async()=>{for(let c of o.observers)o.markDirty(c.takeRecords());if(n.invalidate&&(o.dirty=!0),!a&&!o.dirty&&o.last)return o.last;o.capturing=!0,a||(o.dirty=!1);try{let c=await r();return a||(o.last=c),c}finally{for(let c of o.observers)c.takeRecords();o.capturing=!1,tl(e,o,o.onMediaDirty)}},l=o.inflight.then(s,s);return o.inflight=l.catch(()=>{}),l}Ee();rt();ge();function bm(...e){return Kp(...e),te}var te=Object.assign(vm,{plugins:bm}),bo=Symbol("snapdom.internal"),wm=Symbol("snapdom.internal.silent");async function vm(e,t){if(!e)throw new Error("Element cannot be null or undefined");let n=hm(t);if(Qp(n,t&&t.plugins),De()){if(n.embedFonts===!0)try{let o=Wf(e),i=new Set([...o].map(a=>String(a).split("__")[0]).filter(Boolean));await zs(i,1)}catch{}let r=Array.from(e.querySelectorAll("canvas"));e.tagName==="CANVAS"&&r.unshift(e);for(let o of r)try{let i=o.getContext("2d",{willReadFrequently:!0});i&&i.getImageData(0,0,1,1)}catch(i){Q(t,"safari canvas poke failed",i)}}return n.iconFonts&&n.iconFonts.length>0&&pf(n.iconFonts),n.snap||(n.snap={toPng:(r,o)=>te.toPng(r,o),toSvg:(r,o)=>te.toSvg(r,o)}),n.burst?ym(e,t,n,()=>te.capture(e,n,bo)):te.capture(e,n,bo)}te.capture=async(e,t,n)=>{if(n!==bo)throw new Error("[snapdom.capture] is internal. Use snapdom(...) instead.");t.element=e;let r=await mm(e,t),o={img:async(h,y)=>{let{toImg:g}=await Promise.resolve().then(()=>($a(),ro));return g(r,{...h,...y||{}})},svg:async(h,y)=>{let{toSvg:g}=await Promise.resolve().then(()=>($a(),ro));return g(r,{...h,...y||{}})},canvas:async(h,y)=>{let{toCanvas:g}=await Promise.resolve().then(()=>(Lt(),As));return g(r,{...h,...y||{}})},blob:async(h,y)=>{let{toBlob:g}=await Promise.resolve().then(()=>(Ns(),Ts));return g(r,{...h,...y||{}})},png:async(h,y)=>{let{rasterize:g}=await Promise.resolve().then(()=>(Nn(),Rn));return g(r,{...h,...y||{},format:"png"})},jpeg:async(h,y)=>{let{rasterize:g}=await Promise.resolve().then(()=>(Nn(),Rn));return g(r,{...h,...y||{},format:"jpeg"})},webp:async(h,y)=>{let{rasterize:g}=await Promise.resolve().then(()=>(Nn(),Rn));return g(r,{...h,...y||{},format:"webp"})},download:async(h,y)=>{let{download:g}=await Promise.resolve().then(()=>(cd(),Ls));return g(r,{...h,...y||{}})}},i={};for(let h of["img","svg","canvas","blob","png","jpeg","webp"])i[h]=async y=>o[h](t,{...y||{},[wm]:!0});i.jpg=i.jpeg;let a={...t,export:{url:r},exports:i},s=await Xp("defineExports",a),l=Object.assign({},...s.filter(h=>h&&typeof h=="object").reverse()),c={...o,...l};c.jpeg&&!c.jpg&&(c.jpg=(h,y)=>c.jpeg(h,y));function u(h,y){let g={...t,...y||{}},w=v=>v==="jpeg"||v==="jpg"||v==="webp";return[h,g.format,g.type].map(v=>typeof v=="string"?v.toLowerCase():"").find(w)&&(g.backgroundColor==null||g.backgroundColor==="transparent")&&(g.backgroundColor="#ffffff"),g}let d=!1,f=Promise.resolve();async function m(h,y){let g=Object.freeze(y&&typeof y=="object"?{...y}:{}),w=async()=>{let b=c[h];if(!b)throw new Error(`[snapdom] Unknown export type: ${h}`);let S=u(h,g),x={...t,export:{type:h,options:S,requestedOptions:g,url:r}};await ze("beforeExport",x,{format:h,options:S});let I=await b(x,S);return await ze("afterExport",x,{format:h,options:S,result:I}),d||(d=!0,await ze("afterSnap",t)),I},v=f.then(w);return f=v.catch(()=>{}),v}let p={url:r,toRaw:()=>r,to:(h,y)=>m(h,y),toImg:h=>m("img",h),toSvg:h=>m("svg",h),toCanvas:h=>m("canvas",h),toBlob:h=>m("blob",h),toPng:h=>m("png",h),toJpg:h=>m("jpg",h),toWebp:h=>m("webp",h),download:h=>m("download",h)};Object.defineProperty(p,"meta",{value:t.meta,enumerable:!0,writable:!1,configurable:!1});for(let h of Object.keys(c)){let y="to"+h.charAt(0).toUpperCase()+h.slice(1);p[y]||(p[y]=g=>m(h,g))}return p};te.toRaw=(e,t)=>te(e,t).then(n=>n.toRaw());te.toImg=(e,t)=>te(e,t).then(n=>n.toImg());te.toSvg=(e,t)=>te(e,t).then(n=>n.toSvg());te.toCanvas=(e,t)=>te(e,t).then(n=>n.toCanvas());te.toBlob=(e,t)=>te(e,t).then(n=>n.toBlob());te.toPng=(e,t)=>te(e,{...t,format:"png"}).then(n=>n.toPng());te.toJpg=(e,t)=>te(e,{...t,format:"jpeg"}).then(n=>n.toJpg());te.toWebp=(e,t)=>te(e,{...t,format:"webp"}).then(n=>n.toWebp());te.download=(e,t)=>te(e,t).then(n=>n.download());function nl(e){if(e.dataset.fontProxied||!e.rel||!e.rel.includes("stylesheet"))return!1;let t=e.href||"";try{return new URL(t).origin!==window.location.origin}catch{return!1}}function rl(e){let t=`/__mindstudio_dev__/font-proxy?url=${encodeURIComponent(e.href)}`,n=document.createElement("link");n.rel="stylesheet",n.href=t,n.dataset.fontProxied="true",e.media&&(n.media=e.media),n.onload=()=>{e.remove()},n.onerror=()=>{n.remove()},e.parentNode?.insertBefore(n,e.nextSibling)}function ol(){let e=document.querySelectorAll('link[rel~="stylesheet"]');for(let t of e)nl(t)&&rl(t)}function Sm(){let e=M().fonts;e.observer||(e.observer=new MutationObserver(t=>{for(let n of t)for(let r of n.addedNodes)r instanceof HTMLLinkElement&&nl(r)&&rl(r)}),e.observer.observe(document.documentElement,{childList:!0,subtree:!0}))}function Cm(e){try{let t=new URL(e,window.location.origin);return t.origin===window.location.origin?!1:!!(/\.(css|woff2?|ttf|otf|eot)(\?|$)/i.test(t.pathname)||t.pathname.includes("/css"))}catch{return!1}}function xm(){if(window.fetch.__ms_font_proxied)return;let e=window.fetch;window.fetch=function(t,n){let r=typeof t=="string"?t:t instanceof URL?t.href:t.url||String(t);if(Cm(r)){let o=`/__mindstudio_dev__/font-proxy?url=${encodeURIComponent(r)}`;return e.apply(this,[o,n])}return e.apply(this,[t,n])},window.fetch.__ms_font_proxied=!0}function il(){let e=M().fonts;e.initialized||(e.initialized=!0,xm(),ol(),Sm())}async function al(){ol();try{await document.fonts.ready}catch{}}var sl=2,Im=.92,Am={name:"text-fit",afterClone(e){if(!e.clone)return;let t=e.clone.ownerDocument;if(!t)return;let n=t.createElement("style");n.textContent="* { letter-spacing: -0.03px !important; }",e.clone.prepend(n)}},Mm=["#__mindstudio-cursor","#__mindstudio-cursor-ripple","#__mindstudio-touch-circle"];async function Yn(){let e=M().screenshot;if(e.capturing)throw new Error("Capture already in progress");e.capturing=!0,Oi();try{await al(),console.info("[capture-page] starting snapdom viewport render");let t=performance.now(),r=await(await te(document.body,{embedFonts:!0,exclude:Mm,plugins:[Am],clip:"viewport",scale:sl,dpr:1,backgroundColor:"#ffffff"})).toCanvas();return console.info("[capture-page] snapdom render done",{canvasWidth:r.width,canvasHeight:r.height,ms:Math.round(performance.now()-t)}),{blob:await new Promise((i,a)=>{r.toBlob(s=>s?i(s):a(new Error("Canvas export produced no image")),"image/jpeg",Im)}),width:r.width,height:r.height,scale:sl}}finally{e.capturing=!1,Pi()}}var Ft="mindstudio-browser-agent";function ll(){let e=M(),t=new URLSearchParams(window.location.search);e.zoom.pipMode=t.get("display-mode")==="pip",e.zoom.mobilePreview=t.get("preview")==="mobile"||window.innerWidth<768;try{let n=sessionStorage.getItem("__ms_pip");n==="1"?e.zoom.pipMode=!0:n==="0"&&(e.zoom.pipMode=!1);let r=sessionStorage.getItem("__ms_mobile");r==="1"?e.zoom.mobilePreview=!0:r==="0"&&(e.zoom.mobilePreview=!1)}catch{}e.messages.handler||(e.messages.handler=async n=>{if(n.source===window)return;let r=n.data;if(!(!r||typeof r.command!="string")&&r.channel===Ft)switch(r.command){case"capture-page":{console.info("[capture-page] request received");try{let o=await Yn();console.info("[capture-page] capture complete",{width:o.width,height:o.height,scale:o.scale,blobBytes:o.blob.size}),window.parent.postMessage({channel:Ft,command:"capture-page-result",...o},"*"),console.info("[capture-page] result posted to parent")}catch(o){console.error("[capture-page] capture failed",o),window.parent.postMessage({channel:Ft,command:"capture-page-result",error:o instanceof Error?o.message:"Capture failed"},"*")}break}case"cursor-show":Jt("visible");break;case"cursor-hide":Jt("hidden");break;case"cursor-auto":Jt(null);break;case"navigate":typeof r.url=="string"&&(window.history.pushState(null,"",r.url),window.dispatchEvent(new PopStateEvent("popstate")));break;case"back":window.history.back();break;case"forward":window.history.forward();break;case"healthcheck":{let o=M().ws;window.parent.postMessage({channel:Ft,command:"healthcheck-reply",wsConnected:!!(o.ws&&o.ws.readyState===WebSocket.OPEN),url:location.href},"*");break}case"display-mode-pip":e.zoom.pipMode=!0;try{sessionStorage.setItem("__ms_pip","1")}catch{}break;case"display-mode-full":e.zoom.pipMode=!1;try{sessionStorage.setItem("__ms_pip","0")}catch{}break;case"preview-mode-mobile":e.zoom.mobilePreview=!0;try{sessionStorage.setItem("__ms_mobile","1")}catch{}mr(),Sr(!0);break;case"preview-mode-desktop":e.zoom.mobilePreview=!1;try{sessionStorage.setItem("__ms_mobile","0")}catch{}xi(),Sr(!1);break}},window.addEventListener("keyup",n=>{n.code==="Backquote"&&window.parent!==window&&window.parent.postMessage({channel:Ft,command:"ptt-keyup"},"*")}),window.addEventListener("message",e.messages.handler))}var Em="mindstudio-browser-agent";function cl(){if(window.__ms_nav_patched)return;window.__ms_nav_patched=!0;let e=()=>{let r=location.pathname+location.search+location.hash,o=M();if(r!==o.nav.lastUrl&&(o.nav.lastUrl=r,window.parent!==window)){let i=window.navigation;window.parent.postMessage({channel:Em,command:"location",url:r,canGoBack:i?!!i.canGoBack:void 0,canGoForward:i?!!i.canGoForward:void 0},"*")}},t=history.pushState.bind(history);history.pushState=function(...r){t(...r),e()};let n=history.replaceState.bind(history);history.replaceState=function(...r){n(...r),e()},window.addEventListener("popstate",e),window.addEventListener("hashchange",e),e()}var ul=16,km=3e4,dl="__ms_mirror";function Tm(){let e=new URLSearchParams(window.location.search);if(e.get("mirror")==="true"){e.delete("mirror");let t=e.toString(),n=window.location.pathname+(t?"?"+t:"")+window.location.hash;window.history.replaceState(null,"",n);try{sessionStorage.setItem(dl,"1")}catch{}return!0}try{return sessionStorage.getItem(dl)==="1"}catch{return!1}}async function fl(){if(window.parent!==window||!Tm())return;let e=M().mirror;if(e.recording)return;let t=[],n=null;function r(){if(n=null,t.length===0)return;let a=Sn();if(!a){n=setTimeout(r,ul);return}let s=t;t=[],a.send(JSON.stringify({type:"mirror",events:s}))}function o(a){t.push(a),n||(n=setTimeout(r,ul))}document.readyState!=="complete"&&await new Promise(a=>window.addEventListener("load",()=>a(),{once:!0})),await new Promise(a=>setTimeout(a,500));let i=_e({emit:o,collectFonts:!0,checkoutEveryNms:km});i&&(e.recording=!0,e.stopFn=()=>{i(),n&&(clearTimeout(n),n=null),r(),e.recording=!1,e.stopFn=null})}var Rm='input[type="email"], input[autocomplete="email"]',Nm='input[type="tel"], input[autocomplete="tel"]',Lm='input[autocomplete="one-time-code"]',Fm=/e[-_ ]?mail/i,$m=/phone|mobile|\btel\b/i,_m=/\b(otp|code|verification|verify|2fa|one[-_ ]?time)\b/i;function Zn(e){let t=e.getBoundingClientRect();if(t.width===0||t.height===0)return!1;let n=getComputedStyle(e);return!(n.display==="none"||n.visibility==="hidden")}function To(e){let t=document.querySelectorAll(e);for(let n of t)if(Zn(n))return n;return null}function Om(e){let t=e.getAttribute("aria-labelledby"),n=t?document.getElementById(t):null;return[e.name,e.id,e.placeholder,e.getAttribute("aria-label"),n?.textContent].filter(Boolean).join(" ")}function Ro(e,t){let n=document.querySelectorAll('input[type="text"], input:not([type])');for(let r of n)if(t(r)&&e.test(Om(r))&&Zn(r))return r;return null}function Pm(e){if(e.inputMode==="numeric"){let n=e.maxLength;if(n>=4&&n<=8)return!0}let t=e.getAttribute("pattern")??"";return!!(/0-9/.test(t)&&e.maxLength>=4&&e.maxLength<=8)}function Dm(e){if(e.maxLength!==1)return!1;let t=(e.getAttribute("type")||"text").toLowerCase();return t==="text"||t==="tel"||t==="number"}function Wm(){let e=Array.from(document.querySelectorAll("input")).filter(t=>Dm(t)&&Zn(t));return e.length<4||e.length>8?null:(e.sort((t,n)=>{let r=t.getBoundingClientRect(),o=n.getBoundingClientRect();return Math.abs(r.top-o.top)>8?r.top-o.top:r.left-o.left}),e)}function Bm(){let e=To(Lm),t=e&&e.maxLength!==1?e:null;if(!t){let n=document.querySelectorAll('input[inputmode="numeric"], input[type="text"]');for(let r of n)if(Pm(r)&&Zn(r)){t=r;break}}return t||(t=Ro(_m,n=>n.maxLength<=8&&n.maxLength!==1)),t}function pl(){let e=To(Rm),t=e?"email":null;e||(e=To(Nm),t=e?"phone":null),e||(e=Ro(Fm,()=>!0),e&&(t="email")),e||(e=Ro($m,()=>!0),e&&(t="phone"));let n=Wm(),r=n?{cells:n,segmented:!0}:null;if(!r){let o=Bm();o&&(r={cells:[o],segmented:!1})}return{identifier:e,identifierKind:t,code:r}}var ml=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value")?.set;function hl(e,t){ml?ml.call(e,t):e.value=t}function Kn(e,t,n){let r;try{r=new InputEvent(t,{bubbles:!0,cancelable:t==="beforeinput",inputType:"insertText",data:n})}catch{r=new Event(t,{bubbles:!0})}e.dispatchEvent(r)}function Hm(e,t){let n={key:t,code:/^[0-9]$/.test(t)?`Digit${t}`:t,bubbles:!0,cancelable:!0};e.dispatchEvent(new KeyboardEvent("keydown",n)),e.dispatchEvent(new KeyboardEvent("keyup",n))}function gl(e,t){e.focus(),hl(e,t),Kn(e,"beforeinput",t),Kn(e,"input",t),e.dispatchEvent(new Event("change",{bubbles:!0}))}function yl(e){let t=e.closest("form");if(t&&typeof t.requestSubmit=="function")try{t.requestSubmit();return}catch{}let n={key:"Enter",code:"Enter",keyCode:13,which:13,bubbles:!0,cancelable:!0};e.dispatchEvent(new KeyboardEvent("keydown",n)),e.dispatchEvent(new KeyboardEvent("keypress",n)),e.dispatchEvent(new KeyboardEvent("keyup",n))}function bl(e,t){gl(e,t),yl(e)}function Xn(e,t){return e.segmented?e.cells.forEach((n,r)=>{let o=t[r]??"";n.focus(),hl(n,o),Kn(n,"beforeinput",o),Kn(n,"input",o),n.dispatchEvent(new Event("change",{bubbles:!0})),o&&Hm(n,o)}):gl(e.cells[0],t),Lo(e),No(e)}function No(e){return e.cells.map(t=>t.value).join("")}function Lo(e){let t=e.cells[e.cells.length-1]??e.cells[0];t&&yl(t)}var Um="__mindstudio-auth-creds-host",Vm="remy@mindstudio.ai",zm="+15555555555",it="123456";function Fo(e){M().authCredsWidget.host||Gm(),qm(e)}function wl(){let e=M().authCredsWidget;e.host&&(e.host.remove(),e.host=null)}function Gm(){let e=M().authCredsWidget,t=document.createElement("div");t.id=Um,t.style.cssText="position: fixed; right: 16px; bottom: 16px; z-index: 2147483640; pointer-events: none;";let n=t.attachShadow({mode:"open"}),r=document.createElement("style");r.textContent=`
|
|
242
82
|
.card {
|
|
243
83
|
pointer-events: auto;
|
|
244
84
|
width: 280px;
|
|
@@ -326,9 +166,9 @@ ${g}
|
|
|
326
166
|
@keyframes __ms_auth_spin {
|
|
327
167
|
to { transform: rotate(360deg); }
|
|
328
168
|
}
|
|
329
|
-
`,n.appendChild(r);let o=document.createElement("div");o.className="card",n.appendChild(o),document.body.appendChild(t),e.host=t}function
|
|
330
|
-
`)+"(empty page)";
|
|
331
|
-
`).trimEnd()}function
|
|
169
|
+
`,n.appendChild(r);let o=document.createElement("div");o.className="card",n.appendChild(o),document.body.appendChild(t),e.host=t}function qm(e){let t=M().authCredsWidget;if(!t.host)return;let n=t.host.shadowRoot;if(!n)return;let r=n.querySelector(".card");if(!r||e.loading&&r.querySelector(".loading"))return;r.innerHTML="";let o=document.createElement("div");o.className="header";let i=document.createElement("span");i.className="title",i.textContent="Dev mode";let a=document.createElement("button");if(a.className="dismiss",a.setAttribute("aria-label","Dismiss"),a.title="Dismiss",a.textContent="\xD7",a.addEventListener("click",e.onDismiss),o.appendChild(i),o.appendChild(a),r.appendChild(o),e.loading){let c=document.createElement("div");c.className="loading";let u=document.createElement("span");u.className="spinner";let d=document.createElement("span");d.textContent="Signing in\u2026",c.appendChild(u),c.appendChild(d),r.appendChild(c);return}let s=document.createElement("p");s.className="body",s.textContent="Use your own credentials, or use these test credentials to bypass verification.",r.appendChild(s);let l=document.createElement("div");if(l.className="actions",r.appendChild(l),e.identifier&&e.identifierKind){let c=e.identifierKind==="email"?Vm:zm,u=document.createElement("button");u.className="primary",u.textContent=`Continue with ${c}`,u.title=`Continue with ${c}`,u.addEventListener("click",()=>{e.identifier&&(bl(e.identifier,c),e.onIdentifierFilled())}),l.appendChild(u)}if(e.code){let c=document.createElement("button");c.className="primary",c.textContent=`Continue with ${it}`,c.title=`Continue with ${it}`,c.addEventListener("click",()=>{e.code&&Xn(e.code,it)}),l.appendChild(c)}}var vl="__ms_dev_creds_dismissed",jm=150,Ym=8e3,Zm=250,Km=8,Xm=6,Jm=200,Qm=1e4;function Sl(){let e=M();e.authCredsWidget||(e.authCredsWidget={initialized:!1,host:null,observer:null,debounceTimer:null,awaitingCode:!1,awaitingCodeTimer:null,codePollTimer:null,codeAttempts:0,codeSubmitted:!1,codeSeenCount:0,blankPolls:0});let t=e.authCredsWidget;if(t.initialized||(t.initialized=!0,jr()))return;let n=qr();n!=="iframe"&&n!=="standalone"||Cl(Date.now()+Qm)}function Cl(e){if(typeof window.__MINDSTUDIO__?.releaseId!="string"){Date.now()<e&&setTimeout(()=>Cl(e),Jm);return}let n=M().authCredsWidget;if(n.observer)return;let r=new MutationObserver($o);r.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["type","autocomplete","inputmode","maxlength","style","hidden","class"]}),n.observer=r,$o()}function $o(){let e=M().authCredsWidget;e.debounceTimer&&clearTimeout(e.debounceTimer),e.debounceTimer=setTimeout(()=>{e.debounceTimer=null,xl()},jm)}function xl(){let e=M().authCredsWidget;if(th()){Jn(),Oo();return}let t=pl();if(!t.identifier&&!t.code){if(e.awaitingCode&&!e.codeSubmitted&&e.blankPolls<Xm){e.blankPolls++,_o();return}Jn(),Oo();return}if(e.blankPolls=0,e.awaitingCode){if(t.code&&!e.codeSubmitted)if(No(t.code)===it)Lo(t.code),e.codeSubmitted=!0;else{let r=t.code.cells.length,o=!t.code.segmented||r===e.codeSeenCount;e.codeSeenCount=r,o&&e.codeAttempts<Km&&(e.codeAttempts++,Xn(t.code,it)===it&&(e.codeSubmitted=!0))}else t.code||(e.codeSeenCount=0);_o();return}Fo({identifier:t.identifier,identifierKind:t.identifierKind,code:eh(t.code),loading:!1,onDismiss:Al,onIdentifierFilled:Il})}function eh(e){return e&&e.cells.some(t=>!t.disabled)?e:null}function _o(){Fo({identifier:null,identifierKind:null,code:null,loading:!0,onDismiss:Al,onIdentifierFilled:Il})}function Il(){let e=M().authCredsWidget;e.awaitingCode=!0,e.codeAttempts=0,e.codeSubmitted=!1,e.codeSeenCount=0,e.blankPolls=0,e.awaitingCodeTimer&&clearTimeout(e.awaitingCodeTimer),e.awaitingCodeTimer=setTimeout(()=>{Jn(),$o()},Ym),e.codePollTimer&&clearInterval(e.codePollTimer),e.codePollTimer=setInterval(xl,Zm),_o()}function Jn(){let e=M().authCredsWidget;e.awaitingCode=!1,e.codeAttempts=0,e.codeSubmitted=!1,e.codeSeenCount=0,e.blankPolls=0,e.awaitingCodeTimer&&(clearTimeout(e.awaitingCodeTimer),e.awaitingCodeTimer=null),e.codePollTimer&&(clearInterval(e.codePollTimer),e.codePollTimer=null)}function Oo(){wl()}function Al(){Jn();try{sessionStorage.setItem(vl,"1")}catch{}Oo()}function th(){try{return sessionStorage.getItem(vl)==="1"}catch{return!1}}var nh=new Set(["__mindstudio-browser-agent","__mindstudio-cursor","__mindstudio-cursor-ripple","__mindstudio-notes-overlay","__mindstudio-notes-cursor"]),rh=["backgroundColor","backgroundImage","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","boxShadow"],Ml=60,oh=80;function El(){let e=window.innerWidth,t=window.innerHeight,n=window.scrollY,r=document.documentElement.scrollHeight,o=[];o.push(`viewport: ${e} \xD7 ${t}`),o.push(`scroll: ${Math.round(n)} / ${r} (${n<10?"top":n+t>=r-10?"bottom":Math.round(n/(r-t)*100)+"%"})`),o.push("");let i=[],a=document.body;if(!a)return o.join(`
|
|
170
|
+
`)+"(empty page)";kl(a,i,e,t,n);let s=ph(i);for(let u of s)if("count"in u){let d=u;o.push(`[${d.count} ${d.role}, each ~${d.avgWidth} \xD7 ${d.avgHeight}, first: "${d.firstName}", last: "${d.lastName}"]`),o.push("")}else ch(u,o,e,t,n);let l=fh(i);if(l.length>0){for(let u of l)o.push(`\xD7 ${u.a} overlaps ${u.b} by ${u.overlapPx}px ${u.axis}ly`);o.push("")}let c=i.filter(u=>{let d=u.rect;return d.right<0||d.left>e||d.bottom<-n||d.top>t+n});for(let u of c){let d=u.rect,f="";d.right<0?f=`left: ${Math.round(d.left)}px`:d.left>e?f=`left: ${Math.round(d.left)}px`:d.bottom<0?f=`top: ${Math.round(d.top)}px`:f=`top: ${Math.round(d.top)}px`,o.push(`\xD7 ${u.label} \u2014 off-viewport (${f})`)}return o.join(`
|
|
171
|
+
`).trimEnd()}function kl(e,t,n,r,o){if(ih(e)||t.length>=oh)return;let i=e.tagName.toLowerCase(),a=Ie(e),s=Tl(e),l=a!==null,c=i==="img"||i==="svg"||i==="canvas"||i==="video",u=i==="input"||i==="textarea"||i==="select",d=l||c||u;if(!d&&ah(e)&&(d=!0),d&&!s&&!c&&!u&&sh(a)&&(d=!1),d){let f=e.getBoundingClientRect();if(f.width>0&&f.height>0)try{let m=getComputedStyle(e),p=lh(e,a,i);t.push({label:p,rect:f,style:m,el:e,tag:i})}catch{}}for(let f of Array.from(e.children))kl(f,t,n,r,o)}function ih(e){if(nh.has(e.id))return!0;let t=e.tagName.toLowerCase();if(t==="script"||t==="style"||t==="noscript"||t==="template"||t==="head"||e.getAttribute("aria-hidden")==="true")return!0;try{let n=getComputedStyle(e);if(n.display==="none"||n.visibility==="hidden")return!0}catch{}return!1}function Tl(e){for(let t of Array.from(e.childNodes))if(t.nodeType===Node.TEXT_NODE&&(t.textContent||"").trim())return!0;return!1}function ah(e){try{let t=getComputedStyle(e);for(let n of rh){let r=t[n];if(!(!r||r==="none"||r==="0px"||r==="rgba(0, 0, 0, 0)"||r==="transparent"))return!0}}catch{}return!1}function sh(e){return e==="navigation"||e==="main"||e==="banner"||e==="contentinfo"||e==="complementary"||e==="region"||e==="form"||e==="list"||e==="table"||e==="article"||e==="group"}function lh(e,t,n){let r=Te(e),o=r.length>Ml?r.slice(0,Ml-1)+"\u2026":r;if(t&&o)return`${t} "${o}"`;if(t)return t;if(o)return`${n} "${o}"`;if(e.id)return`${n}#${e.id}`;let i=e.className&&typeof e.className=="string"?e.className.split(/\s+/).find(a=>!a.startsWith("sc-")&&!a.startsWith("css-")&&a.length<30):null;return i?`${n}.${i}`:n}function ch(e,t,n,r,o){let{label:i,rect:a,style:s,el:l,tag:c}=e,u=Math.round(a.width),d=Math.round(a.height),f=Math.round(a.left),m=Math.round(a.top+o),p=[],h=Tl(l)||c==="input"||c==="textarea";if(h){p.push(s.fontSize);let v=mh(s.fontFamily);v&&p.push(`"${v}"`);let b=s.fontWeight;b!=="400"&&b!=="normal"&&p.push(b),p.push(Po(s.color));let S=Po(s.backgroundColor);S&&S!=="transparent"&&p.push(`on ${S}`)}else if(!(c==="img"||c==="svg"||c==="canvas"||c==="video")){let v=Po(s.backgroundColor);v&&v!=="transparent"&&p.push(`bg: ${v}`)}let y=p.length>0?` \u2014 ${p.join(" ")}`:"";t.push(`${i}${y}`);let g=[];if(g.push(`${u} \xD7 ${d}`),g.push(`at (${f}, ${m})`),g.push(`${(u/n*100).toFixed(1)}% vw`),(c==="img"||c==="svg"||c==="canvas"||c==="video")&&u>0&&d>0){let v=hh(u,d);g.push(`aspect: ${v}`)}if(h){let v=uh(l,s);v&&(g.push(`${v.lines} line${v.lines!==1?"s":""}`),v.capacity!==null&&g.push(`(line-height: ${v.lineHeight}, capacity: ${v.capacity.toFixed(1)})`))}t.push(` ${g.join(", ")}`);let w=dh(l);w&&t.push(` ${w}`),t.push("")}function uh(e,t){let n=Rl(e);if(!n||!n.textContent?.trim())return null;try{let r=document.createRange();r.selectNodeContents(n.parentElement||e);let o=r.getClientRects();if(o.length===0)return null;let i=o.length,a=t.lineHeight,s=parseFloat(a),l=null;return!isNaN(s)&&s>0&&(l=e.clientHeight/s),{lines:i,lineHeight:isNaN(s)?a:`${Math.round(s)}px`,capacity:l}}catch{return null}}function Rl(e){for(let t of Array.from(e.childNodes)){if(t.nodeType===Node.TEXT_NODE&&(t.textContent||"").trim())return t;if(t.nodeType===Node.ELEMENT_NODE){let n=Rl(t);if(n)return n}}return null}function dh(e){let t=e,n=t.scrollWidth,r=t.scrollHeight,o=t.clientWidth,i=t.clientHeight;if(n<=o&&r<=i)return null;let a=getComputedStyle(e),s=a.overflowX,l=a.overflowY,c=a.textOverflow,u=[];if(n>o){let d=Math.round((n-o)/n*100),f=c==="ellipsis"?"ellipsis":s==="hidden"?"hidden":"scroll";u.push(`container: ${o}px, content: ${n}px wide, overflow: ${f} (${d}% hidden)`)}if(r>i&&l!=="visible"){let d=Math.round((r-i)/r*100),f=l==="hidden"?"hidden":"scroll";u.push(`container: ${i}px, content: ${r}px tall, overflow: ${f} (${d}% hidden)`)}return u.length>0?u.join("; "):null}function fh(e){let t=[],n=new Map;for(let r of e){let o=r.el.parentElement,i=n.get(o)||[];i.push(r),n.set(o,i)}for(let r of n.values())if(!(r.length<2))for(let o=0;o<r.length;o++)for(let i=o+1;i<r.length;i++){let a=r[o].rect,s=r[i].rect,l=Math.min(a.bottom,s.bottom)-Math.max(a.top,s.top),c=Math.min(a.right,s.right)-Math.max(a.left,s.left);if(l>2&&c>2){let u=l<c?"vertical":"horizontal",d=Math.round(Math.min(l,c));t.push({a:r[o].label,b:r[i].label,overlapPx:d,axis:u})}}return t.slice(0,5)}function ph(e){if(e.length===0)return[];let t=[],n=0;for(;n<e.length;){let r=e[n],o=r.el.parentElement,i=Ie(r.el);if(i&&o){let a=n+1;for(;a<e.length&&e[a].el.parentElement===o&&Ie(e[a].el)===i;)a++;let s=a-n;if(s>=4){let l=e.slice(n,a),c=Math.round(l.reduce((m,p)=>m+p.rect.width,0)/s),u=Math.round(l.reduce((m,p)=>m+p.rect.height,0)/s),d=Te(l[0].el),f=Te(l[s-1].el);t.push({count:s,role:i,avgWidth:c,avgHeight:u,firstName:d.length>40?d.slice(0,39)+"\u2026":d,lastName:f.length>40?f.slice(0,39)+"\u2026":f}),n=a;continue}}t.push(r),n++}return t}function Po(e){if(!e||e==="transparent"||e==="rgba(0, 0, 0, 0)")return"transparent";let t=e.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\)/);if(!t)return e;let n=parseInt(t[1]),r=parseInt(t[2]),o=parseInt(t[3]),i=t[4]!==void 0?parseFloat(t[4]):1;return i<1?`rgba(${n},${r},${o},${i})`:"#"+[n,r,o].map(a=>a.toString(16).padStart(2,"0")).join("")}function mh(e){let t=e.split(",").map(o=>o.trim().replace(/^["']|["']$/g,"")),n=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","-apple-system","BlinkMacSystemFont"]);return t.find(o=>!n.has(o))||""}function hh(e,t){let n=gh(e,t),r=e/n,o=t/n;return r>20||o>20?`${(e/t).toFixed(2)}:1`:`${r}:${o}`}function gh(e,t){for(;t;)[e,t]=[t,e%t];return e}window.__MINDSTUDIO_BROWSER_AGENT__||(window.__MINDSTUDIO_BROWSER_AGENT__={takeSnapshot:je,takeSnapshotSync:Ut,getRefMap:qe,executeSteps:At,resolveElement:Re,computeStyleMap:El,capturePageImage:Yn},Ko(),ti(),ni(),ri(),ii(),oi(),ka(),ll(),cl(),Li(),Ci(),fl(),il(),Sl(),window.parent!==window&&window.parent.postMessage({channel:"mindstudio-browser-agent",command:"ready"},"*"));return jl(yh);})();
|
|
332
172
|
/*! Bundled license information:
|
|
333
173
|
|
|
334
174
|
rrweb/es/rrweb/ext/tslib/tslib.es6.js:
|